Skip to content

Wrong PCell instantiations when switching technologies #2392

Description

@martinjankoehler

@klayoutmatthias as discussed on Friday.

Steps to reproduce

  1. Install tech IHP sg13g2 (branch dev https://github.com/iic-jku/IHP-Open-PDK/tree/dev)
  2. Install tech IHP sg13cmos5L (branch main https://github.com/iic-jku/sg13cmos5l/tree/main)
  3. Create new layout with tech SG13G2
  4. Instantiate SG13_dev.via_stack (from Activ to TopMetal2)
  5. Save the layout
  6. Switch to sg13cmos5L
  7. OBTAINED/ERROR: suddenly, other PCells, like esd / padring / sealring get instantiated
  8. EXPECTED:
    • a warning dialog should be reported that the technology mismatches
      • ask the user to switch to the correct one (if installed)
      • warn the user the tech is missing (if not installed)
      • in the warning dialog, print a list of PCells that can't be found in the other library
      • Button Cancel by default, Force regardless non-default
    • KLayout code should be check for all 3 full qualified key components lib/tech/cell (see below), currently it relies only on indexes

Ideas for robustness

I would not necessarily prefer to force IHP to rename the lib names as this would break existing layouts.

If we look at the CONTEXT_INFO, we see the current full-qualified key is established with the components:

PROPVALUE LIB=SG13_dev
SNAME via_stack

I would propose to additionally add the tech here as a third FQ key component, and warn all mismatches (as shown above):

PROPVALUE TECH=sg13g2

via-stack-g2.gds.txt

HEADER 600
BGNLIB 7/17/2026 21:25:54 7/17/2026 21:25:54
LIBNAME LIB
UNITS 0.001 1e-09

BGNSTR 7/17/2026 21:25:54 7/17/2026 21:25:54
STRNAME $$$CONTEXT_INFO$$$
SREF
SNAME via_stack
XY 0: 0
PROPATTR 10
PROPVALUE PCELL=via_stack
PROPATTR 9
PROPVALUE P(vt2_rows)=#l1
PROPATTR 8
PROPVALUE P(vt2_columns)=#l1
PROPATTR 7
PROPVALUE P(vt1_rows)=#l1
PROPATTR 6
PROPVALUE P(vt1_columns)=#l1
PROPATTR 5
PROPVALUE P(vn_rows)=#l2
PROPATTR 4
PROPVALUE P(vn_columns)=#l2
PROPATTR 3
PROPVALUE P(t_layer)='TopMetal2'
PROPATTR 2
PROPVALUE P(cdf_version)='8'
PROPATTR 1
PROPVALUE P(b_layer)='Activ'
PROPATTR 0
PROPVALUE LIB=SG13_dev
ENDEL
ENDSTR

BGNSTR 7/17/2026 21:25:54 7/17/2026 21:25:54
STRNAME via_stack
…

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions