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
b1a57b2a
Commit
b1a57b2a
authored
Apr 11, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding iterative refinement to 'addbuffs'.
parent
0184dab4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
34 deletions
+2
-34
src/base/abc/abcUtil.c
+2
-34
No files found.
src/base/abc/abcUtil.c
View file @
b1a57b2a
...
@@ -2094,7 +2094,7 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fReverse, int nImprove, i
...
@@ -2094,7 +2094,7 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fReverse, int nImprove, i
Abc_NtkForEachCi
(
pNtk
,
pObj
,
i
)
Abc_NtkForEachCi
(
pNtk
,
pObj
,
i
)
pObj
->
Level
=
0
;
pObj
->
Level
=
0
;
// move the nodes
// move the nodes
down one step at a time
for
(
Iter
=
0
;
Iter
<
nImprove
;
Iter
++
)
for
(
Iter
=
0
;
Iter
<
nImprove
;
Iter
++
)
{
{
int
Counter
=
0
,
TotalGain
=
0
;
int
Counter
=
0
,
TotalGain
=
0
;
...
@@ -2128,7 +2128,7 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fReverse, int nImprove, i
...
@@ -2128,7 +2128,7 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fReverse, int nImprove, i
}
}
else
else
{
{
// move the nodes
// move the nodes
up one step at a time
Vec_Ptr_t
*
vNodes
=
Abc_NtkDfs
(
pNtk
,
1
);
Vec_Ptr_t
*
vNodes
=
Abc_NtkDfs
(
pNtk
,
1
);
for
(
Iter
=
0
;
Iter
<
nImprove
;
Iter
++
)
for
(
Iter
=
0
;
Iter
<
nImprove
;
Iter
++
)
{
{
...
@@ -2159,38 +2159,6 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fReverse, int nImprove, i
...
@@ -2159,38 +2159,6 @@ Abc_Ntk_t * Abc_NtkAddBuffs( Abc_Ntk_t * pNtkInit, int fReverse, int nImprove, i
if
(
Counter
==
0
)
if
(
Counter
==
0
)
break
;
break
;
}
}
/*
// move the nodes
for ( Iter = 0; Iter < nImprove; Iter++ )
{
int Counter = 0, TotalGain = 0;
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i )
{
int CountGain = -1;
assert( pObj->Level > 0 );
Abc_ObjForEachFanin( pObj, pFanin, k )
{
assert( pFanin->Level < pObj->Level );
if ( pFanin->Level + 1 == pObj->Level )
break;
}
if ( k < Abc_ObjFaninNum(pObj) ) // cannot move
continue;
Abc_ObjForEachFanin( pObj, pFanin, k )
CountGain += Abc_NtkAddBuffsEval( pObj, pFanin );
if ( CountGain >= 0 ) // can move
{
pObj->Level--;
Counter++;
TotalGain += CountGain;
}
}
if ( fVerbose )
printf( "Shifted %d nodes down with total gain %d.\n", Counter, TotalGain );
if ( Counter == 0 )
break;
}
*/
Vec_PtrFree
(
vNodes
);
Vec_PtrFree
(
vNodes
);
}
}
vBuffs
=
Vec_PtrStart
(
Abc_NtkObjNumMax
(
pNtk
)
*
(
nLevelMax
+
1
)
);
vBuffs
=
Vec_PtrStart
(
Abc_NtkObjNumMax
(
pNtk
)
*
(
nLevelMax
+
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