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
58d28539
Commit
58d28539
authored
Dec 21, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gate sizing with barrier buffers.
parent
fa32acde
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
123 additions
and
1 deletions
+123
-1
src/base/abc/abc.h
+2
-0
src/base/abc/abcDfs.c
+25
-0
src/base/abc/abcNtk.c
+44
-0
src/map/scl/sclSize.h
+1
-0
src/map/scl/sclUpsize.c
+24
-1
src/map/scl/sclUtil.c
+27
-0
No files found.
src/base/abc/abc.h
View file @
58d28539
...
...
@@ -610,6 +610,7 @@ extern ABC_DLL Abc_Ntk_t * Abc_NtkDarLatchSweep( Abc_Ntk_t * pNtk, int fL
extern
ABC_DLL
float
Abc_NtkDelayTraceLut
(
Abc_Ntk_t
*
pNtk
,
int
fUseLutLib
);
/*=== abcDfs.c ==========================================================*/
extern
ABC_DLL
Vec_Ptr_t
*
Abc_NtkDfs
(
Abc_Ntk_t
*
pNtk
,
int
fCollectAll
);
extern
ABC_DLL
Vec_Ptr_t
*
Abc_NtkDfs2
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Vec_Ptr_t
*
Abc_NtkDfsNodes
(
Abc_Ntk_t
*
pNtk
,
Abc_Obj_t
**
ppNodes
,
int
nNodes
);
extern
ABC_DLL
Vec_Ptr_t
*
Abc_NtkDfsReverse
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Vec_Ptr_t
*
Abc_NtkDfsReverseNodes
(
Abc_Ntk_t
*
pNtk
,
Abc_Obj_t
**
ppNodes
,
int
nNodes
);
...
...
@@ -755,6 +756,7 @@ extern ABC_DLL Abc_Ntk_t * Abc_NtkStartRead( char * pName );
extern
ABC_DLL
void
Abc_NtkFinalizeRead
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkDup
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkDupDfs
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkDupDfsNoBarBufs
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkDupTransformMiter
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkCreateCone
(
Abc_Ntk_t
*
pNtk
,
Abc_Obj_t
*
pNode
,
char
*
pNodeName
,
int
fUseAllCis
);
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkCreateConeArray
(
Abc_Ntk_t
*
pNtk
,
Vec_Ptr_t
*
vRoots
,
int
fUseAllCis
);
...
...
src/base/abc/abcDfs.c
View file @
58d28539
...
...
@@ -110,6 +110,31 @@ Vec_Ptr_t * Abc_NtkDfs( Abc_Ntk_t * pNtk, int fCollectAll )
Synopsis [Returns the DFS ordered array of logic nodes.]
Description [Collects only the internal nodes, leaving out CIs and CO.
However it marks with the current TravId both CIs and COs.]
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Ptr_t
*
Abc_NtkDfs2
(
Abc_Ntk_t
*
pNtk
)
{
Vec_Ptr_t
*
vNodes
=
Vec_PtrAlloc
(
100
);
Abc_Obj_t
*
pObj
;
int
i
;
Abc_NtkIncrementTravId
(
pNtk
);
Abc_NtkForEachCo
(
pNtk
,
pObj
,
i
)
{
Abc_NodeSetTravIdCurrent
(
pObj
);
Abc_NtkDfs_rec
(
Abc_ObjFanin0Ntk
(
Abc_ObjFanin0
(
pObj
)),
vNodes
);
}
return
vNodes
;
}
/**Function*************************************************************
Synopsis [Returns the DFS ordered array of logic nodes.]
Description [Collects only the internal nodes, leaving out PIs, POs and latches.]
SideEffects []
...
...
src/base/abc/abcNtk.c
View file @
58d28539
...
...
@@ -513,6 +513,50 @@ Abc_Ntk_t * Abc_NtkDupDfs( Abc_Ntk_t * pNtk )
pNtk
->
pCopy
=
pNtkNew
;
return
pNtkNew
;
}
Abc_Ntk_t
*
Abc_NtkDupDfsNoBarBufs
(
Abc_Ntk_t
*
pNtk
)
{
Vec_Ptr_t
*
vNodes
;
Abc_Ntk_t
*
pNtkNew
;
Abc_Obj_t
*
pObj
,
*
pFanin
;
int
i
,
k
;
if
(
pNtk
==
NULL
)
return
NULL
;
assert
(
Abc_NtkIsLogic
(
pNtk
)
);
assert
(
pNtk
->
nBarBufs2
>
0
);
// start the network
pNtkNew
=
Abc_NtkStartFrom
(
pNtk
,
pNtk
->
ntkType
,
pNtk
->
ntkFunc
);
// copy the internal nodes
vNodes
=
Abc_NtkDfs2
(
pNtk
);
Vec_PtrForEachEntry
(
Abc_Obj_t
*
,
vNodes
,
pObj
,
i
)
if
(
Abc_ObjIsBarBuf
(
pObj
)
)
pObj
->
pCopy
=
Abc_ObjFanin0
(
pObj
)
->
pCopy
;
else
Abc_NtkDupObj
(
pNtkNew
,
pObj
,
0
);
Vec_PtrFree
(
vNodes
);
// reconnect all objects (no need to transfer attributes on edges)
Abc_NtkForEachObj
(
pNtk
,
pObj
,
i
)
if
(
!
Abc_ObjIsBox
(
pObj
)
&&
!
Abc_ObjIsBo
(
pObj
)
&&
!
Abc_ObjIsBarBuf
(
pObj
)
)
Abc_ObjForEachFanin
(
pObj
,
pFanin
,
k
)
if
(
pObj
->
pCopy
&&
pFanin
->
pCopy
)
Abc_ObjAddFanin
(
pObj
->
pCopy
,
pFanin
->
pCopy
);
// duplicate the EXDC Ntk
if
(
pNtk
->
pExdc
)
pNtkNew
->
pExdc
=
Abc_NtkDup
(
pNtk
->
pExdc
);
if
(
pNtk
->
pExcare
)
pNtkNew
->
pExcare
=
Abc_NtkDup
(
(
Abc_Ntk_t
*
)
pNtk
->
pExcare
);
// duplicate timing manager
if
(
pNtk
->
pManTime
)
Abc_NtkTimeInitialize
(
pNtkNew
,
pNtk
);
if
(
pNtk
->
vPhases
)
Abc_NtkTransferPhases
(
pNtkNew
,
pNtk
);
if
(
pNtk
->
pWLoadUsed
)
pNtkNew
->
pWLoadUsed
=
Abc_UtilStrsav
(
pNtk
->
pWLoadUsed
);
// check correctness
if
(
!
Abc_NtkCheck
(
pNtkNew
)
)
fprintf
(
stdout
,
"Abc_NtkDup(): Network check has failed.
\n
"
);
pNtk
->
pCopy
=
pNtkNew
;
return
pNtkNew
;
}
/**Function*************************************************************
...
...
src/map/scl/sclSize.h
View file @
58d28539
...
...
@@ -577,6 +577,7 @@ extern void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_S
/*=== sclUtil.c ===============================================================*/
extern
void
Abc_SclMioGates2SclGates
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
p
);
extern
void
Abc_SclSclGates2MioGates
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
p
);
extern
void
Abc_SclTransferGates
(
Abc_Ntk_t
*
pOld
,
Abc_Ntk_t
*
pNew
);
extern
void
Abc_SclPrintGateSizes
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
p
);
extern
void
Abc_SclMinsizePerform
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
p
,
int
fUseMax
,
int
fVerbose
);
extern
int
Abc_SclCountMinSize
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
p
,
int
fUseMax
);
...
...
src/map/scl/sclUpsize.c
View file @
58d28539
...
...
@@ -865,7 +865,7 @@ void Abc_SclUpsizeRemoveDangling( SC_Man * p, Abc_Ntk_t * pNtk )
SeeAlso []
***********************************************************************/
void
Abc_SclUpsizePerform
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
SC_SizePars
*
pPars
)
void
Abc_SclUpsizePerform
Int
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
SC_SizePars
*
pPars
)
{
SC_Man
*
p
;
Vec_Int_t
*
vPathPos
=
NULL
;
// critical POs
...
...
@@ -1013,6 +1013,29 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars
// Abc_NtkCleanMarkAB( pNtk );
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Abc_SclUpsizePerform
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
SC_SizePars
*
pPars
)
{
Abc_Ntk_t
*
pNtkNew
=
pNtk
;
if
(
pNtk
->
nBarBufs2
>
0
)
pNtkNew
=
Abc_NtkDupDfsNoBarBufs
(
pNtk
);
Abc_SclUpsizePerformInt
(
pLib
,
pNtkNew
,
pPars
);
if
(
pNtk
->
nBarBufs2
>
0
)
Abc_SclTransferGates
(
pNtk
,
pNtkNew
);
if
(
pNtk
->
nBarBufs2
>
0
)
Abc_NtkDelete
(
pNtkNew
);
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
src/map/scl/sclUtil.c
View file @
58d28539
...
...
@@ -96,6 +96,33 @@ void Abc_SclSclGates2MioGates( SC_Lib * pLib, Abc_Ntk_t * p )
/**Function*************************************************************
Synopsis [Transfer gate sizes from AIG without barbufs.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Abc_SclTransferGates
(
Abc_Ntk_t
*
pOld
,
Abc_Ntk_t
*
pNew
)
{
Abc_Obj_t
*
pObj
;
int
i
;
assert
(
pOld
->
nBarBufs2
>
0
);
assert
(
pNew
->
nBarBufs2
==
0
);
Abc_NtkForEachNode
(
pOld
,
pObj
,
i
)
{
if
(
pObj
->
pCopy
==
NULL
)
continue
;
if
(
Abc_ObjIsBarBuf
(
pObj
)
)
continue
;
assert
(
Abc_ObjNtk
(
pObj
->
pCopy
)
==
pNew
);
pObj
->
pData
=
pObj
->
pCopy
->
pData
;
}
}
/**Function*************************************************************
Synopsis [Reports percentage of gates of each size.]
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