abc9_ops: -write_box is empty, output a dummy box to prevent ABC error
authorEddie Hung <eddie@fpgeh.com>
Wed, 15 Jan 2020 21:14:48 +0000 (13:14 -0800)
committerEddie Hung <eddie@fpgeh.com>
Wed, 15 Jan 2020 21:14:48 +0000 (13:14 -0800)
passes/techmap/abc9_exe.cc
passes/techmap/abc9_ops.cc
techlibs/common/Makefile.inc
techlibs/common/dummy.box [deleted file]

index a2acfac919a0c57afaaa4e2adbe88cc377f1cc39..484964ddff0055eec55da2840044f8691ca36f65 100644 (file)
@@ -510,9 +510,8 @@ struct Abc9ExePass : public Pass {
                        }
                }
 
-               // ABC expects a box file for XAIG
                if (box_file.empty())
-                       box_file = "+/dummy.box";
+                       log_cmd_error("abc9_exe '-box' option is mandatory.\n");
 
                rewrite_filename(box_file);
                if (!box_file.empty() && !is_absolute_path(box_file) && box_file[0] != '+')
index fd2759ae5c3615ade56e56448b97f7ab14484eba..13340f311a4e28202f3e2fb21d01e7de465f764d 100644 (file)
@@ -569,6 +569,9 @@ void write_box(RTLIL::Module *module, const std::string &src, const std::string
                module->attributes.erase(it);
        }
 
+       if (ofs.tellp() == 0)
+               ofs << "(dummy) 1 0 0 0";
+
        ofs.close();
 }
 
index a42f63128042a766dcf3bc7ed43aeff3fe8bf0d7..42f1068adca724ca7f4c5639199d0b76bd0be12d 100644 (file)
@@ -29,4 +29,3 @@ $(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/mul2dsp.v))
-$(eval $(call add_share_file,share,techlibs/common/dummy.box))
diff --git a/techlibs/common/dummy.box b/techlibs/common/dummy.box
deleted file mode 100644 (file)
index 0c18070..0000000
+++ /dev/null
@@ -1 +0,0 @@
-(dummy) 1 0 0 0