summaryrefslogtreecommitdiffstats
path: root/src/base/main/mainFrame.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-01-30 20:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2008-01-30 20:01:00 -0800
commit0c6505a26a537dc911b6566f82d759521e527c08 (patch)
treef2687995efd4943fe3b1307fce7ef5942d0a57b3 /src/base/main/mainFrame.c
parent4d30a1e4f1edecff86d5066ce4653a370e59e5e1 (diff)
downloadabc-0c6505a26a537dc911b6566f82d759521e527c08.tar.gz
abc-0c6505a26a537dc911b6566f82d759521e527c08.tar.bz2
abc-0c6505a26a537dc911b6566f82d759521e527c08.zip
Version abc80130_2
Diffstat (limited to 'src/base/main/mainFrame.c')
-rw-r--r--src/base/main/mainFrame.c62
1 files changed, 46 insertions, 16 deletions
diff --git a/src/base/main/mainFrame.c b/src/base/main/mainFrame.c
index 77c9f579..eae8b7a6 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 DEFITIONS ///
+/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
@@ -43,20 +43,20 @@ static Abc_Frame_t * s_GlobalFrame = NULL;
SeeAlso []
***********************************************************************/
-Abc_Ntk_t * Abc_FrameReadNtkStore() { return s_GlobalFrame->pStored; }
-int Abc_FrameReadNtkStoreSize() { return s_GlobalFrame->nStored; }
+Vec_Ptr_t * Abc_FrameReadStore() { return s_GlobalFrame->vStore; }
+int Abc_FrameReadStoreSize() { return Vec_PtrSize(s_GlobalFrame->vStore); }
void * Abc_FrameReadLibLut() { return s_GlobalFrame->pLibLut; }
void * Abc_FrameReadLibGen() { return s_GlobalFrame->pLibGen; }
void * Abc_FrameReadLibSuper() { return s_GlobalFrame->pLibSuper; }
-void * Abc_FrameReadManDd() { return s_GlobalFrame->dd; }
-void * Abc_FrameReadManDec() { return s_GlobalFrame->pManDec; }
+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; }
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,7 +97,8 @@ 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) );
@@ -110,9 +111,13 @@ 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
- p->pManDec = Dec_ManStart();
- p->dd = Cudd_Init( 0, 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0 );
+ define_cube_size(20);
+ set_espresso_flags();
+ // initialize the trace manager
+// Abc_HManStart();
return p;
}
@@ -130,11 +135,20 @@ Abc_Frame_t * Abc_FrameAllocate()
***********************************************************************/
void Abc_FrameDeallocate( Abc_Frame_t * p )
{
- Dec_ManStop( p->pManDec );
- Extra_StopManager( p->dd );
+ 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 );
Abc_FrameDeleteAllNetworks( p );
free( p );
- p = NULL;
+ s_GlobalFrame = NULL;
}
/**Function*************************************************************
@@ -152,6 +166,22 @@ void Abc_FrameRestart( Abc_Frame_t * p )
{
}
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+bool Abc_FrameShowProgress( Abc_Frame_t * p )
+{
+ return Abc_FrameIsFlagEnabled( "progressbar" );
+}
+
/**Function*************************************************************
@@ -164,7 +194,7 @@ void Abc_FrameRestart( Abc_Frame_t * p )
SeeAlso []
***********************************************************************/
-Abc_Ntk_t * Abc_FrameReadNet( Abc_Frame_t * p )
+Abc_Ntk_t * Abc_FrameReadNtk( Abc_Frame_t * p )
{
return p->pNtkCur;
}
@@ -397,7 +427,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_NtkUnmap( pNtk );
+ Abc_NtkMapToSop( pNtk );
}
/**Function*************************************************************
@@ -423,7 +453,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*************************************************************