3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-04 16:44:08 +00:00

ice40_dsp: group empty wires

This commit is contained in:
Anhijkt 2025-03-16 15:11:45 +02:00
parent 5ae32efca5
commit a9d765e11e

View file

@ -53,11 +53,16 @@ code sigA sigB sigH
if (i == 0)
reject;
for (int j = 0; j <= i; j++)
for (int j = 0, wire_width = 0; j <= i; j++)
if (nusers(O[j]) == 0)
sigH.append(module->addWire(NEW_ID));
else
wire_width++;
else {
if (wire_width) { // add empty wires for bit offset if needed
sigH.append(module->addWire(NEW_ID, wire_width));
wire_width = 0;
}
sigH.append(O[j]);
}
endcode