Skip to content

Commit

Permalink
fix: case uniqueness checking
Browse files Browse the repository at this point in the history
fixes verilator#5319
incorporate feedback from verilator#5324
  • Loading branch information
VarunKoyyalagunta committed Aug 6, 2024
1 parent 1f144fb commit a34bfa3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/V3Assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,12 @@ class AssertVisitor final : public VNVisitor {
// else $error("multiple match");
// end
AstNodeExpr* const ohot = new AstOneHot{nodep->fileline(), propp};
AstConst* const zero = new AstConst{nodep->fileline(), AstConst::WidthedValue{}, propp->width(), 0};
AstIf* const ohotIfp
= new AstIf{nodep->fileline(), new AstLogNot{nodep->fileline(), ohot}};
AstIf* const zeroIfp
= new AstIf{nodep->fileline(),
new AstLogNot{nodep->fileline(), propp->cloneTreePure(false)}};
new AstEq{nodep->fileline(), propp->cloneTreePure(false), zero}};
AstNodeExpr* const exprp = nodep->exprp();
const string pragmaStr = nodep->pragmaString();
if (!allow_none)
Expand Down

0 comments on commit a34bfa3

Please sign in to comment.