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
0d802453
Commit
0d802453
authored
Apr 11, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding reverse order to 'addbuffs'.
parent
f16457aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
src/base/abc/abcUtil.c
+16
-1
src/base/abci/abc.c
+10
-4
No files found.
src/base/abc/abcUtil.c
View file @
0d802453
...
...
@@ -2030,7 +2030,7 @@ Abc_Obj_t * Abc_NtkAddBuffsOne( Vec_Ptr_t * vBuffs, Abc_Obj_t * pFanin, int Leve
}
return
pBuffer
;
}
Abc_Ntk_t
*
Abc_NtkAddBuffs
(
Abc_Ntk_t
*
pNtkInit
,
int
fVerbose
)
Abc_Ntk_t
*
Abc_NtkAddBuffs
(
Abc_Ntk_t
*
pNtkInit
,
int
f
Reverse
,
int
f
Verbose
)
{
Vec_Ptr_t
*
vBuffs
;
Abc_Ntk_t
*
pNtk
=
Abc_NtkDup
(
pNtkInit
);
...
...
@@ -2038,6 +2038,21 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fVerbose )
int
i
,
k
,
nLevelMax
=
Abc_NtkLevel
(
pNtk
);
Abc_NtkForEachCo
(
pNtk
,
pObj
,
i
)
pObj
->
Level
=
nLevelMax
+
1
;
if
(
fReverse
)
{
Vec_Ptr_t
*
vNodes
=
Abc_NtkDfs
(
pNtk
,
1
);
assert
(
nLevelMax
<
(
1
<<
18
)
);
Vec_PtrForEachEntryReverse
(
Abc_Obj_t
*
,
vNodes
,
pObj
,
i
)
{
pObj
->
Level
=
(
1
<<
18
);
Abc_ObjForEachFanout
(
pObj
,
pFanin
,
k
)
pObj
->
Level
=
Abc_MinInt
(
pFanin
->
Level
-
1
,
pObj
->
Level
);
assert
(
pObj
->
Level
>
0
);
}
Vec_PtrFree
(
vNodes
);
Abc_NtkForEachCi
(
pNtk
,
pObj
,
i
)
pObj
->
Level
=
0
;
}
vBuffs
=
Vec_PtrStart
(
Abc_NtkObjNumMax
(
pNtk
)
*
(
nLevelMax
+
1
)
);
Abc_NtkForEachObj
(
pNtk
,
pObj
,
i
)
{
...
...
src/base/abci/abc.c
View file @
0d802453
...
...
@@ -4550,17 +4550,22 @@ usage:
***********************************************************************/
int
Abc_CommandAddBuffs
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Abc_Ntk_t
*
Abc_NtkAddBuffs
(
Abc_Ntk_t
*
pNtk
,
int
fVerbose
);
extern
Abc_Ntk_t
*
Abc_NtkAddBuffs
(
Abc_Ntk_t
*
pNtk
,
int
f
Reverse
,
int
f
Verbose
);
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Abc_Ntk_t
*
pNtkRes
;
int
c
,
fVerbose
;
int
fReverse
;
fReverse
=
0
;
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"vh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
r
vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'r'
:
fReverse
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
...
...
@@ -4583,7 +4588,7 @@ int Abc_CommandAddBuffs( Abc_Frame_t * pAbc, int argc, char ** argv )
}
// modify the current network
pNtkRes
=
Abc_NtkAddBuffs
(
pNtk
,
fVerbose
);
pNtkRes
=
Abc_NtkAddBuffs
(
pNtk
,
f
Reverse
,
f
Verbose
);
if
(
pNtkRes
==
NULL
)
{
Abc_Print
(
-
1
,
"The command has failed.
\n
"
);
...
...
@@ -4594,8 +4599,9 @@ int Abc_CommandAddBuffs( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: addbuffs [-vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: addbuffs [-
r
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
adds buffers to create balanced CI/CO paths
\n
"
);
Abc_Print
(
-
2
,
"
\t
-r : toggle reversing the levelized order [default = %s]
\n
"
,
fReverse
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing optimization summary [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
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