I am using HSPICE for my simulations. I want to make sure HSPICE is measuring the minimum value of current and voltage correctly. What are those values? How can I set them?

  • \$\begingroup\$ If you don't trust a simulator, best not use it. Else, the generic SPICE variables that deal with tolerance, and are named in the form of *tol (reltol, abstol, etc), each dealing with specific tasks. But even that is not enough, because it also matters what quantities you are measuring. For example you shouldn't expect uA precision for MA quantities; you might be lucky, you might not. All these are generic SPICE limitations, I don't know how HSPICE deals with them, in particular -- though I'm fairly sure it, too, obeys such restrictions. \$\endgroup\$ – a concerned citizen Dec 2 '18 at 7:41
  • \$\begingroup\$ Look for RELTOL, and read the manual. By the way, none of the SPICES do "measurements'. All the values are computed, using many many steps of matrix-math convergence, and if any reactive components are used --- either lumped L or C, or in device models --- then complex math is also used to describe any phaseshifts, further muddying the computed-results origin \$\endgroup\$ – analogsystemsrf Dec 2 '18 at 10:04
  • \$\begingroup\$ SPICE uses floating-point arithmetic, so a more important issue is the dynamic range of values in your simulation. What are the maximum voltage/current in your simulation and what resolution of voltage/current do you need? \$\endgroup\$ – Elliot Alderson Dec 2 '18 at 14:05
  • \$\begingroup\$ @aconcernedcitizen, whether you can get uA precision on a MA current is exactly what the reltol parameter determines. If you set reltol below 1e-12, you should indeed get microamp precision on a megamp value. (assuming you don't hit the limits of the floating point precision, which may well be single-precision, first) \$\endgroup\$ – The Photon Dec 2 '18 at 16:52
  • \$\begingroup\$ @ThePhoton While I agree with what you said, I have to point out that the default value is 0.0025 (in LTspice at least, in some 0.007, others 0.001, etc), and it's like that for good reasons. Nobody says you can't change it and, but you'd better stock up on half or so of the world's coffee. :-) What I wanted to imply in my comment (and, apparently, failed) was that OP didn't say what is that minimum OP expects, so it's difficult to say, precisely, what to change. \$\endgroup\$ – a concerned citizen Dec 2 '18 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.