2005-07-29 17:01:00 +02:00
|
|
|
/**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.]
|
|
|
|
|
|
2008-05-16 17:01:00 +02:00
|
|
|
Revision [$Id: mainInt.h,v 1.1 2008/05/14 22:13:13 wudenni Exp $]
|
2005-07-29 17:01:00 +02:00
|
|
|
|
|
|
|
|
***********************************************************************/
|
|
|
|
|
|
2012-01-21 13:30:10 +01:00
|
|
|
#ifndef ABC__base__main__mainInt_h
|
|
|
|
|
#define ABC__base__main__mainInt_h
|
2010-11-01 09:35:04 +01:00
|
|
|
|
2008-05-16 17:01:00 +02:00
|
|
|
|
2005-07-29 17:01:00 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
/// INCLUDES ///
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#include "main.h"
|
2012-07-08 05:14:12 +02:00
|
|
|
#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"
|
2010-11-01 09:35:04 +01:00
|
|
|
|
|
|
|
|
ABC_NAMESPACE_HEADER_START
|
2005-07-29 17:01:00 +02:00
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
/// PARAMETERS ///
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// the current version
|
2005-09-05 17:01:00 +02:00
|
|
|
#define ABC_VERSION "UC Berkeley, ABC 1.01"
|
2005-07-29 17:01:00 +02:00
|
|
|
|
|
|
|
|
// the maximum length of an input line
|
2012-08-25 00:44:33 +02:00
|
|
|
#define ABC_MAX_STR (1<<15)
|
2005-07-29 17:01:00 +02:00
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
/// STRUCTURE DEFINITIONS ///
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
struct Abc_Frame_t_
|
|
|
|
|
{
|
|
|
|
|
// general info
|
2012-04-27 11:26:41 +02:00
|
|
|
char * sVersion; // the name of the current version
|
2012-10-03 06:41:24 +02:00
|
|
|
char * sBinary; // the name of the binary running
|
2005-07-29 17:01:00 +02:00
|
|
|
// commands, aliases, etc
|
2012-09-29 23:11:03 +02:00
|
|
|
st__table * tCommands; // the command table
|
|
|
|
|
st__table * tAliases; // the alias table
|
|
|
|
|
st__table * tFlags; // the flag table
|
2012-04-27 11:26:41 +02:00
|
|
|
Vec_Ptr_t * aHistory; // the command history
|
2005-07-29 17:01:00 +02:00
|
|
|
// the functionality
|
2011-03-29 22:04:21 +02:00
|
|
|
Abc_Ntk_t * pNtkCur; // the current network
|
|
|
|
|
Abc_Ntk_t * pNtkBestDelay; // the current network
|
|
|
|
|
Abc_Ntk_t * pNtkBestArea; // the current network
|
2012-04-27 11:26:41 +02:00
|
|
|
int nSteps; // the counter of different network processed
|
2012-08-24 21:25:53 +02:00
|
|
|
int fSource; // marks the source mode
|
2012-04-27 11:26:41 +02:00
|
|
|
int fAutoexac; // marks the autoexec mode
|
2012-07-07 19:44:34 +02:00
|
|
|
int fBatchMode; // batch mode flag
|
|
|
|
|
int fBridgeMode; // bridge mode flag
|
2005-07-29 17:01:00 +02:00
|
|
|
// output streams
|
|
|
|
|
FILE * Out;
|
|
|
|
|
FILE * Err;
|
|
|
|
|
FILE * Hst;
|
|
|
|
|
// used for runtime measurement
|
2012-04-27 11:26:41 +02:00
|
|
|
double TimeCommand; // the runtime of the last command
|
|
|
|
|
double TimeTotal; // the total runtime of all commands
|
2005-07-29 17:01:00 +02:00
|
|
|
// temporary storage for structural choices
|
2012-04-27 11:26:41 +02:00
|
|
|
Vec_Ptr_t * vStore; // networks to be used by choice
|
2005-09-02 17:01:00 +02:00
|
|
|
// decomposition package
|
2012-04-27 11:26:41 +02:00
|
|
|
void * pManDec; // decomposition manager
|
|
|
|
|
DdManager * dd; // temporary BDD package
|
2005-09-05 17:01:00 +02:00
|
|
|
// libraries for mapping
|
2012-04-27 11:26:41 +02:00
|
|
|
void * pLibLut; // the current LUT library
|
2012-12-10 09:59:54 +01:00
|
|
|
void * pLibBox; // the current box library
|
2012-04-27 11:26:41 +02:00
|
|
|
void * pLibGen; // the current genlib
|
|
|
|
|
void * pLibGen2; // the current genlib
|
|
|
|
|
void * pLibSuper; // the current supergate library
|
|
|
|
|
void * pLibVer; // the current Verilog library
|
2012-08-25 06:31:46 +02:00
|
|
|
void * pLibScl; // the current Liberty library
|
2008-03-26 16:01:00 +01:00
|
|
|
|
|
|
|
|
// new code
|
2012-04-27 11:26:41 +02:00
|
|
|
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
|
2012-11-14 23:33:27 +01:00
|
|
|
Abc_Cex_t * pCex2; // copy of the above
|
2012-04-27 11:26:41 +02:00
|
|
|
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
|
2013-04-18 07:18:43 +02:00
|
|
|
Vec_Int_t * vAbcObjIds; // object IDs
|
2012-04-27 11:26:41 +02:00
|
|
|
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
|
2015-06-23 08:04:53 +02:00
|
|
|
void * pSave1;
|
|
|
|
|
void * pSave2;
|
|
|
|
|
void * pSave3;
|
|
|
|
|
void * pSave4;
|
2012-04-27 11:26:41 +02:00
|
|
|
void * pAbc85Ntl;
|
|
|
|
|
void * pAbc85Ntl2;
|
|
|
|
|
void * pAbc85Best;
|
|
|
|
|
void * pAbc85Delay;
|
2015-06-23 08:04:53 +02:00
|
|
|
|
2012-04-27 11:26:41 +02:00
|
|
|
EXT_ABC_FRAME // plugin for external functionality
|
2005-07-29 17:01:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
/// GLOBAL VARIABLES ///
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
2008-01-31 05:01:00 +01:00
|
|
|
/// MACRO DEFINITIONS ///
|
2005-07-29 17:01:00 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
2008-01-31 05:01:00 +01:00
|
|
|
/// FUNCTION DEFINITIONS ///
|
2005-07-29 17:01:00 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////
|
2009-01-18 17:01:00 +01:00
|
|
|
|
2005-07-29 17:01:00 +02:00
|
|
|
/*=== mvMain.c ===========================================================*/
|
2008-05-16 17:01:00 +02:00
|
|
|
extern ABC_DLL int main( int argc, char * argv[] );
|
2005-07-29 17:01:00 +02:00
|
|
|
/*=== mvInit.c ===================================================*/
|
2008-05-16 17:01:00 +02:00
|
|
|
extern ABC_DLL void Abc_FrameInit( Abc_Frame_t * pAbc );
|
|
|
|
|
extern ABC_DLL void Abc_FrameEnd( Abc_Frame_t * pAbc );
|
2005-07-29 17:01:00 +02:00
|
|
|
/*=== mvFrame.c =====================================================*/
|
2008-05-16 17:01:00 +02:00
|
|
|
extern ABC_DLL Abc_Frame_t * Abc_FrameAllocate();
|
|
|
|
|
extern ABC_DLL void Abc_FrameDeallocate( Abc_Frame_t * p );
|
2005-07-29 17:01:00 +02:00
|
|
|
/*=== mvUtils.c =====================================================*/
|
2008-05-16 17:01:00 +02:00
|
|
|
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 );
|
2005-07-29 17:01:00 +02:00
|
|
|
|
2010-11-01 09:35:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
ABC_NAMESPACE_HEADER_END
|
|
|
|
|
|
2008-01-31 05:01:00 +01:00
|
|
|
#endif
|
|
|
|
|
|
2005-07-29 17:01:00 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
|
/// END OF FILE ///
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|