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
f8a990de
Commit
f8a990de
authored
Apr 19, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding print-out of average level.
parent
1efdd372
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
src/aig/gia/giaIf.c
+5
-1
src/aig/gia/giaMan.c
+4
-1
src/aig/gia/giaUtil.c
+9
-0
No files found.
src/aig/gia/giaIf.c
View file @
f8a990de
...
...
@@ -306,8 +306,9 @@ int Gia_ManComputeOverlap( Gia_Man_t * p )
***********************************************************************/
void
Gia_ManPrintMappingStats
(
Gia_Man_t
*
p
,
char
*
pDumpFile
)
{
Gia_Obj_t
*
pObj
;
int
*
pLevels
;
int
i
,
k
,
iFan
,
nLutSize
=
0
,
nLuts
=
0
,
nFanins
=
0
,
LevelMax
=
0
;
int
i
,
k
,
iFan
,
nLutSize
=
0
,
nLuts
=
0
,
nFanins
=
0
,
LevelMax
=
0
,
Ave
=
0
;
if
(
!
Gia_ManHasMapping
(
p
)
)
return
;
pLevels
=
ABC_CALLOC
(
int
,
Gia_ManObjNum
(
p
)
);
...
...
@@ -321,11 +322,14 @@ void Gia_ManPrintMappingStats( Gia_Man_t * p, char * pDumpFile )
pLevels
[
i
]
++
;
LevelMax
=
Abc_MaxInt
(
LevelMax
,
pLevels
[
i
]
);
}
Gia_ManForEachCo
(
p
,
pObj
,
i
)
Ave
+=
pLevels
[
Gia_ObjFaninId0p
(
p
,
pObj
)];
ABC_FREE
(
pLevels
);
Abc_Print
(
1
,
"Mapping (K=%d) : "
,
nLutSize
);
Abc_Print
(
1
,
"lut =%7d "
,
nLuts
);
Abc_Print
(
1
,
"edge =%8d "
,
nFanins
);
Abc_Print
(
1
,
"lev =%5d "
,
LevelMax
);
Abc_Print
(
1
,
"(%.2f) "
,
(
float
)
Ave
/
Gia_ManCoNum
(
p
)
);
Abc_Print
(
1
,
"over =%5.1f %% "
,
100
.
0
*
Gia_ManComputeOverlap
(
p
)
/
Gia_ManAndNum
(
p
)
);
Abc_Print
(
1
,
"mem =%5.2f MB"
,
4
.
0
*
(
Gia_ManObjNum
(
p
)
+
2
*
nLuts
+
nFanins
)
/
(
1
<<
20
)
);
Abc_Print
(
1
,
"
\n
"
);
...
...
src/aig/gia/giaMan.c
View file @
f8a990de
...
...
@@ -379,6 +379,7 @@ void Gia_ManPrintChoiceStats( Gia_Man_t * p )
***********************************************************************/
void
Gia_ManPrintStats
(
Gia_Man_t
*
p
,
Gps_Par_t
*
pPars
)
{
extern
float
Gia_ManLevelAve
(
Gia_Man_t
*
p
);
if
(
p
->
pName
)
Abc_Print
(
1
,
"%-8s : "
,
p
->
pName
);
Abc_Print
(
1
,
"i/o =%7d/%7d"
,
Gia_ManPiNum
(
p
),
Gia_ManPoNum
(
p
)
);
...
...
@@ -387,7 +388,9 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars )
if
(
Gia_ManRegNum
(
p
)
)
Abc_Print
(
1
,
" ff =%7d"
,
Gia_ManRegNum
(
p
)
);
Abc_Print
(
1
,
" %s =%8d"
,
p
->
pMuxes
?
"nod"
:
"and"
,
Gia_ManAndNum
(
p
)
);
Abc_Print
(
1
,
" lev =%5d"
,
Gia_ManLevelNum
(
p
)
);
Vec_IntFreeP
(
&
p
->
vLevels
);
Abc_Print
(
1
,
" lev =%5d"
,
Gia_ManLevelNum
(
p
)
);
Abc_Print
(
1
,
" (%.2f)"
,
Gia_ManLevelAve
(
p
)
);
Vec_IntFreeP
(
&
p
->
vLevels
);
if
(
pPars
&&
pPars
->
fCut
)
Abc_Print
(
1
,
" cut = %d(%d)"
,
Gia_ManCrossCut
(
p
,
0
),
Gia_ManCrossCut
(
p
,
1
)
);
Abc_Print
(
1
,
" mem =%5.2f MB"
,
Gia_ManMemory
(
p
)
/
(
1
<<
20
)
);
...
...
src/aig/gia/giaUtil.c
View file @
f8a990de
...
...
@@ -510,6 +510,15 @@ int Gia_ManLevelNum( Gia_Man_t * p )
}
return
p
->
nLevels
;
}
float
Gia_ManLevelAve
(
Gia_Man_t
*
p
)
{
Gia_Obj_t
*
pObj
;
int
i
,
Ave
=
0
;
assert
(
p
->
vLevels
);
Gia_ManForEachCo
(
p
,
pObj
,
i
)
Ave
+=
Gia_ObjLevel
(
p
,
pObj
);
return
(
float
)
Ave
/
Gia_ManCoNum
(
p
);
}
/**Function*************************************************************
...
...
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