+ cell->setPort(mapped_conn.first, newsig);
+
+ if (abc9_flop)
+ continue;
+
+ if (cell->input(mapped_conn.first)) {
+ for (auto i : newsig)
+ bit2sinks[i].push_back(cell);
+ for (auto i : mapped_conn.second)
+ bit_users[i].insert(mapped_cell->name);
+ }
+ if (cell->output(mapped_conn.first))
+ for (auto i : mapped_conn.second)
+ bit_drivers[i].insert(mapped_cell->name);
+ }
+
+ 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;