Read the DSN's wiring as fixed copper of its nets
Tracks and vias already on the board were ignored, so other nets could be routed straight through them (the flight controller's 82 GND stitching vias and its guard tracks). They are now copper of their net: other nets keep a pad's distance from them in the grid, the exact check and the room engine, and they add no connections to route.
This commit is contained in:
@@ -250,6 +250,7 @@ class GridRouter:
|
||||
# trace halos: node -> indices of the connections claiming it
|
||||
self._halo: dict[Node, list[int]] = {}
|
||||
self._rasterize_obstacles()
|
||||
self._rasterize_fixed_copper()
|
||||
|
||||
# --- grid helpers -------------------------------------------------------
|
||||
|
||||
@@ -360,6 +361,16 @@ class GridRouter:
|
||||
if item.blocks_vias:
|
||||
self._via_keepout.add((*cell, item.layer))
|
||||
|
||||
def _rasterize_fixed_copper(self) -> None:
|
||||
"""Tracks and vias already on the board: copper of their net, which
|
||||
other nets keep the same distance from as from a pad."""
|
||||
margin = self.clearance + self.half_width
|
||||
for net, layers, box in self.board.get_fixed_copper():
|
||||
on = [layer for layer in layers if layer in self.layers]
|
||||
for cell in self._cells_in_box(box, margin):
|
||||
for layer in on:
|
||||
self._pad_block.setdefault((*cell, layer), set()).add(net)
|
||||
|
||||
# --- occupancy cost -----------------------------------------------------
|
||||
|
||||
def _enter_cost(
|
||||
|
||||
Reference in New Issue
Block a user