The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Aug 15th, 2024, 4:34pm
Pages: 1
Send Topic Print
Singular matrices in Spectre (Read 331 times)
Lieutenant Columbo
Junior Member
**
Offline

Just one more thing
...

Posts: 19

Singular matrices in Spectre
Feb 08th, 2012, 1:11pm
 
I tend to get the 'Zero Diagonal' or 'Singular Matrix' messages from Spectre on a regular basis and resort to dummying out different parts of the design until I find the problem, which is really tedious and sort of backwards.  Is there any better method to find the root of the problem?
Back to top
 
 
View Profile WWW   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: Singular matrices in Spectre
Reply #1 - Feb 8th, 2012, 1:19pm
 
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
Back to top
 
« Last Edit: Feb 11th, 2012, 12:09am by Forum Administrator »  
View Profile WWW   IP Logged
fabian
Junior Member
**
Offline



Posts: 19
Europe
Re: Singular matrices in Spectre
Reply #2 - Feb 10th, 2012, 1:40am
 
Hi Ken,

Thanks for this description and I hope it is fine I rebond on this post as I am having a similar message saying "Zero diagonal found in Jacobian at XXX and XXX". These are the same point I0:I0:ibp_ibp_probe.

The complete veriloga simulation of all components works without message but as soon as I replaced one block in the simulation by transistor level, I got this message of "zero diagonal ...". It does stopped the simulation but it slow down it to a point that's it is not making sense.

My question based on your experience is what could cause such a different between a complete veriloga simulation which has no floating point issue and a mixed signal simulation which has Zero diagonal issue. I was more thinking that complete verioga will be the most critical to obtain working without zero diagonal errors.

Thanks in advance for your feedback,
Fabian
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: Singular matrices in Spectre
Reply #3 - Feb 10th, 2012, 6:34am
 
Can you post the VA code for the module I0:I0, or at least any access functions that refer to the "ibp" terminal?
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
fabian
Junior Member
**
Offline



Posts: 19
Europe
Re: Singular matrices in Spectre
Reply #4 - Feb 10th, 2012, 6:53am
 
Hi Geoffrey,

If I wait enough I am getting an error message.
The error message I got now for this point is

Top 10 Solution too large Convergence failure:
   V(I0.Icomp_top.ibp100n<0>) = 277.801 mV, previously 277.801 mV.
       update too large:  | -4.62037 V | > 55.5607 uV + 1 uV

One side I have a diode such as:
I(a,c)<+1e-12*(limexp(V(a,c)/$vt)-1.0)+V(a,c)*$simparam(“gmin”,1e-12);

On the other side, I have got the current source:
I(vdd, ibp) <+ tanh(V(vdd, ibp)) * ((tanh(V(vdd, ibp)-0.2) + 1)/2)
                       * param_ibias * transition(p_bias, 0, 1n)
                 + ($temperature - 300.15) * param_tc;

The potential vdd is provided either through a model veriloga i.e. V source and no pb or through a transistor level and this is not converging. So I am doing something wrong on the code.

Any advice and what is wrong let me know.
Fabian
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Singular matrices in Spectre
Reply #5 - Feb 10th, 2012, 7:50am
 
Fabian,
what are the values of
  • V(vdd, ibp),
  • param_ibias,
  • p_bias,
  • $temperature, and
  • param_tc
at that point?
- B O E
Back to top
 
 
View Profile   IP Logged
fabian
Junior Member
**
Offline



Posts: 19
Europe
Re: Singular matrices in Spectre
Reply #6 - Feb 10th, 2012, 8:09am
 
based on the waveform
   V(vdd, ibp) = 150m
   param_ibias = 100n
   p_bias between 0 and 1
   $temperature = 300.15
   param_tc = 1

how could I display the variable to have accurate values?
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Singular matrices in Spectre
Reply #7 - Feb 10th, 2012, 9:25am
 
Fabian,
E.g. $display, $strobe, $write in V-A.
I'd expect the simulator to output node voltages for last time step...

So your simulation is at the point where current is enabled?

Note: paramm_tc=1 is very strange for your code...
- B O E
Back to top
 
 
View Profile   IP Logged
fabian
Junior Member
**
Offline



Posts: 19
Europe
Re: Singular matrices in Spectre
Reply #8 - Feb 10th, 2012, 9:45am
 
Hi BOE,

Sorry my mistake param_tc=1n.
What I found is if I removed the model if the current supply i.e.

       if( V(vdd,gnd) < 0.6 )
           i_supply = 0;
       else
           i_supply = 0.5e-6;
       I(vdd, gnd) <+ slew( i_supply );

It converged on my toplevel bench. My point is I should have seen it breaking or not converging already in my block test bench level verification. Something is not making but for now I cold move on. If you have any suggestion where it could come from let me know. It should be a bad programming practice somewhere.

Back to top
 
 
View Profile   IP Logged
Forum Administrator
YaBB Administrator
*****
Offline



Posts: 145

Re: Singular matrices in Spectre
Reply #9 - Feb 11th, 2012, 12:08am
 
Fabian,
   You really should not have jumped this post, as your problem seems to have nothing to do with singular matrices. Even it if did, you still should not have jumped this post.

If you want help, you should post the entire model. It can be really difficult to suss out the problem when one only has little snippits of the code.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
fabian
Junior Member
**
Offline



Posts: 19
Europe
Re: Singular matrices in Spectre
Reply #10 - Feb 11th, 2012, 4:44am
 
Sorry will open a new post.
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.