Skip to content

Commit be4f61b

Browse files
committedAug 13, 2024
[vpr][rr_graph] initialized delayless switch
1 parent 4657a7d commit be4f61b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
 

‎vpr/src/route/rr_graph.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -677,8 +677,8 @@ static void build_intra_cluster_rr_graph(const t_graph_type graph_type,
677677
* @param det_routing_arch Contain the information from architecture file
678678
* @param load_rr_graph Indicate whether the RR graph is loaded from a file
679679
*/
680-
static short get_delayless_switch_id (t_det_routing_arch* det_routing_arch,
681-
bool load_rr_graph);
680+
static int get_delayless_switch_id(t_det_routing_arch* det_routing_arch,
681+
bool load_rr_graph);
682682

683683
/******************* Subroutine definitions *******************************/
684684

@@ -765,7 +765,7 @@ void create_rr_graph(const t_graph_type graph_type,
765765
}
766766

767767
if (is_flat) {
768-
short delayless_switch = get_delayless_switch_id(det_routing_arch, load_rr_graph);
768+
int delayless_switch = get_delayless_switch_id(det_routing_arch, load_rr_graph);
769769
VTR_ASSERT(delayless_switch != OPEN);
770770
build_intra_cluster_rr_graph(graph_type,
771771
grid,
@@ -1538,21 +1538,21 @@ static void build_intra_cluster_rr_graph(const t_graph_type graph_type,
15381538
is_flat);
15391539
}
15401540

1541-
static short get_delayless_switch_id (t_det_routing_arch* det_routing_arch,
1542-
bool load_rr_graph) {
1541+
static int get_delayless_switch_id(t_det_routing_arch* det_routing_arch,
1542+
bool load_rr_graph) {
15431543
const auto& device_ctx = g_vpr_ctx.device();
1544-
short delayless_switch;
1544+
int delayless_switch = OPEN;
15451545
if (load_rr_graph) {
15461546
const auto& rr_switches = device_ctx.rr_graph.rr_switch();
15471547
for (size_t switch_id = 0; switch_id < rr_switches.size(); switch_id++){
15481548
const auto& rr_switch = rr_switches[RRSwitchId(switch_id)];
15491549
if (rr_switch.name.find("delayless") != std::string::npos) {
1550-
delayless_switch = static_cast<short>(switch_id);
1550+
delayless_switch = static_cast<int>(switch_id);
15511551
break;
15521552
}
15531553
}
15541554
} else {
1555-
delayless_switch = det_routing_arch->delayless_switch;
1555+
delayless_switch = static_cast<int>(det_routing_arch->delayless_switch);
15561556
}
15571557

15581558
return delayless_switch;

0 commit comments

Comments
 (0)
Please sign in to comment.