projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d714d78
)
back.rtlil: fix guard for division by zero.
author
whitequark
<whitequark@whitequark.org>
Wed, 15 Jul 2020 04:09:58 +0000
(
04:09
+0000)
committer
whitequark
<whitequark@whitequark.org>
Wed, 15 Jul 2020 04:14:34 +0000
(
04:14
+0000)
Oops... that should be checking the divisor, not the dividend. This
was discovered by running the test suite on cxxsim.
nmigen/back/rtlil.py
patch
|
blob
|
history
diff --git
a/nmigen/back/rtlil.py
b/nmigen/back/rtlil.py
index 3838101384f3f175db0c696b1860fc8136721863..f7727782968ef8e51e0651c798af03ed94d5f249 100644
(file)
--- a/
nmigen/back/rtlil.py
+++ b/
nmigen/back/rtlil.py
@@
-558,7
+558,7
@@
class _RHSValueCompiler(_ValueCompiler):
self.s.rtlil.cell("$mux", ports={
"\\A": divmod_res,
"\\B": self(ast.Const(0, ast.Shape(res_bits, res_sign))),
- "\\S": self(
l
hs == 0),
+ "\\S": self(
r
hs == 0),
"\\Y": res,
}, params={
"WIDTH": res_bits