@@ -348,23 +348,14 @@ signal_list_t* netlist_expand_ast_of_module(ast_node_t** node_ref, char* instanc
348348 oassert (false );
349349 break ;
350350 case MODULE:
351- oassert (child_skip_list);
352- /* set the skip list */
353- child_skip_list[0 ] = true ; /* skip the identifier */
354- child_skip_list[1 ] = true ; /* skip portlist ... we'll use where they're defined */
355- break ;
356351 case FUNCTION:
357- oassert (child_skip_list);
358- /* set the skip list */
359- child_skip_list[0 ] = true ; /* skip the identifier */
360- child_skip_list[1 ] = true ; /* skip portlist ... we'll use where they're defined */
361- break ;
362-
363352 case TASK:
364- oassert (child_skip_list);
365353 /* set the skip list */
366- child_skip_list[0 ] = true ; /* skip the identifier */
367- child_skip_list[1 ] = true ; /* skip portlist ... we'll use where they're defined */
354+ if (node->num_children >= 2 ) {
355+ oassert (child_skip_list);
356+ child_skip_list[0 ] = true ; /* skip the identifier */
357+ child_skip_list[1 ] = true ; /* skip portlist ... we'll use where they're defined */
358+ }
368359 break ;
369360
370361 case MODULE_ITEMS:
@@ -515,10 +506,12 @@ signal_list_t* netlist_expand_ast_of_module(ast_node_t** node_ref, char* instanc
515506 break ;
516507 }
517508 case ALWAYS:
518- oassert (child_skip_list);
519- /* evaluate if this is a sensitivity list with posedges/negedges (=SEQUENTIAL) or none (=COMBINATIONAL) */
520- local_clock_list = evaluate_sensitivity_list (node->children [0 ], instance_name_prefix, local_ref);
521- child_skip_list[0 ] = true ;
509+ if (node->num_children >= 1 ) {
510+ oassert (child_skip_list);
511+ child_skip_list[0 ] = true ;
512+ /* evaluate if this is a sensitivity list with posedges/negedges (=SEQUENTIAL) or none (=COMBINATIONAL) */
513+ local_clock_list = evaluate_sensitivity_list (node->children [0 ], instance_name_prefix, local_ref);
514+ }
522515 break ;
523516 case CASE:
524517 return_sig_list = create_case (node, instance_name_prefix, local_ref);
@@ -541,10 +534,12 @@ signal_list_t* netlist_expand_ast_of_module(ast_node_t** node_ref, char* instanc
541534 skip_children = true ;
542535 break ;
543536 case HARD_BLOCK:
544- oassert (child_skip_list);
545537 /* set the skip list */
546- child_skip_list[0 ] = true ; /* skip the identifier */
547- child_skip_list[1 ] = true ; /* skip portlist ... we'll use where they're defined */
538+ if (node->num_children >= 2 ) {
539+ oassert (child_skip_list);
540+ child_skip_list[0 ] = true ; /* skip the identifier */
541+ child_skip_list[1 ] = true ; /* skip portlist ... we'll use where they're defined */
542+ }
548543 return_sig_list = create_hard_block (node, instance_name_prefix, local_ref);
549544 break ;
550545 default :
@@ -2884,12 +2879,6 @@ signal_list_t* assignment_alias(ast_node_t* assignment, char* instance_name_pref
28842879 int i;
28852880 for (i = 0 ; i < output_size; i++) {
28862881 add_pin_to_signal_list (return_list, in_1->pins [i]);
2887-
2888- /* free unused nnodes for related BLOCKING_STATEMENT nodes */
2889- nnode_t * temp_node = in_1->pins [i]->node ;
2890- if (temp_node->related_ast_node ->type == BLOCKING_STATEMENT && temp_node->type != MEMORY) {
2891- in_1->pins [i]->node = free_nnode (temp_node);
2892- }
28932882 }
28942883 free_signal_list (in_1);
28952884 } else {
@@ -2905,15 +2894,6 @@ signal_list_t* assignment_alias(ast_node_t* assignment, char* instance_name_pref
29052894 // add_pin_to_signal_list(return_list, return_list->pins[i-1]);
29062895 // }
29072896 // }
2908-
2909- /* free unused nnodes for related BLOCKING_STATEMENT nodes */
2910- int i;
2911- for (i = 0 ; i < output_size; i++) {
2912- nnode_t * temp_node = in_1->pins [i]->node ;
2913- if (temp_node->related_ast_node ->type == BLOCKING_STATEMENT && temp_node->type != MEMORY) {
2914- in_1->pins [i]->node = free_nnode (temp_node);
2915- }
2916- }
29172897 }
29182898
29192899 vtr::free (out_list->strings );
@@ -2933,14 +2913,7 @@ signal_list_t* assignment_alias(ast_node_t* assignment, char* instance_name_pref
29332913 if (!left_memory) {
29342914 int output_size = alias_output_assign_pins_to_inputs (out_list, right_outputs, assignment);
29352915 for (i = 0 ; i < output_size; i++) {
2936- npin_t * pin = right_outputs->pins [i];
2937- add_pin_to_signal_list (return_list, pin);
2938-
2939- /* free unused nnodes for related BLOCKING_STATEMENT nodes */
2940- nnode_t * temp_node = right_outputs->pins [i]->node ;
2941- if (temp_node->related_ast_node ->type == BLOCKING_STATEMENT && temp_node->type != MEMORY) {
2942- right_outputs->pins [i]->node = free_nnode (temp_node);
2943- }
2916+ add_pin_to_signal_list (return_list, right_outputs->pins [i]);
29442917 }
29452918 free_signal_list (right_outputs);
29462919 vtr::free (out_list->strings );
@@ -3279,8 +3252,6 @@ int alias_output_assign_pins_to_inputs(char_list_t* output_list, signal_list_t*
32793252
32803253 input_list->pins [i]->name = output_list->strings [i];
32813254 free_nnode (input_list->pins [i]->node );
3282- input_list->pins [i]->node = allocate_nnode ();
3283- input_list->pins [i]->node ->related_ast_node = node;
32843255 }
32853256
32863257 if (global_args.all_warnings && output_list->num_strings < input_list->count )
0 commit comments