本文介绍如何使用fsdbDump系列函数。
所有的fsdbDump系列函数的详细说明可见 verdi/doc/linking_dumping.pdf 文档。
可以通过命令行参数的方式来控制dump的选项。例如在仿真时指定dump波形的文件。
simv +fsdb+high.fsdb
2.commands used with verilog
语法如下,
$fsdbDumpfile("name" | name_var [, limit_size | ,limit_size_var]);
$fsdbDumpfile("novas.fsdb",32); // 32 megabytes
语法如下,
$fsdbDumpFinish;
语法如下,
$fsdbDumpflush;
语法如下,
$fsdbDumpon(["option"| option_Var])
$fsdbDumpoff(["option"| option_Var])
+fsdbfile+filename
$fsdbDumpon("+fsdbfile+novas.fsdb");
#100
$fsdbDumpoff("+fsdbfile+novas.fsdb");
$fsdbDumpvars(
[depth, | "level=",depth_var,]
[instance, | "instance=", instance_var]
[, "option"| ,"option, option_var"]
);
$fsdbDumpvars("+all");
$fsdbDumpvars(0, system);
$fsdbDumpvars(0, system, "+fsdbfile+novas.fsdb");
$fsdbDumpvars(1, top.dut.u1);
语法如下,
$fsdbDumpvarsByFile("textFileName" | textfile_var [, "option"|,option_var]);
file format
# [pragma]
# comment
[option_in_file] [depth] instance name
用法如下,
+all 1 system
+mda +struct 3 system.i_cpu
2.7 $fsdbAutoSwitchDumpfile
语法如下,
$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"]
);
$fsdbAutoSwitchDumpfile(10, "test.fsdb", 20); // 10M, 20 files max
2.8 $fsdbSuppress
specify the scopes that are not dumped by the $fsdbDumpvars commands.
must be specified before $fsdbDumpvars; otherwise, $fsdbSuppress does not work.
$fsdbSuppress(
"suppress_file" | "file=",file_var
| [instance], | "instance="[,instance_var]
| "module_file=", "filename"
| "module_base=", [, module_name]
| "signal_prefix="
);
$fsdbSupress(dump_top, system.i_pram);
$fsdbDumpvars(0, dump_top);
$fsdbDumpDMA(
[depth, | "level=",depth_var,]
[instance | "instance=",instance_var]
[, "option"|"option=",option_var]
)
reg [7:0] screen [79:0][0:24]
$fsdbDumpDMA(1, system.i_pram);
语法如下,
$fsdbDumpSVA(
[depth, | "level=",depth_var,]
[instance | "instance=",instance_var]
[, "option"|"option=",option_var]
)
$fsdbDumpSVA();
$fsdbDumpSAA(0, system);
另外,由于微信群已经超过200人,添加小编的微信,拉你进入WX学习群。
好好学习,天天向上!