59 p->vCis = Vec_PtrAlloc( 100 );
60 p->vCos = Vec_PtrAlloc( 100 );
61 p->vObjs = Vec_PtrAlloc( 1000 );
62 p->vBufs = Vec_PtrAlloc( 100 );
64 p->unfold2_type_I = Vec_PtrAlloc( 4);
65 p->unfold2_type_II = Vec_PtrAlloc( 4);
70 p->pConst1 = Aig_ManFetchMemory(
p );
72 p->pConst1->fPhase = 1;
75 p->nTableSize = Abc_PrimeCudd( nNodesMax );
99 pNew->pName = Abc_UtilStrsav(
p->pName );
100 pNew->pSpec = Abc_UtilStrsav(
p->pSpec );
102 Aig_ManConst1(
p)->pData = Aig_ManConst1(pNew);
107 pObj->
pData = pObjNew;
129 if ( Aig_ObjIsBuf(pObj) )
132 pObjNew =
Aig_Oper( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj), Aig_ObjType(pObj) );
154 pNew->pName = Abc_UtilStrsav(
p->pName );
155 pNew->pSpec = Abc_UtilStrsav(
p->pSpec );
158 Aig_ManConst1(
p)->pData = Aig_ManConst1(pNew);
166 pObj = Aig_NotCond( pObj, Aig_Regular(pObj)->fPhase ^ Aig_IsComplement(pObj) );
171 printf(
"Aig_ManExtractMiter(): The check has failed.\n" );
191 if (
p->time1 ) {
ABC_PRT(
"time1",
p->time1 ); }
192 if (
p->time2 ) {
ABC_PRT(
"time2",
p->time2 ); }
203 Vec_PtrFreeP( &
p->vCis );
204 Vec_PtrFreeP( &
p->vCos );
205 Vec_PtrFreeP( &
p->vObjs );
206 Vec_PtrFreeP( &
p->vBufs );
208 Vec_PtrFreeP( &
p->unfold2_type_I );
209 Vec_PtrFreeP( &
p->unfold2_type_II );
211 Vec_IntFreeP( &
p->vLevelR );
212 Vec_VecFreeP( &
p->vLevels );
213 Vec_IntFreeP( &
p->vFlopNums );
214 Vec_IntFreeP( &
p->vFlopReprs );
216 Vec_VecFreeP( &
p->vClockDoms );
217 Vec_IntFreeP( &
p->vProbs );
218 Vec_IntFreeP( &
p->vCiNumsOrig );
219 Vec_PtrFreeP( &
p->vMapped );
220 if (
p->vSeqModelVec )
221 Vec_PtrFreeFree(
p->vSeqModelVec );
269 int i, nNodesOld = Aig_ManNodeNum(
p);
271 vObjs = Vec_PtrAlloc( 100 );
273 if ( Aig_ObjIsNode(pNode) && Aig_ObjRefs(pNode) == 0 )
274 Vec_PtrPush( vObjs, pNode );
278 Vec_PtrFree( vObjs );
279 return nNodesOld - Aig_ManNodeNum(
p);
296 int i, nNodesOld = Aig_ManCoNum(
p);
298 if ( Aig_ObjIsNode(pNode) && Aig_ObjRefs(pNode) == 0 )
300 return nNodesOld - Aig_ManCoNum(
p);
317 int i, k = 0, nPisOld = Aig_ManCiNum(
p);
320 if ( i >= Aig_ManCiNum(
p) - Aig_ManRegNum(
p) )
321 Vec_PtrWriteEntry(
p->vCis, k++, pObj );
322 else if ( Aig_ObjRefs(pObj) > 0 )
323 Vec_PtrWriteEntry(
p->vCis, k++, pObj );
325 Vec_PtrWriteEntry(
p->vObjs, pObj->
Id, NULL );
327 Vec_PtrShrink(
p->vCis, k );
329 if ( Aig_ManRegNum(
p) )
330 p->nTruePis = Aig_ManCiNum(
p) - Aig_ManRegNum(
p);
331 return nPisOld - Aig_ManCiNum(
p);
348 int i, k = 0, nPosOld = Aig_ManCoNum(
p);
351 if ( i >= Aig_ManCoNum(
p) - Aig_ManRegNum(
p) )
352 Vec_PtrWriteEntry(
p->vCos, k++, pObj );
353 else if ( !Aig_ObjIsConst1(Aig_ObjFanin0(pObj)) || !Aig_ObjFaninC0(pObj) )
354 Vec_PtrWriteEntry(
p->vCos, k++, pObj );
358 Vec_PtrWriteEntry(
p->vObjs, pObj->
Id, NULL );
361 Vec_PtrShrink(
p->vCos, k );
363 if ( Aig_ManRegNum(
p) )
364 p->nTruePos = Aig_ManCoNum(
p) - Aig_ManRegNum(
p);
365 return nPosOld - Aig_ManCoNum(
p);
382 printf(
"%-15s : ",
p->pName );
383 printf(
"pi = %5d ", Aig_ManCiNum(
p)-Aig_ManRegNum(
p) );
384 printf(
"po = %5d ", Aig_ManCoNum(
p)-Aig_ManRegNum(
p) );
385 if ( Aig_ManRegNum(
p) )
386 printf(
"lat = %5d ", Aig_ManRegNum(
p) );
387 printf(
"and = %7d ", Aig_ManAndNum(
p) );
389 if ( Aig_ManExorNum(
p) )
390 printf(
"xor = %5d ", Aig_ManExorNum(
p) );
392 printf(
"ch = %5d ", nChoices );
393 if ( Aig_ManBufNum(
p) )
394 printf(
"buf = %5d ", Aig_ManBufNum(
p) );
417 printf(
"REG: Beg = %5d. End = %5d. (R =%5.1f %%) ",
418 Aig_ManRegNum(
p), Aig_ManRegNum(pNew),
419 Aig_ManRegNum(
p)? 100.0*(Aig_ManRegNum(
p)-Aig_ManRegNum(pNew))/Aig_ManRegNum(
p) : 0.0 );
420 printf(
"AND: Beg = %6d. End = %6d. (R =%5.1f %%)",
421 Aig_ManNodeNum(
p), Aig_ManNodeNum(pNew),
422 Aig_ManNodeNum(
p)? 100.0*(Aig_ManNodeNum(
p)-Aig_ManNodeNum(pNew))/Aig_ManNodeNum(
p) : 0.0 );
441 p->nTruePis = Aig_ManCiNum(
p) - nRegs;
442 p->nTruePos = Aig_ManCoNum(
p) - nRegs;
459 Aig_ObjChild0Flip( Aig_ManCo(
p, 0) );
475 void * pD =
p->pData;
#define ABC_ALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
int Aig_ManCoCleanup(Aig_Man_t *p)
void Aig_ManSetRegNum(Aig_Man_t *p, int nRegs)
Aig_Obj_t * Aig_ManDup_rec(Aig_Man_t *pNew, Aig_Man_t *p, Aig_Obj_t *pObj)
void Aig_ManStop(Aig_Man_t *p)
int Aig_ManCiCleanup(Aig_Man_t *p)
Aig_Man_t * Aig_ManStartFrom(Aig_Man_t *p)
int Aig_ManAntiCleanup(Aig_Man_t *p)
void Aig_ManStopP(Aig_Man_t **p)
void Aig_ManReportImprovement(Aig_Man_t *p, Aig_Man_t *pNew)
void Aig_ManPrintStats(Aig_Man_t *p)
int Aig_ManCleanup(Aig_Man_t *p)
void Aig_ManFlipFirstPo(Aig_Man_t *p)
void * Aig_ManReleaseData(Aig_Man_t *p)
Aig_Man_t * Aig_ManExtractMiter(Aig_Man_t *p, Aig_Obj_t *pNode1, Aig_Obj_t *pNode2)
ABC_NAMESPACE_IMPL_START Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
int Aig_ManChoiceNum(Aig_Man_t *p)
void Aig_ManSetCioIds(Aig_Man_t *p)
void Aig_ManFanoutStop(Aig_Man_t *p)
#define Aig_ManForEachObj(p, pObj, i)
void Aig_ObjDisconnect(Aig_Man_t *p, Aig_Obj_t *pObj)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
Aig_Obj_t * Aig_Oper(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1, Aig_Type_t Type)
struct Aig_Obj_t_ Aig_Obj_t
int Aig_ManLevels(Aig_Man_t *p)
Aig_Obj_t * Aig_Exor(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
void Aig_ObjDelete_rec(Aig_Man_t *p, Aig_Obj_t *pObj, int fFreeTop)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Aig_MmFixed_t * Aig_MmFixedStart(int nEntrySize, int nEntriesMax)
FUNCTION DEFINITIONS ///.
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
void Aig_MmFixedStop(Aig_MmFixed_t *p, int fVerbose)
void Aig_ManCleanData(Aig_Man_t *p)
ABC_DLL int Aig_ManCheck(Aig_Man_t *p)
FUNCTION DECLARATIONS ///.
void Tim_ManStopP(Tim_Man_t **p)
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.