3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-05-09 16:55:49 +00:00
This commit is contained in:
KrystalDelusion 2025-05-09 09:06:25 +12:00 committed by GitHub
commit 44b8e5e06b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -122,6 +122,15 @@ struct AutonamePass : public Pass {
if (bit.wire != nullptr)
wire_score[bit.wire]++;
for (auto &it : wire_score) {
// (10000*score + new_name.size())*2 must be less than INT32_MAX
// using 24000 allows for a name 2000 characters long
if (it.second > INT32_MAX/24000)
// We can't guarantee an earlier module hasn't already been processed, so use log_error
log_error("Fanout of %s too high (%d bits), unable to continue.\n", it.first->name.c_str(), it.second);
}
int count = 0, iter = 0;
while (1) {
iter++;