From 94d722c58e4faf57188fea11a0e3e4b6bcb8c87a Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sat, 27 Oct 2012 17:33:13 -0700 Subject: Improvements to LMS code. --- src/map/if/ifUtil.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/map/if/ifUtil.c') 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 /// //////////////////////////////////////////////////////////////////////// -- cgit v1.2.3