From 9b759067405c1a5e82c4424db642b6436dbc6647 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 28 Apr 2021 00:11:02 -0700 Subject: Several changes for standard mapping. --- src/map/scl/scl.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/map/scl') diff --git a/src/map/scl/scl.c b/src/map/scl/scl.c index 27342458..635ec19e 100644 --- a/src/map/scl/scl.c +++ b/src/map/scl/scl.c @@ -153,11 +153,12 @@ int Scl_CommandReadLib( Abc_Frame_t * pAbc, int argc, char ** argv ) float Gain = 0; int nGatesMin = 0; int fShortNames = 0; + int fUnit = 0; int fVerbose = 1; int fVeryVerbose = 0; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "SGMdnvwh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "SGMdnuvwh" ) ) != EOF ) { switch ( c ) { @@ -200,6 +201,9 @@ int Scl_CommandReadLib( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'n': fShortNames ^= 1; break; + case 'u': + fUnit ^= 1; + break; case 'v': fVerbose ^= 1; break; @@ -242,6 +246,12 @@ int Scl_CommandReadLib( Abc_Frame_t * pAbc, int argc, char ** argv ) // dump the resulting library if ( fDump && pAbc->pLibScl ) Abc_SclWriteLiberty( Extra_FileNameGenericAppend(pFileName, "_temp.lib"), (SC_Lib *)pAbc->pLibScl ); + if ( fUnit ) + { + SC_Cell * pCell; int i; + SC_LibForEachCell( pLib, pCell, i ) + pCell->area = 1; + } // extract genlib library if ( pAbc->pLibScl ) { @@ -251,13 +261,14 @@ int Scl_CommandReadLib( Abc_Frame_t * pAbc, int argc, char ** argv ) return 0; usage: - fprintf( pAbc->Err, "usage: read_lib [-SG float] [-M num] [-dnvwh] \n" ); + fprintf( pAbc->Err, "usage: read_lib [-SG float] [-M num] [-dnuvwh] \n" ); fprintf( pAbc->Err, "\t reads Liberty library from file\n" ); fprintf( pAbc->Err, "\t-S float : the slew parameter used to generate the library [default = %.2f]\n", Slew ); fprintf( pAbc->Err, "\t-G float : the gain parameter used to generate the library [default = %.2f]\n", Gain ); fprintf( pAbc->Err, "\t-M num : skip gate classes whose size is less than this [default = %d]\n", nGatesMin ); fprintf( pAbc->Err, "\t-d : toggle dumping the parsed library into file \"*_temp.lib\" [default = %s]\n", fDump? "yes": "no" ); fprintf( pAbc->Err, "\t-n : toggle replacing gate/pin names by short strings [default = %s]\n", fShortNames? "yes": "no" ); + fprintf( pAbc->Err, "\t-u : toggle setting unit area for all cells [default = %s]\n", fUnit? "yes": "no" ); fprintf( pAbc->Err, "\t-v : toggle writing verbose information [default = %s]\n", fVerbose? "yes": "no" ); fprintf( pAbc->Err, "\t-w : toggle writing information about skipped gates [default = %s]\n", fVeryVerbose? "yes": "no" ); fprintf( pAbc->Err, "\t-h : prints the command summary\n" ); -- cgit v1.2.3