diff options
author | Serge Bazanski <serge@bazanski.pl> | 2018-07-17 16:03:48 +0100 |
---|---|---|
committer | Serge Bazanski <serge@bazanski.pl> | 2018-07-17 16:03:48 +0100 |
commit | 498bef3f3e82ed214daf44ada83eb22a21159993 (patch) | |
tree | b5d982452b972df13c20cabc0c2b2b73256a285d /common/place_common.h | |
parent | f3c6c76fff90d89dd65af2c02124c098dab63892 (diff) | |
parent | 2eb783d626a9a17baf70d2f7750be3c11623d5bc (diff) | |
download | nextpnr-498bef3f3e82ed214daf44ada83eb22a21159993.tar.gz nextpnr-498bef3f3e82ed214daf44ada83eb22a21159993.tar.bz2 nextpnr-498bef3f3e82ed214daf44ada83eb22a21159993.zip |
Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr into q3k/lock-2-electric-boogaloo
Diffstat (limited to 'common/place_common.h')
-rw-r--r-- | common/place_common.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/common/place_common.h b/common/place_common.h index 67956072..32250604 100644 --- a/common/place_common.h +++ b/common/place_common.h @@ -26,14 +26,20 @@ NEXTPNR_NAMESPACE_BEGIN typedef int64_t wirelen_t; +enum class MetricType +{ + COST, + WIRELENGTH +}; + // Return the wirelength of a net -wirelen_t get_net_wirelength(const Context *ctx, const NetInfo *net, float &tns); +wirelen_t get_net_metric(const Context *ctx, const NetInfo *net, MetricType type, float &tns); // Return the wirelength of all nets connected to a cell -wirelen_t get_cell_wirelength(const Context *ctx, const CellInfo *cell); +wirelen_t get_cell_metric(const Context *ctx, const CellInfo *cell, MetricType type); // Return the wirelength of all nets connected to a cell, when the cell is at a given bel -wirelen_t get_cell_wirelength_at_bel(const Context *ctx, CellInfo *cell, BelId bel); +wirelen_t get_cell_metric_at_bel(const Context *ctx, CellInfo *cell, BelId bel, MetricType type); // Place a single cell in the lowest wirelength Bel available, optionally requiring validity check bool place_single_cell(Context *ctx, CellInfo *cell, bool require_legality); |