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
79c62d22
Commit
79c62d22
authored
May 21, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simple version of ECO.
parent
81607212
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
src/base/abci/abc.c
+2
-2
src/misc/extra/extraUtilSupp.c
+19
-4
No files found.
src/base/abci/abc.c
View file @
79c62d22
...
...
@@ -10479,8 +10479,8 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
fNewAlgo
)
{
extern
void
Abc_SuppTest
(
int
nOnes
,
int
nVars
,
int
fVerbose
);
Abc_SuppTest
(
nNumOnes
,
nDecMax
,
fVerbose
);
extern
void
Abc_SuppTest
(
int
nOnes
,
int
nVars
,
int
f
UseSimple
,
int
f
Verbose
);
Abc_SuppTest
(
nNumOnes
,
nDecMax
,
f
NewOrder
,
f
Verbose
);
}
else
{
src/misc/extra/extraUtilSupp.c
View file @
79c62d22
...
...
@@ -92,6 +92,21 @@ Vec_Int_t * Abc_SuppGenPairs( Vec_Int_t * p, int nBits )
ABC_FREE
(
pMap
);
return
vRes
;
}
Vec_Int_t
*
Abc_SuppGenPairs2
(
int
nOnes
,
int
nBits
)
{
Vec_Int_t
*
vRes
=
Vec_IntAlloc
(
1000
);
int
i
,
k
,
Size
=
(
1
<<
nBits
),
Value
;
for
(
i
=
0
;
i
<
Size
;
i
++
)
{
Value
=
Abc_SuppCountOnes
(
i
);
for
(
k
=
1
;
k
<=
nOnes
;
k
++
)
if
(
Value
==
2
*
k
)
break
;
if
(
k
<=
nOnes
)
Vec_IntPush
(
vRes
,
i
);
}
return
vRes
;
}
/**Function*************************************************************
...
...
@@ -196,17 +211,17 @@ int Abc_SuppMinimize( Vec_Int_t * p, int nBits, int fVerbose )
SeeAlso []
***********************************************************************/
void
Abc_SuppTest
(
int
nOnes
,
int
nVars
,
int
fVerbose
)
void
Abc_SuppTest
(
int
nOnes
,
int
nVars
,
int
f
UseSimple
,
int
f
Verbose
)
{
int
nVarsMin
;
abctime
clk
=
Abc_Clock
();
// create the problem
Vec_Int_t
*
vRes
=
Abc_SuppGen
(
nOnes
,
nVars
);
Vec_Int_t
*
vPairs
=
Abc_SuppGenPairs
(
vRes
,
nVars
);
Vec_Int_t
*
vPairs
=
fUseSimple
?
Abc_SuppGenPairs2
(
nOnes
,
nVars
)
:
Abc_SuppGenPairs
(
vRes
,
nVars
);
printf
(
"M = %2d N = %2d : "
,
nOnes
,
nVars
);
printf
(
"K = %6d "
,
Vec_IntSize
(
vRes
)
);
printf
(
"Total = %1
0d "
,
Vec_IntSize
(
vRes
)
*
(
Vec_IntSize
(
vRes
)
-
1
)
/
2
);
printf
(
"Distinct = %8d
"
,
Vec_IntSize
(
vPairs
)
);
printf
(
"Total = %1
2u "
,
(
word
)
Vec_IntSize
(
vRes
)
*
(
word
)(
Vec_IntSize
(
vRes
)
-
1
)
/
2
);
printf
(
"Distinct = %8d "
,
Vec_IntSize
(
vPairs
)
);
Abc_PrintTime
(
1
,
"Reduction time"
,
Abc_Clock
()
-
clk
);
// solve the problem
clk
=
Abc_Clock
();
...
...
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