projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2946581
)
change >512 B CSR memory exception to a warning
author
Ilia Sergachev
<ilia.sergachev@pm.me>
Fri, 15 Nov 2019 14:34:12 +0000
(15:34 +0100)
committer
Ilia Sergachev
<ilia.sergachev@pm.me>
Fri, 15 Nov 2019 14:34:12 +0000
(15:34 +0100)
litex/soc/interconnect/csr_bus.py
patch
|
blob
|
history
diff --git
a/litex/soc/interconnect/csr_bus.py
b/litex/soc/interconnect/csr_bus.py
index 5c60aa0a205b425a25a83df219a90a6a288a2691..1b7ccaf71a718b25a90041f6771a6c9aa693f09e 100644
(file)
--- a/
litex/soc/interconnect/csr_bus.py
+++ b/
litex/soc/interconnect/csr_bus.py
@@
-86,7
+86,7
@@
class SRAM(Module):
mem = Memory(data_width, mem_or_size//(data_width//8), init=init)
mem_size = int(mem.width*mem.depth/8)
if mem_size > 512:
-
raise ValueError("Memory too large to fit in CSR region ({} > 512 bytes)
".format(mem_size))
+
print("WARNING: memory > 512 bytes in CSR region requires paged access
".format(mem_size))
csrw_per_memw = (mem.width + data_width - 1)//data_width
word_bits = log2_int(csrw_per_memw)
page_bits = log2_int((mem.depth*csrw_per_memw + 511)//512, False)