diff --git a/src/base/abci/abcPrint.c b/src/base/abci/abcPrint.c index 8a2cd42e2..7b566b79d 100644 --- a/src/base/abci/abcPrint.c +++ b/src/base/abci/abcPrint.c @@ -1199,6 +1199,17 @@ void Abc_NtkPrintSop( FILE * pFile, Abc_Ntk_t * pNtk, int fUseRealNames ) SeeAlso [] ***********************************************************************/ +char * Abc_NodeGetPrintName( Abc_Obj_t * pObj ) +{ + Abc_Obj_t * pFan, * pFanout = NULL; int k, nPos = 0; + if ( !Abc_ObjIsNode(pObj) ) + return Abc_ObjName(pObj); + Abc_ObjForEachFanout( pObj, pFan, k ) { + if ( Abc_ObjIsPo(pFan) ) + pFanout = pFan, nPos++; + } + return Abc_ObjName(nPos == 1 ? pFanout : pObj); +} void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListNodes, int fVerbose ) { Abc_Obj_t * pNode; @@ -1214,7 +1225,7 @@ void Abc_NtkPrintLevel( FILE * pFile, Abc_Ntk_t * pNtk, int fProfile, int fListN printf( "%2d : ", i ); Abc_NtkForEachNode( pNtk, pNode, k ) if ( (int)pNode->Level == i ) - printf( " %s", Abc_ObjName(pNode) ); + printf( " %s", Abc_NodeGetPrintName(pNode) ); printf( "\n" ); } return;