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().
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.
Sets the foundry name for the PDK. |
|
Sets the process node for the PDK. |
|
Sets the metal stackup for the PDK. |
|
Sets the wafer size for the PDK. |
|
Sets the unit cost for the PDK. |
|
Sets the process defect density for the PDK. |
|
Sets the scribe line width for the PDK. |
|
Sets the wafer edge keep-out margin for the PDK. |
|
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.
Adds a fileset containing APR technology files. |
|
Adds a fileset containing display configuration files. |
|
Adds a fileset containing device model files. |
|
Adds a fileset containing parasitic extraction (pex) model files. |
|
Adds a fileset containing a runset for a specific verification task. |
|
Adds a fileset containing waiver files for a specific verification task. |
Manufacturing Calculations#
These methods use the defined metadata to compute key manufacturing metrics.
Calculates raw die yield. |
|
Calculates dies per wafer. |
Class Reference#
PDK#
Class siliconcompiler.PDK
Use this context to set the dataroot parameter on files and directory parameters. |
|
Provides a context to temporarily set an active design fileset. |
|
Adds a fileset containing APR technology files. |
|
Adds preprocessor macro definitions to a fileset. |
|
Adds a module dependency to this design. |
|
Record a reference to an imported dependency's fileset. |
|
Adds a fileset containing device model files. |
|
Adds a fileset containing display configuration files. |
|
Adds files to a fileset. |
|
Adds include directories to a fileset. |
|
Adds a fileset containing layer map files. |
|
Adds dynamic libraries to a fileset. |
|
Adds dynamic library directories to a fileset. |
|
Adds a fileset containing parasitic extraction (pex) model files. |
|
Adds a fileset containing a runset for a specific verification task. |
|
Adds preprocessor macro (un)definitions to a fileset. |
|
Adds a fileset containing waiver files for a specific verification task. |
|
Calculates dies per wafer. |
|
Calculates raw die yield. |
|
Verifies that paths to all files in manifest are valid. |
|
Creates a new copy of a source fileset. |
|
Define a new tool parameter for the library. |
|
Returns absolute paths to files or directories based on the keypath provided. |
|
Returns absolute path to the data directory. |
|
Returns defined macros for a fileset. |
|
Returns all dependencies associated with this object or a specific one if requested. |
|
Returns list of dependency filesets. |
|
Returns a list of files from one or more filesets. |
|
Computes the full, recursive list of (design, fileset) tuples required for a given set of top-level filesets. |
|
Returns include directories for a fileset. |
|
Returns list of dynamic libraries for a fileset. |
|
Returns dynamic library directories for a fileset. |
|
Returns value of a named fileset parameter. |
|
Returns the topmodule of a fileset. |
|
Returns undefined macros for a fileset. |
|
Checks if a specific dependency is present. |
|
Returns true if the fileset contains files. |
|
Checks if a fileset exists in the schema. |
|
Returns true if idirs are defined for the fileset |
|
Returns true if library directories are defined for the fileset |
|
Generates hash values for a list of parameter files. |
|
Imports filesets from a standard formatted text file. |
|
Removes a previously registered module. |
|
Sets the minimum and maximum routing layers for the PDK. |
|
Registers a data source by name, path, and optional version tag. |
|
Sets the process defect density for the PDK. |
|
Sets the wafer edge keep-out margin for the PDK. |
|
Sets the foundry name for the PDK. |
|
Sets the process node for the PDK. |
|
Sets a named parameter for a fileset. |
|
Sets the scribe line width for the PDK. |
|
Sets the metal stackup for the PDK. |
|
Sets the topmodule of a fileset. |
|
Sets the unit cost for the PDK. |
|
Sets the wafer size for the PDK. |
|
Renders and saves the dependency graph to a file. |
|
Exports filesets to a standard formatted text file. |