Skip to content

Commit 4c54420

Browse files
authored
Merge pull request #170 from antmicro/named-blocks-variables
Add support for variables defined inside named blocks
2 parents 4520c08 + 4563e93 commit 4c54420

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
@@ -2064,11 +2064,13 @@ void UhdmAst::process_begin()
20642064
});
20652065
// TODO: find out how to set VERILOG_FRONTEND::sv_mode to true
20662066
// simplify checks if sv_mode is set to ture when wire is declared inside unnamed block
2067-
/*visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) {
2068-
if (node) {
2069-
current_node->children.push_back(node);
2070-
}
2071-
});*/
2067+
if (!current_node->str.empty()) {
2068+
visit_one_to_many({vpiVariables}, obj_h, [&](AST::AstNode *node) {
2069+
if (node) {
2070+
current_node->children.push_back(node);
2071+
}
2072+
});
2073+
}
20722074
}
20732075

20742076
void UhdmAst::process_operation()

0 commit comments

Comments
 (0)