34 #define TIM_TEST_BOX_RATIO 200
103 Gia_Man_t * Abc_NtkTestPinDeriveGia(
Abc_Ntk_t * pNtk,
int fWhiteBoxOnly,
int fVerbose )
109 int i, k, iPinLit = 0;
128 iPinLit = Gia_ManAppendPinType( pGia, 1 );
139 iPinLit = Gia_ManAppendPinType( pGia, 1 );
168 void Abc_NtkTestPinGia(
Abc_Ntk_t * pNtk,
int fWhiteBoxOnly,
int fVerbose )
171 char * pFileName =
"testpin.aig";
172 pGia = Abc_NtkTestPinDeriveGia( pNtk, fWhiteBoxOnly, fVerbose );
175 printf(
"AIG with pins derived from mapped network \"%s\" was written into file \"%s\".\n",
246 for ( i = 0; i < nInputs; i++ )
255 for ( i = 0; i < nOutputs; i++ )
279 Abc_Obj_t * pObj, * pFanin;
280 int i, k, Entry, curPi, curPo, BoxUniqueId;
281 int nBoxFaninMax = 0;
297 printf(
"Selecting node %6d as white boxes with %d inputs and %d output.\n", i,
Abc_ObjFaninNum(pObj), 1 );
303 for ( i = 0; i < curPi; i++ )
305 for ( i = 0; i < nBoxFaninMax; i++ )
446 int i, iRepr, iNode, fProb = 0;
455 printf(
"Member %d of choice class %d is a representative.\n", iNode, iRepr ), fProb = 1;
457 printf(
"Node %d participates in more than one choice node.\n", iNode ), fProb = 1;
467 printf(
"Fanin 0 of AND node %d has a repr.\n", i ), fProb = 1;
469 printf(
"Fanin 1 of AND node %d has a repr.\n", i ), fProb = 1;
474 printf(
"Fanin 0 of CO node %d has a repr.\n", i ), fProb = 1;
496 int i, k, iRepr, iNode, iPrev;
509 if ( fNowIncreasing )
522 if ( fNowIncreasing )
535 if ( fNowIncreasing )
580 printf(
"Verification suceessful.\n" );
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
static int Gia_ManAppendAnd(Gia_Man_t *p, int iLit0, int iLit1)
static Hop_Obj_t * Hop_ObjFanin1(Hop_Obj_t *pObj)
static int Hop_ObjIsMarkA(Hop_Obj_t *pObj)
static int Abc_NtkIsLogic(Abc_Ntk_t *pNtk)
Vec_Flt_t * Abc_NtkTestCreateRequired(int nOutputs)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
static void Hop_ObjSetMarkA(Hop_Obj_t *pObj)
Aig_Man_t * Dar_ManChoiceNew(Aig_Man_t *pAig, Dch_Pars_t *pPars)
void Dch_ManSetDefaultParams(Dch_Pars_t *p)
DECLARATIONS ///.
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
ABC_DLL int Abc_NodeIsConst(Abc_Obj_t *pNode)
void Gia_ManStop(Gia_Man_t *p)
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
Gia_Man_t * Gia_AigerRead(char *pFileName, int fSkipStrash, int fCheck)
static Hop_Obj_t * Hop_ManConst1(Hop_Man_t *p)
static int Gia_ManPoNum(Gia_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
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 ///.
void Aig_ManStop(Aig_Man_t *p)
int Gia_ManCompare(Gia_Man_t *p1, Gia_Man_t *p2)
ABC_DLL void Abc_NtkFillTemp(Abc_Ntk_t *pNtk)
static int Hop_ObjIsNode(Hop_Obj_t *pObj)
static int Gia_ManAppendCi(Gia_Man_t *p)
static void Vec_FltFree(Vec_Flt_t *p)
void Gia_ManCleanMark0(Gia_Man_t *p)
static int Abc_Var2Lit(int Var, int fCompl)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
static int Hop_ObjChild0CopyI(Hop_Obj_t *pObj)
static int Gia_ObjIsHead(Gia_Man_t *p, int Id)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static Vec_Flt_t * Vec_FltAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Vec_Ptr_t * Abc_NtkTestTimCollectCone(Abc_Ntk_t *pNtk, Abc_Obj_t *pObj)
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachCo(pNtk, pCo, i)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
typedefABC_NAMESPACE_HEADER_START struct Dch_Pars_t_ Dch_Pars_t
INCLUDES ///.
ABC_DLL Vec_Ptr_t * Abc_NtkDfs(Abc_Ntk_t *pNtk, int fCollectAll)
static int Abc_MaxInt(int a, int b)
static void * Vec_PtrPop(Vec_Ptr_t *p)
void Gia_ManReverseClasses(Gia_Man_t *p, int fNowIncreasing)
static int Abc_NtkIsAigLogic(Abc_Ntk_t *pNtk)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
static int Abc_LitNotCond(int Lit, int c)
static int Abc_NtkCoNum(Abc_Ntk_t *pNtk)
static void Vec_FltPush(Vec_Flt_t *p, float Entry)
int Abc_NtkTestTimNodeStrash(Gia_Man_t *pGia, Abc_Obj_t *pNode)
void Hop_ConeUnmark_rec(Hop_Obj_t *pObj)
static int Gia_ManHasChoices(Gia_Man_t *p)
void Tim_ManCreate(Tim_Man_t *p, void *pLib, Vec_Flt_t *vInArrs, Vec_Flt_t *vOutReqs)
void Tim_ManCreateBox(Tim_Man_t *p, int firstIn, int nIns, int firstOut, int nOuts, int iDelayTable)
ITERATORS ///.
void Abc_NtkTestTimNodeStrash_rec(Gia_Man_t *pGia, Hop_Obj_t *pObj)
FUNCTION DEFINITIONS ///.
void Tim_ManPrint(Tim_Man_t *p)
Gia_Man_t * Gia_ManFromAig(Aig_Man_t *p)
INCLUDES ///.
static void Gia_ObjSetRepr(Gia_Man_t *p, int Id, int Num)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
ABC_DLL void Abc_NtkCleanMarkA(Abc_Ntk_t *pNtk)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Aig_Man_t * Dar_ManCompress2(Aig_Man_t *pAig, int fBalance, int fUpdateLevel, int fFanout, int fPower, int fVerbose)
ABC_DLL int Abc_NtkIsTopo(Abc_Ntk_t *pNtk)
#define ABC_NAMESPACE_IMPL_END
ABC_DLL void * Abc_FrameReadLibBox()
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
#define Gia_ClassForEachObj1(p, i, iObj)
Gia_Man_t * Abc_NtkTestTimDeriveGia(Abc_Ntk_t *pNtk, int fVerbose)
static int Hop_IsComplement(Hop_Obj_t *p)
Aig_Man_t * Gia_ManToAig(Gia_Man_t *p, int fChoices)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Tim_Man_t * Tim_ManStart(int nCis, int nCos)
DECLARATIONS ///.
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
int Tim_ManBoxNum(Tim_Man_t *p)
static Hop_Obj_t * Hop_ObjFanin0(Hop_Obj_t *pObj)
void Abc_NtkTestTim(Abc_Ntk_t *pNtk, int fVerbose)
static void Gia_ObjSetReprRev(Gia_Man_t *p, int Id, int Num)
void Gia_AigerWrite(Gia_Man_t *p, char *pFileName, int fWriteSymbols, int fCompact)
Gia_Man_t * Abc_NtkTestTimPerformSynthesis(Gia_Man_t *p, int fChoices)
#define Abc_NtkForEachNode(pNtk, pNode, i)
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_START
static void Gia_ObjSetNext(Gia_Man_t *p, int Id, int Num)
void Abc_NtkTestTimByWritingFile(Gia_Man_t *pGia, char *pFileName)
static int Vec_IntEntryLast(Vec_Int_t *p)
static int Abc_NodeIsTravIdCurrent(Abc_Obj_t *p)
static int Hop_ObjChild1CopyI(Hop_Obj_t *pObj)
static char * Abc_NtkName(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachCi(pNtk, pCi, i)
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define Abc_ObjForEachFanin(pObj, pFanin, i)
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Flt_t_ Vec_Flt_t
INCLUDES ///.
#define Gia_ManForEachClass(p, i)
ABC_DLL int Abc_NtkToAig(Abc_Ntk_t *pNtk)
static int Abc_NodeIsWhiteBox(Abc_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
void Gia_ManHashAlloc(Gia_Man_t *p)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static int Gia_ManPiNum(Gia_Man_t *p)
static Hop_Obj_t * Hop_Regular(Hop_Obj_t *p)
static void Vec_IntClear(Vec_Int_t *p)
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
Hop_Obj_t * Hop_IthVar(Hop_Man_t *p, int i)
FUNCTION DEFINITIONS ///.
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
void Gia_ManVerifyChoices(Gia_Man_t *p)
Vec_Flt_t * Abc_NtkTestCreateArrivals(int nInputs)
static int Gia_ObjRepr(Gia_Man_t *p, int Id)
static void Abc_NodeSetTravIdCurrent(Abc_Obj_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
void Gia_ManHashStop(Gia_Man_t *p)
static int Gia_ObjHasRepr(Gia_Man_t *p, int Id)
void Abc_NtkTestTimCollectCone_rec(Abc_Obj_t *pObj, Vec_Ptr_t *vNodes)
#define TIM_TEST_BOX_RATIO
DECLARATIONS ///.