diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2020-11-22 23:02:35 -1000 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2020-11-22 23:02:35 -1000 |
commit | 22f36299aa6597cb5716bb73e94f56cd8f74ca04 (patch) | |
tree | e0e3acef4bfeb97ca093c6f00fcb4d095d4c6f9a /src/base/abci | |
parent | 2e92256fb7bb64454a9f2c7b0bf8d1020b0ac78f (diff) | |
download | abc-22f36299aa6597cb5716bb73e94f56cd8f74ca04.tar.gz abc-22f36299aa6597cb5716bb73e94f56cd8f74ca04.tar.bz2 abc-22f36299aa6597cb5716bb73e94f56cd8f74ca04.zip |
Added an option to keep PI/PO names unchanged in 'short_names'.
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abc.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 206e668c..144a6bd0 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -12196,13 +12196,16 @@ usage: int Abc_CommandShortNames( Abc_Frame_t * pAbc, int argc, char ** argv ) { Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc); - int c; + int c, fKeepIo = 0; // set defaults Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "h" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "kh" ) ) != EOF ) { switch ( c ) { + case 'k': + fKeepIo ^= 1; + break; case 'h': goto usage; default: @@ -12215,12 +12218,16 @@ int Abc_CommandShortNames( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Empty network.\n" ); return 1; } - Abc_NtkShortNames( pNtk ); + if ( fKeepIo ) + Abc_NtkCleanNames( pNtk ); + else + Abc_NtkShortNames( pNtk ); return 0; usage: - Abc_Print( -2, "usage: short_names [-h]\n" ); + Abc_Print( -2, "usage: short_names [-kh]\n" ); Abc_Print( -2, "\t replaces PI/PO/latch names by short char strings\n" ); + Abc_Print( -2, "\t-k : toggle keeping PI/PO names unchanged [default = %s]\n", fKeepIo? "yes": "no" ); Abc_Print( -2, "\t-h : print the command usage\n"); return 1; } |