summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2017-10-04 12:37:38 +0300
committerAlan Mishchenko <alanmi@berkeley.edu>2017-10-04 12:37:38 +0300
commit396215532c19ea54d5ad89e509c258deb25671d5 (patch)
tree2b78b4cc6d03233c4657d05725571e1bc5e39247
parent343f77a39546c45e11ad22a3fd978fc17d73720a (diff)
downloadabc-396215532c19ea54d5ad89e509c258deb25671d5.tar.gz
abc-396215532c19ea54d5ad89e509c258deb25671d5.tar.bz2
abc-396215532c19ea54d5ad89e509c258deb25671d5.zip
Updates and bug fixes.
-rw-r--r--src/aig/gia/giaIiff.c2
-rw-r--r--src/map/mio/mio.h2
-rw-r--r--src/map/mio/mioInt.h4
-rw-r--r--src/map/mio/mioUtils.c24
-rw-r--r--src/misc/util/utilTruth.h3
5 files changed, 23 insertions, 12 deletions
diff --git a/src/aig/gia/giaIiff.c b/src/aig/gia/giaIiff.c
index cb1db0d3..66f9c818 100644
--- a/src/aig/gia/giaIiff.c
+++ b/src/aig/gia/giaIiff.c
@@ -44,7 +44,7 @@ ABC_NAMESPACE_IMPL_START
SeeAlso []
***********************************************************************/
-int Gia_ManDeriveMatches( Mio_Library_t * pLib, Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Mem_t ** pvTtMem, Vec_Int_t ** pvTt2Match, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs )
+int Gia_ManDeriveMatches( Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs, Vec_Mem_t * pvTtMem2[3], Vec_Int_t * pvTt2Match2[3] )
{
return 0;
}
diff --git a/src/map/mio/mio.h b/src/map/mio/mio.h
index 5f04029a..d7f52f8c 100644
--- a/src/map/mio/mio.h
+++ b/src/map/mio/mio.h
@@ -224,7 +224,7 @@ extern void Mio_LibraryMatchesFetch( Mio_Library_t * pLib, Vec_Mem_
extern void Mio_LibraryMatches2Stop( Mio_Library_t * pLib );
extern void Mio_LibraryMatches2Start( Mio_Library_t * pLib );
-extern void Mio_LibraryMatches2Fetch( Mio_Library_t * pLib, Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Mem_t ** pvTtMem, Vec_Int_t ** pvTt2Match, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs );
+extern void Mio_LibraryMatches2Fetch( Mio_Library_t * pLib, Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs, Vec_Mem_t * pvTtMem2[3], Vec_Int_t * pvTt2Match2[3] );
/*=== sclUtil.c =========================================================*/
extern Mio_Library_t * Abc_SclDeriveGenlibSimple( void * pScl );
diff --git a/src/map/mio/mioInt.h b/src/map/mio/mioInt.h
index 6c754c18..bf01f588 100644
--- a/src/map/mio/mioInt.h
+++ b/src/map/mio/mioInt.h
@@ -86,10 +86,10 @@ struct Mio_LibraryStruct_t_
int nCells; // library gate count
Vec_Ptr_t * vNames;
Vec_Wrd_t * vTruths;
- Vec_Mem_t * vTtMem_;
- Vec_Int_t * vTt2Match_;
Vec_Int_t * vTt2Match4;
Vec_Int_t * vConfigs;
+ Vec_Mem_t * vTtMem2[3];
+ Vec_Int_t * vTt2Match2[3];
};
struct Mio_GateStruct_t_
diff --git a/src/map/mio/mioUtils.c b/src/map/mio/mioUtils.c
index 70306b5e..b2ee8ab9 100644
--- a/src/map/mio/mioUtils.c
+++ b/src/map/mio/mioUtils.c
@@ -1705,34 +1705,42 @@ void Mio_LibraryMatchesFetch( Mio_Library_t * pLib, Vec_Mem_t ** pvTtMem, Vec_We
***********************************************************************/
void Mio_LibraryMatches2Stop( Mio_Library_t * pLib )
{
+ int i;
if ( !pLib->vNames )
return;
Vec_PtrFree( pLib->vNames );
Vec_WrdFree( pLib->vTruths );
- Vec_MemHashFree( pLib->vTtMem_ );
- Vec_MemFree( pLib->vTtMem_ );
- Vec_IntFree( pLib->vTt2Match_ );
Vec_IntFree( pLib->vTt2Match4 );
Vec_IntFree( pLib->vConfigs );
+ for ( i = 0; i < 3; i++ )
+ {
+ Vec_MemHashFree( pLib->vTtMem2[i] );
+ Vec_MemFree( pLib->vTtMem2[i] );
+ Vec_IntFree( pLib->vTt2Match2[i] );
+ }
}
void Mio_LibraryMatches2Start( Mio_Library_t * pLib )
{
- extern int Gia_ManDeriveMatches( Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Mem_t ** pvTtMem, Vec_Int_t ** pvTt2Match, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs );
+ extern int Gia_ManDeriveMatches( Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs, Vec_Mem_t * pvTtMem2[3], Vec_Int_t * pvTt2Match2[3] );
if ( pLib->vNames )
return;
if ( pLib->vTtMem )
Mio_LibraryMatches2Stop( pLib );
- Gia_ManDeriveMatches( &pLib->vNames, &pLib->vTruths, &pLib->vTtMem_, &pLib->vTt2Match_, &pLib->vTt2Match4, &pLib->vConfigs );
+ Gia_ManDeriveMatches( &pLib->vNames, &pLib->vTruths, &pLib->vTt2Match4, &pLib->vConfigs, pLib->vTtMem2, pLib->vTt2Match2 );
}
-void Mio_LibraryMatches2Fetch( Mio_Library_t * pLib, Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Mem_t ** pvTtMem, Vec_Int_t ** pvTt2Match, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs )
+void Mio_LibraryMatches2Fetch( Mio_Library_t * pLib, Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs, Vec_Mem_t * pvTtMem2[3], Vec_Int_t * pvTt2Match2[3] )
{
+ int i;
Mio_LibraryMatches2Start( pLib );
*pvNames = pLib->vNames;
*pvTruths = pLib->vTruths;
- *pvTtMem = pLib->vTtMem_;
- *pvTt2Match = pLib->vTt2Match_;
*pvTt2Match4 = pLib->vTt2Match4;
*pvConfigs = pLib->vConfigs;
+ for ( i = 0; i < 3; i++ )
+ {
+ pvTtMem2[i] = pLib->vTtMem2[i];
+ pvTt2Match2[i] = pLib->vTt2Match2[i];
+ }
}
////////////////////////////////////////////////////////////////////////
diff --git a/src/misc/util/utilTruth.h b/src/misc/util/utilTruth.h
index bd749795..629e5f74 100644
--- a/src/misc/util/utilTruth.h
+++ b/src/misc/util/utilTruth.h
@@ -2743,6 +2743,7 @@ static inline word Abc_TtEvalLut6( word Ins[6], word Lut, int nVars )
Cube = ~(word)0;
for ( i = 0; i < nVars; i++ )
Cube &= ((k >> i) & 1) ? Ins[i] : ~Ins[i];
+ Res |= Cube;
}
return Res;
}
@@ -2756,6 +2757,7 @@ static inline unsigned Abc_TtEvalLut5( unsigned Ins[5], int Lut, int nVars )
Cube = ~(unsigned)0;
for ( i = 0; i < nVars; i++ )
Cube &= ((k >> i) & 1) ? Ins[i] : ~Ins[i];
+ Res |= Cube;
}
return Res;
}
@@ -2769,6 +2771,7 @@ static inline int Abc_TtEvalLut4( int Ins[4], int Lut, int nVars )
Cube = ~(int)0;
for ( i = 0; i < nVars; i++ )
Cube &= ((k >> i) & 1) ? Ins[i] : ~Ins[i];
+ Res |= Cube;
}
return Res & ~(~0 << (1<<nVars));
}