diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-07-16 16:06:21 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-07-16 16:06:21 -0700 |
commit | 5f97612951b9547a23c64e2a669cd459dae0beda (patch) | |
tree | 9552d966c6e461584fbb599ef5e17fecf2545c9b /src/base/abc | |
parent | e731d3b1f4fa1a1be528c5e1868409c1b19aedf7 (diff) | |
download | abc-5f97612951b9547a23c64e2a669cd459dae0beda.tar.gz abc-5f97612951b9547a23c64e2a669cd459dae0beda.tar.bz2 abc-5f97612951b9547a23c64e2a669cd459dae0beda.zip |
Imporvements to 'eliminate'.
Diffstat (limited to 'src/base/abc')
-rw-r--r-- | src/base/abc/abcMinBase.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/base/abc/abcMinBase.c b/src/base/abc/abcMinBase.c index 1c913eea..84cf5cb3 100644 --- a/src/base/abc/abcMinBase.c +++ b/src/base/abc/abcMinBase.c @@ -578,6 +578,22 @@ int Abc_NodeCollapse1( Abc_Obj_t * pFanin, Abc_Obj_t * pFanout, Vec_Ptr_t * vFan Abc_NtkDeleteObj_rec( pFanout, 1 ); return 1; } +int Abc_NodeIsExor( Abc_Obj_t * pNode ) +{ + Hop_Man_t * pMan; + word Truth; + if ( Abc_ObjFaninNum(pNode) < 3 || Abc_ObjFaninNum(pNode) > 6 ) + return 0; + pMan = (Hop_Man_t *)pNode->pNtk->pManFunc; + Truth = Hop_ManComputeTruth6( pMan, (Hop_Obj_t *)pNode->pData, Abc_ObjFaninNum(pNode) ); + if ( Truth == 0x6666666666666666 || Truth == 0x9999999999999999 || + Truth == 0x9696969696969696 || Truth == 0x6969696969696969 || + Truth == 0x6996699669966996 || Truth == 0x9669966996699669 || + Truth == 0x9669699696696996 || Truth == 0x6996966969969669 || + Truth == 0x6996966996696996 || Truth == 0x9669699669969669 ) + return 1; + return 0; +} int Abc_NtkEliminate1One( Abc_Ntk_t * pNtk, int ElimValue, int nMaxSize, int fReverse, int fVerbose ) { Vec_Ptr_t * vFanouts, * vFanins, * vNodes; @@ -607,6 +623,8 @@ int Abc_NtkEliminate1One( Abc_Ntk_t * pNtk, int ElimValue, int nMaxSize, int fRe continue; if ( Abc_ObjFaninNum(pNode) > nMaxSize ) continue; + if ( Abc_NodeIsExor(pNode) ) + continue; // skip nodes with more than one fanout // if ( Abc_ObjFanoutNum(pNode) != 1 ) // continue; @@ -642,10 +660,10 @@ int Abc_NtkEliminate1One( Abc_Ntk_t * pNtk, int ElimValue, int nMaxSize, int fRe ABC_FREE( pPermFanout ); return 1; } -int Abc_NtkEliminate1( Abc_Ntk_t * pNtk, int ElimValue, int nMaxSize, int fReverse, int fVerbose ) +int Abc_NtkEliminate1( Abc_Ntk_t * pNtk, int ElimValue, int nMaxSize, int nIterMax, int fReverse, int fVerbose ) { int i; - for ( i = 0; i < 3; i++ ) + for ( i = 0; i < nIterMax; i++ ) { int nNodes = Abc_NtkNodeNum(pNtk); // printf( "%d ", nNodes ); |