Hi all,
this was my first try on creating a verilog-a model. I wanted to create a switch which is on for dc operating point type analyses such as dc, pss and the dc operating points of ac, sp, noise etc.
The code I used is based on the code given by pancho_hideboo in a previous post. Anyway this is the code i used.
Quote:`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 // analog
endmodule
Unfortunately, the simulator doesn't seem to recognize the analysis type "static" as the switch is not closed when I use dc analysis. I wanted to double check so after a bit of experimenting i found that I could simply type in the CIW,
simulator('spectre)
analysis("static")
and it came up with the following message
Quote:Invalid analysis type: static. Valid choices are tran(ac dc
noise xf sp spss pss pdisto spac spnoise spxf pac pnoise
pxf). Use ocnHelp('analysis) for more information.
So on inspection we can see that the analysis type "static" is not on the list. However, when i typed in analysis("ac") it gave me the exact same warming even though analysis type "ac" is on the list.
I'm totally lost here. Does anybody know how I can fix this. I need to either create the switch in another way, or fix the setup issue which seems to exist.
thanks,
Aaron