47 if ( p->nTravIds >= (1<<30)-1 )
333 fprintf( pFile,
"%d", !fCompl );
339 fprintf( pFile,
"%s%s", fCompl?
"!" :
"", (
char*)pObj->
pData );
346 fprintf( pFile,
"%s", (Level==0?
"" :
"(") );
351 fprintf( pFile,
" %s ", fCompl?
"+" :
"*" );
353 fprintf( pFile,
"%s", (Level==0?
"" :
")") );
372 Hop_Obj_t * pFanin, * pFanin0, * pFanin1, * pFaninC;
380 fprintf( pFile,
"1\'b%d", !fCompl );
386 fprintf( pFile,
"%s%s", fCompl?
"~" :
"", (
char*)pObj->
pData );
395 fprintf( pFile,
"%s", (Level==0?
"" :
"(") );
400 fprintf( pFile,
" ^ " );
402 fprintf( pFile,
"%s", (Level==0?
"" :
")") );
410 fprintf( pFile,
"%s", (Level==0?
"" :
"(") );
412 fprintf( pFile,
" ^ " );
414 fprintf( pFile,
"%s", (Level==0?
"" :
")") );
419 fprintf( pFile,
"%s", (Level==0?
"" :
"(") );
421 fprintf( pFile,
" ? " );
423 fprintf( pFile,
" : " );
425 fprintf( pFile,
"%s", (Level==0?
"" :
")") );
433 fprintf( pFile,
"%s", (Level==0?
"" :
"(") );
438 fprintf( pFile,
" %s ", fCompl?
"|" :
"&" );
440 fprintf( pFile,
"%s", (Level==0?
"" :
")") );
459 printf(
"Node %p : ", pObj );
461 printf(
"constant 1" );
465 printf(
"AND( %p%s, %p%s )",
489 printf(
" %p", pObj );
517 printf(
"Hop_ManDumpBlif(): AIG manager does not have POs.\n" );
525 pObj->
pData = (
void *)(ABC_PTRUINT_T)Counter++;
527 pObj->
pData = (
void *)(ABC_PTRUINT_T)Counter++;
529 pObj->
pData = (
void *)(ABC_PTRUINT_T)Counter++;
532 pFile = fopen( pFileName,
"w" );
533 fprintf( pFile,
"# BLIF file written by procedure Hop_ManDumpBlif() in ABC\n" );
534 fprintf( pFile,
"# http://www.eecs.berkeley.edu/~alanmi/abc/\n" );
535 fprintf( pFile,
".model test\n" );
537 fprintf( pFile,
".inputs" );
539 fprintf( pFile,
" n%0*d", nDigits, (
int)(ABC_PTRUINT_T)pObj->
pData );
540 fprintf( pFile,
"\n" );
542 fprintf( pFile,
".outputs" );
544 fprintf( pFile,
" n%0*d", nDigits, (
int)(ABC_PTRUINT_T)pObj->
pData );
545 fprintf( pFile,
"\n" );
549 fprintf( pFile,
".names n%0*d n%0*d n%0*d\n",
552 nDigits, (
int)(ABC_PTRUINT_T)pObj->
pData );
558 fprintf( pFile,
".names n%0*d n%0*d\n",
560 nDigits, (
int)(ABC_PTRUINT_T)pObj->
pData );
566 fprintf( pFile,
".names n%0*d\n 1\n", nDigits, (
int)(ABC_PTRUINT_T)pConst1->
pData );
567 fprintf( pFile,
".end\n\n" );
static Hop_Obj_t * Hop_ObjChild0(Hop_Obj_t *pObj)
static Hop_Obj_t * Hop_ObjFanin1(Hop_Obj_t *pObj)
int Hop_ObjRecognizeExor(Hop_Obj_t *pObj, Hop_Obj_t **ppFan0, Hop_Obj_t **ppFan1)
int Hop_ObjIsMuxType(Hop_Obj_t *pNode)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Vec_Ptr_t * Hop_ManDfs(Hop_Man_t *p)
static int Hop_ObjRefs(Hop_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
static Hop_Obj_t * Hop_ManConst1(Hop_Man_t *p)
void Hop_ManPrintVerbose(Hop_Man_t *p, int fHaig)
static int Vec_PtrPushUnique(Vec_Ptr_t *p, void *Entry)
static int Hop_ObjIsPi(Hop_Obj_t *pObj)
#define Hop_ManForEachNode(p, pObj, i)
static int Hop_ObjIsNode(Hop_Obj_t *pObj)
static Hop_Type_t Hop_ObjType(Hop_Obj_t *pObj)
#define Hop_ManForEachPi(p, pObj, i)
ITERATORS ///.
#define Hop_ManForEachPo(p, pObj, i)
static int Hop_ManPoNum(Hop_Man_t *p)
static int Hop_ObjFaninC1(Hop_Obj_t *pObj)
void Hop_ObjPrintVerbose(Hop_Obj_t *pObj, int fHaig)
static int Vec_PtrSize(Vec_Ptr_t *p)
static Hop_Obj_t * Hop_Not(Hop_Obj_t *p)
static int Hop_ObjIsAnd(Hop_Obj_t *pObj)
void Hop_ManDumpBlif(Hop_Man_t *p, char *pFileName)
void Hop_ObjPrintEqn(FILE *pFile, Hop_Obj_t *pObj, Vec_Vec_t *vLevels, int Level)
static int Hop_Base10Log(unsigned n)
#define ABC_NAMESPACE_IMPL_END
void Hop_ObjPrintVerilog(FILE *pFile, Hop_Obj_t *pObj, Vec_Vec_t *vLevels, int Level)
static Hop_Obj_t * Hop_ObjChild1(Hop_Obj_t *pObj)
ABC_NAMESPACE_IMPL_START void Hop_ManIncrementTravId(Hop_Man_t *p)
DECLARATIONS ///.
static int Hop_IsComplement(Hop_Obj_t *p)
static int Hop_ObjIsPo(Hop_Obj_t *pObj)
static int Hop_ObjIsExor(Hop_Obj_t *pObj)
static Hop_Obj_t * Hop_ObjFanin0(Hop_Obj_t *pObj)
static int Hop_ObjIsConst1(Hop_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_START
Hop_Obj_t * Hop_ObjRecognizeMux(Hop_Obj_t *pNode, Hop_Obj_t **ppNodeT, Hop_Obj_t **ppNodeE)
static int Hop_ObjFaninC0(Hop_Obj_t *pObj)
static void Vec_VecExpand(Vec_Vec_t *p, int Level)
static Hop_Obj_t * Hop_NotCond(Hop_Obj_t *p, int c)
void Hop_ManCleanData(Hop_Man_t *p)
static void Vec_PtrClear(Vec_Ptr_t *p)
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
void Hop_ObjCollectMulti_rec(Hop_Obj_t *pRoot, Hop_Obj_t *pObj, Vec_Ptr_t *vSuper)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static Hop_Obj_t * Hop_Regular(Hop_Obj_t *p)
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
void Hop_ObjCleanData_rec(Hop_Obj_t *pObj)
static void Vec_PtrFree(Vec_Ptr_t *p)
void Hop_ObjCollectMulti(Hop_Obj_t *pRoot, Vec_Ptr_t *vSuper)