[Tool] Verdi 用法(dump waveform)

1.1 Basic Usage(add in top module)

  • Specifying fsdb file : $fsdbDumpfile(file_name,file_size(MB))
  • Dumping fsdb information : $fsdbDumpvars(depth, instance, options)
  • Depth :
    • 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 levels below.
  • Options (Optional) :
Options Description
+all Dump all signals including memory, MDA, packed array, structure, union, power-related, and packed structure
+mda Dump all memory and MDA signals
+strength Enable strength dumping
+struct Dump all structs (default on)
+power Dump power-related signals (default on)
others check on verdi -doc //$VERDI_HOME/doc/linking_dumping.pdf
  • vcs compile option : -debug_pp is needed
    • Recommend : VCS and Verdi should align at least same version
$fsdbDumpfile("test.fsdb",50)
$fsdbDumpvars(0, chip_top,"+power","+struct", "+mda");

1.2 Q: How to split fsdb file?

  • Split by FSDB Size
    • $fsdbAutoSwitchDumpfile(File_size(MB), File_name, number_of_file)
    • Recommend File Size: RTL not over 2G, netlist not over 5G:
initial begin
    $fsdbDumpvars(0, dut);
    $fsdbAutoSwitchDumpfile(2000, XXX, 20);
en
  • Split by Time Period
integer i;
initial begin
    $fsdbDumpvars(0, dut);
    i=0;
    forever begin
        $fsdbSwitchDumpfile($sformatf("XXX_%0d", i));
        #time period;
        i = i+1;
    end
end

1.3 Q: How to dump a certain time interval only?

  • Use $fsdbDumpon, $fsdbDumpoff to specify time interval
initial begin
    $fsdbDumpvars(0, dut, "+fsdbfile+interval.fsdb");
    #40 $fsdbDumpoff;
    #40 $fsdbDumpon;
    #40 $fsdbDumpoff;
    #40 $finish;
end

1.4 Q: How to not dump a certain instance?

  • Use $fsdbSupress(instance) to specify certain instance
  • NOTE : $fsdbSuppress must be specified before $fsdbDumpvars
initial begin
    $fsdbSuppress(dut.inst_a, dut.inst_b);
    $fsdbDumpvars(0, dut);
end

1.5 Q: How to dump assertion?

  • Use $fsdbDumpSVA(depth, instance)
  • vcs compile option : -sverilog -debug_pp is needed
  • NOTE: After Verdi 1703SP1-1, please add runtime option "+fsdb+sva_success"
initial begin
    $fsdbDumpSVA(0, dut);
end

1.6 Q: How to dump memory arrays?

  • Use $fsdbDumpMDA(depth, instance)
  • vcs compile option : -debug_pp, +memcbk  is needed
initial begin
    $fsdbDumpMDA(1, dut.i_pram);
end

1.7 Q: How to dump lib cells signal to fsdb?

  • vcs compile option : -debug_acc -debug_region=cell+lib is needed
Example: vcs -debug_acc -debug_region=cell+lib 

1.8 Q: How to dump glitch information?

  • By simulation command
    • Before Verdi/1509, simv +fsdb+sequential +fsdb+glitch=0 +fsdb+region
    • After Verdi/1509, simv +fsdb+delta
%> simv +fsdb+sequential +fsdb+glitch=0 +fsdb+region
  • By Environment variable
%> setenv NOVAS_FSDB_ENV_DUMP_SEQ_NUM 1
%> setenv NOVAS_FSDB_ENV_MAX_GLITCH_NUM 0
%> setenv FSDB_REGION
then re-run simulation

1.9 Q: How to dump force information?

  • By simulation command
    • simv +fsdb+force
%> simv +fsdb+force
  • By Environment variable
%> setenv FSDB_FORCE
then re-run simulation

你可能感兴趣的:(tools)