S
Stephen Williams
Guest
Hi,
I have a test program based on an Icarus Verilog bug report (PR#995)
and I need to get the reference output from a simulator that uses
the IEEE1364 compliant random number sequence. The Cadence tools
should certainly fit in that category. Can someone send me the results
of running the following verilog program? Thanks.
/*
* This test runs the random number generator to make sure
* it follows the standard algorithm. It is based on the bug
* report from PR#995.
*/
module pr995 ();
integer seed;
integer i;
integer result;
initial begin
seed = 1;
$display ("Start sequence: seed=%h", seed);
result=$random(seed);
$display ("seed=%h result=%h", seed, result);
for (i=0; i<30; i=i+1) begin
result=$random(seed);
$display ("seed=%h result=%h", seed, result);
end
seed = 2;
$display ("Start sequence: seed=%h", seed);
result=$random(seed);
$display ("seed=%h result=%h", seed, result);
for (i=0; i<30; i=i+1) begin
result=$random(seed);
$display ("seed=%h result=%h", seed, result);
end
seed = 1;
$display ("Start sequence: seed=%h", seed);
result=$random(seed);
$display ("seed=%h result=%h", seed, result);
for (i=0; i<30; i=i+1) begin
result=$random(seed);
$display ("seed=%h result=%h", seed, result);
end
end
endmodule // rand
--
Steve Williams "The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
http://www.icarus.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
I have a test program based on an Icarus Verilog bug report (PR#995)
and I need to get the reference output from a simulator that uses
the IEEE1364 compliant random number sequence. The Cadence tools
should certainly fit in that category. Can someone send me the results
of running the following verilog program? Thanks.
/*
* This test runs the random number generator to make sure
* it follows the standard algorithm. It is based on the bug
* report from PR#995.
*/
module pr995 ();
integer seed;
integer i;
integer result;
initial begin
seed = 1;
$display ("Start sequence: seed=%h", seed);
result=$random(seed);
$display ("seed=%h result=%h", seed, result);
for (i=0; i<30; i=i+1) begin
result=$random(seed);
$display ("seed=%h result=%h", seed, result);
end
seed = 2;
$display ("Start sequence: seed=%h", seed);
result=$random(seed);
$display ("seed=%h result=%h", seed, result);
for (i=0; i<30; i=i+1) begin
result=$random(seed);
$display ("seed=%h result=%h", seed, result);
end
seed = 1;
$display ("Start sequence: seed=%h", seed);
result=$random(seed);
$display ("seed=%h result=%h", seed, result);
for (i=0; i<30; i=i+1) begin
result=$random(seed);
$display ("seed=%h result=%h", seed, result);
end
end
endmodule // rand
--
Steve Williams "The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
http://www.icarus.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."