abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cgtInt.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [cgtInt.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Clock gating package.]
8 
9  Synopsis [Internal declarations.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: cgtInt.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__aig__cgt__cgtInt_h
22 #define ABC__aig__cgt__cgtInt_h
23 
24 
25 ////////////////////////////////////////////////////////////////////////
26 /// INCLUDES ///
27 ////////////////////////////////////////////////////////////////////////
28 
29 #include "aig/saig/saig.h"
30 #include "sat/bsat/satSolver.h"
31 #include "sat/cnf/cnf.h"
32 #include "cgt.h"
33 
34 ////////////////////////////////////////////////////////////////////////
35 /// PARAMETERS ///
36 ////////////////////////////////////////////////////////////////////////
37 
38 
39 
41 
42 
43 ////////////////////////////////////////////////////////////////////////
44 /// BASIC TYPES ///
45 ////////////////////////////////////////////////////////////////////////
46 
47 typedef struct Cgt_Man_t_ Cgt_Man_t;
48 struct Cgt_Man_t_
49 {
50  // user's data
51  Cgt_Par_t * pPars; // user's parameters
52  Aig_Man_t * pAig; // user's AIG manager
53  Vec_Int_t * vUseful; // user's candidate nodes
54  // user's constraints
55  Aig_Man_t * pCare; // constraint cones
56  Vec_Vec_t * vSuppsInv; // inverse support of the constraints
57  // result of clock-gating
58  Vec_Vec_t * vGatesAll; // the computed clock-gates
59  Vec_Ptr_t * vGates; // the selected clock-gates
60  // internal data
61  Aig_Man_t * pFrame; // clock gate AIG manager
62  Vec_Ptr_t * vFanout; // temporary storage for fanouts
63  Vec_Ptr_t * vVisited; // temporary storage for visited nodes
64  // SAT solving
65  Aig_Man_t * pPart; // partition
66  Cnf_Dat_t * pCnf; // CNF of the partition
67  sat_solver * pSat; // SAT solver
68  Vec_Ptr_t * vPatts; // simulation patterns
69  int nPatts; // the number of patterns accumulated
70  int nPattWords; // the number of pattern words
71  // statistics
72  int nRecycles; // recycles
73  int nCalls; // total calls
74  int nCallsSat; // satisfiable calls
75  int nCallsUnsat; // unsatisfiable calls
76  int nCallsUndec; // undecided calls
77  int nCallsFiltered; // filtered out calls
78  abctime timeAig; // constructing AIG
79  abctime timePrepare; // partitioning and SAT solving
80  abctime timeSat; // total runtime
81  abctime timeSatSat; // satisfiable runtime
82  abctime timeSatUnsat; // unsatisfiable runtime
83  abctime timeSatUndec; // undecided runtime
84  abctime timeDecision; // making decision about what gates to use
85  abctime timeOther; // other runtime
86  abctime timeTotal; // total runtime
87 };
88 
89 ////////////////////////////////////////////////////////////////////////
90 /// MACRO DEFINITIONS ///
91 ////////////////////////////////////////////////////////////////////////
92 
93 ////////////////////////////////////////////////////////////////////////
94 /// FUNCTION DECLARATIONS ///
95 ////////////////////////////////////////////////////////////////////////
96 
97 /*=== cgtAig.c ==========================================================*/
98 extern void Cgt_ManDetectCandidates( Aig_Man_t * pAig, Vec_Int_t * vUseful, Aig_Obj_t * pObj, int nLevelMax, Vec_Ptr_t * vCands );
100 extern Aig_Man_t * Cgt_ManDupPartition( Aig_Man_t * pAig, int nVarsMin, int nFlopsMin, int iStart, Aig_Man_t * pCare, Vec_Vec_t * vSuppsInv, int * pnOutputs );
101 extern Aig_Man_t * Cgt_ManDeriveGatedAig( Aig_Man_t * pAig, Vec_Vec_t * vGates, int fReduce, int * pnUsedNodes );
102 /*=== cgtDecide.c ==========================================================*/
103 extern Vec_Vec_t * Cgt_ManDecideSimple( Aig_Man_t * pAig, Vec_Vec_t * vGatesAll, int nOdcMax, int fVerbose );
104 extern Vec_Vec_t * Cgt_ManDecideArea( Aig_Man_t * pAig, Vec_Vec_t * vGatesAll, int nOdcMax, int fVerbose );
105 /*=== cgtMan.c ==========================================================*/
106 extern Cgt_Man_t * Cgt_ManCreate( Aig_Man_t * pAig, Aig_Man_t * pCare, Cgt_Par_t * pPars );
107 extern void Cgt_ManClean( Cgt_Man_t * p );
108 extern void Cgt_ManStop( Cgt_Man_t * p );
109 /*=== cgtSat.c ==========================================================*/
110 extern int Cgt_CheckImplication( Cgt_Man_t * p, Aig_Obj_t * pGate, Aig_Obj_t * pFlop );
111 
112 
113 
115 
116 
117 
118 #endif
119 
120 ////////////////////////////////////////////////////////////////////////
121 /// END OF FILE ///
122 ////////////////////////////////////////////////////////////////////////
123 
abctime timeTotal
Definition: cgtInt.h:86
Aig_Man_t * pFrame
Definition: cgtInt.h:61
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
abctime timeSatUnsat
Definition: cgtInt.h:82
Vec_Vec_t * Cgt_ManDecideSimple(Aig_Man_t *pAig, Vec_Vec_t *vGatesAll, int nOdcMax, int fVerbose)
Definition: cgtDecide.c:184
void Cgt_ManStop(Cgt_Man_t *p)
Definition: cgtMan.c:154
abctime timeDecision
Definition: cgtInt.h:84
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition: vecVec.h:42
Vec_Ptr_t * vVisited
Definition: cgtInt.h:63
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
int nCallsSat
Definition: cgtInt.h:74
static Llb_Mgr_t * p
Definition: llb3Image.c:950
abctime timeSatUndec
Definition: cgtInt.h:83
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
void Cgt_ManClean(Cgt_Man_t *p)
Definition: cgtMan.c:86
Aig_Man_t * Cgt_ManDupPartition(Aig_Man_t *pAig, int nVarsMin, int nFlopsMin, int iStart, Aig_Man_t *pCare, Vec_Vec_t *vSuppsInv, int *pnOutputs)
Definition: cgtAig.c:441
int nRecycles
Definition: cgtInt.h:72
Vec_Ptr_t * vPatts
Definition: cgtInt.h:68
Aig_Man_t * pPart
Definition: cgtInt.h:65
int nCallsFiltered
Definition: cgtInt.h:77
Definition: cnf.h:56
abctime timeSat
Definition: cgtInt.h:80
Vec_Int_t * vUseful
Definition: cgtInt.h:53
Vec_Ptr_t * vGates
Definition: cgtInt.h:59
abctime timeAig
Definition: cgtInt.h:78
Vec_Vec_t * vSuppsInv
Definition: cgtInt.h:56
Aig_Man_t * Cgt_ManDeriveGatedAig(Aig_Man_t *pAig, Vec_Vec_t *vGates, int fReduce, int *pnUsedNodes)
Definition: cgtAig.c:524
Vec_Ptr_t * vFanout
Definition: cgtInt.h:62
Vec_Vec_t * Cgt_ManDecideArea(Aig_Man_t *pAig, Vec_Vec_t *vGatesAll, int nOdcMax, int fVerbose)
Definition: cgtDecide.c:255
Cgt_Man_t * Cgt_ManCreate(Aig_Man_t *pAig, Aig_Man_t *pCare, Cgt_Par_t *pPars)
DECLARATIONS ///.
Definition: cgtMan.c:45
Vec_Vec_t * vGatesAll
Definition: cgtInt.h:58
Definition: aig.h:69
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
typedefABC_NAMESPACE_HEADER_START struct Cgt_Par_t_ Cgt_Par_t
INCLUDES ///.
Definition: cgt.h:48
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
abctime timeSatSat
Definition: cgtInt.h:81
void Cgt_ManDetectCandidates(Aig_Man_t *pAig, Vec_Int_t *vUseful, Aig_Obj_t *pObj, int nLevelMax, Vec_Ptr_t *vCands)
MACRO DEFINITIONS ///.
Definition: cgtAig.c:70
abctime timeOther
Definition: cgtInt.h:85
Aig_Man_t * Cgt_ManDeriveAigForGating(Cgt_Man_t *p)
Definition: cgtAig.c:266
Aig_Man_t * pCare
Definition: cgtInt.h:55
int nCalls
Definition: cgtInt.h:73
int nPattWords
Definition: cgtInt.h:70
Cnf_Dat_t * pCnf
Definition: cgtInt.h:66
abctime timePrepare
Definition: cgtInt.h:79
Cgt_Par_t * pPars
Definition: cgtInt.h:51
Aig_Man_t * pAig
Definition: cgtInt.h:52
int nCallsUnsat
Definition: cgtInt.h:75
int Cgt_CheckImplication(Cgt_Man_t *p, Aig_Obj_t *pGate, Aig_Obj_t *pFlop)
DECLARATIONS ///.
Definition: cgtSat.c:46
ABC_INT64_T abctime
Definition: abc_global.h:278
sat_solver * pSat
Definition: cgtInt.h:67
typedefABC_NAMESPACE_HEADER_START struct Cgt_Man_t_ Cgt_Man_t
INCLUDES ///.
Definition: cgtInt.h:47
int nCallsUndec
Definition: cgtInt.h:76
int nPatts
Definition: cgtInt.h:69