abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
abcBarBuf.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [abcHie.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Network and node package.]
8 
9  Synopsis [Procedures to handle hierarchy.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: abcHie.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "abc.h"
22 
24 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 #define ABC_OBJ_VOID ((Abc_Obj_t *)(ABC_PTRINT_T)1)
31 
32 ////////////////////////////////////////////////////////////////////////
33 /// FUNCTION DEFINITIONS ///
34 ////////////////////////////////////////////////////////////////////////
35 
36 /**Function*************************************************************
37 
38  Synopsis [Checks the the hie design has no duplicated networks.]
39 
40  Description []
41 
42  SideEffects []
43 
44  SeeAlso []
45 
46 ***********************************************************************/
48 {
49  Abc_Ntk_t * pTemp, * pModel;
50  Abc_Obj_t * pBox;
51  int i, k, RetValue = 1;
52  if ( pNtk->pDesign == NULL )
53  return 1;
54  Vec_PtrForEachEntry( Abc_Ntk_t *, pNtk->pDesign->vModules, pTemp, i )
55  pTemp->fHieVisited = 0;
56  Vec_PtrForEachEntry( Abc_Ntk_t *, pNtk->pDesign->vModules, pTemp, i )
57  Abc_NtkForEachBox( pTemp, pBox, k )
58  {
59  pModel = (Abc_Ntk_t *)pBox->pData;
60  if ( pModel == NULL )
61  continue;
62  if ( Abc_NtkLatchNum(pModel) > 0 )
63  {
64  printf( "Network \"%s\" contains %d flops.\n",
65  Abc_NtkName(pNtk), Abc_NtkLatchNum(pModel) );
66  RetValue = 0;
67  }
68  if ( pModel->fHieVisited )
69  {
70  printf( "Network \"%s\" contains box \"%s\" whose model \"%s\" is instantiated more than once.\n",
71  Abc_NtkName(pNtk), Abc_ObjName(pBox), Abc_NtkName(pModel) );
72  RetValue = 0;
73  }
74  pModel->fHieVisited = 1;
75  }
76  Vec_PtrForEachEntry( Abc_Ntk_t *, pNtk->pDesign->vModules, pTemp, i )
77  pTemp->fHieVisited = 0;
78  return RetValue;
79 }
80 
81 /**Function*************************************************************
82 
83  Synopsis [Collect PIs and POs of internal networks in the topo order.]
84 
85  Description []
86 
87  SideEffects []
88 
89  SeeAlso []
90 
91 ***********************************************************************/
92 int Abc_NtkCollectPiPos_rec( Abc_Obj_t * pNet, Vec_Ptr_t * vLiMaps, Vec_Ptr_t * vLoMaps )
93 {
94  extern int Abc_NtkCollectPiPos_int( Abc_Obj_t * pBox, Abc_Ntk_t * pNtk, Vec_Ptr_t * vLiMaps, Vec_Ptr_t * vLoMaps );
95  Abc_Obj_t * pObj, * pFanin;
96  int i, Counter = 0;
97  assert( Abc_ObjIsNet(pNet) );
98  if ( Abc_NodeIsTravIdCurrent( pNet ) )
99  return 0;
100  Abc_NodeSetTravIdCurrent( pNet );
101  pObj = Abc_ObjFanin0(pNet);
102  if ( Abc_ObjIsNode(pObj) )
103  Abc_ObjForEachFanin( pObj, pFanin, i )
104  Counter += Abc_NtkCollectPiPos_rec( pFanin, vLiMaps, vLoMaps );
105  if ( Abc_ObjIsNode(pObj) )
106  return Counter;
107  if ( Abc_ObjIsBo(pObj) )
108  pObj = Abc_ObjFanin0(pObj);
109  assert( Abc_ObjIsBox(pObj) );
110  Abc_ObjForEachFanout( pObj, pFanin, i )
112  Abc_ObjForEachFanin( pObj, pFanin, i )
113  Counter += Abc_NtkCollectPiPos_rec( Abc_ObjFanin0(pFanin), vLiMaps, vLoMaps );
114  Counter += Abc_NtkCollectPiPos_int( pObj, Abc_ObjModel(pObj), vLiMaps, vLoMaps );
115  return Counter;
116 }
117 int Abc_NtkCollectPiPos_int( Abc_Obj_t * pBox, Abc_Ntk_t * pNtk, Vec_Ptr_t * vLiMaps, Vec_Ptr_t * vLoMaps )
118 {
119  Abc_Obj_t * pObj;
120  int i, Counter = 0;
121  // mark primary inputs
122  Abc_NtkIncrementTravId( pNtk );
123  Abc_NtkForEachPi( pNtk, pObj, i )
125  // add primary inputs
126  if ( pBox )
127  {
128  Abc_ObjForEachFanin( pBox, pObj, i )
129  Vec_PtrPush( vLiMaps, pObj );
130  Abc_NtkForEachPi( pNtk, pObj, i )
131  Vec_PtrPush( vLoMaps, pObj );
132  }
133  // visit primary outputs
134  Abc_NtkForEachPo( pNtk, pObj, i )
135  Counter += Abc_NtkCollectPiPos_rec( Abc_ObjFanin0(pObj), vLiMaps, vLoMaps );
136  // add primary outputs
137  if ( pBox )
138  {
139  Abc_NtkForEachPo( pNtk, pObj, i )
140  Vec_PtrPush( vLiMaps, pObj );
141  Abc_ObjForEachFanout( pBox, pObj, i )
142  Vec_PtrPush( vLoMaps, pObj );
143  Counter++;
144  }
145  return Counter;
146 }
147 int Abc_NtkCollectPiPos( Abc_Ntk_t * pNtk, Vec_Ptr_t ** pvLiMaps, Vec_Ptr_t ** pvLoMaps )
148 {
149  assert( Abc_NtkIsNetlist(pNtk) );
150  *pvLiMaps = Vec_PtrAlloc( 1000 );
151  *pvLoMaps = Vec_PtrAlloc( 1000 );
152  return Abc_NtkCollectPiPos_int( NULL, pNtk, *pvLiMaps, *pvLoMaps );
153 }
154 
155 /**Function*************************************************************
156 
157  Synopsis [Derives logic network with barbufs from the netlist.]
158 
159  Description []
160 
161  SideEffects []
162 
163  SeeAlso []
164 
165 ***********************************************************************/
167 {
168  Abc_Obj_t * pObj, * pFanin;
169  int i;
170  assert( Abc_ObjIsNet(pNet) );
171  if ( pNet->pCopy )
172  return pNet->pCopy;
173  pObj = Abc_ObjFanin0(pNet);
174  assert( Abc_ObjIsNode(pObj) );
175  pNet->pCopy = Abc_NtkDupObj( pNtkNew, pObj, 0 );
176  Abc_ObjForEachFanin( pObj, pFanin, i )
177  Abc_ObjAddFanin( pObj->pCopy, Abc_NtkToBarBufs_rec(pNtkNew, pFanin) );
178  return pNet->pCopy;
179 }
181 {
182  char Buffer[1000];
183  Vec_Ptr_t * vLiMaps, * vLoMaps;
184  Abc_Ntk_t * pNtkNew, * pTemp;
185  Abc_Obj_t * pLatch, * pObjLi, * pObjLo;
186  Abc_Obj_t * pObj, * pLiMap, * pLoMap;
187  int i, k, nBoxes;
188  assert( Abc_NtkIsNetlist(pNtk) );
189  if ( !Abc_NtkCheckSingleInstance(pNtk) )
190  return NULL;
191  assert( pNtk->pDesign != NULL );
192  // start the network
193  pNtkNew = Abc_NtkAlloc( ABC_NTK_LOGIC, pNtk->ntkFunc, 1 );
194  pNtkNew->pName = Extra_UtilStrsav(pNtk->pName);
195  pNtkNew->pSpec = Extra_UtilStrsav(pNtk->pSpec);
196  // clone CIs/CIs/boxes
197  Abc_NtkCleanCopy_rec( pNtk );
198  Abc_NtkForEachPi( pNtk, pObj, i )
199  Abc_ObjFanout0(pObj)->pCopy = Abc_NtkDupObj( pNtkNew, pObj, 1 );
200  Abc_NtkForEachPo( pNtk, pObj, i )
201  Abc_NtkDupObj( pNtkNew, pObj, 1 );
202  // create latches and transfer copy labels
203  nBoxes = Abc_NtkCollectPiPos( pNtk, &vLiMaps, &vLoMaps );
204  Vec_PtrForEachEntryTwo( Abc_Obj_t *, vLiMaps, Abc_Obj_t *, vLoMaps, pLiMap, pLoMap, i )
205  {
206  pObjLi = Abc_NtkCreateBi(pNtkNew);
207  pLatch = Abc_NtkCreateLatch(pNtkNew);
208  pObjLo = Abc_NtkCreateBo(pNtkNew);
209  Abc_ObjAddFanin( pLatch, pObjLi );
210  Abc_ObjAddFanin( pObjLo, pLatch );
211  pLatch->pData = (void *)ABC_INIT_ZERO;
212  pTemp = NULL;
213  if ( Abc_ObjFanin0(pLiMap)->pNtk != pNtk )
214  pTemp = Abc_ObjFanin0(pLiMap)->pNtk;
215  else if ( Abc_ObjFanout0(pLoMap)->pNtk != pNtk )
216  pTemp = Abc_ObjFanout0(pLoMap)->pNtk;
217  else assert( 0 );
218  sprintf( Buffer, "_%s_in", Abc_NtkName(pTemp) );
219  Abc_ObjAssignName( pObjLi, Abc_ObjName(Abc_ObjFanin0(pLiMap)), Buffer );
220  sprintf( Buffer, "_%s_out", Abc_NtkName(pTemp) );
221  Abc_ObjAssignName( pObjLo, Abc_ObjName(Abc_ObjFanout0(pLoMap)), Buffer );
222  pLiMap->pCopy = pObjLi;
223  Abc_ObjFanout0(pLoMap)->pCopy = pObjLo;
224  assert( Abc_ObjIsNet(Abc_ObjFanout0(pLoMap)) );
225  }
226  Vec_PtrFree( vLiMaps );
227  Vec_PtrFree( vLoMaps );
228  // rebuild networks
229  Vec_PtrForEachEntry( Abc_Ntk_t *, pNtk->pDesign->vModules, pTemp, i )
230  Abc_NtkForEachCo( pTemp, pObj, k )
231  Abc_ObjAddFanin( pObj->pCopy, Abc_NtkToBarBufs_rec(pNtkNew, Abc_ObjFanin0(pObj)) );
232  pNtkNew->nBarBufs = Abc_NtkLatchNum(pNtkNew);
233  printf( "Hierarchy reader flattened %d instances of logic boxes and introduced %d barbufs.\n", nBoxes, pNtkNew->nBarBufs );
234  return pNtkNew;
235 }
236 
237 /**Function*************************************************************
238 
239  Synopsis [Converts the logic with barbufs into a hierarchical network.]
240 
241  Description [The base network is the original hierarchical network. The
242  second argument is the optimized network with barbufs. This procedure
243  reconstructs the original hierarcical network which adding logic from
244  the optimized network. It is assumed that the PIs/POs of the original
245  network one-to-one mapping with the flops of the optimized network.]
246 
247  SideEffects []
248 
249  SeeAlso []
250 
251 ***********************************************************************/
253 {
254  Abc_Obj_t * pFanin;
255  int i;
256  if ( pObj->pCopy )
257  return pObj->pCopy;
258  Abc_NtkDupObj( pNtkNew, pObj, 0 );
259  Abc_ObjForEachFanin( pObj, pFanin, i )
260  Abc_ObjAddFanin( pObj->pCopy, Abc_NtkFromBarBufs_rec(pNtkNew, pFanin) );
261  return pObj->pCopy;
262 }
264 {
265  Abc_Ntk_t * pNtkNew, * pTemp;
266  Vec_Ptr_t * vLiMaps, * vLoMaps;
267  Abc_Obj_t * pObj, * pLiMap, * pLoMap;
268  int i, k;
269  assert( pNtkBase->pDesign != NULL );
270  assert( Abc_NtkIsNetlist(pNtk) );
271  assert( Abc_NtkIsNetlist(pNtkBase) );
272  assert( Abc_NtkLatchNum(pNtkBase) == 0 );
273  assert( Abc_NtkLatchNum(pNtk) == pNtk->nBarBufs );
274  assert( Abc_NtkWhiteboxNum(pNtk) == 0 );
275  assert( Abc_NtkBlackboxNum(pNtk) == 0 );
276  assert( Abc_NtkPiNum(pNtk) == Abc_NtkPiNum(pNtkBase) );
277  assert( Abc_NtkPoNum(pNtk) == Abc_NtkPoNum(pNtkBase) );
278  // start networks
279  Abc_NtkCleanCopy_rec( pNtkBase );
280  Vec_PtrForEachEntry( Abc_Ntk_t *, pNtkBase->pDesign->vModules, pTemp, i )
281  pTemp->pCopy = Abc_NtkStartFrom( pTemp, pNtk->ntkType, pNtk->ntkFunc );
282  Vec_PtrForEachEntry( Abc_Ntk_t *, pNtkBase->pDesign->vModules, pTemp, i )
283  pTemp->pCopy->pAltView = pTemp->pAltView ? pTemp->pAltView->pCopy : NULL;
284  // update box models
285  Vec_PtrForEachEntry( Abc_Ntk_t *, pNtkBase->pDesign->vModules, pTemp, i )
286  Abc_NtkForEachBox( pTemp, pObj, k )
287  if ( Abc_ObjIsWhitebox(pObj) || Abc_ObjIsBlackbox(pObj) )
288  pObj->pCopy->pData = Abc_ObjModel(pObj)->pCopy;
289  // create the design
290  pNtkNew = pNtkBase->pCopy;
291  pNtkNew->pDesign = Abc_DesCreate( pNtkBase->pDesign->pName );
292  Vec_PtrForEachEntry( Abc_Ntk_t *, pNtkBase->pDesign->vModules, pTemp, i )
293  Abc_DesAddModel( pNtkNew->pDesign, pTemp->pCopy );
294  Vec_PtrForEachEntry( Abc_Ntk_t *, pNtkBase->pDesign->vTops, pTemp, i )
295  Vec_PtrPush( pNtkNew->pDesign->vTops, pTemp->pCopy );
296  assert( Vec_PtrEntry(pNtkNew->pDesign->vTops, 0) == pNtkNew );
297  // transfer copy attributes to pNtk
298  Abc_NtkCleanCopy( pNtk );
299  Abc_NtkForEachPi( pNtk, pObj, i )
300  pObj->pCopy = Abc_NtkPi(pNtkNew, i);
301  Abc_NtkForEachPo( pNtk, pObj, i )
302  pObj->pCopy = Abc_NtkPo(pNtkNew, i);
303  Abc_NtkCollectPiPos( pNtkBase, &vLiMaps, &vLoMaps );
304  assert( Vec_PtrSize(vLiMaps) == Abc_NtkLatchNum(pNtk) );
305  assert( Vec_PtrSize(vLoMaps) == Abc_NtkLatchNum(pNtk) );
306  Vec_PtrForEachEntryTwo( Abc_Obj_t *, vLiMaps, Abc_Obj_t *, vLoMaps, pLiMap, pLoMap, i )
307  {
308  pObj = Abc_NtkBox( pNtk, i );
309  Abc_ObjFanin0(pObj)->pCopy = pLiMap->pCopy;
310  Abc_ObjFanout0(pObj)->pCopy = pLoMap->pCopy;
311  }
312  Vec_PtrFree( vLiMaps );
313  Vec_PtrFree( vLoMaps );
314  // create internal nodes
315  Abc_NtkForEachCo( pNtk, pObj, i )
317  // transfer net names
318  Abc_NtkForEachCi( pNtk, pObj, i )
319  {
320  if ( Abc_ObjFanoutNum(pObj->pCopy) == 0 ) // handle PI without fanout
321  Abc_ObjAddFanin( Abc_NtkCreateNet(pObj->pCopy->pNtk), pObj->pCopy );
323  }
324  Abc_NtkForEachCo( pNtk, pObj, i )
326  return pNtkNew;
327 }
328 
329 /**Function*************************************************************
330 
331  Synopsis [Collect nodes in the barbuf-friendly order.]
332 
333  Description []
334 
335  SideEffects []
336 
337  SeeAlso []
338 
339 ***********************************************************************/
341 {
342  Abc_Obj_t * pFanin;
343  int i;
344  if ( Abc_NodeIsTravIdCurrent( pObj ) )
345  return;
346  Abc_NodeSetTravIdCurrent( pObj );
347  assert( Abc_ObjIsNode(pObj) );
348  Abc_ObjForEachFanin( pObj, pFanin, i )
349  Abc_NtkToBarBufsCollect_rec( pFanin, vNodes );
350  Vec_PtrPush( vNodes, pObj );
351 }
353 {
354  Vec_Ptr_t * vNodes;
355  Abc_Obj_t * pObj;
356  int i;
357  assert( Abc_NtkIsLogic(pNtk) );
358  assert( pNtk->nBarBufs > 0 );
359  assert( pNtk->nBarBufs == Abc_NtkLatchNum(pNtk) );
360  vNodes = Vec_PtrAlloc( Abc_NtkObjNum(pNtk) );
361  Abc_NtkIncrementTravId( pNtk );
362  Abc_NtkForEachCi( pNtk, pObj, i )
363  {
364  if ( i >= Abc_NtkCiNum(pNtk) - pNtk->nBarBufs )
365  break;
366  Vec_PtrPush( vNodes, pObj );
367  Abc_NodeSetTravIdCurrent( pObj );
368  }
369  Abc_NtkForEachCo( pNtk, pObj, i )
370  {
371  if ( i < Abc_NtkCoNum(pNtk) - pNtk->nBarBufs )
372  continue;
374  Vec_PtrPush( vNodes, pObj );
375  Vec_PtrPush( vNodes, Abc_ObjFanout0(pObj) );
376  Vec_PtrPush( vNodes, Abc_ObjFanout0(Abc_ObjFanout0(pObj)) );
377  Abc_NodeSetTravIdCurrent( pObj );
380  }
381  Abc_NtkForEachCo( pNtk, pObj, i )
382  {
383  if ( i >= Abc_NtkCoNum(pNtk) - pNtk->nBarBufs )
384  break;
386  Vec_PtrPush( vNodes, pObj );
387  Abc_NodeSetTravIdCurrent( pObj );
388  }
389  assert( Vec_PtrSize(vNodes) == Abc_NtkObjNum(pNtk) );
390  return vNodes;
391 }
392 
393 /**Function*************************************************************
394 
395  Synopsis [Count barrier buffers.]
396 
397  Description []
398 
399  SideEffects []
400 
401  SeeAlso []
402 
403 ***********************************************************************/
405 {
406  Abc_Obj_t * pObj;
407  int i, Counter = 0;
408  Abc_NtkForEachNode( pNtk, pObj, i )
409  Counter += Abc_ObjIsBarBuf( pObj );
410  return Counter;
411 }
412 
413 /**Function*************************************************************
414 
415  Synopsis [Converts the network to dedicated barbufs and back.]
416 
417  Description []
418 
419  SideEffects []
420 
421  SeeAlso []
422 
423 ***********************************************************************/
425 {
426  Vec_Ptr_t * vNodes;
427  Abc_Ntk_t * pNtkNew;
428  Abc_Obj_t * pObj, * pFanin;
429  int i, k;
430  assert( Abc_NtkIsLogic(pNtk) );
431  assert( pNtk->pDesign == NULL );
432  assert( pNtk->nBarBufs > 0 );
433  assert( pNtk->nBarBufs == Abc_NtkLatchNum(pNtk) );
434  vNodes = Abc_NtkToBarBufsCollect( pNtk );
435  // start the network
436  pNtkNew = Abc_NtkAlloc( ABC_NTK_LOGIC, pNtk->ntkFunc, 1 );
437  pNtkNew->pName = Extra_UtilStrsav(pNtk->pName);
438  pNtkNew->pSpec = Extra_UtilStrsav(pNtk->pSpec);
439  // create objects
440  Abc_NtkCleanCopy( pNtk );
441  Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i )
442  {
443  if ( Abc_ObjIsPi(pObj) )
444  Abc_NtkDupObj( pNtkNew, pObj, 1 );
445  else if ( Abc_ObjIsPo( pObj) )
446  Abc_ObjAddFanin( Abc_NtkDupObj(pNtkNew, pObj, 1), Abc_ObjFanin0(pObj)->pCopy );
447  else if ( Abc_ObjIsBi(pObj) || Abc_ObjIsBo(pObj) )
448  pObj->pCopy = Abc_ObjFanin0(pObj)->pCopy;
449  else if ( Abc_ObjIsLatch(pObj) )
450  Abc_ObjAddFanin( (pObj->pCopy = Abc_NtkCreateNode(pNtkNew)), Abc_ObjFanin0(pObj)->pCopy );
451  else if ( Abc_ObjIsNode(pObj) )
452  {
453  Abc_NtkDupObj( pNtkNew, pObj, 1 );
454  Abc_ObjForEachFanin( pObj, pFanin, k )
455  Abc_ObjAddFanin( pObj->pCopy, pFanin->pCopy );
456  }
457  else assert( 0 );
458  }
459  Vec_PtrFree( vNodes );
460  return pNtkNew;
461 }
463 {
464  Abc_Ntk_t * pNtkNew;
465  Abc_Obj_t * pObj, * pFanin, * pLatch;
466  int i, k, nBarBufs;
467  assert( Abc_NtkIsLogic(pNtkBase) );
468  assert( Abc_NtkIsLogic(pNtk) );
469  assert( pNtkBase->nBarBufs == Abc_NtkLatchNum(pNtkBase) );
470  // start the network
471  pNtkNew = Abc_NtkStartFrom( pNtkBase, pNtk->ntkType, pNtk->ntkFunc );
472  // transfer PI pointers
473  Abc_NtkForEachPi( pNtk, pObj, i )
474  pObj->pCopy = Abc_NtkPi(pNtkNew, i);
475  // assuming that the order/number of barbufs remains the same
476  nBarBufs = 0;
477  Abc_NtkForEachNode( pNtk, pObj, i )
478  {
479  if ( Abc_ObjIsBarBuf(pObj) )
480  {
481  pLatch = Abc_NtkBox(pNtkNew, nBarBufs++);
482  Abc_ObjAddFanin( Abc_ObjFanin0(pLatch), Abc_ObjFanin0(pObj)->pCopy );
483  pObj->pCopy = Abc_ObjFanout0(pLatch);
484  }
485  else
486  {
487  Abc_NtkDupObj( pNtkNew, pObj, 1 );
488  Abc_ObjForEachFanin( pObj, pFanin, k )
489  Abc_ObjAddFanin( pObj->pCopy, pFanin->pCopy );
490  }
491  }
492  assert( nBarBufs == pNtkBase->nBarBufs );
493  // connect POs
494  Abc_NtkForEachPo( pNtk, pObj, i )
495  Abc_ObjAddFanin( Abc_NtkPo(pNtkNew, i), Abc_ObjFanin0(pObj)->pCopy );
496  return pNtkNew;
497 }
499 {
500  Abc_Ntk_t * pNtkNew, * pNtkNew2;
501  pNtkNew = Abc_NtkBarBufsToBuffers( pNtk );
502  pNtkNew2 = Abc_NtkBarBufsFromBuffers( pNtk, pNtkNew );
503  Abc_NtkDelete( pNtkNew );
504  return pNtkNew2;
505 }
506 
507 ////////////////////////////////////////////////////////////////////////
508 /// END OF FILE ///
509 ////////////////////////////////////////////////////////////////////////
510 
511 
513 
void Abc_NtkToBarBufsCollect_rec(Abc_Obj_t *pObj, Vec_Ptr_t *vNodes)
Definition: abcBarBuf.c:340
static int Abc_NtkIsLogic(Abc_Ntk_t *pNtk)
Definition: abc.h:250
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
Nm_Man_t * pManName
Definition: abc.h:160
#define Vec_PtrForEachEntryTwo(Type1, vVec1, Type2, vVec2, pEntry1, pEntry2, i)
Definition: vecPtr.h:65
static int Abc_ObjIsBo(Abc_Obj_t *pObj)
Definition: abc.h:350
static int Abc_NtkIsNetlist(Abc_Ntk_t *pNtk)
Definition: abc.h:249
static int Abc_ObjIsLatch(Abc_Obj_t *pObj)
Definition: abc.h:356
ABC_DLL Abc_Des_t * Abc_DesCreate(char *pName)
DECLARATIONS ///.
Definition: abcLib.c:45
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
Definition: abc.h:365
ABC_DLL int Abc_DesAddModel(Abc_Des_t *p, Abc_Ntk_t *pNtk)
Definition: abcLib.c:226
Abc_Ntk_t * Abc_NtkBarBufsOnOffTest(Abc_Ntk_t *pNtk)
Definition: abcBarBuf.c:498
static int Abc_ObjIsBarBuf(Abc_Obj_t *pObj)
Definition: abc.h:360
ABC_DLL Abc_Obj_t * Abc_NtkDupObj(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj, int fCopyName)
Definition: abcObj.c:337
static int Abc_NtkLatchNum(Abc_Ntk_t *pNtk)
Definition: abc.h:294
static int Abc_ObjIsPi(Abc_Obj_t *pObj)
Definition: abc.h:347
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
int Abc_NtkCollectPiPos(Abc_Ntk_t *pNtk, Vec_Ptr_t **pvLiMaps, Vec_Ptr_t **pvLoMaps)
Definition: abcBarBuf.c:147
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
Definition: abc.h:287
#define Abc_NtkForEachCo(pNtk, pCo, i)
Definition: abc.h:519
static int Abc_ObjIsWhitebox(Abc_Obj_t *pObj)
Definition: abc.h:358
char * pName
Definition: abc.h:220
ABC_DLL char * Abc_ObjAssignName(Abc_Obj_t *pObj, char *pName, char *pSuffix)
Definition: abcNames.c:68
static int Abc_NtkWhiteboxNum(Abc_Ntk_t *pNtk)
Definition: abc.h:295
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
unsigned Type
Definition: abc.h:133
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
Definition: abc.h:373
static int Abc_NtkCoNum(Abc_Ntk_t *pNtk)
Definition: abc.h:288
Abc_Ntk_t * Abc_NtkToBarBufs(Abc_Ntk_t *pNtk)
Definition: abcBarBuf.c:180
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition: abcNtk.c:1233
Abc_Ntk_t * Abc_NtkBarBufsToBuffers(Abc_Ntk_t *pNtk)
Definition: abcBarBuf.c:424
char * Extra_UtilStrsav(const char *s)
static Abc_Ntk_t * Abc_ObjModel(Abc_Obj_t *pObj)
Definition: abc.h:335
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
Definition: abcFanio.c:84
ABC_DLL Abc_Ntk_t * Abc_NtkAlloc(Abc_NtkType_t Type, Abc_NtkFunc_t Func, int fUseMemMan)
DECLARATIONS ///.
Definition: abcNtk.c:50
int Abc_NtkCheckSingleInstance(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition: abcBarBuf.c:47
static Abc_Obj_t * Abc_NtkCreateBo(Abc_Ntk_t *pNtk)
Definition: abc.h:306
char * Nm_ManStoreIdName(Nm_Man_t *p, int ObjId, int Type, char *pName, char *pSuffix)
Definition: nmApi.c:112
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
Definition: abc.h:355
ABC_DLL Abc_Ntk_t * Abc_NtkStartFrom(Abc_Ntk_t *pNtk, Abc_NtkType_t Type, Abc_NtkFunc_t Func)
Definition: abcNtk.c:106
Abc_Obj_t * pCopy
Definition: abc.h:148
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
if(last==0)
Definition: sparse_int.h:34
Abc_Ntk_t * Abc_NtkBarBufsFromBuffers(Abc_Ntk_t *pNtkBase, Abc_Ntk_t *pNtk)
Definition: abcBarBuf.c:462
ABC_DLL void Abc_NtkCleanCopy_rec(Abc_Ntk_t *pNtk)
Definition: abcUtil.c:514
Abc_Ntk_t * pAltView
Definition: abc.h:181
static Abc_Obj_t * Abc_NtkCreateLatch(Abc_Ntk_t *pNtk)
Definition: abc.h:309
char * sprintf()
static int Counter
Vec_Ptr_t * vTops
Definition: abc.h:222
int Abc_NtkCountBarBufs(Abc_Ntk_t *pNtk)
Definition: abcBarBuf.c:404
#define Abc_NtkForEachBox(pNtk, pObj, i)
Definition: abc.h:495
#define Abc_NtkForEachNode(pNtk, pNode, i)
Definition: abc.h:461
static Abc_Obj_t * Abc_NtkBox(Abc_Ntk_t *pNtk, int i)
Definition: abc.h:319
int Abc_NtkCollectPiPos_rec(Abc_Obj_t *pNet, Vec_Ptr_t *vLiMaps, Vec_Ptr_t *vLoMaps)
Definition: abcBarBuf.c:92
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
char * pSpec
Definition: abc.h:159
Vec_Ptr_t * Abc_NtkToBarBufsCollect(Abc_Ntk_t *pNtk)
Definition: abcBarBuf.c:352
static int Abc_NodeIsTravIdCurrent(Abc_Obj_t *p)
Definition: abc.h:411
Abc_Ntk_t * pCopy
Definition: abc.h:204
Abc_Ntk_t * pNtk
Definition: abc.h:130
static int Abc_ObjIsBi(Abc_Obj_t *pObj)
Definition: abc.h:349
#define Abc_ObjForEachFanout(pObj, pFanout, i)
Definition: abc.h:526
static char * Abc_NtkName(Abc_Ntk_t *pNtk)
Definition: abc.h:270
static Abc_Obj_t * Abc_NtkPo(Abc_Ntk_t *pNtk, int i)
Definition: abc.h:316
#define Abc_NtkForEachCi(pNtk, pCi, i)
Definition: abc.h:515
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
Definition: abc.h:286
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
Abc_NtkFunc_t ntkFunc
Definition: abc.h:157
#define Abc_ObjForEachFanin(pObj, pFanin, i)
Definition: abc.h:524
Abc_Obj_t * Abc_NtkFromBarBufs_rec(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj)
Definition: abcBarBuf.c:252
int nBarBufs
Definition: abc.h:174
int Id
Definition: abc.h:132
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
Definition: abc.h:285
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
Definition: abcNames.c:48
Abc_Obj_t * Abc_NtkToBarBufs_rec(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pNet)
Definition: abcBarBuf.c:166
static void Abc_NtkIncrementTravId(Abc_Ntk_t *p)
Definition: abc.h:406
static Abc_Obj_t * Abc_NtkCreateNode(Abc_Ntk_t *pNtk)
Definition: abc.h:308
static int Abc_ObjIsNet(Abc_Obj_t *pObj)
Definition: abc.h:354
static int Abc_ObjIsPo(Abc_Obj_t *pObj)
Definition: abc.h:348
ABC_DLL void Abc_NtkCleanCopy(Abc_Ntk_t *pNtk)
Definition: abcUtil.c:507
Vec_Ptr_t * vModules
Definition: abc.h:223
#define assert(ex)
Definition: util_old.h:213
static int Abc_ObjIsBox(Abc_Obj_t *pObj)
Definition: abc.h:357
static Abc_Obj_t * Abc_NtkPi(Abc_Ntk_t *pNtk, int i)
Definition: abc.h:315
void * pData
Definition: abc.h:145
int Abc_NtkCollectPiPos_int(Abc_Obj_t *pBox, Abc_Ntk_t *pNtk, Vec_Ptr_t *vLiMaps, Vec_Ptr_t *vLoMaps)
Definition: abcBarBuf.c:117
#define Abc_NtkForEachPo(pNtk, pPo, i)
Definition: abc.h:517
static int Abc_NtkBlackboxNum(Abc_Ntk_t *pNtk)
Definition: abc.h:296
static Abc_Obj_t * Abc_NtkCreateBi(Abc_Ntk_t *pNtk)
Definition: abc.h:305
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
Abc_Des_t * pDesign
Definition: abc.h:180
static int Abc_NtkObjNum(Abc_Ntk_t *pNtk)
Definition: abc.h:283
Abc_Ntk_t * Abc_NtkFromBarBufs(Abc_Ntk_t *pNtkBase, Abc_Ntk_t *pNtk)
Definition: abcBarBuf.c:263
char * pName
Definition: abc.h:158
Abc_NtkType_t ntkType
Definition: abc.h:156
int fHieVisited
Definition: abc.h:182
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
Definition: abc.h:371
#define Abc_NtkForEachPi(pNtk, pPi, i)
Definition: abc.h:513
static void Abc_NodeSetTravIdCurrent(Abc_Obj_t *p)
Definition: abc.h:409
static Abc_Obj_t * Abc_NtkCreateNet(Abc_Ntk_t *pNtk)
Definition: abc.h:307
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
static int Abc_ObjIsBlackbox(Abc_Obj_t *pObj)
Definition: abc.h:359