###
- if lasmim.dw <= 32:
- raise ValueError("LASMI data width must be strictly larger than 32")
+ if lasmim.dw < 32:
+ raise ValueError("LASMI data width must be >= 32")
if (lasmim.dw % 32) != 0:
raise ValueError("LASMI data width must be a multiple of 32")
write_from_lasmi = Signal()
write_to_lasmi = Signal()
- adr_offset_r = Signal(offsetbits)
+ if adr_offset is None:
+ adr_offset_r = None
+ else:
+ adr_offset_r = Signal(offsetbits)
+ self.sync += adr_offset_r.eq(adr_offset)
+
self.comb += [
data_port.adr.eq(adr_line),
If(write_from_lasmi,
),
chooser(data_port.dat_r, adr_offset_r, self.wishbone.dat_r, reverse=True)
]
- self.sync += adr_offset_r.eq(adr_offset)
+
# Tag memory
tag_layout = [("tag", tagbits), ("dirty", 1)]