diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-05-27 12:16:10 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-05-27 12:16:10 -0700 |
commit | 234156c01a4086a69ff9ac9f6ae668d64734d525 (patch) | |
tree | 15674d1e6679a4c45fd28e8275c47f7d0cfdf2b2 /passes | |
parent | 03b289a851c62eb2a7e3592432876bfa8a56770b (diff) | |
download | yosys-234156c01a4086a69ff9ac9f6ae668d64734d525.tar.gz yosys-234156c01a4086a69ff9ac9f6ae668d64734d525.tar.bz2 yosys-234156c01a4086a69ff9ac9f6ae668d64734d525.zip |
Instantiate cell type (from sym file) otherwise 'clean' warnings
Diffstat (limited to 'passes')
-rw-r--r-- | passes/techmap/abc9.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/passes/techmap/abc9.cc b/passes/techmap/abc9.cc index 89e3eb948..475508e02 100644 --- a/passes/techmap/abc9.cc +++ b/passes/techmap/abc9.cc @@ -535,18 +535,18 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri log_error("Can't open ABC output file `%s'.\n", buffer.c_str()); bool builtin_lib = liberty_file.empty(); - RTLIL::Design *mapped_design = new RTLIL::Design; //parse_blif(mapped_design, ifs, builtin_lib ? "\\DFF" : "\\_dff_", false, sop_mode); buffer = stringf("%s/%s", tempdir_name.c_str(), "input.sym"); - AigerReader reader(mapped_design, ifs, "\\netlist", "" /* clk_name */, buffer.c_str() /* map_filename */, true /* wideports */); + log_assert(!design->module("$__abc9__")); + AigerReader reader(design, ifs, "$__abc9__", "" /* clk_name */, buffer.c_str() /* map_filename */, true /* wideports */); reader.parse_xaiger(); ifs.close(); log_header(design, "Re-integrating ABC9 results.\n"); - RTLIL::Module *mapped_mod = mapped_design->modules_["\\netlist"]; + RTLIL::Module *mapped_mod = design->module("$__abc9__"); if (mapped_mod == NULL) - log_error("ABC output file does not contain a module `netlist'.\n"); + log_error("ABC output file does not contain a module `$__abc9__'.\n"); pool<RTLIL::SigBit> output_bits; for (auto &it : mapped_mod->wires_) { @@ -801,7 +801,7 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri else { cell = module->cell(c->name); log_assert(cell); - log_assert(c->type == "$__blackbox__"); + log_assert(c->type == cell->type); } if (markgroups) cell->attributes["\\abcgroup"] = map_autoidx; @@ -937,8 +937,6 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri //log("ABC RESULTS: internal signals: %8d\n", int(signal_list.size()) - in_wires - out_wires); log("ABC RESULTS: input signals: %8d\n", in_wires); log("ABC RESULTS: output signals: %8d\n", out_wires); - - delete mapped_design; } //else //{ |