Merge pull request #1186 from edcote/patch-1
Update TestDriver module to support FSDB
This commit is contained in:
commit
e07b37c7ad
@ -18,6 +18,7 @@ module TestDriver;
|
|||||||
reg [63:0] max_cycles = 0;
|
reg [63:0] max_cycles = 0;
|
||||||
reg [63:0] dump_start = 0;
|
reg [63:0] dump_start = 0;
|
||||||
reg [63:0] trace_count = 0;
|
reg [63:0] trace_count = 0;
|
||||||
|
reg [1023:0] fsdbfile = 0;
|
||||||
reg [1023:0] vcdplusfile = 0;
|
reg [1023:0] vcdplusfile = 0;
|
||||||
reg [1023:0] vcdfile = 0;
|
reg [1023:0] vcdfile = 0;
|
||||||
int unsigned rand_value;
|
int unsigned rand_value;
|
||||||
@ -50,7 +51,19 @@ module TestDriver;
|
|||||||
`ifdef VCS
|
`ifdef VCS
|
||||||
$vcdplusfile(vcdplusfile);
|
$vcdplusfile(vcdplusfile);
|
||||||
`else
|
`else
|
||||||
$fdisplay(stderr, "Error: +vcdplusfile is VCS-only; use +vcdfile instead");
|
$fdisplay(stderr, "Error: +vcdplusfile is VCS-only; use +vcdfile instead or recompile with VCS=1");
|
||||||
|
$fatal;
|
||||||
|
`endif
|
||||||
|
end
|
||||||
|
|
||||||
|
if ($value$plusargs("fsdbfile=%s", fsdbfile))
|
||||||
|
begin
|
||||||
|
`ifdef FSDB
|
||||||
|
$fsdbDumpfile(fsdbfile);
|
||||||
|
$fsdbDumpvars("+all");
|
||||||
|
//$fsdbDumpSVA;
|
||||||
|
`else
|
||||||
|
$fdisplay(stderr, "Error: +fsdbfile is FSDB-only; use +vcdfile/+vcdplus instead or recompile with FSDB=1");
|
||||||
$fatal;
|
$fatal;
|
||||||
`endif
|
`endif
|
||||||
end
|
end
|
||||||
@ -60,7 +73,11 @@ module TestDriver;
|
|||||||
$dumpfile(vcdfile);
|
$dumpfile(vcdfile);
|
||||||
$dumpvars(0, testHarness);
|
$dumpvars(0, testHarness);
|
||||||
end
|
end
|
||||||
`ifdef VCS
|
|
||||||
|
`ifdef FSDB
|
||||||
|
`define VCDPLUSON $fsdbDumpon;
|
||||||
|
`define VCDPLUSCLOSE $fsdbDumpoff;
|
||||||
|
`elsif VCS
|
||||||
`define VCDPLUSON $vcdpluson(0); $vcdplusmemon(0);
|
`define VCDPLUSON $vcdpluson(0); $vcdplusmemon(0);
|
||||||
`define VCDPLUSCLOSE $vcdplusclose; $dumpoff;
|
`define VCDPLUSCLOSE $vcdplusclose; $dumpoff;
|
||||||
`else
|
`else
|
||||||
@ -72,9 +89,9 @@ module TestDriver;
|
|||||||
`define VCDPLUSON
|
`define VCDPLUSON
|
||||||
`define VCDPLUSCLOSE
|
`define VCDPLUSCLOSE
|
||||||
|
|
||||||
if ($test$plusargs("vcdplusfile=") || $test$plusargs("vcdfile="))
|
if ($test$plusargs("vcdplusfile=") || $test$plusargs("vcdfile=") || $test$plusargs("fsdbfile="))
|
||||||
begin
|
begin
|
||||||
$fdisplay(stderr, "Error: +vcdfile or +vcdplusfile requested but compile did not have +define+DEBUG enabled");
|
$fdisplay(stderr, "Error: +vcdfile, +vcdplusfile, or +fsdbfile requested but compile did not have +define+DEBUG enabled");
|
||||||
$fatal;
|
$fatal;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user