From c5562429760b444133fcb2391236275b0c353670 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 21 Jul 2018 13:38:44 +0200 Subject: Add getWireDelay API Signed-off-by: Clifford Wolf --- common/router1.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/router1.cc b/common/router1.cc index 94c7070e..de5caa5a 100644 --- a/common/router1.cc +++ b/common/router1.cc @@ -148,6 +148,8 @@ struct Router bool foundRipupNet = false; thisVisitCnt++; + next_delay += ctx->getWireDelay(next_wire).avgDelay(); + if (!ctx->checkWireAvail(next_wire)) { if (!ripup) continue; @@ -226,7 +228,7 @@ struct Router : ctx(ctx), scores(scores), ripup(ripup), ripup_penalty(ripup_penalty) { std::unordered_map src_wires; - src_wires[src_wire] = 0; + src_wires[src_wire] = ctx->getWireDelay(src_wire).avgDelay(); route(src_wires, dst_wire); routedOkay = visited.count(dst_wire); @@ -284,7 +286,7 @@ struct Router log(" Source wire: %s\n", ctx->getWireName(src_wire).c_str(ctx)); std::unordered_map src_wires; - src_wires[src_wire] = 0; + src_wires[src_wire] = ctx->getWireDelay(src_wire).avgDelay(); ripup_net(ctx, net_name); ctx->bindWire(src_wire, net_name, STRENGTH_WEAK); -- cgit v1.2.3