forked from github/verilator
Support extraction of enum bits, bug951.
This commit is contained in:
parent
c87c66efb1
commit
a950e4816d
2
Changes
2
Changes
@ -7,6 +7,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||||||
|
|
||||||
*** Add tracing_on, etc to vlt files, bug932. [Frederic Requin]
|
*** Add tracing_on, etc to vlt files, bug932. [Frederic Requin]
|
||||||
|
|
||||||
|
**** Support extraction of enum bits, bug951. [Jonathon Donaldson]
|
||||||
|
|
||||||
**** Fix MinGW compiler error, bug927, bug929. [Hans Tichelaar]
|
**** Fix MinGW compiler error, bug927, bug929. [Hans Tichelaar]
|
||||||
|
|
||||||
**** Fix .c files to be treated as .cpp, bug930. [Jonathon Donaldson]
|
**** Fix .c files to be treated as .cpp, bug930. [Jonathon Donaldson]
|
||||||
|
@ -239,6 +239,7 @@ public:
|
|||||||
//
|
//
|
||||||
DT_PUBLIC, // V3LinkParse moves to AstTypedef::attrPublic
|
DT_PUBLIC, // V3LinkParse moves to AstTypedef::attrPublic
|
||||||
//
|
//
|
||||||
|
ENUM_BASE, // V3LinkResolve creates for AstPreSel, V3LinkParam removes
|
||||||
ENUM_FIRST, // V3Width processes
|
ENUM_FIRST, // V3Width processes
|
||||||
ENUM_LAST, // V3Width processes
|
ENUM_LAST, // V3Width processes
|
||||||
ENUM_NUM, // V3Width processes
|
ENUM_NUM, // V3Width processes
|
||||||
@ -268,7 +269,7 @@ public:
|
|||||||
"DIM_BITS", "DIM_DIMENSIONS", "DIM_HIGH", "DIM_INCREMENT", "DIM_LEFT",
|
"DIM_BITS", "DIM_DIMENSIONS", "DIM_HIGH", "DIM_INCREMENT", "DIM_LEFT",
|
||||||
"DIM_LOW", "DIM_RIGHT", "DIM_SIZE", "DIM_UNPK_DIMENSIONS",
|
"DIM_LOW", "DIM_RIGHT", "DIM_SIZE", "DIM_UNPK_DIMENSIONS",
|
||||||
"DT_PUBLIC",
|
"DT_PUBLIC",
|
||||||
"ENUM_FIRST", "ENUM_LAST", "ENUM_NUM", "ENUM_NEXT", "ENUM_PREV", "ENUM_NAME",
|
"ENUM_BASE", "ENUM_FIRST", "ENUM_LAST", "ENUM_NUM", "ENUM_NEXT", "ENUM_PREV", "ENUM_NAME",
|
||||||
"MEMBER_BASE",
|
"MEMBER_BASE",
|
||||||
"VAR_BASE", "VAR_CLOCK", "VAR_CLOCK_ENABLE", "VAR_PUBLIC",
|
"VAR_BASE", "VAR_CLOCK", "VAR_CLOCK_ENABLE", "VAR_PUBLIC",
|
||||||
"VAR_PUBLIC_FLAT", "VAR_PUBLIC_FLAT_RD","VAR_PUBLIC_FLAT_RW",
|
"VAR_PUBLIC_FLAT", "VAR_PUBLIC_FLAT_RD","VAR_PUBLIC_FLAT_RW",
|
||||||
|
@ -207,7 +207,11 @@ private:
|
|||||||
} else if (AstMemberSel* fromp = basefromp->castMemberSel()) {
|
} else if (AstMemberSel* fromp = basefromp->castMemberSel()) {
|
||||||
nodep->attrp(new AstAttrOf(nodep->fileline(), AstAttrType::MEMBER_BASE,
|
nodep->attrp(new AstAttrOf(nodep->fileline(), AstAttrType::MEMBER_BASE,
|
||||||
fromp->cloneTree(false)));
|
fromp->cloneTree(false)));
|
||||||
|
} else if (AstEnumItemRef* fromp = basefromp->castEnumItemRef()) {
|
||||||
|
nodep->attrp(new AstAttrOf(nodep->fileline(), AstAttrType::ENUM_BASE,
|
||||||
|
fromp->cloneTree(false)));
|
||||||
} else {
|
} else {
|
||||||
|
if (basefromp) { UINFO(1," Related node: "<<basefromp<<endl); }
|
||||||
nodep->v3fatalSrc("Illegal bit select; no signal/member being extracted from");
|
nodep->v3fatalSrc("Illegal bit select; no signal/member being extracted from");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -834,9 +834,8 @@ private:
|
|||||||
// Don't iterate children, don't want to lose VarRef.
|
// Don't iterate children, don't want to lose VarRef.
|
||||||
switch (nodep->attrType()) {
|
switch (nodep->attrType()) {
|
||||||
case AstAttrType::VAR_BASE:
|
case AstAttrType::VAR_BASE:
|
||||||
// Soon to be handled in V3LinkWidth SEL generation, under attrp() and newSubLsbOf
|
|
||||||
break;
|
|
||||||
case AstAttrType::MEMBER_BASE:
|
case AstAttrType::MEMBER_BASE:
|
||||||
|
case AstAttrType::ENUM_BASE:
|
||||||
// Soon to be handled in V3LinkWidth SEL generation, under attrp() and newSubLsbOf
|
// Soon to be handled in V3LinkWidth SEL generation, under attrp() and newSubLsbOf
|
||||||
break;
|
break;
|
||||||
case AstAttrType::DIM_DIMENSIONS:
|
case AstAttrType::DIM_DIMENSIONS:
|
||||||
|
@ -7,8 +7,6 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
|
|||||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
# Version 2.0.
|
# Version 2.0.
|
||||||
|
|
||||||
$Self->skip("Not supported by commercial simulators");
|
|
||||||
|
|
||||||
compile (
|
compile (
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user