aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2020-11-06 14:17:15 +0100
committerMiodrag Milanovic <mmicko@gmail.com>2020-11-06 14:17:15 +0100
commit829b5cca602984e67c756d9c81b40e55e32be779 (patch)
tree4aa4f9a2fe56fcf665dd16682032d312bec2871e /passes/techmap
parente7f36d01e44fb76b2352606ee6c7001662a7c638 (diff)
downloadyosys-829b5cca602984e67c756d9c81b40e55e32be779.tar.gz
yosys-829b5cca602984e67c756d9c81b40e55e32be779.tar.bz2
yosys-829b5cca602984e67c756d9c81b40e55e32be779.zip
Expose abc and data paths as globals
Diffstat (limited to 'passes/techmap')
-rw-r--r--passes/techmap/abc.cc18
-rw-r--r--passes/techmap/abc9_exe.cc13
2 files changed, 2 insertions, 29 deletions
diff --git a/passes/techmap/abc.cc b/passes/techmap/abc.cc
index 66ac6828f..192e39372 100644
--- a/passes/techmap/abc.cc
+++ b/passes/techmap/abc.cc
@@ -1470,16 +1470,7 @@ struct AbcPass : public Pass {
pi_map.clear();
po_map.clear();
-#ifdef ABCEXTERNAL
- std::string exe_file;
- if (std::getenv("ABC")) {
- exe_file = std::getenv("ABC");
- } else {
- exe_file = ABCEXTERNAL;
- }
-#else
- std::string exe_file = proc_self_dirname() + proc_program_prefix() + "yosys-abc";
-#endif
+ std::string exe_file = yosys_abc_executable;
std::string script_file, liberty_file, constr_file, clk_str;
std::string delay_target, sop_inputs, sop_products, lutin_shared = "-S 1";
bool fast_mode = false, dff_mode = false, keepff = false, cleanup = true;
@@ -1494,13 +1485,6 @@ struct AbcPass : public Pass {
enabled_gates.clear();
cmos_cost = false;
-#ifdef _WIN32
-#ifndef ABCEXTERNAL
- if (!check_file_exists(exe_file + ".exe") && check_file_exists(proc_self_dirname() + "..\\" + proc_program_prefix()+ "yosys-abc.exe"))
- exe_file = proc_self_dirname() + "..\\" + proc_program_prefix() + "yosys-abc";
-#endif
-#endif
-
// get arguments from scratchpad first, then override by command arguments
std::string lut_arg, luts_arg, g_arg;
exe_file = design->scratchpad_get_string("abc.exe", exe_file /* inherit default value if not set */);
diff --git a/passes/techmap/abc9_exe.cc b/passes/techmap/abc9_exe.cc
index 7355840aa..b916b049d 100644
--- a/passes/techmap/abc9_exe.cc
+++ b/passes/techmap/abc9_exe.cc
@@ -379,11 +379,7 @@ struct Abc9ExePass : public Pass {
{
log_header(design, "Executing ABC9_EXE pass (technology mapping using ABC9).\n");
-#ifdef ABCEXTERNAL
- std::string exe_file = ABCEXTERNAL;
-#else
- std::string exe_file = proc_self_dirname() + proc_program_prefix()+ "yosys-abc";
-#endif
+ std::string exe_file = yosys_abc_executable;
std::string script_file, clk_str, box_file, lut_file;
std::string delay_target, lutin_shared = "-S 1", wire_delay;
std::string tempdir_name;
@@ -396,13 +392,6 @@ struct Abc9ExePass : public Pass {
show_tempdir = true;
#endif
-#ifdef _WIN32
-#ifndef ABCEXTERNAL
- if (!check_file_exists(exe_file + ".exe") && check_file_exists(proc_self_dirname() + "..\\" + proc_program_prefix() + "yosys-abc.exe"))
- exe_file = proc_self_dirname() + "..\\" + proc_program_prefix() + "yosys-abc";
-#endif
-#endif
-
std::string lut_arg, luts_arg;
exe_file = design->scratchpad_get_string("abc9.exe", exe_file /* inherit default value if not set */);
script_file = design->scratchpad_get_string("abc9.script", script_file);