abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sclBufSize.c File Reference
#include "sclSize.h"
#include "map/mio/mio.h"
#include "base/main/main.h"

Go to the source code of this file.

Data Structures

struct  Bus_Man_t_
 

Typedefs

typedef
typedefABC_NAMESPACE_IMPL_START
struct Bus_Man_t_ 
Bus_Man_t
 DECLARATIONS ///. More...
 

Functions

static Bus_Man_tBus_SclObjMan (Abc_Obj_t *p)
 
static float Bus_SclObjCin (Abc_Obj_t *p)
 
static void Bus_SclObjSetCin (Abc_Obj_t *p, float cap)
 
static float Bus_SclObjETime (Abc_Obj_t *p)
 
static void Bus_SclObjSetETime (Abc_Obj_t *p, float time)
 
static float Bus_SclObjLoad (Abc_Obj_t *p)
 
static void Bus_SclObjSetLoad (Abc_Obj_t *p, float cap)
 
static float Bus_SclObjDept (Abc_Obj_t *p)
 
static void Bus_SclObjUpdateDept (Abc_Obj_t *p, float time)
 
Bus_Man_tBus_ManStart (Abc_Ntk_t *pNtk, SC_Lib *pLib, SC_BusPars *pPars)
 FUNCTION DEFINITIONS ///. More...
 
void Bus_ManStop (Bus_Man_t *p)
 
void Bus_ManReadInOutLoads (Bus_Man_t *p)
 
static float Abc_NtkComputeEdgeDept (Abc_Obj_t *pFanout, int iFanin, float Slew)
 
float Abc_NtkComputeNodeDeparture (Abc_Obj_t *pObj, float Slew)
 
void Abc_NtkComputeFanoutInfo (Abc_Obj_t *pObj, float Slew)
 
float Abc_NtkComputeNodeLoad (Bus_Man_t *p, Abc_Obj_t *pObj)
 
float Abc_NtkComputeFanoutLoad (Bus_Man_t *p, Vec_Ptr_t *vFanouts)
 
void Abc_NtkPrintFanoutProfile (Abc_Obj_t *pObj)
 
void Abc_NtkPrintFanoutProfileVec (Abc_Obj_t *pObj, Vec_Ptr_t *vFanouts)
 
int Bus_SclCompareFanouts (Abc_Obj_t **pp1, Abc_Obj_t **pp2)
 
void Bus_SclInsertFanout (Vec_Ptr_t *vFanouts, Abc_Obj_t *pObj)
 
void Bus_SclCheckSortedFanout (Vec_Ptr_t *vFanouts)
 
void Abc_SclOneNodePrint (Bus_Man_t *p, Abc_Obj_t *pObj)
 
Abc_Obj_tAbc_SclAddOneInv (Bus_Man_t *p, Abc_Obj_t *pObj, Vec_Ptr_t *vFanouts, float Gain)
 
void Abc_SclBufSize (Bus_Man_t *p, float Gain)
 
Abc_Ntk_tAbc_SclBufferingPerform (Abc_Ntk_t *pNtk, SC_Lib *pLib, SC_BusPars *pPars)
 

Typedef Documentation

typedef typedefABC_NAMESPACE_IMPL_START struct Bus_Man_t_ Bus_Man_t

DECLARATIONS ///.

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

FileName [sclBufSize.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Standard-cell library representation.]

Synopsis [Buffering and sizing combined.]

Author [Alan Mishchenko, Niklas Een]

Affiliation [UC Berkeley]

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

Revision [

Id:
sclBufSize.c,v 1.0 2012/08/24 00:00:00 alanmi Exp

]

Definition at line 32 of file sclBufSize.c.

Function Documentation

static float Abc_NtkComputeEdgeDept ( Abc_Obj_t pFanout,
int  iFanin,
float  Slew 
)
inlinestatic

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

Synopsis [Compute load and departure times of the node.]

Description []

SideEffects []

SeeAlso []

Definition at line 170 of file sclBufSize.c.

171 {
172  float Load = Bus_SclObjLoad( pFanout );
173  float Dept = Bus_SclObjDept( pFanout );
174  float Edge = Scl_LibPinArrivalEstimate( Abc_SclObjCell(pFanout), iFanin, Slew, Load );
175 //if ( Abc_ObjFaninNum(pFanout) == 0 )
176 //printf( "Edge = %.2f\n", Edge );
177  assert( Edge > 0 );
178  return Dept + Edge;
179 }
static float Bus_SclObjDept(Abc_Obj_t *p)
Definition: sclBufSize.c:60
static float Bus_SclObjLoad(Abc_Obj_t *p)
Definition: sclBufSize.c:58
#define assert(ex)
Definition: util_old.h:213
static float Scl_LibPinArrivalEstimate(SC_Cell *pCell, int iPin, float Slew, float Load)
Definition: sclLib.h:578
static SC_Cell * Abc_SclObjCell(Abc_Obj_t *p)
Definition: sclSize.h:110
void Abc_NtkComputeFanoutInfo ( Abc_Obj_t pObj,
float  Slew 
)

Definition at line 190 of file sclBufSize.c.

191 {
192  Abc_Obj_t * pFanout;
193  int i;
194  Abc_ObjForEachFanout( pObj, pFanout, i )
195  if ( !Abc_ObjIsCo(pFanout) )
196  {
197  int iFanin = Abc_NodeFindFanin(pFanout, pObj);
198  Bus_SclObjSetETime( pFanout, Abc_NtkComputeEdgeDept(pFanout, iFanin, Slew) );
199  Bus_SclObjSetCin( pFanout, SC_CellPinCap( Abc_SclObjCell(pFanout), iFanin ) );
200  }
201 }
static void Bus_SclObjSetCin(Abc_Obj_t *p, float cap)
Definition: sclBufSize.c:55
ABC_DLL int Abc_NodeFindFanin(Abc_Obj_t *pNode, Abc_Obj_t *pFanin)
Definition: abcUtil.c:758
static float Abc_NtkComputeEdgeDept(Abc_Obj_t *pFanout, int iFanin, float Slew)
Definition: sclBufSize.c:170
static int Abc_ObjIsCo(Abc_Obj_t *pObj)
Definition: abc.h:352
if(last==0)
Definition: sparse_int.h:34
#define Abc_ObjForEachFanout(pObj, pFanout, i)
Definition: abc.h:526
static float SC_CellPinCap(SC_Cell *p, int i)
Definition: sclLib.h:243
static void Bus_SclObjSetETime(Abc_Obj_t *p, float time)
Definition: sclBufSize.c:57
static SC_Cell * Abc_SclObjCell(Abc_Obj_t *p)
Definition: sclSize.h:110
float Abc_NtkComputeFanoutLoad ( Bus_Man_t p,
Vec_Ptr_t vFanouts 
)

Definition at line 214 of file sclBufSize.c.

215 {
216  Abc_Obj_t * pFanout;
217  float Load;
218  int i;
219  Load = Abc_SclFindWireLoad( p->vWireCaps, Vec_PtrSize(vFanouts) );
220  Vec_PtrForEachEntry( Abc_Obj_t *, vFanouts, pFanout, i )
221  Load += Bus_SclObjCin( pFanout );
222  return Load;
223 }
static float Bus_SclObjCin(Abc_Obj_t *p)
Definition: sclBufSize.c:54
static Llb_Mgr_t * p
Definition: llb3Image.c:950
float Abc_SclFindWireLoad(Vec_Flt_t *vWireCaps, int nFans)
Definition: sclLoad.c:94
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
float Abc_NtkComputeNodeDeparture ( Abc_Obj_t pObj,
float  Slew 
)

Definition at line 180 of file sclBufSize.c.

181 {
182  Abc_Obj_t * pFanout;
183  int i;
184  assert( Bus_SclObjDept(pObj) == 0 );
185  Abc_ObjForEachFanout( pObj, pFanout, i )
186  if ( !Abc_ObjIsCo(pFanout) ) // add required times here
187  Bus_SclObjUpdateDept( pObj, Abc_NtkComputeEdgeDept(pFanout, Abc_NodeFindFanin(pFanout, pObj), Slew) );
188  return Bus_SclObjDept( pObj );
189 }
ABC_DLL int Abc_NodeFindFanin(Abc_Obj_t *pNode, Abc_Obj_t *pFanin)
Definition: abcUtil.c:758
static float Abc_NtkComputeEdgeDept(Abc_Obj_t *pFanout, int iFanin, float Slew)
Definition: sclBufSize.c:170
static float Bus_SclObjDept(Abc_Obj_t *p)
Definition: sclBufSize.c:60
static int Abc_ObjIsCo(Abc_Obj_t *pObj)
Definition: abc.h:352
if(last==0)
Definition: sparse_int.h:34
static void Bus_SclObjUpdateDept(Abc_Obj_t *p, float time)
Definition: sclBufSize.c:61
#define Abc_ObjForEachFanout(pObj, pFanout, i)
Definition: abc.h:526
#define assert(ex)
Definition: util_old.h:213
float Abc_NtkComputeNodeLoad ( Bus_Man_t p,
Abc_Obj_t pObj 
)

Definition at line 202 of file sclBufSize.c.

203 {
204  Abc_Obj_t * pFanout;
205  float Load;
206  int i;
207  assert( Bus_SclObjLoad(pObj) == 0 );
208  Load = Abc_SclFindWireLoad( p->vWireCaps, Abc_ObjFanoutNum(pObj) );
209  Abc_ObjForEachFanout( pObj, pFanout, i )
210  Load += Bus_SclObjCin( pFanout );
211  Bus_SclObjSetLoad( pObj, Load );
212  return Load;
213 }
static float Bus_SclObjCin(Abc_Obj_t *p)
Definition: sclBufSize.c:54
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
Definition: abc.h:365
float Abc_SclFindWireLoad(Vec_Flt_t *vWireCaps, int nFans)
Definition: sclLoad.c:94
static float Bus_SclObjLoad(Abc_Obj_t *p)
Definition: sclBufSize.c:58
#define Abc_ObjForEachFanout(pObj, pFanout, i)
Definition: abc.h:526
static void Bus_SclObjSetLoad(Abc_Obj_t *p, float cap)
Definition: sclBufSize.c:59
#define assert(ex)
Definition: util_old.h:213
void Abc_NtkPrintFanoutProfile ( Abc_Obj_t pObj)

Definition at line 224 of file sclBufSize.c.

225 {
226  Abc_Obj_t * pFanout;
227  int i;
228  printf( "Obj %6d fanouts (%d):\n", Abc_ObjId(pObj), Abc_ObjFanoutNum(pObj) );
229  Abc_ObjForEachFanout( pObj, pFanout, i )
230  {
231  printf( "%3d : time = %7.2f ps load = %7.2f ff ", i, Bus_SclObjETime(pFanout), Bus_SclObjCin(pFanout) );
232  printf( "%s\n", Abc_ObjFaninPhase( pFanout, Abc_NodeFindFanin(pFanout, pObj) ) ? "*" : " " );
233  }
234  printf( "\n" );
235 }
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Definition: abc.h:329
static float Bus_SclObjCin(Abc_Obj_t *p)
Definition: sclBufSize.c:54
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
Definition: abc.h:365
ABC_DLL int Abc_NodeFindFanin(Abc_Obj_t *pNode, Abc_Obj_t *pFanin)
Definition: abcUtil.c:758
static float Bus_SclObjETime(Abc_Obj_t *p)
Definition: sclBufSize.c:56
#define Abc_ObjForEachFanout(pObj, pFanout, i)
Definition: abc.h:526
static int Abc_ObjFaninPhase(Abc_Obj_t *p, int i)
Definition: abc.h:392
void Abc_NtkPrintFanoutProfileVec ( Abc_Obj_t pObj,
Vec_Ptr_t vFanouts 
)

Definition at line 236 of file sclBufSize.c.

237 {
238  Abc_Obj_t * pFanout;
239  int i;
240  printf( "Fanout profile (%d):\n", Vec_PtrSize(vFanouts) );
241  Vec_PtrForEachEntry( Abc_Obj_t *, vFanouts, pFanout, i )
242  {
243  printf( "%3d : time = %7.2f ps load = %7.2f ff ", i, Bus_SclObjETime(pFanout), Bus_SclObjCin(pFanout) );
244  if ( pObj->pNtk->vPhases )
245  printf( "%s", (pObj && Abc_ObjFanoutNum(pObj) == Vec_PtrSize(vFanouts) && Abc_ObjFaninPhase( pFanout, Abc_NodeFindFanin(pFanout, pObj) )) ? "*" : " " );
246  printf( "\n" );
247  }
248  printf( "\n" );
249 }
static float Bus_SclObjCin(Abc_Obj_t *p)
Definition: sclBufSize.c:54
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
Definition: abc.h:365
ABC_DLL int Abc_NodeFindFanin(Abc_Obj_t *pNode, Abc_Obj_t *pFanin)
Definition: abcUtil.c:758
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static float Bus_SclObjETime(Abc_Obj_t *p)
Definition: sclBufSize.c:56
Vec_Int_t * vPhases
Definition: abc.h:208
Abc_Ntk_t * pNtk
Definition: abc.h:130
static int Abc_ObjFaninPhase(Abc_Obj_t *p, int i)
Definition: abc.h:392
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
Abc_Obj_t* Abc_SclAddOneInv ( Bus_Man_t p,
Abc_Obj_t pObj,
Vec_Ptr_t vFanouts,
float  Gain 
)

Definition at line 334 of file sclBufSize.c.

335 {
336  SC_Cell * pCellNew;
337  Abc_Obj_t * pFanout, * pInv;
338  float Target = SC_CellPinCap(p->pInv, 0) * Gain;
339  float LoadWirePrev, LoadWireThis, LoadNew, Load = 0;
340  int Limit = Abc_MinInt( p->pPars->nDegree, Vec_PtrSize(vFanouts) );
341  int i, iStop;
342  Bus_SclCheckSortedFanout( vFanouts );
343  Vec_PtrForEachEntryStop( Abc_Obj_t *, vFanouts, pFanout, iStop, Limit )
344  {
345  LoadWirePrev = Abc_SclFindWireLoad( p->vWireCaps, iStop );
346  LoadWireThis = Abc_SclFindWireLoad( p->vWireCaps, iStop+1 );
347  Load += Bus_SclObjCin( pFanout ) - LoadWirePrev + LoadWireThis;
348  if ( Load > Target )
349  {
350  iStop++;
351  break;
352  }
353  }
354  // create inverter
355  if ( p->pPars->fAddBufs )
356  pInv = Abc_NtkCreateNodeBuf( p->pNtk, NULL );
357  else
358  pInv = Abc_NtkCreateNodeInv( p->pNtk, NULL );
359  assert( (int)Abc_ObjId(pInv) == Vec_FltSize(p->vCins) );
360  Vec_FltPush( p->vCins, 0 );
361  Vec_FltPush( p->vETimes, 0 );
362  Vec_FltPush( p->vLoads, 0 );
363  Vec_FltPush( p->vDepts, 0 );
364  Limit = Abc_MinInt( Abc_MaxInt(iStop, 2), Vec_PtrSize(vFanouts) );
365  Vec_PtrForEachEntryStop( Abc_Obj_t *, vFanouts, pFanout, i, Limit )
366  {
367  Vec_PtrWriteEntry( vFanouts, i, NULL );
368  if ( Abc_ObjFaninNum(pFanout) == 0 )
369  Abc_ObjAddFanin( pFanout, pInv );
370  else
371  Abc_ObjPatchFanin( pFanout, pObj, pInv );
372  }
373  // set the gate
374  pCellNew = Abc_SclFindSmallestGate( p->pInv, Load / Gain );
375  Vec_IntSetEntry( p->pNtk->vGates, Abc_ObjId(pInv), pCellNew->Id );
376  // set departure and load
377  Abc_NtkComputeNodeDeparture( pInv, p->pPars->Slew );
378  LoadNew = Abc_NtkComputeNodeLoad( p, pInv );
379  assert( LoadNew - Load < 1 && Load - LoadNew < 1 );
380  // set fanout info for the inverter
381  Bus_SclObjSetCin( pInv, SC_CellPinCap(pCellNew, 0) );
382  Bus_SclObjSetETime( pInv, Abc_NtkComputeEdgeDept(pInv, 0, p->pPars->Slew) );
383  // update phases
384  if ( p->pNtk->vPhases && Abc_SclIsInv(pInv) )
386  return pInv;
387 }
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Definition: abc.h:329
static void Bus_SclObjSetCin(Abc_Obj_t *p, float cap)
Definition: sclBufSize.c:55
int Abc_SclIsInv(Abc_Obj_t *pObj)
Definition: sclBuffer.c:116
static float Bus_SclObjCin(Abc_Obj_t *p)
Definition: sclBufSize.c:54
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Bus_SclCheckSortedFanout(Vec_Ptr_t *vFanouts)
Definition: sclBufSize.c:295
float Abc_SclFindWireLoad(Vec_Flt_t *vWireCaps, int nFans)
Definition: sclLoad.c:94
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
Definition: abc.h:364
static void Vec_IntSetEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:418
static float Abc_NtkComputeEdgeDept(Abc_Obj_t *pFanout, int iFanin, float Slew)
Definition: sclBufSize.c:170
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static void Vec_FltPush(Vec_Flt_t *p, float Entry)
Definition: vecFlt.h:528
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
Definition: abcFanio.c:84
ABC_DLL void Abc_ObjPatchFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFaninOld, Abc_Obj_t *pFaninNew)
Definition: abcFanio.c:172
static int Abc_MinInt(int a, int b)
Definition: abc_global.h:239
float Abc_NtkComputeNodeDeparture(Abc_Obj_t *pObj, float Slew)
Definition: sclBufSize.c:180
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeInv(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
Definition: abcObj.c:662
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeBuf(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
Definition: abcObj.c:692
int Id
Definition: sclLib.h:184
SC_Cell * Abc_SclFindSmallestGate(SC_Cell *p, float CinMin)
Definition: sclLibUtil.c:208
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
Definition: vecPtr.h:396
#define Vec_PtrForEachEntryStop(Type, vVec, pEntry, i, Stop)
Definition: vecPtr.h:59
static float SC_CellPinCap(SC_Cell *p, int i)
Definition: sclLib.h:243
#define assert(ex)
Definition: util_old.h:213
static void Bus_SclObjSetETime(Abc_Obj_t *p, float time)
Definition: sclBufSize.c:57
static int Vec_FltSize(Vec_Flt_t *p)
Definition: vecFlt.h:294
float Abc_NtkComputeNodeLoad(Bus_Man_t *p, Abc_Obj_t *pObj)
Definition: sclBufSize.c:202
void Abc_NodeInvUpdateFanPolarity(Abc_Obj_t *pObj)
Definition: sclBuffer.c:320
Abc_Ntk_t* Abc_SclBufferingPerform ( Abc_Ntk_t pNtk,
SC_Lib pLib,
SC_BusPars pPars 
)

Definition at line 480 of file sclBufSize.c.

481 {
482  Abc_Ntk_t * pNtkNew;
483  Bus_Man_t * p;
484  if ( !Abc_SclCheckNtk( pNtk, 0 ) )
485  return NULL;
486  Abc_SclReportDupFanins( pNtk );
487  Abc_SclMioGates2SclGates( pLib, pNtk );
488  p = Bus_ManStart( pNtk, pLib, pPars );
490  Abc_SclBufSize( p, 0.01 * pPars->GainRatio );
491  Bus_ManStop( p );
492  Abc_SclSclGates2MioGates( pLib, pNtk );
493  if ( pNtk->vPhases )
494  Vec_IntFillExtra( pNtk->vPhases, Abc_NtkObjNumMax(pNtk), 0 );
495  pNtkNew = Abc_NtkDupDfs( pNtk );
496  return pNtkNew;
497 }
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
Definition: abc.h:284
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_IntFillExtra(Vec_Int_t *p, int nSize, int Fill)
Definition: bblif.c:376
int Abc_SclCheckNtk(Abc_Ntk_t *p, int fVerbose)
Definition: sclBuffer.c:286
void Bus_ManReadInOutLoads(Bus_Man_t *p)
Definition: sclBufSize.c:133
typedefABC_NAMESPACE_IMPL_START struct Bus_Man_t_ Bus_Man_t
DECLARATIONS ///.
Definition: sclBufSize.c:32
void Bus_ManStop(Bus_Man_t *p)
Definition: sclBufSize.c:111
void Abc_SclReportDupFanins(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition: sclBuffer.c:90
void Abc_SclMioGates2SclGates(SC_Lib *pLib, Abc_Ntk_t *p)
DECLARATIONS ///.
Definition: sclUtil.c:47
Vec_Int_t * vPhases
Definition: abc.h:208
void Abc_SclSclGates2MioGates(SC_Lib *pLib, Abc_Ntk_t *p)
Definition: sclUtil.c:73
ABC_DLL Abc_Ntk_t * Abc_NtkDupDfs(Abc_Ntk_t *pNtk)
Definition: abcNtk.c:476
void Abc_SclBufSize(Bus_Man_t *p, float Gain)
Definition: sclBufSize.c:388
int GainRatio
Definition: sclLib.h:92
Bus_Man_t * Bus_ManStart(Abc_Ntk_t *pNtk, SC_Lib *pLib, SC_BusPars *pPars)
FUNCTION DEFINITIONS ///.
Definition: sclBufSize.c:78
void Abc_SclBufSize ( Bus_Man_t p,
float  Gain 
)

Definition at line 388 of file sclBufSize.c.

389 {
390  SC_Cell * pCell, * pCellNew;
391  Abc_Obj_t * pObj, * pFanout;
392  abctime clk = Abc_Clock();
393  int i, k, nObjsOld = Abc_NtkObjNumMax(p->pNtk);
394  float GainGate, GainInv, Load, LoadNew, Cin, DeptMax = 0;
395  GainGate = p->pPars->fAddBufs ? pow( Gain, 2.0 ) : Gain;
396  GainInv = p->pPars->fAddBufs ? pow( Gain, 2.0 ) : Gain;
397  Abc_NtkForEachObjReverse( p->pNtk, pObj, i )
398  {
399  if ( !((Abc_ObjIsNode(pObj) && Abc_ObjFaninNum(pObj) > 0) || (Abc_ObjIsCi(pObj) && p->pPiDrive)) )
400  continue;
401  if ( 2 * nObjsOld < Abc_NtkObjNumMax(p->pNtk) )
402  {
403  printf( "Buffering could not be completed because the gain value (%d) is too low.\n", p->pPars->GainRatio );
404  break;
405  }
406  // compute load
407  Abc_NtkComputeFanoutInfo( pObj, p->pPars->Slew );
408  Load = Abc_NtkComputeNodeLoad( p, pObj );
409  // consider the gate
410  if ( Abc_ObjIsCi(pObj) )
411  {
412  pCell = p->pPiDrive;
413  Cin = SC_CellPinCapAve( pCell );
414  }
415  else
416  {
417  pCell = Abc_SclObjCell( pObj );
418  Cin = SC_CellPinCapAve( pCell->pAve );
419 // Cin = SC_CellPinCapAve( pCell->pRepr->pNext );
420  }
421  // consider upsizing the gate
422  if ( !p->pPars->fSizeOnly && (Abc_ObjFanoutNum(pObj) > p->pPars->nDegree || Load > GainGate * Cin) )
423  {
424  // add one or more inverters
425 // Abc_NtkPrintFanoutProfile( pObj );
426  Abc_NodeCollectFanouts( pObj, p->vFanouts );
427  Vec_PtrSort( p->vFanouts, (int(*)(void))Bus_SclCompareFanouts );
428  do
429  {
430  Abc_Obj_t * pInv;
431  if ( p->pPars->fVeryVerbose )//|| Vec_PtrSize(p->vFanouts) == Abc_ObjFanoutNum(pObj) )
432  Abc_NtkPrintFanoutProfileVec( pObj, p->vFanouts );
433  pInv = Abc_SclAddOneInv( p, pObj, p->vFanouts, GainInv );
434  if ( p->pPars->fVeryVerbose )
435  Abc_SclOneNodePrint( p, pInv );
436  Bus_SclInsertFanout( p->vFanouts, pInv );
437  Load = Abc_NtkComputeFanoutLoad( p, p->vFanouts );
438  }
439  while ( Vec_PtrSize(p->vFanouts) > p->pPars->nDegree || (Vec_PtrSize(p->vFanouts) > 1 && Load > GainGate * Cin) );
440  // update node fanouts
441  Vec_PtrForEachEntry( Abc_Obj_t *, p->vFanouts, pFanout, k )
442  if ( Abc_ObjFaninNum(pFanout) == 0 )
443  Abc_ObjAddFanin( pFanout, pObj );
444  Bus_SclObjSetLoad( pObj, 0 );
445  LoadNew = Abc_NtkComputeNodeLoad( p, pObj );
446  assert( LoadNew - Load < 1 && Load - LoadNew < 1 );
447  }
448  if ( Abc_ObjIsCi(pObj) )
449  continue;
450  Abc_NtkComputeNodeDeparture( pObj, p->pPars->Slew );
451  // create cell
452  pCellNew = Abc_SclFindSmallestGate( pCell, Load / GainGate );
453  Abc_SclObjSetCell( pObj, pCellNew );
454  if ( p->pPars->fVeryVerbose )
455  Abc_SclOneNodePrint( p, pObj );
456  assert( p->pPars->fSizeOnly || Abc_ObjFanoutNum(pObj) <= p->pPars->nDegree );
457  }
458  // compute departure time of the PI
459  if ( i < 0 ) // finished buffering
460  Abc_NtkForEachCi( p->pNtk, pObj, i )
461  {
462  float DeptCur = Abc_NtkComputeNodeDeparture(pObj, p->pPars->Slew);
463  if ( p->pPiDrive )
464  {
465  float Load = Bus_SclObjLoad( pObj );
466  SC_Pair ArrOut, SlewOut, LoadIn = { Load, Load };
467  Scl_LibHandleInputDriver( p->pPiDrive, &LoadIn, &ArrOut, &SlewOut );
468  DeptCur += 0.5 * ArrOut.fall + 0.5 * ArrOut.rise;
469  }
470  DeptMax = Abc_MaxFloat( DeptMax, DeptCur );
471  }
472  if ( p->pPars->fVerbose )
473  {
474  printf( "WireLoads = %d Degree = %d Target slew =%4d ps Gain2 =%5d Buf = %6d Delay =%7.0f ps ",
475  p->pPars->fUseWireLoads, p->pPars->nDegree, p->pPars->Slew, p->pPars->GainRatio,
476  Abc_NtkObjNumMax(p->pNtk) - nObjsOld, DeptMax );
477  Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
478  }
479 }
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
Definition: abc.h:351
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
Definition: abc.h:284
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
Definition: abc.h:365
static void Abc_SclObjSetCell(Abc_Obj_t *p, SC_Cell *pCell)
Definition: sclSize.h:111
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
Definition: abc.h:364
Abc_Obj_t * Abc_SclAddOneInv(Bus_Man_t *p, Abc_Obj_t *pObj, Vec_Ptr_t *vFanouts, float Gain)
Definition: sclBufSize.c:334
static void Vec_PtrSort(Vec_Ptr_t *p, int(*Vec_PtrSortCompare)()) ___unused
Definition: vecPtr.h:851
float Abc_NtkComputeFanoutLoad(Bus_Man_t *p, Vec_Ptr_t *vFanouts)
Definition: sclBufSize.c:214
static float SC_CellPinCapAve(SC_Cell *p)
Definition: sclLib.h:244
static abctime Abc_Clock()
Definition: abc_global.h:279
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
void Abc_NtkComputeFanoutInfo(Abc_Obj_t *pObj, float Slew)
Definition: sclBufSize.c:190
static float Abc_MaxFloat(float a, float b)
Definition: abc_global.h:243
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
Definition: abcFanio.c:84
static void Abc_PrintTime(int level, const char *pStr, abctime time)
Definition: abc_global.h:367
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
Definition: abc.h:355
float Abc_NtkComputeNodeDeparture(Abc_Obj_t *pObj, float Slew)
Definition: sclBufSize.c:180
void Abc_SclOneNodePrint(Bus_Man_t *p, Abc_Obj_t *pObj)
Definition: sclBufSize.c:323
float rise
Definition: sclLib.h:65
float fall
Definition: sclLib.h:66
if(last==0)
Definition: sparse_int.h:34
SC_Cell * pAve
Definition: sclLib.h:197
SC_Cell * Abc_SclFindSmallestGate(SC_Cell *p, float CinMin)
Definition: sclLibUtil.c:208
void Bus_SclInsertFanout(Vec_Ptr_t *vFanouts, Abc_Obj_t *pObj)
Definition: sclBufSize.c:275
static float Bus_SclObjLoad(Abc_Obj_t *p)
Definition: sclBufSize.c:58
void Abc_NtkPrintFanoutProfileVec(Abc_Obj_t *pObj, Vec_Ptr_t *vFanouts)
Definition: sclBufSize.c:236
#define Abc_NtkForEachCi(pNtk, pCi, i)
Definition: abc.h:515
int Bus_SclCompareFanouts(Abc_Obj_t **pp1, Abc_Obj_t **pp2)
Definition: sclBufSize.c:262
static void Bus_SclObjSetLoad(Abc_Obj_t *p, float cap)
Definition: sclBufSize.c:59
#define assert(ex)
Definition: util_old.h:213
#define Abc_NtkForEachObjReverse(pNtk, pNode, i)
Definition: abc.h:449
ABC_DLL void Abc_NodeCollectFanouts(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
Definition: abcUtil.c:1607
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
ABC_INT64_T abctime
Definition: abc_global.h:278
float Abc_NtkComputeNodeLoad(Bus_Man_t *p, Abc_Obj_t *pObj)
Definition: sclBufSize.c:202
static SC_Cell * Abc_SclObjCell(Abc_Obj_t *p)
Definition: sclSize.h:110
static void Scl_LibHandleInputDriver(SC_Cell *pCell, SC_Pair *pLoadIn, SC_Pair *pArrOut, SC_Pair *pSlewOut)
Definition: sclLib.h:591
void Abc_SclOneNodePrint ( Bus_Man_t p,
Abc_Obj_t pObj 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 323 of file sclBufSize.c.

324 {
325  SC_Cell * pCell = Abc_SclObjCell(pObj);
326  printf( "%s%7d : ", (Abc_ObjFaninNum(pObj) == 0) ? " Inv" : "Node", Abc_ObjId(pObj) );
327  printf( "%d/%2d ", Abc_ObjFaninNum(pObj) ? Abc_ObjFaninNum(pObj) : 1, Abc_ObjFanoutNum(pObj) );
328  printf( "%12s ", pCell->pName );
329  printf( "(%2d/%2d) ", pCell->Order, pCell->nGates );
330  printf( "gain =%5d ", (int)(100.0 * Bus_SclObjLoad(pObj) / SC_CellPinCapAve(pCell)) );
331  printf( "dept =%7.0f ps ", Bus_SclObjDept(pObj) );
332  printf( "\n" );
333 }
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Definition: abc.h:329
int nGates
Definition: sclLib.h:199
int Order
Definition: sclLib.h:198
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
Definition: abc.h:365
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
Definition: abc.h:364
static float SC_CellPinCapAve(SC_Cell *p)
Definition: sclLib.h:244
static float Bus_SclObjDept(Abc_Obj_t *p)
Definition: sclBufSize.c:60
char * pName
Definition: sclLib.h:183
static float Bus_SclObjLoad(Abc_Obj_t *p)
Definition: sclBufSize.c:58
static SC_Cell * Abc_SclObjCell(Abc_Obj_t *p)
Definition: sclSize.h:110
void Bus_ManReadInOutLoads ( Bus_Man_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 133 of file sclBufSize.c.

134 {
135  if ( Abc_FrameReadMaxLoad() )
136  {
137  Abc_Obj_t * pObj; int i;
138  float MaxLoad = Abc_FrameReadMaxLoad();
139  Abc_NtkForEachCo( p->pNtk, pObj, i )
140  Bus_SclObjSetCin( pObj, MaxLoad );
141 // printf( "Default output load is specified (%f ff).\n", MaxLoad );
142  }
144  {
145  int iCell = Abc_SclCellFind( p->pLib, Abc_FrameReadDrivingCell() );
146  if ( iCell == -1 )
147  printf( "Cannot find the default PI driving cell (%s) in the library.\n", Abc_FrameReadDrivingCell() );
148  else
149  {
150 // printf( "Default PI driving cell is specified (%s).\n", Abc_FrameReadDrivingCell() );
151  p->pPiDrive = SC_LibCell( p->pLib, iCell );
152  assert( p->pPiDrive != NULL );
153  assert( p->pPiDrive->n_inputs == 1 );
154 // printf( "Default input driving cell is specified (%s).\n", p->pPiDrive->pName );
155  }
156  }
157 }
ABC_DLL float Abc_FrameReadMaxLoad()
Definition: mainFrame.c:98
static void Bus_SclObjSetCin(Abc_Obj_t *p, float cap)
Definition: sclBufSize.c:55
ABC_DLL char * Abc_FrameReadDrivingCell()
Definition: mainFrame.c:97
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define Abc_NtkForEachCo(pNtk, pCo, i)
Definition: abc.h:519
if(last==0)
Definition: sparse_int.h:34
static SC_Cell * SC_LibCell(SC_Lib *p, int i)
Definition: sclLib.h:240
int Abc_SclCellFind(SC_Lib *p, char *pName)
Definition: sclLibUtil.c:79
#define assert(ex)
Definition: util_old.h:213
Bus_Man_t* Bus_ManStart ( Abc_Ntk_t pNtk,
SC_Lib pLib,
SC_BusPars pPars 
)

FUNCTION DEFINITIONS ///.

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 78 of file sclBufSize.c.

79 {
80  Bus_Man_t * p;
81  p = ABC_CALLOC( Bus_Man_t, 1 );
82  p->pPars = pPars;
83  p->pNtk = pNtk;
84  p->pLib = pLib;
85  p->pInv = Abc_SclFindInvertor(pLib, pPars->fAddBufs)->pRepr->pPrev;//->pAve;
86  if ( pPars->fUseWireLoads )
87  {
88  if ( pNtk->pWLoadUsed == NULL )
89  {
90  p->pWLoadUsed = Abc_SclFindWireLoadModel( pLib, Abc_SclGetTotalArea(pNtk) );
91  if ( p->pWLoadUsed )
92  pNtk->pWLoadUsed = Abc_UtilStrsav( p->pWLoadUsed->pName );
93  }
94  else
95  p->pWLoadUsed = Abc_SclFetchWireLoadModel( pLib, pNtk->pWLoadUsed );
96  }
97  if ( p->pWLoadUsed )
98  p->vWireCaps = Abc_SclFindWireCaps( p->pWLoadUsed, Abc_NtkGetFanoutMax(pNtk) );
99  p->vFanouts = Vec_PtrAlloc( 100 );
100  p->vCins = Vec_FltAlloc( 2*Abc_NtkObjNumMax(pNtk) + 1000 );
101  p->vETimes = Vec_FltAlloc( 2*Abc_NtkObjNumMax(pNtk) + 1000 );
102  p->vLoads = Vec_FltAlloc( 2*Abc_NtkObjNumMax(pNtk) + 1000 );
103  p->vDepts = Vec_FltAlloc( 2*Abc_NtkObjNumMax(pNtk) + 1000 );
104  Vec_FltFill( p->vCins, Abc_NtkObjNumMax(pNtk), 0 );
105  Vec_FltFill( p->vETimes, Abc_NtkObjNumMax(pNtk), 0 );
106  Vec_FltFill( p->vLoads, Abc_NtkObjNumMax(pNtk), 0 );
107  Vec_FltFill( p->vDepts, Abc_NtkObjNumMax(pNtk), 0 );
108  pNtk->pBSMan = p;
109  return p;
110 }
SC_Cell * pRepr
Definition: sclLib.h:196
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
Definition: abc.h:284
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int fAddBufs
Definition: sclLib.h:96
static Vec_Flt_t * Vec_FltAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecFlt.h:78
void * pBSMan
Definition: abc.h:205
typedefABC_NAMESPACE_IMPL_START struct Bus_Man_t_ Bus_Man_t
DECLARATIONS ///.
Definition: sclBufSize.c:32
static void Vec_FltFill(Vec_Flt_t *p, int nSize, float Entry)
Definition: vecFlt.h:450
ABC_NAMESPACE_IMPL_START Vec_Flt_t * Abc_SclFindWireCaps(SC_WireLoad *pWL, int nFanoutMax)
DECLARATIONS ///.
Definition: sclLoad.c:45
static float Abc_SclGetTotalArea(Abc_Ntk_t *pNtk)
Definition: sclSize.h:446
SC_WireLoad * Abc_SclFindWireLoadModel(SC_Lib *p, float Area)
Definition: sclLibUtil.c:247
int fUseWireLoads
Definition: sclLib.h:98
SC_Cell * Abc_SclFindInvertor(SC_Lib *p, int fFindBuff)
Definition: sclLibUtil.c:197
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
SC_WireLoad * Abc_SclFetchWireLoadModel(SC_Lib *p, char *pName)
Definition: sclLibUtil.c:230
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
SC_Cell * pPrev
Definition: sclLib.h:195
ABC_DLL int Abc_NtkGetFanoutMax(Abc_Ntk_t *pNtk)
Definition: abcUtil.c:464
char * Abc_UtilStrsav(char *s)
Definition: starter.c:47
char * pWLoadUsed
Definition: abc.h:209
void Bus_ManStop ( Bus_Man_t p)

Definition at line 111 of file sclBufSize.c.

112 {
113  Vec_PtrFreeP( &p->vFanouts );
114  Vec_FltFreeP( &p->vWireCaps );
115  Vec_FltFreeP( &p->vCins );
116  Vec_FltFreeP( &p->vETimes );
117  Vec_FltFreeP( &p->vLoads );
118  Vec_FltFreeP( &p->vDepts );
119  ABC_FREE( p );
120 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_FltFreeP(Vec_Flt_t **p)
Definition: vecFlt.h:235
#define ABC_FREE(obj)
Definition: abc_global.h:232
static void Vec_PtrFreeP(Vec_Ptr_t **p)
Definition: vecPtr.h:240
void Bus_SclCheckSortedFanout ( Vec_Ptr_t vFanouts)

Definition at line 295 of file sclBufSize.c.

296 {
297  Abc_Obj_t * pObj, * pNext;
298  int i;
299  for ( i = 0; i < Vec_PtrSize(vFanouts) - 1; i++ )
300  {
301  pObj = (Abc_Obj_t *)Vec_PtrEntry(vFanouts, i);
302  pNext = (Abc_Obj_t *)Vec_PtrEntry(vFanouts, i+1);
303  if ( Bus_SclCompareFanouts( &pObj, &pNext ) != -1 )
304  {
305  printf( "Fanouts %d and %d are out of order.\n", i, i+1 );
306  Abc_NtkPrintFanoutProfileVec( NULL, vFanouts );
307  return;
308  }
309  }
310 }
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
void Abc_NtkPrintFanoutProfileVec(Abc_Obj_t *pObj, Vec_Ptr_t *vFanouts)
Definition: sclBufSize.c:236
int Bus_SclCompareFanouts(Abc_Obj_t **pp1, Abc_Obj_t **pp2)
Definition: sclBufSize.c:262
int Bus_SclCompareFanouts ( Abc_Obj_t **  pp1,
Abc_Obj_t **  pp2 
)

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

Synopsis [Compare two fanouts by their departure times.]

Description []

SideEffects []

SeeAlso []

Definition at line 262 of file sclBufSize.c.

263 {
264  float Espilon = 0;//10; // 10 ps
265  if ( Bus_SclObjETime(*pp1) < Bus_SclObjETime(*pp2) - Espilon )
266  return -1;
267  if ( Bus_SclObjETime(*pp1) > Bus_SclObjETime(*pp2) + Espilon )
268  return 1;
269  if ( Bus_SclObjCin(*pp1) > Bus_SclObjCin(*pp2) )
270  return -1;
271  if ( Bus_SclObjCin(*pp1) < Bus_SclObjCin(*pp2) )
272  return 1;
273  return -1;
274 }
static float Bus_SclObjCin(Abc_Obj_t *p)
Definition: sclBufSize.c:54
static float Bus_SclObjETime(Abc_Obj_t *p)
Definition: sclBufSize.c:56
void Bus_SclInsertFanout ( Vec_Ptr_t vFanouts,
Abc_Obj_t pObj 
)

Definition at line 275 of file sclBufSize.c.

276 {
277  Abc_Obj_t * pCur;
278  int i, k;
279  // compact array
280  for ( i = k = 0; i < Vec_PtrSize(vFanouts); i++ )
281  if ( Vec_PtrEntry(vFanouts, i) != NULL )
282  Vec_PtrWriteEntry( vFanouts, k++, Vec_PtrEntry(vFanouts, i) );
283  Vec_PtrShrink( vFanouts, k );
284  // insert new entry
285  Vec_PtrPush( vFanouts, pObj );
286  for ( i = Vec_PtrSize(vFanouts) - 1; i > 0; i-- )
287  {
288  pCur = (Abc_Obj_t *)Vec_PtrEntry(vFanouts, i-1);
289  pObj = (Abc_Obj_t *)Vec_PtrEntry(vFanouts, i);
290  if ( Bus_SclCompareFanouts( &pCur, &pObj ) == -1 )
291  break;
292  ABC_SWAP( void *, Vec_PtrArray(vFanouts)[i-1], Vec_PtrArray(vFanouts)[i] );
293  }
294 }
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
#define ABC_SWAP(Type, a, b)
Definition: abc_global.h:218
static void Vec_PtrWriteEntry(Vec_Ptr_t *p, int i, void *Entry)
Definition: vecPtr.h:396
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
int Bus_SclCompareFanouts(Abc_Obj_t **pp1, Abc_Obj_t **pp2)
Definition: sclBufSize.c:262
static void Vec_PtrShrink(Vec_Ptr_t *p, int nSizeNew)
Definition: vecPtr.h:528
static void ** Vec_PtrArray(Vec_Ptr_t *p)
Definition: vecPtr.h:279
static float Bus_SclObjCin ( Abc_Obj_t p)
inlinestatic

Definition at line 54 of file sclBufSize.c.

54 { return Vec_FltEntry( Bus_SclObjMan(p)->vCins, Abc_ObjId(p) ); }
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Definition: abc.h:329
static Bus_Man_t * Bus_SclObjMan(Abc_Obj_t *p)
Definition: sclBufSize.c:53
static float Vec_FltEntry(Vec_Flt_t *p, int i)
Definition: vecFlt.h:342
static float Bus_SclObjDept ( Abc_Obj_t p)
inlinestatic

Definition at line 60 of file sclBufSize.c.

60 { return Vec_FltEntry( Bus_SclObjMan(p)->vDepts, Abc_ObjId(p) ); }
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Definition: abc.h:329
static Bus_Man_t * Bus_SclObjMan(Abc_Obj_t *p)
Definition: sclBufSize.c:53
static float Vec_FltEntry(Vec_Flt_t *p, int i)
Definition: vecFlt.h:342
static float Bus_SclObjETime ( Abc_Obj_t p)
inlinestatic

Definition at line 56 of file sclBufSize.c.

56 { return Vec_FltEntry( Bus_SclObjMan(p)->vETimes, Abc_ObjId(p) ); }
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Definition: abc.h:329
static Bus_Man_t * Bus_SclObjMan(Abc_Obj_t *p)
Definition: sclBufSize.c:53
static float Vec_FltEntry(Vec_Flt_t *p, int i)
Definition: vecFlt.h:342
static float Bus_SclObjLoad ( Abc_Obj_t p)
inlinestatic

Definition at line 58 of file sclBufSize.c.

58 { return Vec_FltEntry( Bus_SclObjMan(p)->vLoads, Abc_ObjId(p) ); }
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Definition: abc.h:329
static Bus_Man_t * Bus_SclObjMan(Abc_Obj_t *p)
Definition: sclBufSize.c:53
static float Vec_FltEntry(Vec_Flt_t *p, int i)
Definition: vecFlt.h:342
static Bus_Man_t* Bus_SclObjMan ( Abc_Obj_t p)
inlinestatic

Definition at line 53 of file sclBufSize.c.

53 { return (Bus_Man_t *)p->pNtk->pBSMan; }
void * pBSMan
Definition: abc.h:205
typedefABC_NAMESPACE_IMPL_START struct Bus_Man_t_ Bus_Man_t
DECLARATIONS ///.
Definition: sclBufSize.c:32
Abc_Ntk_t * pNtk
Definition: abc.h:130
static void Bus_SclObjSetCin ( Abc_Obj_t p,
float  cap 
)
inlinestatic

Definition at line 55 of file sclBufSize.c.

55 { Vec_FltWriteEntry( Bus_SclObjMan(p)->vCins, Abc_ObjId(p), cap ); }
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Definition: abc.h:329
static void Vec_FltWriteEntry(Vec_Flt_t *p, int i, float Entry)
Definition: vecFlt.h:364
static Bus_Man_t * Bus_SclObjMan(Abc_Obj_t *p)
Definition: sclBufSize.c:53
static void Bus_SclObjSetETime ( Abc_Obj_t p,
float  time 
)
inlinestatic

Definition at line 57 of file sclBufSize.c.

57 { Vec_FltWriteEntry( Bus_SclObjMan(p)->vETimes, Abc_ObjId(p), time ); }
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Definition: abc.h:329
static void Vec_FltWriteEntry(Vec_Flt_t *p, int i, float Entry)
Definition: vecFlt.h:364
static Bus_Man_t * Bus_SclObjMan(Abc_Obj_t *p)
Definition: sclBufSize.c:53
static void Bus_SclObjSetLoad ( Abc_Obj_t p,
float  cap 
)
inlinestatic

Definition at line 59 of file sclBufSize.c.

59 { Vec_FltWriteEntry( Bus_SclObjMan(p)->vLoads, Abc_ObjId(p), cap ); }
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Definition: abc.h:329
static void Vec_FltWriteEntry(Vec_Flt_t *p, int i, float Entry)
Definition: vecFlt.h:364
static Bus_Man_t * Bus_SclObjMan(Abc_Obj_t *p)
Definition: sclBufSize.c:53
static void Bus_SclObjUpdateDept ( Abc_Obj_t p,
float  time 
)
inlinestatic

Definition at line 61 of file sclBufSize.c.

61 { float *q = Vec_FltEntryP( Bus_SclObjMan(p)->vDepts, Abc_ObjId(p) ); if (*q < time) *q = time; }
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Definition: abc.h:329
static float * Vec_FltEntryP(Vec_Flt_t *p, int i)
Definition: vecFlt.h:347
static Bus_Man_t * Bus_SclObjMan(Abc_Obj_t *p)
Definition: sclBufSize.c:53