diff --git a/lclayout/router.py b/lclayout/router.py index c43aa6722056f4b04342aaf7f902ac7f44d9274f..b577692f526c63f53e3b8e1a6fe3a21e5337288f 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]): """