Path: EDN Asia >> Design Centre >> IC/Board/Systems Design >> Simple way to develop Spice macro models (Part 2)
IC/Board/Systems Design Share print

Simple way to develop Spice macro models (Part 2)

26 May 2015  | Soufiane Bendaoud

Share this page with your friends

In Part 1 of this three-part article, I provided the necessary equations to develop your own macro model for a bipolar-input operational amplifier (op amp).

In part 2, we will look at a different topology: a CMOS (rail-to-rail) input and output. The parameters you need to develop your macro model are the same as in part 1, as well as the three-stage topology: input, middle and rail-to-rail swing stages. Since we covered the CMOS output stage in part 1, we will focus on the input stage.

The highlighted equations are to be inserted into the netlist. Equations in blue are for your own observation purposes. The ones in red may be required in the model parameters at the end of the netlist.

Rail-to-rail input stage
Unlike the non-rail-to-rail input stage, you will need two differential pairs of MOSFETs. Just like in the bipolar input stage, you have the option to add degeneration drain resistors (RS) at the expense of the gain in the first stage.

We can assume that the design goes 0.3V beyond the positive rail and –0.3V in the other direction. Now the Vcm high is 5.3 from a 5-V single supply, and the Vcm low is 0.3V below ground.

Next, compute the total noise contribution (referred to input [RTI]) from the input differential pairs and RDs (and emitter degeneration or REs, if applicable).

The total RTI noise is expressed as:

entotal=sqrt(enRDN2+enNMOS2+enRDP2+ enPMOS2)




and k is Boltzmann's constant, and T is the temperature in Kelvin.





Just as in the bipolar input design, set the input stage gain as:


Next, address the device parameters needed in the netlist for the NMOS pair and PMOS pair. Set Lambda=0.01, Kp=1E-5 in A/V2 and I2=1e-3A. Do exactly the same for the PMOS pair, and call the tail current I1 instead of I2.

You can always change the value of these parameters. For example, if you're trying to get a lower tail current, try setting I2 to 100µA, if you are willing to accept a higher noise contribution from RDs.

Now that the current is set, you can compute:

RD3,4=VRD*2/I2 and RD1,2=VRD*2/I1



Set C2=C1 for the NMOS and PMOS pairs, respectively, and write:

C2=1/(2* RD3,4*p1)

where p1=GBP/tan(90-ɸm-2) is in radians.

The transconductances gm1 and gm2 for the PMOS and NMOS are expressed as:

Sqrt(I2*kp*W/ L3,4) and Sqrt(I1*kp*W/ L1,2)

In order to set the proper common-mode input-voltage range, set up:

V2=VCMlow+0.7-sqrt(I2/kp*W/L3,4)-VT2 and VT2=VCMhigh+0.5*I2*RD3,4-Vs

where Vs is the supply voltage.

Because we have two differential pairs (NMOS and PMOS), you also need to set up:

V1=Vs-VCMhigh+0.7-sqrt(I1/kp*W/L1,2)+VT1 and VT1=VCMlow-0.5*I2*RD1,2

1 • 2 Next Page Last Page

Want to more of this to be delivered to you for FREE?

Subscribe to EDN Asia alerts and receive the latest design ideas and product news in your inbox.

Got to make sure you're not a robot. Please enter the code displayed on the right.

Time to activate your subscription - it's easy!

We have sent an activate request to your registerd e-email. Simply click on the link to activate your subscription.

We're doing this to protect your privacy and ensure you successfully receive your e-mail alerts.

Add New Comment
Visitor (To avoid code verification, simply login or register with us. It is fast and free!)
*Verify code:
Tech Impact

Regional Roundup
Control this smart glass with the blink of an eye
K-Glass 2 detects users' eye movements to point the cursor to recognise computer icons or objects in the Internet, and uses winks for commands. The researchers call this interface the "i-Mouse."

GlobalFoundries extends grants to Singapore students
ARM, Tencent Games team up to improve mobile gaming

News | Products | Design Features | Regional Roundup | Tech Impact