Skip to main content

IHP pdk

Project description

IHP GDSFactory PDK

Test code Build docs PyPI Python License

A GDSFactory-based Process Design Kit for the IHP SG13G2 130nm BiCMOS open-source technology. It provides parametric layout cells, design rule constants, simulation models, and example designs for tape-out-ready integrated circuits.

Quick start

Use Python 3.11, 3.12 or 3.13. We recommend VSCode as an IDE.

uv pip install ihp-gdsfactory --upgrade

Then you need to restart Klayout to make sure the new technology installed appears and start generating IHP-SG13G2 GDSII immediately!

import gdsfactory as gf
from ihp import PDK
from ihp.cells import nmos, rfnmos, npn13G2, rsil, cmim

PDK.activate()

# Create a parametric NMOS transistor
c = nmos(width=1.0, length=0.13, nf=4)
c.write_gds("my_nmos.gds")
c.show()  # opens in KLayout

Available devices

Category Device cells/ (pure GDSFactory) cells2/ (PyCell)
FET nmos nmos nmos
pmos pmos pmos
nmos_hv nmos_hv nmosHV
pmos_hv pmos_hv pmosHV
RF FET rfnmos rfnmos rfnmos
rfpmos rfpmos rfpmos
rfnmos_hv rfnmos_hv rfnmosHV
rfpmos_hv rfpmos_hv rfpmosHV
Bipolar npn13G2 npn13G2 npn13G2
npn13G2L npn13G2L npn13G2L
npn13G2V npn13G2V npn13G2V
pnpMPA pnpMPA pnpMPA
Resistor rsil (silicided poly) rsil rsil
rppd (p-poly) rppd rppd
rhigh (high-R) rhigh rhigh
Capacitor cmim (MIM) cmim cmim
rfcmim (RF MIM) rfcmim rfcmim
cmom (MOM) cmom --
Inductor inductor2 inductor2 inductor2
inductor3 inductor3 inductor3
Passive svaricap (MOS varicap) svaricap svaricap
ESD protection esd_nmos esd
ntap1 / ptap1 ntap1 / ptap1 ntap1 / ptap1
guard_ring guard_ring --
sealring sealring sealring
Diode diodevdd 2kV/4kV diodevdd_2kv / diodevdd_4kv --
diodevss 2kV/4kV diodevss_2kv / diodevss_4kv --
schottky_nbl1 schottky_nbl1 --
Antenna dantenna / dpantenna dantenna / dpantenna dantenna / dpantenna
Bondpad bondpad bondpad bondpad

cells/ functions are fully parametric pure-Python implementations. cells2/ functions wrap the original IHP PyCell library (requires CNI runtime). Entries marked -- are only available in one implementation.

Project structure

ihp/
├── cells/                  # Pure GDSFactory parametric layout cells
│   ├── fet_transistors.py  #   NMOS/PMOS (standard & HV)
│   ├── rf_transistors.py   #   RF-MOSFETs with guard/gate rings
│   ├── bipolar.py          #   SiGe HBTs (npn13G2, npn13G2L, npn13G2V)
│   ├── resistors.py        #   Polysilicon & metal resistors
│   ├── capacitors.py       #   MIM & MOS capacitors
│   ├── inductors.py        #   Spiral inductors
│   ├── passives.py         #   Diodes, varactors, guard rings
│   ├── primitives.py       #   Schematic-only VLSIR elements (R, L, C, sources)
│   ├── via_stacks.py       #   Via stack generators
│   └── fixed.py            #   Pre-built GDS imports (SiGe HBTs, etc.)
├── cells2/                 # Legacy PyCell reference implementations (CNI-based)
├── models/                 # Compact models & SAX S-parameter models
├── gds/                    # Pre-built GDS files for complex cells
├── tech.py                 # Layer map, design rules, technology parameters
├── layers.yaml             # Layer definitions
└── config.py               # Paths and PDK configuration
tests/
├── test_cells.py           # GDS regression & settings tests for all cells
├── test_xor_transistors.py # Polygon-exact XOR tests (GDSFactory vs PyCell)
└── gds_ref/                # Golden reference GDS files
docs/                       # Jupyter Book documentation (Sphinx)

Key architectural concepts:

  • cells/ contains pure GDSFactory implementations — each @gf.cell function builds geometry from scratch using add_polygon and design rule constants from tech.py. No external layout tools are needed at runtime.
  • cells2/ holds the original IHP PyCell implementations (CNI/OpenAccess-based). These serve as the reference for XOR verification — every polygon in cells/ is tested to match cells2/ exactly.
  • models/ provides SAX-compatible S-parameter models and a VLSIR bridge (to_vlsir.py) for SPICE netlist export.
  • primitives.py provides schematic-only elements (ideal R, L, C, voltage/current sources) with VLSIR metadata for circuit simulation — these have no physical GDS geometry.

Installation

We recommend uv

# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Installation for contributors

git clone https://github.com/gdsfactory/ihp.git
cd ihp
uv venv --python 3.12
uv sync --extra docs --extra dev
python install_tech.py

Running tests

make test              # run full test suite
make test-force        # run tests and regenerate reference GDS files

To run specific test subsets:

uv run pytest tests/test_cells.py -v          # GDS regression + settings tests
uv run pytest tests/test_xor_transistors.py -v # polygon-exact XOR vs PyCell

Documentation

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ihp_gdsfactory-0.1.7.tar.gz (471.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ihp_gdsfactory-0.1.7-py3-none-any.whl (545.8 kB view details)

Uploaded Python 3

File details

Details for the file ihp_gdsfactory-0.1.7.tar.gz.

File metadata

  • Download URL: ihp_gdsfactory-0.1.7.tar.gz
  • Upload date:
  • Size: 471.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ihp_gdsfactory-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e14313c264f65a2d7ba99f6f5921497366acb76cc7d9218db7604be242d5da14
MD5 1771920449e14b8f4c68f8e9ca1c6b4e
BLAKE2b-256 f1aaaf07ae7e66ee7c1a86b9100d73286ff9e3495cc5693f9371da4156fe3465

See more details on using hashes here.

File details

Details for the file ihp_gdsfactory-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: ihp_gdsfactory-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 545.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ihp_gdsfactory-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 01a7d5a7e66f453d19777d5b1fb6066b37ef50dfbea87d8cbd01aeb7cc80ffca
MD5 ad8417204c6e4a931aab2481dce4fad4
BLAKE2b-256 781ee2f532b70b80dc6dcf1631dd428f802aa61e5829f7bba28da1eaaca970c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page