summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abc/abcHieCec.c99
-rw-r--r--src/base/abci/abc.c14
2 files changed, 39 insertions, 74 deletions
diff --git a/src/base/abc/abcHieCec.c b/src/base/abc/abcHieCec.c
index 4e49aea2..ee2500ce 100644
--- a/src/base/abc/abcHieCec.c
+++ b/src/base/abc/abcHieCec.c
@@ -553,40 +553,6 @@ void Abc_NtkCountInst( Abc_Ntk_t * pNtk )
/**Function*************************************************************
- Synopsis [Count the number of instances and I/O pins in the hierarchy.]
-
- Description []
-
- SideEffects []
-
- SeeAlso []
-
-***********************************************************************/
-void Abc_NtkCountInstances_rec( Abc_Ntk_t * pNtk, int * pCountInst, int * pCountPins )
-{
- Vec_Ptr_t * vOrder = (Vec_Ptr_t *)pNtk->pData;
- Abc_Obj_t * pObj;
- int i;
- *pCountInst += 1;
- *pCountPins += Abc_NtkPiNum(pNtk) + Abc_NtkPoNum(pNtk);
- Vec_PtrForEachEntry( Abc_Obj_t *, vOrder, pObj, i )
- if ( Abc_ObjIsBox(pObj) )
- Abc_NtkCountInstances_rec( (Abc_Ntk_t *)pObj->pData, pCountInst, pCountPins );
-}
-
-void Abc_NtkCountInstances( Abc_Ntk_t * pNtk )
-{
- int CountInst = 0, CountPins = 0;
- assert( Abc_NtkIsNetlist(pNtk) );
- assert( !Abc_NtkLatchNum(pNtk) );
- // recursively flatten hierarchy
- Abc_NtkCountInstances_rec( pNtk, &CountInst, &CountPins );
- printf( "Instances = %10d. I/O pins = %10d.\n", CountInst, CountPins );
-}
-
-
-/**Function*************************************************************
-
Synopsis [Performs hierarchical equivalence checking.]
Description []
@@ -598,6 +564,7 @@ void Abc_NtkCountInstances( Abc_Ntk_t * pNtk )
***********************************************************************/
Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
{
+ int fUseNew = 0;
int fCheck = 1;
Vec_Ptr_t * vMods, * vOrder;
Abc_Ntk_t * pNtk, * pModel;
@@ -626,39 +593,39 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
if ( fVerbose )
Abc_NtkPrintBoxInfo( pNtk );
- clk = clock();
- vOrder = Abc_NtkCollectHie( pNtk );
- Abc_PrintTime( 1, "Collect DFS ", clock() - clk );
-
- // derive GIA
- clk = clock();
- pGia = Abc_NtkDeriveFlatGia2( pNtk, vOrder );
- Abc_PrintTime( 1, "Deriving GIA", clock() - clk );
- Gia_ManPrintStats( pGia, 0 );
-// Gia_ManStop( pGia );
-
- Vec_PtrFree( vOrder );
-
-/*
- // order nodes/boxes of all models
- vMods = pNtk->pDesign->vModules;
- Vec_PtrForEachEntry( Abc_Ntk_t *, vMods, pModel, i )
- pModel->pData = Abc_NtkDfsBoxes( pModel );
-
- // derive GIA
- clk = clock();
- pGia = Abc_NtkDeriveFlatGia( pNtk );
- Abc_PrintTime( 1, "Deriving GIA", clock() - clk );
- Gia_ManPrintStats( pGia, 0 );
-
- clk = clock();
- Abc_NtkCountInstances( pNtk );
- Abc_PrintTime( 1, "Gather stats", clock() - clk );
+ if ( fUseNew )
+ {
+ clk = clock();
+ vOrder = Abc_NtkCollectHie( pNtk );
+ Abc_PrintTime( 1, "Collect DFS ", clock() - clk );
+
+ // derive GIA
+ clk = clock();
+ pGia = Abc_NtkDeriveFlatGia2( pNtk, vOrder );
+ Abc_PrintTime( 1, "Deriving GIA", clock() - clk );
+ Gia_ManPrintStats( pGia, 0 );
+ // Gia_ManStop( pGia );
+
+ Vec_PtrFree( vOrder );
+ }
+ else
+ {
+ // order nodes/boxes of all models
+ vMods = pNtk->pDesign->vModules;
+ Vec_PtrForEachEntry( Abc_Ntk_t *, vMods, pModel, i )
+ pModel->pData = Abc_NtkDfsBoxes( pModel );
+
+ // derive GIA
+ clk = clock();
+ pGia = Abc_NtkDeriveFlatGia( pNtk );
+ Abc_PrintTime( 1, "Deriving GIA", clock() - clk );
+ Gia_ManPrintStats( pGia, 0 );
+
+ // clean nodes/boxes of all nodes
+ Vec_PtrForEachEntry( Abc_Ntk_t *, vMods, pModel, i )
+ Vec_PtrFree( (Vec_Ptr_t *)pModel->pData );
+ }
- // clean nodes/boxes of all nodes
- Vec_PtrForEachEntry( Abc_Ntk_t *, vMods, pModel, i )
- Vec_PtrFree( (Vec_Ptr_t *)pModel->pData );
-*/
clk = clock();
Abc_NtkCountInst( pNtk );
Abc_PrintTime( 1, "Gather stats", clock() - clk );
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index b127eacd..22ff9411 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -30097,8 +30097,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
Gia_Man_t * pTemp = NULL;
int c, fVerbose = 0;
int fSwitch = 0;
- extern void Gia_SatSolveTest( Gia_Man_t * p );
- extern void Cbs_ManSolveTest( Gia_Man_t * pGia );
+ extern Gia_Man_t * Gia_VtaTest( Gia_Man_t * p );
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "svh" ) ) != EOF )
@@ -30129,13 +30128,12 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// Gia_SatSolveTest( pAbc->pGia );
// For_ManExperiment( pAbc->pGia, 20, 1, 1 );
// Gia_ManUnrollSpecial( pAbc->pGia, 5, 100, 1 );
-
- if ( fSwitch )
- pAbc->pGia = Gia_ManDupSelf( pTemp = pAbc->pGia );
- else
- pAbc->pGia = Gia_ManRemoveEnables( pTemp = pAbc->pGia );
- Gia_ManStop( pTemp );
+// pAbc->pGia = Gia_ManDupSelf( pTemp = pAbc->pGia );
+// pAbc->pGia = Gia_ManRemoveEnables( pTemp = pAbc->pGia );
// Cbs_ManSolveTest( pAbc->pGia );
+
+ pAbc->pGia = Gia_VtaTest( pTemp = pAbc->pGia );
+ Gia_ManStopP( &pTemp );
return 0;
usage: