Skip to content

Commit 34d7b3f

Browse files
committed
privatized local functions
1 parent 04a1a65 commit 34d7b3f

File tree

2 files changed

+91
-65
lines changed

2 files changed

+91
-65
lines changed

utils/vqm2blif/src/base/hard_block_recog.cpp

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,77 @@
124124

125125
#include "hard_block_recog.h"
126126

127+
//============================================================================================
128+
// INTERNAL FUNCTION DECLARATIONS
129+
//============================================================================================
130+
131+
void initialize_hard_block_models(t_arch*, std::vector<std::string>*, t_hard_block_recog*);
132+
133+
void process_module_nodes_and_create_hard_blocks(t_module*, std::vector<std::string>*, t_hard_block_recog*);
134+
135+
bool create_and_initialize_all_hard_block_ports(t_model*, t_hard_block_recog*);
136+
137+
void create_hard_block_port_info_structure(t_hard_block_recog*, std::string);
138+
139+
int extract_and_store_hard_block_model_ports(t_hard_block_recog*, t_model_ports*, std::string, int, std::string);
140+
141+
t_array_ref* convert_hard_block_model_port_to_hard_block_node_port(t_model_ports*);
142+
143+
t_node_port_association* create_unconnected_node_port_association(char*, int ,int);
144+
145+
void store_hard_block_port_info(t_hard_block_recog*, std::string, std::string,t_array_ref**, int*);
146+
147+
void copy_array_ref(t_array_ref*, t_array_ref*);
148+
149+
t_array_ref* create_and_initialize_t_array_ref_struct(void);
150+
151+
int find_hard_block_instance(t_hard_block_recog*, t_parsed_hard_block_port_info*);
152+
153+
void assign_net_to_hard_block_instance_port(t_node*, t_parsed_hard_block_port_info*, t_hard_block_recog*, int);
154+
155+
t_node_port_association* get_lut_dffeas_port_connected_to_hard_block_instance_net(t_node*);
156+
157+
int identify_port_index_within_hard_block_type_port_array(t_hard_block_port_info*, t_parsed_hard_block_port_info*, t_node*);
158+
159+
void handle_net_assignment(t_node*, t_hard_block*, int, t_node_port_association*, t_parsed_hard_block_port_info*);
160+
161+
bool is_hard_block_port_legal(t_node*);
162+
163+
int create_new_hard_block_instance(t_array_ref*, t_hard_block_recog*, t_parsed_hard_block_port_info*);
164+
165+
t_array_ref* create_unconnected_hard_block_instance_ports(t_hard_block_port_info*);
166+
167+
t_node* create_new_hard_block_instance_node(t_array_ref*, t_parsed_hard_block_port_info*);
168+
169+
int store_new_hard_block_instance_info(t_hard_block_recog*, t_hard_block_port_info*, t_node*, t_parsed_hard_block_port_info*);
170+
171+
t_array_ref* create_t_array_ref_from_array(void**, int);
172+
173+
void delete_hard_block_port_info(std::unordered_map<std::string, t_hard_block_port_info>*);
174+
175+
t_parsed_hard_block_port_info extract_hard_block_port_info_from_module_node(t_node*, std::vector<std::string>*);
176+
177+
std::string identify_hard_block_type(std::vector<std::string>*, std::string);
178+
179+
void identify_hard_block_port_name_and_index (t_parsed_hard_block_port_info*, std::string);
180+
181+
void split_node_name(std::string, std::vector<std::string>*, std::string);
182+
183+
std::string construct_hard_block_name(std::vector<std::string>*, std::string);
184+
185+
void remove_luts_dffeas_nodes_representing_hard_block_ports(t_module*, t_hard_block_recog*);
186+
187+
void verify_hard_blocks(t_hard_block_recog*);
188+
189+
// utility functions
190+
191+
void store_hard_block_names(char**, int, std::vector<std::string>*);
192+
193+
bool sort_hard_blocks_by_valid_connections(t_hard_block, t_hard_block);
194+
195+
//============================================================================================
196+
//============================================================================================
197+
127198
/**
128199
* @details This function is the main controller and executes all the
129200
* processing steps involved in indentifying new types of hard

utils/vqm2blif/src/base/hard_block_recog.h

Lines changed: 20 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -201,76 +201,31 @@ typedef struct s_parsed_hard_block_port_info
201201
}t_parsed_hard_block_port_info;
202202

203203

204-
/* Function Declarations
204+
/* Global Function Declarations
205205
*
206206
* For more information about functions, refer to
207207
* 'hard_block_recog.cpp'
208208
*/
209209

210+
/*
211+
* Function: add_hard_blocks_to_netlist
212+
*
213+
* Goes through a netlist and removes luts/dff that represent
214+
* specific hard block ports and then the corresponding hard block
215+
* is added to the netlist.
216+
*
217+
* Parameters:
218+
* t_module* - A reference to the netlist of the design
219+
* t_arch* - a pointer to the FPGA architecture that design will
220+
* target
221+
* std::vector<std::string>* - a reference to a list of hard block names
222+
that need to be identified within the
223+
netlist.
224+
*
225+
* std::string - the name of the architecture file (".xml")
226+
std::string - the name of the Quartus generated netlist file (".vqm")
227+
*
228+
*/
210229
void add_hard_blocks_to_netlist(t_module*, t_arch*, std::vector<std::string>*, std::string, std::string);
211230

212-
void initialize_hard_block_models(t_arch*, std::vector<std::string>*, t_hard_block_recog*);
213-
214-
void process_module_nodes_and_create_hard_blocks(t_module*, std::vector<std::string>*, t_hard_block_recog*);
215-
216-
bool create_and_initialize_all_hard_block_ports(t_model*, t_hard_block_recog*);
217-
218-
void create_hard_block_port_info_structure(t_hard_block_recog*, std::string);
219-
220-
int extract_and_store_hard_block_model_ports(t_hard_block_recog*, t_model_ports*, std::string, int, std::string);
221-
222-
t_array_ref* convert_hard_block_model_port_to_hard_block_node_port(t_model_ports*);
223-
224-
t_node_port_association* create_unconnected_node_port_association(char*, int ,int);
225-
226-
void store_hard_block_port_info(t_hard_block_recog*, std::string, std::string,t_array_ref**, int*);
227-
228-
void copy_array_ref(t_array_ref*, t_array_ref*);
229-
230-
t_array_ref* create_and_initialize_t_array_ref_struct(void);
231-
232-
int find_hard_block_instance(t_hard_block_recog*, t_parsed_hard_block_port_info*);
233-
234-
void assign_net_to_hard_block_instance_port(t_node*, t_parsed_hard_block_port_info*, t_hard_block_recog*, int);
235-
236-
t_node_port_association* get_lut_dffeas_port_connected_to_hard_block_instance_net(t_node*);
237-
238-
int identify_port_index_within_hard_block_type_port_array(t_hard_block_port_info*, t_parsed_hard_block_port_info*, t_node*);
239-
240-
void handle_net_assignment(t_node*, t_hard_block*, int, t_node_port_association*, t_parsed_hard_block_port_info*);
241-
242-
bool is_hard_block_port_legal(t_node*);
243-
244-
int create_new_hard_block_instance(t_array_ref*, t_hard_block_recog*, t_parsed_hard_block_port_info*);
245-
246-
t_array_ref* create_unconnected_hard_block_instance_ports(t_hard_block_port_info*);
247-
248-
t_node* create_new_hard_block_instance_node(t_array_ref*, t_parsed_hard_block_port_info*);
249-
250-
int store_new_hard_block_instance_info(t_hard_block_recog*, t_hard_block_port_info*, t_node*, t_parsed_hard_block_port_info*);
251-
252-
t_array_ref* create_t_array_ref_from_array(void**, int);
253-
254-
void delete_hard_block_port_info(std::unordered_map<std::string, t_hard_block_port_info>*);
255-
256-
t_parsed_hard_block_port_info extract_hard_block_port_info_from_module_node(t_node*, std::vector<std::string>*);
257-
258-
std::string identify_hard_block_type(std::vector<std::string>*, std::string);
259-
260-
void identify_hard_block_port_name_and_index (t_parsed_hard_block_port_info*, std::string);
261-
262-
void split_node_name(std::string, std::vector<std::string>*, std::string);
263-
264-
std::string construct_hard_block_name(std::vector<std::string>*, std::string);
265-
266-
void remove_luts_dffeas_nodes_representing_hard_block_ports(t_module*, t_hard_block_recog*);
267-
268-
void verify_hard_blocks(t_hard_block_recog*);
269-
270-
// utility functions
271-
272-
void store_hard_block_names(char**, int, std::vector<std::string>*);
273-
274-
bool sort_hard_blocks_by_valid_connections(t_hard_block, t_hard_block);
275-
276231
#endif

0 commit comments

Comments
 (0)