summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2020-03-28 18:45:48 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2020-03-28 18:45:48 -0700
commit8654192586079916c614dc3a4c62a1cdfd459fee (patch)
tree71dd8647cd6a762b515e8749dbb21f3acb3cca96 /src
parenta277d450bf7c624392d41739788f115f1d655556 (diff)
downloadabc-8654192586079916c614dc3a4c62a1cdfd459fee.tar.gz
abc-8654192586079916c614dc3a4c62a1cdfd459fee.tar.bz2
abc-8654192586079916c614dc3a4c62a1cdfd459fee.zip
Various changes.
Diffstat (limited to 'src')
-rw-r--r--src/aig/gia/giaSimBase.c2
-rw-r--r--src/misc/extra/extraUtilMisc.c10
-rw-r--r--src/misc/util/utilTruth.h10
3 files changed, 16 insertions, 6 deletions
diff --git a/src/aig/gia/giaSimBase.c b/src/aig/gia/giaSimBase.c
index 9f07da15..eb9ba375 100644
--- a/src/aig/gia/giaSimBase.c
+++ b/src/aig/gia/giaSimBase.c
@@ -940,7 +940,7 @@ Vec_Wrd_t * Gia_ManSimRelDeriveFuncs2( Gia_Man_t * p, Vec_Wrd_t * vRel, int nOut
{
int nOffs = Abc_TtCountOnesVec( Vec_WrdEntryP(vFuncs, (2*k+0)*nWords), nWords );
int nOns = Abc_TtCountOnesVec( Vec_WrdEntryP(vFuncs, (2*k+1)*nWords), nWords );
- printf( "%4d : Off = %6d On = %6d Dc = %6d (%6.2f %%)", k, nOffs, nOns, nDCs[k], 100.0*nDCs[k]/(64*nWords) );
+ printf( "%4d : Off = %6d On = %6d Dc = %6d (%6.2f %%)\n", k, nOffs, nOns, nDCs[k], 100.0*nDCs[k]/(64*nWords) );
}
printf( "\n" );
}
diff --git a/src/misc/extra/extraUtilMisc.c b/src/misc/extra/extraUtilMisc.c
index 5757e0ae..c38369cd 100644
--- a/src/misc/extra/extraUtilMisc.c
+++ b/src/misc/extra/extraUtilMisc.c
@@ -2653,8 +2653,7 @@ void Extra_BitMatrixTransposeP( Vec_Wrd_t * vSimsIn, int nWordsIn, Vec_Wrd_t * v
{
word * pM[64]; int i, y, x;
assert( Vec_WrdSize(vSimsIn) == Vec_WrdSize(vSimsOut) );
- assert( Vec_WrdSize(vSimsIn) / nWordsIn == 64 * nWordsOut );
- assert( Vec_WrdSize(vSimsOut) / nWordsOut == 64 * nWordsIn );
+ assert( Vec_WrdSize(vSimsIn) == 64 * nWordsIn * nWordsOut );
for ( x = 0; x < nWordsOut; x++ )
for ( y = 0; y < nWordsIn; y++ )
{
@@ -2669,14 +2668,15 @@ void Extra_BitMatrixTransposeP( Vec_Wrd_t * vSimsIn, int nWordsIn, Vec_Wrd_t * v
void Extra_BitMatrixTransposePP( Vec_Ptr_t * vSimsIn, int nWordsIn, Vec_Wrd_t * vSimsOut, int nWordsOut )
{
word * pM[64]; int i, y, x;
- assert( Vec_WrdSize(vSimsOut) / nWordsOut == 64 * nWordsIn );
+ assert( Vec_PtrSize(vSimsIn) == 64 * nWordsOut );
+ assert( Vec_WrdSize(vSimsOut) == 64 * nWordsOut * nWordsIn );
for ( x = 0; x < nWordsOut; x++ )
for ( y = 0; y < nWordsIn; y++ )
{
for ( i = 0; i < 64; i++ )
{
- pM[i] = Vec_WrdEntryP( vSimsOut, (64*y+i)*nWordsOut + x );
- pM[i][0] = ((word *)Vec_PtrEntry( vSimsIn, 64*x+i ))[y];
+ pM[i] = Vec_WrdEntryP( vSimsOut, (64*y+63-i)*nWordsOut + x );
+ pM[i][0] = ((word *)Vec_PtrEntry( vSimsIn, 64*x+63-i ))[y];
}
Extra_Transpose64p( pM );
}
diff --git a/src/misc/util/utilTruth.h b/src/misc/util/utilTruth.h
index 18bae556..e0ee1720 100644
--- a/src/misc/util/utilTruth.h
+++ b/src/misc/util/utilTruth.h
@@ -326,6 +326,16 @@ static inline void Abc_TtXor( word * pOut, word * pIn1, word * pIn2, int nWords,
for ( w = 0; w < nWords; w++ )
pOut[w] = pIn1[w] ^ pIn2[w];
}
+static inline void Abc_TtXorMask( word * pOut, word * pIn1, word * pIn2, word * pMask, int nWords, int fCompl )
+{
+ int w;
+ if ( fCompl )
+ for ( w = 0; w < nWords; w++ )
+ pOut[w] = (pIn1[w] ^ pIn2[w]) & ~pMask[w];
+ else
+ for ( w = 0; w < nWords; w++ )
+ pOut[w] = (pIn1[w] ^ pIn2[w]) & pMask[w];
+}
static inline void Abc_TtMux( word * pOut, word * pCtrl, word * pIn1, word * pIn0, int nWords )
{
int w;