I've tried posting this question in a different forum, and the furthest I could get was that the code works for everybody else. I'm trying to design a switch which turns on when the analysis is type "static" and off otherwise. The code is shown below.
`include "constants.vams"`include "disciplines.vams"module analysis_switch(vp,vn);inout vp, vn;electrical vp, vn;analog begin if( analysis("static")) V(vp, vn) <+ 0.0; else I(vp,vn) <+ 0.0;end // analogendmodule
In simulation, the switch is off no matter what analysis I run. I have tried changing line 7 to if(analysis("dc")) and the code works fine. However, I want the switch to work for the operating point of ac, sp etc. Seems to me that there is a setup problem. Does anybody know how I can fix this?