Diode code problem solved


To ng-spice-devel@ieee.ing.uniroma1.it
From "p.nenzi@ieee.org" <pnenzi@ieee.ing.uniroma1.it>
Date Sat, 26 May 2001 15:48:01 +0200 (CEST)
Delivered-To mailing list ng-spice-devel@ieee.ing.uniroma1.it
In-Reply-To <Pine.LNX.3.96.1010526030140.22485A-100000@ieee.ing.uniroma1.it >
Mailing-List contact ng-spice-devel-help@ieee.ing.uniroma1.it; run by ezmlm
Reply-To ng-spice-devel@ieee.ing.uniroma1.it

Hi all,
At least I have discovered the problem hidden into the dioload.c code.
There was a fix introduced over the original code that  was nonfuctional.
It is the same problem once happened with the pz analysis. A couple of
braces around an if caused a portion of the code to be skipped.

Now the error and the fix:



dioload.c: (error)

if( ((ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG)) || 
                 (ckt->CKTmode & MODETRANOP)) && (ckt->CKTmode & MODEUIC)
) {
              /*
               *   charge storage elements
               */

dioload.c: (correct)

if( (ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG)) || 
                    (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode &
MODEUIC) ) {
                /*
                 *   charge storage elements
                 */


Bye,
Paolo


Partial thread listing: