From 5a63c197477d59567424faab3b56329c426394b9 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Wed, 15 Jan 2020 13:14:48 -0800 Subject: abc9_ops: -write_box is empty, output a dummy box to prevent ABC error --- passes/techmap/abc9_exe.cc | 3 +-- passes/techmap/abc9_ops.cc | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'passes/techmap') diff --git a/passes/techmap/abc9_exe.cc b/passes/techmap/abc9_exe.cc index a2acfac91..484964ddf 100644 --- a/passes/techmap/abc9_exe.cc +++ b/passes/techmap/abc9_exe.cc @@ -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] != '+') diff --git a/passes/techmap/abc9_ops.cc b/passes/techmap/abc9_ops.cc index fd2759ae5..13340f311 100644 --- a/passes/techmap/abc9_ops.cc +++ b/passes/techmap/abc9_ops.cc @@ -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(); } -- cgit v1.2.3