ArrayCopy
A read-only view of one copy in an arrayed Instance.
Import with from rosette.layout import ArrayCopy.
Produced by Instance.copy() and
Instance.copies(). Exposes the copy's grid position,
its world-space transform, and a port(name) helper for retrieving the
transformed port of this specific copy.
ArrayCopy is observational, not a competing placement abstraction. It
cannot be added to a Cell or transformed into an independent placement;
add its parent Instance instead. Creating or iterating these views does not
add geometry or GDS references. The parent AREF is the only placement written
to the output. This lets you attach per-copy labels, compute per-copy routing
endpoints, or build side-channel metadata (netlists, measurement scripts)
without bloating the GDS with columns * rows extra SREFs.
# 8x8 photodiode array: one AREF in the GDS, per-copy metadata in Python.
pds = pd_cell.at(0, 0).array(8, 8, 50.0, 50.0)
top.add_ref(pds)
netlist = []
for copy in pds.copies():
netlist.append({
"name": f"PD_{copy.col}_{copy.row}",
"anode": copy.port("A").position,
"cathode": copy.port("K").position,
})Attributes
attributecolintGrid column of this copy (0-indexed).
attributerowintGrid row of this copy (0-indexed).
attributetransformTransformWorld-space transform of this copy. The outer transform of the parent
Instance composed with the local copy offset. Applying it to the
parent cell's local coordinates gives world-space coordinates for
this copy specifically.
attributepositionPointWorld-space position of the copy's anchor (its local origin).
Equivalent to copy.transform.apply(Point.origin()).
attributecellCellThe underlying cell definition (shared with the parent Instance).
Methods
func__init__(instance, col, row) -> NoneCreate a read-only view for one array position.
paraminstanceInstanceParent arrayed instance.
paramcolintZero-based column index.
paramrowintZero-based row index.
Returns
Nonefuncport(name) -> PortGet the transformed port of this specific copy.
Both position and direction are transformed into world space.
Example
# Ring bank with per-ring labels.
bank = ring_cell.at(0, 0).array(8, 1, 30.0, 0.0)
top.add_ref(bank)
for copy in bank.copies():
top.add_text(
f"R{copy.col}",
copy.port("in").position,
layer=Layer(10, 0),
)paramnamestrName of the port to retrieve.
Returns
PortThe port with position and direction transformed into world space.