Jspice3
Main Page
Data Structures
Files
File List
Globals
jfetic.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
1993 Stephen R. Whiteley
6
****************************************************************************/
7
/********** new in 3f2
8
Sydney University mods Copyright(c) 1989 Anthony E. Parker, David J. Skellern
9
Laboratory for Communication Science Engineering
10
Sydney University Department of Electrical Engineering, Australia
11
**********/
12
13
#include "
spice.h
"
14
#include <stdio.h>
15
#include "
jfetdefs.h
"
16
#include "
sperror.h
"
17
18
19
int
20
JFETgetic
(inModel,ckt)
21
GENmodel
*inModel;
22
CKTcircuit
*ckt;
23
{
24
JFETmodel
*
model
= (
JFETmodel
*)inModel;
25
JFETinstance
*here;
26
/*
27
* grab initial conditions out of rhs array. User specified, so use
28
* external nodes to get values
29
*/
30
31
for
( ;
model
; model = model->
JFETnextModel
) {
32
for
(here = model->
JFETinstances
; here ; here = here->
JFETnextInstance
) {
33
if
(!here->
JFETicVDSGiven
) {
34
here->
JFETicVDS
=
35
*(ckt->
CKTrhs
+ here->
JFETdrainNode
) -
36
*(ckt->
CKTrhs
+ here->
JFETsourceNode
);
37
}
38
if
(!here->
JFETicVGSGiven
) {
39
here->
JFETicVGS
=
40
*(ckt->
CKTrhs
+ here->
JFETgateNode
) -
41
*(ckt->
CKTrhs
+ here->
JFETsourceNode
);
42
}
43
}
44
}
45
return
(
OK
);
46
}
CKTcircuit
Definition:
cktdefs.h:62
sJFETinstance::JFETicVDSGiven
unsigned JFETicVDSGiven
Definition:
jfetdefs.h:129
sJFETinstance::JFETgateNode
int JFETgateNode
Definition:
jfetdefs.h:30
sJFETmodel::JFETinstances
JFETinstance * JFETinstances
Definition:
jfetdefs.h:169
sJFETinstance::JFETicVGSGiven
unsigned JFETicVGSGiven
Definition:
jfetdefs.h:130
OK
#define OK
Definition:
iferrmsg.h:17
sperror.h
sJFETinstance::JFETicVGS
double JFETicVGS
Definition:
jfetdefs.h:136
spice.h
sGENmodel
Definition:
gendefs.h:39
sJFETmodel::JFETnextModel
struct sJFETmodel * JFETnextModel
Definition:
jfetdefs.h:167
sJFETinstance::JFETicVDS
double JFETicVDS
Definition:
jfetdefs.h:135
jfetdefs.h
model
static char model[32]
Definition:
subckt.c:76
sJFETinstance::JFETdrainNode
int JFETdrainNode
Definition:
jfetdefs.h:29
sJFETinstance::JFETnextInstance
struct sJFETinstance * JFETnextInstance
Definition:
jfetdefs.h:25
sJFETinstance
Definition:
jfetdefs.h:23
sJFETmodel
Definition:
jfetdefs.h:165
sJFETinstance::JFETsourceNode
int JFETsourceNode
Definition:
jfetdefs.h:31
CKTcircuit::CKTrhs
double * CKTrhs
Definition:
cktdefs.h:97
JFETgetic
int JFETgetic(GENmodel *inModel, CKTcircuit *ckt)
Definition:
jfetic.c:20
src
lib
dev
jfet
jfetic.c
Generated by
1.8.11