Skip to content

Commit 05166a5

Browse files
fix seg fault
1 parent 2334819 commit 05166a5

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

vpr/src/route/rr_graph_generation/build_scatter_gathers.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,6 @@ std::vector<t_bottleneck_link> alloc_and_load_scatter_gather_connections(const s
230230
index_to_correct_sg_channels(sg_pattern.scatter_pattern, scatter_loc, chan_details_x, chan_details_y, scatter_channels);
231231

232232
if (gather_channels.empty() || scatter_channels.empty()) {
233-
VTR_LOGV_WARN(gather_channels.empty(),
234-
"Scatter-gather pattern '%s' with SG link '%s' has no gather channels at location (layer=%i, x=%i, y=%i)\n",
235-
sg_pattern.name.c_str(), sg_link.name.c_str(),
236-
gather_loc.layer_num, gather_loc.x, gather_loc.y);
237-
238-
VTR_LOGV_WARN(scatter_channels.empty(),
239-
"Scatter-gather pattern '%s' with SG link '%s' has no scatter channels at location (layer=%i, x=%i, y=%i)\n",
240-
sg_pattern.name.c_str(), sg_link.name.c_str(),
241-
scatter_loc.layer_num, scatter_loc.x, scatter_loc.y);
242-
243233
continue;
244234
}
245235

@@ -316,6 +306,9 @@ std::vector<t_bottleneck_link> alloc_and_load_scatter_gather_connections(const s
316306
i_s = (i_s + 1) % bottleneck_fanout;
317307
}
318308

309+
bottleneck_link.chan_type = chan_type;
310+
bottleneck_link.parallel_segment_index = std::distance(segment_inf.begin(), seg_it);
311+
319312
if (is_3d_link) {
320313
if (sg_link.z_offset < 0 && wire_segment.arch_wire_switch_dec != ARCH_FPGA_UNDEFINED_VAL) {
321314
bottleneck_link.arch_wire_switch = wire_segment.arch_wire_switch_dec;
@@ -330,8 +323,6 @@ std::vector<t_bottleneck_link> alloc_and_load_scatter_gather_connections(const s
330323
bottleneck_link.arch_wire_switch = wire_segment.arch_wire_switch;
331324
}
332325

333-
bottleneck_link.chan_type = chan_type;
334-
bottleneck_link.parallel_segment_index = std::distance(segment_inf.begin(), seg_it);
335326
bottleneck_links.push_back(std::move(bottleneck_link));
336327
}
337328
}

vpr/src/route/rr_graph_generation/rr_graph_3d.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void build_inter_die_3d_rr_chan(RRGraphBuilder& rr_graph_builder,
6262
// 3) xhigh=xlow, yhigh=ylow
6363

6464
// Go through allocated nodes until no nodes are found within the RRGraph builder
65-
for (int track_num = 0; /*no condition*/; track_num++) {
65+
for (size_t track_num = 0; track_num < interdie_3d_links.size(); track_num++) {
6666
// Try to find a node with the current track_num
6767

6868
const t_bottleneck_link& link = interdie_3d_links[track_num];

0 commit comments

Comments
 (0)