Modified Files:
Tag: TCLSPICE ChangeLog src/include/enh.h src/include/optdefs.h src/spicelib/analysis/acan.c src/spicelib/analysis/cktload.c src/spicelib/analysis/cktsetup.c src/spicelib/analysis/cktsopt.c src/spicelib/devices/cktinit.c Removed XSPICE rshunt option, use gshunt from ngspice instead
This commit is contained in:
parent
0910dd80e6
commit
3a100bdc64
|
|
@ -1,4 +1,11 @@
|
|||
2003-07-14 Stefan Jones <stefan.jones@multigig.com>
|
||||
|
||||
* src/include/enh.h src/spicelib/analysis/{acan.c,cktload.c,cktsetup.c,cktsopt.c}
|
||||
src/spicelib/devices/cktinit.c src/include/optdefs.h :
|
||||
Removed XSPICE rshunt option, use gshunt from ngspice instead.
|
||||
|
||||
2003-07-09 Stefan Jones <stefan.jones@multigig.com>
|
||||
|
||||
* configure.in : Add extra check for tclreadline and headers
|
||||
|
||||
2003-04-14 Stefan Jones <stefan.jones@multigig.com>
|
||||
|
|
|
|||
|
|
@ -83,25 +83,13 @@ typedef struct {
|
|||
double step; /* Fractional step amount */
|
||||
} Enh_Conv_Limit_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
Mif_Boolean_t enabled; /* True if rshunt option used */
|
||||
double gshunt; /* 1.0 / rshunt */
|
||||
int num_nodes; /* Number of nodes in matrix */
|
||||
double **diag; /* Pointers to matrix diagonals */
|
||||
} Enh_Rshunt_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
Enh_Bkpt_t breakpoint; /* Data used by dynamic breakpoints */
|
||||
Enh_Ramp_t ramp; /* New options added to simulator */
|
||||
Enh_Conv_Debug_t conv_debug; /* Convergence debug info dumping data */
|
||||
Enh_Conv_Limit_t conv_limit; /* Convergence limiting info */
|
||||
Enh_Rshunt_t rshunt_data; /* Shunt conductance from nodes to ground */
|
||||
} Enh_Ckt_Data_t;
|
||||
|
||||
|
||||
|
||||
void ENHreport_conv_prob(Enh_Conv_Source_t type, char *name, char *msg);
|
||||
struct line *ENHtranslate_poly(struct line *deck);
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ typedef struct {
|
|||
#define OPT_ENH_CONV_ABS_STEP 105
|
||||
#define OPT_ENH_CONV_STEP 106
|
||||
#define OPT_MIF_AUTO_PARTIAL 107
|
||||
#define OPT_ENH_RSHUNT 108
|
||||
/* gtri - end - wbk - add new options */
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -365,20 +365,6 @@ CKTacLoad(CKTcircuit *ckt)
|
|||
}
|
||||
|
||||
#ifdef XSPICE
|
||||
/* gtri - begin - Put resistors to ground at all nodes. */
|
||||
/* Value of resistor is set by new "rshunt" option. */
|
||||
|
||||
if(ckt->enh->rshunt_data.enabled) {
|
||||
for(i = 0; i < ckt->enh->rshunt_data.num_nodes; i++) {
|
||||
*(ckt->enh->rshunt_data.diag[i]) +=
|
||||
ckt->enh->rshunt_data.gshunt;
|
||||
}
|
||||
}
|
||||
|
||||
/* gtri - end - Put resistors to ground at all nodes */
|
||||
|
||||
|
||||
|
||||
/* gtri - add - wbk - 11/26/90 - reset the MIF init flags */
|
||||
|
||||
/* init is set by CKTinit and should be true only for first load call */
|
||||
|
|
|
|||
|
|
@ -44,16 +44,6 @@ CKTload(CKTcircuit *ckt)
|
|||
int noncon;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
#ifdef XSPICE
|
||||
/* gtri - begin - Put resistors to ground at all nodes */
|
||||
/* SMPmatrix *matrix; maschmann : deleted , because unused */
|
||||
|
||||
double gshunt;
|
||||
int num_nodes;
|
||||
|
||||
/* gtri - begin - Put resistors to ground at all nodes */
|
||||
#endif
|
||||
|
||||
startTime = (*(SPfrontEnd->IFseconds))();
|
||||
size = SMPmatSize(ckt->CKTmatrix);
|
||||
for (i=0;i<=size;i++) {
|
||||
|
|
@ -95,19 +85,7 @@ CKTload(CKTcircuit *ckt)
|
|||
|
||||
/* gtri - end - wbk - 11/26/90 */
|
||||
|
||||
/* gtri - begin - Put resistors to ground at all nodes. */
|
||||
/* Value of resistor is set by new "rshunt" option. */
|
||||
|
||||
if(ckt->enh->rshunt_data.enabled) {
|
||||
gshunt = ckt->enh->rshunt_data.gshunt;
|
||||
num_nodes = ckt->enh->rshunt_data.num_nodes;
|
||||
for(i = 0; i < num_nodes; i++) {
|
||||
*(ckt->enh->rshunt_data.diag[i]) += gshunt;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* gtri - end - Put resistors to ground at all nodes */
|
||||
|
||||
|
||||
if(ckt->CKTmode & MODEDC) {
|
||||
/* consider doing nodeset & ic assignments */
|
||||
|
|
|
|||
|
|
@ -31,12 +31,6 @@ CKTsetup(CKTcircuit *ckt)
|
|||
{
|
||||
int i;
|
||||
int error;
|
||||
#ifdef XSPICE
|
||||
/* gtri - begin - Setup for adding rshunt option resistors */
|
||||
CKTnode *node;
|
||||
int num_nodes;
|
||||
/* gtri - end - Setup for adding rshunt option resistors */
|
||||
#endif
|
||||
SMPmatrix *matrix;
|
||||
ckt->CKTnumStates=0;
|
||||
|
||||
|
|
@ -80,38 +74,6 @@ CKTsetup(CKTcircuit *ckt)
|
|||
error = NIreinit(ckt);
|
||||
if(error) return(error);
|
||||
}
|
||||
#ifdef XSPICE
|
||||
/* gtri - begin - Setup for adding rshunt option resistors */
|
||||
|
||||
if(ckt->enh->rshunt_data.enabled) {
|
||||
|
||||
/* Count number of voltage nodes in circuit */
|
||||
for(num_nodes = 0, node = ckt->CKTnodes; node; node = node->next)
|
||||
if((node->type == NODE_VOLTAGE) && (node->number != 0))
|
||||
num_nodes++;
|
||||
|
||||
/* Allocate space for the matrix diagonal data */
|
||||
if(num_nodes > 0) {
|
||||
ckt->enh->rshunt_data.diag =
|
||||
(double **) MALLOC(num_nodes * sizeof(double *));
|
||||
}
|
||||
|
||||
/* Set the number of nodes in the rshunt data */
|
||||
ckt->enh->rshunt_data.num_nodes = num_nodes;
|
||||
|
||||
/* Get/create matrix diagonal entry following what RESsetup does */
|
||||
for(i = 0, node = ckt->CKTnodes; node; node = node->next) {
|
||||
if((node->type == NODE_VOLTAGE) && (node->number != 0)) {
|
||||
ckt->enh->rshunt_data.diag[i] =
|
||||
SMPmakeElt(matrix,node->number,node->number);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* gtri - end - Setup for adding rshunt option resistors */
|
||||
#endif
|
||||
return(OK);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -184,15 +184,6 @@ CKTsetOpt(void *ckt, void *anal, int opt, IFvalue *val)
|
|||
g_mif_info.auto_partial.global = MIF_TRUE;
|
||||
break;
|
||||
|
||||
case OPT_ENH_RSHUNT:
|
||||
if(val->rValue > 1.0e-30) {
|
||||
((CKTcircuit *) ckt)->enh->rshunt_data.enabled = MIF_TRUE;
|
||||
((CKTcircuit *) ckt)->enh->rshunt_data.gshunt = 1.0 / val->rValue;
|
||||
}
|
||||
else {
|
||||
printf("WARNING - Rshunt option too small. Ignored.\n");
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
/* gtri - end - wbk - add new options */
|
||||
default:
|
||||
|
|
@ -211,7 +202,6 @@ static IFparm OPTtbl[] = {
|
|||
{ "convstep", OPT_ENH_CONV_STEP, IF_SET|IF_REAL, "Fractional step allowed by code model inputs between iterations" },
|
||||
{ "convabsstep", OPT_ENH_CONV_ABS_STEP, IF_SET|IF_REAL, "Absolute step allowed by code model inputs between iterations" },
|
||||
{ "autopartial", OPT_MIF_AUTO_PARTIAL, IF_SET|IF_FLAG, "Use auto-partial computation for all models" },
|
||||
{ "rshunt", OPT_ENH_RSHUNT, IF_SET|IF_REAL, "Shunt resistance from analog nodes to ground" },
|
||||
/* gtri - end - wbk - add new options */
|
||||
#endif
|
||||
{ "noopiter", OPT_NOOPITER,IF_SET|IF_FLAG,"Go directly to gmin stepping" },
|
||||
|
|
|
|||
|
|
@ -107,7 +107,6 @@ CKTinit(void **ckt) /* new circuit to create */
|
|||
(sckt)->enh->conv_limit.enabled = MIF_TRUE;
|
||||
(sckt)->enh->conv_limit.step = 0.25;
|
||||
(sckt)->enh->conv_limit.abs_step = 0.1;
|
||||
(sckt)->enh->rshunt_data.enabled = MIF_FALSE;
|
||||
|
||||
/* gtri - end - wbk - allocate/initialize substructs */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue