Both xcircuit and ngspice has been updated for Fedora/EPEL-5 last week with some key features to boost productivity for standard cell characterisation. I’ll explain briefly in two blog posts, thus this one is the first post.
Last week, Fedora users have updated their ngspice rework 19 to rework 20 (20-1.fc12), with the following key highlights :
- Updated BSIM4 code to BSIM 4.6.5 in accordance to this document.
- Piecewise linear(PWL) functionality for B sources.
- Support of 5-terminal bjt’s in subckt’s by prepending subckt name (similar things should be made for 5-7 terminal mos transistors, like soi models).
- New measurement code, which is the most awaited feature for standard cell characterisation.
Currently the measurement code is still undocumented, so I hope this blog post will help ngspice users understand with their baby steps with ngspice’s .meas command. Though it follows the same syntax as HSpice, it still not yet complete. Hopefully the next ngspice releases will smooth the edges.
.meas command
Anyone who is characterising standard cells can now use .meas command and it surely helps to maintain an automatic flow.
For the sake of simplicity, I’ll cover a transient simulation as example, however one can also use it for voltage transfer characteristic of the cell.
.tran 0.1 18n uic
Define a parameter :
.param vp = 3.0v
Calculate maximum voltage of signal Vout from 4 ns to 10 ns
.meas tran vmax max v(Vout) from 4n to 10n
Calculate minimum voltage of signal Vout from 6 ns to 15 ns
.meas tran vmin min v(Vout) from 6n to 15n
Calculate the fall delay between the falling edge of the signal Vin and the falling edge of signal Vout. (note the use of parameter ‘vp’ here)
.meas tran delay_f trig v(Vin) val=’vp/2′ fall=1 targ v(Vout) val=’vp/2′ fall=1
Calculate the rise delay between the rising edge of the signal Vin and the rising edge of signal Vout. (note the use of parameter ‘vp’ here)
.meas tran delay_r trig v(Vin) val=’vp/2′ rise=1 targ v(Vout) val=’vp/2′ rise=1
These are the basic .meas commands which can be extended for ripple calculation and many of the user’s needs. The above image, created with ‘dia’, describes visually those commands.
Upon simulation, ngspice will output :
…
Transient Analysis
vmax = 3.300000e+00 at= 1.000000e-08
vmin = 2.589696e-04 at= 1.480631e-08
delay_f = 4.780022e-10 targ= 1.052800e-08 trig= 1.005000e-08
pdelay_r = 2.980831e-10 targ= 5.448083e-09 trig= 5.150000e-09
…
More examples can be found about the .meas command with
$ rpm -qld ngspice-doc | grep meas
Filed under: asic, eda, feature, fedora, Free Electronic Lab, ngspice


[...] Older » [...]