Jspice3
Main Page
Data Structures
Files
File List
Globals
captemp.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 Thomas L. Quarles
5
1992 Stephen R. Whiteley
6
****************************************************************************/
7
8
9
#include "
spice.h
"
10
#include <stdio.h>
11
#include "
capdefs.h
"
12
#include "
sperror.h
"
13
#include "
util.h
"
14
15
16
/*ARGSUSED*/
17
int
18
CAPtemp
(inModel,ckt)
19
20
GENmodel
*inModel;
21
CKTcircuit
*ckt;
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
}
50
sCAPinstance::CAPnextInstance
struct sCAPinstance * CAPnextInstance
Definition:
capdefs.h:21
CKTcircuit
Definition:
cktdefs.h:62
sCAPmodel::CAPcjsw
double CAPcjsw
Definition:
capdefs.h:61
capdefs.h
sCAPinstance
Definition:
capdefs.h:19
sCAPmodel::CAPcj
double CAPcj
Definition:
capdefs.h:60
sCAPmodel
Definition:
capdefs.h:53
sCAPmodel::CAPinstances
CAPinstance * CAPinstances
Definition:
capdefs.h:57
OK
#define OK
Definition:
iferrmsg.h:17
sCAPinstance::CAPwidth
double CAPwidth
Definition:
capdefs.h:31
sperror.h
sCAPmodel::CAPnarrow
double CAPnarrow
Definition:
capdefs.h:63
NULL
#define NULL
Definition:
spdefs.h:121
sCAPinstance::CAPlength
double CAPlength
Definition:
capdefs.h:32
util.h
spice.h
sGENmodel
Definition:
gendefs.h:39
sCAPmodel::CAPdefWidth
double CAPdefWidth
Definition:
capdefs.h:62
model
static char model[32]
Definition:
subckt.c:76
sCAPinstance::CAPcapGiven
unsigned CAPcapGiven
Definition:
capdefs.h:44
sCAPinstance::CAPwidthGiven
unsigned CAPwidthGiven
Definition:
capdefs.h:46
CAPtemp
int CAPtemp(GENmodel *inModel, CKTcircuit *ckt)
Definition:
captemp.c:18
sCAPinstance::CAPcapac
double CAPcapac
Definition:
capdefs.h:27
sCAPmodel::CAPnextModel
struct sCAPmodel * CAPnextModel
Definition:
capdefs.h:55
src
lib
dev
cap
captemp.c
Generated by
1.8.11