summaryrefslogtreecommitdiffstats
path: root/src/map/if/ifUtil.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-10-27 17:33:13 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-10-27 17:33:13 -0700
commit94d722c58e4faf57188fea11a0e3e4b6bcb8c87a (patch)
tree7f4af599a68485e97e50cc713eca66948307e5d2 /src/map/if/ifUtil.c
parentcb7bf6ae9ed6cef05b3c4e97d11ef835a37e4e7c (diff)
downloadabc-94d722c58e4faf57188fea11a0e3e4b6bcb8c87a.tar.gz
abc-94d722c58e4faf57188fea11a0e3e4b6bcb8c87a.tar.bz2
abc-94d722c58e4faf57188fea11a0e3e4b6bcb8c87a.zip
Improvements to LMS code.
Diffstat (limited to 'src/map/if/ifUtil.c')
-rw-r--r--src/map/if/ifUtil.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/map/if/ifUtil.c b/src/map/if/ifUtil.c
index 33d984c3..b8b03d70 100644
--- a/src/map/if/ifUtil.c
+++ b/src/map/if/ifUtil.c
@@ -820,6 +820,39 @@ void If_CutTraverseTest( If_Man_t * p, If_Obj_t * pRoot, If_Cut_t * pCut )
Vec_PtrFree( vNodes );
}
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void If_ObjPrint( If_Obj_t * pObj )
+{
+ if ( pObj == NULL )
+ {
+ printf( "Object is NULL." );
+ return;
+ }
+ printf( "Obj %4d : ", If_ObjId(pObj) );
+ if ( If_ObjIsConst1(pObj) )
+ printf( "constant 1" );
+ else if ( If_ObjIsCi(pObj) )
+ printf( "PI" );
+ else if ( If_ObjIsCo(pObj) )
+ printf( "PO( %4d%s )", If_ObjId(If_ObjFanin0(pObj)), (If_ObjFaninC0(pObj)? "\'" : " ") );
+ else
+ printf( "AND( %4d%s, %4d%s )",
+ If_ObjId(If_ObjFanin0(pObj)), (If_ObjFaninC0(pObj)? "\'" : " "),
+ If_ObjId(If_ObjFanin1(pObj)), (If_ObjFaninC1(pObj)? "\'" : " ") );
+ printf( " (refs = %3d)", pObj->nVisitsCopy );
+ printf( "\n" );
+}
+
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////