Skip to content

Instantly share code, notes, and snippets.

@snmishra snmishra/gmid.sp
Last active Sep 27, 2018

Embed
What would you like to do?
Example testbench for generating gm/ID curves using ngspice
* gm/Id simulation
* public domain
.param ll=250n vg=1 vd=0.7 vdd=1.1
* Download models from http://ptm.asu.edu/modelcard/LP/45nm_LP.pm
.inc "../PTM-MG/45nm_LP.pm"
vg vg 0 vg
vdn dn 0 'vd'
vdp dp 0 '-vd'
egn gn 0 vg 0 1
egp gp 0 vg 0 -1
mn dn gn 0 0 nmos w=10u l=ll
mp dp gp 0 0 pmos w=10u l=ll
.probe dc v(*) i(*)
.control
set filetype binary
set appendwrite
save all @mn[gm] @mn[id] @mn[cgs] @mn[cgg] @mn[cgd] @mn[gds] @mn[w] @mn[l]
+ @mp[gm] @mp[id] @mp[cgs] @mp[cgg] @mp[cgd] @mp[gds] @mp[w] @mp[l]
foreach tx_len 250n 500n 750n 1u 1.5u 2u 3u 5u 10u
alter @mn[l] = $tx_len
alter @mp[l] = $tx_len
* Vgs sweep
dc vg 0 1.1 0.01
write gmid.raw
end
.endc
.end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.