FastWaveBackend/README.md

91 lines
3.2 KiB
Markdown
Raw Normal View History

2022-07-28 14:43:58 +00:00
Copyright - Yehowshua Immanuel
2022-05-21 21:55:27 +00:00
2022-07-28 14:43:58 +00:00
# A High performance, VCD Parser written in Rust
2022-04-14 04:50:37 +00:00
2022-05-22 00:40:46 +00:00
## Current Features
FastWave currently offers highly robust error(at least on the sample
VCD files in this repository) handling which GTKWave doesn't have. For
eample, selecting the ``UTILIZATON_ENABLED`` after opening
[test2x2_regex22_string1.vcd](./test-vcd-files/xilinx_isim/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 informs you the
signal is malformed.
## Performance
### Methods
Below is a table of performance comparisons on a large 3.04GB VCD file
that can be found
[here](https://drive.google.com/file/d/1pfm2qo2l8fGTHHJ8TLrg1vSGaV_TUbp2/view?usp=sharing).
For getting the GtkWave results, I fired up GtkWave, clicke on
``File``->``Open New Window``, and selected the large VCD file.
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%.
2022-08-05 00:29:49 +00:00
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.
### Results
| Software | Time(s) | Memory(MB) |
|----------|---------|------------|
| GtkWave | ~30 | 89.8 |
| FastWave | 15.09 | 267.3 |
2022-05-22 00:40:46 +00:00
2022-07-28 14:43:58 +00:00
# Current Limitations
Unable to handle VCD files that have signals with more than
2^32 - 1 = 4,294,967,295 deltas/changes.
2022-04-14 04:50:37 +00:00
## Running
2022-08-01 16:29:25 +00:00
This repository comes with several smaller VCD files emitted from
various EDA tools. If you want a larger VCD file, grab one from
2022-04-14 04:50:37 +00:00
[here](https://drive.google.com/file/d/1pfm2qo2l8fGTHHJ8TLrg1vSGaV_TUbp2/view?usp=sharing).
The first build of the program may take some time.
``cargo run --release test-vcd-files/aldec/SPI_Write.vcd``
2022-04-14 04:50:37 +00:00
2022-06-22 01:06:51 +00:00
You can run all the tests with ``cargo test``
2022-08-04 18:29:29 +00:00
# Testing on Bad Files
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 test-vcd-files/VCD_file_with_errors.vcd`
# TODO
2022-08-01 16:29:25 +00:00
## Features
- [ ] be explicit with imports, remove exports as possible
once FastWave is known to be fairly stable.
- [ ] do a read through all the code
- make contents of src/types.rs public as necessary.
2022-07-20 14:38:56 +00:00
- [ ] Print out git commit or release number.
2022-08-01 16:29:25 +00:00
- [ ] Take a look at GTKWave parser to compare efficiency.
- [ ] Move part of the performance section to another markdown file.
2022-06-19 13:44:57 +00:00
2022-08-01 16:29:25 +00:00
## Repairs
- [ ] make a custom date parser for possibly up to 18 different versions(that is, for each possible tool).
2022-07-14 22:52:12 +00:00
- [ ] Consolidate error messages and add cursors throughout.
2022-08-01 16:29:25 +00:00
- [ ] Fix warnings especially usage and restriction warnings once I'm
able to successfully parse all sample VCDs.
## Code Consistency
- [ ] Change error messages to line and filenames. Go through all calls to unwrap.
- [ ] search for any unwraps or any direct vectors indexing
- [ ] Handle TODOs
- [ ] Remove debug code/comments.
2022-08-01 16:29:25 +00:00
## Marketing
2022-08-07 23:09:02 +00:00
- [ ] Send survey to community