hspice万用网表及活用技巧

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

1,测试MOS基本参数.lib'D:\project\hspicelib\cmos035\CMOS_035_Spice_Model33v.lib'TT.inc'D:\project\hspicelib\switchmodel\myswitch.cir'.op.optionnodelistpost.optionnodelistpostMN1outnNMOSIN00N_33L=klW='2*kl'M=1MP1OUTPPMOSINVDDVDDP_33L=klW='2*kl'M=1IDCNVDDoutnkidnIDCPOUTP0kidpVDDVDD03.3LNNMOSINoutn10GCINNINNMOSIN10GVININ0AC=1CINPINPMOSIN10GLPOUTPPMOSIN10G*DICTIONARY1*GND=0.GLOBALVDD.acdec10011g*sweepkl0.5u2u0.1u**.printvdb(outn)vdb(oup).paramkidn=7.5Ukidp=2.7ukl=1u****measve_nofnmos.measacdc_gain_nmaxvm(outn).measacw_nfindw(mn1)at5.measacl_nfindl(mn1)at5.measacs_nparam='w_n/l_n'.measacvth_nfindlv9(mn1)at5*vthalias.measacvgs_nfindlx2(mn1)at5.measacvod_nparam='vgs_n-vth_n'.measacve_nparam='dc_gain_n*vod_n*0.5/l_n'.measacknparam='2*kidn/vod_n/vod_n/s_n'***mesureve_pofpmos.measacdc_gain_pmaxvm(outp).measacvth_pfindlv9(mp1)at5.measacvgs_pfindlx2(mp1)at5.measacw_pfindw(mp1)at5.measacl_pfindl(mp1)at5.measacs_pparam='w_p/l_p'.measacvod_pparam='vgs_p-vth_p'.measacve_pparam='dc_gain_p*vod_p*0.5/l_p'.measackpparam='2*kidp/vod_p/vod_p/s_p'华中科技大学代小伍fivedai@163.com版权所有1//其它.measacdc_gain_nfindvm(outn)at5.measacrds_nfindrds(mn1)at5.measacgds_nfindgdso(mn1)at5.measacgm_nfindgmo(mn1)at5.measaca0_rds_nparam'gm_n*rds_n'.measaca0_gds_nparam'gm_n/gds_n'.measacrout_ac_nparam'1/gds_n'.measacc_gsub_nfindcggbo(mn1).measacc_gs_nfindcgsbo(mn1).measacw_nfindw(mn1).measacl_nfindl(mn1).measaccox_nparam'c_gsub_n/w_n/l_n'****measve_nofnmos.measacdc_gain_pfindvm(outp)at5.measacrds_pfindrds(mp1)at5.measacgds_pfindgdso(mp1)at5.measacgm_pfindgmo(mp1)at5.measaca0_rds_pparam'gm_p*rds_p'.measaca0_gds_pparam'gm_p/gds_p'.measacrout_ac_pparam'1/gds_p'.measacc_gsub_pfindcggbo(mp1).measacc_gs_pfindcgsbo(mp1).measacw_pfindw(mp1).measacl_pfindl(mp1).measaccox_pparam'c_gsub_n/w_n/l_n'华中科技大学代小伍fivedai@163.com版权所有20.40.60.811.21.41.61.822.22.4x10-60.80.911.11.21.31.41.51.61.71.8x107X:5.816e-007Y:1.592e+007X:5.815e-007Y:8.268e+006channellenghvenandvepvenmosvepmosveofnmos&pmosve_n=16.4e6ve_p=8.92e60.40.60.811.21.41.61.822.22.4x10-60.60.811.21.41.61.822.2x10-4X:5.816e-007Y:0.0002034X:5.815e-007Y:7.588e-005channellenghknandkpklkpkn=1.9396e-004kp=7.9971e-005@mean华中科技大学代小伍fivedai@163.com版权所有30.40.60.811.21.41.61.822.22.4x10-6050100150200250300350X:1.986e-006Y:133X:2.009e-006Y:307.6X:5.815e-007Y:36.78X:9.841e-007Y:69.79X:9.962e-007Y:173.5X:5.816e-007Y:93.16channellenghdcgaindcgainnmosdcgainpmosdcgainvsLatvod=0.2v2,MOS常见参数及函数调用//forumc0.35um3.3vtwin_well0ξ=8.85aF/uma=10-182_irsoξ=3.97k=1.38*10-23J/Kq=1.6*10-19CVT=kT/q=16mv@300Ktox=5nmcox=6.9fF/um2tox=7nm时cox=Cgdoverlap=Cgsoverlap=1.5e-10tox=12nmcox=2.88fF/um2vthn=0.63vkn=1.9396e-004华中科技大学代小伍fivedai@163.com版权所有4ve_n=16.4e6vthp=0.86vkp=7.9971e-005ve_p=8.92e6函数L()W()vth()阈值电压,pmos为正值vdsat()饱和电压即vgs-vthrds()电阻,不知是怎么来的vgs()cdo()dcdraincurrentgmo()gmoperational静态时gmgdso()dcD-Sconductance导数为输出电阻gmo/gdso为直流增益covlgs()gsoverlapcovlgd()gdoverlapcovlge()Gsuboverlap3,option选项及VCVSVCCSparam若要导入到MATLAB中需要bin进制文件时需要设置好option并只使用.probe打印.optionpost=1//二进制.probetranV(out1)v(node1).optionreltol.optionreltol=1e-5abstol=1e-9.optionreli=XXX.optionmethode=gear.optionpost=-0,1,2//打印科学进制和其它形式1,binary2,ascii3,减小文件空间大小。.optionpostacctaccurate//acct仿真结果写入list文件中。default=1,accurate仿真精度很高。.optionnodelistpost.optionGSHUNT=1e-11CSHUNT=1e-11method=gear.optionfast.optioningold=2//list中打印的数字为科学制度如10e8华中科技大学代小伍fivedai@163.com版权所有5evcvsoutpoutninpinnMAX=5MIN=-5A0(如1000)evccsoutpoutncn1cn2max=5min=0gm(如200u)//sybolPrefix=GPINODER=outpoutninpinngm//设置一个变量ORDER=MAX=MIN=gm$.subcktNAND2vinvssx1x2ywn1=Wn11//wn1等可省去不用,M3X1VSSVSSN_33W=wn1.ends需导出网表为Xaaavinvssx1x2yNAND2WN1=0.7U//或WN11=0.7U也可以在symbol中由symb中ORDER控制.subckt.inc‘…\myswitch.cir’Xswitchinoutcontswitchdai//myswitch.cir.subcktswitchdaiinoutcont子电路名端口排序GswitchinoutVCRpwl(1)cont00,10g1v,0.1v//1v时对应于0欧姆,0.1v.ends对应于10G欧姆//myswitch.cir//sybolMODEL=switchdaiPinorder=inoutcontPrefix=XORDER=MODEL$//只显示MODEL值.paramKcu=2.0.paramkv=unif(nomina_val,rel_variation,multiplier)Aunif(…)Gauss(nominal_val,rel_variation,sigma,multiplier)2σ(sigma),.acdec10011gsweepmonte=n_time//n_time为取样次数。ExoutpoutnPOLY(3)inp1,inn1,inp2,inn2,inp3,inn3,0,1,1,1+IC=1.5,2.0,17.25其中0,1,1,1为p0,p1,p2多项式华中科技大学代小伍fivedai@163.com版权所有6(,)01*(1,1)2*(2,2)3*(3,300,11,21,31VoutpoutnPPVinpinpPVinpinnPVinpinnpppp=+++⎧⎨====⎩)零延时反相器Einvoutpoutnpwl(1)inp,inn,0.7v,5v,1v,0v输出电压0.7v对应输入电压1v,输出5v对输入0v4,激励源和printprobsin(vovaft_dθϕ)sin(偏置电压振幅频率延时衰减因子初始相位)0*exp[()]sin2[()]360VVattdfttdϕθπ⎧⎫+−−⋅⋅−+⎨⎬⎩⎭pulse(v1v2tdtrtfpwperRt)pulse(初始值高值延时上升时间下降时间高占比例周期repeat重复时间)pwl(t1v1t2v2RTrepeat).printac(*).printacvdb(node1,node2).printacpar('(v(node1)-v(node2))/v(node3)').printacpar(‘DB(V(dop)-V(don))’).printnoiseinoiseonoise.printacv(node1,node2).printdcpar('sqrt(I1(m1))').probetranV(in1)v(nod1)v(nod2)5,acdc仿真及meassweepac.acdec10011g.ac每十倍频程100频率1至1gHz.acdec10011GsweepKcpPOI31p2p3p//变量Kcp有三个点扫描1p,2p,3p.acdec10011GsweepKcpLIN525125//从25度到125度有5个点扫描.acdec10011GsweepKcpDEC101K100K//从1k到100k每十倍频程有10个点.acdec10011Gsweepdata=ac.dataacTempK1251p262p华中科技大学代小伍fivedai@163.com版权所有7275p……也可将上面写在一

1 / 9
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功