@@ -58,8 +58,8 @@ void partial_map_node(nnode_t* node, short traverse_number, netlist_t* netlist);
58
58
void instantiate_not_logic (nnode_t * node, short mark, netlist_t * netlist);
59
59
bool eliminate_buffer (nnode_t * node, short , netlist_t *);
60
60
void instantiate_bitwise_logic (nnode_t * node, operation_list op, short mark, netlist_t * netlist);
61
- void instantiate_bitwise_reduction (nnode_t * node, operation_list op, short mark, netlist_t * netlist );
62
- void instantiate_logical_logic (nnode_t * node, operation_list op, short mark, netlist_t * netlist );
61
+ void instantiate_bitwise_reduction (nnode_t * node, operation_list op, short mark);
62
+ void instantiate_logical_logic (nnode_t * node, operation_list op, short mark);
63
63
void instantiate_EQUAL (nnode_t * node, operation_list type, short mark, netlist_t * netlist);
64
64
void instantiate_GE (nnode_t * node, operation_list type, short mark, netlist_t * netlist);
65
65
void instantiate_GT (nnode_t * node, operation_list type, short mark, netlist_t * netlist);
@@ -155,7 +155,7 @@ void partial_map_node(nnode_t* node, short traverse_number, netlist_t* netlist)
155
155
if (node->num_input_port_sizes >= 2 ) {
156
156
instantiate_bitwise_logic (node, node->type , traverse_number, netlist);
157
157
} else if (node->num_input_port_sizes == 1 ) {
158
- instantiate_bitwise_reduction (node, node->type , traverse_number, netlist );
158
+ instantiate_bitwise_reduction (node, node->type , traverse_number);
159
159
} else
160
160
oassert (false );
161
161
break ;
@@ -167,7 +167,7 @@ void partial_map_node(nnode_t* node, short traverse_number, netlist_t* netlist)
167
167
case LOGICAL_XOR:
168
168
case LOGICAL_XNOR:
169
169
if (node->num_input_port_sizes == 2 ) {
170
- instantiate_logical_logic (node, node->type , traverse_number, netlist );
170
+ instantiate_logical_logic (node, node->type , traverse_number);
171
171
}
172
172
break ;
173
173
@@ -602,7 +602,7 @@ bool eliminate_buffer(nnode_t* node, short, netlist_t*) {
602
602
/* ---------------------------------------------------------------------------------------------
603
603
* (function: instantiate_logical_logic )
604
604
*-------------------------------------------------------------------------------------------*/
605
- void instantiate_logical_logic (nnode_t * node, operation_list op, short mark, netlist_t * netlist ) {
605
+ void instantiate_logical_logic (nnode_t * node, operation_list op, short mark) {
606
606
int i;
607
607
int port_B_offset;
608
608
int width_a;
@@ -627,28 +627,18 @@ void instantiate_logical_logic(nnode_t* node, operation_list op, short mark, net
627
627
/* connect inputs. In the case that a signal is smaller than the other then zero pad */
628
628
for (i = 0 ; i < width_a; i++) {
629
629
/* Joining the inputs to the input 1 of that gate */
630
- if (i < width_a) {
631
- remap_pin_to_new_node (node->input_pins [i], reduction1, i);
632
- } else {
633
- /* ELSE - the B input does not exist, so this answer goes right through */
634
- add_input_pin_to_node (reduction1, get_zero_pin (netlist), i);
635
- }
630
+ remap_pin_to_new_node (node->input_pins [i], reduction1, i);
636
631
}
637
632
for (i = 0 ; i < width_b; i++) {
638
633
/* Joining the inputs to the input 1 of that gate */
639
- if (i < width_b) {
640
- remap_pin_to_new_node (node->input_pins [i + port_B_offset], reduction2, i);
641
- } else {
642
- /* ELSE - the B input does not exist, so this answer goes right through */
643
- add_input_pin_to_node (reduction2, get_zero_pin (netlist), i);
644
- }
634
+ remap_pin_to_new_node (node->input_pins [i + port_B_offset], reduction2, i);
645
635
}
646
636
647
637
connect_nodes (reduction1, 0 , new_logic_cell, 0 );
648
638
connect_nodes (reduction2, 0 , new_logic_cell, 1 );
649
639
650
- instantiate_bitwise_reduction (reduction1, BITWISE_OR, mark, netlist );
651
- instantiate_bitwise_reduction (reduction2, BITWISE_OR, mark, netlist );
640
+ instantiate_bitwise_reduction (reduction1, BITWISE_OR, mark);
641
+ instantiate_bitwise_reduction (reduction2, BITWISE_OR, mark);
652
642
653
643
remap_pin_to_new_node (node->output_pins [0 ], new_logic_cell, 0 );
654
644
free_nnode (node);
@@ -657,7 +647,7 @@ void instantiate_logical_logic(nnode_t* node, operation_list op, short mark, net
657
647
* (function: instantiate_bitwise_reduction )
658
648
* Makes 2 input gates to break into bitwise
659
649
*-------------------------------------------------------------------------------------------*/
660
- void instantiate_bitwise_reduction (nnode_t * node, operation_list op, short mark, netlist_t * netlist ) {
650
+ void instantiate_bitwise_reduction (nnode_t * node, operation_list op, short mark) {
661
651
int i;
662
652
int width_a;
663
653
nnode_t * new_logic_cell;
@@ -705,12 +695,7 @@ void instantiate_bitwise_reduction(nnode_t* node, operation_list op, short mark,
705
695
/* connect inputs. In the case that a signal is smaller than the other then zero pad */
706
696
for (i = 0 ; i < width_a; i++) {
707
697
/* Joining the inputs to the input 1 of that gate */
708
- if (i < width_a) {
709
- remap_pin_to_new_node (node->input_pins [i], new_logic_cell, i);
710
- } else {
711
- /* ELSE - the B input does not exist, so this answer goes right through */
712
- add_input_pin_to_node (new_logic_cell, get_zero_pin (netlist), i);
713
- }
698
+ remap_pin_to_new_node (node->input_pins [i], new_logic_cell, i);
714
699
}
715
700
716
701
remap_pin_to_new_node (node->output_pins [0 ], new_logic_cell, 0 );
0 commit comments