Commit 5fff8354 by Alan Mishchenko

New hierarchy manager.

parent b7ba9aa8
...@@ -487,7 +487,7 @@ void Abc_NtkCollectHie_rec( Abc_Ntk_t * pNtk, Vec_Ptr_t * vModels ) ...@@ -487,7 +487,7 @@ void Abc_NtkCollectHie_rec( Abc_Ntk_t * pNtk, Vec_Ptr_t * vModels )
return; return;
vOrder = Abc_NtkDfsBoxes( pNtk ); vOrder = Abc_NtkDfsBoxes( pNtk );
Vec_PtrForEachEntry( Abc_Obj_t *, vOrder, pObj, i ) Vec_PtrForEachEntry( Abc_Obj_t *, vOrder, pObj, i )
if ( Abc_ObjIsBox(pObj) ) if ( Abc_ObjIsBox(pObj) && (Abc_Ntk_t *)pObj->pData != pNtk )
Abc_NtkCollectHie_rec( (Abc_Ntk_t *)pObj->pData, vModels ); Abc_NtkCollectHie_rec( (Abc_Ntk_t *)pObj->pData, vModels );
Vec_PtrFree( vOrder ); Vec_PtrFree( vOrder );
pNtk->iStep = Vec_PtrSize(vModels); pNtk->iStep = Vec_PtrSize(vModels);
...@@ -626,8 +626,9 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose ) ...@@ -626,8 +626,9 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
assert( Abc_NtkIsNetlist(pNtk) ); assert( Abc_NtkIsNetlist(pNtk) );
assert( !Abc_NtkLatchNum(pNtk) ); assert( !Abc_NtkLatchNum(pNtk) );
if ( Abc_NtkCheckRecursive(pNtk) ) // print stats
return NULL; if ( fVerbose )
Abc_NtkPrintBoxInfo( pNtk );
// test the new data-structure // test the new data-structure
if ( fUseTest ) if ( fUseTest )
...@@ -639,9 +640,8 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose ) ...@@ -639,9 +640,8 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
return pGia; return pGia;
} }
// print stats if ( Abc_NtkCheckRecursive(pNtk) )
if ( fVerbose ) return NULL;
Abc_NtkPrintBoxInfo( pNtk );
if ( fUseNew ) if ( fUseNew )
{ {
......
...@@ -487,7 +487,7 @@ int Au_NtkCreateBox( Au_Ntk_t * pNtk, Vec_Int_t * vFanins, int nFanouts, int iMo ...@@ -487,7 +487,7 @@ int Au_NtkCreateBox( Au_Ntk_t * pNtk, Vec_Int_t * vFanins, int nFanouts, int iMo
extern Vec_Ptr_t * Abc_NtkDfsBoxes( Abc_Ntk_t * pNtk ); extern Vec_Ptr_t * Abc_NtkDfsBoxes( Abc_Ntk_t * pNtk );
extern int Abc_NtkDeriveFlatGiaSop( Gia_Man_t * pGia, int * gFanins, char * pSop ); extern int Abc_NtkDeriveFlatGiaSop( Gia_Man_t * pGia, int * gFanins, char * pSop );
extern int Abc_NtkCheckRecursive( Abc_Ntk_t * pNtk );
/**Function************************************************************* /**Function*************************************************************
...@@ -639,7 +639,7 @@ Au_Ntk_t * Au_NtkDerive( Au_Man_t * pMan, Abc_Ntk_t * pNtk, Vec_Ptr_t * vOrder ) ...@@ -639,7 +639,7 @@ Au_Ntk_t * Au_NtkDerive( Au_Man_t * pMan, Abc_Ntk_t * pNtk, Vec_Ptr_t * vOrder )
Abc_NtkForEachPo( pNtk, pTerm, i ) Abc_NtkForEachPo( pNtk, pTerm, i )
Au_NtkCreatePo( p, Abc_ObjFanin0(pTerm)->iTemp ); Au_NtkCreatePo( p, Abc_ObjFanin0(pTerm)->iTemp );
Au_NtkPrintStats( p ); // Au_NtkPrintStats( p );
return p; return p;
} }
...@@ -647,12 +647,12 @@ Gia_Man_t * Au_ManDeriveTest( Abc_Ntk_t * pRoot ) ...@@ -647,12 +647,12 @@ Gia_Man_t * Au_ManDeriveTest( Abc_Ntk_t * pRoot )
{ {
extern Vec_Ptr_t * Abc_NtkCollectHie( Abc_Ntk_t * pNtk ); extern Vec_Ptr_t * Abc_NtkCollectHie( Abc_Ntk_t * pNtk );
Gia_Man_t * pGia; Gia_Man_t * pGia = NULL;
Vec_Ptr_t * vOrder, * vModels; Vec_Ptr_t * vOrder, * vModels;
Abc_Ntk_t * pMod; Abc_Ntk_t * pMod;
Au_Man_t * pMan; Au_Man_t * pMan;
Au_Ntk_t * pNtk; Au_Ntk_t * pNtk;
int i, clk1, clk2 = 0, clk3, clk = clock(); int i, clk1, clk2 = 0, clk3 = 0, clk = clock();
clk1 = clock(); clk1 = clock();
pMan = Au_ManAlloc( pRoot->pDesign->pName ); pMan = Au_ManAlloc( pRoot->pDesign->pName );
...@@ -676,14 +676,13 @@ Gia_Man_t * Au_ManDeriveTest( Abc_Ntk_t * pRoot ) ...@@ -676,14 +676,13 @@ Gia_Man_t * Au_ManDeriveTest( Abc_Ntk_t * pRoot )
Au_ManPrintStats( pMan ); Au_ManPrintStats( pMan );
Abc_PrintTime( 1, "Time all", clock() - clk ); if ( !Abc_NtkCheckRecursive(pRoot) )
Abc_PrintTime( 1, "Time new", clk2 ); {
clk1 = clock(); clk1 = clock();
pGia = Au_NtkDeriveFlatGia( (Au_Ntk_t *)pRoot->pData ); pGia = Au_NtkDeriveFlatGia( (Au_Ntk_t *)pRoot->pData );
clk3 = clock() - clk1; clk3 = clock() - clk1;
printf( "GIA objects max = %d.\n", pMan->nGiaObjMax ); printf( "GIA objects max = %d.\n", pMan->nGiaObjMax );
}
clk1 = clock(); clk1 = clock();
Au_ManDelete( pMan ); Au_ManDelete( pMan );
......
...@@ -30,7 +30,7 @@ ABC_NAMESPACE_IMPL_START ...@@ -30,7 +30,7 @@ ABC_NAMESPACE_IMPL_START
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
#define IO_BLIFMV_MAXVALUES 256 #define IO_BLIFMV_MAXVALUES 256
#define IO_VERBOSE_OUTPUT //#define IO_VERBOSE_OUTPUT
typedef struct Io_MvVar_t_ Io_MvVar_t; // parsing var typedef struct Io_MvVar_t_ Io_MvVar_t; // parsing var
typedef struct Io_MvMod_t_ Io_MvMod_t; // parsing model typedef struct Io_MvMod_t_ Io_MvMod_t; // parsing model
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment