@@ -24,7 +24,7 @@ void RoutingToClockConnection::set_clock_switch_point_name(std::string clock_swi
24
24
void RoutingToClockConnection::set_switch_location (int x, int y, int layer /* =0 */ ) {
25
25
switch_location.x = x;
26
26
switch_location.y = y;
27
- switch_location.layer = layer;
27
+ switch_location.layer_num = layer;
28
28
}
29
29
30
30
void RoutingToClockConnection::set_switch (int arch_switch_index) {
@@ -55,12 +55,12 @@ void RoutingToClockConnection::create_switches(const ClockRRGraphBuilder& clock_
55
55
auto & rr_graph_builder = device_ctx.rr_graph_builder ;
56
56
const auto & node_lookup = device_ctx.rr_graph .node_lookup ();
57
57
58
- RRNodeId virtual_clock_network_root_idx = create_virtual_clock_network_sink_node (switch_location.layer , switch_location.x , switch_location.y );
58
+ RRNodeId virtual_clock_network_root_idx = create_virtual_clock_network_sink_node (switch_location.layer_num , switch_location.x , switch_location.y );
59
59
rr_graph_builder.set_virtual_clock_network_root_idx (virtual_clock_network_root_idx);
60
60
61
61
// rr_node indices for x and y channel routing wires and clock wires to connect to
62
- auto x_wire_indices = node_lookup.find_channel_nodes (switch_location.layer , switch_location.x , switch_location.y , e_rr_type::CHANX);
63
- auto y_wire_indices = node_lookup.find_channel_nodes (switch_location.layer , switch_location.x , switch_location.y , e_rr_type::CHANY);
62
+ auto x_wire_indices = node_lookup.find_channel_nodes (switch_location.layer_num , switch_location.x , switch_location.y , e_rr_type::CHANX);
63
+ auto y_wire_indices = node_lookup.find_channel_nodes (switch_location.layer_num , switch_location.x , switch_location.y , e_rr_type::CHANY);
64
64
auto clock_indices = clock_graph.get_rr_node_indices_at_switch_location (
65
65
clock_to_connect_to, switch_point_name, switch_location.x , switch_location.y );
66
66
@@ -168,13 +168,12 @@ size_t ClockToClockConneciton::estimate_additional_nodes() {
168
168
void ClockToClockConneciton::create_switches (const ClockRRGraphBuilder& clock_graph, t_rr_edge_info_set* rr_edges_to_create) {
169
169
auto & grid = clock_graph.grid ();
170
170
171
- auto to_locations = clock_graph.get_switch_locations (to_clock, to_switch);
171
+ std::set<std::pair< int , int >> to_locations = clock_graph.get_switch_locations (to_clock, to_switch);
172
172
173
- for (auto location : to_locations) {
174
- auto x = location.first ;
175
- auto y = location.second ;
173
+ for (auto [x, y] : to_locations) {
176
174
177
- auto to_rr_node_indices = clock_graph.get_rr_node_indices_at_switch_location (
175
+
176
+ std::vector<int > to_rr_node_indices = clock_graph.get_rr_node_indices_at_switch_location (
178
177
to_clock,
179
178
to_switch,
180
179
x,
@@ -257,20 +256,20 @@ void ClockToPinsConnection::create_switches(const ClockRRGraphBuilder& clock_gra
257
256
continue ;
258
257
}
259
258
260
- auto type = grid.get_physical_type ({x, y, layer_num});
259
+ t_physical_tile_type_ptr type = grid.get_physical_type ({x, y, layer_num});
261
260
262
261
// Skip EMPTY type
263
262
if (is_empty_type (type)) {
264
263
continue ;
265
264
}
266
265
267
- auto width_offset = grid.get_width_offset ({x, y, layer_num});
268
- auto height_offset = grid.get_height_offset ({x, y, layer_num});
266
+ int width_offset = grid.get_width_offset ({x, y, layer_num});
267
+ int height_offset = grid.get_height_offset ({x, y, layer_num});
269
268
270
269
// Ignore grid locations that do not have blocks
271
270
bool has_pb_type = false ;
272
- auto equivalent_sites = get_equivalent_sites_set (type);
273
- for (auto logical_block : equivalent_sites) {
271
+ std::unordered_set<t_logical_block_type_ptr> equivalent_sites = get_equivalent_sites_set (type);
272
+ for (t_logical_block_type_ptr logical_block : equivalent_sites) {
274
273
if (logical_block->pb_type ) {
275
274
has_pb_type = true ;
276
275
break ;
@@ -287,7 +286,7 @@ void ClockToPinsConnection::create_switches(const ClockRRGraphBuilder& clock_gra
287
286
continue ;
288
287
}
289
288
290
- for (auto clock_pin_idx : type->get_clock_pins_indices ()) {
289
+ for (int clock_pin_idx : type->get_clock_pins_indices ()) {
291
290
// Can't do anything if pin isn't at this location
292
291
if (0 == type->pinloc [width_offset][height_offset][side][clock_pin_idx]) {
293
292
continue ;
@@ -308,14 +307,14 @@ void ClockToPinsConnection::create_switches(const ClockRRGraphBuilder& clock_gra
308
307
clock_y_offset = -1 ; // pick the chanx below the block
309
308
}
310
309
311
- auto clock_pin_node_idx = node_lookup.find_node (layer_num,
312
- x,
313
- y,
314
- e_rr_type::IPIN,
315
- clock_pin_idx,
316
- side);
310
+ RRNodeId clock_pin_node_idx = node_lookup.find_node (layer_num,
311
+ x,
312
+ y,
313
+ e_rr_type::IPIN,
314
+ clock_pin_idx,
315
+ side);
317
316
318
- auto clock_network_indices = clock_graph.get_rr_node_indices_at_switch_location (
317
+ std::vector< int > clock_network_indices = clock_graph.get_rr_node_indices_at_switch_location (
319
318
clock_to_connect_from,
320
319
switch_point_name,
321
320
x + clock_x_offset,
0 commit comments