From 9e04c2848101b8206c28812385bda73bb5aaa539 Mon Sep 17 00:00:00 2001 From: amin1377 Date: Mon, 15 May 2023 12:57:03 -0400 Subject: [PATCH 1/2] detemine the number of router iterations when searching for a minimum channel width --- vtr_flow/scripts/python_libs/vtr/vpr/vpr.py | 12 ++++++------ vtr_flow/scripts/run_vtr_flow.py | 3 +-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/vtr_flow/scripts/python_libs/vtr/vpr/vpr.py b/vtr_flow/scripts/python_libs/vtr/vpr/vpr.py index 180f5473bf0..208d5ab6082 100644 --- a/vtr_flow/scripts/python_libs/vtr/vpr/vpr.py +++ b/vtr_flow/scripts/python_libs/vtr/vpr/vpr.py @@ -70,11 +70,11 @@ def run_relax_w( vpr_min_w_log = ".".join([logfile_base, "out"]) vpr_relaxed_w_log = ".".join([logfile_base, "crit_path", "out"]) - max_router_iterations = None + crit_path_router_iterations = None - if "max_router_iterations" in vpr_args: - max_router_iterations = vpr_args["max_router_iterations"] - del vpr_args["max_router_iterations"] + if "crit_path_router_iterations" in vpr_args: + crit_path_router_iterations = vpr_args["crit_path_router_iterations"] + del vpr_args["crit_path_router_iterations"] if "write_rr_graph" in vpr_args: del vpr_args["write_rr_graph"] @@ -96,8 +96,8 @@ def run_relax_w( if explicit and "route" not in vpr_args: # Don't look for min W if routing was not run return - if max_router_iterations: - vpr_args["max_router_iterations"] = max_router_iterations + if crit_path_router_iterations: + vpr_args["max_router_iterations"] = crit_path_router_iterations min_w = determine_min_w(str(temp_dir / vpr_min_w_log)) relaxed_w = relax_w(min_w, relax_w_factor) diff --git a/vtr_flow/scripts/run_vtr_flow.py b/vtr_flow/scripts/run_vtr_flow.py index 384e409dad8..fd65d4467e7 100755 --- a/vtr_flow/scripts/run_vtr_flow.py +++ b/vtr_flow/scripts/run_vtr_flow.py @@ -704,8 +704,7 @@ def process_vpr_args(args, prog, temp_dir, vpr_args): Finds arguments needed in the VPR stage of the flow """ if args.crit_path_router_iterations: - if "max_router_iterations" not in vpr_args: - vpr_args["max_router_iterations"] = args.crit_path_router_iterations + vpr_args["crit_path_router_iterations"] = args.crit_path_router_iterations if args.fix_pins: new_file = str(temp_dir / Path(args.fix_pins).name) shutil.copyfile(str((Path(prog).parent.parent / args.fix_pins)), new_file) From 271eebdc168feb4182707bc995c0a2aedeb4d3e2 Mon Sep 17 00:00:00 2001 From: amin1377 Date: Mon, 22 May 2023 15:25:03 -0400 Subject: [PATCH 2/2] remove crit_path_router_iterations from vpr_args when a fixed chan is used --- vtr_flow/scripts/python_libs/vtr/vpr/vpr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vtr_flow/scripts/python_libs/vtr/vpr/vpr.py b/vtr_flow/scripts/python_libs/vtr/vpr/vpr.py index 208d5ab6082..b7509c1e700 100644 --- a/vtr_flow/scripts/python_libs/vtr/vpr/vpr.py +++ b/vtr_flow/scripts/python_libs/vtr/vpr/vpr.py @@ -165,6 +165,8 @@ def run( """ + if "crit_path_router_iterations" in vpr_args: + del vpr_args["crit_path_router_iterations"] if vpr_args is None: vpr_args = OrderedDict()