Hi,
I need a verilog-A model of opamp where only the dominant pole has to be considered, and slew-rate has to be considered. I have written a verilog-A model considering non-zero o/p resistance, finite dc open-loop gain and finite unity-gain-frequency, but I am getting the idea how I can incorporate the slew-rate effect. Please help me.
following is the code I have written so far (and it is working as intended):
// VerilogA for customLib, modelopamp, veriloga
// This is a single-poll roll-off model of op-amp.
// rin: opamp input resistance
// rout: opamp output resistance
// ugf: opamp transit frequency 'ft'/unity gain frequency/gain-bandwidth product
// gain: open-loop dc gain of the op-amp
`include "constants.vams"
`include "disciplines.vams"
module modelopamp(vin_p,vin_n,vout);
parameter real gain=10000;
parameter real ugf=10G;
parameter real rin=100M;
parameter real rout=500;
//parameter real bw=20K;
input vin_p,vin_n;
output vout;
electrical vin_n,vin_p,vout;
analog begin
I(vin_p,vin_n) <+ V(vin_p,vin_n)/rin;
V(vout) <+ rout*I(vout) + laplace_nd(gain*V(vin_p,vin_n),{1.0},{1.0,gain/(2*3.141592653*ugf)});
end
endmodule[/i]
PLEASE GIVE ME SOME IDEA...
Cheers
Sam