2 /* ###--------------------------------------------------------------### */
5 /* ###--------------------------------------------------------------### */
10 /* ###------------------------------------------------------### */
12 /* ###------------------------------------------------------### */
14 #define BEF_KEEPAUX 0x00000002 /* keep internal signals */
16 /* ###------------------------------------------------------### */
17 /* structure definitions */
18 /* ###------------------------------------------------------### */
20 /* ###--------------------------------------------------------### */
21 /* global variables */
22 /* ###--------------------------------------------------------### */
24 extern char *BEH_IN
; /* input file format vbe/vhd/vlg */
25 extern char *BEH_OUT
; /* output file format vbe/vhd/vlg */
27 /* ###------------------------------------------------------### */
29 /* ###------------------------------------------------------### */
31 extern void savebefig ();
32 extern struct befig
*loadbefig ();
33 extern char *findbefig(char *name
);
35 extern char *bef_getsuffix ();
37 typedef struct bef_abl
39 char *(*TOBOOLSTR
) (chain_list
*,char*,int*);
43 typedef struct bef_por
46 void (*POR
) (FILE*,char*,char,int,int);
47 void (*START
) (FILE*);
52 typedef struct bef_process
54 // void (*PROCESS) (FILE*,biabl_list*,char*,char*,int,int*,char*,int);
55 chain_list
*(*DECLAR
) (FILE*,biabl_list
*,char*,int,char*,char**,ptype_list
*);
56 void (*WITHSELECT
) (FILE*,biabl_list
*,char*,int,char**,int*);
57 void (*BEGIN
) (FILE*,chain_list
*);
59 void (*IF
) (FILE*,char*);
60 void (*ELSIF
) (FILE*,char*);
62 int (*ENDIF
) (FILE*,char);
63 int (*EDGE
) (char*,char*,char,char*);
67 typedef struct bef_name
69 char *(*NAME
) (char*);
70 char *(*VNAME
) (char*,int,int);
71 char *(*VECTOR
) (char*, char*);
72 char *(*BITSTR
) (char*,char*);
73 char *(*BEBUS
) (char*);
74 char *(*BEREG
) (char*);
78 typedef struct bef_driver
86 void (*TIME
) (FILE*,int,int,int);
87 void (*END_LOOP
) (FILE*,char,char*,int,int,int,loop_list
*);
88 void (*LOOP_LIST
) (FILE*,char,char*,int,int*,int,loop_list
*);
89 void (*LOOP
) (FILE*,char,char*,int,int*,loop_list
*);
90 void (*VALUE
) (FILE*,chain_list
*,char,int,int,int,char**,int*);
91 void (*AFFECTED
) (FILE*,char,char,int,int,int,char*,char*,loop_list
*,long);
92 void (*SIGNAL
) (FILE*,char*,char,int,int);
93 void (*INTER_ASS
) (FILE*,char*,char*,int);
101 chain_list
*bef_preprocess_abl(chain_list
*abl
);
103 char *bef_gettimeunit(unsigned char time_unit_char
);
104 void iprint(FILE *fp
,char mode
,char *str
, ... );
105 void bef_print_one_beobj(bef_driver
*driver
, void *be
, int *np
,long type
);
106 chain_list
*bef_strip_ckedge(chain_list
*ptabl
, char *clock
);
107 int bef_search_stable(chain_list
*ptabl
, char **clock
);
108 int bef_search_notck(chain_list
* ptabl
, char *clock
);
109 //void bef_drive_vpor(bef_driver *driver, bevectpor_list *vpor,int cpt);
110 //void bef_drive_por(bef_driver *driver, bepor_list *por);
111 void bef_initMaxname(void);
112 void bef_drive_porDeclaration(bef_driver
*driver
);
113 void bef_drive_sigDeclaration(bef_driver
*driver
);
115 int bef_get_stable_attribute(chain_list
*ptabl
, char **clock
);
117 void bef_drive_aux(bef_driver
*driver
);
118 void bef_drive_out(bef_driver
*driver
);
119 void bef_drive_bux(bef_driver
*driver
);
120 void bef_drive_bus(bef_driver
*driver
);
121 void bef_drive_reg(bef_driver
*driver
);
123 void bef_driverSetAbl(bef_driver
*driver
,
124 char *(*abl2strBool
)(chain_list
*,char*,int*));
125 void bef_driverSet(bef_driver
*driver
,
130 void (*time
) (FILE*,int,int,int),
131 void (*end_loop
) (FILE*,char,char*,int,int,int,loop_list
*),
132 void (*looplist
) (FILE*,char,char*,int,int*,int,loop_list
*),
133 void (*loop
) (FILE*,char,char*,int,int*,loop_list
*),
134 void (*value
) (FILE*,chain_list
*,char,int,int,int,char**,int*),
135 void (*affected
) (FILE*,char,char,int,int,int,char*,char*,loop_list
*,long),
136 void (*signal
) (FILE*,char*,char,int,int),
137 void (*inter_ass
) (FILE*,char*,char*,int),
138 int (*isone
) (char*));
139 void bef_driverSetProcess(bef_driver
*driver
,
140 void (*withselect
) (FILE*,biabl_list
*,char*,int,char**,int*),
141 chain_list
*(*declar
) (FILE*,biabl_list
*,char*,int,char*,char**,ptype_list
*),
142 void (*begin
) (FILE*,chain_list
*),
144 void (*if_
) (FILE*,char*),
145 void (*elsif
) (FILE*,char*),
146 int (*else_
) (FILE*),
147 int (*endif
) (FILE*,char),
148 int (*edge
) (char*,char*,char,char*));
149 void bef_driverSetStr(bef_driver
*driver
,
150 char *(*name
) (char*),
151 char *(*vname
) (char*,int,int),
152 char *(*vector
) (char*, char*),
153 char *(*bitstr
) (char*,char*),
154 char *(*bebus
) (char*),
155 char *(*bereg
) (char*));
156 void bef_driverSetPor(bef_driver
*driver
,
157 void (*por
) (FILE*,char*,char,int,int),
159 void (*start
) (FILE*),