Make swmod respect cpuif byte strobes. #137

This commit is contained in:
Alex Mykyta
2025-04-10 21:26:08 -07:00
parent bb2fead71a
commit 4aed443c55
3 changed files with 136 additions and 115 deletions

View File

@@ -88,6 +88,27 @@
disable fork;
assert(fired);
// Verify that swmod does NOT trigger if strobes not set
fired = 0;
fork
begin
##0;
forever begin
assert(cb.hwif_out.r2.f.value == 21);
if(cb.hwif_out.r2.f.swmod) break;
@cb;
end
fired = 1;
end
begin
cpuif.write('h1, 22, 0);
repeat(4) @cb;
end
join_any
disable fork;
assert(!fired);
// Verify that hwif changes 1 cycle after swmod
fired = 0;
fork