diff --git a/tools/tacle-check/lib/tb_wcet.py b/tools/tacle-check/lib/tb_wcet.py index 4261334d8603ed0396ce1889df6ff70d02a8c70f..4cae5e60637bac529838ca7daf02546e0fe0695d 100644 --- a/tools/tacle-check/lib/tb_wcet.py +++ b/tools/tacle-check/lib/tb_wcet.py @@ -452,6 +452,10 @@ def write_WCET_result_csv(wcet_result_file, reports): #######################################################################3 +_ARM_INC_PATH = "~/neo/system/include/" +_ARM_LIB_PATH = "~/neo/system/lib/libs/" +_ARM_PML_PATH = "~/neo/system/lib/pmls/" +_ARM_OBJ_PATH = "~/neo/system/objects/" def compile_to_one_IR_file(patmos_clang, bench_files, bench_name, bench_dir, result_dir, compile_output, ll_file, timeout, verbose): tmp_files = [] @@ -460,8 +464,8 @@ def compile_to_one_IR_file(patmos_clang, bench_files, bench_name, bench_dir, res tmp_file = os.path.join(result_dir, filename + "_tmp.ll") argv_build_tmp = [patmos_clang] argv_build_tmp.extend(['-target', 'armv6m-none-eabi', '-emit-llvm', '-S', '-O3', '-o', tmp_file]) - argv_build_tmp.append('-I'+os.path.expanduser("~/neo/system/include")) - argv_build_tmp.append('-I'+os.path.expanduser("~/neo/system/include/MKL46Z4/include/")) + argv_build_tmp.append('-I'+os.path.expanduser(_ARM_INC_PATH)) + argv_build_tmp.append('-I'+os.path.expanduser(_ARM_INC_PATH+"MKL46Z4/include/")) argv_build_tmp.append('-I'+bench_dir) argv_build_tmp.append(bench_file) tmp_files.append(tmp_file) @@ -508,10 +512,10 @@ def process_arm_benchmark(benchmark_name, files, out_dir, patmos_clang, patmos_c eu.mkdir_p(result_dir) linker_file = os.path.expanduser("~/neo/system/memory_kl4x.ld") - helper_objs = os.listdir(os.path.expanduser("~/neo/system/objects")) + helper_objs = os.listdir(os.path.expanduser(_ARM_OBJ_PATH)) map_file = os.path.join(result_dir, benchmark_name + ".map") - f = lambda x : os.path.join(os.path.expanduser("~/neo/system/objects"), x) + f = lambda x : os.path.join(os.path.expanduser(_ARM_OBJ_PATH), x) helper_objs = map(f,helper_objs) result_file = os.path.join(out_dir, _WCET_ARM_RESULT_NAME, benchmark_name, 'wcet_results.txt') @@ -549,8 +553,8 @@ def process_arm_benchmark(benchmark_name, files, out_dir, patmos_clang, patmos_c else: argv_build_ll = [patmos_clang] argv_build_ll.extend(['-target', 'armv6m-none-eabi', '-emit-llvm', '-S', '-O3', '-o', ll_file]) - argv_build_ll.append('-I'+os.path.expanduser("~/neo/system/include")) - argv_build_ll.append('-I'+os.path.expanduser("~/neo/system/include/MKL46Z4/include/")) + argv_build_ll.append('-I'+os.path.expanduser(_ARM_INC_PATH)) + argv_build_ll.append('-I'+os.path.expanduser(_ARM_INC_PATH+"MKL46Z4/include/")) argv_build_ll.append('-I'+bench_dir) argv_build_ll.extend(files) @@ -563,8 +567,8 @@ def process_arm_benchmark(benchmark_name, files, out_dir, patmos_clang, patmos_c bench_pml = os.path.join(result_dir, benchmark_name + '.pml') argv = [patmos_clang] argv.extend(['-target', 'armv6m-none-eabi', '-c', '-O3', '-o', ofile]) - argv.append('-I'+os.path.expanduser("~/neo/system/include")) - argv.append('-I'+os.path.expanduser("~/neo/system/include/MKL46Z4/include/")) + argv.append('-I'+os.path.expanduser(_ARM_INC_PATH)) + argv.append('-I'+os.path.expanduser(_ARM_INC_PATH+"MKL46Z4/include/")) argv.append('-I'+bench_dir) argv.extend(['-mllvm', '-mserialize=' + bench_pml, '-mllvm', '-mserialize-all', '-integrated-as', '-ccc-gcc-name', 'arm-none-eabi-gcc', '--specs=nosys.specs']) @@ -601,8 +605,8 @@ def process_arm_benchmark(benchmark_name, files, out_dir, patmos_clang, patmos_c argv.extend(helper_objs) argv.extend(['-g3','-nostdlib', '-Xlinker', '-Map='+str(map_file), '-Xlinker', '--gc-sections', '-T', linker_file]) argv.append('-I'+bench_dir) - argv.append('-I'+os.path.expanduser("~/neo/system/include")) - argv.append('-L'+os.path.expanduser("~/neo/system/include")) + argv.append('-I'+os.path.expanduser(_ARM_INC_PATH)) + argv.append('-L'+os.path.expanduser(_ARM_LIB_PATH)) argv.append('-lneofpu') argv.append('-lneodiv') argv.append('-lneomem') @@ -636,9 +640,9 @@ def process_arm_benchmark(benchmark_name, files, out_dir, patmos_clang, patmos_c argv4 = [platin, 'wcet', '-i', config_pml, '--enable-wca', '-b', elf, '--disable-ait', '-e', entry, '-i', bench_pml, - '-i', os.path.expanduser("~/neo/system/lib/arm-fpu/libneofpu.pml"), - '-i', os.path.expanduser("~/neo/system/lib/arm-div/libneodiv.pml"), - '-i', os.path.expanduser("~/neo/system/lib/arm-mem/libneomem.pml"), + '-i', os.path.expanduser(_ARM_PML_PATH+"libneofpu.pml"), + '-i', os.path.expanduser(_ARM_PML_PATH+"libneodiv.pml"), + '-i', os.path.expanduser(_ARM_PML_PATH+"libneomem.pml"), '-o', wcet_pml, '--outdir', result_dir, '--report', platin_report] if use_gurobi: argv4.append('--wca-use-gurobi')