Jspice3
b2trunc.c File Reference
#include "spice.h"
#include <stdio.h>
#include <math.h>
#include "bsim2def.h"
#include "sperror.h"
#include "cktext.h"
Include dependency graph for b2trunc.c:

Go to the source code of this file.

Functions

int B2trunc (GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
 

Function Documentation

int B2trunc ( GENmodel inModel,
CKTcircuit ckt,
double *  timeStep 
)

Definition at line 17 of file b2trunc.c.

22 {
23  register B2model *model = (B2model*)inModel;
24  register B2instance *here;
25 #ifdef STEPDEBUG
26  double debugtemp;
27 #endif /* STEPDEBUG */
28 
29  for( ; model != NULL; model = model->B2nextModel) {
30  for(here=model->B2instances;here!=NULL;here = here->B2nextInstance){
31 #ifdef STEPDEBUG
32  debugtemp = *timeStep;
33 #endif /* STEPDEBUG */
34  CKTterr(here->B2qb,ckt,timeStep);
35  CKTterr(here->B2qg,ckt,timeStep);
36  CKTterr(here->B2qd,ckt,timeStep);
37 #ifdef STEPDEBUG
38  if(debugtemp != *timeStep) {
39  printf("device %s reduces step from %g to %g\n",
40  here->B2name,debugtemp,*timeStep);
41  }
42 #endif /* STEPDEBUG */
43  }
44  }
45  return(OK);
46 }
B2instance * B2instances
Definition: bsim2def.h:226
struct sBSIM2instance * B2nextInstance
Definition: bsim2def.h:19
#define OK
Definition: iferrmsg.h:17
#define NULL
Definition: spdefs.h:121
void CKTterr()
static char model[32]
Definition: subckt.c:76
struct sBSIM2model * B2nextModel
Definition: bsim2def.h:224
IFuid B2name
Definition: bsim2def.h:21