vram: a little more formatting of the vram test
Make it a bit more compact, for large test runs
This commit is contained in:
parent
d41ca7daae
commit
e0d156cdd1
|
@ -244,16 +244,16 @@ module mkTB();
|
||||||
if (req.write)
|
if (req.write)
|
||||||
return $format("Write(%0d)", req.addr);
|
return $format("Write(%0d)", req.addr);
|
||||||
else
|
else
|
||||||
return $format("Read(%0d)", req.addr);
|
return $format("Read(%0d) ", req.addr);
|
||||||
end
|
end
|
||||||
tagged Invalid: return $format("Idle");
|
tagged Invalid: return $format("Idle ");
|
||||||
endcase
|
endcase
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function Fmt ro_str(Maybe#(Addr) v);
|
function Fmt ro_str(Maybe#(Addr) v);
|
||||||
case (v) matches
|
case (v) matches
|
||||||
tagged Valid .addr: return $format("Read(%0d)", addr);
|
tagged Valid .addr: return $format("Read(%0d) ", addr);
|
||||||
tagged Invalid: return $format("Idle");
|
tagged Invalid: return $format("Idle ");
|
||||||
endcase
|
endcase
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -272,9 +272,9 @@ module mkTB();
|
||||||
let want = pack(reverse(test.want));
|
let want = pack(reverse(test.want));
|
||||||
|
|
||||||
$display("\n # %0d: %s", idx+1, tests[idx].name);
|
$display("\n # %0d: %s", idx+1, tests[idx].name);
|
||||||
$display(" input:",
|
$display(" input: ",
|
||||||
"\n 0:", rw_str(test.cpu), "\n 1:", rw_str(test.debugger), "\n 2:", ro_str(test.palette),
|
"0:", rw_str(test.cpu), " 1:", rw_str(test.debugger), " 2:", ro_str(test.palette),
|
||||||
"\n 3:", ro_str(test.tile1), "\n 4:", ro_str(test.tile2), "\n 5:", ro_str(test.sprite));
|
" 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(" got : %03b %03b", got[5:3], got[2:0]);
|
||||||
$display(" want: %03b %03b", want[5:3], want[2:0]);
|
$display(" want: %03b %03b", want[5:3], want[2:0]);
|
||||||
dynamicAssert(got == want, "wrong arbiter output");
|
dynamicAssert(got == want, "wrong arbiter output");
|
||||||
|
|
Loading…
Reference in New Issue