aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-20 13:01:22 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-20 13:01:22 +0200
commit4648d3bc839f1c8458d3b96bc572774600eaa33f (patch)
tree056e72e731613f432276bacc518684894de443d2 /common
parent5ca4663294aff1f4af45e9abfffa20c1e44ea017 (diff)
downloadnextpnr-4648d3bc839f1c8458d3b96bc572774600eaa33f.tar.gz
nextpnr-4648d3bc839f1c8458d3b96bc572774600eaa33f.tar.bz2
nextpnr-4648d3bc839f1c8458d3b96bc572774600eaa33f.zip
Working on the timing annotator
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/timing.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/timing.cc b/common/timing.cc
index 47c82a03..5ffd4ea7 100644
--- a/common/timing.cc
+++ b/common/timing.cc
@@ -62,12 +62,13 @@ static delay_t follow_user_port(Context *ctx, PortRef &user, int path_length,
if (value < user.budget) {
user.budget = value;
}
+ return value;
}
static delay_t follow_net(Context *ctx, NetInfo *net, int path_length,
delay_t slack)
{
- delay_t net_budget = slack / path_length;
+ delay_t net_budget = slack / (path_length + 1);
for (auto &usr : net->users) {
net_budget = std::min(
net_budget, follow_user_port(ctx, usr, path_length + 1, slack));
@@ -77,6 +78,7 @@ static delay_t follow_net(Context *ctx, NetInfo *net, int path_length,
void assign_budget(Context *ctx, float default_clock)
{
+ log_info("Annotating ports with timing budgets\n");
for (auto cell : ctx->cells) {
for (auto port : cell.second->ports) {
if (port.second.type == PORT_OUT) {