From 6b64afcf76231560f75db556726dced060feda5d Mon Sep 17 00:00:00 2001 From: Thomas Aldrian Date: Fri, 19 Dec 2025 00:21:40 +0000 Subject: [PATCH] AstModportVarRef expression --- src/V3AstNodeOther.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/V3AstNodeOther.h b/src/V3AstNodeOther.h index 96ae9ee88..fcfb84837 100644 --- a/src/V3AstNodeOther.h +++ b/src/V3AstNodeOther.h @@ -1203,6 +1203,7 @@ class AstModportVarRef final : public AstNode { // A input/output/etc variable referenced under a modport // The storage for the variable itself is inside the interface, thus this is a reference // PARENT: AstModport + // @astgen op1 := m_exp : Optional[AstNodeExpr] // // @astgen ptr := m_varp : Optional[AstVar] // Link to the actual Var string m_name; // Name of the variable referenced @@ -1212,6 +1213,12 @@ public: : ASTGEN_SUPER_ModportVarRef(fl) , m_name{name} , m_direction{direction} {} + AstModportVarRef(FileLine* fl, const string& name, AstNodeExpr* exp, VDirection::en direction) + : ASTGEN_SUPER_ModportVarRef(fl) + , m_name{name} + , m_direction{direction} { + this->m_exp(exp); + }; ASTGEN_MEMBERS_AstModportVarRef; void dump(std::ostream& str) const override; void dumpJson(std::ostream& str) const override;