@@ -30,13 +30,28 @@ static void report_congested_nets(const Netlist<>& net_list,
30
30
31
31
static void log_overused_nodes_header ();
32
32
static void log_single_overused_node_status (int overuse_index, RRNodeId inode);
33
- void print_block_pins_nets (std::ostream& os,
34
- t_physical_tile_type_ptr physical_type,
35
- int layer,
36
- int root_x,
37
- int root_y,
38
- int pin_physical_num,
39
- const std::map<RRNodeId, std::set<ParentNetId>>& rr_node_to_net_map);
33
+
34
+ /* *
35
+ * @brief When reporting overused IPIN/OPIN nodes, we also print the nets
36
+ * connected to other pins of the same block. This information may help
37
+ * the user understand why the node is overused or why other pins are not
38
+ * being utilized for routing the net.
39
+ *
40
+ * @param os The output stream to write the information to.
41
+ * @param physical_type The physical type of the block.
42
+ * @param layer The layer number of the block.
43
+ * @param root_x The x coordinate of the root of the block.
44
+ * @param root_y The y coordinate of the root of the block.
45
+ * @param pin_physical_num The physical number of the pin.
46
+ * @param rr_node_to_net_map A map of RR nodes to the nets that pass through them.
47
+ */
48
+ static void print_block_pins_nets (std::ostream& os,
49
+ t_physical_tile_type_ptr physical_type,
50
+ int layer,
51
+ int root_x,
52
+ int root_y,
53
+ int pin_physical_num,
54
+ const std::map<RRNodeId, std::set<ParentNetId>>& rr_node_to_net_map);
40
55
/* *
41
56
* @brief Print out RR node overuse info in the VPR logfile.
42
57
*
@@ -438,17 +453,18 @@ static void log_single_overused_node_status(int overuse_index, RRNodeId node_id)
438
453
fflush (stdout);
439
454
}
440
455
441
- void print_block_pins_nets (std::ostream& os,
442
- t_physical_tile_type_ptr physical_type,
443
- int layer,
444
- int root_x,
445
- int root_y,
446
- int pin_physical_num,
447
- const std::map<RRNodeId, std::set<ParentNetId>>& rr_node_to_net_map) {
456
+ static void print_block_pins_nets (std::ostream& os,
457
+ t_physical_tile_type_ptr physical_type,
458
+ int layer,
459
+ int root_x,
460
+ int root_y,
461
+ int pin_physical_num,
462
+ const std::map<RRNodeId, std::set<ParentNetId>>& rr_node_to_net_map) {
448
463
const auto & rr_graph = g_vpr_ctx.device ().rr_graph ;
449
464
450
465
t_pin_range pin_num_range;
451
- if (is_pin_on_tile (physical_type, pin_physical_num)) {
466
+ bool pin_on_tile = is_pin_on_tile (physical_type, pin_physical_num);
467
+ if (pin_on_tile) {
452
468
pin_num_range.low = 0 ;
453
469
pin_num_range.high = physical_type->num_pins - 1 ;
454
470
} else {
@@ -470,7 +486,13 @@ void print_block_pins_nets(std::ostream& os,
470
486
for (int pin = pin_num_range.low ; pin <= pin_num_range.high ; pin++) {
471
487
t_rr_type rr_type = (get_pin_type_from_pin_physical_num (physical_type, pin) == DRIVER) ? t_rr_type::OPIN : t_rr_type::IPIN;
472
488
RRNodeId node_id = get_pin_rr_node_id (rr_graph.node_lookup (), physical_type, layer, root_x, root_y, pin);
473
- VTR_ASSERT (node_id != RRNodeId::INVALID ());
489
+ // When flat router is enabled, RR Node chains collapse into a single node. Thus, when
490
+ // looking up the RR Node ID, it may return an invalid node ID. In this case, we skip
491
+ // this pin.
492
+ if (!pin_on_tile && node_id == RRNodeId::INVALID ()) {
493
+ continue ;
494
+ }
495
+ VTR_ASSERT (node_id.is_valid ());
474
496
auto search_result = rr_node_to_net_map.find (node_id);
475
497
if (rr_type == t_rr_type::OPIN) {
476
498
os << " OPIN - " ;
0 commit comments