Skip to content

Commit ebfe441

Browse files
committed
removed unused parameter within the noc placement normalization factors update routine
1 parent 6b7be47 commit ebfe441

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

vpr/src/place/noc_place_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ void recompute_noc_costs(double* new_noc_aggregate_bandwidth_cost, double* new_n
252252
return;
253253
}
254254

255-
void update_noc_normalization_factors(t_placer_costs& costs, const t_placer_opts& placer_opts) {
255+
void update_noc_normalization_factors(t_placer_costs& costs) {
256256
//Prevent the norm factors from going to infinity
257257
costs.noc_aggregate_bandwidth_cost_norm = std::min(1 / costs.noc_aggregate_bandwidth_cost, MAX_INV_NOC_AGGREGATE_BANDWIDTH_COST);
258258
costs.noc_latency_cost_norm = std::min(1 / costs.noc_latency_cost, MAX_INV_NOC_LATENCY_COST);

vpr/src/place/noc_place_utils.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,17 +263,15 @@ void recompute_noc_costs(double* new_noc_aggregate_bandwidth_cost, double* new_n
263263

264264
/**
265265
* @brief Updates all the cost normalization factors relevant to the NoC.
266-
* Also updates the placement cost depending on the placment mode.
267266
* Handles exceptional cases so that the normalization factors do not
268267
* reach INF.
269268
* This is intended to be used to initialize the normalization factors of
270269
* the NoC and also at the outer loop iteration of placement to
271270
* balance the NoC costs with other placment cost parameters.
272271
*
273272
* @param costs Contains the normalization factors which need to be updated
274-
* @param placer_opts Determines the placement mode
275273
*/
276-
void update_noc_normalization_factors(t_placer_costs& costs, const t_placer_opts& placer_opts);
274+
void update_noc_normalization_factors(t_placer_costs& costs);
277275

278276
/**
279277
* @brief Calculates the aggregate bandwidth of each traffic flow in the NoC

vpr/src/place/place.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ void try_place(const Netlist<>& net_list,
661661
costs.noc_latency_cost = comp_noc_latency_cost(noc_opts);
662662

663663
// initialize all the noc normalization factors
664-
update_noc_normalization_factors(costs, placer_opts);
664+
update_noc_normalization_factors(costs);
665665
}
666666

667667
// set the starting total placement cost
@@ -1960,7 +1960,7 @@ static void update_placement_cost_normalization_factors(t_placer_costs* costs, c
19601960

19611961
// update the noc normalization factors if the palcement includes the NoC
19621962
if (noc_opts.noc) {
1963-
update_noc_normalization_factors(*costs, placer_opts);
1963+
update_noc_normalization_factors(*costs);
19641964
}
19651965

19661966
// update the current total placement cost

vpr/test/test_noc_place_utils.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ TEST_CASE("test_update_noc_normalization_factors", "[noc_place_utils]") {
10611061
costs.noc_latency_cost = 1.;
10621062

10631063
// run the test function
1064-
update_noc_normalization_factors(costs, placer_opts);
1064+
update_noc_normalization_factors(costs);
10651065

10661066
// verify the aggregate bandwidth normalized cost
10671067
// this should not be +INF and instead trimmed
@@ -1072,7 +1072,7 @@ TEST_CASE("test_update_noc_normalization_factors", "[noc_place_utils]") {
10721072
costs.noc_latency_cost = 0.;
10731073

10741074
// run the test function
1075-
update_noc_normalization_factors(costs, placer_opts);
1075+
update_noc_normalization_factors(costs);
10761076

10771077
// verify the latency normalized cost
10781078
// this should not be +INF and instead trimmed
@@ -1083,7 +1083,7 @@ TEST_CASE("test_update_noc_normalization_factors", "[noc_place_utils]") {
10831083
costs.noc_latency_cost = 0.;
10841084

10851085
// run the test function
1086-
update_noc_normalization_factors(costs, placer_opts);
1086+
update_noc_normalization_factors(costs);
10871087

10881088
// verify the aggregate bandwidth normalized cost
10891089
// this should not be trimmed
@@ -1094,7 +1094,7 @@ TEST_CASE("test_update_noc_normalization_factors", "[noc_place_utils]") {
10941094
costs.noc_latency_cost = 50.e-12;
10951095

10961096
// run the test function
1097-
update_noc_normalization_factors(costs, placer_opts);
1097+
update_noc_normalization_factors(costs);
10981098

10991099
// verify the latency normalized cost
11001100
// this should not be trimmed
@@ -1105,7 +1105,7 @@ TEST_CASE("test_update_noc_normalization_factors", "[noc_place_utils]") {
11051105
costs.noc_latency_cost = 999.e-15;
11061106

11071107
// run the test function
1108-
update_noc_normalization_factors(costs, placer_opts);
1108+
update_noc_normalization_factors(costs);
11091109

11101110
// verify the latency normalized cost
11111111
// this should not be trimmed

0 commit comments

Comments
 (0)