Jspice3
Main Page
Data Structures
Files
File List
Globals
capparam.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
1992 Stephen R. Whiteley
6
****************************************************************************/
7
8
#include "
spice.h
"
9
#include <stdio.h>
10
#include "
capdefs.h
"
11
#include "
util.h
"
12
#include "
sperror.h
"
13
14
15
/* ARGSUSED */
16
int
17
CAPparam
(ckt,param,value,inst,select)
18
19
CKTcircuit
*ckt;
20
int
param;
21
IFvalue
*value;
22
GENinstance
*inst;
23
IFvalue
*select;
24
{
25
CAPinstance
*here = (
CAPinstance
*)inst;
26
27
switch
(param) {
28
29
case
CAP_CAP
:
30
here->
CAPcapac
= value->
rValue
;
31
here->
CAPcapGiven
=
TRUE
;
32
break
;
33
case
CAP_IC
:
34
here->
CAPinitCond
= value->
rValue
;
35
here->
CAPicGiven
=
TRUE
;
36
break
;
37
case
CAP_WIDTH
:
38
here->
CAPwidth
= value->
rValue
;
39
here->
CAPwidthGiven
=
TRUE
;
40
break
;
41
case
CAP_LENGTH
:
42
here->
CAPlength
= value->
rValue
;
43
here->
CAPlengthGiven
=
TRUE
;
44
break
;
45
default
:
46
return
(
E_BADPARM
);
47
}
48
return
(
OK
);
49
}
CKTcircuit
Definition:
cktdefs.h:62
CAP_CAP
#define CAP_CAP
Definition:
capdefs.h:76
capdefs.h
sCAPinstance::CAPlengthGiven
unsigned CAPlengthGiven
Definition:
capdefs.h:47
sCAPinstance
Definition:
capdefs.h:19
E_BADPARM
#define E_BADPARM
Definition:
iferrmsg.h:26
TRUE
#define TRUE
Definition:
util.h:27
sCAPinstance::CAPicGiven
unsigned CAPicGiven
Definition:
capdefs.h:45
uIFvalue::rValue
double rValue
Definition:
ifsim.h:233
OK
#define OK
Definition:
iferrmsg.h:17
sCAPinstance::CAPwidth
double CAPwidth
Definition:
capdefs.h:31
CAP_LENGTH
#define CAP_LENGTH
Definition:
capdefs.h:79
sperror.h
sCAPinstance::CAPinitCond
double CAPinitCond
Definition:
capdefs.h:28
sCAPinstance::CAPlength
double CAPlength
Definition:
capdefs.h:32
util.h
spice.h
CAPparam
int CAPparam(CKTcircuit *ckt, int param, IFvalue *value, GENinstance *inst, IFvalue *select)
Definition:
capparam.c:17
uIFvalue
Definition:
ifsim.h:231
sCAPinstance::CAPcapGiven
unsigned CAPcapGiven
Definition:
capdefs.h:44
sCAPinstance::CAPwidthGiven
unsigned CAPwidthGiven
Definition:
capdefs.h:46
sGENinstance
Definition:
gendefs.h:24
CAP_IC
#define CAP_IC
Definition:
capdefs.h:77
sCAPinstance::CAPcapac
double CAPcapac
Definition:
capdefs.h:27
CAP_WIDTH
#define CAP_WIDTH
Definition:
capdefs.h:78
src
lib
dev
cap
capparam.c
Generated by
1.8.11