A robust Python utility that converts CSV (Comma-Separated Values) files to VCD (Value Change Dump) format for digital waveform visualization in hardware design and verification workflows.
This tool bridges the gap between simple tabular data and industry-standard waveform viewers by transforming CSV data into VCD files. It's particularly useful for hardware engineers, FPGA developers, and digital circuit designers who need to visualize signal changes over time.
- Convert multi-signal CSV data to standard VCD format
- Configurable time units (s, ms, us, ns, ps, fs) and timesteps
- Support for various signal types (wire, reg, integer, parameter)
- Customizable signal widths (single-bit or multi-bit)
- Input validation and robust error handling
- Header row skipping option
- Automatic or custom signal identifiers
git clone https://github.com/SystemVll/csv2vcd.git
cd csv2vcdNo additional dependencies required beyond Python's standard library.
python main.py input.csv output.vcd --signal-names signal1 signal2 signal3python main.py input.csv output.vcd \
--signal-names clock data valid \
--timestep 1e-9 \
--time-unit ns \
--signal-width 1 8 1 \
--signal-type wire \
--skip-header| Argument | Description |
|---|---|
csv_file |
Input CSV file path |
vcd_file |
Output VCD file path |
--signal-names |
List of signal names |
--timestep |
Time between samples in seconds (default: 1e-6) |
--skip-header |
Skip first row of CSV file (header) |
--time-unit |
Time unit for VCD file: s, ms, us, ns, ps, fs (default: us) |
--signal-width |
List of bit widths for each signal (default: 1) |
--signal-type |
Type of signals: wire, reg, integer, parameter (default: wire) |
Input CSV:
0,01101100,1
1,01101101,1
0,01101101,0
...
Command:
python main.py signals.csv output.vcd --signal-names clk data valid --signal-width 1 8 1Output: A VCD file compatible with waveform viewers like GTKWave, ModelSim, etc.
This project is licensed under the MIT License - see the LICENSE file for details.