Jspice3
b1trunc.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 J. 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 "bsim1def.h"
12 #include "sperror.h"
13 #include "cktext.h"
14 
15 
16 int
17 B1trunc(inModel,ckt,timeStep)
18  GENmodel *inModel;
19  register CKTcircuit *ckt;
20  double *timeStep;
21 
22 {
23  register B1model *model = (B1model*)inModel;
24  register B1instance *here;
25 #ifdef STEPDEBUG
26  double debugtemp;
27 #endif /* STEPDEBUG */
28 
29  for( ; model != NULL; model = model->B1nextModel) {
30  for(here=model->B1instances;here!=NULL;here = here->B1nextInstance){
31 #ifdef STEPDEBUG
32  debugtemp = *timeStep;
33 #endif /* STEPDEBUG */
34  CKTterr(here->B1qb,ckt,timeStep);
35  CKTterr(here->B1qg,ckt,timeStep);
36  CKTterr(here->B1qd,ckt,timeStep);
37 #ifdef STEPDEBUG
38  if(debugtemp != *timeStep) {
39  printf("device %s reduces step from %g to %g\n",
40  here->B1name,debugtemp,*timeStep);
41  }
42 #endif /* STEPDEBUG */
43  }
44  }
45  return(OK);
46 }
47 
int B1trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
Definition: b1trunc.c:17
IFuid B1name
Definition: bsim1def.h:24
#define OK
Definition: iferrmsg.h:17
#define NULL
Definition: spdefs.h:121
void CKTterr()
B1instance * B1instances
Definition: bsim1def.h:303
static char model[32]
Definition: subckt.c:76
struct sBSIM1model * B1nextModel
Definition: bsim1def.h:301
struct sBSIM1instance * B1nextInstance
Definition: bsim1def.h:22