I have VGA (Variable Gain Amp.) which I would like to automatically tune to get specific gain across all corners and conditions.
The gain control voltage vctrl should be set during the operating point analysis ("static" analysis) and later on it should not change during transient simulation.
Yet, the following pice of code does not work, as during O.P. and transient 0s time vctrl value is fine, but right after 0s time it drops to 0s (treats vctrl as a relay)
Code: if (analysis("static"))
V(vctrl) : V(vga_outp,vga_outn) ==EXPECTED_GAIN*(V(vga_inp,vga_inn));
How can I get the behavior I need, i.e. have vctrl computed during O.P. and keeping this value throughout transient simulation ?
Ari