diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-01-15 13:14:48 -0800 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-01-15 13:14:48 -0800 |
commit | 5a63c197477d59567424faab3b56329c426394b9 (patch) | |
tree | 7c3f01af5ce7489342c07b1bc0fff3db0cb7f74b /passes | |
parent | 38aa248385537fcea76d3396c31bbc17f6871972 (diff) | |
download | yosys-5a63c197477d59567424faab3b56329c426394b9.tar.gz yosys-5a63c197477d59567424faab3b56329c426394b9.tar.bz2 yosys-5a63c197477d59567424faab3b56329c426394b9.zip |
abc9_ops: -write_box is empty, output a dummy box to prevent ABC error
Diffstat (limited to 'passes')
-rw-r--r-- | passes/techmap/abc9_exe.cc | 3 | ||||
-rw-r--r-- | passes/techmap/abc9_ops.cc | 3 |
2 files changed, 4 insertions, 2 deletions
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(); } |