From 0ca07e5a6b22b9eb05ab7dde2814de8f0968f755 Mon Sep 17 00:00:00 2001 From: David Shah Date: Sat, 9 Nov 2019 11:45:37 +0000 Subject: router2: Add some test glue Signed-off-by: David Shah --- common/router2.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 common/router2.h (limited to 'common/router2.h') diff --git a/common/router2.h b/common/router2.h new file mode 100644 index 00000000..da750af5 --- /dev/null +++ b/common/router2.h @@ -0,0 +1,26 @@ +/* + * nextpnr -- Next Generation Place and Route + * + * Copyright (C) 2019 David Shah + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +#include "nextpnr.h" + +NEXTPNR_NAMESPACE_BEGIN + +void router2_test(Context *ctx); + +NEXTPNR_NAMESPACE_END \ No newline at end of file -- cgit v1.2.3 From 72367e6cfd3f36768288d6a5b03e670351ea8f8c Mon Sep 17 00:00:00 2001 From: David Shah Date: Thu, 2 Jan 2020 14:06:57 +0000 Subject: router2: Improvements Signed-off-by: David Shah --- common/router2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/router2.h') diff --git a/common/router2.h b/common/router2.h index da750af5..e1f850b9 100644 --- a/common/router2.h +++ b/common/router2.h @@ -21,6 +21,6 @@ NEXTPNR_NAMESPACE_BEGIN -void router2_test(Context *ctx); +void router2(Context *ctx); NEXTPNR_NAMESPACE_END \ No newline at end of file -- cgit v1.2.3 From ad1cc12df1aa13c1618d85c07805a4987e0e041f Mon Sep 17 00:00:00 2001 From: David Shah Date: Mon, 3 Feb 2020 11:38:15 +0000 Subject: router2: Make magic numbers configurable Signed-off-by: David Shah --- common/router2.h | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'common/router2.h') diff --git a/common/router2.h b/common/router2.h index e1f850b9..fb11f92d 100644 --- a/common/router2.h +++ b/common/router2.h @@ -21,6 +21,36 @@ NEXTPNR_NAMESPACE_BEGIN -void router2(Context *ctx); +struct Router2Cfg +{ + Router2Cfg(Context *ctx); + + // Maximum iterations for backwards routing attempt + int backwards_max_iter; + // Maximum iterations for backwards routing attempt for global nets + int global_backwards_max_iter; + // Padding added to bounding boxes to account for imperfect routing, + // congestion, etc + int bb_margin_x, bb_margin_y; + // Cost factor added to input pin wires; effectively reduces the + // benefit of sharing interconnect + float ipin_cost_adder; + // Cost factor for "bias" towards center location of net + float bias_cost_factor; + // Starting current and historical congestion cost factor + float init_curr_cong_weight, hist_cong_weight; + // Current congestion cost multiplier + float curr_cong_mult; + + // Weight given to delay estimate in A*. Higher values + // mean faster and more directed routing, at the risk + // of choosing a less congestion/delay-optimal route + float estimate_weight; + + // Print additional performance profiling information + bool perf_profile = false; +}; + +void router2(Context *ctx, const Router2Cfg &cfg); NEXTPNR_NAMESPACE_END \ No newline at end of file -- cgit v1.2.3