Keep ambiguous S-bend templates local to affected nets
This commit is contained in:
parent
f762b86429
commit
867aab8fa2
1 changed files with 123 additions and 22 deletions
|
|
@ -40,7 +40,7 @@ The fields below appear in constructor order. Use one layout unit for coordinate
|
|||
|
||||
`PathSeed(segments)` holds an ordered tuple of `StraightSeed(length)`, `Bend90Seed(radius, direction)`, and `SBendSeed(offset, radius)` moves. Lengths and radii must be finite and positive. When routing a seed, straight lengths are rounded to the nearest grid unit, with ties rounded to even and a minimum of one unit. Bend directions are `"CW"` and `"CCW"`. S-bend offsets must be nonzero integers with magnitude less than twice the radius. A seed is materialized from the net's current start port using its width and the run's geometry options. Moves that use a generated circular outline or a proxy derived from one require a radius of at least half the net width.
|
||||
|
||||
A disabled radius or offset discards the seed and sets the net's `seed_error`. Active search can route the net from scratch. Zero-node replay still checks the other seeds. Unknown net IDs raise `ValueError`.
|
||||
A disabled radius or offset or an ambiguous S-bend outline discards the seed and sets the net's `seed_error`. Active search can route the net from scratch. Zero-node replay still checks the other seeds. Unknown net IDs raise `ValueError`.
|
||||
|
||||
## Results
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ A disabled radius or offset discards the seed and sets the net's `seed_error`. A
|
|||
| `RoutingResult.requested_net` and `effective_net` | The net as supplied and the net used by the worker, including resolved headings. |
|
||||
| `RoutingResult.path` | Ordered path components from the source to the last reached state. Each component carries its move specification and placed start and end ports. An unroutable result has an empty path. |
|
||||
| `RoutingResult.reached_target` | Whether the path reached the target position and heading. With heading inference, the check uses the chosen heading. Read `is_valid` for the result of geometry verification. |
|
||||
| `RoutingResult.report` | `total_length` in layout units plus static, dynamic, and self-collision counts. `out_of_bounds` flags geometry outside the board. `invalid_geometry` flags invalid polygons or a rejected seed that produced no path. `seed_error` describes a seed rejected by the configured move options or by geometry preparation. `terminal_error` identifies coincident ports or an inaccessible start or target face. |
|
||||
| `RoutingResult.report` | `total_length` in layout units plus static, dynamic, and self-collision counts. `out_of_bounds` flags geometry outside the board. `invalid_geometry` flags invalid polygons or a rejected seed that produced no path. `seed_error` describes a seed rejected by the configured move options or by geometry preparation. `terminal_error` identifies coincident ports or an inaccessible start or target face. `sbend_template_error` identifies S-bend moves skipped because multiple outlines matched the net width. A route using other moves can still complete. |
|
||||
| `RoutingResult.as_seed()` | The ordered moves for [saving a placement recipe](route-a-layout.md#save-a-placement-recipe) or replaying a path. |
|
||||
| `RoutingResult.locked_geometry` | Physical polygons checked during routing. Use these to inspect the route or [reserve a completed net](route-a-layout.md#reuse-an-existing-route). |
|
||||
| `RoutingRunResult.automatic` | In automatic mode, the selected planner, verified IDs, stage history, and any capacity or port-conflict bound. `None` for explicit modes. |
|
||||
|
|
@ -95,7 +95,7 @@ For structured logging, `dataclasses.asdict(run)` preserves the per-net fields.
|
|||
| `bend_physical_length` | `None` | Optional authored centerline length for the shared custom 90-degree template, including tangent extensions. Search, refinement, and reports use it when supplied. |
|
||||
| `distance_heuristic_weight` | `1.0` | Finite, nonnegative multiplier for the remaining-distance term only. Increase it to favor progress toward the target relative to estimated turn penalties. The routed path's objective stays the same. |
|
||||
|
||||
A custom S-bend outline uses local coordinates. Its input face is centered at `(0, 0)`, its output face at `(span, offset)`, and both ports face east. Use the same grid span as `SBendSeed(offset, radius)`, including any tangent extension to reach the output face. For example, an offset of `40` with radius `50` has its output at `(80, 40)`. The router rotates and translates the entire outline and uses it for collision checks and seed replay. Supply a separate outline to customize the opposite offset. Width matching allows a relative difference of `1e-12` to account for floating-point conversions. An ambiguous match raises an error. Unmatched moves use the circular S-bend. Set `SBendOutline.length` to use a process-specific centerline length for scoring, refinement, and reporting. The default is the nominal circular length. Automatic mode uses lattice search when an enabled outline matches a net width. Bundle mode requires circular bends for its nets.
|
||||
A custom S-bend outline uses local coordinates. Its input face is centered at `(0, 0)`, its output face at `(span, offset)`, and both ports face east. Use the same grid span as `SBendSeed(offset, radius)`, including any tangent extension to reach the output face. For example, an offset of `40` with radius `50` has its output at `(80, 40)`. The router rotates and translates the entire outline and uses it for collision checks and seed replay. Supply a separate outline to customize the opposite offset. Width matching allows a relative difference of `1e-12` to account for floating-point conversions. If multiple outlines apply to the same move, `route()` skips that move for the affected net and sets `sbend_template_error` in the final result and iteration callbacks. Direct calls to `SearchOptions.sbend_template()` and `sbend_outline()` raise `ValueError` for an ambiguous match. Moves with no matching outline use the circular S-bend. Set `SBendOutline.length` to use a process-specific centerline length for scoring, refinement, and reporting. The default is the nominal circular length. Automatic mode uses lattice search when an enabled outline matches a net width. Bundle mode requires circular bends for its nets.
|
||||
|
||||
Match custom outline faces to their declared ports and width. `SBendOutline` warns about a mismatch at construction. For a custom 90-degree outline used in a result, `route()` warns once per radius and net width. Replay an `SBendSeed` with the same outlines and bend settings.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue