You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
124 lines
3.3 KiB
124 lines
3.3 KiB
7 months ago
|
//VerilogA for laser,dfb,veriloga
|
||
|
|
||
|
`include "constants.vams"
|
||
|
`include "disciplines.vams"
|
||
|
|
||
|
module dfb(Vin,Vlam,Gnd,OpowL,OpowR,OphaseL,OphaseR,OlamL,OlamR);
|
||
|
parameter real L = 300u from [0:inf);
|
||
|
parameter real W = 1.5u from [0:inf);
|
||
|
parameter real D = 0.2u from [0:inf);
|
||
|
parameter real GAM = 0.3 from [0:1);
|
||
|
parameter real T = 10n from [0:inf);
|
||
|
parameter real BEATsp = 5e-5 from [0:inf);
|
||
|
parameter integer ID = 0 from [0:1];
|
||
|
parameter real G0 = 25000 from [0:inf);
|
||
|
parameter real Ntr = 1e24 from [0:inf);
|
||
|
parameter real EPS = 6e-23 from [0:inf);
|
||
|
parameter real B = 1e-16 from [0:inf);
|
||
|
parameter real A = 7.5E-41 from [0:inf);
|
||
|
parameter real Rl = 1e-8 from [0:1);
|
||
|
parameter real Rr = 1E-8 from [0:1);
|
||
|
parameter real ALFA0 = 5000 from [0:inf);
|
||
|
parameter real Q1 = 1.9998 from [0:inf);
|
||
|
parameter real Q2 = 1.4391E-4 from [0:inf);
|
||
|
parameter real Rat = 1 from [0:inf);
|
||
|
parameter real Ng = 3.6 from [0:inf);
|
||
|
parameter real N0 = 6.5e13 from [0:inf);
|
||
|
parameter real Vbi = 1.13 from [0:inf);
|
||
|
parameter real EIT = 2 from [0:inf);
|
||
|
parameter real Rs = 1E-5 from [0:inf);
|
||
|
parameter real Cp = 0p from [0:inf);
|
||
|
parameter real Rd = 1E15 from [0:inf);
|
||
|
parameter real Csc0 = 0p from [0:inf);
|
||
|
|
||
|
|
||
|
input Vin,Vlam;
|
||
|
inout Gnd;
|
||
|
output OpowL,OpowR,OphaseL,OphaseR,OlamL,OlamR;
|
||
|
electrical Vin,Vlam,Gnd,OpowL,OpowR,OphaseL,OphaseR,OlamL,OlamR;
|
||
|
electrical Nin1,Ns,Nph;
|
||
|
|
||
|
real VT=`P_K*$temperature/`P_Q;
|
||
|
real Vact;
|
||
|
real Cg;
|
||
|
real CPL,CPR,Tph,QV,Cph,Rph;
|
||
|
real Cd,Csc;
|
||
|
real N,G;
|
||
|
|
||
|
real UL,UW,UD;
|
||
|
real UN0,UG0,UNtr,UEPS;
|
||
|
real UA,UB,UALFA0,ULAMBDA,ULSPEED,UQ2;
|
||
|
|
||
|
branch (Nin1,Gnd) R2,C1,C2,C3,B1,B2,B3,B4;
|
||
|
branch (Gnd,Ns) B5,B6,R3,C4;
|
||
|
branch (Gnd,Nph) B7,C5;
|
||
|
|
||
|
analog begin
|
||
|
|
||
|
UL=L*1e6;
|
||
|
UW=W*1e6;
|
||
|
UD=D*1e6;
|
||
|
UG0=G0*1e-6;
|
||
|
UN0=N0*1e-18;
|
||
|
UNtr=Ntr*1e-18;
|
||
|
UEPS=EPS*1e18;
|
||
|
UA=A*1e36;
|
||
|
UB=B*1e18;
|
||
|
UALFA0=ALFA0*1e-6;
|
||
|
ULAMBDA=V(Vlam)*1e6;
|
||
|
ULSPEED=`P_C*1e6;
|
||
|
UQ2=Q2*1e6;
|
||
|
|
||
|
Vact=UL*UW*UD;
|
||
|
Cg=ULSPEED/Ng;
|
||
|
CPL=`P_H*Cg*Vact*Rat*ULSPEED*(1-Rl)/ULAMBDA/UQ2;
|
||
|
CPR=`P_H*Cg*Vact*Rat*ULSPEED*(1-Rr)/ULAMBDA/UQ2;
|
||
|
Tph=Ng/(ULSPEED*(UALFA0+Q1/UQ2));
|
||
|
QV=`P_Q*Vact;
|
||
|
Cph=QV;
|
||
|
Rph=Tph/QV;
|
||
|
|
||
|
N=UN0*(exp(V(Nin1,Gnd)/EIT/VT)-1.0);
|
||
|
|
||
|
if (N<UNtr)
|
||
|
G=0;
|
||
|
else begin
|
||
|
if (ID<1)
|
||
|
G=UG0*(N/UNtr-1.0)/(1.0+UEPS*abs(V(Ns,Gnd)));
|
||
|
else
|
||
|
G=UG0*ln(N/UNtr)/(1.0+UEPS*abs(V(Ns,Gnd)));
|
||
|
end
|
||
|
|
||
|
Cd=QV*UN0*exp(V(Nin1,Gnd)/EIT/VT)/(EIT*VT);
|
||
|
if (V(Nin1,Gnd)<Vbi)
|
||
|
Csc=Csc0/sqrt(1.0-V(Nin1,Gnd)/Vbi);
|
||
|
else
|
||
|
Csc=Csc0/sqrt(0.1);
|
||
|
|
||
|
V(Vin,Nin1) <+ I(Vin,Nin1)*Rs;
|
||
|
V(R2) <+ I(R2)*Rd;
|
||
|
I(C1) <+ Cp*ddt(V(C1));
|
||
|
I(C2) <+ Cd*ddt(V(C2));
|
||
|
I(C3) <+ Csc*ddt(V(C3));
|
||
|
I(B1) <+ QV*N/T;
|
||
|
I(B2) <+ QV*UA*pow(N,3);
|
||
|
I(B3) <+ QV*UB*pow(N,2);
|
||
|
I(B4) <+ QV*Cg*GAM*G*abs(V(Gnd,Ns));
|
||
|
|
||
|
I(B5) <+ BEATsp*QV*UB*pow(N,2);
|
||
|
I(B6) <+ QV*Cg*GAM*G*abs(V(Gnd,Ns));
|
||
|
I(C4) <+ Cph*ddt(V(C4));
|
||
|
V(R3) <+ I(R3)*Rph;
|
||
|
|
||
|
//I(B7) <+ te_ph1*ALPHA/2;
|
||
|
//I(C5) <+ ddt(V(C5));
|
||
|
|
||
|
V(OpowL) <+ CPL*V(Ns,Gnd);
|
||
|
V(OpowR) <+ CPR*V(Ns,Gnd);
|
||
|
V(OphaseL) <+ 0;
|
||
|
V(OphaseR) <+ 0;
|
||
|
V(OlamL) <+ V(Vlam);
|
||
|
V(OlamR) <+ V(Vlam);
|
||
|
end
|
||
|
|
||
|
endmodule
|