This is the verilog AMS code, i have declared all the parameters but i am not showing them here now. module Model1(T1,T2,x,Ttrans,PI); inout T1, T2,x,Ttrans,PI; electrical T1, T2,x,Ttrans,PI; real PolaP; real PolaAP; real surface; real gp; real gap; real Em; real TMRR; real TMRRT; real Rap; real Rp; real Vb; //V(T1,T2) real Vc; //V(T2,T1) real Id; //Current of MTJ //critial current for the two states of STT-MTJ real IcAP; //Critial current for AP state real IcP; //Critial current for P state integer Teta; real ix; real tau; real p; real FA; real duration; analog begin if (SHAPE==1) begin surface=a*b; //SQUARE end else if (SHAPE==2) begin surface=`M_PI*a*b/4.0; //ELLIPSE end else begin surface=`M_PI*r*r; //ROUND end Vc=V(T2,T1); Vb=V(T1,T2); //initial conditions @(initial_step) begin FA=3322.53/RA; Ro=(tox*1.0e10/(FA*`sqrt(PhiBas)*surface*1.0e12))*exp(1.025*tox*1.0e10*`sqrt(PhiBas)); Em=Ms*tsl*surface*Hk/2; ix=PAP; I(x) =IcP*Rp) begin duration=(`C+ln(`M_PI*`M_PI*(Em/(`Kb*T*40*`M_PI))/4))*`e*1000*Ms*surface*tsl*(1+P*P)/(4*`M_PI*2*`ub*P*10000*abs(Id-IcP) if((duration =(IcAP*Rap)) begin duration=(`C+ln(`M_PI*`M_PI*(Em/(`Kb*T*40*`M_PI))/4))*`e*1000*Ms*surface*tsl*(1+P*P)/(4*`M_PI*2*`ub*P*10000*abs(-Id-IcAP)); if((duration schematic testbench->config view for the testbench. In the above code, if i want to plot the graph between TMRR and Vb from the expression, TMRR=TMR/(1+Vb*Vb/(Vh*Vh)), then what is the procedure.. Thanking you.
↧