Skip to content

Commit

Permalink
detemine the number of router iterations when searching for a minimum…
Browse files Browse the repository at this point in the history
… channel width
  • Loading branch information
amin1377 committed May 15, 2023
1 parent 2ca711e commit 9e04c28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 6 additions & 6 deletions vtr_flow/scripts/python_libs/vtr/vpr/vpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions vtr_flow/scripts/run_vtr_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9e04c28

Please sign in to comment.