ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
mfsInt.h
Go to the documentation of this file.
1
20
21#ifndef ABC__opt__mfs__mfsInt_h
22#define ABC__opt__mfs__mfsInt_h
23
24
28
29#include "base/abc/abc.h"
30#include "mfs.h"
31#include "aig/aig/aig.h"
32#include "sat/cnf/cnf.h"
33#include "sat/bsat/satSolver.h"
34#include "sat/bsat/satStore.h"
35#include "bool/bdc/bdc.h"
36#include "aig/gia/gia.h"
37
41
42
43
45
46
47#define MFS_FANIN_MAX 12
48
49typedef struct Mfs_Man_t_ Mfs_Man_t;
51{
52 // input data
58 // intermeditate data for the node
59 Vec_Ptr_t * vRoots; // the roots of the window
60 Vec_Ptr_t * vSupp; // the support of the window
61 Vec_Ptr_t * vNodes; // the internal nodes of the window
62 Vec_Ptr_t * vDivs; // the divisors of the node
63 Vec_Int_t * vDivLits; // the SAT literals of divisor nodes
64 Vec_Int_t * vProjVarsCnf; // the projection variables
65 Vec_Int_t * vProjVarsSat; // the projection variables
66 // intermediate simulation data
67 Vec_Ptr_t * vDivCexes; // the counter-example for dividors
68 int nDivWords; // the number of words
69 int nCexes; // the numbe rof current counter-examples
72/*
73 // intermediate AIG data
74 Gia_Man_t * pGia; // replica of the AIG in the new package
75// Gia_Obj_t ** pSat2Gia; // mapping of PO SAT var into internal GIA nodes
76 Tas_Man_t * pTas; // the SAT solver
77 Vec_Int_t * vCex; // the counter-example
78 Vec_Ptr_t * vGiaLits; // literals given as assumptions
79*/
80 // used for bidecomposition
86 // solving data
87 Aig_Man_t * pAigWin; // window AIG with constraints
88 Cnf_Dat_t * pCnf; // the CNF for the window
89 sat_solver * pSat; // the SAT solver used
90 Int_Man_t * pMan; // interpolation manager;
91 Vec_Int_t * vMem; // memory for intermediate SOPs
92 Vec_Vec_t * vLevels; // levelized structure for updating
93 Vec_Ptr_t * vMfsFanins; // the new set of fanins
94 int nTotConfLim; // total conflict limit
95 int nTotConfLevel; // total conflicts on this level
96 // switching activity
98 // the result of solving
99 int nFanins; // the number of fanins
100 int nWords; // the number of words
101 int nCares; // the number of care minterms
102 unsigned uCare[(MFS_FANIN_MAX<=5)?1:1<<(MFS_FANIN_MAX-5)]; // the computed care-set
103 // performance statistics
104 int nTryRemoves; // number of fanin removals
105 int nTryResubs; // number of resubstitutions
106 int nRemoves; // number of fanin removals
107 int nResubs; // number of resubstitutions
119 // node/edge stats
126 // statistics
135};
136
137static inline float Abc_MfsObjProb( Mfs_Man_t * p, Abc_Obj_t * pObj ) { return (p->vProbs && pObj->Id < Vec_IntSize(p->vProbs))? Abc_Int2Float(Vec_IntEntry(p->vProbs,pObj->Id)) : 0.0; }
138
142
146
150
151/*=== mfsDiv.c ==========================================================*/
152extern Vec_Ptr_t * Abc_MfsComputeDivisors( Mfs_Man_t * p, Abc_Obj_t * pNode, int nLevDivMax );
153/*=== mfsInter.c ==========================================================*/
154extern sat_solver * Abc_MfsCreateSolverResub( Mfs_Man_t * p, int * pCands, int nCands, int fInvert );
155extern Hop_Obj_t * Abc_NtkMfsInterplate( Mfs_Man_t * p, int * pCands, int nCands );
156extern int Abc_NtkMfsInterplateEval( Mfs_Man_t * p, int * pCands, int nCands );
157/*=== mfsMan.c ==========================================================*/
158extern Mfs_Man_t * Mfs_ManAlloc( Mfs_Par_t * pPars );
159extern void Mfs_ManStop( Mfs_Man_t * p );
160extern void Mfs_ManClean( Mfs_Man_t * p );
161/*=== mfsResub.c ==========================================================*/
162extern void Abc_NtkMfsPrintResubStats( Mfs_Man_t * p );
163extern int Abc_NtkMfsEdgeSwapEval( Mfs_Man_t * p, Abc_Obj_t * pNode );
164extern int Abc_NtkMfsEdgePower( Mfs_Man_t * p, Abc_Obj_t * pNode );
165extern int Abc_NtkMfsResubNode( Mfs_Man_t * p, Abc_Obj_t * pNode );
166extern int Abc_NtkMfsResubNode2( Mfs_Man_t * p, Abc_Obj_t * pNode );
167/*=== mfsSat.c ==========================================================*/
168extern int Abc_NtkMfsSolveSat( Mfs_Man_t * p, Abc_Obj_t * pNode );
169extern int Abc_NtkAddOneHotness( Mfs_Man_t * p );
170/*=== mfsStrash.c ==========================================================*/
171extern Aig_Man_t * Abc_NtkConstructAig( Mfs_Man_t * p, Abc_Obj_t * pNode );
172extern double Abc_NtkConstraintRatio( Mfs_Man_t * p, Abc_Obj_t * pNode );
173/*=== mfsWin.c ==========================================================*/
174extern Vec_Ptr_t * Abc_MfsComputeRoots( Abc_Obj_t * pNode, int nWinTfoMax, int nFanoutLimit );
175
176/*=== mfsGia.c ==========================================================*/
177extern void Abc_NtkMfsConstructGia( Mfs_Man_t * p );
178extern void Abc_NtkMfsDeconstructGia( Mfs_Man_t * p );
179extern int Abc_NtkMfsTryResubOnceGia( Mfs_Man_t * p, int * pCands, int nCands );
180
181
182
184
185
186
187#endif
188
192
struct Abc_Obj_t_ Abc_Obj_t
Definition abc.h:116
struct Abc_Ntk_t_ Abc_Ntk_t
Definition abc.h:115
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition aig.h:50
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
struct Bdc_Man_t_ Bdc_Man_t
Definition bdc.h:43
#define sat_solver
Definition cecSatG2.c:34
struct Cnf_Dat_t_ Cnf_Dat_t
Definition cnf.h:52
Cube * p
Definition exorList.c:222
struct Hop_Obj_t_ Hop_Obj_t
Definition hop.h:50
int Abc_NtkMfsResubNode(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition mfsResub.c:539
Vec_Ptr_t * Abc_MfsComputeRoots(Abc_Obj_t *pNode, int nWinTfoMax, int nFanoutLimit)
Definition mfsWin.c:99
int Abc_NtkMfsTryResubOnceGia(Mfs_Man_t *p, int *pCands, int nCands)
Definition mfsGia.c:204
void Mfs_ManClean(Mfs_Man_t *p)
Definition mfsMan.c:75
Mfs_Man_t * Mfs_ManAlloc(Mfs_Par_t *pPars)
DECLARATIONS ///.
Definition mfsMan.c:45
sat_solver * Abc_MfsCreateSolverResub(Mfs_Man_t *p, int *pCands, int nCands, int fInvert)
Definition mfsInter.c:88
void Abc_NtkMfsConstructGia(Mfs_Man_t *p)
Definition mfsGia.c:120
void Abc_NtkMfsDeconstructGia(Mfs_Man_t *p)
Definition mfsGia.c:150
int Abc_NtkMfsEdgePower(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition mfsResub.c:508
int Abc_NtkMfsSolveSat(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition mfsSat.c:95
Hop_Obj_t * Abc_NtkMfsInterplate(Mfs_Man_t *p, int *pCands, int nCands)
Definition mfsInter.c:329
Vec_Ptr_t * Abc_MfsComputeDivisors(Mfs_Man_t *p, Abc_Obj_t *pNode, int nLevDivMax)
BASIC TYPES ///.
Definition mfsDiv.c:193
int Abc_NtkMfsInterplateEval(Mfs_Man_t *p, int *pCands, int nCands)
Definition mfsInter.c:285
double Abc_NtkConstraintRatio(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition mfsStrash.c:386
Aig_Man_t * Abc_NtkConstructAig(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition mfsStrash.c:233
struct Mfs_Man_t_ Mfs_Man_t
Definition mfsInt.h:49
int Abc_NtkMfsEdgeSwapEval(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition mfsResub.c:488
#define MFS_FANIN_MAX
INCLUDES ///.
Definition mfsInt.h:47
int Abc_NtkMfsResubNode2(Mfs_Man_t *p, Abc_Obj_t *pNode)
Definition mfsResub.c:585
void Mfs_ManStop(Mfs_Man_t *p)
Definition mfsMan.c:170
int Abc_NtkAddOneHotness(Mfs_Man_t *p)
Definition mfsSat.c:155
void Abc_NtkMfsPrintResubStats(Mfs_Man_t *p)
Definition mfsResub.c:72
typedefABC_NAMESPACE_HEADER_START struct Mfs_Par_t_ Mfs_Par_t
INCLUDES ///.
Definition mfs.h:42
struct Int_Man_t_ Int_Man_t
Definition satStore.h:123
int Id
Definition abc.h:132
int nDivWords
Definition mfsInt.h:68
int nTotConfLevel
Definition mfsInt.h:95
int nTotalEdgesEnd
Definition mfsInt.h:123
Vec_Int_t * vTruth
Definition mfsInt.h:81
Vec_Ptr_t * vDivCexes
Definition mfsInt.h:67
int nTotConfLim
Definition mfsInt.h:94
int nTotalEdgesBeg
Definition mfsInt.h:122
int nFanins
Definition mfsInt.h:99
abctime timeCnf
Definition mfsInt.h:131
int nResubs
Definition mfsInt.h:107
int nSatCexes
Definition mfsInt.h:71
unsigned uCare[(MFS_FANIN_MAX<=5)?1:1<<(MFS_FANIN_MAX-5)]
Definition mfsInt.h:102
int nTotalNodesBeg
Definition mfsInt.h:120
int nNodesResub
Definition mfsInt.h:109
int nNodesGained
Definition mfsInt.h:84
int nWords
Definition mfsInt.h:100
int nTryResubs
Definition mfsInt.h:105
Vec_Int_t * vDivLits
Definition mfsInt.h:63
double dTotalRatios
Definition mfsInt.h:118
int nNodesGainedLevel
Definition mfsInt.h:85
int nNodesDec
Definition mfsInt.h:83
sat_solver * pSat
Definition mfsInt.h:89
int nMintsCare
Definition mfsInt.h:110
Mfs_Par_t * pPars
Definition mfsInt.h:53
Vec_Int_t * vProjVarsSat
Definition mfsInt.h:65
int nDcMints
Definition mfsInt.h:116
int nNodesTried
Definition mfsInt.h:108
float TotalSwitchingBeg
Definition mfsInt.h:124
int nTotalDivs
Definition mfsInt.h:113
abctime timeAig
Definition mfsInt.h:129
int nNodesBad
Definition mfsInt.h:112
Aig_Man_t * pAigWin
Definition mfsInt.h:87
int nMintsTotal
Definition mfsInt.h:111
int nTimeOuts
Definition mfsInt.h:114
int nRemoves
Definition mfsInt.h:106
abctime timeWin
Definition mfsInt.h:127
int nCexes
Definition mfsInt.h:69
Bdc_Man_t * pManDec
Definition mfsInt.h:82
Vec_Int_t * vMem
Definition mfsInt.h:91
Vec_Int_t * vProjVarsCnf
Definition mfsInt.h:64
Abc_Ntk_t * pNtk
Definition mfsInt.h:54
Vec_Int_t * vProbs
Definition mfsInt.h:97
Vec_Ptr_t * vDivs
Definition mfsInt.h:62
int nFaninMax
Definition mfsInt.h:57
Vec_Ptr_t * vMfsFanins
Definition mfsInt.h:93
abctime timeSat
Definition mfsInt.h:132
Int_Man_t * pMan
Definition mfsInt.h:90
Vec_Ptr_t * vNodes
Definition mfsInt.h:61
abctime timeGia
Definition mfsInt.h:130
abctime timeDiv
Definition mfsInt.h:128
Vec_Ptr_t * vSuppsInv
Definition mfsInt.h:56
Vec_Ptr_t * vRoots
Definition mfsInt.h:59
abctime timeTotal
Definition mfsInt.h:134
int nTotalNodesEnd
Definition mfsInt.h:121
Vec_Vec_t * vLevels
Definition mfsInt.h:92
int nTryRemoves
Definition mfsInt.h:104
int nMaxDivs
Definition mfsInt.h:117
int nCares
Definition mfsInt.h:101
int nSatCalls
Definition mfsInt.h:70
Cnf_Dat_t * pCnf
Definition mfsInt.h:88
abctime timeInt
Definition mfsInt.h:133
int nTimeOutsLevel
Definition mfsInt.h:115
Aig_Man_t * pCare
Definition mfsInt.h:55
Vec_Ptr_t * vSupp
Definition mfsInt.h:60
float TotalSwitchingEnd
Definition mfsInt.h:125
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition vecVec.h:42