mainInt.h 6.09 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

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

Alan Mishchenko committed
21 22
#ifndef __MAIN_INT_H__
#define __MAIN_INT_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 40
#include "tim.h"
#include "if.h"
#include "aig.h"
#include "gia.h"
#include "ssw.h"
#include "fra.h"
#include "nwkMerge.h"
#include "ntlnwk.h"
#include "ext.h"

ABC_NAMESPACE_HEADER_START
Alan Mishchenko committed
41 42 43 44 45 46

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

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

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

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

struct Abc_Frame_t_
{
    // general info
    char *          sVersion;    // the name of the current version
    // commands, aliases, etc
    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
    // the functionality
Alan Mishchenko committed
66 67 68
    Abc_Ntk_t *     pNtkCur;       // the current network
    Abc_Ntk_t *     pNtkBestDelay; // the current network
    Abc_Ntk_t *     pNtkBestArea;  // the current network
Alan Mishchenko committed
69
    int             nSteps;      // the counter of different network processed
Alan Mishchenko committed
70 71
    int             fAutoexac;   // marks the autoexec mode
    int                fBatchMode;     // are we invoked in batch mode?
Alan Mishchenko committed
72 73 74 75 76
    // output streams
    FILE *          Out;
    FILE *          Err;
    FILE *          Hst;
    // used for runtime measurement
Alan Mishchenko committed
77 78
    double          TimeCommand; // the runtime of the last command
    double          TimeTotal;   // the total runtime of all commands
Alan Mishchenko committed
79
    // temporary storage for structural choices
Alan Mishchenko committed
80
    Vec_Ptr_t *     vStore;      // networks to be used by choice
Alan Mishchenko committed
81 82
    // decomposition package
    void *          pManDec;     // decomposition manager
Alan Mishchenko committed
83 84
    DdManager *     dd;          // temporary BDD package
    // libraries for mapping
Alan Mishchenko committed
85 86
    void *          pLibLut;     // the current LUT library
    void *          pLibGen;     // the current genlib
Alan Mishchenko committed
87
    void *          pLibGen2;    // the current genlib
Alan Mishchenko committed
88
    void *          pLibSuper;   // the current supergate library
Alan Mishchenko committed
89
    void *          pLibVer;     // the current Verilog library
Alan Mishchenko committed
90 91

    // new code
92 93 94 95 96 97 98 99 100
    Ntl_Man_t *     pAbc8Ntl;    // the current design
    Nwk_Man_t *     pAbc8Nwk;    // the current mapped network
    Aig_Man_t *     pAbc8Aig;    // the current AIG
    If_Lib_t *      pAbc8Lib;    // the current LUT library
    If_Lib_t *      pAbc85Lib;   // the current LUT library

    Gia_Man_t *     pGia;
    Gia_Man_t *     pGia2;
    Abc_Cex_t *     pCex; 
Alan Mishchenko committed
101

Alan Mishchenko committed
102 103 104 105 106
    void *          pSave1; 
    void *          pSave2; 
    void *          pSave3; 
    void *          pSave4; 

107 108 109
    // related to LTL
    Vec_Ptr_t *     vLTLProperties_global;

Alan Mishchenko committed
110 111 112
    // the addition to keep the best Ntl that can be used to restore
    void *            pAbc8NtlBestDelay;    // the best delay, Ntl
    void *            pAbc8NtlBestArea;    // the best area
113 114 115 116
    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
117 118

    EXT_ABC_FRAME                // plugin for external functionality
Alan Mishchenko committed
119 120 121 122 123 124 125
};

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

////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
126
///                       MACRO DEFINITIONS                          ///
Alan Mishchenko committed
127 128 129 130
////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
131
///                     FUNCTION DEFINITIONS                         ///
Alan Mishchenko committed
132
////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
133

Alan Mishchenko committed
134
/*=== mvMain.c ===========================================================*/
Alan Mishchenko committed
135
extern ABC_DLL int             main( int argc, char * argv[] );
Alan Mishchenko committed
136
/*=== mvInit.c ===================================================*/
Alan Mishchenko committed
137 138
extern ABC_DLL void            Abc_FrameInit( Abc_Frame_t * pAbc );
extern ABC_DLL void            Abc_FrameEnd( Abc_Frame_t * pAbc );
Alan Mishchenko committed
139
/*=== mvFrame.c =====================================================*/
Alan Mishchenko committed
140 141
extern ABC_DLL Abc_Frame_t *   Abc_FrameAllocate();
extern ABC_DLL void            Abc_FrameDeallocate( Abc_Frame_t * p );
Alan Mishchenko committed
142
/*=== mvUtils.c =====================================================*/
Alan Mishchenko committed
143 144 145 146 147
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
148

149 150 151 152


ABC_NAMESPACE_HEADER_END

Alan Mishchenko committed
153 154
#endif

Alan Mishchenko committed
155 156 157
////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////