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
d1b9ade5
Commit
d1b9ade5
authored
Sep 02, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding switch 'ps -s' to skip counting buffers/inverters as nodes.
parent
b6cb626a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
13 deletions
+38
-13
src/base/abc/abc.h
+2
-1
src/base/abc/abcHie.c
+1
-1
src/base/abc/abcUtil.c
+20
-0
src/base/abci/abc.c
+11
-5
src/base/abci/abcMini.c
+1
-1
src/base/abci/abcPrint.c
+3
-3
src/base/io/ioUtil.c
+0
-2
No files found.
src/base/abc/abc.h
View file @
d1b9ade5
...
@@ -773,7 +773,7 @@ extern ABC_DLL void Abc_NtkDontCareFree( Odc_Man_t * p );
...
@@ -773,7 +773,7 @@ extern ABC_DLL void Abc_NtkDontCareFree( Odc_Man_t * p );
extern
ABC_DLL
int
Abc_NtkDontCareCompute
(
Odc_Man_t
*
p
,
Abc_Obj_t
*
pNode
,
Vec_Ptr_t
*
vLeaves
,
unsigned
*
puTruth
);
extern
ABC_DLL
int
Abc_NtkDontCareCompute
(
Odc_Man_t
*
p
,
Abc_Obj_t
*
pNode
,
Vec_Ptr_t
*
vLeaves
,
unsigned
*
puTruth
);
/*=== abcPrint.c ==========================================================*/
/*=== abcPrint.c ==========================================================*/
extern
ABC_DLL
float
Abc_NtkMfsTotalSwitching
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
float
Abc_NtkMfsTotalSwitching
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkPrintStats
(
Abc_Ntk_t
*
pNtk
,
int
fFactored
,
int
fSaveBest
,
int
fDumpResult
,
int
fUseLutLib
,
int
fPrintMuxes
,
int
fPower
,
int
fGlitch
);
extern
ABC_DLL
void
Abc_NtkPrintStats
(
Abc_Ntk_t
*
pNtk
,
int
fFactored
,
int
fSaveBest
,
int
fDumpResult
,
int
fUseLutLib
,
int
fPrintMuxes
,
int
fPower
,
int
fGlitch
,
int
fSkipBuf
);
extern
ABC_DLL
void
Abc_NtkPrintIo
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
,
int
fPrintFlops
);
extern
ABC_DLL
void
Abc_NtkPrintIo
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
,
int
fPrintFlops
);
extern
ABC_DLL
void
Abc_NtkPrintLatch
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkPrintLatch
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkPrintFanio
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkPrintFanio
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
);
...
@@ -959,6 +959,7 @@ extern ABC_DLL int Abc_NtkGetClauseNum( Abc_Ntk_t * pNtk );
...
@@ -959,6 +959,7 @@ extern ABC_DLL int Abc_NtkGetClauseNum( Abc_Ntk_t * pNtk );
extern
ABC_DLL
double
Abc_NtkGetMappedArea
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
double
Abc_NtkGetMappedArea
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkGetExorNum
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkGetExorNum
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkGetMuxNum
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkGetMuxNum
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkGetBufNum
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkGetChoiceNum
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkGetChoiceNum
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkGetFaninMax
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkGetFaninMax
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkGetTotalFanins
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkGetTotalFanins
(
Abc_Ntk_t
*
pNtk
);
...
...
src/base/abc/abcHie.c
View file @
d1b9ade5
...
@@ -469,7 +469,7 @@ void Abc_NtkPrintBoxInfo( Abc_Ntk_t * pNtk )
...
@@ -469,7 +469,7 @@ void Abc_NtkPrintBoxInfo( Abc_Ntk_t * pNtk )
Vec_IntAddToEntry
(
vCounts
,
Num
,
1
);
Vec_IntAddToEntry
(
vCounts
,
Num
,
1
);
}
}
// Abc_NtkPrintStats( pModel, 0, 0, 0, 0, 0, 0, 0 );
// Abc_NtkPrintStats( pModel, 0, 0, 0, 0, 0, 0, 0
, 0
);
printf
(
"MODULE "
);
printf
(
"MODULE "
);
printf
(
"%-30s : "
,
Abc_NtkName
(
pModel
)
);
printf
(
"%-30s : "
,
Abc_NtkName
(
pModel
)
);
printf
(
"PI=%6d "
,
Abc_NtkPiNum
(
pModel
)
);
printf
(
"PI=%6d "
,
Abc_NtkPiNum
(
pModel
)
);
...
...
src/base/abc/abcUtil.c
View file @
d1b9ade5
...
@@ -396,6 +396,26 @@ int Abc_NtkGetMuxNum( Abc_Ntk_t * pNtk )
...
@@ -396,6 +396,26 @@ int Abc_NtkGetMuxNum( Abc_Ntk_t * pNtk )
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Counts the number of exors.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_NtkGetBufNum
(
Abc_Ntk_t
*
pNtk
)
{
Abc_Obj_t
*
pNode
;
int
i
,
Counter
=
0
;
Abc_NtkForEachNode
(
pNtk
,
pNode
,
i
)
Counter
+=
(
Abc_ObjFaninNum
(
pNode
)
==
1
);
return
Counter
;
}
/**Function*************************************************************
Synopsis [Returns 1 if it is an AIG with choice nodes.]
Synopsis [Returns 1 if it is an AIG with choice nodes.]
Description []
Description []
...
...
src/base/abci/abc.c
View file @
d1b9ade5
...
@@ -1046,6 +1046,7 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -1046,6 +1046,7 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv )
int
fPrintMuxes
;
int
fPrintMuxes
;
int
fPower
;
int
fPower
;
int
fGlitch
;
int
fGlitch
;
int
fSkipBuf
;
int
c
;
int
c
;
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
...
@@ -1059,8 +1060,9 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -1059,8 +1060,9 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv )
fPrintMuxes
=
0
;
fPrintMuxes
=
0
;
fPower
=
0
;
fPower
=
0
;
fGlitch
=
0
;
fGlitch
=
0
;
fSkipBuf
=
0
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"fbdltmpgh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"fbdltmpg
s
h"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -1088,6 +1090,9 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -1088,6 +1090,9 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'g'
:
case
'g'
:
fGlitch
^=
1
;
fGlitch
^=
1
;
break
;
break
;
case
's'
:
fSkipBuf
^=
1
;
break
;
case
'h'
:
case
'h'
:
goto
usage
;
goto
usage
;
default:
default:
...
@@ -1105,7 +1110,7 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -1105,7 +1110,7 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Cannot print LUT delay for a non-logic network.
\n
"
);
Abc_Print
(
-
1
,
"Cannot print LUT delay for a non-logic network.
\n
"
);
return
1
;
return
1
;
}
}
Abc_NtkPrintStats
(
pNtk
,
fFactor
,
fSaveBest
,
fDumpResult
,
fUseLutLib
,
fPrintMuxes
,
fPower
,
fGlitch
);
Abc_NtkPrintStats
(
pNtk
,
fFactor
,
fSaveBest
,
fDumpResult
,
fUseLutLib
,
fPrintMuxes
,
fPower
,
fGlitch
,
fSkipBuf
);
if
(
fPrintTime
)
if
(
fPrintTime
)
{
{
pAbc
->
TimeTotal
+=
pAbc
->
TimeCommand
;
pAbc
->
TimeTotal
+=
pAbc
->
TimeCommand
;
...
@@ -1115,7 +1120,7 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -1115,7 +1120,7 @@ int Abc_CommandPrintStats( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: print_stats [-fbdltmpgh]
\n
"
);
Abc_Print
(
-
2
,
"usage: print_stats [-fbdltmpg
s
h]
\n
"
);
Abc_Print
(
-
2
,
"
\t
prints the network statistics
\n
"
);
Abc_Print
(
-
2
,
"
\t
prints the network statistics
\n
"
);
Abc_Print
(
-
2
,
"
\t
-f : toggles printing the literal count in the factored forms [default = %s]
\n
"
,
fFactor
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-f : toggles printing the literal count in the factored forms [default = %s]
\n
"
,
fFactor
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-b : toggles saving the best logic network in
\"
best.blif
\"
[default = %s]
\n
"
,
fSaveBest
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-b : toggles saving the best logic network in
\"
best.blif
\"
[default = %s]
\n
"
,
fSaveBest
?
"yes"
:
"no"
);
...
@@ -1124,7 +1129,8 @@ usage:
...
@@ -1124,7 +1129,8 @@ usage:
Abc_Print
(
-
2
,
"
\t
-t : toggles printing runtime statistics [default = %s]
\n
"
,
fPrintTime
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-t : toggles printing runtime statistics [default = %s]
\n
"
,
fPrintTime
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-m : toggles printing MUX statistics [default = %s]
\n
"
,
fPrintMuxes
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-m : toggles printing MUX statistics [default = %s]
\n
"
,
fPrintMuxes
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-p : toggles printing power dissipation due to switching [default = %s]
\n
"
,
fPower
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-p : toggles printing power dissipation due to switching [default = %s]
\n
"
,
fPower
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-q : toggles printing percentage of increased power due to glitching [default = %s]
\n
"
,
fGlitch
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-g : toggles printing percentage of increased power due to glitching [default = %s]
\n
"
,
fGlitch
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggles not counting single-output nodes as nodes [default = %s]
\n
"
,
fSkipBuf
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
return
1
;
}
}
...
@@ -1205,7 +1211,7 @@ int Abc_CommandPrintExdc( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -1205,7 +1211,7 @@ int Abc_CommandPrintExdc( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
else
else
Abc_Print
(
1
,
"EXDC network statistics:
\n
"
);
Abc_Print
(
1
,
"EXDC network statistics:
\n
"
);
Abc_NtkPrintStats
(
pNtk
->
pExdc
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
Abc_NtkPrintStats
(
pNtk
->
pExdc
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
return
0
;
return
0
;
usage:
usage:
src/base/abci/abcMini.c
View file @
d1b9ade5
...
@@ -195,7 +195,7 @@ void Abc_NtkMiniAigTest( Abc_Ntk_t * pNtk )
...
@@ -195,7 +195,7 @@ void Abc_NtkMiniAigTest( Abc_Ntk_t * pNtk )
p
=
Abc_NtkToMiniAig
(
pNtk
);
p
=
Abc_NtkToMiniAig
(
pNtk
);
pNtkNew
=
Abc_NtkFromMiniAig
(
p
);
pNtkNew
=
Abc_NtkFromMiniAig
(
p
);
Mini_AigStop
(
p
);
Mini_AigStop
(
p
);
Abc_NtkPrintStats
(
pNtkNew
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
Abc_NtkPrintStats
(
pNtkNew
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
Abc_NtkDelete
(
pNtkNew
);
Abc_NtkDelete
(
pNtkNew
);
// test dumping
// test dumping
...
...
src/base/abci/abcPrint.c
View file @
d1b9ade5
...
@@ -193,7 +193,7 @@ float Abc_NtkGetArea( Abc_Ntk_t * pNtk )
...
@@ -193,7 +193,7 @@ float Abc_NtkGetArea( Abc_Ntk_t * pNtk )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Abc_NtkPrintStats
(
Abc_Ntk_t
*
pNtk
,
int
fFactored
,
int
fSaveBest
,
int
fDumpResult
,
int
fUseLutLib
,
int
fPrintMuxes
,
int
fPower
,
int
fGlitch
)
void
Abc_NtkPrintStats
(
Abc_Ntk_t
*
pNtk
,
int
fFactored
,
int
fSaveBest
,
int
fDumpResult
,
int
fUseLutLib
,
int
fPrintMuxes
,
int
fPower
,
int
fGlitch
,
int
fSkipBuf
)
{
{
if
(
fPrintMuxes
&&
Abc_NtkIsStrash
(
pNtk
)
)
if
(
fPrintMuxes
&&
Abc_NtkIsStrash
(
pNtk
)
)
{
{
...
@@ -242,7 +242,7 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
...
@@ -242,7 +242,7 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
}
}
else
else
{
{
Abc_Print
(
1
,
" nd =%6d"
,
Abc_NtkNodeNum
(
pNtk
)
);
Abc_Print
(
1
,
" nd =%6d"
,
Abc_NtkNodeNum
(
pNtk
)
-
(
fSkipBuf
?
Abc_NtkGetBufNum
(
pNtk
)
:
0
)
);
Abc_Print
(
1
,
" edge =%7d"
,
Abc_NtkGetTotalFanins
(
pNtk
)
);
Abc_Print
(
1
,
" edge =%7d"
,
Abc_NtkGetTotalFanins
(
pNtk
)
);
}
}
...
@@ -386,7 +386,7 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
...
@@ -386,7 +386,7 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
fflush
(
stdout
);
fflush
(
stdout
);
if
(
pNtk
->
pExdc
)
if
(
pNtk
->
pExdc
)
Abc_NtkPrintStats
(
pNtk
->
pExdc
,
fFactored
,
fSaveBest
,
fDumpResult
,
fUseLutLib
,
fPrintMuxes
,
fPower
,
fGlitch
);
Abc_NtkPrintStats
(
pNtk
->
pExdc
,
fFactored
,
fSaveBest
,
fDumpResult
,
fUseLutLib
,
fPrintMuxes
,
fPower
,
fGlitch
,
fSkipBuf
);
}
}
/**Function*************************************************************
/**Function*************************************************************
...
...
src/base/io/ioUtil.c
View file @
d1b9ade5
...
@@ -261,8 +261,6 @@ Abc_Ntk_t * Io_Read( char * pFileName, Io_FileType_t FileType, int fCheck )
...
@@ -261,8 +261,6 @@ Abc_Ntk_t * Io_Read( char * pFileName, Io_FileType_t FileType, int fCheck )
// consider the case of BLIF-MV
// consider the case of BLIF-MV
if
(
Io_ReadFileType
(
pFileName
)
==
IO_FILE_BLIFMV
)
if
(
Io_ReadFileType
(
pFileName
)
==
IO_FILE_BLIFMV
)
{
{
//Abc_NtkPrintStats( stdout, pNtk, 0 );
// Io_WriteBlifMv( pNtk, "_temp_.mv" );
pNtk
=
Abc_NtkStrashBlifMv
(
pTemp
=
pNtk
);
pNtk
=
Abc_NtkStrashBlifMv
(
pTemp
=
pNtk
);
Abc_NtkDelete
(
pTemp
);
Abc_NtkDelete
(
pTemp
);
if
(
pNtk
==
NULL
)
if
(
pNtk
==
NULL
)
...
...
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