sonis
New Member
Offline
Posts: 7
Cork, Ireland
|
I would like to build a behavoiral model of an rectifier in Verilog AMS. It consist of two diodes in which the anodes and cathodesare connected with each another. I built a model, simulated with simvision and failed to finished simulation,The system shows there is an illegal value when the value of cross function is 0.7. I tried different ways to rebuild it but still can't find solution yet. I appreciate any help from you. Thanks in advance.
here is my scripts.
`inlucde "desciplines.vams"
module diode (a,c);
inout a,c; electrical a,c;
analog begin @(cross((V(a,c)+I(a,c)),0.7)) ; if ((V(a,c)+I(a,c))>0.7) I(a,c) <+ 0.7; else begin if ((V(a,c)+I(a,c))> -0.7) V(a,c) <+ 0; else I(a,c) <+ -0.7; end end endmodule
|