diff options
author | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-17 14:19:43 +0000 |
---|---|---|
committer | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-17 14:19:43 +0000 |
commit | dabc057da94207c1dfbb8d9679c639ff697bea14 (patch) | |
tree | d8d70b16f021d48fa053949d909fa206ce36927b /common/place_common.h | |
parent | 0bae7f5606b15591a23fb63da1c5ff6f93b40747 (diff) | |
parent | f62f04e376f83d650ab1067cdf0f058151828b8a (diff) | |
download | nextpnr-dabc057da94207c1dfbb8d9679c639ff697bea14.tar.gz nextpnr-dabc057da94207c1dfbb8d9679c639ff697bea14.tar.bz2 nextpnr-dabc057da94207c1dfbb8d9679c639ff697bea14.zip |
Merge branch 'master' into 'master'
Master
See merge request eddiehung/nextpnr!2
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); |