rework structure of everything
This commit is contained in:
parent
dcc4d6436c
commit
941d3e01df
64 changed files with 3819 additions and 3559 deletions
54
README.md
54
README.md
|
|
@ -1,6 +1,6 @@
|
|||
# inire: Auto-Routing for Photonic and RF Integrated Circuits
|
||||
|
||||
`inire` is a high-performance auto-router designed specifically for the physical constraints of photonic and RF integrated circuits. It utilizes a Hybrid State-Lattice A* search combined with "Negotiated Congestion" (PathFinder) to route multiple nets while maintaining strict geometric fidelity and clearance.
|
||||
`inire` is a high-performance auto-router designed specifically for the physical constraints of photonic and RF integrated circuits. It uses a Hybrid State-Lattice A* search combined with negotiated congestion to route multiple nets while maintaining strict geometric fidelity and clearance.
|
||||
|
||||
## Key Features
|
||||
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
* **Analytic Correctness**: Every move is verified against an R-Tree spatial index of obstacles and other paths.
|
||||
* **1nm Precision**: All coordinates and ports are snapped to a 1nm manufacturing grid.
|
||||
* **Safety & Proximity**: Incorporates a "Danger Map" (pre-computed distance transform) to maintain optimal spacing and reduce crosstalk.
|
||||
* **Locked Paths**: Supports treating existing geometries as fixed obstacles for incremental routing sessions.
|
||||
* **Locked Routes**: Supports treating prior routed nets as fixed obstacles in later runs.
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
@ -26,42 +26,32 @@ pip install numpy scipy shapely rtree matplotlib
|
|||
## Quick Start
|
||||
|
||||
```python
|
||||
from inire.geometry.primitives import Port
|
||||
from inire.geometry.collision import CollisionEngine
|
||||
from inire.router.danger_map import DangerMap
|
||||
from inire.router.cost import CostEvaluator
|
||||
from inire.router.astar import AStarContext
|
||||
from inire.router.pathfinder import PathFinder
|
||||
from inire import NetSpec, ObjectiveWeights, Port, RoutingOptions, RoutingProblem, SearchOptions, route
|
||||
|
||||
# 1. Setup Environment
|
||||
engine = CollisionEngine(clearance=2.0)
|
||||
danger_map = DangerMap(bounds=(0, 0, 1000, 1000))
|
||||
danger_map.precompute([]) # Add polygons here for obstacles
|
||||
|
||||
# 2. Configure Router
|
||||
evaluator = CostEvaluator(
|
||||
collision_engine=engine,
|
||||
danger_map=danger_map,
|
||||
greedy_h_weight=1.2
|
||||
problem = RoutingProblem(
|
||||
bounds=(0, 0, 1000, 1000),
|
||||
nets=(
|
||||
NetSpec("net1", Port(0, 0, 0), Port(100, 50, 0), width=2.0),
|
||||
),
|
||||
)
|
||||
context = AStarContext(
|
||||
cost_evaluator=evaluator,
|
||||
bend_penalty=10.0
|
||||
options = RoutingOptions(
|
||||
search=SearchOptions(
|
||||
bend_radii=(50.0, 100.0),
|
||||
greedy_h_weight=1.2,
|
||||
),
|
||||
objective=ObjectiveWeights(
|
||||
bend_penalty=10.0,
|
||||
),
|
||||
)
|
||||
pf = PathFinder(context)
|
||||
|
||||
# 3. Define Netlist
|
||||
netlist = {
|
||||
"net1": (Port(0, 0, 0), Port(100, 50, 0)),
|
||||
}
|
||||
run = route(problem, options=options)
|
||||
|
||||
# 4. Route
|
||||
results = pf.route_all(netlist, {"net1": 2.0})
|
||||
|
||||
if results["net1"].is_valid:
|
||||
if run.results_by_net["net1"].is_valid:
|
||||
print("Successfully routed net1!")
|
||||
```
|
||||
|
||||
For incremental workflows, feed prior routed results back into a new `RoutingProblem` via `locked_routes` using `RoutingResult.as_locked_route()`.
|
||||
|
||||
## Usage Examples
|
||||
|
||||
For detailed visual demonstrations and architectural deep-dives, see the **[Examples README](examples/README.md)**.
|
||||
|
|
@ -82,11 +72,11 @@ Full documentation for all user-tunable parameters, cost functions, and collisio
|
|||
2. **90° Bends**: Fixed-radius PDK cells.
|
||||
3. **Parametric S-Bends**: Procedural arcs for bridging small lateral offsets ($O < 2R$).
|
||||
|
||||
For multi-net problems, the **PathFinder** loop handles rip-up and reroute logic, ensuring that paths find the globally optimal configuration without crossings.
|
||||
For multi-net problems, the negotiated-congestion loop handles rip-up and reroute logic, ensuring that paths find the globally optimal configuration without crossings.
|
||||
|
||||
## Configuration
|
||||
|
||||
`inire` is highly tunable. Every major component (Router, CostEvaluator, PathFinder) accepts explicit named arguments in its constructor to control expansion rules, cost weights, and convergence limits. See `DOCS.md` for a full parameter reference.
|
||||
`inire` is highly tunable. The public API is `RoutingProblem` plus `RoutingOptions`, routed via `route(problem, options=...)`. Search internals remain available only for internal tests and development work; they are not a supported integration surface. See `DOCS.md` for a full parameter reference.
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue