summaryrefslogtreecommitdiffstats
path: root/src/base/main/mainFrame.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-01-30 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2008-01-30 08:01:00 -0800
commit4d30a1e4f1edecff86d5066ce4653a370e59e5e1 (patch)
tree366355938a4af0a92f848841ac65374f338d691b /src/base/main/mainFrame.c
parent6537f941887b06e588d3acfc97b5fdf48875cc4e (diff)
downloadabc-4d30a1e4f1edecff86d5066ce4653a370e59e5e1.tar.gz
abc-4d30a1e4f1edecff86d5066ce4653a370e59e5e1.tar.bz2
abc-4d30a1e4f1edecff86d5066ce4653a370e59e5e1.zip
Version abc80130
Diffstat (limited to 'src/base/main/mainFrame.c')
-rw-r--r--src/base/main/mainFrame.c62
1 files changed, 16 insertions, 46 deletions
diff --git a/src/base/main/mainFrame.c b/src/base/main/mainFrame.c
index eae8b7a6..77c9f579 100644
--- a/src/base/main/mainFrame.c
+++ b/src/base/main/mainFrame.c
@@ -29,7 +29,7 @@
static Abc_Frame_t * s_GlobalFrame = NULL;
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
@@ -43,20 +43,20 @@ static Abc_Frame_t * s_GlobalFrame = NULL;
SeeAlso []
***********************************************************************/
-Vec_Ptr_t * Abc_FrameReadStore() { return s_GlobalFrame->vStore; }
-int Abc_FrameReadStoreSize() { return Vec_PtrSize(s_GlobalFrame->vStore); }
+Abc_Ntk_t * Abc_FrameReadNtkStore() { return s_GlobalFrame->pStored; }
+int Abc_FrameReadNtkStoreSize() { return s_GlobalFrame->nStored; }
void * Abc_FrameReadLibLut() { return s_GlobalFrame->pLibLut; }
void * Abc_FrameReadLibGen() { return s_GlobalFrame->pLibGen; }
void * Abc_FrameReadLibSuper() { return s_GlobalFrame->pLibSuper; }
-void * Abc_FrameReadLibVer() { return s_GlobalFrame->pLibVer; }
-void * Abc_FrameReadManDd() { if ( s_GlobalFrame->dd == NULL ) s_GlobalFrame->dd = Cudd_Init( 0, 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0 ); return s_GlobalFrame->dd; }
-void * Abc_FrameReadManDec() { if ( s_GlobalFrame->pManDec == NULL ) s_GlobalFrame->pManDec = Dec_ManStart(); return s_GlobalFrame->pManDec; }
+void * Abc_FrameReadManDd() { return s_GlobalFrame->dd; }
+void * Abc_FrameReadManDec() { return s_GlobalFrame->pManDec; }
char * Abc_FrameReadFlag( char * pFlag ) { return Cmd_FlagReadByName( s_GlobalFrame, pFlag ); }
+void Abc_FrameSetNtkStore( Abc_Ntk_t * pNtk ) { s_GlobalFrame->pStored = pNtk; }
+void Abc_FrameSetNtkStoreSize( int nStored ) { s_GlobalFrame->nStored = nStored; }
void Abc_FrameSetLibLut( void * pLib ) { s_GlobalFrame->pLibLut = pLib; }
void Abc_FrameSetLibGen( void * pLib ) { s_GlobalFrame->pLibGen = pLib; }
void Abc_FrameSetLibSuper( void * pLib ) { s_GlobalFrame->pLibSuper = pLib; }
-void Abc_FrameSetLibVer( void * pLib ) { s_GlobalFrame->pLibVer = pLib; }
void Abc_FrameSetFlag( char * pFlag, char * pValue ) { Cmd_FlagUpdateValue( s_GlobalFrame, pFlag, pValue ); }
/**Function*************************************************************
@@ -97,8 +97,7 @@ bool Abc_FrameIsFlagEnabled( char * pFlag )
Abc_Frame_t * Abc_FrameAllocate()
{
Abc_Frame_t * p;
- extern void define_cube_size( int n );
- extern void set_espresso_flags();
+
// allocate and clean
p = ALLOC( Abc_Frame_t, 1 );
memset( p, 0, sizeof(Abc_Frame_t) );
@@ -111,13 +110,9 @@ Abc_Frame_t * Abc_FrameAllocate()
// set the starting step
p->nSteps = 1;
p->fBatchMode = 0;
- // networks to be used by choice
- p->vStore = Vec_PtrAlloc( 16 );
// initialize decomposition manager
- define_cube_size(20);
- set_espresso_flags();
- // initialize the trace manager
-// Abc_HManStart();
+ p->pManDec = Dec_ManStart();
+ p->dd = Cudd_Init( 0, 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0 );
return p;
}
@@ -135,20 +130,11 @@ Abc_Frame_t * Abc_FrameAllocate()
***********************************************************************/
void Abc_FrameDeallocate( Abc_Frame_t * p )
{
- extern void Rwt_ManGlobalStop();
- extern void undefine_cube_size();
-// extern void Ivy_TruthManStop();
-// Abc_HManStop();
- undefine_cube_size();
- Rwt_ManGlobalStop();
-// Ivy_TruthManStop();
- if ( p->pLibVer ) Abc_LibFree( p->pLibVer, NULL );
- if ( p->pManDec ) Dec_ManStop( p->pManDec );
- if ( p->dd ) Extra_StopManager( p->dd );
- if ( p->vStore ) Vec_PtrFree( p->vStore );
+ Dec_ManStop( p->pManDec );
+ Extra_StopManager( p->dd );
Abc_FrameDeleteAllNetworks( p );
free( p );
- s_GlobalFrame = NULL;
+ p = NULL;
}
/**Function*************************************************************
@@ -166,22 +152,6 @@ void Abc_FrameRestart( Abc_Frame_t * p )
{
}
-/**Function*************************************************************
-
- Synopsis []
-
- Description []
-
- SideEffects []
-
- SeeAlso []
-
-***********************************************************************/
-bool Abc_FrameShowProgress( Abc_Frame_t * p )
-{
- return Abc_FrameIsFlagEnabled( "progressbar" );
-}
-
/**Function*************************************************************
@@ -194,7 +164,7 @@ bool Abc_FrameShowProgress( Abc_Frame_t * p )
SeeAlso []
***********************************************************************/
-Abc_Ntk_t * Abc_FrameReadNtk( Abc_Frame_t * p )
+Abc_Ntk_t * Abc_FrameReadNet( Abc_Frame_t * p )
{
return p->pNtkCur;
}
@@ -427,7 +397,7 @@ void Abc_FrameUnmapAllNetworks( Abc_Frame_t * p )
Abc_Ntk_t * pNtk;
for ( pNtk = p->pNtkCur; pNtk; pNtk = Abc_NtkBackup(pNtk) )
if ( Abc_NtkHasMapping(pNtk) )
- Abc_NtkMapToSop( pNtk );
+ Abc_NtkUnmap( pNtk );
}
/**Function*************************************************************
@@ -453,7 +423,7 @@ void Abc_FrameDeleteAllNetworks( Abc_Frame_t * p )
Abc_NtkDelete( pNtk );
// set the current network empty
p->pNtkCur = NULL;
-// fprintf( p->Out, "All networks have been deleted.\n" );
+ fprintf( p->Out, "All networks have been deleted.\n" );
}
/**Function*************************************************************