diff --git a/include/verilated_vpi.cpp b/include/verilated_vpi.cpp index 1262a9df0..2e021f2c5 100644 --- a/include/verilated_vpi.cpp +++ b/include/verilated_vpi.cpp @@ -175,7 +175,7 @@ public: VerilatedVpioVarBase(const VerilatedVar* varp, const VerilatedScope* scopep) : m_varp{varp} , m_scopep{scopep} - , m_fullname{std::string{m_scopep->name()} + '.' + name()} {} + , m_fullname{std::string{m_scopep->name()} + '.' + m_varp->name()} {} explicit VerilatedVpioVarBase(const VerilatedVpioVarBase* varp) { if (varp) { m_varp = varp->m_varp;