Commit 31430043 by Alan Mishchenko

Windowing for technology mapping.

parent e026f05a
......@@ -4367,6 +4367,10 @@ SOURCE=.\src\aig\gia\giaSpeedup.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaSplit.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaStg.c
# End Source File
# Begin Source File
......
......@@ -112,6 +112,7 @@ struct Gia_Man_t_
int fAddStrash; // performs additional structural hashing
int fSweeper; // sweeper is running
int * pRefs; // the reference count
int * pLutRefs; // the reference count
Vec_Int_t * vLevels; // levels of the nodes
int nLevels; // the mamixum level
int nConstrs; // the number of constraints
......@@ -536,18 +537,25 @@ static inline void Gia_ObjSetNumId( Gia_Man_t * p, int Id, int n )
static inline void Gia_ObjSetNum( Gia_Man_t * p, Gia_Obj_t * pObj, int n ) { Vec_IntWriteEntry(p->vTtNums, Gia_ObjId(p,pObj), n); }
static inline void Gia_ObjResetNumId( Gia_Man_t * p, int Id ) { Vec_IntWriteEntry(p->vTtNums, Id, -ABC_INFINITY); }
static inline int Gia_ObjRefNumId( Gia_Man_t * p, int Id ) { return p->pRefs[Id]; }
static inline int Gia_ObjRefIncId( Gia_Man_t * p, int Id ) { return p->pRefs[Id]++; }
static inline int Gia_ObjRefDecId( Gia_Man_t * p, int Id ) { return --p->pRefs[Id]; }
static inline int Gia_ObjRefNum( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjRefNumId( p, Gia_ObjId(p, pObj) ); }
static inline int Gia_ObjRefInc( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjRefIncId( p, Gia_ObjId(p, pObj) ); }
static inline int Gia_ObjRefDec( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjRefDecId( p, Gia_ObjId(p, pObj) ); }
static inline void Gia_ObjRefFanin0Inc(Gia_Man_t * p, Gia_Obj_t * pObj){ Gia_ObjRefInc(p, Gia_ObjFanin0(pObj)); }
static inline void Gia_ObjRefFanin1Inc(Gia_Man_t * p, Gia_Obj_t * pObj){ Gia_ObjRefInc(p, Gia_ObjFanin1(pObj)); }
static inline void Gia_ObjRefFanin2Inc(Gia_Man_t * p, Gia_Obj_t * pObj){ Gia_ObjRefInc(p, Gia_ObjFanin2(p, pObj)); }
static inline void Gia_ObjRefFanin0Dec(Gia_Man_t * p, Gia_Obj_t * pObj){ Gia_ObjRefDec(p, Gia_ObjFanin0(pObj)); }
static inline void Gia_ObjRefFanin1Dec(Gia_Man_t * p, Gia_Obj_t * pObj){ Gia_ObjRefDec(p, Gia_ObjFanin1(pObj)); }
static inline void Gia_ObjRefFanin2Dec(Gia_Man_t * p, Gia_Obj_t * pObj){ Gia_ObjRefDec(p, Gia_ObjFanin2(p, pObj)); }
static inline int Gia_ObjRefNumId( Gia_Man_t * p, int Id ) { return p->pRefs[Id]; }
static inline int Gia_ObjRefIncId( Gia_Man_t * p, int Id ) { return p->pRefs[Id]++; }
static inline int Gia_ObjRefDecId( Gia_Man_t * p, int Id ) { return --p->pRefs[Id]; }
static inline int Gia_ObjRefNum( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjRefNumId( p, Gia_ObjId(p, pObj) ); }
static inline int Gia_ObjRefInc( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjRefIncId( p, Gia_ObjId(p, pObj) ); }
static inline int Gia_ObjRefDec( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjRefDecId( p, Gia_ObjId(p, pObj) ); }
static inline void Gia_ObjRefFanin0Inc(Gia_Man_t * p, Gia_Obj_t * pObj) { Gia_ObjRefInc(p, Gia_ObjFanin0(pObj)); }
static inline void Gia_ObjRefFanin1Inc(Gia_Man_t * p, Gia_Obj_t * pObj) { Gia_ObjRefInc(p, Gia_ObjFanin1(pObj)); }
static inline void Gia_ObjRefFanin2Inc(Gia_Man_t * p, Gia_Obj_t * pObj) { Gia_ObjRefInc(p, Gia_ObjFanin2(p, pObj)); }
static inline void Gia_ObjRefFanin0Dec(Gia_Man_t * p, Gia_Obj_t * pObj) { Gia_ObjRefDec(p, Gia_ObjFanin0(pObj)); }
static inline void Gia_ObjRefFanin1Dec(Gia_Man_t * p, Gia_Obj_t * pObj) { Gia_ObjRefDec(p, Gia_ObjFanin1(pObj)); }
static inline void Gia_ObjRefFanin2Dec(Gia_Man_t * p, Gia_Obj_t * pObj) { Gia_ObjRefDec(p, Gia_ObjFanin2(p, pObj)); }
static inline int Gia_ObjLutRefNumId( Gia_Man_t * p, int Id ) { assert(p->pLutRefs); return p->pLutRefs[Id]; }
static inline int Gia_ObjLutRefIncId( Gia_Man_t * p, int Id ) { assert(p->pLutRefs); return p->pLutRefs[Id]++; }
static inline int Gia_ObjLutRefDecId( Gia_Man_t * p, int Id ) { assert(p->pLutRefs); return --p->pLutRefs[Id]; }
static inline int Gia_ObjLutRefNum( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert(p->pLutRefs); return p->pLutRefs[Gia_ObjId(p, pObj)]; }
static inline int Gia_ObjLutRefInc( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert(p->pLutRefs); return p->pLutRefs[Gia_ObjId(p, pObj)]++; }
static inline int Gia_ObjLutRefDec( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert(p->pLutRefs); return --p->pLutRefs[Gia_ObjId(p, pObj)]; }
static inline void Gia_ObjSetTravIdCurrent( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjId(p, pObj) < p->nTravIdsAlloc ); p->pTravIds[Gia_ObjId(p, pObj)] = p->nTravIds; }
static inline void Gia_ObjSetTravIdPrevious( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjId(p, pObj) < p->nTravIdsAlloc ); p->pTravIds[Gia_ObjId(p, pObj)] = p->nTravIds - 1; }
......@@ -1251,6 +1259,7 @@ extern int Gia_ManLutNum( Gia_Man_t * p );
extern int Gia_ManLutLevel( Gia_Man_t * p );
extern void Gia_ManLutParams( Gia_Man_t * p, int * pnCurLuts, int * pnCurEdges, int * pnCurLevels );
extern void Gia_ManSetRefsMapped( Gia_Man_t * p );
extern void Gia_ManSetLutRefs( Gia_Man_t * p );
extern void Gia_ManSetIfParsDefault( void * pIfPars );
extern void Gia_ManMappingVerify( Gia_Man_t * p );
extern void Gia_ManTransferMapping( Gia_Man_t * p, Gia_Man_t * pGia );
......
......@@ -257,6 +257,30 @@ void Gia_ManSetRefsMapped( Gia_Man_t * p )
/**Function*************************************************************
Synopsis [Assigns levels.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Gia_ManSetLutRefs( Gia_Man_t * p )
{
Gia_Obj_t * pObj;
int i, k, iFan;
ABC_FREE( p->pLutRefs );
p->pLutRefs = ABC_CALLOC( int, Gia_ManObjNum(p) );
Gia_ManForEachCo( p, pObj, i )
Gia_ObjLutRefInc( p, Gia_ObjFanin0(pObj) );
Gia_ManForEachLut( p, i )
Gia_LutForEachFanin( p, i, iFan, k )
Gia_ObjLutRefInc( p, Gia_ManObj(p, iFan) );
}
/**Function*************************************************************
Synopsis [Calculate mapping overlap.]
Description []
......
......@@ -136,7 +136,7 @@ void Gia_ManStop( Gia_Man_t * p )
ABC_FREE( p->pNexts );
ABC_FREE( p->pSibls );
ABC_FREE( p->pRefs );
// ABC_FREE( p->pNodeRefs );
ABC_FREE( p->pLutRefs );
ABC_FREE( p->pHTable );
ABC_FREE( p->pMuxes );
ABC_FREE( p->pObjs );
......
......@@ -65,6 +65,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaSim2.c \
src/aig/gia/giaSort.c \
src/aig/gia/giaSpeedup.c \
src/aig/gia/giaSplit.c \
src/aig/gia/giaStg.c \
src/aig/gia/giaStr.c \
src/aig/gia/giaSupMin.c \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment