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
db43d6fb
Commit
db43d6fb
authored
Jun 14, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding switch -P <num> to command 'cover'.
parent
0a1b6f8f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
12 deletions
+26
-12
src/base/abci/abc.c
+20
-6
src/map/cov/cov.h
+2
-2
src/map/cov/covCore.c
+2
-2
src/map/cov/covMan.c
+2
-2
No files found.
src/base/abci/abc.c
View file @
db43d6fb
...
@@ -10952,6 +10952,7 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -10952,6 +10952,7 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv )
int
fUseEsop
;
int
fUseEsop
;
int
fUseInvs
;
int
fUseInvs
;
int
nFaninMax
;
int
nFaninMax
;
int
nCubesMax
;
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
// set defaults
// set defaults
...
@@ -10960,15 +10961,16 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -10960,15 +10961,16 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv )
fVerbose
=
0
;
fVerbose
=
0
;
fUseInvs
=
1
;
fUseInvs
=
1
;
nFaninMax
=
8
;
nFaninMax
=
8
;
nCubesMax
=
8
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
N
sxivh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
IP
sxivh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
case
'
N
'
:
case
'
I
'
:
if
(
globalUtilOptind
>=
argc
)
if
(
globalUtilOptind
>=
argc
)
{
{
Abc_Print
(
-
1
,
"Command line switch
\"
-
N
\"
should be followed by an integer.
\n
"
);
Abc_Print
(
-
1
,
"Command line switch
\"
-
I
\"
should be followed by an integer.
\n
"
);
goto
usage
;
goto
usage
;
}
}
nFaninMax
=
atoi
(
argv
[
globalUtilOptind
]);
nFaninMax
=
atoi
(
argv
[
globalUtilOptind
]);
...
@@ -10976,6 +10978,17 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -10976,6 +10978,17 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
nFaninMax
<
0
)
if
(
nFaninMax
<
0
)
goto
usage
;
goto
usage
;
break
;
break
;
case
'P'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-P
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nCubesMax
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nCubesMax
<
0
)
goto
usage
;
break
;
case
's'
:
case
's'
:
fUseSop
^=
1
;
fUseSop
^=
1
;
break
;
break
;
...
@@ -11007,7 +11020,7 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -11007,7 +11020,7 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
// run the command
// run the command
pNtkRes
=
Abc_NtkSopEsopCover
(
pNtk
,
nFaninMax
,
fUseEsop
,
fUseSop
,
fUseInvs
,
fVerbose
);
pNtkRes
=
Abc_NtkSopEsopCover
(
pNtk
,
nFaninMax
,
nCubesMax
,
fUseEsop
,
fUseSop
,
fUseInvs
,
fVerbose
);
if
(
pNtkRes
==
NULL
)
if
(
pNtkRes
==
NULL
)
{
{
Abc_Print
(
-
1
,
"Command has failed.
\n
"
);
Abc_Print
(
-
1
,
"Command has failed.
\n
"
);
...
@@ -11018,10 +11031,11 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -11018,10 +11031,11 @@ int Abc_CommandCover( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: cover [-
N
num] [-sxvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: cover [-
IP
num] [-sxvh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
decomposition into a network of SOP/ESOP PLAs
\n
"
);
Abc_Print
(
-
2
,
"
\t
decomposition into a network of SOP/ESOP PLAs
\n
"
);
Abc_Print
(
-
2
,
"
\t
(this command is known to have bugs)
\n
"
);
Abc_Print
(
-
2
,
"
\t
(this command is known to have bugs)
\n
"
);
Abc_Print
(
-
2
,
"
\t
-N num : maximum number of inputs [default = %d]
\n
"
,
nFaninMax
);
Abc_Print
(
-
2
,
"
\t
-I num : maximum number of inputs [default = %d]
\n
"
,
nFaninMax
);
Abc_Print
(
-
2
,
"
\t
-P num : maximum number of products [default = %d]
\n
"
,
nCubesMax
);
Abc_Print
(
-
2
,
"
\t
-s : toggle the use of SOPs [default = %s]
\n
"
,
fUseSop
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle the use of SOPs [default = %s]
\n
"
,
fUseSop
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-x : toggle the use of ESOPs [default = %s]
\n
"
,
fUseEsop
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-x : toggle the use of ESOPs [default = %s]
\n
"
,
fUseEsop
?
"yes"
:
"no"
);
// Abc_Print( -2, "\t-i : toggle the use of interters [default = %s]\n", fUseInvs? "yes": "no" );
// Abc_Print( -2, "\t-i : toggle the use of interters [default = %s]\n", fUseInvs? "yes": "no" );
src/map/cov/cov.h
View file @
db43d6fb
...
@@ -88,9 +88,9 @@ extern Abc_Ntk_t * Abc_NtkCovDerive( Cov_Man_t * p, Abc_Ntk_t * pNtk );
...
@@ -88,9 +88,9 @@ extern Abc_Ntk_t * Abc_NtkCovDerive( Cov_Man_t * p, Abc_Ntk_t * pNtk );
extern
Abc_Ntk_t
*
Abc_NtkCovDeriveClean
(
Cov_Man_t
*
p
,
Abc_Ntk_t
*
pNtk
);
extern
Abc_Ntk_t
*
Abc_NtkCovDeriveClean
(
Cov_Man_t
*
p
,
Abc_Ntk_t
*
pNtk
);
extern
Abc_Ntk_t
*
Abc_NtkCovDeriveRegular
(
Cov_Man_t
*
p
,
Abc_Ntk_t
*
pNtk
);
extern
Abc_Ntk_t
*
Abc_NtkCovDeriveRegular
(
Cov_Man_t
*
p
,
Abc_Ntk_t
*
pNtk
);
/*=== covCore.c ===========================================================*/
/*=== covCore.c ===========================================================*/
extern
Abc_Ntk_t
*
Abc_NtkSopEsopCover
(
Abc_Ntk_t
*
pNtk
,
int
nFaninMax
,
int
fUseEsop
,
int
fUseSop
,
int
fUseInvs
,
int
fVerbose
);
extern
Abc_Ntk_t
*
Abc_NtkSopEsopCover
(
Abc_Ntk_t
*
pNtk
,
int
nFaninMax
,
int
nCubesMax
,
int
fUseEsop
,
int
fUseSop
,
int
fUseInvs
,
int
fVerbose
);
/*=== covMan.c ============================================================*/
/*=== covMan.c ============================================================*/
extern
Cov_Man_t
*
Cov_ManAlloc
(
Abc_Ntk_t
*
pNtk
,
int
nFaninMax
);
extern
Cov_Man_t
*
Cov_ManAlloc
(
Abc_Ntk_t
*
pNtk
,
int
nFaninMax
,
int
nCubesMax
);
extern
void
Cov_ManFree
(
Cov_Man_t
*
p
);
extern
void
Cov_ManFree
(
Cov_Man_t
*
p
);
extern
void
Abc_NodeCovDropData
(
Cov_Man_t
*
p
,
Abc_Obj_t
*
pObj
);
extern
void
Abc_NodeCovDropData
(
Cov_Man_t
*
p
,
Abc_Obj_t
*
pObj
);
/*=== covTest.c ===========================================================*/
/*=== covTest.c ===========================================================*/
...
...
src/map/cov/covCore.c
View file @
db43d6fb
...
@@ -57,7 +57,7 @@ static Min_Cube_t * Abc_NodeCovSum( Cov_Man_t * p, Min_Cube_t * pCover0, Min_Cub
...
@@ -57,7 +57,7 @@ static Min_Cube_t * Abc_NodeCovSum( Cov_Man_t * p, Min_Cube_t * pCover0, Min_Cub
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
Abc_Ntk_t
*
Abc_NtkSopEsopCover
(
Abc_Ntk_t
*
pNtk
,
int
nFaninMax
,
int
fUseEsop
,
int
fUseSop
,
int
fUseInvs
,
int
fVerbose
)
Abc_Ntk_t
*
Abc_NtkSopEsopCover
(
Abc_Ntk_t
*
pNtk
,
int
nFaninMax
,
int
nCubesMax
,
int
fUseEsop
,
int
fUseSop
,
int
fUseInvs
,
int
fVerbose
)
{
{
Abc_Ntk_t
*
pNtkNew
;
Abc_Ntk_t
*
pNtkNew
;
Cov_Man_t
*
p
;
Cov_Man_t
*
p
;
...
@@ -65,7 +65,7 @@ Abc_Ntk_t * Abc_NtkSopEsopCover( Abc_Ntk_t * pNtk, int nFaninMax, int fUseEsop,
...
@@ -65,7 +65,7 @@ Abc_Ntk_t * Abc_NtkSopEsopCover( Abc_Ntk_t * pNtk, int nFaninMax, int fUseEsop,
assert
(
Abc_NtkIsStrash
(
pNtk
)
);
assert
(
Abc_NtkIsStrash
(
pNtk
)
);
// create the manager
// create the manager
p
=
Cov_ManAlloc
(
pNtk
,
nFaninMax
);
p
=
Cov_ManAlloc
(
pNtk
,
nFaninMax
,
nCubesMax
);
p
->
fUseEsop
=
fUseEsop
;
p
->
fUseEsop
=
fUseEsop
;
p
->
fUseSop
=
fUseSop
;
p
->
fUseSop
=
fUseSop
;
pNtk
->
pManCut
=
p
;
pNtk
->
pManCut
=
p
;
...
...
src/map/cov/covMan.c
View file @
db43d6fb
...
@@ -42,7 +42,7 @@ ABC_NAMESPACE_IMPL_START
...
@@ -42,7 +42,7 @@ ABC_NAMESPACE_IMPL_START
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
Cov_Man_t
*
Cov_ManAlloc
(
Abc_Ntk_t
*
pNtk
,
int
nFaninMax
)
Cov_Man_t
*
Cov_ManAlloc
(
Abc_Ntk_t
*
pNtk
,
int
nFaninMax
,
int
nCubesMax
)
{
{
Cov_Man_t
*
pMan
;
Cov_Man_t
*
pMan
;
Cov_Obj_t
*
pMem
;
Cov_Obj_t
*
pMem
;
...
@@ -54,7 +54,7 @@ Cov_Man_t * Cov_ManAlloc( Abc_Ntk_t * pNtk, int nFaninMax )
...
@@ -54,7 +54,7 @@ Cov_Man_t * Cov_ManAlloc( Abc_Ntk_t * pNtk, int nFaninMax )
pMan
=
ABC_ALLOC
(
Cov_Man_t
,
1
);
pMan
=
ABC_ALLOC
(
Cov_Man_t
,
1
);
memset
(
pMan
,
0
,
sizeof
(
Cov_Man_t
)
);
memset
(
pMan
,
0
,
sizeof
(
Cov_Man_t
)
);
pMan
->
nFaninMax
=
nFaninMax
;
pMan
->
nFaninMax
=
nFaninMax
;
pMan
->
nCubesMax
=
2
*
pMan
->
nFanin
Max
;
pMan
->
nCubesMax
=
nCubes
Max
;
pMan
->
nWords
=
Abc_BitWordNum
(
nFaninMax
*
2
);
pMan
->
nWords
=
Abc_BitWordNum
(
nFaninMax
*
2
);
// get the cubes
// get the cubes
...
...
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