verdi提高dump效率的几种方法

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 work arounds 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.

 

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:
% setenv NOVAS_FSDB_ENV_WRITER_MEM_LIMIT 20


Skip dumping VHDL complex data.
• Including array of array and record signals.
% setenv IGNORE_COMPLEX 1


Skip dumping Verilog cell instances
• To skip the FSDB dumping for primitive cells, for example:
% setenv SKIP_CELL_INSTANCE 1

 

Restrict the FSDB File Size (2/4)
Use $fsdbAutoSwitchDump file to 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.


Use $fsdbDumpvars to reduce the number of scopes to be dumped.
• For example, to start dumping from scope top.u_foo.u_bar with depth=3 and dumping location and file name of ../log/test1.u_bar.3.fsdb, add following task into source code (or testbench):
initial begin
$fsdbDumpfile ("../log/test1.u_bar.3.fsdb");
$fsdbDumpvars (3, top.u_foo.u_bar);
end

 

Restrict the FSDB File Size (3/4)
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;


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);
• Dump the memory cells from mem[0] to mem[31] after 23 simulation time units when the trigger signal, WR_ENABLE, changes to 1:
$fsdbDumpMem(mem, 0, 32, , WR_ENABLE, 23);
• Evaluate the value of signal WR_ENABLE at #0, #500, #1000... If WR_ENABLE=1, dump all memory cells of mem after 20 time units:
$fsdbDumpMem(mem, , , 500, WR_ENABLE, 20);

 

Restrict the FSDB File Size (4/4)
Use $fsdbDumpon and $fsdbDumpoff to 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


Use environment variables to prevent dumping of glitches and event sequence information.
• NOVAS_FSDB_ENV_MAX_GLITCH_NUM is used to specify glitch dumping:
• Default: does not record glitches
• 0: all glitches are stored.
• 1: the last glitch is stored.
• 2: the first and the last glitch are stored
• NOVAS_FSDB_ENV_DUMP_SEQ_NUM set to ‘on’ is used to enable event sequence dumping.

 

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 running
simulation.
• Set environment variable FSDB_PARALLEL before running
simulation.
• setenv FSDB_PARALLEL 1

 

Summary
Use environment variables and system tasks to get balance between accuracy and performance when dumping FSDB.
• NOVAS_FSDB_ENV_WRITER_MEM_LIMIT
• IGNORE_COMPLEX
• SKIP_CELL_INSTANCE
• $fsdbAutoSwitchDumpfile
• $fsdbDumpvars
• $fsdbSuppress
• $fsdbDumpMem/$fsdbDumpMDA
• $fsdbDumpon and $fsdbDumpoff
• NOVAS_FSDB_ENV_MAX_GLITCH_NUM and NOVAS_FSDB_ENV_DUMP_SEQ_NUM
Use command line option +fsdb_parallel or environment variable FSDB_PARALLEL to improve the dumping performance on dual CPU machines.

posted @ 2015-03-20 14:34  CHIPER  阅读(6077)  评论(0编辑  收藏  举报