aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/arch.h
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2018-11-04 14:03:33 +0000
committerDavid Shah <dave@ds0.me>2018-11-12 14:03:58 +0000
commit07e265868b49447b600c6c3da9f042c593f467f3 (patch)
tree92a42ef5f8810922513d76435f62a70a61dc7103 /ice40/arch.h
parente633aa09ccd89040d450b7cb4b7864c4fd8c0468 (diff)
downloadnextpnr-07e265868b49447b600c6c3da9f042c593f467f3.tar.gz
nextpnr-07e265868b49447b600c6c3da9f042c593f467f3.tar.bz2
nextpnr-07e265868b49447b600c6c3da9f042c593f467f3.zip
archapi: Add getDelayFromNS to improve timing algorithm portability
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'ice40/arch.h')
-rw-r--r--ice40/arch.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ice40/arch.h b/ice40/arch.h
index ff2f7e4c..80fcf761 100644
--- a/ice40/arch.h
+++ b/ice40/arch.h
@@ -775,6 +775,12 @@ struct Arch : BaseCtx
delay_t getDelayEpsilon() const { return 20; }
delay_t getRipupDelayPenalty() const { return 200; }
float getDelayNS(delay_t v) const { return v * 0.001; }
+ DelayInfo getDelayFromNS(float ns) const
+ {
+ DelayInfo del;
+ del.delay = delay_t(ns * 1000);
+ return del;
+ }
uint32_t getDelayChecksum(delay_t v) const { return v; }
bool getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const;