# TODO, convert dcache wb_in/wb_out to "standard" nmigen Wishbone bus
self.dbus = Record(make_wb_layout(pspec))
+ # for creating a single clock blip to DCache
+ self.d_valid = Signal()
+ self.d_validblip = Signal()
+
def set_wr_addr(self, m, addr, mask):
#m.d.comb += self.l_in.valid.eq(1)
#m.d.comb += self.l_in.addr.eq(addr)
#m.d.comb += self.l_in.load.eq(0)
- m.d.comb += self.d_in.valid.eq(1)
+ m.d.comb += self.d_valid.eq(1)
+ m.d.comb += self.d_in.valid.eq(self.d_validblip)
m.d.comb += self.d_in.load.eq(0)
m.d.comb += self.d_in.byte_sel.eq(mask)
# set phys addr on both units
#m.d.comb += self.l_in.valid.eq(1)
#m.d.comb += self.l_in.load.eq(1)
#m.d.comb += self.l_in.addr.eq(addr)
- m.d.comb += self.d_in.valid.eq(1)
+ m.d.comb += self.d_valid.eq(1)
+ m.d.comb += self.d_in.valid.eq(self.d_validblip)
m.d.comb += self.d_in.load.eq(1)
m.d.comb += self.d_in.byte_sel.eq(mask)
m.d.comb += self.d_in.addr.eq(addr)
return None #FIXME return value
def set_wr_data(self, m, data, wen):
- m.d.comb += self.d_in.data.eq(data)
+ m.d.sync += self.d_in.data.eq(data) # one cycle **AFTER** valid raised
# TODO set wen
st_ok = Const(1, 1)
return st_ok
if hasattr(dbus, "stall"):
comb += dcache.wb_in.stall.eq(dbus.stall)
+ # create a blip (single pulse) on valid read/write request
+ m.d.comb += self.d_validblip.eq(rising_edge(m, self.d_valid))
+
return m
def ports(self):
suite = unittest.TestSuite()
#suite.addTest(TestRunner(GeneralTestCases.test_data, svp64=svp64,
# microwatt_mmu=True))
- suite.addTest(TestRunner(MMUTestCase().test_data, svp64=svp64,
- microwatt_mmu=True))
+ #suite.addTest(TestRunner(MMUTestCase().test_data, svp64=svp64,
+ # microwatt_mmu=True))
# without ROM set
- suite.addTest(TestRunner(MMUTestCaseROM().test_data, svp64=svp64,
- microwatt_mmu=True))
+ #suite.addTest(TestRunner(MMUTestCaseROM().test_data, svp64=svp64,
+ # microwatt_mmu=True))
# LD/ST tests should all still work
suite.addTest(TestRunner(LDSTTestCase().test_data, svp64=svp64,