Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / cbh / cbh_sim.h
1 /****************************************************************************/
2 /* */
3 /* Chaine de CAO & VLSI AVERTEC */
4 /* */
5 /* Produit : CBH Version 1.00 */
6 /* Fichier : cbh_sim.c */
7 /* */
8 /* (c) copyright 2002 AVERTEC */
9 /* Tous droits reserves */
10 /* */
11 /* Auteur(s) : Antony PINTO */
12 /* */
13 /****************************************************************************/
14
15 #ifndef CBH_SIM_H
16 #define CBH_SIM_H
17
18 #include <stdio.h>
19 #include <stdlib.h>
20 #include <string.h>
21 #include "sys/types.h"
22 #include "sys/time.h"
23 #include "sys/resource.h"
24 #include MUT_H
25 #include LOG_H
26 #include BEH_H
27 #include MLO_H
28 #include CBH_H
29 #include "cbh_cmp.h"
30 #include "cbh_error.h"
31
32 #define CBH_ONETRANS 1
33 #define CBH_ALLTRANS 0
34
35 #define CBH_SET_TRANS ((int) 0x0001)
36 #define CBH_CHK_TRANS ((int) 0x0002)
37
38 #define CBH_CST_DOWN ((long) 0xFFFFFFFF)
39
40
41 extern chain_list *cbh_propagate ( chain_list *toBeTreatedList );
42 extern chain_list *cbh_applyConstraint ( chain_list *toBeTreatedList,
43 locon_list *locon );
44 extern chain_list *cbh_getToBeTreatedList ( chain_list *toBeTreatedList,
45 lofig_list *lofig );
46 extern void cbh_doLoinsToLofig ( lofig_list *lofig );
47 extern void cbh_doMatchLocon ( lofig_list *lofig ,
48 loins_list *loins );
49 extern locon_list *cbh_getMatchLocon ( locon_list *locon );
50 extern int cbh_propageBdd ( pNode bdd ,
51 pCircuit cct ,
52 chain_list *lofigInList );
53 extern chain_list *cbh_getLoconList ( losig_list *sig );
54 extern lofig_list *cbh_getLofigFromLoins ( loins_list *loins );
55 extern void cbh_addSigToTreat ( chain_list *tBTL ,
56 losig_list *sig );
57 extern chain_list *cbh_delTreatedList ( chain_list *tBTL ,
58 chain_list *hBT );
59 extern char cbh_cst ( int constraint );
60 extern int cbh_getLoconCst ( locon_list *locon );
61 extern void cbh_setLoconCst ( locon_list *locon ,
62 int cst );
63 extern void cbh_delLoconCst ( locon_list *locon );
64 extern long cbh_findTrans2 ( lofig_list *lofig ,
65 locon_list *in ,
66 locon_list *out ,
67 long type ,
68 int mode );
69 extern ptype_list *cbh_resConf ( loins_list *loins ,
70 lofig_list *lofig ,
71 locon_list *in ,
72 locon_list *out );
73 extern long cbh_decodeTrans ( locon_list *in ,
74 locon_list *out ,
75 int code ,
76 int mode );
77 extern void cbh_setLoconForTrans ( locon_list *in ,
78 int cstin ,
79 locon_list *out ,
80 int cstout );
81 extern pNode cbh_constraintBdd ( pNode bdd ,
82 pCircuit cct ,
83 locon_list *locon );
84 extern chain_list *cbh_inWithoutA ( lofig_list *lofig ,
85 locon_list *a ,
86 int *nb );
87 extern void cbh_printTrans ( long code );
88 extern void cbh_delCstOnLofig ( lofig_list *lofig ,
89 locon_list *in ,
90 locon_list *out );
91 extern char *cbh_ltob ( long l ,
92 char *b );
93 extern int cbh_isInput ( locon_list *locon );
94 extern void cbh_setLofigCstOnLoins ( loins_list *loins );
95 extern int cbh_setCstWithBdd ( lofig_list *lofig ,
96 pNode bdd ,
97 pCircuit cct );
98 extern pNode cbh_constraintBddWithCst(lofig_list *lofig ,
99 pNode bdd ,
100 pCircuit cct );
101 extern chain_list *cbh_delCstedLoconFromList(chain_list *inList );
102
103 extern void cbh_setCstToLofig ( loins_list *loins );
104 extern void cbh_delCstFromLofig ( loins_list *loins );
105
106 extern int cbh_getLoconCst ( locon_list *locon );
107 extern void cbh_setLoconCst ( locon_list *locon ,
108 int cst );
109 extern void cbh_delLoconCst ( locon_list *locon );
110
111 extern void cbh_setLofigCstOnLoins ( loins_list *loins );
112 extern long cbh_existLoinsTrans ( loins_list *loins ,
113 locon_list *in ,
114 locon_list *out ,
115 long type ,
116 ptype_list *cstList );
117 extern ptype_list *cbh_confLoinsForTrans ( loins_list *loins ,
118 locon_list *in ,
119 locon_list *out ,
120 long type ,
121 ptype_list *cstList );
122 extern long cbh_existTrans ( lofig_list *lofig ,
123 locon_list *in ,
124 locon_list *out ,
125 long type );
126 extern ptype_list *cbh_confForTrans ( lofig_list *lofig ,
127 locon_list *in ,
128 locon_list *out ,
129 long type );
130 extern void cbh_printLofigCst ( lofig_list *lofig ,
131 loins_list *loins ,
132 locon_list *in ,
133 locon_list *out );
134 extern void cbh_printPTypeCst ( ptype_list *pType );
135 extern lofig_list *cbh_doMatchLofig ( loins_list *loins );
136 extern ptype_list *cbh_mvResLofigLoins ( loins_list *loins ,
137 ptype_list *res );
138 extern ptype_list *cbh_getHZCstFLoins ( loins_list *loins ,
139 locon_list *insOut ,
140 ptype_list *cstList ,
141 int enable );
142 extern ptype_list *cbh_getHzCst ( lofig_list *lofig ,
143 locon_list *locon ,
144 int enable );
145 /*
146 extern int cbh_evalBdd ( pNode bdd ,
147 pCircuit cct ,
148 locon_list *locon );
149 extern long cbh_findTrans ( lofig_list *lofig ,
150 locon_list *in ,
151 locon_list *out ,
152 long type ,
153 int mode );
154 extern long cbh_lookCombi ( pNode bdd ,
155 pCircuit cct ,
156 chain_list *loconList ,
157 long target );
158 extern locon_list *cbh_checkAllCstSet ( locon_list *locon );
159 extern int cbh_evalBddUnFull ( pNode bdd ,
160 pCircuit cct ,
161 locon_list *locon ,
162 int resOut );
163 extern int cbh_bddToCst ( pNode bdd ,
164 int target );
165 extern int cbh_checkTrans ( locon_list *in ,
166 locon_list *out ,
167 int code ,
168 pNode bdd ,
169 pCircuit cct ,
170 lofig_list *lofig ,
171 chain_list *loconList );
172 */
173
174
175 #endif