Skip to content

Commit fc478bd

Browse files
committed
oops
1 parent 4e8a98a commit fc478bd

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

vpr/src/pack/sync_netlists_to_routing_flat.cpp

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,28 +295,47 @@ static void sync_clustered_netlist_to_routing(void){
295295
/* 1. Remove all nets, pins and ports from the clustered netlist.
296296
* If the clock net is not routed, don't remove entries for the clock net
297297
* otherwise we won't have data to rebuild them. */
298+
std::vector<ClusterNetId> nets_to_remove;
299+
std::vector<ClusterPinId> pins_to_remove;
300+
std::vector<ClusterPortId> ports_to_remove;
301+
298302
for(auto net_id: clb_netlist.nets()){
299303
auto atom_net_id = atom_lookup.atom_net(net_id);
300304
if(!clock_net_is_routed && route_ctx.is_clock_net[atom_net_id])
301305
continue;
302306

303-
clb_netlist.remove_net(net_id);
304-
atom_lookup.remove_clb_net(net_id);
307+
nets_to_remove.push_back(net_id);
305308
}
306309
for(auto pin_id: clb_netlist.pins()){
307310
ClusterNetId clb_net_id = clb_netlist.pin_net(pin_id);
308311
auto atom_net_id = atom_lookup.atom_net(clb_net_id);
309312
if(!clock_net_is_routed && atom_net_id && route_ctx.is_clock_net[atom_net_id])
310313
continue;
311-
clb_netlist.remove_pin(pin_id);
314+
315+
pins_to_remove.push_back(pin_id);
312316
}
313317
for(auto port_id: clb_netlist.ports()){
314318
ClusterNetId clb_net_id = clb_netlist.port_net(port_id, 0);
315319
auto atom_net_id = atom_lookup.atom_net(clb_net_id);
316320
if(!clock_net_is_routed && atom_net_id && route_ctx.is_clock_net[atom_net_id])
317321
continue;
322+
323+
ports_to_remove.push_back(port_id);
324+
}
325+
326+
/* ClusteredNetlist's iterators rely on internal lookups, so we mark for removal
327+
* while iterating, then remove in bulk */
328+
for(auto net_id: nets_to_remove){
329+
clb_netlist.remove_net(net_id);
330+
atom_lookup.remove_clb_net(net_id);
331+
}
332+
for(auto pin_id: pins_to_remove){
333+
clb_netlist.remove_pin(pin_id);
334+
}
335+
for(auto port_id: ports_to_remove){
318336
clb_netlist.remove_port(port_id);
319337
}
338+
320339
/* 2. Reset all internal lookups for netlist */
321340
auto remapped = clb_netlist.compress();
322341
rebuild_atom_nets_lookup(remapped);

vtr_flow/tasks/regression_tests/vtr_reg_basic/task_list.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ regression_tests/vtr_reg_basic/basic_timing
77
regression_tests/vtr_reg_basic/basic_timing_no_sdc
88
regression_tests/vtr_reg_basic/hdl_include_yosys
99
regression_tests/vtr_reg_basic/hdl_include_yosys
10-
regression_tests/vtr_reg_strong/strong_flat_router

0 commit comments

Comments
 (0)