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
bef247a4
Commit
bef247a4
authored
Apr 23, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Logic restructuring after mapping.
parent
4124a00d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
src/base/abci/abc.c
+1
-0
src/base/acb/acbPush.c
+22
-2
No files found.
src/base/abci/abc.c
View file @
bef247a4
...
...
@@ -5863,6 +5863,7 @@ int Abc_CommandLogicPush( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"This command can only be applied to a logic network.
\n
"
);
return
1
;
}
nLutSize
=
Abc_MaxInt
(
nLutSize
,
Abc_NtkGetFaninMax
(
pNtk
)
);
Abc_NtkToSop
(
pNtk
,
-
1
,
ABC_INFINITY
);
pNtkRes
=
Abc_NtkOptPush
(
pNtk
,
nLutSize
,
fVerbose
);
Abc_FrameReplaceCurrentNetwork
(
pAbc
,
pNtkRes
);
src/base/acb/acbPush.c
View file @
bef247a4
...
...
@@ -262,7 +262,7 @@ void Acb_ObjRemoveBufInv( Acb_Ntk_t * p, int iObj )
SeeAlso []
***********************************************************************/
static
inline
int
Acb_ObjFindPushableIndex
(
Acb_Ntk_t
*
p
,
int
iObj
,
int
iFanIndex
)
static
inline
int
Acb_ObjFind
Fanin
PushableIndex
(
Acb_Ntk_t
*
p
,
int
iObj
,
int
iFanIndex
)
{
int
k
,
iFanin
,
*
pFanins
;
Acb_ObjForEachFaninFast
(
p
,
iObj
,
pFanins
,
iFanin
,
k
)
...
...
@@ -270,6 +270,14 @@ static inline int Acb_ObjFindPushableIndex( Acb_Ntk_t * p, int iObj, int iFanInd
return
k
;
return
-
1
;
}
static
inline
int
Acb_ObjFindFanoutPushableIndex
(
Acb_Ntk_t
*
p
,
int
iObj
)
{
int
k
,
iFanin
,
*
pFanins
;
Acb_ObjForEachFaninFast
(
p
,
iObj
,
pFanins
,
iFanin
,
k
)
if
(
Abc_TtCheckOutAnd
(
Acb_ObjTruth
(
p
,
iObj
),
k
,
NULL
)
>=
0
)
return
k
;
return
-
1
;
}
int
Acb_ObjPushToFanins
(
Acb_Ntk_t
*
p
,
int
iObj
,
int
nLutSize
)
{
int
k
,
k2
,
iFanin
,
*
pFanins
;
...
...
@@ -283,11 +291,23 @@ int Acb_ObjPushToFanins( Acb_Ntk_t * p, int iObj, int nLutSize )
continue
;
if
(
Acb_ObjFaninNum
(
p
,
iFanin
)
==
nLutSize
)
continue
;
if
(
(
k2
=
Acb_ObjFindPushableIndex
(
p
,
iObj
,
k
))
==
-
1
)
if
(
(
k2
=
Acb_ObjFind
Fanin
PushableIndex
(
p
,
iObj
,
k
))
==
-
1
)
continue
;
//printf( "Object %4d : Pushing fanin %d (%d) into fanin %d.\n", iObj, Acb_ObjFanin(p, iObj, k2), k2, iFanin );
Acb_ObjPushToFanin
(
p
,
iObj
,
k2
,
iFanin
);
return
1
;
}
if
(
Acb_ObjFaninNum
(
p
,
iObj
)
==
2
&&
Acb_ObjFanoutNum
(
p
,
iObj
)
==
1
)
{
int
iFanout
=
Acb_ObjFanout
(
p
,
iObj
,
0
);
if
(
!
Acb_ObjIsCo
(
p
,
iFanout
)
&&
Acb_ObjFaninNum
(
p
,
iFanout
)
<
nLutSize
)
{
k2
=
Acb_ObjFindFanoutPushableIndex
(
p
,
iObj
);
//printf( "Object %4d : Pushing fanin %d (%d) into fanout %d.\n", iObj, Acb_ObjFanin(p, iObj, k2), k2, iFanout );
Acb_ObjPushToFanout
(
p
,
iObj
,
k2
,
iFanout
);
return
1
;
}
}
return
0
;
}
...
...
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