Hello. I've created a comparator, and I would like...
# xschem
u
Hello. I've created a comparator, and I would like to know the values of Cgd, Cgb, and Cgs for the differential input MOSFETs M2 and M3. I attempted a DC analysis and generated a .
raw
file, but I'm unable to read it. What steps should I take to examine Cgd, Cgb, and Cgs? I've attached the file and diagrams for reference. Your assistance would be greatly appreciated.
s
You need to specifically add save instructions, like:
save @m.x1.xm2.msky130_fd_pr__nfet_01v8_lvt[cgd]
before the
dc
instruction. You can then plot the capacitance in ngspice with:
plot @m.x1.xm2.msky130_fd_pr__nfet_01v8_lvt[cgd]
u
@Stefan Schippers I changed my s1_code like your advice. I didn't found the output of the value. Where can I get the output of dc analysis?
s
Change the s1_code like this:
Copy code
name=s1 only_toplevel=false value="
.lib /foss/pdks/sky130A/libs.tech/ngspice/sky130.lib.spice tt
.include /foss/pdks/sky130A/libs.ref/sky130_fd_sc_hd/spice/sky130_fd_sc_hd.spice
.option savecurrents
.temp 25
.control
  save all
  save @m.x1.xm2.msky130_fd_pr__nfet_01v8_lvt[cgd]
  save @m.x1.xm2.msky130_fd_pr__nfet_01v8_lvt[cgs]
  save @m.x1.xm2.msky130_fd_pr__nfet_01v8_lvt[cgb]
  save @m.x1.xm3.msky130_fd_pr__nfet_01v8_lvt[cgd]
  save @m.x1.xm3.msky130_fd_pr__nfet_01v8_lvt[cgs]
  save @m.x1.xm3.msky130_fd_pr__nfet_01v8_lvt[cgb]
  dc v5 0.8 0.9 0.001
  write hgu_comp_op.out   
  plot @m.x1.xm2.msky130_fd_pr__nfet_01v8_lvt[cgd]
  plot @m.x1.xm2.msky130_fd_pr__nfet_01v8_lvt[cgs]
  plot @m.x1.xm2.msky130_fd_pr__nfet_01v8_lvt[cgb]
  plot @m.x1.xm3.msky130_fd_pr__nfet_01v8_lvt[cgd]
  plot @m.x1.xm3.msky130_fd_pr__nfet_01v8_lvt[cgs]
  plot @m.x1.xm3.msky130_fd_pr__nfet_01v8_lvt[cgb]
.endc
"
👍 1
u
@Stefan Schippers Thank you so much your help!