abc/src/aig/miniaig/minilut.h
// procedure to check the topological order during AIG construction
procedure to check the topological order during AIG construction
procedure to check the topological order during AIG construction
static int Mini_LutCheck( Mini_Lut_t * p )
{
    int status = 1;
    int i, k, iFaninVar;
    Mini_LutForEachNode( p, i )
    {
        for ( k = 0; k < p->LutSize; k++ )
        {
            iFaninVar = Mini_LutNodeFanin( p, i, k );
            if ( iFaninVar == MINI_LUT_NULL )
                continue;
            if ( iFaninVar >= p->LutSize * i )
                printf( "Fanin %d of LUT node %d is not in a topological order.\n", k, i ), status = 0;
        }
    }
    Mini_LutForEachPo( p, i )
    {
        iFaninVar = Mini_LutNodeFanin( p, i, 0 );
        if ( iFaninVar >= p->LutSize * i )
            printf( "Fanin %d of PO node %d is not in a topological order.\n", k, i ), status = 0;
    }
    return status;
}
static int Mini_LutCheck ( Mini_Lut_t * p ) { int status = 1 ; int i , k , iFaninVar ; Mini_LutForEachNode ( p , i ) { for ( k = 0 ; k < p -> LutSize ; k ++ ) { iFaninVar = Mini_LutNodeFanin ( p , i , k ) ; if ( iFaninVar == MINI_LUT_NULL ) continue ; if ( iFaninVar >= p -> LutSize * i ) printf ( " \n " , k , i ) , status = 0 ; } } Mini_LutForEachPo ( p , i ) { iFaninVar = Mini_LutNodeFanin ( p , i , 0 ) ; if ( iFaninVar >= p -> LutSize * i ) printf ( " \n " , k , i ) , status = 0 ; } return status ; }
procedure to check the topological order during AIG construction
procedure to check the topological order during AIG construction