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
112f797c
Commit
112f797c
authored
Feb 11, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added switch -f to 'print_io' to suppress printing flops.
parent
c5067f7d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
src/base/abc/abc.h
+1
-1
src/base/abci/abc.c
+9
-5
src/base/abci/abcPrint.c
+4
-1
No files found.
src/base/abc/abc.h
View file @
112f797c
...
...
@@ -750,7 +750,7 @@ extern ABC_DLL int Abc_NtkDontCareCompute( Odc_Man_t * p, Abc_Obj
/*=== abcPrint.c ==========================================================*/
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_NtkPrintIo
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
);
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_NtkPrintFanio
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkPrintFanioNew
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
,
int
fMffc
);
...
...
src/base/abci/abc.c
View file @
112f797c
...
...
@@ -1088,14 +1088,17 @@ int Abc_CommandPrintIo( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
Abc_Obj_t
*
pNode
;
int
c
;
int
c
,
fPrintFlops
=
1
;
// set defaults
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"h"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
f
h"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'f'
:
fPrintFlops
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
...
...
@@ -1127,12 +1130,13 @@ int Abc_CommandPrintIo( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
}
// print the nodes
Abc_NtkPrintIo
(
stdout
,
pNtk
);
Abc_NtkPrintIo
(
stdout
,
pNtk
,
fPrintFlops
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: print_io [-h] <node>
\n
"
);
Abc_Print
(
-
2
,
"
\t
prints the PIs/POs or fanins/fanouts of a node
\n
"
);
Abc_Print
(
-
2
,
"usage: print_io [-fh] <node>
\n
"
);
Abc_Print
(
-
2
,
"
\t
prints the PIs/POs/flops or fanins/fanouts of a node
\n
"
);
Abc_Print
(
-
2
,
"
\t
-f : toggles printing flops [default = %s]
\n
"
,
fPrintFlops
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
node : the node to print fanins/fanouts
\n
"
);
return
1
;
...
...
src/base/abci/abcPrint.c
View file @
112f797c
...
...
@@ -395,7 +395,7 @@ void Abc_NtkPrintStats( Abc_Ntk_t * pNtk, int fFactored, int fSaveBest, int fDum
SeeAlso []
***********************************************************************/
void
Abc_NtkPrintIo
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
)
void
Abc_NtkPrintIo
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
,
int
fPrintFlops
)
{
Abc_Obj_t
*
pObj
;
int
i
;
...
...
@@ -411,6 +411,9 @@ void Abc_NtkPrintIo( FILE * pFile, Abc_Ntk_t * pNtk )
fprintf
(
pFile
,
" %s"
,
Abc_ObjName
(
pObj
)
);
fprintf
(
pFile
,
"
\n
"
);
if
(
!
fPrintFlops
)
return
;
fprintf
(
pFile
,
"Latches (%d): "
,
Abc_NtkLatchNum
(
pNtk
)
);
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
fprintf
(
pFile
,
" %s(%s=%s)"
,
Abc_ObjName
(
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