src/base/abci/abcBmc.c File Reference

#include "abc.h"
#include "ivy.h"
Include dependency graph for abcBmc.c:

Go to the source code of this file.

Functions

Ivy_Man_tAbc_NtkIvyBefore (Abc_Ntk_t *pNtk, int fSeq, int fUseDc)
static void Abc_NtkBmcReport (Ivy_Man_t *pMan, Ivy_Man_t *pFrames, Ivy_Man_t *pFraig, Vec_Ptr_t *vMapping, int nFrames)
void Abc_NtkBmc (Abc_Ntk_t *pNtk, int nFrames, int fInit, int fVerbose)

Function Documentation

void Abc_NtkBmc ( Abc_Ntk_t pNtk,
int  nFrames,
int  fInit,
int  fVerbose 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 47 of file abcBmc.c.

00048 {
00049     Ivy_FraigParams_t Params, * pParams = &Params; 
00050     Ivy_Man_t * pMan, * pFrames, * pFraig;
00051     Vec_Ptr_t * vMapping;
00052     // convert to IVY manager
00053     pMan = Abc_NtkIvyBefore( pNtk, 0, 0 );
00054     // generate timeframes
00055     pFrames = Ivy_ManFrames( pMan, Abc_NtkLatchNum(pNtk), nFrames, fInit, &vMapping );
00056     // fraig the timeframes
00057     Ivy_FraigParamsDefault( pParams );
00058     pParams->nBTLimitNode = ABC_INFINITY;
00059     pParams->fVerbose = 0;
00060     pParams->fProve = 0;
00061     pFraig = Ivy_FraigPerform( pFrames, pParams );
00062 printf( "Frames have %6d nodes.  ", Ivy_ManNodeNum(pFrames) );
00063 printf( "Fraig has %6d nodes.\n", Ivy_ManNodeNum(pFraig) );
00064     // report the classes
00065 //    if ( fVerbose )
00066 //        Abc_NtkBmcReport( pMan, pFrames, pFraig, vMapping, nFrames );
00067     // free stuff
00068     Vec_PtrFree( vMapping );
00069     Ivy_ManStop( pFraig );
00070     Ivy_ManStop( pFrames );
00071     Ivy_ManStop( pMan );
00072 }

void Abc_NtkBmcReport ( Ivy_Man_t pMan,
Ivy_Man_t pFrames,
Ivy_Man_t pFraig,
Vec_Ptr_t vMapping,
int  nFrames 
) [static]

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 85 of file abcBmc.c.

00086 {
00087     Ivy_Obj_t * pFirst1, * pFirst2, * pFirst3;
00088     int i, f, nIdMax, Prev2, Prev3;
00089     nIdMax = Ivy_ManObjIdMax(pMan);
00090     // check what is the number of nodes in each frame
00091     Prev2 = Prev3 = 0;
00092     for ( f = 0; f < nFrames; f++ )
00093     {
00094         Ivy_ManForEachNode( pMan, pFirst1, i )
00095         {
00096             pFirst2 = Ivy_Regular( Vec_PtrEntry(vMapping, f * nIdMax + pFirst1->Id) );
00097             if ( Ivy_ObjIsConst1(pFirst2) || pFirst2->Type == 0 )
00098                 continue;
00099             pFirst3 = Ivy_Regular( pFirst2->pEquiv );
00100             if ( Ivy_ObjIsConst1(pFirst3) || pFirst3->Type == 0 )
00101                 continue;
00102             break;
00103         }
00104         if ( f )
00105             printf( "Frame %3d :  Strash = %5d  Fraig = %5d\n", f, pFirst2->Id - Prev2, pFirst3->Id - Prev3 );
00106         Prev2 = pFirst2->Id;
00107         Prev3 = pFirst3->Id;   
00108     }
00109 }

Ivy_Man_t* Abc_NtkIvyBefore ( Abc_Ntk_t pNtk,
int  fSeq,
int  fUseDc 
)

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

FileName [abcBmc.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Network and node package.]

Synopsis [Performs bounded model check.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

] DECLARATIONS ///

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

Synopsis [Prepares the IVY package.]

Description []

SideEffects []

SeeAlso []

Definition at line 73 of file abcIvy.c.

00074 {
00075     Ivy_Man_t * pMan;
00076     int fCleanup = 1;
00077 //timeRetime = clock();
00078     assert( !Abc_NtkIsNetlist(pNtk) );
00079     if ( Abc_NtkIsBddLogic(pNtk) )
00080     {
00081         if ( !Abc_NtkBddToSop(pNtk, 0) )
00082         {
00083             printf( "Abc_NtkIvyBefore(): Converting to SOPs has failed.\n" );
00084             return NULL;
00085         }
00086     }
00087     if ( fSeq && Abc_NtkCountSelfFeedLatches(pNtk) )
00088     {
00089         printf( "Warning: The network has %d self-feeding latches.\n", Abc_NtkCountSelfFeedLatches(pNtk) );
00090 //        return NULL;
00091     }
00092     // print warning about choice nodes
00093     if ( Abc_NtkGetChoiceNum( pNtk ) )
00094         printf( "Warning: The choice nodes in the initial AIG are removed by strashing.\n" );
00095     // convert to the AIG manager
00096     pMan = Abc_NtkToIvy( pNtk );
00097     if ( !Ivy_ManCheck( pMan ) )
00098     {
00099         printf( "AIG check has failed.\n" );
00100         Ivy_ManStop( pMan );
00101         return NULL;
00102     }
00103 //    Ivy_ManPrintStats( pMan );
00104     if ( fSeq )
00105     {
00106         int nLatches = Abc_NtkLatchNum(pNtk);
00107         Vec_Int_t * vInit = Abc_NtkCollectLatchValuesIvy( pNtk, fUseDc );
00108         Ivy_ManMakeSeq( pMan, nLatches, vInit->pArray );
00109         Vec_IntFree( vInit );
00110 //        Ivy_ManPrintStats( pMan );
00111     }
00112 //timeRetime = clock() - timeRetime;
00113     return pMan;
00114 }


Generated on Tue Jan 5 12:18:34 2010 for abc70930 by  doxygen 1.6.1