From 6e2e054509f3707fb5ad0a064e3733e9e7c6ee6f Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 9 Apr 2020 10:14:40 -0700 Subject: Debugging a combo loop in NDR. --- src/base/wlc/wlcNtk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/base/wlc/wlcNtk.c') diff --git a/src/base/wlc/wlcNtk.c b/src/base/wlc/wlcNtk.c index 7d246c0f..72ce86bf 100644 --- a/src/base/wlc/wlcNtk.c +++ b/src/base/wlc/wlcNtk.c @@ -90,10 +90,11 @@ static char * Wlc_Names[WLC_OBJ_NUMBER+1] = { "addsub", // 56: adder/subtractor "sel", // 57: selector "dec", // 58: decoder + "LUT", // 59: lookup table NULL // 58: unused }; -char * Wlc_ObjTypeName( Wlc_Obj_t * p ) { return Wlc_Names[p->Type]; } +char * Wlc_ObjTypeName( Wlc_Obj_t * p ) { return p ? (p->Type < WLC_OBJ_NUMBER ? Wlc_Names[p->Type] : "out_of_bound") : "no_obj"; } //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// @@ -945,8 +946,8 @@ void Wlc_NtkDupDfs_rec( Wlc_Ntk_t * pNew, Wlc_Ntk_t * p, int iObj, Vec_Int_t * v return; if ( Wlc_ObjCopy(p, iObj) ) return; - //printf( "Visiting node %d with type %d (%s)\n", iObj, Wlc_NtkObj(p, iObj)->Type, Wlc_NtkObj(p, iObj)->Type < WLC_OBJ_NUMBER ? Wlc_Names[Wlc_NtkObj(p, iObj)->Type] : NULL ); pObj = Wlc_NtkObj( p, iObj ); + //printf( "Visiting node %16s (ID %6d) of type %5s (type ID %2d)\n", Wlc_ObjName(p, iObj), iObj, Wlc_ObjTypeName(pObj), Wlc_NtkObj(p, iObj)->Type ); assert( pObj->Type != WLC_OBJ_FF ); Wlc_ObjForEachFanin( pObj, iFanin, i ) Wlc_NtkDupDfs_rec( pNew, p, iFanin, vFanins ); -- cgit v1.2.3