Skip to main content

Handling of Fast Signal Traces (fst) in Python

Project description

Pylibfst: Handle Fast Signal Traces (fst) in Python

Fst, like vcd, is an open format for dumpfiles generated by EDA logic simulation tools. Unlike vcd, fst is a compressed binary format that offers much better performance for very large dumpfiles. Fst was originally developed as part of gtkwave. For more details on the format, see GTKWave 3.3 Wave Analyzer User's Guide.

Pylibfst is a python cffi wrapper for a slightly extended version of the fst C library contained in gtkwave. It was initially created to add support for fst to WAL (Waveform Analysis Language), developed at the Institute for Complex Systems at Johannes Kepler University, Linz.

More details on WAL can be found at https://wal-lang.org.

The latest development version of pylibfst is available on github.

Build & Install

Dependencies

Additional packages that need to be installed on the system:

  • cmake build environment (cmake, gcc, ...)
  • zlib-dev

Install using PyPi (pip)

Pylibfst is available from PyPi!

pip install pylibfst

Build & Install from Source

The latest development version of pylibfst is available on github.

There are various ways to build and/or install pylibfst:

  • Build from Source using Python
python -m pip install --upgrade build
python -m build
  • Build from Source using make
make all
  • Build & Install from Source using make
make install

Usage

A documentation on how to handle the cffi-style interface (calls, arguments, return values, ...) can be found in the CFFI documentation.

Although the fst format and library are widely used, there is unfortunately no documentation for the libfst library. (more details on this: FST API documentation · Issue #70 · gtkwave/gtkwave · GitHub). However, to support development, pylibfst comes with some documented extensions, helper functions and examples.

  • Extensions: see fst/fstext.h
  • Helper functions:
    • string(..) .. Converts ffi cdata to a python string
    • get_scopes_signals2(..) .. Iterates the hierarchy and returns a list containing all scope names and a named tuple containing two dictionaries which describe the signals: The by_name dictionary maps from signal names, the by_handle from signal handles to a corresponding named tuple containing signal name, length and handle. Note that signals with different name may have the same handle, therefore by_handle may have less entries than by_name.
    • fstReaderIterBlocks(..) and fstReaderIterBlocks2(..): Wrapped versions of corresponding libfst functions. Allow the use of any normal Python function as a callback (with slight overhead).
  • Examples
    • dumpfst.py .. Demonstrates the main calls required to implement an fst reader.
    • IterBlocks_callback.py .. Demonstrates the use of fstReaderIterBlocks and fstReaderIterBlocks2 using cffi-style callbacks
      • Advantage: Most efficient
      • Disadvantage: Only one callback function per program possible
    • IterBlocks_wrapped_callback.py .. Demonstrates the use of fstReaderIterBlocks and fstReaderIterBlocks2 using pythonic callbacks (helper functions above)
      • Advantage: "Normal" Python functions as callbacks (as many as you want)
      • Disadvantage: Slightly more overhead due to wrapper function

Known Problems and TODOs

  • Windows and Mac untested

libfst Sources

How to upgrade libfst?

  1. Copy most recent sources from gtkwave to directory fst
  2. Check and update fst/CMakeLists.txt (see comments in file)
  3. Update above section (e.g. commit hash)
  4. Update pylibfst/libfstapi_build.py and pylibfst/libfstapi.cdef according to fst/fstapi.h
  5. Check and update LICENSE files
  6. Check and update fst/fstext.h and fst/fstext.c
  7. Check and update pylibfst/helpers.py
  8. Check build and install
  9. Check and update examples
  10. Commit: Must contain the information from section above

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylibfst-0.2.1.tar.gz (86.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pylibfst-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl (206.0 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

pylibfst-0.2.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (207.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pylibfst-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl (206.0 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

pylibfst-0.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (207.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pylibfst-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl (204.1 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

pylibfst-0.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (205.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pylibfst-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl (204.1 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

pylibfst-0.2.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (205.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pylibfst-0.2.1-cp39-cp39-musllinux_1_2_x86_64.whl (204.0 kB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

pylibfst-0.2.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (205.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

pylibfst-0.2.1-cp38-cp38-musllinux_1_2_x86_64.whl (204.0 kB view details)

Uploaded CPython 3.8musllinux: musl 1.2+ x86-64

pylibfst-0.2.1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (204.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file pylibfst-0.2.1.tar.gz.

File metadata

  • Download URL: pylibfst-0.2.1.tar.gz
  • Upload date:
  • Size: 86.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pylibfst-0.2.1.tar.gz
Algorithm Hash digest
SHA256 fab7bae86cb131c9be76717d0badbfa79d81a53f69c84abe0ca78907328c1c14
MD5 b9eb55c6360f1111620ad5a5d81f7c89
BLAKE2b-256 90a82ebc9f5f15b53cd2f9a448eebf3c4514a24759572625da2e26cd3dd34a91

See more details on using hashes here.

File details

Details for the file pylibfst-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylibfst-0.2.1-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e027eaa62cfed20677f47d2ffccaddceb8aae2bc48b96bfcc7c70e3e962548cf
MD5 79210c55c6e5f78fb8899f0bcaff889d
BLAKE2b-256 d94b76d212a90a3a3258976a6af5bf3e0a6ef1e8a9bffdab4106bfe8b0a65d49

See more details on using hashes here.

File details

Details for the file pylibfst-0.2.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylibfst-0.2.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 51c8a217c7c13eb5aef9dffbcc89420ced8a60d54a4998a6762843550398bd68
MD5 61ec188d6a64fe8fa7338825f5f619d2
BLAKE2b-256 fea4cb12b5f3ac0f102fb8fdfaf9cee384f4ee13c68ca867c815a68f280a991a

See more details on using hashes here.

File details

Details for the file pylibfst-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylibfst-0.2.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a8baab35e47550290f7088de98f4ab7aeb27c9cc0ceb452528071c54fccace9b
MD5 974109398ca6727970165ba2ebf30992
BLAKE2b-256 662822e57425cfcab20cad3eb4ec2f4507f87d177dd2e31842f95c7c4ab9f2c6

See more details on using hashes here.

File details

Details for the file pylibfst-0.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylibfst-0.2.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6fa7404e4441b01d555de5cecf834e413b44972fa9a25971cda0223e9c883f03
MD5 7f77199c18e80f3a87a7c6a0720835cc
BLAKE2b-256 50bfec97962f710aa32df08fe73238fdb5972199bf3947f27f6b5b946b048868

See more details on using hashes here.

File details

Details for the file pylibfst-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylibfst-0.2.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 04f306068d50d4ecd896558e518ea755318a3ec3fee889d2ad9adc3a8286e867
MD5 90c7c3f281dc9dda840bf9c426c0e2c0
BLAKE2b-256 db6a6543bc030c2a67a71634f82ac06ea947c5ea3f4302f3ee39a2112cd261a9

See more details on using hashes here.

File details

Details for the file pylibfst-0.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylibfst-0.2.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b42b99673b955c9cf092c455c53c9afdd30ac646172de0a9d1a44ba63f726b49
MD5 b1b7caeda808a377c1bda0e780ced42b
BLAKE2b-256 88faf9d10cc99c167c6dab17655d3d096f706b6cad7d20c9e15ba768106b32c9

See more details on using hashes here.

File details

Details for the file pylibfst-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylibfst-0.2.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a7084d6d340fccd5dde4d8f8e5cad658679a43af03b932561070f82e506d87e9
MD5 7a2838e3615d119cc28c8744d6dbb231
BLAKE2b-256 18874a079bfb572a897b3fc7e0eb649bf16a68f423c6e5ed0ee9fe2c123ba2ca

See more details on using hashes here.

File details

Details for the file pylibfst-0.2.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylibfst-0.2.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 958ca264a35bfc23bbc8385dd729ad0f4b1f682565186a9977cf1fb54e82b628
MD5 3bfb020918c5b1cbe9b45bb6c2ee8648
BLAKE2b-256 42d4255dd1558ad4ee3329555b236265ca06851f63afc8f65e1796dd46d8e97d

See more details on using hashes here.

File details

Details for the file pylibfst-0.2.1-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylibfst-0.2.1-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 baf49ae3b0629c1cb167b0af76d12a025e2f0fbdadd397cb7dc551ccd0e77099
MD5 b3d5a720e0314b7fc01030230f982807
BLAKE2b-256 a365b61366eae30baa74659830bb434c4dec2af2b041b608d2662006e7e8b385

See more details on using hashes here.

File details

Details for the file pylibfst-0.2.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylibfst-0.2.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 816099bca45d071016ffb760e8ab0688a618769584987f8afe2710265e644426
MD5 49b6dd6d43a0e0356028db267cd91bc6
BLAKE2b-256 17cb0093a3d630e7e01383015c9ff5d3471937e437af0b6f9a1a17ae4c761e7b

See more details on using hashes here.

File details

Details for the file pylibfst-0.2.1-cp38-cp38-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pylibfst-0.2.1-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9b22a45ffd3e17f857c301ea41352e67adbffc59ba704f6dcbbbb935eca4ddbe
MD5 7fa8a7f937c3586a107504f013637ace
BLAKE2b-256 7530d26cf1ecf43fdb4ac7729717b52dafbbb2b4f8e2d4f7a520476ee88dc120

See more details on using hashes here.

File details

Details for the file pylibfst-0.2.1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylibfst-0.2.1-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c4d5d27739a323059bc825f04f6e9b421e937c6c00f67acfe87635c21eda69fe
MD5 06bdc3e122e71eced35937848bf44519
BLAKE2b-256 73b41b78e5b1174069b2153126135a129edb5632a22c9ba6a34bf438bf9a055e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page