From dbb88550211d59b5e568e96757f452a3d5f109fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20G=C3=BChring?= <pg@futureware.at> Date: Fri, 24 Feb 2023 23:25:16 +0100 Subject: [PATCH] Raised the weight to push all contacts on the terminals --- lclayout/router.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lclayout/router.py b/lclayout/router.py index c43aa67..b577692 100644 --- a/lclayout/router.py +++ b/lclayout/router.py @@ -621,7 +621,8 @@ class DefaultRouter(): def _set_terminal_costs( graph: nx.Graph, shapes: Dict[str, db.Shape], - terminals_by_net: Dict[str, List] + terminals_by_net: Dict[str, List], + tech ): """ Set via weights based on terminal costs. @@ -643,12 +644,14 @@ def _set_terminal_costs( regions_by_layer[layer], tech ) + logger.debug("via cost: {} ({},{}) {}".format(via_cost,x,y,via_layer)) other_node = via_layer, (x, y) # Node on the other side of the via. if terminal_node in graph and other_node in graph: # Scale the via cost - graph[terminal_node][other_node]['weight'] *= via_cost + 1 + logger.debug("Old cost: {} via_cost: {}".format(graph[terminal_node][other_node]['weight'],via_cost)) + graph[terminal_node][other_node]['weight'] += via_cost * 1500000 def _report_track_usage(xs: List[int], ys: List[int], routing_trees: Dict[Any, nx.Graph]): """ -- GitLab