@@ -348,23 +348,14 @@ signal_list_t* netlist_expand_ast_of_module(ast_node_t** node_ref, char* instanc
348
348
oassert (false );
349
349
break ;
350
350
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 ;
356
351
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
-
363
352
case TASK:
364
- oassert (child_skip_list);
365
353
/* 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
+ }
368
359
break ;
369
360
370
361
case MODULE_ITEMS:
@@ -515,10 +506,12 @@ signal_list_t* netlist_expand_ast_of_module(ast_node_t** node_ref, char* instanc
515
506
break ;
516
507
}
517
508
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
+ }
522
515
break ;
523
516
case CASE:
524
517
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
541
534
skip_children = true ;
542
535
break ;
543
536
case HARD_BLOCK:
544
- oassert (child_skip_list);
545
537
/* 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
+ }
548
543
return_sig_list = create_hard_block (node, instance_name_prefix, local_ref);
549
544
break ;
550
545
default :
@@ -2884,12 +2879,6 @@ signal_list_t* assignment_alias(ast_node_t* assignment, char* instance_name_pref
2884
2879
int i;
2885
2880
for (i = 0 ; i < output_size; i++) {
2886
2881
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
- }
2893
2882
}
2894
2883
free_signal_list (in_1);
2895
2884
} else {
@@ -2905,15 +2894,6 @@ signal_list_t* assignment_alias(ast_node_t* assignment, char* instance_name_pref
2905
2894
// add_pin_to_signal_list(return_list, return_list->pins[i-1]);
2906
2895
// }
2907
2896
// }
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
- }
2917
2897
}
2918
2898
2919
2899
vtr::free (out_list->strings );
@@ -2933,14 +2913,7 @@ signal_list_t* assignment_alias(ast_node_t* assignment, char* instance_name_pref
2933
2913
if (!left_memory) {
2934
2914
int output_size = alias_output_assign_pins_to_inputs (out_list, right_outputs, assignment);
2935
2915
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]);
2944
2917
}
2945
2918
free_signal_list (right_outputs);
2946
2919
vtr::free (out_list->strings );
@@ -3279,8 +3252,6 @@ int alias_output_assign_pins_to_inputs(char_list_t* output_list, signal_list_t*
3279
3252
3280
3253
input_list->pins [i]->name = output_list->strings [i];
3281
3254
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;
3284
3255
}
3285
3256
3286
3257
if (global_args.all_warnings && output_list->num_strings < input_list->count )
0 commit comments