Statements that belong at the top of the file, before the first layer line. One statement per line. An unknown word is a parse error.
Available · yields comment
units 1e-6 # metres per user unit
# starts a comment outside "…". The rest of the line is ignored. Strings may contain #.
layer x = input(1) # via is valid. check "A#1" "t" : … — # inside quotes is not a comment. There are no block comments and no line-continuation \. A line that is only whitespace and a comment is empty.
Available · yields binding
layer m1 = input(68, 20)
layer nar = width(m1) < 0.14 um
Binds a name to exactly one layer expression. The same check expression may stand here — then the markers are a layer, not a report entry.
A later assignment to the same name replaces the earlier one. The right-hand side may only use names already defined — a forward reference is an error. No if, no loop, no unpacking (no a, b = split_…).
Available · yields named expression
check "M1.W" "min width" : width(m1) < 0.14 um
check "M1.W" "min width" severity warn : width(m1) < 0.14 um -> 200, 0
A check is the expression after :. The strings are the ID and the report text. Without check, the same expression is an anonymous layer. Markers are the result of the expression (typically edge pairs).
An empty result is a pass — except empty / count when they produce their dummy marker. The ID is for the report and for select_checks. severity and -> layer,dt are optional. Comparisons: < <= > >= == !=. Area uses um2.
Available · yields setup
units 1e-6
Sets the user unit in metres. Bare numbers in limits and in sized then use that unit (typically µm). The GDS database unit comes from the layout, not from this line.
If units is omitted, 1e-6 is used (1 user unit = 1 µm). 0.18 um and 180 nm are converted through this base into dbu; 180 dbu bypasses user units. If several units lines exist, the last one before the checks is used. It does not rewrite GDS coordinates that were already read.
Available · yields setup
grid 0.005 um
Manufacturing grid. Default for ongrid(layer) when no number is given. snap and checks with their own limit ignore grid, unless they call ongrid without an argument.
grid 0 or a negative grid: ongrid without a number finds no off-grid hits. Only X = Y. There is no grid gx, gy in setup (anisotropic snap is snap(a, gx, gy)). include can insert another file that sets grid — the last effective line after expansion wins.
Available · yields setup
mode flat
Flatten every instance into the start cell. This is the current default, even without the line.
mode deep and mode tiles exclude each other. Arrays and nested instance orientations are transformed while flattening. An empty cell: every input layer is empty; checks without geometry produce no markers (except empty).
Available · yields setup
mode deep
Evaluate each unique cell locally (without child instances), then transform markers to every instance. A flatten pass follows; a marker that is already present locally (IoU ≥ 0.8, same rule) is not duplicated. Space across cells comes from the flatten pass.
Intra-cell width in a leaf: one marker per instance, same box as flatten at those origins. A cell with no local shapes: no markers from that cell; children are evaluated separately. Space between two placed instances: flatten pass, one marker as in flat.
Available · yields setup
mode tiles 200 um, 150 um, border 20 um, threads 8
Tiles with a halo. border and threads belong on this line. If border is omitted, the largest distance-check limit in the file is used. Shapes that cross the halo stay whole; a marker counts when its box centre lies in the core tile (the last tile includes the outer edge).
One length: square tiles. Two lengths: width and height. Space/width across a tile seam: a halo ≥ the limit finds the same marker as flat. threads N on the tiles line parallelises the statement DAG inside each tile. Tiles themselves stay sequential (shared input clip). DRCENGINE_TILE_THREADS overrides N. The setup line threads N drives the flat pass; mode deep stays serial.
Available · yields setup
threads 8
Worker count for the flat scheduler. If the line is omitted or 0, the engine uses QThread::idealThreadCount(). threads 1 is the serial path. DRCENGINE_THREADS overrides the value.
threads 1: same order and markers as before parallelisation. Independent layer chains and checks run concurrently; markers are merged in statement order. mode deep stays serial. mode tiles … threads N parallelises only the DAG inside each tile; DRCENGINE_TILE_THREADS overrides N.
Available · yields setup
source TOP
Start cell. Flatten and bounds() refer to this cell.
An unknown name: empty design, every layer empty. If source is omitted, the top cell of the layout is used. cells then keeps only matching cell names (glob) from the flattened tree.
Available · yields setup
cells "INV*"
Only shapes from cells whose name matches the glob. Flatten stays on: the source cell is still descended, but own shapes of non-matching cells are dropped.
No match: empty set, not silently all cells. Combined with clip: cells first, then a hard clip window.
Available · yields setup
clip 0, 0, 100 um, 100 um
Hard clip window in user units. Polygons are cut to the frame (AND with the rectangle); edges/pairs are kept only if their bbox hits the window.
A shape that crosses the frame: the part outside is dropped. An empty window or min > max: empty.
Available · yields setup
gds other = "chip_b.gds"
Bind a second layout. Layers from it: input(n, d, from=other). Relative paths are resolved against the deck baseDir.
A missing file or unknown alias is a runtime error, not a silent empty layer. Without from=, input stays on the primary design. The main layout clip does not apply to the second GDS.
Available · yields setup
include "common.ledrc"
Insert another file before parse (relative to the directory of the main file). Relative paths, UTF-8.
A missing file is a parse error. Cycles are not detected — do not include files in a loop. The inserted file may contain units / grid / layer; names overwrite in expansion order. No if, no macros.
Available · yields setup
select_checks "M1.*"
Run only checks whose ID matches the glob. unselect_checks is the counterpart: first the select union, then unselect.
No match: no checks, not all of them. Unselect without a prior select: all minus the glob.
Available · yields setup
unselect_checks "M1.DEBUG*"
Removes check IDs from the run set. Together with select_checks: first the select union, then unselect.
Unselect without a prior select: all minus the glob. No match: no change.
Available · yields setup
max_results 1000
Global marker cap after all checks (all = unlimited). Extra markers are truncated at the end.
0: no markers. Order is the check/marker order in the deck, not sorted by distance.
Available · yields setup
chip yes
With mode deep: only the source cell, with no extra flatten pass and no child cells. Child geometry does not appear in input().
chip no or omitted: deep checks every reachable cell and merges the flatten pass.