AstModportVarRef expression

This commit is contained in:
Thomas Aldrian 2025-12-19 00:21:40 +00:00
parent bde51665c6
commit 6b64afcf76
No known key found for this signature in database
GPG Key ID: 6E25AF572B56794B
1 changed files with 7 additions and 0 deletions

View File

@ -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;