Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Verilog-a code for differential amplifier

Chinmaye

Advanced Member level 4
Joined
Jan 18, 2016
Messages
119
Helped
0
Reputation
0
Reaction score
1
Trophy points
18
Activity points
944
Hello all,
Here is a simple verilog-a code for an amplifier with differential input and differential output. This works fine with resistors but if i try to use it with switched capacitor circuit, it gives an error

ERROR (SPECTRE-16384): Signal I(I31.V1:p) = 1.07846 GA exceeds the blowup limit for the quantity `I' which is (1 GA). It is likely that the circuit is unstable.

Please let me know what modifications needs to be done to correct it.

Code:
module simple_opamp_t(sigin_p, sigin_n, sigout_n, sigout_p);
input sigin_p, sigin_n;
output sigout_p, sigout_n;
electrical sigin_p, sigin_n, sigout_p, sigout_n;
parameter real gain = 1000000;
parameter real sigin_offset = 0;

   analog begin
      V(sigout_n) <+ (V(sigin_n) - sigin_offset) * gain;
	  V(sigout_p) <+ (V(sigin_p) - sigin_offset) * gain;
end
endmodule
 

pancho_hideboo

Advanced Member level 5
Joined
Oct 21, 2006
Messages
2,856
Helped
765
Reputation
1,530
Reaction score
716
Trophy points
1,393
Location
Real Homeless
Activity points
17,450
What switch do you use in switched capacitor circuit ?
Is it MOSFET or behavioral ideal switch ?
 

pancho_hideboo

Advanced Member level 5
Joined
Oct 21, 2006
Messages
2,856
Helped
765
Reputation
1,530
Reaction score
716
Trophy points
1,393
Location
Real Homeless
Activity points
17,450
Your code is not differential amplifier.

Code:
analog begin
  vdiff = V(sigin_p) - V(sigin_n);
  V(sigout_p) <+ vdiff * gain / 2 + vcom
  V(sigout_n) <+ -vdiff * gain /2 + vcom
end
endmodule
 

Chinmaye

Advanced Member level 4
Joined
Jan 18, 2016
Messages
119
Helped
0
Reputation
0
Reaction score
1
Trophy points
18
Activity points
944
Thank you. Shall try this.
 

Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top