有没有办法$dumpvars, $dumpon $dumpoff
从序列的 body() 调用?可以从模块任务中获得。我需要控制 $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.
有任何想法吗 ?谢谢