Commit 28cbb280 by Alan Mishchenko

Update to &show to show AIGs with XORs and MUXes (derived by &st -m).

parent 11f1a249
......@@ -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 );
}
......
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment