Skip to main content

Updated 3 min readSynopsys

Synopsys Custom Compiler Tcl automation

How Synopsys Custom Compiler is automated with Tcl: the dm:: and de:: command namespaces, what is worth scripting, and how to structure a shared team library.

By the SkyCadEda engineering teamHow these notes are written

  • Synopsys
  • Custom Compiler
  • EDA Automation
  • Tcl Scripting

ShareLinkedInX

On this page

Synopsys Custom Compiler is automated with Tcl. The tool runs an embedded Tcl interpreter, and its library manager, design database and layout and schematic editors are exposed as Tcl commands grouped into namespaces. Anything you script in Virtuoso with SKILL (creating cellviews, walking instances, adding menu items, batch checks) you script in Custom Compiler with Tcl.

The command namespaces

Custom Compiler is OpenAccess-based, and the Tcl API follows that structure: commands are grouped in namespaces such as dm:: for design management (libraries, cells and cellviews), and de:: for the design editor.

A typical script locates a cellview with dm::findCellView, opens it with de::open, and then works on the design and its objects. For any other command, take the name, arguments and return type from de::help -command and the Tcl command reference of the release you run, rather than copying snippets from old scripts or the web.

What is worth automating

  • Library and PDK setup. Creating project libraries, attaching the right technology library, setting the stream layer map and pointing to the correct DRC, LVS and extraction runsets. For a team running more than one node, a single setup script per project removes the "wrong PDK loaded" class of errors and cuts environment setup from hours to minutes.
  • Device and array placement. Placing PCell instances from a table (master, W, L, fingers, multiplier, origin), and generating common-centroid or interdigitated arrays for current mirrors and capacitor banks, so matching is exact by construction.
  • Guard rings and taps. Rings around sensitive devices built from the foundry's enclosure and spacing rules stored in a per-node config file, not hard-coded in the script.
  • DRC fix-up helpers. Scripts that read the DRC result database and apply mechanical fixes (minimum width, via enclosure, simple spacing). These typically reduce DRC error counts by 40-60% in a single pass; the remaining violations are the ones that need a layout engineer.
  • Batch checks and reports. Hierarchy listings, unplaced-instance checks, pin and label audits before LVS, and cell-level reports that a reviewer can diff between revisions.

Verification and simulation hooks

In the Synopsys flow, DRC and LVS run in IC Validator (IC Validator Live DRC checks the area in view while you edit in Custom Compiler), and parasitic extraction is StarRC. Simulation setup lives in the PrimeWave Design Environment, which drives the PrimeSim simulators (PrimeSim SPICE, PrimeSim HSPICE, PrimeSim XA).

For large corner sweeps it pays to run the corners in parallel on the compute farm rather than one after the other. A 15-corner PVT sweep that takes 4 hours sequentially can finish in about 45 minutes when the jobs run in parallel. Teams with big regression sets often generate the simulator decks from a template and submit them directly; see HSPICE simulation automation for that pattern.

Structuring a team library

Ad-hoc scripts in home directories break on the next PDK or tool release. Put the team's procs in Tcl packages with their own namespace, load them from a versioned path in the project setup, and tag the library at each tape-out so you can reproduce the exact automation used for a submission. This is plain Tcl and works the same in any Tcl-based EDA tool:

# lib/cclayout/cclayout.tcl
package provide cclayout 1.3

namespace eval ::cclayout {
    namespace export place_array guard_ring
    variable cfg
    array set cfg {}
}

# Load node-specific rules (spacing, enclosure, ring widths) from a config file
proc ::cclayout::load_cfg {path} {
    variable cfg
    if {![file readable $path]} {
        return -code error "cclayout: cannot read config $path"
    }
    source $path   ;# sets cfg(...) entries
}

# pkgIndex.tcl, generated with: pkg_mkIndex lib/cclayout
# Project setup:
#   lappend auto_path /proj/cad/tcl/lib
#   package require cclayout 1.3

Keep technology values (minimum metal width, via enclosure, ring spacing) in that per-node config, not in the procs, so moving a generator to another node is a config change. Review automation changes like code: a layout-generating script with a silent bug produces DRC-clean but wrong layout. More patterns in Tcl scripting for EDA automation.

SkyCadEda specializes in building production-grade automation libraries for Synopsys Custom Compiler environments; see Tcl/Tk scripting services.

Frequently asked questions

What scripting language does Synopsys Custom Compiler use?

Tcl. Custom Compiler embeds a Tcl interpreter and exposes its design database, library manager and editors as Tcl commands grouped in namespaces such as dm:: (design management) and de:: (design editor). Python can drive batch runs or generate Tcl, but the in-tool API is Tcl.

How does Custom Compiler Tcl compare to Cadence SKILL?

They play the same role: SKILL is the extension language of Virtuoso, Tcl is the extension language of Custom Compiler. Both tools sit on OpenAccess, so the underlying objects (libraries, cellviews, instances, shapes, nets) are similar, but the APIs are different and scripts have to be rewritten, not translated line by line.

Where is the Custom Compiler Tcl command reference?

In the Synopsys documentation shipped with the release (SolvNetPlus), and inside the tool: de::help -command <name> prints the help for a command. Always check arguments against your installed release, because options change between versions.

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.