forked from github/verilator
Fix skipping public enum values with four-state values (#3303).
This commit is contained in:
parent
3b7ad1820d
commit
7a355d448a
1
Changes
1
Changes
@ -15,6 +15,7 @@ Verilator 4.219 devel
|
||||
|
||||
* Removed the deprecated lint_off flag -msg; use -rule instead.
|
||||
* Removed the deprecated "fl" attribute in XML output; use "loc" attribute instead.
|
||||
* Fix skipping public enum values with four-state values (#3303).
|
||||
|
||||
|
||||
Verilator 4.218 2022-01-17
|
||||
|
@ -192,6 +192,12 @@ class EmitCHeader final : public EmitCConstInit {
|
||||
puts("enum " + tdefp->name() + " {\n");
|
||||
for (const AstEnumItem* itemp = edtypep->itemsp(); itemp;
|
||||
itemp = VN_AS(itemp->nextp(), EnumItem)) {
|
||||
if (const AstConst* const constp = VN_CAST(itemp->valuep(), Const)) {
|
||||
if (constp->num().isFourState()) {
|
||||
puts("// " + itemp->nameProtect() + " is four-state\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
puts(itemp->nameProtect());
|
||||
puts(" = ");
|
||||
iterate(itemp->valuep());
|
||||
|
@ -8,6 +8,9 @@ package p3;
|
||||
typedef enum logic [2:0] {
|
||||
ZERO = 3'b0,
|
||||
ONE = 3'b1 } e3_t /*verilator public*/;
|
||||
typedef enum logic [2:0] {
|
||||
TWO = 3'd2,
|
||||
XES = 3'b?1? } has_x_t /*verilator public*/;
|
||||
endpackage
|
||||
|
||||
package p62;
|
||||
|
Loading…
Reference in New Issue
Block a user