aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-06-24 22:16:56 -0700
committerEddie Hung <eddie@fpgeh.com>2019-06-24 22:16:56 -0700
commita19226c174e31da444b831706adf7fa17e9cb9e4 (patch)
tree5e7f15aa864b9bb57759edfa20710746aa7c4499 /passes
parent5605002d8a583409a56d1187460de1f4a03d8454 (diff)
downloadyosys-a19226c174e31da444b831706adf7fa17e9cb9e4.tar.gz
yosys-a19226c174e31da444b831706adf7fa17e9cb9e4.tar.bz2
yosys-a19226c174e31da444b831706adf7fa17e9cb9e4.zip
Fix for abc_scc_break is bus
Diffstat (limited to 'passes')
-rw-r--r--passes/techmap/abc9.cc44
1 files changed, 23 insertions, 21 deletions
diff --git a/passes/techmap/abc9.cc b/passes/techmap/abc9.cc
index 6356d4fbf..cd7954427 100644
--- a/passes/techmap/abc9.cc
+++ b/passes/techmap/abc9.cc
@@ -121,31 +121,33 @@ void handle_loops(RTLIL::Design *design)
if (it == cell->connections_.end())
log_error("abc_scc_break attribute value '%s' does not exist as port on module '%s'\n", jt->second.decode_string().c_str(), log_id(box_module));
log_assert(it != cell->connections_.end());
- auto &c = *it;
- SigBit b = cell->getPort(RTLIL::escape_id(jt->second.decode_string()));
- Wire *w = b.wire;
- if (w->port_output) {
- log_assert(w->get_bool_attribute("\\abc_scc_break"));
- w = module->wire(stringf("%s.abci", w->name.c_str()));
- log_assert(w);
- log_assert(b.offset < GetSize(w));
- log_assert(w->port_input);
- }
- else {
- log_assert(!w->port_output);
- w->port_output = true;
- w->set_bool_attribute("\\abc_scc_break");
- w = module->wire(stringf("%s.abci", w->name.c_str()));
- if (!w) {
- w = module->addWire(stringf("%s.abci", b.wire->name.c_str()), GetSize(b.wire));
- w->port_input = true;
+ RTLIL::SigSpec sig;
+ for (auto b : it->second) {
+ Wire *w = b.wire;
+ if (w->port_output) {
+ log_assert(w->get_bool_attribute("\\abc_scc_break"));
+ w = module->wire(stringf("%s.abci", w->name.c_str()));
+ log_assert(w);
+ log_assert(b.offset < GetSize(w));
+ log_assert(w->port_input);
}
else {
- log_assert(w->port_input);
- log_assert(b.offset < GetSize(w));
+ log_assert(!w->port_output);
+ w->port_output = true;
+ w->set_bool_attribute("\\abc_scc_break");
+ w = module->wire(stringf("%s.abci", w->name.c_str()));
+ if (!w) {
+ w = module->addWire(stringf("%s.abci", b.wire->name.c_str()), GetSize(b.wire));
+ w->port_input = true;
+ }
+ else {
+ log_assert(w->port_input);
+ log_assert(b.offset < GetSize(w));
+ }
}
+ sig.append(RTLIL::SigBit(w, b.offset));
}
- c.second = RTLIL::SigBit(w, b.offset);
+ it->second = sig;
}
}
}