aboutsummaryrefslogtreecommitdiffstats
path: root/passes/techmap/abc9_map.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2020-01-06 13:34:45 -0800
committerEddie Hung <eddie@fpgeh.com>2020-01-06 13:34:45 -0800
commitaa58472a292c2cd3c0f2ba669c9dcfd608d8dc5f (patch)
tree093ff611a338517b8f5d6ec5ff2cc74ab3ab3f5e /passes/techmap/abc9_map.cc
parent2bf442ca011a1495c7c0960e9ea4452fa7e934b5 (diff)
downloadyosys-aa58472a292c2cd3c0f2ba669c9dcfd608d8dc5f.tar.gz
yosys-aa58472a292c2cd3c0f2ba669c9dcfd608d8dc5f.tar.bz2
yosys-aa58472a292c2cd3c0f2ba669c9dcfd608d8dc5f.zip
Revert "write_xaiger to pad, not abc9_ops -prep_holes"
This reverts commit b5f60e055d07579a2d4f23fc053ca030f103f377.
Diffstat (limited to 'passes/techmap/abc9_map.cc')
-rw-r--r--passes/techmap/abc9_map.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/passes/techmap/abc9_map.cc b/passes/techmap/abc9_map.cc
index e6e4e3e72..c01feedb6 100644
--- a/passes/techmap/abc9_map.cc
+++ b/passes/techmap/abc9_map.cc
@@ -438,19 +438,24 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *module, std::string scrip
if (existing_cell) {
cell->parameters = existing_cell->parameters;
cell->attributes = existing_cell->attributes;
- if (cell->attributes.erase("\\abc9_box_seq")) {
- module->swap_names(cell, existing_cell);
- module->remove(existing_cell);
- }
}
else {
cell->parameters = mapped_cell->parameters;
cell->attributes = mapped_cell->attributes;
}
+ auto abc9_box = cell->attributes.erase("\\abc9_box_seq");
+ if (abc9_box) {
+ module->swap_names(cell, existing_cell);
+ module->remove(existing_cell);
+ }
RTLIL::Module* box_module = design->module(mapped_cell->type);
auto abc9_flop = box_module && box_module->attributes.count("\\abc9_flop");
for (auto &conn : mapped_cell->connections()) {
+ // Skip entire box ports composed entirely of padding only
+ if (abc9_box && conn.second.is_wire() && conn.second.as_wire()->get_bool_attribute(ID(abc9_padding)))
+ continue;
+
RTLIL::SigSpec newsig;
for (auto c : conn.second.chunks()) {
if (c.width == 0)