$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
しかし、2 番目のダンプを呼び出そうとすると、次のエラーが発生します。
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.
何か案は ?どうも