16
16
#include " globals.h"
17
17
#include " echo_files.h"
18
18
19
+ /* *
20
+ * @brief Determines whether a cluster net is constant.
21
+ * @param clb_net The unique id of a cluster net.
22
+ * @return True if the net is constant; otherwise false.
23
+ */
19
24
static bool is_constant_clb_net (ClusterNetId clb_net);
20
25
26
+ /* *
27
+ * @brief Performs a sanity check on macros by making sure that
28
+ * each block appears in at most one macro.
29
+ * @param macros All placement macros in the netlist.
30
+ */
21
31
static void validate_macros (const std::vector<t_pl_macro>& macros);
22
32
23
- static bool try_combine_macros (std::vector<std::vector<ClusterBlockId>>& pl_macro_member_blk_num, int matching_macro, int latest_macro);
33
+ /* *
34
+ * @brief Tries to combine two placement macros.
35
+ * @details This function takes two placement macro ids which have a common cluster block
36
+ * or more in between. The function then tries to find if the two macros could be combined
37
+ * to form a larger macro. If it's impossible to combine the two macros together then
38
+ * this design will never place and route.
39
+ *
40
+ * @param pl_macro_member_blk_num [0..num_macros-1][0..num_cluster_blocks-1]
41
+ * 2D array of macros created so far.
42
+ * @param matching_macro first macro id, which is a previous macro that is found to have the same block
43
+ * @param latest_macro second macro id, which is the macro being created at this iteration
44
+ * @return True if combining two macros was successful; otherwise false.
45
+ */
46
+ static bool try_combine_macros (std::vector<std::vector<ClusterBlockId>>& pl_macro_member_blk_num,
47
+ int matching_macro,
48
+ int latest_macro);
24
49
25
50
/* Go through all the ports in all the blocks to find the port that has the same *
26
51
* name as port_name and belongs to the block type that has the name pb_type_name. *
@@ -39,9 +64,10 @@ static void mark_direct_of_ports(int idirect,
39
64
std::vector<std::vector<int >>& direct_type_from_blk_pin,
40
65
const PortPinToBlockPinConverter& port_pin_to_block_pin);
41
66
42
- /* Mark the pin entry in idirect_from_blk_pin with idirect and the pin entry in *
43
- * direct_type_from_blk_pin with direct_type from start_pin_index to *
44
- * end_pin_index. */
67
+ /* *
68
+ * @brief Mark the pin entry in idirect_from_blk_pin with idirect and the pin entry in
69
+ * direct_type_from_blk_pin with direct_type from start_pin_index to end_pin_index.
70
+ */
45
71
static void mark_direct_of_pins (int start_pin_index,
46
72
int end_pin_index,
47
73
int itype,
@@ -257,17 +283,9 @@ int PlaceMacros::find_all_the_macro_(std::vector<int>& pl_macro_idirect,
257
283
return num_macro;
258
284
}
259
285
260
- static bool try_combine_macros (std::vector<std::vector<ClusterBlockId>>& pl_macro_member_blk_num, int matching_macro, int latest_macro) {
261
- /* This function takes two placement macro ids which have a common cluster block
262
- * or more in between. The function then tries to find if the two macros could
263
- * be combined together to form a larger macro. If it's impossible to combine
264
- * the two macros together then this design will never place and route.
265
- * Arguments:
266
- * pl_macro_member_blk_num : [0..num_macros-1][0..num_cluster_blocks-1] 2D array
267
- * of macros created so far.
268
- * matching_macro : first macro id, which is a previous macro that is found to have the same block
269
- * latest_macro : second macro id, which is the macro being created at this iteration */
270
-
286
+ static bool try_combine_macros (std::vector<std::vector<ClusterBlockId>>& pl_macro_member_blk_num,
287
+ int matching_macro,
288
+ int latest_macro) {
271
289
auto & old_macro_blocks = pl_macro_member_blk_num[matching_macro];
272
290
auto & new_macro_blocks = pl_macro_member_blk_num[latest_macro];
273
291
@@ -501,10 +519,7 @@ static void mark_direct_of_pins(int start_pin_index,
501
519
int line,
502
520
std::string_view src_string,
503
521
const PortPinToBlockPinConverter& port_pin_to_block_pin) {
504
- /* Mark the pin entry in idirect_from_blk_pin with idirect and the pin entry in *
505
- * direct_type_from_blk_pin with direct_type from start_pin_index to *
506
- * end_pin_index. */
507
- auto & device_ctx = g_vpr_ctx.device ();
522
+ const auto & device_ctx = g_vpr_ctx.device ();
508
523
509
524
// Mark pins with indices from start_pin_index to end_pin_index, inclusive
510
525
for (int iport_pin = start_pin_index; iport_pin <= end_pin_index; iport_pin++) {
0 commit comments