Hey, I have a quick question and I appreciate if somebody can guide me in the right direction.
What is the clean way of having a variable in laplace_nd function. For instance, here I m modeling a baseband filter and I have to model this for different bandwidths. My filter has four stages that have been defined by their transfer functions. For simplicity I m including just the first stage which is a simple single pole.
vout = laplace_nd(gain_in_db * V(input), [2 * pi * nominal_freq * SCALE], [2 * pi * nominal_freq * SCALE, 1.0]);
This is the laplace filter definition for the first stage TIA. Normally, if there was only one bandwidth I was modeling, the SCALE variable wont be there (default = 1). The scale variable is defined as
case(MODE)
freq1: SCALE = x;
freq2: SCALE = y;
etc etc
endcase
The problem is that when I have this declaration, spectre gives an error saying that args #2 and #3 must be an array variable or a const array expression.
I was expecting spectre not to complain because the statement seemed logical. Obviously, there must have been some decisions made that wont allow me to declare variables in laplace_nd. My question is, if I want to have a variable in the laplace filter like I listed above, how can I cleanly do it?
Thanks,
Saran