Skip to content

SanDisk-Open-Source/pyvcd

Folders and files

NameName
Last commit message
Last commit date
Nov 10, 2024
Nov 10, 2024
Nov 10, 2024
Nov 10, 2024
Mar 28, 2016
Mar 13, 2020
Nov 10, 2024
Nov 10, 2024
Jun 22, 2021
Jan 13, 2021
Mar 27, 2016
May 16, 2023
Jan 13, 2021
Nov 10, 2024
May 16, 2023
Nov 10, 2024
Apr 5, 2020
Nov 10, 2024

Repository files navigation

PyVCD

The PyVCD package writes Value Change Dump (VCD) files as specified in IEEE 1364-2005.

Read the documentation.

Visit PyVCD on GitHub.

Documentation Status https://coveralls.io/repos/github/westerndigitalcorporation/pyvcd/badge.svg?branch=master

Quick Start

>>> import sys
>>> from vcd import VCDWriter
>>> with VCDWriter(sys.stdout, timescale='1 ns', date='today') as writer:
...     counter_var = writer.register_var('a.b.c', 'counter', 'integer', size=8)
...     real_var = writer.register_var('a.b.c', 'x', 'real', init=1.23)
...     for timestamp, value in enumerate(range(10, 20, 2)):
...         writer.change(counter_var, timestamp, value)
...     writer.change(real_var, 5, 3.21)
$date today $end
$timescale 1 ns $end
$scope module a $end
$scope module b $end
$scope module c $end
$var integer 8 ! counter $end
$var real 64 " x $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
#0
$dumpvars
b1010 !
r1.23 "
$end
#1
b1100 !
#2
b1110 !
#3
b10000 !
#4
b10010 !
#5
r3.21 "