Monte Carlo simulation for transistor models "g5v0...
# analog-design
n
Hi all, I am trying to design a circuit using transistor models "g5v0d10v5". The circuit has a supply voltage of 5V. I am trying to run monte carlo simulation to see different the affect of process variation in the design. The MC simulation is not running. When I use 1.8V transistors, the monte carlo simulation is running. Can anyone please help me with the issue? Please see the attached image of the setup.
The MC simulation is running for certain value of W, L and nf but not for all of them. L and width per finger both are higher than 0.5um. The simulation is running for all the other corners FF, SS, SF, FS with mismatch. The simulation is failing for only MC corner.
More simulation results shows that MC simulation is failing for L > 2um. Please help me with the issue. :)
t
The monte carlo models are very restricted in the values of W and L that they allow, as you noticed. If you have a recent installation of open_pdks, then you can access the "continuous" models, which are binned across a continuous range of L and W, both in the corner and monte carlo models. To get the continous models, change the path to the sky130.lib.spice from
$PDK_ROOT/$PDK/libs.tech/ngspice/sky130.lib.spice
to
$PDK_ROOT/$PDK/libs.tech/combined/sky130.lib.spice
. If the
combined
directory does not exist, then you need to update the open_pdks installation.
n
HI Tim Edwards, Thank you so much for your answer. I found the 'combined' directory. Now the MC simulation is failing because there is no model for PNP transistor. How can I fix that? I have one more question. What are the "continuous models" and how are they different from the other ones?
t
There are many questions surrounding how the "continuous" models were made. At very least, the valid ranges per model bin were stretched to cover a full and unbroken range of widths and lengths. At best, the parameters were modified so that all transistor properties are continuous across model bin boundaries. However, people who have investigated the models still find some discontinuities at the boundaries.
I think you ran across an issue that I found a while back but didn't write down and was unable to duplicate recently. I think there is an include file missing in the sky130.lib.spice file; sounds like the PNP model file is not being included. Can you please post the output error so that I can figure out what needs to be fixed?
n
Please see the error below:
To fix this I added the line .include /home/zerotoasic/asic_tools/pdk/sky130A/libs.ref/sky130_fd_pr/spice/sky130_fd_pr__pnp_05v5_W3p40L3p40.model.spice. But then I got following issues :
Adding .include line for pnp transistor in montecarlo.spice is also not fixing the error. It says redefinition of .subckt (pnp) is ignored.
t
Yes, as far as I can tell the
.include
is not the problem here. The
sky130.lib.spice
file has
.include continuous/models_bjt.spice
and that file defines
.subckt  sky130_fd_pr__pnp_05v5_W3p40L3p40 c b e s mult=1
. So my initial assumption was not correct, and I don't yet know what's going on here.
n
Ok.
How accurate are these continuous models for MC simulation? I have simulated my circuit for different process corners (SS, SF, FS, FF) with mismatch. But I don't think that's enough. MC provides different combinations of process variation.
Please let me know if you know what is wrong. :)
t
I'm looking. FYI, sometimes monte carlo simulations will show up issues at unusual combinations of parameters that are not represented in corner simulations. Far more often, though, the monte carlo simulations represent a much narrower range of parameters than corner simulations because the probability is infinitesimally low that all parameters are going to sit at 3 sigma off of nominal. For circuits that cannot be made to pass at all corners, it is generally sufficient to run monte carlo simulation and come up with a reasonable bound on the yield of parts due to process variation.
n
Ok. Thank you so much for the explanation.
t
Okay, I found the problem, which is that m is used in the subcircuit definition equations instead of mult, an apparent miss when converting from spectre to ngspice. You can make this change yourself in
continuous/models_bjt.spice
(replace all occurrences of
sqrt(m)
with
sqrt(mult)
in the entire file). Meanwhile I will fix the upstream repository.
The repository has been patched.
n
I changed the file continuous/models_bjt.spice as you suggested. Still I am getting the same error.
t
Can you post the simulation .spice file instead of a screenshot?
n
Please see the attached spice file.
t
I'm getting the same error but I don't know why. I can run Stefan Schipper's "test_bipolar" simulation, which uses the same device, and I can't see what's different about it.
n
Me too. The test_bipolar.sch is simulating properly for MC.
I copied my circuit in the test schematic (test_BJT) and now the error is undefined parameter [temp].
test_BJT.spice
I did more simulations. My circuit has a pwell resistor and nfets and pfets with L = 30um. If I change L to 20um and remove the pwell resistor, then simulation is running.
t
Although the models are "continuous" they still have maximum limits. I am not sure what that has to do with the error message about the PNP subcircuit not found; that looks like a very misdirected error message. The undefined "temp" parameter is another failure in the conversion from spectre to ngspice. I can see that it is used in the
res_iso_pw
resistor, and that one is easy to fix, and I will go take care of that now.
Also now fixed in the repository.
n
Ok. The message "PNP subcircuit not found" appears when the circuit is used a symbol in a test bench otherwise it does not appear. The specification for my design is that it has to be very very low current consuming. That is why all nfet and pfet have L = 30um. I will do mismatch with each process corner separately to analyze the circuit behavior. Thank you for all your help.
Hi Tim Edwards, Can you please tell me how to copy latest changes from the repository?
Can you please tell me what changes you made to res_iso_pw fix so that can do the same from my end.
t
@Naina: In
combined_models/continuous/models_resistors.spice
line 292 I changed all occurrences of
temp
to
temper
.
If you installed the PDK using open_pdks, then you can just do
make update
. Or you can go to
sources/sky130_fd_pr
in open_pdks and do
git pull
.
n
Ok. Thank you so much.
106 Views