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
21d7938a
Commit
21d7938a
authored
Jul 18, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temprary changes.
parent
db402147
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
1 deletions
+50
-1
src/map/mpm/mpmPre.c
+50
-1
No files found.
src/map/mpm/mpmPre.c
View file @
21d7938a
...
...
@@ -27,6 +27,7 @@
#include "misc/vec/vecHsh.h"
#include "misc/extra/extra.h"
#include "bool/kit/kit.h"
#include "misc/util/utilTruth.h"
ABC_NAMESPACE_IMPL_START
...
...
@@ -866,6 +867,7 @@ Vec_Wrd_t * Extra_Truth6AllConfigs( word t, int * pComp, int * pPerm, int nVars
return
vTruths
;
}
/**Function*************************************************************
Synopsis []
...
...
@@ -877,9 +879,56 @@ Vec_Wrd_t * Extra_Truth6AllConfigs( word t, int * pComp, int * pPerm, int nVars
SeeAlso []
***********************************************************************/
void
Ifd_ComputeSignature
(
word
uTruth
,
int
pCounts
[
6
]
)
{
int
v
,
Pos
,
Neg
,
Xor
;
for
(
v
=
0
;
v
<
6
;
v
++
)
{
Neg
=
Abc_TtCountOnes
(
Abc_Tt6Cofactor0
(
uTruth
,
v
)
)
/
2
;
Pos
=
Abc_TtCountOnes
(
Abc_Tt6Cofactor1
(
uTruth
,
v
)
)
/
2
;
Xor
=
Abc_TtCountOnes
(
Abc_Tt6Cofactor0
(
uTruth
,
v
)
^
Abc_Tt6Cofactor1
(
uTruth
,
v
)
)
/
2
;
if
(
Pos
<=
Neg
)
pCounts
[
v
]
=
(
Pos
<<
20
)
|
(
Neg
<<
10
)
|
Xor
;
else
pCounts
[
v
]
=
(
Neg
<<
20
)
|
(
Pos
<<
10
)
|
Xor
;
}
Vec_IntSelectSort
(
pCounts
,
6
);
}
int
Ifd_ManDsdTest
()
{
int
nVars
=
6
;
Vec_Wrd_t
*
vTruths
=
Ifd_ManDsdTruths
(
nVars
);
int
i
,
v
,
pCounts
[
6
];
word
uTruth
;
Vec_WrdForEachEntry
(
vTruths
,
uTruth
,
i
)
{
Ifd_ComputeSignature
(
uTruth
,
pCounts
);
// print
printf
(
"%5d : "
,
i
);
for
(
v
=
0
;
v
<
6
;
v
++
)
printf
(
"%2d %2d %2d "
,
(
pCounts
[
v
]
>>
20
)
&
0xFF
,
(
pCounts
[
v
]
>>
10
)
&
0xFF
,
(
pCounts
[
v
]
>>
0
)
&
0xFF
);
printf
(
" "
);
Kit_DsdPrintFromTruth
(
(
unsigned
*
)
&
uTruth
,
nVars
);
printf
(
"
\n
"
);
}
Vec_WrdFree
(
vTruths
);
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Ifd_ManDsdTest33
()
{
int
nVars
=
6
;
FILE
*
pFile
;
char
pFileName
[
32
];
Vec_Wrd_t
*
vTruths
=
Ifd_ManDsdTruths
(
nVars
);
...
...
@@ -943,7 +992,7 @@ int Ifd_ManDsdTest()
return
1
;
}
int
Ifd_ManDsdTest
33
()
int
Ifd_ManDsdTest
55
()
{
abctime
clk
=
Abc_Clock
();
FILE
*
pFile
;
...
...
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