diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-08-08 19:36:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-08 19:36:05 +0200 |
commit | b326b03a5261a824f428fe0811a5376c8758b929 (patch) | |
tree | a13673a636ddbea3b5fd5585e3bb109b56b69435 /common/design_utils.cc | |
parent | cd4e761bb799ca99f02d3aa177961af28a93f2d8 (diff) | |
parent | f6189e4677c7bdaeaa5b9b796a67d750e6c7d49d (diff) | |
download | nextpnr-b326b03a5261a824f428fe0811a5376c8758b929.tar.gz nextpnr-b326b03a5261a824f428fe0811a5376c8758b929.tar.bz2 nextpnr-b326b03a5261a824f428fe0811a5376c8758b929.zip |
Merge pull request #45 from YosysHQ/constids
Get rid of PortPin and BelType
Diffstat (limited to 'common/design_utils.cc')
-rw-r--r-- | common/design_utils.cc | 8 |
1 files changed, 4 insertions, 4 deletions
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<BelType, int> used_types; + std::map<IdString, int> used_types; for (auto &cell : ctx->cells) { - used_types[ctx->belTypeFromId(cell.second.get()->type)]++; + used_types[cell.second.get()->type]++; } - std::map<BelType, int> available_types; + std::map<IdString, int> 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); } |