Skip to main content

Convert CSV files to VCD (Value Change Dump) format for digital waveform visualization

Project description

CSV to VCD Converter

License: MIT

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.

Description

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.

Features

  • 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

Installation

git clone https://github.com/SystemVll/csv2vcd.git
cd csv2vcd

No additional dependencies required beyond Python's standard library.

Usage

Basic Usage

python main.py input.csv output.vcd --signal-names signal1 signal2 signal3

Advanced Usage

python 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

Arguments

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)

Example

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 1

Output: A VCD file compatible with waveform viewers like GTKWave, ModelSim, etc.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

csv2vcd-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

csv2vcd-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file csv2vcd-0.1.0.tar.gz.

File metadata

  • Download URL: csv2vcd-0.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for csv2vcd-0.1.0.tar.gz
Algorithm Hash digest
SHA256 673e8f0e6efe0cb616be5bd18cdd7f28da0f7657acc6d090279b8438ed33b0ec
MD5 4070c19b9b346dd701370b4b6084807b
BLAKE2b-256 a4fc4b37e88f5ff2dc5290f88212716f6764b56ffefcf484217726af7fb20a5d

See more details on using hashes here.

File details

Details for the file csv2vcd-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: csv2vcd-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for csv2vcd-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2cd862c5d2961cabe2c43dadbb9564cb903139b891a4d07084558519e0f5230
MD5 dbe69ebd6aa8090176c1598b132f4d43
BLAKE2b-256 076807a195a753eccfb98690adc1d9be606acff87ed5393fa7cdf3465e0f1b23

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