Jspice3
captemp.c File Reference
#include "spice.h"
#include <stdio.h>
#include "capdefs.h"
#include "sperror.h"
#include "util.h"
Include dependency graph for captemp.c:

Go to the source code of this file.

Functions

int CAPtemp (GENmodel *inModel, CKTcircuit *ckt)
 

Function Documentation

int CAPtemp ( GENmodel inModel,
CKTcircuit ckt 
)

Definition at line 18 of file captemp.c.

22 {
23  CAPmodel *model = (CAPmodel*)inModel;
24  CAPinstance *here;
25 
26  /* loop through all the capacitor models */
27  for ( ; model != NULL; model = model->CAPnextModel) {
28 
29  /* loop through all the instances of the model */
30  for (here = model->CAPinstances; here != NULL;
31  here = here->CAPnextInstance) {
32 
33  /* Default Value Processing for Capacitor Instance */
34  if (!here->CAPwidthGiven) {
35  here->CAPwidth = model->CAPdefWidth;
36  }
37  if (!here->CAPcapGiven) {
38  here->CAPcapac =
39  model->CAPcj *
40  (here->CAPwidth - model->CAPnarrow) *
41  (here->CAPlength - model->CAPnarrow) +
42  model->CAPcjsw * 2 * (
43  (here->CAPlength - model->CAPnarrow) +
44  (here->CAPwidth - model->CAPnarrow) );
45  }
46  }
47  }
48  return (OK);
49 }
struct sCAPinstance * CAPnextInstance
Definition: capdefs.h:21
double CAPcjsw
Definition: capdefs.h:61
double CAPcj
Definition: capdefs.h:60
CAPinstance * CAPinstances
Definition: capdefs.h:57
#define OK
Definition: iferrmsg.h:17
double CAPwidth
Definition: capdefs.h:31
double CAPnarrow
Definition: capdefs.h:63
#define NULL
Definition: spdefs.h:121
double CAPlength
Definition: capdefs.h:32
double CAPdefWidth
Definition: capdefs.h:62
static char model[32]
Definition: subckt.c:76
unsigned CAPcapGiven
Definition: capdefs.h:44
unsigned CAPwidthGiven
Definition: capdefs.h:46
double CAPcapac
Definition: capdefs.h:27
struct sCAPmodel * CAPnextModel
Definition: capdefs.h:55