From 9c1d95f6a4bbe6e3d5288f4191d433133c08d7b0 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 30 Apr 2014 18:03:56 +0200 Subject: [PATCH] wishbone2lasmi: fix wordbits computation --- migen/bus/wishbone2lasmi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migen/bus/wishbone2lasmi.py b/migen/bus/wishbone2lasmi.py index cda742e6..bf722c27 100644 --- a/migen/bus/wishbone2lasmi.py +++ b/migen/bus/wishbone2lasmi.py @@ -23,7 +23,7 @@ class WB2LASMI(Module): addressbits = lasmim.aw + offsetbits linebits = log2_int(cachesize) - offsetbits tagbits = addressbits - linebits - wordbits = data_width//lasmim.dw + wordbits = log2_int(max(data_width//lasmim.dw, 1)) adr_offset, adr_line, adr_tag = split(self.wishbone.adr, offsetbits, linebits, tagbits) word = Signal(wordbits) if wordbits else None -- 2.30.2