Linking Novas Files With Simulators and Enabling FSDB Dumping
Linking Novas Files With Simulators and Enabling FSDB Dumping
Synopsys, Inc.
690 E. Middlefield Road
Mountain View, CA 94043
www.synopsys.com
Contents
Contents
About This Book 1
Purpose ...............................................................................................................1
Audience .............................................................................................................1
Book Organization..............................................................................................2
Conventions Used in This Book .........................................................................3
Related Publications ...........................................................................................4
Overview 5
FSDB Format......................................................................................................5
FSDB Related Environment Variables...............................................................6
Novas Object File Cross Reference Matrix ........................................................7
Purpose
This book explains how to link the Novas object files for FSDB dumping with
various standard simulators. The manual should be read from beginning to end,
although you may skip any sections with which you are already familiar.
For detailed descriptions of commands for the Verdi platform, please refer to the
appropriate chapter of the Verdi and Siloti Command Reference Manual.
Audience
The audience for this manual includes engineers who are familiar with languages
and tools used in design and verification such as Verilog, VHDL, SystemVerilog,
and typically install, set-up and run simulators.
This document assumes that you have a basic knowledge of the platform on
which your version of the Verdi platform runs: Unix or Linux, and that you are
knowledgeable in design and verification languages, simulation software, and
digital logic design.
Book Organization
This Linking Novas Files with Simulators and Enabling FSDB Dumping is
organized as follows:
• About This Book provides an introduction to this book and explains how to
use it.
• Overview summarizes the basic information needed to generate FSDB files.
• FSDB Dumping Commands summarizes the common usage of FSDB
dumping commands.
• Linking with Cadence Simulators summarizes the steps for linking the
Novas object files with the Cadence IUS simulator for Verilog, VHDL and
mixed designs.
• Linking with ModelSim Simulators summarizes the steps for linking the
Novas object files with the ModelSim simulator.
• Linking with Synopsys Simulators summarizes the steps for linking the
Novas object files with the Synopsys simulator.
• Appendix A: Third Party Integration provides examples for linking the
object files for FSDB dumping with 3rd-party libraries.
• Appendix B: Required VCS MX Options for Linking with FSDB Dumper
summarizes additional options to use with VCS MX when linking the object
files for FSDB dumping.
• Appendix C: Dumping to Multiple Files with FSDB Commands provides
details on using the FSDB dumping commands to dump to multiple FSDB
files.
• Appendix D: Switch Dumping with Simulator Restore provides details on
switching dumping between FSDB files while also using simulator restore
commands.
Related Publications
• Installation and System Administration Guide - explains how to install the
Verdi and Siloti systems.
• Verdi and Siloti Quick Reference Guide - provides a quick reference for
using the Verdi and Siloti systems with typical debug scenarios.
• Verdi and Siloti Command Reference Manual - gives detailed information
on the Verdi and Siloti command set.
• Verdi User Guide and Tutorial - provides detailed information on
using the Verdi platform.
• nAnalyzer User Guide and Tutorial - provides detailed information on using
the nAnalyzer Design Analysis module.
• nECO User Guide and Tutorial - provides detailed information on using the
nECO Automated Netlist Modification module.
• Siloti User Guide and Tutorial - provides detailed information on using the
Siloti system.
• Release Notes - for current information about the latest software version.
Refer to the 'View release notes' link on the product downloads page.
• Language Documentation
Hardware description (Verilog, VHDL, SystemVerilog, etc.) and
verification language reference materials are not included in this manual.
For language related documents, please refer to the appropriate language
standards board (www.ieee.org, www.accellera.org) or vendor
(www.synopsys.com, www.cadence.com) websites.
Overview
FSDB Format
The Verdi platform supports an open file format called Fast Signal Database
(FSDB) that has the following advantages over the standard VCD file format:
• An FSDB file is more compact than a standard VCD file. Typically, an
FSDB file is about 5 to 50 times smaller than a VCD file.
• Using FSDB files, the Verdi platform displays waveform and back-
annotated signal values faster.
Synopsys provides a set of object and support files in the Verdi package that can
be linked with popular simulators to extend the simulator command set to
support dumping FSDB files directly during simulation instead of VCD files. For
existing VCD files, the conversion utility vfast is provided in the Verdi package
and is used to convert VCD files into FSDB files. In addition, VCD files are
converted to FSDB files automatically when a VCD file is opened using the
nTrace File -> Load Simulation Results command or the nWave File -> Open
command. Another conversion utility, fsdb2vcd, is provided in the Verdi package
and converts FSDB files back to VCD format.
If FSDB dumper support for a simulator version is over 18 month and there are
already more than 3 major simulator version for that vendor, we put this FSDB
dumper into legacy dumper.
For older simulator versions, please contact Synopsys support:
https://solvnet.synopsys.com
Supported Items
Product Name
Supported 1. Simulator
Vendor (Interface
Language 2. Version
Type)
3. FSDB Dumping Platform
Verilog/
1. Synopsys VCS (VCSMX)
SystemVerilog/
VCS 2. VCS MX 2014.03 or later
Synopsys SVA/
(DKI/UCLI) 3. SOL2/SOL7/LINUX/
Verilog(SV)+/
LINUX64/SUSE32/SUSE64
VHDL Mixed
Verilog/
1. ModelTech ModelSim
SystemVerilog/
MODELSIM 2. ModelSim SE 10.2 or later
Modeltech SVA/VHDL/
(FLI/PLI) 3. SOL2/SOL7/LINUX/
Verilog(SV)+/
LINUX64/SUSE32/SUSE64
VHDL Mixed
Subdirectory
Platform
${PLATFORM}
Subdirectory
Platform
${PLATFORM}
which means, in this example, the resolved FSDB file name is "high.fsdb".
NOTE: An option which can be set on the simulator command line may not
always have an equivalent mapping environment variable or FSDB
dumping command option.
Specify with
Specify on Simulator Specify using Environment
FSDB Dumping
Command Line Variable
Command
+fsdbfile+filenam
+fsdbfile+filename NOVAS_FSDB_FILE
e
+fsdb+dumpoff_glitch+time
None None
[+htime]
+fsdb+dumpon_glitch+time
None None
[+htime]
Specify with
Specify on Simulator Specify using Environment
FSDB Dumping
Command Line Variable
Command
+fsdb+dumpoff_sequence
+time[+htime]
None None
+fsdb+dumpoff_sequence
+time[time_unit]
+fsdb+dumpon_sequence
+time[+htime]
None None
+fsdb+dumpon_sequence
+time[time_unit]
+fsdb+esconfig="filename"
FSDB_ESCONFIG
NOTE: This option and the
+fsdb+esoptions option are NOTE: When this environment
exclusive. variable and the
NOTE: When this option and FSDB_ESOPTIONS environment None
the ESCONFIG or variables are specified
FSDB_ESOPTIONS simultaneously, the
environment variable are FSDB_ESOPTIONS environment
specified simultaneously, this variable will be ignored.
option will be ignored.
Specify with
Specify on Simulator Specify using Environment
FSDB Dumping
Command Line Variable
Command
+fsdb+esoptions="ESAoption"
FSDB_FUNCTIONS
+fsdb+functions
NOTE: The
NOTE: The
-debug_access+dmptf option
-debug_access+dmptf option +functions
must be specified for VCS
must be specified for VCS
compile before setting the
compile before setting the
FSDB_FUNCTIONS
+fsdb+functions option.
environment variable.
NOVAS_FSDB_ENV_MAX_G
+fsdb+glitch=num None
LITCH_NUM
+fsdb+ignore_vhdl_complex NOVAS_FSDB_IGNORE_
None
[=on|off] VHDL_COMPLEX
+fsdb+keep_cell_module=
FSDB_KEEP_CELL_MODULE None
module_name
Specify with
Specify on Simulator Specify using Environment
FSDB Dumping
Command Line Variable
Command
+fsdb+no_msg_in_file+
None None
filename
+fsdb+no_msg+
None None
pattern1[+pattern2..]
NOVAS_FSDB_
+fsdb+parameter[=on|off] +parameter
PARAMETER
NOVAS_FSDB_ENV_DUMP_S
+fsdb+sequential None
EQ_NUM
Specify with
Specify on Simulator Specify using Environment
FSDB Dumping
Command Line Variable
Command
+fsdb+time_precision=
FSDB_TIME_PRECISION None
time_unit
NOVAS_FSDB_TRACE_
+fsdb+trace_process[=on|off] +trace_process
PROCESS
NOVAS_FSDB_TRANS_
+fsdb+trans_begin_callstack None
BEGIN_CALLSTACK
NOVAS_FSDB_TRANS_
+fsdb+trans_end_callstack None
END_CALLSTACK
FSDB_TRANS_ERROR_
+fsdb+trans_error_callstack None
CALLSTACK
FSDB_TRANS_HIDE_
+fsdb+trans_hide_error None
ERROR
+fsdb+vhdl_package_lib=
FSDB_VHDL_PACKAGE_LIB None
+all|lib_name1:lib_name2:...
+fsdb+writer_mem_limit= NOVAS_FSDB_ENV_
None
num WRITER_MEM_LIMIT
NOVAS_FSDB_DEFAULT_
None None
FILE_NAME
Some options are related to one another in behavior. For example, the
NOVAS_FSDB_MDA option can enable/disable MDA signal dumping and the
NOVAS_FSDB_ALL option can enable/disable all supported signal type
dumping. This makes NOVAS_FSDB_ALL a superset of
NOVAS_FSDB_MDA. When such options are set using different methods at the
same time, the effect of the setting is determined as follows:
1. Resolve each option's value using the simulator command line then
environment variable, and then FSDB dumping command resolution
priority.
2. Behave according to the union of all the option settings.
Example 1
1. Specify the environment variable to enable dumping MDA signals:
setenv NOVAS_FSDB_MDA 1
It would seem that the environment variable (1) should have priority over the
setting in the FSDB dumping command (2). However, these two options are not
the same, so the resolution for the three methods cannot be applied. The effect of
the setting in this example is the union of the option setting of
NOVAS_FSDB_MDA(+fsdb+mda) and NOVAS_FSDB_ALL(+fsdb+all) and
that is "to enable dumping of all supported signals".
Example 2
1. Specify the option on the simulator command line to enable dumping
packed MDA signals:
simv +fsdb+packedmda
Example 3
Specify the options on the simulator command line to filter all dumper messages,
warning messages, and error messages:
simv +fsdb+no_warning +fsdb+no_error +fsdb+no_all_msg
The effect of the three related options is the union of the three which is "to filter
all dumper messages".
+fsdbLog=3
+fsdbLog=-1
Dump logging messages by level +fsdbLog=~5 ...
+fsdbLog=severity
of severity. +fsdbLog=7~ ...
+fsdbLog=5~7 ...
+fsdbLog=7~5 ...
NOTE: The
+fsdb+functions +fsdb+functions
-debug_access+dmptf option
must be specified for VCS
compile before setting the
+fsdb+functions option.
ESA Options
The ESA options used for +fsdb+esoptions="ESAoption" are summarized in the
table below. These options are optional.
Table: ESA Options Supported in Simulator Runtime Phase
In the xscopefile.f:
2 tb_CPUsystem.i_CPUsystem.i
_CPU
$fsdbDumpSVA x x x
$fsdbLog x x x
$fsdbSuppress x x x
$fsdbSwitchDumpfile x x x
Description
Specify the FSDB file name created by the Novas object files for FSDB
dumping. If not specified, the default FSDB file name is "novas.fsdb". This
command is valid only before $fsdbDumpvars is executed and is ignored if
specified after $fsdbDumpvars.
To restrict the largest dump file size to the user-defined size limitation, please
specify the limit size in megabyte format. This function will affect the FSDB file
that is specified in "FSDB_Name". The FSDB dumper uses the sliding window
scheme to keep the last signal values in the FSDB file. It drops the old values if
file size exceeds the user-specified limitation.
For $fsdbDumpvars, $fsdbDumpMDA, $fsdbDumpSVA and
$fsdbDumpvarsByFile, user can use the option "+fsdbfile+filename.fsdb" to
specify the target FSDB file to dump. It is equal to using $fsdbDumpfile then
$fsdbDumpvars.
Syntax
When specified in the design:
$fsdbDumpfile("FSDB_Name" | FSDB_Name_var [ ,Limit_Size |
,Limit_Size_var ]);
Cadence:
call fsdbDumpfile "FSDB_Name"
call fsdbDumpfile "FSDB_Name" Limit_Size
ModelSim:
fsdbDumpfile "FSDB_Name"
fsdbDumpfile "FSDB_Name" Limit_Size
Arguments
FSDB_Name
Specify the name of the FSDB file generated by the Novas object files for
FSDB dumping.
FSDB_Name_var
Specify the FSDB file name in a variable.
NOTE: The minimum file size of the FSDB file is 10M. If you set the size to
less than 10M, it will be set to 10M instead.
Examples
NOTE: The following example uses the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
$fsdbDumpfile("novas.fsdb", 32);
/* Specify dump file as novas.fsdb and limit to 32 megabytes */
$fsdbDumpvars(0, design_top);
Variable Example
If specified in the design, the design variable could be passed as command
argument.
reg [32*8-1:0] option_reg = "+fsdbfile+novas.fsdb";
reg [15:0] limit_size_reg = 1000;
string newDumpfile_string = "novas_new.fsdb";
reg [1023:0] newDumpfile_reg = "novas_new.fsdb";
$fsdbDumpfile("novas.fsdb");
$fsdbDumpfile(newDumpfile_string, 1000);
$fsdbDumpfile(newDumpfile_reg, limit_size_reg);
$fsdbDumpFinish
Description
Close all FSDB files in the current simulation and stop dumping the signals.
Although all FSDB files are closed automatically at the simulation finish, this
dumping command can be invoked to explicitly close the FSDB files during the
simulation. A new FSDB file can be created after the old FSDB file is closed.
New dumping data cannot be appended to a closed FSDB file due to the current
limitation of the FSDB file architecture. If the same file name as a closed FSDB
file name is opened again during the same simulation run, the new FSDB file will
be renamed automatically.
Syntax
When specified in the design:
$fsdbDumpFinish;
Cadence:
call fsdbDumpFinish
ModelSim:
fsdbDumpFinish
$fsdbDumpflush
Description
This FSDB dumping command may be used in the HDL code and also via the
command line for interactive simulation control. The command forces the signal
values to be flushed to the FSDB file while the simulation is running. Therefore,
the current simulation results can be checked whenever necessary instead of
waiting for the simulation to end or the internal buffer to be filled.
NOTE: The Novas object files for FSDB dumping will automatically flush the
value change data to the FSDB file on disk under the following
conditions:
Syntax
When specified in the design:
$fsdbDumpflush;
Cadence:
call fsdbDumpflush
ModelSim:
fsdbDumpflush
$fsdbDumpon, $fsdbDumpoff
Description
These FSDB dumping commands turn dumping on and off. $fsdbDumpon and
$fsdbDumpoff have the highest priority and will override all other FSDB
dumping commands such as $fsdbDumpvars, $fsdbDumpMDA, $fsdbDumpSVA,
or $fsdbDumpvarsByFile.
In the nWave window, blue solid blocks are displayed during the period when
dumping is turned off by the $fsdbDumpoff command and no signals are dumped.
All signals are assigned with the NV (No Value) data value in the value pane of
the nWave window and for Active Annotation in other windows. In addition, the
full scale ruler will mark this period with red box.
Signals that have not started dumping values at the time the FSDB file specified
by the $fsdbDumpfile command is opened will be assigned with the NF (Not
Found) data value in the value pane of the nWave window.
Syntax
When specified in the design:
$fsdbDumpon([ "option"| option_var| ]);
Cadence:
call fsdbDumpon [option]
call fsdbDumpoff [option]
ModelSim:
fsdbDumpon [option]
fsdbDumpoff [option]
Arguments
option
option_var
Specify the FSDB file name option in a variable.
Examples
NOTE: The following examples use the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
initial
begin
#50000
$fsdbDumpvars;
#50000
$fsdbDumpoff;
#50000
$fsdbDumpon;
#50000
$finish;
end
The value changes for all variables in this design example are dumped from
time 50000 to time 100000 and from time 150000 to time 200000.
initial begin
$fsdbDumpoff("+glitch")
#10
$fsdbDumpvars;
#10
$fsdbDumpon("+glitch");
#10
$fsdbDumpoff("+glitch");
$finish;
end
Any glitches in this design example are enabled for dumping from time 20
to time 30.
Variable Example
If specified in the design, design variable can be passed as an argument.
reg [32*8-1:0] option_reg = "+fsdbfile+novas.fsdb";
string option_string = "+fsdbfile+novas.fsdb";
$fsdbDumpon();
$fsdbDumpon("+fsdbfile+novas.fsdb");
$fsdbDumpon(option_reg);
$fsdbDumpon(option_string);
$fsdbDumpoff();
$fsdbDumpoff("+fsdbfile+novas.fsdb");
$fsdbDumpoff(option_reg);
$fsdbDumpoff(option_string);
$fsdbDumpvars
Description
Dump signal-value-change information to the FSDB file.
NOTE:
1. For VCS users, to include memory, MDA, packed array and structure
information in the generated FSDB file, the -debug_pp option or
alternative +vpi, +memcbk and +vcsd options must be included when
VCS is invoked to compile the design.
2. The generated FSDB can be converted to VCD which will include
the MDA and structure data.
Syntax
When specified in the design:
$fsdbDumpvars([ depth, | "level=",depth_var, ]
[instance | "instance=",instance_var]
[ ,"option" | ,"option=",option_var ]*);
$fsdbDumpvars;
$fsdbDumpvars([depth] [, instance ]);
$fsdbDumpvars("level=", depth_var [, instance ]);
$fsdbDumpvars( ["level=", depth_var] [,"option"]*);
$fsdbDumpvars([depth] [,"option=", option_var]*);
NOTE:
1. Dumping design variables only supports dumping commands that
have been specified inside the source code of the design; for interactive
mode, use the task in the simulator command line format instead.
2. After a dumping command has been specified inside the design, it is
compatible with both dumping variable and simulator interactive mode
formats.
When specified on the simulator command line:
Synopsys:
fsdbDumpvars
fsdbDumpvars depth instance [option]*
fsdbDumpvars depth [instance]
fsdbDumpvars [option]*
Cadence:
call fsdbDumpvars
call fsdbDumpvars depth instance [option]*
call fsdbDumpvars [option]*
Modelsim:
fsdbDumpvars
fsdbDumpvars depth instance [option]*
Arguments
depth
Specify how many levels of hierarchy to dump for the subsequent scopes. If
the subsequent arguments are signals, only these signals will be dumped.
instance_var
This definition gives the module scope or signal which represented by
instance_var that specify the object to dump.
None Yes
"option="
Keyword to identify the next argument is a string.
Examples
NOTE: The following example uses the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
$fsdbDumpvars;
Dump all signals in the module instances below the top module.
$fsdbDumpvars(0, system);
environment variable can be changed for each simulation run. For example,
assume a variable path location is desired for the +fsdbfile+filename string
argument in the $fsdbDumpvars dumping command and the following is
specified:
• On the Unix command line:
setenv MY_FSDB_FILE_PATH /home/test
• In the testbench for simulation:
$fsdbDumpvars("+fsdbfile+${MY_FSDB_FILE_PATH}/test.fsdb");
• Multiple environment variables in the testbench for simulation:
setenv MY_FSDB_FILE_PATH /home/test
setenv MY_FSDB_FILE test
$fsdbDumpvars("+fsdbfile+${MY_FSDB_FILE_PATH}/
${MY_FSDB_FILE}.fsdb");
Then, during simulation, the FSDB dumper will replace
${MY_FSDB_FILE_PATH} with "/home/test", and the dumping command will
become $fsdbDumpvars("+fsdbfile+/home/test/test.fsdb").
$fsdbDumpvarsByFile
Description
Dump several scopes and signals defined in a text file to a designated FSDB file.
$fsdbDumpvarsByFile can be invoked more than once to dump several scopes/
signals defined in different text files to specific FSDB files. There are two
schemes to specify designated FSDB files:
1. No FSDB file name specified in $fsdbDumpvarsByFile (only one argument
needed). If no FSDB file is specified, the default file, novas.fsdb, or the
previously specified one will be taken as the default.
2. Specify the FSDB file name in $fsdbDumpvarsByFile (two arguments
needed). The argument "+fsdbfile+filename.fsdb" can be used to specify the
designated FSDB file.
NOTE: " #" can be used to comment within the text file used by
$fsdbDumpvarsByFile. The items after " #" will be ignored.
Syntax
When specified in the design:
$fsdbDumpvarsByFile("textFileName");
$fsdbDumpvarsByFile("textFileName", "option");
Cadence:
call fsdbDumpvarsByFile "textFileName" [option]
ModelSim:
fsdbDumpvarsByFile "textFileName" [option]
Arguments
"textFileName"
Specify the name of the text file containing the scopes to dump (in plain text
format).
textfile_var
Specify the text file name in a variable.
option_var
Specify the FSDB file name option in a variable.
Similar to $fsdbDumpvars, the options in the following table are for the text
file only. They can only be specified in the [option_in_file] location
of the "textfile" only. For example:
+all 1 system
+mda +struct 3 system.i_cpu
The following pragma can optionally be specified as the first line in the text file:
Examples
NOTE: The following example uses the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
$fsdbDumpvarsByFile("./case1.lst","+fsdbfile+case1.fsdb");
where case1.lst contains:
[case1.lst]
+Reg_Only 0 top.type_dut.regInst
+parameter 0 top.type_dut.parameterInst
+functions 5 top.type_dut.FunAndTaskInst
+skip_cell_instance=0 0 top.type_dut.tri0Inst
+skip_cell_instance=1 +mda 0 top.type_dut.tri1Inst
+skip_cell_instance=2 +packedmda 0 top.type_dut.triInst
+mda 3 top.type_dut.enumInst
+packedmda 3 top.type_dut.logicInst
+struct top.type_dut.pstructInst
Variable Example
Specified in the design, the runtime variable can be passed as an argument.
...
reg [32*8-1:0] option_reg = "+fsdbfile+novas.fsdb";
reg [1023:0] suppressFile_reg = "suppress.list"; // reg string
string dumpListFile_string = "dump.list";//string
...
$fsdbDumpvarsByFile("dump.list", "+fsdbfile+novas.fsdb");
$fsdbDumpvarsByFile(dumpListFile_reg);
$fsdbDumpvarsByFile(dumpListFile_string, option_reg);
$fsdbLog
Description
Record a message to the specified message stream. Each message stream is
organized under a scope named "msg_root" in the FSDB file. For example:
msg_root
|--- status_stream
|--- compare_result_stream
NOTE: To use $fsdbLog, two simulator compile options must be specified for
VCS. One is -debug_pp and the other is +cli+3. For example:
vcs -debug_pp +cli+3 -sverilog test.sv -P $tab
$pli
NOTE: $fsdbLog does not support the complex expression as the argument. If
users want to pass a complex expression to $fsdbLog, a variable can be
used to save the result and pass the expression to $fsdbLog. For
example:
$fsdbLog((stats_ctl ? "CTL" : "NCTL"),
"GMX",,"inb_stats", "val"); can be changed to
string label = (stats_ctl ? "CTL" : "NCTL");
$fsdbLog(label, "GMX",,"inb_stats", "val");
Syntax
$fsdbLog(["label"], ["message"], [severity], ["stream_name"]
[["format"]*, variables | "string"]* );
NOTE: The comma (",") for each argument cannot be omitted even if the
argument is not specified. For example:
$fsdbLog( , , , , var1);
Arguments
label
Specify the label for the message in the string. This argument is optional
and can be empty. If a label is not specified, a default label "Unnamed
Label" will be given. If the label needs to be formatted, $psprintf can be
passed as the argument.
message
Specify the message in the string. This argument is optional and can be
empty. If this argument is empty, an empty message will be written to the
message attribute in the record of the message stream.
If the message needs to be formatted, $psprintf can be passed as the
argument. Format tokens, such as %d, %b, %h, in the message are not
currently supported. For example:
$fsdbLog("label", "var1=%d", 1, "stream1", var1);
Message is logged as "var1=%d" instead of "var1=3".
Legal stream name rules are composed of 0-9, a-z, and A-Z. The '\' should
be added in the prefix when the name contains a special character.
Alternatively, the '\' can be added before each special character.
NOTE: Any of the first four arguments can be empty. However, the commas
between the empty arguments should be placed properly. For example:
$fsdbLog( , , , , var1);
or
$fsdbLog(, , , );
format
Specify whether the logged information with the specified radix will be
shown on nWave or nTA. If the radix is not specified, the logged information
will be displayed as the default format of the variable. The format is shown
below.
Supported format: format ::= %h, %x , %b, %d, %o, %A, ["str_name" |
str_var]
%h ::=hexadecimal format
%x ::=hexadecimal format
%b ::=binary format
%d ::=decimal format
%o ::=octal format
%A ::=change the attribute name
NOTE: When the format "%A" is used, the next argument must be a string
value.
Example 1
program p;
class Foo1;
function new (int i);
...
$fsdbLog("label","message",1,...);
...
endclass
...
$fsdbLog("label","message",1,"stream_name","%h",info);
//specified radix with 'hexadecimal' format
...
$fsdbLog("label","message",2,"stream_name",info2);
...
endprogram
Example 2
int intVar = 255;
$fsdbLog("L", "M", 3, "S", intVar);
variable
Specify the variable to log. An object with the vcsd_handle type can be
passed here; however, the variable type is limited to string, longint, time
integer, int, shortint, byte, logic, bit, reg, and real. In addition, an array
element can be passed if the type of the element is one of the supported
variable types listed above. For example, int i[0:1][0:3]; i[1][3] is allowed.
string
Specify a constant string to log. An attribute name for the constant string
will be automatically assigned.
Multiple string arguments are allowed. However, the total number of string
and variable arguments is limited to less than 1024.
Each string argument is added as an attribute to the message record:
attribute_name = value
//Label
$psprintf("About to pack %s",operation.name()),
//Message & severity
"cpu_word_queue_t",5,
//stream name
$psprintf("%m"),
//string #1
$psprintf("op=%x, operand=%x ",operation,operand),
//string #2
$psprintf("Mode=%s,Size=%d",mode.name(),pack.size()
));
...
endfunction: pack
Examples
Example 1
function void func(ref logic [2:0] gg);
if(gg==3'b101) begin
gg = 3'b111;
$fsdbLog("REF","changed","3","ref","gg",$bits(gg));
$display("[%0t]REF-changed-gg=%b",$time,gg);
end else
$fsdbLog("REF","unchanged",,"ref",gg);
$display("[%0t]REF-unchanged-gg=%b",$time,gg);
endfunction
Example 2
class c_type2;
rand int i;
endclass
class c_type1;
typedef enum reg [1:0] {ONE=1,TWO,THREE} number;
number num;
rand reg [1:0][1:0] r_mda1;
reg [1:0] mda1;
c_type2 c2 = new;
function void disp;
$fsdbLog("L1",
$psprintf("Time:[%0t] num=%d(%d)",$time,num,THREE),
1,
"",
num,
THREE,
"This is RAW string1",
$psprintf("%d",c2.randomize()),
$psprintf("%d",r_mda1),
mda1);
endfunction
endclass
Description
Automatically switch to a new dump file when the working FSDB file reaches
the specified size limitation. The unit associated with
$fsdbAutoSwitchDumpfile's File_Size parameter is a megabyte. After the
dumping is finished, a virtual FSDB file will be automatically created and list all
of the generated FSDB files with the correct sequence. Only the virtual FSDB
file, rather than all of the FSDB files, needs to be loaded to view the simulation
results.
Syntax
When specified in the design:
$fsdbAutoSwitchDumpfile(File_Size | File_Size_var, "FSDB_Name" |
FSDB_Name_var, Number_of_Files | Number_of_Files_var
[ ,"log_filename" | ,log_filename_var ], ["+fsdb+no_overwrite"]);
Cadence:
call fsdbAutoSwitchDumpfile File_Size FSDB_name Number_of_Files
[log_filename]
ModelSim:
fsdbAutoSwitchDumpfile File_Size FSDB_name Number_of_Files
[log_filename]
Arguments
File_Size
The FSDB file size limit.
NOTE: The minimum file size of the FSDB file is 10M. If the size is set to less
than 10M, it will be set to 10M automatically.
File_Size_var
NOTE: If the number is set as 0, the dumper will create new FSDB files without
file number limitation.
Number_of_Files_var
Specify the maximum number of FSDB files to generate in a variable.
When the +no_overwrite option is also used, the variable specifies the
maximum number of FSDB files to be dumped.
Examples
NOTE: The following examples use the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
$fsdbAutoSwitchDumpfile(10, "test.fsdb", 20);
$fsdbDumpvars(0, system);
The first FSDB file will be named as test_000.fsdb. The second FSDB file
test_001.fsdb will be created when the file size of test_000.fsdb reaches near
10MB. The third FSDB file test_002.fsdb will be created when the file size
of test_001.fsdb reaches near 10MB and so on. The first FSDB file
test_000.fsdb will be overwritten when the file size of test_019.fsdb reaches
near 10MB. The default test.log file will list the time range of each FSDB
file.
$fsdbAutoSwitchDumpfile(10, "test.fsdb", 20, "my.log");
$fsdbDumpvars(0, system);
The number and the maximum file size of the FSDB file are as the same as
the previous example, but the log file is set to my.log.
Variable Example
If specified in the design, the design variable can be passed as a command
argument.
reg [255:0] File_Size_reg = 50;
reg [255:0] File_Size_reg1 = "50";
/* Not support number in string format */
string FSDB_Name _string = "FSDB_Name.fsdb";
reg [32*8-1:0] option_reg = "+fsdbfile+novas.fsdb";
reg [15:0] Number_of_Files_reg = 1000;
string log_filename_string = "fsdb.log";
reg [1023:0] FSDB_Name_reg = "FSDB_Name.fsdb";
$fsdbSuppress
Description
Specify the scopes that will not be dumped by the $fsdbDumpvars,
$fsdbDumpvarsByFile, or $fsdbDumpMDA commands. $fsdbSuppress supports
suppressing by file name or the target scopes passed as arguments. The supported
target scope could be modules, instances, scopes, or signals in full hierarchical
format. Each format has to be called in different $fsdbSuppress calls.
Syntax
When specified in the design:
$fsdbSuppress("suppress_file" | "file=",file_var | [instance]*, |
"instance=" [, instance_var ]* | "module_file=", "filename" |
"module_base="[, "module_name"]* | "signal_prefix=");
$fsdbSuppress("suppress_file");
$fsdbSuppress(instance[,instance]*);
$fsdbSuppress("instance=",instance_var[,instance_var]*);
$fsdbSuppress("file=", file_var);
$fsdbSuppress("module_file=","filename");
$fsdbSuppress("module_base=","module_name"[,"module_name"]*);
$fsdbSuppress("signal_prefix=");
NOTE: If the variable field options are used, the variable must be assigned
before being called.
When specified on simulator command line:
Synopsys:
fsdbSuppress "suppress_file"
fsdbSuppress instance [instance]*
Cadence:
call fsdbSuppress "suppress_file"
call fsdbSuppress instance [instance]*
ModelSim:
fsdbSuppress "suppress_file"
fsdbSuppress instance [instance]*
Arguments
suppress_file
Specify the file containing the names of the scopes that will not be dumped.
NOTE: For the suppress file format, each line of the file is the full name of a
scope that you do not want to be dumped.
instance
Specify one or more scopes or signals that will not be dumped.
file=
Keyword to identify the next argument is a string.
instance_var
Gives the module scope or signal represented by instance_var that specifies
the object to dump.
NOTE: All supported suppression methods should be used separately for each
$fsdbSuppress called; multiple suppression types cannot be combined
in one $fsdbSuppress command.
"signal_prefix="
Specify the prefix pattern. Signals that match this pattern will not be
dumped.
Examples
NOTE: The following examples use the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
$fsdbSuppress(dump_top,system.i_pram);
$fsdbDumpvars(0,dump_top);
$fsdbSuppress("./suppress.lst");
system.i_cpu.C6
...
$fsdbSuppress("suppress.list");
$fsdbSuppress(top.u1.u2);
$fsdbSuppress(top.u1.u2, top.x1.x2);
$fsdbSuppress("file=", suppressFile_reg);
$fsdbSuppress("file=", suppressFile_string);
//full hierarchy variable.
$fsdbsuppress("instance=", instance_string, instance_reg);
$fsdbSuppress("file=", suppressFile_string); // list file
variable
$fsdbSuppress("module_file=", "suppress_module.list");
$fsdbSuppress("module_base=", "module_1", "module_2",
"module_3");
$fsdbSuppress("signal_prefix=", "_zy", "_zz", "zz_", "zy_");
$fsdbSwitchDumpfile
Description
Support multiple FSDB files during a simulation run by specifying the currently
active FSDB file name. When this command is executed, the previously opened
FSDB file is closed and the new FSDB file is created to continue saving the
values change data and act as the current active FSDB file.
Since the FSDB dumper may support more then one open file for saving data
simultaneously, the source file that is supposed to be switched can be specified
by the option "+fsdbfile+sourcefilename", otherwise the source file would be the
currently active FSDB file.
Syntax
When specified in the design:
$fsdbSwitchDumpfile("NewFileName" | NewFileName_var
[ ,"+fsdbfile+src_file"| ,src_file_var ]*);
Cadence:
call fsdbSwitchDumpfile "NewFileName"
call fsdbSwitchDumpfile "NewFileName" "+fsdbfile+src_file"
ModelSim:
fsdbSwitchDumpfile "NewFileName"
fsdbSwitchDumpfile "NewFileName" "+fsdbfile+src_file"
Arguments
NewFileName
The new name of the FSDB file generated by the Novas object files for
FSDB dumping.
NewFileName_var
Specify the new FSDB file name in a variable.
Examples
NOTE: The following example uses the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
Example 1
$fsdbDumpfile("test0.fsdb");
$fsdbDumpvars(0, system);
$fsdbDumpvars(3, system, "+fsdbfile+f1.fsdb);
#1000
$fsdbSwitchDumpfile("test1.fsdb", "+fsdbfile+test0.fsdb");
#1000
$fsdbSwitchDumpfile("test2.fsdb", "+fsdbfile+f1.fsdb");
$fsdbSwitchDumpfile("novas_new.fsdb");
/* switch current file to novas_new.fsdb */
$fsdbSwitchDumpfile(newDumpfile_reg, "+fsdbfile+novas.fsdb");
/* switch novas.fsdb file to be novas_new.fsdb */
$fsdbSwitchDumpfile(newDumpfile_string, option_reg);
/* switch novas.fsdb to novas_new.fsdb */
Description
Dump value changes of MDA (multidimensional array) signals to the FSDB file.
All memories and MDAs within the specified instance are dumped. In addition,
partial range dumping of a specific MDA instance's value change data into the
FSDB file is supported.
NOTE:
1. For VCS users, to include memory, MDA, packed array, and
structure information in the generated FSDB file, the VCS option
-debug_pp is required when VCS is invoked to compile the design.
2. The generated FSDB can be converted to VCD which will include
the MDA and structure data.
Syntax
When specified in the design:
or
or
Cadence:
call fsdbDumpMDA [instance] ["option"]*
call fsdbDumpMDA [depth] [instance]
or
call fsdbDumpMDA mda_instance [1st_dim_begin_index [1st_dim_size
[2nd_dim_begin_index [2nd_dim_size
...]]]]
Modelsim:
fsdbDumpMDA
fsdbDumpMDA [depth] [instance] ["option"]*
or
fsdbDumpMDA mda_instance [1st_dim_begin_index [1st_dim_size
[2nd_dim_begin_index [2nd_dim_size
...]]]]
Arguments
depth
Specify how many levels of hierarchy to dump for the subsequent scopes.
"level="
Keyword to identify the next argument is a number.
"option="
Keyword to identify the next argument is a string.
Examples
NOTE: The following example uses the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
Assume the following memory and MDA signal are defined:
reg [7:0] screen [79:0][0:24]
Dump value changes of MDA (multidimensional array) signals to the FSDB file:
$fsdbDumpMDA(system);
Dump all memories and MDAs under the system scope and its child scopes.
$fsdbDumpMDA(1, system.i_pram);
Dump all memories and MDAs under the system.pram scope.
$fsdbDumpMDA(0, top, "+skip_cell_instance=1",
"+fsdbfile+dump.fsdb");
Dump all memories and MDAs under top scope and skip cell instance.
Variable Example
If specified in the design, the design variable can be passed as an argument.
reg [255:0] depth_reg = 10;
reg [32*8-1:0] option_reg = "+fsdbfile+novas.fsdb";
string option_string = "+fsdbfile+novas.fsdb";
string depth_string = "10";// invalid, number in string format
reg [32*8-1:0] depth_str_reg = "10"; // invalid.
reg [1023:0] instance_reg = "top";
$fsdbDumpMDAByFile
Description
Dump the value changes of MDA (multidimensional array) signals in a text file
to a designated FSDB file. $fsdbDumpMDAByFile can be invoked more than
once to dump several scopes/signals defined in different text files to specific
FSDB files. There are two schemes to specify designated FSDB files:
1. No FSDB file name specified in $fsdbDumpMDAByFile (only one
argument needed). If no FSDB file is specified, the default file, novas.fsdb,
or the previously specified one will be taken as the default.
2. Specify the FSDB file name in $fsdbDumpMDAByFile (two arguments
needed). The argument "+fsdbfile+filename.fsdb" can be used to specify the
designated FSDB file.
Syntax
When specified in the design:
$fsdbDumpMDAByFile ("textFileName" | textfile_var [,"option"
|,option_var ]);
$fsdbDumpMDAByFile("textFileName");
$fsdbDumpMDAByFile("textFileName", "option");
Synopsys:
fsdbDumpMDAByFile "textFileName" [option]
Cadence:
call fsdbDumpMDAByFile "textFileName" [option]
ModelSim:
fsdbDumpMDAByFile "textFileName" [option]
Arguments
"textFileName"
Specify the name of the text file containing the scopes to dump (in plain text
format).
textfile_var
Specify the text file name in a variable.
option_var
Specify the FSDB file name option in a variable.
Similar to $fsdbDumpMDA, the option in the following table is for the text
file only. It can only be specified in the [option_in_file] location of
the "textfile". For example:
+skip_cell_instance=0 1 system
system.i_cpu
Examples
NOTE: The following example uses the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
fsdbDumpMDAByFile("./case1.lst","+fsdbfile+case1.fsdb");
where case1.lst contains:
[case1.lst]
Specify the scope instance:
0 top.type_dut.regInst
0 top.type_dut.parameterInst
5 top.type_dut.FunAndTaskInst
+skip_cell_instance=0 0 top.type_dut.tri0Inst
+skip_cell_instance=1 0 top.type_dut.tri1Inst
+skip_cell_instance=2 0 top.type_dut.triInst
3 top.type_dut.enumInst
3 top.type_dut.logicInst
top.type_dut.pstructInst
Variable Example
Specified in the design, the runtime variable can be passed as an argument.
...
reg [32*8-1:0] option_reg = "+fsdbfile+novas.fsdb";
fsdbDumpMDAByFile("dump.list", "+fsdbfile+novas.fsdb");
fsdbDumpMDAByFile(dumpListFile_reg);
fsdbDumpMDAByFile(dumpListFile_string, option_reg);
Description
Dump SVA results to the FSDB file. The results of SVA assertions within the
specified scopes and/or modules can be dumped and saved to the same FSDB file
that contains dumped results for design signals or to a separate file.
Syntax
When specified in the design:
$fsdbDumpSVA([ depth, | "level=",depth_var, ]
[instance | "instance=", instance_var ]
[ ,"option" | ,"option=",option_var ]*);
$fsdbDumpSVA;
$fsdbDumpSVA([depth] [, instance] [, "option"]*
Cadence:
call fsdbDumpSVA [depth] [instance] ["option"]*
Modelsim:
fsdbDumpSVA
fsdbDumpSVA [depth] [instance] ["option"]*
Arguments
depth
Specify the levels of hierarchy to dump for the subsequent scopes.
"level="
Keyword to identify the next argument is a number.
"option="
Keyword to identify the next argument is a string.
Examples
NOTE: The following examples use the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
initial begin
$fsdbDumpvars("+fsdbfile+1.fsdb");
$fsdbDumpSVA("+fsdbfile+1.fsdb");
$fsdbDumpSVA("+fsdb+sva_success","+fsdbfile+fsdb+sva_success");
#40 $fsdbDumpoff;
#40 $fsdbDumpon;
#10 $fsdbDumpFinish;
#30 $fsdbDumpfile("2.fsdb");
$fsdbDumpSVA(1,top); //dump sva to 2.fsdb
#43 $finish;
end
$fsdbDumpSVA;
Dump all SVA assertions from design top and its descendents.
$fsdbDumpSVA(0, system);
Dump all SVA assertions under system and its descendents
$fsdbDumpSVA(1, system.arbiter);
Dump all SVA assertions under system.arbiter. The dumping level is set to
1, so dumping will exclude the SVA assertions under their descendent
scopes.
$fsdbDumpvarsByFile("scope_lst.txt", "+fsdbfile=hdl.fsdb");
$fsdbDumpSVA(system.arbiter, "+fsdbfile=SVA.fsdb");
The first dumping command dumps design signals to the hdl.fsdb file. The
second dumping command dumps all SVA assertions under system.arbiter
scope and its descendents to the SVA.fsdb file.
NOTE: For VCS users, the -sverilog and -debug_pp command line options are
necessary to dump SVA signals.
NOTE: For ModelSim users, the -sva and -assertdebug options should be
specified in the vsim command line options when dumping assertions.
For example,
> vsim -c top -pli novas_fli.so -sva -assertdebug
NOTE: To dump vacuous successes correctly with VCS 2014.03 and later
versions, specify the -assert vacuous option when calling the VCS
executable.
The following is a code example for a vacuous success:
property P5;
@(posedge clk)
disable iff (rst)
(c) |=> (##[0:$] d);
endproperty : P5
Variable Example
If specified in the design, the design variable can be passed as an argument.
reg [255:0] depth_reg = 10;
reg [32*8-1:0] option_reg = "+fsdbfile+novas.fsdb";
string option_string = "+fsdbfile+novas.fsdb";
string depth_string = "10";// invalid, number in string format
reg [32*8-1:0] depth_str_reg = "10"; // invalid.
string instance_string = "top";
NOTE:
1. Immediate assertion (e.g. A1: assert(...) ...else $error, A2 assert
finial(....)) will be dumped in FSDB dumper only for VCS simulators.
2. Sequence (e.g. sequence .... endsequence) and property
(property...endproperty) won't be dumped in FSDB dumper.
$fsdbDumpPSL
Description
Dump the PSL assert directives in the Verilog or VHDL design to the FSDB file.
NOTE: This command supports the dumper for IUS 13.1, VCS 2014.03,
ModelSim 10.2, and their later versions.
NOTE: If the IUS simulator is used, the +psl_prop option needs to be in order
to dump the PSL properties in the Verilog or VHDL design. This option
is not required to be specified in the VCS simulator.
Syntax
$fsdbDumpPSL([ depth, | “level=”,depth_var, ]
[instance | “instance=”,instance_var]);
[ ,”option” | ,”option=”,option_var ]*);
Arguments
depth
Specify the levels of hierarchy to dump for the subsequent scopes. If the
subsequent arguments are signals, only these signals will be dumped.
"level="
Keyword to identify the next argument is a number.
"option="
Keyword to identify the next argument is a string.
assert Yes
assume Yes
cover Yes
assume_guarantee No
restrict_guarantee No
fairness No
strong_fairness No
No
NOTE:
restrict The restrict directive will not be dumped. When the
+psl_prop option is specified, the property under the
restrict directive will be created.
Examples
# inline
Assume that the file name is case.v:
module top;
reg clk = 0;
always #1 clk = ~clk;
//psl property p1 = {clk==1;clk==0} @(posedge clk); ---(A)
//psl assert always {clk==1;clk==0} @(posedge clk); ---(B)
endmodule
Assume that the file name is casevunit.v and this file can only be loaded and
compiled with the option:
vunit v1 (top) {
default clock = @(posedge top.clk);
property p2 = {clk==1;clk==0} @(posedge clk); ---(C)
assert always {clk==1;clk==0}; ---(D)
}
By default, (D) will be dumped. If the “+fsdb+psl_prop” option is specified, (C)
will also be dumped.
module sub;
…
endmodule
Naming Rules
When naming the design, the following rules should be followed:
• assert/assume/cover should be keywords when naming the design. For
example:
• top.A1_$assert // (This is an assert.)
• top.6_case302_v_cover // (This is a cover.)
• The restrict directive will not be dumped. When the +psl_prop option is
specified, the property under the restrict directive will be created.
• The cover directive does not have an underlying property.
# Unnamed Assertion
[case1]
module top;
reg clk =0;
reg chk = 1;
always #1 clk = ~clk;
initial begin
$fsdbDumpPSL;
[case2]
module top;
reg clk =0;
reg chk = 1;
always #1 clk = ~clk;
initial begin
$fsdbDumpPSL;
# Named Assertion
[case1]
module top;
reg clk =0;
reg chk = 1;
always #1 clk = ~clk;
initial begin
$fsdbDumpPSL;
[case2]
module top;
reg clk =0;
reg chk = 1;
always #1 clk = ~clk;
# Unnamed Restrict
module top;
reg clk =0;
reg chk = 1;
always #1 clk = ~clk;
initial begin
$fsdbDumpPSL;
If the +psl_prop option is not specified, the dumping result is: none.
If the +psl_prop option is specified, the dumping result is:
top.__restrict1
# Named Restrict
module top;
reg clk =0;
reg chk = 1;
always #1 clk = ~clk;
initial begin
$fsdbDumpPSL;
If the +psl_prop option is not specified, the dumping result is: none.
If the +psl_prop option is specified, the dumping result is:
top.R1
Compilation Tips
The "-assert" option should be specified for PSL execution.
> irun –assert design_files -propfile_vlog vlog_vunit_file
-propfile_vhdl vhdl_vunit_file …
Bind the vunit in the irun command line.
VHDL Command IUS 13.1 and VCSMX 2014.03 and ModelSim 10.2 and
Name later later later
fsdbAutoSwitchDump
x x x
file
fsdbDumpfile x x x
fsdbDumpflush x x x
fsdbDumpoff x x x
fsdbDumpon x x x
fsdbDumpvars x x x
fsdbDumpvarsByFile x x x
fsdbDumpvarsES x x x
fsdbDumpFinish x x x
fsdbDumpMDA* x* x* x*
fsdbDumpSVA x x x
fsdbDumpVariable x
fsdbDumpVariableBy
x
File
fsdbSuppress x x x
fsdbSwitchDumpfile x x x
Description
Dump signals under the specified scopes with the arguments instance and depth.
The signals are saved in the FSDB file created by fsdbDumpfile or the
+fsdbfile+filename option. If an FSDB file name is not specified, novas.fsdb will
be taken as the default.
Syntax
When specified in the design:
fsdbDumpvars(depth, “instance”[,“option,*”]);
Cadence:
call fsdbDumpvars
call fsdbDumpvars [depth][instance][option]*
Modelsim:
fsdbDumpvars
fsdbDumpvars [depth] [instance]
NOTE: For users of VCS, if there is a Verilog top, use the syntax from the
Verilog section.
Arguments
depth
Specify how many sub-scope levels under the given scope you want to
dump. Specify this argument as 1 to dump the signals under the given
scope. Specify this argument as 0 to dump all signals under the given scope
and its descendant scopes.
instance
Specify the full path name of the scope you want to dump. The different
simulators have different naming rules for describing the full path name of a
scope. You can refer to the simulator documents for complete details.
Assume the VHDL root scope is root_scope, scope1 is the child scope
under root_scope, and scope2 is the child scope under scope1. In IUS, the
full path name of a scope is :scope1:scope2. The left-most colon indicates
the root scope and the other colons are used to separate the scope name. In
ModelSim, the full path name of a scope can be either
root_scope.scope1.scope2 or /root_scope/scope1/scope2. In VCS MX, the
full path name of a scope is:root_scope:scope1:scope2, the left-most colon
can be ignored.
option
Specify one or more of the following options.
None Yes
NOTE: For VCS and IUS users, to allow fsdbDumpvars to dump the variables
under the processes and the shared variables under the region scopes by
default, you can use one of the following methods:
- Add the task option “+traces_process” when fsdbDumpvars is
specified in the design. For example:
fsdbDumpvars(0, “:”, “+trace_process”);
- Specify the plus option +fsdb+trace_process while running “ncsim”
or “simv”. For example:
> ncsim work.system:BLK +fsdb+trace_process -tcl
> simv system +fsdb+trace_process
Examples
NOTE: The following examples use the syntax for calling the command in the
design. Refer to the syntax section for the correct format for the
simulator command line.
In IUS
fsdbDumpvars(0,":");
Dump all signals under all scopes of a design.
fsdbDumpvars(1,":i_CPU");
Only dump the signals under the scope i_CPU that is a child scope under the
root scope.
fsdbDumpvars(0,":",”+fsdbfile+test.fsdb,+mda”);
Dump all signals under all scopes to the specified FSDB file, “test.fsdb”. If
the design contains SystemVerilog code, also dump MDA signals within the
SystemVerilog code under all scopes to the FSDB file.
NOTE: Use a comma to separate options and leave no space between options.
A colon ":" is suggested for use in the hierarchy expression under a
VHDL top design scenario (mixed).
In ModelSim
fsdbDumpvars(0,"/system");
Dump all signals under the root scope system and its descendant scopes.
fsdbDumpvars(1,"/system/i_CPU");
Only dump the signals under the scope i_CPU that is a child scope under the
root scope system.
fsdbDumpvars(0,"/system",”+trace_process,+fsdbfile+test.fsdb”);
Dump all signals under the root scope to the specified FSDB file,
“test.fsdb”. If the design contains SystemVerilog code, also dump all
processes within the SystemVerilog code under the root scope to the FSDB
file.
NOTE: Use a comma to separate options and leave no space between options.
A slash "/" or dot "." is suggested for use in the hierarchy expression
under a VHDL top design scenario (mixed or pure VHDL).
In VCS MX
fsdbDumpvars(0,":system");
Dump all signals under the root scope system and its descendant scopes.
fsdbDumpvars(1,":system:i_CPU");
Only dump the signals under the scope i_CPU that is a child scope under the
root scope system.
fsdbDumpvars(0,":system",”+trace_process,+fsdbfile+test.fsdb”);
Dump all signals under system scope and all variables under VHDL
processes to the specified FSDB file, “test.fsdb”.
fsdbDumpvars("+fsdbfile+my.fsdb")
Dump all signals under system scope to the specified FSDB file, "my.fsdb".
NOTE: Use a comma to separate options and leave no space between options.
A colon ":" is suggested for use in the hierarchy expression under a
VHDL top design scenario (mixed or pure VHDL).
The following examples are for mixed-HDL designs. Assume vlog_inst# is the
Verilog scope name and vhdl_ent# is the VHDL scope name. The design
hierarchies of 2 theoretical mixed-HDL designs are:
1.
vhdl_top --+-- vhdl_ent1 --+-- vhdl_ent2
| |
| +-- vlog_inst2
|
+-- vlog_inst1 -+-- vhdl_ent3
|
+-- vlog_inst3
2.
vlog_top --+-- vhdl_ent1 --+-- vhdl_ent2
| |
| +-- vlog_inst2
|
+-- vlog_inst1 -+-- vhdl_ent3
|
+-- vlog_inst3
The following examples are recommended when specifying the path name in
fsdbDumpvars to dump a specific scope with simulator dependency delimiter
when specified in the design.
In IUS
fsdbDumpvars(1,":");
fsdbDumpvars(1,":vhdl_ent1");
fsdbDumpvars(1,":vhdl_ent1:vhdl_ent2");
fsdbDumpvars(1,":vhdl_ent1:vlog_inst2");
fsdbDumpvars(1,":vlog_inst1");
fsdbDumpvars(1,":vlog_inst1.vhdl_ent3");
fsdbDumpvars(1,":vlog_inst1.vlog_ins3");
fsdbDumpvars(1,"vlog_top");
fsdbDumpvars(1,"vlog_top.vhdl_ent1");
fsdbDumpvars(1,"vlog_top.vhdl_ent1:vhdl_ent2");
fsdbDumpvars(1,"vlog_top.vhdl_ent1:vlog_inst2");
fsdbDumpvars(1,"vlog_top.vlog_inst1");
fsdbDumpvars(1,"vlog_top.vlog_inst1.vhdl_ent3");
fsdbDumpvars(1,"vlog_top.vlog_inst1.vlog_ins3");
In ModelSim
fsdbDumpvars(1,"/vhdl_top");
fsdbDumpvars(1,"/vhdl_top/vhdl_ent1");
fsdbDumpvars(1,"/vhdl_top/vhdl_ent1/vhdl_ent2");
fsdbDumpvars(1,"/vhdl_top/vhdl_ent1/vlog_inst2");
fsdbDumpvars(1,"/vhdl_top/vlog_inst1");
fsdbDumpvars(1,"/vhdl_top/vlog_inst1/vhdl_ent3");
fsdbDumpvars(1,"/vhdl_top/vlog_inst1/vlog_ins3");
fsdbDumpvars(1,"/vlog_top");
fsdbDumpvars(1,"/vlog_top/vhdl_ent1");
fsdbDumpvars(1,"/vlog_top/vhdl_ent1/vhdl_ent2");
fsdbDumpvars(1,"/vlog_top/vhdl_ent1/vlog_inst2");
fsdbDumpvars(1,"/vlog_top/vlog_inst1");
fsdbDumpvars(1,"/vlog_top/vlog_inst1/vhdl_ent3");
fsdbDumpvars(1,"/vlog_top/vlog_inst1/vlog_ins3");
Alternatively, you can use a dot (.) as the separator in the scope path names.
fsdbDumpvars(1,"vhdl_top");
fsdbDumpvars(1,"vhdl_top.vhdl_ent1");
fsdbDumpvars(1,"vhdl_top.vhdl_ent1.vhdl_ent2");
fsdbDumpvars(1,"vhdl_top.vhdl_ent1.vlog_inst2");
fsdbDumpvars(1,"vhdl_top.vlog_inst1");
fsdbDumpvars(1,"vhdl_top.vlog_inst1.vhdl_ent3");
fsdbDumpvars(1,"vhdl_top.vlog_inst1.vlog_ins3");
fsdbDumpvars(1,"vlog_top");
fsdbDumpvars(1,"vlog_top.vhdl_ent1");
fsdbDumpvars(1,"vlog_top.vhdl_ent1.vhdl_ent2");
fsdbDumpvars(1,"vlog_top.vhdl_ent1.vlog_inst2");
fsdbDumpvars(1,"vlog_top.vlog_inst1");
fsdbDumpvars(1,"vlog_top.vlog_inst1.vhdl_ent3");
fsdbDumpvars(1,"vlog_top.vlog_inst1.vlog_ins3");
In VCS MX
fsdbDumpvars(1,":vhdl_top");
fsdbDumpvars(1,":vhdl_top:vhdl_ent1");
fsdbDumpvars(1,":vhdl_top:vhdl_ent1:vhdl_ent2");
fsdbDumpvars(1,":vhdl_top:vhdl_ent1:vlog_inst2");
fsdbDumpvars(1,":vhdl_top:vlog_inst1");
fsdbDumpvars(1,":vhdl_top:vlog_inst1:vhdl_ent3");
fsdbDumpvars(1,":vhdl_top:vlog_inst1:vlog_ins3");
fsdbDumpvars(1,":vlog_top");
fsdbDumpvars(1,":vlog_top:vhdl_ent1");
fsdbDumpvars(1,":vlog_top:vhdl_ent1:vhdl_ent2");
fsdbDumpvars(1,":vlog_top:vhdl_ent1:vlog_inst2");
fsdbDumpvars(1,":vlog_top:vlog_inst1");
fsdbDumpvars(1,":vlog_top:vlog_inst1:vhdl_ent3");
fsdbDumpvarsES
Description
Dump signal-value-change information to the FSDB file for the signals in the
specified Essential Signal list which are within the specified scopes and levels.
LIMITATIONS:
Only hierarchical format for the Essential Signal list is supported.
Multiple trees are created in the FSDB file when multiple
fsdbDumpvarsES system tasks are specified.
Syntax
When specified in the design:
fsdbDumpvarsES( depth, “instance”, "es_list_file”[, “option,*”]);
NOTE: The first three arguments depth, instance and es_list_file are required.
You can place a delimiter in the instance argument to represent the
design top. For users of ModelSim, the delimiter between the
hierarchical names is slash (/). For users of IUS or VCS, the delimiter
is colon (:).For example, fsdbDumpvarsES(0, ":", myeslist.txt,
"+fsdbfile+dump.fsdb").
When specified on the simulator command line:
Synopsys: (VCS_MX UCLI command prompt)
fsdbDumpvarsES ESFileName
fsdbDumpvarsES [insatnce] ESFileName
fsdbDumpvarsES [depth] [instance] [option]* ESFileName
Cadence:
call fsdbDumpvarsES ESFileName
call fsdbDumpvarsES [instance] ESFileName
call fsdbDumpvarsES [depth] [instance] [option]* ESFileName
ModelSim:
fsdbDumpvarsES ESFileName
fsdbDumpvarsES [instance] ESFileName
fsdbDumpvarsES [depth] [instance] [option]* ESFileName
Arguments
depth
Specify how many levels of hierarchy to dump for the subsequent scopes.
instance
This definition gives the module scope or signals that specify the objects to
dump.
es_list_file
Specify the es list filename.
The file format of the Essential Signal file is as follows:
#ESD
# The first line should be "#ESD".
# Used to recognize the file format.
#V2
# The second line should be “#V2”.
# The following is the signal list.
# The first character '<' means the beginning of a scope.
# The scope name is specified sequentially.
<scope_instance_name
>
# The first character '>' indicates move to the next
# higher scope.
...
>
option
Specify one or more of the following options:
Examples
NOTE: The following example uses the syntax for calling the system task in the
design. Refer to the syntax section for the correct format for the
simulator command line.
fsdbDumpvarsES(0, ":", "myeslist.list");
Dumps all signals in the Essential Signal list to the FSDB. Hierarchical
format is used in myeslist.list.
fsdbDumpvarsES(1, "system.i_CPU.i_ALUB", "+fsdbfile+target.fsdb"
, "myeslist.list")
Dumps all signals in the Essential Signal file (myeslist.list) which are also
within the specified scope(s) and level to target.fsdb. The immediate child
scope(s) of the specified scope(s) and level are identified. If the child scope
is a library cell instance, it will be ignored. For other immediate child
scopes, the external nets of output boundary signals will be dumped.
fsdbDumpMDA
Description
Dump value changes of SystemVerilog MDA (one or multi-dimensional array)
signals to the FSDB file.
Syntax
When specified in the design:
fsdbDumpMDA( depth, "instance" [,"option,*"] );
NOTE: Inside quotation marks, use a comma to separate options and leave no
space between options.
NOTE: The first two arguments depth and instance are required. You can place
a delimiter in the instance argument to represent the design top. For
example, fsdbDumpMDA(0, “:”). For ModelSim users, the delimiter
between the hierarchical names is slash (/).
When specified on the simulator command line:
Synopsys: (VCS_MX UCLI command prompt)
fsdbDumpMDA [depth] [instance]
fsdbDumpMDA [depth] [instance] [option]*
Cadence:
call fsdbDumpMDA [depth] [instance]
call fsdbDumpMDA [depth] [instance] [option]*
Modelsim:
fsdbDumpMDA [depth] [instance]
fsdbDumpMDA [depth] [instance] [option]*
Arguments
depth
Specify how many levels of hierarchy to dump for the subsequent scopes.
instance
This definition gives the instance/signal that contains the MDA objects you
want to dump.
option
Examples
Assume the following memory and MDA signal are defined in SystemVerilog
design part of mixed HDL design:
reg [7:0] plane [15:0];
reg [7:0] screen [79:0][0:24][1:0];
fsdbDumpSVA
Description
Dump SystemVerilog Assertion (SVA) results to the FSDB file. The results of
SVA within the specified scopes and/or modules can be dumped and saved to the
same FSDB file that contains dumped results for design signals or to a separate
file.
Syntax
When specified in the design:
fsdbDumpSVA( depth, "instance" [,"option,*"] );
fsdbDumpSVA( depth, ":" ,"+fsdbfile=filename,+fsdb+sva_success");
NOTE: The first two arguments depth and instance are required. You can place
a delimiter in the instance argument to represent the design top. For
example, “:”. For the users of ModelSim, the delimiter between the
hierarchical names is slash (/).
When specified on the simulator command line:
Synopsys: (VCS_MX UCLI command prompt)
fsdbDumpSVA
fsdbDumpSVA [depth] [instance] [option]*
Cadence:
call fsdbDumpSVA
call fsdbDumpSVA [depth] [instance] [option]*
Modelsim:
fsdbDumpSVA
fsdbDumpSVA [depth] [instance][option]*
Arguments
depth
Specify the levels of hierarchy to dump for the subsequent scopes.
instance
Specify the instance name for dumping all SVA assertions below it.
option
NOTE: For VCS users, the -sverilog and -debug_pp command line options are
necessary to dump SVA signals.
NOTE: For ModelSim users, the -sva and -assertdebug options should be
specified in the vsim command line options when dumping assertions.
For example,
> vsim -c top -pli novas_fli.so -sva -assertdebug
NOTE: To dump vacuous successes correctly with VCS 2014.03 and later
versions, specify the -assert vacuous option when calling the VCS
executable.
The following is a code example for a vacuous success:
property P5;
@(posedge clk)
disable iff (rst)
(c) |=> (##[0:$] d);
endproperty : P5
Examples
NOTE: The following examples use the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
process begin
fsdbDumpvars(0, “top”, “+fsdbfile+my.fsdb”);
fsdbDumpSVA(0, “top”);
(“+fsdb+sva_success,+fsdbfile+fsdb+sva_success.fsdb”);
wait for 5 ns;
fsdbDumpoff;
wait for 5 ns;
fsdbDumpon;
wait for 5 ns;
fsdbDumpFinish;
fsdbDumpfile("2.fsdb");
fsdbDumpSVA(1, “top”); --dump sva to 2.fsdb
wait for 5 ns;
wait;
end process;
fsdbDumpSVA(0, “:”);
Dump all SVA assertions from design top and its descendents.
fsdbDumpSVA(0, “system”);
Dump all SVA assertions under system and its descendents.
fsdbDumpSVA(1, “system.arbiter”);
Dump all SVA assertions under system.arbiter. The dumping level is set to
1, so dumping will exclude the SVA assertions under their descendent
scopes.
fsdbDumpvarsByFile(“scope_lst.txt”, “+fsdbfile=hdl.fsdb”);
fsdbDumpSVA(0, “system.arbiter”, “+fsdbfile=SVA.fsdb”);
The first dumping command dumps design signals to the hdl.fsdb file. The
second dumping command dumps all SVA assertions under system.arbiter
scope and its descendents to the SVA.fsdb file.
NOTE:
1. Immediate assertion (like A1: assert(….) ...else $error, A2 assert
finial(…)) won't be dumped in FSDB Dumper.
2. Sequences (like sequence … endsequence) and properties
(property…endproperty) won't be dumped by the FSDB dumper.
fsdbDumpvarsByFile
Description
Dump several scopes and signals defined in a text file to the designated FSDB
file. fsdbDumpvarsByFile can be invoked more than once to dump several
scopes/signals defined in different text files to specific FSDB files. There are two
schemes to specify designated FSDB files:
1. No FSDB file name specified in fsdbDumpvarsByFile (only one argument
needed). You may use $fsdbDumpfile or use argument
“+fsdbfile+filename.fsdb” (takes another argument) to specify the
designated FSDB file. If there is no FSDB file specified, novas.fsdb will be
taken as the default.
2. Specify FSDB file name in fsdbDumpvarsByFile (two arguments needed).
You have to use different FSDB files for each call.
Syntax
When specified in the design:
fsdbDumpvarsByFile ( "textFileName" [,"+fsdbfile+filename”] );
Cadence:
call fsdbDumpvarsByFile textFileName [+fsdbfile+filename]
ModelSim:
fsdbDumpvarsByFile textFileName [+fsdbfile+filename]
Arguments
“textFileName”
Specify the name of the text file containing the scopes to dump (in plain text
format).
option
None Yes
Examples
fsdbDumpvarsByFile("./case1.lst","+fsdbfile+case1.fsdb");
[case1.lst]
+Reg_Only 0 top.type_dut.regInst
+parameter 0 top.type_dut.parameterInst
+functions 5 top.type_dut.FunAndTaskInst
+skip_cell_instance=1 0 top.type_dut.tri0Inst
+skip_cell_instance=1 +mda 0 top.type_dut.tri1Inst
+skip_cell_instance=1 +packedmda 0 top.type_dut.triInst
+mda 3 top.type_dut.enumInst
+packedmda 3 top.type_dut.logicInst
+struct top.type_dut.pstructInst
fsdbSuppress
Description
Specify the scopes that will not be dumped by the fsdbDumpvars,
fsdbDumpvarsByFile, fsdbDumpMDA or fsdbDumpVariable commands.
fsdbSuppress supports suppressing by file name or the target scopes passed as
arguments. The supported target scope could be modules, instances, scopes or
signals in full hierarchical format. Each format has to be called in different
fsdbSuppress calls respectively.
Syntax
When specified in the design:
fsdbSuppress( "suppress_file" | "instance,*");
fsdbSuppress("suppress_file");
fsdbSuppress("instance,*");
Cadence:
call fsdbSuppress suppress_file
call fsdbSuppress instance*
ModelSim:
fsdbSuppress suppress_file
fsdbSuppress instance*
Arguments
suppress_file
Specify the file containing the names of the scopes that will not be dumped.
“instance”
Specify one or more scopes that will not be dumped.
“signal_name”
Specify the signal in full hierarchical format that will not be dumped.
NOTE: All supported suppression methods should be used separately for each
fsdbSuppress called; cannot combine multiple suppression types in one
fsdbSuppress command.
NOTE: For file syntax, each line of the file is the full name of a scope that you
do not want to be dumped.
Examples
Example 1
fsdbSuppress(dump_top,system.i_pram);
fsdbDumpvars(0,dump_top);
Example 2
fsdbSuppress(“./suppress.lst”);
[suppress.lst]
system.R_W
system.i_cpu.C0
system.i_cpu.C1
system.i_cpu.C5
system.i_cpu.C6
...
fsdbDumpon, fsdbDumpoff
Description
These FSDB dumping commands turn dumping on and off. fsdbDumpon/
fsdbDumpoff has the highest priority and will override all other FSDB dumping
Syntax
When specified in the design:
fsdbDumpon( ["+fsdbfile+filename"] );
fsdbDumpoff( ["+fsdbfile+filename"] );
Cadence:
call fsdbDumpon [+fsdbfile+filename]
call fsdbDumpoff [+fsdbfile+filename]
ModelSim:
fsdbDumpon [+fsdbfile+filename]
fsdbDumpoff [+fsdbfile+filename]
Arguments
option
Examples
NOTE: The following example uses the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
process begin
wait for 5 ns;
fsdbDumpvars(0, "top");
wait for 5 ns;
fsdbDumpoff;
wait for 5 ns;
fsdbDumpon;
wait for 5 ns;
wait;
end process;
The value changes for all variables in this design example are dumped from
time 5ns to time 10ns and from time 15ns to time 20ns.
fsdbSwitchDumpfile
Description
Support multiple FSDB files during a simulation run by specifying the currently
active FSDB file name. When this command is executed, the previously opened
FSDB file is closed and the new FSDB file is created to continue saving the
values change data and act as current active FSDB file.
Since the FSDB dumper supports more then one open file for saving data
simultaneously, the source file that is supposed to be switched can be specified
by option “+fsdbfile+sourcefilename”, otherwise the source file would be the
currently active FSDB file.
Syntax
When specified in the design:
fsdbSwitchDumpfile("NewFileName" [ ,"+fsdbfile+src_file"] );
fsdbSwitchDumpfile("NewFileName");
fsdbSwitchDumpfile("NewFileName", "+fsdbfile+src_file");
Cadence:
call fsdbSwitchDumpfile NewFileName
call fsdbSwitchDumpfile NewFileName +fsdbfile+src_file
Arguments
NewFileName
The target new name of the FSDB file generating by the Novas object files
for FSDB dumping.
Option
Examples
NOTE: The following example uses the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
fsdbDumpfile("test0.fsdb");
fsdbDumpvars(0, “system”);
fsdbDumpvars(3, “system”, “+fsdbfile+f1.fsdb);
wait for 100 ns
fsdbSwitchDumpfile(“test1.fsdb”, “+fsdbfile+test0.fsdb”);
wait for 100 ns
fsdbSwitchDumpfile("test2.fsdb", “+fsdbfile+f1.fsdb”);
Create test0.fsdb to dump the design initially. Create f1.fsdb to dump the
different depth of design. Switch test0.fsdb to test1.fsdb at the simulation
time 100ns. Then switch f1.fsdb to test2.fsdb at the simulation time 200ns.
fsdbDumpfile
Description
Specify the FSDB file name created by the Novas object files for FSDB
dumping. If not specified, the default FSDB file name is "novas.fsdb". This
command is valid only before fsdbDumpvars is executed and is ignored if
specified after fsdbDumpvars.
To restrict the largest dump-file size to the user-defined size limitation, specify
the limit size in megabyte format. This function will affect the FSDB file that is
specified in “FSDB_Name”. The FSDB dumper uses the sliding window scheme
to keep the last signal values in the FSDB file. It drops the old values if file size
exceeds the user-specified limitation.
For fsdbDumpvars, fsdbDumpMDA, fsdbDumpvarsES, fsdbDumpSVA and
fsdbDumpvarsByFile, user can use the option “+fsdbfile+filename.fsdb” to
specify the target FSDB file to dump. It is equal to using fsdbDumpfile then
fsdbDumpvars.
Syntax
When specified in the design:
fsdbDumpfile( "FSDB_Name" [ ,limit_size] );
Cadence:
call fsdbDumpfile FSDB_Name [limit_size]
ModelSim:
fsdbDumpfile FSDB_Name [limit_size]
Arguments
FSDB_Name
Specify the name of the FSDB file generated by the Novas object files for
FSDB dumping.
limit_size
Specify the maximum FSDB file size in megabyte.
NOTE: The minimum file size of the FSDB file is 10M. If you set the size less
than 10M, it will be set to 10M instead.
Examples
NOTE: The following example uses the syntax for calling the FSDB dumping
command in the design. Refer to the syntax section for the correct
format for the simulator command line.
fsdbDumpfile("novas.fsdb", 32);
/* dumpfile novas.fsdb, limit 32 megabyte */
fsdbDumpvars(0, “design_top”);
fsdbAutoSwitchDumpfile
Description
Automatically switch to a new dump file when the working FSDB file hits the
specified size limitation. The unit associated with the fsdbAutoSwitchDumpfile
File_Size parameter is a megabyte.
Syntax
When specified in the design:
fsdbAutoSwitchDumpfile( File_Size, "FSDB_Name", Number_of_Files
[,"log_filename"] );
Synopsys:
fsdbAutoSwitchDumpfile File_Size FSDB_name Number_of_Files
[log_filename]
Cadence:
call fsdbAutoSwitchDumpfile File_Size FSDB_name Number_of_Files
[log_filename]
ModelSim:
fsdbAutoSwitchDumpfile File_Size FSDB_name Number_of_Files
[log_filename]
Arguments
File_Size
The FSDB file size limit in MB.
NOTE: The minimum file size of the FSDB file is 10MB. If you set the size less
than 10MB, it will be set to 10MB instead.
FSDB_name
FSDB file generating by the Novas object files for FSDB dumping.
Number_of_Files
The maximum number of FSDB files you wish to be created.
NOTE: If the number is put as 0, the FSDB dumper will create new FSDB files
without file number limitation.
log_filename
This argument is optional. You can specify the filename for the log file.
Examples
NOTE: The following examples use the syntax for calling the FSDB dumping
command in the VDHL design. Refer to the syntax section for the
correct format for the simulator command line.
process
begin
fsdbAutoSwitchDumpfile(10, "test.fsdb", 20);
fsdbDumpvars(0, “:system”);
wait;
end process;
The first FSDB file will be named as test_000.fsdb. The second FSDB file
test_001.fsdb will be created when the file size of test_000.fsdb reaches near
10MB. The third FSDB file test_002.fsdb will be created when the file size
of test_001.fsdb reaches near 10MB and so on. The first FSDB file
100 Linking Novas Files with Simulators and Enabling FSDB Dumping
FSDB Dumping Commands
The number and the maximum file size of the FSDB file are the same as the
previous example, but the log file is set to my.log.
fsdbDumpFinish
Description
Close all FSDB files in the current simulation and stop dumping the signals.
Although all FSDB files are closed automatically at the simulation finish, you
can invoke this dumping command to explicitly close the FSDB files during the
simulation. You can create a new FSDB file after you have closed the FSDB file.
You cannot append the new dumping data to a closed FSDB file due to the
current limitation of the FSDB file architecture. If you try to open the same
filename of FSDB file again during the same simulation run, the new FSDB file
will be renamed automatically.
Syntax
When specified in the design:
fsdbDumpFinish;
Cadence:
call fsdbDumpFinish
Examples
NOTE: The following examples use the syntax for calling the commands in the
design. Refer to the syntax section for the correct format for the
simulator command line.
Example 1
fsdbDumpfile("CPU.fsdb");
Linking Novas Files with Simulators and Enabling FSDB Dumping 101
FSDB Dumping Commands
Close the CPU.fsdb file at 2000 ns. Then open a new FSDB file at 4000 ns.
Because the same FSDB file is reopened, this new FSDB file will be
renamed as CPU_r000.fsdb. Only system.i_CPU and its child regions are
dumped to CPU_r000.fsdb.
fsdbDumpflush
Description
This FSDB dumping command may be used in your HDL code and also via the
command line for interactive simulation control. The command forces the signal
values to be flushed to the FSDB file while the simulation is running. This allows
you to check the current simulation results whenever is ready instead of waiting
for the simulation to end or the internal buffer to be filled.
NOTE: The Novas object files for FSDB dumping will automatically flush the
value change data to the FSDB file on disk under the following
conditions:
- The simulation stops is due to a $stop statement in Verilog design.
- The simulation stops at a user specified breakpoint.
- The user uses Ctrl-C to break the simulation.
Syntax
When specified in the design:
102 Linking Novas Files with Simulators and Enabling FSDB Dumping
FSDB Dumping Commands
fsdbDumpflush;
Cadence:
call fsdbDumpflush
fsdbDumpVariable
Description
This dumping command dumps the specified variable value changes to the file
created by fsdbDumpfile or by +fsdbfile+filename option. It is valid only in
ModelSim. The variable name must be specified using its full hierarchical path.
Refer to the ModelTech definitions for the full syntax. For example, the delimiter
of the full hierarchy path in ModelSim should be “/” or “.”.
NOTE: The FSDB dumper only flushes the current value of variables into the
FSDB file as MTI does not currently support a value change callback
for variables. To generate variable information throughout the
simulation, specify fsdbDumpVariable in a process, not at the vsim
prompt. For example:
P1: process(...)
...
begin
fsdbDumpVariable(...);
...
end process P1;
Syntax
When specified in the design:
fsdbDumpVariable("variableName" [, “+fsdbfile+filename”]);
Arguments
variableName
Specify the variable name in full hierarchy format whose value changes
should be dumped to the FSDB file.
Linking Novas Files with Simulators and Enabling FSDB Dumping 103
FSDB Dumping Commands
option
Examples
NOTE: The following example uses the syntax for calling the commands in the
design. Refer to the syntax section for the correct format for the
simulator command line.
fsdbDumpVariable(“/tb/File_dump/a_complex_rec”);
Dump the tb:File_dump:a_complex_rec variable data into FSDB file.
fsdbDumpVariableByFile
Description
Dump several variables defined in a text file to the file created by fsdbDumpfile.
It is valid only in ModelSim.
NOTE: The FSDB dumper only flushes the current value of variables into the
FSDB file as MTI does not currently support a value change callback
for variables. To generate variable information throughout the
simulation, use fsdbDumpVariableByFile in a process, not at the vsim
prompt. For example:
P1: process(...)
...
begin
fsdbDumpVariableByFile(...);
...
end process P1;
Syntax
When specified in the design:
fsdbDumpVariableByFile("txt_filename" [, "+fsdbfile+filename"]);
Arguments
txt_filename
Specify the text file containing variable name whose value changes should
be dumped to the FSDB file.
104 Linking Novas Files with Simulators and Enabling FSDB Dumping
FSDB Dumping Commands
# comment
variable_instance_name
variable_instance_name
...
The variable name must be specified using its full hierarchical path. Refer
to the ModelTech definitions for the full syntax.
option
NOTE: Specify the full hierarchy path of the variables with ModelSim VHDL
delimiters “/” or “.”. For example, /system/i_pram2/pram2/innermem
or system.i_pram2.pram2.innermem.
Examples
NOTE: The following example uses the syntax for calling the commands in the
design. Refer to the syntax section for the correct format for the
simulator command line.
fsdbDumpVariableByFile(“dump.lst”, “+fsdbfile+dump.fsdb”);
To dump variable instances defined in dump.lst file into dump.fsdb file. The
dump.lst file contains the following text:
# For ModelSim
/system/i_pram2/pram2/innermem
/system/i_pram2/pram2/memaddr
Linking Novas Files with Simulators and Enabling FSDB Dumping 105
FSDB Dumping Commands
106 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Synopsys Simulators
VCS
Set the VCS_HOME environment variable.
> setenv VCS_HOME $VCS_INST_DIR
Linking Novas Files with Simulators and Enabling FSDB Dumping 107
Linking with Synopsys Simulators
108 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Synopsys Simulators
Linking Novas Files with Simulators and Enabling FSDB Dumping 109
Linking with Synopsys Simulators
VCS simulator
Novas object files for FSDB dumping in mixed SystemC/Verilog designs are
provided for the VCS simulator. To dump SystemC and Verilog signals to FSDB
files, you can use the FSDB Verilog FSDB dumping commands at the VCS
prompt or add the FSDB dumping commands to the Verilog code. The related
Novas object files for FSDB dumping for mixed SystemC/Verilog designs with
VCS are located under the <VERDI_HOME>/share/PLI/VCS/ ${PLATFORM}.
The environment variable, LD_LIBRARY_PATH should be set by pointing to the
<VERDI_HOME>/share/PLI/VCS/ ${PLATFORM} directory before running
the simulation, "simv".
NOTE: To specify FSDB dumping commands at the UCLI prompt, the -load
libnovas.so:FSDBDumpCmd option is required when running the
VCS compilation.
1. Set the system's shared library search path to include the directory for the
Novas object files for FSDB dumping:
>setenv LD_LIBRARY_PATH \
<VERDI_HOME>/share/PLI/VCS/<PLATFORM>: \
$LD_LIBRARY_PATH
110 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Synopsys Simulators
3. Run simulation.
>./simv
Linking Novas Files with Simulators and Enabling FSDB Dumping 111
Linking with Synopsys Simulators
2. Compile design:
vlogan *.v
vlogan *.v -sysc=snps_vp -sc_module *
syscan -cflags -g *.cpp -sysc=snps_vp
vcs -debug_access+r -sysc -sysc=snps_vp -lca sc_main -fsdb
3. Run simulation:
./simv -ucli
112 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Cadence Simulators
NOTE: This needs to be specified regardless of how the simulator is linked and
run.
2. Specify FSDB dumping commands inside the design like:
top.v:
module top;
...
initial
begin
Linking Novas Files with Simulators and Enabling FSDB Dumping 113
Linking with Cadence Simulators
$fsdbDumpfile("my_nc_test.fsdb");
$fsdbDumpvars;
..
end // initial block
ncsim> run
Simulation complete via $finish(1) at time 30 NS + 0
./top.v:13 #10 $finish;
ncsim> exit
Using "ncverilog":
> ncverilog top.v -access +r
ncverilog: 12.20-s017: (c) Copyright 1995-2013 Cadence Design
Systems, Inc.
...
*Verdi* Loading libsscore_ius122.so
FSDB Dumper for IUS, Release Verdi_M-2017.03,
Linux, 10/20/2014 (C) 1996 - 2014 by Synopsys, Inc.
Using "irun":
> irun top.v -access +r
irun: 12.20-s017: (c) Copyright 1995-2013 Cadence Design
Systems, Inc.
...
*Verdi* Loading libsscore_ius122.so
FSDB Dumper for IUS, Release Verdi_M-2017.03,
Linux, 10/20/2014 (C) 1996 - 2014 by Synopsys, Inc.
4. Use IUS with FSDB dumping commands specified in Tcl format, cmd.tcl.
cmd.tcl:
114 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Cadence Simulators
Using "ncverilog":
> ncverilog top.v -access +r +tcl+cmd.tcl
Using "irun":
> irun top.v -access +r +tcl+cmd.tcl
5. Use IUS PLI boot method while FSDB dumping commands specified in Tcl
format, cmd.tcl.
Using "ncvlog", "ncelab", "ncsim" trilogy:
> ncvlog top.v
> ncelab top -access +r -loadpli1 debpli:novas_pli_boot
> ncsim top -i cmd.tcl
Using "ncverilog":
> ncverilog top.v -access +r +tcl+cmd.tcl -loadpli1
debpli:novas_pli_boot
Using "irun":
> irun top.v -access +r +tcl+cmd.tcl -loadpli1
debpli:novas_pli_boot
Dynamic Linking
If the IUS execution files (ncelab and ncsim) being used do not statically link
with any other applications, dynamic linking can be used to link the Novas
shared library file (libpli.so or libpli.sl) for FSDB dumping with IUS for pure
Verilog designs. These files can be found under the <VERDI_HOME>/share/
PLI/IUS/${PLATFORM}/ directories.
Linking Novas Files with Simulators and Enabling FSDB Dumping 115
Linking with Cadence Simulators
Solaris/Linux Platforms
> setenv LD_LIBRARY_PATH \
${VERDI_HOME}/share/PLI/IUS/${PLATFORM}/: \
$LD_LIBRARY_PATH
or
> ncverilog +linedebug -f run.f
You must specify +linedebug when running the ncverilog command if you want
to set line break points or run the design step by step using interactive mode in
the Verdi platform.
If you use the ncvlog, ncelab and ncsim trilogy to run the IUS simulation, you
must specify the -access +r option with ncelab or specify the -linedebug option
with ncvlog to enable read access of the design object.
> ncvlog -linedebug -f ncvlog.args
> ncelab -f ncelab.args
Or
> ncvlog -f ncvlog.args
> ncelab -access +r -f ncelab.args
Then,
> ncsim -f ncsim.args
You must specify -linedebug with ncvlog to compile the designs if you want to
set line break points or run the design step by step using interactive mode in the
Verdi platform.
You can check whether IUS linked with the Novas object file for FSDB dumping
successfully by using the call command at the ncsim prompt (use ncsim top -tcl
to enter ncsim prompt). Specifying the call command without any options will
list all the Verilog FSDB dumping commands that are available in the IUS
simulation. For example:
> ncsim -f ncsim.args -tcl
ncsim> call
Available C function names:
fsdbDumpvars
116 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Cadence Simulators
fsdbDumpvarsES
fsdbDumpMDA
fsdbDumpSVA
fsdbDumpvarsByFile
fsdbSuppress
fsdbDumpon
fsdbDumpoff
fsdbSwitchDumpfile
fsdbDumpfile
fsdbAutoSwitchDumpfile
fsdbDumpFinish
fsdbDumpflush
$fsdbDumpvars
$fsdbDumpMDA
$fsdbDumpSVA
$fsdbDumpvarsByFile
$fsdbSuppress
$fsdbDumpon
$fsdbDumpoff
$fsdbSwitchDumpfile
$fsdbDumpfile
$fsdbAutoSwitchDumpfile
$fsdbDumpFinish
$fsdbDumpflush
$fsdbLog
Dynamic Loading
Dynamic loading is another easy way to link the Novas shared library file for
FSDB dumping and other applications with IUS simultaneously. For dynamic
loading with IUS, the Novas shared library file for FSDB dumping is libIUS.so
These files can be found under the <VERDI_HOME>/share/PLI/IUS/
${PLATFORM}/ directories.
Linking Novas Files with Simulators and Enabling FSDB Dumping 117
Linking with Cadence Simulators
name of the dynamic loading version of the FSDB dumper. novas_pli_boot is the
booting function of the FSDB dumper. You also need to specify the +ncaccess+r
or +linedebug option to enable read access of the design object.
> ncverilog +ncaccess+r \
+loadpli1=debpli:novas_pli_boot -f run.f
or
> ncverilog +linedebug \
+loadpli1=debpli:novas_pli_boot -f run.f
NOTE: To load the CFC function library, add the additional option -loadcfc
debcfc:novas_cfc_boot as follows:
> ncverilog +ncaccess+r \
+loadpli1=debpli:novas_pli_boot \
-loadcfc debcfc:novas_cfc_boot \
-f run.f
or
> irun +ncaccess+r \
+loadpli1=debpli:novas_pli_boot \
-loadcfc debcfc:novas_cfc_boot \
-f run.f
The message "*** Registering Novas CFC commands..." will be
displayed once it succeeds.
You must specify +linedebug with ncverilog if you want to set line break points
or run the design step by step using interactive mode in the Verdi platform.
If you use the ncvlog, ncelab, and ncsim trilogy to run the IUS simulation, specify
the -loadpli1 debpli:novas_pli_boot option with ncelab. You must specify the
-access +r option with ncelab or specify the -access +r option with ncvlog to
enable read access of the design object.
> ncvlog -linedebug -f ncvlog.args
> ncelab -loadpli1 debpli:novas_pli_boot -f ncelab.args
or
> ncvlog -f ncvlog.args
> ncelab -access +r -loadpli1 debpli:novas_pli_boot -f
ncelab.args
You must specify -linedebug with ncvlog to compile the design if you want to set
line break points or run the design step by step using interactive mode in the
Verdi platform.
118 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Cadence Simulators
If IUS loads the FSDB dumper successfully, you will see the following message
when ncsim starts,
*Verdi* Loading libsscore_ius122.so
Specifying the call command without any options will list all the Verilog FSDB
dumping commands that are available in the IUS simulation. For example:
*Verdi* Loading libsscore_ius122.so
ncsim> run
Simulation stopped via $stop(1) at time 0 FS + 0
./a.v:8 $stop;
ncsim> call
Available C function names:
fsdbDumpvars
fsdbDumpvarsES
fsdbDumpMDA
fsdbDumpSVA
fsdbDumpvarsByFile
fsdbSuppress
fsdbDumpon
fsdbDumpoff
fsdbSwitchDumpfile
fsdbDumpfile
fsdbAutoSwitchDumpfile
fsdbDumpFinish
fsdbDumpflush
$fsdbDumpvars
$fsdbDumpMDA
$fsdbDumpSVA
$fsdbDumpvarsByFile
$fsdbSuppress
$fsdbDumpon
$fsdbDumpoff
$fsdbSwitchDumpfile
$fsdbDumpfile
$fsdbAutoSwitchDumpfile
$fsdbDumpFinish
$fsdbDumpflush
$fsdbLog
Linking Novas Files with Simulators and Enabling FSDB Dumping 119
Linking with Cadence Simulators
The libpli.so file provides the FSDB Verilog FSDB dumping commands,
libfmi.so file provides the FSDB VHDL foreign functions, and libcfc.so file
provides the FSDB C commands. The novas.vhd contains the FSDB dumping
command in VHDL procedure format. The libsscore_iusXXX.so is the FSDB
dumper engine library.
If you use any of the three previously mentioned programming interfaces as
provided by other vendors or your own, you may have to merge and rebuild these
shared libraries. Otherwise, you can link the FSDB dumper with the Dynamic
Loading (bootstrap) method. The detailed steps for merging these files with other
vendors will be discussed later.
Dynamic Linking
By default, IUS automatically searches for and loads the libpli.so, libfmi.so, and
libcfc.so files according to the LD_LIBRARY_PATH setting. If you do not use any
PLI, CFC or FMI programs from other vendors or your own, you can directly use
these files from the Novas package.
To link the Novas object files for FSDB dumping with IUS, specify the shared
library path, and then compile and include the FSDB dumping commands.
120 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Cadence Simulators
The novas.vhd file contains the declarations of the FSDB foreign functions
in the pkg and novas packages.
2. Use the novas package in any VHDL files that call any FSDB foreign
functions. Assume the novas.vhd file is compiled into the default working
library. Use the novas package in the VHDL code as shown in the following
example:
library IEEE;
use IEEE.std_logic_1164.all;
library work;
use work.novas.all;
The following example shows how to include the FSDB foreign functions
in the VHDL code.
process
begin
fsdbDumpfile("test.fsdb");
fsdbDumpvars(0, ":");
wait ;
end process;
Linking Novas Files with Simulators and Enabling FSDB Dumping 121
Linking with Cadence Simulators
Re-compile any VHDL files that were modified. To learn more about the usage
and syntax of the FSDB foreign functions, refer to the FSDB Dumping
Commands Used in VHDL section.
The -linedebug command line option must be specified with ncvhdl or ncvlog to
compile the design if you want to set line break points or run the design step by
step using interactive mode in the Verdi platform.
The following example shows how to include the FSDB foreign functions in the
VHDL code.
process
begin
fsdbDumpfile("test.fsdb");
fsdbDumpvars(0, ":");
wait ;
end process;
Re-compile any VHDL files that were modified. To learn more about the usage
and syntax of the FSDB foreign functions, refer to the FSDB Dumping
Commands Used in VHDL section.
NOTE: The file novas.vhd file must be compiled before other files which use
“use work.novas.all. For example,
Assume the design file vhdl_design.f contains file paths for VHDL
122 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Cadence Simulators
design portion:
./src/vhdl/TOP.vhd
./src/vhdl/sytem.vhd
./src/vhdl/tb_CPUsystem.vhd
...
Then the path of novas.vhd must be list before other files which include
“use work.novas.all”.
${VERDI_HOME}/share/PLI/IUS/LINUX/novas.vhd
./src/vhdl/TOP.vhd
./src/vhdl/sytem.vhd
./src/vhdl/tb_CPUsystem.vhd
...
When the linking is successful, a Verdi banner will be shown to indicate the
coordinating FSDB dumper engine is loading:
*Novas* Loading libsscore_iusXXX.so
Dynamic Loading
Additional options can be specified to tell IUS to load the PLI/CFC/FMI libraries
for the Novas FSDB dumper from a non-default filename.
Linking Novas Files with Simulators and Enabling FSDB Dumping 123
Linking with Cadence Simulators
The novas.vhd file contains the declarations of the FSDB foreign functions
in the pkg and novas packages.
2. Use the novas package in any VHDL files that call any FSDB foreign
functions. Assume the novas.vhd file is compiled into the default working
library. Use the novas package in the VHDL code as shown in the following
example:
library IEEE;
use IEEE.std_logic_1164.all;
library work;
use work.novas.all;
The following example shows how to include the FSDB foreign functions
in the VHDL code.
process
begin
fsdbDumpfile("test.fsdb");
fsdbDumpvars(0, ":");
wait ;
end process;
124 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Cadence Simulators
Re-compile any VHDL files that were modified. To learn more about the
usage and syntax of the FSDB foreign functions, refer to the FSDB
Dumping Commands Used in VHDL section.
3. To enable read access of the design objects, the -linedebug option must be
included with ncvhdl, ncvlog, or the -access +r option specified with
ncelab. For example:
> ncvlog -message -linedebug test.v
or
> ncvhdl -message -linedebug test.vhd
or
> ncelab -message -access +r WORK.TOP:BLK
This is optional; however, if you want to set line break points or run the
design step by step using interactive mode in the Verdi platform, the
-linedebug command line option must be specified with ncvlog to compile
the design.
> ncvlog -message -linedebug test.v
or
> ncvhdl -message -linedebug test.vhd
NOTE: From Cadence IUS 5.5 and later versions, the symbols in PLI
applications are not exported by default. This may cause a crash if you
load several PLI applications that contain the FSDB writer library. To
avoid the crash, you can add the :export qualifier to each -loadpli
option. This will export the symbols in the PLI applications. For
example:
> ncelab -access +r \
-loadpli1 debpli:novas_pli_boot:export\
-VHDLEXPAND WORK.TOP:BLK
Instead of adding the :export qualifier , you can use the -pli_export
option. For example:
> ncelab -access +r \
-loadpli1 debpli:novas_pli_boot \
-VHDLEXPAND WORK.TOP:BLK -pli_export
Linking Novas Files with Simulators and Enabling FSDB Dumping 125
Linking with Cadence Simulators
NOTE: To load the CFC function library with irun, add the additional option
-loadcfc debcfc:novas_cfc_boot as follows:
> irun +ncaccess+r \
+loadpli1=debpli:novas_pli_boot \
-loadcfc debcfc:novas_cfc_boot \
<file(s)>
The message "*** Registering Novas CFC commands..." will be
displayed once it succeeds.
126 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Cadence Simulators
$fsdbDumpvars
$fsdbDumpMDA
$fsdbDumpSVA
$fsdbDumpvarsByFile
$fsdbSuppress
$fsdbDumpon
$fsdbDumpoff
$fsdbSwitchDumpfile
$fsdbDumpfile
$fsdbAutoSwitchDumpfile
$fsdbDumpFinish
$fsdbDumpflush
$fsdbLog
The FSDB dumping commands can be called at the ncsim prompt to dump the
design directly. In the following example, two FSDB dumping commands are
called at the ncsim prompt to dump the entire design to test.fsdb:
ncsim> call fsdbDumpfile test.fsdb
ncsim> call fsdbDumpvars 0 :
For more usage information about these FSDB commands, refer to the FSDB
Dumping Commands Used in VHDL section.
NOTE: If you run a pure Verilog design or mixed-HDL design with a Verilog
top module and Novas VHPI/VPI, follow the IUS signals/scopes
naming convention for pure Verilog design to call Novas VHPI/VPI
FSDB dumping commands. If you run a pure VHDL design or mixed-
HDL design with VHDL top module and Novas VHPI/VPI, follow the
NC-SIM signals/scopes naming convention for pure VHDL design to
call Novas VHPI/VPI FSDB dumping commands.
Linking Novas Files with Simulators and Enabling FSDB Dumping 127
Linking with Cadence Simulators
NC-SystemC Simulator
The following functions are provided to create an FSDB file that contains the
values of signals when values of signals change during the simulation:
Functions
• fsdbDumpfile
• fsdbDumpSC
• fsdbSwitchDumpfile
• fsdbAutoSwitchDumpfile
• fsdbDumpFinish
• fsdbDumpon
• fsdbDumpoff
128 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Cadence Simulators
Linking Novas Files with Simulators and Enabling FSDB Dumping 129
Linking with Cadence Simulators
Then the transaction which records the classes and methods you invoked in your
design will be saved in an FSDB file.
If you use the SCV (CVE) library of Cadence NCSC13.1, NCSC13.2,
NCSC14.1, NCSC14.2, and NCSC15.1 the current release supports the
following libraries for the various C++ compilers and platforms:
130 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with Cadence Simulators
If you use the SCV (CVE) library of Cadence IUS 13.1 and use gcc 4.1.x on
Linux (64bit for example), you need to specify additional options to let NCSC
dynamically link the SCV FSDB transaction recording library and the FSDB
writer into the final simulation file. For example:
> cve main.cpp mybus_data.cpp mybus_master.cpp -DSDI -GNU
-L${VERDI_HOME}/share/PLI/IUS/LINUX64
-lscv_tr_fsdb
Linking Novas Files with Simulators and Enabling FSDB Dumping 131
Linking with Cadence Simulators
132 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with ModelSim Simulators
Linking Novas Files with Simulators and Enabling FSDB Dumping 133
Linking with ModelSim Simulators
When the linking is successful, a Novas banner will be shown to indicate the
coordinating FSDB dumper engine is loading; otherwise, a failed to load
message is shown instead.
Succeeds:
*Novas* Loading libssocre_mtiXXX.so
Fails:
*Novas* Failed to load FSDB dumper.
134 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with ModelSim Simulators
Linking Novas Files with Simulators and Enabling FSDB Dumping 135
Linking with ModelSim Simulators
136 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with ModelSim Simulators
The novas.vhd file contains the declarations of the FSDB foreign functions in the
pkg package and the definition of the novas entity.
The following example shows how to invoke the FSDB foreign functions in the
VHDL code.
process
begin
fsdbDumpfile("test.fsdb");
fsdbDumpvars(0, "system");
wait ;
end process;
Linking Novas Files with Simulators and Enabling FSDB Dumping 137
Linking with ModelSim Simulators
Then the FSDB commands can be invoked at the vsim prompt. For example:
VSIM 1> fsdbDumpfile test.fsdb (Creates the FSDB file)
VSIM 2> fsdbDumpvars 0 system (Dump all signals from the system
region)
138 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with ModelSim Simulators
The -sva and -assertdebug options should be specified in the vsim command line
options if dumping assertions is desired. For example,
> vsim –c top –pli novas_fli.so –sva -assertdebug
To learn more about the usage and syntax of the FSDB foreign functions, you can
refer to the FSDB Dumping Commands Used in VHDL section.
Linking Novas Files with Simulators and Enabling FSDB Dumping 139
Linking with ModelSim Simulators
ModelSim Simulator
The Novas object files for FSDB dumping support signal dumping in mixed
SystemC/HDL designs with ModelSim. To dump signals to the FSDB files, there
are two ways: 1) use the FSDB commands at the vsim prompt and include FSDB
foreign functions in the VHDL code or 2) include the FSDB dumping commands
in the Verilog code. The related Novas object files for FSDB dumping of mixed-
SystemC/HDL designs with ModelSim are in the <VERDI_HOME>/share/PLI/
MODELSIM/${PLATFORM} directory. The FSDB dumper is a shared library
file called novas_fli.so. You have to load it in vsim when running the ModelSim
simulation.
140 Linking Novas Files with Simulators and Enabling FSDB Dumping
Linking with ModelSim Simulators
1. Set the shared library search path of the system to include the directory for
the Novas object files for FSDB dumping.
>setenv LD_LIBRARY_PATH
<VERDI_HOME>/share/PLI/MODELSIM/${PLATFORM}:
$LD_LIBRARY_PATH
Compile Design
2. Create the library.
>vlib novas
5. Load the Novas object files for FSDB dumping while running the
simulation:
>vsim -pli \
<VERDI_HOME>/share/PLI/MODELSIM/<PLATFORM>/novas_fli.so \
sc_main -c -do "fsdbDumpfile sc.fsdb; fsdbDumpSC 0; run 1000
ns; exit"
Also, you can invoke the FSDB commands at the vsim prompt. For
example:
VSIM 1>fsdbDumpfile test.fsdb
VSIM 2>fsdbDumpSC 0 system (Dump all signals from the system
region)
Linking Novas Files with Simulators and Enabling FSDB Dumping 141
Linking with ModelSim Simulators
142 Linking Novas Files with Simulators and Enabling FSDB Dumping
SystemC Dumper to Open SystemC Initiative Simulator
Linking Novas Files with Simulators and Enabling FSDB Dumping 143
SystemC Dumper to Open SystemC Initiative Simulator
systemc/old/osci201/lib-
GNU GCC-2.96
Linux Redhat 7.2 (32- linux_gcc2_96
bit) systemc/old/osci201/lib-
GNU GCC-3.2
linux_gcc3_2
Linux Redhat 6.2 (32- systemc/old/osci201/lib-
GNU GCC-2.95
bit) linux_gcc2_95
x86/MS-Windows NT MS Visual C++ 6.0 systemc/old/osci201/msvc60
144 Linking Novas Files with Simulators and Enabling FSDB Dumping
SystemC Dumper to Open SystemC Initiative Simulator
Functions
• fsdbDumpfile
• fsdbDumpAll
• fsdbDumpvars
• fsdbDumpAllTrans
• fsdbDumpTrans
• fsdbDumpon
• fsdbDumpoff
• fsdbEnableDumpVariable
• fsdbDumpFinish
Linking Novas Files with Simulators and Enabling FSDB Dumping 145
SystemC Dumper to Open SystemC Initiative Simulator
• fsdbSwitchDumpfile
• fsdbAutoSwitchDumpfile
To dump the signals in your SystemC design, you must modify your SystemC
code with the following steps:
1. Include the header file fsdb_trace_file.h.
#include "systemc.h"
#include "fsdb_trace_file.h"
...
2. Compile your design. You should specify the compiler option -gdwarf-2
and -I<VERDI_HOME>/share/PLI/systemc/old/osci21v1/include.
>g++ -gdwarf-2 -c *.cpp
-I<OSCI_INSTALL_DIR>/include
-I<VERDI_HOME>/share/PLI/systemc/osci21v1/include
3. Build an executable file. You should link the libfsdbSC.a and libnffw.a
libraries.
>g++ *.o -o run.x
-L<VERDI_HOME>/share/PLI/systemc/osci21v1/lib-linux_gcc3_2
-L<VERDI_HOME>/share/FsdbWriter/LINUX_GNU_32
-L<OSCI_INSTALL_DIR>/lib-linux_gcc3_2
-lfsdbSC -lnffw -lsystemc
146 Linking Novas Files with Simulators and Enabling FSDB Dumping
SystemC Dumper to Open SystemC Initiative Simulator
Class
• fsdb_trace_file
Functions
• fsdbDumpvars
• fsdbDumpOn
• fsdbDumpOff
• fsdb_trace
To dump the signals in your SystemC design, you must modify your SystemC
code with the following steps:
1. Include the header file fsdb_trace_file.h.
#include "systemc.h"
#include " fsdb_trace_file.h "
...
2. Create the trace file at the top level after all modules and signals have been
instantiated.
fsdb_trace_file *my_trace_file;
my_trace_file = new fsdb_trace_file("dump.fsdb");
Linking Novas Files with Simulators and Enabling FSDB Dumping 147
SystemC Dumper to Open SystemC Initiative Simulator
3. Build an executable file. You should link the libfsdbSC.a and libnffw.a
libraries.
g++ *.o -o run.x
-L<VERDI_HOME>/share/PLI/systemc/old/osci201/lib-
linux_gcc2_96
-L<VERDI_HOME>/share/FsdbWriter/LINUX_GNU_296
-L<OSCI_INSTALL_DIR>/lib-linux_gcc2_06
-lfsdbSC -lnffw -lsystemc
148 Linking Novas Files with Simulators and Enabling FSDB Dumping
SystemC Dumper to Open SystemC Initiative Simulator
Linking Novas Files with Simulators and Enabling FSDB Dumping 149
SystemC Dumper to Open SystemC Initiative Simulator
For the resolved signal, the System C program language supports the object types
in the simulator IUS 13.1, VCS MX 2014.03, ModelSim SE 10.2 and their later
versions.
SystemC Supported Object Types
150 Linking Novas Files with Simulators and Enabling FSDB Dumping
Appendix A: Third Party Integration
Linking Novas Files with Simulators and Enabling FSDB Dumping 151
Appendix A: Third Party Integration
Verilog Only
Dynamically Link Novas Object File with Other
Applications
Use one of the following methods to dynamically link IUS with the Novas object
files for FSDB dumping alone or with other applications. C code will be used to
demonstrate how to integrate the Novas object files for FSDB dumping with a
third party application/library.
NOTE: The FSDB dumper has no dependency on any other symbol. If a third
party application has the dependency of symbols located in the FSDB
dumper, use the “:export” qualifier as shown below when loading the
FSDB Dumper, or refer to the simulator’s manual regarding
“-PLI_Export” for details.
> ncverilog +ncaccess+r -f run.f\
+loadpli1=debpli:novas_pli_boot:export \
+loadpli1=<third_party_PLI_path>:<boot_fn>:expo
rt
or
> ncelab -access +r -f ncelab.args\
-loadpli1 debpli:novas_pli_boot:export \
-loadpli1 <3rd_party_PLI_path>:<boot_fn>:export
Instead of adding the :export qualifier, you can use the -pli_export
option. For example:
> ncverilog +ncaccess+r +ncpli_export -f run.f\
+loadpli1=debpli:novas_pli_boot \
+loadpli1=<third_party_PLI_path>:<boot_fn>
or
> ncelab -access +r -pli_export -f ncelab.args\
-loadpli1 debpli:novas_pli_boot \
-loadpli1 <third_party_PLI_path>:<boot_fn>
152 Linking Novas Files with Simulators and Enabling FSDB Dumping
Appendix A: Third Party Integration
NOTE: For the case that making standalone “ncelab” and “ncsim” excutable
object is desired, try with the “make –f Makefile.nc static” method as
addressed in the example.
NOTE: For the situation where making standalone “ncelab” and “ncsim”
excuteable objects is desired, try the “make –f Makefile.nc static”
method as addressed in the example.
Static Linking
The Novas object files for FSDB dumping can be statically linked with the IUS
executable files ncelab and ncsim. If this method is selected, new ncelab and
ncsim executable files need to be built when a different release of IUS or the
Verdi platform is used. Refer to the <VERDI_HOME>/demo/dumper/
vlog_static_link directory for a detailed example.
Linking Novas Files with Simulators and Enabling FSDB Dumping 153
Appendix A: Third Party Integration
VHDL Only
In pure VHDL designs, the FMI library is required for commands specified
inside the VHDL design and the CFC library is required for commands called
under the Tcl command prompt in interactive mode. Third-party CFC and FMI
can be merged into the FSDB dumper's CFC and FMI libraries. Refer to the
<VERDI_HOME>/demo/dumper/vhdl_cfc_fmi directory for a detailed example.
Mixed Verilog/VHDL
In mixed language designs, the FMI library is required for commands specified
inside the VHDL design, the PLI library is required for commands specified
inside the Verilog design and the CFC library is required for commands called
under the Tcl command prompt in interactive mode. Third-party PLI, CFC, and
FMI can be merged into the FSDB dumper's PLI, CFC, and FMI libraries. Refer
to the <VERDI_HOME>/demo/dumper/mixed_cfc_fmi_pli directory for a
detailed example.
154 Linking Novas Files with Simulators and Enabling FSDB Dumping
Appendix B: Required VCS MX Options for Linking with FSDB Dumper
NOTE: The list below is subject to change without notice due to changes in
different simulator versions. Refer to the appropriate simulator manual
for the latest information.
Affected
Command Related FSDB
Option or Setting Requirement
-line Dumping Commands
Executable
$fsdbDumpvars,
Required for all FSDB $fsdbDumpMDA,
commands related to $fsdbDumpSVA,
vcs +vcsd
dumping value change data $fsdbDumpvarsByFile
of any kind. ($fsdbDumpvarsToFile
)
$fsdbDumpvars,
Required for all FSDB $fsdbDumpMDA,
commands related to $fsdbDumpSVA,
vcs +vpi
dumping value change data $fsdbDumpvarsByFile
of any kind. ($fsdbDumpvarsToFile
)
Linking Novas Files with Simulators and Enabling FSDB Dumping 155
Appendix B: Required VCS MX Options for Linking with FSDB Dumper
Affected
Command Related FSDB
Option or Setting Requirement
-line Dumping Commands
Executable
Optional, equivalent to an
vcs -debug_access+pp aggregation of +vcsd +vpi All
+memcbk +cli+1 and -ucli.
Optional, equivalent to an
aggregation of -
vcs -debug_access debug_access+pp plus All
+cli+4; able to force net and
reg, set value, time break.
Optional, equivalent to
-debug_access plus line
All (specifically for
stepping, debugging;
vcs -debug_access+all fsdbDumpvars
required by dumping
+trace_process)
variables under VHDL
process.
156 Linking Novas Files with Simulators and Enabling FSDB Dumping
Appendix B: Required VCS MX Options for Linking with FSDB Dumper
Affected
Command Related FSDB
Option or Setting Requirement
-line Dumping Commands
Executable
-P $VERDI_
HOME/shared/PLI/
VCS/
$PLATFORM/ Required for all Verilog/SV
vcs All
novas.tab \ FSDB dumping.
$VERDI_HOME/
shared/PLI/VCS/
$PLATFORM/pli.a
Linking Novas Files with Simulators and Enabling FSDB Dumping 157
Appendix B: Required VCS MX Options for Linking with FSDB Dumper
Affected
Command Related FSDB
Option or Setting Requirement
-line Dumping Commands
Executable
setenv
Required for loading FSDB
LD_LIBRARY
dumper's core library,
_PATH
simv VHDL procedure call entry All
${VERDI_HOME
library or UCLI command
}/share/PLI/VCS/
entry library.
${PLATFORM}
158 Linking Novas Files with Simulators and Enabling FSDB Dumping
Appendix C: Dumping to Multiple Files with FSDB Commands
Appendix C: Dumping to
Multiple Files with FSDB
Commands
Overview
The FSDB dumper provides a more flexible method to have multiple dumping
files opened to collect different dumping data in a simulation run. With simple
rules, each dumping file can be configured with different combinations, such as
dumping scopes, dump off time or dump on time, dumping tasks, and options.
By using dumping tasks and the scheme of multiple files, dumping multiple
specified modules into different files can be easily achieved.
Linking Novas Files with Simulators and Enabling FSDB Dumping 159
Appendix C: Dumping to Multiple Files with FSDB Commands
If more than one FSDB file is opened for dumping, the +fsdbfile+target option
is used to distinguish the affected FSDB files.
$fsdbDumpfile("my_1st");
$fsdbDumpfile("my_2nd");
$fsdbDumpvars(0, top.inst1, "+fsdbfile+my_2nd");
The default FSDB file name can either be specified with the first $fsdbDumpfile
or +fsdbfile+filename task argument, or be given by the default file name,
novas.fsdb.
160 Linking Novas Files with Simulators and Enabling FSDB Dumping
Appendix C: Dumping to Multiple Files with FSDB Commands
For $fsdbDumpoff and $fsdbDumpon commands, if the target FSDB file is not
specified, all opened FSDB files in the current simulation will be affected.
Usage Examples
Example 1
$fsdbDumpvars("+all");
$fsdbDumpMDA("+fsdbfile+my_mda_file");
$fsdbDumpSVA();
1. The first command creates the default file (the file name is novas.fsdb) and
performs dumpvars +all to the novas.fsdb file.
2. The second command dumps MDAs to the my_mda_file.fsdb file.
3. The third command dumps SVA to the default file novas.fsdb.
Example 2
$fsdbDumpvars(top.inst1, "+fsdbfile+my_inst1");
$fsdbDumpvars(top.inst2, "+fsdbfile+my_inst2", "+all");
$fsdbDumpMDA(top.inst1);
$fsdbDumpSVA(top.inst2, "+fsdbfile+my_inst2");
Linking Novas Files with Simulators and Enabling FSDB Dumping 161
Appendix C: Dumping to Multiple Files with FSDB Commands
Example 4
$fsdbAutoSwitchDumpfile(10, "my_full_dump", 0);
$fsdbDumpvars("+all");
$fsdbDumpSVA("+fsdbfile+my_sva");
162 Linking Novas Files with Simulators and Enabling FSDB Dumping
Appendix D: Switch Dumping with Simulator Restore
NOTE: For VCS simulator, new restore file will not be created after the restore
command of the simulator is executed.
Simulator Commands
• save
• restore
Refer to the VCS user’s manual for details of the save and restore commands.
Example
ucli> fsdbDumpvars {"+fsdbfile+save.fsdb"}
Create the FSDB file "save.fsdb".
Linking Novas Files with Simulators and Enabling FSDB Dumping 163
Appendix D: Switch Dumping with Simulator Restore
The following FSDB file and associated time range will be the result:
• save.fsdb: 0ns ~ 35ns
NOTE: User-defined Tcl procedures that were loaded before saving will not be
saved when executing the save command. To use these Tcl procedures
after the restore process, load these Tcl procedures again.
ModelSim Simulators
When the restore command is executed for the first time, the dumping will be
redirected to a new FSDB file named as <original_FSDB_name>.restore.FSDB.
If multiple FSDB files are being dumped, each of them will be redirected to a
different restore FSDB file.
Simulator Commands
• checkpoint
• restore
Refer to the ModelSim user’s manual for details of the checkpoint and restore
commands.
Example
vsim> fsdbDumpvars +fsdbfile+save.fsdb
Create the FSDB file "save.fsdb".
vsim> run 10ns
vsim> checkpoint saveData
Save a copy of the simulation data at the time for later restore.
vsim> run 20ns
164 Linking Novas Files with Simulators and Enabling FSDB Dumping
Appendix D: Switch Dumping with Simulator Restore
The following FSDB files and associated time ranges will be the result:
• save.fsdb: 0ns ~ 30ns
• save.restore.fsdb: 10ns ~ 40ns
Simulator Commands
• save
• restart
Refer to the IUS user’s manual for details of the save and restart commands.
Example
ncsim> call fsdbDumpvars +fsdbfile+save.fsdb
Create the FSDB file "save.fsdb".
ncsim> run 20ns
ncsim> save saveData
Save a copy of the simulation data at the time for later restore.
ncsim> run 20ns
ncsim> restart saveData
When the simulation is restored to the previously saved time point, the file
"save.fsdb" will be saved and closed, and the new file "save.restore.fsdb"
will be created.
ncsim> run 10ns
ncsim> exit
Linking Novas Files with Simulators and Enabling FSDB Dumping 165
Appendix D: Switch Dumping with Simulator Restore
The following FSDB files and associated time ranges will be the result:
• save.fsdb: 0ns ~ 40ns
• save.restore.fsdb: 20ns ~ 30ns
Miscellaneous Rules
The miscellaneous rules apply in the following situations:
• When the restore command is executed several times.
• When the FSDB name happens to have a "restore.fsdb" extension.
• When restoring in a new simulation session.
Example in IUS
ncsim> call fsdbDumpvars +fsdbfile+save.fsdb
Create the FSDB file "save.fsdb".
ncsim> run 20ns
ncsim> save saveData
Save a copy of the simulation data at the time for later restore.
ncsim> run 20ns
ncsim> restart saveData
When the simulation is restored to the previously saved time point, the file
"save.fsdb" will be saved and closed, and the new file "save.restore.fsdb"
will be created.
ncsim> run 10ns
ncsim> restart saveData
When the simulation is restored to the previously saved time point, the file
"save.restore.fsdb" will be recreated and this file will overwrite the previous
one.
ncsim> run 40ns
ncsim> exit
166 Linking Novas Files with Simulators and Enabling FSDB Dumping
Appendix D: Switch Dumping with Simulator Restore
Example in VCS
ucli> fsdbDumpvars {"+fsdbfile+save.restore.fsdb"}
Create the FSDB file "save.restore.fsdb".
ucli> run 5ns
ucli> save saveData
Save a copy of the simulation data at the time for later restore.
ucli> run 20ns
ucli> restore saveData
When the simulation is restored to the previously saved time point, the file
"save.restore.fsdb" will be recreated and this will overwrite the previous
one.
ucli> run 30ns
ucli> exit
Example in IUS
• The first simulation session:
ncsim> call fsdbDumpvars +fsdbfile+save.fsdb
Linking Novas Files with Simulators and Enabling FSDB Dumping 167
Appendix D: Switch Dumping with Simulator Restore
Example in VCS
• The first simulation session:
ucli> fsdbDumpvars {"+fsdbfile+save.fsdb" "+all"}
168 Linking Novas Files with Simulators and Enabling FSDB Dumping