Apply suggestion
Signed-off-by: Kamil Danecki <kdanecki@internships.antmicro.com>
This commit is contained in:
parent
3e596e7f55
commit
fbf110cd06
|
|
@ -298,16 +298,15 @@ class BeginVisitor final : public VNVisitor {
|
|||
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||
}
|
||||
void visit(AstVar* nodep) override {
|
||||
if (nodep->user1SetOnce()) { return; }
|
||||
// If static variable, move it outside a function.
|
||||
if (nodep->lifetime().isStatic() && m_ftaskp) {
|
||||
if (nodep->user1()) { return; }
|
||||
const std::string newName
|
||||
= m_ftaskp->name() + "__Vstatic__" + dot(m_unnamedScope, nodep->name());
|
||||
if (nodep->isIO()) {
|
||||
// Create a port that is used for passing value between argument and static
|
||||
// variable
|
||||
AstVar* const portp = nodep->cloneTreePure(false);
|
||||
portp->user1(true);
|
||||
nodep->replaceWith(portp);
|
||||
|
||||
if (nodep->isInput() || nodep->isInout()) {
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ class DynScopeVisitor final : public VNVisitor {
|
|||
nodep->v3error("Writing to an " << nodep->varp()->verilogKwd()
|
||||
<< " automatic variable of a "
|
||||
<< (m_inFunc ? "function" : "task")
|
||||
<< " after a timing control is not allowed");
|
||||
<< " after a timing control is not allowed (IEEE 1800-2023 13.2.2)");
|
||||
}
|
||||
if (!framep->instance().initialized()) framep->createInstancePrototype();
|
||||
framep->captureVarInsert(nodep->varp());
|
||||
|
|
|
|||
Loading…
Reference in New Issue