Hi Again, does any one know why probe notation would not work on the sky130 models when doing dc ana...
u
Hi Again, does any one know why probe notation would not work on the sky130 models when doing dc analysis? ie:
Copy code
v0 net5 gnd! dc=1.8
xm2 net5 net8 gnd! gnd! sky130_fd_pr__nfet_01v8 w=0.9 l=0.6
.probe i(xm2,d)
.dc v0 0 1.8 0.2
I keep getting:
Copy code
Warning: Node d is not available for device xm2,
   .probe i(xm2,d) will be ignored
Thanks, Ronald
b
The core device is in a subcircuit. See an example here on how to grab the variables: https://github.com/bmurmann/Ngspice-on-Colab/blob/main/notebooks/SKY130_VGS_sweep.ipynb
🌍 1
u
Thanks Boris, the examples are useful. If I understand correctly, the suggestion is to probe device parameters instead. I'm still trying to figure out if this is expected, there is some ambiguity on the documents: Current measurement at a device node is achieved by automatically placing a Zero volt voltage source (VSRC, 4.1) between the selected (or all) device node and the net attached to that node. The positive pole of the VSRC is pointing out towards the net, the negative pole towards the device. The resulting output vectors are using the xx#branch notation (see examples below). Only top level devices are accessible, so device inside of subcircuits are not considered. Besides standard devices you may also measure currents at X instance lines (subcircuit calls). If the subcircuit definition (.subckt line) uses named nodes, these are used instead of node numbers (see device u1 in the example below). I believe the latter paragraph got added recently, I may need to try 42+ instead of my current 36. Regards, Ronald
Well, it's still not working on 42. I guess I'll file a ticket for either clarification or fix. Thanks again Professor.
c
Just took a glance at your spice code there, looks like you were having a typo too. Shouldn’t be i(xm2.d) rather than i(xm2,d)?
👍 1
u
Hi Chris, Actually “,” is what ngspice expects (from manual and code). However, I checked the code and seems that support for this is still incomplete. Is suppose to automatically add 0 V source at terminal but is not working properly, not sure if limited to named ports or failing generally. Bests, Ronald
Well it seems terminal number retrieval was not implemented for arbitrary subckt. Seemed to work after a quick hack. See https://sourceforge.net/p/ngspice/discussion/133842/thread/9928fe1aa2/ Thanks, Ronald