class DTLBUpdate(Elaboratable):
def __init__(self):
+ self.dtlb = TLBArray()
self.tlbie = Signal()
self.tlbwe = Signal()
self.doall = Signal()
comb += tlbie.eq(r0_valid & r0.tlbie)
comb += tlbwe.eq(r0_valid & r0.tlbld)
- m.submodules.tlb_update = d = DTLBUpdate()
+ d = self.dtlb_update
+
with m.If(tlbie & r0.doall):
# clear all valid bits at once
for i in range(TLB_SET_SIZE):
"""note: these are passed to nmigen.hdl.Memory as "attributes".
don't know how, just that they are.
"""
- dtlb = TLBArray()
# TODO attribute ram_style of
# dtlb_tags : signal is "distributed";
# TODO attribute ram_style of
comb += self.bus.dat_w.eq(r1.wb.dat)
comb += self.bus.cyc.eq(r1.wb.cyc)
+ # create submodule TLBUpdate
+ m.submodules.dtlb_update = self.dtlb_update = DTLBUpdate()
+ dtlb = self.dtlb_update.dtlb
+
# call sub-functions putting everything together, using shared
# signals established above
self.stage_0(m, r0, r1, r0_full)