Skip to content

Commit 5c357f9

Browse files
authored
Merge pull request #166 from antmicro/fix-func-param
Parse vpiTaskFunc before vpiParameter
2 parents 445fd82 + 0bf7b85 commit 5c357f9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

uhdm-plugin/UhdmAst.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ static void simplify(AST::AstNode *current_node, AST::AstNode *parent_node)
551551
switch (current_node->type) {
552552
case AST::AST_TYPEDEF:
553553
case AST::AST_ENUM:
554+
case AST::AST_FUNCTION:
554555
AST_INTERNAL::current_scope[current_node->str] = current_node;
555556
break;
556557
case AST::AST_WIRE:
@@ -1155,8 +1156,8 @@ void UhdmAst::process_module()
11551156
move_type_to_new_typedef(current_node, node);
11561157
}
11571158
});
1158-
visit_one_to_many({vpiModule, vpiInterface, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiGenScopeArray, vpiContAssign,
1159-
vpiProcess, vpiTaskFunc},
1159+
visit_one_to_many({vpiModule, vpiInterface, vpiTaskFunc, vpiParameter, vpiParamAssign, vpiPort, vpiNet, vpiArrayNet, vpiGenScopeArray,
1160+
vpiContAssign, vpiProcess},
11601161
obj_h, [&](AST::AstNode *node) {
11611162
if (node) {
11621163
if (node->type == AST::AST_ASSIGN && node->children.size() < 2)

0 commit comments

Comments
 (0)