Support queue slicing (#2326).

This commit is contained in:
Wilson Snyder
2020-10-18 13:23:39 -04:00
parent ec36d0d772
commit 5d3dd52f13
10 changed files with 189 additions and 34 deletions
+9
View File
@@ -439,6 +439,15 @@ private:
// if (debug() >= 9) newp->dumpTree(cout, "--SELEXnew: ");
nodep->replaceWith(newp);
VL_DO_DANGLING(pushDeletep(nodep), nodep);
} else if (VN_IS(ddtypep, QueueDType)) {
auto* newp = new AstCMethodHard(nodep->fileline(), fromp, "slice", msbp);
msbp->addNext(lsbp);
newp->dtypep(ddtypep);
newp->didWidth(true);
newp->protect(false);
UINFO(6, " new " << newp << endl);
nodep->replaceWith(newp);
VL_DO_DANGLING(pushDeletep(nodep), nodep);
} else { // nullptr=bad extract, or unknown node type
nodep->v3error("Illegal range select; type already selected, or bad dimension: "
<< "data type is " << fromdata.m_errp->prettyDTypeNameQ());