mirror of
https://github.com/YosysHQ/abc.git
synced 2026-09-04 00:31:14 +02:00
Version abc50908
This commit is contained in:
+63
-2
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "mainInt.h"
|
||||
|
||||
// this line should be included in the library project
|
||||
#define _LIB
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/// DECLARATIONS ///
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -30,6 +33,8 @@ static int TypeCheck( Abc_Frame_t * pAbc, char * s);
|
||||
/// FUNCTION DEFITIONS ///
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _LIB
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis [The main() procedure.]
|
||||
@@ -64,8 +69,8 @@ int main( int argc, char * argv[] )
|
||||
fInitRead = 0;
|
||||
fFinalWrite = 0;
|
||||
sInFile = sOutFile = NULL;
|
||||
sprintf( sReadCmd, "read_blif_mv" );
|
||||
sprintf( sWriteCmd, "write_blif_mv" );
|
||||
sprintf( sReadCmd, "read" );
|
||||
sprintf( sWriteCmd, "write" );
|
||||
|
||||
util_getopt_reset();
|
||||
while ((c = util_getopt(argc, argv, "c:hf:F:o:st:T:x")) != EOF) {
|
||||
@@ -226,6 +231,62 @@ usage:
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis [Initialization procedure for the library project.]
|
||||
|
||||
Description []
|
||||
|
||||
SideEffects []
|
||||
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
void Abc_Start()
|
||||
{
|
||||
Abc_Frame_t * pAbc;
|
||||
|
||||
// added to detect memory leaks:
|
||||
#ifdef _DEBUG
|
||||
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
|
||||
#endif
|
||||
|
||||
// get global frame (singleton pattern)
|
||||
// will be initialized on first call
|
||||
pAbc = Abc_FrameGetGlobalFrame();
|
||||
|
||||
// source the resource file
|
||||
Abc_UtilsSource( pAbc );
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis [Deallocation procedure for the library project.]
|
||||
|
||||
Description []
|
||||
|
||||
SideEffects []
|
||||
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
void Abc_Stop()
|
||||
{
|
||||
Abc_Frame_t * pAbc;
|
||||
int fStatus = 0;
|
||||
|
||||
// if the memory should be freed, quit packages
|
||||
if ( fStatus == -2 )
|
||||
{
|
||||
pAbc = Abc_FrameGetGlobalFrame();
|
||||
// perform uninitializations
|
||||
Abc_FrameEnd( pAbc );
|
||||
// stop the framework
|
||||
Abc_FrameDeallocate( pAbc );
|
||||
}
|
||||
}
|
||||
|
||||
/**Function********************************************************************
|
||||
|
||||
|
||||
@@ -73,7 +73,11 @@ typedef struct Abc_Frame_t_ Abc_Frame_t;
|
||||
/// FUNCTION DEFITIONS ///
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*=== mvFrame.c ===========================================================*/
|
||||
/*=== main.c ===========================================================*/
|
||||
extern void Abc_Start();
|
||||
extern void Abc_Stop();
|
||||
|
||||
/*=== mainFrame.c ===========================================================*/
|
||||
extern Abc_Ntk_t * Abc_FrameReadNet( Abc_Frame_t * p );
|
||||
extern FILE * Abc_FrameReadOut( Abc_Frame_t * p );
|
||||
extern FILE * Abc_FrameReadErr( Abc_Frame_t * p );
|
||||
|
||||
Reference in New Issue
Block a user