Skip to content

Commit 4563e93

Browse files
committed
Add support for variables defined inside named blocks
Signed-off-by: Kamil Rakoczy <[email protected]>
1 parent 9ee3057 commit 4563e93

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

uhdm-plugin/UhdmAst.cc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,11 +2049,13 @@ void UhdmAst::process_begin()
20492049
});
20502050
// TODO: find out how to set VERILOG_FRONTEND::sv_mode to true
20512051
// simplify checks if sv_mode is set to ture when wire is declared inside unnamed block
2052-
/*visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) {
2053-
if (node) {
2054-
current_node->children.push_back(node);
2055-
}
2056-
});*/
2052+
if (!current_node->str.empty()) {
2053+
visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) {
2054+
if (node) {
2055+
current_node->children.push_back(node);
2056+
}
2057+
});
2058+
}
20572059
}
20582060

20592061
void UhdmAst::process_operation()

0 commit comments

Comments
 (0)