trtol to 1 only for A devices
This commit is contained in:
parent
43d6608024
commit
bd985bc28f
|
|
@ -1,3 +1,12 @@
|
|||
2010-10-13 Dietmar Warning
|
||||
* src/frontend/com_option.c: better formatting the output and
|
||||
add some useful parameters if command 'option' is given
|
||||
* src/include/cktdefs.h,
|
||||
* src/spicelib/analysis/cktdojob.c, cktntask.c,
|
||||
* src/spicelib/devices/cktinit.c,
|
||||
* src/spicelib/parser/inppas2.c:
|
||||
Reduction of trtol to 1 only if 'A' devices in the circuit and xspice is enabled
|
||||
|
||||
2010-10-09 Robert Larice
|
||||
* src/include/complex.h :
|
||||
!REVERT! remove typedef for _complex, which is used nowhere
|
||||
|
|
|
|||
|
|
@ -234,6 +234,9 @@ struct CKTcircuit {
|
|||
point brute force, but to use gmin stepping
|
||||
first */
|
||||
unsigned int CKTisSetup:1; /* flag to indicate if CKTsetup done */
|
||||
#ifdef XSPICE
|
||||
unsigned int CKTadevFlag:1; /* flag indicates 'A' devices in the circuit */
|
||||
#endif
|
||||
JOB *CKTcurJob; /* Next analysis to be performed ??? */
|
||||
|
||||
SENstruct *CKTsenInfo; /* the sensitivity information */
|
||||
|
|
@ -255,11 +258,11 @@ struct CKTcircuit {
|
|||
double CKTrelDv; /* rel limit for iter-iter voltage change */
|
||||
int CKTtroubleNode; /* Non-convergent node number */
|
||||
GENinstance *CKTtroubleElt; /* Non-convergent device instance */
|
||||
int CKTvarHertz; /* variable HERTZ in B source */
|
||||
int CKTvarHertz; /* variable HERTZ in B source */
|
||||
/* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */
|
||||
#ifdef XSPICE
|
||||
Evt_Ckt_Data_t *evt; /* all data about event driven stuff */
|
||||
Enh_Ckt_Data_t *enh; /* data used by general enhancements */
|
||||
Evt_Ckt_Data_t *evt; /* all data about event driven stuff */
|
||||
Enh_Ckt_Data_t *enh; /* data used by general enhancements */
|
||||
#endif
|
||||
/* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,15 @@ CKTdoJob(CKTcircuit *inCkt, int reset, TSKtask *inTask)
|
|||
ckt->CKTgmin = task->TSKgmin;
|
||||
ckt->CKTgshunt = task->TSKgshunt;
|
||||
ckt->CKTdelmin = task->TSKdelmin;
|
||||
ckt->CKTtrtol = task->TSKtrtol;
|
||||
#ifdef XSPICE
|
||||
/* Lower default value of trtol to give more accuracy */
|
||||
/* but only if there are 'A' devices in the circuit */
|
||||
if (ckt->CKTadevFlag && (ckt->CKTtrtol > 1)) {
|
||||
printf("Reducing trtol to 1 for xspice 'A' devices\n");
|
||||
ckt->CKTtrtol = 1;
|
||||
} else
|
||||
#endif
|
||||
ckt->CKTtrtol = task->TSKtrtol;
|
||||
ckt->CKTdefaultMosM = task->TSKdefaultMosM;
|
||||
ckt->CKTdefaultMosL = task->TSKdefaultMosL;
|
||||
ckt->CKTdefaultMosW = task->TSKdefaultMosW;
|
||||
|
|
|
|||
|
|
@ -86,17 +86,7 @@ CKTnewTask(CKTcircuit *ckt, TSKtask **taskPtr, IFuid taskName, TSKtask **defPtr)
|
|||
tsk->TSKlteReltol = 1e-3;
|
||||
tsk->TSKlteAbstol = 1e-6;
|
||||
#endif /* NEWTRUNC */
|
||||
|
||||
/* gtri - modify - 4/17/91 - wbk - Change trtol default */
|
||||
#ifdef XSPICE
|
||||
/* Lower default value of trtol to give more accuracy */
|
||||
/* tsk->TSKtrtol = 7; */
|
||||
tsk->TSKtrtol = 1;
|
||||
/* gtri - modify - 4/17/91 - wbk - Change trtol default */
|
||||
#else
|
||||
tsk->TSKtrtol = 7;
|
||||
#endif /* XSPICE */
|
||||
|
||||
tsk->TSKbypass = 0;
|
||||
tsk->TSKtranMaxIter = 10;
|
||||
tsk->TSKdcMaxIter = 100;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ CKTinit(CKTcircuit **ckt) /* new circuit to create */
|
|||
sckt->CKTtrtol = 7;
|
||||
sckt->CKTbypass = 0;
|
||||
sckt->CKTisSetup = 0;
|
||||
#ifdef XSPICE
|
||||
sckt->CKTadevFlag = 0; /* flag indicates A devices in the circuit */
|
||||
#endif
|
||||
sckt->CKTtranMaxIter = 10;
|
||||
sckt->CKTdcMaxIter = 100;
|
||||
sckt->CKTdcTrcvMaxIter = 50;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,9 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
|||
Author: 1985 Thomas L. Quarles
|
||||
**********/
|
||||
|
||||
#include <config.h>
|
||||
#include <ngspice.h>
|
||||
#include <iferrmsg.h>
|
||||
#include <inpmacs.h>
|
||||
#include "ngspice.h"
|
||||
#include "iferrmsg.h"
|
||||
#include "inpmacs.h"
|
||||
|
||||
#include "inppas2.h"
|
||||
#include "inp.h"
|
||||
|
|
@ -45,6 +44,10 @@ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, TSKtask *task)
|
|||
printf("Entered INPpas2 . . . .\n");
|
||||
#endif
|
||||
|
||||
#ifdef XSPICE
|
||||
if (!ckt->CKTadevFlag) ckt->CKTadevFlag = 0;
|
||||
#endif
|
||||
|
||||
error = INPgetTok(&groundname, &gname, 1);
|
||||
if (error)
|
||||
data->error =
|
||||
|
|
@ -62,12 +65,12 @@ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, TSKtask *task)
|
|||
#ifdef TRACE
|
||||
printf("Examining this deck:\n");
|
||||
for (current = data; current != NULL; current = current->nextcard) {
|
||||
printf("%s\n", current->line);
|
||||
printf("%s\n", current->line);
|
||||
}
|
||||
printf("\n");
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef HAS_WINDOWS
|
||||
for (current = data; current != NULL; current = current->nextcard)
|
||||
linecount++;
|
||||
|
|
@ -100,14 +103,15 @@ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, TSKtask *task)
|
|||
|
||||
#ifdef XSPICE
|
||||
/* gtri - add - wbk - 10/23/90 - add case for 'A' devices */
|
||||
|
||||
case 'A': /* Aname <cm connections> <mname> */
|
||||
MIF_INP2A(ckt,tab,current);
|
||||
|
||||
case 'A': /* Aname <cm connections> <mname> */
|
||||
MIF_INP2A(ckt, tab, current);
|
||||
ckt->CKTadevFlag = 1; /* an 'A' device is requested */
|
||||
break;
|
||||
|
||||
|
||||
/* gtri - end - wbk - 10/23/90 */
|
||||
#endif
|
||||
|
||||
|
||||
case 'R':
|
||||
/* Rname <node> <node> [<val>][<mname>][w=<val>][l=<val>] */
|
||||
INP2R(ckt, tab, current);
|
||||
|
|
@ -168,7 +172,7 @@ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, TSKtask *task)
|
|||
INP2M(ckt, tab, current);
|
||||
break;
|
||||
#ifdef NDEV
|
||||
case 'N':
|
||||
case 'N':
|
||||
/* Nname [<node>...] [<mname>] */
|
||||
INP2N(ckt, tab, current);
|
||||
break;
|
||||
|
|
@ -230,7 +234,7 @@ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, TSKtask *task)
|
|||
INP2Y(ckt, tab, current);
|
||||
break;
|
||||
/* end Kspice */
|
||||
|
||||
|
||||
case 'K':
|
||||
/* Kname Lname Lname <val> */
|
||||
INP2K(ckt, tab, current);
|
||||
|
|
@ -246,10 +250,10 @@ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, TSKtask *task)
|
|||
INP2B(ckt, tab, current);
|
||||
break;
|
||||
|
||||
case '.': /* .<something> Many possibilities */
|
||||
if (INP2dot(ckt,tab,current,task,gnode))
|
||||
return;
|
||||
break;
|
||||
case '.': /* .<something> Many possibilities */
|
||||
if (INP2dot(ckt,tab,current,task,gnode))
|
||||
return;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
break;
|
||||
|
|
@ -259,7 +263,7 @@ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, TSKtask *task)
|
|||
LITERR(" unknown device type - error \n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue