fhdl/structure: disable we_granularity when larger than width

This commit is contained in:
Sebastien Bourdeauducq 2012-11-23 23:08:12 +01:00
parent d2c61e6a90
commit 27d87c9412
1 changed files with 2 additions and 0 deletions

View File

@ -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: