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 #ifndef __P 28 # if defined(__STDC__) || defined(__GNUC__) 29 # define __P(x) x 30 # else 31 # define __P(x) () 32 # endif 33 #endif 34 /*------------------------------------------------------\ 35 | | 36 | Title : Structures and fonctions for VPN | 37 | | 38 | Date : 17.01.2000 | 39 | | 40 | Author : Jacomme Ludovic | 41 | | 42 \------------------------------------------------------*/ 43 44 # ifndef VPN_105_H 45 # define VPN_105_H 46 47 /*------------------------------------------------------\ 48 | | 49 | Constants | 50 | | 51 \------------------------------------------------------*/ 52 /*------------------------------------------------------\ 53 | | 54 | Vpn Attribute Type | 55 | | 56 \------------------------------------------------------*/ 57 58 # define VPN_ATTR_NONE 0 59 # define VPN_ATTR_ENTITY 1 60 # define VPN_ATTR_ARCHITECTURE 2 61 # define VPN_ATTR_PACKAGE 3 62 # define VPN_ATTR_FUNCTION 4 63 # define VPN_ATTR_PROCEDURE 5 64 # define VPN_ATTR_SUBTYPE 6 65 # define VPN_ATTR_CONSTANT 7 66 # define VPN_ATTR_VARIABLE 8 67 # define VPN_ATTR_SIGNAL 9 68 # define VPN_ATTR_LABEL 10 69 # define VPN_ATTR_TYPE 11 70 # define VPN_ATTR_CONFIGURATION 12 71 # define VPN_ATTR_COMPONENT 13 72 # define VPN_MAX_ATTR_TYPE 14 73 74 /*------------------------------------------------------\ 75 | | 76 | Vpn Father Type | 77 | | 78 \------------------------------------------------------*/ 79 80 # define VPN_FATHER_PROCESS 0 81 # define VPN_FATHER_FUNCTION 1 82 # define VPN_MAX_FATHER_TYPE 2 83 84 /*------------------------------------------------------\ 85 | | 86 | Vpn Trans Type | 87 | | 88 \------------------------------------------------------*/ 89 90 # define VPN_TRANS_UNKNOWN 0 91 # define VPN_TRANS_ACT_EXEC 1 92 # define VPN_TRANS_INF_WAIT 2 93 # define VPN_TRANS_SUP_WAIT 3 94 # define VPN_TRANS_GUARDED 4 95 # define VPN_TRANS_IMMEDIATE 5 96 # define VPN_TRANS_ACT_GUARDED 6 97 # define VPN_TRANS_ACT_EXEC_CONC 7 98 # define VPN_TRANS_ACT_GUARDED_CONC 8 99 # define VPN_MAX_TRANS_TYPE 9 100 101 /*------------------------------------------------------\ 102 | | 103 | Vpn Place Type | 104 | | 105 \------------------------------------------------------*/ 106 107 # define VPN_PLACE_UNKNOWN 0 108 # define VPN_PLACE_ASSIGN 1 109 # define VPN_PLACE_IF 2 110 # define VPN_PLACE_END_IF 3 111 # define VPN_PLACE_CASE 4 112 # define VPN_PLACE_END_CASE 5 113 # define VPN_PLACE_WAIT 6 114 # define VPN_PLACE_UNTIL 7 115 # define VPN_PLACE_UNTIL_TEST 8 116 # define VPN_PLACE_END_UNTIL 9 117 # define VPN_PLACE_WHILE 10 118 # define VPN_PLACE_WHILE_TEST 11 119 # define VPN_PLACE_END_WHILE 12 120 # define VPN_PLACE_FOR 13 121 # define VPN_PLACE_FOR_LOOP 14 122 # define VPN_PLACE_FOR_TEST 15 123 # define VPN_PLACE_FOR_INC 16 124 # define VPN_PLACE_END_FOR 17 125 # define VPN_PLACE_NEXT 18 126 # define VPN_PLACE_EXIT 19 127 # define VPN_PLACE_CALL 20 128 # define VPN_PLACE_RETURN 21 129 # define VPN_PLACE_PROCESS 22 130 # define VPN_PLACE_FUNCTION 23 131 # define VPN_PLACE_LOOP 24 132 # define VPN_PLACE_END_LOOP 25 133 # define VPN_PLACE_END_EXIT 26 134 # define VPN_PLACE_END_NEXT 27 135 # define VPN_PLACE_GOTO 28 136 # define VPN_PLACE_LABEL 29 137 # define VPN_PLACE_DO 30 138 # define VPN_PLACE_DO_TEST 31 139 # define VPN_PLACE_DO_WHILE 32 140 # define VPN_PLACE_END_DO 33 141 # define VPN_PLACE_SWITCH 34 142 # define VPN_PLACE_END_SWITCH 35 143 # define VPN_PLACE_C_CASE 36 144 # define VPN_PLACE_BREAK 37 145 # define VPN_PLACE_C_RETURN 38 146 # define VPN_MAX_PLACE_TYPE 39 147 148 /*------------------------------------------------------\ 149 | | 150 | Vpn Argument Class | 151 | | 152 \------------------------------------------------------*/ 153 154 # define VPN_CLASS_NONE 0 155 # define VPN_CLASS_CONSTANT 1 156 # define VPN_CLASS_VARIABLE 2 157 # define VPN_CLASS_SIGNAL 3 158 # define VPN_MAX_CLASS_TYPE 4 159 160 /*------------------------------------------------------\ 161 | | 162 | Vpn Direction | 163 | | 164 \------------------------------------------------------*/ 165 166 # define VPN_DIR_IN 0 167 # define VPN_DIR_OUT 1 168 # define VPN_DIR_INOUT 2 169 # define VPN_MAX_DIR_TYPE 3 170 171 /*------------------------------------------------------\ 172 | | 173 | Vpn Kind | 174 | | 175 \------------------------------------------------------*/ 176 177 # define VPN_KIND_NONE 0 178 # define VPN_KIND_BUS 1 179 # define VPN_KIND_REGISTER 2 180 # define VPN_MAX_KIND_TYPE 3 181 182 /*------------------------------------------------------\ 183 | | 184 | Vpn Declar Type | 185 | | 186 \------------------------------------------------------*/ 187 188 # define VPN_DECLAR_ALL 0 189 # define VPN_DECLAR_PORT 1 190 # define VPN_DECLAR_SIGNAL 2 191 # define VPN_DECLAR_VARIABLE 3 192 # define VPN_DECLAR_DEFINE 4 193 # define VPN_DECLAR_ARGUMENT 5 194 # define VPN_DECLAR_CONSTANT 6 195 # define VPN_DECLAR_GENERIC 7 196 # define VPN_MAX_DECLAR_TYPE 8 197 198 /*------------------------------------------------------\ 199 | | 200 | Vpn Action Type | 201 | | 202 \------------------------------------------------------*/ 203 204 # define VPN_ACT_UNKNOWN 0 205 # define VPN_ACT_ASG_PORT 1 206 # define VPN_ACT_ASG_SIGNAL 2 207 # define VPN_ACT_ASG_VARIABLE 3 208 # define VPN_ACT_ASG_DEFINE 4 209 # define VPN_ACT_ASG_ARG_SIG 5 210 # define VPN_ACT_ASG_ARG_VAR 6 211 # define VPN_ACT_CALL 7 212 # define VPN_ACT_RETURN 8 213 # define VPN_MAX_ACT_TYPE 9 214 215 /*------------------------------------------------------\ 216 | | 217 | Vpn Arc Type | 218 | | 219 \------------------------------------------------------*/ 220 221 # define VPN_ARC_PLACE_TRANS 0 222 # define VPN_ARC_TRANS_PLACE 1 223 # define VPN_MAX_ARC_TYPE 2 224 225 /*------------------------------------------------------\ 226 | | 227 | Vpn Process Type | 228 | | 229 \------------------------------------------------------*/ 230 231 # define VPN_PROCESS_SEQUENTIAL_MASK 0x01 232 # define VPN_PROCESS_WITHSELECT_MASK 0x02 233 # define VPN_PROCESS_GUARDED_MASK 0x04 234 # define VPN_PROCESS_CONDITIONNAL_MASK 0x08 235 236 /*------------------------------------------------------\ 237 | | 238 | Macros | 239 | | 240 \------------------------------------------------------*/ 241 /*------------------------------------------------------\ 242 | | 243 | Vpn Is Process Type | 244 | | 245 \------------------------------------------------------*/ 246 247 # define IsVpnProcSequential( P ) ( (P)->TYPE & VPN_PROCESS_SEQUENTIAL_MASK ) 248 # define IsVpnProcWithSelect( P ) ( (P)->TYPE & VPN_PROCESS_WITHSELECT_MASK ) 249 # define IsVpnProcConditionnal( P ) ( (P)->TYPE & VPN_PROCESS_CONDITIONNAL_MASK ) 250 # define IsVpnProcGuarded( P ) ( (P)->TYPE & VPN_PROCESS_GUARDED_MASK ) 251 252 # define SetVpnProcSequential( P ) ( (P)->TYPE |= VPN_PROCESS_SEQUENTIAL_MASK ) 253 # define SetVpnProcWithSelect( P ) ( (P)->TYPE |= VPN_PROCESS_WITHSELECT_MASK ) 254 # define SetVpnProcConditionnal( P ) ( (P)->TYPE |= VPN_PROCESS_CONDITIONNAL_MASK ) 255 # define SetVpnProcGuarded( P ) ( (P)->TYPE |= VPN_PROCESS_GUARDED_MASK ) 256 257 # define ClearVpnProcSequential( P ) ( (P)->TYPE &= ~VPN_PROCESS_SEQUENTIAL_MASK ) 258 # define ClearVpnProcWithSelect( P ) ( (P)->TYPE &= ~VPN_PROCESS_WITHSELECT_MASK ) 259 # define ClearVpnProcConditionnal( P ) ( (P)->TYPE &= ~VPN_PROCESS_CONDITIONNAL_MASK ) 260 # define ClearVpnProcGuarded( P ) ( (P)->TYPE &= ~VPN_PROCESS_GUARDED_MASK ) 261 262 /*------------------------------------------------------\ 263 | | 264 | Vpn Get Symbol | 265 | | 266 \------------------------------------------------------*/ 267 268 # define GetVpnSymbol( C ) ((vpnsym *)( (C)->DATA )) 269 # define GetVpnDeclar( C ) ((vpndecl_list *)( (C)->DATA )) 270 271 /*------------------------------------------------------\ 272 | | 273 | Vpn Get Arc | 274 | | 275 \------------------------------------------------------*/ 276 277 # define GetVpnArc( C ) \ 278 ((vpnarc *)( (C)->DATA )) 279 280 # define GetVpnArcTargetPlace( A ) \ 281 ((vpnplace_list *)( (vpnarc *)(A)->TARGET )) 282 283 # define GetVpnArcSourcePlace( A ) \ 284 ((vpnplace_list *)( (vpnarc *)(A)->SOURCE )) 285 286 # define GetVpnArcTargetTrans( A ) \ 287 ((vpntrans_list *)( (vpnarc *)(A)->TARGET )) 288 289 # define GetVpnArcSourceTrans( A ) \ 290 ((vpntrans_list *)( (vpnarc *)(A)->SOURCE )) 291 292 /*------------------------------------------------------\ 293 | | 294 | Vpn Add Arc | 295 | | 296 \------------------------------------------------------*/ 297 298 # define addvpnarctrans( F, T, P ) \ 299 (addvpnarc( (F), (T), (P), VPN_ARC_TRANS_PLACE )) 300 301 # define addvpnarcplace( F, P, T ) \ 302 (addvpnarc( (F), (P), (T), VPN_ARC_PLACE_TRANS )) 303 304 /*------------------------------------------------------\ 305 | | 306 | Vpn Add Action | 307 | | 308 \------------------------------------------------------*/ 309 310 # define addvpnactcall( F, T, E ) \ 311 (addvpnact( (F), (T), (vexexpr *)0, (E), VPN_ACT_CALL )) 312 313 # define addvpnactreturn( F, T, E ) \ 314 (addvpnact( (F), (T), (vexexpr *)0, (E), VPN_ACT_RETURN )) 315 316 # define addvpnactcallafter( F, T, P, E ) \ 317 (addvpnactafter( (F), (T), (P), (vexexpr *)0, (E), VPN_ACT_CALL )) 318 319 # define addvpnactreturnafter( F, T, P, E ) \ 320 (addvpnactafter( (F), (T), (P), (vexexpr *)0, (E), VPN_ACT_RETURN )) 321 322 # define addvpnactcallbefore( F, T, P, E ) \ 323 (addvpnactbefore( (F), (T), (P), (vexexpr *)0, (E), VPN_ACT_CALL )) 324 325 # define addvpnactreturnbefore( F, T, P, E ) \ 326 (addvpnactafter( (F), (T), (P), (vexexpr *)0, (E), VPN_ACT_RETURN )) 327 328 # define addvpnactcallfirst( F, T, E ) \ 329 (addvpnactfirst( (F), (T), (vexexpr *)0, (E), VPN_ACT_CALL )) 330 331 # define addvpnactreturnfirst( F, T, E ) \ 332 (addvpnactfirst( (F), (T), (vexexpr *)0, (E), VPN_ACT_RETURN )) 333 334 335 /*------------------------------------------------------\ 336 | | 337 | Vpn Get Number | 338 | | 339 \------------------------------------------------------*/ 340 341 # define GetVpnNumProc( F ) ((F)->HASH_PROCESS->NUMBER_ELEM) 342 # define GetVpnNumFunc( F ) ((F)->HASH_FUNCTION->NUMBER_ELEM) 343 # define GetVpnNumTrans( F ) ((F)->HASH_TRANS->NUMBER_ELEM) 344 # define GetVpnNumPlace( F ) ((F)->HASH_PLACE->NUMBER_ELEM) 345 # define GetVpnNumArc( F ) ((F)->HASH_ARC->NUMBER_ELEM) 346 347 # define GetVpnNumDecl( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_ALL ]->NUMBER_ELEM) 348 # define GetVpnNumDeclPort( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_PORT ]->NUMBER_ELEM) 349 # define GetVpnNumDeclSig( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_SIGNAL ]->NUMBER_ELEM) 350 # define GetVpnNumDeclVar( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_VARIABLE ]->NUMBER_ELEM) 351 # define GetVpnNumDeclCst( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_CONSTANT ]->NUMBER_ELEM) 352 # define GetVpnNumDeclDef( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_DEFINE ]->NUMBER_ELEM) 353 # define GetVpnNumDeclArg( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_ARGUMENT ]->NUMBER_ELEM) 354 355 /*------------------------------------------------------\ 356 | | 357 | Vpn Search Symbol | 358 | | 359 \------------------------------------------------------*/ 360 361 # define searchvpnsymport( F, N, I ) \ 362 (searchvpnsym( (F), (N), (I), VPN_DECLAR_PORT )) 363 # define searchvpnsymsig( F, N, I ) \ 364 (searchvpnsym( (F), (N), (I), VPN_DECLAR_SIGNAL )) 365 # define searchvpnsymvar( F, N, I ) \ 366 (searchvpnsym( (F), (N), (I), VPN_DECLAR_VARIABLE )) 367 # define searchvpnsymcst( F, N, I ) \ 368 (searchvpnsym( (F), (N), (I), VPN_DECLAR_CONSTANT )) 369 # define searchvpnsymdef( F, N, I ) \ 370 (searchvpnsym( (F), (N), (I), VPN_DECLAR_DEFINE )) 371 # define searchvpnsymarg( F, N, I ) \ 372 (searchvpnsym( (F), (N) (I), VPN_DECLAR_ARGUMENT )) 373 # define searchvpnsymgen( F, N, I ) \ 374 (searchvpnsym( (F), (N), (I), VPN_DECLAR_GENERIC )) 375 # define searchvpnsymall( F, N, I ) \ 376 (searchvpnsym( (F), (N), (I), VPN_DECLAR_ALL )) 377 378 /*------------------------------------------------------\ 379 | | 380 | Vpn Search Declar | 381 | | 382 \------------------------------------------------------*/ 383 384 # define searchvpndeclport( F, N ) \ 385 (searchvpndecl( (F), (N), VPN_DECLAR_PORT )) 386 # define searchvpndeclsig( F, N ) \ 387 (searchvpndecl( (F), (N), VPN_DECLAR_SIGNAL )) 388 # define searchvpndeclvar( F, N ) \ 389 (searchvpndecl( (F), (N), VPN_DECLAR_VARIABLE )) 390 # define searchvpndeclcst( F, N ) \ 391 (searchvpndecl( (F), (N), VPN_DECLAR_CONSTANT )) 392 # define searchvpndecldef( F, N ) \ 393 (searchvpndecl( (F), (N), VPN_DECLAR_DEFINE )) 394 # define searchvpndeclarg( F, N ) \ 395 (searchvpndecl( (F), (N), VPN_DECLAR_ARGUMENT )) 396 # define searchvpndeclgen( F, N ) \ 397 (searchvpndecl( (F), (N), VPN_DECLAR_GENERIC )) 398 # define searchvpndeclall( F, N ) \ 399 (searchvpndecl( (F), (N), VPN_DECLAR_ALL )) 400 401 402 /*------------------------------------------------------\ 403 | | 404 | Type | 405 | | 406 \------------------------------------------------------*/ 407 /*------------------------------------------------------\ 408 | | 409 | Vpn Line | 410 | | 411 \------------------------------------------------------*/ 412 413 typedef struct vpnline_list 414 { 415 struct vpnline_list *NEXT; 416 char *NAME; 417 long LINE; 418 419 } vpnline_list; 420 421 /*------------------------------------------------------\ 422 | | 423 | Vpn Attribute | 424 | | 425 \------------------------------------------------------*/ 426 427 typedef struct vpnattr 428 { 429 struct vpnattr *NEXT; 430 char *NAME; 431 char *ENTITY; 432 char *VALUE; 433 unsigned char TYPE; 434 vpnline_list *LINE; 435 long FLAGS; 436 void *USER; 437 438 } vpnattr_list; 439 440 /*------------------------------------------------------\ 441 | | 442 | Vpn Symbol | 443 | | 444 \------------------------------------------------------*/ 445 446 typedef struct vpnsym 447 { 448 char *NAME; 449 struct vpndecl_list *DECL; 450 short INDEX; 451 unsigned char INIT; 452 unsigned char DRIVE; 453 unsigned char EFFEC; 454 unsigned char EVENT; 455 long FLAGS; 456 void *USER; 457 458 } vpnsym; 459 460 /*------------------------------------------------------\ 461 | | 462 | Vpn Declaration | 463 | | 464 \------------------------------------------------------*/ 465 466 typedef struct vpndecl_list 467 { 468 struct vpndecl_list *NEXT; 469 struct vpndecl_list **PREV; 470 vexexpr *VEX_ATOM; 471 void *BDD_ATOM; 472 vexexpr *VEX_INIT; 473 void *BDD_INIT; 474 vpnsym *DECL_SYM; 475 unsigned char DIR; 476 unsigned char TYPE; 477 unsigned char KIND; 478 unsigned char CLASS; 479 unsigned char BASE; 480 vpnline_list *LINE; 481 long FLAGS; 482 void *USER; 483 484 } vpndecl_list; 485 486 /*------------------------------------------------------\ 487 | | 488 | Vpn Action | 489 | | 490 \------------------------------------------------------*/ 491 492 typedef struct vpnact_list 493 { 494 struct vpnact_list *NEXT; 495 struct vpnact_list **PREV; 496 vexexpr *VEX_ATOM; 497 void *BDD_ATOM; 498 vexexpr *VEX_EXPR; 499 void *BDD_EXPR; 500 unsigned char TYPE; 501 vpnline_list *LINE; 502 long FLAGS; 503 void *USER; 504 505 } vpnact_list; 506 507 /*------------------------------------------------------\ 508 | | 509 | Vpn Arc | 510 | | 511 \------------------------------------------------------*/ 512 513 typedef struct vpnarc 514 { 515 void *SOURCE; 516 void *TARGET; 517 unsigned char TYPE; 518 long FLAGS; 519 void *USER; 520 521 } vpnarc; 522 523 /*------------------------------------------------------\ 524 | | 525 | Vpn Place | 526 | | 527 \------------------------------------------------------*/ 528 529 typedef struct vpnplace_list 530 { 531 struct vpnplace_list *NEXT; 532 struct vpnplace_list **PREV; 533 char *NAME; 534 unsigned char FATHER; 535 unsigned char TYPE; 536 unsigned short TOKEN; 537 unsigned short NUMBER_IN; 538 unsigned short NUMBER_OUT; 539 chain_list *TRANS_IN; 540 chain_list *TRANS_OUT; 541 struct vpnplace_list *LINK; 542 vpnline_list *LINE; 543 long FLAGS; 544 void *USER; 545 546 } vpnplace_list; 547 548 /*------------------------------------------------------\ 549 | | 550 | Vpn Trans | 551 | | 552 \------------------------------------------------------*/ 553 554 typedef struct vpntrans_list 555 { 556 struct vpntrans_list *NEXT; 557 struct vpntrans_list **PREV; 558 char *NAME; 559 unsigned char FATHER; 560 unsigned char TYPE; 561 chain_list *WAIT_SYM; 562 unsigned short NUMBER_IN; 563 unsigned short NUMBER_OUT; 564 chain_list *PLACE_IN; 565 chain_list *PLACE_OUT; 566 vpnact_list *ACT; 567 vpnact_list **LAST_ACT; 568 vexexpr *VEX_GUARD; 569 void *BDD_GUARD; 570 long FLAGS; 571 void *USER; 572 573 } vpntrans_list; 574 575 /*------------------------------------------------------\ 576 | | 577 | Vpn Process | 578 | | 579 \------------------------------------------------------*/ 580 581 typedef struct vpnproc_list 582 { 583 struct vpnproc_list *NEXT; 584 struct vpnproc_list **PREV; 585 char *NAME; 586 unsigned char TYPE; 587 vpntrans_list *FIRST; 588 vpntrans_list *ELABO; 589 vpnplace_list *PLACE; 590 vpntrans_list *TRANS; 591 chain_list *VAR_DECL; 592 chain_list *DEF_DECL; 593 vpnline_list *LINE; 594 long FLAGS; 595 void *USER; 596 597 } vpnproc_list; 598 599 /*------------------------------------------------------\ 600 | | 601 | Vpn Function | 602 | | 603 \------------------------------------------------------*/ 604 605 typedef struct vpnfunc_list 606 { 607 struct vpnfunc_list *NEXT; 608 struct vpnfunc_list **PREV; 609 char *NAME; 610 unsigned char TYPE; 611 vpntrans_list *FIRST; 612 vpntrans_list *ELABO; 613 vpnplace_list *PLACE; 614 vpntrans_list *TRANS; 615 vexexpr *VEX_RET; 616 chain_list *ARG_DECL; 617 chain_list **LAST_ARG; 618 chain_list *VAR_DECL; 619 chain_list *DEF_DECL; 620 vpnline_list *LINE; 621 long FLAGS; 622 void *USER; 623 624 } vpnfunc_list; 625 626 /*------------------------------------------------------\ 627 | | 628 | Vpn Instance | 629 | | 630 \------------------------------------------------------*/ 631 632 typedef struct vpnmap_list 633 { 634 struct vpnmap_list *NEXT; 635 vexexpr *VEX_FORMAL; 636 vexexpr *VEX_ACTUAL; 637 vpnline_list *LINE; 638 long FLAGS; 639 void *USER; 640 641 } vpnmap_list; 642 643 typedef struct vpngen_list 644 { 645 struct vpngen_list *NEXT; 646 vexexpr *VEX_ATOM; 647 vexexpr *VEX_EXPR; 648 vpnline_list *LINE; 649 unsigned char BASE; 650 long FLAGS; 651 void *USER; 652 653 } vpngen_list; 654 655 656 typedef struct vpnins_list 657 { 658 struct vpnins_list *NEXT; 659 char *NAME; 660 struct vpnmod_list *MODEL; 661 vpnmap_list *MAP; 662 vpngen_list *GENERIC; 663 vpnline_list *LINE; 664 long FLAGS; 665 void *USER; 666 667 } vpnins_list; 668 669 /*------------------------------------------------------\ 670 | | 671 | Vpn Model | 672 | | 673 \------------------------------------------------------*/ 674 675 typedef struct vpnport_list 676 { 677 struct vpnport_list *NEXT; 678 vexexpr *VEX_ATOM; 679 unsigned char DIR; 680 unsigned char BASE; 681 vpnline_list *LINE; 682 long FLAGS; 683 void *USER; 684 685 } vpnport_list; 686 687 typedef struct vpnmod_list 688 { 689 struct vpnmod_list *NEXT; 690 char *NAME; 691 vpnport_list *PORT; 692 vpngen_list *GENERIC; 693 vpnline_list *LINE; 694 long FLAGS; 695 void *USER; 696 697 } vpnmod_list; 698 699 /*------------------------------------------------------\ 700 | | 701 | Vpn Figure | 702 | | 703 \------------------------------------------------------*/ 704 705 typedef struct vpnfig_list 706 { 707 struct vpnfig_list *NEXT; 708 char *NAME; 709 vpnproc_list *PROCESS; 710 vpnfunc_list *FUNCTION; 711 vpnmod_list *MODEL; 712 vpnins_list *INSTANCE; 713 chain_list *VAR_DECL; 714 chain_list *DEF_DECL; 715 vpndecl_list *DECLAR[ VPN_MAX_DECLAR_TYPE ]; 716 vpnattr_list *ATTRIBUTE; 717 authtable *HASH_DECLAR[ VPN_MAX_DECLAR_TYPE ]; 718 authtable *HASH_PROCESS; 719 authtable *HASH_FUNCTION; 720 authtable *HASH_TRANS; 721 authtable *HASH_PLACE; 722 authtable *HASH_MODEL; 723 authtable *HASH_INSTANCE; 724 auth2table *HASH_ARC; 725 void *CIRCUIT; 726 long FLAGS; 727 void *USER; 728 729 } vpnfig_list; 730 731 /*------------------------------------------------------\ 732 | | 733 | Global Variables | 734 | | 735 \------------------------------------------------------*/ 736 737 extern vpnfig_list *HEAD_VPNFIG; 738 739 extern char *VPN_FATHER_TYPE [ VPN_MAX_FATHER_TYPE ]; 740 extern char *VPN_ACT_TYPE [ VPN_MAX_ACT_TYPE ]; 741 extern char *VPN_TRANS_TYPE [ VPN_MAX_TRANS_TYPE ]; 742 extern char *VPN_PLACE_TYPE [ VPN_MAX_PLACE_TYPE ]; 743 extern char *VPN_DECLAR_TYPE [ VPN_MAX_DECLAR_TYPE ]; 744 extern char *VPN_ARC_TYPE [ VPN_MAX_ARC_TYPE ]; 745 extern char *VPN_DIR_TYPE [ VPN_MAX_DIR_TYPE ]; 746 extern char *VPN_CLASS_TYPE [ VPN_MAX_CLASS_TYPE ]; 747 extern char *VPN_KIND_TYPE [ VPN_MAX_KIND_TYPE ]; 748 extern char *VPN_ATTRIBUTE_TYPE[ VPN_MAX_ATTR_TYPE ]; 749 750 extern char *VPN_IN; 751 extern char *VPN_OUT; 752 753 extern char *VPN_VHDL_FORMAT; 754 extern char *VPN_VPN_FORMAT; 755 extern char *VPN_VBE_FORMAT; 756 extern char *VPN_VST_FORMAT; 757 extern char *VPN_SYN_FORMAT; 758 extern char *VPN_FSM_FORMAT; 759 760 /*------------------------------------------------------\ 761 | | 762 | Functions | 763 | | 764 \------------------------------------------------------*/ 765 /*------------------------------------------------------\ 766 | | 767 | Env Functions | 768 | | 769 \------------------------------------------------------*/ 770 771 extern void vpnenv __P(()); 772 773 /*------------------------------------------------------\ 774 | | 775 | Alloc Functions | 776 | | 777 \------------------------------------------------------*/ 778 779 extern vpnfig_list *allocvpnfig __P(()); 780 extern vpnproc_list *allocvpnproc __P(()); 781 extern vpnfunc_list *allocvpnfunc __P(()); 782 extern vpnplace_list *allocvpnplace __P(()); 783 extern vpntrans_list *allocvpntrans __P(()); 784 extern vpnarc *allocvpnarc __P(()); 785 extern vpndecl_list *allocvpndecl __P(()); 786 extern vpnsym *allocvpnsym __P((unsigned int Width)); 787 extern vpnact_list *allocvpnact __P(()); 788 extern vpnattr_list *allocvpnattr __P(()); 789 extern vpnline_list *allocvpnline __P(()); 790 791 extern vpnmod_list *allocvpnmod __P(()); 792 extern vpnins_list *allocvpnins __P(()); 793 extern vpnport_list *allocvpnport __P(()); 794 extern vpnmap_list *allocvpnmap __P(()); 795 extern vpngen_list *allocvpngen __P(()); 796 797 /*------------------------------------------------------\ 798 | | 799 | Free Functions | 800 | | 801 \------------------------------------------------------*/ 802 803 extern void freevpnfig __P((vpnfig_list *Figure)); 804 extern void freevpnproc __P((vpnproc_list *Process)); 805 extern void freevpnfunc __P((vpnfunc_list *Function)); 806 extern void freevpnplace __P((vpnplace_list *Place)); 807 extern void freevpntrans __P((vpntrans_list *Trans)); 808 extern void freevpnarc __P((vpnarc *Arc)); 809 extern void freevpndecl __P((vpndecl_list *Decl)); 810 extern void freevpnsym __P((vpnsym *Sym)); 811 extern void freevpnact __P((vpnact_list *Act)); 812 extern void freevpnattr __P((vpnattr_list *Attr)); 813 extern void freevpnline __P((vpnline_list *Line)); 814 815 extern void freevpnmod __P((vpnmod_list *Model)); 816 extern void freevpnins __P((vpnins_list *Instance)); 817 extern void freevpnport __P((vpnport_list *Port)); 818 extern void freevpnmap __P((vpnmap_list *Map)); 819 extern void freevpngen __P((vpngen_list *Generic)); 820 821 /*------------------------------------------------------\ 822 | | 823 | Add Functions | 824 | | 825 \------------------------------------------------------*/ 826 827 extern vpnfig_list *addvpnfig __P((char *Name)); 828 extern vpnproc_list *addvpnproc __P((vpnfig_list *Figure, char *Name)); 829 extern vpnfunc_list *addvpnfunc __P((vpnfig_list *Figure, char *Name)); 830 extern vpnarc *addvpnarc __P((vpnfig_list *Figure, void *Source, void *Target, unsigned char ArcType)); 831 extern vpnact_list *addvpnact __P((vpnfig_list *Figure, vpntrans_list *Trans, vexexpr *Atom, vexexpr *Expr, unsigned char Type)); 832 extern vpnact_list *addvpnactasg __P((vpnfig_list *Figure, vpntrans_list *Trans, vexexpr *Atom, vexexpr *Expr)); 833 extern vpnact_list *addvpnactafter __P((vpnfig_list *Figure, vpntrans_list *Trans, vpnact_list *PrevAction, vexexpr *Atom, vexexpr *Expr, unsigned char Type)); 834 extern vpnact_list *addvpnactasgafter __P((vpnfig_list *Figure, vpntrans_list *Trans, vpnact_list *PrevAction, vexexpr *Atom, vexexpr *Expr)); 835 extern vpnact_list *addvpnactbefore __P((vpnfig_list *Figure, vpntrans_list *Trans, vpnact_list *NextAction, vexexpr *Atom, vexexpr *Expr, unsigned char Type)); 836 extern vpnact_list *addvpnactasgbefore __P((vpnfig_list *Figure, vpntrans_list *Trans, vpnact_list *NextAction, vexexpr *Atom, vexexpr *Expr)); 837 extern vpnact_list *addvpnactfirst __P((vpnfig_list *Figure, vpntrans_list *Trans, vexexpr *Atom, vexexpr *Expr, unsigned char Type)); 838 extern vpnact_list *addvpnactasgfirst __P((vpnfig_list *Figure, vpntrans_list *Trans, vexexpr *Atom, vexexpr *Expr)); 839 840 extern vpndecl_list *addvpndecl __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Type, unsigned char Base)); 841 extern vpndecl_list *addvpndeclport __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Base, unsigned char Dir, unsigned char Kind)); 842 extern vpndecl_list *addvpndeclsig __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Base, unsigned char Kind)); 843 extern vpndecl_list *addvpndeclcst __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Base)); 844 extern vpndecl_list *addvpndeclgen __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Base)); 845 extern vpndecl_list *addvpndeclvar __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Base)); 846 extern vpndecl_list *addvpndecldef __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Base)); 847 extern vpndecl_list *addvpndeclfuncvar __P((vpnfig_list *Figure, vpnfunc_list *Function, vexexpr *Atom, unsigned char Base)); 848 extern vpndecl_list *addvpndeclprocvar __P((vpnfig_list *Figure, vpnproc_list *Process, vexexpr *Atom, unsigned char Base)); 849 extern vpndecl_list *addvpndeclfuncdef __P((vpnfig_list *Figure, vpnfunc_list *Function, vexexpr *Atom, unsigned char Base)); 850 extern vpndecl_list *addvpndeclprocdef __P((vpnfig_list *Figure, vpnproc_list *Process, vexexpr *Atom, unsigned char Base)); 851 extern vpndecl_list *addvpndeclfuncarg __P((vpnfig_list *Figure, vpnfunc_list *Function, vexexpr *Atom, unsigned char Base, unsigned char Dir, unsigned char Class)); 852 853 extern vpnplace_list *addvpnprocplace __P((vpnfig_list *Figure, vpnproc_list *Process, char *Name)); 854 extern vpntrans_list *addvpnproctrans __P((vpnfig_list *Figure, vpnproc_list *Process, char *Name)); 855 856 extern vpnplace_list *addvpnfuncplace __P((vpnfig_list *Figure, vpnfunc_list *Function, char *Name)); 857 extern vpntrans_list *addvpnfunctrans __P((vpnfig_list *Figure, vpnfunc_list *Function, char *Name)); 858 859 extern vpnattr_list *addvpnattr __P((vpnfig_list *Figure, char *Name, char *Entity, unsigned char Type, char *Value )); 860 extern vpnline_list *addvpnline __P((vpnfig_list *Figure, vpnline_list **HeadLine, long Line)); 861 extern vpnline_list *addvpnfileline __P((vpnfig_list *Figure, vpnline_list **HeadLine, char *File, long Line)); 862 863 extern vpnmod_list *addvpnmod __P((vpnfig_list *Figure, char *Name)); 864 extern vpnport_list *addvpnmodport __P((vpnfig_list *Figure, vpnmod_list *Model, vexexpr *Atom, unsigned char Base, unsigned char Dir )); 865 extern vpngen_list *addvpnmodgen __P((vpnfig_list *Figure, vpnmod_list *Model, vexexpr *Atom, vexexpr *Expr, unsigned char Base )); 866 extern vpnins_list *addvpnins __P((vpnfig_list *Figure, char *Name, vpnmod_list *Model)); 867 extern vpnmap_list *addvpninsmap __P((vpnfig_list *Figure, vpnins_list *Instance, vexexpr *Formal, vexexpr *Actual )); 868 extern vpngen_list *addvpninsgen __P((vpnfig_list *Figure, vpnins_list *Instance, vexexpr *Atom, vexexpr *Expr)); 869 870 /*------------------------------------------------------\ 871 | | 872 | Union Functions | 873 | | 874 \------------------------------------------------------*/ 875 876 extern vpnline_list *unionvpnline __P((vpnfig_list *VpnFigure, vpnline_list **HeadLine, vpnline_list *SourceLine)); 877 extern vpnline_list *unionvpnfileline __P((vpnfig_list *VpnFigure, vpnline_list **HeadLine, vpnline_list *SourceLine)); 878 879 /*------------------------------------------------------\ 880 | | 881 | Simplify Functions | 882 | | 883 \------------------------------------------------------*/ 884 885 extern void simpvpnact __P((vpnact_list *VpnAct)); 886 extern void simpvpntrans __P((vpntrans_list *VpnTrans)); 887 extern void simpvpnproc __P((vpnproc_list *VpnProc)); 888 extern void simpvpnfunc __P((vpnfunc_list *VpnFunc)); 889 extern void simpvpnfig __P((vpnfig_list *VpnFigure)); 890 891 /*------------------------------------------------------\ 892 | | 893 | Get Functions | 894 | | 895 \------------------------------------------------------*/ 896 897 extern vpnsym *getvpnsymdecl __P((vpndecl_list *Declar, short Index)); 898 extern vpnsym *getvpnsymdeclpos __P((vpndecl_list *Declar, int Position)); 899 900 /*------------------------------------------------------\ 901 | | 902 | Search Functions | 903 | | 904 \------------------------------------------------------*/ 905 906 extern vpnfig_list *searchvpnfig __P((char *Name)); 907 extern vpnproc_list *searchvpnproc __P((vpnfig_list *Figure, char *Name)); 908 extern vpnfunc_list *searchvpnfunc __P((vpnfig_list *Figure, char *Name)); 909 extern vpnplace_list *searchvpnplace __P((vpnfig_list *Figure, char *Name)); 910 extern vpntrans_list *searchvpntrans __P((vpnfig_list *Figure, char *Name)); 911 extern vpnarc *searchvpnarc __P((vpnfig_list *Figure, void *Source, void *Target)); 912 extern vpnsym *searchvpnsym __P((vpnfig_list *Figure, char *Name, short Index, unsigned char Type)); 913 extern vpndecl_list *searchvpndecl __P((vpnfig_list *Figure, char *Name, unsigned char Type)); 914 915 extern vpnmod_list *searchvpnmod __P((vpnfig_list *Figure, char *Name)); 916 extern vpnins_list *searchvpnins __P((vpnfig_list *Figure, char *Name)); 917 918 /*------------------------------------------------------\ 919 | | 920 | Delete Functions | 921 | | 922 \------------------------------------------------------*/ 923 924 extern int delvpnfig __P((char *Name)); 925 extern int delvpnplace __P((vpnfig_list *Figure, vpnplace_list *Place)); 926 extern int delvpntrans __P((vpnfig_list *Figure, vpntrans_list *Trans)); 927 extern int delvpnarc __P((vpnfig_list *Figure, vpnarc *Arc)); 928 extern int delvpnact __P((vpnfig_list *Figure, vpntrans_list *Trans, vpnact_list *Action)); 929 extern int delvpnline __P((vpnfig_list *Figure, vpnline_list **PrevLine, vpnline_list *Line)); 930 extern int delvpnproc __P((vpnfig_list *Figure, vpnproc_list *Process)); 931 extern int delvpnfunc __P((vpnfig_list *Figure, vpnfunc_list *Function)); 932 933 /*------------------------------------------------------\ 934 | | 935 | View Functions | 936 | | 937 \------------------------------------------------------*/ 938 939 extern void viewvpnfig __P((vpnfig_list *Figure)); 940 extern void viewvpnsym __P((vpnsym *Symbol)); 941 extern void viewvpndecl __P((vpndecl_list *Decl)); 942 extern void viewvpnact __P((vpnact_list *Action)); 943 extern void viewvpnplace __P((vpnplace_list *Place)); 944 extern void viewvpntrans __P((vpntrans_list *Trans)); 945 extern void viewvpnproc __P((vpnproc_list *Process)); 946 extern void viewvpnfunc __P((vpnfunc_list *Function)); 947 extern void viewvpnline __P((vpnline_list *Line)); 948 949 extern void viewvpnins __P((vpnins_list *Instance)); 950 extern void viewvpnmod __P((vpnmod_list *Model)); 951 extern void viewvpnport __P((vpnport_list *Port)); 952 extern void viewvpnmap __P((vpnmap_list *Map)); 953 extern void viewvpngen __P((vpngen_list *Generic)); 954 955 # endif 956