29 #define BARRIER_MONOTONE_TEST
40 if( vBarriers == NULL )
44 if( barrierCount <= 0 )
48 for( i=0; i<barrierCount; i++ )
64 if( vBarriers == NULL )
68 if( barrierCount <= 0 )
72 for( i=0; i<barrierCount; i++ )
89 if( vBarriers == NULL )
93 if( barrierCount <= 0 )
97 for( i=0; i<barrierCount; i++ )
126 int barrierCount, i, j, jElem;
128 Aig_Obj_t *pObjBarrier, *pObjCurr, *pObjTargetPoOld;
131 if( vBarriers == NULL )
134 if( barrierCount <= 0 )
139 for( i=0; i<barrierCount; i++ )
146 pObjTargetPoOld =
Aig_ManCo( pAigOld, jElem );
150 pObjBarrier =
Aig_Or( pAigNew, pObjCurr, pObjBarrier );
157 return vNewBarrierSignals;
176 Aig_Obj_t *pWindowBeginsLocal = pWindowBegins;
177 Aig_Obj_t *pWithinWindowLocal = pWithinWindow;
179 Aig_Obj_t *pObj, *pObjAnd1, *pObjOr1, *pObjAnd2, *pObjBarrierLo, *pObjBarrierSwitch, *pObjArenaViolation;
182 assert( vBarrierLiDriver != NULL );
183 assert( vMonotoneDisjunctionNodes != NULL );
188 assert( vBarrierSignals != NULL );
198 pObjAnd1 =
Aig_And(pAigNew, pObj, pWindowBeginsLocal);
200 pObjOr1 =
Aig_Or(pAigNew, pObjAnd1, pObjBarrierLo);
203 pObjBarrierSwitch =
Aig_Xor( pAigNew, pObj, pObjBarrierLo );
204 pObjAnd2 =
Aig_And( pAigNew, pObjBarrierSwitch, pWithinWindowLocal );
205 pObjArenaViolation =
Aig_Or( pAigNew, pObjAnd2, pObjArenaViolation );
209 return pObjArenaViolation;
214 Aig_Obj_t *pConsequent, *pConsequentCopy, *pAntecedent, *p0LiveCone, *pObj;
215 int i, numSigAntecedent;
223 for(i=0; i<numSigAntecedent; i++ )
230 p0LiveCone =
Aig_Or( pNewAig,
Aig_Not(pAntecedent), pConsequentCopy );
307 Aig_Obj_t *pObjBigAnd, *pObj, *pObjLo, *pObjImply;
312 pObjPendingAndPendingLo =
Aig_And( pNewAig, pendingLo, pendingSignal );
318 pObjBigAnd =
Aig_And( pNewAig, pObjBigAnd, pObjImply );
328 int loCopied = 0, loCreated = 0, liCopied = 0, liCreated = 0;
329 Aig_Obj_t *pObjWindowBeginsNew, *pObjWithinWindowNew, *pObjArenaViolation, *pObjTarget, *pObjArenaViolationLiDriver;
330 Aig_Obj_t *pObjNewPoDriverArenaViolated, *pObjArenaViolationLo;
331 Vec_Ptr_t *vBarrierLo, *vBarrierLiDriver, *vBarrierLi;
334 #ifdef BARRIER_MONOTONE_TEST
338 Aig_Obj_t *pObjPendingAndPendingSignal, *pObjMonotoneAnd, *pObjCurrMonotoneLo;
350 sprintf(pNewAig->pName,
"%s_%s", pAig->pName,
"0Live");
351 pNewAig->pSpec = NULL;
388 #ifdef BARRIER_MONOTONE_TEST
400 loCreated = loCreated +
Vec_PtrSize(vMonotoneBarrierLo);
414 pObjTarget =
Aig_ManCo( pAig, windowBeginIndex );
417 pObjTarget =
Aig_ManCo( pAig, withinWindowIndex );
424 pObjWindowBeginsNew, pObjWithinWindowNew,
425 vBarriers, vBarrierLo, vBarrierLiDriver, vMonotoneNodes );
428 #ifdef ARENA_VIOLATION_CONSTRAINT
432 pObjArenaViolationLiDriver =
Aig_Or( pNewAig, pObjArenaViolation, pObjArenaViolationLo );
434 #ifdef BARRIER_MONOTONE_TEST
439 pObjTarget =
Aig_ManCo( pAig, pendingSignalIndex );
442 pObjPendingAndPendingSignal =
Aig_And( pNewAig, pObjPendingSignal, pObjPendingFlopLo );
447 pObjMonotoneAnd =
Aig_And( pNewAig, pObjMonotoneAnd,
449 Aig_Not(
Aig_And(pNewAig, pObjPendingAndPendingSignal, pObjCurrMonotoneLo)),
464 pObjNewPoDriverArenaViolated =
Aig_Or( pNewAig, pObjNewPoDriver, pObjArenaViolationLo );
465 #ifdef BARRIER_MONOTONE_TEST
466 pObjNewPoDriverArenaViolated =
Aig_And( pNewAig, pObjNewPoDriverArenaViolated, pObjMonotoneAnd );
486 vBarrierLi =
createArenaLi( pNewAig, vBarriers, vBarrierLiDriver );
495 #ifdef BARRIER_MONOTONE_TEST
513 assert(loCopied + loCreated == liCopied + liCreated);
533 int pObjWithinWindow;
535 int pObjPendingSignal;
543 pAigNew =
createNewAigWith0LivePoWithDSC( pAig, vSignalVector, pIndex0Live, pObjWindowBegin, pObjWithinWindow, pObjPendingSignal, vMasterBarriers );
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
ABC_DLL int Aig_ManCheck(Aig_Man_t *p)
FUNCTION DECLARATIONS ///.
Vec_Ptr_t * createMonotoneBarrierLO(Aig_Man_t *pAigNew, Vec_Ptr_t *vBarriers)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Aig_Obj_t * createArenaViolation(Aig_Man_t *pAigOld, Aig_Man_t *pAigNew, Aig_Obj_t *pWindowBegins, Aig_Obj_t *pWithinWindow, Vec_Ptr_t *vMasterBarriers, Vec_Ptr_t *vBarrierLo, Vec_Ptr_t *vBarrierLiDriver, Vec_Ptr_t *vMonotoneDisjunctionNodes)
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
Aig_Obj_t * createAndGateForMonotonicityVerification(Aig_Man_t *pNewAig, Vec_Ptr_t *vDisjunctionSignals, Vec_Ptr_t *vDisjunctionLo, Aig_Obj_t *pendingLo, Aig_Obj_t *pendingSignal)
static int Aig_IsComplement(Aig_Obj_t *p)
Aig_Man_t * generateWorkingAigWithDSC(Aig_Man_t *pAig, Abc_Ntk_t *pNtk, int *pIndex0Live, Vec_Ptr_t *vMasterBarriers)
static Aig_Obj_t * Aig_Regular(Aig_Obj_t *p)
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Aig_Obj_t * Aig_Xor(Aig_Man_t *pAig, Aig_Obj_t *pObj1, Aig_Obj_t *pObj2)
Vec_Ptr_t * createArenaLi(Aig_Man_t *pAigNew, Vec_Ptr_t *vBarriers, Vec_Ptr_t *vArenaSignal)
static Aig_Obj_t * Aig_Not(Aig_Obj_t *p)
static int Vec_PtrSize(Vec_Ptr_t *p)
Vec_Ptr_t * collectCSSignalsWithDSC(Abc_Ntk_t *pNtk, Aig_Man_t *pAig)
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
ABC_NAMESPACE_IMPL_START Vec_Ptr_t * createArenaLO(Aig_Man_t *pAigNew, Vec_Ptr_t *vBarriers)
Aig_Obj_t * createConstrained0LiveConeWithDSC(Aig_Man_t *pNewAig, Vec_Ptr_t *signalList)
#define Aig_ManForEachNode(p, pObj, i)
int collectPendingSignalWithDSC(Abc_Ntk_t *pNtk, Aig_Man_t *pAig)
void Aig_ManSetRegNum(Aig_Man_t *p, int nRegs)
#define Saig_ManForEachLi(p, pObj, i)
int collectWithinWindowSignalWithDSC(Abc_Ntk_t *pNtk, Aig_Man_t *pAig)
#define ABC_NAMESPACE_IMPL_END
Aig_Obj_t * driverToPoNew(Aig_Man_t *pAig, Aig_Obj_t *pObjPo)
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
Aig_Obj_t * Aig_Or(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
#define Saig_ManForEachLo(p, pObj, i)
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
static int Aig_ManObjNumMax(Aig_Man_t *p)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
int collectWindowBeginSignalWithDSC(Abc_Ntk_t *pNtk, Aig_Man_t *pAig)
static int Vec_IntSize(Vec_Int_t *p)
static Abc_Obj_t * Abc_NtkPo(Abc_Ntk_t *pNtk, int i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
Aig_Man_t * createNewAigWith0LivePoWithDSC(Aig_Man_t *pAig, Vec_Ptr_t *signalList, int *index0Live, int windowBeginIndex, int withinWindowIndex, int pendingSignalIndex, Vec_Ptr_t *vBarriers)
Vec_Ptr_t * collectBarrierDisjunctions(Aig_Man_t *pAigOld, Aig_Man_t *pAigNew, Vec_Ptr_t *vBarriers)
#define Saig_ManForEachPo(p, pObj, i)
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
int Aig_ManCleanup(Aig_Man_t *p)
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
static void Vec_PtrFree(Vec_Ptr_t *p)
#define Saig_ManForEachPi(p, pObj, i)