(WIP) lab-08: Testbentch for HiZ on register file READ=0
This commit is contained in:
parent
b00650f91b
commit
3835618ef9
@ -84,7 +84,7 @@ begin
|
|||||||
else
|
else
|
||||||
no_of_pass = no_of_pass + 1;
|
no_of_pass = no_of_pass + 1;
|
||||||
result[ridx] = DATA_R1; ridx=ridx+1;
|
result[ridx] = DATA_R1; ridx=ridx+1;
|
||||||
result[ridx] = DATA_R1; ridx=ridx+1;
|
// result[ridx] = DATA_R1; ridx=ridx+1;
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -100,10 +100,22 @@ begin
|
|||||||
else
|
else
|
||||||
no_of_pass = no_of_pass + 1;
|
no_of_pass = no_of_pass + 1;
|
||||||
result[ridx] = DATA_R1; ridx=ridx+1;
|
result[ridx] = DATA_R1; ridx=ridx+1;
|
||||||
result[ridx] = DATA_R1; ridx=ridx+1;
|
// result[ridx] = DATA_R1; ridx=ridx+1;
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
// Test reading when READ=0
|
||||||
|
#5 READ=1'b0;
|
||||||
|
#5 no_of_test = no_of_test + 1;
|
||||||
|
if (DATA_R1 !== 32'bZ)
|
||||||
|
$write("[TEST @ %0dns] READ=0, expecting DATA_R1 to be HiZ, got %8h [FAILED]\n", $time, DATA_R1);
|
||||||
|
else if (DATA_R2 !== 32'bZ)
|
||||||
|
$write("[TEST @ %0dns] READ=0, expecting DATA_R2 to be HiZ, got %8h [FAILED]\n", $time, DATA_R2);
|
||||||
|
else
|
||||||
|
no_of_pass = no_of_pass + 1;
|
||||||
|
result[ridx] = DATA_R1; ridx=ridx+1;
|
||||||
|
// result[ridx] = DATA_R1; ridx=ridx+1;
|
||||||
|
|
||||||
// TODO: Read and write from the same address at the same time?
|
// TODO: Read and write from the same address at the same time?
|
||||||
|
|
||||||
#5 READ=1'b0; WRITE=1'b0; // No op
|
#5 READ=1'b0; WRITE=1'b0; // No op
|
||||||
|
Loading…
x
Reference in New Issue
Block a user