ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
nwkCheck.c
Go to the documentation of this file.
1
20
21#include "nwk.h"
22
24
25
29
33
46{
47 Nwk_Obj_t * pObj, * pNext;
48 int i, k, m;
49 // check if the nodes have duplicated fanins
50 Nwk_ManForEachNode( p, pObj, i )
51 {
52 for ( k = 0; k < pObj->nFanins; k++ )
53 for ( m = k + 1; m < pObj->nFanins; m++ )
54 if ( pObj->pFanio[k] == pObj->pFanio[m] )
55 printf( "Node %d has duplicated fanin %d.\n", pObj->Id, pObj->pFanio[k]->Id );
56 }
57 // check if all nodes are in the correct fanin/fanout relationship
58 Nwk_ManForEachObj( p, pObj, i )
59 {
60 Nwk_ObjForEachFanin( pObj, pNext, k )
61 if ( Nwk_ObjFanoutNum(pNext) < 100 && Nwk_ObjFindFanout( pNext, pObj ) == -1 )
62 printf( "Nwk_ManCheck(): Object %d has fanin %d which does not have a corresponding fanout.\n", pObj->Id, pNext->Id );
63 Nwk_ObjForEachFanout( pObj, pNext, k )
64 if ( Nwk_ObjFindFanin( pNext, pObj ) == -1 )
65 printf( "Nwk_ManCheck(): Object %d has fanout %d which does not have a corresponding fanin.\n", pObj->Id, pNext->Id );
66 }
67 return 1;
68}
69
73
74
76
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
Cube * p
Definition exorList.c:222
struct Nwk_Man_t_ Nwk_Man_t
Definition ntlnwk.h:41
ABC_NAMESPACE_IMPL_START int Nwk_ManCheck(Nwk_Man_t *p)
DECLARATIONS ///.
Definition nwkCheck.c:45
#define Nwk_ManForEachNode(p, pObj, i)
Definition nwk.h:192
ABC_DLL int Nwk_ObjFindFanout(Nwk_Obj_t *pObj, Nwk_Obj_t *pFanout)
Definition nwkFanio.c:106
typedefABC_NAMESPACE_HEADER_START struct Nwk_Obj_t_ Nwk_Obj_t
INCLUDES ///.
Definition nwk.h:49
#define Nwk_ManForEachObj(p, pObj, i)
Definition nwk.h:189
#define Nwk_ObjForEachFanout(pObj, pFanout, i)
Definition nwk.h:201
#define Nwk_ObjForEachFanin(pObj, pFanin, i)
Definition nwk.h:199
ABC_DLL int Nwk_ObjFindFanin(Nwk_Obj_t *pObj, Nwk_Obj_t *pFanin)
Definition nwkFanio.c:85