Skip to content

Commit 2a931a2

Browse files
Merge pull request #1115 from alainmarcel/alainmarcel-patch-1
modport
2 parents 5ad41c5 + d8a32d5 commit 2a931a2

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

templates/ExprEval.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2530,6 +2530,26 @@ any *ExprEval::hierarchicalSelector(std::vector<std::string> &select_path,
25302530
}
25312531
}
25322532
}
2533+
} else if (port *tport = any_cast<port *>(object)) {
2534+
any* low_conn = tport->Low_conn();
2535+
if (low_conn) {
2536+
if (low_conn->UhdmType() == uhdmref_obj) {
2537+
ref_obj* ref = (ref_obj*) low_conn;
2538+
any* actual = ref->Actual_group();
2539+
if (actual) {
2540+
if (actual->UhdmType() == uhdmmodport) {
2541+
modport* mport = (modport*) actual;
2542+
if (mport->Io_decls()) {
2543+
for (io_decl* decl : *mport->Io_decls()) {
2544+
if (elemName == decl->VpiName()) {
2545+
return decl;
2546+
}
2547+
}
2548+
}
2549+
}
2550+
}
2551+
}
2552+
}
25332553
} else if (constant *cons = any_cast<constant *>(object)) {
25342554
if (ref_typespec *rt = cons->Typespec()) {
25352555
if (const typespec *ts = rt->Actual_typespec()) {

0 commit comments

Comments
 (0)