How to generate fsdb waveform in verilog simulation?

tags: Verilog/SystemVerilog  verilog  vcs

How to generate fsdb waveform in verilog simulation?

There are many formats for verilog simulation waveforms, among which the standard format is VCD, which can be used as a cross-tool data exchange format. However, VCD itself is not compressed, which is usually larger. For pure digital simulation, there can be other waveform file formats as an alternative. For example, Synopsys' VPD format, and FSDB. fsdb is the waveform format of the verdi tool (acquired by synopsys). The ease of use of verdi is favored by the majority of digital engineers. This article introduces how to export fsdb waveforms. Take vcs+verilog as an example, other tools are similar.

Method 1: In the verilog file

Add the following statement in the test file (usually at the top level):

initial begin
     $fsdbDumpfile("xx.fsdb");
     $fsdbDumpvars(0,"top name");
end

The first parameter in the fsdbDumpvars function indicates the depth of the derived signal level, and 0 means all levels.
In addition, the -P parameter needs to be added to the vcs script. Take Makefile syntax as an example, such as:

NOVAS=${NOVAS_HOME}/share/PLI/VCS/LINUX64
novas_args=-P ${NOVAS}/novas.tab ${NOVAS}/pli.a
run:
	vcs -full64 -debug_pp ${novas_args} *.v -top TOP -l vcs.log
	./simv

Where NOVAS_HOME is your verdi installation directory.

Method 2: Use the do file

This method does not need to add dump syntax or functions to verilog.
only need to write a do file, such as:

fsdbDumpfile "dsss_decode.fsdb" 500
fsdbDumpvars 0 TOP "+all"
fsdbDumpon
run
fsdbDumpoff
quit

Simulation script (Makefile) does not require additional -P parameters, as follows:

run:
     vcs -full64 -debug_pp -top TOP ${SRC} -l vcs.log
     ./simv -ucli -do tb.do -l run.log

Does it look more concise? You can add other wave file export commands or other more complicated wave control commands in the do file at the same time. More convenient and flexible.

Intelligent Recommendation

VCS simulation tutorial (1): Verilog+waveform+Makefile

table of Contents Verilog file VCS simulation DVE view waveform Use Makefile to automate simulation This blog post mainly describes how to simulate the verilog file and view the waveform through vcs, ...

Verilog digital simulation waveform is drawn in matlab

Verilog digital simulation waveform is drawn in matlab Foreword 1. Verilog digital simulation waveform data export 2. Matlab drawing Draw way Drawing method two 3. BUS wire drawing Summarize Foreword ...

Implementation of synchronous FIFO (Verilog code and simulation waveform)

1. Basic knowledge related to FIFO 1. The full name of FIFO is: First-in-first-out. FIFOs can be divided into synchronous FIFOs and asynchronous FIFOs. Synchronous FIFO: The clock written to the FIFO ...

Generate FSDB waveforms

3.3.1 Generate FSDB Waveform Add an FSDB system function in TestBench Adjust the FSDB system function in the TCL file 3.3.2 Enable FSDB DUMP in Synopsys Use the following compilation option to enable ...

[FPGA] Use Verilog programming to realize 2FSK modulation and demodulation simulation through ModelSim② (Call .mif to generate 2FSK carrier waveform-DDS)

Verilog writes 2FSK, step ②, call .mif to generate FSK carrier waveform _DDS Define module port Define the .mif file query address bit (the address bit is the data in the .mif file’:' on the lef...

More Recommendation

VCS+Verdi generates fsdb waveform file

First of all my VCS version is vcs_mx_201509SP21 1 in your tb file, join 2 in the linux command line input Many people use -debug_pp instead of -fsdb, and now generally use -fsdb....

# Verdi # case analysis on loading FSDB waveform failed

Some time ago, when I was a small example, when I was studying SV language, I encountered a problem, and now I have summarized. Add the following waveform load system function to the code, after the e...

#VCS# Several methods about fsdb waveform recording

This topic describes the use model to dump an FSDB file using VHDL procedures, Verilog system tasks, or UCLI. Scenario 1: Using VHDL Procedures Method (1) You can use the VHDL procedures fsdbDumpfile(...

How to use Simulation Waveform Editor

Article Directory 1. Master Time Bar time bar Second, the order of moving the pins Three, group group 1. Group 2. Choose a different base 3. Ungroup Ungroup appendix: 1. Master Time Bar time bar Can b...

In Quartus II 13.0, ModelSim-Altera 10.1d is used for waveform simulation. If the Verilog code is modified, how to re-simulate with the new code without closing the window

After modifying the Verilog code, if you close ModelSim and reopen it, the signal list inside will be lost, which is very inconvenient. In fact, you only need to Compile the modified v file, and then ...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top