abc/src/base/main/mainInit.c

169 lines
4.8 KiB
C
Raw Normal View History

2005-07-29 17:01:00 +02:00
/**CFile****************************************************************
FileName [mainInit.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [The main package.]
Synopsis [Initialization procedures.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
2008-01-31 05:01:00 +01:00
Revision [$Id: mainInit.c,v 1.3 2005/09/14 22:53:37 casem Exp $]
2005-07-29 17:01:00 +02:00
***********************************************************************/
#include "base/abc/abc.h"
2005-07-29 17:01:00 +02:00
#include "mainInt.h"
2010-11-01 09:35:04 +01:00
ABC_NAMESPACE_IMPL_START
2005-07-29 17:01:00 +02:00
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
extern void Abc_Init( Abc_Frame_t * pAbc );
extern void Abc_End ( Abc_Frame_t * pAbc );
extern void Io_Init( Abc_Frame_t * pAbc );
extern void Io_End ( Abc_Frame_t * pAbc );
extern void Cmd_Init( Abc_Frame_t * pAbc );
extern void Cmd_End ( Abc_Frame_t * pAbc );
2012-12-10 09:59:54 +01:00
extern void If_Init( Abc_Frame_t * pAbc );
extern void If_End ( Abc_Frame_t * pAbc );
2005-07-29 17:01:00 +02:00
extern void Map_Init( Abc_Frame_t * pAbc );
extern void Map_End ( Abc_Frame_t * pAbc );
extern void Mio_Init( Abc_Frame_t * pAbc );
extern void Mio_End ( Abc_Frame_t * pAbc );
extern void Super_Init( Abc_Frame_t * pAbc );
extern void Super_End ( Abc_Frame_t * pAbc );
2010-11-01 09:35:04 +01:00
extern void Libs_Init( Abc_Frame_t * pAbc );
extern void Libs_End( Abc_Frame_t * pAbc );
extern void Load_Init( Abc_Frame_t * pAbc );
extern void Load_End( Abc_Frame_t * pAbc );
extern void Scl_Init( Abc_Frame_t * pAbc );
extern void Scl_End( Abc_Frame_t * pAbc );
2014-09-12 22:40:48 +02:00
extern void Wlc_Init( Abc_Frame_t * pAbc );
extern void Wlc_End( Abc_Frame_t * pAbc );
2015-07-22 02:42:49 +02:00
extern void Bac_Init( Abc_Frame_t * pAbc );
extern void Bac_End( Abc_Frame_t * pAbc );
2014-11-29 23:36:26 +01:00
extern void Cba_Init( Abc_Frame_t * pAbc );
extern void Cba_End( Abc_Frame_t * pAbc );
2015-03-18 13:39:22 +01:00
extern void Pla_Init( Abc_Frame_t * pAbc );
extern void Pla_End( Abc_Frame_t * pAbc );
2011-03-29 22:04:21 +02:00
extern void Test_Init( Abc_Frame_t * pAbc );
extern void Test_End( Abc_Frame_t * pAbc );
2012-03-14 00:12:16 +01:00
extern void Abc2_Init( Abc_Frame_t * pAbc );
extern void Abc2_End ( Abc_Frame_t * pAbc );
2012-04-27 11:26:41 +02:00
extern void Abc85_Init( Abc_Frame_t * pAbc );
extern void Abc85_End( Abc_Frame_t * pAbc );
extern void Glucose_Init( Abc_Frame_t * pAbc );
extern void Glucose_End( Abc_Frame_t * pAbc );
2005-07-29 17:01:00 +02:00
static Abc_FrameInitializer_t* s_InitializerStart = NULL;
static Abc_FrameInitializer_t* s_InitializerEnd = NULL;
void Abc_FrameAddInitializer( Abc_FrameInitializer_t* p )
{
if( ! s_InitializerStart )
s_InitializerStart = p;
p->next = NULL;
p->prev = s_InitializerEnd;
if ( s_InitializerEnd )
s_InitializerEnd->next = p;
s_InitializerEnd = p;
}
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
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis [Starts all the packages.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_FrameInit( Abc_Frame_t * pAbc )
{
Abc_FrameInitializer_t* p;
2005-07-29 17:01:00 +02:00
Cmd_Init( pAbc );
2010-11-01 09:35:04 +01:00
Cmd_CommandExecute( pAbc, "set checkread" );
2005-07-29 17:01:00 +02:00
Io_Init( pAbc );
Abc_Init( pAbc );
2012-12-10 09:59:54 +01:00
If_Init( pAbc );
2005-07-29 17:01:00 +02:00
Map_Init( pAbc );
Mio_Init( pAbc );
Super_Init( pAbc );
2008-01-31 05:01:00 +01:00
Libs_Init( pAbc );
2010-11-01 09:35:04 +01:00
Load_Init( pAbc );
Scl_Init( pAbc );
2014-09-12 22:40:48 +02:00
Wlc_Init( pAbc );
2015-07-22 02:42:49 +02:00
Bac_Init( pAbc );
2014-11-29 23:36:26 +01:00
Cba_Init( pAbc );
2015-03-18 13:39:22 +01:00
Pla_Init( pAbc );
2011-03-29 22:04:21 +02:00
Test_Init( pAbc );
Glucose_Init( pAbc );
for( p = s_InitializerStart ; p ; p = p->next )
if(p->init)
p->init(pAbc);
2005-07-29 17:01:00 +02:00
}
/**Function*************************************************************
Synopsis [Stops all the packages.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_FrameEnd( Abc_Frame_t * pAbc )
{
Abc_FrameInitializer_t* p;
for( p = s_InitializerEnd ; p ; p = p->prev )
if ( p->destroy )
p->destroy(pAbc);
2005-07-29 17:01:00 +02:00
Abc_End( pAbc );
Io_End( pAbc );
Cmd_End( pAbc );
2012-12-10 09:59:54 +01:00
If_End( pAbc );
2005-07-29 17:01:00 +02:00
Map_End( pAbc );
Mio_End( pAbc );
Super_End( pAbc );
2008-01-31 05:01:00 +01:00
Libs_End( pAbc );
2010-11-01 09:35:04 +01:00
Load_End( pAbc );
Scl_End( pAbc );
2014-09-12 22:40:48 +02:00
Wlc_End( pAbc );
2015-07-22 02:42:49 +02:00
Bac_End( pAbc );
2014-11-29 23:36:26 +01:00
Cba_End( pAbc );
2015-03-18 13:39:22 +01:00
Pla_End( pAbc );
2011-03-29 22:04:21 +02:00
Test_End( pAbc );
Glucose_End( pAbc );
2005-07-29 17:01:00 +02:00
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
2010-11-01 09:35:04 +01:00
ABC_NAMESPACE_IMPL_END