Skip to content

FabCheck tutorial assets

Original synthetic examples for Write your first FabCheck DRC deck. These are teaching geometries, not foundry designs. Tracking issue: GF+ #5642.

Files

  • rules.py: two-rule deck; rules.fcd: its compiled artifact.
  • make_layouts.py: writes both GDS files using KLayout, with top cells VIOLATIONS and CORRECTED respectively, and layer 10/datatype 0.
  • violations.gds: 0.10 µm width and 0.15 µm spacing; violations.lyrdb: one M1.WIDTH item and one M1.SPACE item.
  • corrected.gds: 0.20 µm width and 0.30 µm spacing; corrected.lyrdb: zero items.
  • check-drc-menu.png: user-provided GF+ screenshot of the viewer check menu, copied unchanged.
  • custom-deck-ready.png: user-provided screenshot, copied unchanged, showing Cloud mode with fabcheck/rules-recompiled.fcd selected, the built-in source disabled, and only M1.WIDTH and M1.SPACE checked, with 2 rules selected. Replaces the earlier screenshot of a different custom deck; this is the expected state before submitting the tutorial's Cloud run.
  • add-custom-deck-cloud.png: replacement screenshot supplied by Eve and copied unchanged, showing the Cloud DRC panel for violations.gds with a red arrow pointing to Add custom deck… beside Built-in: demopdk. Replaces the earlier add-custom-deck.png; the new filename refreshes cached previews.
  • choose-compiled-deck.png: user-provided screenshot, copied unchanged, with a red arrow pointing to the fabcheck/rules-recompiled.fcd entry to select. The screenshot is taken before switching from the selected fabcheck/rules.fcd; built-in and custom rules are both still enabled.
  • violations-layout.png: user-provided screenshot of violations.gds open in the GF+ layout viewer, copied unchanged. Shows the three example rectangles before running DRC; it does not show execution results.
  • install-fabcheck.png: user-provided Windows terminal screenshot, copied unchanged, showing uv pip install fabcheck==0.2.0 successfully installing into the photonics-full project's .venv with Python 3.12.14. Installation output is not DRC execution evidence.
  • select-cloud-mode.png: user-provided screenshot, copied unchanged, showing Cloud selected in the DRC panel for violations.gds, with a red arrow pointing to the Cloud option. This shows mode selection before execution.

  • remove-built-in-deck.png: user-provided screenshot, copied unchanged, showing fabcheck/rules-recompiled.fcd selected alongside the built-in demo deck, with a red arrow pointing to the × on Built-in: demopdk. Shows the state before removing the built-in source, with 13 rules selected.

Verification provenance

The example top cells were subsequently renamed from FABCHECK_DEMO to VIOLATIONS and CORRECTED, matching the corresponding filenames case-insensitively for GF+ 2.2.502 report navigation. Only the GDS structure-name records and reference-report cell labels changed; geometry, rule definitions, report markers and finding counts were preserved. The generator now uses name.upper(). The renamed violations.gds has since been rerun in GF+ 2.2.502 Cloud, as shown below. The renamed corrected.gds has also completed a GF+ 2.2.502 Cloud run with PASSED and No errors, shown in cloud-corrected-results.png. The renamed files have not been rerun through the adapter; the reference-report provenance below describes the original geometry. Current GF+ dev resolves a unique hierarchy root without requiring a filename match.

Eve's subsequent GF+ 2.2.502 Cloud walkthrough supplied cloud-drc-results.png, copied unchanged. The replacement screenshot shows a completed run of the renamed violations.gds with a VIOLATIONS outcome and two findings under the VIOLATIONS cell. Selecting the width finding highlights the thin bottom strip in red, demonstrating result navigation for the renamed layout. The separate cloud-corrected-results.png screenshot, supplied by Eve and copied unchanged, shows corrected.gds with a completed Cloud run, PASSED, and No errors. The engine verification below remains the provenance for the supplied reference reports.

Verified on 2026-10-28:

  • Python 3.12.14; published fabcheck==0.2.0 for validation and compilation.
  • klayout==0.30.12 for GDS creation.
  • DoPlayDo drctesting source revision 58f239375a42119fd6b7e37b61f836d2231c9d24, clean working tree, for execution through drcgen.compiled_deck.run_deck_file; KLayout 0.30.0 in that execution environment.
  • FabCheck's upstream authoring documentation was checked at revision ebebc0c4a9ec982dacd604e00d92ea9a4c0dc4f5.

The .fcd was executed against both files using the compiled-deck adapter, including its capability validation and worker report exporter. These are actual engine results. The GF+ UI instructions were checked against the current source, but this documentation task did not submit a cloud job or exercise a live GF+ UI session.

From this asset directory, in an environment with the tutorial dependencies:

python make_layouts.py
fabcheck validate rules.py
fabcheck compile rules.py -o rules.fcd

Use a fresh output directory or remove the previous rules.fcd before compilation. Validation must print first-fabcheck-deck: valid (2 rules).

For maintainers with the recorded drctesting checkout and its dependencies, run the following from this directory. This is the internal verification procedure; readers run the deck through GF+ as described in the tutorial.

from pathlib import Path
from tempfile import TemporaryDirectory

from drcgen.compiled_deck import run_deck_file

root = Path.cwd()
for name, expected in (
    ("violations", {"M1.WIDTH": 1, "M1.SPACE": 1}),
    ("corrected", {}),
):
    with TemporaryDirectory() as temporary:
        report = run_deck_file(
            root / "rules.fcd",
            primary_layout=root / f"{name}.gds",
            work_directory=Path(temporary) / "work",
        )
        counts = {
            category.name(): len(
                list(report.each_item_per_category(category.rdb_id()))
            )
            for category in report.each_category()
        }
        assert counts == expected, (name, counts)
        assert report.num_items() == sum(expected.values())
        report.save(str(root / f"{name}.lyrdb"))
        print(name, counts)

Expected output:

violations {'M1.WIDTH': 1, 'M1.SPACE': 1}
corrected {}