File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2012,12 +2012,15 @@ void UhdmAst::process_always()
20122012 }
20132013}
20142014
2015- void UhdmAst::process_event_control ()
2015+ void UhdmAst::process_event_control (const UHDM::BaseClass *object )
20162016{
20172017 current_node = make_ast_node (AST::AST_BLOCK);
20182018 visit_one_to_one ({vpiCondition}, obj_h, [&](AST::AstNode *node) {
20192019 if (node) {
20202020 auto process_node = find_ancestor ({AST::AST_ALWAYS});
2021+ if (!process_node) {
2022+ log_error (" %s:%d: Currently supports only event control stmts inside 'always'\n " , object->VpiFile ().c_str (), object->VpiLineNo ());
2023+ }
20212024 process_node->children .push_back (node);
20222025 }
20232026 // is added inside vpiOperation
@@ -3499,7 +3502,7 @@ AST::AstNode *UhdmAst::process_object(vpiHandle obj_handle)
34993502 process_always ();
35003503 break ;
35013504 case vpiEventControl:
3502- process_event_control ();
3505+ process_event_control (object );
35033506 break ;
35043507 case vpiInitial:
35053508 process_initial ();
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ class UhdmAst
9494 void process_modport ();
9595 void process_io_decl ();
9696 void process_always ();
97- void process_event_control ();
97+ void process_event_control (const UHDM::BaseClass *object );
9898 void process_initial ();
9999 void process_begin ();
100100 void process_operation ();
You can’t perform that action at this time.
0 commit comments