dar.h 5.18 KB
Newer Older
Alan Mishchenko committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/**CFile****************************************************************

  FileName    [dar.h]

  SystemName  [ABC: Logic synthesis and verification system.]

  PackageName [DAG-aware AIG rewriting.]

  Synopsis    [External declarations.]

  Author      [Alan Mishchenko]
  
  Affiliation [UC Berkeley]

  Date        [Ver. 1.0. Started - April 28, 2007.]

  Revision    [$Id: dar.h,v 1.00 2007/04/28 00:00:00 alanmi Exp $]

***********************************************************************/

21 22
#ifndef ABC__aig__dar__dar_h
#define ABC__aig__dar__dar_h
Alan Mishchenko committed
23

24

Alan Mishchenko committed
25 26 27 28 29 30 31 32
////////////////////////////////////////////////////////////////////////
///                          INCLUDES                                ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                         PARAMETERS                               ///
////////////////////////////////////////////////////////////////////////

33 34 35 36


ABC_NAMESPACE_HEADER_START
 
Alan Mishchenko committed
37

Alan Mishchenko committed
38 39 40 41
////////////////////////////////////////////////////////////////////////
///                         BASIC TYPES                              ///
////////////////////////////////////////////////////////////////////////

Alan Mishchenko committed
42 43
typedef struct Dar_RwrPar_t_            Dar_RwrPar_t;
typedef struct Dar_RefPar_t_            Dar_RefPar_t;
Alan Mishchenko committed
44

Alan Mishchenko committed
45
struct Dar_RwrPar_t_  
Alan Mishchenko committed
46
{
Alan Mishchenko committed
47 48
    int              nCutsMax;       // the maximum number of cuts to try
    int              nSubgMax;       // the maximum number of subgraphs to try
Alan Mishchenko committed
49
    int              fFanout;        // support fanout representation
Alan Mishchenko committed
50 51
    int              fUpdateLevel;   // update level 
    int              fUseZeros;      // performs zero-cost replacement
Alan Mishchenko committed
52
    int              fPower;         // enables power-aware rewriting
Alan Mishchenko committed
53
    int              fRecycle;       // enables cut recycling
Alan Mishchenko committed
54 55
    int              fVerbose;       // enables verbose output
    int              fVeryVerbose;   // enables very verbose output
Alan Mishchenko committed
56 57
};

Alan Mishchenko committed
58 59 60 61 62 63 64 65 66 67 68 69
struct Dar_RefPar_t_  
{
    int              nMffcMin;       // the min MFFC size for which refactoring is used
    int              nLeafMax;       // the max number of leaves of a cut
    int              nCutsMax;       // the max number of cuts to consider  
    int              fExtend;        // extends the cut below MFFC
    int              fUpdateLevel;   // updates the level after each move
    int              fUseZeros;      // perform zero-cost replacements
    int              fVerbose;       // verbosity level
    int              fVeryVerbose;   // enables very verbose output
};

Alan Mishchenko committed
70 71 72 73 74 75 76 77 78 79 80 81
////////////////////////////////////////////////////////////////////////
///                      MACRO DEFINITIONS                           ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                             ITERATORS                            ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                    FUNCTION DECLARATIONS                         ///
////////////////////////////////////////////////////////////////////////

Alan Mishchenko committed
82 83 84
/*=== darLib.c ========================================================*/
extern void            Dar_LibStart();
extern void            Dar_LibStop();
85 86
extern void            Dar_LibPrepare( int nSubgraphs );
extern int             Dar_LibReturnClass( unsigned uTruth );
Alan Mishchenko committed
87 88
/*=== darBalance.c ========================================================*/
extern Aig_Man_t *     Dar_ManBalance( Aig_Man_t * p, int fUpdateLevel );
Alan Mishchenko committed
89
extern Aig_Man_t *     Dar_ManBalanceXor( Aig_Man_t * pAig, int fExor, int fUpdateLevel, int fVerbose );
Alan Mishchenko committed
90
extern void            Dar_BalancePrintStats( Aig_Man_t * p );
Alan Mishchenko committed
91
/*=== darCore.c ========================================================*/
Alan Mishchenko committed
92 93
extern void            Dar_ManDefaultRwrParams( Dar_RwrPar_t * pPars );
extern int             Dar_ManRewrite( Aig_Man_t * pAig, Dar_RwrPar_t * pPars );
94
extern Aig_MmFixed_t * Dar_ManComputeCuts( Aig_Man_t * pAig, int nCutsMax, int fSkipTtMin, int fVerbose );
Alan Mishchenko committed
95 96 97 98
/*=== darRefact.c ========================================================*/
extern void            Dar_ManDefaultRefParams( Dar_RefPar_t * pPars );
extern int             Dar_ManRefactor( Aig_Man_t * pAig, Dar_RefPar_t * pPars );
/*=== darScript.c ========================================================*/
Alan Mishchenko committed
99
extern Aig_Man_t *     Dar_ManRewriteDefault( Aig_Man_t * pAig );
Alan Mishchenko committed
100
extern Aig_Man_t *     Dar_ManRwsat( Aig_Man_t * pAig, int fBalance, int fVerbose );
Alan Mishchenko committed
101 102
extern Aig_Man_t *     Dar_ManCompress( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fPower, int fVerbose );
extern Aig_Man_t *     Dar_ManCompress2( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fFanout, int fPower, int fVerbose );
Alan Mishchenko committed
103
extern Aig_Man_t *     Dar_ManChoice( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fConstruct, int nConfMax, int nLevelMax, int fVerbose );
Alan Mishchenko committed
104

105 106 107 108 109


ABC_NAMESPACE_HEADER_END


Alan Mishchenko committed
110 111 112 113 114 115 116

#endif

////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////