aboutsummaryrefslogtreecommitdiffstats
path: root/common/router2.h
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-09-24 19:20:36 +0100
committerGitHub <noreply@github.com>2021-09-24 19:20:36 +0100
commitd44b6acaa9f724694081139b2e88266af8acbb02 (patch)
treeadfb3dde2e6a46f5a9907f7aee66b017c8608a1f /common/router2.h
parentd9a71083e1a081f89e1aa4c357bc3b828eea6709 (diff)
parent718ee441a0dcf7328692c67d143f2b26b8ebc61c (diff)
downloadnextpnr-d44b6acaa9f724694081139b2e88266af8acbb02.tar.gz
nextpnr-d44b6acaa9f724694081139b2e88266af8acbb02.tar.bz2
nextpnr-d44b6acaa9f724694081139b2e88266af8acbb02.zip
Merge pull request #826 from YosysHQ/gatecat/nexus-lutperm
nexus: Add LUT permutation support
Diffstat (limited to 'common/router2.h')
-rw-r--r--common/router2.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/router2.h b/common/router2.h
index 34102f44..629453c6 100644
--- a/common/router2.h
+++ b/common/router2.h
@@ -21,6 +21,13 @@
NEXTPNR_NAMESPACE_BEGIN
+inline float default_base_cost(Context *ctx, WireId wire, PipId pip, float crit_weight)
+{
+ (void)crit_weight; // unused
+ return ctx->getDelayNS(ctx->getPipDelay(pip).maxDelay() + ctx->getWireDelay(wire).maxDelay() +
+ ctx->getDelayEpsilon());
+}
+
struct Router2Cfg
{
Router2Cfg(Context *ctx);
@@ -51,6 +58,7 @@ struct Router2Cfg
bool perf_profile = false;
std::string heatmap;
+ std::function<float(Context *ctx, WireId wire, PipId pip, float crit_weight)> get_base_cost = default_base_cost;
};
void router2(Context *ctx, const Router2Cfg &cfg);