wishbone2lasmi: fix wordbits computation
This commit is contained in:
parent
65e8b2742a
commit
9c1d95f6a4
|
@ -23,7 +23,7 @@ class WB2LASMI(Module):
|
||||||
addressbits = lasmim.aw + offsetbits
|
addressbits = lasmim.aw + offsetbits
|
||||||
linebits = log2_int(cachesize) - offsetbits
|
linebits = log2_int(cachesize) - offsetbits
|
||||||
tagbits = addressbits - linebits
|
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)
|
adr_offset, adr_line, adr_tag = split(self.wishbone.adr, offsetbits, linebits, tagbits)
|
||||||
word = Signal(wordbits) if wordbits else None
|
word = Signal(wordbits) if wordbits else None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue