+ Post New Thread
Results 1 to 5 of 5
  1. #1
    Member level 5
    Points: 1,077, Level: 7

    Join Date
    Jan 2016
    Posts
    82
    Helped
    0 / 0
    Points
    1,077
    Level
    7

    Verilog-a code for differential amplifier

    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

    •   AltAdvertisement

        
       

  2. #2
    Advanced Member level 5
    Points: 17,003, Level: 31
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,613
    Helped
    701 / 701
    Points
    17,003
    Level
    31

    Re: Verilog-a code for differential amplifier

    What switch do you use in switched capacitor circuit ?
    Is it MOSFET or behavioral ideal switch ?



    •   AltAdvertisement

        
       

  3. #3
    Member level 5
    Points: 1,077, Level: 7

    Join Date
    Jan 2016
    Posts
    82
    Helped
    0 / 0
    Points
    1,077
    Level
    7

    Re: Verilog-a code for differential amplifier

    CMOS switch



    •   AltAdvertisement

        
       

  4. #4
    Advanced Member level 5
    Points: 17,003, Level: 31
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    2,613
    Helped
    701 / 701
    Points
    17,003
    Level
    31

    Re: Verilog-a code for differential amplifier

    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



  5. #5
    Member level 5
    Points: 1,077, Level: 7

    Join Date
    Jan 2016
    Posts
    82
    Helped
    0 / 0
    Points
    1,077
    Level
    7

    Re: Verilog-a code for differential amplifier

    Thank you. Shall try this.



--[[ ]]--