mainInt.h 4.59 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    [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.]

  Revision    [$Id: mainInt.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]

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

Alan Mishchenko committed
21 22
#ifndef __MAIN_INT_H__
#define __MAIN_INT_H__
Alan Mishchenko committed
23 24 25 26 27 28 29 30 31 32 33 34

////////////////////////////////////////////////////////////////////////
///                          INCLUDES                                ///
////////////////////////////////////////////////////////////////////////

#include "main.h"

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

// the current version
Alan Mishchenko committed
35
#define ABC_VERSION "UC Berkeley, ABC 1.01"
Alan Mishchenko committed
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55

// 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
    Abc_Ntk_t *     pNtkCur;     // the current network
    int             nSteps;      // the counter of different network processed
Alan Mishchenko committed
56 57
    int             fAutoexac;   // marks the autoexec mode
    int                fBatchMode;     // are we invoked in batch mode?
Alan Mishchenko committed
58 59 60 61 62 63 64 65 66 67
    // output streams
    FILE *          Out;
    FILE *          Err;
    FILE *          Hst;
    // used for runtime measurement
    int             TimeCommand; // the runtime of the last command
    int             TimeTotal;   // the total runtime of all commands
    // temporary storage for structural choices
    Abc_Ntk_t *     pStored;     // the stored networks
    int             nStored;     // the number of stored networks
Alan Mishchenko committed
68 69
    // decomposition package
    void *          pManDec;     // decomposition manager
Alan Mishchenko committed
70 71
    DdManager *     dd;          // temporary BDD package
    // libraries for mapping
Alan Mishchenko committed
72 73 74
    void *          pLibLut;     // the current LUT library
    void *          pLibGen;     // the current genlib
    void *          pLibSuper;   // the current supergate library
Alan Mishchenko committed
75
    void *          pLibVer;     // the current Verilog library
Alan Mishchenko committed
76 77 78 79 80 81 82
};

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

////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
83
///                       MACRO DEFINITIONS                          ///
Alan Mishchenko committed
84 85 86 87
////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
88
///                     FUNCTION DEFINITIONS                         ///
Alan Mishchenko committed
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
////////////////////////////////////////////////////////////////////////

/*=== mvMain.c ===========================================================*/
extern int             main( int argc, char * argv[] );
/*=== mvInit.c ===================================================*/
extern void            Abc_FrameInit( Abc_Frame_t * pAbc );
extern void            Abc_FrameEnd( Abc_Frame_t * pAbc );
/*=== mvFrame.c =====================================================*/
extern Abc_Frame_t *   Abc_FrameAllocate();
extern void            Abc_FrameDeallocate( Abc_Frame_t * p );
/*=== mvUtils.c =====================================================*/
extern char *          Abc_UtilsGetVersion( Abc_Frame_t * pAbc );
extern char *          Abc_UtilsGetUsersInput( Abc_Frame_t * pAbc );
extern void            Abc_UtilsPrintHello( Abc_Frame_t * pAbc );
extern void            Abc_UtilsPrintUsage( Abc_Frame_t * pAbc, char * ProgName );
extern void            Abc_UtilsSource( Abc_Frame_t * pAbc );

Alan Mishchenko committed
106 107
#endif

Alan Mishchenko committed
108 109 110
////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////