【发布时间】:2013-12-18 15:09:42
【问题描述】:
有没有办法从序列的 body() 调用 $dumpvars, $dumpon $dumpoff ?
可以从模块任务中获得。
我需要控制 $dumpon $dumpoff 以便转储不会太大
另一种方法是在序列中打开一个位 top.dump_on 并在测试台中等待这个位
编辑:
我添加了一个顶级模块:
module dump ();
bit stop=1'b0;
task do_dump(string id);
fork begin
$display("DUMP START %s", id);
$dumpfile($psprintf("dump_%s.vcd", id));
$dumpvars(1, hmr_top.i_hmr.REF_CLK_IN,
hmr_top.i_hmr.RST_N,
hmr_top.i_hmr.SER_CLK,
hmr_top.i_hmr.VMKMODE,
hmr_top.i_hmr.SERIN,
hmr_top.i_hmr.SEROUT,
hmr_top.i_hmr.REF_CLK_OUT);
$dumpon;
wait(stop);
stop = 1'b0;
$dumpoff;
$display("DUMP END %s", id);
end join_none
endtask
function stop_dump();
stop = 1'b1;
endfunction
endmodule // dump
但是当我尝试调用第二个转储时,我得到了这个错误:
Warning-[TFX-DUMPVARCA] DumpVar called previously As $dumpvars was called in previous time step, ignoring this call.$dumpfile at time
#11551000 Please refer to section 18.1.2 in the IEEE Verilog Standard 1364-2001 for details on $dumpvars.
有什么想法吗?谢谢
【问题讨论】:
-
第二次dump.do_dump("again");从 seq dump_again.vcd 文件中调用未创建。关键问题是在模拟期间可以创建多个转储文件@toolic
-
这是一个完全不同的问题。阅读 IEEE 标准。我找不到在模拟期间转储多个文件的任何提及。另见
$fopen。 search.cpan.org/perldoc?Verilog%3A%3AVCD
标签: verilog system-verilog uvm