diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-10-27 17:33:13 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-10-27 17:33:13 -0700 |
commit | 94d722c58e4faf57188fea11a0e3e4b6bcb8c87a (patch) | |
tree | 7f4af599a68485e97e50cc713eca66948307e5d2 /src/map/if | |
parent | cb7bf6ae9ed6cef05b3c4e97d11ef835a37e4e7c (diff) | |
download | abc-94d722c58e4faf57188fea11a0e3e4b6bcb8c87a.tar.gz abc-94d722c58e4faf57188fea11a0e3e4b6bcb8c87a.tar.bz2 abc-94d722c58e4faf57188fea11a0e3e4b6bcb8c87a.zip |
Improvements to LMS code.
Diffstat (limited to 'src/map/if')
-rw-r--r-- | src/map/if/if.h | 1 | ||||
-rw-r--r-- | src/map/if/ifUtil.c | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h index 5c877c9d..7928245f 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -528,6 +528,7 @@ extern Vec_Int_t * If_ManCollectMappingInt( If_Man_t * p ); extern int If_ManCountSpecialPos( If_Man_t * p ); extern void If_CutTraverse( If_Man_t * p, If_Obj_t * pRoot, If_Cut_t * pCut, Vec_Ptr_t * vNodes ); +extern void If_ObjPrint( If_Obj_t * pObj ); /*=== abcRec.c ============================================================*/ extern int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj); 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 /// //////////////////////////////////////////////////////////////////////// |