Fix constant propagation across DPI imports of inout strings.

This commit is contained in:
Wilson Snyder
2017-12-07 20:10:27 -05:00
parent 662ebece71
commit b11fa372b1
3 changed files with 9 additions and 1 deletions
+6
View File
@@ -386,6 +386,9 @@ private:
pinp->v3error("Function/task output connected to constant instead of variable: "+portp->prettyName());
}
else if (portp->isInout()) {
// Correct lvalue; see comments below
V3LinkLValue::linkLValueSet(pinp);
if (AstVarRef* varrefp = pinp->castVarRef()) {
// Connect to this exact variable
AstVarScope* localVscp = varrefp->varScopep(); if (!localVscp) varrefp->v3fatalSrc("Null var scope");
@@ -489,6 +492,9 @@ private:
pinp->v3error("Function/task output connected to constant instead of variable: "+portp->prettyName());
}
else if (portp->isInout()) {
// Correct lvalue; see comments below
V3LinkLValue::linkLValueSet(pinp);
if (pinp->castVarRef()) {
// Connect to this exact variable
} else {