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 Library General| 11 | Public 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 /* file : abe201.h */ 31 /* date : Feb 15 1995 */ 32 /* version : v201 */ 33 /* contents : defines and structure definitions used in BEH library */ 34 /* */ 35 /* ###--------------------------------------------------------------### */ 36 37 #ifndef ABE_BEHDEF 38 #define ABE_BEHDEF 39 40 #ifdef __cplusplus 41 extern "C" { 42 #endif /* __cplusplus */ 43 44 /* ###------------------------------------------------------### */ 45 /* defines */ 46 /* ###------------------------------------------------------### */ 47 48 #define BEH_GENERIC 203698 /* generic ptype code */ 49 #define BEH_STABLE 0x01 /* description used STABLE attribute */ 50 51 /* ###------------------------------------------------------### */ 52 /* structure definitions */ 53 /* ###------------------------------------------------------### */ 54 55 struct beden /* dictionary entry point */ 56 { 57 struct beden *NEXT; /* next entry */ 58 struct bedrd *DATA; /* data */ 59 char *KEY; /* key */ 60 }; 61 62 struct bedrd /* dictionary record */ 63 { 64 struct bedrd *NEXT; /* next record */ 65 char *KEY; /* context key */ 66 short FD0_VAL; /* data field */ 67 short FD1_VAL; /* data field */ 68 short FD2_VAL; /* data field */ 69 short FD3_VAL; /* data field */ 70 short FD4_VAL; /* data field */ 71 short FD5_VAL; /* data field */ 72 short FD6_VAL; /* data field */ 73 long PNT_VAL; /* data field */ 74 }; 75 76 typedef struct befig /* behaviour figure */ 77 { 78 struct befig *NEXT; /* next figure */ 79 char *NAME; /* figure's name */ 80 struct bereg *BEREG; /* list of internal signals (REGISTER) */ 81 struct bemsg *BEMSG; /* list of assert instructions */ 82 struct berin *BERIN; /* list of inputs (registers and ports) */ 83 struct beout *BEOUT; /* list of output ports */ 84 struct bebus *BEBUS; /* list of output ports (BUS) */ 85 struct beaux *BEAUX; /* list of internal signals */ 86 struct beaux *BEDLY; /* internal signals used for 'DELAYED */ 87 struct bebux *BEBUX; /* list of internal signals (BUS) */ 88 struct bepor *BEPOR; /* list of figure's port built in the */ 89 /* reverse order of the port clause */ 90 struct begen *BEGEN; /* list of generic data */ 91 struct bepgm *BEPGM; /* list of pragmas (new field !!) */ 92 93 struct bddcircuit *CIRCUI; /* Circuit pointer used during ABL to */ 94 /* BDD transformation */ 95 void *USER; /* reserved for user's applications */ 96 long FLAGS; 97 char ERRFLG; /* error flag */ 98 char TYPE; /* description type (not used) */ 99 } 100 befig_list; 101 102 typedef struct bereg /* register */ 103 { 104 struct bereg *NEXT; /* next register */ 105 char *NAME; /* register's name */ 106 struct biabl *BIABL; /* list of drivers (ABL) */ 107 struct binode *BINODE; /* list of drivers (BDD) */ 108 void *USER; 109 long FLAGS; 110 } 111 bereg_list; 112 113 typedef struct bemsg /* assert instruction */ 114 { 115 struct bemsg *NEXT; /* next assertion */ 116 char LEVEL; /* severity level of the assertion */ 117 char *LABEL; /* instruction's label */ 118 char *MESSAGE; /* assertion's message */ 119 ablexpr *ABL; /* assertion's condition (ABL) */ 120 struct bddnode *NODE; /* assertion's condition (BDD) */ 121 void *USER; 122 long FLAGS; 123 } 124 bemsg_list; 125 126 typedef struct beout /* output port */ 127 { 128 struct beout *NEXT; /* next output */ 129 char *NAME; /* port's name */ 130 ablexpr *ABL; /* port's equation (ABL) */ 131 struct bddnode *NODE; /* port's equation (BDD) */ 132 void *USER; 133 long FLAGS; 134 } 135 beout_list; 136 137 typedef struct bebus /* output port (BUS) */ 138 { 139 struct bebus *NEXT; /* next bus port */ 140 char *NAME; /* port's name */ 141 struct biabl *BIABL; /* list of drivers (ABL) */ 142 struct binode *BINODE; /* list of drivers (BDD) */ 143 char TYPE; /* port's type : W or M */ 144 void *USER; 145 long FLAGS; 146 } 147 bebus_list; 148 149 typedef struct beaux /* auxiliary signal */ 150 { 151 struct beaux *NEXT; /* next signal */ 152 char *NAME; /* signal's name */ 153 ablexpr *ABL; /* signal's equation (ABL) */ 154 struct bddnode *NODE; /* signal's equation (BDD) */ 155 void *USER; 156 long FLAGS; 157 } 158 beaux_list; 159 160 typedef struct bebux /* internal signal (BUS) */ 161 { 162 struct bebux *NEXT; /* next signal */ 163 char *NAME; /* signal's name */ 164 struct biabl *BIABL; /* list of drivers (ABL) */ 165 struct binode *BINODE; /* list of drivers (BDD) */ 166 char TYPE; /* signal's type : W or M */ 167 void *USER; 168 long FLAGS; 169 } 170 bebux_list; 171 172 typedef struct bepor /* port */ 173 { 174 struct bepor *NEXT; /* next port */ 175 char *NAME; /* port's name */ 176 char DIRECTION; /* port's mode (same as LOCON) */ 177 char TYPE; /* port's type (B, M or W) */ 178 void *USER; 179 long FLAGS; 180 } 181 bepor_list; 182 183 typedef struct biabl /* couple of ABL */ 184 { 185 struct biabl *NEXT; /* next couple */ 186 char *LABEL; /* driver's label */ 187 ablexpr *CNDABL; /* driver's connection condition (ABL) */ 188 ablexpr *VALABL; /* equation of driven value (ABL) */ 189 void *USER; /* user field */ 190 long FLAGS; 191 } 192 biabl_list; 193 194 typedef struct binode /* couple of BDD */ 195 { 196 struct binode *NEXT; /* next figure */ 197 struct bddnode *CNDNODE; /* driver's connection condition (BDD) */ 198 struct bddnode *VALNODE; /* equation of driven value (BDD) */ 199 void *USER; 200 long FLAGS; 201 } 202 binode_list; 203 204 typedef struct berin /* primary inputs */ 205 { 206 struct berin *NEXT; /* next input */ 207 char *NAME; /* input's name */ 208 struct chain *OUT_REF; /* outputs which depends on this input */ 209 struct chain *BUS_REF; /* busses which depends on this input */ 210 struct chain *AUX_REF; /* aux sig. which depends on this input */ 211 struct chain *REG_REF; /* registers which depends on this input*/ 212 struct chain *BUX_REF; /* busses which depends on this input */ 213 struct chain *MSG_REF; /* messages which depends on this input */ 214 struct chain *DLY_REF; /* delayed internal signals depending ..*/ 215 void *USER; 216 long FLAGS; 217 } 218 berin_list; 219 220 typedef struct begen /* generic */ 221 { 222 struct begen *NEXT; /* next generic */ 223 char *NAME; /* generic`s name */ 224 char *TYPE; /* generic type`s name */ 225 void *VALUE; /* generic`s value */ 226 void *USER; 227 long FLAGS; 228 } 229 begen_list; 230 231 typedef struct begex 232 { 233 struct chain *OPERAND; /* list of operands or NULL for term */ 234 unsigned int TERM ; /* operator or terminal's index */ 235 unsigned short TYPE ; /* expression's type index */ 236 } 237 begex_list; 238 239 typedef struct bepgm /* pragma */ 240 { 241 struct bepgm *NEXT; /* next pragma */ 242 char *TYPE; /* prgma's type */ 243 char *NAME; /* object's name */ 244 void *VALUE; /* prgma's content */ 245 void *USER; 246 } 247 bepgm_list; 248 249 /* ###------------------------------------------------------### */ 250 /* functions */ 251 /* ###------------------------------------------------------### */ 252 253 extern struct beaux *beh_addbeaux (); 254 extern struct bebux *beh_addbebux (); 255 extern struct bebus *beh_addbebus (); 256 extern struct befig *beh_addbefig (); 257 extern struct begen *beh_addbegen (); 258 extern struct bemsg *beh_addbemsg (); 259 extern struct beout *beh_addbeout (); 260 extern struct bepor *beh_addbepor (); 261 extern struct bereg *beh_addbereg (); 262 extern struct berin *beh_addberin (); 263 extern struct bepgm *beh_addbepgm (); 264 extern struct biabl *beh_addbiabl (); 265 extern struct binode *beh_addbinode (); 266 267 extern struct beaux *beh_delbeaux (); 268 extern struct bebux *beh_delbebux (); 269 extern struct bebus *beh_delbebus (); 270 extern struct befig *beh_delbefig (); 271 extern struct begen *beh_delbegen (); 272 extern struct bemsg *beh_delbemsg (); 273 extern struct beout *beh_delbeout (); 274 extern struct bepor *beh_delbepor (); 275 extern struct bereg *beh_delbereg (); 276 extern struct berin *beh_delberin (); 277 extern struct bepgm *beh_delbepgm (); 278 extern struct biabl *beh_delbiabl (); 279 extern struct binode *beh_delbinode (); 280 281 extern void beh_frebeaux (); 282 extern void beh_frebebux (); 283 extern void beh_frebebus (); 284 extern void beh_frebefig (); 285 extern void beh_frebegen (); 286 extern void beh_frebemsg (); 287 extern void beh_frebeout (); 288 extern void beh_frebepor (); 289 extern void beh_frebereg (); 290 extern void beh_freberin (); 291 extern void beh_frebepgm (); 292 extern void beh_frebiabl (); 293 extern void beh_frebinode (); 294 295 extern void beh_viewbefig(); 296 extern void beh_viewbiabl(); 297 extern void beh_viewbereg(); 298 extern void beh_viewbebux(); 299 extern void beh_viewbebus(); 300 extern void beh_viewbeout(); 301 extern void beh_viewbeaux(); 302 extern void beh_viewbepor(); 303 304 extern struct beaux *beh_rmvbeaux (); 305 extern struct bebux *beh_rmvbebux (); 306 extern struct bebus *beh_rmvbebus (); 307 extern struct befig *beh_rmvbefig (); 308 extern struct begen *beh_rmvbegen (); 309 extern struct bemsg *beh_rmvbemsg (); 310 extern struct beout *beh_rmvbeout (); 311 extern struct bepor *beh_rmvbepor (); 312 extern struct bereg *beh_rmvbereg (); 313 extern struct berin *beh_rmvberin (); 314 extern struct bepgm *beh_rmvbepgm (); 315 316 extern struct beden **beh_initab (); 317 extern void beh_addtab (); 318 extern long beh_chktab (); 319 extern void beh_fretab (); 320 321 extern int beh_error (); 322 extern void beh_message (); 323 extern void beh_toolbug (); 324 325 #ifdef __cplusplus 326 } 327 #endif /* __cplusplus */ 328 329 #endif 330