mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-04 02:10:24 +00:00
speedup
This commit is contained in:
parent
3e25ff70ee
commit
864850ab51
1 changed files with 18 additions and 4 deletions
|
@ -517,6 +517,8 @@ void splitNet(Design *design, std::set<std::string> &netsToSplitS, RTLIL::SigSpe
|
||||||
if (parent == "") {
|
if (parent == "") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (parentWire->width == 1)
|
||||||
|
return;
|
||||||
parent = substringuntil(parent, '[');
|
parent = substringuntil(parent, '[');
|
||||||
if (netsToSplitS.find(parent) == netsToSplitS.end()) {
|
if (netsToSplitS.find(parent) == netsToSplitS.end()) {
|
||||||
netsToSplitS.insert(parent);
|
netsToSplitS.insert(parent);
|
||||||
|
@ -604,10 +606,16 @@ struct AnnotateCellFanout : public ScriptPass {
|
||||||
Cell *cell = itrCell.first;
|
Cell *cell = itrCell.first;
|
||||||
int fanout = itrCell.second;
|
int fanout = itrCell.second;
|
||||||
if (limit > 0 && (fanout > limit)) {
|
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);
|
splitNet(design, netsToSplitS, cellOutSig, formalFriendly);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Split module input nets with high fanout
|
// Split module input nets with high fanout
|
||||||
std::set<Wire *> wiresToSplit;
|
std::set<Wire *> wiresToSplit;
|
||||||
|
@ -640,8 +648,14 @@ struct AnnotateCellFanout : public ScriptPass {
|
||||||
Cell *cell = itrCell.first;
|
Cell *cell = itrCell.first;
|
||||||
int fanout = itrCell.second;
|
int fanout = itrCell.second;
|
||||||
if (limit > 0 && (fanout > limit)) {
|
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);
|
fixfanout(module, sigmap, sig2CellsInFanout, cellOutSig, fanout, limit, debug);
|
||||||
|
}
|
||||||
|
}
|
||||||
fixedFanout = true;
|
fixedFanout = true;
|
||||||
} else {
|
} else {
|
||||||
// Add attribute with fanout info to every cell
|
// Add attribute with fanout info to every cell
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue