Use a dummy box file if none specified
authorEddie Hung <eddie@fpgeh.com>
Thu, 29 Aug 2019 03:58:55 +0000 (20:58 -0700)
committerEddie Hung <eddie@fpgeh.com>
Thu, 29 Aug 2019 03:58:55 +0000 (20:58 -0700)
passes/techmap/abc9.cc
techlibs/common/Makefile.inc
techlibs/common/dummy.box [new file with mode: 0644]

index 968c68b70b31a250407c3a6e98bbb27271398ea8..11fe9c4a54a9a09b43e25f7bd700e7636f839ce5 100644 (file)
@@ -1027,9 +1027,6 @@ struct Abc9Pass : public Pass {
                        }
                        if (arg == "-box" && argidx+1 < args.size()) {
                                box_file = args[++argidx];
-                               rewrite_filename(box_file);
-                               if (!box_file.empty() && !is_absolute_path(box_file))
-                                       box_file = std::string(pwd) + "/" + box_file;
                                continue;
                        }
                        if (arg == "-W" && argidx+1 < args.size()) {
@@ -1040,6 +1037,14 @@ struct Abc9Pass : public Pass {
                }
                extra_args(args, argidx, design);
 
+               // ABC expects a box file for XAIG
+               if (box_file.empty())
+                   box_file = "+/dummy.box";
+
+               rewrite_filename(box_file);
+               if (!box_file.empty() && !is_absolute_path(box_file))
+                   box_file = std::string(pwd) + "/" + box_file;
+
                dict<int,IdString> box_lookup;
                for (auto m : design->modules()) {
                        auto it = m->attributes.find(ID(abc_box_id));
index 0e05620bc6e9250d674f3a3ab462523d8b25f056..de94798af6e5f9dcdfc51c795e141d9a3f4710f0 100644 (file)
@@ -28,3 +28,4 @@ $(eval $(call add_share_file,share,techlibs/common/dff2ff.v))
 $(eval $(call add_share_file,share,techlibs/common/gate2lut.v))
 $(eval $(call add_share_file,share,techlibs/common/cmp2lut.v))
 $(eval $(call add_share_file,share,techlibs/common/cells.lib))
+$(eval $(call add_share_file,share,techlibs/common/dummy.box))
diff --git a/techlibs/common/dummy.box b/techlibs/common/dummy.box
new file mode 100644 (file)
index 0000000..0c18070
--- /dev/null
@@ -0,0 +1 @@
+(dummy) 1 0 0 0