diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2022-06-23 07:48:10 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2022-06-23 07:48:10 -0700 |
commit | 8888e8e82e189a599a340e83ac8094bdef1ceb51 (patch) | |
tree | cec4d875ea855fda94a3fe20b6745306285858db /src/proof | |
parent | 8eb651c3d380168aeb752f90f16b37fff6d39142 (diff) | |
download | abc-8888e8e82e189a599a340e83ac8094bdef1ceb51.tar.gz abc-8888e8e82e189a599a340e83ac8094bdef1ceb51.tar.bz2 abc-8888e8e82e189a599a340e83ac8094bdef1ceb51.zip |
Experiments with the mapper.
Diffstat (limited to 'src/proof')
-rw-r--r-- | src/proof/acec/acecXor.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/proof/acec/acecXor.c b/src/proof/acec/acecXor.c index 71e0b7b3..963ea15b 100644 --- a/src/proof/acec/acecXor.c +++ b/src/proof/acec/acecXor.c @@ -21,6 +21,7 @@ #include "acecInt.h" #include "misc/vec/vecWec.h" #include "misc/extra/extra.h" +#include "misc/util/utilTruth.h" ABC_NAMESPACE_IMPL_START @@ -425,6 +426,48 @@ Acec_Box_t * Acec_ProduceBox( Gia_Man_t * p, int fVerbose ) } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Gia_ManTestXor( Gia_Man_t * p ) +{ + Vec_Wrd_t * vSimsPi = Vec_WrdStartTruthTables( Gia_ManCiNum(p) ); + Vec_Wrd_t * vSims = Gia_ManSimPatSimOut( p, vSimsPi, 1 ); + int n, i, nWords = Vec_WrdSize(vSimsPi) / Gia_ManCiNum(p); + Gia_Obj_t * pObj; Vec_Wrd_t * vSims2; + Gia_ManForEachAnd( p, pObj, i ) + { + Gia_Obj_t Obj = *pObj; + for ( n = 0; n < 2; n++ ) + { + if ( n ) + { + pObj->iDiff1 = pObj->iDiff0; + pObj->fCompl1 = pObj->fCompl0; + } + else + { + pObj->iDiff0 = pObj->iDiff1; + pObj->fCompl0 = pObj->fCompl1; + } + vSims2 = Gia_ManSimPatSimOut( p, vSimsPi, 1 ); + printf( "%2d %2d : %5d\n", i, n, Abc_TtCountOnesVecXor(Vec_WrdArray(vSims), Vec_WrdArray(vSims2), Vec_WrdSize(vSims2)) ); + Vec_WrdFree( vSims2 ); + *pObj = Obj; + } + } + Vec_WrdFree( vSimsPi ); + Vec_WrdFree( vSims ); +} + //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// |