Hi <@U016EM8L91B> <@U017X0NM2E7> , I’m trying to use `.tf V(bg) Vtest` (dc transfer function analysi...
y
Hi @Tim Edwards @Mitch Bailey , I’m trying to use
.tf V(bg) Vtest
(dc transfer function analysis) in my bandgap circuit to measure each mosfet’s gate voltage effect on the output reference voltage, while I always get the transfer function =0 for every mosfet. I used ngspice3.6 and attached the spice files as well as the running log. I ran it using command
ngspice -b bgr_mismatch_coeff.sp > spice_run.log
. The
Vtest
is a dummy dc voltage source I added to the mosfet gate (in my
bgr_mismatch_coeff.sp
file it is targeted on sky130_asc_nfet_01v8_lvt_9_2 while I tried to target on other mosfet as well).
porst
should be a pulse start signal in transient analysis while I changed it to DC and not sure is it correct. I checked the ngspice manual and forum about .tf while haven’t found any examples for references. Looking forward to your suggestion!
m
Sorry, no spice experience.
b
I would recommend that you first try a simpler circuit (not the full bandgap) to get this working.
Here's an example that works:
* tf test
.lib "/farmshare/home/classes/ee/272/skywater-pdk.v2021/libraries/sky130_fd_pr/latest/models/sky130.lib.spice" tt
X1 d g 0 0 sky130_fd_pr__nfet_01v8 w=10 l=0.15
Rd d dd 2k
vdd dd 0 1.8
vg gg 0 0.7
vtest gg g 0
.op
.tf V(d) vtest
.end
Your problem is likely that the bandgap does not start up without the pulse (you can check from the .op results if the bandgap is in a proper state). You may need to run .tran with the pulse, save the operating point after startup, then load the operating point for op and tf. Another option is to try and set initial conditions so that the circuit does not land in the trivial operating point where everything is off.
y
Appreciated!
@Boris Murmann I’d try that
@Mitch Bailey No worries!
Thanks, it works now.
👍 1
f
@Yueting Li, what tools are you using for schematic capture and simulation? I have tried xschem and ngpsice with some success.
y
@Faisal Mateen I used magic to extract the netlist from GDS and used ngspice to do the simulation. I fixed my bug by checking operation point when calculating the dc gain, it works now.
f
Great. Thx for sharing.
🙂 1
y
@Faisal Mateen @Tim Edwards Have you tried saving operating point from transient analysis into file, and load that operating point back later using .op in ngspice?
t
Sorry, I have not tried a reentrant operating point. Sounds like it might be a very useful trick, if it works.
y
@Tim Edwards kk, let me try a bit