ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
resInt.h
Go to the documentation of this file.
1
20
21#ifndef ABC__opt__res__resInt_h
22#define ABC__opt__res__resInt_h
23
24
28
29#include "res.h"
30
34
35
36
38
39
43
44typedef struct Res_Win_t_ Res_Win_t;
46{
47 // windowing parameters
48 Abc_Obj_t * pNode; // the node in the center
49 int nWinTfiMax; // the fanin levels
50 int nWinTfoMax; // the fanout levels
51 int nLevDivMax; // the maximum divisor level
52 // internal windowing parameters
53 int nFanoutLimit; // the limit on the fanout count of a TFO node (if more, the node is treated as a root)
54 int nLevTfiMinus; // the number of additional levels to search from TFO below the level of leaves
55 // derived windowing parameters
56 int nLevLeafMin; // the minimum level of a leaf
57 int nLevTravMin; // the minimum level to search from TFO
58 int nDivsPlus; // the number of additional divisors
59 // the window data
60 Vec_Ptr_t * vRoots; // outputs of the window
61 Vec_Ptr_t * vLeaves; // inputs of the window
62 Vec_Ptr_t * vBranches; // side nodes of the window
63 Vec_Ptr_t * vNodes; // internal nodes of the window
64 Vec_Ptr_t * vDivs; // candidate divisors of the node
65 // temporary data
66 Vec_Vec_t * vMatrix; // TFI nodes below the given node
67};
68
69typedef struct Res_Sim_t_ Res_Sim_t;
71{
72 Abc_Ntk_t * pAig; // AIG for simulation
73 int nTruePis; // the number of true PIs of the window
74 int fConst0; // the node can be replaced by constant 0
75 int fConst1; // the node can be replaced by constant 0
76 // simulation parameters
77 int nWords; // the number of simulation words
78 int nPats; // the number of patterns
79 int nWordsIn; // the number of simulation words in the input patterns
80 int nPatsIn; // the number of patterns in the input patterns
81 int nBytesIn; // the number of bytes in the input patterns
82 int nWordsOut; // the number of simulation words in the output patterns
83 int nPatsOut; // the number of patterns in the output patterns
84 // simulation info
85 Vec_Ptr_t * vPats; // input simulation patterns
86 Vec_Ptr_t * vPats0; // input simulation patterns
87 Vec_Ptr_t * vPats1; // input simulation patterns
88 Vec_Ptr_t * vOuts; // output simulation info
89 int nPats0; // the number of 0-patterns accumulated
90 int nPats1; // the number of 1-patterns accumulated
91 // resub candidates
92 Vec_Vec_t * vCands; // resubstitution candidates
93 // statistics
95};
96
100
104
105/*=== resDivs.c ==========================================================*/
106extern void Res_WinDivisors( Res_Win_t * p, int nLevDivMax );
107extern void Res_WinSweepLeafTfo_rec( Abc_Obj_t * pObj, int nLevelLimit );
108extern int Res_WinVisitMffc( Abc_Obj_t * pNode );
109/*=== resFilter.c ==========================================================*/
110extern int Res_FilterCandidates( Res_Win_t * pWin, Abc_Ntk_t * pAig, Res_Sim_t * pSim, Vec_Vec_t * vResubs, Vec_Vec_t * vResubsW, int nFaninsMax, int fArea );
111extern int Res_FilterCandidatesArea( Res_Win_t * pWin, Abc_Ntk_t * pAig, Res_Sim_t * pSim, Vec_Vec_t * vResubs, Vec_Vec_t * vResubsW, int nFaninsMax );
112/*=== resSat.c ==========================================================*/
113extern void * Res_SatProveUnsat( Abc_Ntk_t * pAig, Vec_Ptr_t * vFanins );
114extern int Res_SatSimulate( Res_Sim_t * p, int nPats, int fOnSet );
115/*=== resSim.c ==========================================================*/
116extern Res_Sim_t * Res_SimAlloc( int nWords );
117extern void Res_SimFree( Res_Sim_t * p );
118extern int Res_SimPrepare( Res_Sim_t * p, Abc_Ntk_t * pAig, int nTruePis, int fVerbose );
119/*=== resStrash.c ==========================================================*/
120extern Abc_Ntk_t * Res_WndStrash( Res_Win_t * p );
121/*=== resWnd.c ==========================================================*/
122extern void Res_UpdateNetwork( Abc_Obj_t * pObj, Vec_Ptr_t * vFanins, Hop_Obj_t * pFunc, Vec_Vec_t * vLevels );
123/*=== resWnd.c ==========================================================*/
124extern Res_Win_t * Res_WinAlloc();
125extern void Res_WinFree( Res_Win_t * p );
126extern int Res_WinIsTrivial( Res_Win_t * p );
127extern int Res_WinCompute( Abc_Obj_t * pNode, int nWinTfiMax, int nWinTfoMax, Res_Win_t * p );
128
129
130
131
133
134
135
136#endif
137
141
int nWords
Definition abcNpn.c:127
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 ///.
Cube * p
Definition exorList.c:222
struct Hop_Obj_t_ Hop_Obj_t
Definition hop.h:50
void Res_SimFree(Res_Sim_t *p)
Definition resSim.c:127
struct Res_Sim_t_ Res_Sim_t
Definition resInt.h:69
int Res_SimPrepare(Res_Sim_t *p, Abc_Ntk_t *pAig, int nTruePis, int fVerbose)
Definition resSim.c:731
int Res_FilterCandidatesArea(Res_Win_t *pWin, Abc_Ntk_t *pAig, Res_Sim_t *pSim, Vec_Vec_t *vResubs, Vec_Vec_t *vResubsW, int nFaninsMax)
Definition resFilter.c:241
typedefABC_NAMESPACE_HEADER_START struct Res_Win_t_ Res_Win_t
INCLUDES ///.
Definition resInt.h:44
int Res_FilterCandidates(Res_Win_t *pWin, Abc_Ntk_t *pAig, Res_Sim_t *pSim, Vec_Vec_t *vResubs, Vec_Vec_t *vResubsW, int nFaninsMax, int fArea)
FUNCTION DEFINITIONS ///.
Definition resFilter.c:49
void * Res_SatProveUnsat(Abc_Ntk_t *pAig, Vec_Ptr_t *vFanins)
FUNCTION DEFINITIONS ///.
Definition resSat.c:52
int Res_WinIsTrivial(Res_Win_t *p)
Definition resWin.c:435
int Res_SatSimulate(Res_Sim_t *p, int nPats, int fOnSet)
Definition resSat.c:212
Abc_Ntk_t * Res_WndStrash(Res_Win_t *p)
FUNCTION DEFINITIONS ///.
Definition resStrash.c:49
int Res_WinCompute(Abc_Obj_t *pNode, int nWinTfiMax, int nWinTfoMax, Res_Win_t *p)
Definition resWin.c:451
void Res_WinSweepLeafTfo_rec(Abc_Obj_t *pObj, int nLevelLimit)
Definition resDivs.c:196
void Res_WinFree(Res_Win_t *p)
Definition resWin.c:76
Res_Win_t * Res_WinAlloc()
DECLARATIONS ///.
Definition resWin.c:46
int Res_WinVisitMffc(Abc_Obj_t *pNode)
Definition resDivs.c:272
void Res_WinDivisors(Res_Win_t *p, int nLevDivMax)
MACRO DEFINITIONS ///.
Definition resDivs.c:48
Res_Sim_t * Res_SimAlloc(int nWords)
DECLARATIONS ///.
Definition resSim.c:46
void Res_UpdateNetwork(Abc_Obj_t *pObj, Vec_Ptr_t *vFanins, Hop_Obj_t *pFunc, Vec_Vec_t *vLevels)
Definition resCore.c:185
int nWordsOut
Definition resInt.h:82
int nPatsIn
Definition resInt.h:80
Vec_Ptr_t * vPats1
Definition resInt.h:87
Abc_Ntk_t * pAig
Definition resInt.h:72
int nPats1
Definition resInt.h:90
int nWords
Definition resInt.h:77
int fConst0
Definition resInt.h:74
abctime timeSat
Definition resInt.h:94
Vec_Ptr_t * vOuts
Definition resInt.h:88
int nTruePis
Definition resInt.h:73
int nWordsIn
Definition resInt.h:79
int nPats
Definition resInt.h:78
Vec_Ptr_t * vPats
Definition resInt.h:85
int nBytesIn
Definition resInt.h:81
int fConst1
Definition resInt.h:75
int nPats0
Definition resInt.h:89
int nPatsOut
Definition resInt.h:83
Vec_Ptr_t * vPats0
Definition resInt.h:86
Vec_Vec_t * vCands
Definition resInt.h:92
int nWinTfiMax
Definition resInt.h:49
Vec_Ptr_t * vRoots
Definition resInt.h:60
Vec_Vec_t * vMatrix
Definition resInt.h:66
int nFanoutLimit
Definition resInt.h:53
Vec_Ptr_t * vBranches
Definition resInt.h:62
int nLevTfiMinus
Definition resInt.h:54
Vec_Ptr_t * vDivs
Definition resInt.h:64
Vec_Ptr_t * vLeaves
Definition resInt.h:61
int nDivsPlus
Definition resInt.h:58
Vec_Ptr_t * vNodes
Definition resInt.h:63
int nWinTfoMax
Definition resInt.h:50
Abc_Obj_t * pNode
Definition resInt.h:48
int nLevTravMin
Definition resInt.h:57
int nLevDivMax
Definition resInt.h:51
int nLevLeafMin
Definition resInt.h:56
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