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
1b550cb8
Commit
1b550cb8
authored
Apr 22, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved algo for edge computation.
parent
813b0e58
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
9 deletions
+37
-9
abclib.dsp
+4
-0
src/aig/gia/gia.h
+1
-1
src/aig/gia/giaEdge.c
+5
-3
src/aig/gia/giaIf.c
+5
-2
src/aig/gia/giaSatEdge.c
+0
-0
src/aig/gia/giaSpeedup.c
+1
-1
src/aig/gia/module.make
+1
-0
src/base/abci/abc.c
+20
-2
No files found.
abclib.dsp
View file @
1b550cb8
...
@@ -4363,6 +4363,10 @@ SOURCE=.\src\aig\gia\giaRex.c
...
@@ -4363,6 +4363,10 @@ SOURCE=.\src\aig\gia\giaRex.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaSatEdge.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaSatLut.c
SOURCE=.\src\aig\gia\giaSatLut.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/aig/gia/gia.h
View file @
1b550cb8
...
@@ -1299,7 +1299,7 @@ extern void Gia_ManPrintLutStats( Gia_Man_t * p );
...
@@ -1299,7 +1299,7 @@ extern void Gia_ManPrintLutStats( Gia_Man_t * p );
extern
int
Gia_ManLutFaninCount
(
Gia_Man_t
*
p
);
extern
int
Gia_ManLutFaninCount
(
Gia_Man_t
*
p
);
extern
int
Gia_ManLutSizeMax
(
Gia_Man_t
*
p
);
extern
int
Gia_ManLutSizeMax
(
Gia_Man_t
*
p
);
extern
int
Gia_ManLutNum
(
Gia_Man_t
*
p
);
extern
int
Gia_ManLutNum
(
Gia_Man_t
*
p
);
extern
int
Gia_ManLutLevel
(
Gia_Man_t
*
p
);
extern
int
Gia_ManLutLevel
(
Gia_Man_t
*
p
,
int
**
ppLevels
);
extern
void
Gia_ManLutParams
(
Gia_Man_t
*
p
,
int
*
pnCurLuts
,
int
*
pnCurEdges
,
int
*
pnCurLevels
);
extern
void
Gia_ManLutParams
(
Gia_Man_t
*
p
,
int
*
pnCurLuts
,
int
*
pnCurEdges
,
int
*
pnCurLevels
);
extern
void
Gia_ManSetRefsMapped
(
Gia_Man_t
*
p
);
extern
void
Gia_ManSetRefsMapped
(
Gia_Man_t
*
p
);
extern
void
Gia_ManSetLutRefs
(
Gia_Man_t
*
p
);
extern
void
Gia_ManSetLutRefs
(
Gia_Man_t
*
p
);
...
...
src/aig/gia/giaEdge.c
View file @
1b550cb8
...
@@ -71,7 +71,7 @@ static inline void Gia_ObjEdgeClean( int iObj, Vec_Int_t * vEdge1, Vec_Int_t * v
...
@@ -71,7 +71,7 @@ static inline void Gia_ObjEdgeClean( int iObj, Vec_Int_t * vEdge1, Vec_Int_t * v
***********************************************************************/
***********************************************************************/
void
Gia_ManEdgeFromArray
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vArray
)
void
Gia_ManEdgeFromArray
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vArray
)
{
{
int
i
,
iObj1
,
iObj2
;
int
i
,
iObj1
,
iObj2
,
Count
=
0
;
Vec_IntFreeP
(
&
p
->
vEdge1
);
Vec_IntFreeP
(
&
p
->
vEdge1
);
Vec_IntFreeP
(
&
p
->
vEdge2
);
Vec_IntFreeP
(
&
p
->
vEdge2
);
p
->
vEdge1
=
Vec_IntStart
(
Gia_ManObjNum
(
p
)
);
p
->
vEdge1
=
Vec_IntStart
(
Gia_ManObjNum
(
p
)
);
...
@@ -79,9 +79,11 @@ void Gia_ManEdgeFromArray( Gia_Man_t * p, Vec_Int_t * vArray )
...
@@ -79,9 +79,11 @@ void Gia_ManEdgeFromArray( Gia_Man_t * p, Vec_Int_t * vArray )
Vec_IntForEachEntryDouble
(
vArray
,
iObj1
,
iObj2
,
i
)
Vec_IntForEachEntryDouble
(
vArray
,
iObj1
,
iObj2
,
i
)
{
{
assert
(
iObj1
<
iObj2
);
assert
(
iObj1
<
iObj2
);
Gia_ObjEdgeAdd
(
iObj1
,
iObj2
,
p
->
vEdge1
,
p
->
vEdge2
);
Count
+=
Gia_ObjEdgeAdd
(
iObj1
,
iObj2
,
p
->
vEdge1
,
p
->
vEdge2
);
Gia_ObjEdgeAdd
(
iObj2
,
iObj1
,
p
->
vEdge1
,
p
->
vEdge2
);
Count
+=
Gia_ObjEdgeAdd
(
iObj2
,
iObj1
,
p
->
vEdge1
,
p
->
vEdge2
);
}
}
if
(
Count
)
printf
(
"Found %d violations during edge conversion.
\n
"
,
Count
);
}
}
Vec_Int_t
*
Gia_ManEdgeToArray
(
Gia_Man_t
*
p
)
Vec_Int_t
*
Gia_ManEdgeToArray
(
Gia_Man_t
*
p
)
{
{
...
...
src/aig/gia/giaIf.c
View file @
1b550cb8
...
@@ -160,7 +160,7 @@ int Gia_ManLutNum( Gia_Man_t * p )
...
@@ -160,7 +160,7 @@ int Gia_ManLutNum( Gia_Man_t * p )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Gia_ManLutLevel
(
Gia_Man_t
*
p
)
int
Gia_ManLutLevel
(
Gia_Man_t
*
p
,
int
**
ppLevels
)
{
{
Gia_Obj_t
*
pObj
;
Gia_Obj_t
*
pObj
;
int
i
,
k
,
iFan
,
Level
;
int
i
,
k
,
iFan
,
Level
;
...
@@ -177,7 +177,10 @@ int Gia_ManLutLevel( Gia_Man_t * p )
...
@@ -177,7 +177,10 @@ int Gia_ManLutLevel( Gia_Man_t * p )
Gia_ManForEachCo
(
p
,
pObj
,
k
)
Gia_ManForEachCo
(
p
,
pObj
,
k
)
if
(
Level
<
pLevels
[
Gia_ObjFaninId0p
(
p
,
pObj
)]
)
if
(
Level
<
pLevels
[
Gia_ObjFaninId0p
(
p
,
pObj
)]
)
Level
=
pLevels
[
Gia_ObjFaninId0p
(
p
,
pObj
)];
Level
=
pLevels
[
Gia_ObjFaninId0p
(
p
,
pObj
)];
ABC_FREE
(
pLevels
);
if
(
ppLevels
)
*
ppLevels
=
pLevels
;
else
ABC_FREE
(
pLevels
);
return
Level
;
return
Level
;
}
}
...
...
src/aig/gia/giaSatEdge.c
0 → 100644
View file @
1b550cb8
This diff is collapsed.
Click to expand it.
src/aig/gia/giaSpeedup.c
View file @
1b550cb8
...
@@ -453,7 +453,7 @@ float Gia_ManDelayTraceLutPrint( Gia_Man_t * p, int fVerbose )
...
@@ -453,7 +453,7 @@ float Gia_ManDelayTraceLutPrint( Gia_Man_t * p, int fVerbose )
return
-
ABC_INFINITY
;
return
-
ABC_INFINITY
;
}
}
// decide how many steps
// decide how many steps
nSteps
=
pLutLib
?
20
:
Gia_ManLutLevel
(
p
);
nSteps
=
pLutLib
?
20
:
Gia_ManLutLevel
(
p
,
NULL
);
pCounters
=
ABC_ALLOC
(
int
,
nSteps
+
1
);
pCounters
=
ABC_ALLOC
(
int
,
nSteps
+
1
);
memset
(
pCounters
,
0
,
sizeof
(
int
)
*
(
nSteps
+
1
)
);
memset
(
pCounters
,
0
,
sizeof
(
int
)
*
(
nSteps
+
1
)
);
// perform delay trace
// perform delay trace
...
...
src/aig/gia/module.make
View file @
1b550cb8
...
@@ -56,6 +56,7 @@ SRC += src/aig/gia/giaAig.c \
...
@@ -56,6 +56,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaResub.c
\
src/aig/gia/giaResub.c
\
src/aig/gia/giaRetime.c
\
src/aig/gia/giaRetime.c
\
src/aig/gia/giaRex.c
\
src/aig/gia/giaRex.c
\
src/aig/gia/giaSatEdge.c
\
src/aig/gia/giaSatLut.c
\
src/aig/gia/giaSatLut.c
\
src/aig/gia/giaSatMap.c
\
src/aig/gia/giaSatMap.c
\
src/aig/gia/giaScl.c
\
src/aig/gia/giaScl.c
\
...
...
src/base/abci/abc.c
View file @
1b550cb8
...
@@ -34850,12 +34850,23 @@ usage:
...
@@ -34850,12 +34850,23 @@ usage:
int
Abc_CommandAbc9Edge
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9Edge
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
int
Edg_ManAssignEdgeNew
(
Gia_Man_t
*
p
,
int
nEdges
,
int
fVerbose
);
extern
int
Edg_ManAssignEdgeNew
(
Gia_Man_t
*
p
,
int
nEdges
,
int
fVerbose
);
extern
void
Seg_ManComputeDelay
(
Gia_Man_t
*
pGia
,
int
Delay
,
int
fTwo
,
int
fVerbose
);
int
c
,
DelayMax
=
0
,
nEdges
=
1
,
fReverse
=
0
,
fUsePack
=
0
,
fUseOld
=
0
,
fVerbose
=
0
;
int
c
,
DelayMax
=
0
,
nEdges
=
1
,
fReverse
=
0
,
fUsePack
=
0
,
fUseOld
=
0
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Erpovh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
D
Erpovh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
case
'D'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-D
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
DelayMax
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
break
;
case
'E'
:
case
'E'
:
if
(
globalUtilOptind
>=
argc
)
if
(
globalUtilOptind
>=
argc
)
{
{
...
@@ -34912,6 +34923,11 @@ int Abc_CommandAbc9Edge( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -34912,6 +34923,11 @@ int Abc_CommandAbc9Edge( Abc_Frame_t * pAbc, int argc, char ** argv )
Gia_ManConvertPackingToEdges
(
pAbc
->
pGia
);
Gia_ManConvertPackingToEdges
(
pAbc
->
pGia
);
return
0
;
return
0
;
}
}
if
(
DelayMax
)
{
Seg_ManComputeDelay
(
pAbc
->
pGia
,
DelayMax
,
nEdges
==
2
,
fVerbose
);
return
0
;
}
if
(
!
fUseOld
)
if
(
!
fUseOld
)
{
{
if
(
pAbc
->
pGia
->
pManTime
!=
NULL
&&
Tim_ManBoxNum
((
Tim_Man_t
*
)
pAbc
->
pGia
->
pManTime
)
)
if
(
pAbc
->
pGia
->
pManTime
!=
NULL
&&
Tim_ManBoxNum
((
Tim_Man_t
*
)
pAbc
->
pGia
->
pManTime
)
)
...
@@ -34935,8 +34951,9 @@ int Abc_CommandAbc9Edge( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -34935,8 +34951,9 @@ int Abc_CommandAbc9Edge( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &edge [-E num] [-rpovh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &edge [-
D
E num] [-rpovh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
find edge assignment of the LUT-mapped network
\n
"
);
Abc_Print
(
-
2
,
"
\t
find edge assignment of the LUT-mapped network
\n
"
);
Abc_Print
(
-
2
,
"
\t
-D num : the upper bound on delay [default = %d]
\n
"
,
DelayMax
);
Abc_Print
(
-
2
,
"
\t
-E num : the limit on the number of edges (1 <= num <= 2) [default = %d]
\n
"
,
nEdges
);
Abc_Print
(
-
2
,
"
\t
-E num : the limit on the number of edges (1 <= num <= 2) [default = %d]
\n
"
,
nEdges
);
Abc_Print
(
-
2
,
"
\t
-r : toggles using reverse order [default = %s]
\n
"
,
fReverse
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-r : toggles using reverse order [default = %s]
\n
"
,
fReverse
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-p : toggles deriving edges from packing [default = %s]
\n
"
,
fUsePack
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-p : toggles deriving edges from packing [default = %s]
\n
"
,
fUsePack
?
"yes"
:
"no"
);
...
@@ -40922,6 +40939,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -40922,6 +40939,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// Gia_ManCheckFalseTest( pAbc->pGia, nFrames );
// Gia_ManCheckFalseTest( pAbc->pGia, nFrames );
// Gia_ParTest( pAbc->pGia, nWords, nProcs );
// Gia_ParTest( pAbc->pGia, nWords, nProcs );
Gia_Iso3Test
(
pAbc
->
pGia
);
Gia_Iso3Test
(
pAbc
->
pGia
);
// printf( "\nThis command is currently disabled.\n\n" );
// printf( "\nThis command is currently disabled.\n\n" );
return
0
;
return
0
;
usage:
usage:
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