(WIP) lab-08: Testbentch for HiZ on register file READ=0

This commit is contained in:
Yuri Tatishchev 2024-10-22 12:40:00 -07:00
parent b00650f91b
commit 3835618ef9
Signed by: CaZzzer
GPG Key ID: E0EBF441EA424369

View File

@ -84,7 +84,7 @@ begin
else
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;
end
@ -100,10 +100,22 @@ begin
else
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;
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?
#5 READ=1'b0; WRITE=1'b0; // No op