abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cov.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [cov.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Mapping into network of SOPs/ESOPs.]
8 
9  Synopsis [External 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: cov.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__map__cov__cov_h
22 #define ABC__map__cov__cov_h
23 
24 #include "base/abc/abc.h"
25 #include "covInt.h"
26 
27 
29 
30 ////////////////////////////////////////////////////////////////////////
31 /// DECLARATIONS ///
32 ////////////////////////////////////////////////////////////////////////
33 
34 typedef struct Cov_Man_t_ Cov_Man_t;
35 typedef struct Cov_Obj_t_ Cov_Obj_t;
36 
37 // storage for node information
38 struct Cov_Obj_t_
39 {
40  Min_Cube_t * pCover[3]; // pos/neg/esop
41  Vec_Int_t * vSupp; // computed support (all nodes except CIs)
42 };
43 
44 // storage for additional information
45 struct Cov_Man_t_
46 {
47  // general characteristics
48  int nFaninMax; // the number of vars
49  int nCubesMax; // the limit on the number of cubes in the intermediate covers
50  int nWords; // the number of words
51  Vec_Int_t * vFanCounts; // fanout counts
52  Vec_Ptr_t * vObjStrs; // object structures
53  void * pMemory; // memory for the internal data strctures
54  Min_Man_t * pManMin; // the cube manager
55  int fUseEsop; // enables ESOPs
56  int fUseSop; // enables SOPs
57  // arrays to map local variables
58  Vec_Int_t * vComTo0; // mapping of common variables into first fanin
59  Vec_Int_t * vComTo1; // mapping of common variables into second fanin
60  Vec_Int_t * vPairs0; // the first var in each pair of common vars
61  Vec_Int_t * vPairs1; // the second var in each pair of common vars
62  Vec_Int_t * vTriv0; // trival support of the first node
63  Vec_Int_t * vTriv1; // trival support of the second node
64  // statistics
65  int nSupps; // supports created
66  int nSuppsMax; // the maximum number of supports
67  int nBoundary; // the boundary size
68  int nNodes; // the number of nodes processed
69 };
70 
71 static inline Cov_Obj_t * Abc_ObjGetStr( Abc_Obj_t * pObj ) { return (Cov_Obj_t *)Vec_PtrEntry(((Cov_Man_t *)pObj->pNtk->pManCut)->vObjStrs, pObj->Id); }
72 
73 static inline void Abc_ObjSetSupp( Abc_Obj_t * pObj, Vec_Int_t * vVec ) { Abc_ObjGetStr(pObj)->vSupp = vVec; }
74 static inline Vec_Int_t * Abc_ObjGetSupp( Abc_Obj_t * pObj ) { return Abc_ObjGetStr(pObj)->vSupp; }
75 
76 static inline void Abc_ObjSetCover2( Abc_Obj_t * pObj, Min_Cube_t * pCov ) { Abc_ObjGetStr(pObj)->pCover[2] = pCov; }
77 static inline Min_Cube_t * Abc_ObjGetCover2( Abc_Obj_t * pObj ) { return Abc_ObjGetStr(pObj)->pCover[2]; }
78 
79 static inline void Abc_ObjSetCover( Abc_Obj_t * pObj, Min_Cube_t * pCov, int Pol ) { Abc_ObjGetStr(pObj)->pCover[Pol] = pCov; }
80 static inline Min_Cube_t * Abc_ObjGetCover( Abc_Obj_t * pObj, int Pol ) { return Abc_ObjGetStr(pObj)->pCover[Pol]; }
81 
82 ////////////////////////////////////////////////////////////////////////
83 /// FUNCTION DEFINITIONS ///
84 ////////////////////////////////////////////////////////////////////////
85 
86 /*=== covBuild.c ==========================================================*/
87 extern Abc_Ntk_t * Abc_NtkCovDerive( Cov_Man_t * p, Abc_Ntk_t * pNtk );
90 /*=== covCore.c ===========================================================*/
91 extern Abc_Ntk_t * Abc_NtkSopEsopCover( Abc_Ntk_t * pNtk, int nFaninMax, int fUseEsop, int fUseSop, int fUseInvs, int fVerbose );
92 /*=== covMan.c ============================================================*/
93 extern Cov_Man_t * Cov_ManAlloc( Abc_Ntk_t * pNtk, int nFaninMax );
94 extern void Cov_ManFree( Cov_Man_t * p );
95 extern void Abc_NodeCovDropData( Cov_Man_t * p, Abc_Obj_t * pObj );
96 /*=== covTest.c ===========================================================*/
97 extern Abc_Ntk_t * Abc_NtkCovTestSop( Abc_Ntk_t * pNtk );
98 
99 
101 
102 #endif
103 
104 ////////////////////////////////////////////////////////////////////////
105 /// END OF FILE ///
106 ////////////////////////////////////////////////////////////////////////
107 
108 
109 
Vec_Int_t * vComTo1
Definition: cov.h:59
int nBoundary
Definition: cov.h:67
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
Abc_Ntk_t * Abc_NtkCovDeriveClean(Cov_Man_t *p, Abc_Ntk_t *pNtk)
Definition: covBuild.c:357
int nWords
Definition: cov.h:50
static Vec_Int_t * Abc_ObjGetSupp(Abc_Obj_t *pObj)
Definition: cov.h:74
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
Vec_Int_t * vSupp
Definition: cov.h:41
Vec_Int_t * vPairs0
Definition: cov.h:60
Definition: cov.h:45
void Abc_NodeCovDropData(Cov_Man_t *p, Abc_Obj_t *pObj)
Definition: covMan.c:126
int nFaninMax
Definition: cov.h:48
Cov_Man_t * Cov_ManAlloc(Abc_Ntk_t *pNtk, int nFaninMax)
DECLARATIONS ///.
Definition: covMan.c:45
Min_Cube_t * pCover[3]
Definition: cov.h:40
int fUseEsop
Definition: cov.h:55
Abc_Ntk_t * Abc_NtkCovDeriveRegular(Cov_Man_t *p, Abc_Ntk_t *pNtk)
Definition: covBuild.c:503
static Min_Cube_t * Abc_ObjGetCover2(Abc_Obj_t *pObj)
Definition: cov.h:77
Vec_Int_t * vTriv1
Definition: cov.h:63
static Cov_Obj_t * Abc_ObjGetStr(Abc_Obj_t *pObj)
Definition: cov.h:71
Vec_Ptr_t * vObjStrs
Definition: cov.h:52
static void Abc_ObjSetCover(Abc_Obj_t *pObj, Min_Cube_t *pCov, int Pol)
Definition: cov.h:79
void Cov_ManFree(Cov_Man_t *p)
Definition: covMan.c:92
Abc_Ntk_t * Abc_NtkCovTestSop(Abc_Ntk_t *pNtk)
Vec_Int_t * vPairs1
Definition: cov.h:61
int fUseSop
Definition: cov.h:56
static void Abc_ObjSetCover2(Abc_Obj_t *pObj, Min_Cube_t *pCov)
Definition: cov.h:76
int nSuppsMax
Definition: cov.h:66
int nSupps
Definition: cov.h:65
void * pManCut
Definition: abc.h:193
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
int nNodes
Definition: cov.h:68
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
Definition: cov.h:38
Vec_Int_t * vTriv0
Definition: cov.h:62
Vec_Int_t * vComTo0
Definition: cov.h:58
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
Abc_Ntk_t * pNtk
Definition: abc.h:130
Min_Man_t * pManMin
Definition: cov.h:54
int Id
Definition: abc.h:132
int nCubesMax
Definition: cov.h:49
void * pMemory
Definition: cov.h:53
typedefABC_NAMESPACE_HEADER_START struct Cov_Man_t_ Cov_Man_t
DECLARATIONS ///.
Definition: cov.h:34
Abc_Ntk_t * Abc_NtkCovDerive(Cov_Man_t *p, Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition: covBuild.c:183
static void Abc_ObjSetSupp(Abc_Obj_t *pObj, Vec_Int_t *vVec)
Definition: cov.h:73
static Min_Cube_t * Abc_ObjGetCover(Abc_Obj_t *pObj, int Pol)
Definition: cov.h:80
Abc_Ntk_t * Abc_NtkSopEsopCover(Abc_Ntk_t *pNtk, int nFaninMax, int fUseEsop, int fUseSop, int fUseInvs, int fVerbose)
FUNCTION DEFINITIONS ///.
Definition: covCore.c:60
Vec_Int_t * vFanCounts
Definition: cov.h:51
typedefABC_NAMESPACE_HEADER_START struct Min_Man_t_ Min_Man_t
DECLARATIONS ///.
Definition: covInt.h:34