Skip to content

Commit ad8bfce

Browse files
committed
[vpr][pack] fix merge issues w/ flat sync list
1 parent 9ca4776 commit ad8bfce

File tree

1 file changed

+3
-60
lines changed

1 file changed

+3
-60
lines changed

vpr/src/pack/sync_netlists_to_routing_flat.cpp

Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,6 @@ static void fixup_atom_pb_graph_pin_mapping(void);
4242

4343
/* Function definitions */
4444

45-
<<<<<<< HEAD
46-
=======
47-
/** Is the clock net found in the routing results?
48-
* (If not, clock_modeling is probably ideal and we should preserve clock routing while rebuilding.) */
49-
inline bool is_clock_net_routed(void) {
50-
auto& atom_ctx = g_vpr_ctx.atom();
51-
auto& route_ctx = g_vpr_ctx.routing();
52-
53-
for (auto net_id : atom_ctx.netlist().nets()) {
54-
auto& tree = route_ctx.route_trees[net_id];
55-
if (!tree)
56-
continue;
57-
if (route_ctx.is_clock_net[net_id]) /* Clock net has routing */
58-
return true;
59-
}
60-
61-
return false;
62-
}
63-
64-
>>>>>>> 1e479b90837fdc89cbf9089c691ed58200642fe0
6545
/** Get the ClusterBlockId for a given RRNodeId. */
6646
inline ClusterBlockId get_cluster_block_from_rr_node(RRNodeId inode) {
6747
auto& device_ctx = g_vpr_ctx.device();
@@ -193,17 +173,11 @@ static void sync_pb_routes_to_routing(void) {
193173
/* Don't erase entries for nets without routing in place (clocks, globals...) */
194174
std::vector<int> pins_to_erase;
195175
auto& pb_routes = cluster_ctx.clb_nlist.block_pb(clb_blk_id)->pb_route;
196-
<<<<<<< HEAD
197176
for(auto& [pin, pb_route]: pb_routes){
198177
/* No route tree: no routing in place, it is global or clock */
199178
if(!route_ctx.route_trees[ParentNetId(int(pb_route.atom_net_id))])
200179
continue;
201180
pins_to_erase.push_back(pin);
202-
=======
203-
for (auto& [pin, pb_route] : pb_routes) {
204-
if (clock_net_is_routed || !route_ctx.is_clock_net[pb_route.atom_net_id])
205-
pins_to_erase.push_back(pin);
206-
>>>>>>> 1e479b90837fdc89cbf9089c691ed58200642fe0
207181
}
208182

209183
for (int pin : pins_to_erase) {
@@ -292,16 +266,11 @@ static void sync_clustered_netlist_to_routing(void) {
292266

293267
for (auto net_id : clb_netlist.nets()) {
294268
auto atom_net_id = atom_lookup.atom_net(net_id);
295-
<<<<<<< HEAD
296269
if(!route_ctx.route_trees[ParentNetId(int(atom_net_id))])
297-
=======
298-
if (!clock_net_is_routed && route_ctx.is_clock_net[atom_net_id])
299-
>>>>>>> 1e479b90837fdc89cbf9089c691ed58200642fe0
300270
continue;
301271

302272
nets_to_remove.push_back(net_id);
303273
}
304-
<<<<<<< HEAD
305274
/* Mark ports and pins for removal. Don't remove a port if
306275
* it has at least one pin remaining */
307276
for(auto port_id: clb_netlist.ports()){
@@ -316,21 +285,6 @@ static void sync_clustered_netlist_to_routing(void) {
316285
pins_to_remove.push_back(pin_id);
317286
}
318287
}
319-
=======
320-
for (auto pin_id : clb_netlist.pins()) {
321-
ClusterNetId clb_net_id = clb_netlist.pin_net(pin_id);
322-
auto atom_net_id = atom_lookup.atom_net(clb_net_id);
323-
if (!clock_net_is_routed && atom_net_id && route_ctx.is_clock_net[atom_net_id])
324-
continue;
325-
326-
pins_to_remove.push_back(pin_id);
327-
}
328-
for (auto port_id : clb_netlist.ports()) {
329-
ClusterNetId clb_net_id = clb_netlist.port_net(port_id, 0);
330-
auto atom_net_id = atom_lookup.atom_net(clb_net_id);
331-
if (!clock_net_is_routed && atom_net_id && route_ctx.is_clock_net[atom_net_id])
332-
continue;
333-
>>>>>>> 1e479b90837fdc89cbf9089c691ed58200642fe0
334288

335289
if(!skipped_pins) // All pins have been removed, remove port
336290
ports_to_remove.push_back(port_id);
@@ -380,14 +334,8 @@ static void sync_clustered_netlist_to_routing(void) {
380334
/* OPIN on the tile: create a new clb_net_id and add all ports & pins into here
381335
* Due to how the route tree is traversed, all nodes until the next OPIN on the tile will
382336
* be under this OPIN, so this is valid (we don't need to get the branch explicitly) */
383-
<<<<<<< HEAD
384337
if(node_type == OPIN){
385-
std::string net_name = atom_ctx.nlist.net_name(parent_net_id) + "_" + std::to_string(clb_nets_so_far);
386-
=======
387-
if (node_type == OPIN) {
388-
std::string net_name;
389-
net_name = atom_ctx.netlist().net_name(parent_net_id) + "_" + std::to_string(clb_nets_so_far);
390-
>>>>>>> 1e479b90837fdc89cbf9089c691ed58200642fe0
338+
std::string net_name = atom_ctx.netlist().net_name(parent_net_id) + "_" + std::to_string(clb_nets_so_far);
391339
clb_net_id = clb_netlist.create_net(net_name);
392340
atom_ctx.mutable_lookup().add_atom_clb_net(atom_net_id, clb_net_id);
393341
clb_nets_so_far++;
@@ -460,19 +408,14 @@ static void fixup_atom_pb_graph_pin_mapping(void) {
460408
continue;
461409

462410
/* Find atom port from pbg pin's model port */
463-
<<<<<<< HEAD
464-
AtomPortId atom_port = atom_ctx.nlist.find_atom_port(atb, atom_pbg_pin->port->model_port);
411+
AtomPortId atom_port = atom_ctx.netlist().find_atom_port(atb, atom_pbg_pin->port->model_port);
465412

466413
/* Not an equivalent port, so no need to do fixup */
467414
if (atom_pbg_pin->port->equivalent != PortEquivalence::FULL) {
468415
continue;
469416
}
470417

471-
for(AtomPinId atom_pin: atom_ctx.nlist.port_pins(atom_port)){
472-
=======
473-
AtomPortId atom_port = atom_ctx.netlist().find_atom_port(atb, atom_pbg_pin->port->model_port);
474-
for (AtomPinId atom_pin : atom_ctx.netlist().port_pins(atom_port)) {
475-
>>>>>>> 1e479b90837fdc89cbf9089c691ed58200642fe0
418+
for(AtomPinId atom_pin: atom_ctx.netlist().port_pins(atom_port)){
476419
/* Match net IDs from pb_route and atom netlist and connect in lookup */
477420
if (pb_route.atom_net_id == atom_ctx.netlist().pin_net(atom_pin)) {
478421
atom_ctx.mutable_lookup().set_atom_pin_pb_graph_pin(atom_pin, atom_pbg_pin);

0 commit comments

Comments
 (0)