Commit 7e598cd2 by Alan Mishchenko

Fixing compilation problems on Linux-32 related to constants of type unsigned long long.

parent aaacf573
...@@ -69,12 +69,12 @@ void Gia_ObjComputeTruthTable6_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Wrd_t * ...@@ -69,12 +69,12 @@ void Gia_ObjComputeTruthTable6_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Wrd_t *
word Gia_ObjComputeTruthTable6( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t * vSupp, Vec_Wrd_t * vTruths ) word Gia_ObjComputeTruthTable6( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t * vSupp, Vec_Wrd_t * vTruths )
{ {
static word s_Truth6[6] = { static word s_Truth6[6] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
Gia_Obj_t * pLeaf; Gia_Obj_t * pLeaf;
int i; int i;
......
...@@ -1163,14 +1163,14 @@ char * Abc_SopDecoderLog( Mem_Flex_t * pMan, int nValues ) ...@@ -1163,14 +1163,14 @@ char * Abc_SopDecoderLog( Mem_Flex_t * pMan, int nValues )
word Abc_SopToTruth( char * pSop, int nInputs ) word Abc_SopToTruth( char * pSop, int nInputs )
{ {
static word Truth[8] = { static word Truth[8] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000, ABC_CONST(0xFFFFFFFF00000000),
0x0000000000000000, ABC_CONST(0x0000000000000000),
0xFFFFFFFFFFFFFFFF ABC_CONST(0xFFFFFFFFFFFFFFFF)
}; };
word Cube, Result = 0; word Cube, Result = 0;
int v, lit = 0; int v, lit = 0;
...@@ -1214,13 +1214,13 @@ word Abc_SopToTruth( char * pSop, int nInputs ) ...@@ -1214,13 +1214,13 @@ word Abc_SopToTruth( char * pSop, int nInputs )
void Abc_SopToTruth7( char * pSop, int nInputs, word r[2] ) void Abc_SopToTruth7( char * pSop, int nInputs, word r[2] )
{ {
static word Truth[7][2] = { static word Truth[7][2] = {
{0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA}, {ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA)},
{0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC}, {ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC)},
{0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0}, {ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0)},
{0xFF00FF00FF00FF00,0xFF00FF00FF00FF00}, {ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00)},
{0xFFFF0000FFFF0000,0xFFFF0000FFFF0000}, {ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000)},
{0xFFFFFFFF00000000,0xFFFFFFFF00000000}, {ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000)},
{0x0000000000000000,0xFFFFFFFFFFFFFFFF}, {ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF)},
}; };
word Cube[2]; word Cube[2];
int v, lit = 0; int v, lit = 0;
......
...@@ -50,14 +50,14 @@ static inline Npn_Obj_t * Npn_ManObj( Npn_Man_t * p, int i ) { a ...@@ -50,14 +50,14 @@ static inline Npn_Obj_t * Npn_ManObj( Npn_Man_t * p, int i ) { a
static inline int Npn_ManObjNum( Npn_Man_t * p, Npn_Obj_t * pObj ) { assert( p->pBuffer < pObj ); return pObj - p->pBuffer; } static inline int Npn_ManObjNum( Npn_Man_t * p, Npn_Obj_t * pObj ) { assert( p->pBuffer < pObj ); return pObj - p->pBuffer; }
static word Truth[8] = { static word Truth[8] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000, ABC_CONST(0xFFFFFFFF00000000),
0x0000000000000000, ABC_CONST(0x0000000000000000),
0xFFFFFFFFFFFFFFFF ABC_CONST(0xFFFFFFFFFFFFFFFF)
}; };
static Npn_Man_t * pNpnMan = NULL; static Npn_Man_t * pNpnMan = NULL;
...@@ -193,17 +193,17 @@ word Npn_TruthPadWord( word uTruth, int nVars ) ...@@ -193,17 +193,17 @@ word Npn_TruthPadWord( word uTruth, int nVars )
if ( nVars == 6 ) if ( nVars == 6 )
return uTruth; return uTruth;
if ( nVars <= 5 ) if ( nVars <= 5 )
uTruth = ((uTruth & 0x00000000FFFFFFFF) << 32) | (uTruth & 0x00000000FFFFFFFF); uTruth = ((uTruth & ABC_CONST(0x00000000FFFFFFFF)) << 32) | (uTruth & ABC_CONST(0x00000000FFFFFFFF));
if ( nVars <= 4 ) if ( nVars <= 4 )
uTruth = ((uTruth & 0x0000FFFF0000FFFF) << 16) | (uTruth & 0x0000FFFF0000FFFF); uTruth = ((uTruth & ABC_CONST(0x0000FFFF0000FFFF)) << 16) | (uTruth & ABC_CONST(0x0000FFFF0000FFFF));
if ( nVars <= 3 ) if ( nVars <= 3 )
uTruth = ((uTruth & 0x00FF00FF00FF00FF) << 8) | (uTruth & 0x00FF00FF00FF00FF); uTruth = ((uTruth & ABC_CONST(0x00FF00FF00FF00FF)) << 8) | (uTruth & ABC_CONST(0x00FF00FF00FF00FF));
if ( nVars <= 2 ) if ( nVars <= 2 )
uTruth = ((uTruth & 0x0F0F0F0F0F0F0F0F) << 4) | (uTruth & 0x0F0F0F0F0F0F0F0F); uTruth = ((uTruth & ABC_CONST(0x0F0F0F0F0F0F0F0F)) << 4) | (uTruth & ABC_CONST(0x0F0F0F0F0F0F0F0F));
if ( nVars <= 1 ) if ( nVars <= 1 )
uTruth = ((uTruth & 0x3333333333333333) << 2) | (uTruth & 0x3333333333333333); uTruth = ((uTruth & ABC_CONST(0x3333333333333333)) << 2) | (uTruth & ABC_CONST(0x3333333333333333));
if ( nVars == 0 ) if ( nVars == 0 )
uTruth = ((uTruth & 0x5555555555555555) << 1) | (uTruth & 0x5555555555555555); uTruth = ((uTruth & ABC_CONST(0x5555555555555555)) << 1) | (uTruth & ABC_CONST(0x5555555555555555));
return uTruth; return uTruth;
} }
...@@ -220,12 +220,12 @@ word Npn_TruthPadWord( word uTruth, int nVars ) ...@@ -220,12 +220,12 @@ word Npn_TruthPadWord( word uTruth, int nVars )
***********************************************************************/ ***********************************************************************/
static inline int Npn_TruthCountOnes( word t ) static inline int Npn_TruthCountOnes( word t )
{ {
t = (t & 0x5555555555555555) + ((t>> 1) & 0x5555555555555555); t = (t & ABC_CONST(0x5555555555555555)) + ((t>> 1) & ABC_CONST(0x5555555555555555));
t = (t & 0x3333333333333333) + ((t>> 2) & 0x3333333333333333); t = (t & ABC_CONST(0x3333333333333333)) + ((t>> 2) & ABC_CONST(0x3333333333333333));
t = (t & 0x0F0F0F0F0F0F0F0F) + ((t>> 4) & 0x0F0F0F0F0F0F0F0F); t = (t & ABC_CONST(0x0F0F0F0F0F0F0F0F)) + ((t>> 4) & ABC_CONST(0x0F0F0F0F0F0F0F0F));
t = (t & 0x00FF00FF00FF00FF) + ((t>> 8) & 0x00FF00FF00FF00FF); t = (t & ABC_CONST(0x00FF00FF00FF00FF)) + ((t>> 8) & ABC_CONST(0x00FF00FF00FF00FF));
t = (t & 0x0000FFFF0000FFFF) + ((t>>16) & 0x0000FFFF0000FFFF); t = (t & ABC_CONST(0x0000FFFF0000FFFF)) + ((t>>16) & ABC_CONST(0x0000FFFF0000FFFF));
return (t & 0x00000000FFFFFFFF) + (t>>32); return (t & ABC_CONST(0x00000000FFFFFFFF)) + (t>>32);
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -258,11 +258,11 @@ static inline word Npn_TruthChangePhase( word t, int v ) ...@@ -258,11 +258,11 @@ static inline word Npn_TruthChangePhase( word t, int v )
static inline word Npn_TruthSwapAdjacentVars( word t, int v ) static inline word Npn_TruthSwapAdjacentVars( word t, int v )
{ {
static word PMasks[5][3] = { static word PMasks[5][3] = {
{ 0x9999999999999999, 0x2222222222222222, 0x4444444444444444 }, { ABC_CONST(0x9999999999999999), ABC_CONST(0x2222222222222222), ABC_CONST(0x4444444444444444) },
{ 0xC3C3C3C3C3C3C3C3, 0x0C0C0C0C0C0C0C0C, 0x3030303030303030 }, { ABC_CONST(0xC3C3C3C3C3C3C3C3), ABC_CONST(0x0C0C0C0C0C0C0C0C), ABC_CONST(0x3030303030303030) },
{ 0xF00FF00FF00FF00F, 0x00F000F000F000F0, 0x0F000F000F000F00 }, { ABC_CONST(0xF00FF00FF00FF00F), ABC_CONST(0x00F000F000F000F0), ABC_CONST(0x0F000F000F000F00) },
{ 0xFF0000FFFF0000FF, 0x0000FF000000FF00, 0x00FF000000FF0000 }, { ABC_CONST(0xFF0000FFFF0000FF), ABC_CONST(0x0000FF000000FF00), ABC_CONST(0x00FF000000FF0000) },
{ 0xFFFF00000000FFFF, 0x00000000FFFF0000, 0x0000FFFF00000000 } { ABC_CONST(0xFFFF00000000FFFF), ABC_CONST(0x00000000FFFF0000), ABC_CONST(0x0000FFFF00000000) }
}; };
assert( v < 6 ); assert( v < 6 );
return (t & PMasks[v][0]) | ((t & PMasks[v][1]) << (1 << v)) | ((t & PMasks[v][2]) >> (1 << v)); return (t & PMasks[v][0]) | ((t & PMasks[v][1]) << (1 << v)) | ((t & PMasks[v][2]) >> (1 << v));
......
...@@ -1004,12 +1004,12 @@ void Io_NtkWriteNodeIntStruct( FILE * pFile, Abc_Obj_t * pNode, Vec_Int_t * vCov ...@@ -1004,12 +1004,12 @@ void Io_NtkWriteNodeIntStruct( FILE * pFile, Abc_Obj_t * pNode, Vec_Int_t * vCov
if ( TruthStore[0][0] == 0 ) if ( TruthStore[0][0] == 0 )
{ {
static word Truth6[6] = { static word Truth6[6] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
int nVarsMax = 16; int nVarsMax = 16;
int nWordsMax = (1 << 10); int nWordsMax = (1 << 10);
...@@ -1177,12 +1177,12 @@ void Io_NtkWriteModelIntStruct( FILE * pFile, Abc_Obj_t * pNode, Vec_Int_t * vCo ...@@ -1177,12 +1177,12 @@ void Io_NtkWriteModelIntStruct( FILE * pFile, Abc_Obj_t * pNode, Vec_Int_t * vCo
if ( TruthStore[0][0] == 0 ) if ( TruthStore[0][0] == 0 )
{ {
static word Truth6[6] = { static word Truth6[6] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
int nVarsMax = 16; int nVarsMax = 16;
int nWordsMax = (1 << 10); int nWordsMax = (1 << 10);
......
...@@ -43,22 +43,22 @@ struct Bdc_Nod_t_ ...@@ -43,22 +43,22 @@ struct Bdc_Nod_t_
}; };
static word Truths[6] = { static word Truths[6] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
static inline int Bdc_CountOnes( word t ) static inline int Bdc_CountOnes( word t )
{ {
t = (t & 0x5555555555555555) + ((t>> 1) & 0x5555555555555555); t = (t & ABC_CONST(0x5555555555555555)) + ((t>> 1) & ABC_CONST(0x5555555555555555));
t = (t & 0x3333333333333333) + ((t>> 2) & 0x3333333333333333); t = (t & ABC_CONST(0x3333333333333333)) + ((t>> 2) & ABC_CONST(0x3333333333333333));
t = (t & 0x0F0F0F0F0F0F0F0F) + ((t>> 4) & 0x0F0F0F0F0F0F0F0F); t = (t & ABC_CONST(0x0F0F0F0F0F0F0F0F)) + ((t>> 4) & ABC_CONST(0x0F0F0F0F0F0F0F0F));
t = (t & 0x00FF00FF00FF00FF) + ((t>> 8) & 0x00FF00FF00FF00FF); t = (t & ABC_CONST(0x00FF00FF00FF00FF)) + ((t>> 8) & ABC_CONST(0x00FF00FF00FF00FF));
t = (t & 0x0000FFFF0000FFFF) + ((t>>16) & 0x0000FFFF0000FFFF); t = (t & ABC_CONST(0x0000FFFF0000FFFF)) + ((t>>16) & ABC_CONST(0x0000FFFF0000FFFF));
return (t & 0x00000000FFFFFFFF) + (t>>32); return (t & ABC_CONST(0x00000000FFFFFFFF)) + (t>>32);
} }
static inline int Bdc_CountSpfd( word t, word f ) static inline int Bdc_CountSpfd( word t, word f )
...@@ -359,7 +359,7 @@ void Bdc_SpfdDecomposeTest_() ...@@ -359,7 +359,7 @@ void Bdc_SpfdDecomposeTest_()
// word Truth = (Truths[0] & Truths[1]) | (Truths[2] & Truths[3]); // word Truth = (Truths[0] & Truths[1]) | (Truths[2] & Truths[3]);
// word Truth = 0x9ef7a8d9c7193a0f; // AAFFAAFF0A0F0A0F // word Truth = 0x9ef7a8d9c7193a0f; // AAFFAAFF0A0F0A0F
// word Truth = 0x34080226CD163000; // word Truth = 0x34080226CD163000;
word Truth = 0x5052585a0002080a; word Truth = ABC_CONST(0x5052585a0002080a);
int nVars = 6; int nVars = 6;
int nCands = 200;// 75; int nCands = 200;// 75;
int nGatesMax = 20; int nGatesMax = 20;
...@@ -905,7 +905,7 @@ void Bdc_SpfdDecomposeTest44() ...@@ -905,7 +905,7 @@ void Bdc_SpfdDecomposeTest44()
{ {
// word t = 0x5052585a0002080a; // word t = 0x5052585a0002080a;
word t = 0x9ef7a8d9c7193a0f; word t = ABC_CONST(0x9ef7a8d9c7193a0f);
// word t = 0x6BFDA276C7193A0F; // word t = 0x6BFDA276C7193A0F;
// word t = 0xA3756AFE0B1DF60B; // word t = 0xA3756AFE0B1DF60B;
...@@ -1080,7 +1080,7 @@ void Bdc_SpfdDecomposeTest8() ...@@ -1080,7 +1080,7 @@ void Bdc_SpfdDecomposeTest8()
{ {
// word t = 0x9ef7a8d9c7193a0f; // word t = 0x9ef7a8d9c7193a0f;
// word t = 0x9EF7FDBFC77F6F0F; // word t = 0x9EF7FDBFC77F6F0F;
word t = 0x513B57150819050F; word t = ABC_CONST(0x513B57150819050F);
Vec_Int_t * vWeights; Vec_Int_t * vWeights;
Vec_Wrd_t * vDivs; Vec_Wrd_t * vDivs;
......
...@@ -442,14 +442,14 @@ char * Kit_PlaFromTruthNew( unsigned * pTruth, int nVars, Vec_Int_t * vCover, Ve ...@@ -442,14 +442,14 @@ char * Kit_PlaFromTruthNew( unsigned * pTruth, int nVars, Vec_Int_t * vCover, Ve
ABC_UINT64_T Kit_PlaToTruth6( char * pSop, int nVars ) ABC_UINT64_T Kit_PlaToTruth6( char * pSop, int nVars )
{ {
static ABC_UINT64_T Truth[8] = { static ABC_UINT64_T Truth[8] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000, ABC_CONST(0xFFFFFFFF00000000),
0x0000000000000000, ABC_CONST(0x0000000000000000),
0xFFFFFFFFFFFFFFFF ABC_CONST(0xFFFFFFFFFFFFFFFF)
}; };
ABC_UINT64_T valueAnd, valueOr = Truth[6]; ABC_UINT64_T valueAnd, valueOr = Truth[6];
int v, lit = 0; int v, lit = 0;
......
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
ABC_NAMESPACE_IMPL_START ABC_NAMESPACE_IMPL_START
static word SFmask[5][4] = { static word SFmask[5][4] = {
{0x8888888888888888,0x4444444444444444,0x2222222222222222,0x1111111111111111}, {ABC_CONST(0x8888888888888888),ABC_CONST(0x4444444444444444),ABC_CONST(0x2222222222222222),ABC_CONST(0x1111111111111111)},
{0xC0C0C0C0C0C0C0C0,0x3030303030303030,0x0C0C0C0C0C0C0C0C,0x0303030303030303}, {ABC_CONST(0xC0C0C0C0C0C0C0C0),ABC_CONST(0x3030303030303030),ABC_CONST(0x0C0C0C0C0C0C0C0C),ABC_CONST(0x0303030303030303)},
{0xF000F000F000F000,0x0F000F000F000F00,0x00F000F000F000F0,0x000F000F000F000F}, {ABC_CONST(0xF000F000F000F000),ABC_CONST(0x0F000F000F000F00),ABC_CONST(0x00F000F000F000F0),ABC_CONST(0x000F000F000F000F)},
{0xFF000000FF000000,0x00FF000000FF0000,0x0000FF000000FF00,0x000000FF000000FF}, {ABC_CONST(0xFF000000FF000000),ABC_CONST(0x00FF000000FF0000),ABC_CONST(0x0000FF000000FF00),ABC_CONST(0x000000FF000000FF)},
{0xFFFF000000000000,0x0000FFFF00000000,0x00000000FFFF0000,0x000000000000FFFF} {ABC_CONST(0xFFFF000000000000),ABC_CONST(0x0000FFFF00000000),ABC_CONST(0x00000000FFFF0000),ABC_CONST(0x000000000000FFFF)}
}; };
// we need next two functions only for verification of lucky method in debugging mode // we need next two functions only for verification of lucky method in debugging mode
......
...@@ -74,11 +74,11 @@ inline word Extra_Truth6SwapAdjacent( word t, int iVar ) ...@@ -74,11 +74,11 @@ inline word Extra_Truth6SwapAdjacent( word t, int iVar )
{ {
// variable swapping code // variable swapping code
static word PMasks[5][3] = { static word PMasks[5][3] = {
{ 0x9999999999999999, 0x2222222222222222, 0x4444444444444444 }, { ABC_CONST(0x9999999999999999), ABC_CONST(0x2222222222222222), ABC_CONST(0x4444444444444444) },
{ 0xC3C3C3C3C3C3C3C3, 0x0C0C0C0C0C0C0C0C, 0x3030303030303030 }, { ABC_CONST(0xC3C3C3C3C3C3C3C3), ABC_CONST(0x0C0C0C0C0C0C0C0C), ABC_CONST(0x3030303030303030) },
{ 0xF00FF00FF00FF00F, 0x00F000F000F000F0, 0x0F000F000F000F00 }, { ABC_CONST(0xF00FF00FF00FF00F), ABC_CONST(0x00F000F000F000F0), ABC_CONST(0x0F000F000F000F00) },
{ 0xFF0000FFFF0000FF, 0x0000FF000000FF00, 0x00FF000000FF0000 }, { ABC_CONST(0xFF0000FFFF0000FF), ABC_CONST(0x0000FF000000FF00), ABC_CONST(0x00FF000000FF0000) },
{ 0xFFFF00000000FFFF, 0x00000000FFFF0000, 0x0000FFFF00000000 } { ABC_CONST(0xFFFF00000000FFFF), ABC_CONST(0x00000000FFFF0000), ABC_CONST(0x0000FFFF00000000) }
}; };
assert( iVar < 5 ); assert( iVar < 5 );
return (t & PMasks[iVar][0]) | ((t & PMasks[iVar][1]) << (1 << iVar)) | ((t & PMasks[iVar][2]) >> (1 << iVar)); return (t & PMasks[iVar][0]) | ((t & PMasks[iVar][1]) << (1 << iVar)) | ((t & PMasks[iVar][2]) >> (1 << iVar));
...@@ -87,12 +87,12 @@ inline word Extra_Truth6ChangePhase( word t, int iVar) ...@@ -87,12 +87,12 @@ inline word Extra_Truth6ChangePhase( word t, int iVar)
{ {
// elementary truth tables // elementary truth tables
static word Truth6[6] = { static word Truth6[6] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
assert( iVar < 6 ); assert( iVar < 6 );
return ((t & ~Truth6[iVar]) << (1 << iVar)) | ((t & Truth6[iVar]) >> (1 << iVar)); return ((t & ~Truth6[iVar]) << (1 << iVar)) | ((t & Truth6[iVar]) >> (1 << iVar));
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
ABC_NAMESPACE_IMPL_START ABC_NAMESPACE_IMPL_START
static word mask0[6] = { 0x5555555555555555,0x3333333333333333, 0x0F0F0F0F0F0F0F0F,0x00FF00FF00FF00FF,0x0000FFFF0000FFFF, 0x00000000FFFFFFFF}; static word mask0[6] = { ABC_CONST(0x5555555555555555),ABC_CONST(0x3333333333333333), ABC_CONST(0x0F0F0F0F0F0F0F0F),ABC_CONST(0x00FF00FF00FF00FF),ABC_CONST(0x0000FFFF0000FFFF), ABC_CONST(0x00000000FFFFFFFF)};
/* /*
static word mask1[6] = { 0xAAAAAAAAAAAAAAAA,0xCCCCCCCCCCCCCCCC, 0xF0F0F0F0F0F0F0F0,0xFF00FF00FF00FF00,0xFFFF0000FFFF0000, 0xFFFFFFFF00000000 }; static word mask1[6] = { 0xAAAAAAAAAAAAAAAA,0xCCCCCCCCCCCCCCCC, 0xF0F0F0F0F0F0F0F0,0xFF00FF00FF00FF00,0xFFFF0000FFFF0000, 0xFFFFFFFF00000000 };
static word mask[6][2] = { static word mask[6][2] = {
...@@ -37,9 +37,9 @@ int Kit_TruthWordNum_64bit( int nVars ) { return nVars <= 6 ? 1 : (1 << (nVars ...@@ -37,9 +37,9 @@ int Kit_TruthWordNum_64bit( int nVars ) { return nVars <= 6 ? 1 : (1 << (nVars
int Kit_WordCountOnes_64bit(word x) int Kit_WordCountOnes_64bit(word x)
{ {
x = x - ((x >> 1) & 0x5555555555555555); x = x - ((x >> 1) & ABC_CONST(0x5555555555555555));
x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333); x = (x & ABC_CONST(0x3333333333333333)) + ((x >> 2) & ABC_CONST(0x3333333333333333));
x = (x + (x >> 4)) & 0x0F0F0F0F0F0F0F0F; x = (x + (x >> 4)) & ABC_CONST(0x0F0F0F0F0F0F0F0F);
x = x + (x >> 8); x = x + (x >> 8);
x = x + (x >> 16); x = x + (x >> 16);
x = x + (x >> 32); x = x + (x >> 32);
...@@ -62,17 +62,17 @@ void Kit_TruthCountOnesInCofs_64bit( word * pTruth, int nVars, int * pStore ) ...@@ -62,17 +62,17 @@ void Kit_TruthCountOnesInCofs_64bit( word * pTruth, int nVars, int * pStore )
if ( nVars <= 6 ) if ( nVars <= 6 )
{ {
if ( nVars > 0 ) if ( nVars > 0 )
pStore[0] = Kit_WordCountOnes_64bit( pTruth[0] & 0x5555555555555555 ); pStore[0] = Kit_WordCountOnes_64bit( pTruth[0] & ABC_CONST(0x5555555555555555) );
if ( nVars > 1 ) if ( nVars > 1 )
pStore[1] = Kit_WordCountOnes_64bit( pTruth[0] & 0x3333333333333333 ); pStore[1] = Kit_WordCountOnes_64bit( pTruth[0] & ABC_CONST(0x3333333333333333) );
if ( nVars > 2 ) if ( nVars > 2 )
pStore[2] = Kit_WordCountOnes_64bit( pTruth[0] & 0x0F0F0F0F0F0F0F0F ); pStore[2] = Kit_WordCountOnes_64bit( pTruth[0] & ABC_CONST(0x0F0F0F0F0F0F0F0F) );
if ( nVars > 3 ) if ( nVars > 3 )
pStore[3] = Kit_WordCountOnes_64bit( pTruth[0] & 0x00FF00FF00FF00FF ); pStore[3] = Kit_WordCountOnes_64bit( pTruth[0] & ABC_CONST(0x00FF00FF00FF00FF) );
if ( nVars > 4 ) if ( nVars > 4 )
pStore[4] = Kit_WordCountOnes_64bit( pTruth[0] & 0x0000FFFF0000FFFF ); pStore[4] = Kit_WordCountOnes_64bit( pTruth[0] & ABC_CONST(0x0000FFFF0000FFFF) );
if ( nVars > 5 ) if ( nVars > 5 )
pStore[5] = Kit_WordCountOnes_64bit( pTruth[0] & 0x00000000FFFFFFFF ); pStore[5] = Kit_WordCountOnes_64bit( pTruth[0] & ABC_CONST(0x00000000FFFFFFFF) );
return; return;
} }
// nVars > 6 // nVars > 6
...@@ -87,12 +87,12 @@ void Kit_TruthCountOnesInCofs_64bit( word * pTruth, int nVars, int * pStore ) ...@@ -87,12 +87,12 @@ void Kit_TruthCountOnesInCofs_64bit( word * pTruth, int nVars, int * pStore )
// count 1's for the first six variables // count 1's for the first six variables
for ( k = nWords/2; k>0; k-- ) for ( k = nWords/2; k>0; k-- )
{ {
pStore[0] += Kit_WordCountOnes_64bit( (pTruth[0] & 0x5555555555555555) | ((pTruth[1] & 0x5555555555555555) << 1) ); pStore[0] += Kit_WordCountOnes_64bit( (pTruth[0] & ABC_CONST(0x5555555555555555)) | ((pTruth[1] & ABC_CONST(0x5555555555555555)) << 1) );
pStore[1] += Kit_WordCountOnes_64bit( (pTruth[0] & 0x3333333333333333) | ((pTruth[1] & 0x3333333333333333) << 2) ); pStore[1] += Kit_WordCountOnes_64bit( (pTruth[0] & ABC_CONST(0x3333333333333333)) | ((pTruth[1] & ABC_CONST(0x3333333333333333)) << 2) );
pStore[2] += Kit_WordCountOnes_64bit( (pTruth[0] & 0x0F0F0F0F0F0F0F0F) | ((pTruth[1] & 0x0F0F0F0F0F0F0F0F) << 4) ); pStore[2] += Kit_WordCountOnes_64bit( (pTruth[0] & ABC_CONST(0x0F0F0F0F0F0F0F0F)) | ((pTruth[1] & ABC_CONST(0x0F0F0F0F0F0F0F0F)) << 4) );
pStore[3] += Kit_WordCountOnes_64bit( (pTruth[0] & 0x00FF00FF00FF00FF) | ((pTruth[1] & 0x00FF00FF00FF00FF) << 8) ); pStore[3] += Kit_WordCountOnes_64bit( (pTruth[0] & ABC_CONST(0x00FF00FF00FF00FF)) | ((pTruth[1] & ABC_CONST(0x00FF00FF00FF00FF)) << 8) );
pStore[4] += Kit_WordCountOnes_64bit( (pTruth[0] & 0x0000FFFF0000FFFF) | ((pTruth[1] & 0x0000FFFF0000FFFF) << 16) ); pStore[4] += Kit_WordCountOnes_64bit( (pTruth[0] & ABC_CONST(0x0000FFFF0000FFFF)) | ((pTruth[1] & ABC_CONST(0x0000FFFF0000FFFF)) << 16) );
pStore[5] += Kit_WordCountOnes_64bit( (pTruth[0] & 0x00000000FFFFFFFF) | ((pTruth[1] & 0x00000000FFFFFFFF) << 32) ); pStore[5] += Kit_WordCountOnes_64bit( (pTruth[0] & ABC_CONST(0x00000000FFFFFFFF)) | ((pTruth[1] & ABC_CONST(0x00000000FFFFFFFF)) << 32) );
pTruth += 2; pTruth += 2;
} }
} }
...@@ -143,11 +143,11 @@ void Kit_TruthSwapAdjacentVars_64bit( word * pInOut, int nVars, int iVar ) ...@@ -143,11 +143,11 @@ void Kit_TruthSwapAdjacentVars_64bit( word * pInOut, int nVars, int iVar )
int i, Step, Shift, SizeOfBlock; // int i, Step, Shift, SizeOfBlock; //
word temp[256]; // to make only pInOut possible word temp[256]; // to make only pInOut possible
static word PMasks[5][3] = { static word PMasks[5][3] = {
{ 0x9999999999999999, 0x2222222222222222, 0x4444444444444444 }, { ABC_CONST(0x9999999999999999), ABC_CONST(0x2222222222222222), ABC_CONST(0x4444444444444444) },
{ 0xC3C3C3C3C3C3C3C3, 0x0C0C0C0C0C0C0C0C, 0x3030303030303030 }, { ABC_CONST(0xC3C3C3C3C3C3C3C3), ABC_CONST(0x0C0C0C0C0C0C0C0C), ABC_CONST(0x3030303030303030) },
{ 0xF00FF00FF00FF00F, 0x00F000F000F000F0, 0x0F000F000F000F00 }, { ABC_CONST(0xF00FF00FF00FF00F), ABC_CONST(0x00F000F000F000F0), ABC_CONST(0x0F000F000F000F00) },
{ 0xFF0000FFFF0000FF, 0x0000FF000000FF00, 0x00FF000000FF0000 }, { ABC_CONST(0xFF0000FFFF0000FF), ABC_CONST(0x0000FF000000FF00), ABC_CONST(0x00FF000000FF0000) },
{ 0xFFFF00000000FFFF, 0x00000000FFFF0000, 0x0000FFFF00000000 } { ABC_CONST(0xFFFF00000000FFFF), ABC_CONST(0x00000000FFFF0000), ABC_CONST(0x0000FFFF00000000) }
}; };
int nWords = Kit_TruthWordNum_64bit( nVars ); int nWords = Kit_TruthWordNum_64bit( nVars );
......
...@@ -24,14 +24,14 @@ void swap_ij_case1( word* f,int totalVars, int i, int j) ...@@ -24,14 +24,14 @@ void swap_ij_case1( word* f,int totalVars, int i, int j)
{ {
int e,wordsNumber,n,shift; int e,wordsNumber,n,shift;
word maskArray[45]= word maskArray[45]=
{ 0x9999999999999999, 0x2222222222222222, 0x4444444444444444 ,0xA5A5A5A5A5A5A5A5, 0x0A0A0A0A0A0A0A0A, 0x5050505050505050, { ABC_CONST(0x9999999999999999), ABC_CONST(0x2222222222222222), ABC_CONST(0x4444444444444444) ,ABC_CONST(0xA5A5A5A5A5A5A5A5), ABC_CONST(0x0A0A0A0A0A0A0A0A), ABC_CONST(0x5050505050505050),
0xAA55AA55AA55AA55, 0x00AA00AA00AA00AA, 0x5500550055005500 ,0xAAAA5555AAAA5555, 0x0000AAAA0000AAAA, 0x5555000055550000 , ABC_CONST(0xAA55AA55AA55AA55), ABC_CONST(0x00AA00AA00AA00AA), ABC_CONST(0x5500550055005500) ,ABC_CONST(0xAAAA5555AAAA5555), ABC_CONST(0x0000AAAA0000AAAA), ABC_CONST(0x5555000055550000),
0xAAAAAAAA55555555, 0x00000000AAAAAAAA, 0x5555555500000000 ,0xC3C3C3C3C3C3C3C3, 0x0C0C0C0C0C0C0C0C, 0x3030303030303030 , ABC_CONST(0xAAAAAAAA55555555), ABC_CONST(0x00000000AAAAAAAA), ABC_CONST(0x5555555500000000) ,ABC_CONST(0xC3C3C3C3C3C3C3C3), ABC_CONST(0x0C0C0C0C0C0C0C0C), ABC_CONST(0x3030303030303030),
0xCC33CC33CC33CC33, 0x00CC00CC00CC00CC, 0x3300330033003300 ,0xCCCC3333CCCC3333, 0x0000CCCC0000CCCC, 0x3333000033330000 , ABC_CONST(0xCC33CC33CC33CC33), ABC_CONST(0x00CC00CC00CC00CC), ABC_CONST(0x3300330033003300) ,ABC_CONST(0xCCCC3333CCCC3333), ABC_CONST(0x0000CCCC0000CCCC), ABC_CONST(0x3333000033330000),
0xCCCCCCCC33333333, 0x00000000CCCCCCCC, 0x3333333300000000 ,0xF00FF00FF00FF00F, 0x00F000F000F000F0, 0x0F000F000F000F00 , ABC_CONST(0xCCCCCCCC33333333), ABC_CONST(0x00000000CCCCCCCC), ABC_CONST(0x3333333300000000) ,ABC_CONST(0xF00FF00FF00FF00F), ABC_CONST(0x00F000F000F000F0), ABC_CONST(0x0F000F000F000F00),
0xF0F00F0FF0F00F0F, 0x0000F0F00000F0F0, 0x0F0F00000F0F0000 ,0xF0F0F0F00F0F0F0F, 0x00000000F0F0F0F0, 0x0F0F0F0F00000000 , ABC_CONST(0xF0F00F0FF0F00F0F), ABC_CONST(0x0000F0F00000F0F0), ABC_CONST(0x0F0F00000F0F0000) ,ABC_CONST(0xF0F0F0F00F0F0F0F), ABC_CONST(0x00000000F0F0F0F0), ABC_CONST(0x0F0F0F0F00000000),
0xFF0000FFFF0000FF, 0x0000FF000000FF00, 0x00FF000000FF0000 ,0xFF00FF0000FF00FF, 0x00000000FF00FF00, 0x00FF00FF00000000 , ABC_CONST(0xFF0000FFFF0000FF), ABC_CONST(0x0000FF000000FF00), ABC_CONST(0x00FF000000FF0000) ,ABC_CONST(0xFF00FF0000FF00FF), ABC_CONST(0x00000000FF00FF00), ABC_CONST(0x00FF00FF00000000),
0xFFFF00000000FFFF, 0x00000000FFFF0000, 0x0000FFFF00000000 ABC_CONST(0xFFFF00000000FFFF), ABC_CONST(0x00000000FFFF0000), ABC_CONST(0x0000FFFF00000000)
}; };
e = 3*((9*i - i*i -2)/2 + j); // Exact formula for index in maskArray e = 3*((9*i - i*i -2)/2 + j); // Exact formula for index in maskArray
wordsNumber = Kit_TruthWordNum_64bit(totalVars); wordsNumber = Kit_TruthWordNum_64bit(totalVars);
...@@ -46,8 +46,8 @@ void swap_ij_case1( word* f,int totalVars, int i, int j) ...@@ -46,8 +46,8 @@ void swap_ij_case1( word* f,int totalVars, int i, int j)
void swap_ij_case2( word* f,int totalVars, int i, int j) void swap_ij_case2( word* f,int totalVars, int i, int j)
{ {
word mask[] = { 0xAAAAAAAAAAAAAAAA,0xCCCCCCCCCCCCCCCC, 0xF0F0F0F0F0F0F0F0, word mask[] = { ABC_CONST(0xAAAAAAAAAAAAAAAA), ABC_CONST(0xCCCCCCCCCCCCCCCC), ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00,0xFFFF0000FFFF0000, 0xFFFFFFFF00000000 }; ABC_CONST(0xFF00FF00FF00FF00), ABC_CONST(0xFFFF0000FFFF0000), ABC_CONST(0xFFFFFFFF00000000) };
word temp; word temp;
int x,y,wj; int x,y,wj;
int WORDS_IN_TT = Kit_TruthWordNum_64bit(totalVars); int WORDS_IN_TT = Kit_TruthWordNum_64bit(totalVars);
......
...@@ -42,29 +42,29 @@ static int BitCount8[256] = { ...@@ -42,29 +42,29 @@ static int BitCount8[256] = {
}; };
// variable swapping code // variable swapping code
static word PMasks[5][3] = { static word PMasks[5][3] = {
{ 0x9999999999999999, 0x2222222222222222, 0x4444444444444444 }, { ABC_CONST(0x9999999999999999), ABC_CONST(0x2222222222222222), ABC_CONST(0x4444444444444444) },
{ 0xC3C3C3C3C3C3C3C3, 0x0C0C0C0C0C0C0C0C, 0x3030303030303030 }, { ABC_CONST(0xC3C3C3C3C3C3C3C3), ABC_CONST(0x0C0C0C0C0C0C0C0C), ABC_CONST(0x3030303030303030) },
{ 0xF00FF00FF00FF00F, 0x00F000F000F000F0, 0x0F000F000F000F00 }, { ABC_CONST(0xF00FF00FF00FF00F), ABC_CONST(0x00F000F000F000F0), ABC_CONST(0x0F000F000F000F00) },
{ 0xFF0000FFFF0000FF, 0x0000FF000000FF00, 0x00FF000000FF0000 }, { ABC_CONST(0xFF0000FFFF0000FF), ABC_CONST(0x0000FF000000FF00), ABC_CONST(0x00FF000000FF0000) },
{ 0xFFFF00000000FFFF, 0x00000000FFFF0000, 0x0000FFFF00000000 } { ABC_CONST(0xFFFF00000000FFFF), ABC_CONST(0x00000000FFFF0000), ABC_CONST(0x0000FFFF00000000) }
}; };
// elementary truth tables // elementary truth tables
static word Truth6[6] = { static word Truth6[6] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
static word Truth7[7][2] = { static word Truth7[7][2] = {
{0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA}, {ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA)},
{0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC}, {ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC)},
{0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0}, {ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0)},
{0xFF00FF00FF00FF00,0xFF00FF00FF00FF00}, {ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00)},
{0xFFFF0000FFFF0000,0xFFFF0000FFFF0000}, {ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000)},
{0xFFFFFFFF00000000,0xFFFFFFFF00000000}, {ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000)},
{0x0000000000000000,0xFFFFFFFFFFFFFFFF} {ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF)}
}; };
extern void Kit_DsdPrintFromTruth( unsigned * pTruth, int nVars ); extern void Kit_DsdPrintFromTruth( unsigned * pTruth, int nVars );
...@@ -382,12 +382,12 @@ static word If_Dec7DeriveDisjoint( word t[2], int Pla2Var[7], int Var2Pla[7] ) ...@@ -382,12 +382,12 @@ static word If_Dec7DeriveDisjoint( word t[2], int Pla2Var[7], int Var2Pla[7] )
static inline int If_Dec6CountOnes( word t ) static inline int If_Dec6CountOnes( word t )
{ {
t = (t & 0x5555555555555555) + ((t>> 1) & 0x5555555555555555); t = (t & ABC_CONST(0x5555555555555555)) + ((t>> 1) & ABC_CONST(0x5555555555555555));
t = (t & 0x3333333333333333) + ((t>> 2) & 0x3333333333333333); t = (t & ABC_CONST(0x3333333333333333)) + ((t>> 2) & ABC_CONST(0x3333333333333333));
t = (t & 0x0F0F0F0F0F0F0F0F) + ((t>> 4) & 0x0F0F0F0F0F0F0F0F); t = (t & ABC_CONST(0x0F0F0F0F0F0F0F0F)) + ((t>> 4) & ABC_CONST(0x0F0F0F0F0F0F0F0F));
t = (t & 0x00FF00FF00FF00FF) + ((t>> 8) & 0x00FF00FF00FF00FF); t = (t & ABC_CONST(0x00FF00FF00FF00FF)) + ((t>> 8) & ABC_CONST(0x00FF00FF00FF00FF));
t = (t & 0x0000FFFF0000FFFF) + ((t>>16) & 0x0000FFFF0000FFFF); t = (t & ABC_CONST(0x0000FFFF0000FFFF)) + ((t>>16) & ABC_CONST(0x0000FFFF0000FFFF));
return (t & 0x00000000FFFFFFFF) + (t>>32); return (t & ABC_CONST(0x00000000FFFFFFFF)) + (t>>32);
} }
static inline int If_Dec6HasVar( word t, int v ) static inline int If_Dec6HasVar( word t, int v )
{ {
......
...@@ -42,32 +42,32 @@ static int BitCount8[256] = { ...@@ -42,32 +42,32 @@ static int BitCount8[256] = {
}; };
// variable swapping code // variable swapping code
static word PMasks[5][3] = { static word PMasks[5][3] = {
{ 0x9999999999999999, 0x2222222222222222, 0x4444444444444444 }, { ABC_CONST(0x9999999999999999), ABC_CONST(0x2222222222222222), ABC_CONST(0x4444444444444444) },
{ 0xC3C3C3C3C3C3C3C3, 0x0C0C0C0C0C0C0C0C, 0x3030303030303030 }, { ABC_CONST(0xC3C3C3C3C3C3C3C3), ABC_CONST(0x0C0C0C0C0C0C0C0C), ABC_CONST(0x3030303030303030) },
{ 0xF00FF00FF00FF00F, 0x00F000F000F000F0, 0x0F000F000F000F00 }, { ABC_CONST(0xF00FF00FF00FF00F), ABC_CONST(0x00F000F000F000F0), ABC_CONST(0x0F000F000F000F00) },
{ 0xFF0000FFFF0000FF, 0x0000FF000000FF00, 0x00FF000000FF0000 }, { ABC_CONST(0xFF0000FFFF0000FF), ABC_CONST(0x0000FF000000FF00), ABC_CONST(0x00FF000000FF0000) },
{ 0xFFFF00000000FFFF, 0x00000000FFFF0000, 0x0000FFFF00000000 } { ABC_CONST(0xFFFF00000000FFFF), ABC_CONST(0x00000000FFFF0000), ABC_CONST(0x0000FFFF00000000) }
}; };
// elementary truth tables // elementary truth tables
static word Truth6[6] = { static word Truth6[6] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
static word Truth10[10][16] = { static word Truth10[10][16] = {
{0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA}, {ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA)},
{0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC}, {ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC)},
{0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0}, {ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0)},
{0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00}, {ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00)},
{0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000}, {ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000)},
{0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000}, {ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000)},
{0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF}, {ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF)},
{0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF}, {ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF)},
{0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF}, {ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF)},
{0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF} {ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF)}
}; };
extern void Kit_DsdPrintFromTruth( unsigned * pTruth, int nVars ); extern void Kit_DsdPrintFromTruth( unsigned * pTruth, int nVars );
...@@ -232,8 +232,8 @@ static inline void If_Dec08SwapAdjacent( word * pOut, word * pIn, int iVar, int ...@@ -232,8 +232,8 @@ static inline void If_Dec08SwapAdjacent( word * pOut, word * pIn, int iVar, int
{ {
for ( i = 0; i < nWords; i += 2 ) for ( i = 0; i < nWords; i += 2 )
{ {
pOut[i] = (pIn[i] & 0x00000000FFFFFFFF) | ((pIn[i+1] & 0x00000000FFFFFFFF) << 32); pOut[i] = (pIn[i] & ABC_CONST(0x00000000FFFFFFFF)) | ((pIn[i+1] & ABC_CONST(0x00000000FFFFFFFF)) << 32);
pOut[i+1] = (pIn[i+1] & 0xFFFFFFFF00000000) | ((pIn[i] & 0xFFFFFFFF00000000) >> 32); pOut[i+1] = (pIn[i+1] & ABC_CONST(0xFFFFFFFF00000000)) | ((pIn[i] & ABC_CONST(0xFFFFFFFF00000000)) >> 32);
} }
} }
} }
......
...@@ -42,32 +42,32 @@ static int BitCount8[256] = { ...@@ -42,32 +42,32 @@ static int BitCount8[256] = {
}; };
// variable swapping code // variable swapping code
static word PMasks[5][3] = { static word PMasks[5][3] = {
{ 0x9999999999999999, 0x2222222222222222, 0x4444444444444444 }, { ABC_CONST(0x9999999999999999), ABC_CONST(0x2222222222222222), ABC_CONST(0x4444444444444444) },
{ 0xC3C3C3C3C3C3C3C3, 0x0C0C0C0C0C0C0C0C, 0x3030303030303030 }, { ABC_CONST(0xC3C3C3C3C3C3C3C3), ABC_CONST(0x0C0C0C0C0C0C0C0C), ABC_CONST(0x3030303030303030) },
{ 0xF00FF00FF00FF00F, 0x00F000F000F000F0, 0x0F000F000F000F00 }, { ABC_CONST(0xF00FF00FF00FF00F), ABC_CONST(0x00F000F000F000F0), ABC_CONST(0x0F000F000F000F00) },
{ 0xFF0000FFFF0000FF, 0x0000FF000000FF00, 0x00FF000000FF0000 }, { ABC_CONST(0xFF0000FFFF0000FF), ABC_CONST(0x0000FF000000FF00), ABC_CONST(0x00FF000000FF0000) },
{ 0xFFFF00000000FFFF, 0x00000000FFFF0000, 0x0000FFFF00000000 } { ABC_CONST(0xFFFF00000000FFFF), ABC_CONST(0x00000000FFFF0000), ABC_CONST(0x0000FFFF00000000) }
}; };
// elementary truth tables // elementary truth tables
static word Truth6[6] = { static word Truth6[6] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
static word Truth10[10][16] = { static word Truth10[10][16] = {
{0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA,0xAAAAAAAAAAAAAAAA}, {ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA)},
{0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC,0xCCCCCCCCCCCCCCCC}, {ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC)},
{0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0,0xF0F0F0F0F0F0F0F0}, {ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0)},
{0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00,0xFF00FF00FF00FF00}, {ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00)},
{0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000,0xFFFF0000FFFF0000}, {ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000)},
{0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000,0xFFFFFFFF00000000}, {ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000)},
{0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0xFFFFFFFFFFFFFFFF}, {ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF)},
{0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF}, {ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF)},
{0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF}, {ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF)},
{0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF,0xFFFFFFFFFFFFFFFF} {ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF)}
}; };
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
...@@ -229,8 +229,8 @@ static inline void If_Dec10SwapAdjacent( word * pOut, word * pIn, int iVar, int ...@@ -229,8 +229,8 @@ static inline void If_Dec10SwapAdjacent( word * pOut, word * pIn, int iVar, int
{ {
for ( i = 0; i < nWords; i += 2 ) for ( i = 0; i < nWords; i += 2 )
{ {
pOut[i] = (pIn[i] & 0x00000000FFFFFFFF) | ((pIn[i+1] & 0x00000000FFFFFFFF) << 32); pOut[i] = (pIn[i] & ABC_CONST(0x00000000FFFFFFFF)) | ((pIn[i+1] & ABC_CONST(0x00000000FFFFFFFF)) << 32);
pOut[i+1] = (pIn[i+1] & 0xFFFFFFFF00000000) | ((pIn[i] & 0xFFFFFFFF00000000) >> 32); pOut[i+1] = (pIn[i+1] & ABC_CONST(0xFFFFFFFF00000000)) | ((pIn[i] & ABC_CONST(0xFFFFFFFF00000000)) >> 32);
} }
} }
} }
......
...@@ -55,20 +55,20 @@ struct If_Hte_t_ ...@@ -55,20 +55,20 @@ struct If_Hte_t_
// variable swapping code // variable swapping code
static word PMasks[5][3] = { static word PMasks[5][3] = {
{ 0x9999999999999999, 0x2222222222222222, 0x4444444444444444 }, { ABC_CONST(0x9999999999999999), ABC_CONST(0x2222222222222222), ABC_CONST(0x4444444444444444) },
{ 0xC3C3C3C3C3C3C3C3, 0x0C0C0C0C0C0C0C0C, 0x3030303030303030 }, { ABC_CONST(0xC3C3C3C3C3C3C3C3), ABC_CONST(0x0C0C0C0C0C0C0C0C), ABC_CONST(0x3030303030303030) },
{ 0xF00FF00FF00FF00F, 0x00F000F000F000F0, 0x0F000F000F000F00 }, { ABC_CONST(0xF00FF00FF00FF00F), ABC_CONST(0x00F000F000F000F0), ABC_CONST(0x0F000F000F000F00) },
{ 0xFF0000FFFF0000FF, 0x0000FF000000FF00, 0x00FF000000FF0000 }, { ABC_CONST(0xFF0000FFFF0000FF), ABC_CONST(0x0000FF000000FF00), ABC_CONST(0x00FF000000FF0000) },
{ 0xFFFF00000000FFFF, 0x00000000FFFF0000, 0x0000FFFF00000000 } { ABC_CONST(0xFFFF00000000FFFF), ABC_CONST(0x00000000FFFF0000), ABC_CONST(0x0000FFFF00000000) }
}; };
// elementary truth tables // elementary truth tables
static word Truth6[6] = { static word Truth6[6] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
static word TruthAll[CLU_VAR_MAX][CLU_WRD_MAX] = {{0}}; static word TruthAll[CLU_VAR_MAX][CLU_WRD_MAX] = {{0}};
...@@ -131,12 +131,12 @@ static inline int If_CluWordNum( int nVars ) ...@@ -131,12 +131,12 @@ static inline int If_CluWordNum( int nVars )
} }
static inline int If_CluCountOnes( word t ) static inline int If_CluCountOnes( word t )
{ {
t = (t & 0x5555555555555555) + ((t>> 1) & 0x5555555555555555); t = (t & ABC_CONST(0x5555555555555555)) + ((t>> 1) & ABC_CONST(0x5555555555555555));
t = (t & 0x3333333333333333) + ((t>> 2) & 0x3333333333333333); t = (t & ABC_CONST(0x3333333333333333)) + ((t>> 2) & ABC_CONST(0x3333333333333333));
t = (t & 0x0F0F0F0F0F0F0F0F) + ((t>> 4) & 0x0F0F0F0F0F0F0F0F); t = (t & ABC_CONST(0x0F0F0F0F0F0F0F0F)) + ((t>> 4) & ABC_CONST(0x0F0F0F0F0F0F0F0F));
t = (t & 0x00FF00FF00FF00FF) + ((t>> 8) & 0x00FF00FF00FF00FF); t = (t & ABC_CONST(0x00FF00FF00FF00FF)) + ((t>> 8) & ABC_CONST(0x00FF00FF00FF00FF));
t = (t & 0x0000FFFF0000FFFF) + ((t>>16) & 0x0000FFFF0000FFFF); t = (t & ABC_CONST(0x0000FFFF0000FFFF)) + ((t>>16) & ABC_CONST(0x0000FFFF0000FFFF));
return (t & 0x00000000FFFFFFFF) + (t>>32); return (t & ABC_CONST(0x00000000FFFFFFFF)) + (t>>32);
} }
void If_CluHashTableCheck( If_Man_t * p ) void If_CluHashTableCheck( If_Man_t * p )
...@@ -428,8 +428,8 @@ static inline void If_CluSwapAdjacent( word * pOut, word * pIn, int iVar, int nV ...@@ -428,8 +428,8 @@ static inline void If_CluSwapAdjacent( word * pOut, word * pIn, int iVar, int nV
{ {
for ( i = 0; i < nWords; i += 2 ) for ( i = 0; i < nWords; i += 2 )
{ {
pOut[i] = (pIn[i] & 0x00000000FFFFFFFF) | ((pIn[i+1] & 0x00000000FFFFFFFF) << 32); pOut[i] = (pIn[i] & ABC_CONST(0x00000000FFFFFFFF)) | ((pIn[i+1] & ABC_CONST(0x00000000FFFFFFFF)) << 32);
pOut[i+1] = (pIn[i+1] & 0xFFFFFFFF00000000) | ((pIn[i] & 0xFFFFFFFF00000000) >> 32); pOut[i+1] = (pIn[i+1] & ABC_CONST(0xFFFFFFFF00000000)) | ((pIn[i] & ABC_CONST(0xFFFFFFFF00000000)) >> 32);
} }
} }
} }
...@@ -725,12 +725,12 @@ void If_CluSwapVars( word * pTruth, int nVars, int * V2P, int * P2V, int iVar, i ...@@ -725,12 +725,12 @@ void If_CluSwapVars( word * pTruth, int nVars, int * V2P, int * P2V, int iVar, i
int shift, step, iStep, jStep; int shift, step, iStep, jStep;
int w = 0, i = 0, j = 0; int w = 0, i = 0, j = 0;
static word PPMasks[6][6] = { static word PPMasks[6][6] = {
{ 0x2222222222222222, 0x0A0A0A0A0A0A0A0A, 0x00AA00AA00AA00AA, 0x0000AAAA0000AAAA, 0x00000000AAAAAAAA, 0xAAAAAAAAAAAAAAAA }, { ABC_CONST(0x2222222222222222), ABC_CONST(0x0A0A0A0A0A0A0A0A), ABC_CONST(0x00AA00AA00AA00AA), ABC_CONST(0x0000AAAA0000AAAA), ABC_CONST(0x00000000AAAAAAAA), ABC_CONST(0xAAAAAAAAAAAAAAAA) },
{ 0x0000000000000000, 0x0C0C0C0C0C0C0C0C, 0x00CC00CC00CC00CC, 0x0000CCCC0000CCCC, 0x00000000CCCCCCCC, 0xCCCCCCCCCCCCCCCC }, { ABC_CONST(0x0000000000000000), ABC_CONST(0x0C0C0C0C0C0C0C0C), ABC_CONST(0x00CC00CC00CC00CC), ABC_CONST(0x0000CCCC0000CCCC), ABC_CONST(0x00000000CCCCCCCC), ABC_CONST(0xCCCCCCCCCCCCCCCC) },
{ 0x0000000000000000, 0x0000000000000000, 0x00F000F000F000F0, 0x0000F0F00000F0F0, 0x00000000F0F0F0F0, 0xF0F0F0F0F0F0F0F0 }, { ABC_CONST(0x0000000000000000), ABC_CONST(0x0000000000000000), ABC_CONST(0x00F000F000F000F0), ABC_CONST(0x0000F0F00000F0F0), ABC_CONST(0x00000000F0F0F0F0), ABC_CONST(0xF0F0F0F0F0F0F0F0) },
{ 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000FF000000FF00, 0x00000000FF00FF00, 0xFF00FF00FF00FF00 }, { ABC_CONST(0x0000000000000000), ABC_CONST(0x0000000000000000), ABC_CONST(0x0000000000000000), ABC_CONST(0x0000FF000000FF00), ABC_CONST(0x00000000FF00FF00), ABC_CONST(0xFF00FF00FF00FF00) },
{ 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x00000000FFFF0000, 0xFFFF0000FFFF0000 }, { ABC_CONST(0x0000000000000000), ABC_CONST(0x0000000000000000), ABC_CONST(0x0000000000000000), ABC_CONST(0x0000000000000000), ABC_CONST(0x00000000FFFF0000), ABC_CONST(0xFFFF0000FFFF0000) },
{ 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0x0000000000000000, 0xFFFFFFFF00000000 } { ABC_CONST(0x0000000000000000), ABC_CONST(0x0000000000000000), ABC_CONST(0x0000000000000000), ABC_CONST(0x0000000000000000), ABC_CONST(0x0000000000000000), ABC_CONST(0xFFFFFFFF00000000) }
}; };
if( iVar == jVar ) if( iVar == jVar )
return; return;
...@@ -2113,7 +2113,7 @@ void If_CluTest() ...@@ -2113,7 +2113,7 @@ void If_CluTest()
// word t = 0x0080008880A088FF; // word t = 0x0080008880A088FF;
// word s = t; // word s = t;
// word t = 0xFFBBBBFFF0B0B0F0; // word t = 0xFFBBBBFFF0B0B0F0;
word t = 0x6DD9926D962D6996; word t = ABC_CONST(0x6DD9926D962D6996);
int nVars = 6; int nVars = 6;
int nLutLeaf = 4; int nLutLeaf = 4;
int nLutLeaf2 = 4; int nLutLeaf2 = 4;
......
...@@ -57,14 +57,14 @@ word If_AndVerifyArray( Vec_Wrd_t * vAnds, int nVars ) ...@@ -57,14 +57,14 @@ word If_AndVerifyArray( Vec_Wrd_t * vAnds, int nVars )
word Entry, Truth0, Truth1, TruthR = 0; word Entry, Truth0, Truth1, TruthR = 0;
int i; int i;
static word Truth[8] = { static word Truth[8] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000, ABC_CONST(0xFFFFFFFF00000000),
0x0000000000000000, ABC_CONST(0x0000000000000000),
0xFFFFFFFFFFFFFFFF ABC_CONST(0xFFFFFFFFFFFFFFFF)
}; };
if ( Vec_WrdSize(vAnds) == 0 ) if ( Vec_WrdSize(vAnds) == 0 )
return Truth[6]; return Truth[6];
......
...@@ -183,12 +183,12 @@ static inline word Exp_Truth6Lit( int nVars, int Lit, word * puFanins, word * pu ...@@ -183,12 +183,12 @@ static inline word Exp_Truth6Lit( int nVars, int Lit, word * puFanins, word * pu
static inline word Exp_Truth6( int nVars, Vec_Int_t * p, word * puFanins ) static inline word Exp_Truth6( int nVars, Vec_Int_t * p, word * puFanins )
{ {
static word Truth6[6] = { static word Truth6[6] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
word * puNodes, Res; word * puNodes, Res;
int i; int i;
......
...@@ -605,8 +605,8 @@ void Mio_LibraryDetectSpecialGates( Mio_Library_t * pLib ) ...@@ -605,8 +605,8 @@ void Mio_LibraryDetectSpecialGates( Mio_Library_t * pLib )
Mio_LibrarySortGates( pLib ); Mio_LibrarySortGates( pLib );
uFuncBuf = 0xAAAAAAAAAAAAAAAA; uFuncBuf = ABC_CONST(0xAAAAAAAAAAAAAAAA);
uFuncAnd2 = 0xAAAAAAAAAAAAAAAA & 0xCCCCCCCCCCCCCCCC; uFuncAnd2 = ABC_CONST(0xAAAAAAAAAAAAAAAA) & ABC_CONST(0xCCCCCCCCCCCCCCCC);
uFuncInv = ~uFuncBuf; uFuncInv = ~uFuncBuf;
uFuncNand2 = ~uFuncAnd2; uFuncNand2 = ~uFuncAnd2;
......
...@@ -315,9 +315,9 @@ Mio_Gate_t ** Mio_CollectRoots( Mio_Library_t * pLib, int nInputs, float tDelay, ...@@ -315,9 +315,9 @@ Mio_Gate_t ** Mio_CollectRoots( Mio_Library_t * pLib, int nInputs, float tDelay,
continue; continue;
if ( pGate->uTruth == 0 || pGate->uTruth == ~0 ) if ( pGate->uTruth == 0 || pGate->uTruth == ~0 )
continue; continue;
if ( pGate->uTruth == 0xAAAAAAAAAAAAAAAA ) if ( pGate->uTruth == ABC_CONST(0xAAAAAAAAAAAAAAAA) )
continue; continue;
if ( pGate->uTruth == ~0xAAAAAAAAAAAAAAAA && fSkipInv ) if ( pGate->uTruth == ~ABC_CONST(0xAAAAAAAAAAAAAAAA) && fSkipInv )
continue; continue;
if ( pGate->pTwin ) // skip multi-output gates for now if ( pGate->pTwin ) // skip multi-output gates for now
continue; continue;
......
...@@ -2260,11 +2260,11 @@ static inline word Extra_Truth6SwapAdjacent( word t, int v ) ...@@ -2260,11 +2260,11 @@ static inline word Extra_Truth6SwapAdjacent( word t, int v )
{ {
// variable swapping code // variable swapping code
static word PMasks[5][3] = { static word PMasks[5][3] = {
{ 0x9999999999999999, 0x2222222222222222, 0x4444444444444444 }, { ABC_CONST(0x9999999999999999), ABC_CONST(0x2222222222222222), ABC_CONST(0x4444444444444444) },
{ 0xC3C3C3C3C3C3C3C3, 0x0C0C0C0C0C0C0C0C, 0x3030303030303030 }, { ABC_CONST(0xC3C3C3C3C3C3C3C3), ABC_CONST(0x0C0C0C0C0C0C0C0C), ABC_CONST(0x3030303030303030) },
{ 0xF00FF00FF00FF00F, 0x00F000F000F000F0, 0x0F000F000F000F00 }, { ABC_CONST(0xF00FF00FF00FF00F), ABC_CONST(0x00F000F000F000F0), ABC_CONST(0x0F000F000F000F00) },
{ 0xFF0000FFFF0000FF, 0x0000FF000000FF00, 0x00FF000000FF0000 }, { ABC_CONST(0xFF0000FFFF0000FF), ABC_CONST(0x0000FF000000FF00), ABC_CONST(0x00FF000000FF0000) },
{ 0xFFFF00000000FFFF, 0x00000000FFFF0000, 0x0000FFFF00000000 } { ABC_CONST(0xFFFF00000000FFFF), ABC_CONST(0x00000000FFFF0000), ABC_CONST(0x0000FFFF00000000) }
}; };
assert( v < 5 ); assert( v < 5 );
return (t & PMasks[v][0]) | ((t & PMasks[v][1]) << (1 << v)) | ((t & PMasks[v][2]) >> (1 << v)); return (t & PMasks[v][0]) | ((t & PMasks[v][1]) << (1 << v)) | ((t & PMasks[v][2]) >> (1 << v));
...@@ -2273,12 +2273,12 @@ static inline word Extra_Truth6ChangePhase( word t, int v ) ...@@ -2273,12 +2273,12 @@ static inline word Extra_Truth6ChangePhase( word t, int v )
{ {
// elementary truth tables // elementary truth tables
static word Truth6[6] = { static word Truth6[6] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
assert( v < 6 ); assert( v < 6 );
return ((t & ~Truth6[v]) << (1 << v)) | ((t & Truth6[v]) >> (1 << v)); return ((t & ~Truth6[v]) << (1 << v)) | ((t & Truth6[v]) >> (1 << v));
...@@ -2323,12 +2323,12 @@ word Extra_Truth6MinimumExact( word t, int * pComp, int * pPerm ) ...@@ -2323,12 +2323,12 @@ word Extra_Truth6MinimumExact( word t, int * pComp, int * pPerm )
***********************************************************************/ ***********************************************************************/
static inline int Extra_Truth6Ones( word t ) static inline int Extra_Truth6Ones( word t )
{ {
t = (t & 0x5555555555555555) + ((t>> 1) & 0x5555555555555555); t = (t & ABC_CONST(0x5555555555555555)) + ((t>> 1) & ABC_CONST(0x5555555555555555));
t = (t & 0x3333333333333333) + ((t>> 2) & 0x3333333333333333); t = (t & ABC_CONST(0x3333333333333333)) + ((t>> 2) & ABC_CONST(0x3333333333333333));
t = (t & 0x0F0F0F0F0F0F0F0F) + ((t>> 4) & 0x0F0F0F0F0F0F0F0F); t = (t & ABC_CONST(0x0F0F0F0F0F0F0F0F)) + ((t>> 4) & ABC_CONST(0x0F0F0F0F0F0F0F0F));
t = (t & 0x00FF00FF00FF00FF) + ((t>> 8) & 0x00FF00FF00FF00FF); t = (t & ABC_CONST(0x00FF00FF00FF00FF)) + ((t>> 8) & ABC_CONST(0x00FF00FF00FF00FF));
t = (t & 0x0000FFFF0000FFFF) + ((t>>16) & 0x0000FFFF0000FFFF); t = (t & ABC_CONST(0x0000FFFF0000FFFF)) + ((t>>16) & ABC_CONST(0x0000FFFF0000FFFF));
return (t & 0x00000000FFFFFFFF) + (t>>32); return (t & ABC_CONST(0x00000000FFFFFFFF)) + (t>>32);
} }
static inline word Extra_Truth6MinimumRoundOne( word t, int v ) static inline word Extra_Truth6MinimumRoundOne( word t, int v )
{ {
...@@ -2385,7 +2385,7 @@ word Extra_Truth6MinimumHeuristic( word t ) ...@@ -2385,7 +2385,7 @@ word Extra_Truth6MinimumHeuristic( word t )
} }
void Extra_Truth6MinimumHeuristicTest() void Extra_Truth6MinimumHeuristicTest()
{ {
word t = 0x5555555555555555 & ~(0x3333333333333333 & 0x0F0F0F0F0F0F0F0F); word t = ABC_CONST(0x5555555555555555) & ~(ABC_CONST(0x3333333333333333) & ABC_CONST(0x0F0F0F0F0F0F0F0F));
Extra_Truth6MinimumRoundMany( t ); Extra_Truth6MinimumRoundMany( t );
t = 0; t = 0;
} }
...@@ -2465,7 +2465,7 @@ void Extra_NpnTest1() ...@@ -2465,7 +2465,7 @@ void Extra_NpnTest1()
void Extra_NpnTest2() void Extra_NpnTest2()
{ {
int * pComp, * pPerm; int * pComp, * pPerm;
word tMin, t = 0xa2222aaa08888000; word tMin, t = ABC_CONST(0xa2222aaa08888000);
pComp = Extra_GreyCodeSchedule( 6 ); pComp = Extra_GreyCodeSchedule( 6 );
pPerm = Extra_PermSchedule( 6 ); pPerm = Extra_PermSchedule( 6 );
tMin = Extra_Truth6MinimumExact( t, pComp, pPerm ); tMin = Extra_Truth6MinimumExact( t, pComp, pPerm );
......
...@@ -197,6 +197,12 @@ typedef unsigned __int64 ABC_UINT64_T; ...@@ -197,6 +197,12 @@ typedef unsigned __int64 ABC_UINT64_T;
#error unknown platform #error unknown platform
#endif /* defined(PLATFORM) */ #endif /* defined(PLATFORM) */
#ifdef LIN
#define ABC_CONST(number) number ## ULL
#else // LIN64 and windows
#define ABC_CONST(number) number
#endif
typedef ABC_UINT64_T word; typedef ABC_UINT64_T word;
typedef ABC_INT64_T iword; typedef ABC_INT64_T iword;
......
...@@ -28,11 +28,11 @@ ABC_NAMESPACE_IMPL_START ...@@ -28,11 +28,11 @@ ABC_NAMESPACE_IMPL_START
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
static word s_CMasks6[5] = { static word s_CMasks6[5] = {
0x1111111111111111, ABC_CONST(0x1111111111111111),
0x0303030303030303, ABC_CONST(0x0303030303030303),
0x000F000F000F000F, ABC_CONST(0x000F000F000F000F),
0x000000FF000000FF, ABC_CONST(0x000000FF000000FF),
0x000000000000FFFF ABC_CONST(0x000000000000FFFF)
}; };
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
......
...@@ -868,7 +868,7 @@ void Dau_DsdTest3() ...@@ -868,7 +868,7 @@ void Dau_DsdTest3()
// word t = 0xF3F5030503050305; // word t = 0xF3F5030503050305;
// word t = (s_Truths6[0] & s_Truths6[1] & (s_Truths6[2] ^ s_Truths6[4])) | (~s_Truths6[0] & ~s_Truths6[1] & ~(s_Truths6[2] ^ s_Truths6[4])); // word t = (s_Truths6[0] & s_Truths6[1] & (s_Truths6[2] ^ s_Truths6[4])) | (~s_Truths6[0] & ~s_Truths6[1] & ~(s_Truths6[2] ^ s_Truths6[4]));
// word t = 0x05050500f5f5f5f3; // word t = 0x05050500f5f5f5f3;
word t = 0x9ef7a8d9c7193a0f; word t = ABC_CONST(0x9ef7a8d9c7193a0f);
char * p = Dau_DsdPerform( t ); char * p = Dau_DsdPerform( t );
word t2 = Dau_Dsd6ToTruth( p ); word t2 = Dau_Dsd6ToTruth( p );
if ( t != t2 ) if ( t != t2 )
......
...@@ -199,12 +199,12 @@ Tru_Man_t * Tru_ManAlloc( int nVars ) ...@@ -199,12 +199,12 @@ Tru_Man_t * Tru_ManAlloc( int nVars )
{ {
word Masks[6] = word Masks[6] =
{ {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
Tru_Man_t * p; Tru_Man_t * p;
int i, w; int i, w;
......
...@@ -138,12 +138,12 @@ void Cnf_CollectVolume( Aig_Man_t * p, Aig_Obj_t * pRoot, Vec_Ptr_t * vLeaves, V ...@@ -138,12 +138,12 @@ void Cnf_CollectVolume( Aig_Man_t * p, Aig_Obj_t * pRoot, Vec_Ptr_t * vLeaves, V
word Cnf_CutDeriveTruth( Aig_Man_t * p, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vNodes ) word Cnf_CutDeriveTruth( Aig_Man_t * p, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vNodes )
{ {
static word Truth6[6] = { static word Truth6[6] = {
0xAAAAAAAAAAAAAAAA, ABC_CONST(0xAAAAAAAAAAAAAAAA),
0xCCCCCCCCCCCCCCCC, ABC_CONST(0xCCCCCCCCCCCCCCCC),
0xF0F0F0F0F0F0F0F0, ABC_CONST(0xF0F0F0F0F0F0F0F0),
0xFF00FF00FF00FF00, ABC_CONST(0xFF00FF00FF00FF00),
0xFFFF0000FFFF0000, ABC_CONST(0xFFFF0000FFFF0000),
0xFFFFFFFF00000000 ABC_CONST(0xFFFFFFFF00000000)
}; };
static word C[2] = { 0, ~(word)0 }; static word C[2] = { 0, ~(word)0 };
static word S[256]; static word S[256];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment