Hesham Omran
04/18/2024, 9:03 AMAmro Tork
04/18/2024, 2:32 PMAmro Tork
04/18/2024, 2:37 PMAmro Tork
04/18/2024, 2:49 PMXM1 net1 net2 VDD VDD pfet_03v3 L=41.75u W=20.0u nf=1.0 m=1.0 ldif=0.18u
+ ad='int((nf+1)/2) * W/nf * 0.18u' as='int((nf+2)/2) * W/nf * 0.18u'
+ pd='2*int((nf+1)/2) * (W/nf + 0.18u)' ps='2*int((nf+2)/2) * (W/nf + 0.18u)' nrd='0.18u / W' nrs='0.18u / W'
+ sa=0 sb=0 sd=0 m=1
XM1 net1 net2 VDD VDD nfet_03v3 L=41.75u W=20.0u nf=1.0 m=1.0 ldif=0.18u
+ ad='int((nf+1)/2) * W/nf * 0.18u' as='int((nf+2)/2) * W/nf * 0.18u'
+ pd='2*int((nf+1)/2) * (W/nf + 0.18u)' ps='2*int((nf+2)/2) * (W/nf + 0.18u)' nrd='0.18u / W' nrs='0.18u / W'
+ sa=0 sb=0 sd=0 m=1
Amro Tork
04/18/2024, 2:50 PM.lib "sm141064.ngspice" sf
.lib "sm141064.ngspice" mimcap_typical
.lib "sm141064.ngspice" res_typical
.lib "sm141064.ngspice" bjt_typical
.param
+ sw_stat_global = 0
+ sw_stat_mismatch = 0
+ mc_skew = 3
+ res_mc_skew = 3
+ cap_mc_skew = 3
+ fnoicor = 1
.end
Hesham Omran
04/18/2024, 3:31 PMAmro Tork
04/18/2024, 3:32 PMAmro Tork
04/18/2024, 3:33 PMAmro Tork
04/18/2024, 3:34 PMAmro Tork
04/18/2024, 3:34 PMAmro Tork
04/18/2024, 3:36 PMX
but for the device model you call it with M
. Using device model is not recommended as it ignore the parameters set for corners.Amro Tork
04/18/2024, 3:38 PMHesham Omran
04/18/2024, 3:39 PMAmro Tork
04/18/2024, 3:44 PMTypical
lib has fet_mm
as well and the parameters needed to complete the model:
.LIB typical
.lib 'sm141064.ngspice' nfet_03v3_t
.lib 'sm141064.ngspice' pfet_03v3_t
*
.param rsh_nplus_u_m=60
.param rsh_pplus_u_m=185
.param nfet_06v0_vsat = 1
.param nfet_06v0_vth0 = 0
.param nfet_06v0_xl = 0
.param nfet_06v0_xw = 0
.param nfet_06v0_tox = 0
.param nfet_06v0_cgso = 1
.param nfet_06v0_cgdo = 1
.param nfet_06v0_nvt_u0 = '0.070102'
.param nfet_06v0_nvt_vth0 = '-0.039'
.param nfet_06v0_nvt_xl = '0'
.param nfet_06v0_nvt_xw = '0'
.param nfet_06v0_nvt_tox = '1.52e-008'
.param nfet_06v0_nvt_cgso = '1e-010'
.param nfet_06v0_nvt_cgdo = '1e-010'
.param pfet_06v0_dvth0 = 0
.param pfet_06v0_dxl = 0
.param pfet_06v0_dxw = 0
.param pfet_06v0_dtox = 0
.param pfet_06v0_dcgdo = 1
.param pfet_06v0_dcgso = 1
.lib 'sm141064.ngspice' nfet_06v0_t
.lib 'sm141064.ngspice' pfet_06v0_t
.lib 'sm141064.ngspice' nfet_06v0_nvt_t
.lib 'sm141064.ngspice' noise_corner
.lib 'sm141064.ngspice' fets_mm
.ENDL
Amro Tork
04/18/2024, 3:45 PMAmro Tork
04/18/2024, 3:46 PMAmro Tork
04/18/2024, 3:47 PM_dss
devices:
https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pr/blob/a11222d68[…]1f2134ab28e97f97b9b99b6af188f88/models/ngspice/sm141064.ngspiceAmro Tork
04/18/2024, 3:49 PMHesham Omran
04/18/2024, 3:55 PMHesham Omran
04/18/2024, 5:19 PMHesham Omran
04/18/2024, 5:19 PMAmro Tork
04/18/2024, 8:53 PMAmro Tork
04/18/2024, 8:59 PMHesham Omran
04/18/2024, 9:25 PMStefan Schippers
04/19/2024, 8:53 AMM1[3:0]
instead of M1
with m=4
. Vectored instances will just be unrolled as regular independent parallel devices in netlist, M1[3], M1[2], M1[1], M1[0]
.
In sky130 the m
parameter is also aliased as mult
. mult is used in addition to m since mult as a user parameter is accessible from inside the model. Standard deviation of key model parameters is scaled as 1/sqrt(W * L * mult):
delvto = {0.004+sw_vth0_sky130_fd_pr__pfet_g5v0d10v5*1.25+sw_vth0_sky130_fd_pr__pfet_g5v0d10v5_mc*1.25+sw_mm_vth0_sky130_fd_pr__pfet_g5v0d10v5*mismatch_factor*MC_MM_SWITCH*AGAUSS(0,1.0,1)/sqrt(l*w*mult)}
I tried a mismatch simulation (1000 runs) of the vth@100nA of m=10 w=0.5 l=0.15 nfet_01v8 transistor and 10 individual w=0.5 l=0.15 transistors (M1[9:0]) in parallel: there is an offset in the vth distributions.Hesham Omran
04/19/2024, 2:14 PM