Jspice3
Main Page
Data Structures
Files
File List
Globals
srcfbr.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 "
srcdefs.h
"
12
#include "
sperror.h
"
13
#include "
util.h
"
14
#include "
cktext.h
"
15
16
17
int
18
SRCfindBr
(ckt,inputModel,name)
19
20
CKTcircuit
*ckt;
21
GENmodel
*inputModel;
22
IFuid
name;
23
{
24
SRCinstance
*here;
25
SRCmodel
*
model
= (
SRCmodel
*)inputModel;
26
int
error;
27
CKTnode
*tmp;
28
29
for
( ; model !=
NULL
; model = model->
SRCnextModel
) {
30
for
(here = model->
SRCinstances
; here !=
NULL
;
31
here = here->
SRCnextInstance
) {
32
if
(here->
SRCname
== name && here->
SRCtype
==
SRC_V
) {
33
if
(here->
SRCbranch
== 0) {
34
error =
CKTmkCur
(ckt,&tmp, here->
SRCname
,
"branch"
);
35
if
(error)
36
return
(error);
37
here->
SRCbranch
= tmp->
number
;
38
}
39
return
(here->
SRCbranch
);
40
}
41
}
42
}
43
return
(0);
44
}
sSRCinstance::SRCnextInstance
struct sSRCinstance * SRCnextInstance
Definition:
srcdefs.h:26
SRC_V
#define SRC_V
Definition:
srcdefs.h:217
sSRCinstance
Definition:
srcdefs.h:20
srcdefs.h
sSRCmodel
Definition:
srcdefs.h:196
CKTcircuit
Definition:
cktdefs.h:62
sCKTnode
Definition:
cktdefs.h:30
SRCfindBr
int SRCfindBr(CKTcircuit *ckt, GENmodel *inputModel, IFuid name)
Definition:
srcfbr.c:18
IFuid
GENERIC * IFuid
Definition:
ifsim.h:72
sSRCinstance::SRCbranch
int SRCbranch
Definition:
srcdefs.h:47
sperror.h
NULL
#define NULL
Definition:
spdefs.h:121
sSRCmodel::SRCinstances
SRCinstance * SRCinstances
Definition:
srcdefs.h:205
sCKTnode::number
int number
Definition:
cktdefs.h:39
util.h
spice.h
sGENmodel
Definition:
gendefs.h:39
CKTmkCur
int CKTmkCur()
model
static char model[32]
Definition:
subckt.c:76
cktext.h
sSRCinstance::SRCname
IFuid SRCname
Definition:
srcdefs.h:29
sSRCinstance::SRCtype
int SRCtype
Definition:
srcdefs.h:65
sSRCmodel::SRCnextModel
struct sSRCmodel * SRCnextModel
Definition:
srcdefs.h:202
src
lib
dev
src
srcfbr.c
Generated by
1.8.11