Skip to content

Commit 5ff98e7

Browse files
add get_link_used_bandwidth() to NocCostHandler
1 parent 7fd83b6 commit 5ff98e7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

vpr/src/place/noc_place_utils.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,10 @@ double NocCostHandler::get_total_congestion_bandwidth_ratio() const {
790790
return accum_congestion_ratio;
791791
}
792792

793+
double NocCostHandler::get_link_used_bandwidth(NocLinkId link_id) const {
794+
return link_bandwidth_usages[link_id];
795+
}
796+
793797
std::vector<NocLink> NocCostHandler::get_top_n_congested_links(int n) {
794798
// get NoC links
795799
vtr::vector<NocLinkId, NocLink> noc_links = g_vpr_ctx.noc().noc_model.get_noc_links();

vpr/src/place/noc_place_utils.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,11 @@ class NocCostHandler {
279279
*/
280280
double get_total_congestion_bandwidth_ratio() const;
281281

282+
/**
283+
* @brief Returns the utilized bandwidth of a NoC link.
284+
* @param link_id The Id of the NoC link whose used bandwidth is desired.
285+
* @return The used bandwidth of the given NoC link.
286+
*/
282287
double get_link_used_bandwidth(NocLinkId link_id) const;
283288

284289
/**
@@ -505,6 +510,9 @@ class NocCostHandler {
505510

506511
///Represents the bandwidth of the data being transmitted on the link. Units in bits-per-second(bps)
507512
vtr::vector<NocLinkId, double> link_bandwidth_usages;
513+
514+
515+
friend void test_revert_noc_traffic_flow_routes();
508516
};
509517

510518
/**

0 commit comments

Comments
 (0)