summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2022-04-04 22:12:58 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2022-04-04 22:12:58 -0700
commite5e5e3545ba835d54386adf96419501c3c5d6dda (patch)
tree870f06eeef908dcc5359367e4b2ccafd154c0959 /src
parent7ad8f9548c359f92cd40afcf715a948acc6b6326 (diff)
downloadabc-e5e5e3545ba835d54386adf96419501c3c5d6dda.tar.gz
abc-e5e5e3545ba835d54386adf96419501c3c5d6dda.tar.bz2
abc-e5e5e3545ba835d54386adf96419501c3c5d6dda.zip
Added a switch to &dfs to perform levelized ordering.
Diffstat (limited to 'src')
-rw-r--r--src/base/abci/abc.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index db0446c9..34f15cf2 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -32624,9 +32624,10 @@ int Abc_CommandAbc9Dfs( Abc_Frame_t * pAbc, int argc, char ** argv )
int fNormal = 0;
int fRevFans = 0;
int fRevOuts = 0;
+ int fLeveled = 0;
int fVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "nfovh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "nfolvh" ) ) != EOF )
{
switch ( c )
{
@@ -32639,6 +32640,9 @@ int Abc_CommandAbc9Dfs( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'o':
fRevOuts ^= 1;
break;
+ case 'l':
+ fLeveled ^= 1;
+ break;
case 'v':
fVerbose ^= 1;
break;
@@ -32653,7 +32657,9 @@ int Abc_CommandAbc9Dfs( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Dfs(): There is no AIG.\n" );
return 1;
}
- if ( fNormal )
+ if ( fLeveled )
+ pTemp = Gia_ManDupLevelized( pAbc->pGia );
+ else if ( fNormal )
pTemp = Gia_ManDupOrderAiger( pAbc->pGia );
else
pTemp = Gia_ManDupOrderDfsReverse( pAbc->pGia, fRevFans, fRevOuts );
@@ -32661,12 +32667,13 @@ int Abc_CommandAbc9Dfs( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
usage:
- Abc_Print( -2, "usage: &dfs [-nfovh]\n" );
+ Abc_Print( -2, "usage: &dfs [-nfolvh]\n" );
Abc_Print( -2, "\t orders objects in the DFS order\n" );
- Abc_Print( -2, "\t-n : toggle using normalized ordering [default = %s]\n", fNormal? "yes": "no" );
- Abc_Print( -2, "\t-f : toggle using reverse fanin traversal order [default = %s]\n", fRevFans? "yes": "no" );
+ Abc_Print( -2, "\t-n : toggle using normalized ordering [default = %s]\n", fNormal? "yes": "no" );
+ Abc_Print( -2, "\t-f : toggle using reverse fanin traversal order [default = %s]\n", fRevFans? "yes": "no" );
Abc_Print( -2, "\t-o : toggle using reverse output traversal order [default = %s]\n", fRevOuts? "yes": "no" );
- Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
+ Abc_Print( -2, "\t-l : toggle using levelized order [default = %s]\n", fLeveled? "yes": "no" );
+ Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
return 1;
}