Autodesigner: Parametric GDS & KLayout

← Instruments

Parametric layout notes from my Python/GDS work: stripe arrays, changing pitch, fan-out, and wafer-level placement. “Autodesigner” here refers to the scripted design workflow, rather than a packaged application release.

Start with explicit geometry and units

Keep lengths in one physical unit throughout the geometry calculation, then convert once when writing the layout. In KLayout, integer coordinates are multiplied by layout.dbu (in micrometres); DBox and other D-prefixed geometry use micrometre coordinates. Keep layer number and datatype separate from the internal layer index.

Variable-pitch stripes

One layout iteration used an 8 mm stripe length. The adjacent center-to-center pitch was first varied from 0.1 to 1 mm and later revised to 0.5 to 1 mm. For N stripes, define N−1 spacings, then cumulatively sum them. This makes the pitch linear; equally spacing the centers does not produce a linear pitch ramp.

import numpy as np

def stripe_centers(n, pitch_min_um=500.0, pitch_max_um=1000.0):
    if n < 2 or pitch_min_um <= 0 or pitch_max_um <= 0:
        raise ValueError("Need at least two stripes and positive pitches")
    pitches = np.linspace(pitch_min_um, pitch_max_um, n - 1)
    centers = np.r_[0.0, np.cumsum(pitches)]
    return centers - centers.mean()

y_um = stripe_centers(8)
print("Adjacent pitches (um):", np.diff(y_um))

Fan-out and overlap checks

A later variant kept the original widths on the left half and widened all right-hand sections to 500 µm. Wider sections need their own center spacing and a transition region. For adjacent widths w₁ and w₂, the edge gap is pitch − (w₁ + w₂)/2. A pitch of 500 µm for two 500 µm-wide stripes gives zero gap, so a positive clearance must be added when electrical separation is required.

  • Check the entire fan-out polygon, not just the endpoints; transitions can cross or touch even when the terminal pads are separated.
  • Distinguish total stripe length from the length of each half and from the transition length.
  • Run spacing and overlap checks after rounding coordinates to the GDS database unit.
  • Reopen the exported GDS and measure representative widths, pitches, and the overall bounding box.

KLayout Python: a minimal layout

import pya  # Run in KLayout’s Python environment

layout = pya.Layout()
layout.dbu = 0.001  # micrometres per database unit
top = layout.create_cell("TOP")
metal = layout.layer(1, 0)
# Physical dimensions in micrometres: 8000 by 100
top.shapes(metal).insert(pya.DBox(-4000, -50, 4000, 50))
layout.write("stripe_example.gds")

This is a minimal example, not the complete fan-out mask. Keep a parameter table with the source layout, output filename, layer map, widths, pitch limits, number of stripes, and clearance.

Wafer placement and lithography handoff

The wafer-layout discussion used a 4-inch boundary and repeated cells on a 10 mm grid. Check full cell outlines against the usable wafer region; keeping only the cell center inside the circle is insufficient. Preserve hierarchy while developing the layout and flatten a separate export only when the downstream process requires it.

  • Inspect the top cell, intended exposure layers, origin, design extents, and alignment marks.
  • Keep annotation and wafer-outline layers separate from exposure layers.
  • A valid GDS file is not yet a verified lithography job: check the converted job in the target tool’s viewer and follow that facility’s current conversion rules.
  • Archive the design parameters with the released GDS so that later dimension changes are reproducible.

Reference: KLayout database API and coordinate units


Comments

一条对“Autodesigner: Parametric GDS & KLayout”的回复

  1. […] Parametric geometry and GDS layout […]

    赞

发表评论