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

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 17 of file b1trunc.c.

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 }
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