Skip to content

Commit 9e4b5b4

Browse files
committed
vpr/src/route/overuse_report.cpp
1 parent 12c4600 commit 9e4b5b4

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

vpr/src/route/overuse_report.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "overuse_report.h"
22

33
#include <fstream>
4-
#include "physical_types_util.h"
54
#include "vtr_log.h"
65

76
/**
@@ -448,7 +447,8 @@ void print_block_pins_nets(std::ostream& os,
448447
const auto& rr_graph = g_vpr_ctx.device().rr_graph;
449448

450449
t_pin_range pin_num_range;
451-
if (is_pin_on_tile(physical_type, pin_physical_num)) {
450+
bool pin_on_tile = is_pin_on_tile(physical_type, pin_physical_num);
451+
if (pin_on_tile) {
452452
pin_num_range.low = 0;
453453
pin_num_range.high = physical_type->num_pins - 1;
454454
} else {
@@ -470,7 +470,12 @@ void print_block_pins_nets(std::ostream& os,
470470
for (int pin = pin_num_range.low; pin <= pin_num_range.high; pin++) {
471471
t_rr_type rr_type = (get_pin_type_from_pin_physical_num(physical_type, pin) == DRIVER) ? t_rr_type::OPIN : t_rr_type::IPIN;
472472
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());
473+
// When flat router is enabled, RR Node chains collapse into a single node. Thus, when
474+
// looking up the RR Node ID, it may return an invalid node ID. In this case, we skip
475+
// this pin.
476+
if (!pin_on_tile && node_id == RRNodeId::INVALID()) {
477+
continue;
478+
}
474479
auto search_result = rr_node_to_net_map.find(node_id);
475480
if (rr_type == t_rr_type::OPIN) {
476481
os << " OPIN - ";

0 commit comments

Comments
 (0)