3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-04 02:10:24 +00:00
This commit is contained in:
Alain Dargelas 2025-03-04 11:09:09 -08:00
parent 3e25ff70ee
commit 864850ab51

View file

@ -517,6 +517,8 @@ void splitNet(Design *design, std::set<std::string> &netsToSplitS, RTLIL::SigSpe
if (parent == "") {
return;
}
if (parentWire->width == 1)
return;
parent = substringuntil(parent, '[');
if (netsToSplitS.find(parent) == netsToSplitS.end()) {
netsToSplitS.insert(parent);
@ -604,10 +606,16 @@ struct AnnotateCellFanout : public ScriptPass {
Cell *cell = itrCell.first;
int fanout = itrCell.second;
if (limit > 0 && (fanout > limit)) {
RTLIL::SigSpec cellOutSig = getCellOutputSigSpec(cell, sigmap);
for (auto &conn : cell->connections()) {
IdString portName = conn.first;
RTLIL::SigSpec actual = conn.second;
if (cell->output(portName)) {
RTLIL::SigSpec cellOutSig = sigmap(actual);
splitNet(design, netsToSplitS, cellOutSig, formalFriendly);
}
}
}
}
// Split module input nets with high fanout
std::set<Wire *> wiresToSplit;
@ -640,8 +648,14 @@ struct AnnotateCellFanout : public ScriptPass {
Cell *cell = itrCell.first;
int fanout = itrCell.second;
if (limit > 0 && (fanout > limit)) {
RTLIL::SigSpec cellOutSig = getCellOutputSigSpec(cell, sigmap);
for (auto &conn : cell->connections()) {
IdString portName = conn.first;
RTLIL::SigSpec actual = conn.second;
if (cell->output(portName)) {
RTLIL::SigSpec cellOutSig = sigmap(actual);
fixfanout(module, sigmap, sig2CellsInFanout, cellOutSig, fanout, limit, debug);
}
}
fixedFanout = true;
} else {
// Add attribute with fanout info to every cell