1 /****************************************************************************/
3 /* Chaine de CAO & VLSI AVERTEC */
5 /* Produit : CBH Version 1.00 */
6 /* Fichier : cbh_sim.c */
8 /* (c) copyright 2002 AVERTEC */
9 /* Tous droits reserves */
11 /* Auteur(s) : Antony PINTO */
13 /****************************************************************************/
21 #include "sys/types.h"
23 #include "sys/resource.h"
30 #include "cbh_error.h"
32 #define CBH_ONETRANS 1
33 #define CBH_ALLTRANS 0
35 #define CBH_SET_TRANS ((int) 0x0001)
36 #define CBH_CHK_TRANS ((int) 0x0002)
38 #define CBH_CST_DOWN ((long) 0xFFFFFFFF)
41 extern chain_list
*cbh_propagate ( chain_list
*toBeTreatedList
);
42 extern chain_list
*cbh_applyConstraint ( chain_list
*toBeTreatedList
,
44 extern chain_list
*cbh_getToBeTreatedList ( chain_list
*toBeTreatedList
,
46 extern void cbh_doLoinsToLofig ( lofig_list
*lofig
);
47 extern void cbh_doMatchLocon ( lofig_list
*lofig
,
49 extern locon_list
*cbh_getMatchLocon ( locon_list
*locon
);
50 extern int cbh_propageBdd ( pNode bdd
,
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
,
57 extern chain_list
*cbh_delTreatedList ( chain_list
*tBTL
,
59 extern char cbh_cst ( int constraint
);
60 extern int cbh_getLoconCst ( locon_list
*locon
);
61 extern void cbh_setLoconCst ( locon_list
*locon
,
63 extern void cbh_delLoconCst ( locon_list
*locon
);
64 extern long cbh_findTrans2 ( lofig_list
*lofig
,
69 extern ptype_list
*cbh_resConf ( loins_list
*loins
,
73 extern long cbh_decodeTrans ( locon_list
*in
,
77 extern void cbh_setLoconForTrans ( locon_list
*in
,
81 extern pNode
cbh_constraintBdd ( pNode bdd
,
84 extern chain_list
*cbh_inWithoutA ( lofig_list
*lofig
,
87 extern void cbh_printTrans ( long code
);
88 extern void cbh_delCstOnLofig ( lofig_list
*lofig
,
91 extern char *cbh_ltob ( long l
,
93 extern int cbh_isInput ( locon_list
*locon
);
94 extern void cbh_setLofigCstOnLoins ( loins_list
*loins
);
95 extern int cbh_setCstWithBdd ( lofig_list
*lofig
,
98 extern pNode
cbh_constraintBddWithCst(lofig_list
*lofig
,
101 extern chain_list
*cbh_delCstedLoconFromList(chain_list
*inList
);
103 extern void cbh_setCstToLofig ( loins_list
*loins
);
104 extern void cbh_delCstFromLofig ( loins_list
*loins
);
106 extern int cbh_getLoconCst ( locon_list
*locon
);
107 extern void cbh_setLoconCst ( locon_list
*locon
,
109 extern void cbh_delLoconCst ( locon_list
*locon
);
111 extern void cbh_setLofigCstOnLoins ( loins_list
*loins
);
112 extern long cbh_existLoinsTrans ( loins_list
*loins
,
116 ptype_list
*cstList
);
117 extern ptype_list
*cbh_confLoinsForTrans ( loins_list
*loins
,
121 ptype_list
*cstList
);
122 extern long cbh_existTrans ( lofig_list
*lofig
,
126 extern ptype_list
*cbh_confForTrans ( lofig_list
*lofig
,
130 extern void cbh_printLofigCst ( lofig_list
*lofig
,
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
,
138 extern ptype_list
*cbh_getHZCstFLoins ( loins_list
*loins
,
140 ptype_list
*cstList
,
142 extern ptype_list
*cbh_getHzCst ( lofig_list
*lofig
,
146 extern int cbh_evalBdd ( pNode bdd ,
149 extern long cbh_findTrans ( lofig_list *lofig ,
154 extern long cbh_lookCombi ( pNode bdd ,
156 chain_list *loconList ,
158 extern locon_list *cbh_checkAllCstSet ( locon_list *locon );
159 extern int cbh_evalBddUnFull ( pNode bdd ,
163 extern int cbh_bddToCst ( pNode bdd ,
165 extern int cbh_checkTrans ( locon_list *in ,
171 chain_list *loconList );