abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
sclSize.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [sclSize.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Standard-cell library representation.]
8 
9  Synopsis [Timing/gate-sizing manager.]
10 
11  Author [Alan Mishchenko, Niklas Een]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - August 24, 2012.]
16 
17  Revision [$Id: sclSize.h,v 1.0 2012/08/24 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__map__scl__sclSize_h
22 #define ABC__map__scl__sclSize_h
23 
24 
25 ////////////////////////////////////////////////////////////////////////
26 /// INCLUDES ///
27 ////////////////////////////////////////////////////////////////////////
28 
29 #include "base/abc/abc.h"
30 #include "misc/vec/vecQue.h"
31 #include "misc/vec/vecWec.h"
32 #include "sclLib.h"
33 
35 
36 ////////////////////////////////////////////////////////////////////////
37 /// PARAMETERS ///
38 ////////////////////////////////////////////////////////////////////////
39 
40 ////////////////////////////////////////////////////////////////////////
41 /// STRUCTURE DEFINITIONS ///
42 ////////////////////////////////////////////////////////////////////////
43 
44 typedef struct SC_Man_ SC_Man;
45 struct SC_Man_
46 {
47  SC_Lib * pLib; // library
48  Abc_Ntk_t * pNtk; // network
49  int nObjs; // allocated size
50  // get assignment
51  Vec_Int_t * vGatesBest; // best gate sizes found so far
52  Vec_Int_t * vUpdates; // sizing updates in this round
53  Vec_Int_t * vUpdates2; // sizing updates in this round
54  // timing information
55  SC_WireLoad * pWLoadUsed; // name of the used WireLoad model
56  Vec_Flt_t * vWireCaps; // wire capacitances
57  SC_Pair * pLoads; // loads for each gate
58  SC_Pair * pDepts; // departures for each gate
59  SC_Pair * pTimes; // arrivals for each gate
60  SC_Pair * pSlews; // slews for each gate
61  Vec_Flt_t * vInDrive; // maximum input drive strength
62  Vec_Flt_t * vTimesOut; // output arrival times
63  Vec_Que_t * vQue; // outputs by their time
64  SC_Cell * pPiDrive; // cell driving primary inputs
65  // backup information
66  Vec_Flt_t * vLoads2; // backup storage for loads
67  Vec_Flt_t * vLoads3; // backup storage for loads
68  Vec_Flt_t * vTimes2; // backup storage for times
69  Vec_Flt_t * vTimes3; // backup storage for slews
70  // buffer trees
71  float EstLoadMax; // max ratio of Cout/Cin when this kicks in
72  float EstLoadAve; // average load of the gate
73  float EstLinear; // linear coefficient
74  int nEstNodes; // the number of estimations
75  // intermediate data
76  Vec_Que_t * vNodeByGain; // nodes by gain
77  Vec_Flt_t * vNode2Gain; // mapping node into its gain
78  Vec_Int_t * vNode2Gate; // mapping node into its best gate
79  Vec_Int_t * vNodeIter; // the last iteration the node was upsized
80  Vec_Int_t * vBestFans; // best fanouts
81  // incremental timing update
85  // optimization parameters
86  float SumArea; // total area
87  float MaxDelay; // max delay
88  float SumArea0; // total area at the begining
89  float MaxDelay0; // max delay at the begining
90  float BestDelay; // best delay in the middle
91  float ReportDelay; // delay to report
92  // runtime statistics
93  abctime timeTotal; // starting/total time
94  abctime timeCone; // critical path selection
95  abctime timeSize; // incremental sizing
96  abctime timeTime; // timing update
97  abctime timeOther; // everything else
98 };
99 
100 ////////////////////////////////////////////////////////////////////////
101 /// GLOBAL VARIABLES ///
102 ////////////////////////////////////////////////////////////////////////
103 
104 ////////////////////////////////////////////////////////////////////////
105 /// MACRO DEFINITIONS ///
106 ////////////////////////////////////////////////////////////////////////
107 
108 static inline SC_Lib * Abc_SclObjLib( Abc_Obj_t * p ) { return (SC_Lib *)p->pNtk->pSCLib; }
109 static inline int Abc_SclObjCellId( Abc_Obj_t * p ) { return Vec_IntEntry( p->pNtk->vGates, Abc_ObjId(p) ); }
110 static inline SC_Cell * Abc_SclObjCell( Abc_Obj_t * p ) { int c = Abc_SclObjCellId(p); return c == -1 ? NULL:SC_LibCell(Abc_SclObjLib(p), c); }
111 static inline void Abc_SclObjSetCell( Abc_Obj_t * p, SC_Cell * pCell ) { Vec_IntWriteEntry( p->pNtk->vGates, Abc_ObjId(p), pCell->Id ); }
112 
113 static inline SC_Pair * Abc_SclObjLoad( SC_Man * p, Abc_Obj_t * pObj ) { return p->pLoads + Abc_ObjId(pObj); }
114 static inline SC_Pair * Abc_SclObjDept( SC_Man * p, Abc_Obj_t * pObj ) { return p->pDepts + Abc_ObjId(pObj); }
115 static inline SC_Pair * Abc_SclObjTime( SC_Man * p, Abc_Obj_t * pObj ) { return p->pTimes + Abc_ObjId(pObj); }
116 static inline SC_Pair * Abc_SclObjSlew( SC_Man * p, Abc_Obj_t * pObj ) { return p->pSlews + Abc_ObjId(pObj); }
117 
118 static inline double Abc_SclObjLoadMax( SC_Man * p, Abc_Obj_t * pObj ) { return Abc_MaxFloat(Abc_SclObjLoad(p, pObj)->rise, Abc_SclObjLoad(p, pObj)->fall); }
119 static inline float Abc_SclObjLoadAve( SC_Man * p, Abc_Obj_t * pObj ) { return 0.5 * Abc_SclObjLoad(p, pObj)->rise + 0.5 * Abc_SclObjLoad(p, pObj)->fall; }
120 static inline double Abc_SclObjTimeOne( SC_Man * p, Abc_Obj_t * pObj, int fRise ){ return fRise ? Abc_SclObjTime(p, pObj)->rise : Abc_SclObjTime(p, pObj)->fall; }
121 static inline float Abc_SclObjTimeMax( SC_Man * p, Abc_Obj_t * pObj ) { return Abc_MaxFloat(Abc_SclObjTime(p, pObj)->rise, Abc_SclObjTime(p, pObj)->fall); }
122 static inline double Abc_SclObjSlewMax( SC_Man * p, Abc_Obj_t * pObj ) { return Abc_MaxFloat(Abc_SclObjSlew(p, pObj)->rise, Abc_SclObjSlew(p, pObj)->fall); }
123 static inline float Abc_SclObjGetSlackR( SC_Man * p, Abc_Obj_t * pObj, float D ){ return D - (Abc_SclObjTime(p, pObj)->rise + Abc_SclObjDept(p, pObj)->rise); }
124 static inline float Abc_SclObjGetSlackF( SC_Man * p, Abc_Obj_t * pObj, float D ){ return D - (Abc_SclObjTime(p, pObj)->fall + Abc_SclObjDept(p, pObj)->fall); }
125 static inline float Abc_SclObjGetSlack( SC_Man * p, Abc_Obj_t * pObj, float D ) { return D - Abc_MaxFloat(Abc_SclObjTime(p, pObj)->rise + Abc_SclObjDept(p, pObj)->rise, Abc_SclObjTime(p, pObj)->fall + Abc_SclObjDept(p, pObj)->fall); }
126 static inline double Abc_SclObjSlackMax( SC_Man * p, Abc_Obj_t * pObj, float D ) { return Abc_SclObjGetSlack(p, pObj, D); }
127 static inline void Abc_SclObjDupFanin( SC_Man * p, Abc_Obj_t * pObj ) { assert( Abc_ObjIsCo(pObj) ); *Abc_SclObjTime(p, pObj) = *Abc_SclObjTime(p, Abc_ObjFanin0(pObj)); }
128 static inline float Abc_SclObjInDrive( SC_Man * p, Abc_Obj_t * pObj ) { return Vec_FltEntry( p->vInDrive, pObj->iData ); }
129 static inline void Abc_SclObjSetInDrive( SC_Man * p, Abc_Obj_t * pObj, float c){ Vec_FltWriteEntry( p->vInDrive, pObj->iData, c ); }
130 
131 
132 ////////////////////////////////////////////////////////////////////////
133 /// FUNCTION DEFINITIONS ///
134 ////////////////////////////////////////////////////////////////////////
135 
136 /**Function*************************************************************
137 
138  Synopsis [Constructor/destructor of STA manager.]
139 
140  Description []
141 
142  SideEffects []
143 
144  SeeAlso []
145 
146 ***********************************************************************/
147 static inline SC_Man * Abc_SclManAlloc( SC_Lib * pLib, Abc_Ntk_t * pNtk )
148 {
149  SC_Man * p;
150  Abc_Obj_t * pObj;
151  int i;
152  assert( pLib->unit_time == 12 );
153  assert( pLib->unit_cap_snd == 15 );
154  assert( Abc_NtkHasMapping(pNtk) );
155  p = ABC_CALLOC( SC_Man, 1 );
156  p->pLib = pLib;
157  p->pNtk = pNtk;
158  p->nObjs = Abc_NtkObjNumMax(pNtk);
159  p->pLoads = ABC_CALLOC( SC_Pair, p->nObjs );
160  p->pDepts = ABC_CALLOC( SC_Pair, p->nObjs );
161  p->pTimes = ABC_CALLOC( SC_Pair, p->nObjs );
162  p->pSlews = ABC_CALLOC( SC_Pair, p->nObjs );
163  p->vBestFans = Vec_IntStart( p->nObjs );
164  p->vTimesOut = Vec_FltStart( Abc_NtkCoNum(pNtk) );
165  p->vQue = Vec_QueAlloc( Abc_NtkCoNum(pNtk) );
166  Vec_QueSetPriority( p->vQue, Vec_FltArrayP(p->vTimesOut) );
167  for ( i = 0; i < Abc_NtkCoNum(pNtk); i++ )
168  Vec_QuePush( p->vQue, i );
169  p->vUpdates = Vec_IntAlloc( 1000 );
170  p->vUpdates2 = Vec_IntAlloc( 1000 );
171  p->vLoads2 = Vec_FltAlloc( 1000 );
172  p->vLoads3 = Vec_FltAlloc( 1000 );
173  p->vTimes2 = Vec_FltAlloc( 1000 );
174  p->vTimes3 = Vec_FltAlloc( 1000 );
175  // intermediate data
176  p->vNode2Gain = Vec_FltStart( p->nObjs );
177  p->vNode2Gate = Vec_IntStart( p->nObjs );
178  p->vNodeByGain = Vec_QueAlloc( p->nObjs );
179  Vec_QueSetPriority( p->vNodeByGain, Vec_FltArrayP(p->vNode2Gain) );
180  p->vNodeIter = Vec_IntStartFull( p->nObjs );
181  p->vLevels = Vec_WecStart( 2 * Abc_NtkLevel(pNtk) + 1 );
182  p->vChanged = Vec_IntAlloc( 100 );
183  Abc_NtkForEachCo( pNtk, pObj, i )
184  pObj->Level = Abc_ObjFanin0(pObj)->Level + 1;
185  // set CI/CO ids
186  Abc_NtkForEachCi( pNtk, pObj, i )
187  pObj->iData = i;
188  Abc_NtkForEachCo( pNtk, pObj, i )
189  pObj->iData = i;
190  return p;
191 }
192 static inline void Abc_SclManFree( SC_Man * p )
193 {
194  Abc_Obj_t * pObj;
195  int i;
196  // set CI/CO ids
197  Abc_NtkForEachCi( p->pNtk, pObj, i )
198  pObj->iData = 0;
199  Abc_NtkForEachCo( p->pNtk, pObj, i )
200  pObj->iData = 0;
201  // other
202  p->pNtk->pSCLib = NULL;
203  Vec_IntFreeP( &p->pNtk->vGates );
204  Vec_IntFreeP( &p->vNodeIter );
205  Vec_QueFreeP( &p->vNodeByGain );
206  Vec_FltFreeP( &p->vNode2Gain );
207  Vec_IntFreeP( &p->vNode2Gate );
208  // intermediate data
209  Vec_FltFreeP( &p->vLoads2 );
210  Vec_FltFreeP( &p->vLoads3 );
211  Vec_FltFreeP( &p->vTimes2 );
212  Vec_FltFreeP( &p->vTimes3 );
213  Vec_IntFreeP( &p->vUpdates );
214  Vec_IntFreeP( &p->vUpdates2 );
215  Vec_IntFreeP( &p->vGatesBest );
216  Vec_WecFreeP( &p->vLevels );
217  Vec_IntFreeP( &p->vChanged );
218 // Vec_QuePrint( p->vQue );
219  Vec_QueCheck( p->vQue );
220  Vec_QueFreeP( &p->vQue );
221  Vec_FltFreeP( &p->vTimesOut );
222  Vec_IntFreeP( &p->vBestFans );
223  Vec_FltFreeP( &p->vInDrive );
224  Vec_FltFreeP( &p->vWireCaps );
225  ABC_FREE( p->pLoads );
226  ABC_FREE( p->pDepts );
227  ABC_FREE( p->pTimes );
228  ABC_FREE( p->pSlews );
229  ABC_FREE( p );
230 }
231 /*
232 static inline void Abc_SclManCleanTime( SC_Man * p )
233 {
234  Vec_Flt_t * vSlews;
235  Abc_Obj_t * pObj;
236  int i;
237  vSlews = Vec_FltAlloc( 2 * Abc_NtkPiNum(p->pNtk) );
238  Abc_NtkForEachPi( p->pNtk, pObj, i )
239  {
240  SC_Pair * pSlew = Abc_SclObjSlew( p, pObj );
241  Vec_FltPush( vSlews, pSlew->rise );
242  Vec_FltPush( vSlews, pSlew->fall );
243  }
244  memset( p->pDepts, 0, sizeof(SC_Pair) * p->nObjs );
245  memset( p->pTimes, 0, sizeof(SC_Pair) * p->nObjs );
246  memset( p->pSlews, 0, sizeof(SC_Pair) * p->nObjs );
247  Abc_NtkForEachPi( p->pNtk, pObj, i )
248  {
249  SC_Pair * pSlew = Abc_SclObjSlew( p, pObj );
250  pSlew->rise = Vec_FltEntry( vSlews, 2 * i + 0 );
251  pSlew->fall = Vec_FltEntry( vSlews, 2 * i + 1 );
252  }
253  Vec_FltFree( vSlews );
254 }
255 */
256 static inline void Abc_SclManCleanTime( SC_Man * p )
257 {
258  memset( p->pTimes, 0, sizeof(SC_Pair) * p->nObjs );
259  memset( p->pSlews, 0, sizeof(SC_Pair) * p->nObjs );
260  memset( p->pDepts, 0, sizeof(SC_Pair) * p->nObjs );
261 /*
262  if ( p->pPiDrive != NULL )
263  {
264  SC_Pair * pSlew, * pTime, * pLoad;
265  Abc_Obj_t * pObj;
266  int i;
267  Abc_NtkForEachPi( p->pNtk, pObj, i )
268  {
269  pLoad = Abc_SclObjLoad( p, pObj );
270  pTime = Abc_SclObjTime( p, pObj );
271  pSlew = Abc_SclObjSlew( p, pObj );
272  Scl_LibHandleInputDriver( p->pPiDrive, pLoad, pTime, pSlew );
273  }
274  }
275 */
276 }
277 
278 
279 /**Function*************************************************************
280 
281  Synopsis [Stores/retrivies information for the logic cone.]
282 
283  Description []
284 
285  SideEffects []
286 
287  SeeAlso []
288 
289 ***********************************************************************/
290 static inline void Abc_SclLoadStore( SC_Man * p, Abc_Obj_t * pObj )
291 {
292  Abc_Obj_t * pFanin;
293  int i;
294  Vec_FltClear( p->vLoads2 );
295  Abc_ObjForEachFanin( pObj, pFanin, i )
296  {
297  Vec_FltPush( p->vLoads2, Abc_SclObjLoad(p, pFanin)->rise );
298  Vec_FltPush( p->vLoads2, Abc_SclObjLoad(p, pFanin)->fall );
299  }
300 }
301 static inline void Abc_SclLoadRestore( SC_Man * p, Abc_Obj_t * pObj )
302 {
303  Abc_Obj_t * pFanin;
304  int i, k = 0;
305  Abc_ObjForEachFanin( pObj, pFanin, i )
306  {
307  Abc_SclObjLoad(p, pFanin)->rise = Vec_FltEntry(p->vLoads2, k++);
308  Abc_SclObjLoad(p, pFanin)->fall = Vec_FltEntry(p->vLoads2, k++);
309  }
310  assert( Vec_FltSize(p->vLoads2) == k );
311 }
312 
313 static inline void Abc_SclLoadStore3( SC_Man * p, Abc_Obj_t * pObj )
314 {
315  Abc_Obj_t * pFanin;
316  int i;
317  Vec_FltClear( p->vLoads3 );
318  Vec_FltPush( p->vLoads3, Abc_SclObjLoad(p, pObj)->rise );
319  Vec_FltPush( p->vLoads3, Abc_SclObjLoad(p, pObj)->fall );
320  Abc_ObjForEachFanin( pObj, pFanin, i )
321  {
322  Vec_FltPush( p->vLoads3, Abc_SclObjLoad(p, pFanin)->rise );
323  Vec_FltPush( p->vLoads3, Abc_SclObjLoad(p, pFanin)->fall );
324  }
325 }
326 static inline void Abc_SclLoadRestore3( SC_Man * p, Abc_Obj_t * pObj )
327 {
328  Abc_Obj_t * pFanin;
329  int i, k = 0;
330  Abc_SclObjLoad(p, pObj)->rise = Vec_FltEntry(p->vLoads3, k++);
331  Abc_SclObjLoad(p, pObj)->fall = Vec_FltEntry(p->vLoads3, k++);
332  Abc_ObjForEachFanin( pObj, pFanin, i )
333  {
334  Abc_SclObjLoad(p, pFanin)->rise = Vec_FltEntry(p->vLoads3, k++);
335  Abc_SclObjLoad(p, pFanin)->fall = Vec_FltEntry(p->vLoads3, k++);
336  }
337  assert( Vec_FltSize(p->vLoads3) == k );
338 }
339 static inline void Abc_SclConeStore( SC_Man * p, Vec_Int_t * vCone )
340 {
341  Abc_Obj_t * pObj;
342  int i;
343  Vec_FltClear( p->vTimes2 );
344  Abc_NtkForEachObjVec( vCone, p->pNtk, pObj, i )
345  {
346  Vec_FltPush( p->vTimes2, Abc_SclObjTime(p, pObj)->rise );
347  Vec_FltPush( p->vTimes2, Abc_SclObjTime(p, pObj)->fall );
348  Vec_FltPush( p->vTimes2, Abc_SclObjSlew(p, pObj)->rise );
349  Vec_FltPush( p->vTimes2, Abc_SclObjSlew(p, pObj)->fall );
350  }
351 }
352 static inline void Abc_SclConeRestore( SC_Man * p, Vec_Int_t * vCone )
353 {
354  Abc_Obj_t * pObj;
355  int i, k = 0;
356  Abc_NtkForEachObjVec( vCone, p->pNtk, pObj, i )
357  {
358  Abc_SclObjTime(p, pObj)->rise = Vec_FltEntry(p->vTimes2, k++);
359  Abc_SclObjTime(p, pObj)->fall = Vec_FltEntry(p->vTimes2, k++);
360  Abc_SclObjSlew(p, pObj)->rise = Vec_FltEntry(p->vTimes2, k++);
361  Abc_SclObjSlew(p, pObj)->fall = Vec_FltEntry(p->vTimes2, k++);
362  }
363  assert( Vec_FltSize(p->vTimes2) == k );
364 }
365 static inline void Abc_SclEvalStore( SC_Man * p, Vec_Int_t * vCone )
366 {
367  Abc_Obj_t * pObj;
368  int i;
369  Vec_FltClear( p->vTimes3 );
370  Abc_NtkForEachObjVec( vCone, p->pNtk, pObj, i )
371  {
372  Vec_FltPush( p->vTimes3, Abc_SclObjTime(p, pObj)->rise );
373  Vec_FltPush( p->vTimes3, Abc_SclObjTime(p, pObj)->fall );
374  }
375 }
376 static inline float Abc_SclEvalPerform( SC_Man * p, Vec_Int_t * vCone )
377 {
378  Abc_Obj_t * pObj;
379  float Diff, Multi = 1.5, Eval = 0;
380  int i, k = 0;
381  Abc_NtkForEachObjVec( vCone, p->pNtk, pObj, i )
382  {
383  Diff = (Vec_FltEntry(p->vTimes3, k++) - Abc_SclObjTime(p, pObj)->rise);
384  Diff += (Vec_FltEntry(p->vTimes3, k++) - Abc_SclObjTime(p, pObj)->fall);
385  Eval += 0.5 * (Diff > 0 ? Diff : Multi * Diff);
386  }
387  assert( Vec_FltSize(p->vTimes3) == k );
388  return Eval / Vec_IntSize(vCone);
389 }
390 static inline float Abc_SclEvalPerformLegal( SC_Man * p, Vec_Int_t * vCone, float D )
391 {
392  Abc_Obj_t * pObj;
393  float Rise, Fall, Multi = 1.0, Eval = 0;
394  int i, k = 0;
395  Abc_NtkForEachObjVec( vCone, p->pNtk, pObj, i )
396  {
397  Rise = Vec_FltEntry(p->vTimes3, k++) - Abc_SclObjTime(p, pObj)->rise;
398  Fall = Vec_FltEntry(p->vTimes3, k++) - Abc_SclObjTime(p, pObj)->fall;
399  if ( Rise + Multi * Abc_SclObjGetSlackR(p, pObj, D) < 0 || Fall + Multi * Abc_SclObjGetSlackF(p, pObj, D) < 0 )
400  return -1;
401  Eval += 0.5 * Rise + 0.5 * Fall;
402  }
403  assert( Vec_FltSize(p->vTimes3) == k );
404  return Eval / Vec_IntSize(vCone);
405 }
406 static inline void Abc_SclConeClean( SC_Man * p, Vec_Int_t * vCone )
407 {
408  SC_Pair Zero = { 0.0, 0.0 };
409  Abc_Obj_t * pObj;
410  int i;
411  Abc_NtkForEachObjVec( vCone, p->pNtk, pObj, i )
412  {
413  *Abc_SclObjTime(p, pObj) = Zero;
414  *Abc_SclObjSlew(p, pObj) = Zero;
415  }
416 }
417 
418 /**Function*************************************************************
419 
420  Synopsis []
421 
422  Description []
423 
424  SideEffects []
425 
426  SeeAlso []
427 
428 ***********************************************************************/
429 static inline int Abc_SclGetBufInvCount( Abc_Ntk_t * pNtk )
430 {
431  Abc_Obj_t * pObj;
432  int i, Count = 0;
433  Abc_NtkForEachNode( pNtk, pObj, i )
434  Count += (Abc_ObjFaninNum(pObj) == 1);
435  return Count;
436 }
437 static inline float Abc_SclGetAverageSize( Abc_Ntk_t * pNtk )
438 {
439  Abc_Obj_t * pObj;
440  double Total = 0;
441  int i, Count = 0;
442  Abc_NtkForEachNode1( pNtk, pObj, i )
443  Count++, Total += 100.0*Abc_SclObjCell(pObj)->Order/Abc_SclObjCell(pObj)->nGates;
444  return (float)(Total / Count);
445 }
446 static inline float Abc_SclGetTotalArea( Abc_Ntk_t * pNtk )
447 {
448  double Area = 0;
449  Abc_Obj_t * pObj;
450  int i;
451  Abc_NtkForEachNode1( pNtk, pObj, i )
452  Area += Abc_SclObjCell(pObj)->area;
453  return Area;
454 }
455 static inline float Abc_SclGetMaxDelay( SC_Man * p )
456 {
457  float fMaxArr = 0;
458  Abc_Obj_t * pObj;
459  int i;
460  Abc_NtkForEachCo( p->pNtk, pObj, i )
461  fMaxArr = Abc_MaxFloat( fMaxArr, Abc_SclObjTimeMax(p, pObj) );
462  return fMaxArr;
463 }
464 static inline float Abc_SclGetMaxDelayNodeFanins( SC_Man * p, Abc_Obj_t * pNode )
465 {
466  float fMaxArr = 0;
467  Abc_Obj_t * pObj;
468  int i;
469  assert( Abc_ObjIsNode(pNode) );
470  Abc_ObjForEachFanin( pNode, pObj, i )
471  fMaxArr = Abc_MaxFloat( fMaxArr, Abc_SclObjTimeMax(p, pObj) );
472  return fMaxArr;
473 }
474 static inline float Abc_SclReadMaxDelay( SC_Man * p )
475 {
476  return Abc_SclObjTimeMax( p, Abc_NtkCo(p->pNtk, Vec_QueTop(p->vQue)) );
477 }
478 
479 /**Function*************************************************************
480 
481  Synopsis []
482 
483  Description []
484 
485  SideEffects []
486 
487  SeeAlso []
488 
489 ***********************************************************************/
490 static inline SC_Cell * Abc_SclObjResiable( SC_Man * p, Abc_Obj_t * pObj, int fUpsize )
491 {
492  SC_Cell * pOld = Abc_SclObjCell(pObj);
493  if ( fUpsize )
494  return pOld->pNext->Order > pOld->Order ? pOld->pNext : NULL;
495  else
496  return pOld->pPrev->Order < pOld->Order ? pOld->pPrev : NULL;
497 }
498 
499 /**Function*************************************************************
500 
501  Synopsis [Dumps timing results into a file.]
502 
503  Description []
504 
505  SideEffects []
506 
507  SeeAlso []
508 
509 ***********************************************************************/
510 static inline void Abc_SclDumpStats( SC_Man * p, char * pFileName, abctime Time )
511 {
512  static char FileNameOld[1000] = {0};
513  static int nNodesOld, nAreaOld, nDelayOld;
514  static abctime clk = 0;
515  FILE * pTable;
516  pTable = fopen( pFileName, "a+" );
517  if ( strcmp( FileNameOld, p->pNtk->pName ) )
518  {
519  sprintf( FileNameOld, "%s", p->pNtk->pName );
520  fprintf( pTable, "\n" );
521  fprintf( pTable, "%s ", Extra_FileNameWithoutPath(p->pNtk->pName) );
522  fprintf( pTable, "%d ", Abc_NtkPiNum(p->pNtk) );
523  fprintf( pTable, "%d ", Abc_NtkPoNum(p->pNtk) );
524  fprintf( pTable, "%d ", (nNodesOld = Abc_NtkNodeNum(p->pNtk)) );
525  fprintf( pTable, "%d ", (nAreaOld = (int)p->SumArea) );
526  fprintf( pTable, "%d ", (nDelayOld = (int)p->ReportDelay) );
527  clk = Abc_Clock();
528  }
529  else
530  {
531  fprintf( pTable, " " );
532  fprintf( pTable, "%.1f ", 100.0 * Abc_NtkNodeNum(p->pNtk) / nNodesOld );
533  fprintf( pTable, "%.1f ", 100.0 * (int)p->SumArea / nAreaOld );
534  fprintf( pTable, "%.1f ", 100.0 * (int)p->ReportDelay / nDelayOld );
535  fprintf( pTable, "%.2f", 1.0*(Abc_Clock() - clk)/CLOCKS_PER_SEC );
536  }
537  fclose( pTable );
538 }
539 
540 /*=== sclBuffer.c ===============================================================*/
541 extern Abc_Ntk_t * Abc_SclBufferingPerform( Abc_Ntk_t * pNtk, SC_Lib * pLib, SC_BusPars * pPars );
542 /*=== sclBufferOld.c ===============================================================*/
543 extern int Abc_SclIsInv( Abc_Obj_t * pObj );
544 extern void Abc_NodeInvUpdateFanPolarity( Abc_Obj_t * pObj );
545 extern void Abc_NodeInvUpdateObjFanoutPolarity( Abc_Obj_t * pObj, Abc_Obj_t * pFanout );
546 extern void Abc_SclReportDupFanins( Abc_Ntk_t * pNtk );
547 extern Abc_Ntk_t * Abc_SclUnBufferPerform( Abc_Ntk_t * pNtk, int fVerbose );
548 extern Abc_Ntk_t * Abc_SclUnBufferPhase( Abc_Ntk_t * pNtk, int fVerbose );
549 extern Abc_Ntk_t * Abc_SclBufferPhase( Abc_Ntk_t * pNtk, int fVerbose );
550 extern int Abc_SclCheckNtk( Abc_Ntk_t * p, int fVerbose );
551 extern Abc_Ntk_t * Abc_SclPerformBuffering( Abc_Ntk_t * p, int DegreeR, int Degree, int fUseInvs, int fVerbose );
552 extern Abc_Ntk_t * Abc_SclBufPerform( Abc_Ntk_t * pNtk, int FanMin, int FanMax, int fBufPis, int fSkipDup, int fVerbose );
553 /*=== sclDnsize.c ===============================================================*/
554 extern void Abc_SclDnsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars );
555 /*=== sclLoad.c ===============================================================*/
556 extern Vec_Flt_t * Abc_SclFindWireCaps( SC_WireLoad * pWL, int nFanoutMax );
557 extern float Abc_SclFindWireLoad( Vec_Flt_t * vWireCaps, int nFans );
558 extern void Abc_SclAddWireLoad( SC_Man * p, Abc_Obj_t * pObj, int fSubtr );
559 extern void Abc_SclComputeLoad( SC_Man * p );
560 extern void Abc_SclUpdateLoad( SC_Man * p, Abc_Obj_t * pObj, SC_Cell * pOld, SC_Cell * pNew );
561 extern void Abc_SclUpdateLoadSplit( SC_Man * p, Abc_Obj_t * pBuffer, Abc_Obj_t * pFanout );
562 /*=== sclSize.c ===============================================================*/
563 extern Abc_Obj_t * Abc_SclFindCriticalCo( SC_Man * p, int * pfRise );
564 extern Abc_Obj_t * Abc_SclFindMostCriticalFanin( SC_Man * p, int * pfRise, Abc_Obj_t * pNode );
565 extern void Abc_SclTimeNtkPrint( SC_Man * p, int fShowAll, int fPrintPath );
566 extern SC_Man * Abc_SclManStart( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fUseWireLoads, int fDept, float DUser, int nTreeCRatio );
567 extern void Abc_SclTimeCone( SC_Man * p, Vec_Int_t * vCone );
568 extern void Abc_SclTimeNtkRecompute( SC_Man * p, float * pArea, float * pDelay, int fReverse, float DUser );
569 extern int Abc_SclTimeIncUpdate( SC_Man * p );
570 extern void Abc_SclTimeIncInsert( SC_Man * p, Abc_Obj_t * pObj );
571 extern void Abc_SclTimeIncUpdateLevel( Abc_Obj_t * pObj );
572 extern void Abc_SclTimePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int nTreeCRatio, int fUseWireLoads, int fShowAll, int fPrintPath, int fDumpStats );
573 extern void Abc_SclPrintBuffers( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fVerbose );
574 /*=== sclUpsize.c ===============================================================*/
575 extern int Abc_SclCountNearCriticalNodes( SC_Man * p );
576 extern void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars );
577 /*=== sclUtil.c ===============================================================*/
578 extern void Abc_SclMioGates2SclGates( SC_Lib * pLib, Abc_Ntk_t * p );
579 extern void Abc_SclSclGates2MioGates( SC_Lib * pLib, Abc_Ntk_t * p );
580 extern void Abc_SclPrintGateSizes( SC_Lib * pLib, Abc_Ntk_t * p );
581 extern void Abc_SclMinsizePerform( SC_Lib * pLib, Abc_Ntk_t * p, int fUseMax, int fVerbose );
582 extern int Abc_SclCountMinSize( SC_Lib * pLib, Abc_Ntk_t * p, int fUseMax );
583 extern Vec_Int_t * Abc_SclExtractBarBufs( Abc_Ntk_t * pNtk );
584 extern void Abc_SclInsertBarBufs( Abc_Ntk_t * pNtk, Vec_Int_t * vBufs );
585 
586 
588 
589 #endif
590 
591 ////////////////////////////////////////////////////////////////////////
592 /// END OF FILE ///
593 ////////////////////////////////////////////////////////////////////////
int unit_time
Definition: sclLib.h:209
char * memset()
int Abc_SclCountNearCriticalNodes(SC_Man *p)
Definition: sclUpsize.c:187
#define Abc_NtkForEachNode1(pNtk, pNode, i)
Definition: abc.h:467
static unsigned Abc_ObjId(Abc_Obj_t *pObj)
Definition: abc.h:329
int nObjs
Definition: sclSize.h:49
static float Abc_SclGetMaxDelay(SC_Man *p)
Definition: sclSize.h:455
static float Abc_SclReadMaxDelay(SC_Man *p)
Definition: sclSize.h:474
static SC_Pair * Abc_SclObjDept(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:114
static SC_Lib * Abc_SclObjLib(Abc_Obj_t *p)
GLOBAL VARIABLES ///.
Definition: sclSize.h:108
Vec_Flt_t * vTimes3
Definition: sclSize.h:69
void Abc_SclMinsizePerform(SC_Lib *pLib, Abc_Ntk_t *p, int fUseMax, int fVerbose)
Definition: sclUtil.c:185
Vec_Flt_t * vTimes2
Definition: sclSize.h:68
char * Extra_FileNameWithoutPath(char *FileName)
int Abc_SclTimeIncUpdate(SC_Man *p)
Definition: sclSize.c:540
Vec_Int_t * vUpdates
Definition: sclSize.h:52
int nGates
Definition: sclLib.h:199
static float Abc_SclObjGetSlack(SC_Man *p, Abc_Obj_t *pObj, float D)
Definition: sclSize.h:125
void Abc_SclDnsizePerform(SC_Lib *pLib, Abc_Ntk_t *pNtk, SC_SizePars *pPars)
Definition: sclDnsize.c:242
static void Abc_SclLoadStore3(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:313
Abc_Obj_t * Abc_SclFindCriticalCo(SC_Man *p, int *pfRise)
DECLARATIONS ///.
Definition: sclSize.c:52
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
Definition: vecWec.h:42
void * pSCLib
Definition: abc.h:206
void Abc_SclAddWireLoad(SC_Man *p, Abc_Obj_t *pObj, int fSubtr)
Definition: sclLoad.c:100
static SC_Man * Abc_SclManAlloc(SC_Lib *pLib, Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition: sclSize.h:147
void Abc_SclTimePerform(SC_Lib *pLib, Abc_Ntk_t *pNtk, int nTreeCRatio, int fUseWireLoads, int fShowAll, int fPrintPath, int fDumpStats)
Definition: sclSize.c:671
SC_Cell * pPiDrive
Definition: sclSize.h:64
Abc_Ntk_t * Abc_SclBufferPhase(Abc_Ntk_t *pNtk, int fVerbose)
Definition: sclBuffer.c:198
static void Abc_SclConeStore(SC_Man *p, Vec_Int_t *vCone)
Definition: sclSize.h:339
static SC_Pair * Abc_SclObjLoad(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:113
static void Vec_FltWriteEntry(Vec_Flt_t *p, int i, float Entry)
Definition: vecFlt.h:364
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
Definition: abc.h:284
int iData
Definition: abc.h:146
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Abc_NodeInvUpdateFanPolarity(Abc_Obj_t *pObj)
Definition: sclBuffer.c:320
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
Vec_Que_t * vNodeByGain
Definition: sclSize.h:76
static void Vec_QueCheck(Vec_Que_t *p)
Definition: vecQue.h:289
SC_Pair * pTimes
Definition: sclSize.h:59
int Order
Definition: sclLib.h:198
void Abc_SclUpsizePerform(SC_Lib *pLib, Abc_Ntk_t *pNtk, SC_SizePars *pPars)
Definition: sclUpsize.c:868
static void Abc_SclConeRestore(SC_Man *p, Vec_Int_t *vCone)
Definition: sclSize.h:352
Vec_Int_t * vChanged
Definition: sclSize.h:83
float EstLoadAve
Definition: sclSize.h:72
static Vec_Wec_t * Vec_WecStart(int nSize)
Definition: vecWec.h:98
float MaxDelay0
Definition: sclSize.h:89
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
static int Abc_NtkHasMapping(Abc_Ntk_t *pNtk)
Definition: abc.h:256
SC_WireLoad * pWLoadUsed
Definition: sclSize.h:55
static void Abc_SclObjSetInDrive(SC_Man *p, Abc_Obj_t *pObj, float c)
Definition: sclSize.h:129
int Abc_SclIsInv(Abc_Obj_t *pObj)
Definition: sclBuffer.c:116
Vec_Int_t * vGates
Definition: abc.h:207
typedefABC_NAMESPACE_HEADER_START struct Vec_Que_t_ Vec_Que_t
INCLUDES ///.
Definition: vecQue.h:40
SC_Pair * pDepts
Definition: sclSize.h:58
Vec_Int_t * vNode2Gate
Definition: sclSize.h:78
static Vec_Flt_t * Vec_FltAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecFlt.h:78
static int Vec_QueTop(Vec_Que_t *p)
Definition: vecQue.h:139
static double Abc_SclObjTimeOne(SC_Man *p, Abc_Obj_t *pObj, int fRise)
Definition: sclSize.h:120
#define Abc_NtkForEachCo(pNtk, pCo, i)
Definition: abc.h:519
void Abc_SclPrintGateSizes(SC_Lib *pLib, Abc_Ntk_t *p)
Definition: sclUtil.c:137
Vec_Flt_t * vLoads3
Definition: sclSize.h:67
float Abc_SclFindWireLoad(Vec_Flt_t *vWireCaps, int nFans)
Definition: sclLoad.c:94
abctime timeCone
Definition: sclSize.h:94
abctime timeTime
Definition: sclSize.h:96
typedefABC_NAMESPACE_HEADER_START struct SC_Man_ SC_Man
INCLUDES ///.
Definition: sclSize.h:44
SC_Man * Abc_SclManStart(SC_Lib *pLib, Abc_Ntk_t *pNtk, int fUseWireLoads, int fDept, float DUser, int nTreeCRatio)
Definition: sclSize.c:633
static abctime Abc_Clock()
Definition: abc_global.h:279
static Vec_Int_t * Vec_IntStartFull(int nSize)
Definition: vecInt.h:119
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
Definition: abc.h:373
static void Vec_FltFreeP(Vec_Flt_t **p)
Definition: vecFlt.h:235
static float Abc_MaxFloat(float a, float b)
Definition: abc_global.h:243
SC_Pair * pLoads
Definition: sclSize.h:57
static int Abc_NtkCoNum(Abc_Ntk_t *pNtk)
Definition: abc.h:288
int Abc_SclCheckNtk(Abc_Ntk_t *p, int fVerbose)
Definition: sclBuffer.c:286
static void Vec_FltPush(Vec_Flt_t *p, float Entry)
Definition: vecFlt.h:528
static int Abc_SclGetBufInvCount(Abc_Ntk_t *pNtk)
Definition: sclSize.h:429
float ReportDelay
Definition: sclSize.h:91
void Abc_SclTimeCone(SC_Man *p, Vec_Int_t *vCone)
Definition: sclSize.c:383
unsigned Level
Definition: abc.h:142
static int Abc_ObjIsCo(Abc_Obj_t *pObj)
Definition: abc.h:352
static float Abc_SclObjInDrive(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:128
Vec_Int_t * vGatesBest
Definition: sclSize.h:51
static void Abc_SclLoadStore(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:290
static Abc_Obj_t * Abc_NtkCo(Abc_Ntk_t *pNtk, int i)
Definition: abc.h:318
Vec_Int_t * vNodeIter
Definition: sclSize.h:79
int nObjs
Definition: abc.h:172
static int Abc_SclObjCellId(Abc_Obj_t *p)
Definition: sclSize.h:109
int strcmp()
static Vec_Flt_t * Vec_FltStart(int nSize)
Definition: vecFlt.h:101
Vec_Flt_t * vWireCaps
Definition: sclSize.h:56
Vec_Flt_t * vTimesOut
Definition: sclSize.h:62
static void Vec_FltClear(Vec_Flt_t *p)
Definition: vecFlt.h:512
float BestDelay
Definition: sclSize.h:90
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
static void Abc_SclLoadRestore(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:301
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
Definition: abc.h:355
static void Vec_QueFreeP(Vec_Que_t **p)
Definition: vecQue.h:89
static float Abc_SclGetTotalArea(Abc_Ntk_t *pNtk)
Definition: sclSize.h:446
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
Definition: abc.h:293
static void Abc_SclManFree(SC_Man *p)
Definition: sclSize.h:192
static Vec_Int_t * Vec_IntStart(int nSize)
Definition: bblif.c:172
static SC_Pair * Abc_SclObjTime(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:115
Vec_Flt_t * vNode2Gain
Definition: sclSize.h:77
void Abc_SclMioGates2SclGates(SC_Lib *pLib, Abc_Ntk_t *p)
DECLARATIONS ///.
Definition: sclUtil.c:47
static void Abc_SclConeClean(SC_Man *p, Vec_Int_t *vCone)
Definition: sclSize.h:406
void Abc_SclUpdateLoadSplit(SC_Man *p, Abc_Obj_t *pBuffer, Abc_Obj_t *pFanout)
Definition: sclLoad.c:212
static void Abc_SclDumpStats(SC_Man *p, char *pFileName, abctime Time)
Definition: sclSize.h:510
float area
Definition: sclLib.h:188
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
int unit_cap_snd
Definition: sclLib.h:211
float rise
Definition: sclLib.h:65
#define Abc_NtkForEachObjVec(vIds, pNtk, pObj, i)
Definition: abc.h:452
void Abc_SclTimeNtkPrint(SC_Man *p, int fShowAll, int fPrintPath)
Definition: sclSize.c:136
static double Abc_SclObjSlewMax(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:122
Vec_Flt_t * vInDrive
Definition: sclSize.h:61
Vec_Wec_t * vLevels
Definition: sclSize.h:82
float fall
Definition: sclLib.h:66
abctime timeSize
Definition: sclSize.h:95
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
void Abc_SclTimeNtkRecompute(SC_Man *p, float *pArea, float *pDelay, int fReverse, float DUser)
Definition: sclSize.c:400
Abc_Ntk_t * pNtk
Definition: sclSize.h:48
int nIncUpdates
Definition: sclSize.h:84
Abc_Ntk_t * Abc_SclUnBufferPhase(Abc_Ntk_t *pNtk, int fVerbose)
Definition: sclBuffer.c:239
int Id
Definition: sclLib.h:184
char * sprintf()
float MaxDelay
Definition: sclSize.h:87
void Abc_SclTimeIncInsert(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.c:562
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
float SumArea
Definition: sclSize.h:86
Vec_Int_t * Abc_SclExtractBarBufs(Abc_Ntk_t *pNtk)
Definition: sclUtil.c:267
static float Abc_SclObjGetSlackR(SC_Man *p, Abc_Obj_t *pObj, float D)
Definition: sclSize.h:123
Abc_Ntk_t * Abc_SclBufferingPerform(Abc_Ntk_t *pNtk, SC_Lib *pLib, SC_BusPars *pPars)
Definition: sclBufSize.c:480
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
static SC_Cell * SC_LibCell(SC_Lib *p, int i)
Definition: sclLib.h:240
void Abc_SclSclGates2MioGates(SC_Lib *pLib, Abc_Ntk_t *p)
Definition: sclUtil.c:73
Abc_Obj_t * Abc_SclFindMostCriticalFanin(SC_Man *p, int *pfRise, Abc_Obj_t *pNode)
Definition: sclSize.c:84
Vec_Flt_t * Abc_SclFindWireCaps(SC_WireLoad *pWL, int nFanoutMax)
DECLARATIONS ///.
Definition: sclLoad.c:45
static void Abc_SclEvalStore(SC_Man *p, Vec_Int_t *vCone)
Definition: sclSize.h:365
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
void Abc_SclTimeIncUpdateLevel(Abc_Obj_t *pObj)
Definition: sclSize.c:576
#define Abc_NtkForEachNode(pNtk, pNode, i)
Definition: abc.h:461
static double Abc_SclObjSlackMax(SC_Man *p, Abc_Obj_t *pObj, float D)
Definition: sclSize.h:126
Abc_Ntk_t * Abc_SclUnBufferPerform(Abc_Ntk_t *pNtk, int fVerbose)
Definition: sclBuffer.c:129
static SC_Pair * Abc_SclObjSlew(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:116
void Abc_SclPrintBuffers(SC_Lib *pLib, Abc_Ntk_t *pNtk, int fVerbose)
Definition: sclSize.c:876
Vec_Que_t * vQue
Definition: sclSize.h:63
Abc_Ntk_t * pNtk
Definition: abc.h:130
static float Abc_SclObjLoadAve(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:119
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
#define Abc_NtkForEachCi(pNtk, pCi, i)
Definition: abc.h:515
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
Definition: abc.h:286
static void Abc_SclLoadRestore3(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:326
static float ** Vec_FltArrayP(Vec_Flt_t *p)
Definition: vecFlt.h:278
static float Abc_SclEvalPerform(SC_Man *p, Vec_Int_t *vCone)
Definition: sclSize.h:376
static float Abc_SclObjGetSlackF(SC_Man *p, Abc_Obj_t *pObj, float D)
Definition: sclSize.h:124
#define Abc_ObjForEachFanin(pObj, pFanin, i)
Definition: abc.h:524
SC_Lib * pLib
Definition: sclSize.h:47
#define ABC_FREE(obj)
Definition: abc_global.h:232
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
Definition: abc.h:285
SC_Pair * pSlews
Definition: sclSize.h:60
float EstLoadMax
Definition: sclSize.h:71
int nEstNodes
Definition: sclSize.h:74
static float Abc_SclGetMaxDelayNodeFanins(SC_Man *p, Abc_Obj_t *pNode)
Definition: sclSize.h:464
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
static void Abc_SclObjDupFanin(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:127
typedefABC_NAMESPACE_HEADER_START struct Vec_Flt_t_ Vec_Flt_t
INCLUDES ///.
Definition: vecFlt.h:42
Abc_Ntk_t * Abc_SclPerformBuffering(Abc_Ntk_t *p, int DegreeR, int Degree, int fUseInvs, int fVerbose)
Definition: sclBuffer.c:457
abctime timeOther
Definition: sclSize.h:97
static void Vec_WecFreeP(Vec_Wec_t **p)
Definition: vecWec.h:350
#define assert(ex)
Definition: util_old.h:213
SC_Cell * pPrev
Definition: sclLib.h:195
Vec_Int_t * vBestFans
Definition: sclSize.h:80
void Abc_SclReportDupFanins(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition: sclBuffer.c:90
static float Vec_FltEntry(Vec_Flt_t *p, int i)
Definition: vecFlt.h:342
static float Abc_SclObjTimeMax(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:121
static float Abc_SclGetAverageSize(Abc_Ntk_t *pNtk)
Definition: sclSize.h:437
void Abc_SclUpdateLoad(SC_Man *p, Abc_Obj_t *pObj, SC_Cell *pOld, SC_Cell *pNew)
Definition: sclLoad.c:199
static SC_Cell * Abc_SclObjResiable(SC_Man *p, Abc_Obj_t *pObj, int fUpsize)
Definition: sclSize.h:490
float EstLinear
Definition: sclSize.h:73
Vec_Int_t * vUpdates2
Definition: sclSize.h:53
ABC_INT64_T abctime
Definition: abc_global.h:278
static int Vec_FltSize(Vec_Flt_t *p)
Definition: vecFlt.h:294
Vec_Flt_t * vLoads2
Definition: sclSize.h:66
ABC_DLL int Abc_NtkLevel(Abc_Ntk_t *pNtk)
Definition: abcDfs.c:1265
SC_Cell * pNext
Definition: sclLib.h:194
static Vec_Que_t * Vec_QueAlloc(int nCap)
MACRO DEFINITIONS ///.
Definition: vecQue.h:71
static float Abc_SclEvalPerformLegal(SC_Man *p, Vec_Int_t *vCone, float D)
Definition: sclSize.h:390
void Abc_SclInsertBarBufs(Abc_Ntk_t *pNtk, Vec_Int_t *vBufs)
Definition: sclUtil.c:287
static void Vec_QuePush(Vec_Que_t *p, int v)
Definition: vecQue.h:221
static void Abc_SclManCleanTime(SC_Man *p)
Definition: sclSize.h:256
void Abc_NodeInvUpdateObjFanoutPolarity(Abc_Obj_t *pObj, Abc_Obj_t *pFanout)
Definition: sclBuffer.c:334
Abc_Ntk_t * Abc_SclBufPerform(Abc_Ntk_t *pNtk, int FanMin, int FanMax, int fBufPis, int fSkipDup, int fVerbose)
Definition: sclBuffer.c:984
float SumArea0
Definition: sclSize.h:88
static void Vec_QueSetPriority(Vec_Que_t *p, float **pCosts)
Definition: vecQue.h:95
int Abc_SclCountMinSize(SC_Lib *pLib, Abc_Ntk_t *p, int fUseMax)
Definition: sclUtil.c:203
void Abc_SclComputeLoad(SC_Man *p)
Definition: sclLoad.c:106
abctime timeTotal
Definition: sclSize.h:93
static double Abc_SclObjLoadMax(SC_Man *p, Abc_Obj_t *pObj)
Definition: sclSize.h:118
static SC_Cell * Abc_SclObjCell(Abc_Obj_t *p)
Definition: sclSize.h:110