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
1 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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue