User Guide: DSim Dumping/Opening Waveforms
DSim supports both Metrics eXtensible Dump (MXD) and Value Change Dump (VCD) waveform dump formats.
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 the 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.[mxd|vcd] |
Specifies the filename for waveform dump. The file extension indicates the format to be used. Extension .mxd indicates the MXD format. Extension .vcd indicates the VCD format. This option must be given at runtime. |
-waves file.vcd.gz |
Specifies the file for filename for VCD waveform dump while also compressing to GZIP format. This is not needed for MXD format because it always uses a compressed format. This option must be given at runtime. |
-dump-start time |
Specifies the time to start dump. Default: time 0. |
-dump-end time |
Specifies the 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.
MXD
Metrics eXentsible Dump (MXD) with file extension .mxd
is the recommended waveform format. It has been designed to optimize the resulting dumped file size and has features for enhancing the performance of viewing with the Metrics Waveform Viewer.
Metrics Waveform Viewer can be used from inside DSim Desktop or through DSim Cloud to view files with the extension .mxd
. Please see User Guide: Metrics Waveform Viewer for more details.
MXD DSim Desktop Example:
Please use the Tutorial: DSim Desktop, specifically the "View the waveform" section for an example.
MXD Command Line Examples:
To dump waves in DSim do the following:
DSim Cloud CLI
mdc dsim -a ' +acc -waves <file.mxd>'
DSim
dsim +acc -waves <file.mxd>
To view mxd waves, you can use the Metrics Waveform Viewer: User Guide: Metrics Waveform Viewer. For example, to view waves generated with the CLI in the Metrics Viewer, do the following:
DSim Cloud CLI
mdc view wave <file.mxd>
VCD
Value Change Dump (VCD) with file extension .vcd
is supported for interoperability. It is also 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.
VCD Command Line 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 vcd waves, you may use any waveform viewer that supports the VCD formats, for example GTKWave (http://gtkwave.sourceforge.net/):
gtkwave <file.vcd>
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article