Try verified column jogs before the near-port search
This commit is contained in:
parent
8af08a537e
commit
a8720ac8c9
3 changed files with 20 additions and 8 deletions
2
DOCS.md
2
DOCS.md
|
|
@ -181,7 +181,7 @@ For eligible unseeded layouts with fixed headings along both axes, `local-sbend`
|
|||
|
||||
If short, forward, same-heading shifts across both axes still need search, automatic can run the full initial guide budget first. The near-port probe and other fallbacks follow if needed. The identical guide retry is skipped when the first pass ran without a timeout. Calls with an iteration callback, shuffled net ordering, or at most 100 nodes per search use the regular search order.
|
||||
|
||||
If the initial probe leaves unresolved nets on an ordered horizontal bank, `column-jogs` can assign lanes across separated obstacle columns. It schedules the rises and drops as staggered pairs of 90-degree turns, using each net's width and the configured clearance. When only one net remains after an incumbent-residual attempt, `residual-dogleg` tries a four-turn detour through gaps between the locked paths and obstacles. Both planners verify the complete layout before selecting it.
|
||||
On eligible ordered horizontal banks, `column-jogs` can assign lanes across separated obstacle columns before the initial search probe. It schedules the rises and drops as staggered pairs of 90-degree turns, using each net's width and the configured clearance. Calls with an iteration callback or shuffled ordering try column jogs after the probe if needed. When only one net remains after an incumbent-residual attempt, `residual-dogleg` tries a four-turn detour through gaps between the locked paths and obstacles. Both planners verify the complete layout before selecting it.
|
||||
|
||||
When an incumbent-residual attempt falls short of the routing bound, automatic can retry a shared portal with a joint lane assignment. It keeps the incumbent paths locked and assigns distinct lanes to two to four residual nets at one portal. The retry needs an unresolved net at that portal and a changed guide. It uses the initial node budget and at most three congestion iterations. An improving candidate is checked together with the incumbent paths before it can be selected.
|
||||
|
||||
|
|
|
|||
|
|
@ -325,6 +325,8 @@ Before the new fallbacks, the proposed four-window refinement order and guarded
|
|||
|
||||
Four bend-first windows are now the default. A full comparison against the 24-window longest-first baseline matched verified IDs, bounds, and both per-net costs on all 67 boards in both profiles. Fixed-heading Terminal-Bench used different geometry at the same scores. Single-window and unlimited refinement keep longest-first ordering.
|
||||
|
||||
Trying column jogs before the near-port probe reproduced exact paths and costs on all 67 boards in both profiles. On the alternating doglegs, width-key passage, and split-merge passage, the new order reduced A* expansions from 3,300, 7,200, and 7,200 to zero under public defaults. The earlier constructive planners still run first.
|
||||
|
||||
### External and fallback benchmarks
|
||||
|
||||
`--case external` runs six fixed-placement problems from two public sources. The fixtures preserve net IDs and device locations, with optical ports snapped to a 0.1 µm lattice and expressed relative to the imported board. Device boxes become obstacles with outward access cutouts at the selected ports. The timed runs start from empty initial paths. The converted inputs are checked into the repo so benchmark runs work offline. [Fixture data](../inire/tests/data/external_routing_benchmarks.json)
|
||||
|
|
|
|||
|
|
@ -489,6 +489,18 @@ class _AutomaticRun:
|
|||
run = self._run(problem, options=guide, policy=policy)
|
||||
return self._trial(run, RoutingStage("guide", (), run.metrics.nodes_expanded, guide.search.node_limit, policy=policy))
|
||||
|
||||
def _try_column_jogs(self, options: RoutingOptions, trials: list[Trial], target: int) -> bool:
|
||||
problem = self.problem
|
||||
if target != len(problem.nets) or problem.initial_paths:
|
||||
return False
|
||||
with self._time("plan", planner="column-jogs"):
|
||||
for seeds in islice(column_jog_candidates(problem, options.search), 8):
|
||||
trial = self._verify(replace(problem, initial_paths=seeds), "column-jogs")
|
||||
if len(trial.valid_costs) == target:
|
||||
trials.append(trial)
|
||||
return True
|
||||
return False
|
||||
|
||||
def _search_trials(self, trials: list[Trial], target: int) -> None:
|
||||
problem = self.problem
|
||||
configured_search = self.options.search
|
||||
|
|
@ -504,18 +516,16 @@ class _AutomaticRun:
|
|||
if len(_best_trial(trials).valid_costs) >= target:
|
||||
return
|
||||
|
||||
early_jogs = self.iteration_callback is None and not options.congestion.shuffle_nets
|
||||
if early_jogs and self._try_column_jogs(options, trials, target):
|
||||
return
|
||||
small = replace(options, search=replace(options.search, node_limit=min(_NEAR_PORT_NODE_LIMIT, options.search.node_limit)))
|
||||
trials.extend(self._direct(small, "direct-probe-near-port"))
|
||||
if len(_best_trial(trials).valid_costs) >= target:
|
||||
return
|
||||
|
||||
if target == len(problem.nets) and not problem.initial_paths:
|
||||
with self._time("plan", planner="column-jogs"):
|
||||
for seeds in islice(column_jog_candidates(problem, options.search), 8):
|
||||
trial = self._verify(replace(problem, initial_paths=seeds), "column-jogs")
|
||||
if len(trial.valid_costs) == target:
|
||||
trials.append(trial)
|
||||
return
|
||||
if not early_jogs and self._try_column_jogs(options, trials, target):
|
||||
return
|
||||
|
||||
if len(problem.nets) <= 2:
|
||||
with self._time("plan", planner="perimeter"):
|
||||
|
|
|
|||
Loading…
Reference in a new issue