From: Sebastien Bourdeauducq Date: Fri, 23 Nov 2012 22:08:12 +0000 (+0100) Subject: fhdl/structure: disable we_granularity when larger than width X-Git-Tag: 24jan2021_ls180~2099^2~755 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=27d87c9412c37048f53b2a2a2c7ad89843fb99f5;p=litex.git fhdl/structure: disable we_granularity when larger than width --- diff --git a/migen/fhdl/structure.py b/migen/fhdl/structure.py index 04bcdae7..791d47f5 100644 --- a/migen/fhdl/structure.py +++ b/migen/fhdl/structure.py @@ -335,6 +335,8 @@ class Memory(HUID): def get_port(self, write_capable=False, async_read=False, has_re=False, we_granularity=0, mode=WRITE_FIRST, clock_domain="sys"): + if we_granularity >= self.width: + we_granularity = 0 adr = Signal(BV(bits_for(self.depth-1))) dat_r = Signal(BV(self.width)) if write_capable: