varactor veriloga
Hi,
I tried to build a veriloga model for varactor and the code is listed below.
I used a math equation to fit the CV curve from the foundry (from -1.8V to 1.8V).
But when I did the ac simulation to double check the value in the equation, I got two different CV curve.
Could someone help me?
Thanks!
=====================
module CVAR_SMIC( S, G, T);
inout S,G,T;
electrical S,G,T;
real c, v, q;
parameter real A1 = 259.33f;
parameter real A2 = 730.28f;
parameter real x0 = -0.09478;
parameter real dx = 0.19275;
analog begin
v = V(G,S);
c = A2 + (A1-A2)/(1 + exp((v-x0)/dx));
q = c * v;
I(G,S) <+ ddt(q);
V(T) <+ c;
end
endmodule
=====================
V