DSim supports VCD waveform dump.
||Generate support for waveform dump and VPI. This option must be given at compile time. Adding
||Compile time option enabling one or more of [rwcbf] at a specific scope using a specification file. See Setting Options by Scope Using Specification File for details.|
||Specifies file for VCD waveform dump. This option must be given at runtime.|
||Specifies file for VCD waveform dump while also compressing to GZIP format. This option must be given at runtime.|
||Specifies time to start dump. Default: time 0.|
||Specifies time to stop dump. Default: end of simulation.|
||Enables dumping of aggregates (arrays and structs).|
||Control waves to dump by scope using a specification file. See Setting Options by Scope Using Specification File for file details and examples.|
-dump-end options, the time value may optionally have a time unit attached. If no time unit is specified, then the default time resolution of the simulation is assumed. Valid time units are:
s. No spaces should appear between any digits and the time unit.
DSim also supports the standard
$dumpon/$dumpoff/$dumpvars calls to dump specific time regions, or to limit the dump to specific signals.
VCD dump is a supported target for transparent compression: if you dump to "file.vcd.gz" then DSim will automatically compress the VCD file using
GTKWave can read such compressed VCD files directly.
VCD was invented around 1985, and does not support any advanced constructs. For this reason, DSim supports SystemVerilog and VHDL within the VCD format as best it can:
- Interfaces, program blocks, packages, etc. are dumped as if they were modules.
- By default, only integral, real values and events can be dumped. Enums and packed structs are dumped as their integral values. If
-dump-aggis given, then elements of packed/unpacked arrays and structs are dumped as individual VCD signals.
Standard VCD supports the 4-value logic set
Z. Some VCD readers are able to read a non-standard file that can
represent the additional VHDL 9-state values
-dump-vcd-9s option will cause DSim to write out
such an enhanced VCD file. Without the option, the additional VHDL 9-state values are mapped to the standard values.
- To dump waves in DSim do the following:
mdc dsim -a ' +acc -waves <file.vcd>'
dsim +acc -waves <file.vcd>
- To view waves, you may use any waveform viewer that supports the above formats. For example, to view waves in GTKWave (http://gtkwave.sourceforge.net/), do the following:
mdc view wave <file.vcd>