ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
mpmMig.h File Reference
#include "misc/vec/vec.h"
Include dependency graph for mpmMig.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Mig_Fan_t_
 
struct  Mig_Obj_t_
 
struct  Mig_Man_t_
 

Macros

#define MIG_NONE   0x7FFFFFFF
 INCLUDES ///.
 
#define MIG_MASK   0x0000FFF
 
#define MIG_BASE   12
 
#define Mig_ManForEachObj(p, pObj)
 MACRO DEFINITIONS ///.
 
#define Mig_ManForEachObj1(p, pObj)
 
#define Mig_ManForEachObjReverse(p, pObj)
 
#define Mig_ManForEachObjVec(vVec, p, pObj, i)
 
#define Mig_ManForEachNode(p, pObj)
 
#define Mig_ManForEachCand(p, pObj)
 
#define Mig_ManForEachCi(p, pObj, i)
 
#define Mig_ManForEachCo(p, pObj, i)
 
#define Mig_ObjForEachFaninId(p, iFanin, i)
 
#define Mig_ObjForEachFanin(p, pFanin, i)
 

Typedefs

typedef struct Mig_Fan_t_ Mig_Fan_t
 BASIC TYPES ///.
 
typedef struct Mig_Obj_t_ Mig_Obj_t
 
typedef struct Mig_Man_t_ Mig_Man_t
 

Functions

Mig_Man_tMig_ManStart ()
 FUNCTION DECLARATIONS ///.
 
void Mig_ManStop (Mig_Man_t *p)
 
void Mig_ManSetRefs (Mig_Man_t *p)
 
int Mig_ManAndNum (Mig_Man_t *p)
 
int Mig_ManXorNum (Mig_Man_t *p)
 
int Mig_ManMuxNum (Mig_Man_t *p)
 

Macro Definition Documentation

◆ MIG_BASE

#define MIG_BASE   12

Definition at line 41 of file mpmMig.h.

◆ Mig_ManForEachCand

#define Mig_ManForEachCand ( p,
pObj )
Value:
Mig_ManForEachObj( p, pObj ) if ( !Mig_ObjIsCand(pObj) ) {} else
Cube * p
Definition exorList.c:222
#define Mig_ManForEachObj(p, pObj)
MACRO DEFINITIONS ///.
Definition mpmMig.h:304

Definition at line 324 of file mpmMig.h.

324#define Mig_ManForEachCand( p, pObj ) \
325 Mig_ManForEachObj( p, pObj ) if ( !Mig_ObjIsCand(pObj) ) {} else

◆ Mig_ManForEachCi

#define Mig_ManForEachCi ( p,
pObj,
i )
Value:
for ( i = 0; (i < Vec_IntSize(&p->vCis)) && ((pObj) = Mig_ManCi(p, i)); i++ )

Definition at line 327 of file mpmMig.h.

327#define Mig_ManForEachCi( p, pObj, i ) \
328 for ( i = 0; (i < Vec_IntSize(&p->vCis)) && ((pObj) = Mig_ManCi(p, i)); i++ )

◆ Mig_ManForEachCo

#define Mig_ManForEachCo ( p,
pObj,
i )
Value:
for ( i = 0; (i < Vec_IntSize(&p->vCos)) && ((pObj) = Mig_ManCo(p, i)); i++ )

Definition at line 329 of file mpmMig.h.

329#define Mig_ManForEachCo( p, pObj, i ) \
330 for ( i = 0; (i < Vec_IntSize(&p->vCos)) && ((pObj) = Mig_ManCo(p, i)); i++ )

◆ Mig_ManForEachNode

#define Mig_ManForEachNode ( p,
pObj )
Value:
Mig_ManForEachObj( p, pObj ) if ( !Mig_ObjIsNode(pObj) ) {} else

Definition at line 322 of file mpmMig.h.

322#define Mig_ManForEachNode( p, pObj ) \
323 Mig_ManForEachObj( p, pObj ) if ( !Mig_ObjIsNode(pObj) ) {} else

◆ Mig_ManForEachObj

#define Mig_ManForEachObj ( p,
pObj )
Value:
for ( p->iPage = 0; p->iPage < Vec_PtrSize(&p->vPages) && \
((p->pPage) = (Mig_Obj_t *)Vec_PtrEntry(&p->vPages, p->iPage)); p->iPage++ ) \
for ( pObj = p->pPage; !Mig_ObjIsNone(pObj); pObj++ )
struct Mig_Obj_t_ Mig_Obj_t
Definition mpmMig.h:54

MACRO DEFINITIONS ///.

Definition at line 304 of file mpmMig.h.

304#define Mig_ManForEachObj( p, pObj ) \
305 for ( p->iPage = 0; p->iPage < Vec_PtrSize(&p->vPages) && \
306 ((p->pPage) = (Mig_Obj_t *)Vec_PtrEntry(&p->vPages, p->iPage)); p->iPage++ ) \
307 for ( pObj = p->pPage; !Mig_ObjIsNone(pObj); pObj++ )

◆ Mig_ManForEachObj1

#define Mig_ManForEachObj1 ( p,
pObj )
Value:
for ( p->iPage = 0; p->iPage < Vec_PtrSize(&p->vPages) && \
((p->pPage) = (Mig_Obj_t *)Vec_PtrEntry(&p->vPages, p->iPage)); p->iPage++ ) \
for ( pObj = p->pPage + (p->iPage == 0); !Mig_ObjIsNone(pObj); pObj++ )

Definition at line 308 of file mpmMig.h.

308#define Mig_ManForEachObj1( p, pObj ) \
309 for ( p->iPage = 0; p->iPage < Vec_PtrSize(&p->vPages) && \
310 ((p->pPage) = (Mig_Obj_t *)Vec_PtrEntry(&p->vPages, p->iPage)); p->iPage++ ) \
311 for ( pObj = p->pPage + (p->iPage == 0); !Mig_ObjIsNone(pObj); pObj++ )

◆ Mig_ManForEachObjReverse

#define Mig_ManForEachObjReverse ( p,
pObj )
Value:
for ( p->iPage = Vec_PtrSize(&p->vPages) - 1; p->iPage >= 0 && \
((p->pPage) = (Mig_Obj_t *)Vec_PtrEntry(&p->vPages, p->iPage)); p->iPage-- ) \
for ( pObj = (p->iPage == Vec_PtrSize(&p->vPages) - 1) ? \
Mig_ManObj(p, Mig_ManObjNum(p)-1) : p->pPage + MIG_MASK; \
pObj - p->pPage >= 0; pObj-- )
#define MIG_MASK
Definition mpmMig.h:40

Definition at line 312 of file mpmMig.h.

312#define Mig_ManForEachObjReverse( p, pObj ) \
313 for ( p->iPage = Vec_PtrSize(&p->vPages) - 1; p->iPage >= 0 && \
314 ((p->pPage) = (Mig_Obj_t *)Vec_PtrEntry(&p->vPages, p->iPage)); p->iPage-- ) \
315 for ( pObj = (p->iPage == Vec_PtrSize(&p->vPages) - 1) ? \
316 Mig_ManObj(p, Mig_ManObjNum(p)-1) : p->pPage + MIG_MASK; \
317 pObj - p->pPage >= 0; pObj-- )

◆ Mig_ManForEachObjVec

#define Mig_ManForEachObjVec ( vVec,
p,
pObj,
i )
Value:
for ( i = 0; (i < Vec_IntSize(vVec)) && ((pObj) = Mig_ManObj(p, Vec_IntEntry(vVec,i))); i++ )

Definition at line 319 of file mpmMig.h.

319#define Mig_ManForEachObjVec( vVec, p, pObj, i ) \
320 for ( i = 0; (i < Vec_IntSize(vVec)) && ((pObj) = Mig_ManObj(p, Vec_IntEntry(vVec,i))); i++ )

◆ MIG_MASK

#define MIG_MASK   0x0000FFF

Definition at line 40 of file mpmMig.h.

◆ MIG_NONE

#define MIG_NONE   0x7FFFFFFF

INCLUDES ///.

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

FileName [mpmMig.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Configurable technology mapper.]

Synopsis [Internal declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 1, 2013.]

Revision [

Id
mpmMig.h,v 1.00 2013/06/01 00:00:00 alanmi Exp

] PARAMETERS ///

Definition at line 37 of file mpmMig.h.

◆ Mig_ObjForEachFanin

#define Mig_ObjForEachFanin ( p,
pFanin,
i )
Value:
for ( i = 0; Mig_ObjHasFanin(p, i) && ((pFanin) = Mig_ObjFanin(p, i)); i++ )

Definition at line 335 of file mpmMig.h.

335#define Mig_ObjForEachFanin( p, pFanin, i ) \
336 for ( i = 0; Mig_ObjHasFanin(p, i) && ((pFanin) = Mig_ObjFanin(p, i)); i++ )

◆ Mig_ObjForEachFaninId

#define Mig_ObjForEachFaninId ( p,
iFanin,
i )
Value:
for ( i = 0; Mig_ObjHasFanin(p, i) && ((iFanin) = Mig_ObjFaninId(p, i)); i++ )

Definition at line 333 of file mpmMig.h.

333#define Mig_ObjForEachFaninId( p, iFanin, i ) \
334 for ( i = 0; Mig_ObjHasFanin(p, i) && ((iFanin) = Mig_ObjFaninId(p, i)); i++ )

Typedef Documentation

◆ Mig_Fan_t

typedef struct Mig_Fan_t_ Mig_Fan_t

BASIC TYPES ///.

Definition at line 47 of file mpmMig.h.

◆ Mig_Man_t

typedef struct Mig_Man_t_ Mig_Man_t

Definition at line 60 of file mpmMig.h.

◆ Mig_Obj_t

typedef struct Mig_Obj_t_ Mig_Obj_t

Definition at line 54 of file mpmMig.h.

Function Documentation

◆ Mig_ManAndNum()

int Mig_ManAndNum ( Mig_Man_t * p)
extern

Definition at line 98 of file mpmMig.c.

99{
100 return Mig_ManTypeNum(p, 1);
101}
int Mig_ManTypeNum(Mig_Man_t *p, int Type)
Definition mpmMig.c:90
Here is the call graph for this function:

◆ Mig_ManMuxNum()

int Mig_ManMuxNum ( Mig_Man_t * p)
extern

Definition at line 106 of file mpmMig.c.

107{
108 return Mig_ManTypeNum(p, 3);
109}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Mig_ManSetRefs()

void Mig_ManSetRefs ( Mig_Man_t * p)
extern

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 123 of file mpmMig.c.

124{
125 Mig_Obj_t * pObj;
126 int i, iFanin;
127 // increment references
128 Vec_IntFill( &p->vRefs, Mig_ManObjNum(p), 0 );
129 Mig_ManForEachObj( p, pObj )
130 {
131 Mig_ObjForEachFaninId( pObj, iFanin, i )
132 Vec_IntAddToEntry( &p->vRefs, iFanin, 1 );
133 if ( Mig_ObjSiblId(pObj) )
134 Vec_IntAddToEntry( &p->vRefs, Mig_ObjSiblId(pObj), 1 );
135 }
136}
#define Mig_ObjForEachFaninId(p, iFanin, i)
Definition mpmMig.h:333
Here is the caller graph for this function:

◆ Mig_ManStart()

Mig_Man_t * Mig_ManStart ( )
extern

FUNCTION DECLARATIONS ///.

FUNCTION DECLARATIONS ///.

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

FileName [mpmMig.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Configurable technology mapper.]

Synopsis [Subject graph data structure.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 1, 2013.]

Revision [

Id
mpmMig.c,v 1.00 2013/06/01 00:00:00 alanmi Exp

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file mpmMig.c.

46{
47 Mig_Man_t * p;
48 assert( sizeof(Mig_Obj_t) >= 16 );
49 assert( (1 << MIG_BASE) == MIG_MASK + 1 );
50 p = ABC_CALLOC( Mig_Man_t, 1 );
51 Vec_IntGrow( &p->vCis, 1024 );
52 Vec_IntGrow( &p->vCos, 1024 );
53 Mig_ManAppendObj( p ); // const0
54 return p;
55}
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
#define MIG_BASE
Definition mpmMig.h:41
struct Mig_Man_t_ Mig_Man_t
Definition mpmMig.h:60
#define assert(ex)
Definition util_old.h:213
Here is the caller graph for this function:

◆ Mig_ManStop()

void Mig_ManStop ( Mig_Man_t * p)
extern

Definition at line 56 of file mpmMig.c.

57{
58 if ( 0 )
59 printf( "Subject graph uses %d pages of %d objects with %d entries. Total memory = %.2f MB.\n",
60 Vec_PtrSize(&p->vPages), MIG_MASK + 1, p->nObjs,
61 1.0 * Vec_PtrSize(&p->vPages) * (MIG_MASK + 1) * 16 / (1 << 20) );
62 // attributes
63 ABC_FREE( p->vTravIds.pArray );
64 ABC_FREE( p->vCopies.pArray );
65 ABC_FREE( p->vLevels.pArray );
66 ABC_FREE( p->vRefs.pArray );
67 ABC_FREE( p->vSibls.pArray );
68 // pages
69 Vec_PtrForEachEntry( Mig_Obj_t *, &p->vPages, p->pPage, p->iPage )
70 --p->pPage, ABC_FREE( p->pPage );
71 // objects
72 ABC_FREE( p->vPages.pArray );
73 ABC_FREE( p->vCis.pArray );
74 ABC_FREE( p->vCos.pArray );
75 ABC_FREE( p->pName );
76 ABC_FREE( p );
77}
#define ABC_FREE(obj)
Definition abc_global.h:267
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55
Here is the caller graph for this function:

◆ Mig_ManXorNum()

int Mig_ManXorNum ( Mig_Man_t * p)
extern

Definition at line 102 of file mpmMig.c.

103{
104 return Mig_ManTypeNum(p, 2);
105}
Here is the call graph for this function:
Here is the caller graph for this function: