I'm currently looking into building my own spice models from datasheet specs to ensure accuracy. Are there any references for this sort of thing? I've looked around online and haven't found anything great.

I'm wanting to build things up to the complexity of an op amp.

Thanks in advanced.

  • \$\begingroup\$ OpAmps use macromodels (see analog.com/media/en/technical-documentation/application-notes/…) rather than all circuit primitives. \$\endgroup\$ Commented Oct 4, 2019 at 15:38
  • \$\begingroup\$ Check: ltwiki.org/index.php?title=Main_Page and the Yahoo Group referred on it \$\endgroup\$
    – Huisman
    Commented Oct 4, 2019 at 15:39
  • \$\begingroup\$ @PeterSmith, that really depends on the vendor and how they choose to do the model. Some do provide transistor-level models. Probably mostly for very old designs, but it is not universal to provide macromodels only. \$\endgroup\$
    – The Photon
    Commented Oct 4, 2019 at 17:30
  • 1
    \$\begingroup\$ Is there any more in-depth information on op amp macromodels you guys can direct me to? The Boyle model looks promising but the original paper on it is locked behind ieee's paywall and I can't find any other source on it. \$\endgroup\$
    – Jaywalk
    Commented Oct 4, 2019 at 19:50
  • \$\begingroup\$ If you have the circuit, is it really that hard to get it into code? \$\endgroup\$
    – Voltage Spike
    Commented Oct 7, 2019 at 15:40

2 Answers 2


This is a tough field to get into. The learning curve is extremely steep, so be warned. Another thing I should mention upfront is that you can't build very good intrinsic device models (diode, BJT, FET, etc.) from the datasheet alone. Very few parameters will line up one-to-one, and the charts they usually publish aren't under the conditions you need to extract the underlying model parameters. You'll likely need to get measurement equipment and several part samples to acquire good data.

I started with the book recommended by the author of LTspice, which is Semiconductor Device Modeling with SPICE (2nd ed.) by Massobrio & Antognetti. At first, I felt completely overwhelmed by this book, but if you can just focus a bunch of time on Chapter 1 (diodes), then you'll find the later chapters are just building off that initial chapter. Maybe reread that chapter a couple times. The later chapters will cover actual parameter extraction techniques, but it's important to know what the parameters are doing first.

Several years later, I stumbled upon this next one which I think was very useful in its own right. It is called SPICE: Practical Device Modeling (1st ed.) by Kielkowski. However, it is a little outdated since it is focuses on SPICE2 while the most popular SPICE packages nowadays (except PSpice) are built off of SPICE3. You actually need to be aware of these little quirks if your intent is to make good models with wide compatibility. Think of PSPICE and SPICE3 to be two separate main branches off of SPICE2, while packages like LTspice and ngspice are little twigs hanging off of SPICE3.

Other than those...the built-in LTspice help is great, and the ngspice user manual is useful too. I've had to look at the PSpice Reference Guide a couple times as well, but make sure you save that PDF because I don't know how long that link will last. There aren't really any online resources I found particularly useful until you get to opamp macromodels, although for many opamps I prefer to use LTspice's built-in UniversalOpamp2 and adjust its parameters to fit the opamp I would like to model. For info on that, see the example schematic found at Documents\LTspiceXVII\examples\Educational\UniversalOpamp2.asc (assuming a Windows PC installation). Anyway, here are some honorable mentions for other macromodels:



A Large LTspice Folder from Bordodynov may be helpful if you are looking for examples

03/23/2009  01:47 PM      180 opamp.sub
03/26/2012  11:05 AM  247,204 Opamp5.Lib
10/10/2012  08:09 AM  915,420 OpAmp_AD.lib
10/10/2012  08:50 AM  261,450 OpAmp_BB.lib
10/10/2012  08:57 AM   32,765 OpAmp_Intersil.lib
10/10/2012  10:32 AM  388,876 OpAmp_NSC.lib
10/10/2012  10:26 AM   76,643 OpAmp_NSC_CLC.lib
10/10/2012  09:08 AM   33,797 OpAmp_TI.lib
02/21/2012  03:14 PM    8,837 OptoAcop.lib
04/13/2008  09:21 AM    3,537 UniversalOpamps.sub
10/17/2011  08:24 AM    3,528 UniversalOpamps2.sub

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.