From a653a6144b0c4154a3a7064b3a648b0500daa0ca Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 20 Aug 2013 16:53:55 +0200 Subject: [PATCH] wishbone2lasmi : add support for 32 bits lasmim data width --- migen/bus/wishbone2lasmi.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/migen/bus/wishbone2lasmi.py b/migen/bus/wishbone2lasmi.py index 4c7881cd..75fd9fd7 100644 --- a/migen/bus/wishbone2lasmi.py +++ b/migen/bus/wishbone2lasmi.py @@ -11,8 +11,8 @@ class WB2LASMI(Module): ### - 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") @@ -31,7 +31,12 @@ class WB2LASMI(Module): 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, @@ -49,7 +54,7 @@ class WB2LASMI(Module): ), 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)] -- 2.30.2