diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-01-26 22:22:22 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-01-26 22:22:22 -0800 |
commit | c2b805dc85fa3c6e96cac04fa1d8ea182e9aab62 (patch) | |
tree | 7aaac0b835e1fad82b8983a164e7e2f39193388a /src/base/wlc/wlcCom.c | |
parent | 64d7119ddc7fb1720542b8071f490763466a5d31 (diff) | |
download | abc-c2b805dc85fa3c6e96cac04fa1d8ea182e9aab62.tar.gz abc-c2b805dc85fa3c6e96cac04fa1d8ea182e9aab62.tar.bz2 abc-c2b805dc85fa3c6e96cac04fa1d8ea182e9aab62.zip |
Adding visualization of word-level networks Wlc_Ntk_t.
Diffstat (limited to 'src/base/wlc/wlcCom.c')
-rw-r--r-- | src/base/wlc/wlcCom.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/src/base/wlc/wlcCom.c b/src/base/wlc/wlcCom.c index 9f36ad56..82321d3b 100644 --- a/src/base/wlc/wlcCom.c +++ b/src/base/wlc/wlcCom.c @@ -364,10 +364,10 @@ usage: int Abc_CommandCone( Abc_Frame_t * pAbc, int argc, char ** argv ) { Wlc_Ntk_t * pNtk = Wlc_AbcGetNtk(pAbc); - int c, iOutput = -1, fSeq = 0, fVerbose = 0; + int c, iOutput = -1, Range = 1, fAllPis = 0, fSeq = 0, fVerbose = 0; char * pName; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "Osvh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "ORisvh" ) ) != EOF ) { switch ( c ) { @@ -382,6 +382,20 @@ int Abc_CommandCone( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( iOutput < 0 ) goto usage; break; + case 'R': + if ( globalUtilOptind >= argc ) + { + Abc_Print( -1, "Command line switch \"-R\" should be followed by an integer.\n" ); + goto usage; + } + Range = atoi(argv[globalUtilOptind]); + globalUtilOptind++; + if ( Range < 0 ) + goto usage; + break; + case 'i': + fAllPis ^= 1; + break; case 's': fSeq ^= 1; break; @@ -406,16 +420,18 @@ int Abc_CommandCone( Abc_Frame_t * pAbc, int argc, char ** argv ) } printf( "Extracting output %d as a %s word-level network.\n", iOutput, fSeq ? "sequential" : "combinational" ); pName = Wlc_NtkNewName( pNtk, iOutput, fSeq ); - Wlc_NtkMarkCone( pNtk, iOutput, fSeq ); + Wlc_NtkMarkCone( pNtk, iOutput, Range, fSeq, fAllPis ); pNtk = Wlc_NtkDupDfs( pNtk, 1, fSeq ); ABC_FREE( pNtk->pName ); pNtk->pName = Abc_UtilStrsav( pName ); Wlc_AbcUpdateNtk( pAbc, pNtk ); return 0; usage: - Abc_Print( -2, "usage: %%cone [-O num] [-svh]\n" ); - Abc_Print( -2, "\t extracts cone of the given word-level output\n" ); - Abc_Print( -2, "\t-O num : zero-based index of the word-level output to extract [default = %d]\n", iOutput ); + Abc_Print( -2, "usage: %%cone [-OR num] [-isvh]\n" ); + Abc_Print( -2, "\t extracts logic cone of one or more word-level outputs\n" ); + Abc_Print( -2, "\t-O num : zero-based index of the first word-level output to extract [default = %d]\n", iOutput ); + Abc_Print( -2, "\t-R num : total number of word-level outputs to extract [default = %d]\n", Range ); + Abc_Print( -2, "\t-i : toggle using support composed of all primary inputs [default = %s]\n", fAllPis? "yes": "no" ); Abc_Print( -2, "\t-s : toggle performing extracting sequential cones [default = %s]\n", fSeq? "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"); |