Skip to main content

Sootty

Sootty is a graphical command-line tool for visualizing waveforms from hardware simulations, as a substitute for waveform visualizers like Verdi and GTKWave. It is designed with a focus on being lightweight and easy to use, and takes advantage of modern terminals’ capabilities to provide a clean graphical display. Current features include:

  • Customizable display style
  • Search and highlight events using a simple query language

And here's an example of how sootty can be used directly from the terminal:

Screenshot of sootty in action

Getting Started

  1. Install sootty using pip:
pip install sootty
  1. Display a waveform file to the terminal:
sootty "waveform.vcd" -o > image.svg

Optional arguments include:

  • -s | --start FORMULA Specify the start of the window.
  • -e | --end FORMULA Specify the end of the window.
  • -l | --length N Specify the number of ticks in the window (mutually exclusive with -e).
  • -o | --output Print svg data to stdout rather than display on terminal.
  • -w | --wires LIST Comma-separated list of wires to include in the visualization (default to all wires).
  • -b | --break FORMULA Specify the formula for the points in time to be highlighted.
  • -r | --radix N Display values in radix N (default 10).
  • -S | --save SAVENAME Saves current query for future reuse.
  • -R | --reload SAVENAME Loads a saved query. Requires query name as string.
  • --btable Print the wire value table at breakpoints to stdout (-b is required).

*Note: For more detailed information on the query language, check out syntax.md

Examples

Below are some more examples that take advantage of some of the features sootty has to offer:

  • Display all wires starting at time 4 and ending at wire clk's tenth tick:
sootty "example/example3.vcd" -s "time 4" -e "acc clk == const 10" -w "clk,rst_n,pc,inst"
  • Display wires Data and D1 for 8 units of time starting when Data is equal to 20:
sootty "example/example1.vcd" -l 8 -s "Data == const 20" -w "D1,Data"
  • Saving a query for future use:
sootty "example/example2.vcd" -s "rdata && wdata == const 22" -l 10 -w "rdata, wdata" -S "save.txt"
  • Reloading a saved query:
sootty -R "save.txt"
  • Add breakpoints at time 9, 11, and 16 - 17 and print wire values at breakpoints:
sootty "example/example5.evcd" -b "time 9 || time 11 || after time 15 && before time 18" --btable

Running with python

Sootty can also be run from within a python program:

from sootty import WireTrace, Visualizer, Style
from sootty.utils import evcd2vcd

# Create wiretrace object from vcd file:
wiretrace = WireTrace.from_vcd_file("example/example1.vcd")

# Convert wiretrace to svg:
image = Visualizer(Style.Dark).to_svg(wiretrace, start=0, length=8)

# Display to stdout:
image.display()

# Manually convert EVCD file to VCD file:
with open('myevcd.evcd', 'rb') as evcd_stream:
    vcd_reader = evcd2vcd(evcd_stream)
    with open('myvcd.vcd', 'wb') as vcd_stream:
        vcd_stream.write(vcd_reader.read())

Note: You can view and modify the save files for the queries in the ~/.config/sootty/save directory.

Dependencies

As of the current release, Sootty can only display images in certain terminals with builtin graphics support. This currently includes the following terminal replacements:

The following external dependencies are also needed to properly display images within the terminal:

  • viu

    # From source (rust package manager)
    cargo install viu
    # MacOS
    brew install viu
    # Arch Linux
    pacman -S viu
    
  • rsvg-convert

    # Ubuntu
    apt install librsvg2-bin
    # MacOS
    brew install librsvg
    

Contributing

If you are interested in contributing to this project, feel free to take a look at the existing issues and submit a PR. Beginners are encouraged to focus on issues with the "good first issue" label. This project has also been involved with Google Summer of Code through the FOSSi Foundation. Check out our project idea for GSoC '23: https://www.fossi-foundation.org/gsoc23-ideas#enhancing-the-sootty-terminal-based-graphical-waveform-viewer

Metadata

Release files for sootty 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sootty 1.0
File Size Uploaded Provenance
sootty-1.0.tar.gz 24.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sootty 1.0
File Interpreter ABI Platform
sootty-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 56.7 kB

Release files / sootty-1.0.tar.gz

Download URL sootty-1.0.tar.gz
Size 24.2 kB
Tags Source
SHA-256 checksum
How to use checksums
138a9a220493bf36e6331e6b93f47d45d93d48116809dce6783a5186eb9dc48c
BLAKE2b-256 checksum
How to use checksums
a6f3d3ca5883f22923458b1cbe98bee6fb6c0b75235504c1d9d0f193fb217908
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.30.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.2

Release files / sootty-1.0-py3-none-any.whl

Download URL sootty-1.0-py3-none-any.whl
Size 32.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1785773aa031a4a3723f1e728f8ecd44a398b10775332bc33f8c010c00a0785
BLAKE2b-256 checksum
How to use checksums
31b062152522fe23f4c87daeade525820287fc4e5ad234cb67e79a179a9908f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.30.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.2

Security for sootty 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page