Adding a check if args.yosys_tmpl is defined

This commit is contained in:
Lalit Sharma 2021-04-19 05:03:18 -07:00
parent b3e71122f7
commit d6d3b7e6a2
1 changed files with 5 additions and 4 deletions

View File

@ -498,10 +498,11 @@ def run_yosys_with_abc():
def_tmpl_yosys_file = "ys_tmpl_yosys_vpr_flow.ys"
yosys_file="yosys.ys"
file_extension = os.path.splitext(args.yosys_tmpl)[1]
if file_extension is not None:
def_tmpl_yosys_file = "ys_tmpl_yosys_vpr_flow"+file_extension
yosys_file="yosys"+file_extension
if args.yosys_tmpl:
file_extension = os.path.splitext(args.yosys_tmpl)[1]
if file_extension is not None:
def_tmpl_yosys_file = "ys_tmpl_yosys_vpr_flow"+file_extension
yosys_file="yosys"+file_extension
yosys_template = args.yosys_tmpl if args.yosys_tmpl else os.path.join(
cad_tools["misc_dir"], def_tmpl_yosys_file)