3. PDK Module Interface Infographic
This infographic documents how add-on PDK modules under ihp-sg13_modules/ are wired into the base ihp-sg13g2/ PDK in the IHP-Open-PDK repository.
3.1. What the implementation does
The repository uses a sibling-tree layout: the base PDK is
ihp-sg13g2/, while optional extensions live underihp-sg13_modules/<module>/.Xschem discovers modules dynamically by scanning
ihp-sg13_modules/and appending each module’slibs.tech/xschem/<module>path intoXSCHEM_LIBRARY_PATH.KLayout discovers modules dynamically by scanning
ihp-sg13_modules/, appending each module’slibs.tech/klayout/pythonpath tosys.path, and importing packages whose names start withsg13.A module PyCell library is expected to bind to the base technology object with
Tech.get('SG13_dev'), then register its own PCells.Module implementation code can depend directly on the base PyCell library. In the current
sg13_memresexample,memres_code.pyimportssg13g2_pycell_lib.ihp.geometryandsg13g2_pycell_lib.ihp.utility_functions.
3.2. Code references
Xschem module path hookup:
ihp-sg13g2/libs.tech/xschem/xschemrc:443-450KLayout module bootstrap:
ihp-sg13g2/libs.tech/klayout/tech/pymacros/autorun.lym:49-57
3.3. Practical takeaway
The interface is implemented as a discovery-and-extension pattern, not as a merge into the base PDK tree. A module remains physically separate, while the base PDK’s Xschem and KLayout bootstrap code makes it visible at runtime and supplies the shared technology and helper APIs the module needs.