Dumping/Opening Waveforms
DSim supports VCD waveform dump.
Option | Description |
---|---|
+acc[+rwcbfs] |
Generate support for waveform dump and VPI. This option must be given at compile time. Adding +acc defaults to +acc+rwb , for more information please review the secion "Using DPI and PLI" |
-acc-specs file |
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. |
-waves file.vcd |
Specifies file for VCD waveform dump. This option must be given at runtime. |
-waves file.vcd.gz |
Specifies file for VCD waveform dump while also compressing to GZIP format. This option must be given at runtime. |
-dump-start time |
Specifies time to start dump. Default: time 0. |
-dump-end time |
Specifies time to stop dump. Default: end of simulation. |
-dump-agg |
Enables dumping of aggregates (arrays and structs). |
-wave-scope-specs file |
Control waves to dump by scope using a specification file. See Setting Options by Scope Using Specification File for file details and examples. |
For the -dump-start
and -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: fs
, ps
, ns
, us
, ms
and 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
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 gzip
.
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-agg
is given, then elements of packed/unpacked arrays and structs are dumped as individual VCD signals.
Standard VCD supports the 4-value logic set 0
, 1
, X
, and Z
. Some VCD readers are able to read a non-standard file that can
represent the additional VHDL 9-state values L
, H
, W
, U
and -
. The -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.
Examples:
- To dump waves in DSim do the following:
DSim Cloud CLI
mdc dsim -a ' +acc -waves <file.vcd>'
DSim
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:
DSim Cloud CLI
mdc view wave <file.vcd>
DSim
gtkwave <file.vcd>