3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-23 14:23:41 +00:00

No need for looping splitfanout

This commit is contained in:
Akash Levy 2024-10-25 15:51:46 -07:00
parent 038c562493
commit b65ddf9aa5

View file

@ -207,18 +207,12 @@ struct SplitfanoutPass : public Pass {
int count_split_pre = 0; int count_split_pre = 0;
int count_split_post = 0; int count_split_post = 0;
while (1) {
SplitfanoutWorker worker(module); SplitfanoutWorker worker(module);
bool did_something = false;
for (auto cell : worker.toposort.sorted) { for (auto cell : worker.toposort.sorted) {
int n = worker.split(module->cell(cell)); int n = worker.split(module->cell(cell));
did_something |= (n != 0);
count_split_pre += (n != 0); count_split_pre += (n != 0);
count_split_post += n; count_split_post += n;
} }
if (!did_something)
break;
}
if (count_split_pre) if (count_split_pre)
log("Split %d cells in module '%s' into %d copies based on fanout.\n", log("Split %d cells in module '%s' into %d copies based on fanout.\n",