Merge pull request #680 from YosysHQ/gatecat/fix-util

Fix utilisation report when bel buckets are used
This commit is contained in:
gatecat 2021-04-15 10:14:19 +01:00 committed by GitHub
commit 1631cdffb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,12 +67,12 @@ void print_utilisation(const Context *ctx)
// Sort by Bel type
std::map<IdString, int> used_types;
for (auto &cell : ctx->cells) {
used_types[cell.second.get()->type]++;
used_types[ctx->getBelBucketName(ctx->getBelBucketForCellType(cell.second.get()->type))]++;
}
std::map<IdString, int> available_types;
for (auto bel : ctx->getBels()) {
if (!ctx->getBelHidden(bel)) {
available_types[ctx->getBelType(bel)]++;
available_types[ctx->getBelBucketName(ctx->getBelBucketForBel(bel))]++;
}
}
log_break();