diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-05-04 07:05:43 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-05-04 07:05:43 -0700 |
commit | 28cbb280b707f56858a3af2a813ac0bcd961e83e (patch) | |
tree | 6d9ecb1bfcb7213468bd38f5f12f5b186732b90f | |
parent | 11f1a249ae9dc3fab0a24eab02ee605fd58c2471 (diff) | |
download | abc-28cbb280b707f56858a3af2a813ac0bcd961e83e.tar.gz abc-28cbb280b707f56858a3af2a813ac0bcd961e83e.tar.bz2 abc-28cbb280b707f56858a3af2a813ac0bcd961e83e.zip |
Update to &show to show AIGs with XORs and MUXes (derived by &st -m).
-rw-r--r-- | src/aig/gia/giaShow.c | 30 | ||||
-rw-r--r-- | src/base/abci/abc.c | 4 |
2 files changed, 30 insertions, 4 deletions
diff --git a/src/aig/gia/giaShow.c b/src/aig/gia/giaShow.c index 2d5b7a22..fdb6c52e 100644 --- a/src/aig/gia/giaShow.c +++ b/src/aig/gia/giaShow.c @@ -65,6 +65,10 @@ void Gia_WriteDotAig( Gia_Man_t * pMan, char * pFileName, Vec_Int_t * vBold ) if ( vBold ) Gia_ManForEachObjVec( vBold, pMan, pNode, i ) pNode->fMark0 = 1; + else if ( pMan->nXors || pMan->nMuxes ) + Gia_ManForEachObj( pMan, pNode, i ) + if ( Gia_ObjIsXor(pNode) || Gia_ObjIsMux(pMan, pNode) ) + pNode->fMark0 = 1; // compute levels LevelMax = 1 + Gia_ManLevelNum( pMan ); @@ -203,8 +207,14 @@ void Gia_WriteDotAig( Gia_Man_t * pMan, char * pFileName, Vec_Int_t * vBold ) */ fprintf( pFile, " Node%d [label = \"%d\"", i, i ); - fprintf( pFile, ", shape = ellipse" ); - if ( vBold && pNode->fMark0 ) + if ( Gia_ObjIsXor(pNode) ) + fprintf( pFile, ", shape = doublecircle" ); + else if ( Gia_ObjIsMux(pMan, pNode) ) + fprintf( pFile, ", shape = trapezium" ); + else + fprintf( pFile, ", shape = ellipse" ); + + if ( pNode->fMark0 ) fprintf( pFile, ", style = filled" ); fprintf( pFile, "];\n" ); } @@ -289,6 +299,20 @@ void Gia_WriteDotAig( Gia_Man_t * pMan, char * pFileName, Vec_Int_t * vBold ) // fprintf( pFile, ", label = \"%s\"", Seq_ObjFaninGetInitPrintable(pNode,1) ); fprintf( pFile, "]" ); fprintf( pFile, ";\n" ); + + if ( !Gia_ObjIsMux(pMan, pNode) ) + continue; + // generate the edge from this node to the next + fprintf( pFile, "Node%d", i ); + fprintf( pFile, " -> " ); + fprintf( pFile, "Node%d", Gia_ObjFaninId2(pMan, i) ); + fprintf( pFile, " [" ); + fprintf( pFile, "style = %s", Gia_ObjFaninC2(pMan, pNode)? "dotted" : "bold" ); +// if ( Gia_NtkIsSeq(pNode->pMan) && Seq_ObjFaninL1(pNode) > 0 ) +// fprintf( pFile, ", label = \"%s\"", Seq_ObjFaninGetInitPrintable(pNode,1) ); + fprintf( pFile, "]" ); + fprintf( pFile, ";\n" ); + /* // generate the edges between the equivalent nodes if ( fHaig && pNode->pEquiv && Gia_ObjRefs(pNode) > 0 ) @@ -322,6 +346,8 @@ void Gia_WriteDotAig( Gia_Man_t * pMan, char * pFileName, Vec_Int_t * vBold ) if ( vBold ) Gia_ManForEachObjVec( vBold, pMan, pNode, i ) pNode->fMark0 = 0; + else if ( pMan->nXors || pMan->nMuxes ) + Gia_ManCleanMark0( pMan ); Vec_IntFreeP( &pMan->vLevels ); } diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index f8935902..1c0d5f05 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -39357,7 +39357,7 @@ usage: Abc_Print( -2, " performs heuristic exclusive sum-of-project minimization\n" ); Abc_Print( -2, " -Q N : minimization quality [default = 0]\n"); Abc_Print( -2, " increasing this number improves quality and adds to runtime\n"); - Abc_Print( -2, " -Q N : verbosity level [default = 0]\n"); + Abc_Print( -2, " -V N : verbosity level [default = 0]\n"); Abc_Print( -2, " 0 = no output; 1 = outline; 2 = verbose\n"); Abc_Print( -2, " <file>: the output file name in ESOP-PLA format\n"); Abc_Print( -2, "\n" ); @@ -40948,7 +40948,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv ) // Jf_ManTestCnf( pAbc->pGia ); // Gia_ManCheckFalseTest( pAbc->pGia, nFrames ); // Gia_ParTest( pAbc->pGia, nWords, nProcs ); - Gia_Iso3Test( pAbc->pGia ); + Gia_PolynExplore( pAbc->pGia ); // printf( "\nThis command is currently disabled.\n\n" ); return 0; |