<@U01GLU3UDRD> What do you mean selectively? Per i...
# analog-design
a
@Krzysztof Herman What do you mean selectively? Per instance you mean? If yes, then you could use dtemp parameter
k
in fact I would like to isolate one device and simulate its temperature dependence, in fact I would like to simulate a photo current of a photo diode. Increasing the temperature the reverse current will increase, as it increases when exposing to a light. However I would like to maintain the readout circuit not affected by the temperature changes. I have never used the dtemp parameter, what it does ?
a
dtemp is an instance parameter that sets how much temperature difference that specific instance has over the overall chip. Let's say you are simulating at 27 for the entire circuit and what that photo diode to be 50. Then you need dtemp to be 50 - 27 = 23, You could make this as a parameter. Please note that I haven't test dtemp on skywaters models nor did I on ngspice. Take it with a grain of salt. Make sure to review everything carefully
s
@Krzysztof Herman see the ngspice manual: 1.3 Analysis at Different Temperatures From the manual:
M1 d g s b MOSN temp=35
will set the temperature of the specific MOS device to 35 °C
M2 d g s b MOSN dtemp=20
will set the temperature of device M2 at a delta of 20° above the overall temperature.
k
@Amro Tork @Stefan Schippers thank You guys, I think that using this cool feature I am done !👍
s
@Krzysztof Herman Please verify the manual statements. For example set the temp value of a diode to some very high temperature and verify the reverse current. Just to be sure it works! 😀
k
Sounds like a plan!🙂 I will let You know if, and how it works
@Stefan Schippers @Amro Tork hi guys, I have simulated a sample circuit with 2 diodes
inverse_sch.png
Copy code
D1 net1 net3 1N914 area=1 dtemp=10
D2 net1 net2 1N914 area=1
gives me this result
inverse.png
however changing to
Copy code
D1 net1 net3 1N914 area=1e-3 dtemp=10
D2 net1 net2 1N914 area=1e-3
inverse2.png
since the current is proportional to the area it scales correctly however the linear dependence seems to be suspicious. It definitely has a lot in common with the area, the diodes from sky PDK have area proportional to 1e-12 !! Summarizing, dtemp seems to work and could be a good method for emulating photo generated current nevertheless there is an issue related to small diode area
a
Happy to see that working
k
@Amro Tork any idea about the strange response from samll area ?
a
@Krzysztof Herman Could you send the netlist? I need to take a quick look.
k
ok
Diode_Dtemp_tb.spice
it does not use the SKY130 PDK only a simpe model of the 1914 diode
a
I could see that.
s
There is an ongoing discussion on github open_pdks about the strange scaling of sky130 diodes. Basically to simulate a 1um x 1um (that is a small diode) AREA parameter of the sky130 diode model must be set to 1e12 Nobody knows where this number comes from. According to the global scale factor a 1um x 1um should correspond to an AREA=1 device. If diodes do not honor the global SCALE factor area should be AREA=1e-12. No hypotesis about the AREA=1e12 that gives the expected I/V curve for a 1um x 1um diode.
k
@Stefan Schippers thank You, in fact scaling the diode from the PDK with default value of area=1e+12 to 1e+17 solves the problem. What is strange is the linear dependence between I and V for small area, I ws looking in the chapter 7 of ngspice user manual and have not found any razonable response in the models applied\
There is also a warning "Warning: IKK too small - model effect disabled!"
s
I think someone should take the bare silicon characterization data of these diodes and create new models from scratch, perhaps using simple berkeley spice models, which are in my opinion more than adequate for describing (mostly) parasitic davices in a cmos process.
sky130 diode models are LEVEL=3 which brings additions to the original berkeley models for sidewall diode (so proportional to the perimeter) in addition to the bulk area diode. Xyce does not recognize these at all, ngspice also seems to reject some model parameters.
k
Hi @Stefan Schippers, I am not sure if the issue is related with the PDK, in fact I have simulated a simple diode .model 1N914 D(Is=2.52n N=1.752 Rs=.568 Cjo=4p M=.4 tt=20n )
Copy code
D1 net1 net3 1N914 area=1e-3 dtemp=10
D2 net1 net2 1N914 area=1e-3
having exactly the same problem, anyway thank you for your opinion, regards!
s
@Krzysztof Herman in general when you simulate discrete devices you don't need to provide any area parameter. Model will use the default.
🙌 1
k
I think I have found the solution of my problem
To aid convergence, SPICE adds a small conductance in parallel with every junction diode. The value of this conduc- tance, GMIN, is a program parameter that can be set by the user. The default value for GMIN is 10- 12 S. Some circuit simulation programs do not use this conductance.
that explains the linear behavior of the diode in for small area or Is
Copy code
set gmin=1.0e-20
this solves the issue with the linear dependence
@Stefan Schippers @Amro Tork
👍 1