abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
llb1Core.c File Reference
#include "llbInt.h"
#include "aig/gia/gia.h"
#include "aig/gia/giaAig.h"

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void Llb_ManSetDefaultParams (Gia_ParLlb_t *p)
 DECLARATIONS ///. More...
 
void Llb_ManPrintAig (Llb_Man_t *p)
 
int Llb_ManModelCheckAig (Aig_Man_t *pAigGlo, Gia_ParLlb_t *pPars, Vec_Int_t *vHints, DdManager **pddGlo)
 
int Llb_ManModelCheckGia (Gia_Man_t *pGia, Gia_ParLlb_t *pPars)
 

Function Documentation

int Llb_ManModelCheckAig ( Aig_Man_t pAigGlo,
Gia_ParLlb_t pPars,
Vec_Int_t vHints,
DdManager **  pddGlo 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 112 of file llb1Core.c.

113 {
114  Llb_Man_t * p = NULL;
115  Aig_Man_t * pAig;
116  int RetValue = -1;
117  abctime clk = Abc_Clock();
118 
119  if ( pPars->fIndConstr )
120  {
121  assert( vHints == NULL );
122  vHints = Llb_ManDeriveConstraints( pAigGlo );
123  }
124 
125  // derive AIG for hints
126  if ( vHints == NULL )
127  pAig = Aig_ManDupSimple( pAigGlo );
128  else
129  {
130  if ( pPars->fVerbose )
131  Llb_ManPrintEntries( pAigGlo, vHints );
132  pAig = Aig_ManDupSimpleWithHints( pAigGlo, vHints );
133  }
134 
135 
136  if ( pPars->fUseFlow )
137  {
138 // p = Llb_ManStartFlow( pAigGlo, pAig, pPars );
139  }
140  else
141  {
142  p = Llb_ManStart( pAigGlo, pAig, pPars );
143  if ( pPars->fVerbose )
144  {
145  Llb_ManPrintAig( p );
146  printf( "Original matrix: " );
147  Llb_MtrPrintMatrixStats( p->pMatrix );
148  if ( pPars->fVeryVerbose )
149  Llb_MtrPrint( p->pMatrix, 1 );
150  }
151  if ( pPars->fCluster )
152  {
153  Llb_ManCluster( p->pMatrix );
154  if ( pPars->fVerbose )
155  {
156  printf( "Matrix after clustering: " );
157  Llb_MtrPrintMatrixStats( p->pMatrix );
158  if ( pPars->fVeryVerbose )
159  Llb_MtrPrint( p->pMatrix, 1 );
160  }
161  }
162  if ( pPars->fSchedule )
163  {
164  Llb_MtrSchedule( p->pMatrix );
165  if ( pPars->fVerbose )
166  {
167  printf( "Matrix after scheduling: " );
168  Llb_MtrPrintMatrixStats( p->pMatrix );
169  if ( pPars->fVeryVerbose )
170  Llb_MtrPrint( p->pMatrix, 1 );
171  }
172  }
173  }
174 
175  if ( !p->pPars->fSkipReach )
176  RetValue = Llb_ManReachability( p, vHints, pddGlo );
177  Llb_ManStop( p );
178 
179  Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
180 
181  if ( pPars->fIndConstr )
182  Vec_IntFreeP( &vHints );
183  return RetValue;
184 }
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int Llb_ManReachability(Llb_Man_t *p, Vec_Int_t *vHints, DdManager **pddGlo)
Definition: llb1Reach.c:582
static abctime Abc_Clock()
Definition: abc_global.h:279
static void Abc_PrintTime(int level, const char *pStr, abctime time)
Definition: abc_global.h:367
void Llb_ManCluster(Llb_Mtr_t *p)
Definition: llb1Cluster.c:324
Aig_Man_t * Aig_ManDupSimpleWithHints(Aig_Man_t *p, Vec_Int_t *vHints)
Definition: aigDup.c:107
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
Vec_Int_t * Llb_ManDeriveConstraints(Aig_Man_t *p)
FUNCTION DECLARATIONS ///.
Definition: llb1Constr.c:267
void Llb_MtrPrint(Llb_Mtr_t *p, int fOrder)
Definition: llb1Matrix.c:206
void Llb_MtrPrintMatrixStats(Llb_Mtr_t *p)
Definition: llb1Matrix.c:236
#define assert(ex)
Definition: util_old.h:213
void Llb_ManPrintAig(Llb_Man_t *p)
Definition: llb1Core.c:87
Llb_Man_t * Llb_ManStart(Aig_Man_t *pAigGlo, Aig_Man_t *pAig, Gia_ParLlb_t *pPars)
Definition: llb1Man.c:193
ABC_INT64_T abctime
Definition: abc_global.h:278
void Llb_MtrSchedule(Llb_Mtr_t *p)
Definition: llb1Sched.c:222
typedefABC_NAMESPACE_HEADER_START struct Llb_Man_t_ Llb_Man_t
INCLUDES ///.
Definition: llbInt.h:46
Aig_Man_t * Aig_ManDupSimple(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigDup.c:46
void Llb_ManPrintEntries(Aig_Man_t *p, Vec_Int_t *vCands)
Definition: llb1Constr.c:64
void Llb_ManStop(Llb_Man_t *p)
Definition: llb1Man.c:130
int Llb_ManModelCheckGia ( Gia_Man_t pGia,
Gia_ParLlb_t pPars 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 197 of file llb1Core.c.

198 {
199  Gia_Man_t * pGia2;
200  Aig_Man_t * pAig;
201  int RetValue = -1;
202  pGia2 = Gia_ManDupDfs( pGia );
203  pAig = Gia_ManToAigSimple( pGia2 );
204  Gia_ManStop( pGia2 );
205 //Aig_ManShow( pAig, 0, NULL );
206 
207  if ( pPars->nHintDepth == 0 )
208  RetValue = Llb_ManModelCheckAig( pAig, pPars, NULL, NULL );
209  else
210  RetValue = Llb_ManModelCheckAigWithHints( pAig, pPars );
211  pGia->pCexSeq = pAig->pSeqModel; pAig->pSeqModel = NULL;
212  Aig_ManStop( pAig );
213  return RetValue;
214 }
void Gia_ManStop(Gia_Man_t *p)
Definition: giaMan.c:77
Aig_Man_t * Gia_ManToAigSimple(Gia_Man_t *p)
Definition: giaAig.c:367
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
Gia_Man_t * Gia_ManDupDfs(Gia_Man_t *p)
Definition: giaDup.c:1238
int Llb_ManModelCheckAig(Aig_Man_t *pAigGlo, Gia_ParLlb_t *pPars, Vec_Int_t *vHints, DdManager **pddGlo)
Definition: llb1Core.c:112
Definition: gia.h:95
int Llb_ManModelCheckAigWithHints(Aig_Man_t *pAigGlo, Gia_ParLlb_t *pPars)
Definition: llb1Hint.c:162
Abc_Cex_t * pCexSeq
Definition: gia.h:136
void Llb_ManPrintAig ( Llb_Man_t p)

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

Synopsis [Prints statistics about MFFCs.]

Description []

SideEffects []

SeeAlso []

Definition at line 87 of file llb1Core.c.

88 {
89  Abc_Print( 1, "pi =%3d ", Saig_ManPiNum(p->pAig) );
90  Abc_Print( 1, "po =%3d ", Saig_ManPoNum(p->pAig) );
91  Abc_Print( 1, "ff =%3d ", Saig_ManRegNum(p->pAig) );
92  Abc_Print( 1, "int =%5d ", Vec_IntSize(p->vVar2Obj)-Aig_ManCiNum(p->pAig)-Saig_ManRegNum(p->pAig) );
93  Abc_Print( 1, "var =%5d ", Vec_IntSize(p->vVar2Obj) );
94  Abc_Print( 1, "part =%5d ", Vec_PtrSize(p->vGroups)-2 );
95  Abc_Print( 1, "and =%5d ", Aig_ManNodeNum(p->pAig) );
96  Abc_Print( 1, "lev =%4d ", Aig_ManLevelNum(p->pAig) );
97 // Abc_Print( 1, "cut =%4d ", Llb_ManCrossCut(p->pAig) );
98  Abc_Print( 1, "\n" );
99 }
Aig_Man_t * pAig
Definition: llb3Image.c:49
static int Saig_ManPoNum(Aig_Man_t *p)
Definition: saig.h:74
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static int Aig_ManNodeNum(Aig_Man_t *p)
Definition: aig.h:256
static int Aig_ManCiNum(Aig_Man_t *p)
Definition: aig.h:251
static void Abc_Print(int level, const char *format,...)
Definition: abc_global.h:313
static int Saig_ManRegNum(Aig_Man_t *p)
Definition: saig.h:77
int Aig_ManLevelNum(Aig_Man_t *p)
Definition: aigDfs.c:486
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
Definition: saig.h:73
ABC_NAMESPACE_IMPL_START void Llb_ManSetDefaultParams ( Gia_ParLlb_t p)

DECLARATIONS ///.

MACRO DEFINITIONS ///.

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

FileName [llb1Core.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [BDD based reachability.]

Synopsis [Top-level procedure.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 46 of file llb1Core.c.

47 {
48  memset( p, 0, sizeof(Gia_ParLlb_t) );
49  p->nBddMax = 10000000;
50  p->nIterMax = 10000000;
51  p->nClusterMax = 20;
52  p->nHintDepth = 0;
53  p->HintFirst = 0;
54  p->fUseFlow = 0; // use flow
55  p->nVolumeMax = 100; // max volume
56  p->nVolumeMin = 30; // min volume
57  p->nPartValue = 5; // partitioning value
58  p->fBackward = 0; // forward by default
59  p->fReorder = 1;
60  p->fIndConstr = 0;
61  p->fUsePivots = 0;
62  p->fCluster = 0;
63  p->fSchedule = 0;
64  p->fDumpReached = 0;
65  p->fVerbose = 0;
66  p->fVeryVerbose = 0;
67  p->fSilent = 0;
68  p->TimeLimit = 0;
69 // p->TimeLimit = 0;
70  p->TimeLimitGlo = 0;
71  p->TimeTarget = 0;
72  p->iFrame = -1;
73 }
char * memset()
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_HEADER_START struct Gia_ParLlb_t_ Gia_ParLlb_t
INCLUDES ///.
Definition: llb.h:41