|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
verilog-A程序如下://This model is used for testing, and it will be modified without notice.
//vp: positive terminal
//vn: negative terminal
//vr: node between resisitor and conductance
//vl: noed between conductance and capacitor
`include "disciplines.vams"
`include "constants.vams"
module fecap(vp,vn);
inout vp,vn;
electrical vp,vn,vr,vl;
//parameter declaration: name= value [unit]
parameter real c=0.04369;
//[uc*v]
parameter real a=0.7878;
//[v]
parameter real vm=5;
//[v] maxmial voltage
parameter real vc=1.5435;
//[v] coercive voltage
parameter real Area=1E-3;
//[cm^2]
parameter real A=96;
//[A/(cm^2*K^2)] Richardson constant of Si
parameter real T=300;
//[K] room temperature
parameter real phib=1;
//[v] potential barrier height
parameter real e=1;
//[e] electron charge
parameter real pi=3.14;
parameter real e0=8.854e-15;
//[F/um] vacuum permittivity
parameter real er=400;
//dielectric permittivity of PZT
parameter real w=3e-1;
//[um] depletion layer thichkness
parameter real k=8.61e-5;
//[eV/K] Boltzmann constant
parameter real R=1;
//[ohm]
parameter real L=1;
//[ph]
real ddv;
real q_cap;
//charge on capacitor
real id;
//current across a Schottky contact
real id0;
//reverse saruration current
analog begin
ddv=ddt(V(vp,vn));
if(ddv>=0)
q_cap=c/(2*a)*(atan((vm+vc)/a)-atan((vm-vc)/a))+c/a*atan((V(vl,vn)-vc)/a);//lower branch
else
q_cap=c/(2*a)*(atan((vm-vc)/a)-atan((vm+vc)/a))+c/a*atan((V(vl,vn)+vc)/a);//upper branch
id0=Area*A*T*T*exp(-e*(phib-sqrt(e*abs(V(vl,vn))/(4*pi*e0*er*w)))/(k*T));
id=id0*exp(e*V(vl,vn)/(k*T))*(1-exp(e*V(vl,vn)/(k*T)));
I(vp,vn)<+id+ddt(q_cap*1e-6);
V(vr,vl)<+ddt(L*1e-12*I(vp,vn));
V(vp,vr)<+R*I(vp,vn);
V(vp,vn)<+V(vp,vr)+V(vr,vl)+V(vl,vn);
end
endmodule
网表文件如下:
*file: fecap.sp fecap
setenv HSP_VACOMP_OPTIONS –G
setenv HSP_VACOMP_OPTIONS –B
.hdl fecap.va
vs p n 5
x1 p n fecap
.dc vs -5 5 1
.plot x1:q_cap
.end
在HSPICE里面仿真,直接说setenv设置环境就错了,后面又说q_cap未知,请问怎样改网表呢? |
|