You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
voidreorganize_module_node_list(int original_number_of_nodes, int number_of_nodes_eliminated, t_node** module_node_list, t_module* module)
844
+
voidreorganize_module_node_list(t_module* module)
845
845
{
846
846
/*
847
-
The purpose of this function is to regorganize the nodes array by filling in gaps with the last available elements in the array to save CPU time.
847
+
The purpose of this function is to regorganize the module node list (node array) by filling in gaps with the last available elements in the array to save CPU time.
848
848
849
-
The node array provided to this function is expected to have elements deleted within. THis essentially creates gaps in the array. So we fill in the gaps of this array and ensure it is a continuous list of nodes.
849
+
The module provided to this function is expected to have nodes deleted within its nodes list (array). This essentially creates gaps in the array. So we fill in the gaps of this array and ensure it is a continuous list of nodes.
850
850
851
851
Please refer to the example below:
852
852
@@ -858,19 +858,24 @@ void reorganize_module_node_list(int original_number_of_nodes, int number_of_nod
858
858
After reorganization and filling gaps:
859
859
860
860
------ ------ ------ ------
861
-
|LUT 1| --> |LUT 2| --> |LUT 3| --> |LUT 4| -->
861
+
|LUT 1| --> |LUT 2| --> |LUT 4| --> |LUT 3| -->
862
862
------ ------ ------ ------
863
863
864
+
The function fills in the gaps with the last available node in the list (as shown in the example above).
865
+
864
866
Change Log:
865
867
- Srivatsan Srinivasan, August 2021:
866
868
- created this function to reorganize node arrays with gaps inside of them.
867
869
- Initially the feature provided by this function was embedded indide the "remove_one_lut_nodes" function. By creating a seperate function, we are now not restricted to only removing one-lut nodes.
868
870
- Now we can remove any types of nodes and then run this function to reorganize the node array.
869
871
*/
870
-
int new_array_size = original_number_of_nodes - number_of_nodes_eliminated;
872
+
// assign module related parameters
873
+
int original_number_of_nodes = module->number_of_nodes;
0 commit comments