From 535723f414a77eb4aa43b794627bbd4aca56f6f0 Mon Sep 17 00:00:00 2001 From: gatecat Date: Wed, 10 Feb 2021 12:28:40 +0000 Subject: Start making use of getBelPinsForCellPin API This replaces getNetinfoSinkWire with 3 new functions for different use cases. At the moment all existing code has been moved to getNetinfoSinkWire with phys_idx=0 so the build doesn't break; but this won't yet function properly with more than one sink. But it provides a base on which to work on refactoring the routers to support this case. Signed-off-by: gatecat --- common/router1.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'common/router1.cc') diff --git a/common/router1.cc b/common/router1.cc index d2816c1e..51a356bc 100644 --- a/common/router1.cc +++ b/common/router1.cc @@ -144,7 +144,7 @@ struct Router1 int user_idx = arc.user_idx; auto src_wire = ctx->getNetinfoSourceWire(net_info); - auto dst_wire = ctx->getNetinfoSinkWire(net_info, net_info->users[user_idx]); + auto dst_wire = ctx->getNetinfoSinkWire(net_info, net_info->users[user_idx], 0); arc_queue_insert(arc, src_wire, dst_wire); } @@ -302,7 +302,7 @@ struct Router1 log_assert(src_wire != WireId()); for (int user_idx = 0; user_idx < int(net_info->users.size()); user_idx++) { - auto dst_wire = ctx->getNetinfoSinkWire(net_info, net_info->users[user_idx]); + auto dst_wire = ctx->getNetinfoSinkWire(net_info, net_info->users[user_idx], 0); log_assert(dst_wire != WireId()); arc_key arc; @@ -375,7 +375,7 @@ struct Router1 ctx->nameOf(dst_to_arc.at(src_wire).net_info), dst_to_arc.at(src_wire).user_idx); for (int user_idx = 0; user_idx < int(net_info->users.size()); user_idx++) { - auto dst_wire = ctx->getNetinfoSinkWire(net_info, net_info->users[user_idx]); + auto dst_wire = ctx->getNetinfoSinkWire(net_info, net_info->users[user_idx], 0); if (dst_wire == WireId()) log_error("No wire found for port %s on destination cell %s.\n", @@ -443,7 +443,7 @@ struct Router1 int user_idx = arc.user_idx; auto src_wire = ctx->getNetinfoSourceWire(net_info); - auto dst_wire = ctx->getNetinfoSinkWire(net_info, net_info->users[user_idx]); + auto dst_wire = ctx->getNetinfoSinkWire(net_info, net_info->users[user_idx], 0); ripup_flag = false; if (ctx->debug) { @@ -934,7 +934,7 @@ bool Context::checkRoutedDesign() const std::unordered_map dest_wires; for (int user_idx = 0; user_idx < int(net_info->users.size()); user_idx++) { - auto dst_wire = ctx->getNetinfoSinkWire(net_info, net_info->users[user_idx]); + auto dst_wire = ctx->getNetinfoSinkWire(net_info, net_info->users[user_idx], 0); log_assert(dst_wire != WireId()); dest_wires[dst_wire] = user_idx; -- cgit v1.2.3