From 2a41211ce1955a44ca363ba6000c38feb3883e32 Mon Sep 17 00:00:00 2001 From: David Shah Date: Wed, 20 Jun 2018 11:53:49 +0200 Subject: [PATCH] Another stub delay calculation function Signed-off-by: David Shah --- common/timing.cc | 23 +++++++++++++++++++---- common/timing.h | 6 +++++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/common/timing.cc b/common/timing.cc index 352ca94a..225afb5f 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -18,12 +18,27 @@ */ #include "timing.h" -#include "log.h" +#include #include #include -#include +#include "log.h" -void assign_budget(Context *ctx, float default_clock = 12e6) +NEXTPNR_NAMESPACE_BEGIN + +// Follow a path, returning budget to annotate +static delay_t follow_path(Context *ctx, const PortRef &begin, int path_length, + delay_t slack) { - + if (ctx->getPortClock(begin.cell, begin.port) != IdString()) { + return slack / path_length; + } else { + // ... + } } + +void assign_budget(Context *ctx, float default_clock) +{ + // TODO +} + +NEXTPNR_NAMESPACE_END diff --git a/common/timing.h b/common/timing.h index da0cdd9c..03ae048d 100644 --- a/common/timing.h +++ b/common/timing.h @@ -22,7 +22,11 @@ #include "nextpnr.h" +NEXTPNR_NAMESPACE_BEGIN + // Assign "budget" values for all user ports in the design void assign_budget(Context *ctx, float default_clock = 12e6); -#endif TIMING_H +NEXTPNR_NAMESPACE_END + +#endif