summaryrefslogtreecommitdiffstats
path: root/src/map/scl/sclSize.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/scl/sclSize.h')
-rw-r--r--src/map/scl/sclSize.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/map/scl/sclSize.h b/src/map/scl/sclSize.h
index 9656b55a..1f97bc8a 100644
--- a/src/map/scl/sclSize.h
+++ b/src/map/scl/sclSize.h
@@ -50,9 +50,11 @@ struct SC_Man_
Vec_Int_t * vGates; // mapping of objId into gateId
Vec_Int_t * vGatesBest; // best gate sizes found so far
Vec_Int_t * vUpdates; // sizing updates in this round
+ Vec_Int_t * vUpdates2; // sizing updates in this round
// timing information
SC_Pair * pLoads; // loads for each gate
SC_Pair * pLoads2; // loads for each gate
+ SC_Pair * pLoads3; // loads for each gate
SC_Pair * pDepts; // departures for each gate
SC_Pair * pTimes; // arrivals for each gate
SC_Pair * pSlews; // slews for each gate
@@ -60,6 +62,7 @@ struct SC_Man_
SC_Pair * pSlews2; // slews for each gate
float * pSlack; // slacks for each gatt
float * pInDrive; // maximum input drive strength
+ Vec_Int_t * vBestFans; // best fanouts
Vec_Flt_t * vTimesOut; // output arrival times
Vec_Que_t * vQue; // outputs by their time
SC_WireLoad * pWLoadUsed; // name of the used WireLoad model
@@ -101,6 +104,7 @@ static inline void Abc_SclObjSetCell( SC_Man * p, Abc_Obj_t * pObj, SC_Cell
static inline SC_Pair * Abc_SclObjLoad( SC_Man * p, Abc_Obj_t * pObj ) { return p->pLoads + Abc_ObjId(pObj); }
static inline SC_Pair * Abc_SclObjLoad2( SC_Man * p, Abc_Obj_t * pObj ) { return p->pLoads2 + Abc_ObjId(pObj); }
+static inline SC_Pair * Abc_SclObjLoad3( SC_Man * p, Abc_Obj_t * pObj ) { return p->pLoads3 + Abc_ObjId(pObj); }
static inline SC_Pair * Abc_SclObjDept( SC_Man * p, Abc_Obj_t * pObj ) { return p->pDepts + Abc_ObjId(pObj); }
static inline SC_Pair * Abc_SclObjTime( SC_Man * p, Abc_Obj_t * pObj ) { return p->pTimes + Abc_ObjId(pObj); }
static inline SC_Pair * Abc_SclObjSlew( SC_Man * p, Abc_Obj_t * pObj ) { return p->pSlews + Abc_ObjId(pObj); }
@@ -150,18 +154,21 @@ static inline SC_Man * Abc_SclManAlloc( SC_Lib * pLib, Abc_Ntk_t * pNtk )
p->nObjs = Abc_NtkObjNumMax(pNtk);
p->pLoads = ABC_CALLOC( SC_Pair, p->nObjs );
p->pLoads2 = ABC_CALLOC( SC_Pair, p->nObjs );
+ p->pLoads3 = ABC_CALLOC( SC_Pair, p->nObjs );
p->pDepts = ABC_CALLOC( SC_Pair, p->nObjs );
p->pTimes = ABC_CALLOC( SC_Pair, p->nObjs );
p->pSlews = ABC_CALLOC( SC_Pair, p->nObjs );
p->pTimes2 = ABC_CALLOC( SC_Pair, p->nObjs );
p->pSlews2 = ABC_CALLOC( SC_Pair, p->nObjs );
p->pSlack = ABC_FALLOC( float, p->nObjs );
+ p->vBestFans = Vec_IntStart( p->nObjs );
p->vTimesOut = Vec_FltStart( Abc_NtkCoNum(pNtk) );
p->vQue = Vec_QueAlloc( Abc_NtkCoNum(pNtk) );
Vec_QueSetCosts( p->vQue, Vec_FltArrayP(p->vTimesOut) );
for ( i = 0; i < Abc_NtkCoNum(pNtk); i++ )
Vec_QuePush( p->vQue, i );
p->vUpdates = Vec_IntAlloc( 1000 );
+ p->vUpdates2 = Vec_IntAlloc( 1000 );
// intermediate data
p->vNode2Gain = Vec_FltStart( p->nObjs );
p->vNode2Gate = Vec_IntStart( p->nObjs );
@@ -178,14 +185,17 @@ static inline void Abc_SclManFree( SC_Man * p )
Vec_IntFreeP( &p->vNode2Gate );
// intermediate data
Vec_IntFreeP( &p->vUpdates );
+ Vec_IntFreeP( &p->vUpdates2 );
Vec_IntFreeP( &p->vGatesBest );
// Vec_QuePrint( p->vQue );
Vec_QueCheck( p->vQue );
Vec_QueFreeP( &p->vQue );
Vec_FltFreeP( &p->vTimesOut );
Vec_IntFreeP( &p->vGates );
+ Vec_IntFreeP( &p->vBestFans );
ABC_FREE( p->pLoads );
ABC_FREE( p->pLoads2 );
+ ABC_FREE( p->pLoads3 );
ABC_FREE( p->pDepts );
ABC_FREE( p->pTimes );
ABC_FREE( p->pSlews );
@@ -289,6 +299,23 @@ static inline void Abc_SclLoadRestore( SC_Man * p, Abc_Obj_t * pObj )
*Abc_SclObjLoad(p, pFanin) = *Abc_SclObjLoad2(p, pFanin);
}
+static inline void Abc_SclLoadStore3( SC_Man * p, Abc_Obj_t * pObj )
+{
+ Abc_Obj_t * pFanin;
+ int i;
+ *Abc_SclObjLoad3(p, pObj) = *Abc_SclObjLoad(p, pObj);
+ Abc_ObjForEachFanin( pObj, pFanin, i )
+ *Abc_SclObjLoad3(p, pFanin) = *Abc_SclObjLoad(p, pFanin);
+}
+static inline void Abc_SclLoadRestore3( SC_Man * p, Abc_Obj_t * pObj )
+{
+ Abc_Obj_t * pFanin;
+ int i;
+ *Abc_SclObjLoad(p, pObj) = *Abc_SclObjLoad3(p, pObj);
+ Abc_ObjForEachFanin( pObj, pFanin, i )
+ *Abc_SclObjLoad(p, pFanin) = *Abc_SclObjLoad3(p, pFanin);
+}
+
/**Function*************************************************************
Synopsis []
@@ -394,6 +421,8 @@ static inline void Abc_SclDumpStats( SC_Man * p, char * pFileName, abctime Time
/*=== sclBuffer.c ===============================================================*/
+extern int Abc_SclIsInv( Abc_Obj_t * pObj );
+extern void Abc_NodeInvUpdateObjFanoutPolarity( Abc_Obj_t * pObj, Abc_Obj_t * pFanout );
extern Abc_Ntk_t * Abc_SclUnBufferPerform( Abc_Ntk_t * pNtk, int fVerbose );
extern Abc_Ntk_t * Abc_SclUnBufferPhase( Abc_Ntk_t * pNtk, int fVerbose );
extern Abc_Ntk_t * Abc_SclBufferPhase( Abc_Ntk_t * pNtk, int fVerbose );
@@ -405,6 +434,7 @@ extern void Abc_SclDnsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_S
/*=== sclLoad.c ===============================================================*/
extern void Abc_SclComputeLoad( SC_Man * p );
extern void Abc_SclUpdateLoad( SC_Man * p, Abc_Obj_t * pObj, SC_Cell * pOld, SC_Cell * pNew );
+extern void Abc_SclUpdateLoadSplit( SC_Man * p, Abc_Obj_t * pBuffer, Abc_Obj_t * pFanout );
/*=== sclSize.c ===============================================================*/
extern Abc_Obj_t * Abc_SclFindCriticalCo( SC_Man * p, int * pfRise );
extern Abc_Obj_t * Abc_SclFindMostCriticalFanin( SC_Man * p, int * pfRise, Abc_Obj_t * pNode );