3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-22 15:15:51 +00:00

More NEW_ID cleanup

This commit is contained in:
Akash Levy 2026-07-08 23:09:00 -07:00
parent c29b8b00d3
commit a0935a9e9e
9 changed files with 191 additions and 148 deletions

View file

@ -536,25 +536,25 @@ static void dfflibmap(RTLIL::Design *design, RTLIL::Module *module)
} else
if (port.second == 'q') {
RTLIL::SigSpec old_sig = cell_connections[std::string("\\") + char(port.second - ('a' - 'A'))];
sig = module->addWire(NEW_ID, GetSize(old_sig));
sig = module->addWire(NEW_ID3_SUFFIX("qn"), GetSize(old_sig)); // SILIMATE: Improve the naming
if (has_q && has_qn) {
for (auto &it : notmap[sigmap(old_sig)]) {
module->connect(it->getPort(ID::Y), sig);
it->setPort(ID::Y, module->addWire(NEW_ID, GetSize(old_sig)));
it->setPort(ID::Y, module->addWire(NEW_ID3_SUFFIX("not_y"), GetSize(old_sig))); // SILIMATE: Improve the naming
}
} else {
module->addNotGate(NEW_ID, sig, old_sig);
module->addNotGate(NEW_ID3_SUFFIX("not"), sig, old_sig); // SILIMATE: Improve the naming
}
} else
if ('a' <= port.second && port.second <= 'z') {
sig = cell_connections[std::string("\\") + char(port.second - ('a' - 'A'))];
sig = module->NotGate(NEW_ID, sig);
sig = module->NotGate(NEW_ID3_SUFFIX("inv"), sig); // SILIMATE: Improve the naming
} else
if (port.second == '0' || port.second == '1') {
sig = RTLIL::SigSpec(port.second == '0' ? 0 : 1, 1);
} else
if (port.second == 0) {
sig = module->addWire(NEW_ID);
sig = module->addWire(NEW_ID3_SUFFIX("nc")); // SILIMATE: Improve the naming
} else
log_abort();
new_cell->setPort("\\" + port.first, sig);