This repository has been archived by the owner on Jul 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdf.h
205 lines (182 loc) · 4.53 KB
/
sdf.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
/*****************************************************************************
* Copyright 1994-2005, Elliot Mednick and Mark Hummel
* This file is part of Veriwell.
*
* Veriwell is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Veriwell is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*****************************************************************************/
/**********************************************************************
*
* sdf.h
* - definitions for sdf.c module
*
**********************************************************************
*/
#ifndef SDF_H
#define SDF_H
// public section
#define SDF_DEBUG
#define MAX_FILENAME_LENGTH 1024
typedef enum {
eMINIMUM = 0,
eTYPICAL,
eMAXIMUM,
eTOOL_CONTROL,
eAVERAGE,
eFROM_FILE
} eDelayType_t;
typedef enum {
eFROM_MINIMUM = 0,
eFROM_TYPICAL,
eFROM_MAXIMUM,
eFROM_MTM
} eScaleType_t;
typedef enum {
eIOPATH = 0,
ePORT,
eINTERCONNECT,
eNETDELAY,
eDEVICE,
eSETUP,
eHOLD,
eSETUPHOLD,
eRECOVERY,
eSKEW,
eWIDTH,
ePERIOD,
eNOCHANGE,
ePATHPULSE
} eSDFConstruct_t;
typedef enum {
eVIGNORE = 0,
eVINTERMODPATH,
eVMIPD,
eVCELL,
eVSETUP,
eVHOLD,
eVSETUPHOLD,
eVRECOVERY,
eVSKEW,
eVWIDTH,
eVPERIOD,
eVNOCHANGE,
eVPATHPULSE,
eVUSE
} eVerilogConstruct_t;
typedef struct {
double value;
int valid;
} creal_t;
typedef struct {
creal_t triple[3];
} triple_t;
typedef struct {
triple_t values[6];
int argCount;
} elist_t;
typedef struct {
char *path;
char *name;
int scalar;
int msb;
int lsb;
int edge;
} port_t;
int sdf_check(int data, int reason);
int sdf_call(int data, int reason);
int sdf_misc(int data, int reason);
void setScaleFactors(double s1, double s2, double s3);
void setScaleType(eScaleType_t aType);
void setDelayType(eDelayType_t aDelay);
void setInterconnectMipd(eDelayType_t aDelay);
void setTurnOffDelay(eDelayType_t aDelay);
int setMap(eSDFConstruct_t from, eVerilogConstruct_t to);
void setConstraint(eSDFConstruct_t type, port_t * p1, port_t * p2,
elist_t value);
void setCellConstraint(handle object, port_t * p1, port_t * p2,
elist_t value);
void setInstanceConstraint(handle object, int matchAll,
eSDFConstruct_t type, port_t * p1, port_t * p2,
elist_t value);
void setCellType(char *type);
void setTimeScale(int scale);
void resetInstance(void);
int findInstance(char *name);
void setPathDelays(handle instance, handle object, elist_t value);
void setTimingConstraint(handle instance, eVerilogConstruct_t type,
port_t * p1, port_t * p2, elist_t value);
void initSDFCParse(void);
void initSDFParse(void);
int sdfconfig_parse(void);
int sdf_parse(void);
void setMTMSpec(eDelayType_t);
void setAbsoluteDelay(int);
void printPort(port_t port);
void printValue(elist_t value);
int scaleDelay(handle object, triple_t * value, double *d);
void setNewDelays(handle object, double *d, elist_t * value);
handle getPathHandle(handle instance, port_t * outPort, port_t * inPort);
void setPrimitiveDelays(handle instance, handle driver, elist_t value);
// private section
#ifdef SDF_C
char *sDelayType[] = {
"MINIMUM",
"TYPICAL",
"MAXIMUM",
"TOOL_CONTROL",
"AVERAGE",
"FROM_FILE"
};
char *sScaleType[] = {
"FROM_MINIMUM",
"FROM_TYPICAL",
"FROM_MAXIMUM",
"FROM_MTM"
};
char *sSDFConstruct[] = {
"IOPATH",
"PORT",
"INTERCONNECT",
"NETDELAY",
"DEVICE",
"SETUP",
"HOLD",
"SETUPHOLD",
"RECOVERY",
"SKEW",
"WIDTH",
"PERIOD",
"NOCHANGE",
"PATHPULSE"
};
char *sVerilogConstruct[] = {
"IGNORE",
"INTERMODPATH",
"MIPD",
"CELL",
"SETUP",
"HOLD",
"SETUPHOLD",
"RECOVERY",
"SKEW",
"WIDTH",
"PERIOD",
"NOCHANGE",
"PATHPULSE",
"USE"
};
void printDelayGroup(char *title, int delayCount, double d1, double d2,
double d3, double d4, double d5, double d6);
#endif // SDF_C
#endif // SDF_H