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
372a348c
Commit
372a348c
authored
Nov 09, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detecting full-adder chains and putting them into white boxes.
parent
153e8887
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
0 deletions
+72
-0
abclib.dsp
+4
-0
src/aig/gia/gia.h
+7
-0
src/aig/gia/giaFadds.c
+0
-0
src/aig/gia/giaTim.c
+0
-0
src/aig/gia/module.make
+1
-0
src/base/abci/abc.c
+60
-0
No files found.
abclib.dsp
View file @
372a348c
...
...
@@ -3815,6 +3815,10 @@ SOURCE=.\src\aig\gia\giaEra2.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaFadds.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaFalse.c
# End Source File
# Begin Source File
...
...
src/aig/gia/gia.h
View file @
372a348c
...
...
@@ -719,6 +719,13 @@ static inline int Gia_ManAppendMux( Gia_Man_t * p, int iCtrl, int iData1, int iD
int
iTemp1
=
Gia_ManAppendAnd
(
p
,
iCtrl
,
iData1
);
return
Abc_LitNotCond
(
Gia_ManAppendAnd
(
p
,
Abc_LitNot
(
iTemp0
),
Abc_LitNot
(
iTemp1
)
),
1
);
}
static
inline
int
Gia_ManAppendMaj
(
Gia_Man_t
*
p
,
int
iData0
,
int
iData1
,
int
iData2
)
{
int
iTemp0
=
Gia_ManAppendOr
(
p
,
iData1
,
iData2
);
int
iTemp1
=
Gia_ManAppendAnd
(
p
,
iData0
,
iTemp0
);
int
iTemp2
=
Gia_ManAppendAnd
(
p
,
iData1
,
iData2
);
return
Gia_ManAppendOr
(
p
,
iTemp1
,
iTemp2
);
}
static
inline
int
Gia_ManAppendXor
(
Gia_Man_t
*
p
,
int
iLit0
,
int
iLit1
)
{
return
Gia_ManAppendMux
(
p
,
iLit0
,
Abc_LitNot
(
iLit1
),
iLit1
);
...
...
src/aig/gia/giaFadds.c
View file @
372a348c
This diff is collapsed.
Click to expand it.
src/aig/gia/giaTim.c
View file @
372a348c
This diff is collapsed.
Click to expand it.
src/aig/gia/module.make
View file @
372a348c
...
...
@@ -21,6 +21,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaEquiv.c
\
src/aig/gia/giaEra.c
\
src/aig/gia/giaEra2.c
\
src/aig/gia/giaFadds.c
\
src/aig/gia/giaFalse.c
\
src/aig/gia/giaFanout.c
\
src/aig/gia/giaForce.c
\
...
...
src/base/abci/abc.c
View file @
372a348c
...
...
@@ -439,6 +439,7 @@ static int Abc_CommandAbc9Maxi ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9Bmci
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9PoXsim
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Demiter
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Fadds
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
//static int Abc_CommandAbc9PoPart2 ( Abc_Frame_t * pAbc, int argc, char ** argv );
//static int Abc_CommandAbc9CexCut ( Abc_Frame_t * pAbc, int argc, char ** argv );
//static int Abc_CommandAbc9CexMerge ( Abc_Frame_t * pAbc, int argc, char ** argv );
...
...
@@ -1040,6 +1041,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&bmci"
,
Abc_CommandAbc9Bmci
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&poxsim"
,
Abc_CommandAbc9PoXsim
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&demiter"
,
Abc_CommandAbc9Demiter
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&fadds"
,
Abc_CommandAbc9Fadds
,
0
);
// Cmd_CommandAdd( pAbc, "ABC9", "&popart2", Abc_CommandAbc9PoPart2, 0 );
// Cmd_CommandAdd( pAbc, "ABC9", "&cexcut", Abc_CommandAbc9CexCut, 0 );
// Cmd_CommandAdd( pAbc, "ABC9", "&cexmerge", Abc_CommandAbc9CexMerge, 0 );
...
...
@@ -36557,6 +36559,64 @@ usage:
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Fadds
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Gia_Man_t
*
Gia_ManDupWithFaddBoxes
(
Gia_Man_t
*
p
,
int
nFaddMin
,
int
fVerbose
);
Gia_Man_t
*
pTemp
;
int
c
,
nFaddMin
=
3
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Nvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'N'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-N
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nFaddMin
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nFaddMin
<
0
)
goto
usage
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Fadds(): There is no AIG.
\n
"
);
return
0
;
}
pTemp
=
Gia_ManDupWithFaddBoxes
(
pAbc
->
pGia
,
nFaddMin
,
fVerbose
);
Abc_FrameUpdateGia
(
pAbc
,
pTemp
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &fadds [-N num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
detects full-adder chains and puts them into white boxes
\n
"
);
Abc_Print
(
-
2
,
"
\t
-N num : the minimum length of full-adder chain to box [default = %d]
\n
"
,
nFaddMin
);
Abc_Print
(
-
2
,
"
\t
-v : toggles printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9CexCut
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
return
-
1
;
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