File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed
vpr/src/route/rr_graph_generation Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -89,3 +89,21 @@ void DeviceGrid::count_instances() {
8989 }
9090 }
9191}
92+
93+ bool DeviceGrid::has_interposer_cuts () const {
94+ bool has_cuts = false ;
95+
96+ for (const std::vector<int >& layer_h_cuts : horizontal_interposer_cuts_) {
97+ if (!layer_h_cuts.empty ()) {
98+ has_cuts = true ;
99+ }
100+ }
101+
102+ for (const std::vector<int >& layer_v_cuts : vertical_interposer_cuts_) {
103+ if (!layer_v_cuts.empty ()) {
104+ has_cuts = true ;
105+ }
106+ }
107+
108+ return has_cuts;
109+ }
Original file line number Diff line number Diff line change @@ -211,6 +211,11 @@ class DeviceGrid {
211211 return vertical_interposer_cuts_;
212212 }
213213
214+ // / Returns if the grid has any interposer cuts. You should use this function instead of
215+ // / checking if get_horizontal/vertical_interposer_cuts is empty, since the return value
216+ // / of those functions might look something like this: {{}} which is technically not empty.
217+ bool has_interposer_cuts () const ;
218+
214219 private:
215220 // / @brief Counts the number of each tile type on each layer and store it in instance_counts_.
216221 // / It is called in the constructor.
Original file line number Diff line number Diff line change @@ -1670,7 +1670,7 @@ static std::function<void(t_chan_width*)> alloc_and_load_rr_graph(RRGraphBuilder
16701670 }
16711671
16721672 // If there are any interposer cuts, remove the edges and shorten the wires that cross interposer cut lines.
1673- if (! grid.get_horizontal_interposer_cuts (). empty () || !grid. get_vertical_interposer_cuts (). empty ()) {
1673+ if (grid.has_interposer_cuts ()) {
16741674 std::vector<RREdgeId> interposer_edges = mark_interposer_cut_edges_for_removal (rr_graph, grid);
16751675 rr_graph_builder.remove_edges (interposer_edges);
16761676
You can’t perform that action at this time.
0 commit comments