Jspice3
Main Page
Data Structures
Files
File List
Globals
distsetp.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: 1988 Jaijeet S Roychowdhury
5
1993 Stephen R. Whiteley
6
****************************************************************************/
7
8
#include "
spice.h
"
9
#include <stdio.h>
10
#include "
cktdefs.h
"
11
#include "
jobdefs.h
"
12
#include "
distodef.h
"
13
#include "
iferrmsg.h
"
14
#include "
distoext.h
"
15
16
17
/* ARGSUSED */
18
int
19
DISTOsetParm
(cktp,anal,which,value)
20
21
GENERIC
*cktp;
22
GENERIC
*anal;
23
int
which;
24
IFvalue
*value;
25
{
26
switch
(which) {
27
28
case
D_START
:
29
((
DISTOAN
*)anal)->DstartF1 = value->
rValue
;
30
break
;
31
32
case
D_STOP
:
33
((
DISTOAN
*)anal)->DstopF1 = value->
rValue
;
34
break
;
35
36
case
D_STEPS
:
37
((
DISTOAN
*)anal)->DnumSteps = value->
iValue
;
38
break
;
39
40
case
D_DEC
:
41
((
DISTOAN
*)anal)->DstepType =
DECADE
;
42
break
;
43
44
case
D_OCT
:
45
((
DISTOAN
*)anal)->DstepType =
OCTAVE
;
46
break
;
47
48
case
D_LIN
:
49
((
DISTOAN
*)anal)->DstepType =
LINEAR
;
50
break
;
51
52
case
D_F2OVRF1
:
53
((
DISTOAN
*)anal)->Df2ovrF1 = value->
rValue
;
54
((
DISTOAN
*)anal)->Df2wanted = 1;
55
break
;
56
57
default
:
58
return
(
E_BADPARM
);
59
}
60
return
(
OK
);
61
}
62
63
64
static
IFparm
Dparms
[] = {
65
{
"start"
,
D_START
,
IF_SET
|
IF_REAL
,
"starting frequency"
},
66
{
"stop"
,
D_STOP
,
IF_SET
|
IF_REAL
,
"ending frequency"
},
67
{
"numsteps"
,
D_STEPS
,
IF_SET
|
IF_INTEGER
,
"number of frequencies"
},
68
{
"dec"
,
D_DEC
,
IF_SET
|
IF_FLAG
,
"step by decades"
},
69
{
"oct"
,
D_OCT
,
IF_SET
|
IF_FLAG
,
"step by octaves"
},
70
{
"lin"
,
D_LIN
,
IF_SET
|
IF_FLAG
,
"step linearly"
},
71
{
"f2overf1"
,
D_F2OVRF1
,
IF_SET
|
IF_REAL
,
"ratio of F2 to F1"
},
72
};
73
74
SPICEanalysis
DISTOinfo
= {
75
{
76
"DISTO"
,
77
"Small signal distortion analysis"
,
78
79
sizeof
(
Dparms
)/
sizeof
(
IFparm
),
80
Dparms
81
},
82
sizeof
(
DISTOAN
),
83
FREQUENCYDOMAIN
,
84
DISTOparse
,
85
DISTOsetParm
,
86
DISTOaskQuest
,
87
DISTOan
88
};
D_LIN
#define D_LIN
Definition:
distodef.h:150
cktdefs.h
distodef.h
DISTOaskQuest
int DISTOaskQuest()
D_DEC
#define D_DEC
Definition:
distodef.h:148
D_STOP
#define D_STOP
Definition:
distodef.h:152
E_BADPARM
#define E_BADPARM
Definition:
iferrmsg.h:26
OCTAVE
#define OCTAVE
Definition:
analysis.h:48
uIFvalue::iValue
int iValue
Definition:
ifsim.h:232
jobdefs.h
uIFvalue::rValue
double rValue
Definition:
ifsim.h:233
OK
#define OK
Definition:
iferrmsg.h:17
IF_SET
#define IF_SET
Definition:
ifsim.h:135
D_START
#define D_START
Definition:
distodef.h:151
IF_INTEGER
#define IF_INTEGER
Definition:
ifsim.h:107
LINEAR
#define LINEAR
Definition:
analysis.h:49
DISTOparse
int DISTOparse()
distoext.h
DISTOinfo
SPICEanalysis DISTOinfo
Definition:
distsetp.c:74
spice.h
iferrmsg.h
sIFparm
Definition:
ifsim.h:54
IF_REAL
#define IF_REAL
Definition:
ifsim.h:108
DISTOsetParm
int DISTOsetParm(GENERIC *cktp, GENERIC *anal, int which, IFvalue *value)
Definition:
distsetp.c:19
FREQUENCYDOMAIN
#define FREQUENCYDOMAIN
Definition:
jobdefs.h:34
D_F2OVRF1
#define D_F2OVRF1
Definition:
distodef.h:154
IF_FLAG
#define IF_FLAG
Definition:
ifsim.h:106
DISTOan
int DISTOan()
DISTOAN
Definition:
distodef.h:90
uIFvalue
Definition:
ifsim.h:231
Dparms
static IFparm Dparms[]
Definition:
distsetp.c:64
DECADE
#define DECADE
Definition:
analysis.h:47
SPICEanalysis
Definition:
jobdefs.h:11
D_STEPS
#define D_STEPS
Definition:
distodef.h:153
GENERIC
char GENERIC
Definition:
ifsim.h:27
D_OCT
#define D_OCT
Definition:
distodef.h:149
src
lib
analysis
distsetp.c
Generated by
1.8.11