abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
giaTruth.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [giaTruth.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Scalable AIG package.]
8 
9  Synopsis [Truth table computation.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: giaTruth.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "gia.h"
22 
24 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 static word s_Truth6[6] = {
31  ABC_CONST(0xAAAAAAAAAAAAAAAA),
32  ABC_CONST(0xCCCCCCCCCCCCCCCC),
33  ABC_CONST(0xF0F0F0F0F0F0F0F0),
34  ABC_CONST(0xFF00FF00FF00FF00),
35  ABC_CONST(0xFFFF0000FFFF0000),
36  ABC_CONST(0xFFFFFFFF00000000)
37 };
38 
39 static inline word * Gla_ObjTruthElem( Gia_Man_t * p, int i ) { return (word *)Vec_PtrEntry( p->vTtInputs, i ); }
40 static inline word * Gla_ObjTruthNodeId( Gia_Man_t * p, int Id ) { return Vec_WrdArray(p->vTtMemory) + p->nTtWords * Id; }
41 static inline word * Gla_ObjTruthNode( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Vec_WrdArray(p->vTtMemory) + p->nTtWords * Gia_ObjNum(p, pObj); }
42 static inline word * Gla_ObjTruthFree1( Gia_Man_t * p ) { return Vec_WrdArray(p->vTtMemory) + Vec_WrdSize(p->vTtMemory) - p->nTtWords * 1; }
43 static inline word * Gla_ObjTruthFree2( Gia_Man_t * p ) { return Vec_WrdArray(p->vTtMemory) + Vec_WrdSize(p->vTtMemory) - p->nTtWords * 2; }
44 static inline word * Gla_ObjTruthConst0( Gia_Man_t * p, word * pDst ) { int w; for ( w = 0; w < p->nTtWords; w++ ) pDst[w] = 0; return pDst; }
45 static inline word * Gla_ObjTruthDup( Gia_Man_t * p, word * pDst, word * pSrc, int c ) { int w; for ( w = 0; w < p->nTtWords; w++ ) pDst[w] = c ? ~pSrc[w] : pSrc[w]; return pDst; }
46 
47 ////////////////////////////////////////////////////////////////////////
48 /// FUNCTION DEFINITIONS ///
49 ////////////////////////////////////////////////////////////////////////
50 
51 /**Function*************************************************************
52 
53  Synopsis [Computes truth table of a 6-LUT.]
54 
55  Description []
56 
57  SideEffects []
58 
59  SeeAlso []
60 
61 ***********************************************************************/
63 {
64  word uTruth0, uTruth1;
65  Gia_Obj_t * pObj = Gia_ManObj( p, iObj );
66  if ( !Gia_ObjIsAnd(pObj) )
67  return;
70  uTruth0 = Vec_WrdEntry( vTemp, Gia_ObjFanin0(pObj)->Value );
71  uTruth0 = Gia_ObjFaninC0(pObj) ? ~uTruth0 : uTruth0;
72  uTruth1 = Vec_WrdEntry( vTemp, Gia_ObjFanin1(pObj)->Value );
73  uTruth1 = Gia_ObjFaninC1(pObj) ? ~uTruth1 : uTruth1;
74  Vec_WrdWriteEntry( vTemp, iObj, uTruth0 & uTruth1 );
75 }
77 {
78  int i, Fanin;
79  assert( Vec_WrdSize(vTemp) == Gia_ManObjNum(p) );
80  assert( Gia_ObjIsLut(p, iObj) );
81  Gia_LutForEachFanin( p, iObj, Fanin, i )
82  Vec_WrdWriteEntry( vTemp, Fanin, s_Truth6[i] );
83  assert( i <= 6 );
84  Gia_ObjComputeTruthTable6Lut_rec( p, iObj, vTemp );
85  return Vec_WrdEntry( vTemp, iObj );
86 }
87 
88 /**Function*************************************************************
89 
90  Synopsis [Computes truth table up to 6 inputs.]
91 
92  Description []
93 
94  SideEffects []
95 
96  SeeAlso []
97 
98 ***********************************************************************/
100 {
101  word uTruth0, uTruth1;
102  if ( Gia_ObjIsTravIdCurrent(p, pObj) )
103  return;
104  Gia_ObjSetTravIdCurrent(p, pObj);
105  assert( !pObj->fMark0 );
106  assert( Gia_ObjIsAnd(pObj) );
107  Gia_ObjComputeTruthTable6_rec( p, Gia_ObjFanin0(pObj), vTruths );
108  Gia_ObjComputeTruthTable6_rec( p, Gia_ObjFanin1(pObj), vTruths );
109  uTruth0 = Vec_WrdEntry( vTruths, Gia_ObjFanin0(pObj)->Value );
110  uTruth0 = Gia_ObjFaninC0(pObj) ? ~uTruth0 : uTruth0;
111  uTruth1 = Vec_WrdEntry( vTruths, Gia_ObjFanin1(pObj)->Value );
112  uTruth1 = Gia_ObjFaninC1(pObj) ? ~uTruth1 : uTruth1;
113  pObj->Value = Vec_WrdSize(vTruths);
114  Vec_WrdPush( vTruths, uTruth0 & uTruth1 );
115 }
117 {
118  Gia_Obj_t * pLeaf;
119  int i;
120  assert( Vec_IntSize(vSupp) <= 6 );
121  assert( Gia_ObjIsAnd(pObj) );
122  assert( !pObj->fMark0 );
123  Vec_WrdClear( vTruths );
125  Gia_ManForEachObjVec( vSupp, p, pLeaf, i )
126  {
127  assert( pLeaf->fMark0 || Gia_ObjIsRo(p, pLeaf) );
128  pLeaf->Value = Vec_WrdSize(vTruths);
129  Vec_WrdPush( vTruths, s_Truth6[i] );
130  Gia_ObjSetTravIdCurrent(p, pLeaf);
131  }
132  Gia_ObjComputeTruthTable6_rec( p, pObj, vTruths );
133  return Vec_WrdEntryLast( vTruths );
134 }
135 
136 /**Function*************************************************************
137 
138  Synopsis [Collects internal nodes reachable from the given node.]
139 
140  Description []
141 
142  SideEffects []
143 
144  SeeAlso []
145 
146 ***********************************************************************/
148 {
149  if ( !Gia_ObjIsAnd(pObj) )
150  return;
151  if ( pObj->fMark0 )
152  return;
153  pObj->fMark0 = 1;
156  Gia_ObjSetNum( p, pObj, Vec_IntSize(p->vTtNodes) );
157  Vec_IntPush( p->vTtNodes, Gia_ObjId(p, pObj) );
158 }
160 {
161  Vec_IntClear( p->vTtNodes );
162  Gia_ObjCollectInternal_rec( p, pObj );
163 }
164 
165 /**Function*************************************************************
166 
167  Synopsis [Computing the truth table for GIA object.]
168 
169  Description [The truth table should be used by the calling application
170  (or saved into the user's storage) before this procedure is called again.]
171 
172  SideEffects []
173 
174  SeeAlso []
175 
176 ***********************************************************************/
178 {
179  Gia_Obj_t * pTemp, * pRoot;
180  word * pTruth, * pTruthL, * pTruth0, * pTruth1;
181  int i;
182  if ( p->vTtMemory == NULL )
183  {
184  p->nTtVars = Gia_ManPiNum( p );
186  p->vTtNums = Vec_IntStart( Gia_ManObjNum(p) + 1000 );
187  p->vTtNodes = Vec_IntAlloc( 256 );
189  p->vTtMemory = Vec_WrdStart( p->nTtWords * 256 );
190  }
191  else
192  {
193  // make sure the number of primary inputs did not change
194  // since the truth table computation storage was prepared
195  assert( p->nTtVars == Gia_ManPiNum(p) );
196  }
197  // extend ID numbers
198  if ( Vec_IntSize(p->vTtNums) < Gia_ManObjNum(p) )
200  // collect internal nodes
201  pRoot = Gia_ObjIsCo(pObj) ? Gia_ObjFanin0(pObj) : pObj;
202  Gia_ObjCollectInternal( p, pRoot );
203  // extend TT storage
204  if ( Vec_WrdSize(p->vTtMemory) < p->nTtWords * (Vec_IntSize(p->vTtNodes) + 2) )
205  Vec_WrdFillExtra( p->vTtMemory, p->nTtWords * (Vec_IntSize(p->vTtNodes) + 2), 0 );
206  // compute the truth table for internal nodes
207  Gia_ManForEachObjVec( p->vTtNodes, p, pTemp, i )
208  {
209  pTemp->fMark0 = 0; // unmark nodes marked by Gia_ObjCollectInternal()
210  pTruth = Gla_ObjTruthNode(p, pTemp);
211  pTruthL = pTruth + p->nTtWords;
214  if ( Gia_ObjFaninC0(pTemp) )
215  {
216  if ( Gia_ObjFaninC1(pTemp) )
217  while ( pTruth < pTruthL )
218  *pTruth++ = ~*pTruth0++ & ~*pTruth1++;
219  else
220  while ( pTruth < pTruthL )
221  *pTruth++ = ~*pTruth0++ & *pTruth1++;
222  }
223  else
224  {
225  if ( Gia_ObjFaninC1(pTemp) )
226  while ( pTruth < pTruthL )
227  *pTruth++ = *pTruth0++ & ~*pTruth1++;
228  else
229  while ( pTruth < pTruthL )
230  *pTruth++ = *pTruth0++ & *pTruth1++;
231  }
232  }
233  // compute the final table
234  if ( Gia_ObjIsConst0(pRoot) )
235  pTruth = Gla_ObjTruthConst0( p, Gla_ObjTruthFree1(p) );
236  else if ( Gia_ObjIsPi(p, pRoot) )
237  pTruth = Gla_ObjTruthElem( p, Gia_ObjCioId(pRoot) );
238  else if ( Gia_ObjIsAnd(pRoot) )
239  pTruth = Gla_ObjTruthNode( p, pRoot );
240  else
241  pTruth = NULL;
242  return Gla_ObjTruthDup( p, Gla_ObjTruthFree2(p), pTruth, Gia_ObjIsCo(pObj) && Gia_ObjFaninC0(pObj) );
243 }
244 
245 /**Function*************************************************************
246 
247  Synopsis [Testing truth table computation.]
248 
249  Description []
250 
251  SideEffects []
252 
253  SeeAlso []
254 
255 ***********************************************************************/
257 {
258  Gia_Obj_t * pObj;
259  unsigned * pTruth;
260  abctime clk = Abc_Clock();
261  int i;
262  Gia_ManForEachPo( p, pObj, i )
263  {
264  pTruth = (unsigned *)Gia_ObjComputeTruthTable( p, pObj );
265 // Extra_PrintHex( stdout, pTruth, Gia_ManPiNum(p) ); printf( "\n" );
266  }
267  Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
268 }
269 
270 
271 /**Function*************************************************************
272 
273  Synopsis []
274 
275  Description []
276 
277  SideEffects []
278 
279  SeeAlso []
280 
281 ***********************************************************************/
283 {
284  assert( p->vTtMemory == NULL );
285  p->nTtVars = nVarsMax;
287  p->vTtNodes = Vec_IntAlloc( 256 );
289  p->vTtMemory = Vec_WrdStart( p->nTtWords * 64 );
290  p->vTtNums = Vec_IntAlloc( Gia_ManObjNum(p) + 1000 );
292 }
294 {
295  p->nTtVars = 0;
296  p->nTtWords = 0;
297  Vec_IntFreeP( &p->vTtNums );
298  Vec_IntFreeP( &p->vTtNodes );
299  Vec_PtrFreeP( &p->vTtInputs );
300  Vec_WrdFreeP( &p->vTtMemory );
301 }
302 
303 /**Function*************************************************************
304 
305  Synopsis [Collects internal nodes reachable from the given node.]
306 
307  Description []
308 
309  SideEffects []
310 
311  SeeAlso []
312 
313 ***********************************************************************/
315 {
316  if ( Gia_ObjHasNumId(p, iObj) )
317  return;
318  assert( Gia_ObjIsAnd(Gia_ManObj(p, iObj)) );
321  Gia_ObjSetNumId( p, iObj, Vec_IntSize(p->vTtNodes) );
322  Vec_IntPush( p->vTtNodes, iObj );
323 }
324 void Gia_ObjCollectInternalCut( Gia_Man_t * p, int iRoot, Vec_Int_t * vLeaves )
325 {
326  int i, iObj;
327  assert( !Gia_ObjHasNumId(p, iRoot) );
328  assert( Gia_ObjIsAnd(Gia_ManObj(p, iRoot)) );
329  Vec_IntForEachEntry( vLeaves, iObj, i )
330  {
331  assert( !Gia_ObjHasNumId(p, iObj) );
332  Gia_ObjSetNumId( p, iObj, -i );
333  }
334  assert( !Gia_ObjHasNumId(p, iRoot) ); // the root cannot be one of the leaves
335  Vec_IntClear( p->vTtNodes );
336  Vec_IntPush( p->vTtNodes, -1 );
337  Gia_ObjCollectInternalCut_rec( p, iRoot );
338 }
339 
340 /**Function*************************************************************
341 
342  Synopsis [Computes the truth table of pRoot in terms of leaves.]
343 
344  Description [The root cannot be one of the leaves.]
345 
346  SideEffects []
347 
348  SeeAlso []
349 
350 ***********************************************************************/
352 {
353  Gia_Obj_t * pTemp;
354  word * pTruth, * pTruthL, * pTruth0, * pTruth1;
355  int i, iObj, Id0, Id1;
356  assert( p->vTtMemory != NULL );
357  assert( Vec_IntSize(vLeaves) <= p->nTtVars );
358  // extend ID numbers
359  if ( Vec_IntSize(p->vTtNums) < Gia_ManObjNum(p) )
361  // collect internal nodes
362  Gia_ObjCollectInternalCut( p, Gia_ObjId(p, pRoot), vLeaves );
363  // extend TT storage
364  if ( Vec_WrdSize(p->vTtMemory) < p->nTtWords * (Vec_IntSize(p->vTtNodes) + 2) )
365  Vec_WrdFillExtra( p->vTtMemory, p->nTtWords * (Vec_IntSize(p->vTtNodes) + 2), 0 );
366  // compute the truth table for internal nodes
367  Vec_IntForEachEntryStart( p->vTtNodes, iObj, i, 1 )
368  {
369  assert( i == Gia_ObjNumId(p, iObj) );
370  pTemp = Gia_ManObj( p, iObj );
371  pTruth = Gla_ObjTruthNodeId( p, i );
372  pTruthL = pTruth + p->nTtWords;
373  Id0 = Gia_ObjNumId( p, Gia_ObjFaninId0(pTemp, iObj) );
374  Id1 = Gia_ObjNumId( p, Gia_ObjFaninId1(pTemp, iObj) );
375  pTruth0 = (Id0 > 0) ? Gla_ObjTruthNodeId(p, Id0) : Gla_ObjTruthElem(p, -Id0);
376  pTruth1 = (Id1 > 0) ? Gla_ObjTruthNodeId(p, Id1) : Gla_ObjTruthElem(p, -Id1);
377  if ( Gia_ObjFaninC0(pTemp) )
378  {
379  if ( Gia_ObjFaninC1(pTemp) )
380  while ( pTruth < pTruthL )
381  *pTruth++ = ~*pTruth0++ & ~*pTruth1++;
382  else
383  while ( pTruth < pTruthL )
384  *pTruth++ = ~*pTruth0++ & *pTruth1++;
385  }
386  else
387  {
388  if ( Gia_ObjFaninC1(pTemp) )
389  while ( pTruth < pTruthL )
390  *pTruth++ = *pTruth0++ & ~*pTruth1++;
391  else
392  while ( pTruth < pTruthL )
393  *pTruth++ = *pTruth0++ & *pTruth1++;
394  }
395  }
396  pTruth = Gla_ObjTruthNode( p, pRoot );
397  // unmark leaves marked by Gia_ObjCollectInternal()
398  Vec_IntForEachEntry( vLeaves, iObj, i )
399  Gia_ObjResetNumId( p, iObj );
400  Vec_IntForEachEntryStart( p->vTtNodes, iObj, i, 1 )
401  Gia_ObjResetNumId( p, iObj );
402  return pTruth;
403 }
404 
405 ////////////////////////////////////////////////////////////////////////
406 /// END OF FILE ///
407 ////////////////////////////////////////////////////////////////////////
408 
409 
411 
void Gia_ObjCollectInternal(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: giaTruth.c:159
void Gia_ObjCollectInternal_rec(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: giaTruth.c:147
void Gia_ObjComputeTruthTable6_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Wrd_t *vTruths)
Definition: giaTruth.c:99
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
Definition: gia.h:452
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Vec_IntFillExtra(Vec_Int_t *p, int nSize, int Fill)
Definition: bblif.c:376
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static int Gia_ObjIsTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:533
static word * Gla_ObjTruthFree1(Gia_Man_t *p)
Definition: giaTruth.c:42
static int Gia_ObjNum(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:513
static int Abc_Truth6WordNum(int nVars)
Definition: abc_global.h:257
static void Vec_WrdPush(Vec_Wrd_t *p, word Entry)
Definition: vecWrd.h:618
static int Gia_ObjIsConst0(Gia_Obj_t *pObj)
Definition: gia.h:430
static word * Gla_ObjTruthFree2(Gia_Man_t *p)
Definition: giaTruth.c:43
static int Gia_ObjFaninId1p(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:464
int nTtWords
Definition: gia.h:183
static word Vec_WrdEntryLast(Vec_Wrd_t *p)
Definition: vecWrd.h:452
static abctime Abc_Clock()
Definition: abc_global.h:279
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
static int Vec_WrdSize(Vec_Wrd_t *p)
Definition: vecWrd.h:336
static void Vec_WrdFreeP(Vec_Wrd_t **p)
Definition: vecWrd.h:277
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
Definition: gia.h:402
Definition: gia.h:75
static word * Gla_ObjTruthDup(Gia_Man_t *p, word *pDst, word *pSrc, int c)
Definition: giaTruth.c:45
static ABC_NAMESPACE_IMPL_START word s_Truth6[6]
DECLARATIONS ///.
Definition: giaTruth.c:30
static Vec_Ptr_t * Vec_PtrAllocTruthTables(int nVars)
Definition: vecPtr.h:1065
static void Abc_PrintTime(int level, const char *pStr, abctime time)
Definition: abc_global.h:367
static Vec_Int_t * Vec_IntStart(int nSize)
Definition: bblif.c:172
static int Gia_ObjHasNumId(Gia_Man_t *p, int Id)
Definition: gia.h:511
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
Definition: gia.h:454
word * Gia_ObjComputeTruthTableCut(Gia_Man_t *p, Gia_Obj_t *pRoot, Vec_Int_t *vLeaves)
Definition: giaTruth.c:351
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static void Vec_WrdClear(Vec_Wrd_t *p)
Definition: vecWrd.h:602
void Gia_ObjCollectInternalCut_rec(Gia_Man_t *p, int iObj)
Definition: giaTruth.c:314
static word * Gla_ObjTruthConst0(Gia_Man_t *p, word *pDst)
Definition: giaTruth.c:44
static int Gia_ObjIsRo(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:443
static void Vec_WrdWriteEntry(Vec_Wrd_t *p, int i, word Entry)
Definition: vecWrd.h:418
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static void Gia_ObjSetTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:531
Vec_Ptr_t * vTtInputs
Definition: gia.h:186
static word * Gla_ObjTruthElem(Gia_Man_t *p, int i)
Definition: giaTruth.c:39
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
Definition: bblif.c:356
static word * Gla_ObjTruthNodeId(Gia_Man_t *p, int Id)
Definition: giaTruth.c:40
word Gia_ObjComputeTruthTable6(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vSupp, Vec_Wrd_t *vTruths)
Definition: giaTruth.c:116
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:410
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)
Definition: vecInt.h:56
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
static int Vec_IntCap(Vec_Int_t *p)
Definition: vecInt.h:368
int nTtVars
Definition: gia.h:182
word * Gia_ObjComputeTruthTable(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: giaTruth.c:177
static word * Gla_ObjTruthNode(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: giaTruth.c:41
void Gia_ObjComputeTruthTableStop(Gia_Man_t *p)
Definition: giaTruth.c:293
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
Definition: gia.h:421
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
Definition: gia.h:988
#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 Vec_Wrd_t * Vec_WrdStart(int nSize)
Definition: vecWrd.h:103
static void Gia_ObjSetNumId(Gia_Man_t *p, int Id, int n)
Definition: gia.h:514
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static word * Vec_WrdArray(Vec_Wrd_t *p)
Definition: vecWrd.h:316
unsigned fMark0
Definition: gia.h:79
#define ABC_CONST(number)
PARAMETERS ///.
Definition: abc_global.h:206
Vec_Int_t * vTtNodes
Definition: gia.h:185
void Gia_ObjComputeTruthTableStart(Gia_Man_t *p, int nVarsMax)
Definition: giaTruth.c:282
Definition: gia.h:95
void Gia_ObjComputeTruthTableTest(Gia_Man_t *p)
Definition: giaTruth.c:256
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
Definition: gia.h:422
static int Gia_ObjNumId(Gia_Man_t *p, int Id)
Definition: gia.h:512
static word Vec_WrdEntry(Vec_Wrd_t *p, int i)
Definition: vecWrd.h:384
static int Gia_ObjFaninId0p(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:463
static void Vec_PtrFreeP(Vec_Ptr_t **p)
Definition: vecPtr.h:240
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
Definition: gia.h:455
Vec_Wrd_t * vTtMemory
Definition: gia.h:187
#define ABC_INFINITY
MACRO DEFINITIONS ///.
Definition: abc_global.h:216
void Gia_ObjCollectInternalCut(Gia_Man_t *p, int iRoot, Vec_Int_t *vLeaves)
Definition: giaTruth.c:324
word Gia_ObjComputeTruthTable6Lut(Gia_Man_t *p, int iObj, Vec_Wrd_t *vTemp)
Definition: giaTruth.c:76
#define assert(ex)
Definition: util_old.h:213
unsigned Value
Definition: gia.h:87
static void Gia_ObjResetNumId(Gia_Man_t *p, int Id)
Definition: gia.h:516
static void Gia_ObjSetNum(Gia_Man_t *p, Gia_Obj_t *pObj, int n)
Definition: gia.h:515
static int Gia_ObjIsLut(Gia_Man_t *p, int Id)
Definition: gia.h:952
void Gia_ManIncrementTravId(Gia_Man_t *p)
Definition: giaUtil.c:149
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
Definition: gia.h:451
static int Gia_ManPiNum(Gia_Man_t *p)
Definition: gia.h:385
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
static void Vec_WrdFillExtra(Vec_Wrd_t *p, int nSize, word Fill)
Definition: vecWrd.h:509
ABC_INT64_T abctime
Definition: abc_global.h:278
#define Gia_ManForEachPo(p, pObj, i)
Definition: gia.h:1036
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
Definition: gia.h:461
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
Definition: vecWrd.h:42
#define Gia_LutForEachFanin(p, i, iFan, k)
Definition: gia.h:970
static int Gia_ObjCioId(Gia_Obj_t *pObj)
Definition: gia.h:411
static int Gia_ManObjNum(Gia_Man_t *p)
Definition: gia.h:388
void Gia_ObjComputeTruthTable6Lut_rec(Gia_Man_t *p, int iObj, Vec_Wrd_t *vTemp)
FUNCTION DEFINITIONS ///.
Definition: giaTruth.c:62
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
Definition: gia.h:460
static int Gia_ObjIsPi(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:441
Vec_Int_t * vTtNums
Definition: gia.h:184