Skip to main content

Updated 11 min readCalibre

Calibre SVRF and TVF rule deck syntax

How Calibre SVRF and TVF rule decks are written: layer derivation, DRC and LVS statements, TVF loops, include structure, and how to debug deck failures.

By the SkyCadEda engineering teamHow these notes are written

  • Calibre
  • SVRF
  • TVF
  • DRC
  • LVS
  • PERC
  • Physical Verification
  • Siemens EDA
  • Rule Decks

ShareLinkedInX

On this page

Introduction to Calibre SVRF and TVF rule decks

A Calibre rule deck is a text file in SVRF (Standard Verification Rule Format) that tells Calibre where the layout is, how GDSII/OASIS layers map to names, which derived layers to build, and which checks to run. TVF (Tcl Verification Format) is a Tcl front end that generates SVRF, used when many rules follow the same pattern. This page shows the syntax you meet in real decks, a working DRC and LVS skeleton, a TVF loop, and a debug routine for decks that misbehave.

Calibre (Siemens EDA, formerly Mentor Graphics) is the signoff physical verification tool most foundries qualify first, so SVRF is the format most foundry DRC, LVS, PERC and fill decks arrive in.

SVRF: the Standard Verification Rule Format

An SVRF deck has four kinds of statements: specification statements that set up the run (LAYOUT PATH, PRECISION, DRC RESULTS DATABASE), layer definitions (LAYER), layer operations that build derived layers (AND, NOT, OR, SIZE, INTERACT, INSIDE) and rule checks, which are named blocks in braces whose output layers become the errors.

SVRF is not a programming language. There are no loops or functions; reuse comes from VARIABLE for numeric values, INCLUDE for files, and the preprocessor directives #DEFINE, #IFDEF,#IFNDEF, #ELSE and #ENDIF, which foundries use as option switches (metal stack, thick top metal, density checks on or off).

A minimal DRC deck:

// Run setup
LAYOUT SYSTEM  OASIS
LAYOUT PATH    "top.oas"
LAYOUT PRIMARY "TOP"
PRECISION 1000
DRC RESULTS DATABASE "drc.results" ASCII
DRC SUMMARY REPORT   "drc.summary"
DRC MAXIMUM RESULTS  1000

// Option switches
#DEFINE THICK_TOP_METAL

// Layer numbers come from the foundry layer map
LAYER DIFF 1
LAYER POLY 5
LAYER M1   31
LAYER V1   51
LAYER M2   32

VARIABLE M1_MIN_S 0.05

// Derived layer
GATE = POLY AND DIFF

M1.W.1 { @ M1 width < 0.05 um
    INTERNAL M1 < 0.05 ABUT < 90 SINGULAR REGION
}

M1.S.1 { @ M1 spacing < M1_MIN_S
    EXTERNAL M1 < M1_MIN_S ABUT < 90 SINGULAR REGION
}

V1.EN.1 { @ M1 enclosure of V1 < 0.01 um
    ENCLOSURE V1 M1 < 0.01 ABUT < 90 SINGULAR REGION
}

#IFDEF THICK_TOP_METAL
INCLUDE "thick_top_metal.svrf"
#ENDIF

The line starting with @ inside a rule check is the comment Calibre RVE shows for that check. Values are in microns.

TVF: Tcl Verification Format for procedural control

A TVF file is a Tcl script. Calibre runs the Tcl, collects the SVRF text the script emits through the TVF output commands, and then compiles that SVRF as usual. There are no TVF-only geometry operations: every check still ends up as an SVRF statement. What TVF adds is everything Tcl has: foreach, proc, arrays, string formatting and reading values from a table file.

A typical TVF script holds a table such as {M1 0.05 M2 0.05 M3 0.07}, loops over it with foreach, and emits one width check per layer in the same form as the M1.W.1 check above. Foundry decks use this for families of rules that differ only by layer and value: width, spacing and enclosure tables for a ten-layer metal stack, or width-dependent spacing with many bins.

SVRF vs TVF quick reference

AspectSVRFTVF
What it isThe rule language Calibre compiles and executesA Tcl program that generates SVRF
ReuseVARIABLE, INCLUDE, #DEFINE / #IFDEF switchesTcl loops, procedures, arrays, file reading
Typical useMost DRC and LVS decks, run setup, one-off checksFamilies of similar rules generated from a table
DebuggingCompiler errors point at deck linesRead the generated SVRF; errors refer to it, not the Tcl

Calibre PERC is a separate case: its rules are Tcl procedures that use the PERC API, loaded from the SVRF deck through a TVF FUNCTION block. See the PERC section below.

DRC rule deck structure and organization

A production DRC deck, foundry-supplied or in-house, is usually split into files in this order:

  • Run setup: layout path, top cell, precision, results database and summary report, plus run controls such as DRC MAXIMUM RESULTS and DRC KEEP EMPTY NO (which drops checks with no results from the database).
  • Option switches: #DEFINE lines that select the metal stack, optional checks and recommended rules.
  • Layer map: LAYER and LAYER MAP statements that turn layer/datatype numbers into names.
  • Derived layers: gates, wells, wide-metal layers, marker-layer selections.
  • Rule checks grouped by layer and rule type (width, spacing, enclosure, density, antenna), named after the design rule manual so a marker in RVE maps straight to a DRM entry.

Keep the foundry deck read-only and put your own settings in a small wrapper file that sets the switches and then INCLUDE s the foundry deck. Updating to a new deck revision then means changing one path. Rule selection for a run goes in the wrapper too (DRC SELECT CHECK / DRC UNSELECT CHECK), not in edits to the foundry file.

Common DRC checks in SVRF and TVF

SVRF has dimensional check operations that measure between edges directly and return edge pairs or polygons as error markers:

  • Width: INTERNAL M1 < 0.05 measures inside a polygon.
  • Spacing: EXTERNAL M1 < 0.05 measures between polygons (or between two layers, EXTERNAL M1 M2 < ...).
  • Enclosure: ENCLOSURE V1 M1 < 0.01 measures how far M1 extends past V1.
  • Area: AREA M1 < 0.01 selects polygons below a minimum area.
  • Density: DENSITY computes layer coverage in a window stepped across the chip and flags windows outside the minimum/maximum.
  • Antenna: after CONNECT statements define connectivity, NET AREA RATIO compares the area (or perimeter-derived area) of conductor connected to a gate against the gate area on the same net, and flags nets above the foundry limit, for example a metal-to-gate ratio over 400. Diode protection is usually handled by excluding or crediting nets that also connect to diffusion.

Options such as ABUT < 90 (ignore edges meeting at 90 degrees or more), SINGULAR (also flag point touches), OPPOSITE, PROJECTING and REGION (return polygons instead of edge pairs) shape what is measured and what comes back. Most wrong-looking DRC results trace to one of these options. TVF writes the same statements; it only helps when you need dozens of them.

For the antenna rules themselves, see antenna checks in physical verification.

LVS rule deck structure and connectivity extraction

An LVS deck reuses the layer map and adds three things: connectivity, device recognition and comparison settings.

  • CONNECT M1 M2 BY V1 statements describe how conductors join through contacts and vias. Text labels attach net names to the extracted nets.
  • DEVICE statements recognise devices from derived layers, for example an NMOS from a gate layer with poly gate, source/drain diffusion and bulk pins, and measure properties (W, L, area) for parameter comparison. The exact pin and property syntax is in the foundry deck and the SVRF manual.
  • LVS specification statements set power and ground names, what to do with filler and unconnected devices, how to reduce series and parallel devices, and the tolerance for property mismatches.
// LVS excerpt: NSD and CONT are derived/defined earlier in the deck
SOURCE PATH    "top.cdl"
SOURCE PRIMARY "TOP"
SOURCE SYSTEM  SPICE
LVS REPORT     "lvs.report"
LVS POWER NAME  "VDD?"
LVS GROUND NAME "VSS?"

CONNECT M1 M2 BY V1
CONNECT POLY M1 BY CONT
CONNECT NSD M1 BY CONT

Extraction produces a layout netlist with devices and their measured parameters. It does not produce parasitic resistance and capacitance; that is a separate step with Calibre PEX (xRC or xACT), Quantus or StarRC, run on the LVS-clean database. The comparison then matches layout nets and devices to the source netlist and reports shorts, opens, missing or extra devices and property mismatches. For working through those results, see debugging LVS shorts and opens.

PERC reliability rule decks

Calibre PERC runs checks that need both the netlist and the layout: ESD path checks from pads to clamps, nets crossing between voltage domains without level shifters, thin-oxide devices connected to high-voltage nets, point-to-point resistance and current density. PERC rules are written as Tcl procedures using the PERC API (net types, net and device selection, path checks) and are loaded into the SVRF deck with TVF FUNCTION and PERC LOAD. More detail in Calibre PERC reliability checks.

Rule deck debugging and optimization

Runtime problems usually come from the deck doing more work than needed, not from the tool. What helps:

  • Run hierarchically and multi-threaded (calibre -drc -hier -turbo) unless a check genuinely needs flat data.
  • Read the per-check timing in the run transcript and summary report, and look at the slowest few checks first; one badly written derived layer often dominates.
  • Do not build derived layers that only one check uses in a convoluted way; write the check directly against the original layers where possible.
  • Use DRC SELECT CHECK to rerun only the failing group while you iterate, and restrict the run to a window or a block instead of rerunning full chip.
  • Cap output with DRC MAXIMUM RESULTS so a broken check does not write millions of markers.

Debugging Calibre rule deck failures

When a run fails outright or gives results that look wrong, work in three passes: make the deck compile, check the results in RVE, then audit the rule logic for the pitfalls below.

Step 1: Resolve rule deck compile errors

Calibre compiles the whole deck before it runs any check, so compile errors appear near the top of the transcript with a file name and line number. Read the first error only; later errors usually cascade from it. Common causes: a missing or misspelled INCLUDE path, a layer or variable used but never defined, a name defined twice (Calibre rejects duplicate layer names), an#IFDEF without its #ENDIF, and unbalanced braces. For TVF, write the generated SVRF to a file and read it, because the compiler reports errors against the generated text. Keep a small smoke-test layout so you can confirm a deck compiles and runs end to end before launching a multi-hour full-chip job.

Step 2: Debug DRC results with RVE

Open the results database in Calibre RVE and sort violations by check name instead of scanning them in order. A single rule with thousands of hits usually indicates a deck problem, not thousands of real layout errors: a wrong value, an inverted NOT, a wrong layer map entry, or a derived layer that selected far more geometry than intended. Cross-probe a few representative markers into the layout and measure the geometry against the design rule manual. If the measurement passes but Calibre flags it, the rule is wrong; if it fails, the layout is wrong. Highlighting the derived layers that feed a check shows exactly which geometry the rule operated on.

Step 3: Audit common SVRF pitfalls

  • Unexpected includes: Reusing a layer name is a compile error, so the real trap is a derived layer or switch set in an INCLUDE d file you did not know was pulled in. Check which #DEFINE switches are active before trusting a result.
  • Connectivity before checks: NET AREA RATIO, antenna and other net-based checks depend on CONNECT statements. A missing CONNECT gives wrong or empty results rather than an error, so a clean report is not always good news.
  • INSIDE versus INTERACT: INSIDE selects only shapes fully contained in the reference layer, while INTERACT selects any shape that touches or overlaps it. Using the wrong one includes or excludes boundary geometry and is a classic source of missed violations at block edges.
  • Grid and precision mismatches: A PRECISION setting that disagrees with the layout database units, or off-grid data from a third-party block, produces slivers after sizing and spurious spacing errors.
  • Hierarchy effects: If results differ between flat and hierarchical runs, suspect the interaction between derived layers and cell placement (geometry that only exists when two cells overlap) before suspecting the rule arithmetic.

Integration with the physical verification flow

In a flow, each Calibre run is a command line plus a wrapper deck:

calibre -drc -hier -turbo drc_wrapper.svrf            # DRC, multi-threaded
calibre -lvs -hier -spice layout.sp lvs_wrapper.svrf  # LVS, writes the extracted netlist

Results are then opened in Calibre RVE, from the layout editor or from the command line.

The run script, usually shell, Tcl or Python, sets the layout path and top cell in the wrapper, launches DRC and LVS, archives the summary reports with the deck version and switches used, and fails the job if the totals are not zero. From Virtuoso, the same decks run through Calibre Interactive, which writes a runset with the same settings so batch and interactive results agree.

Best practices for rule deck development

  • Keep decks and wrappers in Git and tag every version that is used for signoff.
  • Name checks after the design rule manual and keep the DRM text in the @ comment.
  • Keep a regression suite: small test layouts with one known-pass and one known-fail case per rule, and run it on every deck change.
  • Never edit foundry files; override through a wrapper and record why.
  • Record the deck version, switches and Calibre version in every result you hand over.

SkyCadEda engineers write and maintain Calibre SVRF and TVF runsets as part of our DRC/LVS runset development work.

Siemens has added machine learning on the results side rather than in the rule language. Calibre Vision AI groups full-chip DRC results into clusters with a common cause, so a team can work through a few hundred groups instead of millions of individual markers. The deck itself is still SVRF and TVF.

Frequently asked questions

What is the difference between SVRF and TVF in Calibre?

SVRF (Standard Verification Rule Format) is the rule language Calibre executes: layer definitions, layer operations, rule checks and run settings. TVF (Tcl Verification Format) is a Tcl layer on top of it. A TVF file is a Tcl program that generates SVRF text, so you can use loops, procedures and tables to write many similar rules. Calibre compiles the generated SVRF; the checks themselves are always SVRF operations.

What does SVRF stand for?

Standard Verification Rule Format. It is the language of Siemens EDA Calibre rule files for DRC, LVS, PERC, fill and related applications. Foundries ship their Calibre decks as SVRF, often with TVF sections or switches controlled by #DEFINE statements.

How do I debug a Calibre DRC violation?

Load the results database in Calibre RVE, sort by rule check, and cross-probe a few markers into the layout. Measure the flagged geometry against the design rule manual: if the layout passes the written rule, the deck or its options are wrong; if it fails, fix the layout. A single check with thousands of hits usually points to a deck or layer-mapping problem, not thousands of real errors.

Can I use both SVRF and TVF in the same rule deck?

Yes. Many foundry decks mix them: TVF generates repetitive rule checks from tables, and the rest of the deck is plain SVRF. An SVRF deck can also pull in TVF-generated rules. When debugging, write out the SVRF that the TVF produces and read that, because the compiler only sees the generated text.

More engineering notes

Working through a problem like this?

Tell us about your flow: the tools, the PDK, what is failing and when it needs to be clean.