From 56fa8cc669f07194527e171474a514ef80af48e1 Mon Sep 17 00:00:00 2001 From: David Shah Date: Mon, 16 Jul 2018 17:13:40 +0200 Subject: refactor: Remove incorrect uses of the term 'wirelength' Signed-off-by: David Shah --- common/place_common.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'common/place_common.h') 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); -- cgit v1.2.3