Jspice3
Main Page
Data Structures
Files
File List
Globals
b2getic.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 "
bsim2def.h
"
11
#include "
sperror.h
"
12
13
14
int
15
B2getic
(inModel,ckt)
16
GENmodel
*inModel;
17
CKTcircuit
*ckt;
18
19
{
20
21
B2model
*
model
= (
B2model
*)inModel;
22
B2instance
*here;
23
/*
24
* grab initial conditions out of rhs array. User specified, so use
25
* external nodes to get values
26
*/
27
28
for
( ;
model
; model = model->
B2nextModel
) {
29
for
(here = model->
B2instances
; here ; here = here->
B2nextInstance
) {
30
if
(!here->
B2icVBSGiven
) {
31
here->
B2icVBS
=
32
*(ckt->
CKTrhs
+ here->
B2bNode
) -
33
*(ckt->
CKTrhs
+ here->
B2sNode
);
34
}
35
if
(!here->
B2icVDSGiven
) {
36
here->
B2icVDS
=
37
*(ckt->
CKTrhs
+ here->
B2dNode
) -
38
*(ckt->
CKTrhs
+ here->
B2sNode
);
39
}
40
if
(!here->
B2icVGSGiven
) {
41
here->
B2icVGS
=
42
*(ckt->
CKTrhs
+ here->
B2gNode
) -
43
*(ckt->
CKTrhs
+ here->
B2sNode
);
44
}
45
}
46
}
47
return
(
OK
);
48
}
49
sBSIM2model::B2instances
B2instance * B2instances
Definition:
bsim2def.h:226
sBSIM2instance::B2bNode
int B2bNode
Definition:
bsim2def.h:27
sBSIM2instance::B2nextInstance
struct sBSIM2instance * B2nextInstance
Definition:
bsim2def.h:19
sBSIM2instance
Definition:
bsim2def.h:17
sBSIM2instance::B2icVBS
double B2icVBS
Definition:
bsim2def.h:42
sBSIM2instance::B2icVGS
double B2icVGS
Definition:
bsim2def.h:44
CKTcircuit
Definition:
cktdefs.h:62
sBSIM2instance::B2icVBSGiven
unsigned B2icVBSGiven
Definition:
bsim2def.h:63
sBSIM2instance::B2gNode
int B2gNode
Definition:
bsim2def.h:25
sBSIM2instance::B2icVDSGiven
unsigned B2icVDSGiven
Definition:
bsim2def.h:64
OK
#define OK
Definition:
iferrmsg.h:17
sBSIM2instance::B2sNode
int B2sNode
Definition:
bsim2def.h:26
sperror.h
sBSIM2instance::B2icVDS
double B2icVDS
Definition:
bsim2def.h:43
spice.h
sGENmodel
Definition:
gendefs.h:39
sBSIM2model
Definition:
bsim2def.h:222
model
static char model[32]
Definition:
subckt.c:76
sBSIM2model::B2nextModel
struct sBSIM2model * B2nextModel
Definition:
bsim2def.h:224
B2getic
int B2getic(GENmodel *inModel, CKTcircuit *ckt)
Definition:
b2getic.c:15
bsim2def.h
sBSIM2instance::B2icVGSGiven
unsigned B2icVGSGiven
Definition:
bsim2def.h:65
sBSIM2instance::B2dNode
int B2dNode
Definition:
bsim2def.h:24
CKTcircuit::CKTrhs
double * CKTrhs
Definition:
cktdefs.h:97
src
lib
dev
bsim2
b2getic.c
Generated by
1.8.11