vram: a little more formatting of the vram test

Make it a bit more compact, for large test runs
This commit is contained in:
David Anderson 2024-08-31 13:25:04 -07:00
parent d41ca7daae
commit e0d156cdd1
1 changed files with 7 additions and 7 deletions

View File

@ -244,16 +244,16 @@ module mkTB();
if (req.write)
return $format("Write(%0d)", req.addr);
else
return $format("Read(%0d)", req.addr);
return $format("Read(%0d) ", req.addr);
end
tagged Invalid: return $format("Idle");
tagged Invalid: return $format("Idle ");
endcase
endfunction
function Fmt ro_str(Maybe#(Addr) v);
case (v) matches
tagged Valid .addr: return $format("Read(%0d)", addr);
tagged Invalid: return $format("Idle");
tagged Valid .addr: return $format("Read(%0d) ", addr);
tagged Invalid: return $format("Idle ");
endcase
endfunction
@ -272,9 +272,9 @@ module mkTB();
let want = pack(reverse(test.want));
$display("\n # %0d: %s", idx+1, tests[idx].name);
$display(" input:",
"\n 0:", rw_str(test.cpu), "\n 1:", rw_str(test.debugger), "\n 2:", ro_str(test.palette),
"\n 3:", ro_str(test.tile1), "\n 4:", ro_str(test.tile2), "\n 5:", ro_str(test.sprite));
$display(" input: ",
"0:", rw_str(test.cpu), " 1:", rw_str(test.debugger), " 2:", ro_str(test.palette),
" 3:", ro_str(test.tile1), " 4:", ro_str(test.tile2), " 5:", ro_str(test.sprite));
$display(" got : %03b %03b", got[5:3], got[2:0]);
$display(" want: %03b %03b", want[5:3], want[2:0]);
dynamicAssert(got == want, "wrong arbiter output");