Non functioning split static parameter into port and static var
Signed-off-by: Kamil Danecki <kdanecki@internships.antmicro.com>
This commit is contained in:
parent
add4ec6e80
commit
22cad93083
|
|
@ -300,10 +300,14 @@ class BeginVisitor final : public VNVisitor {
|
||||||
void visit(AstVar* nodep) override {
|
void visit(AstVar* nodep) override {
|
||||||
// If static variable, move it outside a function.
|
// If static variable, move it outside a function.
|
||||||
if (nodep->lifetime().isStatic() && m_ftaskp) {
|
if (nodep->lifetime().isStatic() && m_ftaskp) {
|
||||||
|
UINFO(0, "TASK IS STATIC " << m_ftaskp->lifetime().isStatic());
|
||||||
const std::string newName
|
const std::string newName
|
||||||
= m_ftaskp->name() + "__Vstatic__" + dot(m_unnamedScope, nodep->name());
|
= m_ftaskp->name() + "__Vstatic__" + dot(m_unnamedScope, nodep->name());
|
||||||
|
AstVar* newVarp = nodep->cloneTreePure(false);
|
||||||
|
nodep->replaceWith(newVarp);
|
||||||
|
// AstNode::addNext(nodep, newVarp);
|
||||||
nodep->name(newName);
|
nodep->name(newName);
|
||||||
nodep->unlinkFrBack();
|
// nodep->unlinkFrBack();
|
||||||
m_ftaskp->addHereThisAsNext(nodep);
|
m_ftaskp->addHereThisAsNext(nodep);
|
||||||
nodep->funcLocal(false);
|
nodep->funcLocal(false);
|
||||||
} else if (m_unnamedScope != "") {
|
} else if (m_unnamedScope != "") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue