devices/res, #6/6, rename variables back to their original names
strip the X in RESconductX, REScurrentX, RESacConductX
This commit is contained in:
parent
93ab0fb0e0
commit
57f3d35ddc
|
|
@ -37,13 +37,13 @@ RESask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
|
|||
value->rValue = fast->RESdtemp;
|
||||
return(OK);
|
||||
case RES_CONDUCT:
|
||||
value->rValue = fast->RESconductX;
|
||||
value->rValue = fast->RESconduct;
|
||||
return(OK);
|
||||
case RES_RESIST:
|
||||
value->rValue = fast->RESresist;
|
||||
return(OK);
|
||||
case RES_ACCONDUCT:
|
||||
value->rValue = fast->RESacConductX;
|
||||
value->rValue = fast->RESacConduct;
|
||||
return (OK);
|
||||
case RES_ACRESIST:
|
||||
value->rValue = fast->RESacResist;
|
||||
|
|
@ -144,7 +144,7 @@ RESask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
|
|||
} else if (ckt->CKTrhsOld) {
|
||||
value->rValue = (*(ckt->CKTrhsOld + fast->RESposNode) -
|
||||
*(ckt->CKTrhsOld + fast->RESnegNode));
|
||||
value->rValue *= fast->RESconductX;
|
||||
value->rValue *= fast->RESconduct;
|
||||
return(OK);
|
||||
} else {
|
||||
errMsg = tprintf("No current values available for %s", fast->RESname);
|
||||
|
|
@ -162,7 +162,7 @@ RESask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
|
|||
*(ckt->CKTrhsOld + fast->RESnegNode)) *
|
||||
(*(ckt->CKTrhsOld + fast->RESposNode) -
|
||||
*(ckt->CKTrhsOld + fast->RESnegNode));
|
||||
value->rValue *= fast->RESconductX;
|
||||
value->rValue *= fast->RESconduct;
|
||||
return(OK);
|
||||
} else {
|
||||
errMsg = tprintf("No power values available for %s", fast->RESname);
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ typedef struct sRESinstance {
|
|||
|
||||
double REStemp; /* temperature at which this resistor operates */
|
||||
double RESdtemp; /* delta-temperature of a particular instance */
|
||||
double RESconductX; /* conductance at current analysis temperature */
|
||||
double RESconduct; /* conductance at current analysis temperature */
|
||||
double RESresist; /* resistance at temperature Tnom */
|
||||
double REScurrentX; /* The dc current in the resistor */
|
||||
double REScurrent; /* The dc current in the resistor */
|
||||
/* serban */
|
||||
double RESacResist; /* AC resistance, useful for fancy .ac analyses */
|
||||
double RESacConductX; /* AC conductance */
|
||||
double RESacConduct; /* AC conductance */
|
||||
double RESwidth; /* width of the resistor */
|
||||
double RESlength; /* length of the resistor */
|
||||
double RESscale; /* Scale factor */
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ RESload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
for (here = model->RESinstances; here != NULL ;
|
||||
here = here->RESnextInstance) {
|
||||
|
||||
here->REScurrentX = (*(ckt->CKTrhsOld+here->RESposNode) -
|
||||
*(ckt->CKTrhsOld+here->RESnegNode)) * here->RESconductX;
|
||||
here->REScurrent = (*(ckt->CKTrhsOld+here->RESposNode) -
|
||||
*(ckt->CKTrhsOld+here->RESnegNode)) * here->RESconduct;
|
||||
|
||||
*(here->RESposPosPtr) += here->RESconductX;
|
||||
*(here->RESnegNegPtr) += here->RESconductX;
|
||||
*(here->RESposNegPtr) -= here->RESconductX;
|
||||
*(here->RESnegPosPtr) -= here->RESconductX;
|
||||
*(here->RESposPosPtr) += here->RESconduct;
|
||||
*(here->RESnegNegPtr) += here->RESconduct;
|
||||
*(here->RESposNegPtr) -= here->RESconduct;
|
||||
*(here->RESnegPosPtr) -= here->RESconduct;
|
||||
}
|
||||
}
|
||||
return(OK);
|
||||
|
|
@ -57,9 +57,9 @@ RESacload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
here = here->RESnextInstance) {
|
||||
|
||||
if (here->RESacresGiven)
|
||||
g = here->RESacConductX;
|
||||
g = here->RESacConduct;
|
||||
else
|
||||
g = here->RESconductX;
|
||||
g = here->RESconduct;
|
||||
|
||||
*(here->RESposPosPtr) += g;
|
||||
*(here->RESnegNegPtr) += g;
|
||||
|
|
|
|||
|
|
@ -93,18 +93,18 @@ RESnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
|
|||
|
||||
NevalSrcInstanceTemp(&noizDens[RESTHNOIZ],&lnNdens[RESTHNOIZ],
|
||||
ckt,THERMNOISE, inst->RESposNode,inst->RESnegNode,
|
||||
inst->RESconductX, inst->RESdtemp);
|
||||
inst->RESconduct, inst->RESdtemp);
|
||||
|
||||
NevalSrcInstanceTemp(&noizDens[RESFLNOIZ], NULL, ckt,
|
||||
N_GAIN,inst->RESposNode, inst->RESnegNode,
|
||||
(double)0.0, (double)0.0);
|
||||
|
||||
#if 0
|
||||
printf("DC current in resistor %s: %e\n",inst->RESname, inst->REScurrentX);
|
||||
printf("DC current in resistor %s: %e\n",inst->RESname, inst->REScurrent);
|
||||
#endif
|
||||
|
||||
noizDens[RESFLNOIZ] *= inst->RESm * model->RESfNcoef *
|
||||
pow(fabs(inst->REScurrentX / inst->RESm), model->RESfNexp)
|
||||
pow(fabs(inst->REScurrent / inst->RESm), model->RESfNexp)
|
||||
/ (inst->RESeffNoiseArea * pow(data->freq, model->RESef));
|
||||
lnNdens[RESFLNOIZ] = log(MAX(noizDens[RESFLNOIZ],N_MINLOG));
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ RESpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
here=here->RESnextInstance) {
|
||||
|
||||
if (here->RESacresGiven)
|
||||
g = here->RESacConductX;
|
||||
g = here->RESacConduct;
|
||||
else
|
||||
g = here->RESconductX;
|
||||
g = here->RESconduct;
|
||||
|
||||
*(here->RESposPosPtr) += g;
|
||||
*(here->RESnegNegPtr) += g;
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ RESsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
*(ckt->CKTrhsOld+here->RESnegNode);
|
||||
ivalue = *(ckt->CKTirhsOld+here->RESposNode) -
|
||||
*(ckt->CKTirhsOld+here->RESnegNode);
|
||||
value *= here->RESacConductX;
|
||||
value *= here->RESacConductX;
|
||||
ivalue *= here->RESacConductX;
|
||||
ivalue *= here->RESacConductX;
|
||||
value *= here->RESacConduct;
|
||||
value *= here->RESacConduct;
|
||||
ivalue *= here->RESacConduct;
|
||||
ivalue *= here->RESacConduct;
|
||||
|
||||
/* load the RHS matrix */
|
||||
*(ckt->CKTsenInfo->SEN_RHS[here->RESposNode] +
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ RESsLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double value;
|
||||
value = *(ckt->CKTrhsOld+here->RESposNode) -
|
||||
*(ckt->CKTrhsOld+here->RESnegNode);
|
||||
value *= here->RESconductX;
|
||||
value *= here->RESconductX;
|
||||
value *= here->RESconduct;
|
||||
value *= here->RESconduct;
|
||||
|
||||
/* load the RHS matrix */
|
||||
*(ckt->CKTsenInfo->SEN_RHS[here->RESposNode] +
|
||||
|
|
|
|||
|
|
@ -98,13 +98,13 @@ RESupdate_conduct(RESinstance *here, bool spill_warnings)
|
|||
else
|
||||
factor = (((tc2 * difference) + tc1) * difference) + 1.0;
|
||||
|
||||
here->RESconductX = here->RESm / (here->RESresist * factor * here->RESscale);
|
||||
here->RESconduct = here->RESm / (here->RESresist * factor * here->RESscale);
|
||||
|
||||
/* Paolo Nenzi: AC value */
|
||||
if (here->RESacresGiven) {
|
||||
here->RESacConductX = here->RESm / (here->RESacResist * factor * here->RESscale);
|
||||
here->RESacConduct = here->RESm / (here->RESacResist * factor * here->RESscale);
|
||||
} else {
|
||||
here->RESacConductX = here->RESconductX;
|
||||
here->RESacConduct = here->RESconduct;
|
||||
here->RESacResist = here->RESresist;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue