howard@cpocd2.UUCP (04/10/87)
In article <8704090953.a008691@Huey.UDEL.EDU> Foster@UDEL.EDU writes: > I have been attempting to run some simulations of some dynamic > CMOS circuits using SPICE2G6 and encountered some problems with > the numerical integration time step. The circuits are very simple > > The error I get in the output file is "INTERNAL TIME STEP TO SMALL". (1) SPICE doesn't always converge. It's a bug. Some people say in the models, something about a discontinuous second derivative or something. (2) UC Berkeley ain't gonna fix it. They're busy working on fancier things, like waveform relaxation. They are no longer in the SPICE support business. They tried, really they did, but it just got too painful. (3) There are several commercial companies (Meta-software with HSPICE, Shiva with Power-SPICE, ...) who would be happy to charge you around $50K for a slightly enhanced version of SPICE which they claim will always converge. Your choices are A. live with it, or B. fork out the money and pray, or C. get the source to SPICE (easy) and fix it yourself (ha, ha), or D. switch to a different simulator. Isn't life wonderful? -- Copyright (c) 1987 by Howard A. Landman. You may copy this material for any non-commercial purpose as long as this notice is retained. You may also transmit this material to others and charge for such transmission, as long as you place no additional restrictions on retransmission of the material by the recipients.
"Nahid_Ansari.ElSegundo"@XEROX.COM.UUCP (04/10/87)
Russ, The problem you are having ("Internal Time Step Too SmaLL") is unfortunately a very common one. As the name implies, it has to do with setting time steps when solving current equations. The thing to do, which works about 95% of the time, is to set the option ABSTOL to 1 microamp (.Options abstol=1u). Abstol is the absolute current error tolerance with the default value of 1 picoamp which is a very small value. By setting it to 1microamp, you will sacrifice some accuracy, but you will get the program running. Also, you mentioned that you initialized the internal nodes. I don't know if you used UIC on your Tran card or not; if you have, make sure you have specified *all* the nodes on your .IC card, otherwise you'll get the above error again. Good Luck. Nahid
Marshall.wbst@XEROX.COM.UUCP (04/10/87)
Spice does not choose pivots when it is solving the circuit equations but rather blithely assumes that the prechosen pivots will be good. That is why all of spice is assembled with implicit double precision. This can cause it to choose a set of very bad pivots because the resistance of a MOSFET can vary several orders of magnitude. The error "INTERNAL TIME STEP TO SMALL" means that the integration step was reduced to 10^-20 and the integration procedure still did not converge and probably won't no matter how small a step it tries to take. This error has nothing to do with the integration but is a symptom of problems with solving the circuit equations. The solution is to try to make the circuit better behaved by: 1) Changing the circuit in any way so that the order of rows in the circuit matrix is different. This can be done by changing the order in which circuit elements and nodes are defined or by adding elements for other purposes. 2) Adding a low conductance (high resistance) or low capacitance between nodes of a FET that can change in resistance by a wide margin such as the source and drain. If spice ever pivots on the source-drain resistance then the small additional conductance will change a zero pivot to a finite pivot and you may get answers that are accurate enough. Hope some of the above helps. --Sidney Marshall
klein@gravity.UUCP (04/13/87)
In article <571@cpocd2.UUCP> howard@cpocd2.UUCP (Howard A. Landman) writes: >(3) There are several commercial companies (Meta-software with HSPICE, Shiva > with Power-SPICE, ...) who would be happy to charge you around $50K for > a slightly enhanced version of SPICE which they claim will always converge. Both these products do converge much better than vanilla SPICE 2G6 and neither claims their product will "always converge." My estimate is that they will converge at least 5-10 times better for MOS circuits -- meaning that no more than one-fifth to one-tenth as many circuits won't converge. PowerSPICE has a very good convergence ability without much parameter tweaking. The best strategy for a potential buyer is to submit very difficult benchmark circuits to these companies. Good benchmarks are circuits that reflect what you are designing and that SPICE can't converge on, or gets obviously wrong answers for. See how these two products fare in terms of accuracy and speed. If you have chosen your benchmarks well, you shouldn't have to "pray" much. By the way, PowerSPICE is not a "slightly enhanced version of SPICE" -- it is written in C completely from scratch with entirely different, more reliable algorithms and improved models than SPICE 2G6. It is much faster than SPICE 2G6 on virtually all MOS circuits; but then MetaSoftware works with you to develop custom models for the fab process you will be using for your device. Convergence problems come from a host of sources, most commonly discontinuities in the device models and poorly chosen parameters for the integration algorithms. There are tradeoffs here --- device models that are guaranteed to be sufficiently continuous are almost always much too expensive to evaluate, or have other problems such as floating point over/underflow in regions where they aren't intended to be valid. Another major tradeoff is that you'd like to take big aggressive time steps in your integration algorithm to cut down execution time, but this opens up the possibility of converging to incorrect values. In general, good convergence in a circuit simulator requires: 1. Bug-free algorithm code (incl. matrix solution package) 2. Thoroughly tested and characterized device models 3. A sound understanding and characterization of the algorithms and the tradeoffs made to gain execution speed You can see why vanilla SPICE 2G6 isn't too great at convergence -- there never really were many people on the project (typical of research!) and there is no reason for the UC Berkeley research group to find the last little problems. It's much more worthwhile for them to go on to new ideas. Caveat: I worked on the development of PowerSPICE at Shiva (now known as SimuCAD), and am now a user of HSPICE because of its custom models. I am attempting to provide as unbiased a view as possible. In any case, I defer any further inquiries to the sales/support staff of both MetaSoftware and SimuCAD. -- Mike Klein klein@sun.{arpa,com} Sun Microsystems, Inc. {ucbvax,hplabs,ihnp4,seismo}!sun!klein Mountain View, CA