summaryrefslogtreecommitdiffstats
path: root/src/base/abci
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-07-09 20:54:10 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2015-07-09 20:54:10 -0700
commit3aece535b93f7407a27e33bacb4599c38c3c16b8 (patch)
tree6f90ca209102d15db6a2ae2489fd2bc959eff85b /src/base/abci
parent10e0f3c58dbe344ea8f22e66e2658bda75b40d03 (diff)
downloadabc-3aece535b93f7407a27e33bacb4599c38c3c16b8.tar.gz
abc-3aece535b93f7407a27e33bacb4599c38c3c16b8.tar.bz2
abc-3aece535b93f7407a27e33bacb4599c38c3c16b8.zip
New TFI/TFO profiling code.
Diffstat (limited to 'src/base/abci')
-rw-r--r--src/base/abci/abc.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index de338264..06f5fe5d 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -950,7 +950,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd( pAbc, "ABC9", "&pfan", Abc_CommandAbc9PFan, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&psig", Abc_CommandAbc9PSig, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&status", Abc_CommandAbc9Status, 0 );
- Cmd_CommandAdd( pAbc, "ABC9", "&mux_profile", Abc_CommandAbc9MuxProfile, 0 );
+ Cmd_CommandAdd( pAbc, "ABC9", "&profile", Abc_CommandAbc9MuxProfile, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&show", Abc_CommandAbc9Show, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&setregnum", Abc_CommandAbc9SetRegNum, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&st", Abc_CommandAbc9Strash, 0 );
@@ -26726,12 +26726,27 @@ usage:
int Abc_CommandAbc9MuxProfile( Abc_Frame_t * pAbc, int argc, char ** argv )
{
extern void Gia_ManMuxProfiling( Gia_Man_t * p );
- int c;
+ extern void Gia_ManProfileStructures( Gia_Man_t * p, int nLimit, int fVerbose );
+ int c, nLimit = 0, fVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "h" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "Nvh" ) ) != EOF )
{
switch ( c )
{
+ case 'N':
+ if ( globalUtilOptind >= argc )
+ {
+ Abc_Print( -1, "Command line switch \"-N\" should be followed by an integer.\n" );
+ goto usage;
+ }
+ nLimit = atoi(argv[globalUtilOptind]);
+ globalUtilOptind++;
+ if ( nLimit < 0 )
+ goto usage;
+ break;
+ case 'v':
+ fVerbose ^= 1;
+ break;
case 'h':
goto usage;
default:
@@ -26743,12 +26758,17 @@ int Abc_CommandAbc9MuxProfile( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9MuxProfile(): There is no AIG.\n" );
return 1;
}
- Gia_ManMuxProfiling( pAbc->pGia );
+ if ( nLimit == 0 )
+ Gia_ManMuxProfiling( pAbc->pGia );
+ else
+ Gia_ManProfileStructures( pAbc->pGia, nLimit, fVerbose );
return 0;
usage:
- Abc_Print( -2, "usage: &mux_profile [-h]\n" );
+ Abc_Print( -2, "usage: &profile [-N num] [-vh]\n" );
Abc_Print( -2, "\t profile MUXes appearing in the design\n" );
+ Abc_Print( -2, "\t-N num : limit on class size to show [default = %d]\n", nLimit );
+ Abc_Print( -2, "\t-v : toggle verbose output [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
return 1;
}