Brady Etz
04/23/2024, 4:32 AMdiode_pw2nd_05v5
and diode_pd2nw_05v5
?
I'm attaching the demo testbench with transient simulations. For these circuits, a voltage pulse is applied to one or two reverse-biased diodes of either type. The cathode current is smooth, matching the expected behavior of a diode. The anode current is noisy and leaves the node at an unusual, large current offset (!) when the voltage ramp levels off. I'm not familiar with diode spice models, so I'm struggling to interpret the issue and plan a correction/workaround.
EDIT: Thinking about this even more, is there a third terminal hidden in the diode models? I'm not even sure how spice would simulate it this way, honestly (Id0 != Id1).Brady Etz
04/23/2024, 2:04 PMmodels_diodes.spice
. The only devices that don't show this behavior are diode_pd2nw_05v5_esd
, diode_pd2nw_05v5_esd_v5
, diode_pw2nd_05v5_esd
, and diode_pw2nd_05v5_esd_v5
. These are modeled as a diode with a parameter rs_int
set to 0, its area parameter increased by 54%, and a 1.1101-Ohm resistor on the anode.
rs_int
is used to set the diode model's rs
parameter, and is by default 600 pOhm for pd2nw_05v5/11v0
devices and 981 pOhm for pw2nd_05v5/11v0
devices. Just adding a resistor on the anode isn't enough to eliminate this current noise, so I will try playing with the model parameters.Brady Etz
04/23/2024, 3:28 PMrs
. I would need to look deeper into ngspice to understand how the circuit model works.Brady Etz
04/23/2024, 3:43 PMsky130_fd_pr__diode
models use rs
scaled down to the pico-Ohm region, except for the _esd_*
models, which set it equal to zero.
This is not typical. Most real diodes have ohmic resistance on the order of 1-1000 mOhms.
I created custom diode models in my sky130 install directory to verify that using rs=0
produces no step-to-step current fluctuations on the anode. Alternatively, using rs>5e-3
produces current fluctuations at the anode that are of the fA magnitude, which is still usable for simulating high-impedance nodes.
I was originally thinking the diode model rs
parameters were mistakenly given with a factor of `1e-12`~, and should be scaled to Ohms to interact properly with ngspice~. But I don't yet understand where this current fluctuation issue is arising in the simulator. If rs
is being scaled by 1/area first, then the units start to make sense and there's some other simulation issue related to rs
that isn't the parameter value itself.Brady Etz
04/23/2024, 4:23 PMrs_int = {0*1e-12}
to rs_int = 600e-3
or rs_int = 981e-3
and remove the series 1.11-Ohm resistors. These are behaving the way the diode models should behave in reverse bias, but I don't yet have a proposal for a permanent fix.Christoph Maier
04/23/2024, 5:00 PMpfet_g5v0d10v5
transistor.
Are the 5V PFET substrate diode models sharing the same parameters?Brady Etz
04/23/2024, 5:24 PMmodel__parasitic__diode_ps2dn*
covers deep n-well to p-sub junctions.
model__parasitic__diode_pw2dn*
covers isolated p-well to dnw junctions.
model__parasitic__diode_pd2nw
covers "nwell to isolated pwell", which just sounds like a diode to me, but maybe they mean nwell to substrate.
Saturation current with the parasitic models is up to two orders of magnitude smaller than the standard diodes, so it should fluctuate less. But I would still expect the anode of these parasitic junctions to demonstrate unphysical currents when the potential across the diode changes. rs
for each parasitic junction is given as 900*1e-12
, so on par with the standard diodes.
What I can't tell yet is whether ngspice scales rs
with junction area. It should. The manual has a table of diode parameters that says it gets scaled. But three pages later, it doesn't appear in the scaling equations list. I'm digging up the source code to figure it out.Brady Etz
04/23/2024, 5:46 PMrs
. Forward current at 10uA with AREA = 1e-12 m
and my modified diode model generates 6MV, so 600 GOhms. ESR= rs/A
. But this means rs
must be zeroed out to have reasonable forward-bias behavior without huge reverse-bias current noise on the anode.
I will try and track down why non-zero rs
parameters with these PDK models cause transient noise on a single diode terminal with ngspice. Fortunately, I have loads of time today.Brady Etz
04/24/2024, 12:15 AMCharly Meyer
04/24/2024, 9:17 AMBrady Etz
04/24/2024, 3:43 PM.option method=gear
changed the edge times for some of the current spikes, but did not eliminate them. I will try out some other transient sim options, too.