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
8866a1aa
Commit
8866a1aa
authored
Feb 13, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing performance problem in 'cone -s'
parent
f402293b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
10 deletions
+46
-10
src/base/abc/abc.h
+1
-0
src/base/abc/abcNtk.c
+16
-10
src/base/abc/abcObj.c
+29
-0
No files found.
src/base/abc/abc.h
View file @
8866a1aa
...
...
@@ -727,6 +727,7 @@ extern ABC_DLL Abc_Obj_t * Abc_ObjAlloc( Abc_Ntk_t * pNtk, Abc_ObjType_t
extern
ABC_DLL
void
Abc_ObjRecycle
(
Abc_Obj_t
*
pObj
);
extern
ABC_DLL
Abc_Obj_t
*
Abc_NtkCreateObj
(
Abc_Ntk_t
*
pNtk
,
Abc_ObjType_t
Type
);
extern
ABC_DLL
void
Abc_NtkDeleteObj
(
Abc_Obj_t
*
pObj
);
extern
ABC_DLL
void
Abc_NtkDeleteObjPo
(
Abc_Obj_t
*
pObj
);
extern
ABC_DLL
void
Abc_NtkDeleteObj_rec
(
Abc_Obj_t
*
pObj
,
int
fOnlyNodes
);
extern
ABC_DLL
void
Abc_NtkDeleteAll_rec
(
Abc_Obj_t
*
pObj
);
extern
ABC_DLL
Abc_Obj_t
*
Abc_NtkDupObj
(
Abc_Ntk_t
*
pNtkNew
,
Abc_Obj_t
*
pObj
,
int
fCopyName
);
...
...
src/base/abc/abcNtk.c
View file @
8866a1aa
...
...
@@ -1538,7 +1538,8 @@ void Abc_NtkMakeSeq( Abc_Ntk_t * pNtk, int nLatchesToAdd )
Abc_Ntk_t
*
Abc_NtkMakeOnePo
(
Abc_Ntk_t
*
pNtkInit
,
int
Output
,
int
nRange
)
{
Abc_Ntk_t
*
pNtk
;
Vec_Ptr_t
*
vPosToRemove
;
Vec_Ptr_t
*
vPosLeft
;
Vec_Ptr_t
*
vCosLeft
;
Abc_Obj_t
*
pNodePo
;
int
i
;
assert
(
!
Abc_NtkIsNetlist
(
pNtkInit
)
);
...
...
@@ -1556,17 +1557,22 @@ Abc_Ntk_t * Abc_NtkMakeOnePo( Abc_Ntk_t * pNtkInit, int Output, int nRange )
if
(
nRange
<
1
)
nRange
=
1
;
//
collect POs to remove
vPos
ToRemove
=
Vec_PtrAlloc
(
100
);
//
filter POs
vPos
Left
=
Vec_PtrAlloc
(
nRange
);
Abc_NtkForEachPo
(
pNtk
,
pNodePo
,
i
)
if
(
i
<
Output
||
i
>=
Output
+
nRange
)
Vec_PtrPush
(
vPosToRemove
,
pNodePo
);
// remove the POs
Vec_PtrForEachEntry
(
Abc_Obj_t
*
,
vPosToRemove
,
pNodePo
,
i
)
Abc_NtkDeleteObj
(
pNodePo
);
Vec_PtrFree
(
vPosToRemove
);
Abc_NtkDeleteObjPo
(
pNodePo
);
else
Vec_PtrPush
(
vPosLeft
,
pNodePo
);
// filter COs
vCosLeft
=
Vec_PtrDup
(
vPosLeft
);
for
(
i
=
Abc_NtkPoNum
(
pNtk
);
i
<
Abc_NtkCoNum
(
pNtk
);
i
++
)
Vec_PtrPush
(
vCosLeft
,
Abc_NtkCo
(
pNtk
,
i
)
);
// update arrays
Vec_PtrFree
(
pNtk
->
vPos
);
pNtk
->
vPos
=
vPosLeft
;
Vec_PtrFree
(
pNtk
->
vCos
);
pNtk
->
vCos
=
vCosLeft
;
// clean the network
if
(
Abc_NtkIsStrash
(
pNtk
)
)
{
Abc_AigCleanup
(
(
Abc_Aig_t
*
)
pNtk
->
pManFunc
);
...
...
src/base/abc/abcObj.c
View file @
8866a1aa
...
...
@@ -230,6 +230,35 @@ void Abc_NtkDeleteObj( Abc_Obj_t * pObj )
/**Function*************************************************************
Synopsis [Deletes the PO from the network.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Abc_NtkDeleteObjPo
(
Abc_Obj_t
*
pObj
)
{
assert
(
Abc_ObjIsPo
(
pObj
)
);
// remove from the table of names
if
(
Nm_ManFindNameById
(
pObj
->
pNtk
->
pManName
,
pObj
->
Id
)
)
Nm_ManDeleteIdName
(
pObj
->
pNtk
->
pManName
,
pObj
->
Id
);
// delete fanins
Abc_ObjDeleteFanin
(
pObj
,
Abc_ObjFanin0
(
pObj
)
);
// remove from the list of objects
Vec_PtrWriteEntry
(
pObj
->
pNtk
->
vObjs
,
pObj
->
Id
,
NULL
);
pObj
->
Id
=
(
1
<<
26
)
-
1
;
pObj
->
pNtk
->
nObjCounts
[
pObj
->
Type
]
--
;
pObj
->
pNtk
->
nObjs
--
;
// recycle the object memory
Abc_ObjRecycle
(
pObj
);
}
/**Function*************************************************************
Synopsis [Deletes the node and MFFC of the node.]
Description []
...
...
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