From 6c9b59bfc06d3ae8e9d3b40cc4dd4bb401eb2084 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 20 Jul 2012 15:54:08 -0700 Subject: Updated code for lazy man's synthesis. --- src/aig/gia/gia.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/aig/gia/gia.h') diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h index 7efad774..a74da4cb 100644 --- a/src/aig/gia/gia.h +++ b/src/aig/gia/gia.h @@ -154,11 +154,13 @@ struct Gia_Man_t_ word nHashHit; // hash table hit word nHashMiss; // hash table miss int fVerbose; // verbose reports - Vec_Int_t * vObjNums; // object numbers - Vec_Wrd_t * vTtMemory; // truth table memory + // truth table computation for small functions int nTtVars; // truth table variables int nTtWords; // truth table words - int iTtNum; // truth table current number + Vec_Str_t * vTtNums; // object numbers + Vec_Int_t * vTtNodes; // internal nodes + Vec_Ptr_t * vTtInputs; // truth tables for constant and primary inputs + Vec_Wrd_t * vTtMemory; // truth tables for internal nodes }; @@ -384,6 +386,9 @@ static inline void Gia_ObjSetLevel( Gia_Man_t * p, Gia_Obj_t * pObj, int static inline void Gia_ObjSetCoLevel( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjIsCo(pObj) ); Gia_ObjSetLevel( p, pObj, Gia_ObjLevel(p,Gia_ObjFanin0(pObj)) ); } static inline void Gia_ObjSetAndLevel( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjIsAnd(pObj) ); Gia_ObjSetLevel( p, pObj, 1+Abc_MaxInt(Gia_ObjLevel(p,Gia_ObjFanin0(pObj)),Gia_ObjLevel(p,Gia_ObjFanin1(pObj))) ); } +static inline int Gia_ObjNum( Gia_Man_t * p, Gia_Obj_t * pObj ) { return (int)(unsigned char)Vec_StrGetEntry(p->vTtNums, Gia_ObjId(p,pObj)); } +static inline void Gia_ObjSetNum( Gia_Man_t * p, Gia_Obj_t * pObj, int n ) { assert( n >= 0 && n < 254 ); Vec_StrSetEntry(p->vTtNums, Gia_ObjId(p,pObj), (char)n); } + static inline int Gia_ObjRefs( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( p->pRefs); return p->pRefs[Gia_ObjId(p, pObj)]; } static inline int Gia_ObjRefsId( Gia_Man_t * p, int Id ) { assert( p->pRefs); return p->pRefs[Id]; } static inline int Gia_ObjRefInc( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( p->pRefs); return p->pRefs[Gia_ObjId(p, pObj)]++; } @@ -711,7 +716,6 @@ extern Vec_Int_t * Gia_VtaConvertToGla( Gia_Man_t * p, Vec_Int_t * vVta extern Vec_Int_t * Gia_VtaConvertFromGla( Gia_Man_t * p, Vec_Int_t * vGla, int nFrames ); extern Vec_Int_t * Gia_FlaConvertToGla( Gia_Man_t * p, Vec_Int_t * vFla ); extern Vec_Int_t * Gia_GlaConvertToFla( Gia_Man_t * p, Vec_Int_t * vGla ); -extern unsigned * Gia_ObjComputeTruthTable( Gia_Man_t * p, Gia_Obj_t * pObj ); /*=== giaAbsGla.c ===========================================================*/ extern int Gia_GlaPerform( Gia_Man_t * p, Gia_ParVta_t * pPars, int fStartVta ); /*=== giaAbsVta.c ===========================================================*/ @@ -951,6 +955,8 @@ extern void Gia_ObjPrint( Gia_Man_t * p, Gia_Obj_t * pObj ); extern int Gia_ManVerifyCex( Gia_Man_t * pAig, Abc_Cex_t * p, int fDualOut ); extern int Gia_ManFindFailedPoCex( Gia_Man_t * pAig, Abc_Cex_t * p, int nOutputs ); extern void Gia_ManInvertConstraints( Gia_Man_t * pAig ); +extern void Gia_ObjCollectInternal( Gia_Man_t * p, Gia_Obj_t * pObj ); +extern unsigned * Gia_ObjComputeTruthTable( Gia_Man_t * p, Gia_Obj_t * pObj ); /*=== giaCTas.c ===========================================================*/ typedef struct Tas_Man_t_ Tas_Man_t; -- cgit v1.2.3