forked from github/verilator
Tests: Add TEST_DUMPFILE define
This commit is contained in:
parent
6297650fef
commit
278d532368
@ -688,6 +688,7 @@ sub new {
|
||||
$self->{top_shell_filename} = "$self->{obj_dir}/$self->{VM_PREFIX}__top.v";
|
||||
}
|
||||
$self->{pli_filename} ||= $self->{name} . ".cpp";
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
@ -964,6 +965,11 @@ sub compile {
|
||||
|
||||
compile_vlt_cmd(%param);
|
||||
|
||||
my $define_opt = defineOpt($self->{xsim});
|
||||
if (join(' ', @{$self->{v_flags}}) !~ /TEST_DUMPFILE/) {
|
||||
push @{$self->{v_flags}}, ($define_opt . "TEST_DUMPFILE=" . $self->trace_filename);
|
||||
}
|
||||
|
||||
if (!$param{make_top_shell}) {
|
||||
$param{top_shell_filename}
|
||||
= $self->{top_shell_filename} = "";
|
||||
|
@ -36,7 +36,7 @@ module t (/*AUTOARG*/
|
||||
//`define WAVES
|
||||
`ifdef WAVES
|
||||
initial begin
|
||||
$dumpfile({`STRINGIFY(`TEST_OBJ_DIR),"/simx.vcd"});
|
||||
$dumpfile(`STRINGIFY(`TEST_DUMPFILE));
|
||||
$dumpvars(12, t);
|
||||
end
|
||||
`endif
|
||||
|
@ -16,6 +16,7 @@
|
||||
`define SV_COV_STOP 1
|
||||
`define SV_COV_TOGGLE 23
|
||||
`define SYSTEMVERILOG 1
|
||||
`define TEST_DUMPFILE obj_vlt/t_preproc_defines/simx.vcd
|
||||
`define TEST_OBJ_DIR obj_vlt/t_preproc_defines
|
||||
`define VERILATOR 1
|
||||
`define WITH_ARG(a) (a)(a)
|
||||
|
@ -18,7 +18,7 @@ module t;
|
||||
logic d;
|
||||
|
||||
initial begin
|
||||
$dumpfile({`STRINGIFY(`TEST_OBJ_DIR),"/simx.vcd"});
|
||||
$dumpfile(`STRINGIFY(`TEST_DUMPFILE));
|
||||
$dumpvars;
|
||||
forever clk = #CLK_HALF_PERIOD ~clk;
|
||||
end
|
||||
|
@ -10,7 +10,7 @@ module t(/*AUTOARG*/);
|
||||
int sig;
|
||||
initial begin
|
||||
sig = 10;
|
||||
$dumpfile({`STRINGIFY(`TEST_OBJ_DIR),"/simx.vcd"});
|
||||
$dumpfile(`STRINGIFY(`TEST_DUMPFILE));
|
||||
$dumpvars();
|
||||
#20;
|
||||
sig = 20;
|
||||
|
@ -12,7 +12,7 @@ module t #(
|
||||
) (/*AUTOARG*/);
|
||||
|
||||
initial begin
|
||||
$dumpfile({`STRINGIFY(`TEST_OBJ_DIR),"/simx.vcd"});
|
||||
$dumpfile(`STRINGIFY(`TEST_DUMPFILE));
|
||||
$dumpvars;
|
||||
|
||||
$write("*-* All Finished *-*\n");
|
||||
|
@ -14,7 +14,7 @@ module t(/*AUTOARG*/);
|
||||
logic clk;
|
||||
|
||||
initial begin
|
||||
$dumpfile({`STRINGIFY(`TEST_OBJ_DIR),"/simx.vcd"});
|
||||
$dumpfile(`STRINGIFY(`TEST_DUMPFILE));
|
||||
$dumpvars;
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user