Fix fabrication verification and routing diagnostics follow-up

This commit is contained in:
Jan Petykiewicz 2026-11-29 00:09:54 -08:00
commit cea23ef1b4

View file

@ -32,14 +32,15 @@ An authored 286.770 µm path in the Raymond MZI array can be replaced geometrica
## Check the export grid
Use the layout writer's rounding grid in routing units. `verify_export_grid` rounds route vertices while holding the supplied keepouts fixed. Supply the actual keepout geometry as it will appear in the file. Export the returned polygons only if their reports pass. Recheck the assembled cell after writing when the writer performs further operations such as path merging or coordinate transforms.
Use the layout writer's rounding grid in routing units. `verify_export_grid` rounds route vertices while holding the supplied keepouts fixed. Supply the keepout geometry as it will appear in the file and pass all intended routes on the layer in one call so they are checked against each other. The function requires each supplied result to have passed routing verification. Recheck the assembled cell after writing when the writer performs further operations such as path merging or coordinate transforms.
```python
from inire.layout import verify_export_grid
verified = {name: result for name, result in run.results_by_net.items() if result.is_valid}
export = verify_export_grid(problem, verified, grid=1.0)
assert export.is_valid, export.reports_by_net
results = {net.net_id: run.results_by_net[net.net_id] for net in problem.nets}
export = verify_export_grid(problem, results, grid=1.0)
if not export.is_valid:
raise ValueError(export.reports_by_net)
geometry_by_net = export.geometry_by_net
```
@ -58,24 +59,32 @@ for layer, nets in partition_layers([((1, 0), silicon_net), ((4, 0), nitride_net
plane = RoutingProblem(bounds, nets, static_obstacles=keepouts_by_layer[layer], clearance=clearance_by_layer[layer])
run = route(plane, options=options_by_layer[layer])
export = verify_export_grid(plane, run.results_by_net, grid=1.0)
assert export.is_valid, export.reports_by_net
if not export.is_valid:
raise ValueError(export.reports_by_net)
geometry_by_layer[layer] = export.geometry_by_net
```
For different bend rules on the same layer, supply each group's allowed radii in `SearchOptions`. `route_profiles` applies those options to search, seed replay, and refinement, and reserves the verified groups in the order supplied. In the QFoundry example, the flux line can use 15 µm radius while the feedline requires at least 50 µm although both have a 15.5 µm signal width and 7 µm gaps. [QFoundry process profiles](https://github.com/tii-qfoundry/PDK_QFoundry/blob/9c31db1d6879c96bd98460ee134181a865481d75/qfoundry/tech/waveguides.xml#L21-L64)
```python
from inire.layout import route_profiles
from inire import RoutingProblem
from inire.layout import route_profiles, verify_export_grid
results = route_profiles(plane, [
(("flux",), flux_options),
(("feed",), feed_options),
cpw_plane = RoutingProblem(
bounds, (flux_net, feed_net), static_obstacles=cpw_keepouts, clearance=ground_strip_width,
)
results = route_profiles(cpw_plane, [
((flux_net.net_id,), flux_options),
((feed_net.net_id,), feed_options),
])
export = verify_export_grid(cpw_plane, results, grid=1.0)
if not export.is_valid:
raise ValueError(export.reports_by_net)
```
## Verify a coplanar waveguide cross-section
For a 15.5 µm signal with a 7 µm gap on each side, route the 29.5 µm envelope. Use the required ground-strip width as the clearance between envelopes. Replay the verified seed with a 15.5 µm net using the same ports and bend rules. The conductor and envelope together define the negative gap mask. A separate wider ground exclusion can be buffered locally from the envelope. This fills the inside of turns where a constant-width circular strip wider than the bend diameter would collapse.
For a 15.5 µm signal with a 7 µm gap on each side, route the 29.5 µm envelope. Use the required ground-strip width as the clearance between envelopes. Replay the verified seed with a 15.5 µm net using the same ports and bend rules. The conductor and envelope together define the negative gap mask. `coplanar_geometry` checks for side contact and allows the gap to end at the terminal faces. Check the process minimum gap in the assembled layout. A separate wider ground exclusion can be buffered locally from the envelope. This fills the inside of turns where a constant-width circular strip wider than the bend diameter would collapse.
```python
from inire.layout import coplanar_geometry