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
00bc4398
Commit
00bc4398
authored
Sep 08, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to the &ps.
parent
726a1d72
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
3 deletions
+50
-3
src/aig/gia/gia.h
+2
-0
src/aig/gia/giaIf.c
+37
-0
src/aig/gia/giaJf.c
+3
-1
src/aig/gia/giaMan.c
+2
-0
src/base/abci/abc.c
+6
-2
No files found.
src/aig/gia/gia.h
View file @
00bc4398
...
...
@@ -189,6 +189,7 @@ struct Gps_Par_t_
int
fSwitch
;
int
fCut
;
int
fNpn
;
int
fLutProf
;
};
typedef
struct
Emb_Par_t_
Emb_Par_t
;
...
...
@@ -1041,6 +1042,7 @@ extern int Gia_ManHashAndMulti( Gia_Man_t * p, Vec_Int_t * vLits
/*=== giaIf.c ===========================================================*/
extern
void
Gia_ManPrintMappingStats
(
Gia_Man_t
*
p
);
extern
void
Gia_ManPrintPackingStats
(
Gia_Man_t
*
p
);
extern
void
Gia_ManPrintLutStats
(
Gia_Man_t
*
p
);
extern
int
Gia_ManLutFaninCount
(
Gia_Man_t
*
p
);
extern
int
Gia_ManLutSizeMax
(
Gia_Man_t
*
p
);
extern
int
Gia_ManLutNum
(
Gia_Man_t
*
p
);
...
...
src/aig/gia/giaIf.c
View file @
00bc4398
...
...
@@ -312,6 +312,43 @@ void Gia_ManPrintPackingStats( Gia_Man_t * p )
Abc_Print
(
1
,
"
\n
"
);
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Gia_ManPrintNodeProfile
(
int
*
pCounts
,
int
nSizeMax
)
{
int
i
,
SizeAll
=
0
,
NodeAll
=
0
;
for
(
i
=
0
;
i
<=
nSizeMax
;
i
++
)
{
SizeAll
+=
i
*
pCounts
[
i
];
NodeAll
+=
pCounts
[
i
];
}
Abc_Print
(
1
,
"LUT = %d : "
,
NodeAll
);
for
(
i
=
2
;
i
<=
nSizeMax
;
i
++
)
Abc_Print
(
1
,
"%d=%d %.1f %% "
,
i
,
pCounts
[
i
],
100
.
0
*
pCounts
[
i
]
/
NodeAll
);
Abc_Print
(
1
,
"Ave = %.2f
\n
"
,
1
.
0
*
SizeAll
/
(
NodeAll
?
NodeAll
:
1
)
);
}
void
Gia_ManPrintLutStats
(
Gia_Man_t
*
p
)
{
int
i
,
nSizeMax
,
pCounts
[
33
]
=
{
0
};
nSizeMax
=
Gia_ManLutSizeMax
(
p
);
if
(
nSizeMax
>
32
)
{
Abc_Print
(
1
,
"The max LUT size (%d) is too large.
\n
"
,
nSizeMax
);
return
;
}
Gia_ManForEachLut
(
p
,
i
)
pCounts
[
Gia_ObjLutSize
(
p
,
i
)
]
++
;
Gia_ManPrintNodeProfile
(
pCounts
,
nSizeMax
);
}
/**Function*************************************************************
...
...
src/aig/gia/giaJf.c
View file @
00bc4398
...
...
@@ -781,7 +781,8 @@ void Jf_ManDeriveMapping( Jf_Man_t * p )
Vec_Int_t
*
vMapping
;
Gia_Obj_t
*
pObj
;
int
i
,
k
,
*
pCut
;
vMapping
=
Vec_IntStart
(
Gia_ManObjNum
(
p
->
pGia
)
);
vMapping
=
Vec_IntAlloc
(
Gia_ManObjNum
(
p
->
pGia
)
+
p
->
pPars
->
Edge
+
p
->
pPars
->
Area
*
2
);
Vec_IntFill
(
vMapping
,
Gia_ManObjNum
(
p
->
pGia
),
0
);
Gia_ManForEachAnd
(
p
->
pGia
,
pObj
,
i
)
{
if
(
Gia_ObjIsBuf
(
pObj
)
||
Gia_ObjRefNum
(
p
->
pGia
,
pObj
)
==
0
)
...
...
@@ -792,6 +793,7 @@ void Jf_ManDeriveMapping( Jf_Man_t * p )
Vec_IntPush
(
vMapping
,
pCut
[
k
]
);
Vec_IntPush
(
vMapping
,
i
);
}
assert
(
Vec_IntSize
(
vMapping
)
==
Vec_IntCap
(
vMapping
)
);
p
->
pGia
->
vMapping
=
vMapping
;
// Gia_ManMappingVerify( p->pGia );
}
...
...
src/aig/gia/giaMan.c
View file @
00bc4398
...
...
@@ -363,6 +363,8 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars )
Gia_ManPrintNpnClasses
(
p
);
if
(
p
->
vPacking
)
Gia_ManPrintPackingStats
(
p
);
if
(
pPars
&&
pPars
->
fLutProf
&&
Gia_ManHasMapping
(
p
)
)
Gia_ManPrintLutStats
(
p
);
if
(
p
->
pPlacement
)
Gia_ManPrintPlacement
(
p
);
if
(
p
->
pManTime
)
...
...
src/base/abci/abc.c
View file @
00bc4398
...
...
@@ -25268,7 +25268,7 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
int
c
;
memset
(
pPars
,
0
,
sizeof
(
Gps_Par_t
)
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"tpcnh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"tpcn
l
h"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -25284,6 +25284,9 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'n'
:
pPars
->
fNpn
^=
1
;
break
;
case
'l'
:
pPars
->
fLutProf
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
...
...
@@ -25299,12 +25302,13 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &ps [-tpcnh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &ps [-tpcn
l
h]
\n
"
);
Abc_Print
(
-
2
,
"
\t
prints stats of the current AIG
\n
"
);
Abc_Print
(
-
2
,
"
\t
-t : toggle printing BMC tents [default = %s]
\n
"
,
pPars
->
fTents
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-p : toggle printing switching activity [default = %s]
\n
"
,
pPars
->
fSwitch
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-c : toggle printing the size of frontier cut [default = %s]
\n
"
,
pPars
->
fCut
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-n : toggle printing NPN classes of functions [default = %s]
\n
"
,
pPars
->
fNpn
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-l : toggle printing LUT size profile [default = %s]
\n
"
,
pPars
->
fLutProf
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
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