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

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START int Llb_ManTracePaths_rec (Aig_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pPivot)
 DECLARATIONS ///. More...
 
int Llb_ManTracePaths (Aig_Man_t *p, Aig_Obj_t *pPivot)
 
void Llb_ManTestCuts (Aig_Man_t *p)
 
void Llb_ManLabelLiCones_rec (Aig_Man_t *p, Aig_Obj_t *pObj)
 
void Llb_ManLabelLiCones (Aig_Man_t *p)
 
void Llb_ManMarkInternalPivots (Aig_Man_t *p)
 
Vec_Int_tLlb_ManMarkPivotNodes (Aig_Man_t *p, int fUseInternal)
 

Function Documentation

void Llb_ManLabelLiCones ( Aig_Man_t p)

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

Synopsis [Determine starting cut-points.]

Description []

SideEffects []

SeeAlso []

Definition at line 151 of file llb1Pivot.c.

152 {
153  Aig_Obj_t * pObj;
154  int i;
155  // mark const and PIs
156  Aig_ManConst1(p)->fMarkB = 1;
157  Aig_ManForEachCi( p, pObj, i )
158  pObj->fMarkB = 1;
159  // mark cones
160  Saig_ManForEachLi( p, pObj, i )
162 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
unsigned int fMarkB
Definition: aig.h:80
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: aig.h:393
#define Saig_ManForEachLi(p, pObj, i)
Definition: saig.h:98
Definition: aig.h:69
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Definition: aig.h:264
void Llb_ManLabelLiCones_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: llb1Pivot.c:130
void Llb_ManLabelLiCones_rec ( Aig_Man_t p,
Aig_Obj_t pObj 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 130 of file llb1Pivot.c.

131 {
132  if ( pObj->fMarkB )
133  return;
134  pObj->fMarkB = 1;
135  assert( Aig_ObjIsNode(pObj) );
138 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
unsigned int fMarkB
Definition: aig.h:80
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Definition: aig.h:309
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
Definition: aig.h:280
#define assert(ex)
Definition: util_old.h:213
void Llb_ManLabelLiCones_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: llb1Pivot.c:130
void Llb_ManMarkInternalPivots ( Aig_Man_t p)

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

Synopsis [Determine starting cut-points.]

Description []

SideEffects []

SeeAlso []

Definition at line 175 of file llb1Pivot.c.

176 {
177  Vec_Ptr_t * vMuxes;
178  Aig_Obj_t * pObj;
179  int i, Counter = 0;
180 
181  // remove refs due to MUXes
182  vMuxes = Aig_ManMuxesCollect( p );
183  Aig_ManMuxesDeref( p, vMuxes );
184 
185  // mark nodes feeding into LIs
186  Aig_ManCleanMarkB( p );
188 
189  // mark internal nodes
191  Aig_ManForEachNode( p, pObj, i )
192  if ( pObj->fMarkB && pObj->nRefs > 1 )
193  {
194  if ( Llb_ManTracePaths(p, pObj) > 0 )
195  pObj->fMarkA = 1;
196  Counter++;
197  }
198  Aig_ManFanoutStop( p );
199 // printf( "TracePath tried = %d.\n", Counter );
200 
201  // mark nodes feeding into LIs
202  Aig_ManCleanMarkB( p );
203 
204  // add refs due to MUXes
205  Aig_ManMuxesRef( p, vMuxes );
206  Vec_PtrFree( vMuxes );
207 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int Llb_ManTracePaths(Aig_Man_t *p, Aig_Obj_t *pPivot)
Definition: llb1Pivot.c:81
Vec_Ptr_t * Aig_ManMuxesCollect(Aig_Man_t *pAig)
Definition: aigUtil.c:1460
void Aig_ManCleanMarkB(Aig_Man_t *p)
Definition: aigUtil.c:167
unsigned int fMarkA
Definition: aig.h:79
void Aig_ManFanoutStart(Aig_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition: aigFanout.c:56
void Aig_ManFanoutStop(Aig_Man_t *p)
Definition: aigFanout.c:89
void Llb_ManLabelLiCones(Aig_Man_t *p)
Definition: llb1Pivot.c:151
void Aig_ManMuxesRef(Aig_Man_t *pAig, Vec_Ptr_t *vMuxes)
Definition: aigUtil.c:1513
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
if(last==0)
Definition: sparse_int.h:34
void Aig_ManMuxesDeref(Aig_Man_t *pAig, Vec_Ptr_t *vMuxes)
Definition: aigUtil.c:1483
Definition: aig.h:69
static int Counter
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
Vec_Int_t* Llb_ManMarkPivotNodes ( Aig_Man_t p,
int  fUseInternal 
)

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

Synopsis [Determine starting cut-points.]

Description []

SideEffects []

SeeAlso []

Definition at line 220 of file llb1Pivot.c.

221 {
222  Vec_Int_t * vVar2Obj;
223  Aig_Obj_t * pObj;
224  int i;
225  // mark inputs/outputs
226  Aig_ManForEachCi( p, pObj, i )
227  pObj->fMarkA = 1;
228  Saig_ManForEachLi( p, pObj, i )
229  pObj->fMarkA = 1;
230 
231  // mark internal pivot nodes
232  if ( fUseInternal )
234 
235  // assign variable numbers
236  Aig_ManConst1(p)->fMarkA = 0;
237  vVar2Obj = Vec_IntAlloc( 100 );
238  Aig_ManForEachCi( p, pObj, i )
239  Vec_IntPush( vVar2Obj, Aig_ObjId(pObj) );
240  Aig_ManForEachNode( p, pObj, i )
241  if ( pObj->fMarkA )
242  Vec_IntPush( vVar2Obj, Aig_ObjId(pObj) );
243  Saig_ManForEachLi( p, pObj, i )
244  Vec_IntPush( vVar2Obj, Aig_ObjId(pObj) );
245  return vVar2Obj;
246 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: aig.h:393
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
#define Saig_ManForEachLi(p, pObj, i)
Definition: saig.h:98
if(last==0)
Definition: sparse_int.h:34
Definition: aig.h:69
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
void Llb_ManMarkInternalPivots(Aig_Man_t *p)
Definition: llb1Pivot.c:175
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Definition: aig.h:264
static int Aig_ObjId(Aig_Obj_t *pObj)
Definition: aig.h:286
void Llb_ManTestCuts ( Aig_Man_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 103 of file llb1Pivot.c.

104 {
105  Aig_Obj_t * pObj;
106  int i, Count;
108  Aig_ManForEachNode( p, pObj, i )
109  {
110  if ( Aig_ObjRefs(pObj) <= 1 )
111  continue;
112  Count = Llb_ManTracePaths( p, pObj );
113  printf( "Obj =%5d. Lev =%3d. Fanout =%5d. Count = %3d.\n",
114  i, Aig_ObjLevel(pObj), Aig_ObjRefs(pObj), Count );
115  }
116  Aig_ManFanoutStop( p );
117 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int Llb_ManTracePaths(Aig_Man_t *p, Aig_Obj_t *pPivot)
Definition: llb1Pivot.c:81
void Aig_ManFanoutStart(Aig_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition: aigFanout.c:56
void Aig_ManFanoutStop(Aig_Man_t *p)
Definition: aigFanout.c:89
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
Definition: aig.h:69
static int Aig_ObjLevel(Aig_Obj_t *pObj)
Definition: aig.h:323
static int Aig_ObjRefs(Aig_Obj_t *pObj)
Definition: aig.h:300
int Llb_ManTracePaths ( Aig_Man_t p,
Aig_Obj_t pPivot 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 81 of file llb1Pivot.c.

82 {
83  Aig_Obj_t * pObj;
84  int i, Counter = 0;
85  Aig_ManIncrementTravId( p ); // prev = visited with path to LI (value 0)
86  Aig_ManIncrementTravId( p ); // cur = visited w/o path to LI (value 1)
87  Saig_ManForEachLo( p, pObj, i )
88  Counter += Llb_ManTracePaths_rec( p, pObj, pPivot );
89  return Counter;
90 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigUtil.c:44
ABC_NAMESPACE_IMPL_START int Llb_ManTracePaths_rec(Aig_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pPivot)
DECLARATIONS ///.
Definition: llb1Pivot.c:45
Definition: aig.h:69
static int Counter
#define Saig_ManForEachLo(p, pObj, i)
Definition: saig.h:96
ABC_NAMESPACE_IMPL_START int Llb_ManTracePaths_rec ( Aig_Man_t p,
Aig_Obj_t pObj,
Aig_Obj_t pPivot 
)

DECLARATIONS ///.

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

FileName [llb1Pivot.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [BDD based reachability.]

Synopsis [Determining pivot variables.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file llb1Pivot.c.

46 {
47  Aig_Obj_t * pFanout;
48  int k, iFan = -1;
49  if ( Aig_ObjIsTravIdPrevious(p, pObj) )
50  return 0;
51  if ( Aig_ObjIsTravIdCurrent(p, pObj) )
52  return 1;
53  if ( Saig_ObjIsLi(p, pObj) )
54  return 0;
55  if ( Saig_ObjIsPo(p, pObj) )
56  return 0;
57  if ( pObj == pPivot )
58  return 1;
59  assert( Aig_ObjIsCand(pObj) );
60  Aig_ObjForEachFanout( p, pObj, pFanout, iFan, k )
61  if ( !Llb_ManTracePaths_rec( p, pFanout, pPivot ) )
62  {
63  Aig_ObjSetTravIdPrevious(p, pObj);
64  return 0;
65  }
67  return 1;
68 }
static int Aig_ObjIsTravIdPrevious(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:296
#define Aig_ObjForEachFanout(p, pObj, pFanout, iFan, i)
Definition: aig.h:427
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:295
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:293
static int Saig_ObjIsLi(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: saig.h:85
ABC_NAMESPACE_IMPL_START int Llb_ManTracePaths_rec(Aig_Man_t *p, Aig_Obj_t *pObj, Aig_Obj_t *pPivot)
DECLARATIONS ///.
Definition: llb1Pivot.c:45
static int Saig_ObjIsPo(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: saig.h:83
if(last==0)
Definition: sparse_int.h:34
Definition: aig.h:69
static void Aig_ObjSetTravIdPrevious(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:294
static int Aig_ObjIsCand(Aig_Obj_t *pObj)
Definition: aig.h:284
#define assert(ex)
Definition: util_old.h:213