projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65e8b27
)
wishbone2lasmi: fix wordbits computation
author
Florent Kermarrec
<florent@enjoy-digital.fr>
Wed, 30 Apr 2014 16:03:56 +0000
(18:03 +0200)
committer
Sebastien Bourdeauducq
<sb@m-labs.hk>
Thu, 1 May 2014 11:32:18 +0000
(13:32 +0200)
migen/bus/wishbone2lasmi.py
patch
|
blob
|
history
diff --git
a/migen/bus/wishbone2lasmi.py
b/migen/bus/wishbone2lasmi.py
index cda742e6c6f9099dffe359c3b22255aa27a3b5d3..bf722c274dbb015d3bfcaf9ccc2373624398dc09 100644
(file)
--- 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