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 design are 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 to outline_layer, so that the runset can keep its waveguide from joining its ports; a box on pin_layer straddling each planar port, as wide as the port’s core profile; and the port name on label_layer at 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’s align flattens 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. A core_layer no port of design uses 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 None for none.

  • label_layer (tuple[int, int] | None) – Layer of the port names, or None for none.

  • pin_layer (tuple[int, int] | None) – Layer of the port boxes, or None for none.

  • pin_length (float) – Length of the pin boxes, along the port direction.

Returns:

Function for pre_export_function of lvs_check().

Return type:

Callable[[Component], None]