wishbone2lasmi: fix wordbits computation

This commit is contained in:
Florent Kermarrec 2014-04-30 18:03:56 +02:00 committed by Sebastien Bourdeauducq
parent 65e8b2742a
commit 9c1d95f6a4
1 changed files with 1 additions and 1 deletions

View File

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