API¶
Add a bundle route using the a-star algorithm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component
|
ProtoTKCell
|
The component to add the route into. |
required |
ports1
|
list[PortLike]
|
the start ports |
required |
ports2
|
list[PortLike]
|
the end ports |
required |
straight
|
KCellSpec
|
the straight-spec to create straights with |
required |
bend
|
KCellSpec
|
the bend-spec to create bends with |
required |
layers
|
Iterable[LayerLike]
|
the layers to avoid. |
required |
grid_unit
|
Int
|
the discretization unit for the a-star algorithm. |
500
|
spacing
|
Length
|
the spacing between the waveguides in the bundle |
required |
clearance
|
Length
|
extra space (um) between the bundle body and any
obstacle on |
0.0
|
fan_in
|
FanStrategy
|
how the start ( |
'manhattan'
|
fan_out
|
FanStrategy | None
|
how the end ( |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
BundleResult | list[None]
|
class: |
BundleResult | list[None]
|
path lengths, and the bundle centerline. |
Add a fan-in to a parent component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component
|
ProtoTKCell
|
the component to add the fan-in to |
required |
inputs
|
list[PortLike]
|
the list of ports to start from |
required |
straight
|
KCellSpec
|
the straight-spec to create straights from |
required |
bend
|
KCellSpec
|
the bend-spec to create bends from |
required |
x_bundle
|
Length | None
|
the x-location (µm) where to form the confluence of the bundle. Will be two bend radii from the inputs if not given. |
None
|
y_bundle
|
Length | None
|
the y-location (µm) where to form the confluence of the bundle. Will be somewhere in the middle if not given. |
None
|
spacing
|
Length | None
|
the spacing (µm) between waveguides in the bundle |
None
|
start_dir
|
OrientationChar | None
|
the start direction of the bundle (derived from ports if not given) |
None
|
strategy
|
FanStrategy
|
fan-in strategy. A string ( |
'manhattan'
|
Returns:
| Type | Description |
|---|---|
NDArray[int64]
|
|
list[FanLeg]
|
bundle-side stop positions and |
tuple[NDArray[int64], list[FanLeg]]
|
class: |
tuple[NDArray[int64], list[FanLeg]]
|
|
tuple[NDArray[int64], list[FanLeg]]
|
maps back to the caller's |
tuple[NDArray[int64], list[FanLeg]]
|
lateral position). Each leg carries its placed instances |
tuple[NDArray[int64], list[FanLeg]]
|
( |
Add an a-star route to a component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component
|
ProtoTKCell
|
the component to add the route to |
required |
start
|
PortLike
|
the start port |
required |
stop
|
PortLike
|
the stop port |
required |
straight
|
KCellSpec
|
the straight-spec to create straights from |
required |
bend
|
KCellSpec
|
the bend-spec to create bends from |
required |
layers
|
Iterable[LayerLike]
|
the layers to avoid |
required |
grid_unit
|
Dbu
|
the discretization unit for the a-star algorithm |
required |
clearance
|
Length
|
extra space (µm) between the route body and any
obstacle on |
0.0
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
Route
|
class: |
Route
|
(start port, intermediate corners, stop port) and whose |
|
Route
|
|
|
Route
|
in µm ( |
Deprecated: use add_route_manual(corners=...).
Deprecated: use add_route_manual(steps=...).
Find an a-star route without adding it to the component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
component
|
ProtoTKCell
|
the component to find the route in |
required |
start
|
PortLike
|
the start port |
required |
stop
|
PortLike
|
the stop port |
required |
straight
|
KCellSpec
|
the straight-spec to create straights from |
required |
bend
|
KCellSpec
|
the bend-spec to create bends from |
required |
layers
|
Iterable[LayerLike]
|
the layers to avoid |
required |
grid_unit
|
Dbu
|
the discretization unit for the a-star algorithm |
required |
clearance
|
Length
|
extra space (µm) between the route body and any
obstacle on |
0.0
|
Returns:
| Type | Description |
|---|---|
PointsDbu
|
The corners of the route as a list of points in dbu. |
Automatically place instances using openroad-style or tiling mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
c
|
ProtoTKCell
|
component/KCell to place instances in. |
required |
instances
|
list[str] | list[PlacedInstanceSpec]
|
list of instance names or specs. |
required |
nets
|
list[PlacementNetSpec] | list[object]
|
placement netlist — either |
required |
mode
|
PlacementMode
|
"openroad", "tiling", or "auto". |
'auto'
|
objective
|
PlacementObjective | None
|
objective weights. |
None
|
constraints
|
PlacementConstraints | None
|
placement constraints. |
None
|
routing_feedback
|
RoutingFeedbackConfig | None
|
reserved for future routing-in-loop strategies. |
None
|
apply
|
bool
|
apply placement in-place when True. |
True
|
iterations
|
int
|
optimizer iteration budget. |
30
|
Returns:
| Type | Description |
|---|---|
PlacementReport
|
Structured placement report with final locations and metrics. |
Run place_auto with mode="openroad".
Run place_auto with mode="tiling".