1 | /* |
---|
2 | |
---|
3 | Copyright (c) 1992, 1993 |
---|
4 | Regents of the University of California |
---|
5 | All rights reserved. |
---|
6 | |
---|
7 | Use and copying of this software and preparation of derivative works |
---|
8 | based upon this software are permitted. However, any distribution of |
---|
9 | this software or derivative works must include the above copyright |
---|
10 | notice. |
---|
11 | |
---|
12 | This software is made available AS IS, and neither the Electronics |
---|
13 | Research Laboratory or the Universify of California make any |
---|
14 | warranty about the software, its performance or its conformity to |
---|
15 | any specification. |
---|
16 | |
---|
17 | Author: Szu-Tsung Cheng, stcheng@ic.Berkeley.EDU |
---|
18 | 10/92 |
---|
19 | 10/93 |
---|
20 | |
---|
21 | $Header: /projects/development/hsv/CVSRepository/vl2mv/src/parser/vl_defs.h,v 1.1.1.1 2001/07/09 23:22:42 fabio Exp $ |
---|
22 | |
---|
23 | |
---|
24 | */ |
---|
25 | |
---|
26 | |
---|
27 | |
---|
28 | #define EnumType 1 |
---|
29 | |
---|
30 | |
---|
31 | |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | #define LastCellNum 142 |
---|
36 | |
---|
37 | #define None 0 |
---|
38 | #define CombPrimDecl 1 |
---|
39 | #define SeqPrimDecl 2 |
---|
40 | #define ModDecl 3 |
---|
41 | |
---|
42 | |
---|
43 | #define RealDecl 4 |
---|
44 | #define IntDecl 5 |
---|
45 | #define TimeDecl 6 |
---|
46 | #define EventDecl 7 |
---|
47 | |
---|
48 | |
---|
49 | #define InputDecl 8 |
---|
50 | #define OutputDecl 9 |
---|
51 | #define InoutDecl 10 |
---|
52 | #define RegDecl 11 |
---|
53 | |
---|
54 | |
---|
55 | #define ParamDecl 12 |
---|
56 | #define DefparamDecl 13 |
---|
57 | |
---|
58 | |
---|
59 | #define WireDecl 14 |
---|
60 | #define TriDecl 15 |
---|
61 | #define Tri0Decl 16 |
---|
62 | #define Tri1Decl 17 |
---|
63 | #define Supply0Decl 18 |
---|
64 | #define Supply1Decl 19 |
---|
65 | #define WandDecl 20 |
---|
66 | #define TriandDecl 21 |
---|
67 | #define WorDecl 22 |
---|
68 | #define TriorDecl 23 |
---|
69 | #define TriregDecl 24 |
---|
70 | |
---|
71 | |
---|
72 | #define ContAssign 25 |
---|
73 | |
---|
74 | |
---|
75 | #define TaskDecl 26 |
---|
76 | #define IntFuncDecl 27 |
---|
77 | #define RealFuncDecl 28 |
---|
78 | #define RangeFuncDecl 29 |
---|
79 | |
---|
80 | |
---|
81 | #define AndGate 30 |
---|
82 | #define NandGate 31 |
---|
83 | #define OrGate 32 |
---|
84 | #define NorGate 33 |
---|
85 | #define XorGate 34 |
---|
86 | #define XnorGate 35 |
---|
87 | #define BufGate 36 |
---|
88 | #define Bufif0Gate 37 |
---|
89 | #define Bufif1Gate 38 |
---|
90 | #define NotGate 39 |
---|
91 | #define Notif0Gate 40 |
---|
92 | #define Notif1Gate 41 |
---|
93 | #define PulldownGate 42 |
---|
94 | #define PullupGate 43 |
---|
95 | #define NmosGate 44 |
---|
96 | #define RnmosGate 45 |
---|
97 | #define PmosGate 46 |
---|
98 | #define RpmosGate 47 |
---|
99 | #define CmosGate 48 |
---|
100 | #define RcmosGate 49 |
---|
101 | #define TranGate 50 |
---|
102 | #define RtranGate 51 |
---|
103 | #define Tranif0Gate 52 |
---|
104 | #define Rtranif0Gate 53 |
---|
105 | #define Tranif1Gate 54 |
---|
106 | #define Rtranif1Gate 55 |
---|
107 | |
---|
108 | #define PrimInst 56 |
---|
109 | #define ModInst 57 |
---|
110 | |
---|
111 | #define AlwaysStmt 58 |
---|
112 | #define InitialStmt 59 |
---|
113 | |
---|
114 | |
---|
115 | #define BeginEndStmt 60 |
---|
116 | #define IfElseStmt 61 |
---|
117 | #define CaseStmt 62 |
---|
118 | #define CasexStmt 63 |
---|
119 | #define CasezStmt 64 |
---|
120 | #define ForeverStmt 65 |
---|
121 | #define RepeatStmt 66 |
---|
122 | #define WhileStmt 67 |
---|
123 | #define ForStmt 68 |
---|
124 | #define DelayControlStmt 69 |
---|
125 | #define EventControlStmt 70 |
---|
126 | #define BassignStmt 71 |
---|
127 | #define NbassignStmt 72 |
---|
128 | #define DelayBassignStmt 73 |
---|
129 | #define DelayNbassignStmt 74 |
---|
130 | #define EventBassignStmt 75 |
---|
131 | #define EventNbassignStmt 76 |
---|
132 | #define WaitStmt 77 |
---|
133 | #define ForkJoinStmt 78 |
---|
134 | #define TaskEnableStmt 79 |
---|
135 | #define SysTaskEnableStmt 80 |
---|
136 | #define DisableStmt 81 |
---|
137 | #define AssignStmt 82 |
---|
138 | #define DeassignStmt 83 |
---|
139 | |
---|
140 | #define CaseItem 84 |
---|
141 | #define DefaultItem 85 |
---|
142 | |
---|
143 | |
---|
144 | #define OrEventExpr 86 |
---|
145 | #define NegedgeEventExpr 87 |
---|
146 | #define PosedgeEventExpr 88 |
---|
147 | #define EdgeEventExpr 141 |
---|
148 | #define EventExpr 89 |
---|
149 | |
---|
150 | |
---|
151 | #define IDExpr 90 |
---|
152 | #define BitSelExpr 91 |
---|
153 | #define PartSelExpr 92 |
---|
154 | #define ConcatExpr 93 |
---|
155 | #define MinTypMaxExpr 94 |
---|
156 | |
---|
157 | #define BitExpr 138 |
---|
158 | #define IntExpr 95 |
---|
159 | #define RealExpr 96 |
---|
160 | #define StringExpr 97 |
---|
161 | #define FuncExpr 98 |
---|
162 | #define UplusExpr 99 |
---|
163 | #define UminusExpr 100 |
---|
164 | #define UnotExpr 101 |
---|
165 | #define UcomplExpr 102 |
---|
166 | |
---|
167 | #define UandExpr 103 |
---|
168 | #define UnandExpr 104 |
---|
169 | #define UorExpr 105 |
---|
170 | #define UnorExpr 106 |
---|
171 | #define UxorExpr 107 |
---|
172 | #define UxnorExpr 108 |
---|
173 | |
---|
174 | #define BplusExpr 109 |
---|
175 | #define BminusExpr 110 |
---|
176 | #define BtimesExpr 111 |
---|
177 | #define BdivExpr 112 |
---|
178 | #define BremExpr 113 |
---|
179 | #define Beq2Expr 114 |
---|
180 | #define Bneq2Expr 115 |
---|
181 | #define Beq3Expr 116 |
---|
182 | #define Bneq3Expr 117 |
---|
183 | #define BlandExpr 118 |
---|
184 | #define BlorExpr 119 |
---|
185 | #define BltExpr 120 |
---|
186 | #define BleExpr 121 |
---|
187 | #define BgtExpr 122 |
---|
188 | #define BgeExpr 123 |
---|
189 | #define BandExpr 124 |
---|
190 | #define BorExpr 125 |
---|
191 | #define BxorExpr 126 |
---|
192 | #define BxnorExpr 127 |
---|
193 | #define BlshiftExpr 128 |
---|
194 | #define BrshiftExpr 129 |
---|
195 | |
---|
196 | #define TcondExpr 130 |
---|
197 | |
---|
198 | #define NondExpr 142 |
---|
199 | |
---|
200 | |
---|
201 | #define LastPrimNum 21 |
---|
202 | |
---|
203 | #define PrimNone 0 |
---|
204 | #define Prim0 1 |
---|
205 | #define Prim1 2 |
---|
206 | #define PrimX 3 |
---|
207 | #define PrimQ 4 |
---|
208 | #define PrimR 5 |
---|
209 | #define PrimF 6 |
---|
210 | #define PrimP 7 |
---|
211 | #define PrimN 8 |
---|
212 | #define PrimS 9 |
---|
213 | #define PrimM 10 |
---|
214 | #define PrimB 18 |
---|
215 | #define Prim0X 11 |
---|
216 | #define Prim1X 12 |
---|
217 | #define PrimX0 13 |
---|
218 | #define PrimX1 14 |
---|
219 | #define PrimXB 15 |
---|
220 | #define PrimBX 16 |
---|
221 | #define PrimBB 17 |
---|
222 | #define PrimQ0 19 |
---|
223 | #define PrimQ1 20 |
---|
224 | #define PrimQB 21 |
---|
225 | |
---|
226 | |
---|
227 | |
---|
228 | |
---|
229 | #define Supply0Supply1 3 |
---|
230 | #define Supply0Strong1 4 |
---|
231 | #define Supply0Pull1 5 |
---|
232 | #define Supply0Weak1 6 |
---|
233 | #define Supply0HighZ1 7 |
---|
234 | #define Strong0Supply1 8 |
---|
235 | #define Strong0Strong1 9 |
---|
236 | #define Strong0Pull1 10 |
---|
237 | #define Strong0Weak1 11 |
---|
238 | #define Strong0HighZ1 12 |
---|
239 | #define Pull0Supply1 13 |
---|
240 | #define Pull0Strong1 14 |
---|
241 | #define Pull0Pull1 15 |
---|
242 | #define Pull0Weak1 16 |
---|
243 | #define Pull0HighZ1 17 |
---|
244 | #define Weak0Supply1 18 |
---|
245 | #define Weak0Strong1 19 |
---|
246 | #define Weak0Pull1 20 |
---|
247 | #define Weak0Weak1 21 |
---|
248 | #define Weak0HighZ1 22 |
---|
249 | #define HighZ0Supply1 23 |
---|
250 | #define HighZ0Strong1 24 |
---|
251 | #define HighZ0Pull1 25 |
---|
252 | #define HighZ0Weak1 26 |
---|
253 | #define HighZ0HighZ1 27 |
---|
254 | #define Supply1Supply0 28 |
---|
255 | #define Supply1Strong0 29 |
---|
256 | #define Supply1Pull0 30 |
---|
257 | #define Supply1Weak0 31 |
---|
258 | #define Supply1HighZ0 32 |
---|
259 | #define Strong1Supply0 33 |
---|
260 | #define Strong1Strong0 34 |
---|
261 | #define Strong1Pull0 35 |
---|
262 | #define Strong1Weak0 36 |
---|
263 | #define Strong1HighZ0 37 |
---|
264 | #define Pull1Supply0 38 |
---|
265 | #define Pull1Strong0 39 |
---|
266 | #define Pull1Pull0 40 |
---|
267 | #define Pull1Weak0 41 |
---|
268 | #define Pull1HighZ0 42 |
---|
269 | #define Weak1Supply0 43 |
---|
270 | #define Weak1Strong0 44 |
---|
271 | #define Weak1Pull0 45 |
---|
272 | #define Weak1Weak0 46 |
---|
273 | #define Weak1HighZ0 47 |
---|
274 | #define HighZ1Supply0 48 |
---|
275 | #define HighZ1Strong0 49 |
---|
276 | #define HighZ1Pull0 50 |
---|
277 | #define HighZ1Weak0 51 |
---|
278 | #define HighZ1HighZ0 52 |
---|
279 | |
---|
280 | #define Small 53 |
---|
281 | #define Medium 54 |
---|
282 | #define Large 55 |
---|
283 | |
---|
284 | |
---|
285 | |
---|
286 | #define Range_Dcl 131 |
---|
287 | #define Integer_Dcl 132 |
---|
288 | #define Real_Dcl 133 |
---|
289 | #define MOST_SB (1>>31) |
---|
290 | #define LEAST_SB 1 |
---|
291 | |
---|
292 | #define ModulePort 134 |
---|
293 | #define NamedPort 135 |
---|
294 | #define ModuleConnect 136 |
---|
295 | #define NamedConnect 137 |
---|
296 | |
---|
297 | |
---|
298 | #define SendEventStmt 139 |
---|
299 | |
---|
300 | |
---|
301 | #define SWireDecl 140 |
---|
302 | |
---|
303 | |
---|
304 | |
---|
305 | |
---|
306 | #define MVar (1) |
---|
307 | #define InPort (1<<1) |
---|
308 | #define OutPort (1<<2) |
---|
309 | #define RegVar (1<<3) |
---|
310 | #define WireVar (1<<4) |
---|
311 | #define HiddenLatch (1<<5) |
---|
312 | #define UninitializeVar (1<<10) |
---|
313 | |
---|
314 | |
---|
315 | #define AccessedVar (1<<11) |
---|
316 | #define EdgeDetector (1<<12) |
---|
317 | #define AutoDeclared (1<<13) |
---|
318 | |
---|
319 | |
---|
320 | #define EventVar (1<<8) |
---|
321 | #define TautologyTrue (1<<14) |
---|
322 | #define ConflictFalse (1<<15) |
---|
323 | #define EdgeSignal (1<<6) |
---|
324 | |
---|
325 | |
---|
326 | #define AlwaysTouched (1<<6) |
---|
327 | #define WithInitial (1<<7) |
---|
328 | |
---|
329 | |
---|
330 | #define WithSyncho (1) |
---|
331 | #define PseudoAlways (1<<1) |
---|
332 | |
---|
333 | #define TimedInitStmt (1<<2) |
---|
334 | |
---|
335 | |
---|
336 | |
---|
337 | |
---|
338 | |
---|
339 | #define NBASSIGN_IN_INITIAL (1) |
---|
340 | #define NBASSIGN_IN_ALWAYS (1<<1) |
---|
341 | |
---|
342 | |
---|
343 | #define DF_UninitVar (1) |
---|
344 | |
---|
345 | |
---|
346 | #define DFLOW_Always (1) |
---|
347 | #define DFLOW_Initial (1<<1) |
---|
348 | |
---|
349 | |
---|
350 | #define LIBuand UandExpr |
---|
351 | #define LIBunand UnandExpr |
---|
352 | #define LIBuor UorExpr |
---|
353 | #define LIBunor UnorExpr |
---|
354 | #define LIBuxor UxorExpr |
---|
355 | #define LIBuxnor UxnorExpr |
---|
356 | |
---|
357 | #define LIBplus BplusExpr |
---|
358 | #define LIBminus BminusExpr |
---|
359 | #define LIBtimes BtimesExpr |
---|
360 | #define LIBdiv BdivExpr |
---|
361 | #define LIBrem BremExpr |
---|
362 | #define LIBeq2 Beq2Expr |
---|
363 | #define LIBneq2 Bneq2Expr |
---|
364 | #define LIBeq3 Beq3Expr |
---|
365 | #define LIBneq3 Bneq3Expr |
---|
366 | #define LIBland BlandExpr |
---|
367 | #define LIBlor BlorExpr |
---|
368 | #define LIBlt BltExpr |
---|
369 | #define LIBle BlorExpr |
---|
370 | #define LIBgt BgtExpr |
---|
371 | #define LIBge BgeExpr |
---|
372 | #define LIBand BandExpr |
---|
373 | #define LIBor BorExpr |
---|
374 | #define LIBxor BxorExpr |
---|
375 | #define LIBxnor BxnorExpr |
---|
376 | #define LIBlshift BlshiftExpr |
---|
377 | #define LIBrshift BrshiftExpr |
---|
378 | |
---|
379 | |
---|
380 | #define LIBmux (LastCellNum+1) |
---|
381 | #define LIBopen (LastCellNum+2) |
---|
382 | #define LIBconst (LastCellNum+3) |
---|
383 | #define LIBconnect (LastCellNum+4) |
---|
384 | #define LIBint (LastCellNum+5) |
---|
385 | #define LIBconflict (LastCellNum+6) |
---|
386 | #define LIBnblock (LastCellNum+7) |
---|
387 | #define LIBiconnect (LastCellNum+8) |
---|
388 | #define LIBexpand (LastCellNum+9) |
---|
389 | #define LIBshrink (LastCellNum+10) |
---|
390 | #define LIBsubrange (LastCellNum+11) |
---|
391 | #define LIBindex (LastCellNum+12) |
---|
392 | #define TeslaTimerGate (LastCellNum+13) |
---|
393 | |
---|
394 | |
---|
395 | #define LIB_NAME(type) (type==LIBmux)? "__mux" : \ |
---|
396 | (type==LIBopen)? "__open" : \ |
---|
397 | (type==LIBconst)? "__const" : \ |
---|
398 | (type==LIBconnect)?"__connect" : \ |
---|
399 | (type==LIBiconnect)?"__iconnect" : \ |
---|
400 | (type==LIBexpand)? "__expand" : \ |
---|
401 | (type==LIBshrink)? "__shrink" : \ |
---|
402 | (type==LIBint)? "__int" : \ |
---|
403 | (type==LIBconflict)?"__conflict" : \ |
---|
404 | (type==LIBnblock)? "__nblock" : \ |
---|
405 | (type==LIBuand)? "__uand" : \ |
---|
406 | (type==LIBunand)? "__unand" : \ |
---|
407 | (type==LIBuor)? "__uor" : \ |
---|
408 | (type==LIBunor)? "__unor" : \ |
---|
409 | (type==LIBuxor)? "__uxor" : \ |
---|
410 | (type==LIBuxnor)? "__uxnor" : \ |
---|
411 | (type==LIBplus)? "__plus" : \ |
---|
412 | (type==LIBminus)? "__minus" : \ |
---|
413 | (type==LIBtimes)? "__times" : \ |
---|
414 | (type==LIBdiv)? "__div" : \ |
---|
415 | (type==LIBrem)? "__rem" : \ |
---|
416 | (type==LIBeq2)? "__eq2" : \ |
---|
417 | (type==LIBneq2)? "__neq2" : \ |
---|
418 | (type==LIBeq3)? "__eq3" : \ |
---|
419 | (type==LIBneq3)? "__neq3" : \ |
---|
420 | (type==LIBland)? "__land" : \ |
---|
421 | (type==LIBlor)? "__lor" : \ |
---|
422 | (type==LIBlt)? "__lt" : \ |
---|
423 | (type==LIBle)? "__le" : \ |
---|
424 | (type==LIBgt)? "__gt" : \ |
---|
425 | (type==LIBge)? "__ge" : \ |
---|
426 | (type==LIBand)? "__and" : \ |
---|
427 | (type==LIBor)? "__or" : \ |
---|
428 | (type==LIBxor)? "__xor" : \ |
---|
429 | (type==LIBxnor)? "__xnor" : \ |
---|
430 | (type==LIBlshift)? "__lshift" : \ |
---|
431 | (type==LIBsubrange)?"__subrange" : \ |
---|
432 | (type==LIBindex)? "__index" : \ |
---|
433 | (type==LIBrshift)? "__rshift" : "__????" |
---|
434 | |
---|
435 | |
---|
436 | #define HSIS_LIB_HEADER "_hsis_" |
---|
437 | #define SYS_LIB_NAME(type) \ |
---|
438 | (type==LIBmux)? "mux" : \ |
---|
439 | (type==LIBopen)? "open" : \ |
---|
440 | (type==LIBconst)? "const" : \ |
---|
441 | (type==LIBconnect)?"connect" : \ |
---|
442 | (type==LIBiconnect)?"iconnect" : \ |
---|
443 | (type==LIBexpand)? "expand" : \ |
---|
444 | (type==LIBshrink)? "shrink" : \ |
---|
445 | (type==LIBint)? "int" : \ |
---|
446 | (type==LIBconflict)?"conflict" : \ |
---|
447 | (type==LIBnblock)? "nblock" : \ |
---|
448 | (type==LIBuand)? "uand" : \ |
---|
449 | (type==LIBunand)? "unand" : \ |
---|
450 | (type==LIBuor)? "uor" : \ |
---|
451 | (type==LIBunor)? "unor" : \ |
---|
452 | (type==LIBuxor)? "uxor" : \ |
---|
453 | (type==LIBuxnor)? "uxnor" : \ |
---|
454 | (type==LIBplus)? "add" : \ |
---|
455 | (type==LIBminus)? "minus" : \ |
---|
456 | (type==LIBtimes)? "times" : \ |
---|
457 | (type==LIBdiv)? "div" : \ |
---|
458 | (type==LIBrem)? "rem" : \ |
---|
459 | (type==LIBeq2)? "eq2" : \ |
---|
460 | (type==LIBneq2)? "neq2" : \ |
---|
461 | (type==LIBeq3)? "eq3" : \ |
---|
462 | (type==LIBneq3)? "neq3" : \ |
---|
463 | (type==LIBland)? "and" : \ |
---|
464 | (type==LIBlor)? "or" : \ |
---|
465 | (type==LIBlt)? "lt" : \ |
---|
466 | (type==LIBle)? "le" : \ |
---|
467 | (type==LIBgt)? "gt" : \ |
---|
468 | (type==LIBge)? "ge" : \ |
---|
469 | (type==LIBand)? "and" : \ |
---|
470 | (type==LIBor)? "or" : \ |
---|
471 | (type==LIBxor)? "xor" : \ |
---|
472 | (type==LIBxnor)? "xnor" : \ |
---|
473 | (type==LIBlshift)? "lshift" : \ |
---|
474 | (type==LIBsubrange)?"subrange" : \ |
---|
475 | (type==LIBindex)? "index" : \ |
---|
476 | (type==LIBrshift)? "rshift" : "????" |
---|
477 | |
---|
478 | |
---|
479 | |
---|
480 | #define GATE_NAME(type) (type==AndGate)? "and" : \ |
---|
481 | (type==NandGate)? "nand" : \ |
---|
482 | (type==OrGate)? "or" : \ |
---|
483 | (type==NorGate)? "nor" : \ |
---|
484 | (type==XorGate)? "xor" : \ |
---|
485 | (type==XnorGate)? "xnor" : \ |
---|
486 | (type==BufGate)? "buf" : \ |
---|
487 | (type==Bufif0Gate)?"bufif0" : \ |
---|
488 | (type==Bufif1Gate)?"bufif1" : \ |
---|
489 | (type==NotGate)? "not" : \ |
---|
490 | (type==Notif0Gate)?"notif0" : \ |
---|
491 | (type==Notif1Gate)?"notif1" : \ |
---|
492 | (type==PulldownGate)?"pulldown" : \ |
---|
493 | (type==PullupGate)?"pullup" : \ |
---|
494 | (type==NmosGate)? "nmos" : \ |
---|
495 | (type==RnmosGate)? "rnmos" : \ |
---|
496 | (type==PmosGate)? "pmos" : \ |
---|
497 | (type==RpmosGate)? "rpmos" : \ |
---|
498 | (type==CmosGate)? "cmos" : \ |
---|
499 | (type==RcmosGate)? "rcmos" : \ |
---|
500 | (type==TranGate)? "tran" : \ |
---|
501 | (type==RtranGate)? "rtran" : \ |
---|
502 | (type==Tranif0Gate)?"tranif0" : \ |
---|
503 | (type==Tranif1Gate)?"tranif1" : \ |
---|
504 | (type==Rtranif0Gate)?"rtranif0" : \ |
---|
505 | (type==Rtranif1Gate)?"rtranif1" : "????" |
---|