Revert "Set lifetime to static"
This reverts commit 8dc3b2b1ded9326ea9ed5a7bdf2a40b893a7dcd0.
This commit is contained in:
parent
4bb3c55f06
commit
c37d1fd925
|
|
@ -434,7 +434,6 @@ class DynScopeVisitor final : public VNVisitor {
|
|||
void visit(AstVarRef* nodep) override {
|
||||
ForkDynScopeFrame* const framep = frameOf(nodep->varp());
|
||||
if (!framep) return;
|
||||
// UINFO(0, "IS AUTO " << nodep->varp()->lifetime());
|
||||
if (needsDynScope(nodep)) {
|
||||
bool isEvent = false;
|
||||
if (AstBasicDType* const dtypep = VN_CAST(nodep->dtypep()->skipRefp(), BasicDType)) {
|
||||
|
|
@ -449,14 +448,14 @@ class DynScopeVisitor final : public VNVisitor {
|
|||
"Writing to an "
|
||||
<< nodep->varp()->verilogKwd()
|
||||
<< " variable of a function after a timing control is not allowed");
|
||||
} else if (nodep->varp()->lifetime().isAutomatic()) {
|
||||
// nodep->v3warn(E_UNSUPPORTED, "Unsupported: Writing to a captured "
|
||||
// << nodep->varp()->verilogKwd()
|
||||
// << " variable in a "
|
||||
// << (VN_IS(nodep->backp(), AssignDly)
|
||||
// ? "non-blocking assignment"
|
||||
// : "fork")
|
||||
// << " after a timing control");
|
||||
} else {
|
||||
nodep->v3warn(E_UNSUPPORTED, "Unsupported: Writing to a captured "
|
||||
<< nodep->varp()->verilogKwd()
|
||||
<< " variable in a "
|
||||
<< (VN_IS(nodep->backp(), AssignDly)
|
||||
? "non-blocking assignment"
|
||||
: "fork")
|
||||
<< " after a timing control");
|
||||
}
|
||||
}
|
||||
if (!framep->instance().initialized()) framep->createInstancePrototype();
|
||||
|
|
|
|||
|
|
@ -382,11 +382,7 @@ class LinkParseVisitor final : public VNVisitor {
|
|||
}
|
||||
}
|
||||
} else if (m_ftaskp) {
|
||||
if (m_ftaskp->lifetime().isStatic()) {
|
||||
nodep->lifetime(VLifetime::STATIC_IMPLICIT);
|
||||
} else {
|
||||
if (!nodep->lifetime().isAutomatic()) nodep->lifetime(VLifetime::AUTOMATIC_IMPLICIT);
|
||||
}
|
||||
if (!nodep->lifetime().isAutomatic()) nodep->lifetime(VLifetime::AUTOMATIC_IMPLICIT);
|
||||
} else if (nodep->lifetime().isNone()) {
|
||||
// lifetime shouldn't be unknown, set static if none
|
||||
nodep->lifetime(VLifetime::STATIC_IMPLICIT);
|
||||
|
|
|
|||
Loading…
Reference in New Issue