Add --public-flat-rw switch, bug1511.

This switch exposes VARs, PORTs and WIREs to C++ code. It must be use
with care as it has a significant performance impact and may result in
mis-simulation of generated clocks. Anyhow, it is prefered over
--public and useful for VPI.

Signed-off-by: Lukasz Dalek <[email protected]>
Signed-off-by: Stefan Wallentowitz <[email protected]>
Signed-off-by: Wilson Snyder <[email protected]>
This commit is contained in:
Lukasz Dalek
2019-09-23 07:56:07 -04:00
committed by Wilson Snyder
parent 502bd6cbd6
commit d6ac351dcb
10 changed files with 89 additions and 14 deletions
+12
View File
@@ -189,6 +189,17 @@ private:
return;
}
if (v3Global.opt.publicFlatRW()) {
switch (nodep->varType()) {
case AstVarType::VAR:
case AstVarType::PORT:
case AstVarType::WIRE:
nodep->sigUserRWPublic(true);
break;
default: break;
}
}
// We used modTrace before leveling, and we may now
// want to turn it off now that we know the levelizations
if (v3Global.opt.traceDepth()
@@ -198,6 +209,7 @@ private:
nodep->trace(false);
}
m_varp = nodep;
iterateChildren(nodep);
m_varp = NULL;
// temporaries under an always aren't expected to be blocking