Ask Sawal

Discussion Forum
Notification Icon1
Write Answer Icon
Add Question Icon

How to convert vpd to vcd?

4 Answer(s) Available
Answer # 1 #

Simulation is an indispensable step in IC design, and it is necessary to record the waveform file for detailed analysis and research. Say a few waveform files Wlf (wave Log file), VCD (Value change Dump) file, Fsdb (Fast Signal DataBase) file, SHM, VPD:

1, for WLF waveform log file, as long as we have used Modelsim, should be very familiar. WLF (wave Log file) is a waveform file supported by Mentor Graphics company Modelsim. But when we look at waveforms in the waveform window, a *.wlf file is generated at the end of the simulation (the default is Vsim.wlf). Next time we can open this saved waveform directly via Modelsim. Vsim-view vsim.wlf-do where the content of is the waveform signal to be viewed. It is emphasized that this WLF file can only be generated by Modelsim and can only be displayed by Modelsim. is not a common file file format.

2. VCD (Value change Dump) is a common format. VCD files are an ASCII file defined in the IEEE1364 standard (Verilog HDL language standard). It mainly contains the header information, the variables of the predefined and variable value of the change information. It is because it contains the signal change information, it is equivalent to record the entire simulation information, we can use this file to reproduce the simulation, we can display the waveform. Because VCD is part of the Verilog HDL language standard, all Verilog emulators are capable of implementing this feature, as well as allowing users to dump VCD files through system functions in Verilog code. We can generate waveforms by Verilog HDL's system function $dumpfile, which specifies the data of certain modules and signals in the simulation by $dumpvars parameters.

In particular, it is precisely because the VCD records the complete change of signal information, we can also use a VCD file to estimate the design of power consumption, which is not available in other waveform files. Both the encounter and PrimeTime PX (Prime power) can be used for power analysis via the input network file, a library file with power consumption information, and a VCD file generated after simulation.

Because VCD is part of the Verilog HDL language standard, all Verilog emulators need to be able to implement this feature. So we can use the system function to dumpvcd the file in the Verilog code. In addition, we can use the Modelsim command to dump VCD files, which can be extended to VHDL. Specific commands: VCD file MYFILE.VCD

VCD add/test/dut/* This generates a VCD data message with all the signals under the DUT.

We're using it to simulate Vsim-vcdstim

Test;add Wave/*;run-all;

Or join in the Testbench:



$dumpfile ("*.VCD");

$dumpvars (0,**);


3, Fsdb (Fast Signal DataBase) is the spring Soft (Novas) company Debussy/verdi support waveform files, generally smaller, more widely used, the rest of the simulation tools such as Ncsim, Modlesim, etc. you can dump FSDB files directly by loading Verdi PLI (typically located under the Share/pli directory in the installation directory). The Fsdb file is Verdi uses a proprietary data format, similar to a VCD, but it is only a useful information to signal the simulation process, removing the information redundancy in the VCD, like the VCD data for a Huffman encoding. Therefore, the FSDB data volume is small and the simulation speed is increased. We know that VCD files are implemented using Verilog built-in system functions, and FSDB is implemented through the Verilog PLI interface. $fsdbDumpfile, $fsdbDumpvars, etc.

Testbench add:



$fsdbDumpfile ("*.fsdb");

$fsdbDumpvars (0,**);


Its aftermath of the file is different simulation or debugging tools support file types, non-universal, but the basic can be converted from a VCD file (in fact, the compact version of the VCD file, because only to take the simulation debugging required data, so the file size is much smaller than the original VCD file), Some also provide the function of mutual conversion with VCD files.

4. SHM is a waveform file supported by the Cadence company NC Verilog and Simvision, in fact. SHM is a directory that contains. DSN and. TRN two files.

5, VPD is Synopsys company VCS DVE support waveform files, can be produced with $vcdpluson.

By using Cadence NC Verilog to compare the same testcase and the same dump waveform conditions, the shortest time to produce the Shm file (nonsense, originally a company), the time to produce a VCD file is as many times as the SHM and Fsdb. In the author's test example, the resulting Fsdb file is dozens of MB for the more than 10 Mb,shm file, and the VCD file is a few gigabytes in size.


Some uses of Fsdb:

(1) The following is a list, prompting the fsdb of the various possible uses, the specific content we can Google A, they are out.

Fsdbdumplimit-How do I limit the size of fsdb files to use?

$fsdbDumpvars (, *)

Fsdbdumpfile-Specify FSDB file name

$fsdbDumpfile ("")

Fsdbdumpvars-dump the specified variable

Fsdbdumpsingle-dump the specified signal

Fsdbdumpvariable-dump the specified VHDL variable

Fsdbswitchdumpfile-Switch dumping to another FSDB file

$fsdbSwitchDumpFile ("")

Fsdbautoswitchdumpfile-Limit file size and automatically create a new Fsdb file when the amount of data is too large

$fsdbAutoSwitchDumpfile (, "",< number of file>)

Fsdbdumpflush-force to Dump Result to FSDB file

Fsdbdumpmem-dump the contents of the specified memory

$fsdbDumpMem (, ])

$fsdbDumpon-Open FSDB dumping

$fsdbDumpoff-Close FSDB dumping

(1) A free-switching Fsdb method

Sometimes it takes a long time to run a simulation, but the wave of care is just a small part of it. This time how to switch waveforms, so that the file is not too large? A method is described here. Examples are for reference only, and you can create more diverse changes in combination with practical applications.

Initial begin

$timeformat (...);

$fsdbAutoSwitchDumpfile (...);

$fsdbDumpvars (...);

Conditional expression 1


Conditional Expression 2



(2), we are more commonly used in general and $value$plusargs this task, in the Test_top:

$value $plusargs ("casename=%s", Casename)

Pass the Casename through the script at run (to Vcs/nc sim_arg: +casename= $Testcase _name.fsdb)

It is easy to dumpfsdb at the same time if you run multiple testcase at the same time, and also to skip some time to start

Dump (sim_arg: +time= $start _time)

$value $plusargs ("time=%d", skip)


(3), project everyone concerned about the module different, in order to frequently modify the Test_top dump, will also be the need to dump the content with Dumplist

File to implement the

$fsdbDumpvarsToFile ("Dump.list");

such as dump.list content #For annotation)

0 Test_top

#1 Test_top

#0 Test_top.dut


#0 test_top.dut.m2

When you use it, you usually add the relevant statement to the TEST_TOP.V:

reg casename;

Integer skip, I;

Initial begin

if ($test $plusargs ("Dumpfsdb")) begin

if ($value $plusargs ("time=%d", skip))


if ($value $plusargs ("casename=%s", Casename))

$fsdbAutoSwitchDumpfile (Casename, 30);


$fsdbAutoSwitchDumpfile ("./test_top.fsdb", 40);

$fsdbDumpvarsToFile ("Dump.list");



When running simulation, if you want to start the dump waveform at 5000ns (time unit root timescale), give VCS/NC parameters

+dumpfsdb +time= +casename= Testcase1.fsdb

The TESTCASE1 generally we will associate with the case name after the script is processed, and this will start from 5000 when we run out of the way.

Testcase1_000.fsdb, testcase1_001.fsdb like this,

2. The other dump.list (name can be taken casually) inside the setting is the same as the normal set dump level settings.

Hierarchical path name




Dump FSDB Wave

Interger Start_dump;

Integer stop_dump;

Integer finish_time;

Integer result;

reg waveform_name;

Initial Begin:fsdb_dump

Start_dump = 0;

Finish_time = 0;

Waveform_name = "Debussy.fsdb";

if ($test $plusargs ("FSDB"))


if ($test $plusargs ("Dump_file"))

result = $value $plusargs ("dump_file=%s", waveform_name);

$fsdbAutoSwitchDumpfile (150,waveform_name,100);



Select dump Signals

$fsdbDumpvars (0,XX_TB);



Methods for generating various waveform files Vcd,vpd,shm,fsdb

Answer # 2 #

This is (hopefully) going to be a neat little package to read uncompressed VCD files into R for toggle counting, power estimation and simple side-channel analysis (on a teaching level).

clone the git repository

install the build dependencies

open project in RStudio and hit Ctrl + Shift + L

If you have a .vpd file e.g. from Synopsys VCS, you can convert it to an (uncompressed) VCD file by calling

if you want to capture version information, you might want to use

I made this because I wanted a stream oriented parser to make toggle count statistics in R. As far as I know, there is no other VCD parser. Below is a list with parsers in other languages, without making any assurance on functionality or performance (some are just for parsing, some can also do toggle counts).

VCD on Hackage

verilog_VCD vcd_parser

N.O.R.E Nomura
Dance Notator
Answer # 3 #
  • Just click the "Choose your .
  • Your VPD file will then be displayed in the browser.
  • Now click on "Save as." at the top of the page.
  • Then choose the file format (e.g. JPG, PDF, DOCX, TXT, .) you want.
  • Your file will be converted and downloaded.
Maahir Wirkud
Answer # 4 #

A .vcd file is an IEEE 1364-1995 standard file that contains all the simulation waveform information that is useful for debugging simulation. It contains all the signals in the design, so you do not need to rerun a simulation if you need to add a signal in the Waveform window.

To create a .vcd file:

1)    Compile and load design successfully in transcript window

2)    Specify VCD filename

-        Syntax:    vcd  file .vcd

3)    Enable VCD to dump signals under a desired instance

-        Syntax:    vcd add /*

Note:  This command does not dump signals of children instances

Enable VCD for encrypted instances will generate warnings

4)    Run simulation generate VCD database

5)    Quit simulation

-        Syntax:    quit –sim

To be able to display the signals in the .vcd file in Modelsim Waveform window:

1)    Convert VCD to WLF format in ModelSim

-        Syntax:    vcd2wlf   

Note:  if the conversion fails, most of the time it is caused by non-existing instance path. Make sure the  desired instance paths specified in step 3 are correct

Hrishikesh Tejpal