You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.2 KiB
53 lines
1.2 KiB
/**********
|
|
Copyright 1999 Regents of the University of California. All rights reserved.
|
|
Author: 1995 Min-Chie Jeng and Mansun Chan.
|
|
Author: 1997-1999 Weidong Liu.
|
|
File: b3trunc.c
|
|
**********/
|
|
|
|
#include "ngspice.h"
|
|
#include <stdio.h>
|
|
#include <math.h>
|
|
#include "cktdefs.h"
|
|
#include "bsim3def.h"
|
|
#include "sperror.h"
|
|
#include "suffix.h"
|
|
|
|
|
|
int
|
|
BSIM3trunc(inModel,ckt,timeStep)
|
|
GENmodel *inModel;
|
|
CKTcircuit *ckt;
|
|
double *timeStep;
|
|
{
|
|
BSIM3model *model = (BSIM3model*)inModel;
|
|
BSIM3instance *here;
|
|
|
|
#ifdef STEPDEBUG
|
|
double debugtemp;
|
|
#endif /* STEPDEBUG */
|
|
|
|
for (; model != NULL; model = model->BSIM3nextModel)
|
|
{ for (here = model->BSIM3instances; here != NULL;
|
|
here = here->BSIM3nextInstance)
|
|
{
|
|
if (here->BSIM3owner != ARCHme) continue;
|
|
#ifdef STEPDEBUG
|
|
debugtemp = *timeStep;
|
|
#endif /* STEPDEBUG */
|
|
CKTterr(here->BSIM3qb,ckt,timeStep);
|
|
CKTterr(here->BSIM3qg,ckt,timeStep);
|
|
CKTterr(here->BSIM3qd,ckt,timeStep);
|
|
#ifdef STEPDEBUG
|
|
if(debugtemp != *timeStep)
|
|
{ printf("device %s reduces step from %g to %g\n",
|
|
here->BSIM3name,debugtemp,*timeStep);
|
|
}
|
|
#endif /* STEPDEBUG */
|
|
}
|
|
}
|
|
return(OK);
|
|
}
|
|
|
|
|
|
|