Fix utilisation report when bel buckets are used

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat 2021-04-15 09:24:27 +01:00
parent 8f5185c381
commit d14db5c98f

View File

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