modport expr review changes
This commit is contained in:
parent
73c1a5dd54
commit
a68d92e4e1
|
|
@ -1203,7 +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 op1 := exprp : Optional[AstNodeExpr]
|
||||
//
|
||||
// @astgen ptr := m_varp : Optional[AstVar] // Link to the actual Var
|
||||
string m_name; // Name of the variable referenced
|
||||
|
|
@ -1213,11 +1213,12 @@ public:
|
|||
: ASTGEN_SUPER_ModportVarRef(fl)
|
||||
, m_name{name}
|
||||
, m_direction{direction} {}
|
||||
AstModportVarRef(FileLine* fl, const string& name, AstNodeExpr* exp, VDirection::en direction)
|
||||
AstModportVarRef(FileLine* fl, const string& name, AstNodeExpr* exprp,
|
||||
VDirection::en direction)
|
||||
: ASTGEN_SUPER_ModportVarRef(fl)
|
||||
, m_name{name}
|
||||
, m_direction{direction} {
|
||||
this->m_exp(exp);
|
||||
this->exprp(exprp);
|
||||
};
|
||||
ASTGEN_MEMBERS_AstModportVarRef;
|
||||
void dump(std::ostream& str) const override;
|
||||
|
|
|
|||
|
|
@ -2530,7 +2530,7 @@ class LinkDotIfaceVisitor final : public VNVisitor {
|
|||
UINFO(5, " fiv: " << nodep);
|
||||
iterateChildren(nodep);
|
||||
VSymEnt* symp = nullptr;
|
||||
if (nodep->m_exp()) {
|
||||
if (nodep->exprp()) {
|
||||
nodep->v3warn(E_UNSUPPORTED,
|
||||
"Unsupported: Modport expressions (IEEE 1800-2023 25.5.4)");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1710,13 +1710,9 @@ modportSimplePortOrTFPort<nodep>:// IEEE: modport_simple_port or modport_tf_port
|
|||
static_cast<AstNode*>(
|
||||
new AstModportVarRef{
|
||||
$<fl>1, *$1, GRAMMARP->m_varIO} ); }
|
||||
| '.' idAny '(' ')' { $$ = static_cast<AstNode*>(
|
||||
new AstModportVarRef{
|
||||
$<fl>2, *$2, GRAMMARP->m_varIO} );
|
||||
| '.' idAny '(' ')' { $$ = new AstModportVarRef{$<fl>2, *$2, GRAMMARP->m_varIO};
|
||||
BBUNSUP($<fl>4, "Unsupported: Modport empty expression"); }
|
||||
| '.' idAny '(' expr ')' { $$ = static_cast<AstNode*>(
|
||||
new AstModportVarRef{
|
||||
$<fl>2, *$2, $4, GRAMMARP->m_varIO} ); }
|
||||
| '.' idAny '(' expr ')' { $$ = new AstModportVarRef{$<fl>2, *$2, $4, GRAMMARP->m_varIO}; }
|
||||
;
|
||||
|
||||
//************************************************
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
{"type":"VAR","name":"value","addr":"(X)","loc":"d,8:12,8:17","dtypep":"(W)","origName":"value","isSc":false,"isPrimaryIO":false,"isPrimaryClock":false,"direction":"NONE","isConst":false,"isPullup":false,"isPulldown":false,"isSigPublic":false,"isLatched":false,"isUsedLoopIdx":false,"noReset":false,"attrIsolateAssign":false,"attrFileDescr":false,"isDpiOpenArray":false,"isFuncReturn":false,"isFuncLocal":false,"isStdRandomizeArg":false,"lifetime":"VSTATICI","varType":"VAR","dtypeName":"integer","isSigUserRdPublic":false,"isSigUserRWPublic":false,"isGParam":false,"isParam":false,"attrScBv":false,"attrSFormat":false,"ignorePostWrite":false,"ignoreSchedWrite":false,"sensIfacep":"UNLINKED","childDTypep": [],"delayp": [],"valuep": [],"attrsp": []},
|
||||
{"type":"MODPORT","name":"out_modport","addr":"(MB)","loc":"d,9:12,9:23",
|
||||
"varsp": [
|
||||
{"type":"MODPORTVARREF","name":"value","addr":"(NB)","loc":"d,9:32,9:37","direction":"OUTPUT","varp":"(X)"}
|
||||
{"type":"MODPORTVARREF","name":"value","addr":"(NB)","loc":"d,9:32,9:37","direction":"OUTPUT","varp":"(X)","exprp": []}
|
||||
]}
|
||||
]}
|
||||
],"filesp": [],
|
||||
|
|
|
|||
Loading…
Reference in New Issue