Skip to content

Commit 7e61896

Browse files
author
Nathan Shreve
committed
Get new SINK locations for 1x1 blocks as well
1 parent 4138050 commit 7e61896

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

libs/librrgraph/src/base/rr_graph_utils.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,6 @@ void set_sink_locs(const RRGraphView& rr_graph, RRGraphBuilder& rr_graph_builder
147147
if (rr_graph.node_type((RRNodeId)node_id) != e_rr_type::SINK)
148148
continue;
149149

150-
// Skip if tile dimensions are 1x1
151-
int tile_width = rr_graph.node_xhigh(node_id) - rr_graph.node_xlow(node_id);
152-
int tile_height = rr_graph.node_yhigh(node_id) - rr_graph.node_ylow(node_id);
153-
154-
if (tile_width <= 1 && tile_height <= 1)
155-
continue;
156-
157150
sink_ipins[node_id] = {};
158151
walk_cluster_recursive(rr_graph, node_fanins, sink_ipins[node_id], node_id, node_id);
159152
}
@@ -186,6 +179,9 @@ void set_sink_locs(const RRGraphView& rr_graph, RRGraphBuilder& rr_graph_builder
186179
auto x_avg = (short)round(std::accumulate(x_coords.begin(), x_coords.end(), 0.f) / (double)x_coords.size());
187180
auto y_avg = (short)round(std::accumulate(y_coords.begin(), y_coords.end(), 0.f) / (double)y_coords.size());
188181

182+
VTR_ASSERT(x_avg >= 0);
183+
VTR_ASSERT(y_avg >= 0);
184+
189185
RRNodeId node = node_pins.first;
190186
rr_graph_builder.set_node_coordinates(node, x_avg, y_avg, x_avg, y_avg);
191187
}

terminal_out.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Cleaning files..
2+
cd build && /usr/local/bin/cmake -DCMAKE_BUILD_TYPE=release -G 'Unix Makefiles' /home/shrevena/Documents/vtr/vtr-verilog-to-routing
3+
-- Using ccache binary found @ /usr/bin/ccache
4+
-- CMAKE_BUILD_TYPE: release
5+
-- Building with IPO: on
6+
-- Performing Test CXX_COMPILER_SUPPORTS_-Wformat=2
7+
-- Performing Test CXX_COMPILER_SUPPORTS_-Wformat=2 - Success
8+
-- Performing Test CXX_COMPILER_SUPPORTS_-Wcatch-value=3
9+
-- Performing Test CXX_COMPILER_SUPPORTS_-Wcatch-value=3 - Success
10+
-- Performing Test CXX_COMPILER_SUPPORTS_-Wimplicit-fallthrough=3

vpr/src/route/rr_graph2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,8 +1525,8 @@ bool verify_rr_node_indices(const DeviceGrid& grid,
15251525
*/
15261526
} else {
15271527
// Previously, SINKs had co-ordinates covering the entire block they are in. Now, their locations
1528-
// are the average of the IPINs they are connected to, so we cannot do the same check that we did
1529-
// for SOURCEs.
1528+
// are the average of the IPINs they are connected to; but, this does not affect where they are in
1529+
// the spatial lookup. So, we cannot do this check.
15301530

15311531
VTR_ASSERT(rr_graph.node_type(inode) == SINK);
15321532
}

0 commit comments

Comments
 (0)