Skip to content

docs(palace): validate IHP cmim against PDK compact model + fix MIM meshing - #235

Open
mdmaas wants to merge 5 commits into
gdsfactory:mainfrom
EpsilonForge:docs/electrostatic-cmim-pdk-validation
Open

docs(palace): validate IHP cmim against PDK compact model + fix MIM meshing#235
mdmaas wants to merge 5 commits into
gdsfactory:mainfrom
EpsilonForge:docs/electrostatic-cmim-pdk-validation

Conversation

@mdmaas

@mdmaas mdmaas commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates nbs/_palace_electrostatic.ipynb to actually validate the IHP cmim (MIM capacitor) against the PDK cap_cmim compact model, using the split MIM stack from gdsfactory/IHP#188/#225.

Notebook changes

  • Measure the device capacitance between Metal5 (bottom, T1) and the mim top-plate (top, T2), which are the two electrodes separated by the 40 nm mim_diel. (The previous T2='topmetal1' only measured ~1 fF of via/routing coupling, not the device.)
  • Evaluate the PDK reference via TECH/CbCapCalc (the supported API) instead of the removed ihp.cells2...Numeric import.
  • Run locally with sim.run_local() + sim.write_config() (with the cloud sim.run() variant commented out).
  • Document the residual gap as an open investigation point, not an expected error.

gsim meshing fix (src/gsim/palace/mesh/geometry.py)

Required for the fixed IHP stack to be modeled correctly:

  • get_layer_infos() lets multiple LayerLevels share one GDS layer (mim_diel dielectric + mim conductor both on MIMdrawing) so each meshes at its own z-height. Previously only the first layer was used and the top-plate conductor was silently dropped.
  • Lower min_volume_thickness 0.05 → 0.02 µm so the 40 nm MIM dielectric is meshed as a solid volume instead of skipped.

Result

Palace mutual Cm[1,2] = 194.2 fF vs IHP cap_cmim = 151.9 fF (ratio 1.28).

Note on the residual gap

  • Likely contributors to the residual are full 3D fringe/perimeter field vs the compact model's area+perimeter fit, and the PDK's effective permittivity (≈6.8) vs the sin stack value (≈7.5).
  • Palace's electrostatic solver models terminals as ideal equipotential (Dirichlet) surfaces and does not apply a surface-conductivity / conductor-thickness boundary condition. So any dependence of the capacitance on plate thickness / surface conductivity cannot currently be exercised here — a solver-level limitation.

Depends on an IHP PDK build carrying the MIM stack fix (gdsfactory/IHP#225); not yet on PyPI.

…eshing

Update the electrostatic capacitance notebook to validate the IHP cmim
against the cap_cmim compact model with the split MIM stack (gdsfactory/IHP
gdsfactory#188/gdsfactory#225). Measure the device capacitance between metal5 and the mim
top-plate terminal (T2='mim'), evaluate the PDK model via TECH/CbCapCalc
(replacing the removed ihp.cells2...Numeric), and run locally with
run_local()+write_config(). Document that Palace's electrostatic solver uses
ideal Dirichlet terminals with no surface-conductivity/thickness BC (that BC
exists only for the Maxwell solvers) and frame the residual gap as an open
investigation point rather than expected.

Also fix gsim meshing so the fixed IHP stack is modeled correctly:
- get_layer_infos() lets multiple LayerLevels share one GDS layer (mim_diel
  dielectric + mim conductor on MIMdrawing) each mesh at its own z-height
  (previously only the first layer was used and the top-plate conductor was
  dropped).
- lower the shaped-dielectric min_volume_thickness 0.05 -> 0.02 um so the
  40 nm MIM dielectric is meshed as a solid volume instead of skipped.

Result: Palace Cm[1,2] = 194.2 fF vs cap_cmim = 151.9 fF (ratio 1.28).
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 20, 2026
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.50000% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.00%. Comparing base (f7616d0) to head (43d34ee).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/gsim/palace/mesh/geometry.py 67.50% 14 Missing and 12 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #235      +/-   ##
==========================================
+ Coverage   60.92%   61.00%   +0.07%     
==========================================
  Files          97       97              
  Lines       14101    14108       +7     
  Branches     2859     2862       +3     
==========================================
+ Hits         8591     8606      +15     
+ Misses       4589     4585       -4     
+ Partials      921      917       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mdmaas

mdmaas commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Hi @vvahidd. This is some progress, but we still have ~30% error with respect to the PDK.

Some possibilities:

  • Maybe the PDK is assuming a 1d parallel-plate model, and is not including parasitic fringing fields?
  • We also seem to be using slightly different effective permittivities (PDK's effective permittivity (≈6.8) vs the sin stack value (≈7.5). This would explain a 10% discrepancy.
  • Highly unlikely but maybe assuming PEC electrodes is introducing some discrepancy due to skin effect (I think this should be < 1%).

@mdmaas

mdmaas commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Ok, I confirmed that increasing the device area reduces the discrepancy with the reference PDK values, so indeed the fringing fields are not being considered in the compact model.

@mdmaas

mdmaas commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Including the use of an effective permittivity and increasing the device area we get a clear trend of decreasing discrepancy, which indicates fringing fields were not present in the compact model

size Palace (fF) PDK (fF) ratio fringe %
5 52.31 38.45 1.360 28.0
10 178.39 151.90 1.174 15.7
15 379.46 340.35 1.115 10.9
20 655.58 603.80 1.086 8.4
25 1006.63 942.25 1.068 6.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant