mirror of https://github.com/YosysHQ/yosys.git
abc9_ops: -write_box is empty, output a dummy box to prevent ABC error
This commit is contained in:
parent
38aa248385
commit
5a63c19747
|
@ -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] != '+')
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
(dummy) 1 0 0 0
|
Loading…
Reference in New Issue