Keep route placement at the layout writer boundary
Use the effective net, seed, and search settings as the placement recipe. Remove the export-grid, whole-layer, and CPW mask assembly helpers and cover replay from resolved ports.
This commit is contained in:
parent
07f1c47e26
commit
42e1de9884
2 changed files with 148 additions and 718 deletions
|
|
@ -1,7 +1,6 @@
|
|||
from dataclasses import replace
|
||||
|
||||
from inire import FixedRoute, NetSpec, ObjectiveWeights, Port, RoutingOptions, RoutingProblem, SearchOptions, TopologyOptions, route
|
||||
from inire.layout import verify_export_grid
|
||||
from inire.utils.visualization import plot_routing_results
|
||||
|
||||
|
||||
|
|
@ -26,9 +25,11 @@ def main() -> None:
|
|||
print("Routing detour net around locked path...")
|
||||
remaining = replace(problem, nets=(detour_net,), fixed_routes=(FixedRoute.from_result(fixed),))
|
||||
run = route(remaining, options=options)
|
||||
export = verify_export_grid(remaining, run.results_by_net, grid=1)
|
||||
if not export.is_valid:
|
||||
raise ValueError(export.reports_by_net)
|
||||
detour = run.results_by_net[detour_net.net_id]
|
||||
if not detour.is_valid:
|
||||
raise ValueError(detour.report)
|
||||
print("Detour net", detour.effective_net)
|
||||
print("Placement recipe", detour.as_seed())
|
||||
|
||||
fig, _ax = plot_routing_results({fixed.net_id: fixed, **run.results_by_net}, [], bounds)
|
||||
fig.savefig("examples/03_locked_paths.png")
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ After [installing Inire](../README.md#install), run the example scripts with Pyt
|
|||
|
||||

|
||||
|
||||
The first call routes a straight waveguide. `FixedRoute.from_result()` reserves its exact polygons, so the new connection passes to the left of the fixed route. The example checks the new route on the export grid against the fixed polygons. Run [`03_locked_paths.py`](03_locked_paths.py) to reproduce the detour. To hold a route fixed in your own design, follow the [route reuse workflow](../docs/user/route-a-layout.md#reuse-an-existing-route).
|
||||
The first call routes a straight waveguide. `FixedRoute.from_result()` reserves its exact polygons, so the new connection detours around one end of the fixed route. Run [`03_locked_paths.py`](03_locked_paths.py) to plot the detour and print its resolved net and placement recipe. To hold a route fixed in your own design, follow the [route reuse workflow](../docs/user/route-a-layout.md#reuse-an-existing-route).
|
||||
|
||||
<a id="fit-bends-to-available-room"></a>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue