Hi Guys,
I wrote one voltage controlled voltage source with verilog-A, which is used in a transient analysis of one buck model. The spectre simulator could not get initial point for transient analysis. The VCVS code is shown below.
Code:`include "constants.vams"
`include "disciplines.vams"
module Epwm(in, out);
input in;
electrical in;
input out;
electrical out;
parameter real vm = 4.0 from (0:inf);
analog begin
@(initial_step) begin
V(out) <+ (V(in)>0.9) ? 0.9 : (V(in)<0.1) ? 0.1 : V(in)/vm;
end
V(out) <+ (V(in)>0.9) ? 0.9 : (V(in)<0.1) ? 0.1 : V(in)/vm;
end
endmodule
After I replaced it with a spectre VCVS, the buck model works. The spectre VCVS is shown below.
Code:E0 (d 0 vx 0) vcvs gain=0.25 min=0.1 max=0.9
What's wrong with my verilog-A code? How do I improve it?
Thanks in advance.
Yawei