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
7a78e303
Commit
7a78e303
authored
May 05, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New fast extract.
parent
a1ceb761
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
1 deletions
+48
-1
src/base/abc/abcUtil.c
+47
-0
src/base/abci/abc.c
+1
-1
src/base/abci/abcFx.c
+0
-0
No files found.
src/base/abc/abcUtil.c
View file @
7a78e303
...
...
@@ -2684,6 +2684,53 @@ int Abc_NtkIsTopo( Abc_Ntk_t * pNtk )
return
(
int
)(
Counter
==
0
);
}
/**Function*************************************************************
Synopsis [Reroders fanins of the network.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Abc_NtkOrderFanins
(
Abc_Ntk_t
*
pNtk
)
{
Vec_Int_t
*
vOrder
;
Abc_Obj_t
*
pNode
;
char
*
pSop
,
*
pSopNew
;
char
*
pCube
,
*
pCubeNew
;
int
nVars
,
i
,
v
,
*
pOrder
;
assert
(
Abc_NtkIsSopLogic
(
pNtk
)
);
vOrder
=
Vec_IntAlloc
(
100
);
Abc_NtkForEachNode
(
pNtk
,
pNode
,
i
)
{
pSop
=
(
char
*
)
pNode
->
pData
;
nVars
=
Abc_SopGetVarNum
(
pSop
);
assert
(
nVars
==
Abc_ObjFaninNum
(
pNode
)
);
Vec_IntClear
(
vOrder
);
for
(
v
=
0
;
v
<
nVars
;
v
++
)
Vec_IntPush
(
vOrder
,
v
);
pOrder
=
Vec_IntArray
(
vOrder
);
Vec_IntSelectSortCost
(
pOrder
,
nVars
,
&
pNode
->
vFanins
);
pSopNew
=
pCubeNew
=
Abc_SopStart
(
(
Mem_Flex_t
*
)
pNtk
->
pManFunc
,
Abc_SopGetCubeNum
(
pSop
),
nVars
);
Abc_SopForEachCube
(
pSop
,
nVars
,
pCube
)
{
for
(
v
=
0
;
v
<
nVars
;
v
++
)
if
(
pCube
[
pOrder
[
v
]]
==
'0'
)
pCubeNew
[
v
]
=
'0'
;
else
if
(
pCube
[
pOrder
[
v
]]
==
'1'
)
pCubeNew
[
v
]
=
'1'
;
pCubeNew
+=
nVars
+
3
;
}
pNode
->
pData
=
pSopNew
;
Vec_IntSort
(
&
pNode
->
vFanins
,
0
);
// Vec_IntPrint( vOrder );
}
Vec_IntFree
(
vOrder
);
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
src/base/abci/abc.c
View file @
7a78e303
...
...
@@ -3530,7 +3530,7 @@ int Abc_CommandFastExtract( Abc_Frame_t * pAbc, int argc, char ** argv )
extern
int
Abc_NtkFxPerform
(
Abc_Ntk_t
*
pNtk
,
int
fVerbose
);
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Fxu_Data_t
Params
,
*
p
=
&
Params
;
int
c
,
fNewAlgo
=
0
;
int
c
,
fNewAlgo
=
1
;
// set the defaults
Abc_NtkSetDefaultParams
(
p
);
Extra_UtilGetoptReset
();
...
...
src/base/abci/abcFx.c
View file @
7a78e303
This diff is collapsed.
Click to expand it.
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