Is there an issue with annotating BSIM4 capacitances using xschem and ngspice? In the screen capture...
s
Is there an issue with annotating BSIM4 capacitances using xschem and ngspice? In the screen capture I tried annotating csd of the nmos device, but no value appears (I also tried cds). The syntax I used in the save statement was .save @m.x1.XM47.msky130_fd_pr__nfet_01v8_lvt[csd]. And for the ngspice_get_value symbol, I used this syntax: name=r119 node=v(@m.x1.XM47.msky130_fd_pr__nfet_01v8_lvt[csd]) descr="csd" Other BSIM4 capacitances fail to be passed as well.
s
I will dig in more detail this afternoon. In the mean time can you please check if the csd capacitance exists in the .raw file ? open the .raw file created by ngspice and look for the capacitance value. If it is missing you must tell ngspice to save these values.
I think you must use the ngspice_get_value.sym component and use an expression like: @m.x1.xm1.msky130_fd_pr__nfet_01v8[csd] (replace x1.xm1 with correct path for your circuit or use ${path} followed by mos instance name, like: ${path}xm1). You must explicitly save the required parameters, like:
.control
...
save @m.x1.xm1.msky130_fd_pr__nfet_01v8[csd]
...
.endc
see example in picture with [gm], transconductance:
s
Hi Stefan. I am saving these with the correct paths and they are working for the other parameters, as is seen in the screen capture. But I will check to see if the rawfile contains the csd (I suspect it does not). If not, it may be an ngspice behavior. If it's a confirmed bug in ngspice, I'll report that in this thread.
Stefan: it was in fact my error. I did not notice that in the get_value.sym expression, i surrounded the node with v( ), which was needed for the symbol I copied it from. You can see this in my original comment. When I removed the v( ), the capacitance was reported. User error.