diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2007-01-24 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2007-01-24 08:01:00 -0800 |
commit | 1c26e2d29768c64315447969f137e3bf9ffa7dac (patch) | |
tree | c8aaab3a85e0065b39adc66358f4aa29bb8b1929 /src/opt/res/res.h | |
parent | b1a913fb5e85ba04646632f3d771ad79bfd8a720 (diff) | |
download | abc-1c26e2d29768c64315447969f137e3bf9ffa7dac.tar.gz abc-1c26e2d29768c64315447969f137e3bf9ffa7dac.tar.bz2 abc-1c26e2d29768c64315447969f137e3bf9ffa7dac.zip |
Version abc70124
Diffstat (limited to 'src/opt/res/res.h')
-rw-r--r-- | src/opt/res/res.h | 71 |
1 files changed, 10 insertions, 61 deletions
diff --git a/src/opt/res/res.h b/src/opt/res/res.h index 4a887741..fda35b89 100644 --- a/src/opt/res/res.h +++ b/src/opt/res/res.h @@ -37,50 +37,17 @@ extern "C" { /// BASIC TYPES /// //////////////////////////////////////////////////////////////////////// -typedef struct Res_Win_t_ Res_Win_t; -struct Res_Win_t_ +typedef struct Res_Par_t_ Res_Par_t; +struct Res_Par_t_ { - // the general data - int nWinTfiMax; // the fanin levels - int nWinTfoMax; // the fanout levels - int nLevLeaves; // the level where leaves begin - int nLevDivMax; // the maximum divisor level - Abc_Obj_t * pNode; // the node in the center - // the window data - Vec_Vec_t * vLevels; // nodes by level - Vec_Ptr_t * vLeaves; // leaves of the window - Vec_Ptr_t * vRoots; // roots of the window - Vec_Ptr_t * vDivs; // the candidate divisors of the node + // general parameters + int nWindow; // window size + int nSimWords; // the number of simulation words + int nCands; // the number of candidates to try + int fVerbose; // enable basic stats + int fVeryVerbose; // enable detailed stats }; -typedef struct Res_Sim_t_ Res_Sim_t; -struct Res_Sim_t_ -{ - Abc_Ntk_t * pAig; // AIG for simulation - // simulation parameters - int nWords; // the number of simulation words - int nPats; // the number of patterns - int nWordsOut; // the number of simulation words in the output patterns - int nPatsOut; // the number of patterns in the output patterns - // simulation info - Vec_Ptr_t * vPats; // input simulation patterns - Vec_Ptr_t * vPats0; // input simulation patterns - Vec_Ptr_t * vPats1; // input simulation patterns - Vec_Ptr_t * vOuts; // output simulation info - int nPats0; // the number of 0-patterns accumulated - int nPats1; // the number of 1-patterns accumulated - // resub candidates - Vec_Vec_t * vCands; // resubstitution candidates -}; - -// adds one node to the window -static inline void Res_WinAddNode( Res_Win_t * p, Abc_Obj_t * pObj ) -{ - assert( !pObj->fMarkA ); - pObj->fMarkA = 1; - Vec_VecPush( p->vLevels, pObj->Level, pObj ); -} - //////////////////////////////////////////////////////////////////////// /// MACRO DEFINITIONS /// //////////////////////////////////////////////////////////////////////// @@ -89,26 +56,8 @@ static inline void Res_WinAddNode( Res_Win_t * p, Abc_Obj_t * pObj ) /// FUNCTION DECLARATIONS /// //////////////////////////////////////////////////////////////////////// -/*=== resDivs.c ==========================================================*/ -extern void Res_WinDivisors( Res_Win_t * p, int nLevDivMax ); -extern int Res_WinVisitMffc( Res_Win_t * p ); -/*=== resFilter.c ==========================================================*/ -extern Vec_Vec_t * Res_FilterCandidates( Res_Win_t * pWin, Res_Sim_t * pSim ); -/*=== resSat.c ==========================================================*/ -extern void * Res_SatProveUnsat( Abc_Ntk_t * pAig, Vec_Ptr_t * vFanins ); -/*=== resSim.c ==========================================================*/ -extern Res_Sim_t * Res_SimAlloc( int nWords ); -extern void Res_SimFree( Res_Sim_t * p ); -extern int Res_SimPrepare( Res_Sim_t * p, Abc_Ntk_t * pAig ); -/*=== resStrash.c ==========================================================*/ -extern Abc_Ntk_t * Res_WndStrash( Res_Win_t * p ); -/*=== resWnd.c ==========================================================*/ -extern void Res_UpdateNetwork( Abc_Obj_t * pObj, Vec_Ptr_t * vFanins, Hop_Obj_t * pFunc, Vec_Vec_t * vLevels ); -/*=== resWnd.c ==========================================================*/ -extern Res_Win_t * Res_WinAlloc(); -extern void Res_WinFree( Res_Win_t * p ); -extern int Res_WinCompute( Abc_Obj_t * pNode, int nWinTfiMax, int nWinTfoMax, Res_Win_t * p ); -extern void Res_WinVisitNodeTfo( Res_Win_t * p ); +/*=== resCore.c ==========================================================*/ +extern int Abc_NtkResynthesize( Abc_Ntk_t * pNtk, Res_Par_t * pPars ); #ifdef __cplusplus |