repo: gserdyuk/gnucap-a

original_code:
int
B2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
{
    B2model *model = (B2model*)inModel;
    B2instance *here;
    int error;
    CKTnode *tmp;
    for( ; model != ((void *)0); model = model->B2nextModel ) {
        if( ! model->B2typeGiven) {
            model->B2type = 1;
        }
        if( ! model->B2vfb0Given) {
            model->B2vfb0 = -1.0;
        }
        if( ! model->B2vfbLGiven) {
            model->B2vfbL = 0.0;
        }
        if( ! model->B2vfbWGiven) {
            model->B2vfbW = 0.0;
        }
        if( ! model->B2phi0Given) {
            model->B2phi0 = 0.75;
        }
        if( ! model->B2phiLGiven) {
            model->B2phiL = 0.0;
        }
        if( ! model->B2phiWGiven) {
            model->B2phiW = 0.0;
        }
        if( ! model->B2k10Given) {
            model->B2k10 = 0.8;
        }
        if( ! model->B2k1LGiven) {
            model->B2k1L = 0.0;
        }
        if( ! model->B2k1WGiven) {
            model->B2k1W = 0.0;
        }
        if( ! model->B2k20Given) {
            model->B2k20 = 0.0;
        }
        if( ! model->B2k2LGiven) {
            model->B2k2L = 0.0;
        }
        if( ! model->B2k2WGiven) {
            model->B2k2W = 0.0;
        }
        if( ! model->B2eta00Given) {
            model->B2eta00 = 0.0;
        }
        if( ! model->B2eta0LGiven) {
            model->B2eta0L = 0.0;
        }
        if( ! model->B2eta0WGiven) {
            model->B2eta0W = 0.0;
        }
        if( ! model->B2etaB0Given) {
            model->B2etaB0 = 0.0;
        }
        if( ! model->B2etaBLGiven) {
            model->B2etaBL = 0.0;
        }
        if( ! model->B2etaBWGiven) {
            model->B2etaBW = 0.0;
        }
        if( ! model->B2deltaLGiven) {
            model->B2deltaL = 0.0;
        }
        if( ! model->B2deltaWGiven) {
            model->B2deltaW = 0.0;
        }
        if( ! model->B2ua00Given) {
            model->B2ua00 = 0.2;
        }
        if( ! model->B2ua0LGiven) {
            model->B2ua0L = 0.0;
        }
        if( ! model->B2ua0WGiven) {
            model->B2ua0W = 0.0;
        }
        if( ! model->B2uaB0Given) {
            model->B2uaB0 = 0.0;
        }
        if( ! model->B2uaBLGiven) {
            model->B2uaBL = 0.0;
        }
        if( ! model->B2uaBWGiven) {
            model->B2uaBW = 0.0;
        }
        if( ! model->B2ub00Given) {
            model->B2ub00 = 0.0;
        }
        if( ! model->B2ub0LGiven) {
            model->B2ub0L = 0.0;
        }
        if( ! model->B2ub0WGiven) {
            model->B2ub0W = 0.0;
        }
        if( ! model->B2ubB0Given) {
            model->B2ubB0 = 0.0;
        }
        if( ! model->B2ubBLGiven) {
            model->B2ubBL = 0.0;
        }
        if( ! model->B2ubBWGiven) {
            model->B2ubBW = 0.0;
        }
        if( ! model->B2u100Given) {
            model->B2u100 = 0.1;
        }
        if( ! model->B2u10LGiven) {
            model->B2u10L = 0.0;
        }
        if( ! model->B2u10WGiven) {
            model->B2u10W = 0.0;
        }
        if( ! model->B2u1B0Given) {
            model->B2u1B0 = 0.0;
        }
        if( ! model->B2u1BLGiven) {
            model->B2u1BL = 0.0;
        }
        if( ! model->B2u1BWGiven) {
            model->B2u1BW = 0.0;
        }
        if( ! model->B2u1D0Given) {
            model->B2u1D0 = 0.0;
        }
        if( ! model->B2u1DLGiven) {
            model->B2u1DL = 0.0;
        }
        if( ! model->B2u1DWGiven) {
            model->B2u1DW = 0.0;
        }
        if( ! model->B2mob00Given) {
            model->B2mob00 = 400.0;
        }
        if( ! model->B2mob0B0Given) {
            model->B2mob0B0 = 0.0;
        }
        if( ! model->B2mob0BLGiven) {
            model->B2mob0BL = 0.0;
        }
        if( ! model->B2mob0BWGiven) {
            model->B2mob0BW = 0.0;
        }
        if( ! model->B2mobs00Given) {
            model->B2mobs00 = 500.0;
        }
        if( ! model->B2mobs0LGiven) {
            model->B2mobs0L = 0.0;
        }
        if( ! model->B2mobs0WGiven) {
            model->B2mobs0W = 0.0;
        }
        if( ! model->B2mobsB0Given) {
            model->B2mobsB0 = 0.0;
        }
        if( ! model->B2mobsBLGiven) {
            model->B2mobsBL = 0.0;
        }
        if( ! model->B2mobsBWGiven) {
            model->B2mobsBW = 0.0;
        }
        if( ! model->B2mob200Given) {
            model->B2mob200 = 1.5;
        }
        if( ! model->B2mob20LGiven) {
            model->B2mob20L = 0.0;
        }
        if( ! model->B2mob20WGiven) {
            model->B2mob20W = 0.0;
        }
        if( ! model->B2mob2B0Given) {
            model->B2mob2B0 = 0.0;
        }
        if( ! model->B2mob2BLGiven) {
            model->B2mob2BL = 0.0;
        }
        if( ! model->B2mob2BWGiven) {
            model->B2mob2BW = 0.0;
        }
        if( ! model->B2mob2G0Given) {
            model->B2mob2G0 = 0.0;
        }
        if( ! model->B2mob2GLGiven) {
            model->B2mob2GL = 0.0;
        }
        if( ! model->B2mob2GWGiven) {
            model->B2mob2GW = 0.0;
        }
        if( ! model->B2mob300Given) {
            model->B2mob300 = 10;
        }
        if( ! model->B2mob30LGiven) {
            model->B2mob30L = 0.0;
        }
        if( ! model->B2mob30WGiven) {
            model->B2mob30W = 0.0;
        }
        if( ! model->B2mob3B0Given) {
            model->B2mob3B0 = 0.0;
        }
        if( ! model->B2mob3BLGiven) {
            model->B2mob3BL = 0.0;
        }
        if( ! model->B2mob3BWGiven) {
            model->B2mob3BW = 0.0;
        }
        if( ! model->B2mob3G0Given) {
            model->B2mob3G0 = 0.0;
        }
        if( ! model->B2mob3GLGiven) {
            model->B2mob3GL = 0.0;
        }
        if( ! model->B2mob3GWGiven) {
            model->B2mob3GW = 0.0;
        }
        if( ! model->B2mob400Given) {
            model->B2mob400 = 0.0;
        }
        if( ! model->B2mob40LGiven) {
            model->B2mob40L = 0.0;
        }
        if( ! model->B2mob40WGiven) {
            model->B2mob40W = 0.0;
        }
        if( ! model->B2mob4B0Given) {
            model->B2mob4B0 = 0.0;
        }
        if( ! model->B2mob4BLGiven) {
            model->B2mob4BL = 0.0;
        }
        if( ! model->B2mob4BWGiven) {
            model->B2mob4BW = 0.0;
        }
        if( ! model->B2mob4G0Given) {
            model->B2mob4G0 = 0.0;
        }
        if( ! model->B2mob4GLGiven) {
            model->B2mob4GL = 0.0;
        }
        if( ! model->B2mob4GWGiven) {
            model->B2mob4GW = 0.0;
        }
        if( ! model->B2n00Given) {
            model->B2n00 = 1.4;
        }
        if( ! model->B2n0LGiven) {
            model->B2n0L = 0.0;
        }
        if( ! model->B2n0WGiven) {
            model->B2n0W = 0.0;
        }
        if( ! model->B2nB0Given) {
            model->B2nB0 = 0.5;
        }
        if( ! model->B2nBLGiven) {
            model->B2nBL = 0.0;
        }
        if( ! model->B2nBWGiven) {
            model->B2nBW = 0.0;
        }
        if( ! model->B2nD0Given) {
            model->B2nD0 = 0.0;
        }
        if( ! model->B2nDLGiven) {
            model->B2nDL = 0.0;
        }
        if( ! model->B2nDWGiven) {
            model->B2nDW = 0.0;
        }
        if( ! model->B2vof00Given) {
            model->B2vof00 = 1.8;
        }
        if( ! model->B2vof0LGiven) {
            model->B2vof0L = 0.0;
        }
        if( ! model->B2vof0WGiven) {
            model->B2vof0W = 0.0;
        }
        if( ! model->B2vofB0Given) {
            model->B2vofB0 = 0.0;
        }
        if( ! model->B2vofBLGiven) {
            model->B2vofBL = 0.0;
        }
        if( ! model->B2vofBWGiven) {
            model->B2vofBW = 0.0;
        }
        if( ! model->B2vofD0Given) {
            model->B2vofD0 = 0.0;
        }
        if( ! model->B2vofDLGiven) {
            model->B2vofDL = 0.0;
        }
        if( ! model->B2vofDWGiven) {
            model->B2vofDW = 0.0;
        }
        if( ! model->B2ai00Given) {
            model->B2ai00 = 0.0;
        }
        if( ! model->B2ai0LGiven) {
            model->B2ai0L = 0.0;
        }
        if( ! model->B2ai0WGiven) {
            model->B2ai0W = 0.0;
        }
        if( ! model->B2aiB0Given) {
            model->B2aiB0 = 0.0;
        }
        if( ! model->B2aiBLGiven) {
            model->B2aiBL = 0.0;
        }
        if( ! model->B2aiBWGiven) {
            model->B2aiBW = 0.0;
        }
        if( ! model->B2bi00Given) {
            model->B2bi00 = 0.0;
        }
        if( ! model->B2bi0LGiven) {
            model->B2bi0L = 0.0;
        }
        if( ! model->B2bi0WGiven) {
            model->B2bi0W = 0.0;
        }
        if( ! model->B2biB0Given) {
            model->B2biB0 = 0.0;
        }
        if( ! model->B2biBLGiven) {
            model->B2biBL = 0.0;
        }
        if( ! model->B2biBWGiven) {
            model->B2biBW = 0.0;
        }
        if( ! model->B2vghigh0Given) {
            model->B2vghigh0 = 0.2;
        }
        if( ! model->B2vghighLGiven) {
            model->B2vghighL = 0.0;
        }
        if( ! model->B2vghighWGiven) {
            model->B2vghighW = 0.0;
        }
        if( ! model->B2vglow0Given) {
            model->B2vglow0 = -0.15;
        }
        if( ! model->B2vglowLGiven) {
            model->B2vglowL = 0.0;
        }
        if( ! model->B2vglowWGiven) {
            model->B2vglowW = 0.0;
        }
        if( ! model->B2toxGiven) {
            model->B2tox = 0.03;
        }
        if( ! model->B2tempGiven) {
            model->B2temp = 27.0;
        }
        if( ! model->B2vddGiven) {
            model->B2vdd = 5.0;
        }
        if( ! model->B2vggGiven) {
            model->B2vgg = 5.0;
        }
        if( ! model->B2vbbGiven) {
            model->B2vbb = 5.0;
        }
        if( ! model->B2gateDrainOverlapCapGiven) {
            model->B2gateDrainOverlapCap = 0.0;
        }
        if( ! model->B2gateSourceOverlapCapGiven) {
            model->B2gateSourceOverlapCap = 0.0;
        }
        if( ! model->B2gateBulkOverlapCapGiven) {
            model->B2gateBulkOverlapCap = 0.0;
        }
        if( ! model->B2channelChargePartitionFlagGiven) {
            model->B2channelChargePartitionFlag = 0.0;
        }
        if( ! model->B2sheetResistanceGiven) {
            model->B2sheetResistance = 0.0;
        }
        if( ! model->B2unitAreaJctCapGiven) {
            model->B2unitAreaJctCap = 0.0;
        }
        if( ! model->B2unitLengthSidewallJctCapGiven) {
            model->B2unitLengthSidewallJctCap = 0.0;
        }
        if( ! model->B2jctSatCurDensityGiven) {
            model->B2jctSatCurDensity = 0.0;
        }
        if( ! model->B2bulkJctPotentialGiven) {
            model->B2bulkJctPotential = 0.0;
        }
        if( ! model->B2sidewallJctPotentialGiven) {
            model->B2sidewallJctPotential = 0.0;
        }
        if( ! model->B2bulkJctBotGradingCoeffGiven) {
            model->B2bulkJctBotGradingCoeff = 0.0;
        }
        if( ! model->B2bulkJctSideGradingCoeffGiven) {
            model->B2bulkJctSideGradingCoeff = 0.0;
        }
        if( ! model->B2defaultWidthGiven) {
            model->B2defaultWidth = 10.0;
        }
        if( ! model->B2deltaLengthGiven) {
            model->B2deltaLength = 0.0;
        }
        for (here = model->B2instances; here != ((void *)0) ;
                here=here->B2nextInstance) {
     if (here->B2owner == ARCHme) {
  here->B2states = *states;
  *states += 35;
     }
            if(!here->B2drainAreaGiven) {
                here->B2drainArea = 0;
            }
            if(!here->B2drainPerimeterGiven) {
                here->B2drainPerimeter = 0;
            }
            if(!here->B2drainSquaresGiven) {
                here->B2drainSquares = 1;
            }
            if(!here->B2icVBSGiven) {
                here->B2icVBS = 0;
            }
            if(!here->B2icVDSGiven) {
                here->B2icVDS = 0;
            }
            if(!here->B2icVGSGiven) {
                here->B2icVGS = 0;
            }
            if(!here->B2lGiven) {
                here->B2l = 5e-6;
            }
            if(!here->B2sourceAreaGiven) {
                here->B2sourceArea = 0;
            }
            if(!here->B2sourcePerimeterGiven) {
                here->B2sourcePerimeter = 0;
            }
            if(!here->B2sourceSquaresGiven) {
                here->B2sourceSquares = 1;
            }
            if(!here->B2vdsatGiven) {
                here->B2vdsat = 0;
            }
            if(!here->B2vonGiven) {
                here->B2von = 0;
            }
            if(!here->B2wGiven) {
                here->B2w = 5e-6;
            }
            if(!here->B2mGiven) {
                here->B2m = 1.0;
            }
            if( (model->B2sheetResistance != 0) &&
                    (here->B2drainSquares != 0.0 ) &&
                    (here->B2dNodePrime == 0) ) {
                error = CKTmkVolt(ckt,&tmp,here->B2name,"drain");
               if(error) return(error);
                here->B2dNodePrime = tmp->number;
                 if (ckt->CKTcopyNodesets) {
       CKTnode *tmpNode;
       IFuid tmpName;
       if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==0) {
    if (tmpNode->nsGiven) {
        tmp->nodeset=tmpNode->nodeset;
        tmp->nsGiven=tmpNode->nsGiven;
    }
       }
   }
            } else {
                    here->B2dNodePrime = here->B2dNode;
            }
            if( (model->B2sheetResistance != 0) &&
                    (here->B2sourceSquares != 0.0 ) &&
                    (here->B2sNodePrime == 0) ) {
                if(here->B2sNodePrime == 0) {
                    error = CKTmkVolt(ckt,&tmp,here->B2name,"source");
                    if(error)
   return(error);
                    here->B2sNodePrime = tmp->number;
                    if (ckt->CKTcopyNodesets) {
   CKTnode *tmpNode;
   IFuid tmpName;
   if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==0) {
       if (tmpNode->nsGiven) {
    tmp->nodeset=tmpNode->nodeset;
    tmp->nsGiven=tmpNode->nsGiven;
       }
                  }
                }
                }
            } else {
                here->B2sNodePrime = here->B2sNode;
            }
            if((here->B2DdPtr = SMPmakeElt(matrix,here->B2dNode,here->B2dNode))==(double *)((void *)0)){ return(8);}
            if((here->B2GgPtr = SMPmakeElt(matrix,here->B2gNode,here->B2gNode))==(double *)((void *)0)){ return(8);}
            if((here->B2SsPtr = SMPmakeElt(matrix,here->B2sNode,here->B2sNode))==(double *)((void *)0)){ return(8);}
            if((here->B2BbPtr = SMPmakeElt(matrix,here->B2bNode,here->B2bNode))==(double *)((void *)0)){ return(8);}
            if((here->B2DPdpPtr = SMPmakeElt(matrix,here->B2dNodePrime,here->B2dNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2SPspPtr = SMPmakeElt(matrix,here->B2sNodePrime,here->B2sNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2DdpPtr = SMPmakeElt(matrix,here->B2dNode,here->B2dNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2GbPtr = SMPmakeElt(matrix,here->B2gNode,here->B2bNode))==(double *)((void *)0)){ return(8);}
            if((here->B2GdpPtr = SMPmakeElt(matrix,here->B2gNode,here->B2dNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2GspPtr = SMPmakeElt(matrix,here->B2gNode,here->B2sNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2SspPtr = SMPmakeElt(matrix,here->B2sNode,here->B2sNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2BdpPtr = SMPmakeElt(matrix,here->B2bNode,here->B2dNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2BspPtr = SMPmakeElt(matrix,here->B2bNode,here->B2sNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2DPspPtr = SMPmakeElt(matrix,here->B2dNodePrime,here->B2sNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2DPdPtr = SMPmakeElt(matrix,here->B2dNodePrime,here->B2dNode))==(double *)((void *)0)){ return(8);}
            if((here->B2BgPtr = SMPmakeElt(matrix,here->B2bNode,here->B2gNode))==(double *)((void *)0)){ return(8);}
            if((here->B2DPgPtr = SMPmakeElt(matrix,here->B2dNodePrime,here->B2gNode))==(double *)((void *)0)){ return(8);}
            if((here->B2SPgPtr = SMPmakeElt(matrix,here->B2sNodePrime,here->B2gNode))==(double *)((void *)0)){ return(8);}
            if((here->B2SPsPtr = SMPmakeElt(matrix,here->B2sNodePrime,here->B2sNode))==(double *)((void *)0)){ return(8);}
            if((here->B2DPbPtr = SMPmakeElt(matrix,here->B2dNodePrime,here->B2bNode))==(double *)((void *)0)){ return(8);}
            if((here->B2SPbPtr = SMPmakeElt(matrix,here->B2sNodePrime,here->B2bNode))==(double *)((void *)0)){ return(8);}
            if((here->B2SPdpPtr = SMPmakeElt(matrix,here->B2sNodePrime,here->B2dNodePrime))==(double *)((void *)0)){ return(8);}
        }
    }
    return(0);
}

canonical_original_code:
int B2setup(void *matrix, struct sGENmodel *inModel, struct CKTcircuit *ckt, int *states)
{
    struct sBSIM2model *model = (B2model*)inModel;
    struct sBSIM2instance *here;
    int error;
    struct sCKTnode *tmp;
    for( ; model != ((void *)0); model = model->B2nextModel ) {
        if( ! model->B2typeGiven) {
            model->B2type = 1;
        }
        if( ! model->B2vfb0Given) {
            model->B2vfb0 = -1.0;
        }
        if( ! model->B2vfbLGiven) {
            model->B2vfbL = 0.0;
        }
        if( ! model->B2vfbWGiven) {
            model->B2vfbW = 0.0;
        }
        if( ! model->B2phi0Given) {
            model->B2phi0 = 0.75;
        }
        if( ! model->B2phiLGiven) {
            model->B2phiL = 0.0;
        }
        if( ! model->B2phiWGiven) {
            model->B2phiW = 0.0;
        }
        if( ! model->B2k10Given) {
            model->B2k10 = 0.8;
        }
        if( ! model->B2k1LGiven) {
            model->B2k1L = 0.0;
        }
        if( ! model->B2k1WGiven) {
            model->B2k1W = 0.0;
        }
        if( ! model->B2k20Given) {
            model->B2k20 = 0.0;
        }
        if( ! model->B2k2LGiven) {
            model->B2k2L = 0.0;
        }
        if( ! model->B2k2WGiven) {
            model->B2k2W = 0.0;
        }
        if( ! model->B2eta00Given) {
            model->B2eta00 = 0.0;
        }
        if( ! model->B2eta0LGiven) {
            model->B2eta0L = 0.0;
        }
        if( ! model->B2eta0WGiven) {
            model->B2eta0W = 0.0;
        }
        if( ! model->B2etaB0Given) {
            model->B2etaB0 = 0.0;
        }
        if( ! model->B2etaBLGiven) {
            model->B2etaBL = 0.0;
        }
        if( ! model->B2etaBWGiven) {
            model->B2etaBW = 0.0;
        }
        if( ! model->B2deltaLGiven) {
            model->B2deltaL = 0.0;
        }
        if( ! model->B2deltaWGiven) {
            model->B2deltaW = 0.0;
        }
        if( ! model->B2ua00Given) {
            model->B2ua00 = 0.2;
        }
        if( ! model->B2ua0LGiven) {
            model->B2ua0L = 0.0;
        }
        if( ! model->B2ua0WGiven) {
            model->B2ua0W = 0.0;
        }
        if( ! model->B2uaB0Given) {
            model->B2uaB0 = 0.0;
        }
        if( ! model->B2uaBLGiven) {
            model->B2uaBL = 0.0;
        }
        if( ! model->B2uaBWGiven) {
            model->B2uaBW = 0.0;
        }
        if( ! model->B2ub00Given) {
            model->B2ub00 = 0.0;
        }
        if( ! model->B2ub0LGiven) {
            model->B2ub0L = 0.0;
        }
        if( ! model->B2ub0WGiven) {
            model->B2ub0W = 0.0;
        }
        if( ! model->B2ubB0Given) {
            model->B2ubB0 = 0.0;
        }
        if( ! model->B2ubBLGiven) {
            model->B2ubBL = 0.0;
        }
        if( ! model->B2ubBWGiven) {
            model->B2ubBW = 0.0;
        }
        if( ! model->B2u100Given) {
            model->B2u100 = 0.1;
        }
        if( ! model->B2u10LGiven) {
            model->B2u10L = 0.0;
        }
        if( ! model->B2u10WGiven) {
            model->B2u10W = 0.0;
        }
        if( ! model->B2u1B0Given) {
            model->B2u1B0 = 0.0;
        }
        if( ! model->B2u1BLGiven) {
            model->B2u1BL = 0.0;
        }
        if( ! model->B2u1BWGiven) {
            model->B2u1BW = 0.0;
        }
        if( ! model->B2u1D0Given) {
            model->B2u1D0 = 0.0;
        }
        if( ! model->B2u1DLGiven) {
            model->B2u1DL = 0.0;
        }
        if( ! model->B2u1DWGiven) {
            model->B2u1DW = 0.0;
        }
        if( ! model->B2mob00Given) {
            model->B2mob00 = 400.0;
        }
        if( ! model->B2mob0B0Given) {
            model->B2mob0B0 = 0.0;
        }
        if( ! model->B2mob0BLGiven) {
            model->B2mob0BL = 0.0;
        }
        if( ! model->B2mob0BWGiven) {
            model->B2mob0BW = 0.0;
        }
        if( ! model->B2mobs00Given) {
            model->B2mobs00 = 500.0;
        }
        if( ! model->B2mobs0LGiven) {
            model->B2mobs0L = 0.0;
        }
        if( ! model->B2mobs0WGiven) {
            model->B2mobs0W = 0.0;
        }
        if( ! model->B2mobsB0Given) {
            model->B2mobsB0 = 0.0;
        }
        if( ! model->B2mobsBLGiven) {
            model->B2mobsBL = 0.0;
        }
        if( ! model->B2mobsBWGiven) {
            model->B2mobsBW = 0.0;
        }
        if( ! model->B2mob200Given) {
            model->B2mob200 = 1.5;
        }
        if( ! model->B2mob20LGiven) {
            model->B2mob20L = 0.0;
        }
        if( ! model->B2mob20WGiven) {
            model->B2mob20W = 0.0;
        }
        if( ! model->B2mob2B0Given) {
            model->B2mob2B0 = 0.0;
        }
        if( ! model->B2mob2BLGiven) {
            model->B2mob2BL = 0.0;
        }
        if( ! model->B2mob2BWGiven) {
            model->B2mob2BW = 0.0;
        }
        if( ! model->B2mob2G0Given) {
            model->B2mob2G0 = 0.0;
        }
        if( ! model->B2mob2GLGiven) {
            model->B2mob2GL = 0.0;
        }
        if( ! model->B2mob2GWGiven) {
            model->B2mob2GW = 0.0;
        }
        if( ! model->B2mob300Given) {
            model->B2mob300 = 10;
        }
        if( ! model->B2mob30LGiven) {
            model->B2mob30L = 0.0;
        }
        if( ! model->B2mob30WGiven) {
            model->B2mob30W = 0.0;
        }
        if( ! model->B2mob3B0Given) {
            model->B2mob3B0 = 0.0;
        }
        if( ! model->B2mob3BLGiven) {
            model->B2mob3BL = 0.0;
        }
        if( ! model->B2mob3BWGiven) {
            model->B2mob3BW = 0.0;
        }
        if( ! model->B2mob3G0Given) {
            model->B2mob3G0 = 0.0;
        }
        if( ! model->B2mob3GLGiven) {
            model->B2mob3GL = 0.0;
        }
        if( ! model->B2mob3GWGiven) {
            model->B2mob3GW = 0.0;
        }
        if( ! model->B2mob400Given) {
            model->B2mob400 = 0.0;
        }
        if( ! model->B2mob40LGiven) {
            model->B2mob40L = 0.0;
        }
        if( ! model->B2mob40WGiven) {
            model->B2mob40W = 0.0;
        }
        if( ! model->B2mob4B0Given) {
            model->B2mob4B0 = 0.0;
        }
        if( ! model->B2mob4BLGiven) {
            model->B2mob4BL = 0.0;
        }
        if( ! model->B2mob4BWGiven) {
            model->B2mob4BW = 0.0;
        }
        if( ! model->B2mob4G0Given) {
            model->B2mob4G0 = 0.0;
        }
        if( ! model->B2mob4GLGiven) {
            model->B2mob4GL = 0.0;
        }
        if( ! model->B2mob4GWGiven) {
            model->B2mob4GW = 0.0;
        }
        if( ! model->B2n00Given) {
            model->B2n00 = 1.4;
        }
        if( ! model->B2n0LGiven) {
            model->B2n0L = 0.0;
        }
        if( ! model->B2n0WGiven) {
            model->B2n0W = 0.0;
        }
        if( ! model->B2nB0Given) {
            model->B2nB0 = 0.5;
        }
        if( ! model->B2nBLGiven) {
            model->B2nBL = 0.0;
        }
        if( ! model->B2nBWGiven) {
            model->B2nBW = 0.0;
        }
        if( ! model->B2nD0Given) {
            model->B2nD0 = 0.0;
        }
        if( ! model->B2nDLGiven) {
            model->B2nDL = 0.0;
        }
        if( ! model->B2nDWGiven) {
            model->B2nDW = 0.0;
        }
        if( ! model->B2vof00Given) {
            model->B2vof00 = 1.8;
        }
        if( ! model->B2vof0LGiven) {
            model->B2vof0L = 0.0;
        }
        if( ! model->B2vof0WGiven) {
            model->B2vof0W = 0.0;
        }
        if( ! model->B2vofB0Given) {
            model->B2vofB0 = 0.0;
        }
        if( ! model->B2vofBLGiven) {
            model->B2vofBL = 0.0;
        }
        if( ! model->B2vofBWGiven) {
            model->B2vofBW = 0.0;
        }
        if( ! model->B2vofD0Given) {
            model->B2vofD0 = 0.0;
        }
        if( ! model->B2vofDLGiven) {
            model->B2vofDL = 0.0;
        }
        if( ! model->B2vofDWGiven) {
            model->B2vofDW = 0.0;
        }
        if( ! model->B2ai00Given) {
            model->B2ai00 = 0.0;
        }
        if( ! model->B2ai0LGiven) {
            model->B2ai0L = 0.0;
        }
        if( ! model->B2ai0WGiven) {
            model->B2ai0W = 0.0;
        }
        if( ! model->B2aiB0Given) {
            model->B2aiB0 = 0.0;
        }
        if( ! model->B2aiBLGiven) {
            model->B2aiBL = 0.0;
        }
        if( ! model->B2aiBWGiven) {
            model->B2aiBW = 0.0;
        }
        if( ! model->B2bi00Given) {
            model->B2bi00 = 0.0;
        }
        if( ! model->B2bi0LGiven) {
            model->B2bi0L = 0.0;
        }
        if( ! model->B2bi0WGiven) {
            model->B2bi0W = 0.0;
        }
        if( ! model->B2biB0Given) {
            model->B2biB0 = 0.0;
        }
        if( ! model->B2biBLGiven) {
            model->B2biBL = 0.0;
        }
        if( ! model->B2biBWGiven) {
            model->B2biBW = 0.0;
        }
        if( ! model->B2vghigh0Given) {
            model->B2vghigh0 = 0.2;
        }
        if( ! model->B2vghighLGiven) {
            model->B2vghighL = 0.0;
        }
        if( ! model->B2vghighWGiven) {
            model->B2vghighW = 0.0;
        }
        if( ! model->B2vglow0Given) {
            model->B2vglow0 = -0.15;
        }
        if( ! model->B2vglowLGiven) {
            model->B2vglowL = 0.0;
        }
        if( ! model->B2vglowWGiven) {
            model->B2vglowW = 0.0;
        }
        if( ! model->B2toxGiven) {
            model->B2tox = 0.03;
        }
        if( ! model->B2tempGiven) {
            model->B2temp = 27.0;
        }
        if( ! model->B2vddGiven) {
            model->B2vdd = 5.0;
        }
        if( ! model->B2vggGiven) {
            model->B2vgg = 5.0;
        }
        if( ! model->B2vbbGiven) {
            model->B2vbb = 5.0;
        }
        if( ! model->B2gateDrainOverlapCapGiven) {
            model->B2gateDrainOverlapCap = 0.0;
        }
        if( ! model->B2gateSourceOverlapCapGiven) {
            model->B2gateSourceOverlapCap = 0.0;
        }
        if( ! model->B2gateBulkOverlapCapGiven) {
            model->B2gateBulkOverlapCap = 0.0;
        }
        if( ! model->B2channelChargePartitionFlagGiven) {
            model->B2channelChargePartitionFlag = 0.0;
        }
        if( ! model->B2sheetResistanceGiven) {
            model->B2sheetResistance = 0.0;
        }
        if( ! model->B2unitAreaJctCapGiven) {
            model->B2unitAreaJctCap = 0.0;
        }
        if( ! model->B2unitLengthSidewallJctCapGiven) {
            model->B2unitLengthSidewallJctCap = 0.0;
        }
        if( ! model->B2jctSatCurDensityGiven) {
            model->B2jctSatCurDensity = 0.0;
        }
        if( ! model->B2bulkJctPotentialGiven) {
            model->B2bulkJctPotential = 0.0;
        }
        if( ! model->B2sidewallJctPotentialGiven) {
            model->B2sidewallJctPotential = 0.0;
        }
        if( ! model->B2bulkJctBotGradingCoeffGiven) {
            model->B2bulkJctBotGradingCoeff = 0.0;
        }
        if( ! model->B2bulkJctSideGradingCoeffGiven) {
            model->B2bulkJctSideGradingCoeff = 0.0;
        }
        if( ! model->B2defaultWidthGiven) {
            model->B2defaultWidth = 10.0;
        }
        if( ! model->B2deltaLengthGiven) {
            model->B2deltaLength = 0.0;
        }
        for (here = model->B2instances; here != ((void *)0) ;
                here=here->B2nextInstance) {
     if (here->B2owner == ARCHme) {
  here->B2states = *states;
  *states += 35;
     }
            if(!here->B2drainAreaGiven) {
                here->B2drainArea = 0;
            }
            if(!here->B2drainPerimeterGiven) {
                here->B2drainPerimeter = 0;
            }
            if(!here->B2drainSquaresGiven) {
                here->B2drainSquares = 1;
            }
            if(!here->B2icVBSGiven) {
                here->B2icVBS = 0;
            }
            if(!here->B2icVDSGiven) {
                here->B2icVDS = 0;
            }
            if(!here->B2icVGSGiven) {
                here->B2icVGS = 0;
            }
            if(!here->B2lGiven) {
                here->B2l = 5e-6;
            }
            if(!here->B2sourceAreaGiven) {
                here->B2sourceArea = 0;
            }
            if(!here->B2sourcePerimeterGiven) {
                here->B2sourcePerimeter = 0;
            }
            if(!here->B2sourceSquaresGiven) {
                here->B2sourceSquares = 1;
            }
            if(!here->B2vdsatGiven) {
                here->B2vdsat = 0;
            }
            if(!here->B2vonGiven) {
                here->B2von = 0;
            }
            if(!here->B2wGiven) {
                here->B2w = 5e-6;
            }
            if(!here->B2mGiven) {
                here->B2m = 1.0;
            }
            if( (model->B2sheetResistance != 0) &&
                    (here->B2drainSquares != 0.0 ) &&
                    (here->B2dNodePrime == 0) ) {
                error = CKTmkVolt(ckt,&tmp,here->B2name,"drain");
               if(error) return(error);
                here->B2dNodePrime = tmp->number;
                 if (ckt->CKTcopyNodesets) {
       struct sCKTnode *tmpNode;
       char *tmpName;
       if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==0) {
    if (tmpNode->nsGiven) {
        tmp->nodeset=tmpNode->nodeset;
        tmp->nsGiven=tmpNode->nsGiven;
    }
       }
   }
            } else {
                    here->B2dNodePrime = here->B2dNode;
            }
            if( (model->B2sheetResistance != 0) &&
                    (here->B2sourceSquares != 0.0 ) &&
                    (here->B2sNodePrime == 0) ) {
                if(here->B2sNodePrime == 0) {
                    error = CKTmkVolt(ckt,&tmp,here->B2name,"source");
                    if(error)
   return(error);
                    here->B2sNodePrime = tmp->number;
                    if (ckt->CKTcopyNodesets) {
   struct sCKTnode *tmpNode;
   char *tmpName;
   if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==0) {
       if (tmpNode->nsGiven) {
    tmp->nodeset=tmpNode->nodeset;
    tmp->nsGiven=tmpNode->nsGiven;
       }
                  }
                }
                }
            } else {
                here->B2sNodePrime = here->B2sNode;
            }
            if((here->B2DdPtr = SMPmakeElt(matrix,here->B2dNode,here->B2dNode))==(double *)((void *)0)){ return(8);}
            if((here->B2GgPtr = SMPmakeElt(matrix,here->B2gNode,here->B2gNode))==(double *)((void *)0)){ return(8);}
            if((here->B2SsPtr = SMPmakeElt(matrix,here->B2sNode,here->B2sNode))==(double *)((void *)0)){ return(8);}
            if((here->B2BbPtr = SMPmakeElt(matrix,here->B2bNode,here->B2bNode))==(double *)((void *)0)){ return(8);}
            if((here->B2DPdpPtr = SMPmakeElt(matrix,here->B2dNodePrime,here->B2dNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2SPspPtr = SMPmakeElt(matrix,here->B2sNodePrime,here->B2sNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2DdpPtr = SMPmakeElt(matrix,here->B2dNode,here->B2dNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2GbPtr = SMPmakeElt(matrix,here->B2gNode,here->B2bNode))==(double *)((void *)0)){ return(8);}
            if((here->B2GdpPtr = SMPmakeElt(matrix,here->B2gNode,here->B2dNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2GspPtr = SMPmakeElt(matrix,here->B2gNode,here->B2sNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2SspPtr = SMPmakeElt(matrix,here->B2sNode,here->B2sNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2BdpPtr = SMPmakeElt(matrix,here->B2bNode,here->B2dNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2BspPtr = SMPmakeElt(matrix,here->B2bNode,here->B2sNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2DPspPtr = SMPmakeElt(matrix,here->B2dNodePrime,here->B2sNodePrime))==(double *)((void *)0)){ return(8);}
            if((here->B2DPdPtr = SMPmakeElt(matrix,here->B2dNodePrime,here->B2dNode))==(double *)((void *)0)){ return(8);}
            if((here->B2BgPtr = SMPmakeElt(matrix,here->B2bNode,here->B2gNode))==(double *)((void *)0)){ return(8);}
            if((here->B2DPgPtr = SMPmakeElt(matrix,here->B2dNodePrime,here->B2gNode))==(double *)((void *)0)){ return(8);}
            if((here->B2SPgPtr = SMPmakeElt(matrix,here->B2sNodePrime,here->B2gNode))==(double *)((void *)0)){ return(8);}
            if((here->B2SPsPtr = SMPmakeElt(matrix,here->B2sNodePrime,here->B2sNode))==(double *)((void *)0)){ return(8);}
            if((here->B2DPbPtr = SMPmakeElt(matrix,here->B2dNodePrime,here->B2bNode))==(double *)((void *)0)){ return(8);}
            if((here->B2SPbPtr = SMPmakeElt(matrix,here->B2sNodePrime,here->B2bNode))==(double *)((void *)0)){ return(8);}
            if((here->B2SPdpPtr = SMPmakeElt(matrix,here->B2sNodePrime,here->B2dNodePrime))==(double *)((void *)0)){ return(8);}
        }
    }
    return(0);
}

variable_types:
matrix
void *

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 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:
states
int *

variable_types: struct sBSIM2model { int B2modType; struct sBSIM2model *B2nextModel; struct sBSIM2instance { struct sBSIM2model *B2modPtr; struct sBSIM2instance *B2nextInstance; char *B2name; int B2owner; int B2states; int B2dNode; int B2gNode; int B2sNode; int B2bNode; int B2dNodePrime; int B2sNodePrime; double B2l; double B2w; double B2m; double B2drainArea; double B2sourceArea; double B2drainSquares; double B2sourceSquares; double B2drainPerimeter; double B2sourcePerimeter; double B2sourceConductance; double B2drainConductance; double B2icVBS; double B2icVDS; double B2icVGS; double B2von; double B2vdsat; int B2off; int B2mode; struct bsim2SizeDependParam { double Width; double Length; double B2vfb; double B2phi; double B2k1; double B2k2; double B2eta0; double B2etaB; double B2beta0; double B2beta0B; double B2betas0; double B2betasB; double B2beta20; double B2beta2B; double B2beta2G; double B2beta30; double B2beta3B; double B2beta3G; double B2beta40; double B2beta4B; double B2beta4G; double B2ua0; double B2uaB; double B2ub0; double B2ubB; double B2u10; double B2u1B; double B2u1D; double B2n0; double B2nB; double B2nD; double B2vof0; double B2vofB; double B2vofD; double B2ai0; double B2aiB; double B2bi0; double B2biB; double B2vghigh; double B2vglow; double B2GDoverlapCap; double B2GSoverlapCap; double B2GBoverlapCap; double SqrtPhi; double Phis3; double CoxWL; double One_Third_CoxWL; double Two_Third_CoxWL; double Arg; double B2vt0; struct bsim2SizeDependParam *pNext; } *pParam; unsigned int B2lGiven; unsigned int B2wGiven; unsigned int B2mGiven; unsigned int B2drainAreaGiven; unsigned int B2sourceAreaGiven; unsigned int B2drainSquaresGiven; unsigned int B2sourceSquaresGiven; unsigned int B2drainPerimeterGiven; unsigned int B2sourcePerimeterGiven; unsigned int B2dNodePrimeSet; unsigned int B2sNodePrimeSet; unsigned int B2icVBSGiven; unsigned int B2icVDSGiven; unsigned int B2icVGSGiven; unsigned int B2vonGiven; unsigned int B2vdsatGiven; double *B2DdPtr; double *B2GgPtr; double *B2SsPtr; double *B2BbPtr; double *B2DPdpPtr; double *B2SPspPtr; double *B2DdpPtr; double *B2GbPtr; double *B2GdpPtr; double *B2GspPtr; double *B2SspPtr; double *B2BdpPtr; double *B2BspPtr; double *B2DPspPtr; double *B2DPdPtr; double *B2BgPtr; double *B2DPgPtr; double *B2SPgPtr; double *B2SPsPtr; double *B2DPbPtr; double *B2SPbPtr; double *B2SPdpPtr; double B2nVar[3][5]; } *B2instances; char *B2modName; int B2type; int pad; double B2vfb0; double B2vfbL; double B2vfbW; double B2phi0; double B2phiL; double B2phiW; double B2k10; double B2k1L; double B2k1W; double B2k20; double B2k2L; double B2k2W; double B2eta00; double B2eta0L; double B2eta0W; double B2etaB0; double B2etaBL; double B2etaBW; double B2deltaL; double B2deltaW; double B2mob00; double B2mob0B0; double B2mob0BL; double B2mob0BW; double B2mobs00; double B2mobs0L; double B2mobs0W; double B2mobsB0; double B2mobsBL; double B2mobsBW; double B2mob200; double B2mob20L; double B2mob20W; double B2mob2B0; double B2mob2BL; double B2mob2BW; double B2mob2G0; double B2mob2GL; double B2mob2GW; double B2mob300; double B2mob30L; double B2mob30W; double B2mob3B0; double B2mob3BL; double B2mob3BW; double B2mob3G0; double B2mob3GL; double B2mob3GW; double B2mob400; double B2mob40L; double B2mob40W; double B2mob4B0; double B2mob4BL; double B2mob4BW; double B2mob4G0; double B2mob4GL; double B2mob4GW; double B2ua00; double B2ua0L; double B2ua0W; double B2uaB0; double B2uaBL; double B2uaBW; double B2ub00; double B2ub0L; double B2ub0W; double B2ubB0; double B2ubBL; double B2ubBW; double B2u100; double B2u10L; double B2u10W; double B2u1B0; double B2u1BL; double B2u1BW; double B2u1D0; double B2u1DL; double B2u1DW; double B2n00; double B2n0L; double B2n0W; double B2nB0; double B2nBL; double B2nBW; double B2nD0; double B2nDL; double B2nDW; double B2vof00; double B2vof0L; double B2vof0W; double B2vofB0; double B2vofBL; double B2vofBW; double B2vofD0; double B2vofDL; double B2vofDW; double B2ai00; double B2ai0L; double B2ai0W; double B2aiB0; double B2aiBL; double B2aiBW; double B2bi00; double B2bi0L; double B2bi0W; double B2biB0; double B2biBL; double B2biBW; double B2vghigh0; double B2vghighL; double B2vghighW; double B2vglow0; double B2vglowL; double B2vglowW; double B2tox; double B2Cox; double B2temp; double B2vdd; double B2vdd2; double B2vgg; double B2vgg2; double B2vbb; double B2vbb2; double B2gateSourceOverlapCap; double B2gateDrainOverlapCap; double B2gateBulkOverlapCap; double B2Vtm; double B2sheetResistance; double B2jctSatCurDensity; double B2bulkJctPotential; double B2bulkJctBotGradingCoeff; double B2bulkJctSideGradingCoeff; double B2sidewallJctPotential; double B2unitAreaJctCap; double B2unitLengthSidewallJctCap; double B2defaultWidth; double B2deltaLength; double B2fNcoef; double B2fNexp; struct bsim2SizeDependParam *pSizeDependParamKnot; unsigned int B2channelChargePartitionFlag; unsigned int B2vfb0Given; unsigned int B2vfbLGiven; unsigned int B2vfbWGiven; unsigned int B2phi0Given; unsigned int B2phiLGiven; unsigned int B2phiWGiven; unsigned int B2k10Given; unsigned int B2k1LGiven; unsigned int B2k1WGiven; unsigned int B2k20Given; unsigned int B2k2LGiven; unsigned int B2k2WGiven; unsigned int B2eta00Given; unsigned int B2eta0LGiven; unsigned int B2eta0WGiven; unsigned int B2etaB0Given; unsigned int B2etaBLGiven; unsigned int B2etaBWGiven; unsigned int B2deltaLGiven; unsigned int B2deltaWGiven; unsigned int B2mob00Given; unsigned int B2mob0B0Given; unsigned int B2mob0BLGiven; unsigned int B2mob0BWGiven; unsigned int B2mobs00Given; unsigned int B2mobs0LGiven; unsigned int B2mobs0WGiven; unsigned int B2mobsB0Given; unsigned int B2mobsBLGiven; unsigned int B2mobsBWGiven; unsigned int B2mob200Given; unsigned int B2mob20LGiven; unsigned int B2mob20WGiven; unsigned int B2mob2B0Given; unsigned int B2mob2BLGiven; unsigned int B2mob2BWGiven; unsigned int B2mob2G0Given; unsigned int B2mob2GLGiven; unsigned int B2mob2GWGiven; unsigned int B2mob300Given; unsigned int B2mob30LGiven; unsigned int B2mob30WGiven; unsigned int B2mob3B0Given; unsigned int B2mob3BLGiven; unsigned int B2mob3BWGiven; unsigned int B2mob3G0Given; unsigned int B2mob3GLGiven; unsigned int B2mob3GWGiven; unsigned int B2mob400Given; unsigned int B2mob40LGiven; unsigned int B2mob40WGiven; unsigned int B2mob4B0Given; unsigned int B2mob4BLGiven; unsigned int B2mob4BWGiven; unsigned int B2mob4G0Given; unsigned int B2mob4GLGiven; unsigned int B2mob4GWGiven; unsigned int B2ua00Given; unsigned int B2ua0LGiven; unsigned int B2ua0WGiven; unsigned int B2uaB0Given; unsigned int B2uaBLGiven; unsigned int B2uaBWGiven; unsigned int B2ub00Given; unsigned int B2ub0LGiven; unsigned int B2ub0WGiven; unsigned int B2ubB0Given; unsigned int B2ubBLGiven; unsigned int B2ubBWGiven; unsigned int B2u100Given; unsigned int B2u10LGiven; unsigned int B2u10WGiven; unsigned int B2u1B0Given; unsigned int B2u1BLGiven; unsigned int B2u1BWGiven; unsigned int B2u1D0Given; unsigned int B2u1DLGiven; unsigned int B2u1DWGiven; unsigned int B2n00Given; unsigned int B2n0LGiven; unsigned int B2n0WGiven; unsigned int B2nB0Given; unsigned int B2nBLGiven; unsigned int B2nBWGiven; unsigned int B2nD0Given; unsigned int B2nDLGiven; unsigned int B2nDWGiven; unsigned int B2vof00Given; unsigned int B2vof0LGiven; unsigned int B2vof0WGiven; unsigned int B2vofB0Given; unsigned int B2vofBLGiven; unsigned int B2vofBWGiven; unsigned int B2vofD0Given; unsigned int B2vofDLGiven; unsigned int B2vofDWGiven; unsigned int B2ai00Given; unsigned int B2ai0LGiven; unsigned int B2ai0WGiven; unsigned int B2aiB0Given; unsigned int B2aiBLGiven; unsigned int B2aiBWGiven; unsigned int B2bi00Given; unsigned int B2bi0LGiven; unsigned int B2bi0WGiven; unsigned int B2biB0Given; unsigned int B2biBLGiven; unsigned int B2biBWGiven; unsigned int B2vghigh0Given; unsigned int B2vghighLGiven; unsigned int B2vghighWGiven; unsigned int B2vglow0Given; unsigned int B2vglowLGiven; unsigned int B2vglowWGiven; unsigned int B2toxGiven; unsigned int B2tempGiven; unsigned int B2vddGiven; unsigned int B2vggGiven; unsigned int B2vbbGiven; unsigned int B2gateSourceOverlapCapGiven; unsigned int B2gateDrainOverlapCapGiven; unsigned int B2gateBulkOverlapCapGiven; unsigned int B2channelChargePartitionFlagGiven; unsigned int B2sheetResistanceGiven; unsigned int B2jctSatCurDensityGiven; unsigned int B2bulkJctPotentialGiven; unsigned int B2bulkJctBotGradingCoeffGiven; unsigned int B2sidewallJctPotentialGiven; unsigned int B2bulkJctSideGradingCoeffGiven; unsigned int B2unitAreaJctCapGiven; unsigned int B2unitLengthSidewallJctCapGiven; unsigned int B2defaultWidthGiven; unsigned int B2deltaLengthGiven; unsigned int B2fNcoefGiven; unsigned int B2fNexpGiven; unsigned int B2typeGiven; } *

variable_types: struct sBSIM2instance { struct sBSIM2model { int B2modType; struct sBSIM2model *B2nextModel; struct sBSIM2instance *B2instances; char *B2modName; int B2type; int pad; double B2vfb0; double B2vfbL; double B2vfbW; double B2phi0; double B2phiL; double B2phiW; double B2k10; double B2k1L; double B2k1W; double B2k20; double B2k2L; double B2k2W; double B2eta00; double B2eta0L; double B2eta0W; double B2etaB0; double B2etaBL; double B2etaBW; double B2deltaL; double B2deltaW; double B2mob00; double B2mob0B0; double B2mob0BL; double B2mob0BW; double B2mobs00; double B2mobs0L; double B2mobs0W; double B2mobsB0; double B2mobsBL; double B2mobsBW; double B2mob200; double B2mob20L; double B2mob20W; double B2mob2B0; double B2mob2BL; double B2mob2BW; double B2mob2G0; double B2mob2GL; double B2mob2GW; double B2mob300; double B2mob30L; double B2mob30W; double B2mob3B0; double B2mob3BL; double B2mob3BW; double B2mob3G0; double B2mob3GL; double B2mob3GW; double B2mob400; double B2mob40L; double B2mob40W; double B2mob4B0; double B2mob4BL; double B2mob4BW; double B2mob4G0; double B2mob4GL; double B2mob4GW; double B2ua00; double B2ua0L; double B2ua0W; double B2uaB0; double B2uaBL; double B2uaBW; double B2ub00; double B2ub0L; double B2ub0W; double B2ubB0; double B2ubBL; double B2ubBW; double B2u100; double B2u10L; double B2u10W; double B2u1B0; double B2u1BL; double B2u1BW; double B2u1D0; double B2u1DL; double B2u1DW; double B2n00; double B2n0L; double B2n0W; double B2nB0; double B2nBL; double B2nBW; double B2nD0; double B2nDL; double B2nDW; double B2vof00; double B2vof0L; double B2vof0W; double B2vofB0; double B2vofBL; double B2vofBW; double B2vofD0; double B2vofDL; double B2vofDW; double B2ai00; double B2ai0L; double B2ai0W; double B2aiB0; double B2aiBL; double B2aiBW; double B2bi00; double B2bi0L; double B2bi0W; double B2biB0; double B2biBL; double B2biBW; double B2vghigh0; double B2vghighL; double B2vghighW; double B2vglow0; double B2vglowL; double B2vglowW; double B2tox; double B2Cox; double B2temp; double B2vdd; double B2vdd2; double B2vgg; double B2vgg2; double B2vbb; double B2vbb2; double B2gateSourceOverlapCap; double B2gateDrainOverlapCap; double B2gateBulkOverlapCap; double B2Vtm; double B2sheetResistance; double B2jctSatCurDensity; double B2bulkJctPotential; double B2bulkJctBotGradingCoeff; double B2bulkJctSideGradingCoeff; double B2sidewallJctPotential; double B2unitAreaJctCap; double B2unitLengthSidewallJctCap; double B2defaultWidth; double B2deltaLength; double B2fNcoef; double B2fNexp; struct bsim2SizeDependParam { double Width; double Length; double B2vfb; double B2phi; double B2k1; double B2k2; double B2eta0; double B2etaB; double B2beta0; double B2beta0B; double B2betas0; double B2betasB; double B2beta20; double B2beta2B; double B2beta2G; double B2beta30; double B2beta3B; double B2beta3G; double B2beta40; double B2beta4B; double B2beta4G; double B2ua0; double B2uaB; double B2ub0; double B2ubB; double B2u10; double B2u1B; double B2u1D; double B2n0; double B2nB; double B2nD; double B2vof0; double B2vofB; double B2vofD; double B2ai0; double B2aiB; double B2bi0; double B2biB; double B2vghigh; double B2vglow; double B2GDoverlapCap; double B2GSoverlapCap; double B2GBoverlapCap; double SqrtPhi; double Phis3; double CoxWL; double One_Third_CoxWL; double Two_Third_CoxWL; double Arg; double B2vt0; struct bsim2SizeDependParam *pNext; } *pSizeDependParamKnot; unsigned int B2channelChargePartitionFlag; unsigned int B2vfb0Given; unsigned int B2vfbLGiven; unsigned int B2vfbWGiven; unsigned int B2phi0Given; unsigned int B2phiLGiven; unsigned int B2phiWGiven; unsigned int B2k10Given; unsigned int B2k1LGiven; unsigned int B2k1WGiven; unsigned int B2k20Given; unsigned int B2k2LGiven; unsigned int B2k2WGiven; unsigned int B2eta00Given; unsigned int B2eta0LGiven; unsigned int B2eta0WGiven; unsigned int B2etaB0Given; unsigned int B2etaBLGiven; unsigned int B2etaBWGiven; unsigned int B2deltaLGiven; unsigned int B2deltaWGiven; unsigned int B2mob00Given; unsigned int B2mob0B0Given; unsigned int B2mob0BLGiven; unsigned int B2mob0BWGiven; unsigned int B2mobs00Given; unsigned int B2mobs0LGiven; unsigned int B2mobs0WGiven; unsigned int B2mobsB0Given; unsigned int B2mobsBLGiven; unsigned int B2mobsBWGiven; unsigned int B2mob200Given; unsigned int B2mob20LGiven; unsigned int B2mob20WGiven; unsigned int B2mob2B0Given; unsigned int B2mob2BLGiven; unsigned int B2mob2BWGiven; unsigned int B2mob2G0Given; unsigned int B2mob2GLGiven; unsigned int B2mob2GWGiven; unsigned int B2mob300Given; unsigned int B2mob30LGiven; unsigned int B2mob30WGiven; unsigned int B2mob3B0Given; unsigned int B2mob3BLGiven; unsigned int B2mob3BWGiven; unsigned int B2mob3G0Given; unsigned int B2mob3GLGiven; unsigned int B2mob3GWGiven; unsigned int B2mob400Given; unsigned int B2mob40LGiven; unsigned int B2mob40WGiven; unsigned int B2mob4B0Given; unsigned int B2mob4BLGiven; unsigned int B2mob4BWGiven; unsigned int B2mob4G0Given; unsigned int B2mob4GLGiven; unsigned int B2mob4GWGiven; unsigned int B2ua00Given; unsigned int B2ua0LGiven; unsigned int B2ua0WGiven; unsigned int B2uaB0Given; unsigned int B2uaBLGiven; unsigned int B2uaBWGiven; unsigned int B2ub00Given; unsigned int B2ub0LGiven; unsigned int B2ub0WGiven; unsigned int B2ubB0Given; unsigned int B2ubBLGiven; unsigned int B2ubBWGiven; unsigned int B2u100Given; unsigned int B2u10LGiven; unsigned int B2u10WGiven; unsigned int B2u1B0Given; unsigned int B2u1BLGiven; unsigned int B2u1BWGiven; unsigned int B2u1D0Given; unsigned int B2u1DLGiven; unsigned int B2u1DWGiven; unsigned int B2n00Given; unsigned int B2n0LGiven; unsigned int B2n0WGiven; unsigned int B2nB0Given; unsigned int B2nBLGiven; unsigned int B2nBWGiven; unsigned int B2nD0Given; unsigned int B2nDLGiven; unsigned int B2nDWGiven; unsigned int B2vof00Given; unsigned int B2vof0LGiven; unsigned int B2vof0WGiven; unsigned int B2vofB0Given; unsigned int B2vofBLGiven; unsigned int B2vofBWGiven; unsigned int B2vofD0Given; unsigned int B2vofDLGiven; unsigned int B2vofDWGiven; unsigned int B2ai00Given; unsigned int B2ai0LGiven; unsigned int B2ai0WGiven; unsigned int B2aiB0Given; unsigned int B2aiBLGiven; unsigned int B2aiBWGiven; unsigned int B2bi00Given; unsigned int B2bi0LGiven; unsigned int B2bi0WGiven; unsigned int B2biB0Given; unsigned int B2biBLGiven; unsigned int B2biBWGiven; unsigned int B2vghigh0Given; unsigned int B2vghighLGiven; unsigned int B2vghighWGiven; unsigned int B2vglow0Given; unsigned int B2vglowLGiven; unsigned int B2vglowWGiven; unsigned int B2toxGiven; unsigned int B2tempGiven; unsigned int B2vddGiven; unsigned int B2vggGiven; unsigned int B2vbbGiven; unsigned int B2gateSourceOverlapCapGiven; unsigned int B2gateDrainOverlapCapGiven; unsigned int B2gateBulkOverlapCapGiven; unsigned int B2channelChargePartitionFlagGiven; unsigned int B2sheetResistanceGiven; unsigned int B2jctSatCurDensityGiven; unsigned int B2bulkJctPotentialGiven; unsigned int B2bulkJctBotGradingCoeffGiven; unsigned int B2sidewallJctPotentialGiven; unsigned int B2bulkJctSideGradingCoeffGiven; unsigned int B2unitAreaJctCapGiven; unsigned int B2unitLengthSidewallJctCapGiven; unsigned int B2defaultWidthGiven; unsigned int B2deltaLengthGiven; unsigned int B2fNcoefGiven; unsigned int B2fNexpGiven; unsigned int B2typeGiven; } *B2modPtr; struct sBSIM2instance *B2nextInstance; char *B2name; int B2owner; int B2states; int B2dNode; int B2gNode; int B2sNode; int B2bNode; int B2dNodePrime; int B2sNodePrime; double B2l; double B2w; double B2m; double B2drainArea; double B2sourceArea; double B2drainSquares; double B2sourceSquares; double B2drainPerimeter; double B2sourcePerimeter; double B2sourceConductance; double B2drainConductance; double B2icVBS; double B2icVDS; double B2icVGS; double B2von; double B2vdsat; int B2off; int B2mode; struct bsim2SizeDependParam *pParam; unsigned int B2lGiven; unsigned int B2wGiven; unsigned int B2mGiven; unsigned int B2drainAreaGiven; unsigned int B2sourceAreaGiven; unsigned int B2drainSquaresGiven; unsigned int B2sourceSquaresGiven; unsigned int B2drainPerimeterGiven; unsigned int B2sourcePerimeterGiven; unsigned int B2dNodePrimeSet; unsigned int B2sNodePrimeSet; unsigned int B2icVBSGiven; unsigned int B2icVDSGiven; unsigned int B2icVGSGiven; unsigned int B2vonGiven; unsigned int B2vdsatGiven; double *B2DdPtr; double *B2GgPtr; double *B2SsPtr; double *B2BbPtr; double *B2DPdpPtr; double *B2SPspPtr; double *B2DdpPtr; double *B2GbPtr; double *B2GdpPtr; double *B2GspPtr; double *B2SspPtr; double *B2BdpPtr; double *B2BspPtr; double *B2DPspPtr; double *B2DPdPtr; double *B2BgPtr; double *B2DPgPtr; double *B2SPgPtr; double *B2SPsPtr; double *B2DPbPtr; double *B2SPbPtr; double *B2SPdpPtr; double B2nVar[3][5]; } *

variable_types: error int

variable_types:
tmpName
char *

return_type: int

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

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 sBSIM2model { int B2modType; struct sBSIM2model *B2nextModel; struct sBSIM2instance *B2instances; char *B2modName; int B2type; int pad; double B2vfb0; double B2vfbL; double B2vfbW; double B2phi0; double B2phiL; double B2phiW; double B2k10; double B2k1L; double B2k1W; double B2k20; double B2k2L; double B2k2W; double B2eta00; double B2eta0L; double B2eta0W; double B2etaB0; double B2etaBL; double B2etaBW; double B2deltaL; double B2deltaW; double B2mob00; double B2mob0B0; double B2mob0BL; double B2mob0BW; double B2mobs00; double B2mobs0L; double B2mobs0W; double B2mobsB0; double B2mobsBL; double B2mobsBW; double B2mob200; double B2mob20L; double B2mob20W; double B2mob2B0; double B2mob2BL; double B2mob2BW; double B2mob2G0; double B2mob2GL; double B2mob2GW; double B2mob300; double B2mob30L; double B2mob30W; double B2mob3B0; double B2mob3BL; double B2mob3BW; double B2mob3G0; double B2mob3GL; double B2mob3GW; double B2mob400; double B2mob40L; double B2mob40W; double B2mob4B0; double B2mob4BL; double B2mob4BW; double B2mob4G0; double B2mob4GL; double B2mob4GW; double B2ua00; double B2ua0L; double B2ua0W; double B2uaB0; double B2uaBL; double B2uaBW; double B2ub00; double B2ub0L; double B2ub0W; double B2ubB0; double B2ubBL; double B2ubBW; double B2u100; double B2u10L; double B2u10W; double B2u1B0; double B2u1BL; double B2u1BW; double B2u1D0; double B2u1DL; double B2u1DW; double B2n00; double B2n0L; double B2n0W; double B2nB0; double B2nBL; double B2nBW; double B2nD0; double B2nDL; double B2nDW; double B2vof00; double B2vof0L; double B2vof0W; double B2vofB0; double B2vofBL; double B2vofBW; double B2vofD0; double B2vofDL; double B2vofDW; double B2ai00; double B2ai0L; double B2ai0W; double B2aiB0; double B2aiBL; double B2aiBW; double B2bi00; double B2bi0L; double B2bi0W; double B2biB0; double B2biBL; double B2biBW; double B2vghigh0; double B2vghighL; double B2vghighW; double B2vglow0; double B2vglowL; double B2vglowW; double B2tox; double B2Cox; double B2temp; double B2vdd; double B2vdd2; double B2vgg; double B2vgg2; double B2vbb; double B2vbb2; double B2gateSourceOverlapCap; double B2gateDrainOverlapCap; double B2gateBulkOverlapCap; double B2Vtm; double B2sheetResistance; double B2jctSatCurDensity; double B2bulkJctPotential; double B2bulkJctBotGradingCoeff; double B2bulkJctSideGradingCoeff; double B2sidewallJctPotential; double B2unitAreaJctCap; double B2unitLengthSidewallJctCap; double B2defaultWidth; double B2deltaLength; double B2fNcoef; double B2fNexp; struct bsim2SizeDependParam *pSizeDependParamKnot; unsigned int B2channelChargePartitionFlag; unsigned int B2vfb0Given; unsigned int B2vfbLGiven; unsigned int B2vfbWGiven; unsigned int B2phi0Given; unsigned int B2phiLGiven; unsigned int B2phiWGiven; unsigned int B2k10Given; unsigned int B2k1LGiven; unsigned int B2k1WGiven; unsigned int B2k20Given; unsigned int B2k2LGiven; unsigned int B2k2WGiven; unsigned int B2eta00Given; unsigned int B2eta0LGiven; unsigned int B2eta0WGiven; unsigned int B2etaB0Given; unsigned int B2etaBLGiven; unsigned int B2etaBWGiven; unsigned int B2deltaLGiven; unsigned int B2deltaWGiven; unsigned int B2mob00Given; unsigned int B2mob0B0Given; unsigned int B2mob0BLGiven; unsigned int B2mob0BWGiven; unsigned int B2mobs00Given; unsigned int B2mobs0LGiven; unsigned int B2mobs0WGiven; unsigned int B2mobsB0Given; unsigned int B2mobsBLGiven; unsigned int B2mobsBWGiven; unsigned int B2mob200Given; unsigned int B2mob20LGiven; unsigned int B2mob20WGiven; unsigned int B2mob2B0Given; unsigned int B2mob2BLGiven; unsigned int B2mob2BWGiven; unsigned int B2mob2G0Given; unsigned int B2mob2GLGiven; unsigned int B2mob2GWGiven; unsigned int B2mob300Given; unsigned int B2mob30LGiven; unsigned int B2mob30WGiven; unsigned int B2mob3B0Given; unsigned int B2mob3BLGiven; unsigned int B2mob3BWGiven; unsigned int B2mob3G0Given; unsigned int B2mob3GLGiven; unsigned int B2mob3GWGiven; unsigned int B2mob400Given; unsigned int B2mob40LGiven; unsigned int B2mob40WGiven; unsigned int B2mob4B0Given; unsigned int B2mob4BLGiven; unsigned int B2mob4BWGiven; unsigned int B2mob4G0Given; unsigned int B2mob4GLGiven; unsigned int B2mob4GWGiven; unsigned int B2ua00Given; unsigned int B2ua0LGiven; unsigned int B2ua0WGiven; unsigned int B2uaB0Given; unsigned int B2uaBLGiven; unsigned int B2uaBWGiven; unsigned int B2ub00Given; unsigned int B2ub0LGiven; unsigned int B2ub0WGiven; unsigned int B2ubB0Given; unsigned int B2ubBLGiven; unsigned int B2ubBWGiven; unsigned int B2u100Given; unsigned int B2u10LGiven; unsigned int B2u10WGiven; unsigned int B2u1B0Given; unsigned int B2u1BLGiven; unsigned int B2u1BWGiven; unsigned int B2u1D0Given; unsigned int B2u1DLGiven; unsigned int B2u1DWGiven; unsigned int B2n00Given; unsigned int B2n0LGiven; unsigned int B2n0WGiven; unsigned int B2nB0Given; unsigned int B2nBLGiven; unsigned int B2nBWGiven; unsigned int B2nD0Given; unsigned int B2nDLGiven; unsigned int B2nDWGiven; unsigned int B2vof00Given; unsigned int B2vof0LGiven; unsigned int B2vof0WGiven; unsigned int B2vofB0Given; unsigned int B2vofBLGiven; unsigned int B2vofBWGiven; unsigned int B2vofD0Given; unsigned int B2vofDLGiven; unsigned int B2vofDWGiven; unsigned int B2ai00Given; unsigned int B2ai0LGiven; unsigned int B2ai0WGiven; unsigned int B2aiB0Given; unsigned int B2aiBLGiven; unsigned int B2aiBWGiven; unsigned int B2bi00Given; unsigned int B2bi0LGiven; unsigned int B2bi0WGiven; unsigned int B2biB0Given; unsigned int B2biBLGiven; unsigned int B2biBWGiven; unsigned int B2vghigh0Given; unsigned int B2vghighLGiven; unsigned int B2vghighWGiven; unsigned int B2vglow0Given; unsigned int B2vglowLGiven; unsigned int B2vglowWGiven; unsigned int B2toxGiven; unsigned int B2tempGiven; unsigned int B2vddGiven; unsigned int B2vggGiven; unsigned int B2vbbGiven; unsigned int B2gateSourceOverlapCapGiven; unsigned int B2gateDrainOverlapCapGiven; unsigned int B2gateBulkOverlapCapGiven; unsigned int B2channelChargePartitionFlagGiven; unsigned int B2sheetResistanceGiven; unsigned int B2jctSatCurDensityGiven; unsigned int B2bulkJctPotentialGiven; unsigned int B2bulkJctBotGradingCoeffGiven; unsigned int B2sidewallJctPotentialGiven; unsigned int B2bulkJctSideGradingCoeffGiven; unsigned int B2unitAreaJctCapGiven; unsigned int B2unitLengthSidewallJctCapGiven; unsigned int B2defaultWidthGiven; unsigned int B2deltaLengthGiven; unsigned int B2fNcoefGiven; unsigned int B2fNexpGiven; unsigned int B2typeGiven; }

user_defined_types: struct sBSIM2instance { struct sBSIM2model *B2modPtr; struct sBSIM2instance *B2nextInstance; char *B2name; int B2owner; int B2states; int B2dNode; int B2gNode; int B2sNode; int B2bNode; int B2dNodePrime; int B2sNodePrime; double B2l; double B2w; double B2m; double B2drainArea; double B2sourceArea; double B2drainSquares; double B2sourceSquares; double B2drainPerimeter; double B2sourcePerimeter; double B2sourceConductance; double B2drainConductance; double B2icVBS; double B2icVDS; double B2icVGS; double B2von; double B2vdsat; int B2off; int B2mode; struct bsim2SizeDependParam *pParam; unsigned int B2lGiven; unsigned int B2wGiven; unsigned int B2mGiven; unsigned int B2drainAreaGiven; unsigned int B2sourceAreaGiven; unsigned int B2drainSquaresGiven; unsigned int B2sourceSquaresGiven; unsigned int B2drainPerimeterGiven; unsigned int B2sourcePerimeterGiven; unsigned int B2dNodePrimeSet; unsigned int B2sNodePrimeSet; unsigned int B2icVBSGiven; unsigned int B2icVDSGiven; unsigned int B2icVGSGiven; unsigned int B2vonGiven; unsigned int B2vdsatGiven; double *B2DdPtr; double *B2GgPtr; double *B2SsPtr; double *B2BbPtr; double *B2DPdpPtr; double *B2SPspPtr; double *B2DdpPtr; double *B2GbPtr; double *B2GdpPtr; double *B2GspPtr; double *B2SspPtr; double *B2BdpPtr; double *B2BspPtr; double *B2DPspPtr; double *B2DPdPtr; double *B2BgPtr; double *B2DPgPtr; double *B2SPgPtr; double *B2SPsPtr; double *B2DPbPtr; double *B2SPbPtr; double *B2SPdpPtr; double B2nVar[3][5]; }


JFETtrunc

original_code:
int
JFETtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
    JFETmodel *model = (JFETmodel*)inModel;
    JFETinstance *here;
    for( ; model != ((void *)0); model = model->JFETnextModel) {
        for(here=model->JFETinstances;here!=((void *)0);here = here->JFETnextInstance){
     if (here->JFETowner != ARCHme) continue;
            CKTterr(here->JFETstate+9,ckt,timeStep);
            CKTterr(here->JFETstate+11,ckt,timeStep);
        }
    }
    return(0);
}

canonical_original_code:
int JFETtrunc(struct sGENmodel *inModel, struct CKTcircuit *ckt, double *timeStep)
{
    struct sJFETmodel *model = (JFETmodel*)inModel;
    struct sJFETinstance *here;
    for( ; model != ((void *)0); model = model->JFETnextModel) {
        for(here=model->JFETinstances;here!=((void *)0);here = here->JFETnextInstance){
     if (here->JFETowner != ARCHme) continue;
            CKTterr(here->JFETstate+9,ckt,timeStep);
            CKTterr(here->JFETstate+11,ckt,timeStep);
        }
    }
    return(0);
}

variable_types:
timeStep
double *

variable_types: struct sJFETmodel { int JFETmodType; struct sJFETmodel *JFETnextModel; struct sJFETinstance { struct sJFETmodel *JFETmodPtr; struct sJFETinstance *JFETnextInstance; char *JFETname; int JFETowner; int JFETstate; int JFETdrainNode; int JFETgateNode; int JFETsourceNode; int JFETdrainPrimeNode; int JFETsourcePrimeNode; double *JFETdrainDrainPrimePtr; double *JFETgateDrainPrimePtr; double *JFETgateSourcePrimePtr; double *JFETsourceSourcePrimePtr; double *JFETdrainPrimeDrainPtr; double *JFETdrainPrimeGatePtr; double *JFETdrainPrimeSourcePrimePtr; double *JFETsourcePrimeGatePtr; double *JFETsourcePrimeSourcePtr; double *JFETsourcePrimeDrainPrimePtr; double *JFETdrainDrainPtr; double *JFETgateGatePtr; double *JFETsourceSourcePtr; double *JFETdrainPrimeDrainPrimePtr; double *JFETsourcePrimeSourcePrimePtr; int JFETmode; double JFETdCoeffs[21]; double JFETnVar[3][5]; unsigned int JFEToff; unsigned int JFETareaGiven; unsigned int JFETmGiven; unsigned int JFETicVDSGiven; unsigned int JFETicVGSGiven; unsigned int JFETtempGiven; unsigned int JFETdtempGiven; double JFETarea; double JFETm; double JFETicVDS; double JFETicVGS; double JFETtemp; double JFETdtemp; double JFETtSatCur; double JFETtGatePot; double JFETtCGS; double JFETtCGD; double JFETcorDepCap; double JFETvcrit; double JFETf1; } *JFETinstances; char *JFETmodName; int JFETtype; double JFETthreshold; double JFETbeta; double JFETlModulation; double JFETdrainResist; double JFETsourceResist; double JFETcapGS; double JFETcapGD; double JFETgatePotential; double JFETgateSatCurrent; double JFETdepletionCapCoeff; double JFETfNcoef; double JFETfNexp; double JFETdrainConduct; double JFETsourceConduct; double JFETf2; double JFETf3; double JFETb; double JFETbFac; double JFETtnom; unsigned int JFETthresholdGiven; unsigned int JFETbetaGiven; unsigned int JFETlModulationGiven; unsigned int JFETdrainResistGiven; unsigned int JFETsourceResistGiven; unsigned int JFETcapGSGiven; unsigned int JFETcapGDGiven; unsigned int JFETgatePotentialGiven; unsigned int JFETgateSatCurrentGiven; unsigned int JFETdepletionCapCoeffGiven; unsigned int JFETbGiven; unsigned int JFETtnomGiven; unsigned int JFETfNcoefGiven; unsigned int JFETfNexpGiven; } *

variable_types: struct sJFETinstance { struct sJFETmodel { int JFETmodType; struct sJFETmodel *JFETnextModel; struct sJFETinstance *JFETinstances; char *JFETmodName; int JFETtype; double JFETthreshold; double JFETbeta; double JFETlModulation; double JFETdrainResist; double JFETsourceResist; double JFETcapGS; double JFETcapGD; double JFETgatePotential; double JFETgateSatCurrent; double JFETdepletionCapCoeff; double JFETfNcoef; double JFETfNexp; double JFETdrainConduct; double JFETsourceConduct; double JFETf2; double JFETf3; double JFETb; double JFETbFac; double JFETtnom; unsigned int JFETthresholdGiven; unsigned int JFETbetaGiven; unsigned int JFETlModulationGiven; unsigned int JFETdrainResistGiven; unsigned int JFETsourceResistGiven; unsigned int JFETcapGSGiven; unsigned int JFETcapGDGiven; unsigned int JFETgatePotentialGiven; unsigned int JFETgateSatCurrentGiven; unsigned int JFETdepletionCapCoeffGiven; unsigned int JFETbGiven; unsigned int JFETtnomGiven; unsigned int JFETfNcoefGiven; unsigned int JFETfNexpGiven; } *JFETmodPtr; struct sJFETinstance *JFETnextInstance; char *JFETname; int JFETowner; int JFETstate; int JFETdrainNode; int JFETgateNode; int JFETsourceNode; int JFETdrainPrimeNode; int JFETsourcePrimeNode; double *JFETdrainDrainPrimePtr; double *JFETgateDrainPrimePtr; double *JFETgateSourcePrimePtr; double *JFETsourceSourcePrimePtr; double *JFETdrainPrimeDrainPtr; double *JFETdrainPrimeGatePtr; double *JFETdrainPrimeSourcePrimePtr; double *JFETsourcePrimeGatePtr; double *JFETsourcePrimeSourcePtr; double *JFETsourcePrimeDrainPrimePtr; double *JFETdrainDrainPtr; double *JFETgateGatePtr; double *JFETsourceSourcePtr; double *JFETdrainPrimeDrainPrimePtr; double *JFETsourcePrimeSourcePrimePtr; int JFETmode; double JFETdCoeffs[21]; double JFETnVar[3][5]; unsigned int JFEToff; unsigned int JFETareaGiven; unsigned int JFETmGiven; unsigned int JFETicVDSGiven; unsigned int JFETicVGSGiven; unsigned int JFETtempGiven; unsigned int JFETdtempGiven; double JFETarea; double JFETm; double JFETicVDS; double JFETicVGS; double JFETtemp; double JFETdtemp; double JFETtSatCur; double JFETtGatePot; double JFETtCGS; double JFETtCGD; double JFETcorDepCap; double JFETvcrit; double JFETf1; } *

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; }

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; }


RESnoise

original_code:
int
RESnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
          Ndata *data, double *OnDens)
{
    RESmodel *firstModel = (RESmodel *) genmodel;
    RESmodel *model;
    RESinstance *inst;
    char name[64];
    double tempOutNoise;
    double tempInNoise;
    double noizDens[3];
    double lnNdens[3];
    int i;
    static char *RESnNames[3] = {
 "_thermal",
 "_1overf",
 ""
    };
    for (model = firstModel; model != ((void *)0); model = model->RESnextModel) {
 for (inst = model->RESinstances; inst != ((void *)0);
         inst = inst->RESnextInstance) {
     if (inst->RESowner != ARCHme) continue;
     if(!inst->RESnoisy) continue;
     switch (operation) {
     case 1:
  if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) {
      switch (mode) {
      case 1:
          for (i=0; i < 3; i++) {
   (void)sprintf(name,"onoise_%s%s",
                 inst->RESname, RESnNames[i]);
   data->namelist = (IFuid *)
           trealloc((char *)data->namelist,
           (data->numPlots + 1)*sizeof(IFuid));
   if (!data->namelist) return(8);
          (*(SPfrontEnd->IFnewUid))(ckt,
       &(data->namelist[data->numPlots++]),
       (IFuid)((void *)0),name,0x20,(void **)((void *)0));
                        }
   break;
      case 2:
          for (i=0; i < 3; i++) {
       (void)sprintf(name,"onoise_total_%s%s",
                     inst->RESname, RESnNames[i]);
       data->namelist = (IFuid *)
                trealloc((char *)data->namelist,
         (data->numPlots + 1)*sizeof(IFuid));
                            if (!data->namelist) return(8);
              (*(SPfrontEnd->IFnewUid))(ckt,
           &(data->namelist[data->numPlots++]),
           (IFuid)((void *)0),name,0x20,(void **)((void *)0));
       (void)sprintf(name,"inoise_total_%s%s",
           inst->RESname,RESnNames[i]);
       data->namelist = (IFuid *)
               trealloc((char *)data->namelist,
               (data->numPlots + 1)*sizeof(IFuid));
                            if (!data->namelist) return(8);
              (*(SPfrontEnd->IFnewUid))(ckt,
           &(data->namelist[data->numPlots++]),
           (IFuid)((void *)0),name,0x20,(void **)((void *)0));
                        }
   break;
      }
  }
  break;
     case 2:
  switch (mode) {
  case 1:
         NevalSrc2(&noizDens[0],&lnNdens[0],
                  ckt,2, inst->RESposNode,inst->RESnegNode,
           inst->RESconduct * inst->RESm, inst->RESdtemp);
                       NevalSrc2(&noizDens[1],(double*)((void *)0), ckt,
           3,inst->RESposNode, inst->RESnegNode,
    (double)0.0, (double)0.0);
         noizDens[1] *= inst->RESm * model->RESfNcoef * exp(model->RESfNexp *
                  log(((fabs(inst->REScurrent)) > (1E-38) ? (fabs(inst->REScurrent)) : (1E-38)))) / data->freq;
                       lnNdens[1] = log(((noizDens[1]) > (1E-38) ? (noizDens[1]) : (1E-38)));
                       noizDens[2] = noizDens[0] + noizDens[1];
         lnNdens[2] = log(noizDens[2]);
      *OnDens += noizDens[2];
      if (data->delFreq == 0.0) {
                        for (i=0; i < 3; i++) {
        inst->RESnVar[0][i] = lnNdens[i];
                        }
   if (data->freq == ((NOISEAN*)ckt->CKTcurJob)->NstartFreq) {
       for (i=0; i < 3; i++) {
       inst->RESnVar[1][i] = 0.0;
       inst->RESnVar[2][i] = 0.0;
       }
   }
      } else {
        for (i = 0; i < 3; i++) {
          if (i != 2) {
              tempOutNoise = Nintegrate(noizDens[i], lnNdens[i],
                             inst->RESnVar[0][i], data);
              tempInNoise = Nintegrate(noizDens[i] *
                                       data->GainSqInv ,lnNdens[i]
              + data->lnGainInv,
                                       inst->RESnVar[0][i]
           + data->lnGainInv,
                                       data);
       inst->RESnVar[0][i] = lnNdens[i];
       data->outNoiz += tempOutNoise;
              data->inNoise += tempInNoise;
              if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) {
           inst->RESnVar[1][i] += tempOutNoise;
           inst->RESnVar[1][2] += tempOutNoise;
           inst->RESnVar[2][i] += tempInNoise;
           inst->RESnVar[2][2] += tempInNoise;
                                }
   }
  }
 }
             if (data->prtSummary) {
   for (i=0; i < 3; i++) {
       data->outpVector[data->outNumber++] = noizDens[i];
   }
      }
      break;
  case 2:
      if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) {
          for (i=0; i < 3; i++) {
       data->outpVector[data->outNumber++] = inst->RESnVar[1][i];
       data->outpVector[data->outNumber++] = inst->RESnVar[2][i];
   }
      }
      break;
  }
  break;
     case 3:
  return (0);
  break;
     }
 }
    }
return(0);
}

canonical_original_code:
int RESnoise(int mode, int operation, struct sGENmodel *genmodel, struct CKTcircuit *ckt, struct Ndata *data, double *OnDens)
{
    struct sRESmodel *firstModel = (RESmodel *) genmodel;
    struct sRESmodel *model;
    struct sRESinstance *inst;
    char name[64];
    double tempOutNoise;
    double tempInNoise;
    double noizDens[3];
    double lnNdens[3];
    int i;
    static char *RESnNames[3] = {
 "_thermal",
 "_1overf",
 ""
    };
    for (model = firstModel; model != ((void *)0); model = model->RESnextModel) {
 for (inst = model->RESinstances; inst != ((void *)0);
         inst = inst->RESnextInstance) {
     if (inst->RESowner != ARCHme) continue;
     if(!inst->RESnoisy) continue;
     switch (operation) {
     case 1:
  if (((struct NOISEAN *)ckt->CKTcurJob)->NStpsSm != 0) {
      switch (mode) {
      case 1:
          for (i=0; i < 3; i++) {
   (void)sprintf(name,"onoise_%s%s",
                 inst->RESname, RESnNames[i]);
   data->namelist = (char **)
           trealloc((char *)data->namelist,
           (data->numPlots + 1)*sizeof(IFuid));
   if (!data->namelist) return(8);
          (*(SPfrontEnd->IFnewUid))(ckt,
       &(data->namelist[data->numPlots++]),
       (IFuid)((void *)0),name,0x20,(void **)((void *)0));
                        }
   break;
      case 2:
          for (i=0; i < 3; i++) {
       (void)sprintf(name,"onoise_total_%s%s",
                     inst->RESname, RESnNames[i]);
       data->namelist = (char **)
                trealloc((char *)data->namelist,
         (data->numPlots + 1)*sizeof(IFuid));
                            if (!data->namelist) return(8);
              (*(SPfrontEnd->IFnewUid))(ckt,
           &(data->namelist[data->numPlots++]),
           (IFuid)((void *)0),name,0x20,(void **)((void *)0));
       (void)sprintf(name,"inoise_total_%s%s",
           inst->RESname,RESnNames[i]);
       data->namelist = (char **)
               trealloc((char *)data->namelist,
               (data->numPlots + 1)*sizeof(IFuid));
                            if (!data->namelist) return(8);
              (*(SPfrontEnd->IFnewUid))(ckt,
           &(data->namelist[data->numPlots++]),
           (IFuid)((void *)0),name,0x20,(void **)((void *)0));
                        }
   break;
      }
  }
  break;
     case 2:
  switch (mode) {
  case 1:
         NevalSrc2(&noizDens[0],&lnNdens[0],
                  ckt,2, inst->RESposNode,inst->RESnegNode,
           inst->RESconduct * inst->RESm, inst->RESdtemp);
                       NevalSrc2(&noizDens[1],(double *)((void *)0), ckt,
           3,inst->RESposNode, inst->RESnegNode,
    (double)0.0, (double)0.0);
         noizDens[1] *= inst->RESm * model->RESfNcoef * exp(model->RESfNexp *
                  log(((fabs(inst->REScurrent)) > (1E-38) ? (fabs(inst->REScurrent)) : (1E-38)))) / data->freq;
                       lnNdens[1] = log(((noizDens[1]) > (1E-38) ? (noizDens[1]) : (1E-38)));
                       noizDens[2] = noizDens[0] + noizDens[1];
         lnNdens[2] = log(noizDens[2]);
      *OnDens += noizDens[2];
      if (data->delFreq == 0.0) {
                        for (i=0; i < 3; i++) {
        inst->RESnVar[0][i] = lnNdens[i];
                        }
   if (data->freq == ((struct NOISEAN *)ckt->CKTcurJob)->NstartFreq) {
       for (i=0; i < 3; i++) {
       inst->RESnVar[1][i] = 0.0;
       inst->RESnVar[2][i] = 0.0;
       }
   }
      } else {
        for (i = 0; i < 3; i++) {
          if (i != 2) {
              tempOutNoise = Nintegrate(noizDens[i], lnNdens[i],
                             inst->RESnVar[0][i], data);
              tempInNoise = Nintegrate(noizDens[i] *
                                       data->GainSqInv ,lnNdens[i]
              + data->lnGainInv,
                                       inst->RESnVar[0][i]
           + data->lnGainInv,
                                       data);
       inst->RESnVar[0][i] = lnNdens[i];
       data->outNoiz += tempOutNoise;
              data->inNoise += tempInNoise;
              if (((struct NOISEAN *)ckt->CKTcurJob)->NStpsSm != 0) {
           inst->RESnVar[1][i] += tempOutNoise;
           inst->RESnVar[1][2] += tempOutNoise;
           inst->RESnVar[2][i] += tempInNoise;
           inst->RESnVar[2][2] += tempInNoise;
                                }
   }
  }
 }
             if (data->prtSummary) {
   for (i=0; i < 3; i++) {
       data->outpVector[data->outNumber++] = noizDens[i];
   }
      }
      break;
  case 2:
      if (((struct NOISEAN *)ckt->CKTcurJob)->NStpsSm != 0) {
          for (i=0; i < 3; i++) {
       data->outpVector[data->outNumber++] = inst->RESnVar[1][i];
       data->outpVector[data->outNumber++] = inst->RESnVar[2][i];
   }
      }
      break;
  }
  break;
     case 3:
  return (0);
  break;
     }
 }
    }
return(0);
}

variable_types: mode int

variable_types: operation int

variable_types: struct Ndata { double freq; double lstFreq; double delFreq; double outNoiz; double inNoise; double GainSqInv; double lnGainInv; double lnFreq; double lnLastFreq; double delLnFreq; int outNumber; int numPlots; unsigned int prtSummary; double *outpVector; void *NplotPtr; char **namelist; } *

variable_types:
OnDens
double *

variable_types: struct sRESmodel { int RESmodType; struct sRESmodel *RESnextModel; struct sRESinstance { struct sRESmodel *RESmodPtr; struct sRESinstance *RESnextInstance; char *RESname; int RESowner; int RESstate; int RESposNode; int RESnegNode; double REStemp; double RESdtemp; double RESconduct; double RESresist; double REScurrent; double RESacResist; double RESacConduct; double RESwidth; double RESlength; double RESscale; double RESm; double REStc1; double REStc2; int RESnoisy; double *RESposPosptr; double *RESnegNegptr; double *RESposNegptr; double *RESnegPosptr; unsigned int RESresGiven; unsigned int RESwidthGiven; unsigned int RESlengthGiven; unsigned int RESscaleGiven; unsigned int REStempGiven; unsigned int RESdtempGiven; unsigned int RESacresGiven; unsigned int RESmGiven; unsigned int REStc1Given; unsigned int REStc2Given; unsigned int RESnoisyGiven; int RESsenParmNo; double RESnVar[3][3]; } *RESinstances; char *RESmodName; double REStnom; double REStempCoeff1; double REStempCoeff2; double RESsheetRes; double RESdefWidth; double RESnarrow; double RESshort; double RESfNcoef; double RESfNexp; unsigned int REStnomGiven; unsigned int REStc1Given; unsigned int REStc2Given; unsigned int RESsheetResGiven; unsigned int RESdefWidthGiven; unsigned int RESnarrowGiven; unsigned int RESshortGiven; unsigned int RESfNcoefGiven; unsigned int RESfNexpGiven; } *

variable_types: struct sRESinstance { struct sRESmodel { int RESmodType; struct sRESmodel *RESnextModel; struct sRESinstance *RESinstances; char *RESmodName; double REStnom; double REStempCoeff1; double REStempCoeff2; double RESsheetRes; double RESdefWidth; double RESnarrow; double RESshort; double RESfNcoef; double RESfNexp; unsigned int REStnomGiven; unsigned int REStc1Given; unsigned int REStc2Given; unsigned int RESsheetResGiven; unsigned int RESdefWidthGiven; unsigned int RESnarrowGiven; unsigned int RESshortGiven; unsigned int RESfNcoefGiven; unsigned int RESfNexpGiven; } *RESmodPtr; struct sRESinstance *RESnextInstance; char *RESname; int RESowner; int RESstate; int RESposNode; int RESnegNode; double REStemp; double RESdtemp; double RESconduct; double RESresist; double REScurrent; double RESacResist; double RESacConduct; double RESwidth; double RESlength; double RESscale; double RESm; double REStc1; double REStc2; int RESnoisy; double *RESposPosptr; double *RESnegNegptr; double *RESposNegptr; double *RESnegPosptr; unsigned int RESresGiven; unsigned int RESwidthGiven; unsigned int RESlengthGiven; unsigned int RESscaleGiven; unsigned int REStempGiven; unsigned int RESdtempGiven; unsigned int RESacresGiven; unsigned int RESmGiven; unsigned int REStc1Given; unsigned int REStc2Given; unsigned int RESnoisyGiven; int RESsenParmNo; double RESnVar[3][3]; } *

variable_types:
name
char [64]

variable_types: tempOutNoise double

variable_types: tempInNoise double

variable_types:
noizDens
double [3]

variable_types:
lnNdens
double [3]

variable_types: i int

variable_types:
RESnNames
char *[3]

user_defined_types: struct NOISEAN { int JOBtype; struct sJOB *JOBnextJob; char *JOBname; void *output; void *outputRef; char *input; double NstartFreq; double NstopFreq; double NfreqDelta; double NsavFstp; double NsavOnoise; double NsavInoise; int NstpType; int NnumSteps; int NStpsSm; }


original_code:
int
B2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
{
    B2instance *here = (B2instance*)inst;
    switch(param) {
        case 1:
            here->B2w = value->rValue;
            here->B2wGiven = 1;
            break;
        case 2:
            here->B2l = value->rValue;
            here->B2lGiven = 1;
            break;
        case 14:
            here->B2m = value->rValue;
            here->B2mGiven = 1;
            break;
        case 3:
            here->B2sourceArea = value->rValue;
            here->B2sourceAreaGiven = 1;
            break;
        case 4:
            here->B2drainArea = value->rValue;
            here->B2drainAreaGiven = 1;
            break;
        case 5:
            here->B2sourcePerimeter = value->rValue;
            here->B2sourcePerimeterGiven = 1;
            break;
        case 6:
            here->B2drainPerimeter = value->rValue;
            here->B2drainPerimeterGiven = 1;
            break;
        case 7:
            here->B2sourceSquares = value->rValue;
            here->B2sourceSquaresGiven = 1;
            break;
        case 8:
            here->B2drainSquares = value->rValue;
            here->B2drainSquaresGiven = 1;
            break;
        case 9:
            here->B2off = value->iValue;
            break;
        case 10:
            here->B2icVBS = value->rValue;
            here->B2icVBSGiven = 1;
            break;
        case 11:
            here->B2icVDS = value->rValue;
            here->B2icVDSGiven = 1;
            break;
        case 12:
            here->B2icVGS = value->rValue;
            here->B2icVGSGiven = 1;
            break;
        case 13:
            switch(value->v.numValue){
                case 3:
                    here->B2icVBS = *(value->v.vec.rVec+2);
                    here->B2icVBSGiven = 1;
                case 2:
                    here->B2icVGS = *(value->v.vec.rVec+1);
                    here->B2icVGSGiven = 1;
                case 1:
                    here->B2icVDS = *(value->v.vec.rVec);
                    here->B2icVDSGiven = 1;
                    break;
                default:
                    return(7);
            }
            break;
        default:
            return(7);
    }
    return(0);
}

canonical_original_code:
int B2param(int param, union uIFvalue *value, struct sGENinstance *inst, union uIFvalue *select)
{
    struct sBSIM2instance *here = (B2instance*)inst;
    switch(param) {
        case 1:
            here->B2w = value->rValue;
            here->B2wGiven = 1;
            break;
        case 2:
            here->B2l = value->rValue;
            here->B2lGiven = 1;
            break;
        case 14:
            here->B2m = value->rValue;
            here->B2mGiven = 1;
            break;
        case 3:
            here->B2sourceArea = value->rValue;
            here->B2sourceAreaGiven = 1;
            break;
        case 4:
            here->B2drainArea = value->rValue;
            here->B2drainAreaGiven = 1;
            break;
        case 5:
            here->B2sourcePerimeter = value->rValue;
            here->B2sourcePerimeterGiven = 1;
            break;
        case 6:
            here->B2drainPerimeter = value->rValue;
            here->B2drainPerimeterGiven = 1;
            break;
        case 7:
            here->B2sourceSquares = value->rValue;
            here->B2sourceSquaresGiven = 1;
            break;
        case 8:
            here->B2drainSquares = value->rValue;
            here->B2drainSquaresGiven = 1;
            break;
        case 9:
            here->B2off = value->iValue;
            break;
        case 10:
            here->B2icVBS = value->rValue;
            here->B2icVBSGiven = 1;
            break;
        case 11:
            here->B2icVDS = value->rValue;
            here->B2icVDSGiven = 1;
            break;
        case 12:
            here->B2icVGS = value->rValue;
            here->B2icVGSGiven = 1;
            break;
        case 13:
            switch(value->v.numValue){
                case 3:
                    here->B2icVBS = *(value->v.vec.rVec+2);
                    here->B2icVBSGiven = 1;
                case 2:
                    here->B2icVGS = *(value->v.vec.rVec+1);
                    here->B2icVGSGiven = 1;
                case 1:
                    here->B2icVDS = *(value->v.vec.rVec);
                    here->B2icVDSGiven = 1;
                    break;
                default:
                    return(7);
            }
            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 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 sBSIM2instance { struct sBSIM2model { int B2modType; struct sBSIM2model *B2nextModel; struct sBSIM2instance *B2instances; char *B2modName; int B2type; int pad; double B2vfb0; double B2vfbL; double B2vfbW; double B2phi0; double B2phiL; double B2phiW; double B2k10; double B2k1L; double B2k1W; double B2k20; double B2k2L; double B2k2W; double B2eta00; double B2eta0L; double B2eta0W; double B2etaB0; double B2etaBL; double B2etaBW; double B2deltaL; double B2deltaW; double B2mob00; double B2mob0B0; double B2mob0BL; double B2mob0BW; double B2mobs00; double B2mobs0L; double B2mobs0W; double B2mobsB0; double B2mobsBL; double B2mobsBW; double B2mob200; double B2mob20L; double B2mob20W; double B2mob2B0; double B2mob2BL; double B2mob2BW; double B2mob2G0; double B2mob2GL; double B2mob2GW; double B2mob300; double B2mob30L; double B2mob30W; double B2mob3B0; double B2mob3BL; double B2mob3BW; double B2mob3G0; double B2mob3GL; double B2mob3GW; double B2mob400; double B2mob40L; double B2mob40W; double B2mob4B0; double B2mob4BL; double B2mob4BW; double B2mob4G0; double B2mob4GL; double B2mob4GW; double B2ua00; double B2ua0L; double B2ua0W; double B2uaB0; double B2uaBL; double B2uaBW; double B2ub00; double B2ub0L; double B2ub0W; double B2ubB0; double B2ubBL; double B2ubBW; double B2u100; double B2u10L; double B2u10W; double B2u1B0; double B2u1BL; double B2u1BW; double B2u1D0; double B2u1DL; double B2u1DW; double B2n00; double B2n0L; double B2n0W; double B2nB0; double B2nBL; double B2nBW; double B2nD0; double B2nDL; double B2nDW; double B2vof00; double B2vof0L; double B2vof0W; double B2vofB0; double B2vofBL; double B2vofBW; double B2vofD0; double B2vofDL; double B2vofDW; double B2ai00; double B2ai0L; double B2ai0W; double B2aiB0; double B2aiBL; double B2aiBW; double B2bi00; double B2bi0L; double B2bi0W; double B2biB0; double B2biBL; double B2biBW; double B2vghigh0; double B2vghighL; double B2vghighW; double B2vglow0; double B2vglowL; double B2vglowW; double B2tox; double B2Cox; double B2temp; double B2vdd; double B2vdd2; double B2vgg; double B2vgg2; double B2vbb; double B2vbb2; double B2gateSourceOverlapCap; double B2gateDrainOverlapCap; double B2gateBulkOverlapCap; double B2Vtm; double B2sheetResistance; double B2jctSatCurDensity; double B2bulkJctPotential; double B2bulkJctBotGradingCoeff; double B2bulkJctSideGradingCoeff; double B2sidewallJctPotential; double B2unitAreaJctCap; double B2unitLengthSidewallJctCap; double B2defaultWidth; double B2deltaLength; double B2fNcoef; double B2fNexp; struct bsim2SizeDependParam { double Width; double Length; double B2vfb; double B2phi; double B2k1; double B2k2; double B2eta0; double B2etaB; double B2beta0; double B2beta0B; double B2betas0; double B2betasB; double B2beta20; double B2beta2B; double B2beta2G; double B2beta30; double B2beta3B; double B2beta3G; double B2beta40; double B2beta4B; double B2beta4G; double B2ua0; double B2uaB; double B2ub0; double B2ubB; double B2u10; double B2u1B; double B2u1D; double B2n0; double B2nB; double B2nD; double B2vof0; double B2vofB; double B2vofD; double B2ai0; double B2aiB; double B2bi0; double B2biB; double B2vghigh; double B2vglow; double B2GDoverlapCap; double B2GSoverlapCap; double B2GBoverlapCap; double SqrtPhi; double Phis3; double CoxWL; double One_Third_CoxWL; double Two_Third_CoxWL; double Arg; double B2vt0; struct bsim2SizeDependParam *pNext; } *pSizeDependParamKnot; unsigned int B2channelChargePartitionFlag; unsigned int B2vfb0Given; unsigned int B2vfbLGiven; unsigned int B2vfbWGiven; unsigned int B2phi0Given; unsigned int B2phiLGiven; unsigned int B2phiWGiven; unsigned int B2k10Given; unsigned int B2k1LGiven; unsigned int B2k1WGiven; unsigned int B2k20Given; unsigned int B2k2LGiven; unsigned int B2k2WGiven; unsigned int B2eta00Given; unsigned int B2eta0LGiven; unsigned int B2eta0WGiven; unsigned int B2etaB0Given; unsigned int B2etaBLGiven; unsigned int B2etaBWGiven; unsigned int B2deltaLGiven; unsigned int B2deltaWGiven; unsigned int B2mob00Given; unsigned int B2mob0B0Given; unsigned int B2mob0BLGiven; unsigned int B2mob0BWGiven; unsigned int B2mobs00Given; unsigned int B2mobs0LGiven; unsigned int B2mobs0WGiven; unsigned int B2mobsB0Given; unsigned int B2mobsBLGiven; unsigned int B2mobsBWGiven; unsigned int B2mob200Given; unsigned int B2mob20LGiven; unsigned int B2mob20WGiven; unsigned int B2mob2B0Given; unsigned int B2mob2BLGiven; unsigned int B2mob2BWGiven; unsigned int B2mob2G0Given; unsigned int B2mob2GLGiven; unsigned int B2mob2GWGiven; unsigned int B2mob300Given; unsigned int B2mob30LGiven; unsigned int B2mob30WGiven; unsigned int B2mob3B0Given; unsigned int B2mob3BLGiven; unsigned int B2mob3BWGiven; unsigned int B2mob3G0Given; unsigned int B2mob3GLGiven; unsigned int B2mob3GWGiven; unsigned int B2mob400Given; unsigned int B2mob40LGiven; unsigned int B2mob40WGiven; unsigned int B2mob4B0Given; unsigned int B2mob4BLGiven; unsigned int B2mob4BWGiven; unsigned int B2mob4G0Given; unsigned int B2mob4GLGiven; unsigned int B2mob4GWGiven; unsigned int B2ua00Given; unsigned int B2ua0LGiven; unsigned int B2ua0WGiven; unsigned int B2uaB0Given; unsigned int B2uaBLGiven; unsigned int B2uaBWGiven; unsigned int B2ub00Given; unsigned int B2ub0LGiven; unsigned int B2ub0WGiven; unsigned int B2ubB0Given; unsigned int B2ubBLGiven; unsigned int B2ubBWGiven; unsigned int B2u100Given; unsigned int B2u10LGiven; unsigned int B2u10WGiven; unsigned int B2u1B0Given; unsigned int B2u1BLGiven; unsigned int B2u1BWGiven; unsigned int B2u1D0Given; unsigned int B2u1DLGiven; unsigned int B2u1DWGiven; unsigned int B2n00Given; unsigned int B2n0LGiven; unsigned int B2n0WGiven; unsigned int B2nB0Given; unsigned int B2nBLGiven; unsigned int B2nBWGiven; unsigned int B2nD0Given; unsigned int B2nDLGiven; unsigned int B2nDWGiven; unsigned int B2vof00Given; unsigned int B2vof0LGiven; unsigned int B2vof0WGiven; unsigned int B2vofB0Given; unsigned int B2vofBLGiven; unsigned int B2vofBWGiven; unsigned int B2vofD0Given; unsigned int B2vofDLGiven; unsigned int B2vofDWGiven; unsigned int B2ai00Given; unsigned int B2ai0LGiven; unsigned int B2ai0WGiven; unsigned int B2aiB0Given; unsigned int B2aiBLGiven; unsigned int B2aiBWGiven; unsigned int B2bi00Given; unsigned int B2bi0LGiven; unsigned int B2bi0WGiven; unsigned int B2biB0Given; unsigned int B2biBLGiven; unsigned int B2biBWGiven; unsigned int B2vghigh0Given; unsigned int B2vghighLGiven; unsigned int B2vghighWGiven; unsigned int B2vglow0Given; unsigned int B2vglowLGiven; unsigned int B2vglowWGiven; unsigned int B2toxGiven; unsigned int B2tempGiven; unsigned int B2vddGiven; unsigned int B2vggGiven; unsigned int B2vbbGiven; unsigned int B2gateSourceOverlapCapGiven; unsigned int B2gateDrainOverlapCapGiven; unsigned int B2gateBulkOverlapCapGiven; unsigned int B2channelChargePartitionFlagGiven; unsigned int B2sheetResistanceGiven; unsigned int B2jctSatCurDensityGiven; unsigned int B2bulkJctPotentialGiven; unsigned int B2bulkJctBotGradingCoeffGiven; unsigned int B2sidewallJctPotentialGiven; unsigned int B2bulkJctSideGradingCoeffGiven; unsigned int B2unitAreaJctCapGiven; unsigned int B2unitLengthSidewallJctCapGiven; unsigned int B2defaultWidthGiven; unsigned int B2deltaLengthGiven; unsigned int B2fNcoefGiven; unsigned int B2fNexpGiven; unsigned int B2typeGiven; } *B2modPtr; struct sBSIM2instance *B2nextInstance; char *B2name; int B2owner; int B2states; int B2dNode; int B2gNode; int B2sNode; int B2bNode; int B2dNodePrime; int B2sNodePrime; double B2l; double B2w; double B2m; double B2drainArea; double B2sourceArea; double B2drainSquares; double B2sourceSquares; double B2drainPerimeter; double B2sourcePerimeter; double B2sourceConductance; double B2drainConductance; double B2icVBS; double B2icVDS; double B2icVGS; double B2von; double B2vdsat; int B2off; int B2mode; struct bsim2SizeDependParam *pParam; unsigned int B2lGiven; unsigned int B2wGiven; unsigned int B2mGiven; unsigned int B2drainAreaGiven; unsigned int B2sourceAreaGiven; unsigned int B2drainSquaresGiven; unsigned int B2sourceSquaresGiven; unsigned int B2drainPerimeterGiven; unsigned int B2sourcePerimeterGiven; unsigned int B2dNodePrimeSet; unsigned int B2sNodePrimeSet; unsigned int B2icVBSGiven; unsigned int B2icVDSGiven; unsigned int B2icVGSGiven; unsigned int B2vonGiven; unsigned int B2vdsatGiven; double *B2DdPtr; double *B2GgPtr; double *B2SsPtr; double *B2BbPtr; double *B2DPdpPtr; double *B2SPspPtr; double *B2DdpPtr; double *B2GbPtr; double *B2GdpPtr; double *B2GspPtr; double *B2SspPtr; double *B2BdpPtr; double *B2BspPtr; double *B2DPspPtr; double *B2DPdPtr; double *B2BgPtr; double *B2DPgPtr; double *B2SPgPtr; double *B2SPsPtr; double *B2DPbPtr; double *B2SPbPtr; double *B2SPdpPtr; double B2nVar[3][5]; } *

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; }