71 int i, nDoms, Count = 0;
76 for ( i = 1; i <= nDoms; i++ )
159 for ( i = 0; i < nPis; i++ )
162 for ( i = nCIs; i < nAll; i++ )
167 printf(
"Warning: Shuffled CI order to be correct sequential AIG.\n" );
198 int i, nCIs, nAll, nPis;
216 for ( i = 0; i < nPis; i++ )
224 printf(
"Warning: Unshuffled CI order to be correct AIG with boxes.\n" );
282 int i, k, curCi, curCo;
283 assert( pManTime != NULL );
313 printf(
"The command has to terminate. Boxes are not in a topological order.\n" );
314 printf(
"The following information may help debugging (numbers are 0-based):\n" );
315 printf(
"Input %d of BoxA %d (1stCI = %d; 1stCO = %d) has TFI with CI %d,\n",
317 printf(
"which corresponds to output %d of BoxB %d (1stCI = %d; 1stCO = %d).\n",
320 printf(
"In a correct topological order, BoxB should precede BoxA.\n" );
381 if ( vNodes == NULL )
434 if ( pObjGia->
Value == ~0 )
474 int i, k, j, curCi, curCo, LevelMax;
497 for ( k = 0; k < nBoxInputs; k++ )
502 printf(
"Boxes are not in a topological order. Switching to level computation without boxes.\n" );
509 for ( k = 0; k < nBoxOutputs; k++ )
515 assert( nBoxInputs == (
int)pDelayTable[1] );
516 for ( j = 0; j < nBoxInputs && (pObjIn =
Gia_ManCo(p, curCo + j)); j++ )
517 if ( (
int)pDelayTable[3+k*nBoxInputs+j] != -
ABC_INFINITY )
518 LevelMax =
Abc_MaxInt( LevelMax,
Gia_ObjLevel(p, pObjIn) + ((int)pDelayTable[3+k*nBoxInputs+j] / nAnd2Delay) );
523 curCi += nBoxOutputs;
555 int iObj, k, iFan, Level = 0;
577 int i, k, j, curCi, curCo, LevelMax;
600 for ( k = 0; k < nBoxInputs; k++ )
605 printf(
"Boxes are not in a topological order. Switching to level computation without boxes.\n" );
612 for ( k = 0; k < nBoxOutputs; k++ )
618 assert( nBoxInputs == (
int)pDelayTable[1] );
619 for ( j = 0; j < nBoxInputs && (pObjIn =
Gia_ManCo(p, curCo + j)); j++ )
620 if ( (
int)pDelayTable[3+k*nBoxInputs+j] != -
ABC_INFINITY )
627 curCi += nBoxOutputs;
660 assert( pManTime != NULL );
667 assert( pManTime != NULL );
708 int i, k, iBox, iOutFirst;
754 int i, k, curCi, curCo;
787 int fSkip = (vBoxPres != NULL && !
Vec_IntEntry(vBoxPres, i));
862 Gia_Man_t * pSpec, * pGia0, * pGia1, * pMiter;
864 if ( pFileSpec == NULL && pGia->
pSpec == NULL )
866 printf(
"Spec file is not given. Use standard flow.\n" );
871 printf(
"Design has no box logic. Use standard flow.\n" );
879 printf(
"Spec has no box logic. Use standard flow.\n" );
897 printf(
"Spec has less boxes than the design. Cannot proceed.\n" );
904 if ( vBoxPres == NULL )
906 printf(
"Boxes of spec and design cannot be aligned. Cannot proceed.\n" );
925 pMiter =
Gia_ManMiter( pGia0, pGia1, 0, 0, 1, 0, fVerbose );
943 pMiter =
Gia_ManMiter( pGia0, pGia1, 0, 1, 0, 0, fVerbose );
953 Abc_Print( 1,
"Verification failed for at least one output (%d).\n", pPars->
iOutFail );
int Tim_ManBoxOutputFirst(Tim_Man_t *p, int iBox)
static int Gia_ObjLevelId(Gia_Man_t *p, int Id)
static int Gia_ManAppendAnd(Gia_Man_t *p, int iLit0, int iLit1)
int Tim_ManCoNum(Tim_Man_t *p)
void Gia_ManDupCollapse_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Gia_Man_t *pNew)
Vec_Int_t * Gia_ManOrderWithBoxes(Gia_Man_t *p)
static void Gia_ObjSetLevelId(Gia_Man_t *p, int Id, int l)
int Gia_ManBoxCiNum(Gia_Man_t *p)
static Gia_Obj_t * Gia_ObjSiblObj(Gia_Man_t *p, int Id)
Gia_Man_t * Gia_ManDupNormalize(Gia_Man_t *p)
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
void Gia_ManStop(Gia_Man_t *p)
ABC_NAMESPACE_IMPL_START int Gia_ManBoxNum(Gia_Man_t *p)
DECLARATIONS ///.
#define Gia_ManForEachCo(p, pObj, i)
Gia_Man_t * Gia_AigerRead(char *pFileName, int fSkipStrash, int fCheck)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
int Gia_ManLutLevelWithBoxes_rec(Gia_Man_t *p, Gia_Obj_t *pObj)
static void Gia_ObjSetValue(Gia_Obj_t *pObj, int i)
static Gia_Obj_t * Gia_ManCi(Gia_Man_t *p, int v)
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Vec_IntCountEntry(Vec_Int_t *p, int Entry)
void Aig_ManStop(Aig_Man_t *p)
static int Gia_ObjIsTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
int Gia_ManNonRegBoxNum(Gia_Man_t *p)
static int Gia_ManAppendCi(Gia_Man_t *p)
static int Gia_ObjIsConst0(Gia_Obj_t *pObj)
void * Gia_ManUpdateTimMan(Gia_Man_t *p, Vec_Int_t *vBoxPres)
static int Gia_ObjValue(Gia_Obj_t *pObj)
void Fra_SecSetDefaultParams(Fra_Sec_t *p)
DECLARATIONS ///.
Gia_Man_t * Gia_ManUpdateExtraAig2(void *pTime, Gia_Man_t *p, Vec_Int_t *vBoxesLeft)
static int Gia_ObjIsBuf(Gia_Obj_t *pObj)
int Tim_ManBoxOutputNum(Tim_Man_t *p, int iBox)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
int Gia_ManIsNormalized(Gia_Man_t *p)
static int Abc_MaxInt(int a, int b)
Gia_Man_t * Gia_ManDupUnshuffleInputs(Gia_Man_t *p)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
static int Abc_LitNotCond(int Lit, int c)
Tim_Man_t * Tim_ManReduce(Tim_Man_t *p, Vec_Int_t *vBoxesLeft, int nTermsDiff)
void Gia_ManCleanupRemap(Gia_Man_t *p, Gia_Man_t *pGia)
Gia_Man_t * Gia_ManDupOutputVec(Gia_Man_t *p, Vec_Int_t *vOutPres)
static int Gia_ManHasChoices(Gia_Man_t *p)
int Tim_ManPiNum(Tim_Man_t *p)
#define Gia_ManForEachCi(p, pObj, i)
static int Gia_ManAndNum(Gia_Man_t *p)
int Gia_ManOrderWithBoxes_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vNodes)
int Gia_ManIsSeqWithBoxes(Gia_Man_t *p)
int Tim_ManBoxFindFromCiNum(Tim_Man_t *p, int iCiNum)
static int Gia_ObjLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Gia_ObjSibl(Gia_Man_t *p, int Id)
static int Abc_LitIsCompl(int Lit)
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
static int Gia_ManAppendBuf(Gia_Man_t *p, int iLit)
static void Gia_ObjSetAndLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Vec_IntFindMax(Vec_Int_t *p)
static void Gia_ObjSetTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_END
int Tim_ManCiNum(Tim_Man_t *p)
void Cec_ManCecSetDefaultParams(Cec_ParCec_t *p)
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
#define Gia_ManForEachAnd(p, pObj, i)
Aig_Man_t * Gia_ManToAig(Gia_Man_t *p, int fChoices)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
int Gia_ManRegBoxNum(Gia_Man_t *p)
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_ManCleanLevels(Gia_Man_t *p, int Size)
int Gia_ManBoxCoNum(Gia_Man_t *p)
Tim_Man_t * Tim_ManTrim(Tim_Man_t *p, Vec_Int_t *vBoxPres)
void Gia_ManFillValue(Gia_Man_t *p)
int Tim_ManBoxNum(Tim_Man_t *p)
static void Vec_IntFreeP(Vec_Int_t **p)
static void Abc_Print(int level, const char *format,...)
int Tim_ManBoxInputNum(Tim_Man_t *p, int iBox)
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
int Fra_FraigSec(Aig_Man_t *p, Fra_Sec_t *pParSec, Aig_Man_t **ppResult)
#define ABC_NAMESPACE_IMPL_START
static int Gia_ManCiNum(Gia_Man_t *p)
int Tim_ManBoxIsBlack(Tim_Man_t *p, int iBox)
Gia_Man_t * Gia_ManDupUnnormalize(Gia_Man_t *p)
static Gia_Obj_t * Gia_ManCo(Gia_Man_t *p, int v)
static int Vec_IntSize(Vec_Int_t *p)
int Tim_ManBlackBoxNum(Tim_Man_t *p)
static void Gia_ObjSetCoLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
int Gia_ManLevelWithBoxes(Gia_Man_t *p)
static int Gia_ManBufNum(Gia_Man_t *p)
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManUpdateExtraAig(void *pTime, Gia_Man_t *p, Vec_Int_t *vBoxPres)
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
int Cec_ManVerify(Gia_Man_t *p, Cec_ParCec_t *pPars)
MACRO DEFINITIONS ///.
static int Abc_Lit2Var(int Lit)
#define ABC_CALLOC(type, num)
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
int Gia_ManLutLevelWithBoxes(Gia_Man_t *p)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
void * Gia_ManUpdateTimMan2(Gia_Man_t *p, Vec_Int_t *vBoxesLeft, int nTermsDiff)
int Gia_ManLevelNum(Gia_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
Gia_Man_t * Gia_ManDupCollapse(Gia_Man_t *p, Gia_Man_t *pBoxes, Vec_Int_t *vBoxPres, int fSeq)
void Gia_ManHashAlloc(Gia_Man_t *p)
#define Gia_ManForEachObj1(p, pObj, i)
void Gia_ManIncrementTravId(Gia_Man_t *p)
Gia_Man_t * Gia_ManDupSelectedOutputs(Gia_Man_t *p, Vec_Int_t *vOutsLeft)
static void Vec_IntFree(Vec_Int_t *p)
int Tim_ManBoxInputFirst(Tim_Man_t *p, int iBox)
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
char * Abc_UtilStrsav(char *s)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
float Tim_ManGetCiArrival(Tim_Man_t *p, int iCi)
Vec_Int_t * Tim_ManAlignTwo(Tim_Man_t *pSpec, Tim_Man_t *pImpl)
#define Gia_LutForEachFanin(p, i, iFan, k)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
int Gia_ManLevelWithBoxes_rec(Gia_Man_t *p, Gia_Obj_t *pObj)
int Gia_ManVerifyWithBoxes(Gia_Man_t *pGia, int nBTLimit, int nTimeLim, int fSeq, int fVerbose, char *pFileSpec)
int Tim_ManPoNum(Tim_Man_t *p)
Gia_Man_t * Gia_ManMiter(Gia_Man_t *pAig0, Gia_Man_t *pAig1, int nInsDup, int fDualOut, int fSeq, int fImplic, int fVerbose)
static int Gia_ObjCioId(Gia_Obj_t *pObj)
static int Gia_ManObjNum(Gia_Man_t *p)
int Gia_ManClockDomainNum(Gia_Man_t *p)
void Gia_ManHashStop(Gia_Man_t *p)
static int Gia_ManCoNum(Gia_Man_t *p)
void Gia_ManDupRemapEquiv(Gia_Man_t *pNew, Gia_Man_t *p)
DECLARATIONS ///.
static void Gia_ObjSetLevel(Gia_Man_t *p, Gia_Obj_t *pObj, int l)
static int Gia_ManRegNum(Gia_Man_t *p)
float * Tim_ManBoxDelayTable(Tim_Man_t *p, int iBox)