mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 06:43:14 +02:00
Fix 'case (_) inside' with x wildcards (#7766)
Found by inspection, case inside used to threat 'x' as a value, not as a wildcard. Per the standard it should behave as '==?' which treats both 'x' and 'z' as wildcards.
This commit is contained in:
+2
-2
@@ -576,8 +576,8 @@ class CaseVisitor final : public VNVisitor {
|
||||
|
||||
bool neverItem(const AstCase* casep, const AstConst* itemp) {
|
||||
// Xs in case or casez are impossible due to two state simulations
|
||||
if (casep->casex()) {
|
||||
} else if (casep->casez() || casep->caseInside()) {
|
||||
if (casep->casex() || casep->caseInside()) {
|
||||
} else if (casep->casez()) {
|
||||
if (itemp->num().isAnyX()) return true;
|
||||
} else {
|
||||
if (itemp->num().isFourState()) return true;
|
||||
|
||||
Reference in New Issue
Block a user