mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Fix vlSelf error on fork repeats (#5927).
This commit is contained in:
+2
-1
@@ -610,9 +610,10 @@ void EmitCFunc::emitSetVarConstant(const string& assignString, AstConst* constp)
|
||||
void EmitCFunc::emitVarReset(AstVar* varp, bool constructing) {
|
||||
// 'constructing' indicates that the object was just constructed, so no need to clear it also
|
||||
AstNodeDType* const dtypep = varp->dtypep()->skipRefp();
|
||||
const string vlSelf = VSelfPointerText::replaceThis(m_useSelfForThis, "this->");
|
||||
const string varNameProtected = (VN_IS(m_modp, Class) || varp->isFuncLocal())
|
||||
? varp->nameProtect()
|
||||
: "vlSelf->" + varp->nameProtect();
|
||||
: vlSelf + varp->nameProtect();
|
||||
if (varp->isIO() && m_modp->isTop() && optSystemC()) {
|
||||
// System C top I/O doesn't need loading, as the lower level subinst code does it.}
|
||||
} else if (varp->isParam()) {
|
||||
|
||||
Reference in New Issue
Block a user