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

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START
Amap_Obj_t
Amap_ManSetupObj (Amap_Man_t *p)
 DECLARATIONS ///. More...
 
Amap_Obj_tAmap_ManCreateConst1 (Amap_Man_t *p)
 
Amap_Obj_tAmap_ManCreatePi (Amap_Man_t *p)
 FUNCTION DECLARATIONS ///. More...
 
Amap_Obj_tAmap_ManCreatePo (Amap_Man_t *p, Amap_Obj_t *pFan0)
 
Amap_Obj_tAmap_ManCreateAnd (Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1)
 
Amap_Obj_tAmap_ManCreateXor (Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1)
 
Amap_Obj_tAmap_ManCreateMux (Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1, Amap_Obj_t *pFanC)
 
void Amap_ManCreateChoice (Amap_Man_t *p, Amap_Obj_t *pObj)
 
void Amap_ManCreateXorChoices (Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1, Amap_Obj_t *pChoices[])
 
void Amap_ManCreateMuxChoices (Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1, Amap_Obj_t *pFanC, Amap_Obj_t *pChoices[])
 
static Amap_Obj_tAmap_AndToObj (Aig_Obj_t *pObj)
 
Amap_Obj_tAmap_ManGetLast_rec (Amap_Man_t *p, Amap_Obj_t *pObj)
 
void Amap_ManCreate (Amap_Man_t *p, Aig_Man_t *pAig)
 

Function Documentation

static Amap_Obj_t* Amap_AndToObj ( Aig_Obj_t pObj)
inlinestatic

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

Synopsis [Drags pointer out through the copy.]

Description []

SideEffects []

SeeAlso []

Definition at line 289 of file amapGraph.c.

290 {
291  return Amap_NotCond( (Amap_Obj_t *)Aig_Regular(pObj)->pData, Aig_IsComplement(pObj) );
292 }
static int Aig_IsComplement(Aig_Obj_t *p)
Definition: aig.h:249
static Aig_Obj_t * Aig_Regular(Aig_Obj_t *p)
Definition: aig.h:246
static Amap_Obj_t * Amap_NotCond(Amap_Obj_t *p, int c)
Definition: amapInt.h:223
void Amap_ManCreate ( Amap_Man_t p,
Aig_Man_t pAig 
)

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

Synopsis [Starts the AIG manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 323 of file amapGraph.c.

324 {
325  Vec_Ptr_t * vNodes;
326  Amap_Obj_t * pChoices[4];
327  Aig_Obj_t * pObj, * pFanin, * pPrev, * pFan0, * pFan1, * pFanC;
328  int i, fChoices;
329  if ( pAig->pEquivs )
330  vNodes = Aig_ManDfsChoices( pAig );
331  else
332  vNodes = Aig_ManDfs( pAig, 1 );
333  p->pConst1 = Amap_ManCreateConst1( p );
334  // print warning about excessive memory usage
335  if ( p->pPars->fVerbose )
336  {
337  if ( 1.0 * Aig_ManObjNum(pAig) * sizeof(Amap_Obj_t) / (1<<30) > 0.1 )
338  printf( "Warning: Mapper allocates %.3f GB for subject graph with %d objects.\n",
339  1.0 * Aig_ManObjNum(pAig) * sizeof(Amap_Obj_t) / (1<<30), Aig_ManObjNum(pAig) );
340  }
341  // create PIs and remember them in the old nodes
342  Aig_ManCleanData(pAig);
343  Aig_ManConst1(pAig)->pData = Amap_ManConst1( p );
344  Aig_ManForEachCi( pAig, pObj, i )
345  pObj->pData = Amap_ManCreatePi( p );
346  // load the AIG into the mapper
347  Vec_PtrForEachEntry( Aig_Obj_t *, vNodes, pObj, i )
348  {
349  fChoices = 0;
350  if ( p->fUseXor && Aig_ObjRecognizeExor(pObj, &pFan0, &pFan1 ) )
351  {
352  Amap_ManCreateXorChoices( p, Amap_AndToObj(pFan0), Amap_AndToObj(pFan1), pChoices );
353  fChoices = 1;
354  }
355  else if ( p->fUseMux && Aig_ObjIsMuxType(pObj) )
356  {
357  pFanC = Aig_ObjRecognizeMux( pObj, &pFan1, &pFan0 );
358  Amap_ManCreateMuxChoices( p, Amap_AndToObj(pFan0), Amap_AndToObj(pFan1), Amap_AndToObj(pFanC), pChoices );
359  fChoices = 1;
360  }
361  pObj->pData = Amap_ManCreateAnd( p, (Amap_Obj_t *)Aig_ObjChild0Copy(pObj), (Amap_Obj_t *)Aig_ObjChild1Copy(pObj) );
362  if ( fChoices )
363  {
364  p->nChoicesAdded++;
365  Amap_ObjSetChoice( (Amap_Obj_t *)pObj->pData, pChoices[0] );
366  Amap_ObjSetChoice( pChoices[0], pChoices[1] );
367  Amap_ObjSetChoice( pChoices[1], pChoices[2] );
368  Amap_ObjSetChoice( pChoices[2], pChoices[3] );
369  Amap_ManCreateChoice( p, (Amap_Obj_t *)pObj->pData );
370  }
371  if ( Aig_ObjIsChoice( pAig, pObj ) )
372  {
373 // assert( !fChoices );
374  p->nChoicesGiven++;
375  for ( pPrev = pObj, pFanin = Aig_ObjEquiv(pAig, pObj); pFanin; pPrev = pFanin, pFanin = Aig_ObjEquiv(pAig, pFanin) )
376  {
377  ((Amap_Obj_t *)pFanin->pData)->fRepr = 0;
379  (Amap_Obj_t *)pFanin->pData );
380  }
381  Amap_ManCreateChoice( p, (Amap_Obj_t *)pObj->pData );
382  }
383  }
384  Vec_PtrFree( vNodes );
385  // set the primary outputs without copying the phase
386  Aig_ManForEachCo( pAig, pObj, i )
387  pObj->pData = Amap_ManCreatePo( p, (Amap_Obj_t *)Aig_ObjChild0Copy(pObj) );
388  if ( p->pPars->fVerbose )
389  printf( "Performing mapping with %d given and %d created choices.\n",
390  p->nChoicesGiven, p->nChoicesAdded );
391 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
Amap_Obj_t * Amap_ManGetLast_rec(Amap_Man_t *p, Amap_Obj_t *pObj)
Definition: amapGraph.c:305
static int Aig_ManObjNum(Aig_Man_t *p)
Definition: aig.h:258
void * pData
Definition: aig.h:87
Vec_Ptr_t * Aig_ManDfsChoices(Aig_Man_t *p)
Definition: aigDfs.c:391
Amap_Obj_t * pConst1
Definition: amapInt.h:93
static void Amap_ObjSetChoice(Amap_Obj_t *pObj, Amap_Obj_t *pEqu)
Definition: amapInt.h:259
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: aig.h:393
#define Aig_ManForEachCo(p, pObj, i)
Definition: aig.h:398
Amap_Obj_t * Amap_ManCreatePi(Amap_Man_t *p)
FUNCTION DECLARATIONS ///.
Definition: amapGraph.c:88
Amap_Obj_t * Amap_ManCreatePo(Amap_Man_t *p, Amap_Obj_t *pFan0)
Definition: amapGraph.c:110
int fVerbose
Definition: amap.h:55
void * pData
Definition: amapInt.h:212
Aig_Obj_t * Aig_ObjRecognizeMux(Aig_Obj_t *pObj, Aig_Obj_t **ppObjT, Aig_Obj_t **ppObjE)
Definition: aigUtil.c:387
Amap_Obj_t * Amap_ManCreateConst1(Amap_Man_t *p)
Definition: amapGraph.c:67
if(last==0)
Definition: sparse_int.h:34
static Amap_Obj_t * Amap_ManConst1(Amap_Man_t *p)
Definition: amapInt.h:234
static Aig_Obj_t * Aig_ObjEquiv(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:328
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
Definition: aig.h:313
int Aig_ObjRecognizeExor(Aig_Obj_t *pObj, Aig_Obj_t **ppFan0, Aig_Obj_t **ppFan1)
Definition: aigUtil.c:343
Vec_Ptr_t * Aig_ManDfs(Aig_Man_t *p, int fNodesOnly)
Definition: aigDfs.c:145
Definition: aig.h:69
static Amap_Obj_t * Amap_AndToObj(Aig_Obj_t *pObj)
Definition: amapGraph.c:289
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
Definition: aig.h:312
void Amap_ManCreateChoice(Amap_Man_t *p, Amap_Obj_t *pObj)
Definition: amapGraph.c:222
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Definition: aig.h:264
void Amap_ManCreateMuxChoices(Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1, Amap_Obj_t *pFanC, Amap_Obj_t *pChoices[])
Definition: amapGraph.c:270
void Amap_ManCreateXorChoices(Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1, Amap_Obj_t *pChoices[])
Definition: amapGraph.c:251
Amap_Par_t * pPars
Definition: amapInt.h:78
int Aig_ObjIsMuxType(Aig_Obj_t *pObj)
Definition: aigUtil.c:307
Amap_Obj_t * Amap_ManCreateAnd(Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1)
Definition: amapGraph.c:137
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
void Aig_ManCleanData(Aig_Man_t *p)
Definition: aigUtil.c:205
static int Aig_ObjIsChoice(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:283
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
Amap_Obj_t* Amap_ManCreateAnd ( Amap_Man_t p,
Amap_Obj_t pFan0,
Amap_Obj_t pFan1 
)

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

Synopsis [Create the new node assuming it does not exist.]

Description []

SideEffects []

SeeAlso []

Definition at line 137 of file amapGraph.c.

138 {
139  Amap_Obj_t * pObj;
140  pObj = Amap_ManSetupObj( p );
141  pObj->Type = AMAP_OBJ_AND;
142  pObj->Fan[0] = Amap_ObjToLit(pFan0); Amap_Regular(pFan0)->nRefs++;
143  pObj->Fan[1] = Amap_ObjToLit(pFan1); Amap_Regular(pFan1)->nRefs++;
144  assert( Abc_Lit2Var(pObj->Fan[0]) != Abc_Lit2Var(pObj->Fan[1]) );
145  pObj->fPhase = Amap_ObjPhaseReal(pFan0) & Amap_ObjPhaseReal(pFan1);
146  pObj->Level = 1 + Abc_MaxInt( Amap_Regular(pFan0)->Level, Amap_Regular(pFan1)->Level );
147  if ( p->nLevelMax < (int)pObj->Level )
148  p->nLevelMax = (int)pObj->Level;
149  assert( p->nLevelMax < 4094 ); // 2^12-2
150  p->nObjs[AMAP_OBJ_AND]++;
151  return pObj;
152 }
static int Amap_ObjPhaseReal(Amap_Obj_t *pObj)
Definition: amapInt.h:260
unsigned Level
Definition: amapInt.h:206
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
static Amap_Obj_t * Amap_Regular(Amap_Obj_t *p)
Definition: amapInt.h:221
int nRefs
Definition: amapInt.h:208
static int Amap_ObjToLit(Amap_Obj_t *pObj)
Definition: amapInt.h:247
ABC_NAMESPACE_IMPL_START Amap_Obj_t * Amap_ManSetupObj(Amap_Man_t *p)
DECLARATIONS ///.
Definition: amapGraph.c:45
unsigned Type
Definition: amapInt.h:200
unsigned fPhase
Definition: amapInt.h:203
int Fan[3]
Definition: amapInt.h:210
int nObjs[AMAP_OBJ_VOID]
Definition: amapInt.h:94
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
#define assert(ex)
Definition: util_old.h:213
int nLevelMax
Definition: amapInt.h:95
void Amap_ManCreateChoice ( Amap_Man_t p,
Amap_Obj_t pObj 
)

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

Synopsis [Creates the choice node.]

Description [Should be called after the equivalence class nodes are linked.]

SideEffects []

SeeAlso []

Definition at line 222 of file amapGraph.c.

223 {
224  Amap_Obj_t * pTemp;
225  // mark the node as a representative if its class
226 // assert( pObj->fRepr == 0 );
227  pObj->fRepr = 1;
228  // update the level of this node (needed for correct required time computation)
229  for ( pTemp = pObj; pTemp; pTemp = Amap_ObjChoice(p, pTemp) )
230  {
231  pObj->Level = Abc_MaxInt( pObj->Level, pTemp->Level );
232 // pTemp->nVisits++; pTemp->nVisitsCopy++;
233  }
234  // mark the largest level
235  if ( p->nLevelMax < (int)pObj->Level )
236  p->nLevelMax = (int)pObj->Level;
237  assert( p->nLevelMax < 4094 ); // 2^12-2
238 }
unsigned Level
Definition: amapInt.h:206
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
unsigned fRepr
Definition: amapInt.h:204
static Amap_Obj_t * Amap_ObjChoice(Amap_Man_t *p, Amap_Obj_t *pObj)
Definition: amapInt.h:258
#define assert(ex)
Definition: util_old.h:213
int nLevelMax
Definition: amapInt.h:95
Amap_Obj_t* Amap_ManCreateConst1 ( Amap_Man_t p)

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

Synopsis [Creates constant 1 node.]

Description []

SideEffects []

SeeAlso []

Definition at line 67 of file amapGraph.c.

68 {
69  Amap_Obj_t * pObj;
70  pObj = Amap_ManSetupObj( p );
71  pObj->Type = AMAP_OBJ_CONST1;
72  pObj->fPhase = 1;
73  p->nObjs[AMAP_OBJ_CONST1]++;
74  return pObj;
75 }
ABC_NAMESPACE_IMPL_START Amap_Obj_t * Amap_ManSetupObj(Amap_Man_t *p)
DECLARATIONS ///.
Definition: amapGraph.c:45
unsigned Type
Definition: amapInt.h:200
unsigned fPhase
Definition: amapInt.h:203
int nObjs[AMAP_OBJ_VOID]
Definition: amapInt.h:94
Amap_Obj_t* Amap_ManCreateMux ( Amap_Man_t p,
Amap_Obj_t pFan0,
Amap_Obj_t pFan1,
Amap_Obj_t pFanC 
)

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

Synopsis [Create the new node assuming it does not exist.]

Description []

SideEffects []

SeeAlso []

Definition at line 192 of file amapGraph.c.

193 {
194  Amap_Obj_t * pObj;
195  pObj = Amap_ManSetupObj( p );
196  pObj->Type = AMAP_OBJ_MUX;
197  pObj->Fan[0] = Amap_ObjToLit(pFan0); Amap_Regular(pFan0)->nRefs++;
198  pObj->Fan[1] = Amap_ObjToLit(pFan1); Amap_Regular(pFan1)->nRefs++;
199  pObj->Fan[2] = Amap_ObjToLit(pFanC); Amap_Regular(pFanC)->nRefs++;
200  pObj->fPhase = (Amap_ObjPhaseReal(pFan1) & Amap_ObjPhaseReal(pFanC)) |
201  (Amap_ObjPhaseReal(pFan0) & ~Amap_ObjPhaseReal(pFanC));
202  pObj->Level = Abc_MaxInt( Amap_Regular(pFan0)->Level, Amap_Regular(pFan1)->Level );
203  pObj->Level = 2 + Abc_MaxInt( pObj->Level, Amap_Regular(pFanC)->Level );
204  if ( p->nLevelMax < (int)pObj->Level )
205  p->nLevelMax = (int)pObj->Level;
206  assert( p->nLevelMax < 4094 ); // 2^12-2
207  p->nObjs[AMAP_OBJ_MUX]++;
208  return pObj;
209 }
static int Amap_ObjPhaseReal(Amap_Obj_t *pObj)
Definition: amapInt.h:260
unsigned Level
Definition: amapInt.h:206
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
static Amap_Obj_t * Amap_Regular(Amap_Obj_t *p)
Definition: amapInt.h:221
int nRefs
Definition: amapInt.h:208
static int Amap_ObjToLit(Amap_Obj_t *pObj)
Definition: amapInt.h:247
ABC_NAMESPACE_IMPL_START Amap_Obj_t * Amap_ManSetupObj(Amap_Man_t *p)
DECLARATIONS ///.
Definition: amapGraph.c:45
unsigned Type
Definition: amapInt.h:200
unsigned fPhase
Definition: amapInt.h:203
int Fan[3]
Definition: amapInt.h:210
int nObjs[AMAP_OBJ_VOID]
Definition: amapInt.h:94
#define assert(ex)
Definition: util_old.h:213
int nLevelMax
Definition: amapInt.h:95
void Amap_ManCreateMuxChoices ( Amap_Man_t p,
Amap_Obj_t pFan0,
Amap_Obj_t pFan1,
Amap_Obj_t pFanC,
Amap_Obj_t pChoices[] 
)

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

Synopsis [Creates XOR/MUX choices for the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 270 of file amapGraph.c.

271 {
272  pChoices[0] = Amap_ManCreateMux( p, pFan0, pFan1, pFanC );
273  pChoices[1] = Amap_ManCreateMux( p, Amap_Not(pFan0), Amap_Not(pFan1), pFanC );
274  pChoices[2] = Amap_ManCreateMux( p, pFan1, pFan0, Amap_Not(pFanC) );
275  pChoices[3] = Amap_ManCreateMux( p, Amap_Not(pFan1), Amap_Not(pFan0), Amap_Not(pFanC) );
276 }
Amap_Obj_t * Amap_ManCreateMux(Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1, Amap_Obj_t *pFanC)
Definition: amapGraph.c:192
static Amap_Obj_t * Amap_Not(Amap_Obj_t *p)
Definition: amapInt.h:222
Amap_Obj_t* Amap_ManCreatePi ( Amap_Man_t p)

FUNCTION DECLARATIONS ///.

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

Synopsis [Creates primary input.]

Description []

SideEffects []

SeeAlso []

Definition at line 88 of file amapGraph.c.

89 {
90  Amap_Obj_t * pObj;
91  pObj = Amap_ManSetupObj( p );
92  pObj->Type = AMAP_OBJ_PI;
93  pObj->IdPio = Vec_PtrSize( p->vPis );
94  Vec_PtrPush( p->vPis, pObj );
95  p->nObjs[AMAP_OBJ_PI]++;
96  return pObj;
97 }
unsigned IdPio
Definition: amapInt.h:202
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
ABC_NAMESPACE_IMPL_START Amap_Obj_t * Amap_ManSetupObj(Amap_Man_t *p)
DECLARATIONS ///.
Definition: amapGraph.c:45
Vec_Ptr_t * vPis
Definition: amapInt.h:86
unsigned Type
Definition: amapInt.h:200
int nObjs[AMAP_OBJ_VOID]
Definition: amapInt.h:94
Amap_Obj_t* Amap_ManCreatePo ( Amap_Man_t p,
Amap_Obj_t pFan0 
)

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

Synopsis [Creates primary output with the given driver.]

Description []

SideEffects []

SeeAlso []

Definition at line 110 of file amapGraph.c.

111 {
112  Amap_Obj_t * pObj;
113  pObj = Amap_ManSetupObj( p );
114  pObj->IdPio = Vec_PtrSize( p->vPos );
115  Vec_PtrPush( p->vPos, pObj );
116  pObj->Type = AMAP_OBJ_PO;
117  pObj->Fan[0] = Amap_ObjToLit(pFan0); Amap_Regular(pFan0)->nRefs++;
118  pObj->Level = Amap_Regular(pFan0)->Level;
119  if ( p->nLevelMax < (int)pObj->Level )
120  p->nLevelMax = (int)pObj->Level;
121  assert( p->nLevelMax < 4094 ); // 2^12-2
122  p->nObjs[AMAP_OBJ_PO]++;
123  return pObj;
124 }
unsigned IdPio
Definition: amapInt.h:202
unsigned Level
Definition: amapInt.h:206
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 Amap_Obj_t * Amap_Regular(Amap_Obj_t *p)
Definition: amapInt.h:221
int nRefs
Definition: amapInt.h:208
static int Amap_ObjToLit(Amap_Obj_t *pObj)
Definition: amapInt.h:247
ABC_NAMESPACE_IMPL_START Amap_Obj_t * Amap_ManSetupObj(Amap_Man_t *p)
DECLARATIONS ///.
Definition: amapGraph.c:45
unsigned Type
Definition: amapInt.h:200
int Fan[3]
Definition: amapInt.h:210
int nObjs[AMAP_OBJ_VOID]
Definition: amapInt.h:94
#define assert(ex)
Definition: util_old.h:213
int nLevelMax
Definition: amapInt.h:95
Vec_Ptr_t * vPos
Definition: amapInt.h:87
Amap_Obj_t* Amap_ManCreateXor ( Amap_Man_t p,
Amap_Obj_t pFan0,
Amap_Obj_t pFan1 
)

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

Synopsis [Create the new node assuming it does not exist.]

Description []

SideEffects []

SeeAlso []

Definition at line 165 of file amapGraph.c.

166 {
167  Amap_Obj_t * pObj;
168  pObj = Amap_ManSetupObj( p );
169  pObj->Type = AMAP_OBJ_XOR;
170  pObj->Fan[0] = Amap_ObjToLit(pFan0); Amap_Regular(pFan0)->nRefs++;
171  pObj->Fan[1] = Amap_ObjToLit(pFan1); Amap_Regular(pFan1)->nRefs++;
172  pObj->fPhase = Amap_ObjPhaseReal(pFan0) ^ Amap_ObjPhaseReal(pFan1);
173  pObj->Level = 2 + Abc_MaxInt( Amap_Regular(pFan0)->Level, Amap_Regular(pFan1)->Level );
174  if ( p->nLevelMax < (int)pObj->Level )
175  p->nLevelMax = (int)pObj->Level;
176  assert( p->nLevelMax < 4094 ); // 2^12-2
177  p->nObjs[AMAP_OBJ_XOR]++;
178  return pObj;
179 }
static int Amap_ObjPhaseReal(Amap_Obj_t *pObj)
Definition: amapInt.h:260
unsigned Level
Definition: amapInt.h:206
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
static Amap_Obj_t * Amap_Regular(Amap_Obj_t *p)
Definition: amapInt.h:221
int nRefs
Definition: amapInt.h:208
static int Amap_ObjToLit(Amap_Obj_t *pObj)
Definition: amapInt.h:247
ABC_NAMESPACE_IMPL_START Amap_Obj_t * Amap_ManSetupObj(Amap_Man_t *p)
DECLARATIONS ///.
Definition: amapGraph.c:45
unsigned Type
Definition: amapInt.h:200
unsigned fPhase
Definition: amapInt.h:203
int Fan[3]
Definition: amapInt.h:210
int nObjs[AMAP_OBJ_VOID]
Definition: amapInt.h:94
#define assert(ex)
Definition: util_old.h:213
int nLevelMax
Definition: amapInt.h:95
void Amap_ManCreateXorChoices ( Amap_Man_t p,
Amap_Obj_t pFan0,
Amap_Obj_t pFan1,
Amap_Obj_t pChoices[] 
)

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

Synopsis [Creates XOR/MUX choices for the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 251 of file amapGraph.c.

252 {
253  pChoices[0] = Amap_ManCreateXor( p, pFan0, pFan1 );
254  pChoices[1] = Amap_ManCreateXor( p, Amap_Not(pFan0), pFan1 );
255  pChoices[2] = Amap_ManCreateXor( p, pFan0, Amap_Not(pFan1) );
256  pChoices[3] = Amap_ManCreateXor( p, Amap_Not(pFan0), Amap_Not(pFan1) );
257 }
Amap_Obj_t * Amap_ManCreateXor(Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1)
Definition: amapGraph.c:165
static Amap_Obj_t * Amap_Not(Amap_Obj_t *p)
Definition: amapInt.h:222
Amap_Obj_t* Amap_ManGetLast_rec ( Amap_Man_t p,
Amap_Obj_t pObj 
)

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

Synopsis [Starts the AIG manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 305 of file amapGraph.c.

306 {
307  if ( pObj->Equiv == 0 )
308  return pObj;
309  return Amap_ManGetLast_rec( p, Amap_ObjChoice(p, pObj) );
310 }
Amap_Obj_t * Amap_ManGetLast_rec(Amap_Man_t *p, Amap_Obj_t *pObj)
Definition: amapGraph.c:305
static Amap_Obj_t * Amap_ObjChoice(Amap_Man_t *p, Amap_Obj_t *pObj)
Definition: amapInt.h:258
int Equiv
Definition: amapInt.h:209
ABC_NAMESPACE_IMPL_START Amap_Obj_t* Amap_ManSetupObj ( Amap_Man_t p)

DECLARATIONS ///.

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

FileName [amapGraph.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Technology mapper for standard cells.]

Synopsis [Internal AIG manager.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis [Creates object.]

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file amapGraph.c.

46 {
47  Amap_Obj_t * pObj;
49  memset( pObj, 0, sizeof(Amap_Obj_t) );
50  pObj->nFouts[0] = 1; // needed for flow to work in the first pass
51  pObj->Id = Vec_PtrSize(p->vObjs);
52  Vec_PtrPush( p->vObjs, pObj );
53  return pObj;
54 }
char * memset()
int nFouts[2]
Definition: amapInt.h:217
unsigned Id
Definition: amapInt.h:201
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
Vec_Ptr_t * vObjs
Definition: amapInt.h:88
Aig_MmFixed_t * pMemObj
Definition: amapInt.h:89
char * Aig_MmFixedEntryFetch(Aig_MmFixed_t *p)
Definition: aigMem.c:161