ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
nwkCheck.c File Reference
#include "nwk.h"
Include dependency graph for nwkCheck.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START int Nwk_ManCheck (Nwk_Man_t *p)
 DECLARATIONS ///.
 

Function Documentation

◆ Nwk_ManCheck()

ABC_NAMESPACE_IMPL_START int Nwk_ManCheck ( Nwk_Man_t * p)

DECLARATIONS ///.

CFile****************************************************************

FileName [nwkCheck.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Logic network representation.]

Synopsis [Consistency checking procedures.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id
nwkCheck.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [Checking the logic network for consistency.]

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file nwkCheck.c.

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}
Cube * p
Definition exorList.c:222
#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
Here is the call graph for this function:
Here is the caller graph for this function: