diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-03-19 20:02:40 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-03-19 20:02:40 +0100 |
commit | bb9374b67c583761f4bdc72dbd19a79940d51082 (patch) | |
tree | 54c59200cb1e032c5099e375dd93c7851afa35b9 /passes | |
parent | b471a32ec3c563bcb02b84a15217beca18b409ab (diff) | |
download | yosys-bb9374b67c583761f4bdc72dbd19a79940d51082.tar.gz yosys-bb9374b67c583761f4bdc72dbd19a79940d51082.tar.bz2 yosys-bb9374b67c583761f4bdc72dbd19a79940d51082.zip |
Improvements in ABCEXTERNAL handling
Diffstat (limited to 'passes')
-rw-r--r-- | passes/techmap/Makefile.inc | 3 | ||||
-rw-r--r-- | passes/techmap/abc.cc | 22 |
2 files changed, 17 insertions, 8 deletions
diff --git a/passes/techmap/Makefile.inc b/passes/techmap/Makefile.inc index 8112516c6..1a34b9eaf 100644 --- a/passes/techmap/Makefile.inc +++ b/passes/techmap/Makefile.inc @@ -7,6 +7,9 @@ OBJS += passes/techmap/libparse.o ifeq ($(ENABLE_ABC),1) OBJS += passes/techmap/abc.o +ifneq ($(ABCEXTERNAL),) +passes/techmap/abc.o: CXXFLAGS += -DABCEXTERNAL='"$(ABCEXTERNAL)"' +endif endif ifneq ($(SMALL),1) diff --git a/passes/techmap/abc.cc b/passes/techmap/abc.cc index 0c72781f2..cddc23661 100644 --- a/passes/techmap/abc.cc +++ b/passes/techmap/abc.cc @@ -29,10 +29,6 @@ // Kahn, Arthur B. (1962), "Topological sorting of large networks", Communications of the ACM 5 (11): 558-562, doi:10.1145/368996.369025 // http://en.wikipedia.org/wiki/Topological_sorting -#ifndef YOSYS_ABC_EXE -#define YOSYS_ABC_EXE "yosys-abc" // uses in-tree ABC by default -#endif - #define ABC_COMMAND_LIB "strash; scorr; ifraig; retime {D}; strash; dch -f; map {D}" #define ABC_COMMAND_CTR "strash; scorr; ifraig; retime {D}; strash; dch -f; map {D}; buffer; upsize {D}; dnsize {D}; stime -p" #define ABC_COMMAND_LUT "strash; scorr; ifraig; retime; strash; dch -f; if; mfs" @@ -1177,7 +1173,11 @@ struct AbcPass : public Pass { log("library to a target architecture.\n"); log("\n"); log(" -exe <command>\n"); - log(" use the specified command name instead of \"" YOSYS_ABC_EXE "\" to execute ABC.\n"); +#ifdef ABCEXTERNAL + log(" use the specified command instead of \"" ABCEXTERNAL "\" to execute ABC.\n"); +#else + log(" use the specified command instead of \"<yosys-bindir>/yosys-abc\" to execute ABC.\n"); +#endif log(" This can e.g. be used to call a specific version of ABC or a wrapper.\n"); log("\n"); log(" -script <file>\n"); @@ -1302,7 +1302,11 @@ struct AbcPass : public Pass { log_header("Executing ABC pass (technology mapping using ABC).\n"); log_push(); - std::string exe_file = proc_self_dirname() + YOSYS_ABC_EXE; +#ifdef ABCEXTERNAL + std::string exe_file = ABCEXTERNAL; +#else + std::string exe_file = proc_self_dirname() + "yosys-abc"; +#endif std::string script_file, liberty_file, constr_file, clk_str, delay_target; bool fast_mode = false, dff_mode = false, keepff = false, cleanup = true; bool show_tempdir = false; @@ -1315,8 +1319,10 @@ struct AbcPass : public Pass { enabled_gates.clear(); #ifdef _WIN32 - if (!check_file_exists(exe_file + ".exe") && check_file_exists(proc_self_dirname() + "..\\" YOSYS_ABC_EXE ".exe")) - exe_file = proc_self_dirname() + "..\\" YOSYS_ABC_EXE; +#ifndef ABCEXTERNAL + if (!check_file_exists(exe_file + ".exe") && check_file_exists(proc_self_dirname() + "..\\yosys-abc.exe")) + exe_file = proc_self_dirname() + "..\\yosys-abc"; +#endif #endif size_t argidx; |