Defining a Process Design Kit (PDK)#

In semiconductor design, a Process Design Kit (PDK) contains all the technology-specific data—such as transistor models, layout rules, and standard cell libraries—required to manufacture a chip on a particular process node. These kits are often complex and vary significantly between foundries.

SiliconCompiler simplifies this by providing a standardized Python object, the PDK, to define and package a PDK. This object acts as a structured “manifest” that describes the PDK’s properties and points to all the necessary files. Once defined, a PDK can be easily reused and loaded into any project with a single command: ASIC.set_pdk().

See also

Writing the module is only half the job – where it ships matters too. Open PDKs and standard cell libraries belong in lambdapdk, closed or proprietary ones in your own package (see Packaging an External Library), and tools, flows and targets in the SiliconCompiler repository itself. Where does my module go? walks through the choice.

Contributing the module back? CONTRIBUTING.md covers the pull request process, the four lint gates every PR is checked against, and how to build the docs.

Key Concepts#

A PDK is built around two main concepts:

  • Metadata: High-level information that describes the manufacturing process, such as the foundry, process node (e.g., 28nm), and metal stackup. This data is essential for design tools and for calculating manufacturing metrics.

  • Filesets: A fileset is a named group of files that serve a specific purpose. For example, a views.lef fileset contains all the LEF files needed for abstract layout views, while a models.spice fileset would contain SPICE models for simulation. This organization ensures that each tool gets exactly the files it needs.

Example: Defining a Virtual PDK#

The following example demonstrates how to create a basic PDK definition by subclassing PDK. We will define a fictional 28nm process.

from pathlib import Path
from siliconcompiler import PDK

class ExamplePDK(PDK):
    """
    A demonstration PDK for a fictional 28nm process.
    """
    def __init__(self):
        super().__init__()

        # 1. Give the PDK a unique name.
        self.set_name("examplepdk")

        # Assume the PDK files are in a local directory named "examplepdk/"
        pdk_path = Path("examplepdk")

        # 2. Define the high-level process metadata.
        self.set_foundry("virtual")
        self.set_version("v1.0")
        self.set_node(28)  # Process node in nanometers
        self.set_stackup("12M") # Number of metal layers
        self.set_wafersize(300) # Wafer diameter in millimeters

        # Define manufacturing and cost parameters.
        self.set_scribewidth(0.1, 0.1)
        self.set_edgemargin(2)
        self.set_defectdensity(1.25)

        # 3. Define the data source for the PDK files.
        # Here, we point to a fictional Git repository.
        self.set_dataroot("pdksource", "git+https://data.com/source.tar.gz")

        # 4. Organize the PDK files into filesets.
        # The 'with self.active_dataroot(...)' block tells SiliconCompiler
        # that all files added inside this block are relative to this data source.
        with self.active_dataroot("pdksource"):
            # The 'with self.active_fileset(...)' block groups related files.
            # Here, we are defining the LEF files for the abstract view.
            with self.active_fileset("views.lef"):
                self.add_file(pdk_path / "apr" / "examplepdk.lef")
                # This helper function automatically adds technology LEF files
                # for common open-source tools.
                for tool in ('openroad', 'klayout', 'magic'):
                    self.add_aprtechfileset(tool)

            # Define which metal layers are available for routing.
            self.set_aprroutinglayers(min="metal2", max="metal7")

To use this PDK, you would instantiate it and pass it to your project:

import siliconcompiler

# Create a project
project = siliconcompiler.ASIC()

# Instantiate and set the PDK
pdk = ExamplePDK()
project.set_pdk(pdk)

# Now, when project.run() is called, the tools in the flow
# will be able to find and use the files defined in the PDK.

Useful APIs#

The PDK class provides a comprehensive API for defining all aspects of a PDK.

Setting Process Metadata#

These methods define the core physical and manufacturing properties of the process.

set_foundry

Sets the foundry name for the PDK.

set_node

Sets the process node for the PDK.

set_stackup

Sets the metal stackup for the PDK.

set_wafersize

Sets the wafer size for the PDK.

set_unitcost

Sets the unit cost for the PDK.

set_defectdensity

Sets the process defect density for the PDK.

set_scribewidth

Sets the scribe line width for the PDK.

set_edgemargin

Sets the wafer edge keep-out margin for the PDK.

set_aprroutinglayers

Sets the minimum and maximum routing layers for the PDK.

Organizing Filesets#

These methods are used to group files for different tools and design views.

add_aprtechfileset

Adds a fileset containing APR technology files.

add_displayfileset

Adds a fileset containing display configuration files.

add_devmodelfileset

Adds a fileset containing device model files.

add_pexmodelfileset

Adds a fileset containing parasitic extraction (pex) model files.

add_runsetfileset

Adds a fileset containing a runset for a specific verification task.

add_waiverfileset

Adds a fileset containing waiver files for a specific verification task.

See also

Once a PDK ships an OpenRCX signoff deck (add_pexmodelfileset("openroad", ...) with an openrcx file), OpenROAD’s pre-route parasitic estimate can be derived and calibrated directly from that deck instead of hand-tuned. The OpenROAD-specific PDK subclass (OpenROADPDK) exposes the knobs that result – add_openroad_rclayer() (the per-layer estimate model) and add_openroad_rccorrection() (the calibrated correction on top of it). See the Calibrating the parasitic estimate (PEX) tutorial for how to generate the values to paste into a PDK setup.

Manufacturing Calculations#

These methods use the defined metadata to compute key manufacturing metrics.

calc_yield

Calculates raw die yield.

calc_dpw

Calculates dies per wafer.

Class Reference#

PDK#

Class siliconcompiler.PDK

PDK.active_dataroot

Use this context to set the dataroot parameter on files and directory parameters.

PDK.active_fileset

Provides a context to temporarily set an active design fileset.

PDK.add_aprtechfileset

Adds a fileset containing APR technology files.

PDK.add_define

Adds preprocessor macro definitions to a fileset.

PDK.add_dep

Adds a module dependency to this design.

PDK.add_depfileset

Record a reference to an imported dependency's fileset.

PDK.add_devmodelfileset

Adds a fileset containing device model files.

PDK.add_displayfileset

Adds a fileset containing display configuration files.

PDK.add_file

Adds files to a fileset.

PDK.add_idir

Adds include directories to a fileset.

PDK.add_layermapfileset

Adds a fileset containing layer map files.

PDK.add_lib

Adds dynamic libraries to a fileset.

PDK.add_libdir

Adds dynamic library directories to a fileset.

PDK.add_pexmodelfileset

Adds a fileset containing parasitic extraction (pex) model files.

PDK.add_runsetfileset

Adds a fileset containing a runset for a specific verification task.

PDK.add_undefine

Adds preprocessor macro (un)definitions to a fileset.

PDK.add_waiverfileset

Adds a fileset containing waiver files for a specific verification task.

PDK.calc_dpw

Calculates dies per wafer.

PDK.calc_yield

Calculates raw die yield.

PDK.check_filepaths

Verifies that paths to all files in manifest are valid.

PDK.copy_fileset

Creates a new copy of a source fileset.

PDK.define_tool_parameter

Define a new tool parameter for the library.

PDK.find_files

Returns absolute paths to files or directories based on the keypath provided.

PDK.get_dataroot

Returns absolute path to the data directory.

PDK.get_define

Returns defined macros for a fileset.

PDK.get_dep

Returns all dependencies associated with this object or a specific one if requested.

PDK.get_depfileset

Returns list of dependency filesets.

PDK.get_file

Returns a list of files from one or more filesets.

PDK.get_fileset

Computes the full, recursive list of (design, fileset) tuples required for a given set of top-level filesets.

PDK.get_idir

Returns include directories for a fileset.

PDK.get_lib

Returns list of dynamic libraries for a fileset.

PDK.get_libdir

Returns dynamic library directories for a fileset.

PDK.get_param

Returns value of a named fileset parameter.

PDK.get_topmodule

Returns the topmodule of a fileset.

PDK.get_undefine

Returns undefined macros for a fileset.

PDK.has_dep

Checks if a specific dependency is present.

PDK.has_file

Returns true if the fileset contains files.

PDK.has_fileset

Checks if a fileset exists in the schema.

PDK.has_idir

Returns true if idirs are defined for the fileset

PDK.has_libdir

Returns true if library directories are defined for the fileset

PDK.hash_files

Generates hash values for a list of parameter files.

PDK.read_fileset

Imports filesets from a standard formatted text file.

PDK.remove_dep

Removes a previously registered module.

PDK.set_aprroutinglayers

Sets the minimum and maximum routing layers for the PDK.

PDK.set_dataroot

Registers a data source by name, path, and optional version tag.

PDK.set_defectdensity

Sets the process defect density for the PDK.

PDK.set_edgemargin

Sets the wafer edge keep-out margin for the PDK.

PDK.set_foundry

Sets the foundry name for the PDK.

PDK.set_node

Sets the process node for the PDK.

PDK.set_param

Sets a named parameter for a fileset.

PDK.set_scribewidth

Sets the scribe line width for the PDK.

PDK.set_stackup

Sets the metal stackup for the PDK.

PDK.set_topmodule

Sets the topmodule of a fileset.

PDK.set_unitcost

Sets the unit cost for the PDK.

PDK.set_wafersize

Sets the wafer size for the PDK.

PDK.write_depgraph

Renders and saves the dependency graph to a file.

PDK.write_fileset

Exports filesets to a standard formatted text file.

PDK.write_manifest

Writes the manifest to a file.