Ken Kundert
|
Here is the scoop 'zero diagonal' and 'singular matrix' messages.
A zero diagonal should not be fatal, though it could be a harbinger of trouble. When it occurs, the simulator will try to eliminate it by reordering the matrix. If the matrix is not singular, this should work and there are no worries. But if the matrix is singular, there is no hope, and the simulator should respond with 'matrix is singular'.
A singular matrix (some times referred to as a singular Jacobian, the Jacobian being the matrix) occurs because the circuit has either no solution or it has a non-isolated continuum of solutions. This idea is covered more in my "SPICE and Spectre" book. Generally it occurs because a node is floating, though it may also occur because of a loop of shorts or perhaps because you are using a model that is degenerate (something like V(out) <+ V(out)).
Spectre examines the circuits for floating nodes and loops of short circuits before it begins. If it finds a loop of shorts, it produces an error message and quits. If it finds a floating node, it adds gmin from that node to ground so that it is no longer floating. This eliminates most of the situations that cause singular matrices. However, Spectre takes a conservative approach to modifying the circuit to eliminate floating nodes. It will only do it if it is sure it is needed. If there is something that is nonlinear or time varying that ties the node to ground, Spectre cannot really tell if the node can float or not. In this case, it does not add gmin. If the something nonlinear is an ideal diode or the something time varying is an ideal switch, then the node can float if the diode is off or the switch is open. It will either float at the beginning of time, or it could suddenly float during the transient analysis.
When this occurs, Spectre reports a 'singular matrix'. To do so, it uses the error message: Matrix is singular (detected at xxx) or Matrix is singular (detected at xxx and yyy) The key to finding the problem is to look at the circuit near xxx and yyy. These are names of either nodes or branches. Unfortunately, Cadence puts things in these names that obscures their identity. You just have to ignore the components of the names that are clearly artificial. Once you find the node or branch in your circuit, look around in that neighborhood for: 1. things that could cause a node to suddenly begin to float 2. things that could create a loop of shorts 3. a change in a model that could result in it becoming degenerate
If you have a large number of singular matrices, it may indicate that there is something wrong with your modeling methodology. If this problem continues, it might make sense for you to engage my service as a consultant to come in and look at the problematic models and suggest ways of avoiding the problems.
-Ken
|