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
* @brief Draws the edge between an intra-cluster pin and a pin when flat routing is enabled. It does not matter whether prev_node is the intra-cluster pin or whether inode is the intra-cluster pin.
41
+
* @brief Draws the edge between an intra-cluster pin and an inter-cluster pin when flat routing is enabled. It does not matter whether prev_node is the intra-cluster pin or whether inode is the intra-cluster pin.
* @brief A helper function for draw_internal_load_coords. Calculates the coordinates of a internal block and stores its bounding box inside global variables. The calculated width and height of the block are also assigned to the pointers blk_width and blk_height.
58
+
* @brief A helper function to calculate the number of child blocks for a given t_mode.
59
+
* @param mode The mode of the parent pb_type.
60
+
* @return The number of child blocks for the given t_mode.
* @brief A helper function for draw_internal_load_coords.
65
+
* Calculates the coordinates of a internal block and stores its bounding box inside global variables.
66
+
* The calculated width and height of the block are also assigned to the pointers blk_width and blk_height.
58
67
* @param type_descrip_index The index of the logical block type.
59
68
* @param pb_graph_node The pb_graph_node of the logical block type.
60
69
* @param blk_num Each logical block type has num_modes * num_pb_type_children sub-blocks. blk_num is the index of the sub-block within the logical block type.
@@ -241,6 +250,15 @@ static int draw_internal_find_max_lvl(const t_pb_type& pb_type) {
// not all child_pb_types have the same number of physical blocks, so we have to manually loop through and count the physical blocks
255
+
int num_blocks = 0;
256
+
for (int j=0;j<mode.num_pb_type_children;++j) {
257
+
num_blocks += mode.pb_type_children[j].num_pb;
258
+
}
259
+
return num_blocks;
260
+
}
261
+
244
262
/* Helper function for initializing bounding box values for each sub-block. This function
245
263
* traverses through the pb_graph for a descriptor_type (given by type_descrip_index), and
246
264
* calls helper function to compute bounding box values.
@@ -259,16 +277,18 @@ static void draw_internal_load_coords(int type_descrip_index, t_pb_graph_node* p
259
277
for (int i = 0; i < num_modes; ++i) {
260
278
t_mode mode = pb_type->modes[i];
261
279
int num_children = mode.num_pb_type_children;
280
+
int num_blocks = get_num_child_blocks(mode);
281
+
int blk_num = 0;
262
282
263
283
for (int j = 0; j < num_children; ++j) {
264
-
/* Find the number of instances for each child pb_type.*/
284
+
// Find the number of instances for each child pb_type.
265
285
int num_pb = mode.pb_type_children[j].num_pb;
266
286
267
-
// Determine how we want to arrange the sub-blocks in the parent block. We want the blocks to be squarish, and not too wide or too tall. In other words, we want the number of rows to be as close to the number of columns as possible such that num_rows * num_columns = num_blocks.
268
-
269
-
int num_blocks = num_pb * num_children;
270
-
271
-
// determine central factor for the number of columns
287
+
// Determine how we want to arrange the sub-blocks in the parent block.
288
+
// We want the blocks to be squarish, and not too wide or too tall.
289
+
// In other words, we want the number of rows to be as close to the number of columns as possible such that
290
+
// num_rows * num_columns = num_blocks.
291
+
//first, determine the "middle" factor for the number of columns
272
292
int num_columns = 1;
273
293
for (int k = 1; k * k <= num_blocks; ++k) {
274
294
if (num_blocks % k == 0) {
@@ -286,19 +306,19 @@ static void draw_internal_load_coords(int type_descrip_index, t_pb_graph_node* p
286
306
287
307
for (int k = 0; k < num_pb; ++k) {
288
308
289
-
int blk_num = j * num_pb + k;
290
-
291
-
/* Compute bound box for block. Don't call if pb_type is root-level pb. */
309
+
// Compute bound box for block. Don't call if pb_type is root-level pb.
* @brief Retrieves the atom pin associated with a specific CLB and pb_graph_pin. Warning: Not all pb_graph_pins are associated with an atom pin! Only pb_graph_pins on primatives are associated with an AtomPinId.
170
+
* @brief Retrieves the atom pin associated with a specific CLB and pb_graph_pin. Warning: Not all pb_graph_pins are associated with an atom pin! Only pb_graph_pins on primatives are associated with an AtomPinId. Returns AtomPinId::INVALID() if no atom pin is found.
0 commit comments