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
34006708
Commit
34006708
authored
Aug 30, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handling constant nodes in gate sizing.
parent
b9a1c6ec
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
7 deletions
+11
-7
src/base/abc/abc.h
+3
-0
src/map/scl/sclLoad.c
+2
-2
src/map/scl/sclMan.h
+1
-1
src/map/scl/sclSize.c
+1
-1
src/map/scl/sclTime.c
+2
-1
src/map/scl/sclUtil.c
+2
-2
No files found.
src/base/abc/abc.h
View file @
34006708
...
@@ -463,6 +463,9 @@ static inline void Abc_ObjSetMvVar( Abc_Obj_t * pObj, void * pV) { Vec_At
...
@@ -463,6 +463,9 @@ static inline void Abc_ObjSetMvVar( Abc_Obj_t * pObj, void * pV) { Vec_At
#define Abc_NtkForEachNode( pNtk, pNode, i ) \
#define Abc_NtkForEachNode( pNtk, pNode, i ) \
for ( i = 0; (i < Vec_PtrSize((pNtk)->vObjs)) && (((pNode) = Abc_NtkObj(pNtk, i)), 1); i++ ) \
for ( i = 0; (i < Vec_PtrSize((pNtk)->vObjs)) && (((pNode) = Abc_NtkObj(pNtk, i)), 1); i++ ) \
if ( (pNode) == NULL || !Abc_ObjIsNode(pNode) ) {} else
if ( (pNode) == NULL || !Abc_ObjIsNode(pNode) ) {} else
#define Abc_NtkForEachNode1( pNtk, pNode, i ) \
for ( i = 0; (i < Vec_PtrSize((pNtk)->vObjs)) && (((pNode) = Abc_NtkObj(pNtk, i)), 1); i++ ) \
if ( (pNode) == NULL || !Abc_ObjIsNode(pNode) || !Abc_ObjFaninNum(pNode) ) {} else
#define Abc_NtkForEachNodeReverse( pNtk, pNode, i ) \
#define Abc_NtkForEachNodeReverse( pNtk, pNode, i ) \
for ( i = Vec_PtrSize((pNtk)->vObjs) - 1; (i >= 0) && (((pNode) = Abc_NtkObj(pNtk, i)), 1); i-- ) \
for ( i = Vec_PtrSize((pNtk)->vObjs) - 1; (i >= 0) && (((pNode) = Abc_NtkObj(pNtk, i)), 1); i-- ) \
if ( (pNode) == NULL || !Abc_ObjIsNode(pNode) ) {} else
if ( (pNode) == NULL || !Abc_ObjIsNode(pNode) ) {} else
...
...
src/map/scl/sclLoad.c
View file @
34006708
...
@@ -132,7 +132,7 @@ void Abc_SclComputeLoad( SC_Man * p )
...
@@ -132,7 +132,7 @@ void Abc_SclComputeLoad( SC_Man * p )
pLoad
->
rise
=
pLoad
->
fall
=
0
.
0
;
pLoad
->
rise
=
pLoad
->
fall
=
0
.
0
;
}
}
// add cell load
// add cell load
Abc_NtkForEachNode
(
p
->
pNtk
,
pObj
,
i
)
Abc_NtkForEachNode
1
(
p
->
pNtk
,
pObj
,
i
)
{
{
SC_Cell
*
pCell
=
Abc_SclObjCell
(
p
,
pObj
);
SC_Cell
*
pCell
=
Abc_SclObjCell
(
p
,
pObj
);
Abc_ObjForEachFanin
(
pObj
,
pFanin
,
k
)
Abc_ObjForEachFanin
(
pObj
,
pFanin
,
k
)
...
@@ -147,7 +147,7 @@ void Abc_SclComputeLoad( SC_Man * p )
...
@@ -147,7 +147,7 @@ void Abc_SclComputeLoad( SC_Man * p )
vWireCaps
=
Abc_SclFindWireCaps
(
p
);
vWireCaps
=
Abc_SclFindWireCaps
(
p
);
if
(
vWireCaps
)
if
(
vWireCaps
)
{
{
Abc_NtkForEachNode
(
p
->
pNtk
,
pObj
,
i
)
Abc_NtkForEachNode
1
(
p
->
pNtk
,
pObj
,
i
)
{
{
SC_Pair
*
pLoad
=
Abc_SclObjLoad
(
p
,
pObj
);
SC_Pair
*
pLoad
=
Abc_SclObjLoad
(
p
,
pObj
);
k
=
Abc_MinInt
(
Vec_FltSize
(
vWireCaps
)
-
1
,
Abc_ObjFanoutNum
(
pObj
)
);
k
=
Abc_MinInt
(
Vec_FltSize
(
vWireCaps
)
-
1
,
Abc_ObjFanoutNum
(
pObj
)
);
...
...
src/map/scl/sclMan.h
View file @
34006708
...
@@ -181,7 +181,7 @@ static inline float Abc_SclGetTotalArea( SC_Man * p )
...
@@ -181,7 +181,7 @@ static inline float Abc_SclGetTotalArea( SC_Man * p )
double
Area
=
0
;
double
Area
=
0
;
Abc_Obj_t
*
pObj
;
Abc_Obj_t
*
pObj
;
int
i
;
int
i
;
Abc_NtkForEachNode
(
p
->
pNtk
,
pObj
,
i
)
Abc_NtkForEachNode
1
(
p
->
pNtk
,
pObj
,
i
)
Area
+=
Abc_SclObjCell
(
p
,
pObj
)
->
area
;
Area
+=
Abc_SclObjCell
(
p
,
pObj
)
->
area
;
return
Area
;
return
Area
;
}
}
...
...
src/map/scl/sclSize.c
View file @
34006708
...
@@ -49,7 +49,7 @@ Vec_Int_t * Abc_SclCollectNodes( Abc_Ntk_t * p )
...
@@ -49,7 +49,7 @@ Vec_Int_t * Abc_SclCollectNodes( Abc_Ntk_t * p )
Abc_Obj_t
*
pObj
;
Abc_Obj_t
*
pObj
;
int
i
;
int
i
;
vRes
=
Vec_IntAlloc
(
Abc_NtkNodeNum
(
p
)
);
vRes
=
Vec_IntAlloc
(
Abc_NtkNodeNum
(
p
)
);
Abc_NtkForEachNode
(
p
,
pObj
,
i
)
Abc_NtkForEachNode
1
(
p
,
pObj
,
i
)
Vec_IntPush
(
vRes
,
i
);
Vec_IntPush
(
vRes
,
i
);
return
vRes
;
return
vRes
;
}
}
...
...
src/map/scl/sclTime.c
View file @
34006708
...
@@ -108,6 +108,7 @@ void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll )
...
@@ -108,6 +108,7 @@ void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll )
{
{
// printf( "Timing information for all nodes: \n" );
// printf( "Timing information for all nodes: \n" );
Abc_NtkForEachNodeReverse
(
p
->
pNtk
,
pObj
,
i
)
Abc_NtkForEachNodeReverse
(
p
->
pNtk
,
pObj
,
i
)
if
(
Abc_ObjFaninNum
(
pObj
)
>
0
)
Abc_SclTimeGatePrint
(
p
,
pObj
,
-
1
);
Abc_SclTimeGatePrint
(
p
,
pObj
,
-
1
);
}
}
else
else
...
@@ -238,7 +239,7 @@ void Abc_SclTimeNtk( SC_Man * p )
...
@@ -238,7 +239,7 @@ void Abc_SclTimeNtk( SC_Man * p )
{
{
Abc_Obj_t
*
pObj
;
Abc_Obj_t
*
pObj
;
int
i
;
int
i
;
Abc_NtkForEachNode
(
p
->
pNtk
,
pObj
,
i
)
Abc_NtkForEachNode
1
(
p
->
pNtk
,
pObj
,
i
)
Abc_SclTimeGate
(
p
,
pObj
);
Abc_SclTimeGate
(
p
,
pObj
);
Abc_NtkForEachCo
(
p
->
pNtk
,
pObj
,
i
)
Abc_NtkForEachCo
(
p
->
pNtk
,
pObj
,
i
)
Abc_SclObjDupFanin
(
p
,
pObj
);
Abc_SclObjDupFanin
(
p
,
pObj
);
...
...
src/map/scl/sclUtil.c
View file @
34006708
...
@@ -198,7 +198,7 @@ Vec_Int_t * Abc_SclManFindGates( SC_Lib * pLib, Abc_Ntk_t * p )
...
@@ -198,7 +198,7 @@ Vec_Int_t * Abc_SclManFindGates( SC_Lib * pLib, Abc_Ntk_t * p )
Abc_Obj_t
*
pObj
;
Abc_Obj_t
*
pObj
;
int
i
;
int
i
;
vVec
=
Vec_IntStartFull
(
Abc_NtkObjNumMax
(
p
)
);
vVec
=
Vec_IntStartFull
(
Abc_NtkObjNumMax
(
p
)
);
Abc_NtkForEachNode
(
p
,
pObj
,
i
)
Abc_NtkForEachNode
1
(
p
,
pObj
,
i
)
{
{
char
*
pName
=
Mio_GateReadName
((
Mio_Gate_t
*
)
pObj
->
pData
);
char
*
pName
=
Mio_GateReadName
((
Mio_Gate_t
*
)
pObj
->
pData
);
int
gateId
=
Abc_SclCellFind
(
pLib
,
pName
);
int
gateId
=
Abc_SclCellFind
(
pLib
,
pName
);
...
@@ -212,7 +212,7 @@ void Abc_SclManSetGates( SC_Lib * pLib, Abc_Ntk_t * p, Vec_Int_t * vGates )
...
@@ -212,7 +212,7 @@ void Abc_SclManSetGates( SC_Lib * pLib, Abc_Ntk_t * p, Vec_Int_t * vGates )
{
{
Abc_Obj_t
*
pObj
;
Abc_Obj_t
*
pObj
;
int
i
;
int
i
;
Abc_NtkForEachNode
(
p
,
pObj
,
i
)
Abc_NtkForEachNode
1
(
p
,
pObj
,
i
)
{
{
SC_Cell
*
pCell
=
SC_LibCell
(
pLib
,
Vec_IntEntry
(
vGates
,
Abc_ObjId
(
pObj
))
);
SC_Cell
*
pCell
=
SC_LibCell
(
pLib
,
Vec_IntEntry
(
vGates
,
Abc_ObjId
(
pObj
))
);
assert
(
pCell
->
n_inputs
==
Abc_ObjFaninNum
(
pObj
)
);
assert
(
pCell
->
n_inputs
==
Abc_ObjFaninNum
(
pObj
)
);
...
...
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