1
0

Merge pull request #406 from ucb-bar/incisive-fixes

More Cadence Incisive fixes
This commit is contained in:
Scott Johnson 2016-10-24 10:48:24 -07:00 committed by GitHub
commit bc01f85164

View File

@ -25,23 +25,30 @@ module TestDriver;
void'($value$plusargs("max-cycles=%d", max_cycles)); void'($value$plusargs("max-cycles=%d", max_cycles));
verbose = $test$plusargs("verbose"); verbose = $test$plusargs("verbose");
// do not delete the line below. // do not delete the lines below.
// $random function needs to be called with the seed once to affect all // $random function needs to be called with the seed once to affect all
// the downstream $random functions within the Chisel-generated Verilog // the downstream $random functions within the Chisel-generated Verilog
// code. // code.
// $urandom is seeded via cmdline (+ntb_random_seed in VCS) but that // $urandom is seeded via cmdline (+ntb_random_seed in VCS) but that
// doesn't seed $random. // doesn't seed $random.
rand_value = $random($urandom); rand_value = $urandom;
rand_value = $random(rand_value);
if (verbose) begin if (verbose) begin
$fdisplay(stderr, "testing $random %0x", rand_value); $fdisplay(stderr, "testing $random %0x", rand_value);
end end
`ifdef DEBUG `ifdef DEBUG
if ($value$plusargs("vcdplusfile=%s", vcdplusfile)) if ($value$plusargs("vcdplusfile=%s", vcdplusfile))
begin begin
`ifdef VCS
$vcdplusfile(vcdplusfile); $vcdplusfile(vcdplusfile);
$vcdpluson(0); $vcdpluson(0);
$vcdplusmemon(0); $vcdplusmemon(0);
`else
$fdisplay(stderr, "Error: +vcdplusfile is VCS-only; use +vcdfile instead");
$fatal;
`endif
end end
if ($value$plusargs("vcdfile=%s", vcdfile)) if ($value$plusargs("vcdfile=%s", vcdfile))
@ -50,8 +57,12 @@ module TestDriver;
$dumpvars(0, testHarness); $dumpvars(0, testHarness);
$dumpon; $dumpon;
end end
`ifdef VCS
`define VCDPLUSCLOSE $vcdplusclose; $dumpoff; `define VCDPLUSCLOSE $vcdplusclose; $dumpoff;
`else `else
`define VCDPLUSCLOSE $dumpoff;
`endif
`else
`define VCDPLUSCLOSE `define VCDPLUSCLOSE
`endif `endif
end end