DSim supports VCD waveform dump to a file. When you want to dump waveforms during your simulation, the following compile-time and run-time switches need to be enabled.
At compile-time, add the +acc+b
switch to give support to waveform dumping.
At run-time, add the -waves
switch with the waveform file name. For example:
mdc dsim -a '-genimage image +acc+b -f filelist.f ...'
mdc dsim -a '-image image -waves wavefile.vcd ...'
Or, combining both compile and run-time commands:
mdc dsim -a '+acc+b -f filelist.f ... -waves wavefile.vcd ...'
This will generate the waveform file in the VCD format, and the file can be opened by waveform viewers that support the format, or viewed with
mdc view wave wavefile.vcd
You can check how large the VCD file is with mdc ls
, and look for wavefile.vcd.
This will list the files and their sizes, in bytes, under the current remote folder.
If you want to reduce the waveform file size, there are several methods to do so in DSim Cloud.
How to Reduce Waveform File Size
Method 1: Compress the waveform file during simulation
mdc dsim -a '... -waves wavefile.vcd.gz ...'
mdc download wavefile.vcd.gz
- Unzip the file on your local compute.
This method increases simulation runtime, but decreases waveform file size and download time.
Method 2: Use a scope file
You can select just a subset of signals for DSim to dump out the information to the waveform. This can greatly reduce the size of the waveform file since not all the information is dumped to it, which is the default. You select a subset of signals by using a scope file.
To use a scope file, use -wave-scope-specs <scope_file>
in your DSim Cloud commands.
The syntax of the scope file can be found in User Guide: DSim Setting Options by Scope Using Specification File.
This method decreases simulation runtime and waveform file size, but requires you to know the hierarchy of your signals.