Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diode breakdown voltages are in the models, but misspelled? #19

Open
psychogenic opened this issue Apr 28, 2024 · 5 comments
Open

Diode breakdown voltages are in the models, but misspelled? #19

psychogenic opened this issue Apr 28, 2024 · 5 comments

Comments

@psychogenic
Copy link

I have noticed something odd in the sky130 models I'm using (version cd1748bb197f9b7af62a54507de6624e30363943): there are what I believe are breakdown voltages for diodes in many spice models, but they seem to be misnamed 'vb' rather than 'bv':

+ vb = 11.7 ; Units: volt
+ ibv = 0.00106 ; Units: amper

If I change this to 'bv' as ngspice wants, which also matches the ibv data present, then I get successful simulated breakdowns, as attached.

This is true of both sky130_fd_pr__diode* type things and *__parasitic__diode type things

sky_diode_breakdown

@RTimothyEdwards
Copy link
Collaborator

Great observation, Pat!

This seems to come from the "quick & dirty" implementation of the level 3 diode in ngspice, which is a recent addition (prompted by the existence of sky130). Level 3 diodes are a Cadence thing, so without the (proprietary) level 3 model equations, the best the ngspice developers could do was to implement the basic underlying idea of a diode whose parameters are based on physical dimensions instead of a scale factor (which is how the original level 1 diode is defined).

Apparently they did not notice some aspects of the level 3 definition; at least what I found by googling "level 3 diode model breakdown voltage" was a reference at which states

Diode Model Parameters  - Level = 3
            
Name | Description | Units | Default

BV, VB, VAR, VRB | Reverse breakdown voltage | V | ∞

So apparently the official Level 3 definition allows any of BV, VB, VAR, and VRB to represent reverse breakdown voltage (that has all the trappings of a model created from a bunch of people's independent hacks to solve the same problem).

Therefore the correct solution is to encourage the ngspice developers to allow all four variants of the breakdown voltage parameter. The quickest solution is for me to change vb to bv in the diode models, as that should be compatible with the most simulators.

@psychogenic
Copy link
Author

Ah, well that explains it. If you want the quick & dirty, I can go through and do a PR.

@psychogenic
Copy link
Author

Ah, screw it, I did the right thing instead. Or tried to. I now have added breakdown voltage synonym support to ngspice and made a PR:

https://sourceforge.net/p/ngspice/ngspice/merge-requests/17/

The change was minor, basically 3 lines:
https://sourceforge.net/u/psychogenic/ngspice/ci/80209f021565dc05c7c0ef47cf6965f9f7a39530/

Logging into sourceforge after all this time was the most exciting part.

@RTimothyEdwards
Copy link
Collaborator

@psychogenic: PR #20 fixes the issue within the PDK itself, so that can take effect immediately while waiting for your pull request to be merged into the next ngspice distribution. Thanks again for investigating the issue!

@dwarning
Copy link

Meanwhile parameter aliases VB, VAR, and VRB are implemented in pre-master-43.
Basic mask and etching offsets are now considered with XW model parameter for level=3 diodes.
Further TLEV=2 uses now an alternative bandgap calculation with GAP1 and GAP2. There are still open topics for this temperature model e.g. saturation currents etc.

Would be helpful to get response after checking with sky-water-libs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants