aboutsummaryrefslogtreecommitdiffstats
path: root/common/timing.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-07-24 11:46:14 +0200
committerDavid Shah <davey1576@gmail.com>2018-07-24 11:46:14 +0200
commit7858663aa7f211cebde2d543f7d0094d84ca11b1 (patch)
tree4c3d6327bd8eda5b3da8614e87958367c847a38d /common/timing.cc
parent4359197dfe49f981966222679d8270b0d4dc311d (diff)
downloadnextpnr-7858663aa7f211cebde2d543f7d0094d84ca11b1.tar.gz
nextpnr-7858663aa7f211cebde2d543f7d0094d84ca11b1.tar.bz2
nextpnr-7858663aa7f211cebde2d543f7d0094d84ca11b1.zip
timing: Model clock to Q times
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common/timing.cc')
-rw-r--r--common/timing.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/timing.cc b/common/timing.cc
index 3a48935f..d91dea20 100644
--- a/common/timing.cc
+++ b/common/timing.cc
@@ -88,6 +88,9 @@ void assign_budget(Context *ctx)
IdString clock_domain = ctx->getPortClock(cell.second.get(), port.first);
if (clock_domain != IdString()) {
delay_t slack = delay_t(1.0e12 / ctx->target_freq); // TODO: clock constraints
+ delay_t clkToQ;
+ if (ctx->getCellDelay(cell.second.get(), clock_domain, port.first, clkToQ))
+ slack -= clkToQ;
if (port.second.net)
follow_net(ctx, port.second.net, 0, slack);
}