+"""MMU PortInterface Test
+
+quite basic, goes directly to the MMU to assert signals (does not
+yet use PortInterface)
+"""
+
from nmigen import (C, Module, Signal, Elaboratable, Mux, Cat, Repl, Signal)
from nmigen.cli import main
from nmigen.cli import rtlil
data = self.dcache.d_out.data
return data, ld_ok
+
# DCacheToLoadStore1Type NC
# store_done
# error
yield
addr = (yield dc.wb_out.adr) << 3
if addr not in mem:
- print (" DCACHE LOOKUP FAIL %x" % (addr))
- stop = True
- return
+ print (" WB LOOKUP NO entry @ %x, returning zero" % (addr))
- yield
- data = mem[addr]
+ data = mem.get(addr)
yield dc.wb_in.dat.eq(data)
print (" DCACHE get %x data %x" % (addr, data))
yield dc.wb_in.ack.eq(1)
stop = True
+
def test_mmu():
mmu = MMU()
dcache = DCache()
with sim.write_vcd('test_mmu_pi.vcd'):
sim.run()
+
if __name__ == '__main__':
test_mmu()