Geoffrey_Coram wrote on May 31st, 2006, 9:47am:According to the Verilog-AMS LRM (version 2.2), in Table 4-23, Section 4.4.15, the zeros and poles arguments to laplace_nd are supposed to be constant expressions. Thus, I am surprised that the simulator let you even compile the model.
The LRM is a little sloppy in 4.4.12.4 about a "vector of M real numbers"; I believe it is intended to be a concatenation like the example in 4.4.12.5:
V(out) <+ laplace_nd(V(in), {0,1}, {-1,0,1});
Mr. Coram,
Here is the exact bit of code that compiled in verilog-AMS
The coefficents are'nt in an array.
analog begin
//numerator coefficients
n0 = V(in)*(R/(R+R_L));
n1 = V(in)*(R/(R+R_L))*(R_C*C);
n0_2 = V(in)/R;
n1_2 = V(in)*C;
//denominator coefficients
d1 = (C * (R_C + ((R*R_L)/(R+R_L)))) + (L/(R+R_L));
d2 = L*C*((R+R_C)/(R+R_L));
d1_2 = (L/R) + (C*R_C);
d2_2 = L*C;
if (analysis("static")) begin
V(out) <+ V(in)*V(d);
end
V(out) <+ laplace_nd(V(d), {n0, n1}, {1, d1, d2});
I(outsense) <+ -1*laplace_nd(V(d), {n0_2, n1_2}, {1, d1_2, d2_2});
end