Skip to content

Commit 3cffa03

Browse files
committed
[vpr][route] skip pin if it is not legal
1 parent 5cf1b67 commit 3cffa03

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

vpr/src/route/overuse_report.cpp

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ static void report_congested_nets(const Netlist<>& net_list,
3030

3131
static void log_overused_nodes_header();
3232
static void log_single_overused_node_status(int overuse_index, RRNodeId inode);
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+
*/
3340
void print_block_pins_nets(std::ostream& os,
3441
t_physical_tile_type_ptr physical_type,
3542
int layer,
@@ -448,7 +455,8 @@ void print_block_pins_nets(std::ostream& os,
448455
const auto& rr_graph = g_vpr_ctx.device().rr_graph;
449456

450457
t_pin_range pin_num_range;
451-
if (is_pin_on_tile(physical_type, pin_physical_num)) {
458+
bool pin_on_tile = is_pin_on_tile(physical_type, pin_physical_num);
459+
if (pin_on_tile) {
452460
pin_num_range.low = 0;
453461
pin_num_range.high = physical_type->num_pins - 1;
454462
} else {
@@ -470,7 +478,12 @@ void print_block_pins_nets(std::ostream& os,
470478
for (int pin = pin_num_range.low; pin <= pin_num_range.high; pin++) {
471479
t_rr_type rr_type = (get_pin_type_from_pin_physical_num(physical_type, pin) == DRIVER) ? t_rr_type::OPIN : t_rr_type::IPIN;
472480
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());
481+
// When flat router is enabled, RR Node chains collapse into a single node. Thus, when
482+
// looking up the RR Node ID, it may return an invalid node ID. In this case, we skip
483+
// this pin.
484+
if (!pin_on_tile && node_id == RRNodeId::INVALID()) {
485+
continue;
486+
}
474487
auto search_result = rr_node_to_net_map.find(node_id);
475488
if (rr_type == t_rr_type::OPIN) {
476489
os << " OPIN - ";

0 commit comments

Comments
 (0)