Jspice3
Main Page
Data Structures
Files
File List
Globals
srcload.c
Go to the documentation of this file.
1
/***************************************************************************
2
JSPICE3 adaptation of Spice3e2 - 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
1987 Kanwar Jit Singh
6
1992 Stephen R. Whiteley
7
****************************************************************************/
8
9
#include "
spice.h
"
10
#include <stdio.h>
11
#include <math.h>
12
#include "
srcdefs.h
"
13
#include "
sperror.h
"
14
#include "
util.h
"
15
16
17
int
18
SRCload
(inModel,ckt)
19
20
GENmodel
*inModel;
21
CKTcircuit
*ckt;
22
{
23
SRCmodel
*
model
= (
SRCmodel
*)inModel;
24
SRCinstance
*here;
25
26
/* loop through all the voltage source models */
27
for
( ; model !=
NULL
; model = model->
SRCnextModel
) {
28
29
if
(ckt->
CKTmode
& (
MODEDCOP
|
MODEDCTRANCURVE
)) {
30
31
/* loop through all the instances of the model */
32
for
(here = model->
SRCinstances
; here !=
NULL
;
33
here = here->
SRCnextInstance
) {
34
35
(*here->
SRCdcFunc
)(ckt,here);
36
37
}
38
}
39
else
{
40
/* loop through all the instances of the model */
41
for
(here = model->
SRCinstances
; here !=
NULL
;
42
here = here->
SRCnextInstance
) {
43
44
(*here->
SRCtranFunc
)(ckt,here);
45
46
}
47
}
48
}
49
return
(
OK
);
50
}
sSRCinstance::SRCnextInstance
struct sSRCinstance * SRCnextInstance
Definition:
srcdefs.h:26
sSRCinstance
Definition:
srcdefs.h:20
srcdefs.h
MODEDCTRANCURVE
#define MODEDCTRANCURVE
Definition:
cktdefs.h:152
sSRCmodel
Definition:
srcdefs.h:196
sSRCinstance::SRCdcFunc
void(* SRCdcFunc)()
Definition:
srcdefs.h:61
CKTcircuit
Definition:
cktdefs.h:62
OK
#define OK
Definition:
iferrmsg.h:17
sperror.h
NULL
#define NULL
Definition:
spdefs.h:121
sSRCmodel::SRCinstances
SRCinstance * SRCinstances
Definition:
srcdefs.h:205
util.h
spice.h
sGENmodel
Definition:
gendefs.h:39
SRCload
int SRCload(GENmodel *inModel, CKTcircuit *ckt)
Definition:
srcload.c:18
model
static char model[32]
Definition:
subckt.c:76
MODEDCOP
#define MODEDCOP
Definition:
cktdefs.h:150
CKTcircuit::CKTmode
long CKTmode
Definition:
cktdefs.h:139
sSRCinstance::SRCtranFunc
void(* SRCtranFunc)()
Definition:
srcdefs.h:60
sSRCmodel::SRCnextModel
struct sSRCmodel * SRCnextModel
Definition:
srcdefs.h:202
src
lib
dev
src
srcload.c
Generated by
1.8.11