fix testbench RNG for preamble length
This commit is contained in:
parent
770f6eb8cc
commit
d27def5296
@ -57,7 +57,7 @@ module program1_tb ();
|
||||
|
||||
// set preamble length for the program run (always > 9 but < 26)
|
||||
always_comb begin
|
||||
pre_length = $urandom;
|
||||
pre_length = $urandom_range(10, 26);
|
||||
if(pre_length < 10) pre_length = 10; // prevents pre_length < 10
|
||||
else if(pre_length > 26) pre_length = 26; // prevets pre_length > 26
|
||||
end
|
||||
|
@ -56,7 +56,7 @@ module program2_tb () ;
|
||||
|
||||
// set preamble lengths for the four program runs (always > 9 but < 16)
|
||||
always_comb begin
|
||||
pre_length = $urandom;//$random>>10 ; // program 1 run
|
||||
pre_length = $urandom_range(10, 26);//$random>>10 ; // program 1 run
|
||||
if(pre_length < 10) pre_length = 10; // prevents pre_length < 10
|
||||
else if(pre_length > 26) pre_length = 26;
|
||||
end
|
||||
|
@ -57,7 +57,7 @@ module program3_tb ();
|
||||
|
||||
// set preamble length for the program run (always > 9 but < 26)
|
||||
always_comb begin
|
||||
pre_length = $urandom;
|
||||
pre_length = $urandom_range(10, 26);
|
||||
if(pre_length < 10) pre_length = 10; // prevents pre_length < 10
|
||||
else if(pre_length > 26) pre_length = 26; // prevets pre_length > 26
|
||||
end
|
||||
|
Reference in New Issue
Block a user