summaryrefslogtreecommitdiffstats
path: root/src/map/scl/scl.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-08-27 19:58:15 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-08-27 19:58:15 -0700
commit7772a4af05db1b2b0f21f7461cb6778349e4500c (patch)
treea77fdb404753d3287efda85356ed1eb766bac4be /src/map/scl/scl.c
parenta6bfd49591d73af7278ba3b85be86a55b04e55ab (diff)
downloadabc-7772a4af05db1b2b0f21f7461cb6778349e4500c.tar.gz
abc-7772a4af05db1b2b0f21f7461cb6778349e4500c.tar.bz2
abc-7772a4af05db1b2b0f21f7461cb6778349e4500c.zip
Added printout of library cells.
Diffstat (limited to 'src/map/scl/scl.c')
-rw-r--r--src/map/scl/scl.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/map/scl/scl.c b/src/map/scl/scl.c
index 58d87315..73cd6552 100644
--- a/src/map/scl/scl.c
+++ b/src/map/scl/scl.c
@@ -29,6 +29,7 @@ ABC_NAMESPACE_IMPL_START
static int Scl_CommandRead ( Abc_Frame_t * pAbc, int argc, char **argv );
static int Scl_CommandWrite( Abc_Frame_t * pAbc, int argc, char **argv );
+static int Scl_CommandPrint( Abc_Frame_t * pAbc, int argc, char **argv );
static int Scl_CommandStime( Abc_Frame_t * pAbc, int argc, char **argv );
static int Scl_CommandGsize( Abc_Frame_t * pAbc, int argc, char **argv );
@@ -51,6 +52,7 @@ void Scl_Init( Abc_Frame_t * pAbc )
{
Cmd_CommandAdd( pAbc, "SC mapping", "read_scl", Scl_CommandRead, 0 );
Cmd_CommandAdd( pAbc, "SC mapping", "write_scl", Scl_CommandWrite, 0 );
+ Cmd_CommandAdd( pAbc, "SC mapping", "print_scl", Scl_CommandPrint, 0 );
Cmd_CommandAdd( pAbc, "SC mapping", "stime", Scl_CommandStime, 0 );
Cmd_CommandAdd( pAbc, "SC mapping", "gsize", Scl_CommandGsize, 1 );
}
@@ -181,6 +183,49 @@ usage:
SeeAlso []
***********************************************************************/
+int Scl_CommandPrint( Abc_Frame_t * pAbc, int argc, char **argv )
+{
+ int c;
+
+ Extra_UtilGetoptReset();
+ while ( ( c = Extra_UtilGetopt( argc, argv, "h" ) ) != EOF )
+ {
+ switch ( c )
+ {
+ case 'h':
+ goto usage;
+ default:
+ goto usage;
+ }
+ }
+ if ( pAbc->pLibScl == NULL )
+ {
+ fprintf( pAbc->Err, "There is no Liberty library available.\n" );
+ return 1;
+ }
+
+ // save current library
+ Abc_SclPrintCells( pAbc->pLibScl );
+ return 0;
+
+usage:
+ fprintf( pAbc->Err, "usage: print_scl [-h]\n" );
+ fprintf( pAbc->Err, "\t prints statistics of Liberty library\n" );
+ fprintf( pAbc->Err, "\t-h : print the help massage\n" );
+ return 1;
+}
+
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
int Scl_CommandStime( Abc_Frame_t * pAbc, int argc, char **argv )
{
int c;