Beispiel #1
0
int HSM2trunc(
     GENmodel *inModel,
     register CKTcircuit *ckt,
     double *timeStep)

{
  register HSM2model *model = (HSM2model*)inModel;
  register HSM2instance *here;
#ifdef STEPDEBUG
  double debugtemp;
#endif /* STEPDEBUG */
  
  for ( ;model != NULL ;model = model->HSM2nextModel ) {
    for ( here=model->HSM2instances ;here!=NULL ;
	  here = here->HSM2nextInstance ) {
#ifdef STEPDEBUG
      debugtemp = *timeStep;
#endif /* STEPDEBUG */
      CKTterr(here->HSM2qb,ckt,timeStep);
      CKTterr(here->HSM2qg,ckt,timeStep);
      CKTterr(here->HSM2qd,ckt,timeStep);
#ifdef STEPDEBUG
      if ( debugtemp != *timeStep ) 
	printf("device %s reduces step from %g to %g\n",
	       here->HSM2name, debugtemp, *timeStep);
#endif /* STEPDEBUG */
    }
  }
  return(OK);
}
Beispiel #2
0
int
BSIM3v1trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
BSIM3v1model *model = (BSIM3v1model*)inModel;
BSIM3v1instance *here;

#ifdef STEPDEBUG
    double debugtemp;
#endif /* STEPDEBUG */

    for (; model != NULL; model = BSIM3v1nextModel(model))
    {    for (here = BSIM3v1instances(model); here != NULL;
	      here = BSIM3v1nextInstance(here))
	 {
#ifdef STEPDEBUG
            debugtemp = *timeStep;
#endif /* STEPDEBUG */
            CKTterr(here->BSIM3v1qb,ckt,timeStep);
            CKTterr(here->BSIM3v1qg,ckt,timeStep);
            CKTterr(here->BSIM3v1qd,ckt,timeStep);
#ifdef STEPDEBUG
            if(debugtemp != *timeStep)
	    {  printf("device %s reduces step from %g to %g\n",
                       here->BSIM3v1name,debugtemp,*timeStep);
            }
#endif /* STEPDEBUG */
        }
    }
    return(OK);
}
Beispiel #3
0
int
BSIM3v1Strunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
BSIM3v1Smodel *model = (BSIM3v1Smodel*)inModel;
BSIM3v1Sinstance *here;

#ifdef STEPDEBUG
    double debugtemp;
#endif /* STEPDEBUG */

    for (; model != NULL; model = model->BSIM3v1SnextModel)
    {    for (here = model->BSIM3v1Sinstances; here != NULL;
	      here = here->BSIM3v1SnextInstance)
	 {
        
	 if (here->BSIM3v1Sowner != ARCHme) 
	         continue;

#ifdef STEPDEBUG
            debugtemp = *timeStep;
#endif /* STEPDEBUG */
            CKTterr(here->BSIM3v1Sqb,ckt,timeStep);
            CKTterr(here->BSIM3v1Sqg,ckt,timeStep);
            CKTterr(here->BSIM3v1Sqd,ckt,timeStep);
#ifdef STEPDEBUG
            if(debugtemp != *timeStep)
	    {  printf("device %s reduces step from %g to %g\n",
                       here->BSIM3v1Sname,debugtemp,*timeStep);
            }
#endif /* STEPDEBUG */

        }
     }
    return(OK);
}
Beispiel #4
0
int
B3SOIDDtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
B3SOIDDinstance *here;

#ifdef STEPDEBUG
    double debugtemp;
#endif /* STEPDEBUG */

    for (; model != NULL; model = model->B3SOIDDnextModel)
    {    for (here = model->B3SOIDDinstances; here != NULL;
	      here = here->B3SOIDDnextInstance)
	 {

#ifdef STEPDEBUG
            debugtemp = *timeStep;
#endif /* STEPDEBUG */
            CKTterr(here->B3SOIDDqb,ckt,timeStep);
            CKTterr(here->B3SOIDDqg,ckt,timeStep);
            CKTterr(here->B3SOIDDqd,ckt,timeStep);
#ifdef STEPDEBUG
            if(debugtemp != *timeStep)
	    {  printf("device %s reduces step from %g to %g\n",
                       here->B3SOIDDname,debugtemp,*timeStep);
            }
#endif /* STEPDEBUG */
        }
    }
    return(OK);
}
Beispiel #5
0
int
HFETAtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
    HFETAmodel *model = (HFETAmodel*)inModel;
    HFETAinstance *here;

    for( ; model != NULL; model = model->HFETAnextModel) {
        for(here=model->HFETAinstances;here!=NULL;here = here->HFETAnextInstance){

            CKTterr(here->HFETAqgs,ckt,timeStep);
            CKTterr(here->HFETAqgd,ckt,timeStep);
        }
    }
    return(OK);
}
Beispiel #6
0
int
JFETtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
    JFETmodel *model = (JFETmodel*)inModel;
    JFETinstance *here;

    for( ; model != NULL; model = model->JFETnextModel) {
        for(here=model->JFETinstances;here!=NULL;here = here->JFETnextInstance){
	    if (here->JFETowner != ARCHme) continue;

            CKTterr(here->JFETqgs,ckt,timeStep);
            CKTterr(here->JFETqgd,ckt,timeStep);
        }
    }
    return(OK);
}
Beispiel #7
0
int
MOS3trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
    MOS3model *model = (MOS3model *)inModel;
    MOS3instance *here;

    for( ; model != NULL; model = model->MOS3nextModel) {
        for(here=model->MOS3instances;here!=NULL;here = here->MOS3nextInstance){
        
            CKTterr(here->MOS3qgs,ckt,timeStep);
            CKTterr(here->MOS3qgd,ckt,timeStep);
            CKTterr(here->MOS3qgb,ckt,timeStep);
        }
    }
    return(OK);
}
Beispiel #8
0
int
MOS6trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
    MOS6model *model = (MOS6model *)inModel;
    MOS6instance *here;

    for( ; model != NULL; model = model->MOS6nextModel) {
        for(here=model->MOS6instances;here!=NULL;here = here->MOS6nextInstance){
	    if (here->MOS6owner != ARCHme) continue;
        
            CKTterr(here->MOS6qgs,ckt,timeStep);
            CKTterr(here->MOS6qgd,ckt,timeStep);
            CKTterr(here->MOS6qgb,ckt,timeStep);
        }
    }
    return(OK);
}
Beispiel #9
0
int
DIOtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
    DIOmodel *model = (DIOmodel*)inModel;
    DIOinstance *here;

    for( ; model != NULL; model = model->DIOnextModel) {
        for(here=model->DIOinstances;here!=NULL;here = here->DIOnextInstance){
	    if (here->DIOowner != ARCHme) continue;
            CKTterr(here->DIOcapCharge,ckt,timeStep);
        }
    }
    return(OK);
}
Beispiel #10
0
int
CAPtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
    CAPmodel *model = (CAPmodel*)inModel;
    CAPinstance *here;

    for( ; model!= NULL; model = model->CAPnextModel) {
        for(here = model->CAPinstances ; here != NULL ;
                here = here->CAPnextInstance) {
	    if (here->CAPowner != ARCHme) continue;

            CKTterr(here->CAPqcap,ckt,timeStep);
        }
    }
    return(OK);
}
Beispiel #11
0
int
VBICtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
    VBICmodel *model = (VBICmodel*)inModel;
    VBICinstance *here;

    for( ; model != NULL; model = VBICnextModel(model)) {
        for(here=VBICinstances(model);here!=NULL;
            here = VBICnextInstance(here)){

            CKTterr(here->VBICqbe,ckt,timeStep);
            CKTterr(here->VBICqbex,ckt,timeStep);
            CKTterr(here->VBICqbc,ckt,timeStep);
            CKTterr(here->VBICqbcx,ckt,timeStep);
            CKTterr(here->VBICqbep,ckt,timeStep);
            CKTterr(here->VBICqbeo,ckt,timeStep);
            CKTterr(here->VBICqbco,ckt,timeStep);
            CKTterr(here->VBICqbcp,ckt,timeStep);
        }
    }
    return(OK);
}
Beispiel #12
0
int
BSIM4v7trunc(
GENmodel *inModel,
CKTcircuit *ckt,
double *timeStep)
{
BSIM4v7model *model = (BSIM4v7model*)inModel;
BSIM4v7instance *here;

#ifdef STEPDEBUG
    double debugtemp;
#endif /* STEPDEBUG */

    for (; model != NULL; model = BSIM4v7nextModel(model))
    {    for (here = BSIM4v7instances(model); here != NULL;
	      here = BSIM4v7nextInstance(here))
	      {
#ifdef STEPDEBUG
            debugtemp = *timeStep;
#endif /* STEPDEBUG */
            CKTterr(here->BSIM4v7qb,ckt,timeStep);
            CKTterr(here->BSIM4v7qg,ckt,timeStep);
            CKTterr(here->BSIM4v7qd,ckt,timeStep);
            if (here->BSIM4v7trnqsMod)
                CKTterr(here->BSIM4v7qcdump,ckt,timeStep);
            if (here->BSIM4v7rbodyMod)
            {   CKTterr(here->BSIM4v7qbs,ckt,timeStep);
                CKTterr(here->BSIM4v7qbd,ckt,timeStep);
	          }
	          if (here->BSIM4v7rgateMod == 3)
		        CKTterr(here->BSIM4v7qgmid,ckt,timeStep);
#ifdef STEPDEBUG
            if(debugtemp != *timeStep)
	          {  printf("device %s reduces step from %g to %g\n",
                       here->BSIM4v7name,debugtemp,*timeStep);
            }
#endif /* STEPDEBUG */
        }
    }
    return(OK);
}
Beispiel #13
0
int psp102trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
{
  register psp102model *model = (psp102model*)inModel;
  register psp102instance *here;

#ifdef STEPDEBUG
    double debugtemp;
#endif /* STEPDEBUG */  
  
  for ( ; model != NULL; model = model->psp102nextModel )
  {
    /* loop through all the instances of the model */
    for (here = model->psp102instances; here != NULL ; here = here->psp102nextInstance)
    {
#ifdef STEPDEBUG
            debugtemp = *timeStep;
#endif /* STEPDEBUG */   
 
            CKTterr(here->state_NOI_GND, ckt, timeStep);
            CKTterr(here->state_B_D, ckt, timeStep);
            CKTterr(here->state_B_S, ckt, timeStep);
            CKTterr(here->state_G_B, ckt, timeStep);
            CKTterr(here->state_G_D, ckt, timeStep);
            CKTterr(here->state_G_S, ckt, timeStep);
            CKTterr(here->state_D_S, ckt, timeStep);
    
 
#ifdef STEPDEBUG
            if(debugtemp != *timeStep)
	    {  printf("device %s reduces step from %g to %g\n",
                       here->psp102name,debugtemp,*timeStep);
            }
#endif /* STEPDEBUG */
   
    } /* End of Instance */
  } /* End of Model */
  return(OK);
}
Beispiel #14
0
int HSMHV2trunc(
     GENmodel *inModel,
     CKTcircuit *ckt,
     double *timeStep)
{
  HSMHV2model *model = (HSMHV2model*)inModel;
  HSMHV2instance *here;
#ifdef STEPDEBUG
  double debugtemp=0.0 ;
#endif /* STEPDEBUG */
  
  for ( ;model != NULL ;model = HSMHV2nextModel(model)) {
    for ( here=HSMHV2instances(model);here!=NULL ;
	  here = HSMHV2nextInstance(here)) {
#ifdef STEPDEBUG
      debugtemp = *timeStep;
#endif /* STEPDEBUG */
      CKTterr(here->HSMHV2qb,ckt,timeStep);
      CKTterr(here->HSMHV2qg,ckt,timeStep);
      CKTterr(here->HSMHV2qd,ckt,timeStep);

      CKTterr(here->HSMHV2qbs,ckt,timeStep);
      CKTterr(here->HSMHV2qbd,ckt,timeStep);
      CKTterr(here->HSMHV2qfd,ckt,timeStep);
      CKTterr(here->HSMHV2qfs,ckt,timeStep);


#ifdef STEPDEBUG
      if ( debugtemp != *timeStep ) 
	printf("device %s reduces step from %g to %g\n",
	       here->HSMHV2name, debugtemp, *timeStep);
#endif /* STEPDEBUG */
    }
  }
  return(OK);
}