From 010e7ba8cbff440c10b4482da4e0f9bf4a9210fa Mon Sep 17 00:00:00 2001 From: David Shah Date: Mon, 18 Nov 2019 15:23:47 +0000 Subject: router2: Add IPIN cost to model Signed-off-by: David Shah --- common/router2.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/router2.cc b/common/router2.cc index b189c6d1..ee298ae4 100644 --- a/common/router2.cc +++ b/common/router2.cc @@ -300,7 +300,9 @@ struct Router2 if (wd.bound_nets.count(net->udata)) source_uses = wd.bound_nets.at(net->udata).first; // FIXME: timing/wirelength balance? - return ctx->getDelayNS(ctx->estimateDelay(wire, sink)) / (1 + source_uses); + float ipin_cost = ctx->getDelayNS(ctx->getWireDelay(sink).maxDelay() + ctx->getDelayEpsilon()); + return std::max(0.0f, ctx->getDelayNS(ctx->estimateDelay(wire, sink)) - ipin_cost) / (1 + source_uses) + + ipin_cost; } bool check_arc_routing(NetInfo *net, size_t usr) -- cgit v1.2.3