MEStemp

original_code:
int
MEStemp(GENmodel *inModel, CKTcircuit *ckt)
{
    MESmodel *model = (MESmodel*)inModel;
    double xfc, temp;
    for( ; model != ((void *)0); model = model->MESnextModel ) {
        if(model->MESdrainResist != 0) {
            model->MESdrainConduct = 1/model->MESdrainResist;
        } else {
            model->MESdrainConduct = 0;
        }
        if(model->MESsourceResist != 0) {
            model->MESsourceConduct = 1/model->MESsourceResist;
        } else {
            model->MESsourceConduct = 0;
        }
        model->MESdepletionCap = model->MESdepletionCapCoeff *
                model->MESgatePotential;
        xfc = (1 - model->MESdepletionCapCoeff);
        temp = sqrt(xfc);
        model->MESf1 = model->MESgatePotential * (1 - temp)/(1-.5);
        model->MESf2 = temp * temp * temp;
        model->MESf3 = 1 - model->MESdepletionCapCoeff * (1 + .5);
        model->MESvcrit = CONSTvt0 * log(CONSTvt0/
                (CONSTroot2 * model->MESgateSatCurrent));
    }
    return(0);
}

canonical_original_code:
int MEStemp(struct sGENmodel *inModel, struct CKTcircuit *ckt)
{
    struct sMESmodel *model = (MESmodel*)inModel;
    double xfc; double temp;
    for( ; model != ((void *)0); model = model->MESnextModel ) {
        if(model->MESdrainResist != 0) {
            model->MESdrainConduct = 1/model->MESdrainResist;
        } else {
            model->MESdrainConduct = 0;
        }
        if(model->MESsourceResist != 0) {
            model->MESsourceConduct = 1/model->MESsourceResist;
        } else {
            model->MESsourceConduct = 0;
        }
        model->MESdepletionCap = model->MESdepletionCapCoeff *
                model->MESgatePotential;
        xfc = (1 - model->MESdepletionCapCoeff);
        temp = sqrt(xfc);
        model->MESf1 = model->MESgatePotential * (1 - temp)/(1-.5);
        model->MESf2 = temp * temp * temp;
        model->MESf3 = 1 - model->MESdepletionCapCoeff * (1 + .5);
        model->MESvcrit = CONSTvt0 * log(CONSTvt0/
                (CONSTroot2 * model->MESgateSatCurrent));
    }
    return(0);
}

variable_types: struct sMESmodel { int MESmodType; struct sMESmodel *MESnextModel; struct sMESinstance { struct sMESmodel *MESmodPtr; struct sMESinstance *MESnextInstance; char *MESname; int MESowner; int MESstate; int MESdrainNode; int MESgateNode; int MESsourceNode; int MESdrainPrimeNode; int MESsourcePrimeNode; double MESarea; double MESm; double MESicVDS; double MESicVGS; double *MESdrainDrainPrimePtr; double *MESgateDrainPrimePtr; double *MESgateSourcePrimePtr; double *MESsourceSourcePrimePtr; double *MESdrainPrimeDrainPtr; double *MESdrainPrimeGatePtr; double *MESdrainPrimeSourcePrimePtr; double *MESsourcePrimeGatePtr; double *MESsourcePrimeSourcePtr; double *MESsourcePrimeDrainPrimePtr; double *MESdrainDrainPtr; double *MESgateGatePtr; double *MESsourceSourcePtr; double *MESdrainPrimeDrainPrimePtr; double *MESsourcePrimeSourcePrimePtr; int MESoff; unsigned int MESareaGiven; unsigned int MESmGiven; unsigned int MESicVDSGiven; unsigned int MESicVGSGiven; int MESmode; double MESdCoeffs[27]; double MESnVar[3][5]; } *MESinstances; char *MESmodName; int MEStype; double MESthreshold; double MESalpha; double MESbeta; double MESlModulation; double MESb; double MESdrainResist; double MESsourceResist; double MEScapGS; double MEScapGD; double MESgatePotential; double MESgateSatCurrent; double MESdepletionCapCoeff; double MESfNcoef; double MESfNexp; double MESdrainConduct; double MESsourceConduct; double MESdepletionCap; double MESf1; double MESf2; double MESf3; double MESvcrit; unsigned int MESthresholdGiven; unsigned int MESalphaGiven; unsigned int MESbetaGiven; unsigned int MESlModulationGiven; unsigned int MESbGiven; unsigned int MESdrainResistGiven; unsigned int MESsourceResistGiven; unsigned int MEScapGSGiven; unsigned int MEScapGDGiven; unsigned int MESgatePotentialGiven; unsigned int MESgateSatCurrentGiven; unsigned int MESdepletionCapCoeffGiven; unsigned int MESfNcoefGiven; unsigned int MESfNexpGiven; } *

variable_types: xfc double

variable_types: temp double

user_defined_types: struct sMESmodel { int MESmodType; struct sMESmodel *MESnextModel; struct sMESinstance *MESinstances; char *MESmodName; int MEStype; double MESthreshold; double MESalpha; double MESbeta; double MESlModulation; double MESb; double MESdrainResist; double MESsourceResist; double MEScapGS; double MEScapGD; double MESgatePotential; double MESgateSatCurrent; double MESdepletionCapCoeff; double MESfNcoef; double MESfNexp; double MESdrainConduct; double MESsourceConduct; double MESdepletionCap; double MESf1; double MESf2; double MESf3; double MESvcrit; unsigned int MESthresholdGiven; unsigned int MESalphaGiven; unsigned int MESbetaGiven; unsigned int MESlModulationGiven; unsigned int MESbGiven; unsigned int MESdrainResistGiven; unsigned int MESsourceResistGiven; unsigned int MEScapGSGiven; unsigned int MEScapGDGiven; unsigned int MESgatePotentialGiven; unsigned int MESgateSatCurrentGiven; unsigned int MESdepletionCapCoeffGiven; unsigned int MESfNcoefGiven; unsigned int MESfNexpGiven; }

user_defined_types: struct STATistics { int STATnumIter; int STATtranIter; int STAToldIter; int STATtimePts; int STATaccepted; int STATrejected; double STATtotAnalTime; double STATloadTime; double STATdecompTime; double STATsolveTime; double STATreorderTime; double STATcombineTime; double STATsyncTime; double STATtranTime; double STATtranDecompTime; double STATtranSolveTime; double STATtranLoadTime; double STATtranTruncTime; double STATtranCombTime; double STATtranSyncTime; double STATacTime; double STATacDecompTime; double STATacSolveTime; double STATacLoadTime; double STATacCombTime; double STATacSyncTime; }

user_defined_types: struct sCKTnode { char *name; int type; int number; double ic; double nodeset; double *ptr; struct sCKTnode *next; unsigned int icGiven; unsigned int nsGiven; }

user_defined_types: struct sJOB { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; }

user_defined_types: struct SENstruct { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; int SENnumVal; char **SENdevices; char **SENparmNames; unsigned int SENinitflag; unsigned int SENicflag; unsigned int SENstatus; unsigned int SENacpertflag; int SENmode; int SENparms; double SENpertfac; double **SEN_Sap; double **SEN_RHS; double **SEN_iRHS; int SENsize; void *SEN_Jacmat; double *SEN_parmVal; char **SEN_parmName; }


BJTmParam

repo: gserdyuk/gnucap-a

original_code:
int
BJTmParam(int param, IFvalue *value, GENmodel *inModel)
{
    BJTmodel *mods = (BJTmodel*)inModel;
    switch(param) {
        case 101:
            if(value->iValue) {
                mods->BJTtype = 1;
            }
            break;
        case 102:
            if(value->iValue) {
                mods->BJTtype = -1;
            }
            break;
        case 143:
            mods->BJTtnom = value->rValue+(273.15);
            mods->BJTtnomGiven = 1;
            break;
        case 103:
            mods->BJTsatCur = value->rValue;
            mods->BJTsatCurGiven = 1;
            break;
        case 104:
            mods->BJTbetaF = value->rValue;
            mods->BJTbetaFGiven = 1;
            break;
        case 105:
            mods->BJTemissionCoeffF = value->rValue;
            mods->BJTemissionCoeffFGiven = 1;
            break;
        case 106:
            mods->BJTearlyVoltF = value->rValue;
            mods->BJTearlyVoltFGiven = 1;
            break;
        case 107:
            mods->BJTrollOffF = value->rValue;
            mods->BJTrollOffFGiven = 1;
            break;
        case 108:
            mods->BJTleakBEcurrent = value->rValue;
            mods->BJTleakBEcurrentGiven = 1;
            break;
        case 109:
            mods->BJTc2 = value->rValue;
            mods->BJTc2Given=1;
            break;
        case 110:
            mods->BJTleakBEemissionCoeff = value->rValue;
            mods->BJTleakBEemissionCoeffGiven = 1;
            break;
        case 111:
            mods->BJTbetaR = value->rValue;
            mods->BJTbetaRGiven = 1;
            break;
        case 112:
            mods->BJTemissionCoeffR = value->rValue;
            mods->BJTemissionCoeffRGiven = 1;
            break;
        case 113:
            mods->BJTearlyVoltR = value->rValue;
            mods->BJTearlyVoltRGiven = 1;
            break;
        case 114:
            mods->BJTrollOffR = value->rValue;
            mods->BJTrollOffRGiven = 1;
            break;
        case 115:
            mods->BJTleakBCcurrent = value->rValue;
            mods->BJTleakBCcurrentGiven = 1;
            break;
        case 116:
            mods->BJTc4 = value->rValue;
            mods->BJTc4Given=1;
            break;
        case 117:
            mods->BJTleakBCemissionCoeff = value->rValue;
            mods->BJTleakBCemissionCoeffGiven = 1;
            break;
        case 118:
            mods->BJTbaseResist = value->rValue;
            mods->BJTbaseResistGiven = 1;
            break;
        case 119:
            mods->BJTbaseCurrentHalfResist = value->rValue;
            mods->BJTbaseCurrentHalfResistGiven = 1;
            break;
        case 120:
            mods->BJTminBaseResist = value->rValue;
            mods->BJTminBaseResistGiven = 1;
            break;
        case 121:
            mods->BJTemitterResist = value->rValue;
            mods->BJTemitterResistGiven = 1;
            break;
        case 122:
            mods->BJTcollectorResist = value->rValue;
            mods->BJTcollectorResistGiven = 1;
            break;
        case 123:
            mods->BJTdepletionCapBE = value->rValue;
            mods->BJTdepletionCapBEGiven = 1;
            break;
        case 124:
            mods->BJTpotentialBE = value->rValue;
            mods->BJTpotentialBEGiven = 1;
            break;
        case 125:
            mods->BJTjunctionExpBE = value->rValue;
            mods->BJTjunctionExpBEGiven = 1;
            break;
        case 126:
            mods->BJTtransitTimeF = value->rValue;
            mods->BJTtransitTimeFGiven = 1;
            break;
        case 127:
            mods->BJTtransitTimeBiasCoeffF = value->rValue;
            mods->BJTtransitTimeBiasCoeffFGiven = 1;
            break;
        case 128:
            mods->BJTtransitTimeFVBC = value->rValue;
            mods->BJTtransitTimeFVBCGiven = 1;
            break;
        case 129:
            mods->BJTtransitTimeHighCurrentF = value->rValue;
            mods->BJTtransitTimeHighCurrentFGiven = 1;
            break;
        case 130:
            mods->BJTexcessPhase = value->rValue;
            mods->BJTexcessPhaseGiven = 1;
            break;
        case 131:
            mods->BJTdepletionCapBC = value->rValue;
            mods->BJTdepletionCapBCGiven = 1;
            break;
        case 132:
            mods->BJTpotentialBC = value->rValue;
            mods->BJTpotentialBCGiven = 1;
            break;
        case 133:
            mods->BJTjunctionExpBC = value->rValue;
            mods->BJTjunctionExpBCGiven = 1;
            break;
        case 134:
            mods->BJTbaseFractionBCcap = value->rValue;
            mods->BJTbaseFractionBCcapGiven = 1;
            break;
        case 135:
            mods->BJTtransitTimeR = value->rValue;
            mods->BJTtransitTimeRGiven = 1;
            break;
        case 136:
            mods->BJTcapCS = value->rValue;
            mods->BJTcapCSGiven = 1;
            break;
        case 137:
            mods->BJTpotentialSubstrate = value->rValue;
            mods->BJTpotentialSubstrateGiven = 1;
            break;
        case 138:
            mods->BJTexponentialSubstrate = value->rValue;
            mods->BJTexponentialSubstrateGiven = 1;
            break;
        case 139:
            mods->BJTbetaExp = value->rValue;
            mods->BJTbetaExpGiven = 1;
            break;
        case 140:
            mods->BJTenergyGap = value->rValue;
            mods->BJTenergyGapGiven = 1;
            break;
        case 141:
            mods->BJTtempExpIS = value->rValue;
            mods->BJTtempExpISGiven = 1;
            break;
        case 142:
            mods->BJTdepletionCapCoeff = value->rValue;
            mods->BJTdepletionCapCoeffGiven = 1;
            break;
 case 145:
     mods->BJTfNcoef = value->rValue;
     mods->BJTfNcoefGiven = 1;
     break;
 case 144:
     mods->BJTfNexp = value->rValue;
     mods->BJTfNexpGiven = 1;
     break;
        default:
            return(7);
    }
    return(0);
}

canonical_original_code:
int BJTmParam(int param, union uIFvalue *value, struct sGENmodel *inModel)
{
    struct sBJTmodel *mods = (BJTmodel*)inModel;
    switch(param) {
        case 101:
            if(value->iValue) {
                mods->BJTtype = 1;
            }
            break;
        case 102:
            if(value->iValue) {
                mods->BJTtype = -1;
            }
            break;
        case 143:
            mods->BJTtnom = value->rValue+(273.15);
            mods->BJTtnomGiven = 1;
            break;
        case 103:
            mods->BJTsatCur = value->rValue;
            mods->BJTsatCurGiven = 1;
            break;
        case 104:
            mods->BJTbetaF = value->rValue;
            mods->BJTbetaFGiven = 1;
            break;
        case 105:
            mods->BJTemissionCoeffF = value->rValue;
            mods->BJTemissionCoeffFGiven = 1;
            break;
        case 106:
            mods->BJTearlyVoltF = value->rValue;
            mods->BJTearlyVoltFGiven = 1;
            break;
        case 107:
            mods->BJTrollOffF = value->rValue;
            mods->BJTrollOffFGiven = 1;
            break;
        case 108:
            mods->BJTleakBEcurrent = value->rValue;
            mods->BJTleakBEcurrentGiven = 1;
            break;
        case 109:
            mods->BJTc2 = value->rValue;
            mods->BJTc2Given=1;
            break;
        case 110:
            mods->BJTleakBEemissionCoeff = value->rValue;
            mods->BJTleakBEemissionCoeffGiven = 1;
            break;
        case 111:
            mods->BJTbetaR = value->rValue;
            mods->BJTbetaRGiven = 1;
            break;
        case 112:
            mods->BJTemissionCoeffR = value->rValue;
            mods->BJTemissionCoeffRGiven = 1;
            break;
        case 113:
            mods->BJTearlyVoltR = value->rValue;
            mods->BJTearlyVoltRGiven = 1;
            break;
        case 114:
            mods->BJTrollOffR = value->rValue;
            mods->BJTrollOffRGiven = 1;
            break;
        case 115:
            mods->BJTleakBCcurrent = value->rValue;
            mods->BJTleakBCcurrentGiven = 1;
            break;
        case 116:
            mods->BJTc4 = value->rValue;
            mods->BJTc4Given=1;
            break;
        case 117:
            mods->BJTleakBCemissionCoeff = value->rValue;
            mods->BJTleakBCemissionCoeffGiven = 1;
            break;
        case 118:
            mods->BJTbaseResist = value->rValue;
            mods->BJTbaseResistGiven = 1;
            break;
        case 119:
            mods->BJTbaseCurrentHalfResist = value->rValue;
            mods->BJTbaseCurrentHalfResistGiven = 1;
            break;
        case 120:
            mods->BJTminBaseResist = value->rValue;
            mods->BJTminBaseResistGiven = 1;
            break;
        case 121:
            mods->BJTemitterResist = value->rValue;
            mods->BJTemitterResistGiven = 1;
            break;
        case 122:
            mods->BJTcollectorResist = value->rValue;
            mods->BJTcollectorResistGiven = 1;
            break;
        case 123:
            mods->BJTdepletionCapBE = value->rValue;
            mods->BJTdepletionCapBEGiven = 1;
            break;
        case 124:
            mods->BJTpotentialBE = value->rValue;
            mods->BJTpotentialBEGiven = 1;
            break;
        case 125:
            mods->BJTjunctionExpBE = value->rValue;
            mods->BJTjunctionExpBEGiven = 1;
            break;
        case 126:
            mods->BJTtransitTimeF = value->rValue;
            mods->BJTtransitTimeFGiven = 1;
            break;
        case 127:
            mods->BJTtransitTimeBiasCoeffF = value->rValue;
            mods->BJTtransitTimeBiasCoeffFGiven = 1;
            break;
        case 128:
            mods->BJTtransitTimeFVBC = value->rValue;
            mods->BJTtransitTimeFVBCGiven = 1;
            break;
        case 129:
            mods->BJTtransitTimeHighCurrentF = value->rValue;
            mods->BJTtransitTimeHighCurrentFGiven = 1;
            break;
        case 130:
            mods->BJTexcessPhase = value->rValue;
            mods->BJTexcessPhaseGiven = 1;
            break;
        case 131:
            mods->BJTdepletionCapBC = value->rValue;
            mods->BJTdepletionCapBCGiven = 1;
            break;
        case 132:
            mods->BJTpotentialBC = value->rValue;
            mods->BJTpotentialBCGiven = 1;
            break;
        case 133:
            mods->BJTjunctionExpBC = value->rValue;
            mods->BJTjunctionExpBCGiven = 1;
            break;
        case 134:
            mods->BJTbaseFractionBCcap = value->rValue;
            mods->BJTbaseFractionBCcapGiven = 1;
            break;
        case 135:
            mods->BJTtransitTimeR = value->rValue;
            mods->BJTtransitTimeRGiven = 1;
            break;
        case 136:
            mods->BJTcapCS = value->rValue;
            mods->BJTcapCSGiven = 1;
            break;
        case 137:
            mods->BJTpotentialSubstrate = value->rValue;
            mods->BJTpotentialSubstrateGiven = 1;
            break;
        case 138:
            mods->BJTexponentialSubstrate = value->rValue;
            mods->BJTexponentialSubstrateGiven = 1;
            break;
        case 139:
            mods->BJTbetaExp = value->rValue;
            mods->BJTbetaExpGiven = 1;
            break;
        case 140:
            mods->BJTenergyGap = value->rValue;
            mods->BJTenergyGapGiven = 1;
            break;
        case 141:
            mods->BJTtempExpIS = value->rValue;
            mods->BJTtempExpISGiven = 1;
            break;
        case 142:
            mods->BJTdepletionCapCoeff = value->rValue;
            mods->BJTdepletionCapCoeffGiven = 1;
            break;
 case 145:
     mods->BJTfNcoef = value->rValue;
     mods->BJTfNcoefGiven = 1;
     break;
 case 144:
     mods->BJTfNexp = value->rValue;
     mods->BJTfNexpGiven = 1;
     break;
        default:
            return(7);
    }
    return(0);
}

variable_types: param int

variable_types: union uIFvalue { int iValue; double rValue; struct sIFcomplex { double real; double imag; } cValue; char *sValue; char *uValue; void *nValue; struct sIFparseTree { int numVars; int *varTypes; union uIFvalue *vars; int (*IFeval)(struct sIFparseTree *, double, double *, double *, double *); } *tValue; struct { int numValue; union { int *iVec; double *rVec; struct sIFcomplex *cVec; char **sVec; char **uVec; void **nVec; } vec; } v; } *

variable_types: struct sGENmodel { int GENmodType; struct sGENmodel *GENnextModel; struct sGENinstance { struct sGENmodel *GENmodPtr; struct sGENinstance *GENnextInstance; char *GENname; int GENowner; int GENstate; int GENnode1; int GENnode2; int GENnode3; int GENnode4; int GENnode5; int GENnode6; int GENnode7; } *GENinstances; char *GENmodName; } *

variable_types: struct sBJTmodel { int BJTmodType; struct sBJTmodel *BJTnextModel; struct sBJTinstance { struct sBJTmodel *BJTmodPtr; struct sBJTinstance *BJTnextInstance; char *BJTname; int BJTowner; int BJTstate; int BJTcolNode; int BJTbaseNode; int BJTemitNode; int BJTsubstNode; int BJTcolPrimeNode; int BJTbasePrimeNode; int BJTemitPrimeNode; double BJTarea; double BJTareab; double BJTareac; double BJTm; double BJTicVBE; double BJTicVCE; double BJTtemp; double BJTdtemp; double BJTtSatCur; double BJTtBetaF; double BJTtBetaR; double BJTtBEleakCur; double BJTtBCleakCur; double BJTtBEcap; double BJTtBEpot; double BJTtBCcap; double BJTtBCpot; double BJTtDepCap; double BJTtf1; double BJTtf4; double BJTtf5; double BJTtVcrit; double *BJTcolColPrimePtr; double *BJTbaseBasePrimePtr; double *BJTemitEmitPrimePtr; double *BJTcolPrimeColPtr; double *BJTcolPrimeBasePrimePtr; double *BJTcolPrimeEmitPrimePtr; double *BJTbasePrimeBasePtr; double *BJTbasePrimeColPrimePtr; double *BJTbasePrimeEmitPrimePtr; double *BJTemitPrimeEmitPtr; double *BJTemitPrimeColPrimePtr; double *BJTemitPrimeBasePrimePtr; double *BJTcolColPtr; double *BJTbaseBasePtr; double *BJTemitEmitPtr; double *BJTcolPrimeColPrimePtr; double *BJTbasePrimeBasePrimePtr; double *BJTemitPrimeEmitPrimePtr; double *BJTsubstSubstPtr; double *BJTcolPrimeSubstPtr; double *BJTsubstColPrimePtr; double *BJTbaseColPrimePtr; double *BJTcolPrimeBasePtr; unsigned int BJToff; unsigned int BJTtempGiven; unsigned int BJTdtempGiven; unsigned int BJTareaGiven; unsigned int BJTareabGiven; unsigned int BJTareacGiven; unsigned int BJTmGiven; unsigned int BJTicVBEGiven; unsigned int BJTicVCEGiven; unsigned int BJTsenPertFlag; int BJTsenParmNo; double BJTcapbe; double BJTcapbc; double BJTcapcs; double BJTcapbx; double *BJTsens; double BJTdCoeffs[65]; double BJTnVar[3][7]; } *BJTinstances; char *BJTmodName; int BJTtype; double BJTtnom; double BJTsatCur; double BJTbetaF; double BJTemissionCoeffF; double BJTearlyVoltF; double BJTrollOffF; double BJTleakBEcurrent; double BJTc2; double BJTleakBEemissionCoeff; double BJTbetaR; double BJTemissionCoeffR; double BJTearlyVoltR; double BJTrollOffR; double BJTleakBCcurrent; double BJTc4; double BJTleakBCemissionCoeff; double BJTbaseResist; double BJTbaseCurrentHalfResist; double BJTminBaseResist; double BJTemitterResist; double BJTcollectorResist; double BJTdepletionCapBE; double BJTpotentialBE; double BJTjunctionExpBE; double BJTtransitTimeF; double BJTtransitTimeBiasCoeffF; double BJTtransitTimeFVBC; double BJTtransitTimeHighCurrentF; double BJTexcessPhase; double BJTdepletionCapBC; double BJTpotentialBC; double BJTjunctionExpBC; double BJTbaseFractionBCcap; double BJTtransitTimeR; double BJTcapCS; double BJTpotentialSubstrate; double BJTexponentialSubstrate; double BJTbetaExp; double BJTenergyGap; double BJTtempExpIS; double BJTdepletionCapCoeff; double BJTfNcoef; double BJTfNexp; double BJTinvEarlyVoltF; double BJTinvEarlyVoltR; double BJTinvRollOffF; double BJTinvRollOffR; double BJTcollectorConduct; double BJTemitterConduct; double BJTtransitTimeVBCFactor; double BJTexcessPhaseFactor; double BJTf2; double BJTf3; double BJTf6; double BJTf7; unsigned int BJTtnomGiven; unsigned int BJTsatCurGiven; unsigned int BJTbetaFGiven; unsigned int BJTemissionCoeffFGiven; unsigned int BJTearlyVoltFGiven; unsigned int BJTrollOffFGiven; unsigned int BJTleakBEcurrentGiven; unsigned int BJTc2Given; unsigned int BJTleakBEemissionCoeffGiven; unsigned int BJTbetaRGiven; unsigned int BJTemissionCoeffRGiven; unsigned int BJTearlyVoltRGiven; unsigned int BJTrollOffRGiven; unsigned int BJTleakBCcurrentGiven; unsigned int BJTc4Given; unsigned int BJTleakBCemissionCoeffGiven; unsigned int BJTbaseResistGiven; unsigned int BJTbaseCurrentHalfResistGiven; unsigned int BJTminBaseResistGiven; unsigned int BJTemitterResistGiven; unsigned int BJTcollectorResistGiven; unsigned int BJTdepletionCapBEGiven; unsigned int BJTpotentialBEGiven; unsigned int BJTjunctionExpBEGiven; unsigned int BJTtransitTimeFGiven; unsigned int BJTtransitTimeBiasCoeffFGiven; unsigned int BJTtransitTimeFVBCGiven; unsigned int BJTtransitTimeHighCurrentFGiven; unsigned int BJTexcessPhaseGiven; unsigned int BJTdepletionCapBCGiven; unsigned int BJTpotentialBCGiven; unsigned int BJTjunctionExpBCGiven; unsigned int BJTbaseFractionBCcapGiven; unsigned int BJTtransitTimeRGiven; unsigned int BJTcapCSGiven; unsigned int BJTpotentialSubstrateGiven; unsigned int BJTexponentialSubstrateGiven; unsigned int BJTbetaExpGiven; unsigned int BJTenergyGapGiven; unsigned int BJTtempExpISGiven; unsigned int BJTdepletionCapCoeffGiven; unsigned int BJTfNcoefGiven; unsigned int BJTfNexpGiven; } *

return_type: int

user_defined_types: union uIFvalue { int iValue; double rValue; struct sIFcomplex cValue; char *sValue; char *uValue; void *nValue; struct sIFparseTree *tValue; struct { int numValue; union { int *iVec; double *rVec; struct sIFcomplex *cVec; char **sVec; char **uVec; void **nVec; } vec; } v; }

user_defined_types: struct sGENmodel { int GENmodType; struct sGENmodel *GENnextModel; struct sGENinstance *GENinstances; char *GENmodName; }

user_defined_types: struct sBJTmodel { int BJTmodType; struct sBJTmodel *BJTnextModel; struct sBJTinstance *BJTinstances; char *BJTmodName; int BJTtype; double BJTtnom; double BJTsatCur; double BJTbetaF; double BJTemissionCoeffF; double BJTearlyVoltF; double BJTrollOffF; double BJTleakBEcurrent; double BJTc2; double BJTleakBEemissionCoeff; double BJTbetaR; double BJTemissionCoeffR; double BJTearlyVoltR; double BJTrollOffR; double BJTleakBCcurrent; double BJTc4; double BJTleakBCemissionCoeff; double BJTbaseResist; double BJTbaseCurrentHalfResist; double BJTminBaseResist; double BJTemitterResist; double BJTcollectorResist; double BJTdepletionCapBE; double BJTpotentialBE; double BJTjunctionExpBE; double BJTtransitTimeF; double BJTtransitTimeBiasCoeffF; double BJTtransitTimeFVBC; double BJTtransitTimeHighCurrentF; double BJTexcessPhase; double BJTdepletionCapBC; double BJTpotentialBC; double BJTjunctionExpBC; double BJTbaseFractionBCcap; double BJTtransitTimeR; double BJTcapCS; double BJTpotentialSubstrate; double BJTexponentialSubstrate; double BJTbetaExp; double BJTenergyGap; double BJTtempExpIS; double BJTdepletionCapCoeff; double BJTfNcoef; double BJTfNexp; double BJTinvEarlyVoltF; double BJTinvEarlyVoltR; double BJTinvRollOffF; double BJTinvRollOffR; double BJTcollectorConduct; double BJTemitterConduct; double BJTtransitTimeVBCFactor; double BJTexcessPhaseFactor; double BJTf2; double BJTf3; double BJTf6; double BJTf7; unsigned int BJTtnomGiven; unsigned int BJTsatCurGiven; unsigned int BJTbetaFGiven; unsigned int BJTemissionCoeffFGiven; unsigned int BJTearlyVoltFGiven; unsigned int BJTrollOffFGiven; unsigned int BJTleakBEcurrentGiven; unsigned int BJTc2Given; unsigned int BJTleakBEemissionCoeffGiven; unsigned int BJTbetaRGiven; unsigned int BJTemissionCoeffRGiven; unsigned int BJTearlyVoltRGiven; unsigned int BJTrollOffRGiven; unsigned int BJTleakBCcurrentGiven; unsigned int BJTc4Given; unsigned int BJTleakBCemissionCoeffGiven; unsigned int BJTbaseResistGiven; unsigned int BJTbaseCurrentHalfResistGiven; unsigned int BJTminBaseResistGiven; unsigned int BJTemitterResistGiven; unsigned int BJTcollectorResistGiven; unsigned int BJTdepletionCapBEGiven; unsigned int BJTpotentialBEGiven; unsigned int BJTjunctionExpBEGiven; unsigned int BJTtransitTimeFGiven; unsigned int BJTtransitTimeBiasCoeffFGiven; unsigned int BJTtransitTimeFVBCGiven; unsigned int BJTtransitTimeHighCurrentFGiven; unsigned int BJTexcessPhaseGiven; unsigned int BJTdepletionCapBCGiven; unsigned int BJTpotentialBCGiven; unsigned int BJTjunctionExpBCGiven; unsigned int BJTbaseFractionBCcapGiven; unsigned int BJTtransitTimeRGiven; unsigned int BJTcapCSGiven; unsigned int BJTpotentialSubstrateGiven; unsigned int BJTexponentialSubstrateGiven; unsigned int BJTbetaExpGiven; unsigned int BJTenergyGapGiven; unsigned int BJTtempExpISGiven; unsigned int BJTdepletionCapCoeffGiven; unsigned int BJTfNcoefGiven; unsigned int BJTfNexpGiven; }


INDtrunc

decompiled_code:
__int64 __fastcall INDtrunc(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v3; // r13
__int64 i; // rbx

if ( !a1 )
return 0LL;
v3 = a1;
do
{
for ( i = *(_QWORD *)(v3 + 16); i; i = *(_QWORD *)(i + 8) )
CKTterr(*(unsigned int *)(i + 24), a2, a3);
v3 = *(_QWORD *)(v3 + 8);
}
while ( v3 );
return 0LL;
}

original_code:
int
INDtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
    INDmodel *model = (INDmodel*)inModel;
    INDinstance *here;
    for( ; model!= ((void *)0); model = model->INDnextModel) {
        for(here = model->INDinstances ; here != ((void *)0) ;
                here = here->INDnextInstance) {
     if (here->INDowner != ARCHme) continue;
            CKTterr(here->INDstate,ckt,timeStep);
        }
    }
    return(0);
}

canonical_original_code:
int INDtrunc(struct sGENmodel *inModel, struct CKTcircuit *ckt, double *timeStep)
{
    struct sINDmodel *model = (INDmodel*)inModel;
    struct sINDinstance *here;
    for( ; model!= ((void *)0); model = model->INDnextModel) {
        for(here = model->INDinstances ; here != ((void *)0) ;
                here = here->INDnextInstance) {
     if (here->INDowner != ARCHme) continue;
            CKTterr(here->INDstate,ckt,timeStep);
        }
    }
    return(0);
}

variable_types: struct CKTcircuit { struct sGENmodel **CKThead; struct STATistics { int STATnumIter; int STATtranIter; int STAToldIter; int STATtimePts; int STATaccepted; int STATrejected; double STATtotAnalTime; double STATloadTime; double STATdecompTime; double STATsolveTime; double STATreorderTime; double STATcombineTime; double STATsyncTime; double STATtranTime; double STATtranDecompTime; double STATtranSolveTime; double STATtranLoadTime; double STATtranTruncTime; double STATtranCombTime; double STATtranSyncTime; double STATacTime; double STATacDecompTime; double STATacSolveTime; double STATacLoadTime; double STATacCombTime; double STATacSyncTime; } *CKTstat; double *CKTstates[8]; double CKTtime; double CKTdelta; double CKTdeltaOld[7]; double CKTtemp; double CKTnomTemp; double CKTvt; double CKTag[7]; double CKTagp[7]; int CKTorder; int CKTmaxOrder; int CKTintegrateMethod; void *CKTmatrix; int CKTniState; double *CKTrhs; double *CKTrhsOld; double *CKTrhsSpare; double *CKTirhs; double *CKTirhsOld; double *CKTirhsSpare; double *CKTpred; double *CKTsols[8]; double *CKTrhsOp; double *CKTsenRhs; double *CKTseniRhs; int CKTmaxEqNum; int CKTcurrentAnalysis; struct sCKTnode { char *name; int type; int number; double ic; double nodeset; double *ptr; struct sCKTnode *next; unsigned int icGiven; unsigned int nsGiven; } *CKTnodes; struct sCKTnode *CKTlastNode; int CKTnumStates; long CKTmode; int CKTbypass; int CKTdcMaxIter; int CKTdcTrcvMaxIter; int CKTtranMaxIter; int CKTbreakSize; int CKTbreak; double CKTsaveDelta; double CKTminBreak; double *CKTbreaks; double CKTabstol; double CKTpivotAbsTol; double CKTpivotRelTol; double CKTreltol; double CKTchgtol; double CKTvoltTol; double CKTgmin; double CKTgshunt; double CKTdelmin; double CKTtrtol; double CKTfinalTime; double CKTstep; double CKTmaxStep; double CKTinitTime; double CKTomega; double CKTsrcFact; double CKTdiagGmin; int CKTnumSrcSteps; int CKTnumGminSteps; double CKTgminFactor; int CKTnoncon; double CKTdefaultMosM; double CKTdefaultMosL; double CKTdefaultMosW; double CKTdefaultMosAD; double CKTdefaultMosAS; unsigned int CKThadNodeset; unsigned int CKTfixLimit; unsigned int CKTnoOpIter; unsigned int CKTisSetup; struct sJOB { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; } *CKTcurJob; struct SENstruct { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; int SENnumVal; char **SENdevices; char **SENparmNames; unsigned int SENinitflag; unsigned int SENicflag; unsigned int SENstatus; unsigned int SENacpertflag; int SENmode; int SENparms; double SENpertfac; double **SEN_Sap; double **SEN_RHS; double **SEN_iRHS; int SENsize; void *SEN_Jacmat; double *SEN_parmVal; char **SEN_parmName; } *CKTsenInfo; double *CKTtimePoints; double *CKTdeltaList; int CKTtimeListSize; int CKTtimeIndex; int CKTsizeIncr; unsigned int CKTtryToCompact; unsigned int CKTbadMos3; unsigned int CKTkeepOpInfo; unsigned int CKTcopyNodesets; unsigned int CKTnodeDamping; double CKTabsDv; double CKTrelDv; int CKTtroubleNode; struct sGENinstance *CKTtroubleElt; } *

variable_types:
timeStep
double *

variable_types: struct sINDmodel { int INDmodType; struct sINDmodel *INDnextModel; struct sINDinstance { struct sINDmodel *INDmodPtr; struct sINDinstance *INDnextInstance; char *INDname; int INDowner; int INDstate; int INDposNode; int INDnegNode; int INDbrEq; double INDinduct; double INDm; double INDtemp; double INDdtemp; double INDscale; double INDnt; double INDinitCond; double *INDposIbrptr; double *INDnegIbrptr; double *INDibrNegptr; double *INDibrPosptr; double *INDibrIbrptr; unsigned int INDindGiven; unsigned int INDicGiven; unsigned int INDmGiven; unsigned int INDtempGiven; unsigned int INDdtempGiven; unsigned int INDscaleGiven; unsigned int INDntGiven; int INDsenParmNo; } *INDinstances; char *INDmodName; double INDmInd; double INDtnom; double INDtempCoeff1; double INDtempCoeff2; double INDcsect; double INDlength; double INDmodNt; double INDmu; unsigned int INDtnomGiven; unsigned int INDtc1Given; unsigned int INDtc2Given; unsigned int INDcsectGiven; unsigned int INDlengthGiven; unsigned int INDmodNtGiven; unsigned int INDmuGiven; unsigned int INDmIndGiven; double INDspecInd; } *

variable_types: struct sINDinstance { struct sINDmodel { int INDmodType; struct sINDmodel *INDnextModel; struct sINDinstance *INDinstances; char *INDmodName; double INDmInd; double INDtnom; double INDtempCoeff1; double INDtempCoeff2; double INDcsect; double INDlength; double INDmodNt; double INDmu; unsigned int INDtnomGiven; unsigned int INDtc1Given; unsigned int INDtc2Given; unsigned int INDcsectGiven; unsigned int INDlengthGiven; unsigned int INDmodNtGiven; unsigned int INDmuGiven; unsigned int INDmIndGiven; double INDspecInd; } *INDmodPtr; struct sINDinstance *INDnextInstance; char *INDname; int INDowner; int INDstate; int INDposNode; int INDnegNode; int INDbrEq; double INDinduct; double INDm; double INDtemp; double INDdtemp; double INDscale; double INDnt; double INDinitCond; double *INDposIbrptr; double *INDnegIbrptr; double *INDibrNegptr; double *INDibrPosptr; double *INDibrIbrptr; unsigned int INDindGiven; unsigned int INDicGiven; unsigned int INDmGiven; unsigned int INDtempGiven; unsigned int INDdtempGiven; unsigned int INDscaleGiven; unsigned int INDntGiven; int INDsenParmNo; } *

user_defined_types: struct CKTcircuit { struct sGENmodel **CKThead; struct STATistics *CKTstat; double *CKTstates[8]; double CKTtime; double CKTdelta; double CKTdeltaOld[7]; double CKTtemp; double CKTnomTemp; double CKTvt; double CKTag[7]; double CKTagp[7]; int CKTorder; int CKTmaxOrder; int CKTintegrateMethod; void *CKTmatrix; int CKTniState; double *CKTrhs; double *CKTrhsOld; double *CKTrhsSpare; double *CKTirhs; double *CKTirhsOld; double *CKTirhsSpare; double *CKTpred; double *CKTsols[8]; double *CKTrhsOp; double *CKTsenRhs; double *CKTseniRhs; int CKTmaxEqNum; int CKTcurrentAnalysis; struct sCKTnode *CKTnodes; struct sCKTnode *CKTlastNode; int CKTnumStates; long CKTmode; int CKTbypass; int CKTdcMaxIter; int CKTdcTrcvMaxIter; int CKTtranMaxIter; int CKTbreakSize; int CKTbreak; double CKTsaveDelta; double CKTminBreak; double *CKTbreaks; double CKTabstol; double CKTpivotAbsTol; double CKTpivotRelTol; double CKTreltol; double CKTchgtol; double CKTvoltTol; double CKTgmin; double CKTgshunt; double CKTdelmin; double CKTtrtol; double CKTfinalTime; double CKTstep; double CKTmaxStep; double CKTinitTime; double CKTomega; double CKTsrcFact; double CKTdiagGmin; int CKTnumSrcSteps; int CKTnumGminSteps; double CKTgminFactor; int CKTnoncon; double CKTdefaultMosM; double CKTdefaultMosL; double CKTdefaultMosW; double CKTdefaultMosAD; double CKTdefaultMosAS; unsigned int CKThadNodeset; unsigned int CKTfixLimit; unsigned int CKTnoOpIter; unsigned int CKTisSetup; struct sJOB *CKTcurJob; struct SENstruct *CKTsenInfo; double *CKTtimePoints; double *CKTdeltaList; int CKTtimeListSize; int CKTtimeIndex; int CKTsizeIncr; unsigned int CKTtryToCompact; unsigned int CKTbadMos3; unsigned int CKTkeepOpInfo; unsigned int CKTcopyNodesets; unsigned int CKTnodeDamping; double CKTabsDv; double CKTrelDv; int CKTtroubleNode; struct sGENinstance *CKTtroubleElt; }

user_defined_types: struct sGENinstance { struct sGENmodel *GENmodPtr; struct sGENinstance *GENnextInstance; char *GENname; int GENowner; int GENstate; int GENnode1; int GENnode2; int GENnode3; int GENnode4; int GENnode5; int GENnode6; int GENnode7; }


MEStrunc

original_code:
int
MEStrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
    MESmodel *model = (MESmodel*)inModel;
    MESinstance *here;
    for( ; model != ((void *)0); model = model->MESnextModel) {
        for(here=model->MESinstances;here!=((void *)0);here = here->MESnextInstance){
     if (here->MESowner != ARCHme) continue;
            CKTterr(here->MESstate+9,ckt,timeStep);
            CKTterr(here->MESstate+11,ckt,timeStep);
        }
    }
    return(0);
}

canonical_original_code:
int MEStrunc(struct sGENmodel *inModel, struct CKTcircuit *ckt, double *timeStep)
{
    struct sMESmodel *model = (MESmodel*)inModel;
    struct sMESinstance *here;
    for( ; model != ((void *)0); model = model->MESnextModel) {
        for(here=model->MESinstances;here!=((void *)0);here = here->MESnextInstance){
     if (here->MESowner != ARCHme) continue;
            CKTterr(here->MESstate+9,ckt,timeStep);
            CKTterr(here->MESstate+11,ckt,timeStep);
        }
    }
    return(0);
}

variable_types: struct sMESinstance { struct sMESmodel { int MESmodType; struct sMESmodel *MESnextModel; struct sMESinstance *MESinstances; char *MESmodName; int MEStype; double MESthreshold; double MESalpha; double MESbeta; double MESlModulation; double MESb; double MESdrainResist; double MESsourceResist; double MEScapGS; double MEScapGD; double MESgatePotential; double MESgateSatCurrent; double MESdepletionCapCoeff; double MESfNcoef; double MESfNexp; double MESdrainConduct; double MESsourceConduct; double MESdepletionCap; double MESf1; double MESf2; double MESf3; double MESvcrit; unsigned int MESthresholdGiven; unsigned int MESalphaGiven; unsigned int MESbetaGiven; unsigned int MESlModulationGiven; unsigned int MESbGiven; unsigned int MESdrainResistGiven; unsigned int MESsourceResistGiven; unsigned int MEScapGSGiven; unsigned int MEScapGDGiven; unsigned int MESgatePotentialGiven; unsigned int MESgateSatCurrentGiven; unsigned int MESdepletionCapCoeffGiven; unsigned int MESfNcoefGiven; unsigned int MESfNexpGiven; } *MESmodPtr; struct sMESinstance *MESnextInstance; char *MESname; int MESowner; int MESstate; int MESdrainNode; int MESgateNode; int MESsourceNode; int MESdrainPrimeNode; int MESsourcePrimeNode; double MESarea; double MESm; double MESicVDS; double MESicVGS; double *MESdrainDrainPrimePtr; double *MESgateDrainPrimePtr; double *MESgateSourcePrimePtr; double *MESsourceSourcePrimePtr; double *MESdrainPrimeDrainPtr; double *MESdrainPrimeGatePtr; double *MESdrainPrimeSourcePrimePtr; double *MESsourcePrimeGatePtr; double *MESsourcePrimeSourcePtr; double *MESsourcePrimeDrainPrimePtr; double *MESdrainDrainPtr; double *MESgateGatePtr; double *MESsourceSourcePtr; double *MESdrainPrimeDrainPrimePtr; double *MESsourcePrimeSourcePrimePtr; int MESoff; unsigned int MESareaGiven; unsigned int MESmGiven; unsigned int MESicVDSGiven; unsigned int MESicVGSGiven; int MESmode; double MESdCoeffs[27]; double MESnVar[3][5]; } *

user_defined_types: struct sMESinstance { struct sMESmodel *MESmodPtr; struct sMESinstance *MESnextInstance; char *MESname; int MESowner; int MESstate; int MESdrainNode; int MESgateNode; int MESsourceNode; int MESdrainPrimeNode; int MESsourcePrimeNode; double MESarea; double MESm; double MESicVDS; double MESicVGS; double *MESdrainDrainPrimePtr; double *MESgateDrainPrimePtr; double *MESgateSourcePrimePtr; double *MESsourceSourcePrimePtr; double *MESdrainPrimeDrainPtr; double *MESdrainPrimeGatePtr; double *MESdrainPrimeSourcePrimePtr; double *MESsourcePrimeGatePtr; double *MESsourcePrimeSourcePtr; double *MESsourcePrimeDrainPrimePtr; double *MESdrainDrainPtr; double *MESgateGatePtr; double *MESsourceSourcePtr; double *MESdrainPrimeDrainPrimePtr; double *MESsourcePrimeSourcePrimePtr; int MESoff; unsigned int MESareaGiven; unsigned int MESmGiven; unsigned int MESicVDSGiven; unsigned int MESicVGSGiven; int MESmode; double MESdCoeffs[27]; double MESnVar[3][5]; }


CAPtrunc

decompiled_code:
__int64 __fastcall CAPtrunc(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v3; // r13
__int64 i; // rbx

if ( !a1 )
return 0LL;
v3 = a1;
do
{
for ( i = *(_QWORD *)(v3 + 16); i; i = *(_QWORD *)(i + 8) )
CKTterr(*(unsigned int *)(i + 24), a2, a3);
v3 = *(_QWORD *)(v3 + 8);
}
while ( v3 );
return 0LL;
}

original_code:
int
CAPtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
    CAPmodel *model = (CAPmodel*)inModel;
    CAPinstance *here;
    for( ; model!= ((void *)0); model = model->CAPnextModel) {
        for(here = model->CAPinstances ; here != ((void *)0) ;
                here = here->CAPnextInstance) {
     if (here->CAPowner != ARCHme) continue;
            CKTterr(here->CAPstate,ckt,timeStep);
        }
    }
    return(0);
}

canonical_original_code:
int CAPtrunc(struct sGENmodel *inModel, struct CKTcircuit *ckt, double *timeStep)
{
    struct sCAPmodel *model = (CAPmodel*)inModel;
    struct sCAPinstance *here;
    for( ; model!= ((void *)0); model = model->CAPnextModel) {
        for(here = model->CAPinstances ; here != ((void *)0) ;
                here = here->CAPnextInstance) {
     if (here->CAPowner != ARCHme) continue;
            CKTterr(here->CAPstate,ckt,timeStep);
        }
    }
    return(0);
}

variable_types: struct sCAPmodel { int CAPmodType; struct sCAPmodel *CAPnextModel; struct sCAPinstance { struct sCAPmodel *CAPmodPtr; struct sCAPinstance *CAPnextInstance; char *CAPname; int CAPowner; int CAPstate; int CAPposNode; int CAPnegNode; double CAPtemp; double CAPdtemp; double CAPcapac; double CAPinitCond; double CAPwidth; double CAPlength; double CAPscale; double CAPm; double *CAPposPosptr; double *CAPnegNegptr; double *CAPposNegptr; double *CAPnegPosptr; unsigned int CAPcapGiven; unsigned int CAPicGiven; unsigned int CAPwidthGiven; unsigned int CAPlengthGiven; unsigned int CAPtempGiven; unsigned int CAPdtempGiven; unsigned int CAPscaleGiven; unsigned int CAPmGiven; int CAPsenParmNo; } *CAPinstances; char *CAPmodName; double CAPtnom; double CAPtempCoeff1; double CAPtempCoeff2; double CAPmCap; double CAPcj; double CAPcjsw; double CAPdefWidth; double CAPdefLength; double CAPnarrow; double CAPshort; double CAPdi; double CAPthick; unsigned int CAPmCapGiven; unsigned int CAPcjGiven; unsigned int CAPcjswGiven; unsigned int CAPdefWidthGiven; unsigned int CAPdefLengthGiven; unsigned int CAPnarrowGiven; unsigned int CAPshortGiven; unsigned int CAPtnomGiven; unsigned int CAPtc1Given; unsigned int CAPtc2Given; unsigned int CAPdiGiven; unsigned int CAPthickGiven; } *

variable_types: struct sCAPinstance { struct sCAPmodel { int CAPmodType; struct sCAPmodel *CAPnextModel; struct sCAPinstance *CAPinstances; char *CAPmodName; double CAPtnom; double CAPtempCoeff1; double CAPtempCoeff2; double CAPmCap; double CAPcj; double CAPcjsw; double CAPdefWidth; double CAPdefLength; double CAPnarrow; double CAPshort; double CAPdi; double CAPthick; unsigned int CAPmCapGiven; unsigned int CAPcjGiven; unsigned int CAPcjswGiven; unsigned int CAPdefWidthGiven; unsigned int CAPdefLengthGiven; unsigned int CAPnarrowGiven; unsigned int CAPshortGiven; unsigned int CAPtnomGiven; unsigned int CAPtc1Given; unsigned int CAPtc2Given; unsigned int CAPdiGiven; unsigned int CAPthickGiven; } *CAPmodPtr; struct sCAPinstance *CAPnextInstance; char *CAPname; int CAPowner; int CAPstate; int CAPposNode; int CAPnegNode; double CAPtemp; double CAPdtemp; double CAPcapac; double CAPinitCond; double CAPwidth; double CAPlength; double CAPscale; double CAPm; double *CAPposPosptr; double *CAPnegNegptr; double *CAPposNegptr; double *CAPnegPosptr; unsigned int CAPcapGiven; unsigned int CAPicGiven; unsigned int CAPwidthGiven; unsigned int CAPlengthGiven; unsigned int CAPtempGiven; unsigned int CAPdtempGiven; unsigned int CAPscaleGiven; unsigned int CAPmGiven; int CAPsenParmNo; } *


BJTparam

original_code:
int
BJTparam(int param, IFvalue *value, GENinstance *instPtr, IFvalue *select)
{
    BJTinstance *here = (BJTinstance*)instPtr;
    switch(param) {
        case 1:
            here->BJTarea = value->rValue;
            here->BJTareaGiven = 1;
            break;
 case 10:
            here->BJTareab = value->rValue;
            here->BJTareabGiven = 1;
            break;
 case 11:
            here->BJTareac = value->rValue;
            here->BJTareacGiven = 1;
            break;
        case 9:
            here->BJTm = value->rValue;
            here->BJTmGiven = 1;
            break;
        case 7:
            here->BJTtemp = value->rValue + (273.15);
            here->BJTtempGiven = 1;
            break;
        case 8:
            here->BJTdtemp = value->rValue;
            here->BJTdtempGiven = 1;
            break;
        case 2:
            here->BJToff = value->iValue;
            break;
        case 3:
            here->BJTicVBE = value->rValue;
            here->BJTicVBEGiven = 1;
            break;
        case 4:
            here->BJTicVCE = value->rValue;
            here->BJTicVCEGiven = 1;
            break;
        case 6:
            here->BJTsenParmNo = value->iValue;
            break;
        case 5 :
            switch(value->v.numValue) {
                case 2:
                    here->BJTicVCE = *(value->v.vec.rVec+1);
                    here->BJTicVCEGiven = 1;
                case 1:
                    here->BJTicVBE = *(value->v.vec.rVec);
                    here->BJTicVBEGiven = 1;
                    break;
                default:
                    return(7);
            }
            break;
        default:
            return(7);
    }
    return(0);
}

canonical_original_code:
int BJTparam(int param, union uIFvalue *value, struct sGENinstance *instPtr, union uIFvalue *select)
{
    struct sBJTinstance *here = (BJTinstance*)instPtr;
    switch(param) {
        case 1:
            here->BJTarea = value->rValue;
            here->BJTareaGiven = 1;
            break;
 case 10:
            here->BJTareab = value->rValue;
            here->BJTareabGiven = 1;
            break;
 case 11:
            here->BJTareac = value->rValue;
            here->BJTareacGiven = 1;
            break;
        case 9:
            here->BJTm = value->rValue;
            here->BJTmGiven = 1;
            break;
        case 7:
            here->BJTtemp = value->rValue + (273.15);
            here->BJTtempGiven = 1;
            break;
        case 8:
            here->BJTdtemp = value->rValue;
            here->BJTdtempGiven = 1;
            break;
        case 2:
            here->BJToff = value->iValue;
            break;
        case 3:
            here->BJTicVBE = value->rValue;
            here->BJTicVBEGiven = 1;
            break;
        case 4:
            here->BJTicVCE = value->rValue;
            here->BJTicVCEGiven = 1;
            break;
        case 6:
            here->BJTsenParmNo = value->iValue;
            break;
        case 5 :
            switch(value->v.numValue) {
                case 2:
                    here->BJTicVCE = *(value->v.vec.rVec+1);
                    here->BJTicVCEGiven = 1;
                case 1:
                    here->BJTicVBE = *(value->v.vec.rVec);
                    here->BJTicVBEGiven = 1;
                    break;
                default:
                    return(7);
            }
            break;
        default:
            return(7);
    }
    return(0);
}

variable_types: struct sGENinstance { struct sGENmodel { int GENmodType; struct sGENmodel *GENnextModel; struct sGENinstance *GENinstances; char *GENmodName; } *GENmodPtr; struct sGENinstance *GENnextInstance; char *GENname; int GENowner; int GENstate; int GENnode1; int GENnode2; int GENnode3; int GENnode4; int GENnode5; int GENnode6; int GENnode7; } *

variable_types:
select
union uIFvalue *

variable_types: struct sBJTinstance { struct sBJTmodel { int BJTmodType; struct sBJTmodel *BJTnextModel; struct sBJTinstance *BJTinstances; char *BJTmodName; int BJTtype; double BJTtnom; double BJTsatCur; double BJTbetaF; double BJTemissionCoeffF; double BJTearlyVoltF; double BJTrollOffF; double BJTleakBEcurrent; double BJTc2; double BJTleakBEemissionCoeff; double BJTbetaR; double BJTemissionCoeffR; double BJTearlyVoltR; double BJTrollOffR; double BJTleakBCcurrent; double BJTc4; double BJTleakBCemissionCoeff; double BJTbaseResist; double BJTbaseCurrentHalfResist; double BJTminBaseResist; double BJTemitterResist; double BJTcollectorResist; double BJTdepletionCapBE; double BJTpotentialBE; double BJTjunctionExpBE; double BJTtransitTimeF; double BJTtransitTimeBiasCoeffF; double BJTtransitTimeFVBC; double BJTtransitTimeHighCurrentF; double BJTexcessPhase; double BJTdepletionCapBC; double BJTpotentialBC; double BJTjunctionExpBC; double BJTbaseFractionBCcap; double BJTtransitTimeR; double BJTcapCS; double BJTpotentialSubstrate; double BJTexponentialSubstrate; double BJTbetaExp; double BJTenergyGap; double BJTtempExpIS; double BJTdepletionCapCoeff; double BJTfNcoef; double BJTfNexp; double BJTinvEarlyVoltF; double BJTinvEarlyVoltR; double BJTinvRollOffF; double BJTinvRollOffR; double BJTcollectorConduct; double BJTemitterConduct; double BJTtransitTimeVBCFactor; double BJTexcessPhaseFactor; double BJTf2; double BJTf3; double BJTf6; double BJTf7; unsigned int BJTtnomGiven; unsigned int BJTsatCurGiven; unsigned int BJTbetaFGiven; unsigned int BJTemissionCoeffFGiven; unsigned int BJTearlyVoltFGiven; unsigned int BJTrollOffFGiven; unsigned int BJTleakBEcurrentGiven; unsigned int BJTc2Given; unsigned int BJTleakBEemissionCoeffGiven; unsigned int BJTbetaRGiven; unsigned int BJTemissionCoeffRGiven; unsigned int BJTearlyVoltRGiven; unsigned int BJTrollOffRGiven; unsigned int BJTleakBCcurrentGiven; unsigned int BJTc4Given; unsigned int BJTleakBCemissionCoeffGiven; unsigned int BJTbaseResistGiven; unsigned int BJTbaseCurrentHalfResistGiven; unsigned int BJTminBaseResistGiven; unsigned int BJTemitterResistGiven; unsigned int BJTcollectorResistGiven; unsigned int BJTdepletionCapBEGiven; unsigned int BJTpotentialBEGiven; unsigned int BJTjunctionExpBEGiven; unsigned int BJTtransitTimeFGiven; unsigned int BJTtransitTimeBiasCoeffFGiven; unsigned int BJTtransitTimeFVBCGiven; unsigned int BJTtransitTimeHighCurrentFGiven; unsigned int BJTexcessPhaseGiven; unsigned int BJTdepletionCapBCGiven; unsigned int BJTpotentialBCGiven; unsigned int BJTjunctionExpBCGiven; unsigned int BJTbaseFractionBCcapGiven; unsigned int BJTtransitTimeRGiven; unsigned int BJTcapCSGiven; unsigned int BJTpotentialSubstrateGiven; unsigned int BJTexponentialSubstrateGiven; unsigned int BJTbetaExpGiven; unsigned int BJTenergyGapGiven; unsigned int BJTtempExpISGiven; unsigned int BJTdepletionCapCoeffGiven; unsigned int BJTfNcoefGiven; unsigned int BJTfNexpGiven; } *BJTmodPtr; struct sBJTinstance *BJTnextInstance; char *BJTname; int BJTowner; int BJTstate; int BJTcolNode; int BJTbaseNode; int BJTemitNode; int BJTsubstNode; int BJTcolPrimeNode; int BJTbasePrimeNode; int BJTemitPrimeNode; double BJTarea; double BJTareab; double BJTareac; double BJTm; double BJTicVBE; double BJTicVCE; double BJTtemp; double BJTdtemp; double BJTtSatCur; double BJTtBetaF; double BJTtBetaR; double BJTtBEleakCur; double BJTtBCleakCur; double BJTtBEcap; double BJTtBEpot; double BJTtBCcap; double BJTtBCpot; double BJTtDepCap; double BJTtf1; double BJTtf4; double BJTtf5; double BJTtVcrit; double *BJTcolColPrimePtr; double *BJTbaseBasePrimePtr; double *BJTemitEmitPrimePtr; double *BJTcolPrimeColPtr; double *BJTcolPrimeBasePrimePtr; double *BJTcolPrimeEmitPrimePtr; double *BJTbasePrimeBasePtr; double *BJTbasePrimeColPrimePtr; double *BJTbasePrimeEmitPrimePtr; double *BJTemitPrimeEmitPtr; double *BJTemitPrimeColPrimePtr; double *BJTemitPrimeBasePrimePtr; double *BJTcolColPtr; double *BJTbaseBasePtr; double *BJTemitEmitPtr; double *BJTcolPrimeColPrimePtr; double *BJTbasePrimeBasePrimePtr; double *BJTemitPrimeEmitPrimePtr; double *BJTsubstSubstPtr; double *BJTcolPrimeSubstPtr; double *BJTsubstColPrimePtr; double *BJTbaseColPrimePtr; double *BJTcolPrimeBasePtr; unsigned int BJToff; unsigned int BJTtempGiven; unsigned int BJTdtempGiven; unsigned int BJTareaGiven; unsigned int BJTareabGiven; unsigned int BJTareacGiven; unsigned int BJTmGiven; unsigned int BJTicVBEGiven; unsigned int BJTicVCEGiven; unsigned int BJTsenPertFlag; int BJTsenParmNo; double BJTcapbe; double BJTcapbc; double BJTcapcs; double BJTcapbx; double *BJTsens; double BJTdCoeffs[65]; double BJTnVar[3][7]; } *

user_defined_types: struct sBJTinstance { struct sBJTmodel *BJTmodPtr; struct sBJTinstance *BJTnextInstance; char *BJTname; int BJTowner; int BJTstate; int BJTcolNode; int BJTbaseNode; int BJTemitNode; int BJTsubstNode; int BJTcolPrimeNode; int BJTbasePrimeNode; int BJTemitPrimeNode; double BJTarea; double BJTareab; double BJTareac; double BJTm; double BJTicVBE; double BJTicVCE; double BJTtemp; double BJTdtemp; double BJTtSatCur; double BJTtBetaF; double BJTtBetaR; double BJTtBEleakCur; double BJTtBCleakCur; double BJTtBEcap; double BJTtBEpot; double BJTtBCcap; double BJTtBCpot; double BJTtDepCap; double BJTtf1; double BJTtf4; double BJTtf5; double BJTtVcrit; double *BJTcolColPrimePtr; double *BJTbaseBasePrimePtr; double *BJTemitEmitPrimePtr; double *BJTcolPrimeColPtr; double *BJTcolPrimeBasePrimePtr; double *BJTcolPrimeEmitPrimePtr; double *BJTbasePrimeBasePtr; double *BJTbasePrimeColPrimePtr; double *BJTbasePrimeEmitPrimePtr; double *BJTemitPrimeEmitPtr; double *BJTemitPrimeColPrimePtr; double *BJTemitPrimeBasePrimePtr; double *BJTcolColPtr; double *BJTbaseBasePtr; double *BJTemitEmitPtr; double *BJTcolPrimeColPrimePtr; double *BJTbasePrimeBasePrimePtr; double *BJTemitPrimeEmitPrimePtr; double *BJTsubstSubstPtr; double *BJTcolPrimeSubstPtr; double *BJTsubstColPrimePtr; double *BJTbaseColPrimePtr; double *BJTcolPrimeBasePtr; unsigned int BJToff; unsigned int BJTtempGiven; unsigned int BJTdtempGiven; unsigned int BJTareaGiven; unsigned int BJTareabGiven; unsigned int BJTareacGiven; unsigned int BJTmGiven; unsigned int BJTicVBEGiven; unsigned int BJTicVCEGiven; unsigned int BJTsenPertFlag; int BJTsenParmNo; double BJTcapbe; double BJTcapbc; double BJTcapcs; double BJTcapbx; double *BJTsens; double BJTdCoeffs[65]; double BJTnVar[3][7]; }

user_defined_types: struct sIFcomplex { double real; double imag; }

user_defined_types: struct sIFparseTree { int numVars; int *varTypes; union uIFvalue *vars; int (*IFeval)(struct sIFparseTree *, double, double *, double *, double *); }