diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-08-04 20:16:43 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-08-04 20:16:43 +0200 |
commit | 175da732ac18acaf16eff97a2b7711b25a2cb157 (patch) | |
tree | 454d71c469eabe838a9f370c6db7b068f42e849c /ice40/delay.cc | |
parent | f6b3333a7d34c865e0e371b5585e1ee8151a58b4 (diff) | |
download | nextpnr-175da732ac18acaf16eff97a2b7711b25a2cb157.tar.gz nextpnr-175da732ac18acaf16eff97a2b7711b25a2cb157.tar.bz2 nextpnr-175da732ac18acaf16eff97a2b7711b25a2cb157.zip |
Use faster model for ice40 predictDelay()
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'ice40/delay.cc')
-rw-r--r-- | ice40/delay.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ice40/delay.cc b/ice40/delay.cc index 342b7f0b..1fa4256e 100644 --- a/ice40/delay.cc +++ b/ice40/delay.cc @@ -23,7 +23,7 @@ NEXTPNR_NAMESPACE_BEGIN -#define NUM_FUZZ_ROUTES 1000 +#define NUM_FUZZ_ROUTES 100000 void ice40DelayFuzzerMain(Context *ctx) { @@ -218,6 +218,10 @@ delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const if (dx <= 1 && dy <= 1) return p.neighbourhood; +#if 1 + // Model #0 + return (p.model0_offset + p.model0_norm1 * (dx + dy)) / 128; +#else float norm1 = dx + dy; float dx2 = dx * dx; @@ -240,6 +244,7 @@ delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const v /= 128; return v; +#endif } NEXTPNR_NAMESPACE_END |