quantcore_circuits.layouts.chips.frame

Quantcore die frame (components/pdk_geometry_summary.md): dicing markers, alignment grids, device ID.

The frame lives inside the chip box. Its zero point is the die corner (the centre of the cross that the dicing markers of neighbouring dies form), so every position below is measured from the nearest die corner and mirrored for the other three corners.

  • Dicing markers — an L in each corner, legs dicing_leg long and dicing_width wide along the die edges.

  • Design area — the box inset by margin; components belong inside it.

  • Marker areas — marker_area squares in the four corners of the design area, each holding a 3×3 grid of alignment squares (grid_small at the corners and centre, grid_large at the edge midpoints).

  • Device ID — a device_id block holding the chip name, centred on one side of the design area: the bottom by default; when the chip’s own geometry already occupies that spot, the first free centre of top, left, right, else the nearest free spot slid along a side (choose_device_id(); on the left and right the block and its text are turned 90°). The chip parameter device_id_side ("auto" default, or a fixed side) overrides the choice.

Marker areas and the device ID are keep-outs for the layout DRC (keepouts()).

Attributes

Functions

choose_device_id(box, frame, occupied, dbu[, side, ...])

(side, block) for the device ID, or (None, None) when there is no room (the ID is optional).

design_area(box, frame) → kqcircuits.pya_resolver.pya.DBox

device_id_box(box, frame[, side, offset]) → kqcircuits.pya_resolver.pya.DBox

The device-ID block on side of the design area, offset µm from the side's centre along it (turned 90°

device_id_text(slot, text, dbu) → kqcircuits.pya_resolver.pya.Region

text in KLayout's default font, scaled to fit the device-ID block slot with a 10 % margin (dbu region).

draw_frame(cell, box, frame[, text, text_layer, ...]) → kqcircuits.pya_resolver.pya.DBox | None

Insert the frame into cell; the device-ID text goes on text_layer (a layer index).

frame_shapes(box, frame) → dict[str, list[kqcircuits.pya_resolver.pya.DBox]]

Frame geometry (µm boxes) keyed by QCC_LAYERS name.

keepouts(box, frame[, device_id]) → dict[str, kqcircuits.pya_resolver.pya.DBox]

Reserved areas: the four marker areas and the device-ID block (inside the design area), and the dicing-marker

Module Contents

quantcore_circuits.layouts.chips.frame.choose_device_id(box: kqcircuits.pya_resolver.pya.DBox, frame: quantcore_circuits.pdk.DieFrame, occupied: kqcircuits.pya_resolver.pya.Region | None, dbu: float, side: str = 'auto', clearance: float = 25.0, step: float = 50.0, anchors: list[kqcircuits.pya_resolver.pya.DBox] | None = None, pad_gap: float = 50.0)

(side, block) for the device ID, or (None, None) when there is no room (the ID is optional).

side fixed: centred on that side. "auto" (the user’s rule): the first block that keeps clearance µm from occupied (the chip’s geometry, dbu region), trying

  1. the centre of the bottom, top, left and right side;

  2. beside the pads (anchors: feedline pads / launchers), pad_gap µm left or right of each;

  3. slid along the left and right edges, then the bottom and top, in step µm increments (between the corner marker areas).

If nothing is free the chip gets no device ID (no DRC warning).

quantcore_circuits.layouts.chips.frame.design_area(box: kqcircuits.pya_resolver.pya.DBox, frame: quantcore_circuits.pdk.DieFrame) → kqcircuits.pya_resolver.pya.DBox
quantcore_circuits.layouts.chips.frame.device_id_box(box: kqcircuits.pya_resolver.pya.DBox, frame: quantcore_circuits.pdk.DieFrame, side: str = 'bottom', offset: float = 0.0) → kqcircuits.pya_resolver.pya.DBox

The device-ID block on side of the design area, offset µm from the side’s centre along it (turned 90° on the left and right).

quantcore_circuits.layouts.chips.frame.device_id_text(slot: kqcircuits.pya_resolver.pya.DBox, text: str, dbu: float) → kqcircuits.pya_resolver.pya.Region

text in KLayout’s default font, scaled to fit the device-ID block slot with a 10 % margin (dbu region).

A block taller than wide (left/right side) gets the text turned 90° (reading bottom to top).

quantcore_circuits.layouts.chips.frame.draw_frame(cell: kqcircuits.pya_resolver.pya.Cell, box: kqcircuits.pya_resolver.pya.DBox, frame: quantcore_circuits.pdk.DieFrame, text: str = '', text_layer=None, device_id_side: str = 'auto', occupied: kqcircuits.pya_resolver.pya.Region | None = None, anchors: list[kqcircuits.pya_resolver.pya.DBox] | None = None) → kqcircuits.pya_resolver.pya.DBox | None

Insert the frame into cell; the device-ID text goes on text_layer (a layer index).

occupied is the chip geometry already drawn and anchors the pads (for device_id_side="auto"). Returns the device-ID block used, or None: no text, or no free place (the ID is optional).

quantcore_circuits.layouts.chips.frame.frame_shapes(box: kqcircuits.pya_resolver.pya.DBox, frame: quantcore_circuits.pdk.DieFrame) → dict[str, list[kqcircuits.pya_resolver.pya.DBox]]

Frame geometry (µm boxes) keyed by QCC_LAYERS name.

quantcore_circuits.layouts.chips.frame.keepouts(box: kqcircuits.pya_resolver.pya.DBox, frame: quantcore_circuits.pdk.DieFrame, device_id: kqcircuits.pya_resolver.pya.DBox | None = None) → dict[str, kqcircuits.pya_resolver.pya.DBox]

Reserved areas: the four marker areas and the device-ID block (inside the design area), and the dicing-marker corners (in the margin). device_id is the block where the chip put it (default: the bottom position; False: the chip has no device ID).

quantcore_circuits.layouts.chips.frame.DEVICE_ID_SIDES = ('bottom', 'top', 'left', 'right')