This commit is contained in:
parent
87218a4bd2
commit
d67e14a5f7
|
@ -0,0 +1 @@
|
|||
SUBDIRS = src
|
|
@ -0,0 +1,45 @@
|
|||
dnl
|
||||
/*
|
||||
dnl This file is part of the Alliance CAD System
|
||||
dnl Copyright (C) Laboratoire LIP6 - Département ASIM
|
||||
dnl Universite Pierre et Marie Curie
|
||||
dnl
|
||||
dnl Home page : http://www-asim.lip6.fr/alliance/
|
||||
dnl E-mail support : mailto:alliance-support@asim.lip6.fr
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or modify it
|
||||
dnl under the terms of the GNU Library General Public License as published
|
||||
dnl by the Free Software Foundation; either version 2 of the License, or (at
|
||||
dnl your option) any later version.
|
||||
dnl
|
||||
dnl Alliance VLSI CAD System is distributed in the hope that it will be
|
||||
dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
dnl Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License along
|
||||
dnl with the GNU C Library; see the file COPYING. If not, write to the Free
|
||||
dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
dnl
|
||||
dnl Purpose : Auto stuffing Alliance
|
||||
dnl Almost ten years since I wrote this stuff, I just can't
|
||||
dnl believe it
|
||||
dnl Date : 01/02/2002
|
||||
dnl Author : Frederic Petrot <Frederic.Petrot@lip6.fr>
|
||||
dnl $Id: configure.in,v 1.1 2002/03/21 12:47:12 ludo Exp $
|
||||
dnl
|
||||
dnl
|
||||
AC_INIT(src/vbh.h)
|
||||
AM_INIT_AUTOMAKE(vbh, 1.4)
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CC
|
||||
AC_HEADER_STDC
|
||||
AC_C_CONST
|
||||
AC_PROG_RANLIB
|
||||
|
||||
AM_ALLIANCE
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
])
|
|
@ -0,0 +1,6 @@
|
|||
CFLAGS = @CFLAGS@ \
|
||||
-DALLIANCE_TOP=\"${ALLIANCE_TOP}\"
|
||||
lib_LIBRARIES = libVbh.a
|
||||
include_HEADERS = vbh.h
|
||||
libVbh_a_SOURCES = \
|
||||
vbh.h vbh_add.c vbh_crt.c vbh_dup.c vbh_fre.c vbh_simp.c vbh_view.c
|
|
@ -0,0 +1,537 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : vbh.h */
|
||||
/* date : Apr 13 1993 */
|
||||
/* version : 104 */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#ifndef VBH_DEFINE
|
||||
#define VBH_DEFINE
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* defines */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
#define VBH_BEIFS 0 /* if statement ptype code */
|
||||
#define VBH_BECAS 1 /* case statement ptype code */
|
||||
#define VBH_BEASG 2 /* assign statement ptype code */
|
||||
#define VBH_BEVAR 3 /* var assign statement ptype code */
|
||||
#define VBH_BEFOR 4 /* for statement ptype code */
|
||||
#define VBH_BENXT 5 /* next statement ptype code */
|
||||
#define VBH_BEEXT 6 /* exit statement ptype code */
|
||||
#define VBH_BEWAS 7 /* exit statement ptype code */
|
||||
#define VBH_BEWHI 8 /* while statement ptype code */
|
||||
#define VBH_BERET 9 /* return statement ptype code */
|
||||
#define VBH_BECAL 10 /* call statement ptype code */
|
||||
#define VBH_BELOP 11 /* loop statement ptype code */
|
||||
#define VBH_BEAGR 12 /* agregate statement ptype code */
|
||||
|
||||
# define VBH_TIME_UNIT_UNKNOWN 0
|
||||
# define VBH_TIME_UNIT_FS 1
|
||||
# define VBH_TIME_UNIT_PS 2
|
||||
# define VBH_TIME_UNIT_NS 3
|
||||
# define VBH_TIME_UNIT_MS 4
|
||||
# define VBH_MAX_TIME_UNIT 5
|
||||
|
||||
|
||||
#define VBH_ATTR_ENTITY 0
|
||||
#define VBH_ATTR_ARCHITECTURE 1
|
||||
#define VBH_ATTR_PACKAGE 2
|
||||
#define VBH_ATTR_FUNCTION 3
|
||||
#define VBH_ATTR_PROCEDURE 4
|
||||
#define VBH_ATTR_SUBTYPE 5
|
||||
#define VBH_ATTR_CONSTANT 6
|
||||
#define VBH_ATTR_VARIABLE 7
|
||||
#define VBH_ATTR_SIGNAL 8
|
||||
#define VBH_ATTR_LABEL 9
|
||||
#define VBH_ATTR_TYPE 10
|
||||
#define VBH_ATTR_CONFIGURATION 11
|
||||
#define VBH_ATTR_COMPONENT 12
|
||||
|
||||
# define VBH_TYPE_SEVERITY VEX_TYPE_SEVERITY
|
||||
# define VBH_TYPE_BOOLEAN VEX_TYPE_BOOLEAN
|
||||
# define VBH_TYPE_CHARACTER VEX_TYPE_CHARACTER
|
||||
# define VBH_TYPE_STRING VEX_TYPE_STRING
|
||||
# define VBH_TYPE_BIT VEX_TYPE_BIT
|
||||
# define VBH_TYPE_INTEGER VEX_TYPE_INTEGER
|
||||
# define VBH_TYPE_NATURAL VEX_TYPE_NATURAL
|
||||
# define VBH_TYPE_BIT_VECTOR VEX_TYPE_BIT_VECTOR
|
||||
# define VBH_TYPE_STD_ULOGIC VEX_TYPE_STD_ULOGIC
|
||||
# define VBH_TYPE_STD_LOGIC VEX_TYPE_STD_LOGIC
|
||||
# define VBH_TYPE_STD_ULOGIC_VECTOR VEX_TYPE_STD_ULOGIC_VECTOR
|
||||
# define VBH_TYPE_STD_LOGIC_VECTOR VEX_TYPE_STD_LOGIC_VECTOR
|
||||
# define VBH_TYPE_X01 VEX_TYPE_X01
|
||||
# define VBH_TYPE_X01Z VEX_TYPE_X01Z
|
||||
# define VBH_TYPE_UX01 VEX_TYPE_UX01
|
||||
# define VBH_TYPE_UX01Z VEX_TYPE_UX01Z
|
||||
# define VBH_TYPE_UNSIGNED VEX_TYPE_UNSIGNED
|
||||
# define VBH_TYPE_SIGNED VEX_TYPE_SIGNED
|
||||
# define VBH_TYPE_SMALL_INT VEX_TYPE_SMALL_INT
|
||||
# define VBH_TYPE_REG_BIT VEX_TYPE_REG_BIT
|
||||
# define VBH_TYPE_REG_VECTOR VEX_TYPE_REG_VECTOR
|
||||
# define VBH_TYPE_MUX_BIT VEX_TYPE_MUX_BIT
|
||||
# define VBH_TYPE_MUX_VECTOR VEX_TYPE_MUX_VECTOR
|
||||
# define VBH_TYPE_WOR_BIT VEX_TYPE_WOR_BIT
|
||||
# define VBH_TYPE_WOR_VECTOR VEX_TYPE_WOR_VECTOR
|
||||
# define VBH_MAX_TYPE VEX_TYPE_ENUMERATE
|
||||
|
||||
# define VBH_KIND_NONE 0
|
||||
# define VBH_KIND_BUS 1
|
||||
# define VBH_KIND_REGISTER 2
|
||||
# define VBH_MAX_KIND 3
|
||||
|
||||
# define VBH_CLASS_NONE 0
|
||||
# define VBH_CLASS_CONSTANT 1
|
||||
# define VBH_CLASS_VARIABLE 2
|
||||
# define VBH_CLASS_SIGNAL 3
|
||||
# define VBH_MAX_CLASS 4
|
||||
|
||||
# define VBH_PROCESS_SEQUENTIAL_MASK 0x01
|
||||
# define VBH_PROCESS_WITHSELECT_MASK 0x02
|
||||
# define VBH_PROCESS_GUARDED_MASK 0x04
|
||||
# define VBH_PROCESS_CONDITIONNAL_MASK 0x08
|
||||
|
||||
# define VBH_GENERATE_IF 0x00
|
||||
# define VBH_GENERATE_FOR 0x01
|
||||
|
||||
# define VBH_DYNAMIC_TO 0x1
|
||||
# define VBH_DYNAMIC_DOWNTO 0x2
|
||||
|
||||
# define IsVbhProcSequential( P ) ( (P)->TYPE & VBH_PROCESS_SEQUENTIAL_MASK )
|
||||
# define IsVbhProcWithSelect( P ) ( (P)->TYPE & VBH_PROCESS_WITHSELECT_MASK )
|
||||
# define IsVbhProcConditionnal( P ) ( (P)->TYPE & VBH_PROCESS_CONDITIONNAL_MASK )
|
||||
# define IsVbhProcGuarded( P ) ( (P)->TYPE & VBH_PROCESS_GUARDED_MASK )
|
||||
|
||||
# define SetVbhProcSequential( P ) ( (P)->TYPE |= VBH_PROCESS_SEQUENTIAL_MASK )
|
||||
# define SetVbhProcWithSelect( P ) ( (P)->TYPE |= VBH_PROCESS_WITHSELECT_MASK )
|
||||
# define SetVbhProcConditionnal( P ) ( (P)->TYPE |= VBH_PROCESS_CONDITIONNAL_MASK )
|
||||
# define SetVbhProcGuarded( P ) ( (P)->TYPE |= VBH_PROCESS_GUARDED_MASK )
|
||||
|
||||
# define ClearVbhProcSequential( P ) ( (P)->TYPE &= ~VBH_PROCESS_SEQUENTIAL_MASK )
|
||||
# define ClearVbhProcWithSelect( P ) ( (P)->TYPE &= ~VBH_PROCESS_WITHSELECT_MASK )
|
||||
# define ClearVbhProcConditionnal( P ) ( (P)->TYPE &= ~VBH_PROCESS_CONDITIONNAL_MASK )
|
||||
# define ClearVbhProcGuarded( P ) ( (P)->TYPE &= ~VBH_PROCESS_GUARDED_MASK )
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* structure definitions */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
typedef struct vbtyp /* type or subtype */
|
||||
{
|
||||
struct vbtyp *NEXT; /* next vbtyp */
|
||||
char *NAME; /* type's name */
|
||||
long LEFT; /* left bound */
|
||||
long RIGHT; /* right bound */
|
||||
char **VALUE; /* list of values */
|
||||
unsigned int SIZE; /* number of values */
|
||||
unsigned int BYTE; /* number of bytes needed to code values*/
|
||||
char CLASS; /* type's class (E, I, A, S) */
|
||||
unsigned char INDEX; /* the type id number */
|
||||
struct vbtyp *BASE; /* the base type or element's type */
|
||||
struct vbfun *RESOLV; /* resolution function */
|
||||
unsigned char DYNAMIC;
|
||||
vexexpr *DYNAMIC_LEFT;
|
||||
vexexpr *DYNAMIC_RIGHT;
|
||||
long FLAGS;
|
||||
long LINE;
|
||||
}
|
||||
vbtyp_list;
|
||||
|
||||
typedef struct vbfig /* behaviour figure */
|
||||
{
|
||||
struct vbfig *NEXT; /* next figure */
|
||||
char *NAME; /* model or package's name */
|
||||
struct vbaux *BEAUX; /* internal signals */
|
||||
struct vbcst *BECST; /* internal constants */
|
||||
struct vbpor *BEPOR; /* ports (reverse order of declaration) */
|
||||
struct vbgen *BEGEN; /* generics declarations */
|
||||
struct vbpcs *BEPCS; /* list of processes */
|
||||
struct vbfun *BEFUN; /* list of functions */
|
||||
struct vbtyp *BETYP; /* list of declared types */
|
||||
struct vbatr *BEATR; /* list of declared attributes */
|
||||
struct vbgnr *BEGNR; /* list of generates */
|
||||
authtable *HASH_TYPE; /* hash table for types */
|
||||
struct vbmod *BEMOD; /* list of declared model */
|
||||
struct vbins *BEINS; /* list of instance */
|
||||
struct ptype *USER; /* reserved for user's applications */
|
||||
chain_list *PACK_LIST; /* list of used packages */
|
||||
unsigned char PACKAGE; /* package figure ? */
|
||||
char FLAG; /* error flags */
|
||||
}
|
||||
vbfig_list;
|
||||
|
||||
typedef struct vbgnr /* generate statements */
|
||||
{
|
||||
struct vbgnr *NEXT; /* next figure */
|
||||
char *LABEL; /* generate's label */
|
||||
char TYPE; /* generate's type (FOR/IF) */
|
||||
|
||||
vexexpr *FOR_VARIABLE; /* for variable */
|
||||
vexexpr *FOR_LEFT; /* for left bound */
|
||||
vexexpr *FOR_RIGHT; /* for right bound */
|
||||
char FOR_UP; /* for to or downto */
|
||||
vexexpr *IF_COND; /* if condition */
|
||||
|
||||
struct vbpcs *BEPCS; /* list of processes */
|
||||
struct vbins *BEINS; /* list of instance */
|
||||
struct vbgnr *BEGNR; /* list of generates */
|
||||
long LINE;
|
||||
}
|
||||
vbgnr_list;
|
||||
|
||||
typedef struct vbmod
|
||||
{
|
||||
struct vbmod *NEXT;
|
||||
char *NAME; /* Name of the model */
|
||||
struct vbpor *BEPOR; /* Ports of the model */
|
||||
struct vbgen *BEGEN; /* Generic declarations */
|
||||
long LINE;
|
||||
}
|
||||
vbmod_list;
|
||||
|
||||
typedef struct vbins
|
||||
{
|
||||
struct vbins *NEXT;
|
||||
char *NAME; /* Name of instance */
|
||||
char *MODEL; /* Name of the model */
|
||||
struct vbmap *PORT_MAP; /* List of port association */
|
||||
struct vbmap *GEN_MAP; /* List of generics association */
|
||||
long LINE;
|
||||
}
|
||||
vbins_list;
|
||||
|
||||
typedef struct vbmap
|
||||
{
|
||||
struct vbmap *NEXT;
|
||||
vexexpr *FORMAL;
|
||||
vexexpr *ACTUAL;
|
||||
long LINE;
|
||||
}
|
||||
vbmap_list;
|
||||
|
||||
typedef struct vbgen /* generic */
|
||||
{
|
||||
struct vbgen *NEXT; /* next constant */
|
||||
vexexpr *TARGET; /* generic name */
|
||||
vexexpr *VEX; /* generic init (VEX) */
|
||||
vbtyp_list *TYPE; /* generic type */
|
||||
long LINE;
|
||||
}
|
||||
vbgen_list;
|
||||
|
||||
typedef struct vbatr
|
||||
{
|
||||
struct vbatr *NEXT;
|
||||
char *NAME;
|
||||
char *ENTITY;
|
||||
unsigned int TYPE;
|
||||
char *VALUE;
|
||||
long LINE;
|
||||
}
|
||||
vbatr_list;
|
||||
|
||||
typedef struct vbaux /* auxiliary signal */
|
||||
{
|
||||
struct vbaux *NEXT; /* next signal */
|
||||
vexexpr *TARGET; /* signal's name */
|
||||
vexexpr *VEX; /* signal's init (VEX) */
|
||||
unsigned char KIND; /* signal's kind */
|
||||
vbtyp_list *TYPE; /* signal's type */
|
||||
long LINE;
|
||||
}
|
||||
vbaux_list;
|
||||
|
||||
typedef struct vbcst /* constant */
|
||||
{
|
||||
struct vbcst *NEXT; /* next constant */
|
||||
vexexpr *TARGET; /* constant name */
|
||||
vexexpr *VEX; /* constant init (VEX) */
|
||||
vbtyp_list *TYPE; /* constant type */
|
||||
long LINE;
|
||||
}
|
||||
vbcst_list;
|
||||
|
||||
typedef struct vbpor /* port */
|
||||
{
|
||||
struct vbpor *NEXT; /* next port */
|
||||
vexexpr *TARGET; /* port's name */
|
||||
vexexpr *VEX; /* port's init (VEX) */
|
||||
unsigned char DIR; /* port's mode (same as LOCON) */
|
||||
unsigned char KIND; /* port's kind */
|
||||
vbtyp_list *TYPE; /* port's type (B, M or W) */
|
||||
long LINE;
|
||||
}
|
||||
vbpor_list;
|
||||
|
||||
typedef struct vbpcs /* process */
|
||||
{
|
||||
struct vbpcs *NEXT; /* next process */
|
||||
char *LABEL; /* process's label */
|
||||
struct chain *SENSITIVITY; /* list of sensitivity */
|
||||
struct ptype *VARIABLE; /* list of variable */
|
||||
struct ptype *INSTRUCTION; /* list of instructions */
|
||||
unsigned char TYPE; /* process type */
|
||||
long LINE;
|
||||
}
|
||||
vbpcs_list;
|
||||
|
||||
typedef struct vbifs /* if statement */
|
||||
{
|
||||
vexexpr *CND; /* condition (vex) */
|
||||
struct ptype *CNDTRUE; /* list of instructions when true */
|
||||
struct ptype *CNDFALSE; /* list of instructions when false */
|
||||
long LINE;
|
||||
}
|
||||
vbifs_list;
|
||||
|
||||
typedef struct vbasg /* signal assignment statement */
|
||||
{
|
||||
vexexpr *TARGET; /* target (vex) */
|
||||
vexexpr *VEX; /* condition (vex) */
|
||||
vbtyp_list *TYPE; /* signal's type */
|
||||
long LINE;
|
||||
}
|
||||
vbasg_list;
|
||||
|
||||
typedef struct vbagr
|
||||
{
|
||||
struct ptype *ASSIGN;
|
||||
long LINE;
|
||||
}
|
||||
vbagr_list;
|
||||
|
||||
typedef struct vbvar /* variable assignment statement */
|
||||
{
|
||||
vexexpr *TARGET; /* target's name */
|
||||
vexexpr *VEX; /* condition (vex) */
|
||||
vbtyp_list *TYPE; /* signal's type */
|
||||
long LINE;
|
||||
}
|
||||
vbvar_list;
|
||||
|
||||
typedef struct vbcas /* case statement */
|
||||
{
|
||||
vexexpr *VEX; /* list of expression (VEX) */
|
||||
struct vbcho *CHOICE; /* table of choices */
|
||||
vbtyp_list *TYPE; /* expression's type */
|
||||
unsigned int SIZE; /* size of choices' table */
|
||||
void *USER;
|
||||
long LINE;
|
||||
}
|
||||
vbcas_list;
|
||||
|
||||
typedef struct vbcho /* a choice in a case instruction */
|
||||
{
|
||||
chain_list *VALUES; /* the value's list of the choice */
|
||||
unsigned int SIZE; /* size of the value in byte */
|
||||
struct ptype *INSTRUCTION; /* list of instructions */
|
||||
long LINE;
|
||||
}
|
||||
vbcho_list;
|
||||
|
||||
typedef struct vbwhi /* a loop instruction */
|
||||
{
|
||||
char *LABEL; /* the name of the loop */
|
||||
vexexpr *CND; /* condition clause */
|
||||
struct ptype *INSTRUCTION; /* list of instructions */
|
||||
long LINE;
|
||||
}
|
||||
vbwhi_list;
|
||||
|
||||
typedef struct vblop /* a loop instruction */
|
||||
{
|
||||
char *LABEL; /* the name of the loop */
|
||||
struct ptype *INSTRUCTION; /* list of instructions */
|
||||
long LINE;
|
||||
}
|
||||
vblop_list;
|
||||
|
||||
typedef struct vbfor /* a loop instruction */
|
||||
{
|
||||
char *LABEL; /* the name of the loop */
|
||||
vexexpr *VARIABLE; /* the name of the variable */
|
||||
vexexpr *LEFT;
|
||||
vexexpr *RIGHT;
|
||||
char UP; /* to or downto */
|
||||
struct ptype *INSTRUCTION; /* list of instructions */
|
||||
long LINE;
|
||||
}
|
||||
vbfor_list;
|
||||
|
||||
typedef struct vbwas /* sequential wait statement */
|
||||
{
|
||||
struct chain *SEN; /* senisitvity list */
|
||||
vexexpr *CND; /* condition clause */
|
||||
unsigned char TIME_UNIT; /* name of the time unit */
|
||||
vexexpr *TIMEOUT; /* timeout clause */
|
||||
long LINE;
|
||||
}
|
||||
vbwas_list;
|
||||
|
||||
typedef struct vbext /* exit statement */
|
||||
{
|
||||
char *LABEL; /* label of the targeted loop */
|
||||
vexexpr *CND; /* condition (vex) */
|
||||
long LINE;
|
||||
}
|
||||
vbext_list;
|
||||
|
||||
typedef struct vbnxt /* next statement */
|
||||
{
|
||||
char *LABEL; /* label of the targeted loop */
|
||||
vexexpr *CND; /* condition (vex) */
|
||||
long LINE;
|
||||
}
|
||||
vbnxt_list;
|
||||
|
||||
typedef struct vbret /* return statement */
|
||||
{
|
||||
vexexpr *RET; /* expression (vex) */
|
||||
long LINE;
|
||||
}
|
||||
vbret_list;
|
||||
|
||||
typedef struct vbcal /* call statement */
|
||||
{
|
||||
vexexpr *CALL; /* procedure call (vex) */
|
||||
long LINE;
|
||||
}
|
||||
vbcal_list;
|
||||
|
||||
typedef struct vbarg
|
||||
{
|
||||
struct vbarg *NEXT; /* next param */
|
||||
vexexpr *TARGET; /* param's name */
|
||||
char DIR; /* param's mode (same as LOCON) */
|
||||
char CLASS; /* param's class C,V,S */
|
||||
vbtyp_list *TYPE; /* param's type (B, M or W) */
|
||||
long LINE;
|
||||
}
|
||||
vbarg_list;
|
||||
|
||||
typedef struct vbfun /* function statement */
|
||||
{
|
||||
struct vbfun *NEXT; /* next process */
|
||||
char *NAME; /* function's name */
|
||||
struct vbarg *ARGUMENT; /* list of arguments */
|
||||
struct vbarg *RETURN; /* return value */
|
||||
struct ptype *VARIABLE; /* list of variable */
|
||||
struct ptype *INSTRUCTION; /* list of instructions */
|
||||
unsigned char TYPE; /* function type */
|
||||
long LINE;
|
||||
}
|
||||
vbfun_list;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* low-level functions */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
extern struct vbaux *vbh_addvbaux ();
|
||||
extern struct vbatr *vbh_addvbatr ();
|
||||
extern struct vbcst *vbh_addvbcst ();
|
||||
extern struct vbgen *vbh_addvbgen ();
|
||||
extern struct vbfig *vbh_addvbfig ();
|
||||
extern struct vbpor *vbh_addvbpor ();
|
||||
extern struct ptype *vbh_addvbifs ();
|
||||
extern struct ptype *vbh_addvbasg ();
|
||||
extern struct ptype *vbh_addvbcas ();
|
||||
extern struct ptype *vbh_addvbfor ();
|
||||
extern struct ptype *vbh_addvbwhi ();
|
||||
extern struct ptype *vbh_addvblop ();
|
||||
extern struct vbpcs *vbh_addvbpcs ();
|
||||
extern struct vbarg *vbh_addvbarg ();
|
||||
extern ptype_list *vbh_addvbagr ();
|
||||
extern struct vbfun *vbh_addvbfun ();
|
||||
extern struct vbnxt *vbh_addvbnxt ();
|
||||
extern struct vbret *vbh_addvbret ();
|
||||
extern struct vbcal *vbh_addvbcal ();
|
||||
extern struct vbext *vbh_addvbext ();
|
||||
extern struct vbwas *vbh_addvbwas ();
|
||||
extern ptype_list *vbh_addvbvar ();
|
||||
extern struct vbtyp *vbh_addvbtyp ();
|
||||
extern struct vbmap *vbh_addvbmap ();
|
||||
extern struct vbmod *vbh_addvbmod ();
|
||||
extern struct vbins *vbh_addvbins ();
|
||||
extern struct vbgnr *vbh_addvbgnr ();
|
||||
|
||||
extern struct vbtyp *vbh_crtvbtyp ();
|
||||
|
||||
extern void vbh_delvbfig ();
|
||||
extern void vbh_frevbfig ();
|
||||
extern void vbh_frevbaux ();
|
||||
extern void vbh_frevbatr ();
|
||||
extern void vbh_frevbcst ();
|
||||
extern void vbh_frevbgen ();
|
||||
extern void vbh_frevbpor ();
|
||||
extern void vbh_frevbpcs ();
|
||||
extern void vbh_frevbarg ();
|
||||
extern void vbh_frevbfun ();
|
||||
extern void vbh_frevbifs ();
|
||||
extern void vbh_frevbasg ();
|
||||
extern void vbh_frevbcas ();
|
||||
extern void vbh_frevbwhi ();
|
||||
extern void vbh_frevblop ();
|
||||
extern void vbh_frevbfor ();
|
||||
extern void vbh_frevbpcs ();
|
||||
extern void vbh_frevbnxt ();
|
||||
extern void vbh_frevbret ();
|
||||
extern void vbh_frevbcal ();
|
||||
extern void vbh_frevbext ();
|
||||
extern void vbh_frevbwas ();
|
||||
extern void vbh_frevbvar ();
|
||||
extern void vbh_frevbagr ();
|
||||
extern void vbh_frevbtyp ();
|
||||
extern void vbh_frevbinst ();
|
||||
extern void vbh_frevbmod ();
|
||||
extern void vbh_frevbins ();
|
||||
extern void vbh_frevbmap ();
|
||||
extern void vbh_frevbgnr ();
|
||||
|
||||
extern void vbh_viewvbfig();
|
||||
extern void vbh_viewvbtyp();
|
||||
extern void vbh_viewvbinst();
|
||||
|
||||
extern void vbh_simpvbfig();
|
||||
extern void vbh_forallvexvbfig();
|
||||
extern void vbh_simpvbinst();
|
||||
|
||||
extern vbtyp_list *vbh_prdeftyp();
|
||||
extern vbtyp_list *vbh_getvbtyp();
|
||||
extern vbtyp_list *vbh_getvbtypbyindex();
|
||||
|
||||
extern void vbh_dupvbfig();
|
||||
extern ptype_list *vbh_dupvbinst();
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* parser-driver functions */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
#endif
|
|
@ -0,0 +1,948 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : vbh_addvbasg.c */
|
||||
/* date : Aug 28 1992 */
|
||||
/* version : v102 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : contains a specific function used to create a */
|
||||
/* behaviour data structure */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#include "mut.h"
|
||||
#include "aut.h"
|
||||
#include "vex.h"
|
||||
#include "vbh.h"
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbmod */
|
||||
/* description : create a VBMOD structure at the top the list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbmod *vbh_addvbmod (lastvbmod, name, line)
|
||||
|
||||
struct vbmod *lastvbmod;
|
||||
char *name;
|
||||
long line;
|
||||
{
|
||||
struct vbmod *ptmod;
|
||||
|
||||
ptmod = (struct vbmod *) autallocheap (sizeof(struct vbmod));
|
||||
ptmod->NAME = namealloc( name );;
|
||||
ptmod->LINE = line;
|
||||
ptmod->NEXT = lastvbmod;
|
||||
|
||||
return (ptmod);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbins */
|
||||
/* description : create a VBINS structure at the top the list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbins *vbh_addvbins (lastvbins, name, model, line)
|
||||
|
||||
struct vbins *lastvbins;
|
||||
char *name;
|
||||
char *model;
|
||||
long line;
|
||||
{
|
||||
struct vbins *ptins;
|
||||
|
||||
ptins = (struct vbins *) autallocheap (sizeof(struct vbins));
|
||||
ptins->NAME = namealloc( name );;
|
||||
ptins->MODEL = namealloc( model );;
|
||||
ptins->LINE = line;
|
||||
ptins->NEXT = lastvbins;
|
||||
|
||||
return (ptins);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbgnr */
|
||||
/* description : create a VBGNR structure at the top the list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbgnr *vbh_addvbgnr (lastvbgnr, label, line)
|
||||
|
||||
struct vbgnr *lastvbgnr;
|
||||
char *label;
|
||||
long line;
|
||||
{
|
||||
struct vbgnr *ptgnr;
|
||||
|
||||
ptgnr = (struct vbgnr *) autallocheap (sizeof(struct vbgnr));
|
||||
ptgnr->LABEL = namealloc( label );;
|
||||
ptgnr->LINE = line;
|
||||
ptgnr->NEXT = lastvbgnr;
|
||||
|
||||
return (ptgnr);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbmap */
|
||||
/* description : create a VBMAP structure at the top the list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbmap *vbh_addvbmap (lastvbmap, formal, actual, line)
|
||||
|
||||
struct vbmap *lastvbmap;
|
||||
vexexpr *formal;
|
||||
vexexpr *actual;
|
||||
long line;
|
||||
{
|
||||
struct vbmap *ptmap;
|
||||
|
||||
ptmap = (struct vbmap *) autallocheap (sizeof(struct vbmap));
|
||||
ptmap->FORMAL = formal;
|
||||
ptmap->ACTUAL = actual;
|
||||
ptmap->LINE = line;
|
||||
ptmap->NEXT = lastvbmap;
|
||||
|
||||
return (ptmap);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbagr */
|
||||
/* description : create a VBAGR structure at the top the list */
|
||||
/* called func. : addptype, autallocheap, namealloc */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct ptype *vbh_addvbagr (lastptype, assign_lst, line)
|
||||
|
||||
struct ptype *lastptype; /* pointer on the last ptype structure */
|
||||
struct ptype *assign_lst;
|
||||
long line;
|
||||
|
||||
{
|
||||
struct ptype *ptptype;
|
||||
struct vbagr *ptvbagr;
|
||||
|
||||
ptvbagr = (struct vbagr *) autallocheap (sizeof(struct vbagr));
|
||||
ptvbagr->ASSIGN = assign_lst;
|
||||
ptvbagr->LINE = line;
|
||||
|
||||
ptptype = addptype (lastptype, VBH_BEAGR, (void *)ptvbagr);
|
||||
|
||||
return (ptptype);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbasg */
|
||||
/* description : create a VBASG structure at the top the list */
|
||||
/* called func. : addptype, autallocheap, namealloc */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct ptype *vbh_addvbasg (lastptype, target, vex, type, line)
|
||||
|
||||
struct ptype *lastptype; /* pointer on the last ptype structure */
|
||||
vexexpr *target; /* signal's name */
|
||||
vexexpr *vex; /* condition's expression */
|
||||
vbtyp_list *type; /* signal's type (cannot be 0) */
|
||||
long line;
|
||||
|
||||
{
|
||||
struct ptype *ptptype;
|
||||
struct vbasg *ptvbasg;
|
||||
|
||||
ptvbasg = (struct vbasg *) autallocheap (sizeof(struct vbasg));
|
||||
ptvbasg->TARGET = target;
|
||||
ptvbasg->VEX = vex;
|
||||
ptvbasg->TYPE = type;
|
||||
ptvbasg->LINE = line;
|
||||
|
||||
ptptype = addptype (lastptype, VBH_BEASG, (void *)ptvbasg);
|
||||
|
||||
return (ptptype);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbcst */
|
||||
/* description : create a VBCST structure at the top the list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbcst *vbh_addvbcst (lastvbcst, target, vex_expr, type,line)
|
||||
|
||||
struct vbcst *lastvbcst; /* pointer on the last vbaux structure */
|
||||
vexexpr *target; /* constant name */
|
||||
vexexpr *vex_expr; /* constant expression (ABL) */
|
||||
vbtyp_list *type; /* constant type */
|
||||
long line;
|
||||
|
||||
{
|
||||
struct vbcst *ptcst;
|
||||
|
||||
ptcst = (struct vbcst *) autallocheap (sizeof(struct vbcst));
|
||||
ptcst->TARGET = target;
|
||||
ptcst->VEX = vex_expr;
|
||||
ptcst->TYPE = type;
|
||||
ptcst->LINE = line;
|
||||
ptcst->NEXT = lastvbcst;
|
||||
|
||||
return (ptcst);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbgen */
|
||||
/* description : create a VBGEN structure at the top the list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbgen *vbh_addvbgen (lastvbgen, target, vex_expr, type,line)
|
||||
|
||||
struct vbgen *lastvbgen; /* pointer on the last vbaux structure */
|
||||
vexexpr *target; /* generic name */
|
||||
vexexpr *vex_expr; /* generic expression (ABL) */
|
||||
vbtyp_list *type; /* generic type */
|
||||
long line;
|
||||
|
||||
{
|
||||
struct vbgen *ptgen;
|
||||
|
||||
ptgen = (struct vbgen *) autallocheap (sizeof(struct vbgen));
|
||||
ptgen->TARGET = target;
|
||||
ptgen->VEX = vex_expr;
|
||||
ptgen->TYPE = type;
|
||||
ptgen->LINE = line;
|
||||
ptgen->NEXT = lastvbgen;
|
||||
|
||||
return (ptgen);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbatr */
|
||||
/* description : create a VBATR structure at the top the list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbatr *vbh_addvbatr (lastvbatr, name, entity, type, value, line )
|
||||
|
||||
struct vbatr *lastvbatr; /* pointer on the last vbatr structure */
|
||||
char *name;
|
||||
char *entity;
|
||||
int type;
|
||||
char *value;
|
||||
long line;
|
||||
{
|
||||
struct vbatr *ptatr;
|
||||
|
||||
ptatr = (struct vbatr *) autallocheap (sizeof(struct vbatr));
|
||||
ptatr->NAME = name;
|
||||
ptatr->ENTITY = entity;
|
||||
ptatr->TYPE = type;
|
||||
ptatr->VALUE = value;
|
||||
ptatr->LINE = line;
|
||||
ptatr->NEXT = lastvbatr;
|
||||
|
||||
return (ptatr);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbaux */
|
||||
/* description : create a VBAUX structure at the top the list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbaux *vbh_addvbaux (lastvbaux, target, vex_expr, kind, type,line)
|
||||
|
||||
struct vbaux *lastvbaux; /* pointer on the last vbaux structure */
|
||||
vexexpr *target; /* signal's name */
|
||||
vexexpr *vex_expr; /* signal's expression (ABL) */
|
||||
unsigned char kind; /* signal's kind BUS */
|
||||
vbtyp_list *type; /* signal's type */
|
||||
long line;
|
||||
|
||||
{
|
||||
struct vbaux *ptaux;
|
||||
|
||||
ptaux = (struct vbaux *) autallocheap (sizeof(struct vbaux));
|
||||
ptaux->TARGET = target;
|
||||
ptaux->VEX = vex_expr;
|
||||
ptaux->KIND = kind;
|
||||
ptaux->TYPE = type;
|
||||
ptaux->LINE = line;
|
||||
ptaux->NEXT = lastvbaux;
|
||||
|
||||
return (ptaux);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbcas */
|
||||
/* description : create a VBCAS structure at the top the list */
|
||||
/* called func. : addptype, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct ptype *vbh_addvbcas (lastptype, Vex,type,line)
|
||||
|
||||
struct ptype *lastptype; /* pointer on the last ptype structure */
|
||||
vexexpr *Vex; /* condition's expression */
|
||||
vbtyp_list *type; /* expression's type i */
|
||||
long line;
|
||||
{
|
||||
struct ptype *ptptype;
|
||||
struct vbcas *ptvbcas;
|
||||
|
||||
ptvbcas = (struct vbcas *) autallocheap (sizeof(struct vbcas));
|
||||
ptvbcas->VEX = Vex;
|
||||
ptvbcas->TYPE = type;
|
||||
ptvbcas->LINE = line;
|
||||
|
||||
ptptype = addptype (lastptype, VBH_BECAS, (void *)ptvbcas);
|
||||
|
||||
return (ptptype);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbext */
|
||||
/* description : create a VBEXT (sequential exit statement) */
|
||||
/* called func. : autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbext *vbh_addvbext (loop_label, cnd,line)
|
||||
|
||||
char *loop_label; /* loop label name */
|
||||
vexexpr *cnd; /* condition clause */
|
||||
long line;
|
||||
{
|
||||
struct vbext *ptext;
|
||||
|
||||
ptext = (struct vbext *) autallocheap (sizeof(struct vbext));
|
||||
|
||||
ptext->LABEL = loop_label;
|
||||
ptext->CND = cnd;
|
||||
ptext->LINE = line;
|
||||
|
||||
return (ptext);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbfig */
|
||||
/* description : create an empty BEFIG structure at the top of the list*/
|
||||
/* The VBH_HEDFIG list is not modified. */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbfig *vbh_addvbfig (lastvbfig, name)
|
||||
|
||||
struct vbfig *lastvbfig; /* pointer on the last vbfig structure */
|
||||
char *name; /* figure's name */
|
||||
|
||||
{
|
||||
struct vbfig *ptfig;
|
||||
|
||||
name = namealloc (name);
|
||||
|
||||
ptfig = (struct vbfig *) autallocblock (sizeof(struct vbfig));
|
||||
ptfig->NAME = name;
|
||||
ptfig->HASH_TYPE = createauthtable( 50 );
|
||||
ptfig->NEXT = lastvbfig;
|
||||
|
||||
vbh_prdeftyp( ptfig );
|
||||
|
||||
return (ptfig);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbifs */
|
||||
/* description : create a VBIFS structure at the top the list */
|
||||
/* called func. : addptype, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct ptype *vbh_addvbifs (lastptype, vex,line)
|
||||
|
||||
struct ptype *lastptype; /* pointer on the last ptype structure */
|
||||
vexexpr *vex; /* condition's expression */
|
||||
long line;
|
||||
{
|
||||
struct ptype *ptptype;
|
||||
struct vbifs *ptvbifs;
|
||||
|
||||
ptvbifs = (struct vbifs *) autallocheap (sizeof(struct vbifs));
|
||||
ptvbifs->CND = vex;
|
||||
ptvbifs->LINE = line;
|
||||
ptptype = addptype (lastptype, VBH_BEIFS, (void *)ptvbifs);
|
||||
|
||||
return (ptptype);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbfor */
|
||||
/* description : create a VBLOP structure at the top the list */
|
||||
/* called func. : addptype, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct ptype *vbh_addvbfor (lastptype,name,variable,left,right,up,line)
|
||||
|
||||
struct ptype *lastptype; /* pointer on the last object */
|
||||
char *name; /* name of loop */
|
||||
vexexpr *variable; /* name of variable */
|
||||
vexexpr *left; /* low of for */
|
||||
vexexpr *right; /* up of for */
|
||||
unsigned char up;
|
||||
long line;
|
||||
{
|
||||
|
||||
struct ptype *ptptype;
|
||||
struct vbfor *ptvblop;
|
||||
|
||||
ptvblop = (struct vbfor *) autallocheap (sizeof(struct vbfor));
|
||||
ptvblop->LABEL = namealloc(name);
|
||||
ptvblop->VARIABLE = variable;
|
||||
ptvblop->LEFT = left;
|
||||
ptvblop->RIGHT = right;
|
||||
ptvblop->UP = up;
|
||||
ptvblop->LINE = line;
|
||||
|
||||
ptptype =addptype(lastptype,VBH_BEFOR,(void *)ptvblop);
|
||||
|
||||
return (ptptype);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvblop */
|
||||
/* description : create a VBLOP structure at the top the list */
|
||||
/* called func. : addptype, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct ptype *vbh_addvblop (lastptype,name,line)
|
||||
|
||||
struct ptype *lastptype; /* pointer on the last object */
|
||||
char *name; /* name of loop */
|
||||
long line;
|
||||
{
|
||||
|
||||
struct ptype *ptptype;
|
||||
struct vblop *ptvblop;
|
||||
|
||||
ptvblop = (struct vblop *) autallocheap (sizeof(struct vblop));
|
||||
ptvblop->LABEL = namealloc(name);
|
||||
ptvblop->LINE = line;
|
||||
|
||||
ptptype =addptype(lastptype,VBH_BELOP,(void *)ptvblop);
|
||||
|
||||
return (ptptype);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbwhi */
|
||||
/* description : create a VBLOP structure at the top the list */
|
||||
/* called func. : addptype, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct ptype *vbh_addvbwhi (lastptype,name,cnd,line)
|
||||
|
||||
struct ptype *lastptype; /* pointer on the last object */
|
||||
char *name; /* name of loop */
|
||||
vexexpr *cnd;
|
||||
long line;
|
||||
{
|
||||
|
||||
struct ptype *ptptype;
|
||||
struct vbwhi *ptvblop;
|
||||
|
||||
ptvblop = (struct vbwhi *) autallocheap (sizeof(struct vbwhi));
|
||||
ptvblop->LABEL = namealloc(name);
|
||||
ptvblop->CND = cnd;
|
||||
ptvblop->LINE = line;
|
||||
|
||||
ptptype =addptype(lastptype,VBH_BEWHI,(void *)ptvblop);
|
||||
|
||||
return (ptptype);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbret */
|
||||
/* description : create a VBRET (sequential return statement) */
|
||||
/* called func. : autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbret *vbh_addvbret (ret_value,line)
|
||||
|
||||
vexexpr *ret_value; /* return value */
|
||||
long line;
|
||||
{
|
||||
struct vbret *ptret;
|
||||
|
||||
ptret = (struct vbret *) autallocheap (sizeof(struct vbret));
|
||||
|
||||
ptret->RET = ret_value;
|
||||
ptret->LINE = line;
|
||||
|
||||
return (ptret);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbcal */
|
||||
/* description : create a VBRET (sequential call statement) */
|
||||
/* called func. : autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbcal *vbh_addvbcal (cal_vex,line)
|
||||
|
||||
vexexpr *cal_vex; /* call */
|
||||
long line;
|
||||
{
|
||||
struct vbcal *ptcal;
|
||||
|
||||
ptcal = (struct vbcal *) autallocheap (sizeof(struct vbcal));
|
||||
|
||||
ptcal->CALL = cal_vex;
|
||||
ptcal->LINE = line;
|
||||
|
||||
return (ptcal);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbnxt */
|
||||
/* description : create a VBNXT (sequential next statement) */
|
||||
/* called func. : autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbnxt *vbh_addvbnxt (loop_label, cnd,line)
|
||||
|
||||
char *loop_label; /* loop label name */
|
||||
vexexpr *cnd; /* condition clause */
|
||||
long line;
|
||||
{
|
||||
struct vbnxt *ptnxt;
|
||||
|
||||
ptnxt = (struct vbnxt *) autallocheap (sizeof(struct vbnxt));
|
||||
|
||||
ptnxt->LABEL = loop_label;
|
||||
ptnxt->CND = cnd;
|
||||
ptnxt->LINE = line;
|
||||
|
||||
return (ptnxt);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbpcs */
|
||||
/* description : create a VBPCS structure at the top the list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbpcs *vbh_addvbpcs (lastvbpcs, label, sens, inst, line )
|
||||
|
||||
struct vbpcs *lastvbpcs; /* pointer on the last vbpcs structure */
|
||||
char *label; /* process's label */
|
||||
struct chain *sens; /* sensitivity list */
|
||||
struct ptype *inst; /* list of instructions */
|
||||
long line;
|
||||
{
|
||||
struct vbpcs *ptvbpcs;
|
||||
|
||||
label = namealloc (label);
|
||||
|
||||
ptvbpcs = (struct vbpcs *) autallocheap (sizeof(struct vbpcs));
|
||||
ptvbpcs->LABEL = label;
|
||||
ptvbpcs->SENSITIVITY = sens;
|
||||
ptvbpcs->INSTRUCTION = inst;
|
||||
ptvbpcs->LINE = line;
|
||||
|
||||
ptvbpcs->NEXT = lastvbpcs;
|
||||
|
||||
return (ptvbpcs);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbfun */
|
||||
/* description : create a VBFUN structure at the top the list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbfun *vbh_addvbfun (lastvbfun, name, ret_param, lst_param, inst, line )
|
||||
|
||||
struct vbfun *lastvbfun; /* pointer on the last vbfun structure */
|
||||
char *name;
|
||||
struct vbarg *ret_param;
|
||||
struct vbarg *lst_param;
|
||||
struct ptype *inst;
|
||||
long line;
|
||||
{
|
||||
struct vbfun *ptvbfun;
|
||||
|
||||
name = namealloc(name);
|
||||
|
||||
ptvbfun = (struct vbfun *) autallocheap (sizeof(struct vbfun));
|
||||
ptvbfun->NAME = name;
|
||||
ptvbfun->RETURN = ret_param;
|
||||
ptvbfun->ARGUMENT = lst_param;
|
||||
ptvbfun->INSTRUCTION = inst;
|
||||
ptvbfun->LINE = line;
|
||||
|
||||
ptvbfun->NEXT = lastvbfun;
|
||||
|
||||
return(ptvbfun);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbarg */
|
||||
/* description : create a VBPAR structure at the top the list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbarg *vbh_addvbarg (lastvbarg, target, dir, class, type,line)
|
||||
|
||||
struct vbarg *lastvbarg; /* pointer on the last vbarg structure */
|
||||
vexexpr *target; /* signal's name */
|
||||
char dir; /* signal's mode (I, O, B, Z, or T) */
|
||||
char class; /* signal's class (C, V, S) */
|
||||
vbtyp_list *type; /* signal's type */
|
||||
long line;
|
||||
{
|
||||
struct vbarg *ptvbarg;
|
||||
|
||||
ptvbarg = (struct vbarg *) autallocheap (sizeof(struct vbarg));
|
||||
ptvbarg->TARGET = target;
|
||||
ptvbarg->DIR = dir;
|
||||
ptvbarg->CLASS = class;
|
||||
ptvbarg->TYPE = type;
|
||||
ptvbarg->LINE = line;
|
||||
ptvbarg->NEXT = lastvbarg;
|
||||
|
||||
return (ptvbarg);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbpor */
|
||||
/* description : create a VBPOR structure at the top the list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbpor *vbh_addvbpor (lastvbpor, target, vex, dir, kind, type,line)
|
||||
|
||||
struct vbpor *lastvbpor; /* pointer on the last vbpor structure */
|
||||
vexexpr *target; /* signal's name */
|
||||
vexexpr *vex; /* signal's init */
|
||||
unsigned char dir; /* signal's dir (I, O, B, Z, or T) */
|
||||
unsigned char kind; /* signal's kind BUS */
|
||||
vbtyp_list *type; /* signal's type */
|
||||
long line;
|
||||
|
||||
{
|
||||
struct vbpor *ptvbpor;
|
||||
|
||||
ptvbpor = (struct vbpor *) autallocheap (sizeof(struct vbpor));
|
||||
ptvbpor->TARGET = target;
|
||||
ptvbpor->VEX = vex;
|
||||
ptvbpor->DIR = dir;
|
||||
ptvbpor->KIND = kind;
|
||||
ptvbpor->TYPE = type;
|
||||
ptvbpor->LINE = line;
|
||||
ptvbpor->NEXT = lastvbpor;
|
||||
|
||||
return (ptvbpor);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbtyp */
|
||||
/* description : add an BETYP structure at the top of a list */
|
||||
/* called func. : namealloc, autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbtyp *vbh_addvbtyp ( Figure, name , left , right , value ,
|
||||
size , byte , base , typeid, resolv, class,line)
|
||||
|
||||
vbfig_list *Figure;
|
||||
char *name; /* type's name */
|
||||
long left; /* left bound */
|
||||
long right; /* right bound */
|
||||
char **value; /* list of values */
|
||||
unsigned int size; /* number of values */
|
||||
unsigned int byte; /* number of bytes needed to code values*/
|
||||
vbtyp_list *base; /* the base type or element's type */
|
||||
unsigned char typeid; /* the type of the index for an array */
|
||||
vbfun_list *resolv; /* index of resolution function */
|
||||
char class; /* type's class (E, I, A, S) */
|
||||
long line;
|
||||
{
|
||||
struct vbtyp *ptvbtyp;
|
||||
|
||||
name = namealloc (name);
|
||||
|
||||
ptvbtyp = (struct vbtyp *) autallocheap (sizeof(struct vbtyp));
|
||||
|
||||
ptvbtyp->CLASS = class;
|
||||
ptvbtyp->NAME = name;
|
||||
ptvbtyp->LEFT = left;
|
||||
ptvbtyp->RIGHT = right;
|
||||
ptvbtyp->VALUE = value;
|
||||
ptvbtyp->SIZE = size;
|
||||
ptvbtyp->BYTE = byte;
|
||||
ptvbtyp->BASE = base;
|
||||
ptvbtyp->INDEX = typeid;
|
||||
ptvbtyp->RESOLV = resolv;
|
||||
|
||||
ptvbtyp->NEXT = Figure->BETYP;;
|
||||
ptvbtyp->LINE = line;
|
||||
Figure->BETYP = ptvbtyp;
|
||||
|
||||
addauthelem( Figure->HASH_TYPE, name, (long)ptvbtyp );
|
||||
|
||||
return (ptvbtyp);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbvar */
|
||||
/* description : create a VBVAR structure at the top the list */
|
||||
/* called func. : addptype, autallocheap, namealloc */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct ptype *vbh_addvbvar (lastptype, target, vex, type,line)
|
||||
|
||||
struct ptype *lastptype; /* pointer on the last ptype structure */
|
||||
vexexpr *target; /* signal's name */
|
||||
vexexpr *vex; /* condition's expression */
|
||||
vbtyp_list *type; /* signal's type (cannot be 0) */
|
||||
long line;
|
||||
{
|
||||
struct ptype *ptptype;
|
||||
struct vbvar *ptvbvar;
|
||||
|
||||
ptvbvar = (struct vbvar *) autallocheap (sizeof(struct vbvar));
|
||||
ptvbvar->TARGET = target;
|
||||
ptvbvar->VEX = vex;
|
||||
ptvbvar->TYPE = type;
|
||||
ptvbvar->LINE = line;
|
||||
|
||||
ptptype = addptype (lastptype, VBH_BEVAR, (void *)ptvbvar);
|
||||
|
||||
return (ptptype);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_addvbwas */
|
||||
/* description : create a VBWAS (sequential wait statement) */
|
||||
/* called func. : autallocheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbwas *vbh_addvbwas (sen, cnd,timeunit, timeout,line)
|
||||
|
||||
struct chain *sen; /* senisitvity list */
|
||||
vexexpr *cnd; /* condition clause */
|
||||
unsigned char timeunit; /* timeout clause */
|
||||
vexexpr *timeout; /* timeout clause */
|
||||
long line;
|
||||
{
|
||||
struct vbwas *ptwas;
|
||||
|
||||
ptwas = (struct vbwas *) autallocheap (sizeof(struct vbwas));
|
||||
ptwas->SEN = sen;
|
||||
ptwas->CND = cnd;
|
||||
ptwas->TIME_UNIT = timeunit;
|
||||
ptwas->TIMEOUT = timeout;
|
||||
ptwas->LINE = line;
|
||||
|
||||
return (ptwas);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_prdeftyp */
|
||||
/* description : create BETYPs for predefined types */
|
||||
/* called func. : vbh_addvbtyp, namealloc */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbtyp *vbh_prdeftyp( VbFigure )
|
||||
|
||||
vbfig_list *VbFigure;
|
||||
{
|
||||
static char *bit_vl[2];
|
||||
static char *boolean_vl[2];
|
||||
static char *severity_vl[2];
|
||||
static char *std_ulogic_vl[9];
|
||||
|
||||
struct vbtyp *TypeBit;
|
||||
struct vbtyp *TypeReg;
|
||||
struct vbtyp *TypeMux;
|
||||
struct vbtyp *TypeWor;
|
||||
struct vbtyp *TypeInt;
|
||||
struct vbtyp *TypeStd_logic;
|
||||
struct vbtyp *TypeStd_ulogic;
|
||||
struct vbtyp *TypeCharacter;
|
||||
|
||||
boolean_vl[0] = namealloc ("false");
|
||||
boolean_vl[1] = namealloc ("true");
|
||||
|
||||
bit_vl[0] = namealloc ("'0'");
|
||||
bit_vl[1] = namealloc ("'1'");
|
||||
|
||||
severity_vl[0] = namealloc ("warning");
|
||||
severity_vl[1] = namealloc ("error");
|
||||
|
||||
std_ulogic_vl[ 0 ] = namealloc("'u'");
|
||||
std_ulogic_vl[ 1 ] = namealloc("'x'");
|
||||
std_ulogic_vl[ 2 ] = namealloc("'0'");
|
||||
std_ulogic_vl[ 3 ] = namealloc("'1'");
|
||||
std_ulogic_vl[ 4 ] = namealloc("'z'");
|
||||
std_ulogic_vl[ 5 ] = namealloc("'w'");
|
||||
std_ulogic_vl[ 6 ] = namealloc("'l'");
|
||||
std_ulogic_vl[ 7 ] = namealloc("'h'");
|
||||
std_ulogic_vl[ 8 ] = namealloc("'-'");
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Enumeration types */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
vbh_addvbtyp( VbFigure,"severity_level",0,1,severity_vl,
|
||||
2,1,NULL,VBH_TYPE_SEVERITY,NULL,'E',-1);
|
||||
vbh_addvbtyp( VbFigure,"boolean" ,0,1,boolean_vl,
|
||||
2,1,NULL,VBH_TYPE_BOOLEAN,NULL,'E',-1);
|
||||
|
||||
TypeBit = vbh_addvbtyp( VbFigure,"bit" ,0,1,bit_vl,
|
||||
2,1,NULL,VBH_TYPE_BIT,NULL,'E',-1);
|
||||
|
||||
TypeCharacter = vbh_addvbtyp( VbFigure,"character" ,0,127,NULL,
|
||||
0,1,NULL,VBH_TYPE_CHARACTER,NULL,'E',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"string",0,0x7fffffff, NULL,
|
||||
0,1,TypeCharacter,VBH_TYPE_STRING,NULL,'U',-1);
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Integer types */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
TypeInt = vbh_addvbtyp(VbFigure,"integer",0x80000000,0x7fffffff,NULL,
|
||||
0,32,NULL,VBH_TYPE_INTEGER,NULL,'I',-1);
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Subtypes */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
vbh_addvbtyp( VbFigure,"natural",0,0x7fffffff,NULL,
|
||||
0,31,TypeInt,VBH_TYPE_NATURAL,NULL,'I',-1);
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Unconstraint array types */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
vbh_addvbtyp( VbFigure,"bit_vector",0,0x7fffffff, NULL,
|
||||
0,1,TypeBit,VBH_TYPE_BIT_VECTOR,NULL,'U',-1);
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* stdlogic_1164 package types */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
TypeStd_ulogic = vbh_addvbtyp( VbFigure, "std_ulogic" ,0,8,std_ulogic_vl,
|
||||
9,1,NULL,VBH_TYPE_STD_ULOGIC,NULL,'E',-1);
|
||||
|
||||
TypeStd_logic = vbh_addvbtyp( VbFigure,"std_logic",0,1,NULL,
|
||||
0,1,TypeStd_ulogic,VBH_TYPE_STD_LOGIC,NULL,'E',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"std_ulogic_vector",0,0x7fffffff, NULL,
|
||||
0,1,TypeStd_ulogic,VBH_TYPE_STD_ULOGIC_VECTOR,NULL,'U',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"std_logic_vector",0,0x7fffffff, NULL,
|
||||
0,1,TypeStd_logic,VBH_TYPE_STD_LOGIC_VECTOR,NULL,'U',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"x01",1,3,NULL,
|
||||
0,1,TypeStd_logic,VBH_TYPE_X01,NULL,'E',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"x01z",1,4,NULL,
|
||||
0,1,TypeStd_logic,VBH_TYPE_X01Z,NULL,'E',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"ux01",0,3,NULL,
|
||||
0,1,TypeStd_logic,VBH_TYPE_UX01,NULL,'E',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"ux01z",0,4,NULL,
|
||||
0,1,TypeStd_logic,VBH_TYPE_UX01Z,NULL,'E',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"unsigned",0,0x7fffffff, NULL,
|
||||
0,1,TypeStd_logic,VBH_TYPE_UNSIGNED,NULL,'U',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"signed",0,0x7fffffff, NULL,
|
||||
0,1,TypeStd_logic,VBH_TYPE_SIGNED,NULL,'U',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"small_int",0,1, NULL,
|
||||
0,1,TypeInt,VBH_TYPE_SMALL_INT,NULL,'I',-1);
|
||||
|
||||
TypeReg = vbh_addvbtyp( VbFigure,"reg_bit" ,0,1,bit_vl,
|
||||
2,1,NULL,VBH_TYPE_REG_BIT,NULL,'E',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"reg_vector",0,0x7fffffff, NULL,
|
||||
0,1,TypeReg,VBH_TYPE_REG_VECTOR,NULL,'U',-1);
|
||||
|
||||
TypeMux = vbh_addvbtyp( VbFigure,"mux_bit" ,0,1,bit_vl,
|
||||
2,1,NULL,VBH_TYPE_MUX_BIT,NULL,'E',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"mux_vector",0,0x7fffffff, NULL,
|
||||
0,1,TypeMux,VBH_TYPE_MUX_VECTOR,NULL,'U',-1);
|
||||
|
||||
TypeWor = vbh_addvbtyp( VbFigure,"wor_bit" ,0,1,bit_vl,
|
||||
2,1,NULL,VBH_TYPE_WOR_BIT,NULL,'E',-1);
|
||||
|
||||
vbh_addvbtyp( VbFigure,"wor_vector",0,0x7fffffff, NULL,
|
||||
0,1,TypeMux,VBH_TYPE_WOR_VECTOR,NULL,'U',-1);
|
||||
|
||||
return ( VbFigure->BETYP );
|
||||
}
|
||||
|
||||
vbtyp_list *vbh_getvbtyp( VbFigure, Name )
|
||||
|
||||
vbfig_list *VbFigure;
|
||||
char *Name;
|
||||
{
|
||||
authelem *Element;
|
||||
|
||||
if ( Name == (char *)0 )
|
||||
{
|
||||
return( (vbtyp_list *)0 );
|
||||
}
|
||||
|
||||
Name = namealloc( Name );
|
||||
Element = searchauthelem( VbFigure->HASH_TYPE, Name );
|
||||
|
||||
if ( Element != (authelem *)0 )
|
||||
{
|
||||
return( (vbtyp_list *)Element->VALUE );
|
||||
}
|
||||
|
||||
return( (vbtyp_list *)0 );
|
||||
}
|
||||
|
||||
vbtyp_list *vbh_getvbtypbyindex( VbFigure, Index )
|
||||
|
||||
vbfig_list *VbFigure;
|
||||
int Index;
|
||||
{
|
||||
vbtyp_list *VbType;
|
||||
|
||||
for ( VbType = VbFigure->BETYP;
|
||||
VbType != (vbtyp_list *)0;
|
||||
VbType = VbType->NEXT )
|
||||
{
|
||||
if ( VbType->INDEX == Index ) return( VbType );
|
||||
}
|
||||
|
||||
return( (vbtyp_list *)0 );
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : vbh_crtvbrin.c */
|
||||
/* date : Aug 24 1992 */
|
||||
/* version : v102 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : contains a specific function used to create a */
|
||||
/* behaviour data structure */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#include "mut.h"
|
||||
#include "aut.h"
|
||||
#include "vex.h"
|
||||
#include "vbh.h"
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_crtvbtyp */
|
||||
/* description : create an array of BETYPs from a list of BETYPs */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct vbtyp *vbh_crtvbtyp (listvbtyp)
|
||||
|
||||
struct vbtyp *listvbtyp; /* pointer on the list of vbtyps */
|
||||
|
||||
{
|
||||
struct vbtyp *lclvbtyp = listvbtyp;
|
||||
struct vbtyp *ptvbtyp = NULL;
|
||||
int size = 0;
|
||||
|
||||
while (lclvbtyp != NULL)
|
||||
{
|
||||
lclvbtyp = lclvbtyp->NEXT;
|
||||
size++;
|
||||
}
|
||||
|
||||
if (size != 0)
|
||||
{
|
||||
ptvbtyp = (struct vbtyp *) autallocblock (size * sizeof(struct vbtyp));
|
||||
lclvbtyp = ptvbtyp;
|
||||
|
||||
while (listvbtyp != NULL)
|
||||
{
|
||||
lclvbtyp->NAME = listvbtyp->NAME;
|
||||
lclvbtyp->LEFT = listvbtyp->LEFT;
|
||||
lclvbtyp->RIGHT = listvbtyp->RIGHT;
|
||||
lclvbtyp->VALUE = listvbtyp->VALUE;
|
||||
lclvbtyp->SIZE = listvbtyp->SIZE;
|
||||
lclvbtyp->BYTE = listvbtyp->BYTE;
|
||||
lclvbtyp->BASE = listvbtyp->BASE;
|
||||
lclvbtyp->INDEX = listvbtyp->INDEX;
|
||||
lclvbtyp->RESOLV = listvbtyp->RESOLV;
|
||||
lclvbtyp->CLASS = listvbtyp->CLASS;
|
||||
|
||||
lclvbtyp->NEXT = lclvbtyp + 1;
|
||||
|
||||
listvbtyp = listvbtyp->NEXT;
|
||||
lclvbtyp++;
|
||||
}
|
||||
|
||||
(lclvbtyp - 1)->NEXT = NULL;
|
||||
}
|
||||
|
||||
return (ptvbtyp);
|
||||
}
|
|
@ -0,0 +1,905 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
#include "mut.h"
|
||||
#include "aut.h"
|
||||
#include "vex.h"
|
||||
#include "vbh.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static vbfig_list *LocalDupFigure = (vbfig_list *)0;
|
||||
static authtable *LocalHashTable = (authtable *)0;
|
||||
|
||||
static ptype_list *loc_dupvbinst();
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Port |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static vbpor_list *loc_dupvbpor( DupPor, BePor )
|
||||
|
||||
vbpor_list *DupPor;
|
||||
vbpor_list *BePor;
|
||||
{
|
||||
vbtyp_list *DupType;
|
||||
|
||||
DupType = vbh_getvbtyp( LocalDupFigure, BePor->TYPE->NAME );
|
||||
DupPor = vbh_addvbpor( DupPor, dupvexexpr( BePor->TARGET ),
|
||||
dupvexexpr( BePor->VEX ), BePor->DIR, BePor->KIND, DupType, BePor->LINE );
|
||||
|
||||
return( DupPor );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Generic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static vbgen_list *loc_dupvbgen( DupGen, BeGen )
|
||||
|
||||
vbgen_list *DupGen;
|
||||
vbgen_list *BeGen;
|
||||
{
|
||||
vbtyp_list *DupType;
|
||||
|
||||
DupType = vbh_getvbtyp( LocalDupFigure, BeGen->TYPE->NAME );
|
||||
DupGen = vbh_addvbgen( DupGen, dupvexexpr( BeGen->TARGET ),
|
||||
dupvexexpr( BeGen->VEX ), DupType, BeGen->LINE );
|
||||
|
||||
return( DupGen );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Ifs |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbifs( PType, ScanIfs )
|
||||
|
||||
ptype_list *PType;
|
||||
vbifs_list *ScanIfs;
|
||||
{
|
||||
vbifs_list *DupIfs;
|
||||
|
||||
PType = vbh_addvbifs( PType, dupvexexpr( ScanIfs->CND ), ScanIfs->LINE );
|
||||
DupIfs = (vbifs_list *)PType->DATA;
|
||||
|
||||
DupIfs->CNDTRUE = loc_dupvbinst( ScanIfs->CNDTRUE );
|
||||
DupIfs->CNDFALSE = loc_dupvbinst( ScanIfs->CNDFALSE );
|
||||
|
||||
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Var |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbvar( PType, ScanVar )
|
||||
|
||||
ptype_list *PType;
|
||||
vbvar_list *ScanVar;
|
||||
{
|
||||
vbtyp_list *DupType;
|
||||
|
||||
DupType = vbh_getvbtyp( LocalDupFigure, ScanVar->TYPE->NAME );
|
||||
PType = vbh_addvbvar( PType, dupvexexpr( ScanVar->TARGET ),
|
||||
dupvexexpr( ScanVar->VEX ), DupType, ScanVar->LINE );
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Asg |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbasg( PType, ScanAsg )
|
||||
|
||||
ptype_list *PType;
|
||||
vbasg_list *ScanAsg;
|
||||
{
|
||||
vbtyp_list *DupType;
|
||||
|
||||
DupType = vbh_getvbtyp( LocalDupFigure, ScanAsg->TYPE->NAME );
|
||||
PType = vbh_addvbasg( PType, dupvexexpr( ScanAsg->TARGET ),
|
||||
dupvexexpr( ScanAsg->VEX ), DupType, ScanAsg->LINE );
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Case |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbcas( PType, ScanCase )
|
||||
|
||||
ptype_list *PType;
|
||||
vbcas_list *ScanCase;
|
||||
{
|
||||
vbtyp_list *DupType;
|
||||
vbcas_list *DupCase;
|
||||
vbcho_list *DupChoice;
|
||||
vbcho_list *ScanChoice;
|
||||
chain_list *ScanChain;
|
||||
int Offset;
|
||||
|
||||
DupType = vbh_getvbtyp( LocalDupFigure, ScanCase->TYPE->NAME );
|
||||
PType = vbh_addvbcas( PType, dupvexexpr( ScanCase->VEX ), DupType, ScanCase->LINE );
|
||||
|
||||
|
||||
DupCase = (vbcas_list *)PType->DATA;
|
||||
DupChoice = (vbcho_list *)autallocblock( sizeof( vbcho_list ) * ScanCase->SIZE );
|
||||
|
||||
DupCase->SIZE = ScanCase->SIZE;
|
||||
DupCase->CHOICE = DupChoice;
|
||||
|
||||
for ( Offset = 0; Offset < ScanCase->SIZE; Offset++ )
|
||||
{
|
||||
ScanChoice = &ScanCase->CHOICE[ Offset ];
|
||||
DupChoice = &DupCase->CHOICE[ Offset ];
|
||||
|
||||
DupChoice->VALUES = (chain_list *)0;
|
||||
|
||||
for ( ScanChain = ScanChoice->VALUES;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
DupChoice->VALUES = addchain( DupChoice->VALUES, ScanChain->DATA );
|
||||
}
|
||||
|
||||
DupChoice->SIZE = ScanChoice->SIZE;
|
||||
DupChoice->INSTRUCTION = loc_dupvbinst( ScanChoice->INSTRUCTION );
|
||||
DupChoice->LINE = ScanChoice->LINE;
|
||||
}
|
||||
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Wait |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbwas( PType, ScanWait )
|
||||
|
||||
ptype_list *PType;
|
||||
vbwas_list *ScanWait;
|
||||
{
|
||||
vbwas_list *DupWait;
|
||||
chain_list *ScanSens;
|
||||
chain_list *DupSens;
|
||||
|
||||
DupSens = (chain_list *)0;
|
||||
|
||||
for ( ScanSens = ScanWait->SEN;
|
||||
ScanSens != (chain_list *)0;
|
||||
ScanSens = ScanSens->NEXT )
|
||||
{
|
||||
DupSens = addchain( DupSens, ScanSens->DATA );
|
||||
}
|
||||
|
||||
DupWait = vbh_addvbwas( DupSens, dupvexexpr( ScanWait->CND ),
|
||||
ScanWait->TIME_UNIT, dupvexexpr( ScanWait->TIMEOUT ), ScanWait->LINE );
|
||||
|
||||
PType = addptype( PType, VBH_BEWAS, (void *)DupWait );
|
||||
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh For |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbfor( PType, ScanFor )
|
||||
|
||||
ptype_list *PType;
|
||||
vbfor_list *ScanFor;
|
||||
{
|
||||
vbfor_list *DupFor;
|
||||
|
||||
PType = vbh_addvbfor( PType, ScanFor->LABEL,
|
||||
dupvexexpr( ScanFor->VARIABLE ),
|
||||
dupvexexpr( ScanFor->LEFT ),
|
||||
dupvexexpr( ScanFor->RIGHT ), ScanFor->UP, ScanFor->LINE );
|
||||
|
||||
DupFor = (vbfor_list *)PType->DATA;
|
||||
DupFor->INSTRUCTION = loc_dupvbinst( ScanFor->INSTRUCTION );
|
||||
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Loop |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvblop( PType, ScanLoop )
|
||||
|
||||
ptype_list *PType;
|
||||
vblop_list *ScanLoop;
|
||||
{
|
||||
vblop_list *DupLoop;
|
||||
|
||||
PType = vbh_addvblop( PType, ScanLoop->LABEL, ScanLoop->LINE );
|
||||
|
||||
DupLoop = (vblop_list *)PType->DATA;
|
||||
DupLoop->INSTRUCTION = loc_dupvbinst( ScanLoop->INSTRUCTION );
|
||||
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh While |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbwhi( PType, ScanWhile )
|
||||
|
||||
ptype_list *PType;
|
||||
vbwhi_list *ScanWhile;
|
||||
{
|
||||
vbwhi_list *DupWhile;
|
||||
|
||||
PType = vbh_addvbwhi( PType,
|
||||
ScanWhile->LABEL, dupvexexpr( ScanWhile->CND ), ScanWhile->LINE );
|
||||
|
||||
DupWhile = (vbwhi_list *)PType->DATA;
|
||||
DupWhile->INSTRUCTION = loc_dupvbinst( ScanWhile->INSTRUCTION );
|
||||
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Aggregate |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbagr( PType, ScanAggreg )
|
||||
|
||||
ptype_list *PType;
|
||||
vbagr_list *ScanAggreg;
|
||||
{
|
||||
PType = vbh_addvbagr( PType, loc_dupvbinst( ScanAggreg->ASSIGN, ScanAggreg->LINE ) );
|
||||
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Exit |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbext( PType, ScanExit )
|
||||
|
||||
ptype_list *PType;
|
||||
vbext_list *ScanExit;
|
||||
{
|
||||
PType = addptype( PType, VBH_BEEXT,
|
||||
vbh_addvbext( ScanExit->LABEL, dupvexexpr( ScanExit->CND ), ScanExit->LINE ) );
|
||||
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Next |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbnxt( PType, ScanNext )
|
||||
|
||||
ptype_list *PType;
|
||||
vbnxt_list *ScanNext;
|
||||
{
|
||||
|
||||
PType = addptype( PType, VBH_BENXT,
|
||||
vbh_addvbnxt( ScanNext->LABEL, dupvexexpr( ScanNext->CND ), ScanNext->LINE ) );
|
||||
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Return |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbret( PType, ScanReturn )
|
||||
|
||||
ptype_list *PType;
|
||||
vbret_list *ScanReturn;
|
||||
{
|
||||
PType = addptype( PType, VBH_BERET,
|
||||
vbh_addvbret( dupvexexpr( ScanReturn->RET ), ScanReturn->LINE ) );
|
||||
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Call |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbcal( PType, ScanCall )
|
||||
|
||||
ptype_list *PType;
|
||||
vbcal_list *ScanCall;
|
||||
{
|
||||
PType = addptype( PType, VBH_BECAL,
|
||||
vbh_addvbcal( dupvexexpr( ScanCall->CALL ), ScanCall->LINE ) );
|
||||
|
||||
return( PType );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Dup Vbh Instruction |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static ptype_list *loc_dupvbinst( Instruction )
|
||||
|
||||
ptype_list *Instruction;
|
||||
{
|
||||
ptype_list *DupInstruction;
|
||||
|
||||
DupInstruction = (ptype_list *)0;
|
||||
|
||||
while ( Instruction != (ptype_list *)0 )
|
||||
{
|
||||
switch ( Instruction->TYPE )
|
||||
{
|
||||
case VBH_BEIFS : DupInstruction = loc_dupvbifs( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEASG : DupInstruction = loc_dupvbasg( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEVAR : DupInstruction = loc_dupvbvar( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BECAS : DupInstruction = loc_dupvbcas( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEWAS : DupInstruction = loc_dupvbwas( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEFOR : DupInstruction = loc_dupvbfor( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEWHI : DupInstruction = loc_dupvbwhi( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BELOP : DupInstruction = loc_dupvblop( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BENXT : DupInstruction = loc_dupvbnxt( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEEXT : DupInstruction = loc_dupvbext( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BERET : DupInstruction = loc_dupvbret( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BECAL : DupInstruction = loc_dupvbcal( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEAGR : DupInstruction = loc_dupvbagr( DupInstruction, Instruction->DATA );
|
||||
break;
|
||||
}
|
||||
|
||||
Instruction = Instruction->NEXT;
|
||||
}
|
||||
|
||||
DupInstruction = (ptype_list *)reverse( (chain_list *)DupInstruction );
|
||||
|
||||
return ( DupInstruction );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Dup Vbh Type |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_dupvbtyp( Figure, DupFigure )
|
||||
|
||||
vbfig_list *Figure;
|
||||
vbfig_list *DupFigure;
|
||||
{
|
||||
vbtyp_list *BeTyp;
|
||||
vbtyp_list *DupTyp;
|
||||
vbtyp_list *DupTypeBase;
|
||||
int DupTypeIndex;
|
||||
|
||||
DupTypeIndex = 0;
|
||||
|
||||
for ( DupTyp = DupFigure->BETYP;
|
||||
DupTyp != (vbtyp_list *)0;
|
||||
DupTyp = DupTyp->NEXT )
|
||||
{
|
||||
DupTypeIndex++;
|
||||
}
|
||||
|
||||
for ( BeTyp = Figure->BETYP;
|
||||
BeTyp != (vbtyp_list *)0;
|
||||
BeTyp = BeTyp->NEXT )
|
||||
{
|
||||
if ( BeTyp->INDEX < VBH_MAX_TYPE ) continue;
|
||||
|
||||
DupTyp = vbh_getvbtyp( DupFigure, BeTyp->NAME );
|
||||
|
||||
if ( DupTyp != (vbtyp_list *)0 ) continue;
|
||||
|
||||
if ( BeTyp->BASE != (vbtyp_list *)0 )
|
||||
{
|
||||
DupTypeBase = vbh_getvbtyp( DupFigure, BeTyp->BASE->NAME );
|
||||
}
|
||||
else
|
||||
{
|
||||
DupTypeBase = (vbtyp_list *)0;
|
||||
}
|
||||
|
||||
DupTyp = vbh_addvbtyp( LocalDupFigure,
|
||||
BeTyp->NAME, BeTyp->LEFT, BeTyp->RIGHT, BeTyp->VALUE, BeTyp->SIZE,
|
||||
BeTyp->BYTE,
|
||||
DupTypeBase, DupTypeIndex, (vbfun_list *)0, BeTyp->CLASS, BeTyp->LINE );
|
||||
|
||||
DupTyp->DYNAMIC = BeTyp->DYNAMIC;
|
||||
DupTyp->DYNAMIC_LEFT = dupvexexpr( BeTyp->DYNAMIC_LEFT );
|
||||
DupTyp->DYNAMIC_RIGHT = dupvexexpr( BeTyp->DYNAMIC_RIGHT );
|
||||
|
||||
DupTypeIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Dup Vbh Map |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static vbmap_list *loc_dupvbmap( DupMap, BeMap )
|
||||
|
||||
vbmap_list *DupMap;
|
||||
vbmap_list *BeMap;
|
||||
{
|
||||
DupMap = vbh_addvbmap( DupMap,
|
||||
dupvexexpr( BeMap->FORMAL ), dupvexexpr( BeMap->ACTUAL ), BeMap->LINE );
|
||||
|
||||
return( DupMap );
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Dup Vbh Instance |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static vbins_list *loc_dupvbins( DupIns, BeIns )
|
||||
|
||||
vbins_list *DupIns;
|
||||
vbins_list *BeIns;
|
||||
{
|
||||
vbmap_list *BeMap;
|
||||
|
||||
DupIns = vbh_addvbins( DupIns, BeIns->NAME, BeIns->MODEL, BeIns->LINE );
|
||||
|
||||
for ( BeMap = BeIns->PORT_MAP;
|
||||
BeMap != (vbmap_list *)0;
|
||||
BeMap = BeMap->NEXT )
|
||||
{
|
||||
DupIns->PORT_MAP = loc_dupvbmap( DupIns->PORT_MAP, BeMap );
|
||||
}
|
||||
|
||||
for ( BeMap = BeIns->GEN_MAP;
|
||||
BeMap != (vbmap_list *)0;
|
||||
BeMap = BeMap->NEXT )
|
||||
{
|
||||
DupIns->GEN_MAP = loc_dupvbmap( DupIns->GEN_MAP, BeMap );
|
||||
}
|
||||
|
||||
return( DupIns );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Dup Vbh Aux |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static vbaux_list *loc_dupvbaux( DupAux, BeAux )
|
||||
|
||||
vbaux_list *DupAux;
|
||||
vbaux_list *BeAux;
|
||||
{
|
||||
vbtyp_list *DupType;
|
||||
|
||||
DupType = vbh_getvbtyp( LocalDupFigure, BeAux->TYPE->NAME );
|
||||
|
||||
DupAux = vbh_addvbaux( DupAux, dupvexexpr( BeAux->TARGET ), dupvexexpr( BeAux->VEX ),
|
||||
BeAux->KIND, DupType, BeAux->LINE );
|
||||
|
||||
return( DupAux );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Dup Vbh Arg |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static vbarg_list *loc_dupvbarg( DupArg, BeArg )
|
||||
|
||||
vbarg_list *DupArg;
|
||||
vbarg_list *BeArg;
|
||||
{
|
||||
vbtyp_list *DupType;
|
||||
|
||||
DupType = vbh_getvbtyp( LocalDupFigure, BeArg->TYPE->NAME );
|
||||
DupArg = vbh_addvbarg( DupArg, dupvexexpr( BeArg->TARGET ),
|
||||
BeArg->DIR, BeArg->CLASS, DupType, BeArg->LINE );
|
||||
return( DupArg );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Dup Vbh Fun |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static vbfun_list *loc_dupvbfun( DupFun, BeFun )
|
||||
|
||||
vbfun_list *DupFun;
|
||||
vbfun_list *BeFun;
|
||||
{
|
||||
vbarg_list *BeArg;
|
||||
|
||||
DupFun = vbh_addvbfun( DupFun, BeFun->NAME,
|
||||
(vbarg_list *)0, (vbarg_list *)0, (ptype_list *)0, BeFun->LINE );
|
||||
|
||||
DupFun->TYPE = BeFun->TYPE;
|
||||
|
||||
for ( BeArg = BeFun->ARGUMENT;
|
||||
BeArg != (vbarg_list *)0;
|
||||
BeArg = BeArg->NEXT )
|
||||
{
|
||||
DupFun->ARGUMENT = loc_dupvbarg( DupFun->ARGUMENT, BeArg );
|
||||
}
|
||||
|
||||
DupFun->ARGUMENT = (vbarg_list *)reverse( (chain_list *)DupFun->ARGUMENT );
|
||||
|
||||
if ( BeFun->RETURN != (vbarg_list *)0 )
|
||||
{
|
||||
DupFun->RETURN = loc_dupvbarg( (vbarg_list *)0, BeFun->RETURN );
|
||||
}
|
||||
|
||||
DupFun->VARIABLE = loc_dupvbinst( BeFun->VARIABLE );
|
||||
DupFun->INSTRUCTION = loc_dupvbinst( BeFun->INSTRUCTION );
|
||||
|
||||
return( DupFun );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Dup Vbh Pcs |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static vbpcs_list *loc_dupvbpcs( DupPcs, BePcs )
|
||||
|
||||
vbpcs_list *DupPcs;
|
||||
vbpcs_list *BePcs;
|
||||
{
|
||||
chain_list *ScanSens;
|
||||
chain_list *DupSens;
|
||||
|
||||
DupPcs = vbh_addvbpcs( DupPcs, BePcs->LABEL, (chain_list *)0, (ptype_list *)0, BePcs->LINE );
|
||||
|
||||
DupSens = (chain_list *)0;
|
||||
|
||||
for ( ScanSens = BePcs->SENSITIVITY;
|
||||
ScanSens != (chain_list *)0;
|
||||
ScanSens = ScanSens->NEXT )
|
||||
{
|
||||
DupSens = addchain( DupSens, ScanSens->DATA );
|
||||
}
|
||||
|
||||
DupPcs->SENSITIVITY = DupSens;
|
||||
DupPcs->TYPE = BePcs->TYPE;
|
||||
DupPcs->VARIABLE = loc_dupvbinst( BePcs->VARIABLE );
|
||||
DupPcs->INSTRUCTION = loc_dupvbinst( BePcs->INSTRUCTION );
|
||||
|
||||
return( DupPcs );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Dup Vbh Gnr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static vbgnr_list *loc_dupvbgnr( DupGnr, BeGnr )
|
||||
|
||||
vbgnr_list *DupGnr;
|
||||
vbgnr_list *BeGnr;
|
||||
{
|
||||
vbins_list *BeIns;
|
||||
vbpcs_list *BePcs;
|
||||
|
||||
DupGnr = vbh_addvbgnr( DupGnr, BeGnr->LABEL, BeGnr->LINE );
|
||||
|
||||
DupGnr->TYPE = BeGnr->TYPE;
|
||||
DupGnr->FOR_UP = BeGnr->FOR_UP;
|
||||
DupGnr->IF_COND = dupvexexpr( BeGnr->IF_COND );
|
||||
DupGnr->FOR_VARIABLE = dupvexexpr( BeGnr->FOR_VARIABLE );
|
||||
DupGnr->FOR_LEFT = dupvexexpr( BeGnr->FOR_LEFT );
|
||||
DupGnr->FOR_RIGHT = dupvexexpr( BeGnr->FOR_RIGHT );
|
||||
|
||||
for ( BeIns = BeGnr->BEINS;
|
||||
BeIns != (vbins_list *)0;
|
||||
BeIns = BeIns->NEXT )
|
||||
{
|
||||
DupGnr->BEINS = loc_dupvbins( DupGnr->BEINS, BeIns );
|
||||
}
|
||||
|
||||
for ( BePcs = BeGnr->BEPCS;
|
||||
BePcs != (vbpcs_list *)0;
|
||||
BePcs = BePcs->NEXT )
|
||||
{
|
||||
DupGnr->BEPCS = loc_dupvbpcs( DupGnr->BEPCS, BePcs );
|
||||
}
|
||||
|
||||
for ( BeGnr = BeGnr->BEGNR;
|
||||
BeGnr != (vbgnr_list *)0;
|
||||
BeGnr = BeGnr->NEXT )
|
||||
{
|
||||
DupGnr->BEGNR = loc_dupvbgnr( DupGnr->BEGNR, BeGnr );
|
||||
}
|
||||
|
||||
return( DupGnr );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| vbh_dupvbfig |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void vbh_dupvbfig( DupFigure, Figure )
|
||||
|
||||
vbfig_list *DupFigure;
|
||||
vbfig_list *Figure;
|
||||
{
|
||||
vbgnr_list *BeGnr;
|
||||
vbgen_list *BeGen;
|
||||
vbins_list *BeIns;
|
||||
vbmod_list *BeMod;
|
||||
vbmod_list *DupMod;
|
||||
vbaux_list *BeAux;
|
||||
vbaux_list *DupAux;
|
||||
vbatr_list *BeAtr;
|
||||
vbatr_list *DupAtr;
|
||||
vbcst_list *BeCst;
|
||||
vbcst_list *DupCst;
|
||||
vbpor_list *BePor;
|
||||
vbpcs_list *BePcs;
|
||||
vbfun_list *BeFun;
|
||||
vbtyp_list *DupType;
|
||||
chain_list *PackList;
|
||||
authelem *Element;
|
||||
|
||||
LocalDupFigure = DupFigure;
|
||||
|
||||
if ( LocalHashTable == (authtable *)0 )
|
||||
{
|
||||
LocalHashTable = createauthtable( 100 );
|
||||
}
|
||||
|
||||
for ( PackList = Figure->PACK_LIST;
|
||||
PackList != (chain_list *)0;
|
||||
PackList = PackList->NEXT )
|
||||
{
|
||||
DupFigure->PACK_LIST = addchain( DupFigure->PACK_LIST, PackList->DATA );
|
||||
}
|
||||
|
||||
loc_dupvbtyp( Figure, DupFigure );
|
||||
|
||||
for ( BePor = Figure->BEPOR;
|
||||
BePor != (vbpor_list *)0;
|
||||
BePor = BePor->NEXT )
|
||||
{
|
||||
DupFigure->BEPOR = loc_dupvbpor( DupFigure->BEPOR, BePor );
|
||||
}
|
||||
|
||||
for ( BeGen = Figure->BEGEN;
|
||||
BeGen != (vbgen_list *)0;
|
||||
BeGen = BeGen->NEXT )
|
||||
{
|
||||
DupFigure->BEGEN = loc_dupvbgen( DupFigure->BEGEN, BeGen );
|
||||
}
|
||||
|
||||
for ( DupMod = DupFigure->BEMOD;
|
||||
DupMod != (vbmod_list *)0;
|
||||
DupMod = DupMod->NEXT )
|
||||
{
|
||||
addauthelem( LocalHashTable, DupMod->NAME, 0 );
|
||||
}
|
||||
|
||||
for ( BeMod = Figure->BEMOD;
|
||||
BeMod != (vbmod_list *)0;
|
||||
BeMod = BeMod->NEXT )
|
||||
{
|
||||
Element = searchauthelem( LocalHashTable, BeMod->NAME );
|
||||
|
||||
if ( Element != (authelem *)0 ) continue;
|
||||
|
||||
DupFigure->BEMOD = vbh_addvbmod( DupFigure->BEMOD, BeMod->NAME, BeMod->LINE );
|
||||
DupMod = DupFigure->BEMOD;
|
||||
|
||||
for ( BePor = BeMod->BEPOR;
|
||||
BePor != (vbpor_list *)0;
|
||||
BePor = BePor->NEXT )
|
||||
{
|
||||
DupMod->BEPOR = loc_dupvbpor( DupMod->BEPOR, BePor );
|
||||
}
|
||||
|
||||
for ( BeGen = BeMod->BEGEN;
|
||||
BeGen != (vbgen_list *)0;
|
||||
BeGen = BeGen->NEXT )
|
||||
{
|
||||
DupMod->BEGEN = loc_dupvbgen( DupMod->BEGEN, BeGen );
|
||||
}
|
||||
}
|
||||
|
||||
for ( DupAtr = DupFigure->BEATR;
|
||||
DupAtr != (vbatr_list *)0;
|
||||
DupAtr = DupAtr->NEXT )
|
||||
{
|
||||
addauthelem( LocalHashTable, DupAtr->NAME, 0 );
|
||||
}
|
||||
|
||||
for ( BeAtr = Figure->BEATR;
|
||||
BeAtr != (vbatr_list *)0;
|
||||
BeAtr = BeAtr->NEXT )
|
||||
{
|
||||
Element = searchauthelem( LocalHashTable, BeAtr->NAME );
|
||||
|
||||
if ( Element != (authelem *)0 ) continue;
|
||||
|
||||
DupFigure->BEATR = vbh_addvbatr( DupFigure->BEATR, BeAtr->NAME, BeAtr->ENTITY,
|
||||
BeAtr->TYPE, BeAtr->VALUE, BeAtr->LINE );
|
||||
}
|
||||
|
||||
for ( DupCst = DupFigure->BECST;
|
||||
DupCst != (vbcst_list *)0;
|
||||
DupCst = DupCst->NEXT )
|
||||
{
|
||||
addauthelem( LocalHashTable, getvexatomname( DupCst->TARGET ), 0 );
|
||||
}
|
||||
|
||||
for ( BeCst = Figure->BECST;
|
||||
BeCst != (vbcst_list *)0;
|
||||
BeCst = BeCst->NEXT )
|
||||
{
|
||||
Element = searchauthelem( LocalHashTable, getvexatomname( BeCst->TARGET ) );
|
||||
|
||||
if ( Element != (authelem *)0 ) continue;
|
||||
|
||||
DupType = vbh_getvbtyp( DupFigure, BeCst->TYPE->NAME );
|
||||
|
||||
DupFigure->BECST = vbh_addvbcst( DupFigure->BECST, dupvexexpr( BeCst->TARGET ),
|
||||
dupvexexpr( BeCst->VEX ), DupType, BeCst->LINE );
|
||||
}
|
||||
|
||||
for ( DupAux = DupFigure->BEAUX;
|
||||
DupAux != (vbaux_list *)0;
|
||||
DupAux = DupAux->NEXT )
|
||||
{
|
||||
addauthelem( LocalHashTable, getvexatomname( DupAux->TARGET ), 0 );
|
||||
}
|
||||
|
||||
for ( BeAux = Figure->BEAUX;
|
||||
BeAux != (vbaux_list *)0;
|
||||
BeAux = BeAux->NEXT )
|
||||
{
|
||||
Element = searchauthelem( LocalHashTable, getvexatomname( BeAux->TARGET ) );
|
||||
|
||||
if ( Element != (authelem *)0 ) continue;
|
||||
|
||||
DupFigure->BEAUX = loc_dupvbaux( DupFigure->BEAUX, BeAux );
|
||||
}
|
||||
|
||||
for ( BeFun = Figure->BEFUN;
|
||||
BeFun != (vbfun_list *)0;
|
||||
BeFun = BeFun->NEXT )
|
||||
{
|
||||
DupFigure->BEFUN = loc_dupvbfun( DupFigure->BEFUN, BeFun );
|
||||
}
|
||||
|
||||
for ( BeIns = Figure->BEINS;
|
||||
BeIns != (vbins_list *)0;
|
||||
BeIns = BeIns->NEXT )
|
||||
{
|
||||
DupFigure->BEINS = loc_dupvbins( DupFigure->BEINS, BeIns );
|
||||
}
|
||||
|
||||
for ( BePcs = Figure->BEPCS;
|
||||
BePcs != (vbpcs_list *)0;
|
||||
BePcs = BePcs->NEXT )
|
||||
{
|
||||
DupFigure->BEPCS = loc_dupvbpcs( DupFigure->BEPCS, BePcs );
|
||||
}
|
||||
|
||||
for ( BeGnr = Figure->BEGNR;
|
||||
BeGnr != (vbgnr_list *)0;
|
||||
BeGnr = BeGnr->NEXT )
|
||||
{
|
||||
DupFigure->BEGNR = loc_dupvbgnr( DupFigure->BEGNR, BeGnr );
|
||||
}
|
||||
|
||||
resetauthtable( LocalHashTable );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| vbh_dupvbinst |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
ptype_list *vbh_dupvbinst( Figure, Instruction )
|
||||
|
||||
vbfig_list *Figure;
|
||||
ptype_list *Instruction;
|
||||
{
|
||||
LocalDupFigure = Figure;
|
||||
|
||||
return( loc_dupvbinst( Instruction ) );
|
||||
}
|
|
@ -0,0 +1,707 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : vbh_free.c */
|
||||
/* date : Aug 24 1992 */
|
||||
/* version : v102 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : contains a specific function used to delete a list */
|
||||
/* of behaviour data structures */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#include "mut.h"
|
||||
#include "aut.h"
|
||||
#include "vex.h"
|
||||
#include "vbh.h"
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbfig */
|
||||
/* description : delete a list of BEFIG structures and all objects */
|
||||
/* pointed by any os BEFIGs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
extern struct vbfig *VBL_HEADFIG;
|
||||
|
||||
void vbh_delvbfig ( ptvbfig )
|
||||
|
||||
struct vbfig *ptvbfig; /* the vbfig to be deleted */
|
||||
|
||||
{
|
||||
struct vbfig *scanvbfig;
|
||||
struct vbfig **prevvbfig;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
prevvbfig = &VBL_HEADFIG;
|
||||
|
||||
for ( scanvbfig = VBL_HEADFIG;
|
||||
scanvbfig != (vbfig_list *)0;
|
||||
scanvbfig = scanvbfig->NEXT )
|
||||
{
|
||||
if ( scanvbfig == ptvbfig )
|
||||
{
|
||||
*prevvbfig = scanvbfig->NEXT;
|
||||
scanvbfig->NEXT = (vbfig_list *)0;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
prevvbfig = &scanvbfig->NEXT;
|
||||
}
|
||||
|
||||
vbh_frevbfig( scanvbfig );
|
||||
}
|
||||
|
||||
void vbh_frevbfig (listvbfig)
|
||||
|
||||
struct vbfig *listvbfig; /* list of vbfig to be deleted */
|
||||
|
||||
{
|
||||
struct vbfig *ptvbfig;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbfig != NULL)
|
||||
{
|
||||
vbh_frevbatr (listvbfig->BEATR);
|
||||
vbh_frevbaux (listvbfig->BEAUX);
|
||||
vbh_frevbcst (listvbfig->BECST);
|
||||
vbh_frevbgen (listvbfig->BEGEN);
|
||||
vbh_frevbpor (listvbfig->BEPOR);
|
||||
vbh_frevbpcs (listvbfig->BEPCS);
|
||||
vbh_frevbfun (listvbfig->BEFUN);
|
||||
vbh_frevbtyp (listvbfig->BETYP);
|
||||
vbh_frevbmod (listvbfig->BEMOD);
|
||||
vbh_frevbins (listvbfig->BEINS);
|
||||
vbh_frevbgnr (listvbfig->BEGNR);
|
||||
|
||||
destroyauthtable( listvbfig->HASH_TYPE );
|
||||
|
||||
freechain( listvbfig->PACK_LIST );
|
||||
|
||||
ptvbfig = listvbfig;
|
||||
listvbfig = listvbfig->NEXT;
|
||||
autfreeblock (ptvbfig);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbmap */
|
||||
/* description : delete a list of BEMOD structures and all objects */
|
||||
/* pointed by any os BEMODs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbmap (listvbmap)
|
||||
|
||||
struct vbmap *listvbmap; /* list of vbmap to be deleted */
|
||||
|
||||
{
|
||||
struct vbmap *ptvbmap;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbmap != NULL)
|
||||
{
|
||||
freevexexpr( listvbmap->FORMAL );
|
||||
freevexexpr( listvbmap->ACTUAL );
|
||||
|
||||
ptvbmap = listvbmap;
|
||||
listvbmap = listvbmap->NEXT;
|
||||
autfreeheap (ptvbmap, sizeof(struct vbmap));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbgnr */
|
||||
/* description : delete a list of BEMOD structures and all objects */
|
||||
/* pointed by any os BEMODs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbgnr (listvbgnr)
|
||||
|
||||
struct vbgnr *listvbgnr; /* list of vbgnr to be deleted */
|
||||
|
||||
{
|
||||
struct vbgnr *ptvbgnr;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
while (listvbgnr != NULL)
|
||||
{
|
||||
freevexexpr( listvbgnr->FOR_VARIABLE );
|
||||
freevexexpr( listvbgnr->FOR_LEFT );
|
||||
freevexexpr( listvbgnr->FOR_RIGHT );
|
||||
freevexexpr( listvbgnr->IF_COND );
|
||||
|
||||
vbh_frevbpcs( listvbgnr->BEPCS );
|
||||
vbh_frevbins( listvbgnr->BEINS );
|
||||
vbh_frevbgnr( listvbgnr->BEGNR );
|
||||
|
||||
ptvbgnr = listvbgnr;
|
||||
listvbgnr = listvbgnr->NEXT;
|
||||
autfreeheap (ptvbgnr, sizeof(struct vbgnr));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbins */
|
||||
/* description : delete a list of BEMOD structures and all objects */
|
||||
/* pointed by any os BEMODs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbins (listvbins)
|
||||
|
||||
struct vbins *listvbins; /* list of vbins to be deleted */
|
||||
|
||||
{
|
||||
struct vbins *ptvbins;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbins != NULL)
|
||||
{
|
||||
vbh_frevbmap( listvbins->PORT_MAP );
|
||||
vbh_frevbmap( listvbins->GEN_MAP );
|
||||
|
||||
ptvbins = listvbins;
|
||||
listvbins = listvbins->NEXT;
|
||||
autfreeheap (ptvbins, sizeof(struct vbins));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbmod */
|
||||
/* description : delete a list of BEMOD structures and all objects */
|
||||
/* pointed by any os BEMODs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbmod (listvbmod)
|
||||
|
||||
struct vbmod *listvbmod; /* list of vbmod to be deleted */
|
||||
|
||||
{
|
||||
struct vbmod *ptvbmod;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbmod != NULL)
|
||||
{
|
||||
vbh_frevbpor( listvbmod->BEPOR );
|
||||
vbh_frevbgen( listvbmod->BEGEN );
|
||||
|
||||
ptvbmod = listvbmod;
|
||||
listvbmod = listvbmod->NEXT;
|
||||
autfreeheap (ptvbmod, sizeof(struct vbmod));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbcst */
|
||||
/* description : delete a list of BECST structures and all objects */
|
||||
/* pointed by any os BECSTs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbcst (listvbcst)
|
||||
|
||||
struct vbcst *listvbcst; /* list of vbcst to be deleted */
|
||||
|
||||
{
|
||||
struct vbcst *ptvbcst;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbcst != NULL)
|
||||
{
|
||||
freevexexpr (listvbcst->VEX);
|
||||
freevexexpr (listvbcst->TARGET);
|
||||
|
||||
ptvbcst = listvbcst;
|
||||
listvbcst = listvbcst->NEXT;
|
||||
autfreeheap (ptvbcst, sizeof(struct vbcst));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbgen */
|
||||
/* description : delete a list of BEGEN structures and all objects */
|
||||
/* pointed by any os BEGENs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbgen (listvbgen)
|
||||
|
||||
struct vbgen *listvbgen; /* list of vbgen to be deleted */
|
||||
|
||||
{
|
||||
struct vbgen *ptvbgen;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbgen != NULL)
|
||||
{
|
||||
freevexexpr (listvbgen->VEX);
|
||||
freevexexpr (listvbgen->TARGET);
|
||||
|
||||
ptvbgen = listvbgen;
|
||||
listvbgen = listvbgen->NEXT;
|
||||
autfreeheap (ptvbgen, sizeof(struct vbgen));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbatr */
|
||||
/* description : delete a list of BEAUX structures and all objects */
|
||||
/* pointed by any os BEAUXs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbatr (listvbatr)
|
||||
|
||||
struct vbatr *listvbatr; /* list of vbatr to be deleted */
|
||||
|
||||
{
|
||||
struct vbatr *ptvbatr;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbatr != NULL)
|
||||
{
|
||||
ptvbatr = listvbatr;
|
||||
listvbatr = listvbatr->NEXT;
|
||||
autfreeheap (ptvbatr, sizeof(struct vbatr));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbaux */
|
||||
/* description : delete a list of BEAUX structures and all objects */
|
||||
/* pointed by any os BEAUXs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbaux (listvbaux)
|
||||
|
||||
struct vbaux *listvbaux; /* list of vbaux to be deleted */
|
||||
|
||||
{
|
||||
struct vbaux *ptvbaux;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbaux != NULL)
|
||||
{
|
||||
freevexexpr (listvbaux->VEX);
|
||||
freevexexpr (listvbaux->TARGET);
|
||||
|
||||
ptvbaux = listvbaux;
|
||||
listvbaux = listvbaux->NEXT;
|
||||
autfreeheap (ptvbaux, sizeof(struct vbaux));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbarg */
|
||||
/* description : delete a list of BEAUX structures and all objects */
|
||||
/* pointed by any os BEAUXs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbarg (listvbarg)
|
||||
|
||||
struct vbarg *listvbarg; /* list of vbarg to be deleted */
|
||||
|
||||
{
|
||||
struct vbarg *ptvbarg;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbarg != NULL)
|
||||
{
|
||||
freevexexpr (listvbarg->TARGET);
|
||||
|
||||
ptvbarg = listvbarg;
|
||||
listvbarg = listvbarg->NEXT;
|
||||
autfreeheap (ptvbarg, sizeof(struct vbarg));
|
||||
}
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbpor */
|
||||
/* description : delete a list of BEAUX structures and all objects */
|
||||
/* pointed by any os BEAUXs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbpor (listvbpor)
|
||||
|
||||
struct vbpor *listvbpor; /* list of vbpor to be deleted */
|
||||
|
||||
{
|
||||
struct vbpor *ptvbpor;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbpor != NULL)
|
||||
{
|
||||
freevexexpr (listvbpor->TARGET);
|
||||
|
||||
ptvbpor = listvbpor;
|
||||
listvbpor = listvbpor->NEXT;
|
||||
autfreeheap (ptvbpor, sizeof(struct vbpor));
|
||||
}
|
||||
}
|
||||
|
||||
void vbh_frevbifs( ScanIfs )
|
||||
|
||||
vbifs_list *ScanIfs;
|
||||
{
|
||||
freevexexpr( ScanIfs->CND );
|
||||
vbh_frevbinst( ScanIfs->CNDTRUE );
|
||||
vbh_frevbinst( ScanIfs->CNDFALSE );
|
||||
|
||||
autfreeheap( ScanIfs, sizeof(struct vbifs) );
|
||||
}
|
||||
|
||||
void vbh_frevbfor( ScanFor )
|
||||
|
||||
vbfor_list *ScanFor;
|
||||
{
|
||||
freevexexpr( ScanFor->VARIABLE );
|
||||
freevexexpr( ScanFor->LEFT );
|
||||
freevexexpr( ScanFor->RIGHT );
|
||||
|
||||
vbh_frevbinst( ScanFor->INSTRUCTION );
|
||||
autfreeheap( ScanFor, sizeof(struct vbfor) );
|
||||
}
|
||||
|
||||
void vbh_frevblop( ScanLop )
|
||||
|
||||
vblop_list *ScanLop;
|
||||
{
|
||||
vbh_frevbinst( ScanLop->INSTRUCTION );
|
||||
autfreeheap( ScanLop, sizeof(struct vblop) );
|
||||
}
|
||||
|
||||
void vbh_frevbwhi( ScanWhi )
|
||||
|
||||
vbwhi_list *ScanWhi;
|
||||
{
|
||||
freevexexpr( ScanWhi->CND );
|
||||
vbh_frevbinst( ScanWhi->INSTRUCTION );
|
||||
autfreeheap( ScanWhi, sizeof(struct vbwhi) );
|
||||
}
|
||||
|
||||
void vbh_frevbext( ScanExit )
|
||||
|
||||
vbext_list *ScanExit;
|
||||
{
|
||||
freevexexpr( ScanExit->CND );
|
||||
autfreeheap( ScanExit, sizeof(struct vbext) );
|
||||
}
|
||||
|
||||
void vbh_frevbnxt( ScanNext )
|
||||
|
||||
vbnxt_list *ScanNext;
|
||||
{
|
||||
freevexexpr( ScanNext->CND );
|
||||
autfreeheap( ScanNext, sizeof(struct vbnxt) );
|
||||
}
|
||||
|
||||
void vbh_frevbret( ScanReturn )
|
||||
|
||||
vbret_list *ScanReturn;
|
||||
{
|
||||
freevexexpr( ScanReturn->RET );
|
||||
autfreeheap( ScanReturn, sizeof(struct vbret) );
|
||||
}
|
||||
|
||||
void vbh_frevbcal( ScanCall )
|
||||
|
||||
vbcal_list *ScanCall;
|
||||
{
|
||||
freevexexpr( ScanCall->CALL );
|
||||
autfreeheap( ScanCall, sizeof(struct vbcal) );
|
||||
}
|
||||
|
||||
void vbh_frevbasg( ScanAsg )
|
||||
|
||||
vbasg_list *ScanAsg;
|
||||
{
|
||||
freevexexpr( ScanAsg->TARGET );
|
||||
freevexexpr( ScanAsg->VEX );
|
||||
|
||||
autfreeheap( ScanAsg, sizeof(struct vbasg) );
|
||||
}
|
||||
|
||||
void vbh_frevbvar( ScanVar )
|
||||
|
||||
vbvar_list *ScanVar;
|
||||
{
|
||||
freevexexpr( ScanVar->TARGET );
|
||||
freevexexpr( ScanVar->VEX );
|
||||
|
||||
autfreeheap( ScanVar, sizeof(struct vbvar) );
|
||||
}
|
||||
|
||||
void vbh_frevbwas( ScanWas )
|
||||
|
||||
vbwas_list *ScanWas;
|
||||
{
|
||||
freechain( ScanWas->SEN );
|
||||
freevexexpr( ScanWas->CND );
|
||||
freevexexpr( ScanWas->TIMEOUT );
|
||||
|
||||
autfreeheap( ScanWas, sizeof(struct vbwas) );
|
||||
}
|
||||
|
||||
void vbh_frevbcas( ScanCas )
|
||||
|
||||
vbcas_list *ScanCas;
|
||||
{
|
||||
vbcho_list *ScanCho;
|
||||
int Offset;
|
||||
|
||||
freevexexpr( ScanCas->VEX );
|
||||
|
||||
for ( Offset = 0; Offset < ScanCas->SIZE; Offset++ )
|
||||
{
|
||||
ScanCho = &ScanCas->CHOICE[ Offset ];
|
||||
freechain( ScanCho->VALUES );
|
||||
vbh_frevbinst( ScanCho->INSTRUCTION );
|
||||
}
|
||||
|
||||
autfreeblock( ScanCas->CHOICE );
|
||||
autfreeheap( ScanCas, sizeof(struct vbcas) );
|
||||
}
|
||||
|
||||
void vbh_frevbagr( ScanAgr )
|
||||
|
||||
vbagr_list *ScanAgr;
|
||||
{
|
||||
vbh_frevbinst( ScanAgr->ASSIGN );
|
||||
autfreeheap( ScanAgr, sizeof(struct vbagr) );
|
||||
}
|
||||
|
||||
void vbh_frevbinst( HeadType )
|
||||
|
||||
ptype_list *HeadType;
|
||||
{
|
||||
ptype_list *ScanType;
|
||||
|
||||
for ( ScanType = HeadType;
|
||||
ScanType != (ptype_list *)0;
|
||||
ScanType = ScanType->NEXT )
|
||||
{
|
||||
switch ( ScanType->TYPE )
|
||||
{
|
||||
case VBH_BEIFS : vbh_frevbifs( ScanType->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEASG : vbh_frevbasg( ScanType->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEVAR : vbh_frevbvar( ScanType->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BECAS : vbh_frevbcas( ScanType->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEWAS : vbh_frevbwas( ScanType->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEWHI : vbh_frevbwhi( ScanType->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BELOP : vbh_frevblop( ScanType->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEFOR : vbh_frevbfor( ScanType->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BENXT : vbh_frevbnxt( ScanType->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEEXT : vbh_frevbext( ScanType->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BECAL : vbh_frevbcal( ScanType->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BERET : vbh_frevbret( ScanType->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEAGR : vbh_frevbagr( ScanType->DATA );
|
||||
}
|
||||
}
|
||||
|
||||
freeptype( HeadType );
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbpcs */
|
||||
/* description : delete a list of BEPCS structures and all objects */
|
||||
/* pointed by any os BEPCSs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbpcs (listvbpcs)
|
||||
|
||||
struct vbpcs *listvbpcs; /* list of vbpcs to be deleted */
|
||||
|
||||
{
|
||||
struct vbpcs *ptvbpcs;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbpcs != NULL)
|
||||
{
|
||||
freechain( listvbpcs->SENSITIVITY );
|
||||
|
||||
vbh_frevbinst( listvbpcs->VARIABLE );
|
||||
vbh_frevbinst( listvbpcs->INSTRUCTION );
|
||||
|
||||
ptvbpcs = listvbpcs;
|
||||
listvbpcs = listvbpcs->NEXT;
|
||||
autfreeheap (ptvbpcs, sizeof(struct vbpcs) );
|
||||
}
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbfun */
|
||||
/* description : delete a list of BEFUN structures and all objects */
|
||||
/* pointed by any os BEFUNs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbfun (listvbfun)
|
||||
|
||||
struct vbfun *listvbfun; /* list of vbfun to be deleted */
|
||||
|
||||
{
|
||||
struct vbfun *ptvbfun;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbfun != NULL)
|
||||
{
|
||||
vbh_frevbarg( listvbfun->RETURN );
|
||||
vbh_frevbarg( listvbfun->ARGUMENT );
|
||||
|
||||
vbh_frevbinst( listvbfun->VARIABLE );
|
||||
vbh_frevbinst( listvbfun->INSTRUCTION );
|
||||
|
||||
ptvbfun = listvbfun;
|
||||
listvbfun = listvbfun->NEXT;
|
||||
autfreeheap (ptvbfun, sizeof(struct vbfun) );
|
||||
}
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : vbh_frevbtyp */
|
||||
/* description : delete a list of BETYP structures and all objects */
|
||||
/* pointed by any os BETYPs in the list */
|
||||
/* called func. : autfreeheap */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void vbh_frevbtyp (listvbtyp)
|
||||
|
||||
struct vbtyp *listvbtyp; /* list of vbtyp to be deleted */
|
||||
|
||||
{
|
||||
struct vbtyp *ptvbtyp;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listvbtyp != NULL)
|
||||
{
|
||||
ptvbtyp = listvbtyp;
|
||||
freevexexpr( ptvbtyp->DYNAMIC_LEFT );
|
||||
freevexexpr( ptvbtyp->DYNAMIC_RIGHT );
|
||||
listvbtyp = listvbtyp->NEXT;
|
||||
autfreeheap (ptvbtyp, sizeof(struct vbtyp) );
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,672 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vbh |
|
||||
| |
|
||||
| File : vbhsimp.c |
|
||||
| |
|
||||
| Date : 03.12.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vbh.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Private Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static vexexpr *((*VbhFunctionL)()) = NULL;
|
||||
static vexexpr *((*VbhFunctionR)()) = NULL;
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Simp Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh Ifs |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvbifs( ScanIfs )
|
||||
|
||||
vbifs_list *ScanIfs;
|
||||
{
|
||||
ScanIfs->CND = (*VbhFunctionR)( ScanIfs->CND );
|
||||
|
||||
if ( ScanIfs->CNDTRUE != (ptype_list *)0 )
|
||||
{
|
||||
vbh_simpvbinst( ScanIfs->CNDTRUE );
|
||||
}
|
||||
|
||||
if ( ScanIfs->CNDFALSE != (ptype_list *)0 )
|
||||
{
|
||||
vbh_simpvbinst( ScanIfs->CNDFALSE );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh Var |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvbvar( ScanVar )
|
||||
|
||||
vbvar_list *ScanVar;
|
||||
{
|
||||
ScanVar->TARGET = (*VbhFunctionL)( ScanVar->TARGET );
|
||||
ScanVar->VEX = (*VbhFunctionR)( ScanVar->VEX );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh Asg |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvbasg( ScanAsg )
|
||||
|
||||
vbasg_list *ScanAsg;
|
||||
{
|
||||
ScanAsg->TARGET = (*VbhFunctionL)( ScanAsg->TARGET );
|
||||
ScanAsg->VEX = (*VbhFunctionR)( ScanAsg->VEX );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh Agr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvbagr( ScanAgr )
|
||||
|
||||
vbagr_list *ScanAgr;
|
||||
{
|
||||
vbh_simpvbinst( ScanAgr->ASSIGN );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh Case |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvbcas( ScanCase )
|
||||
|
||||
vbcas_list *ScanCase;
|
||||
{
|
||||
vbcho_list *ScanChoice;
|
||||
int Offset;
|
||||
|
||||
ScanCase->VEX = (*VbhFunctionR)( ScanCase->VEX );
|
||||
|
||||
for ( Offset = 0; Offset < ScanCase->SIZE; Offset++ )
|
||||
{
|
||||
ScanChoice = &ScanCase->CHOICE[ Offset ];
|
||||
vbh_simpvbinst( ScanChoice->INSTRUCTION );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh Wait |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvbwas( ScanWait )
|
||||
|
||||
vbwas_list *ScanWait;
|
||||
{
|
||||
if ( ScanWait->CND != (vexexpr *)0 )
|
||||
{
|
||||
ScanWait->CND = (*VbhFunctionR)( ScanWait->CND );
|
||||
}
|
||||
|
||||
if ( ScanWait->TIMEOUT != (vexexpr *)0 )
|
||||
{
|
||||
ScanWait->TIMEOUT = (*VbhFunctionR)( ScanWait->TIMEOUT );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh For |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvbfor( ScanFor )
|
||||
|
||||
vbfor_list *ScanFor;
|
||||
{
|
||||
ScanFor->VARIABLE = (*VbhFunctionL)( ScanFor->VARIABLE );
|
||||
|
||||
if ( ScanFor->LEFT != (vexexpr *)0 )
|
||||
{
|
||||
ScanFor->LEFT = (*VbhFunctionR)( ScanFor->LEFT );
|
||||
}
|
||||
|
||||
if ( ScanFor->RIGHT != (vexexpr *)0 )
|
||||
{
|
||||
ScanFor->RIGHT = (*VbhFunctionR)( ScanFor->RIGHT );
|
||||
}
|
||||
|
||||
vbh_simpvbinst( ScanFor->INSTRUCTION );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh While |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvbwhi( ScanWhile )
|
||||
|
||||
vbwhi_list *ScanWhile;
|
||||
{
|
||||
if ( ScanWhile->CND != (vexexpr *)0 )
|
||||
{
|
||||
ScanWhile->CND = (*VbhFunctionR)( ScanWhile->CND );
|
||||
}
|
||||
|
||||
vbh_simpvbinst( ScanWhile->INSTRUCTION );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh Loop |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvblop( ScanLoop )
|
||||
|
||||
vblop_list *ScanLoop;
|
||||
{
|
||||
vbh_simpvbinst( ScanLoop->INSTRUCTION );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh Exit |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvbext( ScanExit )
|
||||
|
||||
vbext_list *ScanExit;
|
||||
{
|
||||
if ( ScanExit->CND != (vexexpr *)0 )
|
||||
{
|
||||
ScanExit->CND = (*VbhFunctionR)( ScanExit->CND );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh Next |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvbnxt( ScanNext )
|
||||
|
||||
vbnxt_list *ScanNext;
|
||||
{
|
||||
if ( ScanNext->CND != (vexexpr *)0 )
|
||||
{
|
||||
ScanNext->CND = (*VbhFunctionR)( ScanNext->CND );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh Return |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvbret( ScanReturn )
|
||||
|
||||
vbret_list *ScanReturn;
|
||||
{
|
||||
if ( ScanReturn->RET != (vexexpr *)0 )
|
||||
{
|
||||
ScanReturn->RET = (*VbhFunctionR)( ScanReturn->RET );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh Call |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void loc_simpvbcal( ScanCall )
|
||||
|
||||
vbcal_list *ScanCall;
|
||||
{
|
||||
if ( ScanCall->CALL != (vexexpr *)0 )
|
||||
{
|
||||
ScanCall->CALL = (*VbhFunctionR)( ScanCall->CALL );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Simp Vbh Instruction |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void vbh_simpvbinst( Instruction )
|
||||
|
||||
ptype_list *Instruction;
|
||||
{
|
||||
while ( Instruction != (ptype_list *)0 )
|
||||
{
|
||||
switch ( Instruction->TYPE )
|
||||
{
|
||||
case VBH_BEIFS : loc_simpvbifs( Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEASG : loc_simpvbasg( Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEVAR : loc_simpvbvar( Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BECAS : loc_simpvbcas( Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEWAS : loc_simpvbwas( Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEFOR : loc_simpvbfor( Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEWHI : loc_simpvbwhi( Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BELOP : loc_simpvblop( Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BENXT : loc_simpvbnxt( Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEEXT : loc_simpvbext( Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BERET : loc_simpvbret( Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BECAL : loc_simpvbcal( Instruction->DATA );
|
||||
break;
|
||||
|
||||
case VBH_BEAGR : loc_simpvbagr( Instruction->DATA );
|
||||
break;
|
||||
}
|
||||
|
||||
Instruction = Instruction->NEXT;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Simp Vbh Instance |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void loc_simpvbins( BeIns )
|
||||
|
||||
vbins_list *BeIns;
|
||||
{
|
||||
vbmap_list *BeMap;
|
||||
|
||||
while ( BeIns != (vbins_list *)0 )
|
||||
{
|
||||
for ( BeMap = BeIns->PORT_MAP;
|
||||
BeMap != (vbmap_list *)0;
|
||||
BeMap = BeMap->NEXT )
|
||||
{
|
||||
if ( BeMap->FORMAL != (vexexpr *)0 )
|
||||
{
|
||||
BeMap->FORMAL = (*VbhFunctionL)( BeMap->FORMAL );
|
||||
}
|
||||
|
||||
if ( BeMap->ACTUAL != (vexexpr *)0 )
|
||||
{
|
||||
BeMap->ACTUAL = (*VbhFunctionR)( BeMap->ACTUAL );
|
||||
}
|
||||
}
|
||||
|
||||
for ( BeMap = BeIns->GEN_MAP;
|
||||
BeMap != (vbmap_list *)0;
|
||||
BeMap = BeMap->NEXT )
|
||||
{
|
||||
if ( BeMap->FORMAL != (vexexpr *)0 )
|
||||
{
|
||||
BeMap->FORMAL = (*VbhFunctionR)( BeMap->FORMAL );
|
||||
}
|
||||
|
||||
if ( BeMap->ACTUAL != (vexexpr *)0 )
|
||||
{
|
||||
BeMap->ACTUAL = (*VbhFunctionL)( BeMap->ACTUAL );
|
||||
}
|
||||
}
|
||||
|
||||
BeIns = BeIns->NEXT;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Simp Vbh Aux |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void loc_simpvbaux( BeAux )
|
||||
|
||||
vbaux_list *BeAux;
|
||||
{
|
||||
while ( BeAux != (vbaux_list *)0 )
|
||||
{
|
||||
BeAux->TARGET = (*VbhFunctionL)( BeAux->TARGET );
|
||||
if ( BeAux->VEX != (vexexpr *)0 )
|
||||
{
|
||||
BeAux->VEX = (*VbhFunctionR)( BeAux->VEX );
|
||||
}
|
||||
|
||||
BeAux = BeAux->NEXT;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Simp Vbh Pcs |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void loc_simpvbpcs( BePcs )
|
||||
|
||||
vbpcs_list *BePcs;
|
||||
{
|
||||
ptype_list *ScanPtype;
|
||||
vbvar_list *BeVar;
|
||||
|
||||
while( BePcs != (vbpcs_list *)0 )
|
||||
{
|
||||
for ( ScanPtype = BePcs->VARIABLE;
|
||||
ScanPtype != (ptype_list *)0;
|
||||
ScanPtype = ScanPtype->NEXT )
|
||||
{
|
||||
BeVar = (vbvar_list *)ScanPtype->DATA;
|
||||
|
||||
BeVar->TARGET = (*VbhFunctionL)( BeVar->TARGET );
|
||||
if ( BeVar->VEX != (vexexpr *)0 )
|
||||
{
|
||||
BeVar->VEX = (*VbhFunctionR)( BeVar->VEX );
|
||||
}
|
||||
}
|
||||
|
||||
vbh_simpvbinst( BePcs->INSTRUCTION );
|
||||
BePcs = BePcs->NEXT;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Simp Vbh Generates |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void loc_simpvbgnr( BeGnr )
|
||||
|
||||
vbgnr_list *BeGnr;
|
||||
{
|
||||
while( BeGnr != (vbgnr_list *)0 )
|
||||
{
|
||||
if ( BeGnr->FOR_VARIABLE != (vexexpr *)0 )
|
||||
{
|
||||
BeGnr->FOR_VARIABLE = (*VbhFunctionL)( BeGnr->FOR_VARIABLE );
|
||||
}
|
||||
|
||||
if ( BeGnr->FOR_LEFT != (vexexpr *)0 )
|
||||
{
|
||||
BeGnr->FOR_LEFT = (*VbhFunctionR)( BeGnr->FOR_LEFT );
|
||||
}
|
||||
|
||||
if ( BeGnr->FOR_RIGHT != (vexexpr *)0 )
|
||||
{
|
||||
BeGnr->FOR_RIGHT = (*VbhFunctionR)( BeGnr->FOR_RIGHT );
|
||||
}
|
||||
|
||||
if ( BeGnr->IF_COND != (vexexpr *)0 )
|
||||
{
|
||||
BeGnr->IF_COND = (*VbhFunctionR)( BeGnr->IF_COND );
|
||||
}
|
||||
|
||||
loc_simpvbpcs( BeGnr->BEPCS );
|
||||
loc_simpvbins( BeGnr->BEINS );
|
||||
loc_simpvbgnr( BeGnr->BEGNR );
|
||||
|
||||
BeGnr = BeGnr->NEXT;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| For All Vex Vbh Figure |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void vbh_forallvexvbfig( Figure, FunctionL, FunctionR )
|
||||
|
||||
vbfig_list *Figure;
|
||||
vexexpr *(*FunctionL)();
|
||||
vexexpr *(*FunctionR)();
|
||||
{
|
||||
vbmod_list *BeMod;
|
||||
vbgen_list *BeGen;
|
||||
vbtyp_list *BeTyp;
|
||||
vbcst_list *BeCst;
|
||||
vbpor_list *BePor;
|
||||
vbfun_list *BeFun;
|
||||
vbarg_list *BePar;
|
||||
vbvar_list *BeVar;
|
||||
ptype_list *ScanPtype;
|
||||
long Left;
|
||||
long Right;
|
||||
|
||||
VbhFunctionL = FunctionL;
|
||||
VbhFunctionR = FunctionR;
|
||||
|
||||
for ( BeTyp = Figure->BETYP;
|
||||
BeTyp != (vbtyp_list *)0;
|
||||
BeTyp = BeTyp->NEXT )
|
||||
{
|
||||
if ( BeTyp->DYNAMIC )
|
||||
{
|
||||
BeTyp->DYNAMIC_LEFT = (*VbhFunctionR)( BeTyp->DYNAMIC_LEFT );
|
||||
BeTyp->DYNAMIC_RIGHT = (*VbhFunctionR)( BeTyp->DYNAMIC_RIGHT );
|
||||
|
||||
if ( ( ! evalvexatomlong( BeTyp->DYNAMIC_LEFT , &Left ) ) &&
|
||||
( ! evalvexatomlong( BeTyp->DYNAMIC_RIGHT, &Right ) ) )
|
||||
{
|
||||
BeTyp->LEFT = Left;
|
||||
BeTyp->RIGHT = Right;
|
||||
BeTyp->DYNAMIC = 0;
|
||||
|
||||
freevexexpr( BeTyp->DYNAMIC_LEFT );
|
||||
freevexexpr( BeTyp->DYNAMIC_RIGHT );
|
||||
|
||||
BeTyp->DYNAMIC_RIGHT = (vexexpr *)0;
|
||||
BeTyp->DYNAMIC_LEFT = (vexexpr *)0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( BePor = Figure->BEPOR;
|
||||
BePor != (vbpor_list *)0;
|
||||
BePor = BePor->NEXT )
|
||||
{
|
||||
BePor->TARGET = (*VbhFunctionL)( BePor->TARGET );
|
||||
if ( BePor->VEX != (vexexpr *)0 )
|
||||
{
|
||||
BePor->VEX = (*VbhFunctionR)( BePor->VEX );
|
||||
}
|
||||
}
|
||||
|
||||
for ( BeGen = Figure->BEGEN;
|
||||
BeGen != (vbgen_list *)0;
|
||||
BeGen = BeGen->NEXT )
|
||||
{
|
||||
BeGen->TARGET = (*VbhFunctionL)( BeGen->TARGET );
|
||||
if ( BeGen->VEX != (vexexpr *)0 )
|
||||
{
|
||||
BeGen->VEX = (*VbhFunctionR)( BeGen->VEX );
|
||||
}
|
||||
}
|
||||
|
||||
for ( BeMod = Figure->BEMOD;
|
||||
BeMod != (vbmod_list *)0;
|
||||
BeMod = BeMod->NEXT )
|
||||
{
|
||||
for ( BePor = BeMod->BEPOR;
|
||||
BePor != (vbpor_list *)0;
|
||||
BePor = BePor->NEXT )
|
||||
{
|
||||
BePor->TARGET = (*VbhFunctionL)( BePor->TARGET );
|
||||
if ( BePor->VEX != (vexexpr *)0 )
|
||||
{
|
||||
BePor->VEX = (*VbhFunctionR)( BePor->VEX );
|
||||
}
|
||||
}
|
||||
|
||||
for ( BeGen = BeMod->BEGEN;
|
||||
BeGen != (vbgen_list *)0;
|
||||
BeGen = BeGen->NEXT )
|
||||
{
|
||||
BeGen->TARGET = (*VbhFunctionL)( BeGen->TARGET );
|
||||
if ( BeGen->VEX != (vexexpr *)0 )
|
||||
{
|
||||
BeGen->VEX = (*VbhFunctionR)( BeGen->VEX );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( BeCst = Figure->BECST;
|
||||
BeCst != (vbcst_list *)0;
|
||||
BeCst = BeCst->NEXT )
|
||||
{
|
||||
BeCst->TARGET = (*VbhFunctionL)( BeCst->TARGET );
|
||||
if ( BeCst->VEX != (vexexpr *)0 )
|
||||
{
|
||||
BeCst->VEX = (*VbhFunctionR)( BeCst->VEX );
|
||||
}
|
||||
}
|
||||
|
||||
for ( BeFun = Figure->BEFUN;
|
||||
BeFun != (vbfun_list *)0;
|
||||
BeFun = BeFun->NEXT )
|
||||
{
|
||||
for ( BePar = BeFun->ARGUMENT;
|
||||
BePar != (vbarg_list *)0;
|
||||
BePar = BePar->NEXT )
|
||||
{
|
||||
BePar->TARGET = (*VbhFunctionL)( BePar->TARGET );
|
||||
}
|
||||
|
||||
if ( BeFun->RETURN != (vbarg_list *)0 )
|
||||
{
|
||||
BePar = BeFun->RETURN;
|
||||
|
||||
BePar->TARGET = (*VbhFunctionL)( BePar->TARGET );
|
||||
}
|
||||
|
||||
for ( ScanPtype = BeFun->VARIABLE;
|
||||
ScanPtype != (ptype_list *)0;
|
||||
ScanPtype = ScanPtype->NEXT )
|
||||
{
|
||||
BeVar = (vbvar_list *)ScanPtype->DATA;
|
||||
|
||||
BeVar->TARGET = (*VbhFunctionL)( BeVar->TARGET );
|
||||
if ( BeVar->VEX != (vexexpr *)0 )
|
||||
{
|
||||
BeVar->VEX = (*VbhFunctionR)( BeVar->VEX );
|
||||
}
|
||||
}
|
||||
|
||||
vbh_simpvbinst( BeFun->INSTRUCTION );
|
||||
}
|
||||
|
||||
loc_simpvbaux( Figure->BEAUX );
|
||||
loc_simpvbins( Figure->BEINS );
|
||||
loc_simpvbpcs( Figure->BEPCS );
|
||||
loc_simpvbgnr( Figure->BEGNR );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Simplify Vbh Figure |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void vbh_simpvbfig( Figure )
|
||||
|
||||
vbfig_list *Figure;
|
||||
{
|
||||
vbh_forallvexvbfig( Figure, simpvexexpr, simpvexexpr );
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1 @@
|
|||
SUBDIRS = src
|
|
@ -0,0 +1,45 @@
|
|||
dnl
|
||||
/*
|
||||
dnl This file is part of the Alliance CAD System
|
||||
dnl Copyright (C) Laboratoire LIP6 - Département ASIM
|
||||
dnl Universite Pierre et Marie Curie
|
||||
dnl
|
||||
dnl Home page : http://www-asim.lip6.fr/alliance/
|
||||
dnl E-mail support : mailto:alliance-support@asim.lip6.fr
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or modify it
|
||||
dnl under the terms of the GNU Library General Public License as published
|
||||
dnl by the Free Software Foundation; either version 2 of the License, or (at
|
||||
dnl your option) any later version.
|
||||
dnl
|
||||
dnl Alliance VLSI CAD System is distributed in the hope that it will be
|
||||
dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
dnl Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License along
|
||||
dnl with the GNU C Library; see the file COPYING. If not, write to the Free
|
||||
dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
dnl
|
||||
dnl Purpose : Auto stuffing Alliance
|
||||
dnl Almost ten years since I wrote this stuff, I just can't
|
||||
dnl believe it
|
||||
dnl Date : 01/02/2002
|
||||
dnl Author : Frederic Petrot <Frederic.Petrot@lip6.fr>
|
||||
dnl $Id: configure.in,v 1.1 2002/03/21 12:45:09 ludo Exp $
|
||||
dnl
|
||||
dnl
|
||||
AC_INIT(src/vpd.h)
|
||||
AM_INIT_AUTOMAKE(vpd, 1.5)
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CC
|
||||
AC_HEADER_STDC
|
||||
AC_C_CONST
|
||||
AC_PROG_RANLIB
|
||||
|
||||
AM_ALLIANCE
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
])
|
|
@ -0,0 +1,7 @@
|
|||
CFLAGS = @CFLAGS@ \
|
||||
-DALLIANCE_TOP=\"${ALLIANCE_TOP}\"
|
||||
lib_LIBRARIES = libVpd.a
|
||||
include_HEADERS = vpd.h
|
||||
libVpd_a_SOURCES = \
|
||||
vpd.h vpd_drive.h vpd_error.h vpd_parse.h \
|
||||
vpd_drive.c vpd_error.c vpd_parse.c
|
|
@ -0,0 +1,68 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Title : Structures and fonctions for VPD |
|
||||
| |
|
||||
| Date : 07.04.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# ifndef VPD_105_H
|
||||
# define VPD_105_H
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Structures |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Global Variables |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,715 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : VPD |
|
||||
| |
|
||||
| File : vpd_drive.c |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 01.01.95 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vpn.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
|
||||
# include "vpd_error.h"
|
||||
# include "vpd_drive.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static FILE *VpnFile;
|
||||
static long VpnExprLength;
|
||||
static char VpnBuffer[ 128 ];
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteNameFile |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteNameFile( Name )
|
||||
|
||||
char *Name;
|
||||
{
|
||||
int Length;
|
||||
|
||||
Length = strlen( Name );
|
||||
|
||||
VpnExprLength += Length;
|
||||
|
||||
if ( VpnExprLength > 80 )
|
||||
{
|
||||
fprintf( VpnFile, "\n" );
|
||||
VpnExprLength = Length;
|
||||
}
|
||||
|
||||
fprintf( VpnFile, Name );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteExprPrefix |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteExprPrefix( Expr )
|
||||
|
||||
vexexpr *Expr;
|
||||
{
|
||||
char *Name;
|
||||
chain_list *ScanOper;
|
||||
|
||||
if ( IsVexNodeAtom( Expr ) )
|
||||
{
|
||||
sprintf( VpnBuffer, "{%d,%d,%x}%s",
|
||||
Expr->LEFT, Expr->RIGHT, Expr->TYPE, GetVexAtomValue( Expr ) );
|
||||
VpnWriteNameFile( VpnBuffer );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( IsVexNodeOper( Expr ) )
|
||||
{
|
||||
Name = getvexoperuppername( GetVexOperValue( Expr ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Name = GetVexFuncValue( Expr );
|
||||
}
|
||||
|
||||
sprintf( VpnBuffer, "({%d,%d,%x}%s",
|
||||
Expr->LEFT, Expr->RIGHT, Expr->TYPE, Name );
|
||||
VpnWriteNameFile( VpnBuffer );
|
||||
|
||||
for ( ScanOper = Expr->OPERAND;
|
||||
ScanOper != (chain_list *)0;
|
||||
ScanOper = ScanOper->NEXT )
|
||||
{
|
||||
VpnWriteNameFile( "~" );
|
||||
VpnWriteExprPrefix( GetVexOperand( ScanOper ) );
|
||||
}
|
||||
|
||||
VpnWriteNameFile( ")" );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteExpr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteExpr( Label, Expr )
|
||||
|
||||
char *Label;
|
||||
vexexpr *Expr;
|
||||
{
|
||||
if ( Expr != (vexexpr *)0 )
|
||||
{
|
||||
VpnExprLength = 0;
|
||||
|
||||
fprintf( VpnFile, "%s\t\n", Label );
|
||||
VpnWriteExprPrefix( Expr );
|
||||
fprintf( VpnFile, "\n" );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteLine |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteLine( Line )
|
||||
|
||||
vpnline_list *Line;
|
||||
{
|
||||
while ( Line != (vpnline_list *)0 )
|
||||
{
|
||||
if ( Line->NAME == (char *)0 )
|
||||
{
|
||||
fprintf( VpnFile, "LINE\t%ld\t\n", Line->LINE );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( VpnFile, "LINE\t%ld\t%s\n", Line->LINE, Line->NAME );
|
||||
}
|
||||
|
||||
Line = Line->NEXT;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteOneSymbol |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteOneSymbol( VpnSymbol )
|
||||
|
||||
vpnsym *VpnSymbol;
|
||||
{
|
||||
fprintf( VpnFile, "SYMBOL\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%s\n",
|
||||
(long)VpnSymbol->INDEX,
|
||||
(long)VpnSymbol->INIT,
|
||||
(long)VpnSymbol->DRIVE,
|
||||
(long)VpnSymbol->EFFEC,
|
||||
(long)VpnSymbol->EVENT,
|
||||
(long)VpnSymbol->FLAGS,
|
||||
VpnSymbol->NAME );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteOneDeclar |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteOneDeclar( VpnDeclar )
|
||||
|
||||
vpndecl_list *VpnDeclar;
|
||||
{
|
||||
int Width;
|
||||
int Scan;
|
||||
|
||||
fprintf( VpnFile, "DECLAR\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld",
|
||||
(long)VpnDeclar->DIR,
|
||||
(long)VpnDeclar->TYPE,
|
||||
(long)VpnDeclar->KIND,
|
||||
(long)VpnDeclar->CLASS,
|
||||
(long)VpnDeclar->BASE,
|
||||
(long)VpnDeclar->FLAGS );
|
||||
|
||||
VpnWriteExpr( "", VpnDeclar->VEX_ATOM );
|
||||
VpnWriteExpr( "INIT", VpnDeclar->VEX_INIT );
|
||||
VpnWriteLine( VpnDeclar->LINE );
|
||||
|
||||
Width = VpnDeclar->VEX_ATOM->WIDTH;
|
||||
|
||||
for ( Scan = 0; Scan < Width; Scan++ )
|
||||
{
|
||||
VpnWriteOneSymbol( &VpnDeclar->DECL_SYM[ Scan ] );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteDeclar |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteDeclar( VpnFigure )
|
||||
|
||||
vpnfig_list *VpnFigure;
|
||||
{
|
||||
vpndecl_list *ScanDeclar;
|
||||
chain_list *ScanChain;
|
||||
int Type;
|
||||
|
||||
for ( Type = 0; Type < VPN_MAX_DECLAR_TYPE; Type++ )
|
||||
{
|
||||
if ( ( Type != VPN_DECLAR_PORT ) &&
|
||||
( Type != VPN_DECLAR_CONSTANT ) &&
|
||||
( Type != VPN_DECLAR_SIGNAL ) ) continue;
|
||||
|
||||
for ( ScanDeclar = VpnFigure->DECLAR[ Type ];
|
||||
ScanDeclar != (vpndecl_list *)0;
|
||||
ScanDeclar = ScanDeclar->NEXT )
|
||||
{
|
||||
VpnWriteOneDeclar( ScanDeclar);
|
||||
}
|
||||
}
|
||||
|
||||
for ( ScanChain = VpnFigure->VAR_DECL;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanDeclar = (vpndecl_list *)ScanChain->DATA;
|
||||
VpnWriteOneDeclar( ScanDeclar);
|
||||
}
|
||||
|
||||
for ( ScanChain = VpnFigure->DEF_DECL;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanDeclar = (vpndecl_list *)ScanChain->DATA;
|
||||
VpnWriteOneDeclar( ScanDeclar);
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteAttribute |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteAttribute( VpnFigure )
|
||||
|
||||
vpnfig_list *VpnFigure;
|
||||
{
|
||||
vpnattr_list *ScanAttr;
|
||||
|
||||
for ( ScanAttr = VpnFigure->ATTRIBUTE;
|
||||
ScanAttr != (vpnattr_list *)0;
|
||||
ScanAttr = ScanAttr->NEXT )
|
||||
{
|
||||
fprintf( VpnFile, "ATTR\t%ld\t%ld\t%s\n",
|
||||
(long)ScanAttr->TYPE,
|
||||
(long)ScanAttr->FLAGS,
|
||||
ScanAttr->NAME );
|
||||
|
||||
fprintf( VpnFile, "ATTR_ENT\t%s\t%s\n",
|
||||
ScanAttr->VALUE,
|
||||
ScanAttr->ENTITY );
|
||||
|
||||
VpnWriteLine( ScanAttr->LINE );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWritePlace |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWritePlace( VpnPlace )
|
||||
|
||||
vpnplace_list *VpnPlace;
|
||||
{
|
||||
vpnplace_list *ScanPlace;
|
||||
|
||||
for ( ScanPlace = VpnPlace;
|
||||
ScanPlace != (vpnplace_list *)0;
|
||||
ScanPlace = ScanPlace->NEXT )
|
||||
{
|
||||
fprintf( VpnFile, "PLACE\t%ld\t%ld\t%ld\t%ld\t%s\n",
|
||||
(long)ScanPlace->FATHER,
|
||||
(long)ScanPlace->TYPE,
|
||||
(long)ScanPlace->TOKEN,
|
||||
(long)ScanPlace->FLAGS,
|
||||
ScanPlace->NAME );
|
||||
|
||||
if ( ScanPlace->LINK != (vpnplace_list *)0 )
|
||||
{
|
||||
fprintf( VpnFile, "LINK\t%s\n", ScanPlace->LINK->NAME );
|
||||
}
|
||||
|
||||
VpnWriteLine( ScanPlace->LINE );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteTrans |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteTrans( VpnTrans )
|
||||
|
||||
vpntrans_list *VpnTrans;
|
||||
{
|
||||
vpntrans_list *ScanTrans;
|
||||
vpnplace_list *ScanPlace;
|
||||
vpnact_list *ScanAct;
|
||||
vpnsym *ScanSymbol;
|
||||
vpnarc *ScanArc;
|
||||
chain_list *ScanChain;
|
||||
|
||||
for ( ScanTrans = VpnTrans;
|
||||
ScanTrans != (vpntrans_list *)0;
|
||||
ScanTrans = ScanTrans->NEXT )
|
||||
{
|
||||
fprintf( VpnFile, "TRANS\t%ld\t%ld\t%ld\t%s\n",
|
||||
(long)ScanTrans->FATHER,
|
||||
(long)ScanTrans->TYPE,
|
||||
(long)ScanTrans->FLAGS,
|
||||
ScanTrans->NAME );
|
||||
|
||||
VpnWriteExpr( "GUARD", ScanTrans->VEX_GUARD );
|
||||
|
||||
for ( ScanChain = ScanTrans->WAIT_SYM;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanSymbol = (vpnsym *)ScanChain->DATA;
|
||||
|
||||
fprintf( VpnFile, "WAIT\t%ld\t%s\n",
|
||||
(long)ScanSymbol->INDEX,
|
||||
ScanSymbol->NAME );
|
||||
}
|
||||
|
||||
for ( ScanAct = ScanTrans->ACT;
|
||||
ScanAct != (vpnact_list *)0;
|
||||
ScanAct = ScanAct->NEXT )
|
||||
{
|
||||
fprintf( VpnFile, "ACT\t%ld\t%ld\n",
|
||||
(long)ScanAct->TYPE,
|
||||
(long)ScanAct->FLAGS );
|
||||
|
||||
VpnWriteExpr( "ACT_ATOM", ScanAct->VEX_ATOM );
|
||||
VpnWriteExpr( "ACT_EXPR", ScanAct->VEX_EXPR );
|
||||
|
||||
VpnWriteLine( ScanAct->LINE );
|
||||
}
|
||||
|
||||
for ( ScanChain = ScanTrans->PLACE_OUT;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanArc = (vpnarc *)ScanChain->DATA;
|
||||
ScanPlace = (vpnplace_list *)ScanArc->TARGET;
|
||||
|
||||
fprintf( VpnFile, "ARC_OUT\t%ld\t%ld\t%s\n",
|
||||
(long)ScanArc->TYPE,
|
||||
(long)ScanArc->FLAGS,
|
||||
ScanPlace->NAME );
|
||||
}
|
||||
|
||||
for ( ScanChain = ScanTrans->PLACE_IN;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanArc = (vpnarc *)ScanChain->DATA;
|
||||
ScanPlace = (vpnplace_list *)ScanArc->SOURCE;
|
||||
|
||||
fprintf( VpnFile, "ARC_IN\t%ld\t%ld\t%s\n",
|
||||
(long)ScanArc->TYPE,
|
||||
(long)ScanArc->FLAGS,
|
||||
ScanPlace->NAME );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteProcess |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteProcess( VpnFigure )
|
||||
|
||||
vpnfig_list *VpnFigure;
|
||||
{
|
||||
vpnproc_list *ScanProc;
|
||||
vpndecl_list *ScanDeclar;
|
||||
chain_list *ScanChain;
|
||||
|
||||
for ( ScanProc = VpnFigure->PROCESS;
|
||||
ScanProc != (vpnproc_list *)0;
|
||||
ScanProc = ScanProc->NEXT )
|
||||
{
|
||||
fprintf( VpnFile, "PROCESS\t%ld\t%ld\t%s\n",
|
||||
(long)ScanProc->TYPE,
|
||||
(long)ScanProc->FLAGS,
|
||||
ScanProc->NAME );
|
||||
|
||||
VpnWriteLine( ScanProc->LINE );
|
||||
|
||||
for ( ScanChain = ScanProc->VAR_DECL;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanDeclar = (vpndecl_list *)ScanChain->DATA;
|
||||
VpnWriteOneDeclar( ScanDeclar );
|
||||
}
|
||||
|
||||
for ( ScanChain = ScanProc->DEF_DECL;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanDeclar = (vpndecl_list *)ScanChain->DATA;
|
||||
VpnWriteOneDeclar( ScanDeclar );
|
||||
}
|
||||
|
||||
VpnWritePlace( ScanProc->PLACE );
|
||||
VpnWriteTrans( ScanProc->TRANS );
|
||||
|
||||
if ( ScanProc->FIRST != (vpntrans_list *)0 )
|
||||
{
|
||||
fprintf( VpnFile, "FIRST\t%s\n", ScanProc->FIRST->NAME );
|
||||
}
|
||||
|
||||
if ( ScanProc->ELABO != (vpntrans_list *)0 )
|
||||
{
|
||||
fprintf( VpnFile, "ELABO\t%s\n", ScanProc->ELABO->NAME );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteFunction |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteFunction( VpnFigure )
|
||||
|
||||
vpnfig_list *VpnFigure;
|
||||
{
|
||||
vpnfunc_list *ScanFunc;
|
||||
vpndecl_list *ScanDeclar;
|
||||
chain_list *ScanChain;
|
||||
|
||||
for ( ScanFunc = VpnFigure->FUNCTION;
|
||||
ScanFunc != (vpnfunc_list *)0;
|
||||
ScanFunc = ScanFunc->NEXT )
|
||||
{
|
||||
fprintf( VpnFile, "FUNCTION\t%ld\t%ld\t%s\n",
|
||||
(long)ScanFunc->TYPE,
|
||||
(long)ScanFunc->FLAGS,
|
||||
ScanFunc->NAME );
|
||||
|
||||
if ( ScanFunc->VEX_RET != (vexexpr *)0 )
|
||||
{
|
||||
VpnWriteExpr( "RET", ScanFunc->VEX_RET );
|
||||
}
|
||||
|
||||
VpnWriteLine( ScanFunc->LINE );
|
||||
|
||||
for ( ScanChain = ScanFunc->ARG_DECL;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanDeclar = (vpndecl_list *)ScanChain->DATA;
|
||||
VpnWriteOneDeclar( ScanDeclar );
|
||||
}
|
||||
|
||||
for ( ScanChain = ScanFunc->VAR_DECL;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanDeclar = (vpndecl_list *)ScanChain->DATA;
|
||||
VpnWriteOneDeclar( ScanDeclar );
|
||||
}
|
||||
|
||||
for ( ScanChain = ScanFunc->DEF_DECL;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanDeclar = (vpndecl_list *)ScanChain->DATA;
|
||||
VpnWriteOneDeclar( ScanDeclar );
|
||||
}
|
||||
|
||||
VpnWritePlace( ScanFunc->PLACE );
|
||||
VpnWriteTrans( ScanFunc->TRANS );
|
||||
|
||||
if ( ScanFunc->FIRST != (vpntrans_list *)0 )
|
||||
{
|
||||
fprintf( VpnFile, "FIRST\t%s\n", ScanFunc->FIRST->NAME );
|
||||
}
|
||||
|
||||
if ( ScanFunc->ELABO != (vpntrans_list *)0 )
|
||||
{
|
||||
fprintf( VpnFile, "ELABO\t%s\n", ScanFunc->ELABO->NAME );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteModel |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteModel( VpnFigure )
|
||||
|
||||
vpnfig_list *VpnFigure;
|
||||
{
|
||||
vpnmod_list *ScanMod;
|
||||
vpnport_list *ScanPort;
|
||||
vpngen_list *ScanGen;
|
||||
|
||||
for ( ScanMod = VpnFigure->MODEL;
|
||||
ScanMod != (vpnmod_list *)0;
|
||||
ScanMod = ScanMod->NEXT )
|
||||
{
|
||||
fprintf( VpnFile, "MODEL\t%ld\t%s\n",
|
||||
(long)ScanMod->FLAGS,
|
||||
ScanMod->NAME );
|
||||
|
||||
VpnWriteLine( ScanMod->LINE );
|
||||
|
||||
for ( ScanPort = ScanMod->PORT;
|
||||
ScanPort != (vpnport_list *)0;
|
||||
ScanPort = ScanPort->NEXT )
|
||||
{
|
||||
fprintf( VpnFile, "PORT\t%ld\t%ld\t%ld",
|
||||
(long)ScanPort->DIR,
|
||||
(long)ScanPort->BASE,
|
||||
(long)ScanPort->FLAGS );
|
||||
|
||||
VpnWriteExpr( "", ScanPort->VEX_ATOM );
|
||||
VpnWriteLine( ScanPort->LINE );
|
||||
}
|
||||
|
||||
for ( ScanGen = ScanMod->GENERIC;
|
||||
ScanGen != (vpngen_list *)0;
|
||||
ScanGen = ScanGen->NEXT )
|
||||
{
|
||||
fprintf( VpnFile, "GEN_MOD\t%ld\t%ld\t",
|
||||
(long)ScanGen->BASE,
|
||||
(long)ScanGen->FLAGS );
|
||||
|
||||
VpnWriteExpr( "", ScanGen->VEX_ATOM );
|
||||
|
||||
VpnWriteExpr( "GEN_EXPR", ScanGen->VEX_EXPR );
|
||||
|
||||
VpnWriteLine( ScanGen->LINE );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteInstance |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteInstance( VpnFigure )
|
||||
|
||||
vpnfig_list *VpnFigure;
|
||||
{
|
||||
vpnins_list *ScanIns;
|
||||
vpnmap_list *ScanMap;
|
||||
vpngen_list *ScanGen;
|
||||
|
||||
for ( ScanIns = VpnFigure->INSTANCE;
|
||||
ScanIns != (vpnins_list *)0;
|
||||
ScanIns = ScanIns->NEXT )
|
||||
{
|
||||
fprintf( VpnFile, "INSTANCE\t%ld\t%s\n",
|
||||
(long)ScanIns->FLAGS,
|
||||
ScanIns->NAME );
|
||||
|
||||
fprintf( VpnFile, "INS_MOD\t%s\n", ScanIns->MODEL->NAME );
|
||||
|
||||
VpnWriteLine( ScanIns->LINE );
|
||||
|
||||
for ( ScanMap = ScanIns->MAP;
|
||||
ScanMap != (vpnmap_list *)0;
|
||||
ScanMap = ScanMap->NEXT )
|
||||
{
|
||||
fprintf( VpnFile, "MAP\t%ld\n", (long)ScanMap->FLAGS );
|
||||
|
||||
VpnWriteExpr( "MAP_FOR", ScanMap->VEX_FORMAL );
|
||||
VpnWriteExpr( "MAP_ACT", ScanMap->VEX_ACTUAL );
|
||||
|
||||
VpnWriteLine( ScanMap->LINE );
|
||||
}
|
||||
|
||||
for ( ScanGen = ScanIns->GENERIC;
|
||||
ScanGen != (vpngen_list *)0;
|
||||
ScanGen = ScanGen->NEXT )
|
||||
{
|
||||
fprintf( VpnFile, "GEN_MAP\t%ld\t%ld\t",
|
||||
(long)ScanGen->BASE,
|
||||
(long)ScanGen->FLAGS );
|
||||
|
||||
VpnWriteExpr( "", ScanGen->VEX_ATOM );
|
||||
|
||||
VpnWriteExpr( "GEN_EXPR", ScanGen->VEX_EXPR );
|
||||
|
||||
VpnWriteLine( ScanGen->LINE );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| VpnWriteFigure |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void VpnWriteFigure( VpnFigure )
|
||||
|
||||
vpnfig_list *VpnFigure;
|
||||
{
|
||||
fprintf( VpnFile, "FIGURE\t%ld\t%s\n",
|
||||
(long)VpnFigure->FLAGS,
|
||||
VpnFigure->NAME );
|
||||
|
||||
VpnWriteDeclar( VpnFigure );
|
||||
VpnWriteProcess( VpnFigure );
|
||||
VpnWriteFunction( VpnFigure );
|
||||
VpnWriteAttribute( VpnFigure );
|
||||
VpnWriteModel( VpnFigure );
|
||||
VpnWriteInstance( VpnFigure );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| vpnsavevpnfig |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void vpnsavevpnfig( VpnFigure )
|
||||
|
||||
vpnfig_list *VpnFigure;
|
||||
{
|
||||
VpnFile = mbkfopen( VpnFigure->NAME, "vpn", "w" );
|
||||
|
||||
if ( VpnFile == (FILE *)0 )
|
||||
{
|
||||
vpderror( VPD_ERROR_OPEN_FILE, VpnFigure->NAME, 0 );
|
||||
}
|
||||
|
||||
VpnWriteFigure( VpnFigure );
|
||||
|
||||
fclose( VpnFile );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : VPD |
|
||||
| |
|
||||
| File : vpddrive.c |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 01.01.95 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPD_DRIVE_H
|
||||
# define VPD_DRIVE_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,124 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : VPD |
|
||||
| |
|
||||
| File : vpd_error.c |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 01.01.95 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
|
||||
# include "vpd_error.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void vpd_error( Error, Text, Value, File, Line )
|
||||
|
||||
int Error;
|
||||
char *Text;
|
||||
long Value;
|
||||
char *File;
|
||||
int Line;
|
||||
{
|
||||
char *Name;
|
||||
|
||||
Name = mbkstrdup( File );
|
||||
Name[ strlen( File ) - 1 ] = '\0';
|
||||
|
||||
fprintf( stderr, "%s%d ", Name, Line );
|
||||
|
||||
switch( Error )
|
||||
{
|
||||
case VPD_ERROR_OPEN_FILE :
|
||||
fprintf( stderr, "Unable to open file \"%s\"\n", Text );
|
||||
break;
|
||||
case VPD_ERROR_PARSE_FILE :
|
||||
fprintf( stderr, "Unable to parse file \"%s\" line %ld\n", Text, Value );
|
||||
break;
|
||||
default :
|
||||
fprintf( stderr, "Internal error number %d\n", Error );
|
||||
}
|
||||
|
||||
autexit( 1 );
|
||||
}
|
||||
|
||||
void vpd_warning( Warning, Text, Value, File, Line )
|
||||
|
||||
int Warning;
|
||||
char *Text;
|
||||
long Value;
|
||||
char *File;
|
||||
int Line;
|
||||
{
|
||||
char *Name;
|
||||
|
||||
Name = mbkstrdup( File );
|
||||
Name[ strlen( File ) - 1 ] = '\0';
|
||||
|
||||
fprintf( stderr, "%s%d ", Name, Line );
|
||||
|
||||
switch ( Warning )
|
||||
{
|
||||
default :
|
||||
fprintf( stderr, "Internal warning number %d\n", Warning );
|
||||
}
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : VPD |
|
||||
| |
|
||||
| File : vpderror.c |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 01.01.95 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPD_ERROR_H
|
||||
# define VPD_ERROR_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# define VPD_ERROR_OPEN_FILE 1
|
||||
# define VPD_ERROR_PARSE_FILE 2
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Warnings |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# define vpderror( E, T, V ) (vpd_error ( (E), (T), (V), __FILE__, __LINE__ ))
|
||||
# define vpdwarning( E, T, V ) (vpd_warning( (E), (T), (V), __FILE__, __LINE__ ))
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
extern void vpd_error __P((int Error, char *Text, long Value, char *File, int Line));
|
||||
extern void vpd_warning __P((int Warning, char *Text, long Value, char *File, int Line));
|
||||
|
||||
# endif
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : VPD |
|
||||
| |
|
||||
| File : vpdparse.c |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 01.01.95 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPD_PARSE_H
|
||||
# define VPD_PARSE_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1 @@
|
|||
SUBDIRS = src
|
|
@ -0,0 +1,45 @@
|
|||
dnl
|
||||
/*
|
||||
dnl This file is part of the Alliance CAD System
|
||||
dnl Copyright (C) Laboratoire LIP6 - Département ASIM
|
||||
dnl Universite Pierre et Marie Curie
|
||||
dnl
|
||||
dnl Home page : http://www-asim.lip6.fr/alliance/
|
||||
dnl E-mail support : mailto:alliance-support@asim.lip6.fr
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or modify it
|
||||
dnl under the terms of the GNU Library General Public License as published
|
||||
dnl by the Free Software Foundation; either version 2 of the License, or (at
|
||||
dnl your option) any later version.
|
||||
dnl
|
||||
dnl Alliance VLSI CAD System is distributed in the hope that it will be
|
||||
dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
dnl Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License along
|
||||
dnl with the GNU C Library; see the file COPYING. If not, write to the Free
|
||||
dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
dnl
|
||||
dnl Purpose : Auto stuffing Alliance
|
||||
dnl Almost ten years since I wrote this stuff, I just can't
|
||||
dnl believe it
|
||||
dnl Date : 01/02/2002
|
||||
dnl Author : Frederic Petrot <Frederic.Petrot@lip6.fr>
|
||||
dnl $Id: configure.in,v 1.1 2002/03/21 12:41:54 ludo Exp $
|
||||
dnl
|
||||
dnl
|
||||
AC_INIT(src/vpn.h)
|
||||
AM_INIT_AUTOMAKE(vpn, 1.5)
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CC
|
||||
AC_HEADER_STDC
|
||||
AC_C_CONST
|
||||
AC_PROG_RANLIB
|
||||
|
||||
AM_ALLIANCE
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
])
|
|
@ -0,0 +1,10 @@
|
|||
CFLAGS = @CFLAGS@ \
|
||||
-DALLIANCE_TOP=\"${ALLIANCE_TOP}\"
|
||||
lib_LIBRARIES = libVpn.a
|
||||
include_HEADERS = vpn.h
|
||||
libVpn_a_SOURCES = \
|
||||
vpnalloc.c vpnenv.h vpnget.c vpnsimp.h \
|
||||
vpnalloc.h vpnerror.c vpnget.h vpnunion.c \
|
||||
vpn.h vpndel.c vpnerror.h vpnsearch.c vpnunion.h \
|
||||
vpnadd.c vpndel.h vpnfree.c vpnsearch.h vpnview.c \
|
||||
vpnadd.h vpnenv.c vpnfree.h vpnsimp.c vpnview.h
|
|
@ -0,0 +1,336 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : main.c |
|
||||
| |
|
||||
| Date : 08.02.95 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vpn.h"
|
||||
# include "vtl.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Usage |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void VpnUsage()
|
||||
{
|
||||
fprintf( stderr, "\t\tvpntest [Options] Input_name [Output_name]\n\n" );
|
||||
fprintf( stdout, "\t\tOptions : -V Sets Verbose mode on\n" );
|
||||
fprintf( stdout, "\t\t -P Partial Verbose mode on\n" );
|
||||
fprintf( stdout, "\t\t -S Saves Vpn figure\n" );
|
||||
fprintf( stdout, "\t\t -I Vpn Input format\n" );
|
||||
fprintf( stdout, "\t\t -U Unreduced figure\n" );
|
||||
fprintf( stdout, "\t\t -O Vpn Output format\n" );
|
||||
fprintf( stdout, "\t\t -E Expand Vpn Figure\n" );
|
||||
fprintf( stdout, "\n" );
|
||||
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Expand Vpn Trans |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void ExpandVpnTrans( VpnFigure, VpnFather, VpnTrans )
|
||||
|
||||
vpnfig_list *VpnFigure;
|
||||
void *VpnFather;
|
||||
vpntrans_list *VpnTrans;
|
||||
{
|
||||
vpntrans_list *ScanTrans;
|
||||
vpntrans_list *LastTrans;
|
||||
vpntrans_list *NewTrans;
|
||||
vpnplace_list *NewPlace;
|
||||
vpnact_list *ScanAction;
|
||||
vpnact_list *FirstAction;
|
||||
chain_list *LastPlaceOut;
|
||||
char Buffer[ 512 ];
|
||||
char *Name;
|
||||
int Number;
|
||||
|
||||
for ( ScanTrans = VpnTrans;
|
||||
ScanTrans != (vpntrans_list *)0;
|
||||
ScanTrans = ScanTrans->NEXT )
|
||||
{
|
||||
if ( ( ScanTrans->TYPE != VPN_TRANS_ACT_GUARDED ) &&
|
||||
( ScanTrans->TYPE != VPN_TRANS_ACT_EXEC ) ) continue;
|
||||
|
||||
if ( ScanTrans->TYPE == VPN_TRANS_ACT_GUARDED )
|
||||
{
|
||||
ScanTrans->TYPE = VPN_TRANS_GUARDED;
|
||||
ScanAction = ScanTrans->ACT;
|
||||
|
||||
ScanTrans->ACT = (vpnact_list *)0;
|
||||
ScanTrans->LAST_ACT = &ScanTrans->ACT;
|
||||
}
|
||||
else
|
||||
{
|
||||
FirstAction = ScanTrans->ACT;
|
||||
ScanAction = FirstAction->NEXT;
|
||||
|
||||
FirstAction->NEXT = (vpnact_list *)0;
|
||||
ScanTrans->LAST_ACT = &FirstAction->NEXT;
|
||||
}
|
||||
|
||||
Number = 0;
|
||||
LastTrans = ScanTrans;
|
||||
NewTrans = ScanTrans;
|
||||
|
||||
LastPlaceOut = ScanTrans->PLACE_OUT;
|
||||
|
||||
ScanTrans->NUMBER_OUT = 0;
|
||||
ScanTrans->PLACE_OUT = (chain_list *)0;
|
||||
|
||||
while ( ScanAction != (vpnact_list *)0 )
|
||||
{
|
||||
sprintf( Buffer, "%s.expand.%d", ScanTrans->NAME, Number++ );
|
||||
Name = namealloc( Buffer );
|
||||
|
||||
if ( ScanTrans->FATHER == VPN_FATHER_PROCESS )
|
||||
{
|
||||
NewTrans = addvpnproctrans( VpnFigure, VpnFather, Name );
|
||||
NewPlace = addvpnprocplace( VpnFigure, VpnFather, Name );
|
||||
}
|
||||
else
|
||||
{
|
||||
NewTrans = addvpnfunctrans( VpnFigure, VpnFather, Name );
|
||||
NewPlace = addvpnfuncplace( VpnFigure, VpnFather, Name );
|
||||
}
|
||||
|
||||
addvpnarctrans( VpnFigure, LastTrans, NewPlace );
|
||||
addvpnarcplace( VpnFigure, NewPlace , NewTrans );
|
||||
|
||||
FirstAction = ScanAction;
|
||||
ScanAction = ScanAction->NEXT;
|
||||
|
||||
NewTrans->TYPE = VPN_TRANS_ACT_EXEC;
|
||||
NewTrans->ACT = FirstAction;
|
||||
NewTrans->LAST_ACT = &FirstAction->NEXT;
|
||||
FirstAction->NEXT = (vpnact_list *)0;
|
||||
|
||||
LastTrans = NewTrans;
|
||||
}
|
||||
|
||||
NewTrans->PLACE_OUT = LastPlaceOut;
|
||||
NewTrans->NUMBER_OUT = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Expand Vpn Figure |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
static void ExpandVpnFigure( VpnFigure )
|
||||
|
||||
vpnfig_list *VpnFigure;
|
||||
{
|
||||
vpnproc_list *VpnProc;
|
||||
vpnfunc_list *VpnFunc;
|
||||
|
||||
for ( VpnProc = VpnFigure->PROCESS;
|
||||
VpnProc != (vpnproc_list *)0;
|
||||
VpnProc = VpnProc->NEXT )
|
||||
{
|
||||
ExpandVpnTrans( VpnFigure, VpnProc, VpnProc->TRANS );
|
||||
}
|
||||
|
||||
for ( VpnFunc = VpnFigure->FUNCTION;
|
||||
VpnFunc != (vpnfunc_list *)0;
|
||||
VpnFunc = VpnFunc->NEXT )
|
||||
{
|
||||
ExpandVpnTrans( VpnFigure, VpnFunc, VpnFunc->TRANS );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int main( argc, argv )
|
||||
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
vpnfig_list *VpnFigure;
|
||||
char *InputFileName;
|
||||
char *OutputFileName;
|
||||
int Number;
|
||||
int Index;
|
||||
char Option;
|
||||
|
||||
int FlagVerbose = 0;
|
||||
int FlagSave = 0;
|
||||
int FlagExpand = 0;
|
||||
int FlagPartial = 0;
|
||||
int FlagUnreduced = 0;
|
||||
|
||||
mbkenv();
|
||||
autenv();
|
||||
vexenv();
|
||||
vpnenv();
|
||||
|
||||
InputFileName = (char *)0;
|
||||
OutputFileName = (char *)0;
|
||||
|
||||
if ( argc < 2 ) VpnUsage();
|
||||
|
||||
InputFileName = (char *)0;
|
||||
|
||||
for ( Number = 1; Number < argc; Number++ )
|
||||
{
|
||||
if ( argv[ Number ][ 0 ] == '-' )
|
||||
{
|
||||
for ( Index = 1; argv[ Number ][ Index ] != '\0'; Index++ )
|
||||
{
|
||||
Option = argv[ Number ][ Index ];
|
||||
|
||||
if ( Option == 'I' )
|
||||
{
|
||||
Number = Number + 1;
|
||||
VPN_IN = namealloc( argv[ Number ] );
|
||||
break;
|
||||
}
|
||||
else
|
||||
if ( Option == 'O' )
|
||||
{
|
||||
Number = Number + 1;
|
||||
VPN_OUT = namealloc( argv[ Number ] );
|
||||
break;
|
||||
}
|
||||
|
||||
switch ( Option )
|
||||
{
|
||||
case 'V' : FlagVerbose = 1;
|
||||
break;
|
||||
case 'P' : FlagPartial = 1;
|
||||
break;
|
||||
case 'S' : FlagSave = 1;
|
||||
break;
|
||||
case 'E' : FlagExpand = 1;
|
||||
break;
|
||||
case 'U' : FlagUnreduced = 1;
|
||||
break;
|
||||
default : VpnUsage();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if ( InputFileName == (char *)0 ) InputFileName = argv[ Number ];
|
||||
else
|
||||
if ( OutputFileName == (char *)0 ) OutputFileName = argv[ Number ];
|
||||
else
|
||||
VpnUsage();
|
||||
}
|
||||
|
||||
if ( InputFileName == (char *)0 ) VpnUsage();
|
||||
if ( OutputFileName == (char *)0 ) OutputFileName = InputFileName;
|
||||
|
||||
if ( ( FlagSave ) && ( InputFileName == OutputFileName ) )
|
||||
{
|
||||
VpnUsage();
|
||||
}
|
||||
|
||||
fprintf( stdout, "VPN_IN : %s\n", VPN_IN );
|
||||
fprintf( stdout, "VPN_OUT : %s\n", VPN_OUT );
|
||||
|
||||
if ( FlagUnreduced )
|
||||
{
|
||||
VpnFigure = addvpnfig( InputFileName );
|
||||
loadvpnfig( VpnFigure, InputFileName, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
VpnFigure = getvpnfig( InputFileName );
|
||||
}
|
||||
|
||||
if ( FlagExpand )
|
||||
{
|
||||
ExpandVpnFigure( VpnFigure );
|
||||
}
|
||||
|
||||
if ( FlagVerbose ) viewvpnfig( VpnFigure );
|
||||
|
||||
if ( FlagPartial )
|
||||
{
|
||||
fprintf( stdout, " -> Number Process %ld\n", GetVpnNumProc( VpnFigure ) );
|
||||
fprintf( stdout, " -> Number Function %ld\n", GetVpnNumFunc( VpnFigure ) );
|
||||
fprintf( stdout, " -> Number Place %ld\n", GetVpnNumPlace( VpnFigure ) );
|
||||
fprintf( stdout, " -> Number Trans %ld\n", GetVpnNumTrans( VpnFigure ) );
|
||||
fprintf( stdout, " -> Number Arc %ld\n", GetVpnNumArc( VpnFigure ) );
|
||||
}
|
||||
|
||||
if ( FlagSave )
|
||||
{
|
||||
VpnFigure->NAME = namealloc( OutputFileName );
|
||||
savevpnfig( VpnFigure );
|
||||
}
|
||||
|
||||
delvpnfig( VpnFigure->NAME );
|
||||
|
||||
return( 0 );
|
||||
}
|
|
@ -0,0 +1,191 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : main.c |
|
||||
| |
|
||||
| Date : 08.02.95 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vpn.h"
|
||||
# include "vtl.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Usage |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void VpnUsage()
|
||||
{
|
||||
fprintf( stderr, "\t\tvpntest [Options] Input_name [Output_name]\n\n" );
|
||||
fprintf( stdout, "\t\tOptions : -V Sets Verbose mode on\n" );
|
||||
fprintf( stdout, "\t\t -S Saves Vpn figure\n" );
|
||||
fprintf( stdout, "\t\t -I Vpn Input format\n" );
|
||||
fprintf( stdout, "\t\t -O Vpn Output format\n" );
|
||||
fprintf( stdout, "\t\t -s Simplifies vex Vpn figure\n" );
|
||||
fprintf( stdout, "\n" );
|
||||
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int main( argc, argv )
|
||||
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
vpnfig_list *VpnFigure;
|
||||
char *InputFileName;
|
||||
char *OutputFileName;
|
||||
int Number;
|
||||
int Index;
|
||||
char Option;
|
||||
|
||||
int FlagVerbose = 0;
|
||||
int FlagSave = 0;
|
||||
int FlagSimp = 0;
|
||||
|
||||
mbkenv();
|
||||
autenv();
|
||||
vexenv();
|
||||
vpnenv();
|
||||
|
||||
InputFileName = (char *)0;
|
||||
|
||||
if ( argc < 2 ) VpnUsage();
|
||||
|
||||
InputFileName = (char *)0;
|
||||
|
||||
for ( Number = 1; Number < argc; Number++ )
|
||||
{
|
||||
if ( argv[ Number ][ 0 ] == '-' )
|
||||
{
|
||||
for ( Index = 1; argv[ Number ][ Index ] != '\0'; Index++ )
|
||||
{
|
||||
Option = argv[ Number ][ Index ];
|
||||
|
||||
if ( Option == 'I' )
|
||||
{
|
||||
Number = Number + 1;
|
||||
VPN_IN = namealloc( argv[ Number ] );
|
||||
break;
|
||||
}
|
||||
else
|
||||
if ( Option == 'O' )
|
||||
{
|
||||
Number = Number + 1;
|
||||
VPN_OUT = namealloc( argv[ Number ] );
|
||||
break;
|
||||
}
|
||||
|
||||
switch ( Option )
|
||||
{
|
||||
case 'V' : FlagVerbose = 1;
|
||||
break;
|
||||
case 'S' : FlagSave = 1;
|
||||
break;
|
||||
case 's' : FlagSimp = 1;
|
||||
break;
|
||||
default : VpnUsage();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if ( InputFileName == (char *)0 ) InputFileName = argv[ Number ];
|
||||
else
|
||||
if ( OutputFileName == (char *)0 ) OutputFileName = argv[ Number ];
|
||||
else
|
||||
VpnUsage();
|
||||
}
|
||||
|
||||
if ( InputFileName == (char *)0 ) VpnUsage();
|
||||
if ( OutputFileName == (char *)0 ) OutputFileName = InputFileName;
|
||||
|
||||
if ( ( FlagSave ) && ( InputFileName == OutputFileName ) )
|
||||
{
|
||||
VpnUsage();
|
||||
}
|
||||
|
||||
fprintf( stdout, "VPN_IN : %s\n", VPN_IN );
|
||||
fprintf( stdout, "VPN_OUT : %s\n", VPN_OUT );
|
||||
|
||||
VpnFigure = getvpnfig( InputFileName );
|
||||
|
||||
if ( FlagSimp )
|
||||
{
|
||||
simpvpnfig( VpnFigure );
|
||||
}
|
||||
|
||||
if ( FlagVerbose ) viewvpnfig( VpnFigure );
|
||||
|
||||
if ( FlagSave )
|
||||
{
|
||||
VpnFigure->NAME = namealloc( OutputFileName );
|
||||
savevpnfig( VpnFigure );
|
||||
}
|
||||
|
||||
delvpnfig( VpnFigure->NAME );
|
||||
|
||||
return( 0 );
|
||||
}
|
|
@ -0,0 +1,955 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Title : Structures and fonctions for VPN |
|
||||
| |
|
||||
| Date : 17.01.2000 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# ifndef VPN_105_H
|
||||
# define VPN_105_H
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Attribute Type |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define VPN_ATTR_NONE 0
|
||||
# define VPN_ATTR_ENTITY 1
|
||||
# define VPN_ATTR_ARCHITECTURE 2
|
||||
# define VPN_ATTR_PACKAGE 3
|
||||
# define VPN_ATTR_FUNCTION 4
|
||||
# define VPN_ATTR_PROCEDURE 5
|
||||
# define VPN_ATTR_SUBTYPE 6
|
||||
# define VPN_ATTR_CONSTANT 7
|
||||
# define VPN_ATTR_VARIABLE 8
|
||||
# define VPN_ATTR_SIGNAL 9
|
||||
# define VPN_ATTR_LABEL 10
|
||||
# define VPN_ATTR_TYPE 11
|
||||
# define VPN_ATTR_CONFIGURATION 12
|
||||
# define VPN_ATTR_COMPONENT 13
|
||||
# define VPN_MAX_ATTR_TYPE 14
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Father Type |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define VPN_FATHER_PROCESS 0
|
||||
# define VPN_FATHER_FUNCTION 1
|
||||
# define VPN_MAX_FATHER_TYPE 2
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Trans Type |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define VPN_TRANS_UNKNOWN 0
|
||||
# define VPN_TRANS_ACT_EXEC 1
|
||||
# define VPN_TRANS_INF_WAIT 2
|
||||
# define VPN_TRANS_SUP_WAIT 3
|
||||
# define VPN_TRANS_GUARDED 4
|
||||
# define VPN_TRANS_IMMEDIATE 5
|
||||
# define VPN_TRANS_ACT_GUARDED 6
|
||||
# define VPN_TRANS_ACT_EXEC_CONC 7
|
||||
# define VPN_TRANS_ACT_GUARDED_CONC 8
|
||||
# define VPN_MAX_TRANS_TYPE 9
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Place Type |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define VPN_PLACE_UNKNOWN 0
|
||||
# define VPN_PLACE_ASSIGN 1
|
||||
# define VPN_PLACE_IF 2
|
||||
# define VPN_PLACE_END_IF 3
|
||||
# define VPN_PLACE_CASE 4
|
||||
# define VPN_PLACE_END_CASE 5
|
||||
# define VPN_PLACE_WAIT 6
|
||||
# define VPN_PLACE_UNTIL 7
|
||||
# define VPN_PLACE_UNTIL_TEST 8
|
||||
# define VPN_PLACE_END_UNTIL 9
|
||||
# define VPN_PLACE_WHILE 10
|
||||
# define VPN_PLACE_WHILE_TEST 11
|
||||
# define VPN_PLACE_END_WHILE 12
|
||||
# define VPN_PLACE_FOR 13
|
||||
# define VPN_PLACE_FOR_LOOP 14
|
||||
# define VPN_PLACE_FOR_TEST 15
|
||||
# define VPN_PLACE_FOR_INC 16
|
||||
# define VPN_PLACE_END_FOR 17
|
||||
# define VPN_PLACE_NEXT 18
|
||||
# define VPN_PLACE_EXIT 19
|
||||
# define VPN_PLACE_CALL 20
|
||||
# define VPN_PLACE_RETURN 21
|
||||
# define VPN_PLACE_PROCESS 22
|
||||
# define VPN_PLACE_FUNCTION 23
|
||||
# define VPN_PLACE_LOOP 24
|
||||
# define VPN_PLACE_END_LOOP 25
|
||||
# define VPN_PLACE_END_EXIT 26
|
||||
# define VPN_PLACE_END_NEXT 27
|
||||
# define VPN_PLACE_GOTO 28
|
||||
# define VPN_PLACE_LABEL 29
|
||||
# define VPN_PLACE_DO 30
|
||||
# define VPN_PLACE_DO_TEST 31
|
||||
# define VPN_PLACE_DO_WHILE 32
|
||||
# define VPN_PLACE_END_DO 33
|
||||
# define VPN_PLACE_SWITCH 34
|
||||
# define VPN_PLACE_END_SWITCH 35
|
||||
# define VPN_PLACE_C_CASE 36
|
||||
# define VPN_PLACE_BREAK 37
|
||||
# define VPN_PLACE_C_RETURN 38
|
||||
# define VPN_MAX_PLACE_TYPE 39
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Argument Class |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define VPN_CLASS_NONE 0
|
||||
# define VPN_CLASS_CONSTANT 1
|
||||
# define VPN_CLASS_VARIABLE 2
|
||||
# define VPN_CLASS_SIGNAL 3
|
||||
# define VPN_MAX_CLASS_TYPE 4
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Direction |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define VPN_DIR_IN 0
|
||||
# define VPN_DIR_OUT 1
|
||||
# define VPN_DIR_INOUT 2
|
||||
# define VPN_MAX_DIR_TYPE 3
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Kind |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define VPN_KIND_NONE 0
|
||||
# define VPN_KIND_BUS 1
|
||||
# define VPN_KIND_REGISTER 2
|
||||
# define VPN_MAX_KIND_TYPE 3
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Declar Type |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define VPN_DECLAR_ALL 0
|
||||
# define VPN_DECLAR_PORT 1
|
||||
# define VPN_DECLAR_SIGNAL 2
|
||||
# define VPN_DECLAR_VARIABLE 3
|
||||
# define VPN_DECLAR_DEFINE 4
|
||||
# define VPN_DECLAR_ARGUMENT 5
|
||||
# define VPN_DECLAR_CONSTANT 6
|
||||
# define VPN_DECLAR_GENERIC 7
|
||||
# define VPN_MAX_DECLAR_TYPE 8
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Action Type |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define VPN_ACT_UNKNOWN 0
|
||||
# define VPN_ACT_ASG_PORT 1
|
||||
# define VPN_ACT_ASG_SIGNAL 2
|
||||
# define VPN_ACT_ASG_VARIABLE 3
|
||||
# define VPN_ACT_ASG_DEFINE 4
|
||||
# define VPN_ACT_ASG_ARG_SIG 5
|
||||
# define VPN_ACT_ASG_ARG_VAR 6
|
||||
# define VPN_ACT_CALL 7
|
||||
# define VPN_ACT_RETURN 8
|
||||
# define VPN_MAX_ACT_TYPE 9
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Arc Type |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define VPN_ARC_PLACE_TRANS 0
|
||||
# define VPN_ARC_TRANS_PLACE 1
|
||||
# define VPN_MAX_ARC_TYPE 2
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Process Type |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define VPN_PROCESS_SEQUENTIAL_MASK 0x01
|
||||
# define VPN_PROCESS_WITHSELECT_MASK 0x02
|
||||
# define VPN_PROCESS_GUARDED_MASK 0x04
|
||||
# define VPN_PROCESS_CONDITIONNAL_MASK 0x08
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Macros |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Is Process Type |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define IsVpnProcSequential( P ) ( (P)->TYPE & VPN_PROCESS_SEQUENTIAL_MASK )
|
||||
# define IsVpnProcWithSelect( P ) ( (P)->TYPE & VPN_PROCESS_WITHSELECT_MASK )
|
||||
# define IsVpnProcConditionnal( P ) ( (P)->TYPE & VPN_PROCESS_CONDITIONNAL_MASK )
|
||||
# define IsVpnProcGuarded( P ) ( (P)->TYPE & VPN_PROCESS_GUARDED_MASK )
|
||||
|
||||
# define SetVpnProcSequential( P ) ( (P)->TYPE |= VPN_PROCESS_SEQUENTIAL_MASK )
|
||||
# define SetVpnProcWithSelect( P ) ( (P)->TYPE |= VPN_PROCESS_WITHSELECT_MASK )
|
||||
# define SetVpnProcConditionnal( P ) ( (P)->TYPE |= VPN_PROCESS_CONDITIONNAL_MASK )
|
||||
# define SetVpnProcGuarded( P ) ( (P)->TYPE |= VPN_PROCESS_GUARDED_MASK )
|
||||
|
||||
# define ClearVpnProcSequential( P ) ( (P)->TYPE &= ~VPN_PROCESS_SEQUENTIAL_MASK )
|
||||
# define ClearVpnProcWithSelect( P ) ( (P)->TYPE &= ~VPN_PROCESS_WITHSELECT_MASK )
|
||||
# define ClearVpnProcConditionnal( P ) ( (P)->TYPE &= ~VPN_PROCESS_CONDITIONNAL_MASK )
|
||||
# define ClearVpnProcGuarded( P ) ( (P)->TYPE &= ~VPN_PROCESS_GUARDED_MASK )
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Get Symbol |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define GetVpnSymbol( C ) ((vpnsym *)( (C)->DATA ))
|
||||
# define GetVpnDeclar( C ) ((vpndecl_list *)( (C)->DATA ))
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Get Arc |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define GetVpnArc( C ) \
|
||||
((vpnarc *)( (C)->DATA ))
|
||||
|
||||
# define GetVpnArcTargetPlace( A ) \
|
||||
((vpnplace_list *)( (vpnarc *)(A)->TARGET ))
|
||||
|
||||
# define GetVpnArcSourcePlace( A ) \
|
||||
((vpnplace_list *)( (vpnarc *)(A)->SOURCE ))
|
||||
|
||||
# define GetVpnArcTargetTrans( A ) \
|
||||
((vpntrans_list *)( (vpnarc *)(A)->TARGET ))
|
||||
|
||||
# define GetVpnArcSourceTrans( A ) \
|
||||
((vpntrans_list *)( (vpnarc *)(A)->SOURCE ))
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Add Arc |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define addvpnarctrans( F, T, P ) \
|
||||
(addvpnarc( (F), (T), (P), VPN_ARC_TRANS_PLACE ))
|
||||
|
||||
# define addvpnarcplace( F, P, T ) \
|
||||
(addvpnarc( (F), (P), (T), VPN_ARC_PLACE_TRANS ))
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Add Action |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define addvpnactcall( F, T, E ) \
|
||||
(addvpnact( (F), (T), (vexexpr *)0, (E), VPN_ACT_CALL ))
|
||||
|
||||
# define addvpnactreturn( F, T, E ) \
|
||||
(addvpnact( (F), (T), (vexexpr *)0, (E), VPN_ACT_RETURN ))
|
||||
|
||||
# define addvpnactcallafter( F, T, P, E ) \
|
||||
(addvpnactafter( (F), (T), (P), (vexexpr *)0, (E), VPN_ACT_CALL ))
|
||||
|
||||
# define addvpnactreturnafter( F, T, P, E ) \
|
||||
(addvpnactafter( (F), (T), (P), (vexexpr *)0, (E), VPN_ACT_RETURN ))
|
||||
|
||||
# define addvpnactcallbefore( F, T, P, E ) \
|
||||
(addvpnactbefore( (F), (T), (P), (vexexpr *)0, (E), VPN_ACT_CALL ))
|
||||
|
||||
# define addvpnactreturnbefore( F, T, P, E ) \
|
||||
(addvpnactafter( (F), (T), (P), (vexexpr *)0, (E), VPN_ACT_RETURN ))
|
||||
|
||||
# define addvpnactcallfirst( F, T, E ) \
|
||||
(addvpnactfirst( (F), (T), (vexexpr *)0, (E), VPN_ACT_CALL ))
|
||||
|
||||
# define addvpnactreturnfirst( F, T, E ) \
|
||||
(addvpnactfirst( (F), (T), (vexexpr *)0, (E), VPN_ACT_RETURN ))
|
||||
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Get Number |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define GetVpnNumProc( F ) ((F)->HASH_PROCESS->NUMBER_ELEM)
|
||||
# define GetVpnNumFunc( F ) ((F)->HASH_FUNCTION->NUMBER_ELEM)
|
||||
# define GetVpnNumTrans( F ) ((F)->HASH_TRANS->NUMBER_ELEM)
|
||||
# define GetVpnNumPlace( F ) ((F)->HASH_PLACE->NUMBER_ELEM)
|
||||
# define GetVpnNumArc( F ) ((F)->HASH_ARC->NUMBER_ELEM)
|
||||
|
||||
# define GetVpnNumDecl( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_ALL ]->NUMBER_ELEM)
|
||||
# define GetVpnNumDeclPort( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_PORT ]->NUMBER_ELEM)
|
||||
# define GetVpnNumDeclSig( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_SIGNAL ]->NUMBER_ELEM)
|
||||
# define GetVpnNumDeclVar( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_VARIABLE ]->NUMBER_ELEM)
|
||||
# define GetVpnNumDeclCst( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_CONSTANT ]->NUMBER_ELEM)
|
||||
# define GetVpnNumDeclDef( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_DEFINE ]->NUMBER_ELEM)
|
||||
# define GetVpnNumDeclArg( F ) ((F)->HASH_DECLAR[ VPN_DECLAR_ARGUMENT ]->NUMBER_ELEM)
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Search Symbol |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define searchvpnsymport( F, N, I ) \
|
||||
(searchvpnsym( (F), (N), (I), VPN_DECLAR_PORT ))
|
||||
# define searchvpnsymsig( F, N, I ) \
|
||||
(searchvpnsym( (F), (N), (I), VPN_DECLAR_SIGNAL ))
|
||||
# define searchvpnsymvar( F, N, I ) \
|
||||
(searchvpnsym( (F), (N), (I), VPN_DECLAR_VARIABLE ))
|
||||
# define searchvpnsymcst( F, N, I ) \
|
||||
(searchvpnsym( (F), (N), (I), VPN_DECLAR_CONSTANT ))
|
||||
# define searchvpnsymdef( F, N, I ) \
|
||||
(searchvpnsym( (F), (N), (I), VPN_DECLAR_DEFINE ))
|
||||
# define searchvpnsymarg( F, N, I ) \
|
||||
(searchvpnsym( (F), (N) (I), VPN_DECLAR_ARGUMENT ))
|
||||
# define searchvpnsymgen( F, N, I ) \
|
||||
(searchvpnsym( (F), (N), (I), VPN_DECLAR_GENERIC ))
|
||||
# define searchvpnsymall( F, N, I ) \
|
||||
(searchvpnsym( (F), (N), (I), VPN_DECLAR_ALL ))
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Search Declar |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
# define searchvpndeclport( F, N ) \
|
||||
(searchvpndecl( (F), (N), VPN_DECLAR_PORT ))
|
||||
# define searchvpndeclsig( F, N ) \
|
||||
(searchvpndecl( (F), (N), VPN_DECLAR_SIGNAL ))
|
||||
# define searchvpndeclvar( F, N ) \
|
||||
(searchvpndecl( (F), (N), VPN_DECLAR_VARIABLE ))
|
||||
# define searchvpndeclcst( F, N ) \
|
||||
(searchvpndecl( (F), (N), VPN_DECLAR_CONSTANT ))
|
||||
# define searchvpndecldef( F, N ) \
|
||||
(searchvpndecl( (F), (N), VPN_DECLAR_DEFINE ))
|
||||
# define searchvpndeclarg( F, N ) \
|
||||
(searchvpndecl( (F), (N), VPN_DECLAR_ARGUMENT ))
|
||||
# define searchvpndeclgen( F, N ) \
|
||||
(searchvpndecl( (F), (N), VPN_DECLAR_GENERIC ))
|
||||
# define searchvpndeclall( F, N ) \
|
||||
(searchvpndecl( (F), (N), VPN_DECLAR_ALL ))
|
||||
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Type |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Line |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpnline_list
|
||||
{
|
||||
struct vpnline_list *NEXT;
|
||||
char *NAME;
|
||||
long LINE;
|
||||
|
||||
} vpnline_list;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Attribute |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpnattr
|
||||
{
|
||||
struct vpnattr *NEXT;
|
||||
char *NAME;
|
||||
char *ENTITY;
|
||||
char *VALUE;
|
||||
unsigned char TYPE;
|
||||
vpnline_list *LINE;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpnattr_list;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Symbol |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpnsym
|
||||
{
|
||||
char *NAME;
|
||||
struct vpndecl_list *DECL;
|
||||
short INDEX;
|
||||
unsigned char INIT;
|
||||
unsigned char DRIVE;
|
||||
unsigned char EFFEC;
|
||||
unsigned char EVENT;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpnsym;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Declaration |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpndecl_list
|
||||
{
|
||||
struct vpndecl_list *NEXT;
|
||||
struct vpndecl_list **PREV;
|
||||
vexexpr *VEX_ATOM;
|
||||
void *BDD_ATOM;
|
||||
vexexpr *VEX_INIT;
|
||||
void *BDD_INIT;
|
||||
vpnsym *DECL_SYM;
|
||||
unsigned char DIR;
|
||||
unsigned char TYPE;
|
||||
unsigned char KIND;
|
||||
unsigned char CLASS;
|
||||
unsigned char BASE;
|
||||
vpnline_list *LINE;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpndecl_list;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Action |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpnact_list
|
||||
{
|
||||
struct vpnact_list *NEXT;
|
||||
struct vpnact_list **PREV;
|
||||
vexexpr *VEX_ATOM;
|
||||
void *BDD_ATOM;
|
||||
vexexpr *VEX_EXPR;
|
||||
void *BDD_EXPR;
|
||||
unsigned char TYPE;
|
||||
vpnline_list *LINE;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpnact_list;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Arc |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpnarc
|
||||
{
|
||||
void *SOURCE;
|
||||
void *TARGET;
|
||||
unsigned char TYPE;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpnarc;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Place |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpnplace_list
|
||||
{
|
||||
struct vpnplace_list *NEXT;
|
||||
struct vpnplace_list **PREV;
|
||||
char *NAME;
|
||||
unsigned char FATHER;
|
||||
unsigned char TYPE;
|
||||
unsigned short TOKEN;
|
||||
unsigned short NUMBER_IN;
|
||||
unsigned short NUMBER_OUT;
|
||||
chain_list *TRANS_IN;
|
||||
chain_list *TRANS_OUT;
|
||||
struct vpnplace_list *LINK;
|
||||
vpnline_list *LINE;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpnplace_list;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Trans |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpntrans_list
|
||||
{
|
||||
struct vpntrans_list *NEXT;
|
||||
struct vpntrans_list **PREV;
|
||||
char *NAME;
|
||||
unsigned char FATHER;
|
||||
unsigned char TYPE;
|
||||
chain_list *WAIT_SYM;
|
||||
unsigned short NUMBER_IN;
|
||||
unsigned short NUMBER_OUT;
|
||||
chain_list *PLACE_IN;
|
||||
chain_list *PLACE_OUT;
|
||||
vpnact_list *ACT;
|
||||
vpnact_list **LAST_ACT;
|
||||
vexexpr *VEX_GUARD;
|
||||
void *BDD_GUARD;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpntrans_list;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Process |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpnproc_list
|
||||
{
|
||||
struct vpnproc_list *NEXT;
|
||||
struct vpnproc_list **PREV;
|
||||
char *NAME;
|
||||
unsigned char TYPE;
|
||||
vpntrans_list *FIRST;
|
||||
vpntrans_list *ELABO;
|
||||
vpnplace_list *PLACE;
|
||||
vpntrans_list *TRANS;
|
||||
chain_list *VAR_DECL;
|
||||
chain_list *DEF_DECL;
|
||||
vpnline_list *LINE;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpnproc_list;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Function |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpnfunc_list
|
||||
{
|
||||
struct vpnfunc_list *NEXT;
|
||||
struct vpnfunc_list **PREV;
|
||||
char *NAME;
|
||||
unsigned char TYPE;
|
||||
vpntrans_list *FIRST;
|
||||
vpntrans_list *ELABO;
|
||||
vpnplace_list *PLACE;
|
||||
vpntrans_list *TRANS;
|
||||
vexexpr *VEX_RET;
|
||||
chain_list *ARG_DECL;
|
||||
chain_list **LAST_ARG;
|
||||
chain_list *VAR_DECL;
|
||||
chain_list *DEF_DECL;
|
||||
vpnline_list *LINE;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpnfunc_list;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Instance |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpnmap_list
|
||||
{
|
||||
struct vpnmap_list *NEXT;
|
||||
vexexpr *VEX_FORMAL;
|
||||
vexexpr *VEX_ACTUAL;
|
||||
vpnline_list *LINE;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpnmap_list;
|
||||
|
||||
typedef struct vpngen_list
|
||||
{
|
||||
struct vpngen_list *NEXT;
|
||||
vexexpr *VEX_ATOM;
|
||||
vexexpr *VEX_EXPR;
|
||||
vpnline_list *LINE;
|
||||
unsigned char BASE;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpngen_list;
|
||||
|
||||
|
||||
typedef struct vpnins_list
|
||||
{
|
||||
struct vpnins_list *NEXT;
|
||||
char *NAME;
|
||||
struct vpnmod_list *MODEL;
|
||||
vpnmap_list *MAP;
|
||||
vpngen_list *GENERIC;
|
||||
vpnline_list *LINE;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpnins_list;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Model |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpnport_list
|
||||
{
|
||||
struct vpnport_list *NEXT;
|
||||
vexexpr *VEX_ATOM;
|
||||
unsigned char DIR;
|
||||
unsigned char BASE;
|
||||
vpnline_list *LINE;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpnport_list;
|
||||
|
||||
typedef struct vpnmod_list
|
||||
{
|
||||
struct vpnmod_list *NEXT;
|
||||
char *NAME;
|
||||
vpnport_list *PORT;
|
||||
vpngen_list *GENERIC;
|
||||
vpnline_list *LINE;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpnmod_list;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Figure |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
typedef struct vpnfig_list
|
||||
{
|
||||
struct vpnfig_list *NEXT;
|
||||
char *NAME;
|
||||
vpnproc_list *PROCESS;
|
||||
vpnfunc_list *FUNCTION;
|
||||
vpnmod_list *MODEL;
|
||||
vpnins_list *INSTANCE;
|
||||
chain_list *VAR_DECL;
|
||||
chain_list *DEF_DECL;
|
||||
vpndecl_list *DECLAR[ VPN_MAX_DECLAR_TYPE ];
|
||||
vpnattr_list *ATTRIBUTE;
|
||||
authtable *HASH_DECLAR[ VPN_MAX_DECLAR_TYPE ];
|
||||
authtable *HASH_PROCESS;
|
||||
authtable *HASH_FUNCTION;
|
||||
authtable *HASH_TRANS;
|
||||
authtable *HASH_PLACE;
|
||||
authtable *HASH_MODEL;
|
||||
authtable *HASH_INSTANCE;
|
||||
auth2table *HASH_ARC;
|
||||
void *CIRCUIT;
|
||||
long FLAGS;
|
||||
void *USER;
|
||||
|
||||
} vpnfig_list;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Global Variables |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern vpnfig_list *HEAD_VPNFIG;
|
||||
|
||||
extern char *VPN_FATHER_TYPE [ VPN_MAX_FATHER_TYPE ];
|
||||
extern char *VPN_ACT_TYPE [ VPN_MAX_ACT_TYPE ];
|
||||
extern char *VPN_TRANS_TYPE [ VPN_MAX_TRANS_TYPE ];
|
||||
extern char *VPN_PLACE_TYPE [ VPN_MAX_PLACE_TYPE ];
|
||||
extern char *VPN_DECLAR_TYPE [ VPN_MAX_DECLAR_TYPE ];
|
||||
extern char *VPN_ARC_TYPE [ VPN_MAX_ARC_TYPE ];
|
||||
extern char *VPN_DIR_TYPE [ VPN_MAX_DIR_TYPE ];
|
||||
extern char *VPN_CLASS_TYPE [ VPN_MAX_CLASS_TYPE ];
|
||||
extern char *VPN_KIND_TYPE [ VPN_MAX_KIND_TYPE ];
|
||||
extern char *VPN_ATTRIBUTE_TYPE[ VPN_MAX_ATTR_TYPE ];
|
||||
|
||||
extern char *VPN_IN;
|
||||
extern char *VPN_OUT;
|
||||
|
||||
extern char *VPN_VHDL_FORMAT;
|
||||
extern char *VPN_VPN_FORMAT;
|
||||
extern char *VPN_VBE_FORMAT;
|
||||
extern char *VPN_VST_FORMAT;
|
||||
extern char *VPN_SYN_FORMAT;
|
||||
extern char *VPN_FSM_FORMAT;
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Env Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern void vpnenv __P(());
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Alloc Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern vpnfig_list *allocvpnfig __P(());
|
||||
extern vpnproc_list *allocvpnproc __P(());
|
||||
extern vpnfunc_list *allocvpnfunc __P(());
|
||||
extern vpnplace_list *allocvpnplace __P(());
|
||||
extern vpntrans_list *allocvpntrans __P(());
|
||||
extern vpnarc *allocvpnarc __P(());
|
||||
extern vpndecl_list *allocvpndecl __P(());
|
||||
extern vpnsym *allocvpnsym __P((unsigned int Width));
|
||||
extern vpnact_list *allocvpnact __P(());
|
||||
extern vpnattr_list *allocvpnattr __P(());
|
||||
extern vpnline_list *allocvpnline __P(());
|
||||
|
||||
extern vpnmod_list *allocvpnmod __P(());
|
||||
extern vpnins_list *allocvpnins __P(());
|
||||
extern vpnport_list *allocvpnport __P(());
|
||||
extern vpnmap_list *allocvpnmap __P(());
|
||||
extern vpngen_list *allocvpngen __P(());
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Free Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern void freevpnfig __P((vpnfig_list *Figure));
|
||||
extern void freevpnproc __P((vpnproc_list *Process));
|
||||
extern void freevpnfunc __P((vpnfunc_list *Function));
|
||||
extern void freevpnplace __P((vpnplace_list *Place));
|
||||
extern void freevpntrans __P((vpntrans_list *Trans));
|
||||
extern void freevpnarc __P((vpnarc *Arc));
|
||||
extern void freevpndecl __P((vpndecl_list *Decl));
|
||||
extern void freevpnsym __P((vpnsym *Sym));
|
||||
extern void freevpnact __P((vpnact_list *Act));
|
||||
extern void freevpnattr __P((vpnattr_list *Attr));
|
||||
extern void freevpnline __P((vpnline_list *Line));
|
||||
|
||||
extern void freevpnmod __P((vpnmod_list *Model));
|
||||
extern void freevpnins __P((vpnins_list *Instance));
|
||||
extern void freevpnport __P((vpnport_list *Port));
|
||||
extern void freevpnmap __P((vpnmap_list *Map));
|
||||
extern void freevpngen __P((vpngen_list *Generic));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Add Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern vpnfig_list *addvpnfig __P((char *Name));
|
||||
extern vpnproc_list *addvpnproc __P((vpnfig_list *Figure, char *Name));
|
||||
extern vpnfunc_list *addvpnfunc __P((vpnfig_list *Figure, char *Name));
|
||||
extern vpnarc *addvpnarc __P((vpnfig_list *Figure, void *Source, void *Target, unsigned char ArcType));
|
||||
extern vpnact_list *addvpnact __P((vpnfig_list *Figure, vpntrans_list *Trans, vexexpr *Atom, vexexpr *Expr, unsigned char Type));
|
||||
extern vpnact_list *addvpnactasg __P((vpnfig_list *Figure, vpntrans_list *Trans, vexexpr *Atom, vexexpr *Expr));
|
||||
extern vpnact_list *addvpnactafter __P((vpnfig_list *Figure, vpntrans_list *Trans, vpnact_list *PrevAction, vexexpr *Atom, vexexpr *Expr, unsigned char Type));
|
||||
extern vpnact_list *addvpnactasgafter __P((vpnfig_list *Figure, vpntrans_list *Trans, vpnact_list *PrevAction, vexexpr *Atom, vexexpr *Expr));
|
||||
extern vpnact_list *addvpnactbefore __P((vpnfig_list *Figure, vpntrans_list *Trans, vpnact_list *NextAction, vexexpr *Atom, vexexpr *Expr, unsigned char Type));
|
||||
extern vpnact_list *addvpnactasgbefore __P((vpnfig_list *Figure, vpntrans_list *Trans, vpnact_list *NextAction, vexexpr *Atom, vexexpr *Expr));
|
||||
extern vpnact_list *addvpnactfirst __P((vpnfig_list *Figure, vpntrans_list *Trans, vexexpr *Atom, vexexpr *Expr, unsigned char Type));
|
||||
extern vpnact_list *addvpnactasgfirst __P((vpnfig_list *Figure, vpntrans_list *Trans, vexexpr *Atom, vexexpr *Expr));
|
||||
|
||||
extern vpndecl_list *addvpndecl __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Type, unsigned char Base));
|
||||
extern vpndecl_list *addvpndeclport __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Base, unsigned char Dir, unsigned char Kind));
|
||||
extern vpndecl_list *addvpndeclsig __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Base, unsigned char Kind));
|
||||
extern vpndecl_list *addvpndeclcst __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Base));
|
||||
extern vpndecl_list *addvpndeclgen __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Base));
|
||||
extern vpndecl_list *addvpndeclvar __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Base));
|
||||
extern vpndecl_list *addvpndecldef __P((vpnfig_list *Figure, vexexpr *Atom, unsigned char Base));
|
||||
extern vpndecl_list *addvpndeclfuncvar __P((vpnfig_list *Figure, vpnfunc_list *Function, vexexpr *Atom, unsigned char Base));
|
||||
extern vpndecl_list *addvpndeclprocvar __P((vpnfig_list *Figure, vpnproc_list *Process, vexexpr *Atom, unsigned char Base));
|
||||
extern vpndecl_list *addvpndeclfuncdef __P((vpnfig_list *Figure, vpnfunc_list *Function, vexexpr *Atom, unsigned char Base));
|
||||
extern vpndecl_list *addvpndeclprocdef __P((vpnfig_list *Figure, vpnproc_list *Process, vexexpr *Atom, unsigned char Base));
|
||||
extern vpndecl_list *addvpndeclfuncarg __P((vpnfig_list *Figure, vpnfunc_list *Function, vexexpr *Atom, unsigned char Base, unsigned char Dir, unsigned char Class));
|
||||
|
||||
extern vpnplace_list *addvpnprocplace __P((vpnfig_list *Figure, vpnproc_list *Process, char *Name));
|
||||
extern vpntrans_list *addvpnproctrans __P((vpnfig_list *Figure, vpnproc_list *Process, char *Name));
|
||||
|
||||
extern vpnplace_list *addvpnfuncplace __P((vpnfig_list *Figure, vpnfunc_list *Function, char *Name));
|
||||
extern vpntrans_list *addvpnfunctrans __P((vpnfig_list *Figure, vpnfunc_list *Function, char *Name));
|
||||
|
||||
extern vpnattr_list *addvpnattr __P((vpnfig_list *Figure, char *Name, char *Entity, unsigned char Type, char *Value ));
|
||||
extern vpnline_list *addvpnline __P((vpnfig_list *Figure, vpnline_list **HeadLine, long Line));
|
||||
extern vpnline_list *addvpnfileline __P((vpnfig_list *Figure, vpnline_list **HeadLine, char *File, long Line));
|
||||
|
||||
extern vpnmod_list *addvpnmod __P((vpnfig_list *Figure, char *Name));
|
||||
extern vpnport_list *addvpnmodport __P((vpnfig_list *Figure, vpnmod_list *Model, vexexpr *Atom, unsigned char Base, unsigned char Dir ));
|
||||
extern vpngen_list *addvpnmodgen __P((vpnfig_list *Figure, vpnmod_list *Model, vexexpr *Atom, vexexpr *Expr, unsigned char Base ));
|
||||
extern vpnins_list *addvpnins __P((vpnfig_list *Figure, char *Name, vpnmod_list *Model));
|
||||
extern vpnmap_list *addvpninsmap __P((vpnfig_list *Figure, vpnins_list *Instance, vexexpr *Formal, vexexpr *Actual ));
|
||||
extern vpngen_list *addvpninsgen __P((vpnfig_list *Figure, vpnins_list *Instance, vexexpr *Atom, vexexpr *Expr));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Union Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern vpnline_list *unionvpnline __P((vpnfig_list *VpnFigure, vpnline_list **HeadLine, vpnline_list *SourceLine));
|
||||
extern vpnline_list *unionvpnfileline __P((vpnfig_list *VpnFigure, vpnline_list **HeadLine, vpnline_list *SourceLine));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Simplify Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern void simpvpnact __P((vpnact_list *VpnAct));
|
||||
extern void simpvpntrans __P((vpntrans_list *VpnTrans));
|
||||
extern void simpvpnproc __P((vpnproc_list *VpnProc));
|
||||
extern void simpvpnfunc __P((vpnfunc_list *VpnFunc));
|
||||
extern void simpvpnfig __P((vpnfig_list *VpnFigure));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Get Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern vpnsym *getvpnsymdecl __P((vpndecl_list *Declar, short Index));
|
||||
extern vpnsym *getvpnsymdeclpos __P((vpndecl_list *Declar, int Position));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Search Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern vpnfig_list *searchvpnfig __P((char *Name));
|
||||
extern vpnproc_list *searchvpnproc __P((vpnfig_list *Figure, char *Name));
|
||||
extern vpnfunc_list *searchvpnfunc __P((vpnfig_list *Figure, char *Name));
|
||||
extern vpnplace_list *searchvpnplace __P((vpnfig_list *Figure, char *Name));
|
||||
extern vpntrans_list *searchvpntrans __P((vpnfig_list *Figure, char *Name));
|
||||
extern vpnarc *searchvpnarc __P((vpnfig_list *Figure, void *Source, void *Target));
|
||||
extern vpnsym *searchvpnsym __P((vpnfig_list *Figure, char *Name, short Index, unsigned char Type));
|
||||
extern vpndecl_list *searchvpndecl __P((vpnfig_list *Figure, char *Name, unsigned char Type));
|
||||
|
||||
extern vpnmod_list *searchvpnmod __P((vpnfig_list *Figure, char *Name));
|
||||
extern vpnins_list *searchvpnins __P((vpnfig_list *Figure, char *Name));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| Delete Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern int delvpnfig __P((char *Name));
|
||||
extern int delvpnplace __P((vpnfig_list *Figure, vpnplace_list *Place));
|
||||
extern int delvpntrans __P((vpnfig_list *Figure, vpntrans_list *Trans));
|
||||
extern int delvpnarc __P((vpnfig_list *Figure, vpnarc *Arc));
|
||||
extern int delvpnact __P((vpnfig_list *Figure, vpntrans_list *Trans, vpnact_list *Action));
|
||||
extern int delvpnline __P((vpnfig_list *Figure, vpnline_list **PrevLine, vpnline_list *Line));
|
||||
extern int delvpnproc __P((vpnfig_list *Figure, vpnproc_list *Process));
|
||||
extern int delvpnfunc __P((vpnfig_list *Figure, vpnfunc_list *Function));
|
||||
|
||||
/*------------------------------------------------------\
|
||||
| |
|
||||
| View Functions |
|
||||
| |
|
||||
\------------------------------------------------------*/
|
||||
|
||||
extern void viewvpnfig __P((vpnfig_list *Figure));
|
||||
extern void viewvpnsym __P((vpnsym *Symbol));
|
||||
extern void viewvpndecl __P((vpndecl_list *Decl));
|
||||
extern void viewvpnact __P((vpnact_list *Action));
|
||||
extern void viewvpnplace __P((vpnplace_list *Place));
|
||||
extern void viewvpntrans __P((vpntrans_list *Trans));
|
||||
extern void viewvpnproc __P((vpnproc_list *Process));
|
||||
extern void viewvpnfunc __P((vpnfunc_list *Function));
|
||||
extern void viewvpnline __P((vpnline_list *Line));
|
||||
|
||||
extern void viewvpnins __P((vpnins_list *Instance));
|
||||
extern void viewvpnmod __P((vpnmod_list *Model));
|
||||
extern void viewvpnport __P((vpnport_list *Port));
|
||||
extern void viewvpnmap __P((vpnmap_list *Map));
|
||||
extern void viewvpngen __P((vpngen_list *Generic));
|
||||
|
||||
# endif
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnadd.h |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPN_ADD_H
|
||||
# define VPN_ADD_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,249 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnalloc.c |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Vpnhor : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vpn.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "vpnalloc.h"
|
||||
# include "vpnerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Figure |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnfig_list *allocvpnfig()
|
||||
{
|
||||
return( (vpnfig_list *)autallocblock( sizeof( vpnfig_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Process |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnproc_list *allocvpnproc()
|
||||
{
|
||||
return( (vpnproc_list *)autallocheap( sizeof( vpnproc_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Function |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnfunc_list *allocvpnfunc()
|
||||
{
|
||||
return( (vpnfunc_list *)autallocheap( sizeof( vpnfunc_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Trans |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpntrans_list *allocvpntrans()
|
||||
{
|
||||
return( (vpntrans_list *)autallocheap( sizeof( vpntrans_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Place |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnplace_list *allocvpnplace()
|
||||
{
|
||||
return( (vpnplace_list *)autallocheap( sizeof( vpnplace_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Arc |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnarc *allocvpnarc()
|
||||
{
|
||||
return( (vpnarc *)autallocheap( sizeof( vpnarc ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Symbol |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnsym *allocvpnsym( Width )
|
||||
|
||||
unsigned int Width;
|
||||
{
|
||||
return( (vpnsym *)autallocblock( sizeof( vpnsym ) * Width ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Declaration |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpndecl_list *allocvpndecl()
|
||||
{
|
||||
return( (vpndecl_list *)autallocheap( sizeof( vpndecl_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Action |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnact_list *allocvpnact()
|
||||
{
|
||||
return( (vpnact_list *)autallocheap( sizeof( vpnact_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Attribute |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnattr_list *allocvpnattr()
|
||||
{
|
||||
return( (vpnattr_list *)autallocheap( sizeof( vpnattr_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Line |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnline_list *allocvpnline()
|
||||
{
|
||||
return( (vpnline_list *)autallocheap( sizeof( vpnline_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Model |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnmod_list *allocvpnmod()
|
||||
{
|
||||
return( (vpnmod_list *)autallocheap( sizeof( vpnmod_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Instance |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnins_list *allocvpnins()
|
||||
{
|
||||
return( (vpnins_list *)autallocheap( sizeof( vpnins_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Port |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnport_list *allocvpnport()
|
||||
{
|
||||
return( (vpnport_list *)autallocheap( sizeof( vpnport_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Map |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnmap_list *allocvpnmap()
|
||||
{
|
||||
return( (vpnmap_list *)autallocheap( sizeof( vpnmap_list ) ) );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Alloc Generic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpngen_list *allocvpngen()
|
||||
{
|
||||
return( (vpngen_list *)autallocheap( sizeof( vpngen_list ) ) );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnalloc.h |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPN_ALLOC_H
|
||||
# define VPN_ALLOC_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpndel.h |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPN_DEL_H
|
||||
# define VPN_DEL_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,119 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnenv.c |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vpn.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <unistd.h>
|
||||
# include "vpnenv.h"
|
||||
# include "vpnerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
char *VPN_IN;
|
||||
char *VPN_OUT;
|
||||
|
||||
char *VPN_VHDL_FORMAT = (char *)0;
|
||||
char *VPN_VPN_FORMAT = (char *)0;
|
||||
char *VPN_VBE_FORMAT = (char *)0;
|
||||
char *VPN_VST_FORMAT = (char *)0;
|
||||
char *VPN_SYN_FORMAT = (char *)0;
|
||||
char *VPN_FSM_FORMAT = (char *)0;
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| vpnenv |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void vpnenv()
|
||||
{
|
||||
VPN_IN = namealloc( mbkgetenv( "VPN_IN") );
|
||||
|
||||
if ( VPN_IN == (char *)0 )
|
||||
{
|
||||
VPN_IN = namealloc( VPN_DEFAULT_IN );
|
||||
}
|
||||
|
||||
VPN_OUT = namealloc( mbkgetenv( "VPN_OUT") );
|
||||
|
||||
if ( VPN_OUT == (char *)0 )
|
||||
{
|
||||
VPN_OUT = namealloc( VPN_DEFAULT_OUT );
|
||||
}
|
||||
|
||||
VPN_VHDL_FORMAT = namealloc( "vhdl" );
|
||||
VPN_VPN_FORMAT = namealloc( "vpn" );
|
||||
VPN_SYN_FORMAT = namealloc( "vhd" );
|
||||
VPN_VBE_FORMAT = namealloc( "vbe" );
|
||||
VPN_VST_FORMAT = namealloc( "vst" );
|
||||
VPN_FSM_FORMAT = namealloc( "fsm" );
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnenv.h |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPN_ENV_H
|
||||
# define VPN_ENV_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# define VPN_DEFAULT_IN "vhdl"
|
||||
# define VPN_DEFAULT_OUT "vhdl"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,207 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : Vpn Errors |
|
||||
| |
|
||||
| Vpnhors : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include <signal.h>
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vpn.h"
|
||||
# include "vpnerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Error Function |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void vpn_error( Error, Text1, Text2, File, Line )
|
||||
|
||||
int Error;
|
||||
char *Text1;
|
||||
char *Text2;
|
||||
char *File;
|
||||
long Line;
|
||||
{
|
||||
char *Name;
|
||||
|
||||
Name = mbkstrdup( File );
|
||||
Name[ strlen( File ) - 1 ] = '\0';
|
||||
|
||||
fprintf( stderr, "%s%ld ", Name, Line );
|
||||
|
||||
switch( Error )
|
||||
{
|
||||
case VPN_PROC_EXIST_ERROR :
|
||||
fprintf( stderr, "process %s exists already\n", Text1 );
|
||||
break;
|
||||
case VPN_FUNC_EXIST_ERROR :
|
||||
fprintf( stderr, "function %s exists already\n", Text1 );
|
||||
break;
|
||||
case VPN_PLACE_EXIST_ERROR :
|
||||
fprintf( stderr, "place %s exists already\n", Text1 );
|
||||
break;
|
||||
case VPN_TRANS_EXIST_ERROR :
|
||||
fprintf( stderr, "transition %s exists already\n", Text1 );
|
||||
break;
|
||||
case VPN_PORT_EXIST_ERROR :
|
||||
fprintf( stderr, "port %s exists already\n", Text1 );
|
||||
break;
|
||||
case VPN_ARC_PLACE_EXIST_ERROR :
|
||||
fprintf( stderr, "arc place %s to %s exists already\n", Text1, Text2 );
|
||||
break;
|
||||
case VPN_ARC_TRANS_EXIST_ERROR :
|
||||
fprintf( stderr, "arc trans %s to %s exists already\n", Text1, Text2 );
|
||||
break;
|
||||
case VPN_UNKNOWN_DECLAR_TYPE :
|
||||
fprintf( stderr, "unknown declar type %ld for %s\n", (long)Text1, Text2 );
|
||||
break;
|
||||
case VPN_SIGNAL_EXIST_ERROR :
|
||||
fprintf( stderr, "signal %s exists already\n", Text1 );
|
||||
break;
|
||||
case VPN_VARIABLE_EXIST_ERROR :
|
||||
fprintf( stderr, "variable %s exists already\n", Text1 );
|
||||
break;
|
||||
case VPN_DEFINE_EXIST_ERROR :
|
||||
fprintf( stderr, "define %s exists already\n", Text1 );
|
||||
break;
|
||||
case VPN_ARGUMENT_EXIST_ERROR :
|
||||
fprintf( stderr, "argument %s exists already\n", Text1 );
|
||||
break;
|
||||
case VPN_CONSTANT_EXIST_ERROR :
|
||||
fprintf( stderr, "constant %s exists already\n", Text1 );
|
||||
break;
|
||||
case VPN_DEL_ARC_PLACE_ERROR :
|
||||
fprintf( stderr, "unable to delete arc from place %s\n", Text1 );
|
||||
break;
|
||||
case VPN_DEL_ARC_TRANS_ERROR :
|
||||
fprintf( stderr, "unable to delete arc from trans %s\n", Text1 );
|
||||
break;
|
||||
case VPN_TRANS_FATHER_UNKNOWN :
|
||||
fprintf( stderr, "unknown father type %ld for transition %s\n", (long)Text1, Text2 );
|
||||
break;
|
||||
case VPN_DECLAR_EXIST_ERROR :
|
||||
fprintf( stderr, "symbol %s already declared\n", Text1 );
|
||||
break;
|
||||
case VPN_BAD_DECLAR_TYPE :
|
||||
fprintf( stderr, "bad declaration type %ld\n", (long)Text1 );
|
||||
break;
|
||||
case VPN_BAD_ASSIGN_TYPE :
|
||||
fprintf( stderr, "bad assign %s, type %ld\n", Text1, (long)Text2 );
|
||||
break;
|
||||
case VPN_UNDECLARED_SYMBOL :
|
||||
fprintf( stderr, "undeclared symbol %s\n", Text1 );
|
||||
break;
|
||||
case VPN_ILLEGAL_POSITION_ERROR :
|
||||
fprintf( stderr, "illegal position for symbol %s %ld\n", Text1, (long)Text2 );
|
||||
break;
|
||||
case VPN_ILLEGAL_INDEX_ERROR :
|
||||
fprintf( stderr, "illegal index for symbol %s %ld\n", Text1, (long)Text2 );
|
||||
break;
|
||||
case VPN_MOD_EXIST_ERROR :
|
||||
fprintf( stderr, "model %s exists already\n", Text1 );
|
||||
break;
|
||||
case VPN_INS_EXIST_ERROR :
|
||||
fprintf( stderr, "instance %s exists already\n", Text1 );
|
||||
break;
|
||||
case VPN_GENERIC_EXIST_ERROR :
|
||||
fprintf( stderr, "generic %s exists already\n", Text1 );
|
||||
break;
|
||||
default :
|
||||
|
||||
fprintf( stderr, "unknown internal error %d !\n", Error );
|
||||
}
|
||||
|
||||
autexit( 1 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Warning Function |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void vpn_warning( Warning, Text1, Text2, File, Line )
|
||||
|
||||
int Warning;
|
||||
char *Text1;
|
||||
char *Text2;
|
||||
char *File;
|
||||
long Line;
|
||||
{
|
||||
char *Name;
|
||||
|
||||
Name = mbkstrdup( File );
|
||||
Name[ strlen( File ) - 1 ] = '\0';
|
||||
|
||||
fprintf( stderr, "%s%ld ", Name, Line );
|
||||
|
||||
switch ( Warning )
|
||||
{
|
||||
default :
|
||||
|
||||
fprintf( stderr, "unknown internal warning %d !\n", Warning );
|
||||
}
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : Vpn Errors |
|
||||
| |
|
||||
| Vpnhors : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPN_ERROR_H
|
||||
# define VPN_ERROR_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# define VPN_PLACE_EXIST_ERROR 0
|
||||
# define VPN_TRANS_EXIST_ERROR 1
|
||||
# define VPN_PORT_EXIST_ERROR 2
|
||||
# define VPN_ARC_PLACE_EXIST_ERROR 3
|
||||
# define VPN_ARC_TRANS_EXIST_ERROR 4
|
||||
# define VPN_SIGNAL_EXIST_ERROR 6
|
||||
# define VPN_VARIABLE_EXIST_ERROR 7
|
||||
# define VPN_DEFINE_EXIST_ERROR 8
|
||||
# define VPN_CONSTANT_EXIST_ERROR 9
|
||||
# define VPN_TRANS_FATHER_UNKNOWN 10
|
||||
# define VPN_PROC_EXIST_ERROR 11
|
||||
# define VPN_DEL_ARC_PLACE_ERROR 12
|
||||
# define VPN_DEL_ARC_TRANS_ERROR 13
|
||||
# define VPN_FUNC_EXIST_ERROR 14
|
||||
# define VPN_UNKNOWN_DECLAR_TYPE 15
|
||||
# define VPN_ARGUMENT_EXIST_ERROR 16
|
||||
# define VPN_UNDECLARED_SYMBOL 17
|
||||
# define VPN_DECLAR_EXIST_ERROR 18
|
||||
# define VPN_BAD_DECLAR_TYPE 19
|
||||
# define VPN_BAD_ASSIGN_TYPE 20
|
||||
# define VPN_ILLEGAL_INDEX_ERROR 21
|
||||
# define VPN_ILLEGAL_POSITION_ERROR 22
|
||||
# define VPN_INS_EXIST_ERROR 23
|
||||
# define VPN_MOD_EXIST_ERROR 24
|
||||
# define VPN_GENERIC_EXIST_ERROR 25
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macros |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# define vpnerror( E, V1, V2 ) \
|
||||
(vpn_error((int)(E),(char*)(long)(V1),(char*)(long)(V2),__FILE__,__LINE__))
|
||||
|
||||
# define vpnwarning( E, V1, V2 ) \
|
||||
(vpn_warning( (int)(E),(char*)(long)(V1),(char*)(long)(V2),__FILE__,__LINE__))
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
extern void vpn_error __P((int Error, char *Text1, char *Text2, char *File, long Line));
|
||||
extern void vpn_warning __P((int Warning, char *Text1, char *Text2, char *File, long Line));
|
||||
|
||||
# endif
|
|
@ -0,0 +1,286 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnfree.c |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vpn.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include "vpnfree.h"
|
||||
# include "vpnalloc.h"
|
||||
# include "vpnerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Figure |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnfig( Figure )
|
||||
|
||||
vpnfig_list *Figure;
|
||||
{
|
||||
autfreeblock( (char *)Figure );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Process |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnproc( Process )
|
||||
|
||||
vpnproc_list *Process;
|
||||
{
|
||||
autfreeheap( (char *)Process, sizeof( vpnproc_list ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Function |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnfunc( Function )
|
||||
|
||||
vpnfunc_list *Function;
|
||||
{
|
||||
autfreeheap( (char *)Function, sizeof( vpnfunc_list ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Place |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnplace( Place )
|
||||
|
||||
vpnplace_list *Place;
|
||||
{
|
||||
autfreeheap( (char *)Place, sizeof( vpnplace_list ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Arc |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnarc( Arc )
|
||||
|
||||
vpnarc *Arc;
|
||||
{
|
||||
autfreeheap( (char *)Arc, sizeof( vpnarc ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Action |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnact( Act )
|
||||
|
||||
vpnact_list *Act;
|
||||
{
|
||||
autfreeheap( (char *)Act, sizeof( vpnact_list ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Symbol |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnsym( Sym )
|
||||
|
||||
vpnsym *Sym;
|
||||
{
|
||||
autfreeblock( (char *)Sym );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Declaration |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpndecl( Decl )
|
||||
|
||||
vpndecl_list *Decl;
|
||||
{
|
||||
autfreeheap( (char *)Decl, sizeof( vpndecl_list ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Trans |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpntrans( Trans )
|
||||
|
||||
vpntrans_list *Trans;
|
||||
{
|
||||
autfreeheap( (char *)Trans, sizeof( vpntrans_list ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Attr |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnattr( Attr )
|
||||
|
||||
vpnattr_list *Attr;
|
||||
{
|
||||
autfreeheap( (char *)Attr, sizeof( vpnattr_list ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Line |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnline( Line )
|
||||
|
||||
vpnline_list *Line;
|
||||
{
|
||||
autfreeheap( (char *)Line, sizeof( vpnline_list ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Model |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnmod( Model )
|
||||
|
||||
vpnmod_list *Model;
|
||||
{
|
||||
autfreeheap( (char *)Model, sizeof( vpnmod_list ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Instance |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnins( Instance )
|
||||
|
||||
vpnins_list *Instance;
|
||||
{
|
||||
autfreeheap( (char *)Instance, sizeof( vpnins_list ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Port |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnport( Port )
|
||||
|
||||
vpnport_list *Port;
|
||||
{
|
||||
autfreeheap( (char *)Port, sizeof( vpnport_list ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Map |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpnmap( Map )
|
||||
|
||||
vpnmap_list *Map;
|
||||
{
|
||||
autfreeheap( (char *)Map, sizeof( vpnmap_list ));
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Free Generic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void freevpngen( Generic )
|
||||
|
||||
vpngen_list *Generic;
|
||||
{
|
||||
autfreeheap( (char *)Generic, sizeof( vpngen_list ));
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnfree.h |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPN_FREE_H
|
||||
# define VPN_FREE_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,126 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnget.c |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vpn.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "vpnget.h"
|
||||
# include "vpnerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Get Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Vpn Symbol From Declaration |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnsym *getvpnsymdecl( Declar, Index )
|
||||
|
||||
vpndecl_list *Declar;
|
||||
short Index;
|
||||
{
|
||||
vexexpr *Atom;
|
||||
int Position;
|
||||
|
||||
Atom = Declar->VEX_ATOM;
|
||||
Position = getvexvectorpos( Atom, Index );
|
||||
|
||||
if ( Position < 0 )
|
||||
{
|
||||
vpnerror( VPN_ILLEGAL_INDEX_ERROR, GetVexAtomValue( Atom ), Index );
|
||||
}
|
||||
|
||||
|
||||
return( &Declar->DECL_SYM[ Position ] );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Get Vpn Symbol From Declaration |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnsym *getvpnsymdeclpos( Declar, Position )
|
||||
|
||||
vpndecl_list *Declar;
|
||||
int Position;
|
||||
{
|
||||
vexexpr *Atom;
|
||||
|
||||
Atom = Declar->VEX_ATOM;
|
||||
|
||||
if ( ( Position >= Atom->WIDTH ) ||
|
||||
( Position < 0 ) )
|
||||
{
|
||||
vpnerror( VPN_ILLEGAL_POSITION_ERROR, GetVexAtomValue( Atom ), Position );
|
||||
}
|
||||
|
||||
return( &Declar->DECL_SYM[ Position ] );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnget.h |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPN_GET_H
|
||||
# define VPN_GET_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,369 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnsearch.c |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vpn.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "vpnsearch.h"
|
||||
# include "vpnerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Search Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Search Figure |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnfig_list *searchvpnfig( Name )
|
||||
|
||||
char *Name;
|
||||
{
|
||||
vpnfig_list *Figure;
|
||||
|
||||
Name = namealloc( Name );
|
||||
|
||||
for ( Figure = HEAD_VPNFIG;
|
||||
Figure != (vpnfig_list *)0;
|
||||
Figure = Figure->NEXT )
|
||||
{
|
||||
if ( Figure->NAME == Name ) break;
|
||||
}
|
||||
|
||||
return( Figure );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Search Process |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnproc_list *searchvpnproc( Figure, Name )
|
||||
|
||||
vpnfig_list *Figure;
|
||||
char *Name;
|
||||
{
|
||||
authelem *Element;
|
||||
|
||||
Name = namealloc( Name );
|
||||
Element = searchauthelem( Figure->HASH_PROCESS, Name );
|
||||
|
||||
if ( Element != (authelem *)0 )
|
||||
{
|
||||
return( (vpnproc_list *)( Element->VALUE ) );
|
||||
}
|
||||
|
||||
return( (vpnproc_list *)0 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Search Function |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnfunc_list *searchvpnfunc( Figure, Name )
|
||||
|
||||
vpnfig_list *Figure;
|
||||
char *Name;
|
||||
{
|
||||
authelem *Element;
|
||||
|
||||
Name = namealloc( Name );
|
||||
Element = searchauthelem( Figure->HASH_FUNCTION, Name );
|
||||
|
||||
if ( Element != (authelem *)0 )
|
||||
{
|
||||
return( (vpnfunc_list *)( Element->VALUE ) );
|
||||
}
|
||||
|
||||
return( (vpnfunc_list *)0 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Search Model |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnmod_list *searchvpnmod( Figure, Name )
|
||||
|
||||
vpnfig_list *Figure;
|
||||
char *Name;
|
||||
{
|
||||
authelem *Element;
|
||||
|
||||
Name = namealloc( Name );
|
||||
Element = searchauthelem( Figure->HASH_MODEL, Name );
|
||||
|
||||
if ( Element != (authelem *)0 )
|
||||
{
|
||||
return( (vpnmod_list *)( Element->VALUE ) );
|
||||
}
|
||||
|
||||
return( (vpnmod_list *)0 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Search Instance |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnins_list *searchvpnins( Figure, Name )
|
||||
|
||||
vpnfig_list *Figure;
|
||||
char *Name;
|
||||
{
|
||||
authelem *Element;
|
||||
|
||||
Name = namealloc( Name );
|
||||
Element = searchauthelem( Figure->HASH_INSTANCE, Name );
|
||||
|
||||
if ( Element != (authelem *)0 )
|
||||
{
|
||||
return( (vpnins_list *)( Element->VALUE ) );
|
||||
}
|
||||
|
||||
return( (vpnins_list *)0 );
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Search Place |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnplace_list *searchvpnplace( Figure, Name )
|
||||
|
||||
vpnfig_list *Figure;
|
||||
char *Name;
|
||||
{
|
||||
authelem *Element;
|
||||
|
||||
Name = namealloc( Name );
|
||||
Element = searchauthelem( Figure->HASH_PLACE, Name );
|
||||
|
||||
if ( Element != (authelem *)0 )
|
||||
{
|
||||
return( (vpnplace_list *)( Element->VALUE ) );
|
||||
}
|
||||
|
||||
return( (vpnplace_list *)0 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Search Trans |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpntrans_list *searchvpntrans( Figure, Name )
|
||||
|
||||
vpnfig_list *Figure;
|
||||
char *Name;
|
||||
{
|
||||
authelem *Element;
|
||||
|
||||
Name = namealloc( Name );
|
||||
Element = searchauthelem( Figure->HASH_TRANS, Name );
|
||||
|
||||
if ( Element != (authelem *)0 )
|
||||
{
|
||||
return( (vpntrans_list *)( Element->VALUE ) );
|
||||
}
|
||||
|
||||
return( (vpntrans_list *)0 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Local Vpn Search Symbol |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnsym *searchvpnsym( Figure, Name, Index, Type )
|
||||
|
||||
vpnfig_list *Figure;
|
||||
char *Name;
|
||||
short Index;
|
||||
unsigned char Type;
|
||||
{
|
||||
authtable *HashTable;
|
||||
authelem *Element;
|
||||
vexexpr *Atom;
|
||||
vpndecl_list *Decl;
|
||||
short Bound;
|
||||
|
||||
if ( Type >= VPN_MAX_DECLAR_TYPE )
|
||||
{
|
||||
vpnerror( VPN_UNKNOWN_DECLAR_TYPE, Type, Name );
|
||||
}
|
||||
|
||||
Name = namealloc( Name );
|
||||
HashTable = Figure->HASH_DECLAR[ Type ];
|
||||
Element = searchauthelem( HashTable, Name );
|
||||
|
||||
if ( Element != (authelem *)0 )
|
||||
{
|
||||
Decl = (vpndecl_list *)( Element->VALUE );
|
||||
Atom = Decl->VEX_ATOM;
|
||||
|
||||
if ( ! IsVexNodeAtom( Atom ) )
|
||||
{
|
||||
Atom = getvexarrayatom( Atom );
|
||||
}
|
||||
|
||||
Bound = Atom->WIDTH - 1;
|
||||
|
||||
if ( Index == -1 )
|
||||
{
|
||||
if ( Bound == 0 ) return( Decl->DECL_SYM );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( IsVexAtomDown( Atom ) )
|
||||
{
|
||||
if ( ( Index <= Atom->LEFT ) &&
|
||||
( Index >= Atom->RIGHT ) )
|
||||
{
|
||||
Index -= Atom->RIGHT;
|
||||
|
||||
return( &Decl->DECL_SYM[ Bound - Index ] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ( Index >= Atom->LEFT ) &&
|
||||
( Index <= Atom->RIGHT ) )
|
||||
{
|
||||
Index -= Atom->LEFT;
|
||||
|
||||
return( &Decl->DECL_SYM[ Index ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return( (vpnsym *)0 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Search Arc |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnarc *searchvpnarc( Figure, Source, Target )
|
||||
|
||||
vpnfig_list *Figure;
|
||||
void *Source;
|
||||
void *Target;
|
||||
{
|
||||
auth2elem *Element;
|
||||
|
||||
Element = searchauth2elem( Figure->HASH_ARC, Source, Target );
|
||||
|
||||
if ( Element != (auth2elem *)0 )
|
||||
{
|
||||
return( (vpnarc *)( Element->VALUE ) );
|
||||
}
|
||||
|
||||
return( (vpnarc *)0 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Search Declaration |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpndecl_list *searchvpndecl( Figure, Name, Type )
|
||||
|
||||
vpnfig_list *Figure;
|
||||
char *Name;
|
||||
unsigned char Type;
|
||||
{
|
||||
authtable *HashTable;
|
||||
authelem *Element;
|
||||
|
||||
HashTable = Figure->HASH_DECLAR[ Type ];
|
||||
|
||||
Name = namealloc( Name );
|
||||
Element = searchauthelem( HashTable, Name );
|
||||
|
||||
if ( Element != (authelem *)0 )
|
||||
{
|
||||
return( (vpndecl_list *)( Element->VALUE ) );
|
||||
}
|
||||
|
||||
return( (vpndecl_list *)0 );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnsearch.h |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPN_SEARCH_H
|
||||
# define VPN_SEARCH_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,178 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : VPN |
|
||||
| |
|
||||
| File : vpnsimp.c |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 01.01.95 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vpn.h"
|
||||
|
||||
# include "vpnerror.h"
|
||||
# include "vpnsimp.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Private Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| simpvpnact |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void simpvpnact( VpnAct )
|
||||
|
||||
vpnact_list *VpnAct;
|
||||
{
|
||||
VpnAct->VEX_ATOM = simpvexexpr( VpnAct->VEX_ATOM );
|
||||
VpnAct->VEX_EXPR = simpvexexpr( VpnAct->VEX_EXPR );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| simpvpntrans |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void simpvpntrans( VpnTrans )
|
||||
|
||||
vpntrans_list *VpnTrans;
|
||||
{
|
||||
vpnact_list *VpnAct;
|
||||
|
||||
VpnTrans->VEX_GUARD = simpvexexpr( VpnTrans->VEX_GUARD );
|
||||
|
||||
for ( VpnAct = VpnTrans->ACT;
|
||||
VpnAct != (vpnact_list *)0;
|
||||
VpnAct = VpnAct->NEXT )
|
||||
{
|
||||
simpvpnact( VpnAct );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| simpvpnfunc |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void simpvpnfunc( VpnFunc )
|
||||
|
||||
vpnfunc_list *VpnFunc;
|
||||
{
|
||||
vpntrans_list *VpnTrans;
|
||||
|
||||
for ( VpnTrans = VpnFunc->TRANS;
|
||||
VpnTrans != (vpntrans_list *)0;
|
||||
VpnTrans = VpnTrans->NEXT )
|
||||
{
|
||||
simpvpntrans( VpnTrans );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| simpvpnproc |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void simpvpnproc( VpnProc )
|
||||
|
||||
vpnproc_list *VpnProc;
|
||||
{
|
||||
vpntrans_list *VpnTrans;
|
||||
|
||||
for ( VpnTrans = VpnProc->TRANS;
|
||||
VpnTrans != (vpntrans_list *)0;
|
||||
VpnTrans = VpnTrans->NEXT )
|
||||
{
|
||||
simpvpntrans( VpnTrans );
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| simpvpnfig |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void simpvpnfig( VpnFigure )
|
||||
|
||||
vpnfig_list *VpnFigure;
|
||||
{
|
||||
vpnproc_list *VpnProc;
|
||||
vpnfunc_list *VpnFunc;
|
||||
|
||||
for ( VpnProc = VpnFigure->PROCESS;
|
||||
VpnProc != (vpnproc_list *)0;
|
||||
VpnProc = VpnProc->NEXT )
|
||||
{
|
||||
simpvpnproc( VpnProc );
|
||||
}
|
||||
|
||||
for ( VpnFunc = VpnFigure->FUNCTION;
|
||||
VpnFunc != (vpnfunc_list *)0;
|
||||
VpnFunc = VpnFunc->NEXT )
|
||||
{
|
||||
simpvpnfunc( VpnFunc );
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : VPN |
|
||||
| |
|
||||
| File : vpnsimp.h |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 01.11.94 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPN_SIMP_H
|
||||
# define VPN_SIMP_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,100 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnunion.c |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vpn.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "vpnunion.h"
|
||||
# include "vpnerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Union Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn Union Line |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
vpnline_list *unionvpnline( VpnFigure, HeadLine, SourceLine )
|
||||
|
||||
vpnfig_list *VpnFigure;
|
||||
vpnline_list **HeadLine;
|
||||
vpnline_list *SourceLine;
|
||||
{
|
||||
vpnline_list *VpnLine;
|
||||
|
||||
for ( VpnLine = SourceLine;
|
||||
VpnLine != (vpnline_list *)0;
|
||||
VpnLine = VpnLine->NEXT )
|
||||
{
|
||||
addvpnfileline( VpnFigure, HeadLine, VpnLine->NAME, VpnLine->LINE );
|
||||
}
|
||||
|
||||
return( *HeadLine );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpndup.h |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPN_DUP_H
|
||||
# define VPN_DUP_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
|
@ -0,0 +1,896 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnview.c |
|
||||
| |
|
||||
| Date : 28.08.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include "mut.h"
|
||||
# include "aut.h"
|
||||
# include "vex.h"
|
||||
# include "vpn.h"
|
||||
|
||||
# include <stdio.h>
|
||||
# include "vpnview.h"
|
||||
# include "vpnerror.h"
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Line |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpnline( Line )
|
||||
|
||||
vpnline_list *Line;
|
||||
{
|
||||
char *File;
|
||||
|
||||
fprintf( stdout, "\n--> Line" );
|
||||
fprintf( stdout, "\n\t\tLINE : " );
|
||||
|
||||
File = (char *)0;
|
||||
|
||||
while ( Line != (vpnline_list *)0 )
|
||||
{
|
||||
if ( Line->NAME != File )
|
||||
{
|
||||
File = Line->NAME;
|
||||
fprintf( stdout, " %s [%ld]", Line->NAME, Line->LINE );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, " [%ld]", Line->LINE );
|
||||
}
|
||||
|
||||
Line = Line->NEXT;
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n<-- Line" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Attribute |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpnattr( Attr )
|
||||
|
||||
vpnattr_list *Attr;
|
||||
{
|
||||
fprintf( stdout, "\n--> Attribute" );
|
||||
fprintf( stdout, "\n\t\tNAME : %s" , Attr->NAME );
|
||||
fprintf( stdout, "\n\t\tENTITY: %s" , Attr->ENTITY );
|
||||
|
||||
if ( Attr->TYPE >= VPN_MAX_ATTR_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tTYPE : %d", (int)Attr->TYPE );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tTYPE : %s", VPN_ATTRIBUTE_TYPE[ Attr->TYPE ] );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tVALUE : %s" , Attr->VALUE );
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Attr->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Attr->USER );
|
||||
fprintf( stdout, "\n<-- Symbol" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Port |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpnport( Port )
|
||||
|
||||
vpnport_list *Port;
|
||||
{
|
||||
fprintf( stdout, "\n--> Port" );
|
||||
|
||||
viewvpnline( Port->LINE );
|
||||
|
||||
fprintf( stdout, "\n\t\tVEX_ATOM : " );
|
||||
viewvexexprbound( Port->VEX_ATOM );
|
||||
|
||||
if ( Port->DIR >= VPN_MAX_DIR_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tDIR : %d", (int)Port->DIR );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tDIR : %s", VPN_DIR_TYPE[ Port->DIR ] );
|
||||
}
|
||||
|
||||
if ( Port->BASE >= VEX_MAX_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tBASE : %d", Port->BASE );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tBASE : %s", VEX_TYPE_NAME[ Port->BASE ] );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Port->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Port->USER );
|
||||
fprintf( stdout, "\n<-- Port" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Map |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpnmap( Map )
|
||||
|
||||
vpnmap_list *Map;
|
||||
{
|
||||
fprintf( stdout, "\n--> Map" );
|
||||
|
||||
viewvpnline( Map->LINE );
|
||||
|
||||
fprintf( stdout, "\n\t\tFORMAL : " );
|
||||
|
||||
viewvexexprbound( Map->VEX_FORMAL );
|
||||
|
||||
fprintf( stdout, "\n\t\tACTUAL : " );
|
||||
|
||||
viewvexexprbound( Map->VEX_ACTUAL );
|
||||
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Map->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Map->USER );
|
||||
fprintf( stdout, "\n<-- Map" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Generic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpngen( Generic )
|
||||
|
||||
vpngen_list *Generic;
|
||||
{
|
||||
fprintf( stdout, "\n--> Generic" );
|
||||
|
||||
viewvpnline( Generic->LINE );
|
||||
|
||||
fprintf( stdout, "\n\t\tATOM : " );
|
||||
|
||||
viewvexexprbound( Generic->VEX_ATOM );
|
||||
|
||||
fprintf( stdout, "\n\t\tEXPR : " );
|
||||
|
||||
viewvexexprbound( Generic->VEX_EXPR );
|
||||
|
||||
if ( Generic->BASE >= VEX_MAX_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tBASE : %d", Generic->BASE );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tBASE : %s", VEX_TYPE_NAME[ Generic->BASE ] );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Generic->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Generic->USER );
|
||||
fprintf( stdout, "\n<-- Generic" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Symbol |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpnsym( Symbol )
|
||||
|
||||
vpnsym *Symbol;
|
||||
{
|
||||
fprintf( stdout, "\n--> Symbol" );
|
||||
fprintf( stdout, "\n\t\tNAME : %s", Symbol->NAME );
|
||||
|
||||
fprintf( stdout, "\n\t\tDECL : " );
|
||||
viewvexexprbound( Symbol->DECL->VEX_ATOM );
|
||||
|
||||
fprintf( stdout, "\n\t\tINDEX : %d", (int)Symbol->INDEX );
|
||||
fprintf( stdout, "\n\t\tINIT : '%c'", VEX_LITERAL_BY_ID[ Symbol->INIT ] );
|
||||
fprintf( stdout, "\n\t\tEFFEC : '%c'", VEX_LITERAL_BY_ID[ Symbol->EFFEC ] );
|
||||
fprintf( stdout, "\n\t\tDRIVE : '%c'", VEX_LITERAL_BY_ID[ Symbol->DRIVE ] );
|
||||
fprintf( stdout, "\n\t\tEVENT : %d" , Symbol->EVENT );
|
||||
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Symbol->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Symbol->USER );
|
||||
fprintf( stdout, "\n<-- Symbol" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Declaration |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpndecl( Decl )
|
||||
|
||||
vpndecl_list *Decl;
|
||||
{
|
||||
vpnsym *DeclSym;
|
||||
int Scan;
|
||||
int Width;
|
||||
|
||||
fprintf( stdout, "\n--> Declaration" );
|
||||
|
||||
viewvpnline( Decl->LINE );
|
||||
|
||||
if ( *Decl->PREV != Decl )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tPREV : ERROR" );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tVEX_ATOM : " );
|
||||
viewvexexprbound( Decl->VEX_ATOM );
|
||||
|
||||
fprintf( stdout, "\n\t\tVEX_INIT : " );
|
||||
viewvexexprbound( Decl->VEX_INIT );
|
||||
|
||||
fprintf( stdout, "\n\t\tDECL_SYM :\n" );
|
||||
|
||||
DeclSym = Decl->DECL_SYM;
|
||||
Width = Decl->VEX_ATOM->WIDTH;
|
||||
|
||||
for ( Scan = 0; Scan < Width; Scan++ )
|
||||
{
|
||||
viewvpnsym( &DeclSym[ Scan ] );
|
||||
}
|
||||
|
||||
if ( Decl->DIR >= VPN_MAX_DIR_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tDIR : %d", (int)Decl->DIR );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tDIR : %s", VPN_DIR_TYPE[ Decl->DIR ] );
|
||||
}
|
||||
|
||||
if ( Decl->TYPE >= VPN_MAX_DECLAR_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tTYPE : %d", Decl->TYPE );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tTYPE : %s", VPN_DECLAR_TYPE[ Decl->TYPE ] );
|
||||
}
|
||||
|
||||
if ( Decl->BASE >= VEX_MAX_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tBASE : %d", Decl->BASE );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tBASE : %s", VEX_TYPE_NAME[ Decl->BASE ] );
|
||||
}
|
||||
|
||||
if ( Decl->KIND >= VPN_MAX_KIND_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tKIND : %d", Decl->KIND );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tKIND : %s", VPN_KIND_TYPE[ Decl->KIND ] );
|
||||
}
|
||||
|
||||
if ( Decl->CLASS >= VPN_MAX_CLASS_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tCLASS : %d", Decl->CLASS );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tCLASS : %s", VPN_CLASS_TYPE[ Decl->CLASS ] );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Decl->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Decl->USER );
|
||||
fprintf( stdout, "\n<-- Declaration" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Action |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpnact( Action )
|
||||
|
||||
vpnact_list *Action;
|
||||
{
|
||||
fprintf( stdout, "\n--> Action" );
|
||||
|
||||
viewvpnline( Action->LINE );
|
||||
|
||||
if ( *Action->PREV != Action )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tPREV : ERROR" );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tVEX_ATOM : " );
|
||||
|
||||
viewvexexprbound( Action->VEX_ATOM );
|
||||
|
||||
fprintf( stdout, "\n\t\tVEX_EXPR : \n" );
|
||||
|
||||
viewvexexprbound( Action->VEX_EXPR );
|
||||
|
||||
if ( Action->TYPE >= VPN_MAX_ACT_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tTYPE : %d", Action->TYPE );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tTYPE : %s", VPN_ACT_TYPE[ Action->TYPE ] );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Action->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Action->USER );
|
||||
fprintf( stdout, "\n<-- Action" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Transition |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpntrans( Trans )
|
||||
|
||||
vpntrans_list *Trans;
|
||||
{
|
||||
chain_list *ScanChain;
|
||||
vpnact_list *ScanAsg;
|
||||
vpnplace_list *ScanPlace;
|
||||
vpnarc *ScanArc;
|
||||
|
||||
fprintf( stdout, "\n--> Transition" );
|
||||
|
||||
if ( *Trans->PREV != Trans )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tPREV : ERROR" );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tNAME : %s", Trans->NAME );
|
||||
|
||||
if ( Trans->FATHER < VPN_MAX_FATHER_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tFATHER : %s", VPN_FATHER_TYPE[ Trans->FATHER ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tFATHER : %d", Trans->FATHER );
|
||||
}
|
||||
|
||||
if ( Trans->TYPE >= VPN_MAX_TRANS_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tTYPE : %d", Trans->TYPE );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tTYPE : %s", VPN_TRANS_TYPE[ Trans->TYPE ] );
|
||||
}
|
||||
|
||||
for ( ScanChain = Trans->WAIT_SYM;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tWAIT_SYM : %s\n", ((vpnsym *)ScanChain->DATA)->NAME );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tACT :\n" );
|
||||
|
||||
for ( ScanAsg = Trans->ACT;
|
||||
ScanAsg != (vpnact_list *)0;
|
||||
ScanAsg = ScanAsg->NEXT )
|
||||
{
|
||||
viewvpnact( ScanAsg );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tVEX_GUARD : " );
|
||||
|
||||
viewvexexprbound( Trans->VEX_GUARD );
|
||||
|
||||
fprintf( stdout, "\n" );
|
||||
|
||||
fprintf( stdout, "\n\t\tNUMBER_IN : %d", Trans->NUMBER_IN );
|
||||
|
||||
for ( ScanChain = Trans->PLACE_IN;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanArc = (vpnarc *)ScanChain->DATA;
|
||||
ScanPlace = (vpnplace_list *)ScanArc->SOURCE;
|
||||
fprintf( stdout, "\n\t\tPLACE_IN : %s", ScanPlace->NAME );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tNUMBER_OUT : %d", Trans->NUMBER_OUT );
|
||||
|
||||
for ( ScanChain = Trans->PLACE_OUT;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanArc = (vpnarc *)ScanChain->DATA;
|
||||
ScanPlace = (vpnplace_list *)ScanArc->TARGET;
|
||||
fprintf( stdout, "\n\t\tPLACE_OUT : %s", ScanPlace->NAME );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Trans->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Trans->USER );
|
||||
|
||||
fprintf( stdout, "\n<-- Transition" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Place |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpnplace( Place )
|
||||
|
||||
vpnplace_list *Place;
|
||||
{
|
||||
chain_list *ScanChain;
|
||||
vpntrans_list *ScanTrans;
|
||||
vpnarc *ScanArc;
|
||||
|
||||
fprintf( stdout, "\n--> Place " );
|
||||
|
||||
viewvpnline( Place->LINE );
|
||||
|
||||
if ( *Place->PREV != Place )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tPREV : ERROR" );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tNAME : %s", Place->NAME );
|
||||
|
||||
if ( Place->FATHER < VPN_MAX_FATHER_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tFATHER : %s", VPN_FATHER_TYPE[ Place->FATHER ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tFATHER : %d", Place->FATHER );
|
||||
}
|
||||
|
||||
if ( Place->TYPE >= VPN_MAX_PLACE_TYPE )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tTYPE : %d", Place->TYPE );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( stdout, "\n\t\tTYPE : %s", VPN_PLACE_TYPE[ Place->TYPE ] );
|
||||
}
|
||||
|
||||
if ( Place->LINK != (vpnplace_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tLINK : %s", Place->LINK->NAME );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tTOKEN : %d", Place->TOKEN );
|
||||
fprintf( stdout, "\n\t\tNUMBER_IN : %d", Place->NUMBER_IN );
|
||||
|
||||
for ( ScanChain = Place->TRANS_IN;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanArc = (vpnarc *)ScanChain->DATA;
|
||||
ScanTrans = (vpntrans_list *)ScanArc->SOURCE;
|
||||
fprintf( stdout, "\n\t\tTRANS_IN : %s", ScanTrans->NAME );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tNUMBER_OUT : %d", Place->NUMBER_OUT );
|
||||
|
||||
for ( ScanChain = Place->TRANS_OUT;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
ScanArc = (vpnarc *)ScanChain->DATA;
|
||||
ScanTrans = (vpntrans_list *)ScanArc->TARGET;
|
||||
fprintf( stdout, "\n\t\tTRANS_OUT : %s", ScanTrans->NAME );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Place->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Place->USER );
|
||||
fprintf( stdout, "\n<-- Place" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Function |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpnfunc( Function )
|
||||
|
||||
vpnfunc_list *Function;
|
||||
{
|
||||
vpnplace_list *ScanPlace;
|
||||
vpntrans_list *ScanTrans;
|
||||
chain_list *ScanChain;
|
||||
|
||||
fprintf( stdout, "\n--> Function" );
|
||||
|
||||
viewvpnline( Function->LINE );
|
||||
|
||||
fprintf( stdout, "\n\t\tNAME : %s", Function->NAME );
|
||||
fprintf( stdout, "\n\t\tTYPE : %x", (int)Function->TYPE );
|
||||
|
||||
if ( Function->VEX_RET != (vexexpr *)0 )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tVEX_RET :\n" );
|
||||
viewvexexprbound( Function->VEX_RET );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tARG_DECL :\n" );
|
||||
|
||||
for ( ScanChain = Function->ARG_DECL;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
viewvpndecl( (vpndecl_list *)ScanChain->DATA );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tVAR_DECL :\n" );
|
||||
|
||||
for ( ScanChain = Function->VAR_DECL;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
viewvpndecl( (vpndecl_list *)ScanChain->DATA );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tDEF_DECL :\n" );
|
||||
|
||||
for ( ScanChain = Function->DEF_DECL;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
viewvpndecl( (vpndecl_list *)ScanChain->DATA );
|
||||
}
|
||||
|
||||
if ( Function->ELABO != (vpntrans_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tELABO : %s", Function->ELABO->NAME );
|
||||
}
|
||||
|
||||
if ( Function->FIRST != (vpntrans_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tFIRST : %s", Function->FIRST->NAME );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tPLACE :" );
|
||||
|
||||
for ( ScanPlace = Function->PLACE;
|
||||
ScanPlace != (vpnplace_list *)0;
|
||||
ScanPlace = ScanPlace->NEXT )
|
||||
{
|
||||
viewvpnplace( ScanPlace );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tTRANS :" );
|
||||
|
||||
for ( ScanTrans = Function->TRANS;
|
||||
ScanTrans != (vpntrans_list *)0;
|
||||
ScanTrans = ScanTrans->NEXT )
|
||||
{
|
||||
viewvpntrans( ScanTrans );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Function->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Function->USER );
|
||||
fprintf( stdout, "\n<-- Function" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Process |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpnproc( Process )
|
||||
|
||||
vpnproc_list *Process;
|
||||
{
|
||||
vpnplace_list *ScanPlace;
|
||||
vpntrans_list *ScanTrans;
|
||||
chain_list *ScanChain;
|
||||
|
||||
fprintf( stdout, "\n--> Process" );
|
||||
|
||||
viewvpnline( Process->LINE );
|
||||
|
||||
fprintf( stdout, "\n\t\tNAME : %s", Process->NAME );
|
||||
fprintf( stdout, "\n\t\tTYPE : %x", (int)Process->TYPE );
|
||||
|
||||
fprintf( stdout, "\n\t\tVAR_DECL :\n" );
|
||||
|
||||
for ( ScanChain = Process->VAR_DECL;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
viewvpndecl( (vpndecl_list *)ScanChain->DATA );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tDEF_DECL :\n" );
|
||||
|
||||
for ( ScanChain = Process->DEF_DECL;
|
||||
ScanChain != (chain_list *)0;
|
||||
ScanChain = ScanChain->NEXT )
|
||||
{
|
||||
viewvpndecl( (vpndecl_list *)ScanChain->DATA );
|
||||
}
|
||||
|
||||
if ( Process->ELABO != (vpntrans_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tELABO : %s", Process->ELABO->NAME );
|
||||
}
|
||||
|
||||
if ( Process->FIRST != (vpntrans_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "\n\t\tFIRST : %s", Process->FIRST->NAME );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tPLACE :" );
|
||||
|
||||
for ( ScanPlace = Process->PLACE;
|
||||
ScanPlace != (vpnplace_list *)0;
|
||||
ScanPlace = ScanPlace->NEXT )
|
||||
{
|
||||
viewvpnplace( ScanPlace );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tTRANS :" );
|
||||
|
||||
for ( ScanTrans = Process->TRANS;
|
||||
ScanTrans != (vpntrans_list *)0;
|
||||
ScanTrans = ScanTrans->NEXT )
|
||||
{
|
||||
viewvpntrans( ScanTrans );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Process->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Process->USER );
|
||||
fprintf( stdout, "\n<-- Process" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Model |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpnmod( Model )
|
||||
|
||||
vpnmod_list *Model;
|
||||
{
|
||||
vpnport_list *ScanPort;
|
||||
vpngen_list *ScanGen;
|
||||
|
||||
fprintf( stdout, "\n--> Model" );
|
||||
|
||||
viewvpnline( Model->LINE );
|
||||
|
||||
fprintf( stdout, "\n\t\tNAME : %s", Model->NAME );
|
||||
|
||||
fprintf( stdout, "\n\t\tPORT :" );
|
||||
|
||||
for ( ScanPort = Model->PORT;
|
||||
ScanPort != (vpnport_list *)0;
|
||||
ScanPort = ScanPort->NEXT )
|
||||
{
|
||||
viewvpnport( ScanPort );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tGENERIC:" );
|
||||
|
||||
for ( ScanGen = Model->GENERIC;
|
||||
ScanGen != (vpngen_list *)0;
|
||||
ScanGen = ScanGen->NEXT )
|
||||
{
|
||||
viewvpngen( ScanGen );
|
||||
}
|
||||
|
||||
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Model->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Model->USER );
|
||||
fprintf( stdout, "\n<-- Model" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Instance |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpnins( Instance )
|
||||
|
||||
vpnins_list *Instance;
|
||||
{
|
||||
vpnmap_list *ScanMap;
|
||||
vpngen_list *ScanGeneric;
|
||||
|
||||
fprintf( stdout, "\n--> Instance" );
|
||||
|
||||
viewvpnline( Instance->LINE );
|
||||
|
||||
fprintf( stdout, "\n\t\tNAME : %s", Instance->NAME );
|
||||
fprintf( stdout, "\n\t\tMODEL : %s", Instance->MODEL->NAME );
|
||||
|
||||
fprintf( stdout, "\n\t\tMAP :" );
|
||||
|
||||
for ( ScanMap = Instance->MAP;
|
||||
ScanMap != (vpnmap_list *)0;
|
||||
ScanMap = ScanMap->NEXT )
|
||||
{
|
||||
viewvpnmap( ScanMap );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tGENERIC :" );
|
||||
|
||||
for ( ScanGeneric = Instance->GENERIC;
|
||||
ScanGeneric != (vpngen_list *)0;
|
||||
ScanGeneric = ScanGeneric->NEXT )
|
||||
{
|
||||
viewvpngen( ScanGeneric );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\t\tFLAGS : %lx", Instance->FLAGS );
|
||||
fprintf( stdout, "\n\t\tUSER : %lx", (long)Instance->USER );
|
||||
fprintf( stdout, "\n<-- Model" );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Vpn View Figure |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void viewvpnfig( Figure )
|
||||
|
||||
vpnfig_list *Figure;
|
||||
{
|
||||
vpnmod_list *Model;
|
||||
vpnins_list *Instance;
|
||||
vpnproc_list *Process;
|
||||
vpnfunc_list *Function;
|
||||
vpndecl_list *Decl;
|
||||
vpnattr_list *Attr;
|
||||
int Type;
|
||||
|
||||
fprintf( stdout, "\n--> Figure" );
|
||||
fprintf( stdout, "\n\tNAME : %s", Figure->NAME );
|
||||
|
||||
for ( Type = 0; Type < VPN_MAX_DECLAR_TYPE; Type++ )
|
||||
{
|
||||
fprintf( stdout, "\n\tDECLARATION %s : ", VPN_DECLAR_TYPE[ Type ] );
|
||||
|
||||
for ( Decl = Figure->DECLAR[ Type ];
|
||||
Decl != (vpndecl_list *)0;
|
||||
Decl = Decl->NEXT )
|
||||
{
|
||||
viewvpndecl( Decl );
|
||||
}
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\tATTRIBUTE :" );
|
||||
|
||||
for ( Attr = Figure->ATTRIBUTE;
|
||||
Attr != (vpnattr_list *)0;
|
||||
Attr = Attr->NEXT )
|
||||
{
|
||||
viewvpnattr( Attr );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\tMODEL :" );
|
||||
|
||||
for ( Model = Figure->MODEL;
|
||||
Model != (vpnmod_list *)0;
|
||||
Model = Model->NEXT )
|
||||
{
|
||||
viewvpnmod( Model );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\tINSTANCE :" );
|
||||
|
||||
for ( Instance = Figure->INSTANCE;
|
||||
Instance != (vpnins_list *)0;
|
||||
Instance = Instance->NEXT )
|
||||
{
|
||||
viewvpnins( Instance );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\tPROCESS : " );
|
||||
|
||||
for ( Process = Figure->PROCESS;
|
||||
Process != (vpnproc_list *)0;
|
||||
Process = Process->NEXT )
|
||||
{
|
||||
viewvpnproc( Process );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\tFUNCTION : " );
|
||||
|
||||
for ( Function = Figure->FUNCTION;
|
||||
Function != (vpnfunc_list *)0;
|
||||
Function = Function->NEXT )
|
||||
{
|
||||
viewvpnfunc( Function );
|
||||
}
|
||||
|
||||
fprintf( stdout, "\n\tFLAGS : %lx", Figure->FLAGS );
|
||||
fprintf( stdout, "\n\tUSER : %lx", (long)Figure->USER );
|
||||
fprintf( stdout, "\n<-- Figure\n" );
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System 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 the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Vpn |
|
||||
| |
|
||||
| File : vpnview.h |
|
||||
| |
|
||||
| Date : 04.07.96 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# ifndef VPN_VIEW_H
|
||||
# define VPN_VIEW_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Macro |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# endif
|
Loading…
Reference in New Issue