ホーム/ハードウェア&電子工学/semiconductor-photomask-design-skill
S

semiconductor-photomask-design-skill

by @Elder-Driverv
3.5(20)

Python と gdstk を使って、製造可能な GDSII フォトマスクレイアウトをパラメトリックに生成し、エクスポート後の検証を実行します。寸法、レイヤ番号、ラベル、アライメントマーク、アレイ、キープアウト領域を製造データとして管理し、半導体およびマイクロ・ナノ加工チームがマスク設計を迅速に反復し、パラメータスイープやテープアウト前検査を行うのに適しており、レイアウト読取りやジオメトリエラーを削減します。

photomaskgdsiigdstkpythonsemiconductorGitHub
インストール方法
git clone https://github.com/Elder-Driver/semiconductor-photomask-design-skill.git
compare_arrows

Before / After 効果比較

1 组
使用前

gdstk スクリプトを手動で書き、寸法とレイヤ番号は散在し、ラベルはコメントで代用し、アライメントマークとアレイは目視に頼り、エクスポート後に GDS を読み戻さないため、キープアウト衝突や単位精度エラーを見落としやすい。

使用後

パラメータ化ソースファイルと読み戻し検証フローを使用し、レイヤ番号、ラベル、アライメントマーク、アレイ、キープアウト領域を自動生成して検査し、衝突時のみデバイスを省略し、GDS の境界、セル、繰り返し数を追跡できる。

SKILL.md

name: designing-python-photomasks description: Use when creating, modifying, or checking Python-generated GDSII photomasks with gdstk, including geometric features, physical labels, alignment marks, parameter sweeps, arrays, keepouts, and sample-bound validation.

Designing Python Photomasks

Overview

Create a parameterized Python source of truth, export GDSII, and verify the serialized file rather than trusting an in-memory preview. Treat all dimensions, layer assignments, label geometry, alignment features, and placement rules as fabrication data.

Workflow

  1. Inspect existing Python and reference GDS files when present. Read actual layers, polygons, references, and bounds; do not infer geometry from display color or screenshots alone.
  2. Establish a compact design contract: user unit and precision, sample envelope, layer/datatype map, polarity, diameter versus radius, per-side clearances, label convention, alignment-mark geometry, and array rules. Ask only about missing choices that materially change fabrication; otherwise expose assumptions as named parameters.
  3. Build reusable cells for devices, labels, and marks. Place them with references in a top cell. Keep fabrication layers explicit on every polygon.
  4. Use parameter lists as the source of design variants. Derive human-readable labels from those parameters and keep a Markdown table of design IDs, dimensions, repeat counts, and later performance.
  5. Place alignment marks at explicit coordinates. Compute conflicts from placed device bounding boxes and keepout boxes, then omit only conflicting references. Prefer integer-micrometre centers when instrument coordinates require them.
  6. Write GDS, read it back with gdstk.read_gds, and verify units, precision, layers, cell/reference counts, critical bounds, labels, mark origins, per-design repeats, and the full sample envelope. Also inspect the result in KLayout before fabrication.

Geometry Rules That Prevent Common Errors

  • “Clearance on every side” changes a diameter by twice the clearance.
  • Use gdstk.ellipse(..., inner_radius=...) for a true annulus. Use Boolean subtraction only when the inner and outer shapes are not concentric circles.
  • gdstk.text returns physical polygons; it is not a viewer annotation. Put labels on the process layer that should print.
  • GDS stores curves as polygons. Visible segment boundaries or fracture lines in a viewer are not automatically physical gaps; verify polygon continuity and Boolean union when continuity matters.
  • For a lead that must touch a ring, overlap the intended region explicitly. A merely coincident-looking preview is not sufficient.
  • Reuse cells with references; do not flatten the fabrication GDS merely to make an SVG viewer happy. Flatten only a separate preview when necessary.

References and Starter

Deliverables

Return the parameterized Python source, generated GDS, any useful layer/overlay preview, a design/performance table for parameter sweeps, and verification evidence. State what was checked automatically and what still requires KLayout or fabrication review.

--- README.md ---

Semiconductor Photomask Design Skill

A reusable Codex skill for designing semiconductor and microfabrication photomasks with Python and gdstk. It helps turn a geometry and process-layer specification into parameterized, inspectable GDSII layout rather than a one-off drawing.

Use it for devices with circles, annuli, rectangles, leads, physical text labels, alignment marks, parameter sweeps, repeated arrays, keepouts, and sample-bound checks.

What it covers

  • Explicit GDSII units, layers, datatypes, and cell hierarchy
  • Disks, rings, Boolean geometry, connected leads, and split-layer alignment marks
  • Physical GDS polygon labels such as 30-1
  • Parameterized design variants and repeat-count tracking
  • Alignment-mark placement with integer coordinates and minimal device removal
  • GDS export followed by readback validation of geometry, layers, labels, marks, references, and sample bounds

The included starter script produces a two-layer example GDS and validates it after serialization:

python3 -m pip install -r requirements.txt
python3 assets/gdstk_photomask_starter.py --output output/starter_mask.gds

Use as a Codex skill

Clone this repository into either a project-local .agents/skills/ directory or your Codex skills directory, then invoke it by name:

Use $designing-python-photomasks to create a parameterized GDS mask for a two-layer semiconductor device array.

The skill entry point is SKILL.md. It routes to focused references for primitives and labels, or arrays, alignment marks, and GDS validation.

Fabrication boundary

This skill creates and validates layout data. It does not determine resist polarity, mask-writer fracture settings, foundry minimum feature rules, process overlay accuracy, or electrical performance. Review the exported GDS in KLayout and run the applicable foundry/process DRC before fabrication.

License

MIT. See LICENSE.

ユーザーレビュー (0)

レビューを書く

効果
使いやすさ
ドキュメント
互換性

レビューなし

統計データ

インストール数0
評価3.5 / 5.0
バージョン
更新日2026年9月29日
比較事例1 件

ユーザー評価

3.5(20)
5
35%
4
35%
3
15%
2
10%
1
5%

この Skill を評価

0.0

対応プラットフォーム

🔧Manual

タイムライン

作成2026年9月29日
最終更新2026年9月29日
🎁 Agent 知識カード
アンケート