if (design->scratchpad_get_bool("abc9.nomfs"))
for (size_t pos = abc9_script.find("&mfs"); pos != std::string::npos; pos = abc9_script.find("&mfs", pos))
abc9_script = abc9_script.erase(pos, strlen("&mfs"));
+ else {
+ auto s = stringf("&write -n %s/output.aig; ", tempdir_name.c_str());
+ for (size_t pos = abc9_script.find("&mfs"); pos != std::string::npos; pos = abc9_script.find("&mfs", pos)) {
+ abc9_script = abc9_script.insert(pos, s);
+ pos += GetSize(s) + strlen("&mfs");
+ }
+ }
abc9_script += stringf("; &ps -l; &write -n %s/output.aig", tempdir_name.c_str());
if (design->scratchpad_get_bool("abc9.verify")) {
free(abc9_argv[2]);
free(abc9_argv[3]);
#endif
- if (ret != 0)
- log_error("ABC: execution of command \"%s\" failed: return code %d.\n", buffer.c_str(), ret);
+ if (ret != 0) {
+ if (check_file_exists(stringf("%s/output.aig", tempdir_name.c_str())))
+ log_warning("ABC: execution of command \"%s\" failed: return code %d.\n", buffer.c_str(), ret);
+ else
+ log_error("ABC: execution of command \"%s\" failed: return code %d.\n", buffer.c_str(), ret);
+ }
}
struct Abc9ExePass : public Pass {
if (abc9) {
run("read_verilog -icells -lib -specify +/abc9_model.v +/ecp5/abc9_model.v");
- if (!help_mode && !active_design->scratchpad.count("abc9.nomfs"))
- active_design->scratchpad_set_bool("abc9.nomfs", true);
if (nowidelut)
run("abc9 -maxlut 4 -W 200");
else
if (family != "xc7")
log_warning("'synth_xilinx -abc9' not currently supported for the '%s' family, "
"will use timing for 'xc7' instead.\n", family.c_str());
- if (!help_mode && !active_design->scratchpad.count("abc9.nomfs"))
- active_design->scratchpad_set_bool("abc9.nomfs", true);
std::string techmap_args = "-map +/xilinx/abc9_map.v -max_iter 1";
if (dff_mode)
techmap_args += " -D DFF_MODE";