$fsdbDumpfile("abc.fsdb",1000); // 后面的数字1000就表示1000M,表示限定这个fsdb最大1000M就不dump了
$fsdbAutoSwitchDumpfile(200,"abc.fsdb",5); //表示dump 5个最大200M的fsdb,最后得到的应该是5个 abc***.fsdb
2. 另外的通过hierarchical存多个fsdb
$fsdbDumpvars(1,top,"+fsdbfile+abc.fsdb"); //dump top这一层到abc.fsdb这个文件里
$fsdbDumpvars(0,top.cpu,"+fsdbfile+cd.fsdb") ; //dump top.cpu全部到cd.fsdb里面
initial begin
#1000_000;
$fsdbDumpvars("aa.fsdb");end
$fsdbDumpon; // - 打开 FSDB dumping
$fsdbDumpoff; // - 关闭 FSDB dumping
5. Conventional Issues & Verdi’s Approach
Issues and Conventional Approach
• Today’s complex SOC designs usually require huge amounts of data
for verification which introduces some problems when dealing with big simulation dump files.
• A common problem with complex design dumping is that the dumped simulation file may exceed the OS limitation, or the simulation
process may exceed the OS memory limitation during dumping.
• The workarounds is to limit the signal number by dumping from a specified scope in hierarchy or start dumping after a certain time.
Verdi’s Approach
• Verdi provides various environment variables and system tasks to restrict the FSDB file size in different constraints, to get the best balance between data accuracy and performance
• Verdi also provides a parallel dumping mechanism to speed up the dumping performance in dual CPU machines.
5.1 Restrict the FSDB File Size (1/4)
NOVAS_FSDB_ENV_WRITER_MEM_LIMIT variable:
• The default value is 64.
• When the user uses the nWave auto-update feature, the recommendation is to set this environment variable to a smaller value before running the simulation. For example:%
5.2 Skip dumping VHDL complex data.
• Including array of array and record signals.
% setenv IGNORE_COMPLEX 1
5.4 Restrict the FSDB File Size (2/4)
Use $fsdbAutoSwitchDumpfileto reduce the size and control the number of FSDB files.
• For example, if the maximum desired FSDB file size is 1G and at most 20 FSDB dump files can be created, add following task in source code:
$fsdbAutoSwitchDumpfile(1000, "ALU.fsdb", 20, "my.log");
• Where 1000 (1G) is the size of each file and 20 is the number of dump files.
initial begin
$fsdbDumpfile ("../log/test1.u_bar.3.fsdb");
$fsdbDumpvars (3, top.u_foo.u_bar);
end
Use $fsdbSuppress to suppress the scopes that should not be dumped.• For example, if not going to dump scope “system.i_pram” and “system.i_cpu.i_CCU”, add following task into source code or testbench:
$fsdbSuppress(system.i_pram, system.i_cpu.i_CCU);
$fsdbDumpvars;
5.7 Use $fsdbDumpMem/$fsdbDumpMDA to dump the relevant cells of the memory/MDA at specific time intervals.
• Dump the memory cells from mem[0] to mem[31] at the time the system task is called:
$fsdbDumpMem(mem, 0, 32);
$fsdbDumpMem(mem, 0, 32, , WR_ENABLE, 23);
$fsdbDumpMem(mem, , , 500, WR_ENABLE, 20);
Use $fsdbDumpon and $fsdbDumpoffto change the start and stop dumping time for the needed time interval.
• For example, to generate a FSDB file that will record all the scopes from 1000 time units to 70000 time units, add the following to the testbench:
initial begin
$fsdbDumpvars;
#1000 $fsdbDumpoff;
#70000 $fsdbDumpon;
end
• NOVAS_FSDB_ENV_MAX_GLITCH_NUM is used to specify glitch dumping:
5.10 Parallel Dumping for FSDB
Two functions are includedin the process when dumping FSDB:
• Running the simulation and
• Writing the FSDB.
Use parallel dumping mechanism to separate these two process in a multi-processor system.Two ways to run simulation in parallel mode:
• Add +fsdb_parallel option in command line when runningsimulation.
• Set environment variable FSDB_PARALLEL before runningsimulation.
• setenv FSDB_PARALLEL 1
NOVAS_FSDB_ENV_DUMP_SEQ_NUM
6.fsdbDumplimit - 限制FSDB 文件size 如何使用?
7. Specify the option in an FSDB dumping command to enable dumping allsupported signals:
$fsdbDumpvars("+all");
The Novas object files for FSDB dumping provide the following FSDB dumpingcommands for Verilog:
$fsdbAutoSwitchDumpfile
$fsdbDumpfile
$fsdbDumpflush
$fsdbDumpon, $fsdbDumpoff
$fsdbDumpvars
$fsdbDumpvarsByFile
$fsdbDumpvarsES
$fsdbDumpFinish
$fsdbDumpMDA
$fsdbDumpSVA
$fsdbLog
$fsdbReplay
$fsdbSuppress
$fsdbSwitchDumpfile
$fsdbDumpfile
To specify the FSDB file name created by the Novas object files for FSDBdumping. 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, pleasespecify the limit size in megabyte format. This function will affect the FSDB filethat is specified in "FSDB_Name" . The FSDB dumper uses the sliding windowscheme 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" tospecify the target FSDB file to dump. It is equal to using $fsdbDumpfile then $fsdbDumpvars.
$fsdbDumpfile("FSDB_Name" | FSDB_Name_var [ ,Limit_Size |,Limit_Size_var ]);
when specified on the simulator command line:
xcelium> call fsdbDumpfile \"rtl.fsdb\"
xcelium> call fsdbDumpvars 0 TB //1st argument is 'level', 2nd argument is 'scope'
//the 'level' values allow different depths of the hierarchy below the named scope
//0: all signals in all scopes
//1: all signals in current scope
//2: all signals in the current scope and all scopes one level below
//n: all signals in the current scope and all scopes n-1 level below
$fsdbDumpfile("FSDB_Name");
$fsdbDumpfile("FSDB_Name", Limit_Size);
8.1 命令介绍:
还可以直接指定dump的fsdb file
$fsdbDumpvars(0,top.arbiter,"+fsdbfile+novas.fsdb");
$fsdbDumpMDA(depth, instance, "options") dump指定模块中的多维数组
$fsdbDumpSVA(depth,instance,"option"),dump指定模块的assertion
$fsdbDumpSVA(1,system.arbiter,"+fsdbfile=SVA.fsdb"),将该instance下所有assert全部dump到该fsdb中 可以用+fsdbfile=SVA.fsdb dump到新的fsdb文件中.
$fsdbSwitchDumpfile(“new_file_name”[, “+fsdbfile+src_file”])
关闭现有的波形文件,以一个新的文件名开始加载波形;
new_file_name—创建一个新的波形文件,将波形加载到这个文件中;
+fsdbfile+src_file—指定要停止加载并关闭的波形文件, 这个参数不指定时,将默认使用当前正在加载的波形文件;
8.2 实际操作:
有按size切不同fsdb文件需求,可以如下操作,这里fsdbDumpvars指定了特定的module,也可以直接从top上dump所有的波形.
另外,由于微信群已经超过200人,添加小编的微信,拉你进入WX学习群。
最后的最后,如果对您有帮助,希望点个“在看”。好好学习,天天向上!