busybear testbench: understand bytemask for writes

This commit is contained in:
Noah Boorstin 2021-01-28 15:42:47 -05:00
parent 7a3f29b260
commit 405c9d90b5
2 changed files with 7 additions and 3 deletions

View File

@ -130,6 +130,6 @@ add wave /testbench_busybear/InstrWName
#set DefaultRadix hexadecimal
#
#-- Run the Simulation
run 2640
run 3850
#run -all
##quit

View File

@ -123,8 +123,12 @@ module testbench_busybear();
end
scan_file_memW = $fscanf(data_file_memW, "%x\n", writeDataExpected);
scan_file_memW = $fscanf(data_file_memW, "%x\n", writeAdrExpected);
if (writeDataExpected != WriteDataM) begin
$display("%t ps: WriteDataM does not equal writeDataExpected: %x, %x", $time, WriteDataM, writeDataExpected);
for(int i=0; i<8; i++) begin
if (ByteMaskM[i]) begin
if (writeDataExpected[i*8+7 -: 8] != WriteDataM[i*8+7 -: 8]) begin
$display("%t ps: WriteDataM does not equal writeDataExpected: %x, %x", $time, WriteDataM, writeDataExpected);
end
end
end
if (writeAdrExpected != DataAdrM) begin
$display("%t ps: DataAdrM does not equal writeAdrExpected: %x, %x", $time, DataAdrM, writeAdrExpected);