Jspice3
Main Page
Data Structures
Files
File List
Globals
b1getic.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 "
bsim1def.h
"
11
#include "
sperror.h
"
12
13
14
int
15
B1getic
(inModel,ckt)
16
GENmodel
*inModel;
17
CKTcircuit
*ckt;
18
19
{
20
21
B1model
*
model
= (
B1model
*)inModel;
22
B1instance
*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->
B1nextModel
) {
29
for
(here = model->
B1instances
; here ; here = here->
B1nextInstance
) {
30
if
(!here->
B1icVBSGiven
) {
31
here->
B1icVBS
=
32
*(ckt->
CKTrhs
+ here->
B1bNode
) -
33
*(ckt->
CKTrhs
+ here->
B1sNode
);
34
}
35
if
(!here->
B1icVDSGiven
) {
36
here->
B1icVDS
=
37
*(ckt->
CKTrhs
+ here->
B1dNode
) -
38
*(ckt->
CKTrhs
+ here->
B1sNode
);
39
}
40
if
(!here->
B1icVGSGiven
) {
41
here->
B1icVGS
=
42
*(ckt->
CKTrhs
+ here->
B1gNode
) -
43
*(ckt->
CKTrhs
+ here->
B1sNode
);
44
}
45
}
46
}
47
return
(
OK
);
48
}
sBSIM1instance::B1icVBS
double B1icVBS
Definition:
bsim1def.h:45
sBSIM1instance
Definition:
bsim1def.h:20
CKTcircuit
Definition:
cktdefs.h:62
sBSIM1instance::B1bNode
int B1bNode
Definition:
bsim1def.h:30
B1getic
int B1getic(GENmodel *inModel, CKTcircuit *ckt)
Definition:
b1getic.c:15
OK
#define OK
Definition:
iferrmsg.h:17
sBSIM1instance::B1icVGS
double B1icVGS
Definition:
bsim1def.h:47
sBSIM1instance::B1icVDS
double B1icVDS
Definition:
bsim1def.h:46
sperror.h
sBSIM1model::B1instances
B1instance * B1instances
Definition:
bsim1def.h:303
sBSIM1instance::B1dNode
int B1dNode
Definition:
bsim1def.h:27
sBSIM1model
Definition:
bsim1def.h:299
spice.h
sGENmodel
Definition:
gendefs.h:39
sBSIM1instance::B1icVGSGiven
unsigned B1icVGSGiven
Definition:
bsim1def.h:95
sBSIM1instance::B1sNode
int B1sNode
Definition:
bsim1def.h:29
model
static char model[32]
Definition:
subckt.c:76
sBSIM1model::B1nextModel
struct sBSIM1model * B1nextModel
Definition:
bsim1def.h:301
sBSIM1instance::B1nextInstance
struct sBSIM1instance * B1nextInstance
Definition:
bsim1def.h:22
sBSIM1instance::B1icVDSGiven
unsigned B1icVDSGiven
Definition:
bsim1def.h:94
bsim1def.h
sBSIM1instance::B1icVBSGiven
unsigned B1icVBSGiven
Definition:
bsim1def.h:93
CKTcircuit::CKTrhs
double * CKTrhs
Definition:
cktdefs.h:97
sBSIM1instance::B1gNode
int B1gNode
Definition:
bsim1def.h:28
src
lib
dev
bsim1
b1getic.c
Generated by
1.8.11