Jspice3
b2trunc.c
Go to the documentation of this file.
1 /***************************************************************************
2 JSPICE3 adaptation of Spice3f2 - Copyright (c) Stephen R. Whiteley 1992
3 Copyright 1990 Regents of the University of California. All rights reserved.
4 Authors: 1985 Hong June Park, Thomas L. Quarles
5  1993 Stephen R. Whiteley
6 ****************************************************************************/
7 
8 #include "spice.h"
9 #include <stdio.h>
10 #include <math.h>
11 #include "bsim2def.h"
12 #include "sperror.h"
13 #include "cktext.h"
14 
15 
16 int
17 B2trunc(inModel,ckt,timeStep)
18  GENmodel *inModel;
19  register CKTcircuit *ckt;
20  double *timeStep;
21 
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 }
47 
48 
B2instance * B2instances
Definition: bsim2def.h:226
struct sBSIM2instance * B2nextInstance
Definition: bsim2def.h:19
int B2trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
Definition: b2trunc.c:17
#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