Skip to content

Commit 2053c65

Browse files
update link bandwidth utilization when traffic flow routes are reverted
1 parent 3eb518f commit 2053c65

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

vpr/src/place/noc_place_utils.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,13 @@ void NocCostHandler::revert_noc_traffic_flow_routes(const t_pl_blocks_to_be_move
309309
for (NocTrafficFlowId traffic_flow_id : assoc_traffic_flows) {
310310
// first check to see whether we have already reverted the current traffic flow and only revert it if we haven't already.
311311
if (reverted_traffic_flows.find(traffic_flow_id) == reverted_traffic_flows.end()) {
312+
const t_noc_traffic_flow& traffic_flow = noc_traffic_flows_storage.get_single_noc_traffic_flow(traffic_flow_id);
313+
314+
// decrease the bandwidth utilization of the links in the current route
315+
update_traffic_flow_link_usage(traffic_flow_routes[traffic_flow_id], -1, traffic_flow.traffic_flow_bandwidth);
316+
// increase the bandwidth utilization of the links in the backup route
317+
update_traffic_flow_link_usage(traffic_flow_routes_backup[traffic_flow_id], +1, traffic_flow.traffic_flow_bandwidth);
318+
312319
// Revert the traffic flow route by restoring the backup
313320
std::swap(traffic_flow_routes[traffic_flow_id], traffic_flow_routes_backup[traffic_flow_id]);
314321

0 commit comments

Comments
 (0)