add_bundle_astar
add_bundle_astar(
component: ProtoTKCell,
ports1: list[PortLike],
ports2: list[PortLike],
straight: KCellSpec,
bend: KCellSpec,
layers: Iterable[LayerLike],
grid_unit: Int = 500,
*,
spacing: Length,
clearance: Length = 0.0,
fan_in: FanStrategy = "manhattan",
fan_out: FanStrategy | None = None,
fanin_strategy: FanStrategyType | None = None,
fanin_strategy_kwargs: dict[str, Any] | None = None,
return_corners: Any = _UNSET,
fanout_strategy: FanStrategyType | None = None,
fanout_strategy_kwargs: dict[str, Any] | None = None,
) -> BundleResult | list[None]
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. |
Source code in doroutes/bundles.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
add_fan_in
add_fan_in(
component: ProtoTKCell,
inputs: list[PortLike],
straight: KCellSpec,
bend: KCellSpec,
*,
x_bundle: Length | None = None,
y_bundle: Length | None = None,
spacing: Length | None = None,
start_dir: OrientationChar | None = None,
strategy: FanStrategy = "manhattan",
) -> NDArray[int64]
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'
|
Source code in doroutes/fanin.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
add_route_astar
add_route_astar(
component: ProtoTKCell,
start: PortLike,
stop: PortLike,
straight: KCellSpec,
bend: KCellSpec,
layers: Iterable[LayerLike],
grid_unit: Dbu,
*,
clearance: Length = 0.0,
) -> PointsUm
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:
| Type | Description |
|---|---|
PointsUm
|
The routed corner points in µm. |
Source code in doroutes/routing.py
add_route_from_corners
add_route_from_corners(
component: ProtoTKCell,
start: PortLike,
stop: PortLike,
corners: list[tuple[Length, Length]] | None = None,
*,
straight: KCellSpec,
bend: KCellSpec,
return_corners: bool = False,
) -> PointsUm | None
Deprecated: use add_route_manual(corners=...).
Source code in doroutes/routing.py
add_route_from_steps
add_route_from_steps(
component: ProtoTKCell,
start: PortLike,
stop: PortLike,
steps: list[Step],
*,
straight: KCellSpec,
bend: KCellSpec,
return_corners: bool = False,
) -> PointsUm | None
Deprecated: use add_route_manual(steps=...).
Source code in doroutes/routing.py
find_route_astar
find_route_astar(
component: ProtoTKCell,
start: PortLike,
stop: PortLike,
straight: KCellSpec,
bend: KCellSpec,
layers: Iterable[LayerLike],
grid_unit: Dbu,
*,
clearance: Length = 0.0,
) -> PointsDbu
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. |
Source code in doroutes/routing.py
place_auto
place_auto(
c: ProtoTKCell,
instances: list[str] | list[PlacedInstanceSpec],
nets: list[PlacementNetSpec] | list[object],
*,
mode: PlacementMode = "auto",
objective: PlacementObjective | None = None,
constraints: PlacementConstraints | None = None,
routing_feedback: RoutingFeedbackConfig | None = None,
apply: bool = True,
iterations: int = 30,
) -> PlacementReport
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. |
Source code in doroutes/placement.py
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | |
place_openroad_style
place_openroad_style(
c: ProtoTKCell,
instances: list[str] | list[PlacedInstanceSpec],
nets: list[PlacementNetSpec],
**kwargs: Any,
) -> PlacementReport
Run place_auto with mode="openroad".