Copyright(2023) - Yehowshua Immanuel
Imagine being able to visualize a CPU pipeline diagram by merely loading a simulation waveform dump, sprinkling in a bit of code, and dragging and dropping some diagram blocks into the visualizer. This project aims to offer such an experience.
Since this project is written in Rust, it should also be able to run in the browser via web-assembly.
As of January 2024, work on the Fastwave Backend is stalled. It has been a fun journey watching Fastwave enable the first iterations of the surfer waveform viewer. Now surfer uses an even better backend called Wellen. Go check it out! I hear it's really good. Perhaps I will soon archive the Fastwave Backend.
Browser demo: https://app.surfer-project.org/
Screenshot of surfer frontend below:
I hope for a GUI that eventually looks like the following...
Robust Error Handling
FastWave currently offers highly robust error handling(at least on the sample
VCD files in this repository) which GTKWave doesn't have. For
example, selecting the UTILIZATON_ENABLED
signal after opening
test2x2_regex22_string1.vcd
(one of the sample xilinx vcd test files) in GtkWave, will crash GtkWave since
this signal is malformed. FastWave on the otherhand simply notes that the
signal is malformed.
I have been testing performance on a 3.04GB VCD file that can be found here.
For getting the GtkWave results, I fired up GtkWave, clicked on
File
->Open New Window
, and selected the VCD file linked to above.
I started my stopwatch as soon as I pressed enter to beging loading the VCD
file, and stopped my stopwatch once the GtkWave titlebar reached 100%.
To get the memory consumption, I opened Activity Monitor on Mac, and recorded the GtkWave memory usage before and after loading the large VCD file, and took the difference.
I noticed that when running FastWave in the VsCode terminal as opposed to the MacOS system terminal or the Lapce terminal, FastWave is notably slower.
LZ4 should really improve memory usage once I add it. Note that GTKWave uses LZ4 on the fly.
Software | Time(s) | Memory(MB) |
---|---|---|
FastWave | ~27.30 | 1100+ |
GtkWave | ~30 | 89.8 |
Unable to handle VCD files that have signals with more than 2^32 - 1 = 4,294,967,295 deltas/changes.
This repository comes with several smaller VCD files emitted from various EDA tools. If you want a larger VCD file, grab one from here.
Here are some examples you can run: The first build of the program may take some time.
cargo run --release --example parse_vcd tests/vcd-files/aldec/SPI_Write.vcd
cargo run --release --example vcd
You can run all the tests with cargo test
You may wish to test the parser on a malformed VCD just to make sure that the parser gives useful/sane errors.
Here's a command to test on a malformed VCD:
cargo run --release --example parse_vcd tests/vcd-files/VCD_file_with_errors.vcd