diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abc/abcHieCec.c | 37 | ||||
-rw-r--r-- | src/base/abc/abcHieNew.c | 2 | ||||
-rw-r--r-- | src/base/abci/abc.c | 2 |
3 files changed, 41 insertions, 0 deletions
diff --git a/src/base/abc/abcHieCec.c b/src/base/abc/abcHieCec.c index dd691a4f..001705e3 100644 --- a/src/base/abc/abcHieCec.c +++ b/src/base/abc/abcHieCec.c @@ -552,6 +552,40 @@ void Abc_NtkCountInst( Abc_Ntk_t * pNtk ) printf( "Instances = %10d.\n", Counter ); } +/**Function************************************************************* + + Synopsis [Checks if there is a recursive definition.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Abc_NtkCheckRecursive( Abc_Ntk_t * pNtk ) +{ + Vec_Ptr_t * vMods; + Abc_Ntk_t * pModel; + Abc_Obj_t * pObj; + int i, k, RetValue = 0; + + assert( Abc_NtkIsNetlist(pNtk) ); + assert( !Abc_NtkLatchNum(pNtk) ); + + vMods = pNtk->pDesign->vModules; + Vec_PtrForEachEntry( Abc_Ntk_t *, vMods, pModel, i ) + { + Abc_NtkForEachObj( pModel, pObj, k ) + if ( Abc_ObjIsBox(pObj) && pObj->pData == (void *)pModel ) + { + printf( "WARNING: Model \"%s\" contains a recursive defition.\n", Abc_NtkName(pModel) ); + RetValue = 1; + break; + } + } + return RetValue; +} /**Function************************************************************* @@ -592,6 +626,9 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose ) assert( Abc_NtkIsNetlist(pNtk) ); assert( !Abc_NtkLatchNum(pNtk) ); + if ( Abc_NtkCheckRecursive(pNtk) ) + return NULL; + // test the new data-structure if ( fUseTest ) { diff --git a/src/base/abc/abcHieNew.c b/src/base/abc/abcHieNew.c index 0712c574..cddc4968 100644 --- a/src/base/abc/abcHieNew.c +++ b/src/base/abc/abcHieNew.c @@ -638,6 +638,8 @@ Au_Ntk_t * Au_NtkDerive( Au_Man_t * pMan, Abc_Ntk_t * pNtk, Vec_Ptr_t * vOrder ) // copy POs Abc_NtkForEachPo( pNtk, pTerm, i ) Au_NtkCreatePo( p, Abc_ObjFanin0(pTerm)->iTemp ); + + Au_NtkPrintStats( p ); return p; } diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 8b1c8441..070ffbd9 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -8927,11 +8927,13 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv ) // extern void Abs_VfaManTest( Aig_Man_t * pAig, int nFrames, int nConfLimit, int fVerbose ); extern void Aig_ManInterRepar( Aig_Man_t * pMan, int fVerbose ); extern Aig_Man_t * Abc_NtkToDar( Abc_Ntk_t * pNtk, int fExors, int fRegisters ); + extern void Aig_ManSupportsTest( Aig_Man_t * pMan ); if ( pNtk ) { Aig_Man_t * pAig = Abc_NtkToDar( pNtk, 0, 1 ); // Aig_ManInterRepar( pAig, 1 ); // Aig_ManInterTest( pAig, 1 ); + Aig_ManSupportsTest( pAig ); Aig_ManStop( pAig ); } } |