1 /*------------------------------------------------------------\
2 |                                                             |
3 | This file is part of the Alliance CAD System Copyright      |
4 | (C) Laboratoire LIP6 - D�partement ASIM Universite P&M Curie|
5 |                                                             |
6 | Home page      : http://www-asim.lip6.fr/alliance/          |
7 | E-mail         : mailto:alliance-users@asim.lip6.fr       |
8 |                                                             |
9 | This progam is  free software; you can redistribute it      |
10 | and/or modify it under the  terms of the GNU General Public |
11 | License as  published by the Free Software Foundation;      |
12 | either version 2 of the License, or (at your option) any    |
13 | later version.                                              |
14 |                                                             |
15 | Alliance VLSI  CAD System  is distributed  in the hope that |
16 | it  will be useful, but WITHOUT  ANY WARRANTY;              |
17 | without even the  implied warranty of MERCHANTABILITY or    |
18 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General       |
19 | Public License for more details.                            |
20 |                                                             |
21 | You should have received a copy  of the GNU General Public  |
22 | License along with the GNU C Library; see the file COPYING. |
23 | If not, write to the Free Software Foundation, Inc.,        |
24 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                     |
25 |                                                             |
26 \------------------------------------------------------------*/
27 
28 /*------------------------------------------------------------\
29 |                                                             |
30 | Tool    :                     VASY                          |
31 |                                                             |
32 | File    :                 vasy_simprtl.h                    |
33 |                                                             |
34 | Author  :                 Jacomme Ludovic                   |
35 |                                                             |
36 | Date    :                   25.08.97                        |
37 |                                                             |
38 \------------------------------------------------------------*/
39 
40 # ifndef VASY_SIMP_RTL_H
41 # define VASY_SIMP_RTL_H
42 
43 /*------------------------------------------------------------\
44 |                                                             |
45 |                           Constants                         |
46 |                                                             |
47 \------------------------------------------------------------*/
48 /*------------------------------------------------------------\
49 |                                                             |
50 |                            Declar Mask                      |
51 |                                                             |
52 \------------------------------------------------------------*/
53 
54 # define VASY_DECLAR_ASG_MASK           0x01
55 # define VASY_DECLAR_READ_MASK          0x02
56 # define VASY_DECLAR_USED_MASK          0x03
57 # define VASY_DECLAR_DEFINE_MASK        0x04
58 
59 /*------------------------------------------------------------\
60 |                                                             |
61 |                          Macros Declar                      |
62 |                                                             |
63 \------------------------------------------------------------*/
64 
65 # define SetVasyRtlDeclarAsg( D )   ((D)->FLAGS |=  VASY_DECLAR_ASG_MASK)
66 # define ClearVasyRtlDeclarAsg( D ) ((D)->FLAGS &= ~VASY_DECLAR_ASG_MASK)
67 # define IsVasyRtlDeclarAsg( D )    ((D)->FLAGS & VASY_DECLAR_ASG_MASK)
68 
69 # define SetVasyRtlDeclarRead( D )   ((D)->FLAGS |=  VASY_DECLAR_READ_MASK)
70 # define ClearVasyRtlDeclarRead( D ) ((D)->FLAGS &= ~VASY_DECLAR_READ_MASK)
71 # define IsVasyRtlDeclarRead( D )    ((D)->FLAGS & VASY_DECLAR_READ_MASK)
72 
73 # define IsVasyRtlDeclarUsed( D )    ((D)->FLAGS & VASY_DECLAR_USED_MASK)
74 # define ClearVasyRtlDeclarUsed( D ) ((D)->FLAGS &= ~VASY_DECLAR_USED_MASK)
75 
76 # define SetVasyRtlDeclarDefine( D )   ((D)->FLAGS |=  VASY_DECLAR_DEFINE_MASK)
77 # define ClearVasyRtlDeclarDefine( D ) ((D)->FLAGS &= ~VASY_DECLAR_DEFINE_MASK)
78 # define IsVasyRtlDeclarDefine( D )    ((D)->FLAGS & VASY_DECLAR_DEFINE_MASK)
79 
80 /*------------------------------------------------------------\
81 |                                                             |
82 |                          Assign Mask                        |
83 |                                                             |
84 \------------------------------------------------------------*/
85 
86 # define VASY_ASSIGN_SUBST_MASK         0x01
87 # define VASY_ASSIGN_SUBST_DONE_MASK    0x02
88 
89 # define VASY_ASSIGN_NUMBER_READ_MASK   0xF0
90 # define VASY_ASSIGN_NUMBER_READ_SHIFT  4
91 
92 /*------------------------------------------------------------\
93 |                                                             |
94 |                          Macros Assign                      |
95 |                                                             |
96 \------------------------------------------------------------*/
97 
98 # define SetVasyRtlAssignSubst( D )   ((D)->FLAGS |=  VASY_ASSIGN_SUBST_MASK)
99 # define ClearVasyRtlAssignSubst( D ) ((D)->FLAGS &= ~VASY_ASSIGN_SUBST_MASK)
100 # define IsVasyRtlAssignSubst( D )    ((D)->FLAGS &   VASY_ASSIGN_SUBST_MASK)
101 
102 # define GetVasyRtlAssignNumberRead( D ) \
103   (((D)->FLAGS & VASY_ASSIGN_NUMBER_READ_MASK) >> VASY_ASSIGN_NUMBER_READ_SHIFT)
104 
105 # define SetVasyRtlAssignNumberRead( D, V ) \
106   ((D)->FLAGS = ((D)->FLAGS & ~VASY_ASSIGN_NUMBER_READ_MASK) | \
107     (((V) << VASY_ASSIGN_NUMBER_READ_SHIFT) & VASY_ASSIGN_NUMBER_READ_MASK))
108 
109 # define IncVasyRtlAssignNumberRead( D ) \
110    (SetVasyRtlAssignNumberRead( D, GetVasyRtlAssignNumberRead( D ) + 1 ))
111 
112 # define SetVasyRtlAssignSubstDone( D )   ((D)->FLAGS |=  VASY_ASSIGN_SUBST_DONE_MASK)
113 # define ClearVasyRtlAssignSubstDone( D ) ((D)->FLAGS &= ~VASY_ASSIGN_SUBST_DONE_MASK)
114 # define IsVasyRtlAssignSubstDone( D )    ((D)->FLAGS &   VASY_ASSIGN_SUBST_DONE_MASK)
115 
116 /*------------------------------------------------------------\
117 |                                                             |
118 |                            Types                            |
119 |                                                             |
120 \------------------------------------------------------------*/
121 /*------------------------------------------------------------\
122 |                                                             |
123 |                          Variables                          |
124 |                                                             |
125 \------------------------------------------------------------*/
126 /*------------------------------------------------------------\
127 |                                                             |
128 |                          Functions                          |
129 |                                                             |
130 \------------------------------------------------------------*/
131 
132   extern void     VasySimplifyRtlFig();
133 
134 # endif
135