From 11d4b156b48b1e3a790750b519349f2fe2816743 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Mon, 30 Nov 2020 22:41:29 -0700 Subject: [PATCH] [Testbench] Bug fix in finding scripts --- TESTBENCH/common/generate_post_pnr_testbenches.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TESTBENCH/common/generate_post_pnr_testbenches.py b/TESTBENCH/common/generate_post_pnr_testbenches.py index 962cdef..502905e 100644 --- a/TESTBENCH/common/generate_post_pnr_testbenches.py +++ b/TESTBENCH/common/generate_post_pnr_testbenches.py @@ -40,6 +40,7 @@ args = parser.parse_args() ##################################################################### logging.info("Finding pre-PnR testbenches..."); +script_base_dir_abspath = dirname(os.path.abspath(__file__)) pre_pnr_testbench_dir_abspath = abspath(args.pre_pnr_testbench_dir_name) + "/prepnr/verilog_testbench"; # Count how many testbenches have been converted @@ -69,7 +70,7 @@ for curr_pre_pnr_testbench_file in pre_pnr_testbench_files: logging.info("Processing " + curr_pre_pnr_testbench_file + " testbench:") curr_post_pnr_testbench_file = re.sub("_autocheck_top_tb.v$", "_post_pnr_autocheck_top_tb.v", curr_pre_pnr_testbench_file) curr_post_pnr_testbench_file = re.sub("\/prepnr\/", "\/postpnr\/", curr_post_pnr_testbench_file) - cmd = "python3 ./post_pnr_testbench_converter.py " \ + cmd = "python3 " + script_base_dir_abspath + "/post_pnr_testbench_converter.py " \ + " --pre_pnr_testbench " + curr_pre_pnr_testbench_file \ + " --post_pnr_testbench " + curr_post_pnr_testbench_file subprocess.run(cmd, shell=True, check=True) @@ -87,7 +88,7 @@ for curr_pre_pnr_testbench_file in pre_pnr_testbench_files: curr_post_pnr_testbench_file = re.sub("\/prepnr\/", "\/postpnr\/", curr_post_pnr_testbench_file) curr_wrapper_testbench_file = re.sub("_autocheck_top_tb.v$", "_wrapper_autocheck_top_tb.v", curr_post_pnr_testbench_file) logging.info("Processing " + curr_post_pnr_testbench_file + " testbench:") - cmd = "python3 ./post_pnr_wrapper_testbench_converter.py " \ + cmd = "python3 " + script_base_dir_abspath + "./post_pnr_wrapper_testbench_converter.py " \ + " --post_pnr_testbench " + curr_post_pnr_testbench_file \ + " --pin_assignment_file " + args.pin_assignment_file \ + " --wrapper_testbench " + curr_wrapper_testbench_file