From 27d87c9412c37048f53b2a2a2c7ad89843fb99f5 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 23 Nov 2012 23:08:12 +0100 Subject: [PATCH] fhdl/structure: disable we_granularity when larger than width --- migen/fhdl/structure.py | 2 ++ 1 file changed, 2 insertions(+) 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: -- 2.30.2