kqcircuits.masks.mask_layout

class kqcircuits.masks.mask_layout.MaskLayout(layout, name, version, with_grid, chips_map, face_id, **kwargs)[source]

Bases: object

Class representing the mask for a certain face.

A MaskLayout is used to create the cells for the mask.

layout

pya.Layout for this mask

name

Name of the mask

version

Mask version

with_grid

Boolean determining if ground grid is generated

face_id

face_id of this mask layout, “1t1” | “2b1” | “2t1”

layers_to_mask

dictionary of layers with mask label postfix for mask label and mask covered region creation

covered_region_excluded_layers

list of layers in layers_to_mask for which mask covered region is not created

chips_map

List of lists (2D-array) of strings, each string is a chip name (or — for no chip)

chips_map_legend

Dictionary where keys are chip names, values are chip cells

wafer_rad

Wafer radius

wafer_center

Wafer center as a pya.DVector

chips_map_offset

Offset to make chips_map centered on wafer

wafer_top_flat_length

length of flat edge at the top of the wafer

wafer_bottom_flat_length

length of flat edge at the bottom of the wafer

dice_width

Dicing width for this mask layout

text_margin

Text margin for this mask layout

chip_size

side width of the chips (assuming square chips)

edge_clearance

minimum clearance of outer chips from the edge of the mask, measured from the chip center

chip_box_offset

Offset (pya.DVector) from chip origin of the chip frame boxes for this face

chip_trans

DTrans applied to all chips

mask_name_offset

mask name label offset from default position (DPoint)

mask_name_scale

text scaling factor for mask name label (float)

mask_text_scale

text scaling factor for graphical representation layer (float)

mask_marker_offset

offset of mask markers from wafer center in horizontal and vertical directions (float)

mask_export_layers

list of layer names (without face_ids) to be exported as individual mask .oas files

submasks

list of submasks, each element is a tuple (submask mask_layout, submask position)

extra_id

extra string used to create unique name for mask layouts with the same face_id

extra_chips

List of tuples (name, position, trans) for chips placed outside chips_map, trans is an optional transformation to use in place of self.chip_trans

top_cell

Top cell of this mask layout

added_chips

List of (chip name, chip position, chip_inst) populated by chips added during build()

build(chips_map_legend)[source]

Builds the cell hierarchy for this mask layout.

Inserts cells copied from chips_map_legend to self.top_cell at positions determined by self.chips_map. The copied cells are modified to only have layers corresponding to self.face_id, and they are translated and/or mirrored correctly based on self.face_id. Also inserts cells for mask markers, mask name label, and the circular area covered by the mask.

Parameters

chips_map_legend – Dictionary where keys are chip names, values are chip cells

insert_chip_copy_labels(labels_cell, layers)[source]

Inserts chip copy labels to all chips in this mask layout and its submasks

Parameters
  • labels_cell – Cell to which the labels are inserted

  • layers – list of layer names (without face_ids) where the labels are produced

face()[source]

Returns the face dictionary for this mask layout

../_images/kqcircuits.masks.mask_layout.png