Skip to content

Commit

Permalink
fix aggregate bandwidth weighting factor command line option
Browse files Browse the repository at this point in the history
  • Loading branch information
soheilshahrouz committed Mar 4, 2024
1 parent d4ac787 commit 75bb145
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 0 additions & 2 deletions vpr/src/base/SetupVPR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,6 @@ static void SetupNocOpts(const t_options& Options, t_noc_opts* NocOpts) {
NocOpts->noc_congestion_weighting = Options.noc_congestion_weighting;
NocOpts->noc_swap_percentage = Options.noc_swap_percentage;
NocOpts->noc_placement_file_name = Options.noc_placement_file_name;

return;
}

static void find_ipin_cblock_switch_index(const t_arch& Arch, int& wire_to_arch_ipin_switch, int& wire_to_arch_ipin_switch_between_dice) {
Expand Down
3 changes: 2 additions & 1 deletion vpr/src/base/ShowSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ static void ShowPlacerOpts(const t_placer_opts& PlacerOpts,
}

VTR_LOG("PlacerOpts.constraints_file: ");
if (PlacerOpts.constraints_file == "") {
if (PlacerOpts.constraints_file.empty()) {
VTR_LOG("No constraints file given\n");
} else {
VTR_LOG("Using constraints file '%s'\n", PlacerOpts.constraints_file.c_str());
Expand Down Expand Up @@ -795,6 +795,7 @@ static void ShowNocOpts(const t_noc_opts& NocOpts) {
VTR_LOG("NocOpts.noc_flows_file: %s\n", NocOpts.noc_flows_file.c_str());
VTR_LOG("NocOpts.noc_routing_algorithm: %s\n", NocOpts.noc_routing_algorithm.c_str());
VTR_LOG("NocOpts.noc_placement_weighting: %f\n", NocOpts.noc_placement_weighting);
VTR_LOG("NocOpts.noc_aggregate_bandwidth_weighting: %f\n", NocOpts.noc_aggregate_bandwidth_weighting);
VTR_LOG("NocOpts.noc_latency_constraints_weighting: %f\n", NocOpts.noc_latency_constraints_weighting);
VTR_LOG("NocOpts.noc_latency_weighting: %f\n", NocOpts.noc_latency_weighting);
VTR_LOG("NocOpts.noc_congestion_weighting: %f\n", NocOpts.noc_congestion_weighting);
Expand Down
9 changes: 6 additions & 3 deletions vpr/src/base/read_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2823,10 +2823,13 @@ argparse::ArgumentParser create_arg_parser(std::string prog_name, t_options& arg
.default_value("5.0")
.show_in(argparse::ShowIn::HELP_ONLY);

noc_grp.add_argument<double>(args.noc_latency_constraints_weighting, "--noc_aggregate_bandwidth_weighting")
noc_grp.add_argument<double>(args.noc_agg_bandwidth_weighting, "--noc_aggregate_bandwidth_weighting")
.help(
"Controls the importance of meeting all the NoC traffic flow latency constraints."
"This value can be >=0, where 0 would mean the latency constraints have no relevance to placement, a value of 1 would mean the latency constraints are weighted equally to the sum of other placement cost components and a value greater than 1 would mean the placement is increasingly dominated by meeting the latency constraints of the traffic flows.")
"Controls the importance of minimizing the NoC aggregate bandwidth.\n"
"This value can be >=0, where 0 would mean the aggregate bandwidth has no relevance to placement.\n"
"Other positive numbers specify the importance of minimizing the NoC aggregate bandwidth to other NoC-related cost terms.\n"
"Weighting factors for NoC-related cost terms are normalized internally. Therefore, their absolute values are not important, and"
"only their relative ratios determine the importance of each cost term.")
.default_value("0.38")
.show_in(argparse::ShowIn::HELP_ONLY);

Expand Down

0 comments on commit 75bb145

Please sign in to comment.