aboutsummaryrefslogtreecommitdiffstats
path: root/common/timing.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-20 11:53:49 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-20 11:53:49 +0200
commit2a41211ce1955a44ca363ba6000c38feb3883e32 (patch)
tree645f3b0c4c0d0861d51808619872f7c7e87f02c6 /common/timing.cc
parent1436ae21a2d9a214f7585deb2f038ff87ce4862c (diff)
downloadnextpnr-2a41211ce1955a44ca363ba6000c38feb3883e32.tar.gz
nextpnr-2a41211ce1955a44ca363ba6000c38feb3883e32.tar.bz2
nextpnr-2a41211ce1955a44ca363ba6000c38feb3883e32.zip
Another stub delay calculation function
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common/timing.cc')
-rw-r--r--common/timing.cc21
1 files changed, 18 insertions, 3 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 <algorithm>
#include <unordered_map>
#include <utility>
-#include <algorithm>
+#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