aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSchuyler Eldridge2021-08-03 12:20:49 -0400
committerGitHub2021-08-03 12:20:49 -0400
commita643cfd338ab6ae7a3b0d9e9f58e6f33c69237ff (patch)
tree04937c54c49e2ce37d280b8b8dc4b1233caa4545 /src
parentc0479d9ace45e7e91bb7de96deb8ab6df98799f7 (diff)
Require Andr, Orr, Xorr, Neg to have one operand (#2312)
Fix an OG bug where Andr, Orr, and Xorr would accept an arbitrary number of operands. Verilog emission doesn't support this and will silently drop all operands after the first. E.g., "andr(a, b)" would emit as "&a". After this commit, "andr(a, b)" will be rejected by checking passes. For archaeological purposes, this appears to have been the behavior dating back to when this was added in d2d3260a. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/firrtl/passes/CheckHighForm.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/scala/firrtl/passes/CheckHighForm.scala b/src/main/scala/firrtl/passes/CheckHighForm.scala
index 05635d00..8a88f827 100644
--- a/src/main/scala/firrtl/passes/CheckHighForm.scala
+++ b/src/main/scala/firrtl/passes/CheckHighForm.scala
@@ -187,7 +187,7 @@ trait CheckHighFormLike { this: Pass =>
case AsInterval =>
correctNum(Option(1), 3)
case Andr | Orr | Xorr | Neg =>
- correctNum(None, 0)
+ correctNum(Option(1), 0)
}
}