Skip to content

Commit 98b9370

Browse files
committed
vpr: add router profiler a_star factor flag
Signed-off-by: Alessandro Comodi <[email protected]>
1 parent 6b0fd77 commit 98b9370

File tree

6 files changed

+16
-2
lines changed

6 files changed

+16
-2
lines changed

vpr/src/base/SetupVPR.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ static void SetupRoutingArch(const t_arch& Arch,
330330
static void SetupRouterOpts(const t_options& Options, t_router_opts* RouterOpts) {
331331
RouterOpts->do_check_rr_graph = Options.check_rr_graph;
332332
RouterOpts->astar_fac = Options.astar_fac;
333+
RouterOpts->router_profiler_astar_fac = Options.router_profiler_astar_fac;
333334
RouterOpts->bb_factor = Options.bb_factor;
334335
RouterOpts->criticality_exp = Options.criticality_exp;
335336
RouterOpts->max_criticality = Options.max_criticality;

vpr/src/base/ShowSetup.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ static void ShowRouterOpts(const t_router_opts& RouterOpts) {
270270

271271
if (TIMING_DRIVEN == RouterOpts.router_algorithm) {
272272
VTR_LOG("RouterOpts.astar_fac: %f\n", RouterOpts.astar_fac);
273+
VTR_LOG("RouterOpts.router_profiler_astar_fac: %f\n", RouterOpts.router_profiler_astar_fac);
273274
VTR_LOG("RouterOpts.criticality_exp: %f\n", RouterOpts.criticality_exp);
274275
VTR_LOG("RouterOpts.max_criticality: %f\n", RouterOpts.max_criticality);
275276
VTR_LOG("RouterOpts.init_wirelength_abort_threshold: %f\n", RouterOpts.init_wirelength_abort_threshold);
@@ -412,6 +413,7 @@ static void ShowRouterOpts(const t_router_opts& RouterOpts) {
412413
VTR_LOG("RouterOpts.exit_after_first_routing_iteration: %s\n", RouterOpts.exit_after_first_routing_iteration ? "true" : "false");
413414
if (TIMING_DRIVEN == RouterOpts.router_algorithm) {
414415
VTR_LOG("RouterOpts.astar_fac: %f\n", RouterOpts.astar_fac);
416+
VTR_LOG("RouterOpts.router_profiler_astar_fac: %f\n", RouterOpts.router_profiler_astar_fac);
415417
VTR_LOG("RouterOpts.criticality_exp: %f\n", RouterOpts.criticality_exp);
416418
VTR_LOG("RouterOpts.max_criticality: %f\n", RouterOpts.max_criticality);
417419
VTR_LOG("RouterOpts.init_wirelength_abort_threshold: %f\n", RouterOpts.init_wirelength_abort_threshold);

vpr/src/base/read_options.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2000,11 +2000,20 @@ argparse::ArgumentParser create_arg_parser(std::string prog_name, t_options& arg
20002000

20012001
route_timing_grp.add_argument(args.astar_fac, "--astar_fac")
20022002
.help(
2003-
"Controls the directedness of the the timing-driven router's exploration."
2003+
"Controls the directedness of the timing-driven router's exploration."
20042004
" Values between 1 and 2 are resonable; higher values trade some quality for reduced run-time")
20052005
.default_value("1.2")
20062006
.show_in(argparse::ShowIn::HELP_ONLY);
20072007

2008+
route_timing_grp.add_argument(args.router_profiler_astar_fac, "--router_profiler_astar_fac")
2009+
.help(
2010+
"Controls the directedness of the timing-driven router's exploration"
2011+
" when doing router delay profiling."
2012+
" The router delay profiling step is currently used to calculate the place delay matrix lookup."
2013+
" Values between 1 and 2 are resonable; higher values trade some quality for reduced run-time")
2014+
.default_value("1.5")
2015+
.show_in(argparse::ShowIn::HELP_ONLY);
2016+
20082017
route_timing_grp.add_argument(args.max_criticality, "--max_criticality")
20092018
.help(
20102019
"Sets the maximum fraction of routing cost derived from delay (vs routability) for any net."

vpr/src/base/read_options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ struct t_options {
158158

159159
/* Timing-driven router options only */
160160
argparse::ArgValue<float> astar_fac;
161+
argparse::ArgValue<float> router_profiler_astar_fac;
161162
argparse::ArgValue<float> max_criticality;
162163
argparse::ArgValue<float> criticality_exp;
163164
argparse::ArgValue<float> router_init_wirelength_abort_threshold;

vpr/src/base/vpr_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,7 @@ struct t_router_opts {
11901190
enum e_router_algorithm router_algorithm;
11911191
enum e_base_cost_type base_cost_type;
11921192
float astar_fac;
1193+
float router_profiler_astar_fac;
11931194
float max_criticality;
11941195
float criticality_exp;
11951196
float init_wirelength_abort_threshold;

vpr/src/route/router_delay_profiling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ bool RouterDelayProfiler::calculate_delay(int source_node, int sink_node, const
5454

5555
t_conn_cost_params cost_params;
5656
cost_params.criticality = 1.;
57-
cost_params.astar_fac = router_opts.astar_fac;
57+
cost_params.astar_fac = router_opts.router_profiler_astar_fac;
5858
cost_params.bend_cost = router_opts.bend_cost;
5959

6060
route_budgets budgeting_inf;

0 commit comments

Comments
 (0)