mainInt.h 6.29 KB
Newer Older
Alan Mishchenko committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/**CFile****************************************************************

  FileName    [mainInt.h]

  SystemName  [ABC: Logic synthesis and verification system.]

  PackageName [The main package.]

  Synopsis    [Internal declarations of the main package.]

  Author      [Alan Mishchenko]
  
  Affiliation [UC Berkeley]

  Date        [Ver. 1.0. Started - June 20, 2005.]

Alan Mishchenko committed
17
  Revision    [$Id: mainInt.h,v 1.1 2008/05/14 22:13:13 wudenni Exp $]
Alan Mishchenko committed
18 19 20

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

21 22
#ifndef ABC__base__main__mainInt_h
#define ABC__base__main__mainInt_h
23

Alan Mishchenko committed
24
 
Alan Mishchenko committed
25 26 27 28 29
////////////////////////////////////////////////////////////////////////
///                          INCLUDES                                ///
////////////////////////////////////////////////////////////////////////

#include "main.h"
30 31 32 33 34 35 36 37 38 39
#include "misc/tim/tim.h"
#include "map/if/if.h"
#include "aig/aig/aig.h"
#include "aig/gia/gia.h"
#include "proof/ssw/ssw.h"
#include "proof/fra/fra.h"
//#include "aig/nwk/nwkMerge.h"
//#include "aig/ntl/ntlnwk.h"
#include "misc/ext/ext.h"
#include "misc/extra/extraBdd.h"
40 41

ABC_NAMESPACE_HEADER_START
Alan Mishchenko committed
42 43 44 45 46 47

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

// the current version
Alan Mishchenko committed
48
#define ABC_VERSION "UC Berkeley, ABC 1.01"
Alan Mishchenko committed
49 50 51 52 53 54 55 56 57 58 59

// the maximum length of an input line 
#define MAX_STR     32768

////////////////////////////////////////////////////////////////////////
///                    STRUCTURE DEFINITIONS                         ///
////////////////////////////////////////////////////////////////////////

struct Abc_Frame_t_
{
    // general info
Alan Mishchenko committed
60
    char *          sVersion;      // the name of the current version
Alan Mishchenko committed
61
    // commands, aliases, etc
Alan Mishchenko committed
62 63 64 65
    st_table *      tCommands;     // the command table
    st_table *      tAliases;      // the alias table
    st_table *      tFlags;        // the flag table
    Vec_Ptr_t *     aHistory;      // the command history
Alan Mishchenko committed
66
    // the functionality
Alan Mishchenko committed
67 68 69
    Abc_Ntk_t *     pNtkCur;       // the current network
    Abc_Ntk_t *     pNtkBestDelay; // the current network
    Abc_Ntk_t *     pNtkBestArea;  // the current network
Alan Mishchenko committed
70 71
    int             nSteps;        // the counter of different network processed
    int             fAutoexac;     // marks the autoexec mode
72 73
    int                fBatchMode;       // batch mode flag
    int             fBridgeMode;   // bridge mode flag
Alan Mishchenko committed
74 75 76 77 78
    // output streams
    FILE *          Out;
    FILE *          Err;
    FILE *          Hst;
    // used for runtime measurement
Alan Mishchenko committed
79 80
    double          TimeCommand;   // the runtime of the last command
    double          TimeTotal;     // the total runtime of all commands
Alan Mishchenko committed
81
    // temporary storage for structural choices
Alan Mishchenko committed
82
    Vec_Ptr_t *     vStore;        // networks to be used by choice
Alan Mishchenko committed
83
    // decomposition package
Alan Mishchenko committed
84 85
    void *          pManDec;       // decomposition manager
    DdManager *     dd;            // temporary BDD package
Alan Mishchenko committed
86
    // libraries for mapping
Alan Mishchenko committed
87 88 89 90 91
    void *          pLibLut;       // the current LUT library
    void *          pLibGen;       // the current genlib
    void *          pLibGen2;      // the current genlib
    void *          pLibSuper;     // the current supergate library
    void *          pLibVer;       // the current Verilog library
Alan Mishchenko committed
92 93

    // new code
Alan Mishchenko committed
94 95 96 97 98 99 100 101 102
    Gia_Man_t *     pGia;          // alternative current network as a light-weight AIG
    Gia_Man_t *     pGia2;         // copy of the above
    Abc_Cex_t *     pCex;          // a counter-example to fail the current network
    Vec_Ptr_t *     vCexVec;       // a vector of counter-examples if more than one PO fails
    Vec_Ptr_t *     vPoEquivs;     // equivalence classes of isomorphic primary outputs
    int             Status;                // the status of verification problem (proved=1, disproved=0, undecided=-1)
    int             nFrames;               // the number of time frames completed by BMC
    Vec_Ptr_t *     vPlugInComBinPairs;    // pairs of command and its binary name
    Vec_Ptr_t *     vLTLProperties_global; // related to LTL
Alan Mishchenko committed
103 104 105 106
    void *          pSave1; 
    void *          pSave2; 
    void *          pSave3; 
    void *          pSave4; 
Alan Mishchenko committed
107 108 109 110 111
    void *          pAbc85Ntl;
    void *          pAbc85Ntl2;
    void *          pAbc85Best;
    void *          pAbc85Delay;
    If_Lib_t *      pAbc85Lib;
Alan Mishchenko committed
112

Alan Mishchenko committed
113
    EXT_ABC_FRAME   // plugin for external functionality
Alan Mishchenko committed
114 115 116 117 118 119 120
};

////////////////////////////////////////////////////////////////////////
///                       GLOBAL VARIABLES                           ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
121
///                       MACRO DEFINITIONS                          ///
Alan Mishchenko committed
122 123 124 125
////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
126
///                     FUNCTION DEFINITIONS                         ///
Alan Mishchenko committed
127
////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
128

Alan Mishchenko committed
129
/*=== mvMain.c ===========================================================*/
Alan Mishchenko committed
130
extern ABC_DLL int             main( int argc, char * argv[] );
Alan Mishchenko committed
131
/*=== mvInit.c ===================================================*/
Alan Mishchenko committed
132 133
extern ABC_DLL void            Abc_FrameInit( Abc_Frame_t * pAbc );
extern ABC_DLL void            Abc_FrameEnd( Abc_Frame_t * pAbc );
Alan Mishchenko committed
134
/*=== mvFrame.c =====================================================*/
Alan Mishchenko committed
135 136
extern ABC_DLL Abc_Frame_t *   Abc_FrameAllocate();
extern ABC_DLL void            Abc_FrameDeallocate( Abc_Frame_t * p );
Alan Mishchenko committed
137
/*=== mvUtils.c =====================================================*/
Alan Mishchenko committed
138 139 140 141 142
extern ABC_DLL char *          Abc_UtilsGetVersion( Abc_Frame_t * pAbc );
extern ABC_DLL char *          Abc_UtilsGetUsersInput( Abc_Frame_t * pAbc );
extern ABC_DLL void            Abc_UtilsPrintHello( Abc_Frame_t * pAbc );
extern ABC_DLL void            Abc_UtilsPrintUsage( Abc_Frame_t * pAbc, char * ProgName );
extern ABC_DLL void            Abc_UtilsSource( Abc_Frame_t * pAbc );
Alan Mishchenko committed
143

144 145 146 147


ABC_NAMESPACE_HEADER_END

Alan Mishchenko committed
148 149
#endif

Alan Mishchenko committed
150 151 152
////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////