diff options
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abc/abc.h | 2 | ||||
-rw-r--r-- | src/base/abci/abc.c | 22 | ||||
-rw-r--r-- | src/base/abci/abcMiter.c | 4 | ||||
-rw-r--r-- | src/base/abci/abcVerify.c | 3 |
4 files changed, 20 insertions, 11 deletions
diff --git a/src/base/abc/abc.h b/src/base/abc/abc.h index 2d3e7588..4b8a88eb 100644 --- a/src/base/abc/abc.h +++ b/src/base/abc/abc.h @@ -689,7 +689,7 @@ extern ABC_DLL Abc_Ntk_t * Abc_NtkMiterQuantifyPis( Abc_Ntk_t * pNtk ); extern ABC_DLL int Abc_NtkMiterIsConstant( Abc_Ntk_t * pMiter ); extern ABC_DLL void Abc_NtkMiterReport( Abc_Ntk_t * pMiter ); extern ABC_DLL Abc_Ntk_t * Abc_NtkFrames( Abc_Ntk_t * pNtk, int nFrames, int fInitial, int fVerbose ); -extern ABC_DLL int Abc_NtkCombinePos( Abc_Ntk_t * pNtk, int fAnd ); +extern ABC_DLL int Abc_NtkCombinePos( Abc_Ntk_t * pNtk, int fAnd, int fXor ); /*=== abcNames.c ====================================================*/ extern ABC_DLL char * Abc_ObjName( Abc_Obj_t * pNode ); extern ABC_DLL char * Abc_ObjAssignName( Abc_Obj_t * pObj, char * pName, char * pSuffix ); diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index b45fde8f..74525e26 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -6560,18 +6560,22 @@ int Abc_CommandOrPos( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc);//, * pNtkRes; int fReverse = 0; int fComb = 0; + int fXor = 0; int c; - extern int Abc_NtkCombinePos( Abc_Ntk_t * pNtk, int fAnd ); + extern int Abc_NtkCombinePos( Abc_Ntk_t * pNtk, int fAnd, int fXor ); // set defaults Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "rh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "rxh" ) ) != EOF ) { switch ( c ) { case 'r': fReverse ^= 1; break; + case 'x': + fXor ^= 1; + break; case 'c': fComb ^= 1; break; @@ -6612,7 +6616,7 @@ int Abc_CommandOrPos( Abc_Frame_t * pAbc, int argc, char ** argv ) } else { - if ( !Abc_NtkCombinePos( pNtk, 0 ) ) + if ( !Abc_NtkCombinePos( pNtk, 0, fXor ) ) { Abc_Print( -1, "ORing the POs has failed.\n" ); return 1; @@ -6626,9 +6630,10 @@ int Abc_CommandOrPos( Abc_Frame_t * pAbc, int argc, char ** argv ) return 0; usage: - Abc_Print( -2, "usage: orpos [-rh]\n" ); + Abc_Print( -2, "usage: orpos [-rxh]\n" ); Abc_Print( -2, "\t creates single-output miter by ORing the POs of the current network\n" ); Abc_Print( -2, "\t-r : performs the reverse transform (OR decomposition) [default = %s]\n", fReverse? "yes": "no" ); + Abc_Print( -2, "\t-x : toggles combining the PO using XOR [default = %s]\n", fXor? "yes": "no" ); Abc_Print( -2, "\t-h : print the command usage\n"); return 1; } @@ -6689,7 +6694,7 @@ int Abc_CommandAndPos( Abc_Frame_t * pAbc, int argc, char ** argv ) } // get the new network - if ( !Abc_NtkCombinePos( pNtk, 1 ) ) + if ( !Abc_NtkCombinePos( pNtk, 1, 0 ) ) { Abc_Print( -1, "ANDing the POs has failed.\n" ); return 1; @@ -22100,7 +22105,7 @@ int Abc_CommandBmcInter( Abc_Frame_t * pAbc, int argc, char ** argv ) { Abc_Ntk_t * pNtkNew = Abc_NtkDup( pNtk ); Abc_Print( 0, "All %d outputs will be ORed together.\n", Abc_NtkPoNum(pNtk) ); - if ( !Abc_NtkCombinePos( pNtkNew, 0 ) ) + if ( !Abc_NtkCombinePos( pNtkNew, 0, 0 ) ) { Abc_NtkDelete( pNtkNew ); Abc_Print( -1, "ORing outputs has failed.\n" ); @@ -32953,7 +32958,7 @@ usage: ***********************************************************************/ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv ) { -// Gia_Man_t * pTemp = NULL; + Gia_Man_t * pTemp = NULL; int c, fVerbose = 0; int nFrames = 3; int fSwitch = 0; @@ -32973,6 +32978,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv ) // extern Gia_Man_t * Bmc_CexTarget( Gia_Man_t * p, int nFrames ); // extern void Gia_ManMuxProfiling( Gia_Man_t * p ); // extern Gia_Man_t * Mig_ManTest( Gia_Man_t * pGia ); + extern Gia_Man_t * Gia_ManInterTest( Gia_Man_t * p ); Extra_UtilGetoptReset(); while ( ( c = Extra_UtilGetopt( argc, argv, "Fsvh" ) ) != EOF ) @@ -33044,6 +33050,8 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv ) // Gia_ManMuxProfiling( pAbc->pGia ); // pTemp = Mig_ManTest( pAbc->pGia ); // Abc_FrameUpdateGia( pAbc, pTemp ); + pTemp = Gia_ManInterTest( pAbc->pGia ); + Abc_FrameUpdateGia( pAbc, pTemp ); return 0; usage: Abc_Print( -2, "usage: &test [-F num] [-svh]\n" ); diff --git a/src/base/abci/abcMiter.c b/src/base/abci/abcMiter.c index 8c5a4a83..747fe263 100644 --- a/src/base/abci/abcMiter.c +++ b/src/base/abci/abcMiter.c @@ -1148,7 +1148,7 @@ int Abc_NtkDemiter( Abc_Ntk_t * pNtk ) SeeAlso [] ***********************************************************************/ -int Abc_NtkCombinePos( Abc_Ntk_t * pNtk, int fAnd ) +int Abc_NtkCombinePos( Abc_Ntk_t * pNtk, int fAnd, int fXor ) { Abc_Obj_t * pNode, * pMiter; int i; @@ -1165,6 +1165,8 @@ int Abc_NtkCombinePos( Abc_Ntk_t * pNtk, int fAnd ) Abc_NtkForEachPo( pNtk, pNode, i ) if ( fAnd ) pMiter = Abc_AigAnd( (Abc_Aig_t *)pNtk->pManFunc, pMiter, Abc_ObjChild0(pNode) ); + else if ( fXor ) + pMiter = Abc_AigXor( (Abc_Aig_t *)pNtk->pManFunc, pMiter, Abc_ObjChild0(pNode) ); else pMiter = Abc_AigOr( (Abc_Aig_t *)pNtk->pManFunc, pMiter, Abc_ObjChild0(pNode) ); // remove the POs and their names diff --git a/src/base/abci/abcVerify.c b/src/base/abci/abcVerify.c index 7d9973b1..25d1d113 100644 --- a/src/base/abci/abcVerify.c +++ b/src/base/abci/abcVerify.c @@ -362,7 +362,6 @@ void Abc_NtkCecFraigPart( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nSeconds, in ***********************************************************************/ void Abc_NtkCecFraigPartAuto( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nSeconds, int fVerbose ) { - extern int Abc_NtkCombinePos( Abc_Ntk_t * pNtk, int fAnd ); extern Vec_Ptr_t * Abc_NtkPartitionSmart( Abc_Ntk_t * pNtk, int nPartSizeLimit, int fVerbose ); extern void Abc_NtkConvertCos( Abc_Ntk_t * pNtk, Vec_Int_t * vOuts, Vec_Ptr_t * vOnePtr ); @@ -416,7 +415,7 @@ void Abc_NtkCecFraigPartAuto( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nSeconds // get this part of the miter Abc_NtkConvertCos( pMiter, vOne, vOnePtr ); pMiterPart = Abc_NtkCreateConeArray( pMiter, vOnePtr, 0 ); - Abc_NtkCombinePos( pMiterPart, 0 ); + Abc_NtkCombinePos( pMiterPart, 0, 0 ); // check the miter for being constant RetValue = Abc_NtkMiterIsConstant( pMiterPart ); if ( RetValue == 0 ) |