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 #.
Notes
layer x = input(1) # via is valid.check "A#1" "t" : … — # inside quotes is not a comment.\.layer name = exprAvailable · 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.
Notes
if, no loop, no unpacking (no a, b = split_…).checkAvailable · 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).
Notes
empty / count when they produce their dummy marker.select_checks.severity and -> layer,dt are optional.< <= > >= == !=. Area uses um2.unitsAvailable · 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.
Notes
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.units lines exist, the last one before the checks is used.gridAvailable · 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.
Notes
grid 0 or a negative grid: ongrid without a number finds no off-grid hits.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.mode flatAvailable · yields setup
mode flat
Flatten every instance into the start cell. This is the current default, even without the line.
Notes
mode deep and mode tiles exclude each other.input layer is empty; checks without geometry produce no markers (except empty).mode deepAvailable · 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.
Notes
flat.mode tilesAvailable · 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).
Notes
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.threads N drives the flat pass; mode deep stays serial.threadsAvailable · 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.
Notes
threads 1: same order and markers as before parallelisation.mode deep stays serial. mode tiles … threads N parallelises only the DAG inside each tile; DRCENGINE_TILE_THREADS overrides N.sourceAvailable · yields setup
source TOP
Start cell. Flatten and bounds() refer to this cell.
Notes
source is omitted, the top cell of the layout is used.cells then keeps only matching cell names (glob) from the flattened tree.cellsAvailable · 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.
Notes
clip: cells first, then a hard clip window.clipAvailable · 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.
Notes
gdsAvailable · 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.
Notes
from=, input stays on the primary design. The main layout clip does not apply to the second GDS.includeAvailable · yields setup
include "common.ledrc"
Insert another file before parse (relative to the directory of the main file). Relative paths, UTF-8.
Notes
units / grid / layer; names overwrite in expansion order.if, no macros.select_checksAvailable · yields setup
select_checks "M1.*"
Run only checks whose ID matches the glob. unselect_checks is the counterpart: first the select union, then unselect.
Notes
unselect_checksAvailable · yields setup
unselect_checks "M1.DEBUG*"
Removes check IDs from the run set. Together with select_checks: first the select union, then unselect.
Notes
max_resultsAvailable · yields setup
max_results 1000
Global marker cap after all checks (all = unlimited). Extra markers are truncated at the end.
Notes
0: no markers.chipAvailable · 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().
Notes
chip no or omitted: deep checks every reachable cell and merges the flatten pass.