abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sclTime.h File Reference
#include "misc/vec/vec.h"
#include "sclLib.h"

Go to the source code of this file.

Data Structures

struct  SC_Time_
 

Typedefs

typedef
typedefABC_NAMESPACE_HEADER_START
struct SC_Time_ 
SC_Time
 INCLUDES ///. More...
 

Functions

static SC_CellScl_ObjCell (SC_Time *p, int i)
 GLOBAL VARIABLES ///. More...
 
static void Scl_ObjSetCell (SC_Time *p, int i, SC_Cell *pCell)
 
static SC_PairScl_ObjLoad (SC_Time *p, int i)
 
static SC_PairScl_ObjLoad2 (SC_Time *p, int i)
 
static SC_PairScl_ObjDept (SC_Time *p, int i)
 
static SC_PairScl_ObjTime (SC_Time *p, int i)
 
static SC_PairScl_ObjSlew (SC_Time *p, int i)
 
static SC_PairScl_ObjTime2 (SC_Time *p, int i)
 
static SC_PairScl_ObjSlew2 (SC_Time *p, int i)
 
static float Scl_ObjTimeMax (SC_Time *p, int i)
 
static float Scl_ObjDepthMax (SC_Time *p, int i)
 
static float Scl_ObjGetSlack (SC_Time *p, int i, float D)
 
static float Scl_ObjGetSlackR (SC_Time *p, int i, float D)
 
static float Scl_ObjGetSlackF (SC_Time *p, int i, float D)
 
static float Scl_ObjSlack (SC_Time *p, int i)
 
static void Scl_ObjDupFanin (SC_Time *p, int i, int iFanin)
 
static float Scl_ObjGain (SC_Time *p, int i)
 
static int Scl_ObjLegal (SC_Time *p, int i, float D)
 
static double Scl_ObjLoadFf (SC_Time *p, int i, int fRise)
 
static double Scl_ObjTimePs (SC_Time *p, int i, int fRise)
 
static double Scl_ObjSlewPs (SC_Time *p, int i, int fRise)
 
static SC_TimeScl_ManAlloc (SC_Lib *pLib, Vec_Int_t *vCis, Vec_Int_t *vCos, int nObjs)
 FUNCTION DEFINITIONS ///. More...
 
static void Scl_ManFree (SC_Time *p)
 
static void Scl_ManCleanTime (SC_Time *p)
 
static void Scl_ConeStore (SC_Time *p, Vec_Int_t *vCone)
 
static void Scl_ConeRestore (SC_Time *p, Vec_Int_t *vCone)
 
static void Scl_ConeClear (SC_Time *p, Vec_Int_t *vCone)
 
static void Scl_PinTimeArrival (SC_Time *p, SC_Timing *pTime, int iObj, int iFanin)
 
static void Scl_PinTimeDeparture (SC_Time *p, SC_Timing *pTime, int iObj, int iFanin)
 

Typedef Documentation

typedef typedefABC_NAMESPACE_HEADER_START struct SC_Time_ SC_Time

INCLUDES ///.

CFile****************************************************************

FileName [sclTime.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Standard-cell library representation.]

Synopsis [Timing/gate-sizing manager.]

Author [Alan Mishchenko, Niklas Een]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - August 24, 2012.]

Revision [

Id:
sclTime.h,v 1.0 2012/08/24 00:00:00 alanmi Exp

]PARAMETERS ///STRUCTURE DEFINITIONS ///

Definition at line 42 of file sclTime.h.

Function Documentation

static void Scl_ConeClear ( SC_Time p,
Vec_Int_t vCone 
)
inlinestatic

Definition at line 186 of file sclTime.h.

187 {
188  SC_Pair Zero = { 0.0, 0.0 };
189  int i, iObj;
190  Vec_IntForEachEntry( vCone, iObj, i )
191  {
192  *Scl_ObjTime(p, iObj) = Zero;
193  *Scl_ObjSlew(p, iObj) = Zero;
194  }
195 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair * Scl_ObjSlew(SC_Time *p, int i)
Definition: sclTime.h:84
static SC_Pair * Scl_ObjTime(SC_Time *p, int i)
Definition: sclTime.h:83
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
static void Scl_ConeRestore ( SC_Time p,
Vec_Int_t vCone 
)
inlinestatic

Definition at line 177 of file sclTime.h.

178 {
179  int i, iObj;
180  Vec_IntForEachEntry( vCone, iObj, i )
181  {
182  *Scl_ObjTime(p, iObj) = *Scl_ObjTime2(p, iObj);
183  *Scl_ObjSlew(p, iObj) = *Scl_ObjSlew2(p, iObj);
184  }
185 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair * Scl_ObjTime2(SC_Time *p, int i)
Definition: sclTime.h:85
static SC_Pair * Scl_ObjSlew(SC_Time *p, int i)
Definition: sclTime.h:84
static SC_Pair * Scl_ObjSlew2(SC_Time *p, int i)
Definition: sclTime.h:86
static SC_Pair * Scl_ObjTime(SC_Time *p, int i)
Definition: sclTime.h:83
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
static void Scl_ConeStore ( SC_Time p,
Vec_Int_t vCone 
)
inlinestatic

Function*************************************************************

Synopsis [Stores/retrieves timing information for the logic cone.]

Description []

SideEffects []

SeeAlso []

Definition at line 168 of file sclTime.h.

169 {
170  int i, iObj;
171  Vec_IntForEachEntry( vCone, iObj, i )
172  {
173  *Scl_ObjTime2(p, iObj) = *Scl_ObjTime(p, iObj);
174  *Scl_ObjSlew2(p, iObj) = *Scl_ObjSlew(p, iObj);
175  }
176 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair * Scl_ObjTime2(SC_Time *p, int i)
Definition: sclTime.h:85
static SC_Pair * Scl_ObjSlew(SC_Time *p, int i)
Definition: sclTime.h:84
static SC_Pair * Scl_ObjSlew2(SC_Time *p, int i)
Definition: sclTime.h:86
static SC_Pair * Scl_ObjTime(SC_Time *p, int i)
Definition: sclTime.h:83
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
static SC_Time* Scl_ManAlloc ( SC_Lib pLib,
Vec_Int_t vCis,
Vec_Int_t vCos,
int  nObjs 
)
inlinestatic

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis [Constructor/destructor of STA manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 118 of file sclTime.h.

119 {
120  SC_Time * p;
121  p = ABC_CALLOC( SC_Time, 1 );
122  p->pLib = pLib;
123  p->vCis = vCis;
124  p->vCos = vCos;
125  p->nObjs = nObjs;
126  p->pLoads = ABC_CALLOC( SC_Pair, p->nObjs );
127  p->pLoads2 = ABC_CALLOC( SC_Pair, p->nObjs );
128  p->pDepts = ABC_CALLOC( SC_Pair, p->nObjs );
129  p->pTimes = ABC_CALLOC( SC_Pair, p->nObjs );
130  p->pSlews = ABC_CALLOC( SC_Pair, p->nObjs );
131  p->pTimes2 = ABC_CALLOC( SC_Pair, p->nObjs );
132  p->pSlews2 = ABC_CALLOC( SC_Pair, p->nObjs );
133  p->pSlack = ABC_FALLOC( float, p->nObjs );
134  return p;
135 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_HEADER_START struct SC_Time_ SC_Time
INCLUDES ///.
Definition: sclTime.h:42
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
#define ABC_FALLOC(type, num)
Definition: abc_global.h:231
static void Scl_ManCleanTime ( SC_Time p)
inlinestatic

Definition at line 149 of file sclTime.h.

150 {
151  memset( p->pDepts, 0, sizeof(SC_Pair) * p->nObjs );
152  memset( p->pTimes, 0, sizeof(SC_Pair) * p->nObjs );
153  memset( p->pSlews, 0, sizeof(SC_Pair) * p->nObjs );
154 }
char * memset()
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Scl_ManFree ( SC_Time p)
inlinestatic

Definition at line 136 of file sclTime.h.

137 {
138  Vec_IntFreeP( &p->vGates );
139  ABC_FREE( p->pLoads );
140  ABC_FREE( p->pLoads2 );
141  ABC_FREE( p->pDepts );
142  ABC_FREE( p->pTimes );
143  ABC_FREE( p->pSlews );
144  ABC_FREE( p->pTimes2 );
145  ABC_FREE( p->pSlews2 );
146  ABC_FREE( p->pSlack );
147  ABC_FREE( p );
148 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
#define ABC_FREE(obj)
Definition: abc_global.h:232
static SC_Cell* Scl_ObjCell ( SC_Time p,
int  i 
)
inlinestatic

GLOBAL VARIABLES ///.

MACRO DEFINITIONS ///

Definition at line 77 of file sclTime.h.

77 { return SC_LibCell( p->pLib, Vec_IntEntry(p->vGates, i) ); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static SC_Cell * SC_LibCell(SC_Lib *p, int i)
Definition: sclLib.h:240
static SC_Pair* Scl_ObjDept ( SC_Time p,
int  i 
)
inlinestatic

Definition at line 82 of file sclTime.h.

82 { return p->pDepts + i; }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static float Scl_ObjDepthMax ( SC_Time p,
int  i 
)
inlinestatic

Definition at line 89 of file sclTime.h.

89 { return Abc_MaxFloat(Scl_ObjDept(p, i)->rise, Scl_ObjDept(p, i)->fall); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static float Abc_MaxFloat(float a, float b)
Definition: abc_global.h:243
static SC_Pair * Scl_ObjDept(SC_Time *p, int i)
Definition: sclTime.h:82
static void Scl_ObjDupFanin ( SC_Time p,
int  i,
int  iFanin 
)
inlinestatic

Definition at line 95 of file sclTime.h.

95 { *Scl_ObjTime(p, i) = *Scl_ObjTime(p, iFanin); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair * Scl_ObjTime(SC_Time *p, int i)
Definition: sclTime.h:83
static float Scl_ObjGain ( SC_Time p,
int  i 
)
inlinestatic

Definition at line 96 of file sclTime.h.

96 { return 0.5*((Scl_ObjTime2(p, i)->rise - Scl_ObjTime(p, i)->rise) + (Scl_ObjTime2(p, i)->fall - Scl_ObjTime(p, i)->fall)); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair * Scl_ObjTime2(SC_Time *p, int i)
Definition: sclTime.h:85
float rise
Definition: sclLib.h:65
float fall
Definition: sclLib.h:66
static SC_Pair * Scl_ObjTime(SC_Time *p, int i)
Definition: sclTime.h:83
static float Scl_ObjGetSlack ( SC_Time p,
int  i,
float  D 
)
inlinestatic

Definition at line 90 of file sclTime.h.

90 { return D - Abc_MaxFloat(Scl_ObjTime(p, i)->rise + Scl_ObjDept(p, i)->rise, Scl_ObjTime(p, i)->fall + Scl_ObjDept(p, i)->fall); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static float Abc_MaxFloat(float a, float b)
Definition: abc_global.h:243
static SC_Pair * Scl_ObjDept(SC_Time *p, int i)
Definition: sclTime.h:82
static SC_Pair * Scl_ObjTime(SC_Time *p, int i)
Definition: sclTime.h:83
static float Scl_ObjGetSlackF ( SC_Time p,
int  i,
float  D 
)
inlinestatic

Definition at line 92 of file sclTime.h.

92 { return D - (Scl_ObjTime(p, i)->fall + Scl_ObjDept(p, i)->fall); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair * Scl_ObjDept(SC_Time *p, int i)
Definition: sclTime.h:82
float fall
Definition: sclLib.h:66
static SC_Pair * Scl_ObjTime(SC_Time *p, int i)
Definition: sclTime.h:83
static float Scl_ObjGetSlackR ( SC_Time p,
int  i,
float  D 
)
inlinestatic

Definition at line 91 of file sclTime.h.

91 { return D - (Scl_ObjTime(p, i)->rise + Scl_ObjDept(p, i)->rise); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair * Scl_ObjDept(SC_Time *p, int i)
Definition: sclTime.h:82
float rise
Definition: sclLib.h:65
static SC_Pair * Scl_ObjTime(SC_Time *p, int i)
Definition: sclTime.h:83
static int Scl_ObjLegal ( SC_Time p,
int  i,
float  D 
)
inlinestatic

Definition at line 97 of file sclTime.h.

97 { return Scl_ObjTime(p, i)->rise <= Scl_ObjTime2(p, i)->rise + Scl_ObjGetSlackR(p, i, D) && Scl_ObjTime(p, i)->fall <= Scl_ObjTime2(p, i)->fall + Scl_ObjGetSlackF(p, i, D); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair * Scl_ObjTime2(SC_Time *p, int i)
Definition: sclTime.h:85
float rise
Definition: sclLib.h:65
float fall
Definition: sclLib.h:66
static float Scl_ObjGetSlackR(SC_Time *p, int i, float D)
Definition: sclTime.h:91
static SC_Pair * Scl_ObjTime(SC_Time *p, int i)
Definition: sclTime.h:83
static float Scl_ObjGetSlackF(SC_Time *p, int i, float D)
Definition: sclTime.h:92
static SC_Pair* Scl_ObjLoad ( SC_Time p,
int  i 
)
inlinestatic

Definition at line 80 of file sclTime.h.

80 { return p->pLoads + i; }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair* Scl_ObjLoad2 ( SC_Time p,
int  i 
)
inlinestatic

Definition at line 81 of file sclTime.h.

81 { return p->pLoads2 + i; }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static double Scl_ObjLoadFf ( SC_Time p,
int  i,
int  fRise 
)
inlinestatic

Definition at line 99 of file sclTime.h.

99 { return fRise ? Scl_ObjLoad(p, i)->rise : Scl_ObjLoad(p, i)->fall; }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair * Scl_ObjLoad(SC_Time *p, int i)
Definition: sclTime.h:80
float rise
Definition: sclLib.h:65
float fall
Definition: sclLib.h:66
static void Scl_ObjSetCell ( SC_Time p,
int  i,
SC_Cell pCell 
)
inlinestatic

Definition at line 78 of file sclTime.h.

78 { Vec_IntWriteEntry( p->vGates, i, pCell->Id ); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
int Id
Definition: sclLib.h:184
static float Scl_ObjSlack ( SC_Time p,
int  i 
)
inlinestatic

Definition at line 93 of file sclTime.h.

93 { return p->pSlack[i]; }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair* Scl_ObjSlew ( SC_Time p,
int  i 
)
inlinestatic

Definition at line 84 of file sclTime.h.

84 { return p->pSlews + i; }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair* Scl_ObjSlew2 ( SC_Time p,
int  i 
)
inlinestatic

Definition at line 86 of file sclTime.h.

86 { return p->pSlews2 + i; }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static double Scl_ObjSlewPs ( SC_Time p,
int  i,
int  fRise 
)
inlinestatic

Definition at line 101 of file sclTime.h.

101 { return fRise ? Scl_ObjSlew(p, i)->rise : Scl_ObjSlew(p, i)->fall; }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair * Scl_ObjSlew(SC_Time *p, int i)
Definition: sclTime.h:84
float rise
Definition: sclLib.h:65
float fall
Definition: sclLib.h:66
static SC_Pair* Scl_ObjTime ( SC_Time p,
int  i 
)
inlinestatic

Definition at line 83 of file sclTime.h.

83 { return p->pTimes + i; }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair* Scl_ObjTime2 ( SC_Time p,
int  i 
)
inlinestatic

Definition at line 85 of file sclTime.h.

85 { return p->pTimes2 + i; }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static float Scl_ObjTimeMax ( SC_Time p,
int  i 
)
inlinestatic

Definition at line 88 of file sclTime.h.

88 { return Abc_MaxFloat(Scl_ObjTime(p, i)->rise, Scl_ObjTime(p, i)->fall); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static float Abc_MaxFloat(float a, float b)
Definition: abc_global.h:243
static SC_Pair * Scl_ObjTime(SC_Time *p, int i)
Definition: sclTime.h:83
static double Scl_ObjTimePs ( SC_Time p,
int  i,
int  fRise 
)
inlinestatic

Definition at line 100 of file sclTime.h.

100 { return fRise ? Scl_ObjTime(p, i)->rise : Scl_ObjTime(p, i)->fall; }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
float rise
Definition: sclLib.h:65
float fall
Definition: sclLib.h:66
static SC_Pair * Scl_ObjTime(SC_Time *p, int i)
Definition: sclTime.h:83
static void Scl_PinTimeArrival ( SC_Time p,
SC_Timing pTime,
int  iObj,
int  iFanin 
)
inlinestatic

Function*************************************************************

Synopsis [Timing computation for pin/gate/cone/network.]

Description []

SideEffects []

SeeAlso []

Definition at line 208 of file sclTime.h.

209 {
210  SC_Pair * pArrIn = Scl_ObjTime( p, iFanin );
211  SC_Pair * pSlewIn = Scl_ObjSlew( p, iFanin );
212  SC_Pair * pLoad = Scl_ObjLoad( p, iObj );
213  SC_Pair * pArrOut = Scl_ObjTime( p, iObj ); // modified
214  SC_Pair * pSlewOut = Scl_ObjSlew( p, iObj ); // modified
215  Scl_LibPinArrival( pTime, pArrIn, pSlewIn, pLoad, pArrOut, pSlewOut );
216 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static SC_Pair * Scl_ObjLoad(SC_Time *p, int i)
Definition: sclTime.h:80
static SC_Pair * Scl_ObjSlew(SC_Time *p, int i)
Definition: sclTime.h:84
static void Scl_LibPinArrival(SC_Timing *pTime, SC_Pair *pArrIn, SC_Pair *pSlewIn, SC_Pair *pLoad, SC_Pair *pArrOut, SC_Pair *pSlewOut)
Definition: sclLib.h:523
static SC_Pair * Scl_ObjTime(SC_Time *p, int i)
Definition: sclTime.h:83
static void Scl_PinTimeDeparture ( SC_Time p,
SC_Timing pTime,
int  iObj,
int  iFanin 
)
inlinestatic

Definition at line 217 of file sclTime.h.

218 {
219  SC_Pair * pDepIn = Scl_ObjDept( p, iFanin ); // modified
220  SC_Pair * pSlewIn = Scl_ObjSlew( p, iFanin );
221  SC_Pair * pLoad = Scl_ObjLoad( p, iObj );
222  SC_Pair * pDepOut = Scl_ObjDept( p, iObj );
223  Scl_LibPinDeparture( pTime, pDepIn, pSlewIn, pLoad, pDepOut );
224 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Scl_LibPinDeparture(SC_Timing *pTime, SC_Pair *pDepIn, SC_Pair *pSlewIn, SC_Pair *pLoad, SC_Pair *pDepOut)
Definition: sclLib.h:540
static SC_Pair * Scl_ObjLoad(SC_Time *p, int i)
Definition: sclTime.h:80
static SC_Pair * Scl_ObjDept(SC_Time *p, int i)
Definition: sclTime.h:82
static SC_Pair * Scl_ObjSlew(SC_Time *p, int i)
Definition: sclTime.h:84