There are three things that might lead to this kind of drift in a charge storage circuit.
- gmin
- capacitive-based models
- KCL tolerances
gmin is a very small valued conductor (large valued resistor) that shunts most semiconductor devices. Its main purpose is to prevent nodes from floating when surrounded by devices that have completely switched off. Floating nodes cause DC analysis to fail because there is no unique solution. It is usually possible to set
gmin=0 (
gmin is a simulator option) in order to eliminate this source of error, however this will often cause DC analysis to fail, especially with charge storage circuits. You can run a transient analysis if you use initial conditions to pin the voltage for each floating node. Spectre is unique in that it will generally warn you during the DC analysis if
gmin is noticeably affecting the accuracy of the results.
It was learned long ago that capacitive-based models cause charge conservation problems. At that time, there was a concerted effort to switch to charge-based models. All of the main semiconductor models (BSIM, etc.) are now charge based. However, it is still common for the less mainstream models to be formulated in terms of capacitance rather than charge. This is really problematic for charge-storage circuits. If you are using capacitive-based models, you will need to reformulate them in terms of charge (see article on varactors in
www.designers-guide.com/Modeling).
Finally, on every time step the simulator works to find the node voltage values that result in Kirchhoff Current Law being satisfied. Since computers have only finite precision, it cannot fully satisfy KCL. There is always a small amount of charge that is either being created or annihilated at each node on each time step. Most simulators do not explicitly control this error, and so it can sometimes be large. With these simulators, you can tighten tolerances (reltol, abstol) in the hope that the error will be reduced, but there is no guarantee. Spectre is one of the few, and perhaps the only, simulator that always explicitly monitors and controls the error in KCL, so tightening reltol and abstol are assured to reduce this error.
All of these issues are discussed in more depth in my book, which can be found at
www.designers-guide.com/books.html.