hdl.ast: implement shape for modulo operator.
This commit is contained in:
parent
5e2b46f727
commit
38b3c4af31
|
@ -341,6 +341,8 @@ class Operator(Value):
|
||||||
return a_bits + b_bits - 1, True
|
return a_bits + b_bits - 1, True
|
||||||
# one operand signed, the other unsigned (add sign bit)
|
# one operand signed, the other unsigned (add sign bit)
|
||||||
return a_bits + b_bits + 1 - 1, True
|
return a_bits + b_bits + 1 - 1, True
|
||||||
|
if self.op == "%":
|
||||||
|
return a_bits, a_sign
|
||||||
if self.op in ("<", "<=", "==", "!=", ">", ">=", "b"):
|
if self.op in ("<", "<=", "==", "!=", ">", ">=", "b"):
|
||||||
return 1, False
|
return 1, False
|
||||||
if self.op in ("&", "^", "|"):
|
if self.op in ("&", "^", "|"):
|
||||||
|
|
Loading…
Reference in a new issue