mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-29 01:18:46 +00:00
Optimise
This commit is contained in:
parent
743c164eee
commit
5c134980c4
1 changed files with 3 additions and 4 deletions
|
@ -585,18 +585,17 @@ struct XAigerWriter
|
||||||
if (holes_module && !holes_module->cell(stringf("\\u%d", box_id)))
|
if (holes_module && !holes_module->cell(stringf("\\u%d", box_id)))
|
||||||
holes_cell = holes_module->addCell(stringf("\\u%d", box_id), cell->type);
|
holes_cell = holes_module->addCell(stringf("\\u%d", box_id), cell->type);
|
||||||
RTLIL::Wire *holes_wire;
|
RTLIL::Wire *holes_wire;
|
||||||
int num_inputs = 0;
|
|
||||||
// NB: cell->connections_ already sorted from before
|
// NB: cell->connections_ already sorted from before
|
||||||
for (const auto &c : cell->connections()) {
|
for (const auto &c : cell->connections()) {
|
||||||
|
log_assert(c.second.size() == 1);
|
||||||
if (cell->input(c.first)) {
|
if (cell->input(c.first)) {
|
||||||
box_inputs += c.second.size();
|
box_inputs += c.second.size();
|
||||||
if (holes_cell) {
|
if (holes_cell) {
|
||||||
holes_wire = holes_module->wire(stringf("\\i%d", num_inputs));
|
holes_wire = holes_module->wire(stringf("\\i%d", box_inputs));
|
||||||
if (!holes_wire) {
|
if (!holes_wire) {
|
||||||
holes_wire = holes_module->addWire(stringf("\\i%d", num_inputs));
|
holes_wire = holes_module->addWire(stringf("\\i%d", box_inputs));
|
||||||
holes_wire->port_input = true;
|
holes_wire->port_input = true;
|
||||||
}
|
}
|
||||||
++num_inputs;
|
|
||||||
holes_cell->setPort(c.first, holes_wire);
|
holes_cell->setPort(c.first, holes_wire);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue