abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cbaBuild.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [cbaBuild.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Verilog parser.]
8 
9  Synopsis [Parses several flavors of word-level Verilog.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - November 29, 2014.]
16 
17  Revision [$Id: cbaBuild.c,v 1.00 2014/11/29 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "cba.h"
22 
24 
25 ////////////////////////////////////////////////////////////////////////
26 /// DECLARATIONS ///
27 ////////////////////////////////////////////////////////////////////////
28 
29 typedef struct Int_Des_t_ Int_Des_t;
30 struct Int_Des_t_
31 {
32  char * pName; // design name
33  Abc_Nam_t * pNames; // name manager
34  Vec_Ptr_t vModels; // models
35 };
36 typedef struct Int_Obj_t_ Int_Obj_t;
37 struct Int_Obj_t_
38 {
39  int iModel;
40  int iFunc;
42 };
43 typedef struct Int_Ntk_t_ Int_Ntk_t;
44 struct Int_Ntk_t_
45 {
46  int iName;
47  int nObjs;
55 };
56 
57 static inline char * Int_DesName( Int_Des_t * p ) { return p->pName; }
58 static inline int Int_DesNtkNum( Int_Des_t * p ) { return Vec_PtrSize( &p->vModels ) - 1; }
59 static inline Int_Ntk_t * Int_DesNtk( Int_Des_t * p, int i ) { return (Int_Ntk_t *)Vec_PtrEntry( &p->vModels, i ); }
60 
61 static inline char * Int_NtkName( Int_Ntk_t * p ) { return Abc_NamStr( p->pMan->pNames, p->iName ); }
62 static inline int Int_NtkPiNum( Int_Ntk_t * p ) { return Vec_IntSize( &p->vInputNames ); }
63 static inline int Int_NtkPoNum( Int_Ntk_t * p ) { return Vec_IntSize( &p->vOutputNames ); }
64 
65 static inline int Int_ObjInputNum( Int_Ntk_t * p, Int_Obj_t * pObj ) { return pObj->iModel ? Int_NtkPiNum(Int_DesNtk(p->pMan, pObj->iModel)) : Vec_WrdSize(&pObj->vFanins); }
66 static inline int Int_ObjOutputNum( Int_Ntk_t * p, Int_Obj_t * pObj ) { return pObj->iModel ? Int_NtkPoNum(Int_DesNtk(p->pMan, pObj->iModel)) : 1; }
67 
68 ////////////////////////////////////////////////////////////////////////
69 /// FUNCTION DEFINITIONS ///
70 ////////////////////////////////////////////////////////////////////////
71 
72 /**Function*************************************************************
73 
74  Synopsis [Transform Ptr into Int.]
75 
76  Description []
77 
78  SideEffects []
79 
80  SeeAlso []
81 
82 ***********************************************************************/
83 static int Ptr_ManCheckArray( Vec_Ptr_t * vArray )
84 {
85  if ( Vec_PtrSize(vArray) == 0 )
86  return 1;
87  if ( Abc_MaxInt(8, Vec_PtrSize(vArray)) == Vec_PtrCap(vArray) )
88  return 1;
89  assert( 0 );
90  return 0;
91 }
92 Vec_Int_t * Ptr_ManDumpArrayToInt( Abc_Nam_t * pNames, Vec_Ptr_t * vVec, int fNode )
93 {
94  char * pName; int i;
95  Vec_Int_t * vNew = Vec_IntAlloc( Vec_PtrSize(vVec) );
96  Vec_PtrForEachEntry( char *, vVec, pName, i )
97  Vec_IntPush( vNew, (fNode && i == 1) ? Abc_Ptr2Int(pName) : Abc_NamStrFind(pNames, pName) );
98  return vNew;
99 }
100 Vec_Ptr_t * Ptr_ManDumpArrarArrayToInt( Abc_Nam_t * pNames, Vec_Ptr_t * vNodes, int fNode )
101 {
102  Vec_Ptr_t * vNode; int i;
103  Vec_Ptr_t * vNew = Vec_PtrAlloc( Vec_PtrSize(vNodes) );
104  Vec_PtrForEachEntry( Vec_Ptr_t *, vNodes, vNode, i )
105  Vec_PtrPush( vNew, Ptr_ManDumpArrayToInt(pNames, vNode, fNode) );
106  assert( Ptr_ManCheckArray(vNew) );
107  return vNew;
108 }
109 Vec_Ptr_t * Ptr_ManDumpNtkToInt( Abc_Nam_t * pNames, Vec_Ptr_t * vNtk, int i )
110 {
111  Vec_Ptr_t * vNew = Vec_PtrAlloc( 5 );
112  assert( Abc_NamStrFind(pNames, (char *)Vec_PtrEntry(vNtk, 0)) == i );
113  Vec_PtrPush( vNew, Abc_Int2Ptr(i) );
114  Vec_PtrPush( vNew, Ptr_ManDumpArrayToInt(pNames, (Vec_Ptr_t *)Vec_PtrEntry(vNtk, 1), 0) );
115  Vec_PtrPush( vNew, Ptr_ManDumpArrayToInt(pNames, (Vec_Ptr_t *)Vec_PtrEntry(vNtk, 2), 0) );
116  Vec_PtrPush( vNew, Ptr_ManDumpArrarArrayToInt(pNames, (Vec_Ptr_t *)Vec_PtrEntry(vNtk, 3), 1) );
117  Vec_PtrPush( vNew, Ptr_ManDumpArrarArrayToInt(pNames, (Vec_Ptr_t *)Vec_PtrEntry(vNtk, 4), 0) );
118  assert( Ptr_ManCheckArray(vNew) );
119  return vNew;
120 }
122 {
123  Vec_Ptr_t * vNew = Vec_PtrAlloc( Vec_PtrSize(vDes) );
124  Vec_Ptr_t * vNtk; int i;
125  // create module names
126  Abc_Nam_t * pNames = Abc_NamStart( 1000, 20 );
127  Vec_PtrForEachEntryStart( Vec_Ptr_t *, vDes, vNtk, i, 1 )
128  Abc_NamStrFind( pNames, (char *)Vec_PtrEntry(vNtk, 0) );
129  assert( i == Abc_NamObjNumMax(pNames) );
130  // create resulting array
131  Vec_PtrPush( vNew, pNames );
132  Vec_PtrForEachEntryStart( Vec_Ptr_t *, vDes, vNtk, i, 1 )
133  Vec_PtrPush( vNew, Ptr_ManDumpNtkToInt(pNames, vNtk, i) );
134  assert( Ptr_ManCheckArray(vNew) );
135  return vNew;
136 }
137 
138 /**Function*************************************************************
139 
140  Synopsis [Transform Ptr into Int.]
141 
142  Description []
143 
144  SideEffects []
145 
146  SeeAlso []
147 
148 ***********************************************************************/
149 Int_Obj_t * Int_ObjAlloc( int nFanins )
150 {
151  Int_Obj_t * p = (Int_Obj_t *)ABC_CALLOC( char, sizeof(Int_Obj_t) + sizeof(word) * nFanins );
152  p->vFanins.pArray = (word *)((char *)p + sizeof(Int_Obj_t));
153  p->vFanins.nCap = nFanins;
154  return p;
155 }
157 {
158  ABC_FREE( p );
159 }
160 Int_Ntk_t * Int_NtkAlloc( Int_Des_t * pMan, int Id, int nPis, int nPos, int nInsts )
161 {
162  Int_Ntk_t * p = ABC_CALLOC( Int_Ntk_t, 1 );
163  p->iName = Id;
164  p->nObjs = nPis + nInsts;
165  p->pMan = pMan;
166  Vec_PtrGrow( &p->vInstances, nInsts );
167  Vec_WrdGrow( &p->vOutputs, nPos );
168  Vec_IntGrow( &p->vInputNames, nPis );
169  Vec_IntGrow( &p->vOutputNames, nPos );
170  return p;
171 }
173 {
174  Int_Obj_t * pObj; int i;
175  Vec_PtrForEachEntry( Int_Obj_t *, &p->vInstances, pObj, i )
176  Int_ObjFree( pObj );
177  ABC_FREE( p->vInstances.pArray );
178  ABC_FREE( p->vOutputs.pArray );
179  ABC_FREE( p->vInputNames.pArray );
180  ABC_FREE( p->vOutputNames.pArray );
181  Vec_IntFreeP( &p->vCopies );
182  Vec_IntFreeP( &p->vCopies2 );
183  ABC_FREE( p );
184 }
185 Int_Des_t * Int_DesAlloc( char * pName, Abc_Nam_t * pNames, int nModels )
186 {
187  Int_Des_t * p = ABC_CALLOC( Int_Des_t, 1 );
188  p->pName = pName;
189  p->pNames = pNames;
190  Vec_PtrGrow( &p->vModels, nModels );
191  return p;
192 }
194 {
195  Int_Ntk_t * pTemp; int i;
196  Vec_PtrForEachEntry( Int_Ntk_t *, &p->vModels, pTemp, i )
197  Int_NtkFree( pTemp );
198  ABC_FREE( p );
199 }
200 
201 // replaces formal inputs by their indixes
203 {
204  int i, iFormal, iName, nPis = Int_NtkPiNum(pModel);
205  Vec_IntForEachEntry( &pModel->vInputNames, iFormal, i )
206  Vec_IntWriteEntry( vMap, iFormal, i );
207  Vec_IntForEachEntry( &pModel->vOutputNames, iFormal, i )
208  Vec_IntWriteEntry( vMap, iFormal, nPis+i );
209  Vec_IntForEachEntryDouble( vBox, iFormal, iName, i )
210  {
211  if ( i == 0 ) continue;
212  assert( Vec_IntEntry(vMap, iFormal) >= 0 );
213  Vec_IntWriteEntry( vBox, i, Vec_IntEntry(vMap, iFormal) );
214  }
215  Vec_IntForEachEntry( &pModel->vInputNames, iFormal, i )
216  Vec_IntWriteEntry( vMap, iFormal, -1 );
217  Vec_IntForEachEntry( &pModel->vOutputNames, iFormal, i )
218  Vec_IntWriteEntry( vMap, iFormal, -1 );
219 }
220 void Ptr_ManConvertNtk( Int_Ntk_t * pNtk, Vec_Ptr_t * vNtk, Vec_Wrd_t * vMap, Vec_Int_t * vMap2 )
221 {
222  Vec_Int_t * vInputs = (Vec_Int_t *)Vec_PtrEntry(vNtk, 1);
223  Vec_Int_t * vOutputs = (Vec_Int_t *)Vec_PtrEntry(vNtk, 2);
224  Vec_Ptr_t * vNodes = (Vec_Ptr_t *)Vec_PtrEntry(vNtk, 3);
225  Vec_Ptr_t * vBoxes = (Vec_Ptr_t *)Vec_PtrEntry(vNtk, 4);
226  Vec_Int_t * vNode, * vBox;
227  Int_Ntk_t * pModel;
228  Int_Obj_t * pObj;
229  int i, k, iFormal, iName, nPis, nOffset, nNonDriven = 0;
230 
231  // map primary inputs
232  Vec_IntForEachEntry( vInputs, iName, i )
233  {
234  assert( ~Vec_WrdEntry(vMap, iName) == 0 ); // driven twice
235  Vec_WrdWriteEntry( vMap, iName, i );
236  }
237  // map internal nodes
238  nOffset = Vec_IntSize(vInputs);
239  Vec_PtrForEachEntry( Vec_Int_t *, vNodes, vNode, i )
240  {
241  iName = Vec_IntEntry(vNode, 0);
242  assert( ~Vec_WrdEntry(vMap, iName) == 0 ); // driven twice
243  Vec_WrdWriteEntry( vMap, iName, nOffset + i );
244  }
245  // map internal boxes
246  nOffset += Vec_PtrSize(vNodes);
247  Vec_PtrForEachEntry( Vec_Int_t *, vBoxes, vBox, i )
248  {
249  // get model name
250  iName = Vec_IntEntry( vBox, 0 );
251  assert( iName >= 1 && iName <= Int_DesNtkNum(pNtk->pMan) ); // bad model name
252  pModel = Int_DesNtk( pNtk->pMan, iName );
253  nPis = Int_NtkPiNum( pModel );
254  // replace inputs/outputs by their IDs
255  Ptr_ManFindInputOutputNumbers( pModel, vBox, vMap2 );
256  // go through outputs of this box
257  Vec_IntForEachEntryDouble( vBox, iFormal, iName, k )
258  if ( k > 0 && i >= nPis ) // output
259  {
260  assert( ~Vec_WrdEntry(vMap, iName) == 0 ); // driven twice
261  Vec_WrdWriteEntry( vMap, iName, (nOffset + i) | ((word)iFormal << 32) );
262  }
263  }
264 
265  // save input names
266  Vec_IntForEachEntry( vInputs, iName, i )
267  Vec_IntPush( &pNtk->vInputNames, iName );
268  // create nodes with the given connectivity
269  Vec_PtrForEachEntry( Vec_Int_t *, vNodes, vNode, i )
270  {
271  pObj = Int_ObjAlloc( Vec_IntSize(vNode) - 2 );
272  pObj->iFunc = Vec_IntEntry(vNode, 1);
273  Vec_IntForEachEntryStart( vNode, iName, k, 2 )
274  {
275  Vec_WrdPush( &pObj->vFanins, Vec_WrdEntry(vMap, iName) );
276  nNonDriven += (~Vec_WrdEntry(vMap, iName) == 0);
277  }
278  Vec_PtrPush( &pNtk->vInstances, pObj );
279  }
280  // create boxes with the given connectivity
281  Vec_PtrForEachEntry( Vec_Int_t *, vBoxes, vBox, i )
282  {
283  pModel = Int_DesNtk( pNtk->pMan, Vec_IntEntry(vBox, 0) );
284  nPis = Int_NtkPiNum( pModel );
285  pObj = Int_ObjAlloc( nPis );
286  Vec_IntForEachEntryDouble( vBox, iFormal, iName, k )
287  if ( k > 0 && iFormal < nPis ) // input
288  {
289  Vec_WrdPush( &pObj->vFanins, Vec_WrdEntry(vMap, iName) );
290  nNonDriven += (~Vec_WrdEntry(vMap, iName) == 0);
291  }
292  Vec_PtrPush( &pNtk->vInstances, pObj );
293  }
294  // save output names
295  Vec_IntForEachEntry( vOutputs, iName, i )
296  {
297  Vec_IntPush( &pNtk->vOutputNames, iName );
298  Vec_WrdPush( &pNtk->vOutputs, Vec_WrdEntry(vMap, iName) );
299  nNonDriven += (~Vec_WrdEntry(vMap, iName) == 0);
300  }
301  if ( nNonDriven )
302  printf( "Model %s has %d non-driven nets.\n", Int_NtkName(pNtk), nNonDriven );
303 }
305 {
306  Vec_Int_t * vInputs = (Vec_Int_t *)Vec_PtrEntry(vNtk, 1);
307  Vec_Int_t * vOutputs = (Vec_Int_t *)Vec_PtrEntry(vNtk, 2);
308  Vec_Ptr_t * vNodes = (Vec_Ptr_t *)Vec_PtrEntry(vNtk, 3);
309  Vec_Ptr_t * vBoxes = (Vec_Ptr_t *)Vec_PtrEntry(vNtk, 4);
310  return Int_NtkAlloc( pDes, Id, Vec_IntSize(vInputs), Vec_IntSize(vOutputs), Vec_PtrSize(vNodes) + Vec_PtrSize(vBoxes) );
311 }
313 {
314  Vec_Ptr_t * vNtk; int i;
315  char * pName = (char *)Vec_PtrEntry(vDesPtr, 0);
316  Vec_Ptr_t * vDes = Ptr_ManDumpToInt( vDesPtr );
317  Abc_Nam_t * pNames = (Abc_Nam_t *)Vec_PtrEntry(vDes, 0);
318  Vec_Wrd_t * vMap = Vec_WrdStartFull( Abc_NamObjNumMax(pNames) + 1 );
319  Vec_Int_t * vMap2 = Vec_IntStartFull( Abc_NamObjNumMax(pNames) + 1 );
320  Int_Des_t * pDes = Int_DesAlloc( pName, pNames, Vec_PtrSize(vDes)-1 );
321  Vec_PtrForEachEntryStart( Vec_Ptr_t *, vDes, vNtk, i, 1 )
322  Vec_PtrPush( &pDes->vModels, Ptr_ManConvertNtkInter(pDes, vNtk, i) );
323  Vec_PtrForEachEntryStart( Vec_Ptr_t *, vDes, vNtk, i, 1 )
324  Ptr_ManConvertNtk( Int_DesNtk(pDes, i), vNtk, vMap, vMap2 );
325 // Ptr_ManFreeDes( vDes );
326  Vec_IntFree( vMap2 );
327  Vec_WrdFree( vMap );
328  return pDes;
329 }
330 
331 
332 /**Function*************************************************************
333 
334  Synopsis []
335 
336  Description []
337 
338  SideEffects []
339 
340  SeeAlso []
341 
342 ***********************************************************************/
343 
344 
345 ////////////////////////////////////////////////////////////////////////
346 /// END OF FILE ///
347 ////////////////////////////////////////////////////////////////////////
348 
349 
351 
static void Vec_WrdGrow(Vec_Wrd_t *p, int nCapMin)
Definition: vecWrd.h:469
Vec_Int_t vInputNames
Definition: cbaBuild.c:51
Vec_Ptr_t * Ptr_ManDumpArrarArrayToInt(Abc_Nam_t *pNames, Vec_Ptr_t *vNodes, int fNode)
Definition: cbaBuild.c:100
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static int Abc_Ptr2Int(void *p)
Definition: abc_global.h:272
static int Int_DesNtkNum(Int_Des_t *p)
Definition: cbaBuild.c:58
Int_Des_t * Int_DesAlloc(char *pName, Abc_Nam_t *pNames, int nModels)
Definition: cbaBuild.c:185
#define Vec_PtrForEachEntryStart(Type, vVec, pEntry, i, Start)
Definition: vecPtr.h:57
Vec_Int_t * vCopies2
Definition: cbaBuild.c:54
Vec_Ptr_t * Ptr_ManDumpNtkToInt(Abc_Nam_t *pNames, Vec_Ptr_t *vNtk, int i)
Definition: cbaBuild.c:109
Int_Des_t * pMan
Definition: cbaBuild.c:48
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static void Vec_PtrGrow(Vec_Ptr_t *p, int nCapMin)
Definition: vecPtr.h:430
static void Vec_WrdPush(Vec_Wrd_t *p, word Entry)
Definition: vecWrd.h:618
int Abc_NamObjNumMax(Abc_Nam_t *p)
Definition: utilNam.c:186
void Ptr_ManFindInputOutputNumbers(Int_Ntk_t *pModel, Vec_Int_t *vBox, Vec_Int_t *vMap)
Definition: cbaBuild.c:202
Abc_Nam_t * pNames
Definition: cbaBuild.c:33
Vec_Ptr_t vModels
Definition: cbaBuild.c:34
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
Int_Ntk_t * Int_NtkAlloc(Int_Des_t *pMan, int Id, int nPis, int nPos, int nInsts)
Definition: cbaBuild.c:160
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
Vec_Wrd_t vOutputs
Definition: cbaBuild.c:50
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static int Vec_WrdSize(Vec_Wrd_t *p)
Definition: vecWrd.h:336
static Vec_Int_t * Vec_IntStartFull(int nSize)
Definition: vecInt.h:119
void Int_DesFree(Int_Des_t *p)
Definition: cbaBuild.c:193
Vec_Int_t * vCopies
Definition: cbaBuild.c:53
static char * Int_DesName(Int_Des_t *p)
Definition: cbaBuild.c:57
int iFunc
Definition: cbaBuild.c:40
Abc_Nam_t * Abc_NamStart(int nObjs, int nAveSize)
FUNCTION DEFINITIONS ///.
Definition: utilNam.c:78
Vec_Int_t * Ptr_ManDumpArrayToInt(Abc_Nam_t *pNames, Vec_Ptr_t *vVec, int fNode)
Definition: cbaBuild.c:92
static void Vec_IntGrow(Vec_Int_t *p, int nCapMin)
Definition: bblif.c:336
int iName
Definition: cbaBuild.c:46
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
Vec_Wrd_t vFanins
Definition: cbaBuild.c:41
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static void Vec_WrdWriteEntry(Vec_Wrd_t *p, int i, word Entry)
Definition: vecWrd.h:418
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
static void Vec_WrdFree(Vec_Wrd_t *p)
Definition: vecWrd.h:260
Vec_Int_t vOutputNames
Definition: cbaBuild.c:52
static Vec_Wrd_t * Vec_WrdStartFull(int nSize)
Definition: vecWrd.h:123
Int_Des_t * Ptr_ManConvert(Vec_Ptr_t *vDesPtr)
Definition: cbaBuild.c:312
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
Definition: vecInt.h:56
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
int Abc_NamStrFind(Abc_Nam_t *p, char *pStr)
Definition: utilNam.c:372
static int Ptr_ManCheckArray(Vec_Ptr_t *vArray)
FUNCTION DEFINITIONS ///.
Definition: cbaBuild.c:83
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
Definition: vecInt.h:66
static int Vec_PtrCap(Vec_Ptr_t *p)
Definition: vecPtr.h:311
char * Abc_NamStr(Abc_Nam_t *p, int NameId)
Definition: utilNam.c:479
static int Int_NtkPoNum(Int_Ntk_t *p)
Definition: cbaBuild.c:63
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
static int Int_ObjInputNum(Int_Ntk_t *p, Int_Obj_t *pObj)
Definition: cbaBuild.c:65
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
static char * Int_NtkName(Int_Ntk_t *p)
Definition: cbaBuild.c:61
struct Int_Obj_t_ Int_Obj_t
Definition: cbaBuild.c:36
#define ABC_FREE(obj)
Definition: abc_global.h:232
static word Vec_WrdEntry(Vec_Wrd_t *p, int i)
Definition: vecWrd.h:384
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
Vec_Ptr_t * Ptr_ManDumpToInt(Vec_Ptr_t *vDes)
Definition: cbaBuild.c:121
Int_Ntk_t * Ptr_ManConvertNtkInter(Int_Des_t *pDes, Vec_Ptr_t *vNtk, int Id)
Definition: cbaBuild.c:304
typedefABC_NAMESPACE_HEADER_START struct Abc_Nam_t_ Abc_Nam_t
INCLUDES ///.
Definition: utilNam.h:39
Int_Obj_t * Int_ObjAlloc(int nFanins)
Definition: cbaBuild.c:149
void Ptr_ManConvertNtk(Int_Ntk_t *pNtk, Vec_Ptr_t *vNtk, Vec_Wrd_t *vMap, Vec_Int_t *vMap2)
Definition: cbaBuild.c:220
#define assert(ex)
Definition: util_old.h:213
static int Int_ObjOutputNum(Int_Ntk_t *p, Int_Obj_t *pObj)
Definition: cbaBuild.c:66
static void * Abc_Int2Ptr(int i)
Definition: abc_global.h:273
static int Int_NtkPiNum(Int_Ntk_t *p)
Definition: cbaBuild.c:62
char * pName
Definition: cbaBuild.c:32
int nObjs
Definition: cbaBuild.c:47
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
Vec_Ptr_t vInstances
Definition: cbaBuild.c:49
void Int_NtkFree(Int_Ntk_t *p)
Definition: cbaBuild.c:172
typedefABC_NAMESPACE_IMPL_START struct Int_Des_t_ Int_Des_t
DECLARATIONS ///.
Definition: cbaBuild.c:29
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
void Int_ObjFree(Int_Obj_t *p)
Definition: cbaBuild.c:156
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
Definition: vecWrd.h:42
static Int_Ntk_t * Int_DesNtk(Int_Des_t *p, int i)
Definition: cbaBuild.c:59
int iModel
Definition: cbaBuild.c:39