https://open-source-silicon.dev logo
#sky130
Title
# sky130
j

João Vitor Testi Ferreira

09/02/2021, 1:58 AM
I am trying to simulate the resistance of a Pseudo-Resistor, but I keep having convergence problems in NGSPICE. I tried puting some resistor in parallel with my mosfet channels but I still cannot simulate the circuit. I understand the problem is because of the small voltages and current in this block, but anyway, I couldn't figure out a way to simulate this. Anyone can help me? (The simulation is from -0.9 to 0.9V).
🤯 2
s

Stefan Schippers

09/02/2021, 8:32 PM
Can you please provide the schematic file,
pseudo_tb.sch
and the
pseudo_tb.spice
netlist? Thanks!
j

João Vitor Testi Ferreira

09/02/2021, 8:50 PM
Thanks for the anwser. Here they are
s

Stefan Schippers

09/02/2021, 9:11 PM
I got simulation running with no errors... Just replaced the model .includes with a single line:
.lib /path/to/sky130.lib.spice tt
ensure in the
~/.xschem/simulations/
directory (the directory where netlist is generated) a
.spiceinit
file is present with following lines inside:
set ngbehavior=hsa
set ng_nomodcheck
Also commented out the .options on gmin and itl* and the .nodeset
j

João Vitor Testi Ferreira

09/02/2021, 9:28 PM
Thank you very much for your answer, Mr Schippers. The reason you were able to simulate is because you commented the option line that sets gmin. The default value for gmin is 1e-12 which is very high for the simulation I am doing, even if the simulator plots something, because of this gmin the result won't be realistic. The resistance I am trying to simulate has its maximum value around 1e-14, that is why I cannot use the default gmin value. I think a gmin value of 1e-16 would be suitable for this simulation, the problem is that, for some reason, the simulation is not converging. Anyway thanks for your answer, I will keep trying to figure out how to simulate that.
s

Stefan Schippers

09/02/2021, 10:39 PM
Thank you for the explanation. Yes, using a lower GMIN causes convergence issues. Don't know if this is a simulator issue or a problem with the MOS model equations.
... As a tentative workaround i tried to set the 'mult' parameter of the MOS transistors to 1000000. This means simulating 1 million paralleled devices. The simulated resistance will be 1000000 times lower, so you can keep GMIN to the default value. However this is just a dirty hack, not the solution of the problem.
👍 2
j

João Vitor Testi Ferreira

09/03/2021, 1:16 AM
Your workaround sounds good, even though I'm a bit worried of using it, since putting transistors in parallel affects the resistance in a non-linear way in this weak inversion situation. Skywater130 uses the BSIM model which has some known discontinuities in its higher order derivatives (not sure if that is the problem, but, in other pdks, sometimes I had to use the PSP model to simulate transistors in deep weak inversion), but, as far as I know, a PSP model is not available for the SKY130 pdk. Anyway, thank you very much for all your help.
👍 1