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
1e159a82
Commit
1e159a82
authored
Jul 28, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Started implementing command 'testdec'.
parent
4598c76e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
144 additions
and
0 deletions
+144
-0
abclib.dsp
+4
-0
src/base/abci/abc.c
+73
-0
src/base/abci/abcDec.c
+66
-0
src/base/abci/module.make
+1
-0
No files found.
abclib.dsp
View file @
1e159a82
...
@@ -235,6 +235,10 @@ SOURCE=.\src\base\abci\abcDebug.c
...
@@ -235,6 +235,10 @@ SOURCE=.\src\base\abci\abcDebug.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\base\abci\abcDec.c
# End Source File
# Begin Source File
SOURCE=.\src\base\abci\abcDress.c
SOURCE=.\src\base\abci\abcDress.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/base/abci/abc.c
View file @
1e159a82
...
@@ -108,6 +108,7 @@ static int Abc_CommandSpeedup ( Abc_Frame_t * pAbc, int argc, cha
...
@@ -108,6 +108,7 @@ static int Abc_CommandSpeedup ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandPowerdown
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandPowerdown
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAddBuffs
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAddBuffs
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
//static int Abc_CommandMerge ( Abc_Frame_t * pAbc, int argc, char ** argv );
//static int Abc_CommandMerge ( Abc_Frame_t * pAbc, int argc, char ** argv );
static
int
Abc_CommandTestDec
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandRewrite
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandRewrite
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandRefactor
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandRefactor
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
@@ -569,6 +570,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
...
@@ -569,6 +570,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"powerdown"
,
Abc_CommandPowerdown
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"powerdown"
,
Abc_CommandPowerdown
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"addbuffs"
,
Abc_CommandAddBuffs
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"addbuffs"
,
Abc_CommandAddBuffs
,
1
);
// Cmd_CommandAdd( pAbc, "Synthesis", "merge", Abc_CommandMerge, 1 );
// Cmd_CommandAdd( pAbc, "Synthesis", "merge", Abc_CommandMerge, 1 );
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"testdec"
,
Abc_CommandTestDec
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"rewrite"
,
Abc_CommandRewrite
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"rewrite"
,
Abc_CommandRewrite
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"refactor"
,
Abc_CommandRefactor
,
1
);
Cmd_CommandAdd
(
pAbc
,
"Synthesis"
,
"refactor"
,
Abc_CommandRefactor
,
1
);
...
@@ -4793,6 +4795,77 @@ usage:
...
@@ -4793,6 +4795,77 @@ usage:
return 1;
return 1;
}
}
#endif
#endif
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandTestDec
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
int
Abc_DecTest
(
char
*
pFileName
,
int
DecType
);
char
*
pFileName
;
int
c
;
int
fVerbose
=
0
;
int
DecType
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Avh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'A'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-A
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
DecType
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
DecType
<
0
)
goto
usage
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
argc
!=
globalUtilOptind
+
1
)
{
printf
(
"Input file is not given.
\n
"
);
goto
usage
;
}
// get the output file name
pFileName
=
argv
[
globalUtilOptind
];
// call the testbench
Abc_DecTest
(
pFileName
,
DecType
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: testdec [-A <num>] [-vh] <file_name>
\n
"
);
Abc_Print
(
-
2
,
"
\t
testbench for Boolean decomposition algorithms
\n
"
);
Abc_Print
(
-
2
,
"
\t
-A <num> : number of decomposition algorithm [default = %d]
\n
"
,
DecType
);
Abc_Print
(
-
2
,
"
\t
0 : none (just read the input file)
\n
"
);
Abc_Print
(
-
2
,
"
\t
1 : algebraic factoring applied to ISOP
\n
"
);
Abc_Print
(
-
2
,
"
\t
2 : bi-decomposition with cofactoring
\n
"
);
Abc_Print
(
-
2
,
"
\t
3 : disjoint-support decomposition
\n
"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle verbose printout [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
/**Function*************************************************************
/**Function*************************************************************
Synopsis []
Synopsis []
...
...
src/base/abci/abcDec.c
0 → 100644
View file @
1e159a82
/**CFile****************************************************************
FileName [abcDec.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Network and node package.]
Synopsis [Procedures for testing and comparing decomposition algorithms.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [$Id: abcDec.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
***********************************************************************/
#include "base/abc/abc.h"
ABC_NAMESPACE_IMPL_START
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
// decomposition type
// 0 - none
// 1 - factoring
// 2 - bi-decomposition
// 3 - DSD
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis [Testbench for decomposition algorithms.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_DecTest
(
char
*
pFileName
,
int
DecType
)
{
printf
(
"Trying to read file
\"
%s
\"
.
\n
"
,
pFileName
);
fflush
(
stdout
);
return
0
;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_IMPL_END
src/base/abci/module.make
View file @
1e159a82
...
@@ -11,6 +11,7 @@ SRC += src/base/abci/abc.c \
...
@@ -11,6 +11,7 @@ SRC += src/base/abci/abc.c \
src/base/abci/abcCut.c
\
src/base/abci/abcCut.c
\
src/base/abci/abcDar.c
\
src/base/abci/abcDar.c
\
src/base/abci/abcDebug.c
\
src/base/abci/abcDebug.c
\
src/base/abci/abcDec.c
\
src/base/abci/abcDress.c
\
src/base/abci/abcDress.c
\
src/base/abci/abcDress2.c
\
src/base/abci/abcDress2.c
\
src/base/abci/abcDsd.c
\
src/base/abci/abcDsd.c
\
...
...
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