@@ -300,7 +300,7 @@ std::tuple<double, double, double> NetCostHandler::comp_cube_bb_cong_cost_(e_cos
300
300
}
301
301
302
302
// Now that all bounding boxes are computed from scratch, we recompute the channel utilization
303
- estimate_routing_chann_util ();
303
+ // estimate_routing_chann_util();
304
304
305
305
// Compute congestion cost using recomputed bounding boxes and channel utilization map
306
306
for (ClusterNetId net_id : cluster_ctx.clb_nlist .nets ()) {
@@ -1564,8 +1564,8 @@ std::pair<double, double> NetCostHandler::recompute_bb_cong_cost_() {
1564
1564
}
1565
1565
1566
1566
static double wirelength_crossing_count (size_t fanout) {
1567
- /* Get the expected "crossing count" of a net, based on its number *
1568
- * of pins. Extrapolate for very large nets. */
1567
+ /* Get the expected "crossing count" of a net, based on its number
1568
+ * of pins. Extrapolate for very large nets. */
1569
1569
1570
1570
if (fanout > MAX_FANOUT_CROSSING_COUNT) {
1571
1571
return 2.7933 + 0.02616 * (fanout - MAX_FANOUT_CROSSING_COUNT);
@@ -1710,7 +1710,7 @@ double NetCostHandler::get_total_wirelength_estimate() const {
1710
1710
return estimated_wirelength;
1711
1711
}
1712
1712
1713
- void NetCostHandler::estimate_routing_chann_util () {
1713
+ double NetCostHandler::estimate_routing_chann_util () {
1714
1714
const auto & cluster_ctx = g_vpr_ctx.clustering ();
1715
1715
const auto & device_ctx = g_vpr_ctx.device ();
1716
1716
@@ -1757,6 +1757,17 @@ void NetCostHandler::estimate_routing_chann_util() {
1757
1757
1758
1758
acc_chanx_util_ = vtr::PrefixSum2D<double >(chanx_util_);
1759
1759
acc_chany_util_ = vtr::PrefixSum2D<double >(chany_util_);
1760
+
1761
+ double cong_cost = 0 .;
1762
+ // Compute congestion cost using recomputed bounding boxes and channel utilization map
1763
+ for (ClusterNetId net_id : cluster_ctx.clb_nlist .nets ()) {
1764
+ if (!cluster_ctx.clb_nlist .net_is_ignored (net_id)) {
1765
+ net_cong_cost_[net_id] = get_net_cube_cong_cost_ (net_id, /* use_ts=*/ false );
1766
+ cong_cost += net_cong_cost_[net_id];
1767
+ }
1768
+ }
1769
+
1770
+ return cong_cost;
1760
1771
}
1761
1772
1762
1773
void NetCostHandler::set_ts_bb_coord_ (const ClusterNetId net_id) {
0 commit comments