layout_pins¶
- photonforge.verification.layout_pins(design, core_layer, *, outline_layer, label_layer, pin_layer, pin_length=0.1)[source]¶
Pre-export function that draws pins over
Port.The exported cells of
designare marked by their place in its hierarchy:A device, a cell whose references carry no ports or terminals, gets its shapes on
core_layer, at every depth, copied tooutline_layer, so that the runset can keep its waveguide from joining its ports; a box onpin_layerstraddling each planar port, as wide as the port’s core profile; and the port name onlabel_layerat the port center.A circuit, a cell with references to cells with ports, gets the port names, and a box at each port of its references: a port no instance connects is then a pin too, and a connection the intent draws to it is reported.
A route from
photonforge.parametric, and the sections inside it, get nothing: routes are wires in the derived schematic, and the runset’salignflattens them.
Fiber and Gaussian ports have no layout, and a port whose spec has no profile on
core_layer, such as an electrical port, is not one the runset connects: neither is marked. Acore_layerno port ofdesignuses is refused, since nothing would be drawn. These layers and shapes are one convention; a runset that reads another takes a function of your own, for which this one is a template.- Parameters:
design (Component) – Component to be checked. Its hierarchy decides which cells are devices and which are circuits.
core_layer (tuple[int, int]) – Waveguide core layer, which the runset connects.
outline_layer (tuple[int, int] | None) – Layer of the device outlines, or
Nonefor none.label_layer (tuple[int, int] | None) – Layer of the port names, or
Nonefor none.pin_layer (tuple[int, int] | None) – Layer of the port boxes, or
Nonefor none.pin_length (float) – Length of the pin boxes, along the port direction.
- Returns:
Function for
pre_export_functionoflvs_check().- Return type:
Callable[[Component], None]