Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
7e598cd2
Commit
7e598cd2
authored
Jan 30, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing compilation problems on Linux-32 related to constants of type unsigned long long.
parent
aaacf573
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
346 additions
and
340 deletions
+346
-340
src/aig/gia/giaTruth.c
+6
-6
src/base/abc/abcSop.c
+15
-15
src/base/abci/abcNpnSave.c
+25
-25
src/base/io/ioWriteBlif.c
+12
-12
src/bool/bdc/bdcSpfd.c
+15
-15
src/bool/kit/kitPla.c
+8
-8
src/bool/lucky/luckyFast16.c
+5
-5
src/bool/lucky/luckyFast6.c
+11
-11
src/bool/lucky/luckySwap.c
+21
-21
src/bool/lucky/luckySwapIJ.c
+10
-10
src/map/if/ifDec07.c
+24
-24
src/map/if/ifDec08.c
+23
-23
src/map/if/ifDec10.c
+23
-23
src/map/if/ifDec16.c
+26
-26
src/map/if/ifTime.c
+8
-8
src/map/mio/exp.h
+6
-6
src/map/mio/mioRead.c
+2
-2
src/map/mio/mioUtils.c
+2
-2
src/misc/extra/extraUtilMisc.c
+19
-19
src/misc/util/abc_global.h
+6
-0
src/misc/util/utilTruth.h
+61
-61
src/opt/dau/dauCanon.c
+5
-5
src/opt/dau/dauDsd.c
+1
-1
src/sat/bsat/satTruth.c
+6
-6
src/sat/cnf/cnfFast.c
+6
-6
No files found.
src/aig/gia/giaTruth.c
View file @
7e598cd2
...
...
@@ -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
)
{
static
word
s_Truth6
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
Gia_Obj_t
*
pLeaf
;
int
i
;
...
...
src/base/abc/abcSop.c
View file @
7e598cd2
...
...
@@ -1163,14 +1163,14 @@ char * Abc_SopDecoderLog( Mem_Flex_t * pMan, int nValues )
word
Abc_SopToTruth
(
char
*
pSop
,
int
nInputs
)
{
static
word
Truth
[
8
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
,
ABC_CONST
(
0x0000000000000000
)
,
ABC_CONST
(
0xFFFFFFFFFFFFFFFF
)
};
word
Cube
,
Result
=
0
;
int
v
,
lit
=
0
;
...
...
@@ -1214,13 +1214,13 @@ word Abc_SopToTruth( char * pSop, int nInputs )
void
Abc_SopToTruth7
(
char
*
pSop
,
int
nInputs
,
word
r
[
2
]
)
{
static
word
Truth
[
7
][
2
]
=
{
{
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
},
{
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
},
{
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
},
{
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
},
{
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
},
{
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
},
{
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
},
{
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
),
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
},
{
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
),
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
},
{
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
),
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
},
{
ABC_CONST
(
0xFF00FF00FF00FF00
),
ABC_CONST
(
0xFF00FF00FF00FF00
)
},
{
ABC_CONST
(
0xFFFF0000FFFF0000
),
ABC_CONST
(
0xFFFF0000FFFF0000
)
},
{
ABC_CONST
(
0xFFFFFFFF00000000
),
ABC_CONST
(
0xFFFFFFFF00000000
)
},
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0xFFFFFFFFFFFFFFFF
)
},
};
word
Cube
[
2
];
int
v
,
lit
=
0
;
...
...
src/base/abci/abcNpnSave.c
View file @
7e598cd2
...
...
@@ -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
word
Truth
[
8
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
,
ABC_CONST
(
0x0000000000000000
)
,
ABC_CONST
(
0xFFFFFFFFFFFFFFFF
)
};
static
Npn_Man_t
*
pNpnMan
=
NULL
;
...
...
@@ -193,17 +193,17 @@ word Npn_TruthPadWord( word uTruth, int nVars )
if
(
nVars
==
6
)
return
uTruth
;
if
(
nVars
<=
5
)
uTruth
=
((
uTruth
&
0x00000000FFFFFFFF
)
<<
32
)
|
(
uTruth
&
0x00000000FFFFFFFF
);
uTruth
=
((
uTruth
&
ABC_CONST
(
0x00000000FFFFFFFF
))
<<
32
)
|
(
uTruth
&
ABC_CONST
(
0x00000000FFFFFFFF
)
);
if
(
nVars
<=
4
)
uTruth
=
((
uTruth
&
0x0000FFFF0000FFFF
)
<<
16
)
|
(
uTruth
&
0x0000FFFF0000FFFF
);
uTruth
=
((
uTruth
&
ABC_CONST
(
0x0000FFFF0000FFFF
))
<<
16
)
|
(
uTruth
&
ABC_CONST
(
0x0000FFFF0000FFFF
)
);
if
(
nVars
<=
3
)
uTruth
=
((
uTruth
&
0x00FF00FF00FF00FF
)
<<
8
)
|
(
uTruth
&
0x00FF00FF00FF00FF
);
uTruth
=
((
uTruth
&
ABC_CONST
(
0x00FF00FF00FF00FF
))
<<
8
)
|
(
uTruth
&
ABC_CONST
(
0x00FF00FF00FF00FF
)
);
if
(
nVars
<=
2
)
uTruth
=
((
uTruth
&
0x0F0F0F0F0F0F0F0F
)
<<
4
)
|
(
uTruth
&
0x0F0F0F0F0F0F0F0F
);
uTruth
=
((
uTruth
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
))
<<
4
)
|
(
uTruth
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
);
if
(
nVars
<=
1
)
uTruth
=
((
uTruth
&
0x3333333333333333
)
<<
2
)
|
(
uTruth
&
0x3333333333333333
);
uTruth
=
((
uTruth
&
ABC_CONST
(
0x3333333333333333
))
<<
2
)
|
(
uTruth
&
ABC_CONST
(
0x3333333333333333
)
);
if
(
nVars
==
0
)
uTruth
=
((
uTruth
&
0x5555555555555555
)
<<
1
)
|
(
uTruth
&
0x5555555555555555
);
uTruth
=
((
uTruth
&
ABC_CONST
(
0x5555555555555555
))
<<
1
)
|
(
uTruth
&
ABC_CONST
(
0x5555555555555555
)
);
return
uTruth
;
}
...
...
@@ -220,12 +220,12 @@ word Npn_TruthPadWord( word uTruth, int nVars )
***********************************************************************/
static
inline
int
Npn_TruthCountOnes
(
word
t
)
{
t
=
(
t
&
0x5555555555555555
)
+
((
t
>>
1
)
&
0x5555555555555555
);
t
=
(
t
&
0x3333333333333333
)
+
((
t
>>
2
)
&
0x3333333333333333
);
t
=
(
t
&
0x0F0F0F0F0F0F0F0F
)
+
((
t
>>
4
)
&
0x0F0F0F0F0F0F0F0F
);
t
=
(
t
&
0x00FF00FF00FF00FF
)
+
((
t
>>
8
)
&
0x00FF00FF00FF00FF
);
t
=
(
t
&
0x0000FFFF0000FFFF
)
+
((
t
>>
16
)
&
0x0000FFFF0000FFFF
);
return
(
t
&
0x00000000FFFFFFFF
)
+
(
t
>>
32
);
t
=
(
t
&
ABC_CONST
(
0x5555555555555555
))
+
((
t
>>
1
)
&
ABC_CONST
(
0x5555555555555555
)
);
t
=
(
t
&
ABC_CONST
(
0x3333333333333333
))
+
((
t
>>
2
)
&
ABC_CONST
(
0x3333333333333333
)
);
t
=
(
t
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
))
+
((
t
>>
4
)
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
);
t
=
(
t
&
ABC_CONST
(
0x00FF00FF00FF00FF
))
+
((
t
>>
8
)
&
ABC_CONST
(
0x00FF00FF00FF00FF
)
);
t
=
(
t
&
ABC_CONST
(
0x0000FFFF0000FFFF
))
+
((
t
>>
16
)
&
ABC_CONST
(
0x0000FFFF0000FFFF
)
);
return
(
t
&
ABC_CONST
(
0x00000000FFFFFFFF
)
)
+
(
t
>>
32
);
}
/**Function*************************************************************
...
...
@@ -258,11 +258,11 @@ static inline word Npn_TruthChangePhase( word t, int v )
static
inline
word
Npn_TruthSwapAdjacentVars
(
word
t
,
int
v
)
{
static
word
PMasks
[
5
][
3
]
=
{
{
0x9999999999999999
,
0x2222222222222222
,
0x4444444444444444
},
{
0xC3C3C3C3C3C3C3C3
,
0x0C0C0C0C0C0C0C0C
,
0x3030303030303030
},
{
0xF00FF00FF00FF00F
,
0x00F000F000F000F0
,
0x0F000F000F000F00
},
{
0xFF0000FFFF0000FF
,
0x0000FF000000FF00
,
0x00FF000000FF0000
},
{
0xFFFF00000000FFFF
,
0x00000000FFFF0000
,
0x0000FFFF00000000
}
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
},
{
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
},
{
ABC_CONST
(
0xF00FF00FF00FF00F
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0F000F000F000F00
)
},
{
ABC_CONST
(
0xFF0000FFFF0000FF
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00FF000000FF0000
)
},
{
ABC_CONST
(
0xFFFF00000000FFFF
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0x0000FFFF00000000
)
}
};
assert
(
v
<
6
);
return
(
t
&
PMasks
[
v
][
0
])
|
((
t
&
PMasks
[
v
][
1
])
<<
(
1
<<
v
))
|
((
t
&
PMasks
[
v
][
2
])
>>
(
1
<<
v
));
...
...
src/base/io/ioWriteBlif.c
View file @
7e598cd2
...
...
@@ -1004,12 +1004,12 @@ void Io_NtkWriteNodeIntStruct( FILE * pFile, Abc_Obj_t * pNode, Vec_Int_t * vCov
if
(
TruthStore
[
0
][
0
]
==
0
)
{
static
word
Truth6
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
int
nVarsMax
=
16
;
int
nWordsMax
=
(
1
<<
10
);
...
...
@@ -1177,12 +1177,12 @@ void Io_NtkWriteModelIntStruct( FILE * pFile, Abc_Obj_t * pNode, Vec_Int_t * vCo
if
(
TruthStore
[
0
][
0
]
==
0
)
{
static
word
Truth6
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
int
nVarsMax
=
16
;
int
nWordsMax
=
(
1
<<
10
);
...
...
src/bool/bdc/bdcSpfd.c
View file @
7e598cd2
...
...
@@ -43,22 +43,22 @@ struct Bdc_Nod_t_
};
static
word
Truths
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
static
inline
int
Bdc_CountOnes
(
word
t
)
{
t
=
(
t
&
0x5555555555555555
)
+
((
t
>>
1
)
&
0x5555555555555555
);
t
=
(
t
&
0x3333333333333333
)
+
((
t
>>
2
)
&
0x3333333333333333
);
t
=
(
t
&
0x0F0F0F0F0F0F0F0F
)
+
((
t
>>
4
)
&
0x0F0F0F0F0F0F0F0F
);
t
=
(
t
&
0x00FF00FF00FF00FF
)
+
((
t
>>
8
)
&
0x00FF00FF00FF00FF
);
t
=
(
t
&
0x0000FFFF0000FFFF
)
+
((
t
>>
16
)
&
0x0000FFFF0000FFFF
);
return
(
t
&
0x00000000FFFFFFFF
)
+
(
t
>>
32
);
t
=
(
t
&
ABC_CONST
(
0x5555555555555555
))
+
((
t
>>
1
)
&
ABC_CONST
(
0x5555555555555555
)
);
t
=
(
t
&
ABC_CONST
(
0x3333333333333333
))
+
((
t
>>
2
)
&
ABC_CONST
(
0x3333333333333333
)
);
t
=
(
t
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
))
+
((
t
>>
4
)
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
);
t
=
(
t
&
ABC_CONST
(
0x00FF00FF00FF00FF
))
+
((
t
>>
8
)
&
ABC_CONST
(
0x00FF00FF00FF00FF
)
);
t
=
(
t
&
ABC_CONST
(
0x0000FFFF0000FFFF
))
+
((
t
>>
16
)
&
ABC_CONST
(
0x0000FFFF0000FFFF
)
);
return
(
t
&
ABC_CONST
(
0x00000000FFFFFFFF
)
)
+
(
t
>>
32
);
}
static
inline
int
Bdc_CountSpfd
(
word
t
,
word
f
)
...
...
@@ -359,7 +359,7 @@ void Bdc_SpfdDecomposeTest_()
// word Truth = (Truths[0] & Truths[1]) | (Truths[2] & Truths[3]);
// word Truth = 0x9ef7a8d9c7193a0f; // AAFFAAFF0A0F0A0F
// word Truth = 0x34080226CD163000;
word
Truth
=
0x5052585a0002080a
;
word
Truth
=
ABC_CONST
(
0x5052585a0002080a
)
;
int
nVars
=
6
;
int
nCands
=
200
;
// 75;
int
nGatesMax
=
20
;
...
...
@@ -905,7 +905,7 @@ void Bdc_SpfdDecomposeTest44()
{
// word t = 0x5052585a0002080a;
word
t
=
0x9ef7a8d9c7193a0f
;
word
t
=
ABC_CONST
(
0x9ef7a8d9c7193a0f
)
;
// word t = 0x6BFDA276C7193A0F;
// word t = 0xA3756AFE0B1DF60B;
...
...
@@ -1080,7 +1080,7 @@ void Bdc_SpfdDecomposeTest8()
{
// word t = 0x9ef7a8d9c7193a0f;
// word t = 0x9EF7FDBFC77F6F0F;
word
t
=
0x513B57150819050F
;
word
t
=
ABC_CONST
(
0x513B57150819050F
)
;
Vec_Int_t
*
vWeights
;
Vec_Wrd_t
*
vDivs
;
...
...
src/bool/kit/kitPla.c
View file @
7e598cd2
...
...
@@ -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
)
{
static
ABC_UINT64_T
Truth
[
8
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
,
ABC_CONST
(
0x0000000000000000
)
,
ABC_CONST
(
0xFFFFFFFFFFFFFFFF
)
};
ABC_UINT64_T
valueAnd
,
valueOr
=
Truth
[
6
];
int
v
,
lit
=
0
;
...
...
src/bool/lucky/luckyFast16.c
View file @
7e598cd2
...
...
@@ -20,11 +20,11 @@
ABC_NAMESPACE_IMPL_START
static
word
SFmask
[
5
][
4
]
=
{
{
0x8888888888888888
,
0x4444444444444444
,
0x2222222222222222
,
0x1111111111111111
},
{
0xC0C0C0C0C0C0C0C0
,
0x3030303030303030
,
0x0C0C0C0C0C0C0C0C
,
0x0303030303030303
},
{
0xF000F000F000F000
,
0x0F000F000F000F00
,
0x00F000F000F000F0
,
0x000F000F000F000F
},
{
0xFF000000FF000000
,
0x00FF000000FF0000
,
0x0000FF000000FF00
,
0x000000FF000000FF
},
{
0xFFFF000000000000
,
0x0000FFFF00000000
,
0x00000000FFFF0000
,
0x000000000000FFFF
}
{
ABC_CONST
(
0x8888888888888888
),
ABC_CONST
(
0x4444444444444444
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x1111111111111111
)
},
{
ABC_CONST
(
0xC0C0C0C0C0C0C0C0
),
ABC_CONST
(
0x3030303030303030
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x0303030303030303
)
},
{
ABC_CONST
(
0xF000F000F000F000
),
ABC_CONST
(
0x0F000F000F000F00
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x000F000F000F000F
)
},
{
ABC_CONST
(
0xFF000000FF000000
),
ABC_CONST
(
0x00FF000000FF0000
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x000000FF000000FF
)
},
{
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
...
...
src/bool/lucky/luckyFast6.c
View file @
7e598cd2
...
...
@@ -74,11 +74,11 @@ inline word Extra_Truth6SwapAdjacent( word t, int iVar )
{
// variable swapping code
static
word
PMasks
[
5
][
3
]
=
{
{
0x9999999999999999
,
0x2222222222222222
,
0x4444444444444444
},
{
0xC3C3C3C3C3C3C3C3
,
0x0C0C0C0C0C0C0C0C
,
0x3030303030303030
},
{
0xF00FF00FF00FF00F
,
0x00F000F000F000F0
,
0x0F000F000F000F00
},
{
0xFF0000FFFF0000FF
,
0x0000FF000000FF00
,
0x00FF000000FF0000
},
{
0xFFFF00000000FFFF
,
0x00000000FFFF0000
,
0x0000FFFF00000000
}
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
},
{
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
},
{
ABC_CONST
(
0xF00FF00FF00FF00F
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0F000F000F000F00
)
},
{
ABC_CONST
(
0xFF0000FFFF0000FF
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00FF000000FF0000
)
},
{
ABC_CONST
(
0xFFFF00000000FFFF
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0x0000FFFF00000000
)
}
};
assert
(
iVar
<
5
);
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)
{
// elementary truth tables
static
word
Truth6
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
assert
(
iVar
<
6
);
return
((
t
&
~
Truth6
[
iVar
])
<<
(
1
<<
iVar
))
|
((
t
&
Truth6
[
iVar
])
>>
(
1
<<
iVar
));
...
...
src/bool/lucky/luckySwap.c
View file @
7e598cd2
...
...
@@ -20,7 +20,7 @@
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 mask[6][2] = {
...
...
@@ -37,9 +37,9 @@ int Kit_TruthWordNum_64bit( int nVars ) { return nVars <= 6 ? 1 : (1 << (nVars
int
Kit_WordCountOnes_64bit
(
word
x
)
{
x
=
x
-
((
x
>>
1
)
&
0x5555555555555555
);
x
=
(
x
&
0x3333333333333333
)
+
((
x
>>
2
)
&
0x3333333333333333
);
x
=
(
x
+
(
x
>>
4
))
&
0x0F0F0F0F0F0F0F0F
;
x
=
x
-
((
x
>>
1
)
&
ABC_CONST
(
0x5555555555555555
)
);
x
=
(
x
&
ABC_CONST
(
0x3333333333333333
))
+
((
x
>>
2
)
&
ABC_CONST
(
0x3333333333333333
)
);
x
=
(
x
+
(
x
>>
4
))
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
;
x
=
x
+
(
x
>>
8
);
x
=
x
+
(
x
>>
16
);
x
=
x
+
(
x
>>
32
);
...
...
@@ -62,17 +62,17 @@ void Kit_TruthCountOnesInCofs_64bit( word * pTruth, int nVars, int * pStore )
if
(
nVars
<=
6
)
{
if
(
nVars
>
0
)
pStore
[
0
]
=
Kit_WordCountOnes_64bit
(
pTruth
[
0
]
&
0x5555555555555555
);
pStore
[
0
]
=
Kit_WordCountOnes_64bit
(
pTruth
[
0
]
&
ABC_CONST
(
0x5555555555555555
)
);
if
(
nVars
>
1
)
pStore
[
1
]
=
Kit_WordCountOnes_64bit
(
pTruth
[
0
]
&
0x3333333333333333
);
pStore
[
1
]
=
Kit_WordCountOnes_64bit
(
pTruth
[
0
]
&
ABC_CONST
(
0x3333333333333333
)
);
if
(
nVars
>
2
)
pStore
[
2
]
=
Kit_WordCountOnes_64bit
(
pTruth
[
0
]
&
0x0F0F0F0F0F0F0F0F
);
pStore
[
2
]
=
Kit_WordCountOnes_64bit
(
pTruth
[
0
]
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
);
if
(
nVars
>
3
)
pStore
[
3
]
=
Kit_WordCountOnes_64bit
(
pTruth
[
0
]
&
0x00FF00FF00FF00FF
);
pStore
[
3
]
=
Kit_WordCountOnes_64bit
(
pTruth
[
0
]
&
ABC_CONST
(
0x00FF00FF00FF00FF
)
);
if
(
nVars
>
4
)
pStore
[
4
]
=
Kit_WordCountOnes_64bit
(
pTruth
[
0
]
&
0x0000FFFF0000FFFF
);
pStore
[
4
]
=
Kit_WordCountOnes_64bit
(
pTruth
[
0
]
&
ABC_CONST
(
0x0000FFFF0000FFFF
)
);
if
(
nVars
>
5
)
pStore
[
5
]
=
Kit_WordCountOnes_64bit
(
pTruth
[
0
]
&
0x00000000FFFFFFFF
);
pStore
[
5
]
=
Kit_WordCountOnes_64bit
(
pTruth
[
0
]
&
ABC_CONST
(
0x00000000FFFFFFFF
)
);
return
;
}
// nVars > 6
...
...
@@ -87,12 +87,12 @@ void Kit_TruthCountOnesInCofs_64bit( word * pTruth, int nVars, int * pStore )
// count 1's for the first six variables
for
(
k
=
nWords
/
2
;
k
>
0
;
k
--
)
{
pStore
[
0
]
+=
Kit_WordCountOnes_64bit
(
(
pTruth
[
0
]
&
0x5555555555555555
)
|
((
pTruth
[
1
]
&
0x5555555555555555
)
<<
1
)
);
pStore
[
1
]
+=
Kit_WordCountOnes_64bit
(
(
pTruth
[
0
]
&
0x3333333333333333
)
|
((
pTruth
[
1
]
&
0x3333333333333333
)
<<
2
)
);
pStore
[
2
]
+=
Kit_WordCountOnes_64bit
(
(
pTruth
[
0
]
&
0x0F0F0F0F0F0F0F0F
)
|
((
pTruth
[
1
]
&
0x0F0F0F0F0F0F0F0F
)
<<
4
)
);
pStore
[
3
]
+=
Kit_WordCountOnes_64bit
(
(
pTruth
[
0
]
&
0x00FF00FF00FF00FF
)
|
((
pTruth
[
1
]
&
0x00FF00FF00FF00FF
)
<<
8
)
);
pStore
[
4
]
+=
Kit_WordCountOnes_64bit
(
(
pTruth
[
0
]
&
0x0000FFFF0000FFFF
)
|
((
pTruth
[
1
]
&
0x0000FFFF0000FFFF
)
<<
16
)
);
pStore
[
5
]
+=
Kit_WordCountOnes_64bit
(
(
pTruth
[
0
]
&
0x00000000FFFFFFFF
)
|
((
pTruth
[
1
]
&
0x00000000FFFFFFFF
)
<<
32
)
);
pStore
[
0
]
+=
Kit_WordCountOnes_64bit
(
(
pTruth
[
0
]
&
ABC_CONST
(
0x5555555555555555
))
|
((
pTruth
[
1
]
&
ABC_CONST
(
0x5555555555555555
)
)
<<
1
)
);
pStore
[
1
]
+=
Kit_WordCountOnes_64bit
(
(
pTruth
[
0
]
&
ABC_CONST
(
0x3333333333333333
))
|
((
pTruth
[
1
]
&
ABC_CONST
(
0x3333333333333333
)
)
<<
2
)
);
pStore
[
2
]
+=
Kit_WordCountOnes_64bit
(
(
pTruth
[
0
]
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
))
|
((
pTruth
[
1
]
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
)
<<
4
)
);
pStore
[
3
]
+=
Kit_WordCountOnes_64bit
(
(
pTruth
[
0
]
&
ABC_CONST
(
0x00FF00FF00FF00FF
))
|
((
pTruth
[
1
]
&
ABC_CONST
(
0x00FF00FF00FF00FF
)
)
<<
8
)
);
pStore
[
4
]
+=
Kit_WordCountOnes_64bit
(
(
pTruth
[
0
]
&
ABC_CONST
(
0x0000FFFF0000FFFF
))
|
((
pTruth
[
1
]
&
ABC_CONST
(
0x0000FFFF0000FFFF
)
)
<<
16
)
);
pStore
[
5
]
+=
Kit_WordCountOnes_64bit
(
(
pTruth
[
0
]
&
ABC_CONST
(
0x00000000FFFFFFFF
))
|
((
pTruth
[
1
]
&
ABC_CONST
(
0x00000000FFFFFFFF
)
)
<<
32
)
);
pTruth
+=
2
;
}
}
...
...
@@ -143,11 +143,11 @@ void Kit_TruthSwapAdjacentVars_64bit( word * pInOut, int nVars, int iVar )
int
i
,
Step
,
Shift
,
SizeOfBlock
;
//
word
temp
[
256
];
// to make only pInOut possible
static
word
PMasks
[
5
][
3
]
=
{
{
0x9999999999999999
,
0x2222222222222222
,
0x4444444444444444
},
{
0xC3C3C3C3C3C3C3C3
,
0x0C0C0C0C0C0C0C0C
,
0x3030303030303030
},
{
0xF00FF00FF00FF00F
,
0x00F000F000F000F0
,
0x0F000F000F000F00
},
{
0xFF0000FFFF0000FF
,
0x0000FF000000FF00
,
0x00FF000000FF0000
},
{
0xFFFF00000000FFFF
,
0x00000000FFFF0000
,
0x0000FFFF00000000
}
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
},
{
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
},
{
ABC_CONST
(
0xF00FF00FF00FF00F
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0F000F000F000F00
)
},
{
ABC_CONST
(
0xFF0000FFFF0000FF
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00FF000000FF0000
)
},
{
ABC_CONST
(
0xFFFF00000000FFFF
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0x0000FFFF00000000
)
}
};
int
nWords
=
Kit_TruthWordNum_64bit
(
nVars
);
...
...
src/bool/lucky/luckySwapIJ.c
View file @
7e598cd2
...
...
@@ -24,14 +24,14 @@ void swap_ij_case1( word* f,int totalVars, int i, int j)
{
int
e
,
wordsNumber
,
n
,
shift
;
word
maskArray
[
45
]
=
{
0x9999999999999999
,
0x2222222222222222
,
0x4444444444444444
,
0xA5A5A5A5A5A5A5A5
,
0x0A0A0A0A0A0A0A0A
,
0x5050505050505050
,
0xAA55AA55AA55AA55
,
0x00AA00AA00AA00AA
,
0x5500550055005500
,
0xAAAA5555AAAA5555
,
0x0000AAAA0000AAAA
,
0x5555000055550000
,
0xAAAAAAAA55555555
,
0x00000000AAAAAAAA
,
0x5555555500000000
,
0xC3C3C3C3C3C3C3C3
,
0x0C0C0C0C0C0C0C0C
,
0x3030303030303030
,
0xCC33CC33CC33CC33
,
0x00CC00CC00CC00CC
,
0x3300330033003300
,
0xCCCC3333CCCC3333
,
0x0000CCCC0000CCCC
,
0x3333000033330000
,
0xCCCCCCCC33333333
,
0x00000000CCCCCCCC
,
0x3333333300000000
,
0xF00FF00FF00FF00F
,
0x00F000F000F000F0
,
0x0F000F000F000F00
,
0xF0F00F0FF0F00F0F
,
0x0000F0F00000F0F0
,
0x0F0F00000F0F0000
,
0xF0F0F0F00F0F0F0F
,
0x00000000F0F0F0F0
,
0x0F0F0F0F00000000
,
0xFF0000FFFF0000FF
,
0x0000FF000000FF00
,
0x00FF000000FF0000
,
0xFF00FF0000FF00FF
,
0x00000000FF00FF00
,
0x00FF00FF00000000
,
0xFFFF00000000FFFF
,
0x00000000FFFF0000
,
0x0000FFFF00000000
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
,
ABC_CONST
(
0xA5A5A5A5A5A5A5A5
),
ABC_CONST
(
0x0A0A0A0A0A0A0A0A
),
ABC_CONST
(
0x5050505050505050
)
,
ABC_CONST
(
0xAA55AA55AA55AA55
),
ABC_CONST
(
0x00AA00AA00AA00AA
),
ABC_CONST
(
0x5500550055005500
)
,
ABC_CONST
(
0xAAAA5555AAAA5555
),
ABC_CONST
(
0x0000AAAA0000AAAA
),
ABC_CONST
(
0x5555000055550000
)
,
ABC_CONST
(
0xAAAAAAAA55555555
),
ABC_CONST
(
0x00000000AAAAAAAA
),
ABC_CONST
(
0x5555555500000000
)
,
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
,
ABC_CONST
(
0xCC33CC33CC33CC33
),
ABC_CONST
(
0x00CC00CC00CC00CC
),
ABC_CONST
(
0x3300330033003300
)
,
ABC_CONST
(
0xCCCC3333CCCC3333
),
ABC_CONST
(
0x0000CCCC0000CCCC
),
ABC_CONST
(
0x3333000033330000
)
,
ABC_CONST
(
0xCCCCCCCC33333333
),
ABC_CONST
(
0x00000000CCCCCCCC
),
ABC_CONST
(
0x3333333300000000
)
,
ABC_CONST
(
0xF00FF00FF00FF00F
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0F000F000F000F00
)
,
ABC_CONST
(
0xF0F00F0FF0F00F0F
),
ABC_CONST
(
0x0000F0F00000F0F0
),
ABC_CONST
(
0x0F0F00000F0F0000
)
,
ABC_CONST
(
0xF0F0F0F00F0F0F0F
),
ABC_CONST
(
0x00000000F0F0F0F0
),
ABC_CONST
(
0x0F0F0F0F00000000
)
,
ABC_CONST
(
0xFF0000FFFF0000FF
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00FF000000FF0000
)
,
ABC_CONST
(
0xFF00FF0000FF00FF
),
ABC_CONST
(
0x00000000FF00FF00
),
ABC_CONST
(
0x00FF00FF00000000
)
,
ABC_CONST
(
0xFFFF00000000FFFF
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0x0000FFFF00000000
)
};
e
=
3
*
((
9
*
i
-
i
*
i
-
2
)
/
2
+
j
);
// Exact formula for index in maskArray
wordsNumber
=
Kit_TruthWordNum_64bit
(
totalVars
);
...
...
@@ -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
)
{
word
mask
[]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
};
word
mask
[]
=
{
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
),
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
),
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
),
ABC_CONST
(
0xFFFF0000FFFF0000
),
ABC_CONST
(
0xFFFFFFFF00000000
)
};
word
temp
;
int
x
,
y
,
wj
;
int
WORDS_IN_TT
=
Kit_TruthWordNum_64bit
(
totalVars
);
...
...
src/map/if/ifDec07.c
View file @
7e598cd2
...
...
@@ -42,29 +42,29 @@ static int BitCount8[256] = {
};
// variable swapping code
static
word
PMasks
[
5
][
3
]
=
{
{
0x9999999999999999
,
0x2222222222222222
,
0x4444444444444444
},
{
0xC3C3C3C3C3C3C3C3
,
0x0C0C0C0C0C0C0C0C
,
0x3030303030303030
},
{
0xF00FF00FF00FF00F
,
0x00F000F000F000F0
,
0x0F000F000F000F00
},
{
0xFF0000FFFF0000FF
,
0x0000FF000000FF00
,
0x00FF000000FF0000
},
{
0xFFFF00000000FFFF
,
0x00000000FFFF0000
,
0x0000FFFF00000000
}
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
},
{
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
},
{
ABC_CONST
(
0xF00FF00FF00FF00F
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0F000F000F000F00
)
},
{
ABC_CONST
(
0xFF0000FFFF0000FF
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00FF000000FF0000
)
},
{
ABC_CONST
(
0xFFFF00000000FFFF
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0x0000FFFF00000000
)
}
};
// elementary truth tables
static
word
Truth6
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
static
word
Truth7
[
7
][
2
]
=
{
{
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
},
{
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
},
{
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
},
{
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
},
{
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
},
{
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
},
{
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
}
{
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
),
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
},
{
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
),
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
},
{
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
),
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
},
{
ABC_CONST
(
0xFF00FF00FF00FF00
),
ABC_CONST
(
0xFF00FF00FF00FF00
)
},
{
ABC_CONST
(
0xFFFF0000FFFF0000
),
ABC_CONST
(
0xFFFF0000FFFF0000
)
},
{
ABC_CONST
(
0xFFFFFFFF00000000
),
ABC_CONST
(
0xFFFFFFFF00000000
)
},
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0xFFFFFFFFFFFFFFFF
)
}
};
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] )
static
inline
int
If_Dec6CountOnes
(
word
t
)
{
t
=
(
t
&
0x5555555555555555
)
+
((
t
>>
1
)
&
0x5555555555555555
);
t
=
(
t
&
0x3333333333333333
)
+
((
t
>>
2
)
&
0x3333333333333333
);
t
=
(
t
&
0x0F0F0F0F0F0F0F0F
)
+
((
t
>>
4
)
&
0x0F0F0F0F0F0F0F0F
);
t
=
(
t
&
0x00FF00FF00FF00FF
)
+
((
t
>>
8
)
&
0x00FF00FF00FF00FF
);
t
=
(
t
&
0x0000FFFF0000FFFF
)
+
((
t
>>
16
)
&
0x0000FFFF0000FFFF
);
return
(
t
&
0x00000000FFFFFFFF
)
+
(
t
>>
32
);
t
=
(
t
&
ABC_CONST
(
0x5555555555555555
))
+
((
t
>>
1
)
&
ABC_CONST
(
0x5555555555555555
)
);
t
=
(
t
&
ABC_CONST
(
0x3333333333333333
))
+
((
t
>>
2
)
&
ABC_CONST
(
0x3333333333333333
)
);
t
=
(
t
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
))
+
((
t
>>
4
)
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
);
t
=
(
t
&
ABC_CONST
(
0x00FF00FF00FF00FF
))
+
((
t
>>
8
)
&
ABC_CONST
(
0x00FF00FF00FF00FF
)
);
t
=
(
t
&
ABC_CONST
(
0x0000FFFF0000FFFF
))
+
((
t
>>
16
)
&
ABC_CONST
(
0x0000FFFF0000FFFF
)
);
return
(
t
&
ABC_CONST
(
0x00000000FFFFFFFF
)
)
+
(
t
>>
32
);
}
static
inline
int
If_Dec6HasVar
(
word
t
,
int
v
)
{
...
...
src/map/if/ifDec08.c
View file @
7e598cd2
...
...
@@ -42,32 +42,32 @@ static int BitCount8[256] = {
};
// variable swapping code
static
word
PMasks
[
5
][
3
]
=
{
{
0x9999999999999999
,
0x2222222222222222
,
0x4444444444444444
},
{
0xC3C3C3C3C3C3C3C3
,
0x0C0C0C0C0C0C0C0C
,
0x3030303030303030
},
{
0xF00FF00FF00FF00F
,
0x00F000F000F000F0
,
0x0F000F000F000F00
},
{
0xFF0000FFFF0000FF
,
0x0000FF000000FF00
,
0x00FF000000FF0000
},
{
0xFFFF00000000FFFF
,
0x00000000FFFF0000
,
0x0000FFFF00000000
}
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
},
{
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
},
{
ABC_CONST
(
0xF00FF00FF00FF00F
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0F000F000F000F00
)
},
{
ABC_CONST
(
0xFF0000FFFF0000FF
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00FF000000FF0000
)
},
{
ABC_CONST
(
0xFFFF00000000FFFF
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0x0000FFFF00000000
)
}
};
// elementary truth tables
static
word
Truth6
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
static
word
Truth10
[
10
][
16
]
=
{
{
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
},
{
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
},
{
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
},
{
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
},
{
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
},
{
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
},
{
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
},
{
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
},
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
},
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
}
{
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
)
},
{
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
)
},
{
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
)
},
{
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
)
},
{
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
)
},
{
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
)
},
{
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
)
},
{
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
)
},
{
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
)
},
{
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
);
...
...
@@ -232,8 +232,8 @@ static inline void If_Dec08SwapAdjacent( word * pOut, word * pIn, int iVar, int
{
for
(
i
=
0
;
i
<
nWords
;
i
+=
2
)
{
pOut
[
i
]
=
(
pIn
[
i
]
&
0x00000000FFFFFFFF
)
|
((
pIn
[
i
+
1
]
&
0x00000000FFFFFFFF
)
<<
32
);
pOut
[
i
+
1
]
=
(
pIn
[
i
+
1
]
&
0xFFFFFFFF00000000
)
|
((
pIn
[
i
]
&
0xFFFFFFFF00000000
)
>>
32
);
pOut
[
i
]
=
(
pIn
[
i
]
&
ABC_CONST
(
0x00000000FFFFFFFF
))
|
((
pIn
[
i
+
1
]
&
ABC_CONST
(
0x00000000FFFFFFFF
)
)
<<
32
);
pOut
[
i
+
1
]
=
(
pIn
[
i
+
1
]
&
ABC_CONST
(
0xFFFFFFFF00000000
))
|
((
pIn
[
i
]
&
ABC_CONST
(
0xFFFFFFFF00000000
)
)
>>
32
);
}
}
}
...
...
src/map/if/ifDec10.c
View file @
7e598cd2
...
...
@@ -42,32 +42,32 @@ static int BitCount8[256] = {
};
// variable swapping code
static
word
PMasks
[
5
][
3
]
=
{
{
0x9999999999999999
,
0x2222222222222222
,
0x4444444444444444
},
{
0xC3C3C3C3C3C3C3C3
,
0x0C0C0C0C0C0C0C0C
,
0x3030303030303030
},
{
0xF00FF00FF00FF00F
,
0x00F000F000F000F0
,
0x0F000F000F000F00
},
{
0xFF0000FFFF0000FF
,
0x0000FF000000FF00
,
0x00FF000000FF0000
},
{
0xFFFF00000000FFFF
,
0x00000000FFFF0000
,
0x0000FFFF00000000
}
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
},
{
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
},
{
ABC_CONST
(
0xF00FF00FF00FF00F
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0F000F000F000F00
)
},
{
ABC_CONST
(
0xFF0000FFFF0000FF
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00FF000000FF0000
)
},
{
ABC_CONST
(
0xFFFF00000000FFFF
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0x0000FFFF00000000
)
}
};
// elementary truth tables
static
word
Truth6
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
static
word
Truth10
[
10
][
16
]
=
{
{
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
,
0xAAAAAAAAAAAAAAAA
},
{
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
,
0xCCCCCCCCCCCCCCCC
},
{
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
},
{
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
,
0xFF00FF00FF00FF00
},
{
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
,
0xFFFF0000FFFF0000
},
{
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
,
0xFFFFFFFF00000000
},
{
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
},
{
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
},
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
},
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
}
{
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
)
},
{
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
)
},
{
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
)
},
{
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
)
},
{
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
)
},
{
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
)
},
{
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
)
},
{
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
)
},
{
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
)
},
{
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
{
for
(
i
=
0
;
i
<
nWords
;
i
+=
2
)
{
pOut
[
i
]
=
(
pIn
[
i
]
&
0x00000000FFFFFFFF
)
|
((
pIn
[
i
+
1
]
&
0x00000000FFFFFFFF
)
<<
32
);
pOut
[
i
+
1
]
=
(
pIn
[
i
+
1
]
&
0xFFFFFFFF00000000
)
|
((
pIn
[
i
]
&
0xFFFFFFFF00000000
)
>>
32
);
pOut
[
i
]
=
(
pIn
[
i
]
&
ABC_CONST
(
0x00000000FFFFFFFF
))
|
((
pIn
[
i
+
1
]
&
ABC_CONST
(
0x00000000FFFFFFFF
)
)
<<
32
);
pOut
[
i
+
1
]
=
(
pIn
[
i
+
1
]
&
ABC_CONST
(
0xFFFFFFFF00000000
))
|
((
pIn
[
i
]
&
ABC_CONST
(
0xFFFFFFFF00000000
)
)
>>
32
);
}
}
}
...
...
src/map/if/ifDec16.c
View file @
7e598cd2
...
...
@@ -55,20 +55,20 @@ struct If_Hte_t_
// variable swapping code
static
word
PMasks
[
5
][
3
]
=
{
{
0x9999999999999999
,
0x2222222222222222
,
0x4444444444444444
},
{
0xC3C3C3C3C3C3C3C3
,
0x0C0C0C0C0C0C0C0C
,
0x3030303030303030
},
{
0xF00FF00FF00FF00F
,
0x00F000F000F000F0
,
0x0F000F000F000F00
},
{
0xFF0000FFFF0000FF
,
0x0000FF000000FF00
,
0x00FF000000FF0000
},
{
0xFFFF00000000FFFF
,
0x00000000FFFF0000
,
0x0000FFFF00000000
}
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
},
{
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
},
{
ABC_CONST
(
0xF00FF00FF00FF00F
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0F000F000F000F00
)
},
{
ABC_CONST
(
0xFF0000FFFF0000FF
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00FF000000FF0000
)
},
{
ABC_CONST
(
0xFFFF00000000FFFF
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0x0000FFFF00000000
)
}
};
// elementary truth tables
static
word
Truth6
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
static
word
TruthAll
[
CLU_VAR_MAX
][
CLU_WRD_MAX
]
=
{{
0
}};
...
...
@@ -131,12 +131,12 @@ static inline int If_CluWordNum( int nVars )
}
static
inline
int
If_CluCountOnes
(
word
t
)
{
t
=
(
t
&
0x5555555555555555
)
+
((
t
>>
1
)
&
0x5555555555555555
);
t
=
(
t
&
0x3333333333333333
)
+
((
t
>>
2
)
&
0x3333333333333333
);
t
=
(
t
&
0x0F0F0F0F0F0F0F0F
)
+
((
t
>>
4
)
&
0x0F0F0F0F0F0F0F0F
);
t
=
(
t
&
0x00FF00FF00FF00FF
)
+
((
t
>>
8
)
&
0x00FF00FF00FF00FF
);
t
=
(
t
&
0x0000FFFF0000FFFF
)
+
((
t
>>
16
)
&
0x0000FFFF0000FFFF
);
return
(
t
&
0x00000000FFFFFFFF
)
+
(
t
>>
32
);
t
=
(
t
&
ABC_CONST
(
0x5555555555555555
))
+
((
t
>>
1
)
&
ABC_CONST
(
0x5555555555555555
)
);
t
=
(
t
&
ABC_CONST
(
0x3333333333333333
))
+
((
t
>>
2
)
&
ABC_CONST
(
0x3333333333333333
)
);
t
=
(
t
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
))
+
((
t
>>
4
)
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
);
t
=
(
t
&
ABC_CONST
(
0x00FF00FF00FF00FF
))
+
((
t
>>
8
)
&
ABC_CONST
(
0x00FF00FF00FF00FF
)
);
t
=
(
t
&
ABC_CONST
(
0x0000FFFF0000FFFF
))
+
((
t
>>
16
)
&
ABC_CONST
(
0x0000FFFF0000FFFF
)
);
return
(
t
&
ABC_CONST
(
0x00000000FFFFFFFF
)
)
+
(
t
>>
32
);
}
void
If_CluHashTableCheck
(
If_Man_t
*
p
)
...
...
@@ -428,8 +428,8 @@ static inline void If_CluSwapAdjacent( word * pOut, word * pIn, int iVar, int nV
{
for
(
i
=
0
;
i
<
nWords
;
i
+=
2
)
{
pOut
[
i
]
=
(
pIn
[
i
]
&
0x00000000FFFFFFFF
)
|
((
pIn
[
i
+
1
]
&
0x00000000FFFFFFFF
)
<<
32
);
pOut
[
i
+
1
]
=
(
pIn
[
i
+
1
]
&
0xFFFFFFFF00000000
)
|
((
pIn
[
i
]
&
0xFFFFFFFF00000000
)
>>
32
);
pOut
[
i
]
=
(
pIn
[
i
]
&
ABC_CONST
(
0x00000000FFFFFFFF
))
|
((
pIn
[
i
+
1
]
&
ABC_CONST
(
0x00000000FFFFFFFF
)
)
<<
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
int
shift
,
step
,
iStep
,
jStep
;
int
w
=
0
,
i
=
0
,
j
=
0
;
static
word
PPMasks
[
6
][
6
]
=
{
{
0x2222222222222222
,
0x0A0A0A0A0A0A0A0A
,
0x00AA00AA00AA00AA
,
0x0000AAAA0000AAAA
,
0x00000000AAAAAAAA
,
0xAAAAAAAAAAAAAAAA
},
{
0x0000000000000000
,
0x0C0C0C0C0C0C0C0C
,
0x00CC00CC00CC00CC
,
0x0000CCCC0000CCCC
,
0x00000000CCCCCCCC
,
0xCCCCCCCCCCCCCCCC
},
{
0x0000000000000000
,
0x0000000000000000
,
0x00F000F000F000F0
,
0x0000F0F00000F0F0
,
0x00000000F0F0F0F0
,
0xF0F0F0F0F0F0F0F0
},
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000FF000000FF00
,
0x00000000FF00FF00
,
0xFF00FF00FF00FF00
},
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x00000000FFFF0000
,
0xFFFF0000FFFF0000
},
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFF00000000
}
{
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x0A0A0A0A0A0A0A0A
),
ABC_CONST
(
0x00AA00AA00AA00AA
),
ABC_CONST
(
0x0000AAAA0000AAAA
),
ABC_CONST
(
0x00000000AAAAAAAA
),
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
},
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x00CC00CC00CC00CC
),
ABC_CONST
(
0x0000CCCC0000CCCC
),
ABC_CONST
(
0x00000000CCCCCCCC
),
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
},
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0000F0F00000F0F0
),
ABC_CONST
(
0x00000000F0F0F0F0
),
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
},
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00000000FF00FF00
),
ABC_CONST
(
0xFF00FF00FF00FF00
)
},
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0xFFFF0000FFFF0000
)
},
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0xFFFFFFFF00000000
)
}
};
if
(
iVar
==
jVar
)
return
;
...
...
@@ -2113,7 +2113,7 @@ void If_CluTest()
// word t = 0x0080008880A088FF;
// word s = t;
// word t = 0xFFBBBBFFF0B0B0F0;
word
t
=
0x6DD9926D962D6996
;
word
t
=
ABC_CONST
(
0x6DD9926D962D6996
)
;
int
nVars
=
6
;
int
nLutLeaf
=
4
;
int
nLutLeaf2
=
4
;
...
...
src/map/if/ifTime.c
View file @
7e598cd2
...
...
@@ -57,14 +57,14 @@ word If_AndVerifyArray( Vec_Wrd_t * vAnds, int nVars )
word
Entry
,
Truth0
,
Truth1
,
TruthR
=
0
;
int
i
;
static
word
Truth
[
8
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
,
ABC_CONST
(
0x0000000000000000
)
,
ABC_CONST
(
0xFFFFFFFFFFFFFFFF
)
};
if
(
Vec_WrdSize
(
vAnds
)
==
0
)
return
Truth
[
6
];
...
...
src/map/mio/exp.h
View file @
7e598cd2
...
...
@@ -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
word
Truth6
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
word
*
puNodes
,
Res
;
int
i
;
...
...
src/map/mio/mioRead.c
View file @
7e598cd2
...
...
@@ -605,8 +605,8 @@ void Mio_LibraryDetectSpecialGates( Mio_Library_t * pLib )
Mio_LibrarySortGates
(
pLib
);
uFuncBuf
=
0xAAAAAAAAAAAAAAAA
;
uFuncAnd2
=
0xAAAAAAAAAAAAAAAA
&
0xCCCCCCCCCCCCCCCC
;
uFuncBuf
=
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
;
uFuncAnd2
=
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
&
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
;
uFuncInv
=
~
uFuncBuf
;
uFuncNand2
=
~
uFuncAnd2
;
...
...
src/map/mio/mioUtils.c
View file @
7e598cd2
...
...
@@ -315,9 +315,9 @@ Mio_Gate_t ** Mio_CollectRoots( Mio_Library_t * pLib, int nInputs, float tDelay,
continue
;
if
(
pGate
->
uTruth
==
0
||
pGate
->
uTruth
==
~
0
)
continue
;
if
(
pGate
->
uTruth
==
0xAAAAAAAAAAAAAAAA
)
if
(
pGate
->
uTruth
==
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
)
continue
;
if
(
pGate
->
uTruth
==
~
0xAAAAAAAAAAAAAAAA
&&
fSkipInv
)
if
(
pGate
->
uTruth
==
~
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
&&
fSkipInv
)
continue
;
if
(
pGate
->
pTwin
)
// skip multi-output gates for now
continue
;
...
...
src/misc/extra/extraUtilMisc.c
View file @
7e598cd2
...
...
@@ -2260,11 +2260,11 @@ static inline word Extra_Truth6SwapAdjacent( word t, int v )
{
// variable swapping code
static
word
PMasks
[
5
][
3
]
=
{
{
0x9999999999999999
,
0x2222222222222222
,
0x4444444444444444
},
{
0xC3C3C3C3C3C3C3C3
,
0x0C0C0C0C0C0C0C0C
,
0x3030303030303030
},
{
0xF00FF00FF00FF00F
,
0x00F000F000F000F0
,
0x0F000F000F000F00
},
{
0xFF0000FFFF0000FF
,
0x0000FF000000FF00
,
0x00FF000000FF0000
},
{
0xFFFF00000000FFFF
,
0x00000000FFFF0000
,
0x0000FFFF00000000
}
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
},
{
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
},
{
ABC_CONST
(
0xF00FF00FF00FF00F
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0F000F000F000F00
)
},
{
ABC_CONST
(
0xFF0000FFFF0000FF
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00FF000000FF0000
)
},
{
ABC_CONST
(
0xFFFF00000000FFFF
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0x0000FFFF00000000
)
}
};
assert
(
v
<
5
);
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 )
{
// elementary truth tables
static
word
Truth6
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
assert
(
v
<
6
);
return
((
t
&
~
Truth6
[
v
])
<<
(
1
<<
v
))
|
((
t
&
Truth6
[
v
])
>>
(
1
<<
v
));
...
...
@@ -2323,12 +2323,12 @@ word Extra_Truth6MinimumExact( word t, int * pComp, int * pPerm )
***********************************************************************/
static
inline
int
Extra_Truth6Ones
(
word
t
)
{
t
=
(
t
&
0x5555555555555555
)
+
((
t
>>
1
)
&
0x5555555555555555
);
t
=
(
t
&
0x3333333333333333
)
+
((
t
>>
2
)
&
0x3333333333333333
);
t
=
(
t
&
0x0F0F0F0F0F0F0F0F
)
+
((
t
>>
4
)
&
0x0F0F0F0F0F0F0F0F
);
t
=
(
t
&
0x00FF00FF00FF00FF
)
+
((
t
>>
8
)
&
0x00FF00FF00FF00FF
);
t
=
(
t
&
0x0000FFFF0000FFFF
)
+
((
t
>>
16
)
&
0x0000FFFF0000FFFF
);
return
(
t
&
0x00000000FFFFFFFF
)
+
(
t
>>
32
);
t
=
(
t
&
ABC_CONST
(
0x5555555555555555
))
+
((
t
>>
1
)
&
ABC_CONST
(
0x5555555555555555
)
);
t
=
(
t
&
ABC_CONST
(
0x3333333333333333
))
+
((
t
>>
2
)
&
ABC_CONST
(
0x3333333333333333
)
);
t
=
(
t
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
))
+
((
t
>>
4
)
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
);
t
=
(
t
&
ABC_CONST
(
0x00FF00FF00FF00FF
))
+
((
t
>>
8
)
&
ABC_CONST
(
0x00FF00FF00FF00FF
)
);
t
=
(
t
&
ABC_CONST
(
0x0000FFFF0000FFFF
))
+
((
t
>>
16
)
&
ABC_CONST
(
0x0000FFFF0000FFFF
)
);
return
(
t
&
ABC_CONST
(
0x00000000FFFFFFFF
)
)
+
(
t
>>
32
);
}
static
inline
word
Extra_Truth6MinimumRoundOne
(
word
t
,
int
v
)
{
...
...
@@ -2385,7 +2385,7 @@ word Extra_Truth6MinimumHeuristic( word t )
}
void
Extra_Truth6MinimumHeuristicTest
()
{
word
t
=
0x5555555555555555
&
~
(
0x3333333333333333
&
0x0F0F0F0F0F0F0F0F
);
word
t
=
ABC_CONST
(
0x5555555555555555
)
&
~
(
ABC_CONST
(
0x3333333333333333
)
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
);
Extra_Truth6MinimumRoundMany
(
t
);
t
=
0
;
}
...
...
@@ -2465,7 +2465,7 @@ void Extra_NpnTest1()
void
Extra_NpnTest2
()
{
int
*
pComp
,
*
pPerm
;
word
tMin
,
t
=
0xa2222aaa08888000
;
word
tMin
,
t
=
ABC_CONST
(
0xa2222aaa08888000
)
;
pComp
=
Extra_GreyCodeSchedule
(
6
);
pPerm
=
Extra_PermSchedule
(
6
);
tMin
=
Extra_Truth6MinimumExact
(
t
,
pComp
,
pPerm
);
...
...
src/misc/util/abc_global.h
View file @
7e598cd2
...
...
@@ -197,6 +197,12 @@ typedef unsigned __int64 ABC_UINT64_T;
#error unknown 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_INT64_T
iword
;
...
...
src/misc/util/utilTruth.h
View file @
7e598cd2
...
...
@@ -36,29 +36,29 @@ ABC_NAMESPACE_HEADER_START
////////////////////////////////////////////////////////////////////////
static
word
s_Truths6
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
static
word
s_Truths6Neg
[
6
]
=
{
0x5555555555555555
,
0x3333333333333333
,
0x0F0F0F0F0F0F0F0F
,
0x00FF00FF00FF00FF
,
0x0000FFFF0000FFFF
,
0x00000000FFFFFFFF
ABC_CONST
(
0x5555555555555555
)
,
ABC_CONST
(
0x3333333333333333
)
,
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
,
ABC_CONST
(
0x00FF00FF00FF00FF
)
,
ABC_CONST
(
0x0000FFFF0000FFFF
)
,
ABC_CONST
(
0x00000000FFFFFFFF
)
};
static
word
s_PMasks
[
5
][
3
]
=
{
{
0x9999999999999999
,
0x2222222222222222
,
0x4444444444444444
},
{
0xC3C3C3C3C3C3C3C3
,
0x0C0C0C0C0C0C0C0C
,
0x3030303030303030
},
{
0xF00FF00FF00FF00F
,
0x00F000F000F000F0
,
0x0F000F000F000F00
},
{
0xFF0000FFFF0000FF
,
0x0000FF000000FF00
,
0x00FF000000FF0000
},
{
0xFFFF00000000FFFF
,
0x00000000FFFF0000
,
0x0000FFFF00000000
}
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
},
{
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
},
{
ABC_CONST
(
0xF00FF00FF00FF00F
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0F000F000F000F00
)
},
{
ABC_CONST
(
0xFF0000FFFF0000FF
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00FF000000FF0000
)
},
{
ABC_CONST
(
0xFFFF00000000FFFF
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0x0000FFFF00000000
)
}
};
////////////////////////////////////////////////////////////////////////
...
...
@@ -914,11 +914,11 @@ static inline word Abc_Tt6SwapAdjacent( word Truth, int iVar )
static
inline
void
Abc_TtSwapAdjacent
(
word
*
pTruth
,
int
nWords
,
int
iVar
)
{
static
word
s_PMasks
[
5
][
3
]
=
{
{
0x9999999999999999
,
0x2222222222222222
,
0x4444444444444444
},
{
0xC3C3C3C3C3C3C3C3
,
0x0C0C0C0C0C0C0C0C
,
0x3030303030303030
},
{
0xF00FF00FF00FF00F
,
0x00F000F000F000F0
,
0x0F000F000F000F00
},
{
0xFF0000FFFF0000FF
,
0x0000FF000000FF00
,
0x00FF000000FF0000
},
{
0xFFFF00000000FFFF
,
0x00000000FFFF0000
,
0x0000FFFF00000000
}
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
},
{
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
},
{
ABC_CONST
(
0xF00FF00FF00FF00F
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0F000F000F000F00
)
},
{
ABC_CONST
(
0xFF0000FFFF0000FF
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00FF000000FF0000
)
},
{
ABC_CONST
(
0xFFFF00000000FFFF
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0x0000FFFF00000000
)
}
};
if
(
iVar
<
5
)
{
...
...
@@ -946,44 +946,44 @@ static inline void Abc_TtSwapVars( word * pTruth, int nVars, int iVar, int jVar
{
static
word
Ps_PMasks
[
5
][
6
][
3
]
=
{
{
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 0 0
{
0x9999999999999999
,
0x2222222222222222
,
0x4444444444444444
},
// 0 1
{
0xA5A5A5A5A5A5A5A5
,
0x0A0A0A0A0A0A0A0A
,
0x5050505050505050
},
// 0 2
{
0xAA55AA55AA55AA55
,
0x00AA00AA00AA00AA
,
0x5500550055005500
},
// 0 3
{
0xAAAA5555AAAA5555
,
0x0000AAAA0000AAAA
,
0x5555000055550000
},
// 0 4
{
0xAAAAAAAA55555555
,
0x00000000AAAAAAAA
,
0x5555555500000000
}
// 0 5
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 0 0
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
},
// 0 1
{
ABC_CONST
(
0xA5A5A5A5A5A5A5A5
),
ABC_CONST
(
0x0A0A0A0A0A0A0A0A
),
ABC_CONST
(
0x5050505050505050
)
},
// 0 2
{
ABC_CONST
(
0xAA55AA55AA55AA55
),
ABC_CONST
(
0x00AA00AA00AA00AA
),
ABC_CONST
(
0x5500550055005500
)
},
// 0 3
{
ABC_CONST
(
0xAAAA5555AAAA5555
),
ABC_CONST
(
0x0000AAAA0000AAAA
),
ABC_CONST
(
0x5555000055550000
)
},
// 0 4
{
ABC_CONST
(
0xAAAAAAAA55555555
),
ABC_CONST
(
0x00000000AAAAAAAA
),
ABC_CONST
(
0x5555555500000000
)
}
// 0 5
},
{
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 1 0
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 1 1
{
0xC3C3C3C3C3C3C3C3
,
0x0C0C0C0C0C0C0C0C
,
0x3030303030303030
},
// 1 2
{
0xCC33CC33CC33CC33
,
0x00CC00CC00CC00CC
,
0x3300330033003300
},
// 1 3
{
0xCCCC3333CCCC3333
,
0x0000CCCC0000CCCC
,
0x3333000033330000
},
// 1 4
{
0xCCCCCCCC33333333
,
0x00000000CCCCCCCC
,
0x3333333300000000
}
// 1 5
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 1 0
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 1 1
{
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
},
// 1 2
{
ABC_CONST
(
0xCC33CC33CC33CC33
),
ABC_CONST
(
0x00CC00CC00CC00CC
),
ABC_CONST
(
0x3300330033003300
)
},
// 1 3
{
ABC_CONST
(
0xCCCC3333CCCC3333
),
ABC_CONST
(
0x0000CCCC0000CCCC
),
ABC_CONST
(
0x3333000033330000
)
},
// 1 4
{
ABC_CONST
(
0xCCCCCCCC33333333
),
ABC_CONST
(
0x00000000CCCCCCCC
),
ABC_CONST
(
0x3333333300000000
)
}
// 1 5
},
{
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 2 0
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 2 1
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 2 2
{
0xF00FF00FF00FF00F
,
0x00F000F000F000F0
,
0x0F000F000F000F00
},
// 2 3
{
0xF0F00F0FF0F00F0F
,
0x0000F0F00000F0F0
,
0x0F0F00000F0F0000
},
// 2 4
{
0xF0F0F0F00F0F0F0F
,
0x00000000F0F0F0F0
,
0x0F0F0F0F00000000
}
// 2 5
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 2 0
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 2 1
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 2 2
{
ABC_CONST
(
0xF00FF00FF00FF00F
),
ABC_CONST
(
0x00F000F000F000F0
),
ABC_CONST
(
0x0F000F000F000F00
)
},
// 2 3
{
ABC_CONST
(
0xF0F00F0FF0F00F0F
),
ABC_CONST
(
0x0000F0F00000F0F0
),
ABC_CONST
(
0x0F0F00000F0F0000
)
},
// 2 4
{
ABC_CONST
(
0xF0F0F0F00F0F0F0F
),
ABC_CONST
(
0x00000000F0F0F0F0
),
ABC_CONST
(
0x0F0F0F0F00000000
)
}
// 2 5
},
{
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 3 0
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 3 1
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 3 2
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 3 3
{
0xFF0000FFFF0000FF
,
0x0000FF000000FF00
,
0x00FF000000FF0000
},
// 3 4
{
0xFF00FF0000FF00FF
,
0x00000000FF00FF00
,
0x00FF00FF00000000
}
// 3 5
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 3 0
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 3 1
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 3 2
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 3 3
{
ABC_CONST
(
0xFF0000FFFF0000FF
),
ABC_CONST
(
0x0000FF000000FF00
),
ABC_CONST
(
0x00FF000000FF0000
)
},
// 3 4
{
ABC_CONST
(
0xFF00FF0000FF00FF
),
ABC_CONST
(
0x00000000FF00FF00
),
ABC_CONST
(
0x00FF00FF00000000
)
}
// 3 5
},
{
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 4 0
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 4 1
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 4 2
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 4 3
{
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
},
// 4 4
{
0xFFFF00000000FFFF
,
0x00000000FFFF0000
,
0x0000FFFF00000000
}
// 4 5
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 4 0
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 4 1
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 4 2
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 4 3
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x0000000000000000
)
},
// 4 4
{
ABC_CONST
(
0xFFFF00000000FFFF
),
ABC_CONST
(
0x00000000FFFF0000
),
ABC_CONST
(
0x0000FFFF00000000
)
}
// 4 5
}
};
if
(
iVar
==
jVar
)
...
...
@@ -1080,18 +1080,18 @@ static inline void Abc_TtImplementNpnConfig( word * pTruth, int nVars, char * pC
***********************************************************************/
static
inline
int
Abc_TtCountOnesSlow
(
word
t
)
{
t
=
(
t
&
0x5555555555555555
)
+
((
t
>>
1
)
&
0x5555555555555555
);
t
=
(
t
&
0x3333333333333333
)
+
((
t
>>
2
)
&
0x3333333333333333
);
t
=
(
t
&
0x0F0F0F0F0F0F0F0F
)
+
((
t
>>
4
)
&
0x0F0F0F0F0F0F0F0F
);
t
=
(
t
&
0x00FF00FF00FF00FF
)
+
((
t
>>
8
)
&
0x00FF00FF00FF00FF
);
t
=
(
t
&
0x0000FFFF0000FFFF
)
+
((
t
>>
16
)
&
0x0000FFFF0000FFFF
);
return
(
t
&
0x00000000FFFFFFFF
)
+
(
t
>>
32
);
t
=
(
t
&
ABC_CONST
(
0x5555555555555555
))
+
((
t
>>
1
)
&
ABC_CONST
(
0x5555555555555555
)
);
t
=
(
t
&
ABC_CONST
(
0x3333333333333333
))
+
((
t
>>
2
)
&
ABC_CONST
(
0x3333333333333333
)
);
t
=
(
t
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
))
+
((
t
>>
4
)
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
);
t
=
(
t
&
ABC_CONST
(
0x00FF00FF00FF00FF
))
+
((
t
>>
8
)
&
ABC_CONST
(
0x00FF00FF00FF00FF
)
);
t
=
(
t
&
ABC_CONST
(
0x0000FFFF0000FFFF
))
+
((
t
>>
16
)
&
ABC_CONST
(
0x0000FFFF0000FFFF
)
);
return
(
t
&
ABC_CONST
(
0x00000000FFFFFFFF
)
)
+
(
t
>>
32
);
}
static
inline
int
Abc_TtCountOnes
(
word
x
)
{
x
=
x
-
((
x
>>
1
)
&
0x5555555555555555
);
x
=
(
x
&
0x3333333333333333
)
+
((
x
>>
2
)
&
0x3333333333333333
);
x
=
(
x
+
(
x
>>
4
))
&
0x0F0F0F0F0F0F0F0F
;
x
=
x
-
((
x
>>
1
)
&
ABC_CONST
(
0x5555555555555555
)
);
x
=
(
x
&
ABC_CONST
(
0x3333333333333333
))
+
((
x
>>
2
)
&
ABC_CONST
(
0x3333333333333333
)
);
x
=
(
x
+
(
x
>>
4
))
&
ABC_CONST
(
0x0F0F0F0F0F0F0F0F
)
;
x
=
x
+
(
x
>>
8
);
x
=
x
+
(
x
>>
16
);
x
=
x
+
(
x
>>
32
);
...
...
src/opt/dau/dauCanon.c
View file @
7e598cd2
...
...
@@ -28,11 +28,11 @@ ABC_NAMESPACE_IMPL_START
////////////////////////////////////////////////////////////////////////
static
word
s_CMasks6
[
5
]
=
{
0x1111111111111111
,
0x0303030303030303
,
0x000F000F000F000F
,
0x000000FF000000FF
,
0x000000000000FFFF
ABC_CONST
(
0x1111111111111111
)
,
ABC_CONST
(
0x0303030303030303
)
,
ABC_CONST
(
0x000F000F000F000F
)
,
ABC_CONST
(
0x000000FF000000FF
)
,
ABC_CONST
(
0x000000000000FFFF
)
};
////////////////////////////////////////////////////////////////////////
...
...
src/opt/dau/dauDsd.c
View file @
7e598cd2
...
...
@@ -868,7 +868,7 @@ void Dau_DsdTest3()
// 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 = 0x05050500f5f5f5f3;
word
t
=
0x9ef7a8d9c7193a0f
;
word
t
=
ABC_CONST
(
0x9ef7a8d9c7193a0f
)
;
char
*
p
=
Dau_DsdPerform
(
t
);
word
t2
=
Dau_Dsd6ToTruth
(
p
);
if
(
t
!=
t2
)
...
...
src/sat/bsat/satTruth.c
View file @
7e598cd2
...
...
@@ -199,12 +199,12 @@ Tru_Man_t * Tru_ManAlloc( int nVars )
{
word
Masks
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
Tru_Man_t
*
p
;
int
i
,
w
;
...
...
src/sat/cnf/cnfFast.c
View file @
7e598cd2
...
...
@@ -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
)
{
static
word
Truth6
[
6
]
=
{
0xAAAAAAAAAAAAAAAA
,
0xCCCCCCCCCCCCCCCC
,
0xF0F0F0F0F0F0F0F0
,
0xFF00FF00FF00FF00
,
0xFFFF0000FFFF0000
,
0xFFFFFFFF00000000
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
,
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
)
,
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
)
,
ABC_CONST
(
0xFF00FF00FF00FF00
)
,
ABC_CONST
(
0xFFFF0000FFFF0000
)
,
ABC_CONST
(
0xFFFFFFFF00000000
)
};
static
word
C
[
2
]
=
{
0
,
~
(
word
)
0
};
static
word
S
[
256
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment