ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
sclBufSize.c
Go to the documentation of this file.
1
20
21#include "sclSize.h"
22#include "map/mio/mio.h"
23#include "base/main/main.h"
24
26
27
31
32typedef struct Bus_Man_t_ Bus_Man_t;
34{
35 // user data
36 SC_BusPars * pPars; // parameters
37 Abc_Ntk_t * pNtk; // user's network
38 SC_Cell * pPiDrive; // PI driver
39 // library
40 SC_Lib * pLib; // cell library
41 SC_Cell * pInv; // base interter (largest/average/???)
42 SC_WireLoad * pWLoadUsed; // name of the used WireLoad model
43 Vec_Flt_t * vWireCaps; // estimated wire loads
44 // internal
45 Vec_Flt_t * vCins; // input cap for fanouts
46 Vec_Flt_t * vETimes; // fanout edge departures
47 Vec_Flt_t * vLoads; // loads for all nodes
48 Vec_Flt_t * vDepts; // departure times
49 Vec_Ptr_t * vFanouts; // fanout array
50};
51
52
53static inline Bus_Man_t * Bus_SclObjMan( Abc_Obj_t * p ) { return (Bus_Man_t *)p->pNtk->pBSMan; }
54static inline float Bus_SclObjCin( Abc_Obj_t * p ) { return Vec_FltEntry( Bus_SclObjMan(p)->vCins, Abc_ObjId(p) ); }
55static inline void Bus_SclObjSetCin( Abc_Obj_t * p, float cap ) { Vec_FltWriteEntry( Bus_SclObjMan(p)->vCins, Abc_ObjId(p), cap ); }
56static inline float Bus_SclObjETime( Abc_Obj_t * p ) { return Vec_FltEntry( Bus_SclObjMan(p)->vETimes, Abc_ObjId(p) ); }
57static inline void Bus_SclObjSetETime( Abc_Obj_t * p, float time ) { Vec_FltWriteEntry( Bus_SclObjMan(p)->vETimes, Abc_ObjId(p), time ); }
58static inline float Bus_SclObjLoad( Abc_Obj_t * p ) { return Vec_FltEntry( Bus_SclObjMan(p)->vLoads, Abc_ObjId(p) ); }
59static inline void Bus_SclObjSetLoad( Abc_Obj_t * p, float cap ) { Vec_FltWriteEntry( Bus_SclObjMan(p)->vLoads, Abc_ObjId(p), cap ); }
60static inline float Bus_SclObjDept( Abc_Obj_t * p ) { return Vec_FltEntry( Bus_SclObjMan(p)->vDepts, Abc_ObjId(p) ); }
61static inline void Bus_SclObjUpdateDept( Abc_Obj_t * p, float time ) { float *q = Vec_FltEntryP( Bus_SclObjMan(p)->vDepts, Abc_ObjId(p) ); if (*q < time) *q = time; }
62
66
78Bus_Man_t * Bus_ManStart( Abc_Ntk_t * pNtk, SC_Lib * pLib, SC_BusPars * pPars )
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}
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}
121
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}
158
170static inline float Abc_NtkComputeEdgeDept( Abc_Obj_t * pFanout, int iFanin, float Slew )
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 assert( Edge > 0 );
176 return Dept + Edge;
177}
178float Abc_NtkComputeNodeDeparture( Abc_Obj_t * pObj, float Slew )
179{
180 Abc_Obj_t * pFanout;
181 int i;
182 assert( Bus_SclObjDept(pObj) == 0 );
183 Abc_ObjForEachFanout( pObj, pFanout, i )
184 {
185 if ( Abc_ObjIsBarBuf(pFanout) )
186 Bus_SclObjUpdateDept( pObj, Bus_SclObjDept(pFanout) );
187 else if ( !Abc_ObjIsCo(pFanout) ) // add required times here
188 Bus_SclObjUpdateDept( pObj, Abc_NtkComputeEdgeDept(pFanout, Abc_NodeFindFanin(pFanout, pObj), Slew) );
189 }
190 return Bus_SclObjDept( pObj );
191}
192void Abc_NtkComputeFanoutInfo( Abc_Obj_t * pObj, float Slew )
193{
194 Abc_Obj_t * pFanout;
195 int i;
196 Abc_ObjForEachFanout( pObj, pFanout, i )
197 {
198 if ( Abc_ObjIsBarBuf(pFanout) )
199 {
200 Bus_SclObjSetETime( pFanout, Bus_SclObjDept(pFanout) );
201 Bus_SclObjSetCin( pFanout, Bus_SclObjLoad(pFanout) );
202 }
203 else if ( !Abc_ObjIsCo(pFanout) )
204 {
205 int iFanin = Abc_NodeFindFanin(pFanout, pObj);
206 Bus_SclObjSetETime( pFanout, Abc_NtkComputeEdgeDept(pFanout, iFanin, Slew) );
207 Bus_SclObjSetCin( pFanout, SC_CellPinCap( Abc_SclObjCell(pFanout), iFanin ) );
208 }
209 }
210}
212{
213 Abc_Obj_t * pFanout;
214 float Load;
215 int i;
216 assert( Bus_SclObjLoad(pObj) == 0 );
217 Load = Abc_SclFindWireLoad( p->vWireCaps, Abc_ObjFanoutNum(pObj) );
218 Abc_ObjForEachFanout( pObj, pFanout, i )
219 Load += Bus_SclObjCin( pFanout );
220 Bus_SclObjSetLoad( pObj, Load );
221 return Load;
222}
224{
225 Abc_Obj_t * pFanout;
226 float Load;
227 int i;
228 Load = Abc_SclFindWireLoad( p->vWireCaps, Vec_PtrSize(vFanouts) );
229 Vec_PtrForEachEntry( Abc_Obj_t *, vFanouts, pFanout, i )
230 Load += Bus_SclObjCin( pFanout );
231 return Load;
232}
234{
235 Abc_Obj_t * pFanout;
236 int i;
237 printf( "Obj %6d fanouts (%d):\n", Abc_ObjId(pObj), Abc_ObjFanoutNum(pObj) );
238 Abc_ObjForEachFanout( pObj, pFanout, i )
239 {
240 printf( "%3d : time = %7.2f ps load = %7.2f ff ", i, Bus_SclObjETime(pFanout), Bus_SclObjCin(pFanout) );
241 printf( "%s\n", Abc_ObjFaninPhase( pFanout, Abc_NodeFindFanin(pFanout, pObj) ) ? "*" : " " );
242 }
243 printf( "\n" );
244}
246{
247 Abc_Obj_t * pFanout;
248 int i;
249 printf( "Fanout profile (%d):\n", Vec_PtrSize(vFanouts) );
250 Vec_PtrForEachEntry( Abc_Obj_t *, vFanouts, pFanout, i )
251 {
252 printf( "%3d : time = %7.2f ps load = %7.2f ff ", i, Bus_SclObjETime(pFanout), Bus_SclObjCin(pFanout) );
253 if ( pObj->pNtk->vPhases )
254 printf( "%s", (pObj && Abc_ObjFanoutNum(pObj) == Vec_PtrSize(vFanouts) && Abc_ObjFaninPhase( pFanout, Abc_NodeFindFanin(pFanout, pObj) )) ? "*" : " " );
255 printf( "\n" );
256 }
257 printf( "\n" );
258}
259
272{
273 float Espilon = 0;//10; // 10 ps
274 if ( Bus_SclObjETime(*pp1) < Bus_SclObjETime(*pp2) - Espilon )
275 return -1;
276 if ( Bus_SclObjETime(*pp1) > Bus_SclObjETime(*pp2) + Espilon )
277 return 1;
278 if ( Bus_SclObjCin(*pp1) > Bus_SclObjCin(*pp2) )
279 return -1;
280 if ( Bus_SclObjCin(*pp1) < Bus_SclObjCin(*pp2) )
281 return 1;
282 return -1;
283}
284void Bus_SclInsertFanout( Vec_Ptr_t * vFanouts, Abc_Obj_t * pObj )
285{
286 Abc_Obj_t * pCur;
287 int i, k;
288 // compact array
289 for ( i = k = 0; i < Vec_PtrSize(vFanouts); i++ )
290 if ( Vec_PtrEntry(vFanouts, i) != NULL )
291 Vec_PtrWriteEntry( vFanouts, k++, Vec_PtrEntry(vFanouts, i) );
292 Vec_PtrShrink( vFanouts, k );
293 // insert new entry
294 Vec_PtrPush( vFanouts, pObj );
295 for ( i = Vec_PtrSize(vFanouts) - 1; i > 0; i-- )
296 {
297 pCur = (Abc_Obj_t *)Vec_PtrEntry(vFanouts, i-1);
298 pObj = (Abc_Obj_t *)Vec_PtrEntry(vFanouts, i);
299 if ( Bus_SclCompareFanouts( &pCur, &pObj ) == -1 )
300 break;
301 ABC_SWAP( void *, Vec_PtrArray(vFanouts)[i-1], Vec_PtrArray(vFanouts)[i] );
302 }
303}
305{
306 Abc_Obj_t * pObj, * pNext;
307 int i;
308 for ( i = 0; i < Vec_PtrSize(vFanouts) - 1; i++ )
309 {
310 pObj = (Abc_Obj_t *)Vec_PtrEntry(vFanouts, i);
311 pNext = (Abc_Obj_t *)Vec_PtrEntry(vFanouts, i+1);
312 if ( Bus_SclCompareFanouts( &pObj, &pNext ) != -1 )
313 {
314 printf( "Fanouts %d and %d are out of order.\n", i, i+1 );
315 Abc_NtkPrintFanoutProfileVec( NULL, vFanouts );
316 return;
317 }
318 }
319}
320
333{
334 SC_Cell * pCell = Abc_SclObjCell(pObj);
335 printf( "%s%7d : ", (Abc_ObjFaninNum(pObj) == 0) ? " Inv" : "Node", Abc_ObjId(pObj) );
336 printf( "%d/%2d ", Abc_ObjFaninNum(pObj) ? Abc_ObjFaninNum(pObj) : 1, Abc_ObjFanoutNum(pObj) );
337 printf( "%12s ", pCell->pName );
338 printf( "(%2d/%2d) ", pCell->Order, pCell->nGates );
339 printf( "gain =%5d ", (int)(100.0 * Bus_SclObjLoad(pObj) / SC_CellPinCapAve(pCell)) );
340 printf( "dept =%7.0f ps ", Bus_SclObjDept(pObj) );
341 printf( "\n" );
342}
343Abc_Obj_t * Abc_SclAddOneInv( Bus_Man_t * p, Abc_Obj_t * pObj, Vec_Ptr_t * vFanouts, float Gain )
344{
345 SC_Cell * pCellNew;
346 Abc_Obj_t * pFanout, * pInv;
347 float Target = SC_CellPinCap(p->pInv, 0) * Gain;
348 float LoadWirePrev, LoadWireThis, Load = 0;
349 int Limit = Abc_MinInt( p->pPars->nDegree, Vec_PtrSize(vFanouts) );
350 int i, iStop;
351 Bus_SclCheckSortedFanout( vFanouts );
352 Vec_PtrForEachEntryStop( Abc_Obj_t *, vFanouts, pFanout, iStop, Limit )
353 {
354 LoadWirePrev = Abc_SclFindWireLoad( p->vWireCaps, iStop );
355 LoadWireThis = Abc_SclFindWireLoad( p->vWireCaps, iStop+1 );
356 Load += Bus_SclObjCin( pFanout ) - LoadWirePrev + LoadWireThis;
357 if ( Load > Target )
358 {
359 iStop++;
360 break;
361 }
362 }
363 // create inverter
364 if ( p->pPars->fAddBufs )
365 pInv = Abc_NtkCreateNodeBuf( p->pNtk, NULL );
366 else
367 pInv = Abc_NtkCreateNodeInv( p->pNtk, NULL );
368 assert( (int)Abc_ObjId(pInv) == Vec_FltSize(p->vCins) );
369 Vec_FltPush( p->vCins, 0 );
370 Vec_FltPush( p->vETimes, 0 );
371 Vec_FltPush( p->vLoads, 0 );
372 Vec_FltPush( p->vDepts, 0 );
373 Limit = Abc_MinInt( Abc_MaxInt(iStop, 2), Vec_PtrSize(vFanouts) );
374 Vec_PtrForEachEntryStop( Abc_Obj_t *, vFanouts, pFanout, i, Limit )
375 {
376 Vec_PtrWriteEntry( vFanouts, i, NULL );
377 if ( Abc_ObjFaninNum(pFanout) == 0 )
378 Abc_ObjAddFanin( pFanout, pInv );
379 else
380 Abc_ObjPatchFanin( pFanout, pObj, pInv );
381 }
382 // set the gate
383 pCellNew = Abc_SclFindSmallestGate( p->pInv, Load / Gain );
384 Vec_IntSetEntry( p->pNtk->vGates, Abc_ObjId(pInv), pCellNew->Id );
385 // set departure and load
386 Abc_NtkComputeNodeDeparture( pInv, p->pPars->Slew );
387 Abc_NtkComputeNodeLoad( p, pInv );
388 // set fanout info for the inverter
389 Bus_SclObjSetCin( pInv, SC_CellPinCap(pCellNew, 0) );
390 Bus_SclObjSetETime( pInv, Abc_NtkComputeEdgeDept(pInv, 0, p->pPars->Slew) );
391 // update phases
392 if ( p->pNtk->vPhases && Abc_SclIsInv(pInv) )
394 return pInv;
395}
396void Abc_SclBufSize( Bus_Man_t * p, float Gain )
397{
398 SC_Cell * pCell, * pCellNew;
399 Abc_Obj_t * pObj, * pFanout;
400 abctime clk = Abc_Clock();
401 int i, k, nObjsOld = Abc_NtkObjNumMax(p->pNtk);
402 float GainGate, GainInv, Load, Cin, DeptMax = 0;
403 GainGate = p->pPars->fAddBufs ? (float)pow( (double)Gain, (double)2.0 ) : Gain;
404 GainInv = p->pPars->fAddBufs ? (float)pow( (double)Gain, (double)2.0 ) : Gain;
405 Abc_NtkForEachObjReverse( p->pNtk, pObj, i )
406 {
407 if ( !((Abc_ObjIsNode(pObj) && Abc_ObjFaninNum(pObj) > 0) || (Abc_ObjIsCi(pObj) && p->pPiDrive)) )
408 continue;
409 if ( 2 * nObjsOld < Abc_NtkObjNumMax(p->pNtk) )
410 {
411 printf( "Buffering could not be completed because the gain value (%d) is too low.\n", p->pPars->GainRatio );
412 break;
413 }
414 // compute load
415 Abc_NtkComputeFanoutInfo( pObj, p->pPars->Slew );
416 Load = Abc_NtkComputeNodeLoad( p, pObj );
417 // consider the gate
418 if ( Abc_ObjIsCi(pObj) || Abc_ObjIsBarBuf(pObj) )
419 {
420 pCell = p->pPiDrive;
421 // if PI driver is not given, assume Cin to be equal to Load
422 // this way, buffering of the PIs is performed
423 Cin = pCell ? SC_CellPinCapAve(pCell) : Load;
424 }
425 else
426 {
427 pCell = Abc_SclObjCell( pObj );
428 Cin = SC_CellPinCapAve( pCell->pAve );
429// Cin = SC_CellPinCapAve( pCell->pRepr->pNext );
430 }
431 // consider buffering this gate
432 if ( !p->pPars->fSizeOnly && (Abc_ObjFanoutNum(pObj) > p->pPars->nDegree || Load > GainGate * Cin) )
433 {
434 // add one or more inverters
435// Abc_NtkPrintFanoutProfile( pObj );
436 Abc_NodeCollectFanouts( pObj, p->vFanouts );
437 Vec_PtrSort( p->vFanouts, (int(*)(const void *, const void *))Bus_SclCompareFanouts );
438 do
439 {
440 Abc_Obj_t * pInv;
441 if ( p->pPars->fVeryVerbose )//|| Vec_PtrSize(p->vFanouts) == Abc_ObjFanoutNum(pObj) )
442 Abc_NtkPrintFanoutProfileVec( pObj, p->vFanouts );
443 pInv = Abc_SclAddOneInv( p, pObj, p->vFanouts, GainInv );
444 if ( p->pPars->fVeryVerbose )
445 Abc_SclOneNodePrint( p, pInv );
446 Bus_SclInsertFanout( p->vFanouts, pInv );
447 Load = Abc_NtkComputeFanoutLoad( p, p->vFanouts );
448 }
449 while ( Vec_PtrSize(p->vFanouts) > p->pPars->nDegree || (Vec_PtrSize(p->vFanouts) > 1 && Load > GainGate * Cin) );
450 // update node fanouts
451 Vec_PtrForEachEntry( Abc_Obj_t *, p->vFanouts, pFanout, k )
452 if ( Abc_ObjFaninNum(pFanout) == 0 )
453 Abc_ObjAddFanin( pFanout, pObj );
454 Bus_SclObjSetLoad( pObj, 0 );
455 Abc_NtkComputeNodeLoad( p, pObj );
456 }
457 if ( Abc_ObjIsCi(pObj) )
458 continue;
459 Abc_NtkComputeNodeDeparture( pObj, p->pPars->Slew );
460 if ( Abc_ObjIsBarBuf(pObj) )
461 continue;
462 // create cell
463 pCellNew = Abc_SclFindSmallestGate( pCell, Load / GainGate );
464 Abc_SclObjSetCell( pObj, pCellNew );
465 if ( p->pPars->fVeryVerbose )
466 Abc_SclOneNodePrint( p, pObj );
467 assert( p->pPars->fSizeOnly || Abc_ObjFanoutNum(pObj) <= p->pPars->nDegree );
468 }
469 // compute departure time of the PI
470 if ( i < 0 ) // finished buffering
471 Abc_NtkForEachCi( p->pNtk, pObj, i )
472 {
473 float DeptCur = Abc_NtkComputeNodeDeparture(pObj, p->pPars->Slew);
474 if ( p->pPiDrive )
475 {
476 float Load = Bus_SclObjLoad( pObj );
477 SC_Pair ArrOut, SlewOut, LoadIn = { Load, Load };
478 Scl_LibHandleInputDriver( p->pPiDrive, &LoadIn, &ArrOut, &SlewOut );
479 DeptCur += 0.5 * ArrOut.fall + 0.5 * ArrOut.rise;
480 }
481 DeptMax = Abc_MaxFloat( DeptMax, DeptCur );
482 }
483 if ( p->pPars->fVerbose )
484 {
485 printf( "WireLoads = %d Degree = %d Target slew =%4d ps Gain2 =%5d Buf = %6d Delay =%7.0f ps ",
486 p->pPars->fUseWireLoads, p->pPars->nDegree, p->pPars->Slew, p->pPars->GainRatio,
487 Abc_NtkObjNumMax(p->pNtk) - nObjsOld, DeptMax );
488 Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
489 }
490}
492{
493 Abc_Ntk_t * pNtkNew;
494 Bus_Man_t * p;
495 if ( !Abc_SclCheckNtk( pNtk, 0 ) )
496 return NULL;
498 Abc_SclMioGates2SclGates( pLib, pNtk );
499 p = Bus_ManStart( pNtk, pLib, pPars );
501 Abc_SclBufSize( p, 0.01 * pPars->GainRatio );
502 Bus_ManStop( p );
503 Abc_SclSclGates2MioGates( pLib, pNtk );
504 if ( pNtk->vPhases )
505 Vec_IntFillExtra( pNtk->vPhases, Abc_NtkObjNumMax(pNtk), 0 );
506 pNtkNew = Abc_NtkDupDfs( pNtk );
507 return pNtkNew;
508}
509
513
514
516
ABC_DLL Abc_Ntk_t * Abc_NtkDupDfs(Abc_Ntk_t *pNtk)
Definition abcNtk.c:538
struct Abc_Obj_t_ Abc_Obj_t
Definition abc.h:116
#define Abc_NtkForEachCo(pNtk, pCo, i)
Definition abc.h:522
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
Definition abcFanio.c:84
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeBuf(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
Definition abcObj.c:706
#define Abc_ObjForEachFanout(pObj, pFanout, i)
Definition abc.h:529
ABC_DLL void Abc_NodeCollectFanouts(Abc_Obj_t *pNode, Vec_Ptr_t *vNodes)
Definition abcUtil.c:1647
struct Abc_Ntk_t_ Abc_Ntk_t
Definition abc.h:115
#define Abc_NtkForEachObjReverse(pNtk, pNode, i)
Definition abc.h:452
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeInv(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
Definition abcObj.c:674
#define Abc_NtkForEachCi(pNtk, pCi, i)
Definition abc.h:518
ABC_DLL void Abc_ObjPatchFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFaninOld, Abc_Obj_t *pFaninNew)
Definition abcFanio.c:172
ABC_DLL int Abc_NtkGetFanoutMax(Abc_Ntk_t *pNtk)
Definition abcUtil.c:497
ABC_DLL int Abc_NodeFindFanin(Abc_Obj_t *pNode, Abc_Obj_t *pFanin)
Definition abcUtil.c:791
#define ABC_SWAP(Type, a, b)
Definition abc_global.h:253
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
#define ABC_FREE(obj)
Definition abc_global.h:267
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_DLL float Abc_FrameReadMaxLoad()
Definition mainFrame.c:117
ABC_DLL char * Abc_FrameReadDrivingCell()
Definition mainFrame.c:116
Cube * p
Definition exorList.c:222
void Bus_SclCheckSortedFanout(Vec_Ptr_t *vFanouts)
Definition sclBufSize.c:304
Abc_Ntk_t * Abc_SclBufferingPerform(Abc_Ntk_t *pNtk, SC_Lib *pLib, SC_BusPars *pPars)
Definition sclBufSize.c:491
void Bus_ManStop(Bus_Man_t *p)
Definition sclBufSize.c:111
typedefABC_NAMESPACE_IMPL_START struct Bus_Man_t_ Bus_Man_t
DECLARATIONS ///.
Definition sclBufSize.c:32
int Bus_SclCompareFanouts(Abc_Obj_t **pp1, Abc_Obj_t **pp2)
Definition sclBufSize.c:271
void Abc_NtkPrintFanoutProfileVec(Abc_Obj_t *pObj, Vec_Ptr_t *vFanouts)
Definition sclBufSize.c:245
void Abc_NtkComputeFanoutInfo(Abc_Obj_t *pObj, float Slew)
Definition sclBufSize.c:192
void Bus_SclInsertFanout(Vec_Ptr_t *vFanouts, Abc_Obj_t *pObj)
Definition sclBufSize.c:284
Abc_Obj_t * Abc_SclAddOneInv(Bus_Man_t *p, Abc_Obj_t *pObj, Vec_Ptr_t *vFanouts, float Gain)
Definition sclBufSize.c:343
Bus_Man_t * Bus_ManStart(Abc_Ntk_t *pNtk, SC_Lib *pLib, SC_BusPars *pPars)
FUNCTION DEFINITIONS ///.
Definition sclBufSize.c:78
void Bus_ManReadInOutLoads(Bus_Man_t *p)
Definition sclBufSize.c:133
float Abc_NtkComputeNodeDeparture(Abc_Obj_t *pObj, float Slew)
Definition sclBufSize.c:178
float Abc_NtkComputeNodeLoad(Bus_Man_t *p, Abc_Obj_t *pObj)
Definition sclBufSize.c:211
float Abc_NtkComputeFanoutLoad(Bus_Man_t *p, Vec_Ptr_t *vFanouts)
Definition sclBufSize.c:223
void Abc_SclOneNodePrint(Bus_Man_t *p, Abc_Obj_t *pObj)
Definition sclBufSize.c:332
void Abc_NtkPrintFanoutProfile(Abc_Obj_t *pObj)
Definition sclBufSize.c:233
void Abc_SclBufSize(Bus_Man_t *p, float Gain)
Definition sclBufSize.c:396
void Abc_NodeInvUpdateFanPolarity(Abc_Obj_t *pObj)
Definition sclBuffer.c:322
int Abc_SclIsInv(Abc_Obj_t *pObj)
Definition sclBuffer.c:116
int Abc_SclCheckNtk(Abc_Ntk_t *p, int fVerbose)
Definition sclBuffer.c:286
void Abc_SclReportDupFanins(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition sclBuffer.c:90
SC_WireLoad * Abc_SclFetchWireLoadModel(SC_Lib *p, char *pName)
Definition sclLibUtil.c:365
struct SC_Lib_ SC_Lib
Definition sclLib.h:128
struct SC_Pair_ SC_Pair
Definition sclLib.h:69
SC_WireLoad * Abc_SclFindWireLoadModel(SC_Lib *p, float Area)
Definition sclLibUtil.c:382
struct SC_BusPars_ SC_BusPars
Definition sclLib.h:102
SC_Cell * Abc_SclFindInvertor(SC_Lib *p, int fFindBuff)
Definition sclLibUtil.c:332
SC_Cell * Abc_SclFindSmallestGate(SC_Cell *p, float CinMin)
Definition sclLibUtil.c:343
struct SC_WireLoad_ SC_WireLoad
STRUCTURE DEFINITIONS ///.
Definition sclLib.h:120
struct SC_Cell_ SC_Cell
Definition sclLib.h:127
int Abc_SclCellFind(SC_Lib *p, char *pName)
Definition sclLibUtil.c:81
float Abc_SclFindWireLoad(Vec_Flt_t *vWireCaps, int nFans)
Definition sclLoad.c:96
ABC_NAMESPACE_IMPL_START Vec_Flt_t * Abc_SclFindWireCaps(SC_WireLoad *pWL, int nFanoutMax)
DECLARATIONS ///.
Definition sclLoad.c:45
void Abc_SclSclGates2MioGates(SC_Lib *pLib, Abc_Ntk_t *p)
Definition sclUtil.c:70
void Abc_SclMioGates2SclGates(SC_Lib *pLib, Abc_Ntk_t *p)
DECLARATIONS ///.
Definition sclUtil.c:47
char * pWLoadUsed
Definition abc.h:209
Vec_Int_t * vPhases
Definition abc.h:208
void * pBSMan
Definition abc.h:205
Abc_Ntk_t * pNtk
Definition abc.h:130
Vec_Ptr_t * vFanouts
Definition sclBufSize.c:49
Abc_Ntk_t * pNtk
Definition sclBufSize.c:37
SC_Lib * pLib
Definition sclBufSize.c:40
SC_WireLoad * pWLoadUsed
Definition sclBufSize.c:42
Vec_Flt_t * vCins
Definition sclBufSize.c:45
SC_Cell * pInv
Definition sclBufSize.c:41
Vec_Flt_t * vWireCaps
Definition sclBufSize.c:43
SC_BusPars * pPars
Definition sclBufSize.c:36
Vec_Flt_t * vDepts
Definition sclBufSize.c:48
SC_Cell * pPiDrive
Definition sclBufSize.c:38
Vec_Flt_t * vLoads
Definition sclBufSize.c:47
Vec_Flt_t * vETimes
Definition sclBufSize.c:46
int fUseWireLoads
Definition sclLib.h:111
int fAddBufs
Definition sclLib.h:109
int GainRatio
Definition sclLib.h:105
SC_Cell * pAve
Definition sclLib.h:218
char * pName
Definition sclLib.h:202
SC_Cell * pPrev
Definition sclLib.h:216
int Id
Definition sclLib.h:203
int nGates
Definition sclLib.h:220
SC_Cell * pRepr
Definition sclLib.h:217
int Order
Definition sclLib.h:219
float fall
Definition sclLib.h:73
float rise
Definition sclLib.h:72
#define assert(ex)
Definition util_old.h:213
typedefABC_NAMESPACE_HEADER_START struct Vec_Flt_t_ Vec_Flt_t
INCLUDES ///.
Definition vecFlt.h:42
#define Vec_PtrForEachEntryStop(Type, vVec, pEntry, i, Stop)
Definition vecPtr.h:59
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55