1 /**CFile****************************************************************
2 
3   FileName    [sfm.h]
4 
5   SystemName  [ABC: Logic synthesis and verification system.]
6 
7   PackageName [SAT-based optimization using internal don't-cares.]
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: sfm.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__opt_sfm__h
22 #define ABC__opt_sfm__h
23 
24 
25 ////////////////////////////////////////////////////////////////////////
26 ///                          INCLUDES                                ///
27 ////////////////////////////////////////////////////////////////////////
28 
29 #include "misc/vec/vecWec.h"
30 
31 ////////////////////////////////////////////////////////////////////////
32 ///                         PARAMETERS                               ///
33 ////////////////////////////////////////////////////////////////////////
34 
35 ABC_NAMESPACE_HEADER_START
36 
37 ////////////////////////////////////////////////////////////////////////
38 ///                         BASIC TYPES                              ///
39 ////////////////////////////////////////////////////////////////////////
40 
41 typedef struct Sfm_Ntk_t_ Sfm_Ntk_t;
42 typedef struct Sfm_Par_t_ Sfm_Par_t;
43 struct Sfm_Par_t_
44 {
45     int             nTfoLevMax;    // the maximum fanout levels
46     int             nTfiLevMax;    // the maximum fanin levels
47     int             nFanoutMax;    // the maximum number of fanouts
48     int             nDepthMax;     // the maximum depth to try
49     int             nVarMax;       // the maximum variable count
50     int             nMffcMin;      // the minimum MFFC size
51     int             nMffcMax;      // the maximum MFFC size
52     int             nDecMax;       // the maximum number of decompositions
53     int             nWinSizeMax;   // the maximum window size
54     int             nGrowthLevel;  // the maximum allowed growth in level
55     int             nBTLimit;      // the maximum number of conflicts in one SAT run
56     int             nNodesMax;     // the maximum number of nodes to try
57     int             iNodeOne;      // one particular node to try
58     int             nFirstFixed;   // the number of first nodes to be treated as fixed
59     int             nTimeWin;      // the size of timing window in percents
60     int             DeltaCrit;     // delay delta in picoseconds
61     int             DelAreaRatio;  // delay/area tradeoff (how many ps we trade for a unit of area)
62     int             fRrOnly;       // perform redundance removal
63     int             fArea;         // performs optimization for area
64     int             fAreaRev;      // performs optimization for area in reverse order
65     int             fMoreEffort;   // performs high-affort minimization
66     int             fUseAndOr;     // enable internal detection of AND/OR gates
67     int             fZeroCost;     // enable zero-cost replacement
68     int             fUseSim;       // enable simulation
69     int             fPrintDecs;    // enable printing decompositions
70     int             fAllBoxes;     // enable preserving all boxes
71     int             fLibVerbose;   // enable library stats
72     int             fDelayVerbose; // enable delay stats
73     int             fVerbose;      // enable basic stats
74     int             fVeryVerbose;  // enable detailed stats
75 };
76 
77 ////////////////////////////////////////////////////////////////////////
78 ///                      MACRO DEFINITIONS                           ///
79 ////////////////////////////////////////////////////////////////////////
80 
81 ////////////////////////////////////////////////////////////////////////
82 ///                    FUNCTION DECLARATIONS                         ///
83 ////////////////////////////////////////////////////////////////////////
84 
85 /*=== sfmCnf.c ==========================================================*/
86 /*=== sfmCore.c ==========================================================*/
87 extern void         Sfm_ParSetDefault( Sfm_Par_t * pPars );
88 extern int          Sfm_NtkPerform( Sfm_Ntk_t * p, Sfm_Par_t * pPars );
89 /*=== sfmNtk.c ==========================================================*/
90 extern Sfm_Ntk_t *  Sfm_NtkConstruct( Vec_Wec_t * vFanins, int nPis, int nPos, Vec_Str_t * vFixed, Vec_Str_t * vEmpty, Vec_Wrd_t * vTruths, Vec_Int_t * vStarts, Vec_Wrd_t * vTruths2 );
91 extern void         Sfm_NtkFree( Sfm_Ntk_t * p );
92 extern Vec_Int_t *  Sfm_NodeReadFanins( Sfm_Ntk_t * p, int i );
93 extern word *       Sfm_NodeReadTruth( Sfm_Ntk_t * p, int i );
94 extern int          Sfm_NodeReadFixed( Sfm_Ntk_t * p, int i );
95 extern int          Sfm_NodeReadUsed( Sfm_Ntk_t * p, int i );
96 /*=== sfmWin.c ==========================================================*/
97 extern Vec_Int_t *  Sfm_NtkDfs( Sfm_Ntk_t * p, Vec_Wec_t * vGroups, Vec_Int_t * vGroupMap, Vec_Int_t * vBoxesLeft, int fAllBoxes );
98 
99 
100 ABC_NAMESPACE_HEADER_END
101 
102 #endif
103 
104 ////////////////////////////////////////////////////////////////////////
105 ///                       END OF FILE                                ///
106 ////////////////////////////////////////////////////////////////////////
107 
108