forked from github/verilator
Fix error on "unique case" with no cases.
This commit is contained in:
parent
0d645757e7
commit
7c443ab108
2
Changes
2
Changes
@ -20,6 +20,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||
|
||||
**** Fix false unused warning on interfaces, bug1241. [Laurens van Dam]
|
||||
|
||||
**** Fix error on "unique case" with no cases.
|
||||
|
||||
|
||||
* Verilator 3.914 2017-10-14
|
||||
|
||||
|
@ -202,6 +202,9 @@ private:
|
||||
AstNode *newifp = nodep->cloneTree(false);
|
||||
bool allow_none = nodep->unique0Pragma();
|
||||
|
||||
// Empty case means no property
|
||||
if (!propp) propp = new AstConst(nodep->fileline(), AstConst::LogicFalse());
|
||||
|
||||
// Note: if this ends with an 'else', then we don't need to validate that one of the
|
||||
// predicates evaluates to true.
|
||||
AstNode* ohot = ((allow_none || hasDefaultElse)
|
||||
@ -259,6 +262,9 @@ private:
|
||||
else propp = onep;
|
||||
}
|
||||
}
|
||||
// Empty case means no property
|
||||
if (!propp) propp = new AstConst(nodep->fileline(), AstConst::LogicFalse());
|
||||
|
||||
bool allow_none = has_default || nodep->unique0Pragma();
|
||||
AstNode* ohot = (allow_none
|
||||
? static_cast<AstNode*>(new AstOneHot0(nodep->fileline(), propp))
|
||||
|
@ -20,6 +20,9 @@ module t;
|
||||
2'b01 : ;
|
||||
2'b1? : ;
|
||||
endcase
|
||||
unique casez (1'b1)
|
||||
default: ;
|
||||
endcase
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user