back.rtlil: fix guard for division by zero.
Oops... that should be checking the divisor, not the dividend. This was discovered by running the test suite on cxxsim.
This commit is contained in:
parent
d714d78de1
commit
d06add0aab
|
@ -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(lhs == 0),
|
||||
"\\S": self(rhs == 0),
|
||||
"\\Y": res,
|
||||
}, params={
|
||||
"WIDTH": res_bits
|
||||
|
|
Loading…
Reference in a new issue