diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-08-30 20:15:09 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-08-30 20:15:09 -0700 |
commit | e9bb252e77ba979a4c7041e6a221862a6464bf99 (patch) | |
tree | b326311c26a8eed79d64eddda650ad0647977b0f /backends/aiger/xaiger.cc | |
parent | f33abd4eab08c0557a561b0fd4f16fc3d86433ab (diff) | |
download | yosys-e9bb252e77ba979a4c7041e6a221862a6464bf99.tar.gz yosys-e9bb252e77ba979a4c7041e6a221862a6464bf99.tar.bz2 yosys-e9bb252e77ba979a4c7041e6a221862a6464bf99.zip |
Recognise built-in types (e.g. $_DFF_*)
Diffstat (limited to 'backends/aiger/xaiger.cc')
-rw-r--r-- | backends/aiger/xaiger.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/aiger/xaiger.cc b/backends/aiger/xaiger.cc index 8c8ff2f7e..fa6ba0aca 100644 --- a/backends/aiger/xaiger.cc +++ b/backends/aiger/xaiger.cc @@ -263,12 +263,12 @@ struct XAigerWriter } } else { - bool cell_known = inst_module; + bool cell_known = inst_module || cell->known(); for (const auto &c : cell->connections()) { if (c.second.is_fully_const()) continue; auto port_wire = inst_module ? inst_module->wire(c.first) : nullptr; - auto is_input = !cell_known || port_wire->port_input; - auto is_output = !cell_known || port_wire->port_output; + auto is_input = (port_wire && port_wire->port_input) || !cell_known || cell->input(c.first); + auto is_output = (port_wire && port_wire->port_output) || !cell_known || cell->output(c.first); if (!is_input && !is_output) log_error("Connection '%s' on cell '%s' (type '%s') not recognised!\n", log_id(c.first), log_id(cell), log_id(cell->type)); |