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
b5bde05a
Commit
b5bde05a
authored
Mar 09, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Passing file name for stats print-out in &ps.
parent
f98b58e6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
19 deletions
+24
-19
src/aig/gia/gia.h
+2
-2
src/aig/gia/giaIf.c
+3
-4
src/aig/gia/giaMan.c
+1
-1
src/base/abci/abc.c
+18
-12
No files found.
src/aig/gia/gia.h
View file @
b5bde05a
...
@@ -195,7 +195,7 @@ struct Gps_Par_t_
...
@@ -195,7 +195,7 @@ struct Gps_Par_t_
int
fCut
;
int
fCut
;
int
fNpn
;
int
fNpn
;
int
fLutProf
;
int
fLutProf
;
int
f
DumpFile
;
char
*
p
DumpFile
;
};
};
typedef
struct
Emb_Par_t_
Emb_Par_t
;
typedef
struct
Emb_Par_t_
Emb_Par_t
;
...
@@ -1089,7 +1089,7 @@ extern void Gia_ManHashProfile( Gia_Man_t * p );
...
@@ -1089,7 +1089,7 @@ extern void Gia_ManHashProfile( Gia_Man_t * p );
extern
int
Gia_ManHashLookup
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
p0
,
Gia_Obj_t
*
p1
);
extern
int
Gia_ManHashLookup
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
p0
,
Gia_Obj_t
*
p1
);
extern
int
Gia_ManHashAndMulti
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vLits
);
extern
int
Gia_ManHashAndMulti
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vLits
);
/*=== giaIf.c ===========================================================*/
/*=== giaIf.c ===========================================================*/
extern
void
Gia_ManPrintMappingStats
(
Gia_Man_t
*
p
,
int
f
DumpFile
);
extern
void
Gia_ManPrintMappingStats
(
Gia_Man_t
*
p
,
char
*
p
DumpFile
);
extern
void
Gia_ManPrintPackingStats
(
Gia_Man_t
*
p
);
extern
void
Gia_ManPrintPackingStats
(
Gia_Man_t
*
p
);
extern
void
Gia_ManPrintLutStats
(
Gia_Man_t
*
p
);
extern
void
Gia_ManPrintLutStats
(
Gia_Man_t
*
p
);
extern
int
Gia_ManLutFaninCount
(
Gia_Man_t
*
p
);
extern
int
Gia_ManLutFaninCount
(
Gia_Man_t
*
p
);
...
...
src/aig/gia/giaIf.c
View file @
b5bde05a
...
@@ -305,7 +305,7 @@ int Gia_ManComputeOverlap( Gia_Man_t * p )
...
@@ -305,7 +305,7 @@ int Gia_ManComputeOverlap( Gia_Man_t * p )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Gia_ManPrintMappingStats
(
Gia_Man_t
*
p
,
int
f
DumpFile
)
void
Gia_ManPrintMappingStats
(
Gia_Man_t
*
p
,
char
*
p
DumpFile
)
{
{
int
*
pLevels
;
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
;
...
@@ -331,12 +331,11 @@ void Gia_ManPrintMappingStats( Gia_Man_t * p, int fDumpFile )
...
@@ -331,12 +331,11 @@ void Gia_ManPrintMappingStats( Gia_Man_t * p, int fDumpFile )
Abc_Print
(
1
,
"mem =%5.2f MB"
,
4
.
0
*
(
Gia_ManObjNum
(
p
)
+
2
*
nLuts
+
nFanins
)
/
(
1
<<
20
)
);
Abc_Print
(
1
,
"mem =%5.2f MB"
,
4
.
0
*
(
Gia_ManObjNum
(
p
)
+
2
*
nLuts
+
nFanins
)
/
(
1
<<
20
)
);
Abc_Print
(
1
,
"
\n
"
);
Abc_Print
(
1
,
"
\n
"
);
if
(
f
DumpFile
)
if
(
p
DumpFile
)
{
{
char
*
pFileName
=
"stats_map.txt"
;
static
char
FileNameOld
[
1000
]
=
{
0
};
static
char
FileNameOld
[
1000
]
=
{
0
};
static
abctime
clk
=
0
;
static
abctime
clk
=
0
;
FILE
*
pTable
=
fopen
(
p
FileNam
e
,
"a+"
);
FILE
*
pTable
=
fopen
(
p
DumpFil
e
,
"a+"
);
if
(
strcmp
(
FileNameOld
,
p
->
pName
)
)
if
(
strcmp
(
FileNameOld
,
p
->
pName
)
)
{
{
sprintf
(
FileNameOld
,
"%s"
,
p
->
pName
);
sprintf
(
FileNameOld
,
"%s"
,
p
->
pName
);
...
...
src/aig/gia/giaMan.c
View file @
b5bde05a
...
@@ -369,7 +369,7 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars )
...
@@ -369,7 +369,7 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars )
if
(
p
->
pSibls
)
if
(
p
->
pSibls
)
Gia_ManPrintChoiceStats
(
p
);
Gia_ManPrintChoiceStats
(
p
);
if
(
Gia_ManHasMapping
(
p
)
)
if
(
Gia_ManHasMapping
(
p
)
)
Gia_ManPrintMappingStats
(
p
,
pPars
&&
pPars
->
fDumpFile
);
Gia_ManPrintMappingStats
(
p
,
pPars
?
pPars
->
pDumpFile
:
NULL
);
if
(
pPars
&&
pPars
->
fNpn
&&
Gia_ManHasMapping
(
p
)
&&
Gia_ManLutSizeMax
(
p
)
<=
4
)
if
(
pPars
&&
pPars
->
fNpn
&&
Gia_ManHasMapping
(
p
)
&&
Gia_ManLutSizeMax
(
p
)
<=
4
)
Gia_ManPrintNpnClasses
(
p
);
Gia_ManPrintNpnClasses
(
p
);
if
(
p
->
vPacking
)
if
(
p
->
vPacking
)
...
...
src/base/abci/abc.c
View file @
b5bde05a
...
@@ -25083,7 +25083,7 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -25083,7 +25083,7 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
int
c
;
int
c
;
memset
(
pPars
,
0
,
sizeof
(
Gps_Par_t
)
);
memset
(
pPars
,
0
,
sizeof
(
Gps_Par_t
)
);
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
tpcnld
h"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
Dtpcnl
h"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -25102,8 +25102,14 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -25102,8 +25102,14 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'l'
:
case
'l'
:
pPars
->
fLutProf
^=
1
;
pPars
->
fLutProf
^=
1
;
break
;
break
;
case
'd'
:
case
'D'
:
pPars
->
fDumpFile
^=
1
;
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-D
\"
should be followed by a file name.
\n
"
);
goto
usage
;
}
pPars
->
pDumpFile
=
argv
[
globalUtilOptind
];
globalUtilOptind
++
;
break
;
break
;
case
'h'
:
case
'h'
:
goto
usage
;
goto
usage
;
...
@@ -25120,15 +25126,15 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -25120,15 +25126,15 @@ int Abc_CommandAbc9Ps( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &ps [-tpcnl
dh
]
\n
"
);
Abc_Print
(
-
2
,
"usage: &ps [-tpcnl
h] [-D file
]
\n
"
);
Abc_Print
(
-
2
,
"
\t
prints stats of the current AIG
\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
-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
-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
-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
-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
-l
: toggle printing LUT size profile [default = %s]
\n
"
,
pPars
->
fLutProf
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-
d : toggle dumping statistics into a file [default = %s]
\n
"
,
pPars
->
fDumpFile
?
"yes"
:
"no
"
);
Abc_Print
(
-
2
,
"
\t
-
D file : file name to dump statistics [default = none]
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h
: print the command usage
\n
"
);
return
1
;
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