Skip to content

Commit

Permalink
Phase out default_drc_runset
Browse files Browse the repository at this point in the history
- Modify `export_drc` attribute of `MaskSet` to be a string specifying the DRC file instead of boolean.

- Remove `default_drc_runset` from `defaults.py`.
  • Loading branch information
jukkarabina committed Apr 18, 2024
1 parent 701e783 commit 43704ba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 0 additions & 2 deletions klayout_package/python/kqcircuits/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@
default_junction_test_pads_type = "Junction Test Pads Simple"
default_tsv_type = "Tsv Standard"

default_drc_runset = "example.lydrc"

# Default list of Elements to break down before netlist export.
default_netlist_breakdown = [
"Waveguide Composite",
Expand Down
2 changes: 1 addition & 1 deletion klayout_package/python/kqcircuits/masks/mask_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def export_chip(chip_cell, chip_name, chip_dir, layout, export_drc, alt_netlists

# export drc report for the chip
if export_drc:
export_drc_report(chip_name, chip_dir)
export_drc_report(chip_name, chip_dir, export_drc)

# delete the static cell which was only needed for export
if static_cell.cell_index() != chip_cell.cell_index():
Expand Down
4 changes: 2 additions & 2 deletions klayout_package/python/kqcircuits/masks/mask_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MaskSet:
name: Name of the mask set
version: Version of the mask set
with_grid: Boolean determining if ground grid is generated
export_drc: Boolean determining if DRC report is exported
export_drc: String specifying the DRC file used for exporting the report. Use empty string to ignore DRC report.
chips_map_legend: Dictionary where keys are chip names, values are chip cells
mask_layouts: list of MaskLayout objects in this mask set
mask_export_layers: list of names of the layers which are exported for each MaskLayout
Expand All @@ -76,7 +76,7 @@ def __init__(
name="MaskSet",
version=1,
with_grid=False,
export_drc=False,
export_drc="",
mask_export_layers=None,
export_path=TMP_PATH,
add_mask_name_to_chips=False,
Expand Down
3 changes: 1 addition & 2 deletions klayout_package/python/kqcircuits/util/export_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
default_probe_suffixes,
recommended_probe_suffix_mapping,
VERSION_PATHS,
default_drc_runset,
DRC_PATH,
)
from kqcircuits.klayout_view import KLayoutView, MissingUILibraryException
Expand Down Expand Up @@ -452,7 +451,7 @@ def get_klayout_version():
return pya.Application.instance().version()


def export_drc_report(name, path, drc_script=default_drc_runset):
def export_drc_report(name, path, drc_script):
"""Run a DRC script on ``path/name.oas`` and export results in ``path/name_drc_report.lyrdb``."""

drc_runset_path = os.path.join(DRC_PATH, drc_script)
Expand Down

0 comments on commit 43704ba

Please sign in to comment.