mirror of https://github.com/YosysHQ/abc.git
Updates and bug fixes.
This commit is contained in:
parent
343f77a395
commit
396215532c
|
|
@ -44,7 +44,7 @@ ABC_NAMESPACE_IMPL_START
|
||||||
SeeAlso []
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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_LibraryMatches2Stop( Mio_Library_t * pLib );
|
||||||
extern void Mio_LibraryMatches2Start( 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 =========================================================*/
|
/*=== sclUtil.c =========================================================*/
|
||||||
extern Mio_Library_t * Abc_SclDeriveGenlibSimple( void * pScl );
|
extern Mio_Library_t * Abc_SclDeriveGenlibSimple( void * pScl );
|
||||||
|
|
|
||||||
|
|
@ -86,10 +86,10 @@ struct Mio_LibraryStruct_t_
|
||||||
int nCells; // library gate count
|
int nCells; // library gate count
|
||||||
Vec_Ptr_t * vNames;
|
Vec_Ptr_t * vNames;
|
||||||
Vec_Wrd_t * vTruths;
|
Vec_Wrd_t * vTruths;
|
||||||
Vec_Mem_t * vTtMem_;
|
|
||||||
Vec_Int_t * vTt2Match_;
|
|
||||||
Vec_Int_t * vTt2Match4;
|
Vec_Int_t * vTt2Match4;
|
||||||
Vec_Int_t * vConfigs;
|
Vec_Int_t * vConfigs;
|
||||||
|
Vec_Mem_t * vTtMem2[3];
|
||||||
|
Vec_Int_t * vTt2Match2[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Mio_GateStruct_t_
|
struct Mio_GateStruct_t_
|
||||||
|
|
|
||||||
|
|
@ -1705,34 +1705,42 @@ void Mio_LibraryMatchesFetch( Mio_Library_t * pLib, Vec_Mem_t ** pvTtMem, Vec_We
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
void Mio_LibraryMatches2Stop( Mio_Library_t * pLib )
|
void Mio_LibraryMatches2Stop( Mio_Library_t * pLib )
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
if ( !pLib->vNames )
|
if ( !pLib->vNames )
|
||||||
return;
|
return;
|
||||||
Vec_PtrFree( pLib->vNames );
|
Vec_PtrFree( pLib->vNames );
|
||||||
Vec_WrdFree( pLib->vTruths );
|
Vec_WrdFree( pLib->vTruths );
|
||||||
Vec_MemHashFree( pLib->vTtMem_ );
|
|
||||||
Vec_MemFree( pLib->vTtMem_ );
|
|
||||||
Vec_IntFree( pLib->vTt2Match_ );
|
|
||||||
Vec_IntFree( pLib->vTt2Match4 );
|
Vec_IntFree( pLib->vTt2Match4 );
|
||||||
Vec_IntFree( pLib->vConfigs );
|
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 )
|
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 )
|
if ( pLib->vNames )
|
||||||
return;
|
return;
|
||||||
if ( pLib->vTtMem )
|
if ( pLib->vTtMem )
|
||||||
Mio_LibraryMatches2Stop( pLib );
|
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 );
|
Mio_LibraryMatches2Start( pLib );
|
||||||
*pvNames = pLib->vNames;
|
*pvNames = pLib->vNames;
|
||||||
*pvTruths = pLib->vTruths;
|
*pvTruths = pLib->vTruths;
|
||||||
*pvTtMem = pLib->vTtMem_;
|
|
||||||
*pvTt2Match = pLib->vTt2Match_;
|
|
||||||
*pvTt2Match4 = pLib->vTt2Match4;
|
*pvTt2Match4 = pLib->vTt2Match4;
|
||||||
*pvConfigs = pLib->vConfigs;
|
*pvConfigs = pLib->vConfigs;
|
||||||
|
for ( i = 0; i < 3; i++ )
|
||||||
|
{
|
||||||
|
pvTtMem2[i] = pLib->vTtMem2[i];
|
||||||
|
pvTt2Match2[i] = pLib->vTt2Match2[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -2743,6 +2743,7 @@ static inline word Abc_TtEvalLut6( word Ins[6], word Lut, int nVars )
|
||||||
Cube = ~(word)0;
|
Cube = ~(word)0;
|
||||||
for ( i = 0; i < nVars; i++ )
|
for ( i = 0; i < nVars; i++ )
|
||||||
Cube &= ((k >> i) & 1) ? Ins[i] : ~Ins[i];
|
Cube &= ((k >> i) & 1) ? Ins[i] : ~Ins[i];
|
||||||
|
Res |= Cube;
|
||||||
}
|
}
|
||||||
return Res;
|
return Res;
|
||||||
}
|
}
|
||||||
|
|
@ -2756,6 +2757,7 @@ static inline unsigned Abc_TtEvalLut5( unsigned Ins[5], int Lut, int nVars )
|
||||||
Cube = ~(unsigned)0;
|
Cube = ~(unsigned)0;
|
||||||
for ( i = 0; i < nVars; i++ )
|
for ( i = 0; i < nVars; i++ )
|
||||||
Cube &= ((k >> i) & 1) ? Ins[i] : ~Ins[i];
|
Cube &= ((k >> i) & 1) ? Ins[i] : ~Ins[i];
|
||||||
|
Res |= Cube;
|
||||||
}
|
}
|
||||||
return Res;
|
return Res;
|
||||||
}
|
}
|
||||||
|
|
@ -2769,6 +2771,7 @@ static inline int Abc_TtEvalLut4( int Ins[4], int Lut, int nVars )
|
||||||
Cube = ~(int)0;
|
Cube = ~(int)0;
|
||||||
for ( i = 0; i < nVars; i++ )
|
for ( i = 0; i < nVars; i++ )
|
||||||
Cube &= ((k >> i) & 1) ? Ins[i] : ~Ins[i];
|
Cube &= ((k >> i) & 1) ? Ins[i] : ~Ins[i];
|
||||||
|
Res |= Cube;
|
||||||
}
|
}
|
||||||
return Res & ~(~0 << (1<<nVars));
|
return Res & ~(~0 << (1<<nVars));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue