Jspice3
urcdefs.h
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 
8 #ifndef URC
9 #define URC
10 
11 
12 #include "devdefs.h"
13 
14  /*
15  * structures used to describe uniform RC lines
16  */
17 
18 /* information needed for each instance */
19 
20 typedef struct sURCinstance {
21  struct sURCmodel *URCmodPtr; /* backpointer to model */
22  struct sURCinstance *URCnextInstance; /* pointer to next instance of
23  * current model*/
24  IFuid URCname; /* pointer to character string naming this instance */
25  int UNCstate; /* not used, placeholder for GENinstance */
26  int URCposNode; /* number of positive node of URC */
27  int URCnegNode; /* number of negative node of URC */
28  int URCgndNode; /* number of the "ground" node of the URC */
29 
30  double URClength; /* length of line */
31  int URClumps; /* number of lumps in line */
32  unsigned URClenGiven : 1; /* flag to indicate length was specified */
33  unsigned URClumpsGiven : 1; /* flag to indicate lumps was specified */
34 
35 } URCinstance;
36 
37 /* per model data */
38 
39 typedef struct sURCmodel { /* model structure for a resistor */
40  int URCmodType; /* type index of this device type */
41  struct sURCmodel *URCnextModel; /* pointer to next possible model
42  * in linked list */
43  URCinstance *URCinstances; /* pointer to list of instances that have this
44  * model */
45  IFuid URCmodName; /* pointer to character string naming this model */
46 
47  double URCk; /* propagation constant for URC */
48  double URCfmax; /* max frequence of interest */
49  double URCrPerL; /* resistance per unit length */
50  double URCcPerL; /* capacitance per unit length */
51  double URCisPerL; /* diode saturation current per unit length */
52  double URCrsPerL; /* diode resistance per unit length */
53  unsigned URCkGiven : 1; /* flag to indicate k was specified */
54  unsigned URCfmaxGiven : 1; /* flag to indicate fmax was specified */
55  unsigned URCrPerLGiven : 1; /* flag to indicate rPerL was specified */
56  unsigned URCcPerLGiven : 1; /* flag to indicate cPerL was specified */
57  unsigned URCisPerLGiven : 1; /* flag to indicate isPerL was specified */
58  unsigned URCrsPerLGiven : 1; /* flag to indicate rsPerL was specified */
59 
60 } URCmodel;
61 
62 /* device parameters */
63 #define URC_LEN 1
64 #define URC_LUMPS 2
65 #define URC_POS_NODE 3
66 #define URC_NEG_NODE 4
67 #define URC_GND_NODE 5
68 
69 /* model parameters */
70 #define URC_MOD_K 101
71 #define URC_MOD_FMAX 102
72 #define URC_MOD_RPERL 103
73 #define URC_MOD_CPERL 104
74 #define URC_MOD_ISPERL 105
75 #define URC_MOD_RSPERL 106
76 #define URC_MOD_URC 107
77 
78 
79 #ifdef __STDC__
80 
81 extern int URCask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*);
82 extern int URCmAsk(CKTcircuit*,GENmodel*,int,IFvalue*);
83 extern int URCmParam(int,IFvalue*,GENmodel*);
84 extern int URCparam(CKTcircuit*,int,IFvalue*,GENinstance*,IFvalue*);
85 extern void URCparse(int,GENERIC*,GENERIC*,GENERIC*);
86 extern int URCsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
87 
88 #else /* stdc */
89 
90 extern int URCask();
91 extern int URCmAsk();
92 extern int URCmParam();
93 extern int URCparam();
94 extern void URCparse();
95 extern int URCsetup();
96 
97 #endif /* stdc */
98 
99 #endif /*URC*/
double URCfmax
Definition: urcdefs.h:48
int URCmodType
Definition: urcdefs.h:40
IFuid URCmodName
Definition: urcdefs.h:45
unsigned URCfmaxGiven
Definition: urcdefs.h:54
unsigned URCrPerLGiven
Definition: urcdefs.h:55
int URClumps
Definition: urcdefs.h:31
int URCnegNode
Definition: urcdefs.h:27
struct sURCmodel URCmodel
double URCisPerL
Definition: urcdefs.h:51
struct sURCmodel * URCmodPtr
Definition: urcdefs.h:21
unsigned URCisPerLGiven
Definition: urcdefs.h:57
IFuid URCname
Definition: urcdefs.h:24
unsigned URCkGiven
Definition: urcdefs.h:53
int URCparam()
unsigned URClumpsGiven
Definition: urcdefs.h:33
unsigned URCrsPerLGiven
Definition: urcdefs.h:58
void URCparse()
GENERIC * IFuid
Definition: ifsim.h:72
int URCgndNode
Definition: urcdefs.h:28
int URCsetup()
unsigned URCcPerLGiven
Definition: urcdefs.h:56
int URCmAsk()
double URCrsPerL
Definition: urcdefs.h:52
int URCmParam()
struct sURCinstance URCinstance
unsigned URClenGiven
Definition: urcdefs.h:32
URCinstance * URCinstances
Definition: urcdefs.h:43
double URCcPerL
Definition: urcdefs.h:50
double URCk
Definition: urcdefs.h:47
int URCask()
int UNCstate
Definition: urcdefs.h:25
struct sURCinstance * URCnextInstance
Definition: urcdefs.h:22
double URClength
Definition: urcdefs.h:30
double URCrPerL
Definition: urcdefs.h:49
int URCposNode
Definition: urcdefs.h:26
#define SMPmatrix
Definition: smpdefs.h:11
struct sURCmodel * URCnextModel
Definition: urcdefs.h:41
char GENERIC
Definition: ifsim.h:27