diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-01-27 11:18:21 -0800 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-01-27 11:18:21 -0800 |
commit | 9009b76a69b9e867f69295a8e555305925e83aeb (patch) | |
tree | e75ea9d97b2c5fe0a6a0b66dd3a8169bfaf82e92 | |
parent | c7fbe13db5144cf87c56d3f7a620a295029606b3 (diff) | |
download | yosys-9009b76a69b9e867f69295a8e555305925e83aeb.tar.gz yosys-9009b76a69b9e867f69295a8e555305925e83aeb.tar.bz2 yosys-9009b76a69b9e867f69295a8e555305925e83aeb.zip |
abc9_ops: add comments
-rw-r--r-- | passes/techmap/abc9_ops.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/passes/techmap/abc9_ops.cc b/passes/techmap/abc9_ops.cc index d238ce0ad..9ad29a8f6 100644 --- a/passes/techmap/abc9_ops.cc +++ b/passes/techmap/abc9_ops.cc @@ -213,6 +213,7 @@ void prep_xaiger(RTLIL::Module *module, bool dff) else if (!yosys_celltypes.cell_known(cell->type)) continue; + // TODO: Speed up toposort -- we care about box ordering only for (auto conn : cell->connections()) { if (cell->input(conn.first)) for (auto bit : sigmap(conn.second)) @@ -222,7 +223,6 @@ void prep_xaiger(RTLIL::Module *module, bool dff) for (auto bit : sigmap(conn.second)) bit_drivers[bit].insert(cell->name); } - toposort.node(cell->name); } @@ -415,6 +415,7 @@ void reintegrate(RTLIL::Module *module) std::map<IdString, int> cell_stats; for (auto mapped_cell : mapped_mod->cells()) { + // TODO: Speed up toposort -- we care about NOT ordering only toposort.node(mapped_cell->name); if (mapped_cell->type == ID($_NOT_)) { @@ -625,6 +626,17 @@ void reintegrate(RTLIL::Module *module) } } + // ABC9 will return $_NOT_ gates in its mapping (since they are + // treated as being "free"), in particular driving primary + // outputs (real primary outputs, or cells treated as blackboxes) + // or driving box inputs. + // Instead of just mapping those $_NOT_ gates into 2-input $lut-s + // at an area and delay cost, see if it is possible to push + // this $_NOT_ into the driving LUT, or into all sink LUTs. + // When this is not possible, (i.e. this signal drives two primary + // outputs, only one of which is complemented) and when the driver + // is a LUT, then clone the LUT so that it can be inverted without + // increasing depth/delay. for (auto &it : bit_users) if (bit_drivers.count(it.first)) for (auto driver_cell : bit_drivers.at(it.first)) |