mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
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:
committed by
Wilson Snyder
parent
502bd6cbd6
commit
d6ac351dcb
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user