From e03ae50e21abdcb05a887c467b97968b1cbdb460 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 8 Aug 2018 17:01:18 +0200 Subject: Get rid of PortPin and BelType (ice40, generic, docs) Signed-off-by: Clifford Wolf --- common/design_utils.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common/design_utils.cc') diff --git a/common/design_utils.cc b/common/design_utils.cc index 6876babe..21c9dcc4 100644 --- a/common/design_utils.cc +++ b/common/design_utils.cc @@ -55,18 +55,18 @@ void replace_port(CellInfo *old_cell, IdString old_name, CellInfo *rep_cell, IdS void print_utilisation(const Context *ctx) { // Sort by Bel type - std::map used_types; + std::map used_types; for (auto &cell : ctx->cells) { - used_types[ctx->belTypeFromId(cell.second.get()->type)]++; + used_types[cell.second.get()->type]++; } - std::map available_types; + std::map available_types; for (auto bel : ctx->getBels()) { available_types[ctx->getBelType(bel)]++; } log_break(); log_info("Device utilisation:\n"); for (auto type : available_types) { - IdString type_id = ctx->belTypeToId(type.first); + IdString type_id = type.first; int used_bels = get_or_default(used_types, type.first, 0); log_info("\t%20s: %5d/%5d %5d%%\n", type_id.c_str(ctx), used_bels, type.second, 100 * used_bels / type.second); } -- cgit v1.2.3