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

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START
Llb_Grp_t
Llb_ManGroupAlloc (Llb_Man_t *pMan)
 DECLARATIONS ///. More...
 
void Llb_ManGroupStop (Llb_Grp_t *p)
 
void Llb_ManGroupCollect_rec (Aig_Man_t *pAig, Aig_Obj_t *pObj, Vec_Ptr_t *vNodes)
 
Vec_Ptr_tLlb_ManGroupCollect (Llb_Grp_t *pGroup)
 
void Llb_ManGroupCreate_rec (Aig_Man_t *pAig, Aig_Obj_t *pObj, Vec_Ptr_t *vSupp)
 
Llb_Grp_tLlb_ManGroupCreate (Llb_Man_t *pMan, Aig_Obj_t *pObj)
 
Llb_Grp_tLlb_ManGroupCreateFirst (Llb_Man_t *pMan)
 
Llb_Grp_tLlb_ManGroupCreateLast (Llb_Man_t *pMan)
 
Llb_Grp_tLlb_ManGroupsCombine (Llb_Grp_t *p1, Llb_Grp_t *p2)
 
void Llb_ManGroupMarkNodes_rec (Aig_Man_t *p, Aig_Obj_t *pObj)
 
Llb_Grp_tLlb_ManGroupCreateFromCuts (Llb_Man_t *pMan, Vec_Int_t *vCut1, Vec_Int_t *vCut2)
 
void Llb_ManPrepareGroups (Llb_Man_t *pMan)
 
void Llb_ManPrintSpan (Llb_Man_t *p)
 
int Llb_ManGroupHasVar (Llb_Man_t *p, int iGroup, int iVar)
 
void Llb_ManPrintHisto (Llb_Man_t *p)
 

Function Documentation

ABC_NAMESPACE_IMPL_START Llb_Grp_t* Llb_ManGroupAlloc ( Llb_Man_t pMan)

DECLARATIONS ///.

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

FileName [llb1Group.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [BDD based reachability.]

Synopsis [Initial partition computation.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

Id:
llb1Group.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 llb1Group.c.

46 {
47  Llb_Grp_t * p;
48  p = ABC_CALLOC( Llb_Grp_t, 1 );
49  p->pMan = pMan;
50  p->vIns = Vec_PtrAlloc( 8 );
51  p->vOuts = Vec_PtrAlloc( 8 );
52  p->Id = Vec_PtrSize( pMan->vGroups );
53  Vec_PtrPush( pMan->vGroups, p );
54  return p;
55 }
Llb_Man_t * pMan
Definition: llbInt.h:100
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
int Id
Definition: llbInt.h:96
Vec_Ptr_t * vOuts
Definition: llbInt.h:98
Vec_Ptr_t * vIns
Definition: llbInt.h:97
Vec_Ptr_t* Llb_ManGroupCollect ( Llb_Grp_t pGroup)

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

Synopsis [Collects the support of MFFC.]

Description [Returns the number of internal nodes in the MFFC.]

SideEffects []

SeeAlso []

Definition at line 120 of file llb1Group.c.

121 {
122  Vec_Ptr_t * vNodes;
123  Aig_Obj_t * pObj;
124  int i;
125  vNodes = Vec_PtrAlloc( 100 );
126  Aig_ManIncrementTravId( pGroup->pMan->pAig );
127  Vec_PtrForEachEntry( Aig_Obj_t *, pGroup->vIns, pObj, i )
128  Aig_ObjSetTravIdCurrent( pGroup->pMan->pAig, pObj );
129  Vec_PtrForEachEntry( Aig_Obj_t *, pGroup->vOuts, pObj, i )
130  Aig_ObjSetTravIdPrevious( pGroup->pMan->pAig, pObj );
131  Vec_PtrForEachEntry( Aig_Obj_t *, pGroup->vOuts, pObj, i )
132  Llb_ManGroupCollect_rec( pGroup->pMan->pAig, pObj, vNodes );
133  return vNodes;
134 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
Llb_Man_t * pMan
Definition: llbInt.h:100
void Llb_ManGroupCollect_rec(Aig_Man_t *pAig, Aig_Obj_t *pObj, Vec_Ptr_t *vNodes)
Definition: llb1Group.c:91
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:293
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigUtil.c:44
Definition: aig.h:69
static void Aig_ObjSetTravIdPrevious(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:294
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
Vec_Ptr_t * vIns
Definition: llbInt.h:97
void Llb_ManGroupCollect_rec ( Aig_Man_t pAig,
Aig_Obj_t pObj,
Vec_Ptr_t vNodes 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 91 of file llb1Group.c.

92 {
93  if ( Aig_ObjIsTravIdCurrent(pAig, pObj) )
94  return;
95  Aig_ObjSetTravIdCurrent(pAig, pObj);
96  if ( Aig_ObjIsConst1(pObj) )
97  return;
98  if ( Aig_ObjIsCo(pObj) )
99  {
100  Llb_ManGroupCollect_rec( pAig, Aig_ObjFanin0(pObj), vNodes );
101  return;
102  }
103  assert( Aig_ObjIsAnd(pObj) );
104  Llb_ManGroupCollect_rec( pAig, Aig_ObjFanin0(pObj), vNodes );
105  Llb_ManGroupCollect_rec( pAig, Aig_ObjFanin1(pObj), vNodes );
106  Vec_PtrPush( vNodes, pObj );
107 }
void Llb_ManGroupCollect_rec(Aig_Man_t *pAig, Aig_Obj_t *pObj, Vec_Ptr_t *vNodes)
Definition: llb1Group.c:91
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:295
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Definition: aig.h:309
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:293
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
Definition: aig.h:274
#define assert(ex)
Definition: util_old.h:213
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
Definition: aig.h:276
static int Aig_ObjIsAnd(Aig_Obj_t *pObj)
Definition: aig.h:278
Llb_Grp_t* Llb_ManGroupCreate ( Llb_Man_t pMan,
Aig_Obj_t pObj 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 175 of file llb1Group.c.

176 {
177  Llb_Grp_t * p;
178  assert( pObj->fMarkA == 1 );
179  // derive group
180  p = Llb_ManGroupAlloc( pMan );
181  Vec_PtrPush( p->vOuts, pObj );
182  Aig_ManIncrementTravId( pMan->pAig );
183  if ( Aig_ObjIsCo(pObj) )
184  Llb_ManGroupCreate_rec( pMan->pAig, Aig_ObjFanin0(pObj), p->vIns );
185  else
186  {
187  Llb_ManGroupCreate_rec( pMan->pAig, Aig_ObjFanin0(pObj), p->vIns );
188  Llb_ManGroupCreate_rec( pMan->pAig, Aig_ObjFanin1(pObj), p->vIns );
189  }
190  // derive internal objects
191  assert( p->vNodes == NULL );
192  p->vNodes = Llb_ManGroupCollect( p );
193  return p;
194 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Vec_Ptr_t * vNodes
Definition: llbInt.h:99
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
unsigned int fMarkA
Definition: aig.h:79
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Definition: aig.h:309
ABC_NAMESPACE_IMPL_START Llb_Grp_t * Llb_ManGroupAlloc(Llb_Man_t *pMan)
DECLARATIONS ///.
Definition: llb1Group.c:45
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigUtil.c:44
void Llb_ManGroupCreate_rec(Aig_Man_t *pAig, Aig_Obj_t *pObj, Vec_Ptr_t *vSupp)
Definition: llb1Group.c:147
Vec_Ptr_t * Llb_ManGroupCollect(Llb_Grp_t *pGroup)
Definition: llb1Group.c:120
#define assert(ex)
Definition: util_old.h:213
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
Definition: aig.h:276
Vec_Ptr_t * vOuts
Definition: llbInt.h:98
Vec_Ptr_t * vIns
Definition: llbInt.h:97
void Llb_ManGroupCreate_rec ( Aig_Man_t pAig,
Aig_Obj_t pObj,
Vec_Ptr_t vSupp 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 147 of file llb1Group.c.

148 {
149  if ( Aig_ObjIsTravIdCurrent(pAig, pObj) )
150  return;
151  Aig_ObjSetTravIdCurrent(pAig, pObj);
152  if ( Aig_ObjIsConst1(pObj) )
153  return;
154  if ( pObj->fMarkA )
155  {
156  Vec_PtrPush( vSupp, pObj );
157  return;
158  }
159  assert( Aig_ObjIsAnd(pObj) );
160  Llb_ManGroupCreate_rec( pAig, Aig_ObjFanin0(pObj), vSupp );
161  Llb_ManGroupCreate_rec( pAig, Aig_ObjFanin1(pObj), vSupp );
162 }
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:295
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
unsigned int fMarkA
Definition: aig.h:79
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Definition: aig.h:309
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:293
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
Definition: aig.h:274
void Llb_ManGroupCreate_rec(Aig_Man_t *pAig, Aig_Obj_t *pObj, Vec_Ptr_t *vSupp)
Definition: llb1Group.c:147
#define assert(ex)
Definition: util_old.h:213
static int Aig_ObjIsAnd(Aig_Obj_t *pObj)
Definition: aig.h:278
Llb_Grp_t* Llb_ManGroupCreateFirst ( Llb_Man_t pMan)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 207 of file llb1Group.c.

208 {
209  Llb_Grp_t * p;
210  Aig_Obj_t * pObj;
211  int i;
212  p = Llb_ManGroupAlloc( pMan );
213  Saig_ManForEachLo( pMan->pAig, pObj, i )
214  Vec_PtrPush( p->vOuts, pObj );
215  return p;
216 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
ABC_NAMESPACE_IMPL_START Llb_Grp_t * Llb_ManGroupAlloc(Llb_Man_t *pMan)
DECLARATIONS ///.
Definition: llb1Group.c:45
Definition: aig.h:69
#define Saig_ManForEachLo(p, pObj, i)
Definition: saig.h:96
Llb_Grp_t* Llb_ManGroupCreateFromCuts ( Llb_Man_t pMan,
Vec_Int_t vCut1,
Vec_Int_t vCut2 
)

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

Synopsis [Creates group from two cuts derived by the flow computation.]

Description []

SideEffects []

SeeAlso []

Definition at line 312 of file llb1Group.c.

313 {
314  Llb_Grp_t * p;
315  Aig_Obj_t * pObj;
316  int i;
317  p = Llb_ManGroupAlloc( pMan );
318 
319  // mark Cut1
320  Aig_ManIncrementTravId( pMan->pAig );
321  Aig_ManForEachObjVec( vCut1, pMan->pAig, pObj, i )
322  Aig_ObjSetTravIdCurrent( pMan->pAig, pObj );
323  // collect unmarked Cut2
324  Aig_ManForEachObjVec( vCut2, pMan->pAig, pObj, i )
325  if ( !Aig_ObjIsTravIdCurrent( pMan->pAig, pObj ) )
326  Vec_PtrPush( p->vOuts, pObj );
327 
328  // mark nodes reachable from Cut2
329  Aig_ManIncrementTravId( pMan->pAig );
330  Aig_ManForEachObjVec( vCut2, pMan->pAig, pObj, i )
331  Llb_ManGroupMarkNodes_rec( pMan->pAig, pObj );
332  // collect marked Cut1
333  Aig_ManForEachObjVec( vCut1, pMan->pAig, pObj, i )
334  if ( Aig_ObjIsTravIdCurrent( pMan->pAig, pObj ) )
335  Vec_PtrPush( p->vIns, pObj );
336 
337  // derive internal objects
338  assert( p->vNodes == NULL );
339  p->vNodes = Llb_ManGroupCollect( p );
340  return p;
341 }
#define Aig_ManForEachObjVec(vIds, p, pObj, i)
Definition: aig.h:408
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 Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:293
ABC_NAMESPACE_IMPL_START Llb_Grp_t * Llb_ManGroupAlloc(Llb_Man_t *pMan)
DECLARATIONS ///.
Definition: llb1Group.c:45
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigUtil.c:44
void Llb_ManGroupMarkNodes_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: llb1Group.c:286
if(last==0)
Definition: sparse_int.h:34
Definition: aig.h:69
Vec_Ptr_t * Llb_ManGroupCollect(Llb_Grp_t *pGroup)
Definition: llb1Group.c:120
#define assert(ex)
Definition: util_old.h:213
Llb_Grp_t* Llb_ManGroupCreateLast ( Llb_Man_t pMan)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 229 of file llb1Group.c.

230 {
231  Llb_Grp_t * p;
232  Aig_Obj_t * pObj;
233  int i;
234  p = Llb_ManGroupAlloc( pMan );
235  Saig_ManForEachLi( pMan->pAig, pObj, i )
236  Vec_PtrPush( p->vIns, pObj );
237  return p;
238 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
ABC_NAMESPACE_IMPL_START Llb_Grp_t * Llb_ManGroupAlloc(Llb_Man_t *pMan)
DECLARATIONS ///.
Definition: llb1Group.c:45
#define Saig_ManForEachLi(p, pObj, i)
Definition: saig.h:98
Definition: aig.h:69
int Llb_ManGroupHasVar ( Llb_Man_t p,
int  iGroup,
int  iVar 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 426 of file llb1Group.c.

427 {
428  Llb_Grp_t * pGroup = (Llb_Grp_t *)Vec_PtrEntry( p->vGroups, iGroup );
429  Aig_Obj_t * pObj;
430  int i;
431  Vec_PtrForEachEntry( Aig_Obj_t *, pGroup->vIns, pObj, i )
432  if ( pObj->Id == iVar )
433  return 1;
434  Vec_PtrForEachEntry( Aig_Obj_t *, pGroup->vOuts, pObj, i )
435  if ( pObj->Id == iVar )
436  return 1;
437  return 0;
438 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
if(last==0)
Definition: sparse_int.h:34
Definition: aig.h:69
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
Vec_Ptr_t * vIns
Definition: llbInt.h:97
void Llb_ManGroupMarkNodes_rec ( Aig_Man_t p,
Aig_Obj_t pObj 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 286 of file llb1Group.c.

287 {
288  if ( Aig_ObjIsTravIdCurrent(p, pObj) )
289  return;
290  if ( Aig_ObjIsTravIdPrevious(p, pObj) )
291  {
292  Aig_ObjSetTravIdCurrent(p, pObj);
293  return;
294  }
295  Aig_ObjSetTravIdCurrent(p, pObj);
296  assert( Aig_ObjIsNode(pObj) );
299 }
static int Aig_ObjIsTravIdPrevious(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:296
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 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 void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:293
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
Definition: aig.h:280
void Llb_ManGroupMarkNodes_rec(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: llb1Group.c:286
#define assert(ex)
Definition: util_old.h:213
Llb_Grp_t* Llb_ManGroupsCombine ( Llb_Grp_t p1,
Llb_Grp_t p2 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 251 of file llb1Group.c.

252 {
253  Llb_Grp_t * p;
254  Aig_Obj_t * pObj;
255  int i;
256  p = Llb_ManGroupAlloc( p1->pMan );
257  // create inputs
258  Vec_PtrForEachEntry( Aig_Obj_t *, p1->vIns, pObj, i )
259  Vec_PtrPush( p->vIns, pObj );
260  Vec_PtrForEachEntry( Aig_Obj_t *, p2->vIns, pObj, i )
261  Vec_PtrPushUnique( p->vIns, pObj );
262  // create outputs
263  Vec_PtrForEachEntry( Aig_Obj_t *, p1->vOuts, pObj, i )
264  Vec_PtrPush( p->vOuts, pObj );
265  Vec_PtrForEachEntry( Aig_Obj_t *, p2->vOuts, pObj, i )
266  Vec_PtrPushUnique( p->vOuts, pObj );
267 
268  // derive internal objects
269  assert( p->vNodes == NULL );
270  p->vNodes = Llb_ManGroupCollect( p );
271  return p;
272 }
Llb_Man_t * pMan
Definition: llbInt.h:100
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_PtrPushUnique(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:656
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
ABC_NAMESPACE_IMPL_START Llb_Grp_t * Llb_ManGroupAlloc(Llb_Man_t *pMan)
DECLARATIONS ///.
Definition: llb1Group.c:45
Definition: aig.h:69
Vec_Ptr_t * Llb_ManGroupCollect(Llb_Grp_t *pGroup)
Definition: llb1Group.c:120
#define assert(ex)
Definition: util_old.h:213
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
Vec_Ptr_t * vIns
Definition: llbInt.h:97
void Llb_ManGroupStop ( Llb_Grp_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 68 of file llb1Group.c.

69 {
70  if ( p == NULL )
71  return;
72  Vec_PtrWriteEntry( p->pMan->vGroups, p->Id, NULL );
73  Vec_PtrFreeP( &p->vIns );
74  Vec_PtrFreeP( &p->vOuts );
75  Vec_PtrFreeP( &p->vNodes );
76  ABC_FREE( p );
77 }
Llb_Man_t * pMan
Definition: llbInt.h:100
Vec_Ptr_t * vNodes
Definition: llbInt.h:99
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
Definition: vecPtr.h:396
#define ABC_FREE(obj)
Definition: abc_global.h:232
static void Vec_PtrFreeP(Vec_Ptr_t **p)
Definition: vecPtr.h:240
int Id
Definition: llbInt.h:96
Vec_Ptr_t * vOuts
Definition: llbInt.h:98
Vec_Ptr_t * vIns
Definition: llbInt.h:97
void Llb_ManPrepareGroups ( Llb_Man_t pMan)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 356 of file llb1Group.c.

357 {
358  Aig_Obj_t * pObj;
359  int i;
360  assert( pMan->vGroups == NULL );
361  pMan->vGroups = Vec_PtrAlloc( 1000 );
362  Llb_ManGroupCreateFirst( pMan );
363  Aig_ManForEachNode( pMan->pAig, pObj, i )
364  {
365  if ( pObj->fMarkA )
366  Llb_ManGroupCreate( pMan, pObj );
367  }
368  Saig_ManForEachLi( pMan->pAig, pObj, i )
369  {
370  if ( pObj->fMarkA )
371  Llb_ManGroupCreate( pMan, pObj );
372  }
373  Llb_ManGroupCreateLast( pMan );
374 }
Llb_Grp_t * Llb_ManGroupCreate(Llb_Man_t *pMan, Aig_Obj_t *pObj)
Definition: llb1Group.c:175
unsigned int fMarkA
Definition: aig.h:79
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
#define Saig_ManForEachLi(p, pObj, i)
Definition: saig.h:98
Definition: aig.h:69
Llb_Grp_t * Llb_ManGroupCreateLast(Llb_Man_t *pMan)
Definition: llb1Group.c:229
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
#define assert(ex)
Definition: util_old.h:213
Llb_Grp_t * Llb_ManGroupCreateFirst(Llb_Man_t *pMan)
Definition: llb1Group.c:207
void Llb_ManPrintHisto ( Llb_Man_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 451 of file llb1Group.c.

452 {
453  Aig_Obj_t * pObj;
454  int i, k;
455  Aig_ManForEachObj( p->pAig, pObj, i )
456  {
457  if ( Vec_IntEntry(p->vObj2Var, i) < 0 )
458  continue;
459  printf( "%3d :", i );
460  for ( k = 0; k < Vec_IntEntry(p->vVarBegs, i); k++ )
461  printf( " " );
462  for ( ; k <= Vec_IntEntry(p->vVarEnds, i); k++ )
463  printf( "%c", Llb_ManGroupHasVar(p, k, i)? '*':'-' );
464  printf( "\n" );
465  }
466 }
Aig_Man_t * pAig
Definition: llb3Image.c:49
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int Llb_ManGroupHasVar(Llb_Man_t *p, int iGroup, int iVar)
Definition: llb1Group.c:426
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
Definition: aig.h:69
#define Aig_ManForEachObj(p, pObj, i)
Definition: aig.h:403
void Llb_ManPrintSpan ( Llb_Man_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 387 of file llb1Group.c.

388 {
389  Llb_Grp_t * pGroup;
390  Aig_Obj_t * pVar;
391  int i, k, Span = 0, SpanMax = 0;
392  Vec_PtrForEachEntry( Llb_Grp_t *, p->vGroups, pGroup, i )
393  {
394  Vec_PtrForEachEntry( Aig_Obj_t *, pGroup->vIns, pVar, k )
395  if ( Vec_IntEntry(p->vVarBegs, pVar->Id) == i )
396  Span++;
397  Vec_PtrForEachEntry( Aig_Obj_t *, pGroup->vOuts, pVar, k )
398  if ( Vec_IntEntry(p->vVarBegs, pVar->Id) == i )
399  Span++;
400 
401  SpanMax = Abc_MaxInt( SpanMax, Span );
402 printf( "%d ", Span );
403 
404  Vec_PtrForEachEntry( Aig_Obj_t *, pGroup->vIns, pVar, k )
405  if ( Vec_IntEntry(p->vVarEnds, pVar->Id) == i )
406  Span--;
407  Vec_PtrForEachEntry( Aig_Obj_t *, pGroup->vOuts, pVar, k )
408  if ( Vec_IntEntry(p->vVarEnds, pVar->Id) == i )
409  Span--;
410  }
411 printf( "\n" );
412 printf( "Max = %d\n", SpanMax );
413 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
if(last==0)
Definition: sparse_int.h:34
Definition: aig.h:69
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
Vec_Ptr_t * vIns
Definition: llbInt.h:97