projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
427c2d4
)
back.rtlil: fix off-by-one in Part legalization.
author
whitequark
<cz@m-labs.hk>
Thu, 28 Mar 2019 05:12:02 +0000
(
05:12
+0000)
committer
whitequark
<cz@m-labs.hk>
Thu, 28 Mar 2019 05:12:12 +0000
(
05:12
+0000)
Fixes #52.
nmigen/back/rtlil.py
patch
|
blob
|
history
diff --git
a/nmigen/back/rtlil.py
b/nmigen/back/rtlil.py
index 6fcd50bf603e36e7fc201cbb24aefa1f5d68af4c..b338491c6d9cbb0c1d8217b83055564fb0c60f9e 100644
(file)
--- a/
nmigen/back/rtlil.py
+++ b/
nmigen/back/rtlil.py
@@
-571,7
+571,7
@@
class _LHSValueCompiler(_ValueCompiler):
if isinstance(offset, ast.Const):
return self(ast.Slice(value.value, offset.value, offset.value + value.width))
else:
- raise LegalizeValue(value.offset, range((1 << len(value.offset))
- 1
))
+ raise LegalizeValue(value.offset, range((1 << len(value.offset))))
def on_Repl(self, value):
raise TypeError # :nocov: