qcc_kplugin.design_ops¶
design.json edits behind the Edit menu’s rename / chip settings / junction / coupling / pad-edge actions.
Plain Python (no pya), so they are unit-tested outside KLayout; edits.py holds the dialogs and menu actions.
Every function changes the design dict in place (and returns it, or a description) and raises ValueError with a
message fit for the status bar.
Attributes¶
Functions¶
|
|
|
A component placed with a junction gets its simulation / LOM values fixed in design.json |
|
Instances named by the sidecar's |
|
Rename instance |
|
Rename route |
|
Chip settings: the label written on the die ( |
|
A lumped element between two instances / routes the layout implies ( |
|
The lumped junction values (LOM and simulation only, not fab values) of |
|
The design's own substrate: |
|
{"h", "eps_r", "tan_d"} the design uses now (from the sidecar's |
Module Contents¶
- qcc_kplugin.design_ops.apply_pad_edge(design: dict, names: list[str]) list[str]¶
place.edge = "auto"on these instances (absolute placements): the build slides each pad perpendicular to its nearest die edge so its outer edge sits the PDK distance (100 µm) from it. Returns the names changed.
- qcc_kplugin.design_ops.fix_junction_at_placement(design: dict, inst: str, values: dict | None) str | None¶
A component placed with a junction gets its simulation / LOM values fixed in design.json (
junction = {Lj_nH, Cj_fF}, fromvalues:guiflow.placement_junction). An instance that has ajunctionalready (a duplicate keeps its source’s) is left alone. Returns the status-bar note, or None.
- qcc_kplugin.design_ops.pad_edge_instances(drc: list[dict]) list[str]¶
Instances named by the sidecar’s
pad_edgedesign warnings (a pad that is not at the PDK edge distance).
- qcc_kplugin.design_ops.rename_instance(design: dict, old: str, new: str) dict¶
Rename instance
oldtoneweverywhere the design refers to it: routes’ ends, snap placements, targets, sim groups, couplings. Order ofinstancesis kept.
- qcc_kplugin.design_ops.rename_route(design: dict, old: str, new: str) dict¶
Rename route
old: hanger ends that hang off it, targets, sim groups, couplings follow.
- qcc_kplugin.design_ops.set_chip(design: dict, name_chip: str | None = None, with_grid: bool | None = None, size=None) list[str]¶
Chip settings: the label written on the die (
chip.params.name_chip), the ground-plane grid (with_grid), the diesize= (width, height) µm (its lower left corner stays where it is). Returns what changed.
- qcc_kplugin.design_ops.set_coupling(design: dict, name: str, a: str, b: str, kind: str = 'C', value: float | None = None, note: str = '') dict¶
A lumped element between two instances / routes the layout implies (
couplings).kindC (fF), L (nH) or wire (portsinst.port, no value).
- qcc_kplugin.design_ops.set_junction(design: dict, inst: str, lj_nh: float | None, cj_ff: float | None, flux_phi0=KEEP, asym=KEEP) bool¶
The lumped junction values (LOM and simulation only, not fab values) of
inst, merged into its existingjunctiondict:Lj_nH(L_J0) andCj_fF(None removes the key), and for a SQUIDflux_phi0(Φ/Φ0) andasym(d), which are written only when non-zero (zero removes the key;KEEPleaves the stored value). Keys this function does not know stay as they are. Thejunctionentry goes when nothing is left in it. Returns True when design.json changed.
- qcc_kplugin.design_ops.set_substrate(design: dict, base_substrate: dict, h: float, eps_r: float, tan_d: float) str | None¶
The design’s own substrate:
design["pdk"]becomes"<pdk>+substrate(h=…,eps_r=…,tan_d=…)"with the values that differ from the PDK’sbase_substrate(all equal: the plain PDK name). Returns what changed, or None.
- qcc_kplugin.design_ops.substrate_of(sidecar_pdk: dict) dict¶
{“h”, “eps_r”, “tan_d”} the design uses now (from the sidecar’s
pdk), PDK defaults when it has none.
- qcc_kplugin.design_ops.KEEP¶
- qcc_kplugin.design_ops.RESERVED = ('chip',)¶
- qcc_kplugin.design_ops.SUBSTRATE_KEYS = ('h', 'eps_r', 'tan_d')¶