techmap: use +/techmap.v instead of an ad-hoc code generator.
authorwhitequark <whitequark@whitequark.org>
Tue, 2 Jun 2020 22:19:34 +0000 (22:19 +0000)
committerwhitequark <whitequark@whitequark.org>
Tue, 2 Jun 2020 23:43:20 +0000 (23:43 +0000)
passes/techmap/.gitignore [deleted file]
passes/techmap/Makefile.inc
passes/techmap/techmap.cc

diff --git a/passes/techmap/.gitignore b/passes/techmap/.gitignore
deleted file mode 100644 (file)
index e6dcc6b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-techmap.inc
index 1802ba0de446c6d27c3f4bde7c64caa756c2d366..873286608dc6f3983360a07f6c1b7d88e2dfcf3e 100644 (file)
@@ -45,18 +45,6 @@ OBJS += passes/techmap/flowmap.o
 OBJS += passes/techmap/extractinv.o
 endif
 
-GENFILES += passes/techmap/techmap.inc
-
-passes/techmap/techmap.inc: techlibs/common/techmap.v
-       $(Q) mkdir -p $(dir $@)
-       $(P) echo "// autogenerated from $<" > $@.new
-       $(Q) echo "static char stdcells_code[] = {" >> $@.new
-       $(Q) od -v -td1 -An $< | $(SED) -e 's/[0-9][0-9]*/&,/g' >> $@.new
-       $(Q) echo "0};" >> $@.new
-       $(Q) mv $@.new $@
-
-passes/techmap/techmap.o: passes/techmap/techmap.inc
-
 ifeq ($(DISABLE_SPAWN),0)
 TARGETS += $(PROGRAM_PREFIX)yosys-filterlib$(EXE)
 EXTRA_OBJS += passes/techmap/filterlib.o
index 6ac1d111361036b4e9d3155921751bc840cb4464..fc24c33b0fa3af0bc2ad5029879c6d5f6a1f5bea 100644 (file)
@@ -27,7 +27,6 @@
 #include <string.h>
 
 #include "simplemap.h"
-#include "passes/techmap/techmap.inc"
 
 YOSYS_NAMESPACE_BEGIN
 
@@ -1282,8 +1281,7 @@ struct TechmapPass : public Pass {
 
                RTLIL::Design *map = new RTLIL::Design;
                if (map_files.empty()) {
-                       std::istringstream f(stdcells_code);
-                       Frontend::frontend_call(map, &f, "<techmap.v>", verilog_frontend);
+                       Frontend::frontend_call(map, nullptr, "+/techmap.v", verilog_frontend);
                } else {
                        for (auto &fn : map_files)
                                if (fn.compare(0, 1, "%") == 0) {