Skip to main content

Hierarchy built-ins

inst

inst(cell: Cell, reflect?, angle?, x?, y?, xi?, yi?, construction?) -> Inst

Places a cell in the current scope.

ArgumentTypeRequirementDescription
cellCellRequired, positionalThe cell value to place, such as inverter(1200., 2000., 4).
reflectBoolOptional; falseMirror the cell before rotating and translating it.
angleIntOptional; 0Rotation in degrees: 0, 90, 180, or 270.
xFloatOptional keywordx position.
yFloatOptional keywordy position.
xiFloatOptional fallbackInitial x position.
yiFloatOptional fallbackInitial y position.
constructionBoolOptional; falseWhen true, leave the instance out of layout export and of the parent bounding box.

Returns Inst. The instance, with its position and the fields its cell exports.

let placed = inst(inverter(1200., 2000., 4), x=100., y=50., angle=90);

bbox

bbox(value: Cell | Inst) -> Rect

Returns the bounding box of a cell or a placed instance, as a construction rectangle.

ArgumentTypeRequirementDescription
valueCell | InstRequired, positionalA cell value, measured in its own coordinates, or an instance, measured after placement.

Returns Rect. A construction rectangle around the layout geometry.

let child = inverter(1200., 2000., 4);
let local = bbox(child);
let placed = inst(child, x=100., y=50.);
let transformed = bbox(placed);

Construction-only geometry does not count toward the bounding box.