abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
gia.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [gia.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Scalable AIG package.]
8 
9  Synopsis [External declarations.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: gia.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__aig__gia__gia_h
22 #define ABC__aig__gia__gia_h
23 
24 
25 ////////////////////////////////////////////////////////////////////////
26 /// INCLUDES ///
27 ////////////////////////////////////////////////////////////////////////
28 
29 #include <stdio.h>
30 #include <stdlib.h>
31 #include <string.h>
32 #include <assert.h>
33 
34 #include "misc/vec/vec.h"
35 #include "misc/util/utilCex.h"
36 
37 ////////////////////////////////////////////////////////////////////////
38 /// PARAMETERS ///
39 ////////////////////////////////////////////////////////////////////////
40 
41 
43 
44 #define GIA_NONE 0x1FFFFFFF
45 #define GIA_VOID 0x0FFFFFFF
46 
47 ////////////////////////////////////////////////////////////////////////
48 /// BASIC TYPES ///
49 ////////////////////////////////////////////////////////////////////////
50 
51 typedef struct Gia_MmFixed_t_ Gia_MmFixed_t;
52 typedef struct Gia_MmFlex_t_ Gia_MmFlex_t;
53 typedef struct Gia_MmStep_t_ Gia_MmStep_t;
54 
55 typedef struct Gia_Rpr_t_ Gia_Rpr_t;
56 struct Gia_Rpr_t_
57 {
58  unsigned iRepr : 28; // representative node
59  unsigned fProved : 1; // marks the proved equivalence
60  unsigned fFailed : 1; // marks the failed equivalence
61  unsigned fColorA : 1; // marks cone of A
62  unsigned fColorB : 1; // marks cone of B
63 };
64 
65 typedef struct Gia_Plc_t_ Gia_Plc_t;
66 struct Gia_Plc_t_
67 {
68  unsigned fFixed : 1; // the placement of this object is fixed
69  unsigned xCoord : 15; // x-ooordinate of the placement
70  unsigned fUndef : 1; // the placement of this object is not assigned
71  unsigned yCoord : 15; // y-ooordinate of the placement
72 };
73 
74 typedef struct Gia_Obj_t_ Gia_Obj_t;
75 struct Gia_Obj_t_
76 {
77  unsigned iDiff0 : 29; // the diff of the first fanin
78  unsigned fCompl0: 1; // the complemented attribute
79  unsigned fMark0 : 1; // first user-controlled mark
80  unsigned fTerm : 1; // terminal node (CI/CO)
81 
82  unsigned iDiff1 : 29; // the diff of the second fanin
83  unsigned fCompl1: 1; // the complemented attribute
84  unsigned fMark1 : 1; // second user-controlled mark
85  unsigned fPhase : 1; // value under 000 pattern
86 
87  unsigned Value; // application-specific value
88 };
89 // Value is currently used to store several types of information
90 // - pointer to the next node in the hash table during structural hashing
91 // - pointer to the node copy during duplication
92 
93 // new AIG manager
94 typedef struct Gia_Man_t_ Gia_Man_t;
95 struct Gia_Man_t_
96 {
97  char * pName; // name of the AIG
98  char * pSpec; // name of the input file
99  int nRegs; // number of registers
100  int nRegsAlloc; // number of allocated registers
101  int nObjs; // number of objects
102  int nObjsAlloc; // number of allocated objects
103  Gia_Obj_t * pObjs; // the array of objects
104  unsigned * pMuxes; // control signals of MUXes
105  int nXors; // the number of XORs
106  int nMuxes; // the number of MUXes
107  int nBufs; // the number of buffers
108  Vec_Int_t * vCis; // the vector of CIs (PIs + LOs)
109  Vec_Int_t * vCos; // the vector of COs (POs + LIs)
110  int * pHTable; // hash table
111  int nHTable; // hash table size
112  int fAddStrash; // performs additional structural hashing
113  int fSweeper; // sweeper is running
114  int * pRefs; // the reference count
115  Vec_Int_t * vLevels; // levels of the nodes
116  int nLevels; // the mamixum level
117  int nConstrs; // the number of constraints
118  int nTravIds; // the current traversal ID
119  int nFront; // frontier size
120  int * pReprsOld; // representatives (for CIs and ANDs)
121  Gia_Rpr_t * pReprs; // representatives (for CIs and ANDs)
122  int * pNexts; // next nodes in the equivalence classes
123  int * pSibls; // next nodes in the choice nodes
124  int * pIso; // pairs of structurally isomorphic nodes
125  int nTerLoop; // the state where loop begins
126  int nTerStates; // the total number of ternary states
127  int * pFanData; // the database to store fanout information
128  int nFansAlloc; // the size of fanout representation
129  Vec_Int_t * vFanoutNums; // static fanout
130  Vec_Int_t * vFanout; // static fanout
131  Vec_Int_t * vMapping; // mapping for each node
132  Vec_Int_t * vCellMapping; // mapping for each node
133  Vec_Int_t * vPacking; // packing information
134  Vec_Int_t * vLutConfigs; // LUT configurations
135  Abc_Cex_t * pCexComb; // combinational counter-example
136  Abc_Cex_t * pCexSeq; // sequential counter-example
137  Vec_Ptr_t * vSeqModelVec; // sequential counter-examples
138  Vec_Int_t vCopies; // intermediate copies
139  Vec_Int_t * vTruths; // used for truth table computation
140  Vec_Int_t * vFlopClasses; // classes of flops for retiming/merging/etc
141  Vec_Int_t * vGateClasses; // classes of gates for abstraction
142  Vec_Int_t * vObjClasses; // classes of objects for abstraction
143  Vec_Int_t * vInitClasses; // classes of flops for retiming/merging/etc
144  Vec_Int_t * vRegClasses; // classes of registers for sequential synthesis
145  Vec_Int_t * vDoms; // dominators
146  Vec_Int_t * vBarBufs; // barrier buffers
147  unsigned char* pSwitching; // switching activity for each object
148  Gia_Plc_t * pPlacement; // placement of the objects
149  Gia_Man_t * pAigExtra; // combinational logic of holes
150  Vec_Flt_t * vInArrs; // PI arrival times
151  Vec_Flt_t * vOutReqs; // PO required times
152  Vec_Int_t * vSwitching; // switching activity
153  int * pTravIds; // separate traversal ID representation
154  int nTravIdsAlloc; // the number of trav IDs allocated
155  Vec_Ptr_t * vNamesIn; // the input names
156  Vec_Ptr_t * vNamesOut; // the output names
157  Vec_Int_t * vUserPiIds; // numbers assigned to PIs by the user
158  Vec_Int_t * vUserPoIds; // numbers assigned to POs by the user
159  Vec_Int_t * vUserFfIds; // numbers assigned to FFs by the user
160  Vec_Int_t * vCiNumsOrig; // original CI names
161  Vec_Int_t * vCoNumsOrig; // original CO names
162  Vec_Int_t * vCofVars; // cofactoring variables
163  Vec_Vec_t * vClockDoms; // clock domains
164  Vec_Flt_t * vTiming; // arrival/required/slack
165  void * pManTime; // the timing manager
166  void * pLutLib; // LUT library
167  word nHashHit; // hash table hit
168  word nHashMiss; // hash table miss
169  void * pData; // various user data
170  unsigned * pData2; // various user data
171  int iData; // various user data
172  int iData2; // various user data
173  int nAnd2Delay; // AND2 delay scaled to match delay numbers used
174  int fVerbose; // verbose reports
175  // bit-parallel simulation
176  int iPatsPi;
181  // truth table computation for small functions
182  int nTtVars; // truth table variables
183  int nTtWords; // truth table words
184  Vec_Int_t * vTtNums; // object numbers
185  Vec_Int_t * vTtNodes; // internal nodes
186  Vec_Ptr_t * vTtInputs; // truth tables for constant and primary inputs
187  Vec_Wrd_t * vTtMemory; // truth tables for internal nodes
188  // balancing
189  Vec_Int_t * vSuper; // supergate
190  Vec_Int_t * vStore; // node storage
191 };
192 
193 
194 typedef struct Gps_Par_t_ Gps_Par_t;
196 {
197  int fTents;
198  int fSwitch;
199  int fCut;
200  int fNpn;
201  int fLutProf;
202  int fMuxXor;
203  int fMiter;
204  int fSkipMap;
205  char * pDumpFile;
206 };
207 
208 typedef struct Emb_Par_t_ Emb_Par_t;
210 {
211  int nDims; // the number of dimension
212  int nSols; // the number of solutions (typically, 2)
213  int nIters; // the number of iterations of FORCE
214  int fRefine; // use refinement by FORCE
215  int fCluster; // use clustered representation
216  int fDump; // dump Gnuplot file
217  int fDumpLarge; // dump Gnuplot file for large benchmarks
218  int fShowImage; // shows image if Gnuplot is installed
219  int fVerbose; // verbose flag
220 };
221 
222 
223 // frames parameters
226 {
227  int nFrames; // the number of frames to unroll
228  int fInit; // initialize the timeframes
229  int fSaveLastLit; // adds POs for outputs of each frame
230  int fDisableSt; // disables strashing
231  int fOrPos; // ORs respective POs in each timeframe
232  int fVerbose; // enables verbose output
233 };
234 
235 
236 // simulation parameters
239 {
240  // user-controlled parameters
241  int nWords; // the number of machine words
242  int nIters; // the number of timeframes
243  int RandSeed; // seed to generate random numbers
244  int TimeLimit; // time limit in seconds
245  int fCheckMiter; // check if miter outputs are non-zero
246  int fVerbose; // enables verbose output
247  int iOutFail; // index of the failed output
248 };
249 
252 {
255  int nWords;
258  // simulation information
259  unsigned * pDataSim; // simulation data
260  unsigned * pDataSimCis; // simulation data for CIs
261  unsigned * pDataSimCos; // simulation data for COs
262 };
263 
264 typedef struct Jf_Par_t_ Jf_Par_t;
265 struct Jf_Par_t_
266 {
267  int nLutSize;
268  int nCutNum;
269  int nProcNum;
270  int nRounds;
278  int fOptEdge;
279  int fUseMux7;
280  int fPower;
281  int fCoarsen;
282  int fCutMin;
283  int fFuncDsd;
284  int fGenCnf;
287  int fPureAig;
291  int fVerbose;
302  float MapDelay;
303  float MapArea;
305  float Epsilon;
306  float * pTimesArr;
307  float * pTimesReq;
308 };
309 
310 static inline unsigned Gia_ObjCutSign( unsigned ObjId ) { return (1 << (ObjId & 31)); }
311 static inline int Gia_WordHasOneBit( unsigned uWord ) { return (uWord & (uWord-1)) == 0; }
312 static inline int Gia_WordHasOnePair( unsigned uWord ) { return Gia_WordHasOneBit(uWord & (uWord>>1) & 0x55555555); }
313 static inline int Gia_WordCountOnes( unsigned uWord )
314 {
315  uWord = (uWord & 0x55555555) + ((uWord>>1) & 0x55555555);
316  uWord = (uWord & 0x33333333) + ((uWord>>2) & 0x33333333);
317  uWord = (uWord & 0x0F0F0F0F) + ((uWord>>4) & 0x0F0F0F0F);
318  uWord = (uWord & 0x00FF00FF) + ((uWord>>8) & 0x00FF00FF);
319  return (uWord & 0x0000FFFF) + (uWord>>16);
320 }
321 static inline int Gia_WordFindFirstBit( unsigned uWord )
322 {
323  int i;
324  for ( i = 0; i < 32; i++ )
325  if ( uWord & (1 << i) )
326  return i;
327  return -1;
328 }
329 
330 static inline int Gia_ManTruthIsConst0( unsigned * pIn, int nVars )
331 {
332  int w;
333  for ( w = Abc_TruthWordNum(nVars)-1; w >= 0; w-- )
334  if ( pIn[w] )
335  return 0;
336  return 1;
337 }
338 static inline int Gia_ManTruthIsConst1( unsigned * pIn, int nVars )
339 {
340  int w;
341  for ( w = Abc_TruthWordNum(nVars)-1; w >= 0; w-- )
342  if ( pIn[w] != ~(unsigned)0 )
343  return 0;
344  return 1;
345 }
346 static inline void Gia_ManTruthCopy( unsigned * pOut, unsigned * pIn, int nVars )
347 {
348  int w;
349  for ( w = Abc_TruthWordNum(nVars)-1; w >= 0; w-- )
350  pOut[w] = pIn[w];
351 }
352 static inline void Gia_ManTruthClear( unsigned * pOut, int nVars )
353 {
354  int w;
355  for ( w = Abc_TruthWordNum(nVars)-1; w >= 0; w-- )
356  pOut[w] = 0;
357 }
358 static inline void Gia_ManTruthFill( unsigned * pOut, int nVars )
359 {
360  int w;
361  for ( w = Abc_TruthWordNum(nVars)-1; w >= 0; w-- )
362  pOut[w] = ~(unsigned)0;
363 }
364 static inline void Gia_ManTruthNot( unsigned * pOut, unsigned * pIn, int nVars )
365 {
366  int w;
367  for ( w = Abc_TruthWordNum(nVars)-1; w >= 0; w-- )
368  pOut[w] = ~pIn[w];
369 }
370 
371 static inline int Gia_ManConst0Lit() { return 0; }
372 static inline int Gia_ManConst1Lit() { return 1; }
373 static inline int Gia_ManIsConst0Lit( int iLit ) { return (iLit == 0); }
374 static inline int Gia_ManIsConst1Lit( int iLit ) { return (iLit == 1); }
375 static inline int Gia_ManIsConstLit( int iLit ) { return (iLit <= 1); }
376 
377 static inline Gia_Obj_t * Gia_Regular( Gia_Obj_t * p ) { return (Gia_Obj_t *)((ABC_PTRUINT_T)(p) & ~01); }
378 static inline Gia_Obj_t * Gia_Not( Gia_Obj_t * p ) { return (Gia_Obj_t *)((ABC_PTRUINT_T)(p) ^ 01); }
379 static inline Gia_Obj_t * Gia_NotCond( Gia_Obj_t * p, int c ) { return (Gia_Obj_t *)((ABC_PTRUINT_T)(p) ^ (c)); }
380 static inline int Gia_IsComplement( Gia_Obj_t * p ) { return (int)((ABC_PTRUINT_T)(p) & 01); }
381 
382 static inline char * Gia_ManName( Gia_Man_t * p ) { return p->pName; }
383 static inline int Gia_ManCiNum( Gia_Man_t * p ) { return Vec_IntSize(p->vCis); }
384 static inline int Gia_ManCoNum( Gia_Man_t * p ) { return Vec_IntSize(p->vCos); }
385 static inline int Gia_ManPiNum( Gia_Man_t * p ) { return Vec_IntSize(p->vCis) - p->nRegs; }
386 static inline int Gia_ManPoNum( Gia_Man_t * p ) { return Vec_IntSize(p->vCos) - p->nRegs; }
387 static inline int Gia_ManRegNum( Gia_Man_t * p ) { return p->nRegs; }
388 static inline int Gia_ManObjNum( Gia_Man_t * p ) { return p->nObjs; }
389 static inline int Gia_ManAndNum( Gia_Man_t * p ) { return p->nObjs - Vec_IntSize(p->vCis) - Vec_IntSize(p->vCos) - 1; }
390 static inline int Gia_ManXorNum( Gia_Man_t * p ) { return p->nXors; }
391 static inline int Gia_ManMuxNum( Gia_Man_t * p ) { return p->nMuxes; }
392 static inline int Gia_ManBufNum( Gia_Man_t * p ) { return p->nBufs; }
393 static inline int Gia_ManAndNotBufNum( Gia_Man_t * p ){ return Gia_ManAndNum(p) - Gia_ManBufNum(p); }
394 static inline int Gia_ManCandNum( Gia_Man_t * p ) { return Gia_ManCiNum(p) + Gia_ManAndNum(p); }
395 static inline int Gia_ManConstrNum( Gia_Man_t * p ) { return p->nConstrs; }
396 static inline void Gia_ManFlipVerbose( Gia_Man_t * p ) { p->fVerbose ^= 1; }
397 static inline int Gia_ManHasChoices( Gia_Man_t * p ) { return p->pSibls != NULL; }
398 static inline int Gia_ManChoiceNum( Gia_Man_t * p ) { int c = 0; if (p->pSibls) { int i; for (i = 0; i < p->nObjs; i++) c += (int)(p->pSibls[i] > 0); } return c; }
399 
400 static inline Gia_Obj_t * Gia_ManConst0( Gia_Man_t * p ) { return p->pObjs; }
401 static inline Gia_Obj_t * Gia_ManConst1( Gia_Man_t * p ) { return Gia_Not(Gia_ManConst0(p)); }
402 static inline Gia_Obj_t * Gia_ManObj( Gia_Man_t * p, int v ) { assert( v >= 0 && v < p->nObjs ); return p->pObjs + v; }
403 static inline Gia_Obj_t * Gia_ManCi( Gia_Man_t * p, int v ) { return Gia_ManObj( p, Vec_IntEntry(p->vCis,v) ); }
404 static inline Gia_Obj_t * Gia_ManCo( Gia_Man_t * p, int v ) { return Gia_ManObj( p, Vec_IntEntry(p->vCos,v) ); }
405 static inline Gia_Obj_t * Gia_ManPi( Gia_Man_t * p, int v ) { assert( v < Gia_ManPiNum(p) ); return Gia_ManCi( p, v ); }
406 static inline Gia_Obj_t * Gia_ManPo( Gia_Man_t * p, int v ) { assert( v < Gia_ManPoNum(p) ); return Gia_ManCo( p, v ); }
407 static inline Gia_Obj_t * Gia_ManRo( Gia_Man_t * p, int v ) { assert( v < Gia_ManRegNum(p) ); return Gia_ManCi( p, Gia_ManPiNum(p)+v ); }
408 static inline Gia_Obj_t * Gia_ManRi( Gia_Man_t * p, int v ) { assert( v < Gia_ManRegNum(p) ); return Gia_ManCo( p, Gia_ManPoNum(p)+v ); }
409 
410 static inline int Gia_ObjId( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( p->pObjs <= pObj && pObj < p->pObjs + p->nObjs ); return pObj - p->pObjs; }
411 static inline int Gia_ObjCioId( Gia_Obj_t * pObj ) { assert( pObj->fTerm ); return pObj->iDiff1; }
412 static inline void Gia_ObjSetCioId( Gia_Obj_t * pObj, int v ) { assert( pObj->fTerm ); pObj->iDiff1 = v; }
413 static inline int Gia_ObjValue( Gia_Obj_t * pObj ) { return pObj->Value; }
414 static inline void Gia_ObjSetValue( Gia_Obj_t * pObj, int i ) { pObj->Value = i; }
415 static inline int Gia_ObjPhase( Gia_Obj_t * pObj ) { return pObj->fPhase; }
416 static inline int Gia_ObjPhaseReal( Gia_Obj_t * pObj ) { return Gia_Regular(pObj)->fPhase ^ Gia_IsComplement(pObj); }
417 
418 static inline int Gia_ObjIsTerm( Gia_Obj_t * pObj ) { return pObj->fTerm; }
419 static inline int Gia_ObjIsAndOrConst0( Gia_Obj_t * pObj ) { return!pObj->fTerm; }
420 static inline int Gia_ObjIsCi( Gia_Obj_t * pObj ) { return pObj->fTerm && pObj->iDiff0 == GIA_NONE; }
421 static inline int Gia_ObjIsCo( Gia_Obj_t * pObj ) { return pObj->fTerm && pObj->iDiff0 != GIA_NONE; }
422 static inline int Gia_ObjIsAnd( Gia_Obj_t * pObj ) { return!pObj->fTerm && pObj->iDiff0 != GIA_NONE; }
423 static inline int Gia_ObjIsXor( Gia_Obj_t * pObj ) { return Gia_ObjIsAnd(pObj) && pObj->iDiff0 < pObj->iDiff1; }
424 static inline int Gia_ObjIsMuxId( Gia_Man_t * p, int iObj ) { return p->pMuxes && p->pMuxes[iObj] > 0; }
425 static inline int Gia_ObjIsMux( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjIsMuxId( p, Gia_ObjId(p, pObj) ); }
426 static inline int Gia_ObjIsAndReal( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjIsAnd(pObj) && pObj->iDiff0 > pObj->iDiff1 && !Gia_ObjIsMux(p, pObj); }
427 static inline int Gia_ObjIsBuf( Gia_Obj_t * pObj ) { return pObj->iDiff0 == pObj->iDiff1 && pObj->iDiff0 != GIA_NONE && !pObj->fTerm; }
428 static inline int Gia_ObjIsAndNotBuf( Gia_Obj_t * pObj ) { return Gia_ObjIsAnd(pObj) && pObj->iDiff0 != pObj->iDiff1; }
429 static inline int Gia_ObjIsCand( Gia_Obj_t * pObj ) { return Gia_ObjIsAnd(pObj) || Gia_ObjIsCi(pObj); }
430 static inline int Gia_ObjIsConst0( Gia_Obj_t * pObj ) { return pObj->iDiff0 == GIA_NONE && pObj->iDiff1 == GIA_NONE; }
431 static inline int Gia_ManObjIsConst0( Gia_Man_t * p, Gia_Obj_t * pObj){ return pObj == p->pObjs; }
432 
433 static inline int Gia_Obj2Lit( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Abc_Var2Lit(Gia_ObjId(p, Gia_Regular(pObj)), Gia_IsComplement(pObj)); }
434 static inline Gia_Obj_t * Gia_Lit2Obj( Gia_Man_t * p, int iLit ) { return Gia_NotCond(Gia_ManObj(p, Abc_Lit2Var(iLit)), Abc_LitIsCompl(iLit)); }
435 static inline int Gia_ManCiLit( Gia_Man_t * p, int CiId ) { return Gia_Obj2Lit( p, Gia_ManCi(p, CiId) ); }
436 
437 static inline int Gia_ManIdToCioId( Gia_Man_t * p, int Id ) { return Gia_ObjCioId( Gia_ManObj(p, Id) ); }
438 static inline int Gia_ManCiIdToId( Gia_Man_t * p, int CiId ) { return Gia_ObjId( p, Gia_ManCi(p, CiId) ); }
439 static inline int Gia_ManCoIdToId( Gia_Man_t * p, int CoId ) { return Gia_ObjId( p, Gia_ManCo(p, CoId) ); }
440 
441 static inline int Gia_ObjIsPi( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjIsCi(pObj) && Gia_ObjCioId(pObj) < Gia_ManPiNum(p); }
442 static inline int Gia_ObjIsPo( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjIsCo(pObj) && Gia_ObjCioId(pObj) < Gia_ManPoNum(p); }
443 static inline int Gia_ObjIsRo( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjIsCi(pObj) && Gia_ObjCioId(pObj) >= Gia_ManPiNum(p); }
444 static inline int Gia_ObjIsRi( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjIsCo(pObj) && Gia_ObjCioId(pObj) >= Gia_ManPoNum(p); }
445 
446 static inline Gia_Obj_t * Gia_ObjRoToRi( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjIsRo(p, pObj) ); return Gia_ManCo(p, Gia_ManCoNum(p) - Gia_ManCiNum(p) + Gia_ObjCioId(pObj)); }
447 static inline Gia_Obj_t * Gia_ObjRiToRo( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjIsRi(p, pObj) ); return Gia_ManCi(p, Gia_ManCiNum(p) - Gia_ManCoNum(p) + Gia_ObjCioId(pObj)); }
448 
449 static inline int Gia_ObjDiff0( Gia_Obj_t * pObj ) { return pObj->iDiff0; }
450 static inline int Gia_ObjDiff1( Gia_Obj_t * pObj ) { return pObj->iDiff1; }
451 static inline int Gia_ObjFaninC0( Gia_Obj_t * pObj ) { return pObj->fCompl0; }
452 static inline int Gia_ObjFaninC1( Gia_Obj_t * pObj ) { return pObj->fCompl1; }
453 static inline int Gia_ObjFaninC2( Gia_Man_t * p, Gia_Obj_t * pObj ) { return p->pMuxes && Abc_LitIsCompl(p->pMuxes[Gia_ObjId(p, pObj)]); }
454 static inline Gia_Obj_t * Gia_ObjFanin0( Gia_Obj_t * pObj ) { return pObj - pObj->iDiff0; }
455 static inline Gia_Obj_t * Gia_ObjFanin1( Gia_Obj_t * pObj ) { return pObj - pObj->iDiff1; }
456 static inline Gia_Obj_t * Gia_ObjFanin2( Gia_Man_t * p, Gia_Obj_t * pObj ) { return p->pMuxes ? Gia_ManObj(p, Abc_Lit2Var(p->pMuxes[Gia_ObjId(p, pObj)])) : NULL; }
457 static inline Gia_Obj_t * Gia_ObjChild0( Gia_Obj_t * pObj ) { return Gia_NotCond( Gia_ObjFanin0(pObj), Gia_ObjFaninC0(pObj) ); }
458 static inline Gia_Obj_t * Gia_ObjChild1( Gia_Obj_t * pObj ) { return Gia_NotCond( Gia_ObjFanin1(pObj), Gia_ObjFaninC1(pObj) ); }
459 static inline Gia_Obj_t * Gia_ObjChild2( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_NotCond( Gia_ObjFanin2(p, pObj), Gia_ObjFaninC2(p, pObj) ); }
460 static inline int Gia_ObjFaninId0( Gia_Obj_t * pObj, int ObjId ) { return ObjId - pObj->iDiff0; }
461 static inline int Gia_ObjFaninId1( Gia_Obj_t * pObj, int ObjId ) { return ObjId - pObj->iDiff1; }
462 static inline int Gia_ObjFaninId2( Gia_Man_t * p, int ObjId ) { return (p->pMuxes && p->pMuxes[ObjId]) ? Abc_Lit2Var(p->pMuxes[ObjId]) : -1; }
463 static inline int Gia_ObjFaninId0p( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjFaninId0( pObj, Gia_ObjId(p, pObj) ); }
464 static inline int Gia_ObjFaninId1p( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjFaninId1( pObj, Gia_ObjId(p, pObj) ); }
465 static inline int Gia_ObjFaninId2p( Gia_Man_t * p, Gia_Obj_t * pObj ) { return (p->pMuxes && p->pMuxes[Gia_ObjId(p, pObj)]) ? Abc_Lit2Var(p->pMuxes[Gia_ObjId(p, pObj)]) : -1; }
466 static inline int Gia_ObjFaninLit0( Gia_Obj_t * pObj, int ObjId ) { return Abc_Var2Lit( Gia_ObjFaninId0(pObj, ObjId), Gia_ObjFaninC0(pObj) ); }
467 static inline int Gia_ObjFaninLit1( Gia_Obj_t * pObj, int ObjId ) { return Abc_Var2Lit( Gia_ObjFaninId1(pObj, ObjId), Gia_ObjFaninC1(pObj) ); }
468 static inline int Gia_ObjFaninLit2( Gia_Man_t * p, int ObjId ) { return (p->pMuxes && p->pMuxes[ObjId]) ? p->pMuxes[ObjId] : -1; }
469 static inline int Gia_ObjFaninLit0p( Gia_Man_t * p, Gia_Obj_t * pObj) { return Abc_Var2Lit( Gia_ObjFaninId0p(p, pObj), Gia_ObjFaninC0(pObj) ); }
470 static inline int Gia_ObjFaninLit1p( Gia_Man_t * p, Gia_Obj_t * pObj) { return Abc_Var2Lit( Gia_ObjFaninId1p(p, pObj), Gia_ObjFaninC1(pObj) ); }
471 static inline int Gia_ObjFaninLit2p( Gia_Man_t * p, Gia_Obj_t * pObj) { return (p->pMuxes && p->pMuxes[Gia_ObjId(p, pObj)]) ? p->pMuxes[Gia_ObjId(p, pObj)] : -1; }
472 static inline void Gia_ObjFlipFaninC0( Gia_Obj_t * pObj ) { assert( Gia_ObjIsCo(pObj) ); pObj->fCompl0 ^= 1; }
473 static inline int Gia_ObjWhatFanin( Gia_Obj_t * pObj, Gia_Obj_t * pFanin ) { return Gia_ObjFanin0(pObj) == pFanin ? 0 : (Gia_ObjFanin1(pObj) == pFanin ? 1 : -1); }
474 
475 static inline int Gia_ManPoIsConst0( Gia_Man_t * p, int iPoIndex ) { return Gia_ManIsConst0Lit( Gia_ObjFaninLit0p(p, Gia_ManPo(p, iPoIndex)) ); }
476 static inline int Gia_ManPoIsConst1( Gia_Man_t * p, int iPoIndex ) { return Gia_ManIsConst1Lit( Gia_ObjFaninLit0p(p, Gia_ManPo(p, iPoIndex)) ); }
477 
478 static inline Gia_Obj_t * Gia_ObjCopy( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ManObj( p, Abc_Lit2Var(pObj->Value) ); }
479 static inline int Gia_ObjLitCopy( Gia_Man_t * p, int iLit ) { return Abc_LitNotCond( Gia_ManObj(p, Abc_Lit2Var(iLit))->Value, Abc_LitIsCompl(iLit)); }
480 
481 static inline int Gia_ObjFanin0Copy( Gia_Obj_t * pObj ) { return Abc_LitNotCond( Gia_ObjFanin0(pObj)->Value, Gia_ObjFaninC0(pObj) ); }
482 static inline int Gia_ObjFanin1Copy( Gia_Obj_t * pObj ) { return Abc_LitNotCond( Gia_ObjFanin1(pObj)->Value, Gia_ObjFaninC1(pObj) ); }
483 static inline int Gia_ObjFanin2Copy( Gia_Man_t * p, Gia_Obj_t * pObj ){ return Abc_LitNotCond(Gia_ObjFanin2(p, pObj)->Value, Gia_ObjFaninC2(p, pObj)); }
484 
485 static inline int Gia_ObjCopyF( Gia_Man_t * p, int f, Gia_Obj_t * pObj ) { return Vec_IntEntry(&p->vCopies, Gia_ManObjNum(p) * f + Gia_ObjId(p,pObj)); }
486 static inline void Gia_ObjSetCopyF( Gia_Man_t * p, int f, Gia_Obj_t * pObj, int iLit ) { Vec_IntWriteEntry(&p->vCopies, Gia_ManObjNum(p) * f + Gia_ObjId(p,pObj), iLit); }
487 static inline int Gia_ObjCopyArray( Gia_Man_t * p, int iObj ) { return Vec_IntEntry(&p->vCopies, iObj); }
488 static inline void Gia_ObjSetCopyArray( Gia_Man_t * p, int iObj, int iLit ) { Vec_IntWriteEntry(&p->vCopies, iObj, iLit); }
489 static inline void Gia_ManCleanCopyArray( Gia_Man_t * p ) { Vec_IntFill( &p->vCopies, Gia_ManObjNum(p), -1 ); }
490 
491 static inline int Gia_ObjFanin0CopyF( Gia_Man_t * p, int f, Gia_Obj_t * pObj ) { return Abc_LitNotCond(Gia_ObjCopyF(p, f, Gia_ObjFanin0(pObj)), Gia_ObjFaninC0(pObj)); }
492 static inline int Gia_ObjFanin1CopyF( Gia_Man_t * p, int f, Gia_Obj_t * pObj ) { return Abc_LitNotCond(Gia_ObjCopyF(p, f, Gia_ObjFanin1(pObj)), Gia_ObjFaninC1(pObj)); }
493 static inline int Gia_ObjFanin0CopyArray( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Abc_LitNotCond(Gia_ObjCopyArray(p, Gia_ObjFaninId0p(p,pObj)), Gia_ObjFaninC0(pObj)); }
494 static inline int Gia_ObjFanin1CopyArray( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Abc_LitNotCond(Gia_ObjCopyArray(p, Gia_ObjFaninId1p(p,pObj)), Gia_ObjFaninC1(pObj)); }
495 
496 static inline Gia_Obj_t * Gia_ObjFromLit( Gia_Man_t * p, int iLit ) { return Gia_NotCond( Gia_ManObj(p, Abc_Lit2Var(iLit)), Abc_LitIsCompl(iLit) ); }
497 static inline int Gia_ObjToLit( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Abc_Var2Lit( Gia_ObjId(p, Gia_Regular(pObj)), Gia_IsComplement(pObj) ); }
498 static inline int Gia_ObjPhaseRealLit( Gia_Man_t * p, int iLit ) { return Gia_ObjPhaseReal( Gia_ObjFromLit(p, iLit) ); }
499 
500 static inline int Gia_ObjLevelId( Gia_Man_t * p, int Id ) { return Vec_IntGetEntry(p->vLevels, Id); }
501 static inline int Gia_ObjLevel( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjLevelId( p, Gia_ObjId(p,pObj) ); }
502 static inline void Gia_ObjSetLevelId( Gia_Man_t * p, int Id, int l ) { Vec_IntSetEntry(p->vLevels, Id, l); }
503 static inline void Gia_ObjSetLevel( Gia_Man_t * p, Gia_Obj_t * pObj, int l ) { Gia_ObjSetLevelId( p, Gia_ObjId(p,pObj), l ); }
504 static inline void Gia_ObjSetCoLevel( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjIsCo(pObj) ); Gia_ObjSetLevel( p, pObj, Gia_ObjLevel(p,Gia_ObjFanin0(pObj)) ); }
505 static inline void Gia_ObjSetBufLevel( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjIsAnd(pObj) ); Gia_ObjSetLevel( p, pObj, Gia_ObjLevel(p,Gia_ObjFanin0(pObj)) ); }
506 static inline void Gia_ObjSetAndLevel( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjIsAnd(pObj) ); Gia_ObjSetLevel( p, pObj, 1+Abc_MaxInt(Gia_ObjLevel(p,Gia_ObjFanin0(pObj)),Gia_ObjLevel(p,Gia_ObjFanin1(pObj))) ); }
507 static inline void Gia_ObjSetXorLevel( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjIsXor(pObj) ); Gia_ObjSetLevel( p, pObj, 2+Abc_MaxInt(Gia_ObjLevel(p,Gia_ObjFanin0(pObj)),Gia_ObjLevel(p,Gia_ObjFanin1(pObj))) ); }
509 static inline void Gia_ObjSetGateLevel( Gia_Man_t * p, Gia_Obj_t * pObj ){ if ( Gia_ObjIsBuf(pObj) ) Gia_ObjSetBufLevel(p, pObj); else if ( Gia_ObjIsMux(p,pObj) ) Gia_ObjSetMuxLevel(p, pObj); else if ( Gia_ObjIsXor(pObj) ) Gia_ObjSetXorLevel(p, pObj); else if ( Gia_ObjIsAnd(pObj) ) Gia_ObjSetAndLevel(p, pObj); }
510 
511 static inline int Gia_ObjHasNumId( Gia_Man_t * p, int Id ) { return Vec_IntEntry(p->vTtNums, Id) > -ABC_INFINITY; }
512 static inline int Gia_ObjNumId( Gia_Man_t * p, int Id ) { return Vec_IntEntry(p->vTtNums, Id); }
513 static inline int Gia_ObjNum( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Vec_IntEntry(p->vTtNums, Gia_ObjId(p,pObj)); }
514 static inline void Gia_ObjSetNumId( Gia_Man_t * p, int Id, int n ) { Vec_IntWriteEntry(p->vTtNums, Id, n); }
515 static inline void Gia_ObjSetNum( Gia_Man_t * p, Gia_Obj_t * pObj, int n ) { Vec_IntWriteEntry(p->vTtNums, Gia_ObjId(p,pObj), n); }
516 static inline void Gia_ObjResetNumId( Gia_Man_t * p, int Id ) { Vec_IntWriteEntry(p->vTtNums, Id, -ABC_INFINITY); }
517 
518 static inline int Gia_ObjRefNumId( Gia_Man_t * p, int Id ) { return p->pRefs[Id]; }
519 static inline int Gia_ObjRefIncId( Gia_Man_t * p, int Id ) { return p->pRefs[Id]++; }
520 static inline int Gia_ObjRefDecId( Gia_Man_t * p, int Id ) { return --p->pRefs[Id]; }
521 static inline int Gia_ObjRefNum( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjRefNumId( p, Gia_ObjId(p, pObj) ); }
522 static inline int Gia_ObjRefInc( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjRefIncId( p, Gia_ObjId(p, pObj) ); }
523 static inline int Gia_ObjRefDec( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjRefDecId( p, Gia_ObjId(p, pObj) ); }
524 static inline void Gia_ObjRefFanin0Inc(Gia_Man_t * p, Gia_Obj_t * pObj){ Gia_ObjRefInc(p, Gia_ObjFanin0(pObj)); }
525 static inline void Gia_ObjRefFanin1Inc(Gia_Man_t * p, Gia_Obj_t * pObj){ Gia_ObjRefInc(p, Gia_ObjFanin1(pObj)); }
526 static inline void Gia_ObjRefFanin2Inc(Gia_Man_t * p, Gia_Obj_t * pObj){ Gia_ObjRefInc(p, Gia_ObjFanin2(p, pObj)); }
527 static inline void Gia_ObjRefFanin0Dec(Gia_Man_t * p, Gia_Obj_t * pObj){ Gia_ObjRefDec(p, Gia_ObjFanin0(pObj)); }
528 static inline void Gia_ObjRefFanin1Dec(Gia_Man_t * p, Gia_Obj_t * pObj){ Gia_ObjRefDec(p, Gia_ObjFanin1(pObj)); }
529 static inline void Gia_ObjRefFanin2Dec(Gia_Man_t * p, Gia_Obj_t * pObj){ Gia_ObjRefDec(p, Gia_ObjFanin2(p, pObj)); }
530 
531 static inline void Gia_ObjSetTravIdCurrent( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjId(p, pObj) < p->nTravIdsAlloc ); p->pTravIds[Gia_ObjId(p, pObj)] = p->nTravIds; }
532 static inline void Gia_ObjSetTravIdPrevious( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjId(p, pObj) < p->nTravIdsAlloc ); p->pTravIds[Gia_ObjId(p, pObj)] = p->nTravIds - 1; }
533 static inline int Gia_ObjIsTravIdCurrent( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjId(p, pObj) < p->nTravIdsAlloc ); return (p->pTravIds[Gia_ObjId(p, pObj)] == p->nTravIds); }
534 static inline int Gia_ObjIsTravIdPrevious( Gia_Man_t * p, Gia_Obj_t * pObj ) { assert( Gia_ObjId(p, pObj) < p->nTravIdsAlloc ); return (p->pTravIds[Gia_ObjId(p, pObj)] == p->nTravIds - 1); }
535 static inline void Gia_ObjSetTravIdCurrentId( Gia_Man_t * p, int Id ) { assert( Id < p->nTravIdsAlloc ); p->pTravIds[Id] = p->nTravIds; }
536 static inline int Gia_ObjIsTravIdCurrentId( Gia_Man_t * p, int Id ) { assert( Id < p->nTravIdsAlloc ); return (p->pTravIds[Id] == p->nTravIds); }
537 
538 static inline void Gia_ManTimeClean( Gia_Man_t * p ) { int i; assert( p->vTiming != NULL ); Vec_FltFill(p->vTiming, 3*Gia_ManObjNum(p), 0); for ( i = 0; i < Gia_ManObjNum(p); i++ ) Vec_FltWriteEntry( p->vTiming, 3*i+1, (float)(ABC_INFINITY) ); }
539 static inline void Gia_ManTimeStart( Gia_Man_t * p ) { assert( p->vTiming == NULL ); p->vTiming = Vec_FltAlloc(0); Gia_ManTimeClean( p ); }
540 static inline void Gia_ManTimeStop( Gia_Man_t * p ) { assert( p->vTiming != NULL ); Vec_FltFreeP(&p->vTiming); }
541 static inline float Gia_ObjTimeArrival( Gia_Man_t * p, int Id ) { return Vec_FltEntry(p->vTiming, 3*Id+0); }
542 static inline float Gia_ObjTimeRequired( Gia_Man_t * p, int Id ) { return Vec_FltEntry(p->vTiming, 3*Id+1); }
543 static inline float Gia_ObjTimeSlack( Gia_Man_t * p, int Id ) { return Vec_FltEntry(p->vTiming, 3*Id+2); }
544 static inline float Gia_ObjTimeArrivalObj( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjTimeArrival( p, Gia_ObjId(p, pObj) ); }
545 static inline float Gia_ObjTimeRequiredObj( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjTimeRequired( p, Gia_ObjId(p, pObj) ); }
546 static inline float Gia_ObjTimeSlackObj( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjTimeSlack( p, Gia_ObjId(p, pObj) ); }
547 static inline void Gia_ObjSetTimeArrival( Gia_Man_t * p, int Id, float t ) { Vec_FltWriteEntry( p->vTiming, 3*Id+0, t ); }
548 static inline void Gia_ObjSetTimeRequired( Gia_Man_t * p, int Id, float t ) { Vec_FltWriteEntry( p->vTiming, 3*Id+1, t ); }
549 static inline void Gia_ObjSetTimeSlack( Gia_Man_t * p, int Id, float t ) { Vec_FltWriteEntry( p->vTiming, 3*Id+2, t ); }
550 static inline void Gia_ObjSetTimeArrivalObj( Gia_Man_t * p, Gia_Obj_t * pObj, float t ) { Gia_ObjSetTimeArrival( p, Gia_ObjId(p, pObj), t ); }
551 static inline void Gia_ObjSetTimeRequiredObj( Gia_Man_t * p, Gia_Obj_t * pObj, float t ) { Gia_ObjSetTimeRequired( p, Gia_ObjId(p, pObj), t ); }
552 static inline void Gia_ObjSetTimeSlackObj( Gia_Man_t * p, Gia_Obj_t * pObj, float t ) { Gia_ObjSetTimeSlack( p, Gia_ObjId(p, pObj), t ); }
553 
554 static inline int Gia_ObjSimWords( Gia_Man_t * p ) { return Vec_WrdSize( p->vSimsPi ) / Gia_ManPiNum( p ); }
555 static inline word * Gia_ObjSimPi( Gia_Man_t * p, int PiId ) { return Vec_WrdEntryP( p->vSimsPi, PiId * Gia_ObjSimWords(p) ); }
556 static inline word * Gia_ObjSim( Gia_Man_t * p, int Id ) { return Vec_WrdEntryP( p->vSims, Id * Gia_ObjSimWords(p) ); }
557 static inline word * Gia_ObjSimObj( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjSim( p, Gia_ObjId(p, pObj) ); }
558 
559 // AIG construction
560 extern void Gia_ObjAddFanout( Gia_Man_t * p, Gia_Obj_t * pObj, Gia_Obj_t * pFanout );
561 static inline Gia_Obj_t * Gia_ManAppendObj( Gia_Man_t * p )
562 {
563  if ( p->nObjs == p->nObjsAlloc )
564  {
565  int nObjNew = Abc_MinInt( 2 * p->nObjsAlloc, (1 << 29) );
566  if ( p->nObjs == (1 << 29) )
567  printf( "Hard limit on the number of nodes (2^29) is reached. Quitting...\n" ), exit(1);
568  assert( p->nObjs < nObjNew );
569  if ( p->fVerbose )
570  printf("Extending GIA object storage: %d -> %d.\n", p->nObjsAlloc, nObjNew );
571  assert( p->nObjsAlloc > 0 );
572  p->pObjs = ABC_REALLOC( Gia_Obj_t, p->pObjs, nObjNew );
573  memset( p->pObjs + p->nObjsAlloc, 0, sizeof(Gia_Obj_t) * (nObjNew - p->nObjsAlloc) );
574  if ( p->pMuxes )
575  {
576  p->pMuxes = ABC_REALLOC( unsigned, p->pMuxes, nObjNew );
577  memset( p->pMuxes + p->nObjsAlloc, 0, sizeof(unsigned) * (nObjNew - p->nObjsAlloc) );
578  }
579  p->nObjsAlloc = nObjNew;
580  }
581  return Gia_ManObj( p, p->nObjs++ );
582 }
583 static inline int Gia_ManAppendCi( Gia_Man_t * p )
584 {
585  Gia_Obj_t * pObj = Gia_ManAppendObj( p );
586  pObj->fTerm = 1;
587  pObj->iDiff0 = GIA_NONE;
588  pObj->iDiff1 = Vec_IntSize( p->vCis );
589  Vec_IntPush( p->vCis, Gia_ObjId(p, pObj) );
590  return Gia_ObjId( p, pObj ) << 1;
591 }
592 static inline int Gia_ManAppendAnd( Gia_Man_t * p, int iLit0, int iLit1 )
593 {
594  Gia_Obj_t * pObj = Gia_ManAppendObj( p );
595  assert( iLit0 >= 0 && Abc_Lit2Var(iLit0) < Gia_ManObjNum(p) );
596  assert( iLit1 >= 0 && Abc_Lit2Var(iLit1) < Gia_ManObjNum(p) );
597  assert( Abc_Lit2Var(iLit0) != Abc_Lit2Var(iLit1) );
598  if ( iLit0 < iLit1 )
599  {
600  pObj->iDiff0 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit0);
601  pObj->fCompl0 = Abc_LitIsCompl(iLit0);
602  pObj->iDiff1 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit1);
603  pObj->fCompl1 = Abc_LitIsCompl(iLit1);
604  }
605  else
606  {
607  pObj->iDiff1 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit0);
608  pObj->fCompl1 = Abc_LitIsCompl(iLit0);
609  pObj->iDiff0 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit1);
610  pObj->fCompl0 = Abc_LitIsCompl(iLit1);
611  }
612  if ( p->pFanData )
613  {
614  Gia_ObjAddFanout( p, Gia_ObjFanin0(pObj), pObj );
615  Gia_ObjAddFanout( p, Gia_ObjFanin1(pObj), pObj );
616  }
617  if ( p->fSweeper )
618  {
619  Gia_Obj_t * pFan0 = Gia_ObjFanin0(pObj);
620  Gia_Obj_t * pFan1 = Gia_ObjFanin1(pObj);
621  if ( pFan0->fMark0 ) pFan0->fMark1 = 1; else pFan0->fMark0 = 1;
622  if ( pFan1->fMark0 ) pFan1->fMark1 = 1; else pFan1->fMark0 = 1;
623  pObj->fPhase = (Gia_ObjPhase(pFan0) ^ Gia_ObjFaninC0(pObj)) & (Gia_ObjPhase(pFan1) ^ Gia_ObjFaninC1(pObj));
624  }
625  return Gia_ObjId( p, pObj ) << 1;
626 }
627 static inline int Gia_ManAppendAnd2( Gia_Man_t * p, int iLit0, int iLit1 )
628 {
629  if ( iLit0 < 2 )
630  return iLit0 ? iLit1 : 0;
631  if ( iLit1 < 2 )
632  return iLit1 ? iLit0 : 0;
633  if ( iLit0 == iLit1 )
634  return iLit1;
635  if ( iLit0 == Abc_LitNot(iLit1) )
636  return 0;
637  return Gia_ManAppendAnd( p, iLit0, iLit1 );
638 }
639 static inline int Gia_ManAppendXorReal( Gia_Man_t * p, int iLit0, int iLit1 )
640 {
641  Gia_Obj_t * pObj = Gia_ManAppendObj( p );
642  assert( iLit0 >= 0 && Abc_Lit2Var(iLit0) < Gia_ManObjNum(p) );
643  assert( iLit1 >= 0 && Abc_Lit2Var(iLit1) < Gia_ManObjNum(p) );
644  assert( Abc_Lit2Var(iLit0) != Abc_Lit2Var(iLit1) );
645  assert( !Abc_LitIsCompl(iLit0) );
646  assert( !Abc_LitIsCompl(iLit1) );
647  if ( Abc_Lit2Var(iLit0) > Abc_Lit2Var(iLit1) )
648  {
649  pObj->iDiff0 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit0);
650  pObj->fCompl0 = Abc_LitIsCompl(iLit0);
651  pObj->iDiff1 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit1);
652  pObj->fCompl1 = Abc_LitIsCompl(iLit1);
653  }
654  else
655  {
656  pObj->iDiff1 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit0);
657  pObj->fCompl1 = Abc_LitIsCompl(iLit0);
658  pObj->iDiff0 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit1);
659  pObj->fCompl0 = Abc_LitIsCompl(iLit1);
660  }
661  p->nXors++;
662  return Gia_ObjId( p, pObj ) << 1;
663 }
664 static inline int Gia_ManAppendMuxReal( Gia_Man_t * p, int iLitC, int iLit1, int iLit0 )
665 {
666  Gia_Obj_t * pObj = Gia_ManAppendObj( p );
667  assert( p->pMuxes != NULL );
668  assert( iLit0 >= 0 && Abc_Lit2Var(iLit0) < Gia_ManObjNum(p) );
669  assert( iLit1 >= 0 && Abc_Lit2Var(iLit1) < Gia_ManObjNum(p) );
670  assert( iLitC >= 0 && Abc_Lit2Var(iLitC) < Gia_ManObjNum(p) );
671  assert( Abc_Lit2Var(iLit0) != Abc_Lit2Var(iLit1) );
672  assert( Abc_Lit2Var(iLitC) != Abc_Lit2Var(iLit0) );
673  assert( Abc_Lit2Var(iLitC) != Abc_Lit2Var(iLit1) );
674  assert( !p->pHTable || !Abc_LitIsCompl(iLit1) );
675  if ( Abc_Lit2Var(iLit0) < Abc_Lit2Var(iLit1) )
676  {
677  pObj->iDiff0 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit0);
678  pObj->fCompl0 = Abc_LitIsCompl(iLit0);
679  pObj->iDiff1 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit1);
680  pObj->fCompl1 = Abc_LitIsCompl(iLit1);
681  p->pMuxes[Gia_ObjId(p, pObj)] = iLitC;
682  }
683  else
684  {
685  pObj->iDiff1 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit0);
686  pObj->fCompl1 = Abc_LitIsCompl(iLit0);
687  pObj->iDiff0 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit1);
688  pObj->fCompl0 = Abc_LitIsCompl(iLit1);
689  p->pMuxes[Gia_ObjId(p, pObj)] = Abc_LitNot(iLitC);
690  }
691  p->nMuxes++;
692  return Gia_ObjId( p, pObj ) << 1;
693 }
694 static inline int Gia_ManAppendBuf( Gia_Man_t * p, int iLit )
695 {
696  Gia_Obj_t * pObj = Gia_ManAppendObj( p );
697  assert( iLit >= 0 && Abc_Lit2Var(iLit) < Gia_ManObjNum(p) );
698  pObj->iDiff0 = pObj->iDiff1 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit);
699  pObj->fCompl0 = pObj->fCompl1 = Abc_LitIsCompl(iLit);
700  p->nBufs++;
701  return Gia_ObjId( p, pObj ) << 1;
702 }
703 static inline int Gia_ManAppendCo( Gia_Man_t * p, int iLit0 )
704 {
705  Gia_Obj_t * pObj;
706  assert( iLit0 >= 0 && Abc_Lit2Var(iLit0) < Gia_ManObjNum(p) );
707  assert( !Gia_ObjIsCo(Gia_ManObj(p, Abc_Lit2Var(iLit0))) );
708  pObj = Gia_ManAppendObj( p );
709  pObj->fTerm = 1;
710  pObj->iDiff0 = Gia_ObjId(p, pObj) - Abc_Lit2Var(iLit0);
711  pObj->fCompl0 = Abc_LitIsCompl(iLit0);
712  pObj->iDiff1 = Vec_IntSize( p->vCos );
713  Vec_IntPush( p->vCos, Gia_ObjId(p, pObj) );
714  if ( p->pFanData )
715  Gia_ObjAddFanout( p, Gia_ObjFanin0(pObj), pObj );
716  return Gia_ObjId( p, pObj ) << 1;
717 }
718 static inline int Gia_ManAppendOr( Gia_Man_t * p, int iLit0, int iLit1 )
719 {
720  return Abc_LitNot(Gia_ManAppendAnd( p, Abc_LitNot(iLit0), Abc_LitNot(iLit1) ));
721 }
722 static inline int Gia_ManAppendMux( Gia_Man_t * p, int iCtrl, int iData1, int iData0 )
723 {
724  int iTemp0 = Gia_ManAppendAnd( p, Abc_LitNot(iCtrl), iData0 );
725  int iTemp1 = Gia_ManAppendAnd( p, iCtrl, iData1 );
726  return Abc_LitNotCond( Gia_ManAppendAnd( p, Abc_LitNot(iTemp0), Abc_LitNot(iTemp1) ), 1 );
727 }
728 static inline int Gia_ManAppendMaj( Gia_Man_t * p, int iData0, int iData1, int iData2 )
729 {
730  int iTemp0 = Gia_ManAppendOr( p, iData1, iData2 );
731  int iTemp1 = Gia_ManAppendAnd( p, iData0, iTemp0 );
732  int iTemp2 = Gia_ManAppendAnd( p, iData1, iData2 );
733  return Gia_ManAppendOr( p, iTemp1, iTemp2 );
734 }
735 static inline int Gia_ManAppendXor( Gia_Man_t * p, int iLit0, int iLit1 )
736 {
737  return Gia_ManAppendMux( p, iLit0, Abc_LitNot(iLit1), iLit1 );
738 }
739 static inline void Gia_ManPatchCoDriver( Gia_Man_t * p, int iCoIndex, int iLit0 )
740 {
741  Gia_Obj_t * pObjCo = Gia_ManCo( p, iCoIndex );
742  assert( Gia_ObjId(p, pObjCo) > Abc_Lit2Var(iLit0) );
743  pObjCo->iDiff0 = Gia_ObjId(p, pObjCo) - Abc_Lit2Var(iLit0);
744  pObjCo->fCompl0 = Abc_LitIsCompl(iLit0);
745 }
746 
747 #define GIA_ZER 1
748 #define GIA_ONE 2
749 #define GIA_UND 3
750 
751 static inline int Gia_XsimNotCond( int Value, int fCompl )
752 {
753  if ( Value == GIA_UND )
754  return GIA_UND;
755  if ( Value == GIA_ZER + fCompl )
756  return GIA_ZER;
757  return GIA_ONE;
758 }
759 static inline int Gia_XsimAndCond( int Value0, int fCompl0, int Value1, int fCompl1 )
760 {
761  if ( Value0 == GIA_ZER + fCompl0 || Value1 == GIA_ZER + fCompl1 )
762  return GIA_ZER;
763  if ( Value0 == GIA_UND || Value1 == GIA_UND )
764  return GIA_UND;
765  return GIA_ONE;
766 }
767 
768 
769 static inline void Gia_ObjTerSimSetC( Gia_Obj_t * pObj ) { pObj->fMark0 = 0; pObj->fMark1 = 0; }
770 static inline void Gia_ObjTerSimSet0( Gia_Obj_t * pObj ) { pObj->fMark0 = 1; pObj->fMark1 = 0; }
771 static inline void Gia_ObjTerSimSet1( Gia_Obj_t * pObj ) { pObj->fMark0 = 0; pObj->fMark1 = 1; }
772 static inline void Gia_ObjTerSimSetX( Gia_Obj_t * pObj ) { pObj->fMark0 = 1; pObj->fMark1 = 1; }
773 
774 static inline int Gia_ObjTerSimGetC( Gia_Obj_t * pObj ) { return !pObj->fMark0 && !pObj->fMark1; }
775 static inline int Gia_ObjTerSimGet0( Gia_Obj_t * pObj ) { return pObj->fMark0 && !pObj->fMark1; }
776 static inline int Gia_ObjTerSimGet1( Gia_Obj_t * pObj ) { return !pObj->fMark0 && pObj->fMark1; }
777 static inline int Gia_ObjTerSimGetX( Gia_Obj_t * pObj ) { return pObj->fMark0 && pObj->fMark1; }
778 
779 static inline int Gia_ObjTerSimGet0Fanin0( Gia_Obj_t * pObj ) { return (Gia_ObjTerSimGet1(Gia_ObjFanin0(pObj)) && Gia_ObjFaninC0(pObj)) || (Gia_ObjTerSimGet0(Gia_ObjFanin0(pObj)) && !Gia_ObjFaninC0(pObj)); }
780 static inline int Gia_ObjTerSimGet1Fanin0( Gia_Obj_t * pObj ) { return (Gia_ObjTerSimGet0(Gia_ObjFanin0(pObj)) && Gia_ObjFaninC0(pObj)) || (Gia_ObjTerSimGet1(Gia_ObjFanin0(pObj)) && !Gia_ObjFaninC0(pObj)); }
781 
782 static inline int Gia_ObjTerSimGet0Fanin1( Gia_Obj_t * pObj ) { return (Gia_ObjTerSimGet1(Gia_ObjFanin1(pObj)) && Gia_ObjFaninC1(pObj)) || (Gia_ObjTerSimGet0(Gia_ObjFanin1(pObj)) && !Gia_ObjFaninC1(pObj)); }
783 static inline int Gia_ObjTerSimGet1Fanin1( Gia_Obj_t * pObj ) { return (Gia_ObjTerSimGet0(Gia_ObjFanin1(pObj)) && Gia_ObjFaninC1(pObj)) || (Gia_ObjTerSimGet1(Gia_ObjFanin1(pObj)) && !Gia_ObjFaninC1(pObj)); }
784 
785 static inline void Gia_ObjTerSimAnd( Gia_Obj_t * pObj )
786 {
787  assert( Gia_ObjIsAnd(pObj) );
791  Gia_ObjTerSimSet0( pObj );
792  else if ( Gia_ObjTerSimGet1Fanin0(pObj) && Gia_ObjTerSimGet1Fanin1(pObj) )
793  Gia_ObjTerSimSet1( pObj );
794  else
795  Gia_ObjTerSimSetX( pObj );
796 }
797 static inline void Gia_ObjTerSimCo( Gia_Obj_t * pObj )
798 {
799  assert( Gia_ObjIsCo(pObj) );
801  if ( Gia_ObjTerSimGet0Fanin0(pObj) )
802  Gia_ObjTerSimSet0( pObj );
803  else if ( Gia_ObjTerSimGet1Fanin0(pObj) )
804  Gia_ObjTerSimSet1( pObj );
805  else
806  Gia_ObjTerSimSetX( pObj );
807 }
808 static inline void Gia_ObjTerSimRo( Gia_Man_t * p, Gia_Obj_t * pObj )
809 {
810  Gia_Obj_t * pTemp = Gia_ObjRoToRi(p, pObj);
811  assert( Gia_ObjIsRo(p, pObj) );
812  assert( !Gia_ObjTerSimGetC( pTemp ) );
813  pObj->fMark0 = pTemp->fMark0;
814  pObj->fMark1 = pTemp->fMark1;
815 }
816 
817 static inline void Gia_ObjTerSimPrint( Gia_Obj_t * pObj )
818 {
819  if ( Gia_ObjTerSimGet0(pObj) )
820  printf( "0" );
821  else if ( Gia_ObjTerSimGet1(pObj) )
822  printf( "1" );
823  else if ( Gia_ObjTerSimGetX(pObj) )
824  printf( "X" );
825 }
826 
827 static inline int Gia_AigerReadInt( unsigned char * pPos )
828 {
829  int i, Value = 0;
830  for ( i = 0; i < 4; i++ )
831  Value = (Value << 8) | *pPos++;
832  return Value;
833 }
834 static inline void Gia_AigerWriteInt( unsigned char * pPos, int Value )
835 {
836  int i;
837  for ( i = 3; i >= 0; i-- )
838  *pPos++ = (Value >> (8*i)) & 255;
839 }
840 static inline unsigned Gia_AigerReadUnsigned( unsigned char ** ppPos )
841 {
842  unsigned x = 0, i = 0;
843  unsigned char ch;
844  while ((ch = *(*ppPos)++) & 0x80)
845  x |= (ch & 0x7f) << (7 * i++);
846  return x | (ch << (7 * i));
847 }
848 static inline void Gia_AigerWriteUnsigned( Vec_Str_t * vStr, unsigned x )
849 {
850  unsigned char ch;
851  while (x & ~0x7f)
852  {
853  ch = (x & 0x7f) | 0x80;
854  Vec_StrPush( vStr, ch );
855  x >>= 7;
856  }
857  ch = x;
858  Vec_StrPush( vStr, ch );
859 }
860 static inline void Gia_AigerWriteUnsignedFile( FILE * pFile, unsigned x )
861 {
862  unsigned char ch;
863  while (x & ~0x7f)
864  {
865  ch = (x & 0x7f) | 0x80;
866  fputc( ch, pFile );
867  x >>= 7;
868  }
869  ch = x;
870  fputc( ch, pFile );
871 }
872 static inline int Gia_AigerWriteUnsignedBuffer( unsigned char * pBuffer, int Pos, unsigned x )
873 {
874  unsigned char ch;
875  while (x & ~0x7f)
876  {
877  ch = (x & 0x7f) | 0x80;
878  pBuffer[Pos++] = ch;
879  x >>= 7;
880  }
881  ch = x;
882  pBuffer[Pos++] = ch;
883  return Pos;
884 }
885 
886 static inline Gia_Obj_t * Gia_ObjReprObj( Gia_Man_t * p, int Id ) { return p->pReprs[Id].iRepr == GIA_VOID ? NULL : Gia_ManObj( p, p->pReprs[Id].iRepr ); }
887 static inline int Gia_ObjRepr( Gia_Man_t * p, int Id ) { return p->pReprs[Id].iRepr; }
888 static inline void Gia_ObjSetRepr( Gia_Man_t * p, int Id, int Num ) { assert( Num == GIA_VOID || Num < Id ); p->pReprs[Id].iRepr = Num; }
889 static inline void Gia_ObjSetReprRev( Gia_Man_t * p, int Id, int Num ){ assert( Num == GIA_VOID || Num > Id ); p->pReprs[Id].iRepr = Num; }
890 static inline void Gia_ObjUnsetRepr( Gia_Man_t * p, int Id ) { p->pReprs[Id].iRepr = GIA_VOID; }
891 static inline int Gia_ObjHasRepr( Gia_Man_t * p, int Id ) { return p->pReprs[Id].iRepr != GIA_VOID; }
892 static inline int Gia_ObjReprSelf( Gia_Man_t * p, int Id ) { return Gia_ObjHasRepr(p, Id) ? Gia_ObjRepr(p, Id) : Id; }
893 static inline int Gia_ObjSibl( Gia_Man_t * p, int Id ) { return p->pSibls ? p->pSibls[Id] : 0; }
894 static inline Gia_Obj_t * Gia_ObjSiblObj( Gia_Man_t * p, int Id ) { return (p->pSibls && p->pSibls[Id]) ? Gia_ManObj(p, p->pSibls[Id]) : NULL; }
895 
896 static inline int Gia_ObjProved( Gia_Man_t * p, int Id ) { return p->pReprs[Id].fProved; }
897 static inline void Gia_ObjSetProved( Gia_Man_t * p, int Id ) { p->pReprs[Id].fProved = 1; }
898 static inline void Gia_ObjUnsetProved( Gia_Man_t * p, int Id ) { p->pReprs[Id].fProved = 0; }
899 
900 static inline int Gia_ObjFailed( Gia_Man_t * p, int Id ) { return p->pReprs[Id].fFailed; }
901 static inline void Gia_ObjSetFailed( Gia_Man_t * p, int Id ) { p->pReprs[Id].fFailed = 1; }
902 
903 static inline int Gia_ObjColor( Gia_Man_t * p, int Id, int c ) { return c? p->pReprs[Id].fColorB : p->pReprs[Id].fColorA; }
904 static inline int Gia_ObjColors( Gia_Man_t * p, int Id ) { return p->pReprs[Id].fColorB * 2 + p->pReprs[Id].fColorA; }
905 static inline void Gia_ObjSetColor( Gia_Man_t * p, int Id, int c ) { if (c) p->pReprs[Id].fColorB = 1; else p->pReprs[Id].fColorA = 1; }
906 static inline void Gia_ObjSetColors( Gia_Man_t * p, int Id ) { p->pReprs[Id].fColorB = p->pReprs[Id].fColorA = 1; }
907 static inline int Gia_ObjVisitColor( Gia_Man_t * p, int Id, int c ) { int x; if (c) { x = p->pReprs[Id].fColorB; p->pReprs[Id].fColorB = 1; } else { x = p->pReprs[Id].fColorA; p->pReprs[Id].fColorA = 1; } return x; }
908 static inline int Gia_ObjDiffColors( Gia_Man_t * p, int i, int j ) { return (p->pReprs[i].fColorA ^ p->pReprs[j].fColorA) && (p->pReprs[i].fColorB ^ p->pReprs[j].fColorB); }
909 static inline int Gia_ObjDiffColors2( Gia_Man_t * p, int i, int j ) { return (p->pReprs[i].fColorA ^ p->pReprs[j].fColorA) || (p->pReprs[i].fColorB ^ p->pReprs[j].fColorB); }
910 
911 static inline Gia_Obj_t * Gia_ObjNextObj( Gia_Man_t * p, int Id ) { return p->pNexts[Id] == 0 ? NULL : Gia_ManObj( p, p->pNexts[Id] );}
912 static inline int Gia_ObjNext( Gia_Man_t * p, int Id ) { return p->pNexts[Id]; }
913 static inline void Gia_ObjSetNext( Gia_Man_t * p, int Id, int Num ) { p->pNexts[Id] = Num; }
914 
915 static inline int Gia_ObjIsConst( Gia_Man_t * p, int Id ) { return Gia_ObjRepr(p, Id) == 0; }
916 static inline int Gia_ObjIsHead( Gia_Man_t * p, int Id ) { return Gia_ObjRepr(p, Id) == GIA_VOID && Gia_ObjNext(p, Id) > 0; }
917 static inline int Gia_ObjIsNone( Gia_Man_t * p, int Id ) { return Gia_ObjRepr(p, Id) == GIA_VOID && Gia_ObjNext(p, Id) == 0; }
918 static inline int Gia_ObjIsTail( Gia_Man_t * p, int Id ) { return (Gia_ObjRepr(p, Id) > 0 && Gia_ObjRepr(p, Id) != GIA_VOID) && Gia_ObjNext(p, Id) == 0; }
919 static inline int Gia_ObjIsClass( Gia_Man_t * p, int Id ) { return (Gia_ObjRepr(p, Id) > 0 && Gia_ObjRepr(p, Id) != GIA_VOID) || Gia_ObjNext(p, Id) > 0; }
920 static inline int Gia_ObjHasSameRepr( Gia_Man_t * p, int i, int k ) { assert( k ); return i? (Gia_ObjRepr(p, i) == Gia_ObjRepr(p, k) && Gia_ObjRepr(p, i) != GIA_VOID) : Gia_ObjRepr(p, k) == 0; }
921 static inline int Gia_ObjIsFailedPair( Gia_Man_t * p, int i, int k ) { assert( k ); return i? (Gia_ObjFailed(p, i) || Gia_ObjFailed(p, k)) : Gia_ObjFailed(p, k); }
922 static inline int Gia_ClassIsPair( Gia_Man_t * p, int i ) { assert( Gia_ObjIsHead(p, i) ); assert( Gia_ObjNext(p, i) ); return Gia_ObjNext(p, Gia_ObjNext(p, i)) == 0; }
923 static inline void Gia_ClassUndoPair( Gia_Man_t * p, int i ) { assert( Gia_ClassIsPair(p,i) ); Gia_ObjSetRepr(p, Gia_ObjNext(p, i), GIA_VOID); Gia_ObjSetNext(p, i, 0); }
924 
925 #define Gia_ManForEachConst( p, i ) \
926  for ( i = 1; i < Gia_ManObjNum(p); i++ ) if ( !Gia_ObjIsConst(p, i) ) {} else
927 #define Gia_ManForEachClass( p, i ) \
928  for ( i = 1; i < Gia_ManObjNum(p); i++ ) if ( !Gia_ObjIsHead(p, i) ) {} else
929 #define Gia_ManForEachClassReverse( p, i ) \
930  for ( i = Gia_ManObjNum(p) - 1; i > 0; i-- ) if ( !Gia_ObjIsHead(p, i) ) {} else
931 #define Gia_ClassForEachObj( p, i, iObj ) \
932  for ( assert(Gia_ObjIsHead(p, i)), iObj = i; iObj; iObj = Gia_ObjNext(p, iObj) )
933 #define Gia_ClassForEachObj1( p, i, iObj ) \
934  for ( assert(Gia_ObjIsHead(p, i)), iObj = Gia_ObjNext(p, i); iObj; iObj = Gia_ObjNext(p, iObj) )
935 
936 
937 static inline int Gia_ObjFoffsetId( Gia_Man_t * p, int Id ) { return Vec_IntEntry( p->vFanout, Id ); }
938 static inline int Gia_ObjFoffset( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjFoffsetId( p, Gia_ObjId(p, pObj) ); }
939 static inline int Gia_ObjFanoutNumId( Gia_Man_t * p, int Id ) { return Vec_IntEntry( p->vFanoutNums, Id ); }
940 static inline int Gia_ObjFanoutNum( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjFanoutNumId( p, Gia_ObjId(p, pObj) ); }
941 static inline int Gia_ObjFanoutId( Gia_Man_t * p, int Id, int i ) { return Vec_IntEntry( p->vFanout, Gia_ObjFoffsetId(p, Id) + i ); }
942 static inline Gia_Obj_t * Gia_ObjFanout0( Gia_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ManObj( p, Gia_ObjFanoutId(p, Gia_ObjId(p, pObj), 0) ); }
943 static inline Gia_Obj_t * Gia_ObjFanout( Gia_Man_t * p, Gia_Obj_t * pObj, int i ) { return Gia_ManObj( p, Gia_ObjFanoutId(p, Gia_ObjId(p, pObj), i) ); }
944 static inline void Gia_ObjSetFanout( Gia_Man_t * p, Gia_Obj_t * pObj, int i, Gia_Obj_t * pFan ) { Vec_IntWriteEntry( p->vFanout, Gia_ObjFoffset(p, pObj) + i, Gia_ObjId(p, pFan) ); }
945 
946 #define Gia_ObjForEachFanoutStatic( p, pObj, pFanout, i ) \
947  for ( i = 0; (i < Gia_ObjFanoutNum(p, pObj)) && (((pFanout) = Gia_ObjFanout(p, pObj, i)), 1); i++ )
948 #define Gia_ObjForEachFanoutStaticId( p, Id, FanId, i ) \
949  for ( i = 0; (i < Gia_ObjFanoutNumId(p, Id)) && (((FanId) = Gia_ObjFanoutId(p, Id, i)), 1); i++ )
950 
951 static inline int Gia_ManHasMapping( Gia_Man_t * p ) { return p->vMapping != NULL; }
952 static inline int Gia_ObjIsLut( Gia_Man_t * p, int Id ) { return Vec_IntEntry(p->vMapping, Id) != 0; }
953 static inline int Gia_ObjLutSize( Gia_Man_t * p, int Id ) { return Vec_IntEntry(p->vMapping, Vec_IntEntry(p->vMapping, Id)); }
954 static inline int * Gia_ObjLutFanins( Gia_Man_t * p, int Id ) { return Vec_IntEntryP(p->vMapping, Vec_IntEntry(p->vMapping, Id)) + 1; }
955 static inline int Gia_ObjLutFanin( Gia_Man_t * p, int Id, int i ) { return Gia_ObjLutFanins(p, Id)[i]; }
956 static inline int Gia_ObjLutMuxId( Gia_Man_t * p, int Id ) { return Gia_ObjLutFanins(p, Id)[Gia_ObjLutSize(p, Id)]; }
957 static inline int Gia_ObjLutIsMux( Gia_Man_t * p, int Id ) { return (int)(Gia_ObjLutMuxId(p, Id) < 0); }
958 
959 static inline int Gia_ManHasCellMapping( Gia_Man_t * p ) { return p->vCellMapping != NULL; }
960 static inline int Gia_ObjIsCell( Gia_Man_t * p, int iLit ) { return Vec_IntEntry(p->vCellMapping, iLit) != 0; }
961 static inline int Gia_ObjIsCellInv( Gia_Man_t * p, int iLit ) { return Vec_IntEntry(p->vCellMapping, iLit) == -1; }
962 static inline int Gia_ObjIsCellBuf( Gia_Man_t * p, int iLit ) { return Vec_IntEntry(p->vCellMapping, iLit) == -2; }
963 static inline int Gia_ObjCellSize( Gia_Man_t * p, int iLit ) { return Vec_IntEntry(p->vCellMapping, Vec_IntEntry(p->vCellMapping, iLit)); }
964 static inline int * Gia_ObjCellFanins( Gia_Man_t * p, int iLit ) { return Vec_IntEntryP(p->vCellMapping, Vec_IntEntry(p->vCellMapping, iLit))+1; }
965 static inline int Gia_ObjCellFanin( Gia_Man_t * p, int iLit, int i ){ return Gia_ObjCellFanins(p, iLit)[i]; }
966 static inline int Gia_ObjCellId( Gia_Man_t * p, int iLit ) { return Gia_ObjCellFanins(p, iLit)[Gia_ObjCellSize(p, iLit)]; }
967 
968 #define Gia_ManForEachLut( p, i ) \
969  for ( i = 1; i < Gia_ManObjNum(p); i++ ) if ( !Gia_ObjIsLut(p, i) ) {} else
970 #define Gia_LutForEachFanin( p, i, iFan, k ) \
971  for ( k = 0; k < Gia_ObjLutSize(p,i) && ((iFan = Gia_ObjLutFanins(p,i)[k]),1); k++ )
972 #define Gia_LutForEachFaninObj( p, i, pFanin, k ) \
973  for ( k = 0; k < Gia_ObjLutSize(p,i) && ((pFanin = Gia_ManObj(p, Gia_ObjLutFanins(p,i)[k])),1); k++ )
974 
975 #define Gia_ManForEachCell( p, i ) \
976  for ( i = 2; i < 2*Gia_ManObjNum(p); i++ ) if ( !Gia_ObjIsCell(p, i) ) {} else
977 #define Gia_CellForEachFanin( p, i, iFanLit, k ) \
978  for ( k = 0; k < Gia_ObjCellSize(p,i) && ((iFanLit = Gia_ObjCellFanins(p,i)[k]),1); k++ )
979 
980 ////////////////////////////////////////////////////////////////////////
981 /// MACRO DEFINITIONS ///
982 ////////////////////////////////////////////////////////////////////////
983 
984 #define Gia_ManForEachObj( p, pObj, i ) \
985  for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ )
986 #define Gia_ManForEachObj1( p, pObj, i ) \
987  for ( i = 1; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ )
988 #define Gia_ManForEachObjVec( vVec, p, pObj, i ) \
989  for ( i = 0; (i < Vec_IntSize(vVec)) && ((pObj) = Gia_ManObj(p, Vec_IntEntry(vVec,i))); i++ )
990 #define Gia_ManForEachObjVecReverse( vVec, p, pObj, i ) \
991  for ( i = Vec_IntSize(vVec) - 1; (i >= 0) && ((pObj) = Gia_ManObj(p, Vec_IntEntry(vVec,i))); i-- )
992 #define Gia_ManForEachObjVecLit( vVec, p, pObj, fCompl, i ) \
993  for ( i = 0; (i < Vec_IntSize(vVec)) && ((pObj) = Gia_ManObj(p, Abc_Lit2Var(Vec_IntEntry(vVec,i)))) && (((fCompl) = Abc_LitIsCompl(Vec_IntEntry(vVec,i))),1); i++ )
994 #define Gia_ManForEachObjReverse( p, pObj, i ) \
995  for ( i = p->nObjs - 1; (i >= 0) && ((pObj) = Gia_ManObj(p, i)); i-- )
996 #define Gia_ManForEachObjReverse1( p, pObj, i ) \
997  for ( i = p->nObjs - 1; (i > 0) && ((pObj) = Gia_ManObj(p, i)); i-- )
998 #define Gia_ManForEachBuf( p, pObj, i ) \
999  for ( i = Gia_ManBufNum(p) ? 0 : p->nObjs; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsBuf(pObj) ) {} else
1000 #define Gia_ManForEachBufId( p, i ) \
1001  for ( i = 0; (i < p->nObjs); i++ ) if ( !Gia_ObjIsBuf(Gia_ManObj(p, i)) ) {} else
1002 #define Gia_ManForEachAnd( p, pObj, i ) \
1003  for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsAnd(pObj) ) {} else
1004 #define Gia_ManForEachAndId( p, i ) \
1005  for ( i = 0; (i < p->nObjs); i++ ) if ( !Gia_ObjIsAnd(Gia_ManObj(p, i)) ) {} else
1006 #define Gia_ManForEachMuxId( p, i ) \
1007  for ( i = 0; (i < p->nObjs); i++ ) if ( !Gia_ObjIsMuxId(p, i) ) {} else
1008 #define Gia_ManForEachCand( p, pObj, i ) \
1009  for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsCand(pObj) ) {} else
1010 #define Gia_ManForEachAndReverse( p, pObj, i ) \
1011  for ( i = p->nObjs - 1; (i > 0) && ((pObj) = Gia_ManObj(p, i)); i-- ) if ( !Gia_ObjIsAnd(pObj) ) {} else
1012 #define Gia_ManForEachAndReverseId( p, i ) \
1013  for ( i = p->nObjs - 1; (i > 0); i-- ) if ( !Gia_ObjIsAnd(Gia_ManObj(p, i)) ) {} else
1014 #define Gia_ManForEachMux( p, pObj, i ) \
1015  for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsMuxId(p, i) ) {} else
1016 #define Gia_ManForEachCi( p, pObj, i ) \
1017  for ( i = 0; (i < Vec_IntSize(p->vCis)) && ((pObj) = Gia_ManCi(p, i)); i++ )
1018 #define Gia_ManForEachCiId( p, Id, i ) \
1019  for ( i = 0; (i < Vec_IntSize(p->vCis)) && ((Id) = Gia_ObjId(p, Gia_ManCi(p, i))); i++ )
1020 #define Gia_ManForEachCiReverse( p, pObj, i ) \
1021  for ( i = Vec_IntSize(p->vCis) - 1; (i >= 0) && ((pObj) = Gia_ManCi(p, i)); i-- )
1022 #define Gia_ManForEachCo( p, pObj, i ) \
1023  for ( i = 0; (i < Vec_IntSize(p->vCos)) && ((pObj) = Gia_ManCo(p, i)); i++ )
1024 #define Gia_ManForEachCoVec( vVec, p, pObj, i ) \
1025  for ( i = 0; (i < Vec_IntSize(vVec)) && ((pObj) = Gia_ManCo(p, Vec_IntEntry(vVec,i))); i++ )
1026 #define Gia_ManForEachCoId( p, Id, i ) \
1027  for ( i = 0; (i < Vec_IntSize(p->vCos)) && ((Id) = Gia_ObjId(p, Gia_ManCo(p, i))); i++ )
1028 #define Gia_ManForEachCoReverse( p, pObj, i ) \
1029  for ( i = Vec_IntSize(p->vCos) - 1; (i >= 0) && ((pObj) = Gia_ManCo(p, i)); i-- )
1030 #define Gia_ManForEachCoDriver( p, pObj, i ) \
1031  for ( i = 0; (i < Vec_IntSize(p->vCos)) && ((pObj) = Gia_ObjFanin0(Gia_ManCo(p, i))); i++ )
1032 #define Gia_ManForEachCoDriverId( p, DriverId, i ) \
1033  for ( i = 0; (i < Vec_IntSize(p->vCos)) && (((DriverId) = Gia_ObjFaninId0p(p, Gia_ManCo(p, i))), 1); i++ )
1034 #define Gia_ManForEachPi( p, pObj, i ) \
1035  for ( i = 0; (i < Gia_ManPiNum(p)) && ((pObj) = Gia_ManCi(p, i)); i++ )
1036 #define Gia_ManForEachPo( p, pObj, i ) \
1037  for ( i = 0; (i < Gia_ManPoNum(p)) && ((pObj) = Gia_ManCo(p, i)); i++ )
1038 #define Gia_ManForEachRo( p, pObj, i ) \
1039  for ( i = 0; (i < Gia_ManRegNum(p)) && ((pObj) = Gia_ManCi(p, Gia_ManPiNum(p)+i)); i++ )
1040 #define Gia_ManForEachRi( p, pObj, i ) \
1041  for ( i = 0; (i < Gia_ManRegNum(p)) && ((pObj) = Gia_ManCo(p, Gia_ManPoNum(p)+i)); i++ )
1042 #define Gia_ManForEachRiRo( p, pObjRi, pObjRo, i ) \
1043  for ( i = 0; (i < Gia_ManRegNum(p)) && ((pObjRi) = Gia_ManCo(p, Gia_ManPoNum(p)+i)) && ((pObjRo) = Gia_ManCi(p, Gia_ManPiNum(p)+i)); i++ )
1044 
1045 ////////////////////////////////////////////////////////////////////////
1046 /// FUNCTION DECLARATIONS ///
1047 ////////////////////////////////////////////////////////////////////////
1048 
1049 /*=== giaAiger.c ===========================================================*/
1050 extern int Gia_FileSize( char * pFileName );
1051 extern Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fSkipStrash, int fCheck );
1052 extern Gia_Man_t * Gia_AigerRead( char * pFileName, int fSkipStrash, int fCheck );
1053 extern void Gia_AigerWrite( Gia_Man_t * p, char * pFileName, int fWriteSymbols, int fCompact );
1054 extern void Gia_DumpAiger( Gia_Man_t * p, char * pFilePrefix, int iFileNum, int nFileNumDigits );
1056 extern Vec_Str_t * Gia_AigerWriteIntoMemoryStrPart( Gia_Man_t * p, Vec_Int_t * vCis, Vec_Int_t * vAnds, Vec_Int_t * vCos, int nRegs );
1057 extern void Gia_AigerWriteSimple( Gia_Man_t * pInit, char * pFileName );
1058 /*=== giaBalance.c ===========================================================*/
1059 extern Gia_Man_t * Gia_ManBalance( Gia_Man_t * p, int fSimpleAnd, int fVerbose );
1060 extern Gia_Man_t * Gia_ManAreaBalance( Gia_Man_t * p, int fSimpleAnd, int nNewNodesMax, int fVerbose, int fVeryVerbose );
1061 extern Gia_Man_t * Gia_ManAigSyn2( Gia_Man_t * p, int fOldAlgo, int fCoarsen, int fCutMin, int nRelaxRatio, int fDelayMin, int fVerbose, int fVeryVerbose );
1062 extern Gia_Man_t * Gia_ManAigSyn3( Gia_Man_t * p, int fVerbose, int fVeryVerbose );
1063 extern Gia_Man_t * Gia_ManAigSyn4( Gia_Man_t * p, int fVerbose, int fVeryVerbose );
1064 /*=== giaBidec.c ===========================================================*/
1065 extern unsigned * Gia_ManConvertAigToTruth( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_Int_t * vLeaves, Vec_Int_t * vTruth, Vec_Int_t * vVisited );
1066 extern Gia_Man_t * Gia_ManPerformBidec( Gia_Man_t * p, int fVerbose );
1067 /*=== giaCex.c ============================================================*/
1068 extern int Gia_ManVerifyCex( Gia_Man_t * pAig, Abc_Cex_t * p, int fDualOut );
1069 extern int Gia_ManFindFailedPoCex( Gia_Man_t * pAig, Abc_Cex_t * p, int nOutputs );
1070 extern int Gia_ManSetFailedPoCex( Gia_Man_t * pAig, Abc_Cex_t * p );
1071 extern void Gia_ManCounterExampleValueStart( Gia_Man_t * pGia, Abc_Cex_t * pCex );
1072 extern void Gia_ManCounterExampleValueStop( Gia_Man_t * pGia );
1073 extern int Gia_ManCounterExampleValueLookup( Gia_Man_t * pGia, int Id, int iFrame );
1076 /*=== giaCsatOld.c ============================================================*/
1077 extern Vec_Int_t * Cbs_ManSolveMiter( Gia_Man_t * pGia, int nConfs, Vec_Str_t ** pvStatus, int fVerbose );
1078 /*=== giaCsat.c ============================================================*/
1079 extern Vec_Int_t * Cbs_ManSolveMiterNc( Gia_Man_t * pGia, int nConfs, Vec_Str_t ** pvStatus, int fVerbose );
1080 /*=== giaCTas.c ============================================================*/
1081 extern Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pGia, int nConfs, Vec_Str_t ** pvStatus, int fVerbose );
1082 /*=== giaCof.c =============================================================*/
1083 extern void Gia_ManPrintFanio( Gia_Man_t * pGia, int nNodes );
1084 extern Gia_Man_t * Gia_ManDupCof( Gia_Man_t * p, int iVar );
1085 extern Gia_Man_t * Gia_ManDupCofAllInt( Gia_Man_t * p, Vec_Int_t * vSigs, int fVerbose );
1086 extern Gia_Man_t * Gia_ManDupCofAll( Gia_Man_t * p, int nFanLim, int fVerbose );
1087 /*=== giaDfs.c ============================================================*/
1088 extern void Gia_ManCollectCis( Gia_Man_t * p, int * pNodes, int nNodes, Vec_Int_t * vSupp );
1089 extern void Gia_ManCollectAnds( Gia_Man_t * p, int * pNodes, int nNodes, Vec_Int_t * vNodes );
1090 extern Vec_Int_t * Gia_ManCollectNodesCis( Gia_Man_t * p, int * pNodes, int nNodes );
1091 extern int Gia_ManSuppSize( Gia_Man_t * p, int * pNodes, int nNodes );
1092 extern int Gia_ManConeSize( Gia_Man_t * p, int * pNodes, int nNodes );
1093 extern Vec_Vec_t * Gia_ManLevelize( Gia_Man_t * p );
1095 /*=== giaDup.c ============================================================*/
1096 extern void Gia_ManDupRemapEquiv( Gia_Man_t * pNew, Gia_Man_t * p );
1097 extern Gia_Man_t * Gia_ManDupOrderDfs( Gia_Man_t * p );
1100 extern Gia_Man_t * Gia_ManDupOutputGroup( Gia_Man_t * p, int iOutStart, int iOutStop );
1101 extern Gia_Man_t * Gia_ManDupOutputVec( Gia_Man_t * p, Vec_Int_t * vOutPres );
1102 extern Gia_Man_t * Gia_ManDupSelectedOutputs( Gia_Man_t * p, Vec_Int_t * vOutsLeft );
1104 extern Gia_Man_t * Gia_ManDupLastPis( Gia_Man_t * p, int nLastPis );
1105 extern Gia_Man_t * Gia_ManDupFlip( Gia_Man_t * p, int * pInitState );
1106 extern Gia_Man_t * Gia_ManDupCycled( Gia_Man_t * pAig, Abc_Cex_t * pCex, int nFrames );
1107 extern Gia_Man_t * Gia_ManDup( Gia_Man_t * p );
1109 extern Gia_Man_t * Gia_ManDupZero( Gia_Man_t * p );
1110 extern Gia_Man_t * Gia_ManDupPerm( Gia_Man_t * p, Vec_Int_t * vPiPerm );
1111 extern Gia_Man_t * Gia_ManDupPermFlop( Gia_Man_t * p, Vec_Int_t * vFfPerm );
1112 extern Gia_Man_t * Gia_ManDupPermFlopGap( Gia_Man_t * p, Vec_Int_t * vFfPerm );
1113 extern void Gia_ManDupAppend( Gia_Man_t * p, Gia_Man_t * pTwo );
1114 extern void Gia_ManDupAppendShare( Gia_Man_t * p, Gia_Man_t * pTwo );
1115 extern Gia_Man_t * Gia_ManDupAppendNew( Gia_Man_t * pOne, Gia_Man_t * pTwo );
1116 extern Gia_Man_t * Gia_ManDupAppendCones( Gia_Man_t * p, Gia_Man_t ** ppCones, int nCones, int fOnlyRegs );
1117 extern Gia_Man_t * Gia_ManDupSelf( Gia_Man_t * p );
1118 extern Gia_Man_t * Gia_ManDupFlopClass( Gia_Man_t * p, int iClass );
1119 extern Gia_Man_t * Gia_ManDupMarked( Gia_Man_t * p );
1120 extern Gia_Man_t * Gia_ManDupTimes( Gia_Man_t * p, int nTimes );
1121 extern Gia_Man_t * Gia_ManDupDfs( Gia_Man_t * p );
1122 extern Gia_Man_t * Gia_ManDupCofactorVar( Gia_Man_t * p, int iVar, int Value );
1123 extern Gia_Man_t * Gia_ManDupCofactorObj( Gia_Man_t * p, int iObj, int Value );
1124 extern Gia_Man_t * Gia_ManDupExist( Gia_Man_t * p, int iVar );
1125 extern Gia_Man_t * Gia_ManDupDfsSkip( Gia_Man_t * p );
1126 extern Gia_Man_t * Gia_ManDupDfsCone( Gia_Man_t * p, Gia_Obj_t * pObj );
1127 extern Gia_Man_t * Gia_ManDupDfsNode( Gia_Man_t * p, Gia_Obj_t * pObj );
1128 extern Gia_Man_t * Gia_ManDupDfsLitArray( Gia_Man_t * p, Vec_Int_t * vLits );
1129 extern Gia_Man_t * Gia_ManDupTrimmed( Gia_Man_t * p, int fTrimCis, int fTrimCos, int fDualOut, int OutValue );
1130 extern Gia_Man_t * Gia_ManDupOntop( Gia_Man_t * p, Gia_Man_t * p2 );
1131 extern Gia_Man_t * Gia_ManDupWithNewPo( Gia_Man_t * p1, Gia_Man_t * p2 );
1132 extern Gia_Man_t * Gia_ManDupDfsCiMap( Gia_Man_t * p, int * pCi2Lit, Vec_Int_t * vLits );
1134 extern Gia_Man_t * Gia_ManDupTopAnd( Gia_Man_t * p, int fVerbose );
1135 extern Gia_Man_t * Gia_ManMiter( Gia_Man_t * pAig0, Gia_Man_t * pAig1, int nInsDup, int fDualOut, int fSeq, int fImplic, int fVerbose );
1136 extern Gia_Man_t * Gia_ManDupAndOr( Gia_Man_t * p, int nOuts, int fUseOr, int fCompl );
1137 extern Gia_Man_t * Gia_ManDupZeroUndc( Gia_Man_t * p, char * pInit, int fVerbose );
1138 extern Gia_Man_t * Gia_ManMiter2( Gia_Man_t * p, char * pInit, int fVerbose );
1141 extern Gia_Man_t * Gia_ManChoiceMiter( Vec_Ptr_t * vGias );
1142 extern Gia_Man_t * Gia_ManDupWithConstraints( Gia_Man_t * p, Vec_Int_t * vPoTypes );
1143 extern Gia_Man_t * Gia_ManDupCones( Gia_Man_t * p, int * pPos, int nPos, int fTrimPis );
1144 extern Gia_Man_t * Gia_ManDupOneHot( Gia_Man_t * p );
1146 extern Gia_Man_t * Gia_ManDupFromVecs( Gia_Man_t * p, Vec_Int_t * vCis, Vec_Int_t * vAnds, Vec_Int_t * vCos, int nRegs );
1147 extern Gia_Man_t * Gia_ManDupSliced( Gia_Man_t * p, int nSuppMax );
1148 /*=== giaEnable.c ==========================================================*/
1149 extern void Gia_ManDetectSeqSignals( Gia_Man_t * p, int fSetReset, int fVerbose );
1150 extern Gia_Man_t * Gia_ManUnrollAndCofactor( Gia_Man_t * p, int nFrames, int nFanMax, int fVerbose );
1152 /*=== giaEquiv.c ==========================================================*/
1153 extern void Gia_ManEquivFixOutputPairs( Gia_Man_t * p );
1154 extern int Gia_ManCheckTopoOrder( Gia_Man_t * p );
1155 extern int * Gia_ManDeriveNexts( Gia_Man_t * p );
1156 extern void Gia_ManDeriveReprs( Gia_Man_t * p );
1157 extern int Gia_ManEquivCountLits( Gia_Man_t * p );
1158 extern int Gia_ManEquivCountLitsAll( Gia_Man_t * p );
1159 extern int Gia_ManEquivCountClasses( Gia_Man_t * p );
1160 extern void Gia_ManEquivPrintOne( Gia_Man_t * p, int i, int Counter );
1161 extern void Gia_ManEquivPrintClasses( Gia_Man_t * p, int fVerbose, float Mem );
1162 extern Gia_Man_t * Gia_ManEquivReduce( Gia_Man_t * p, int fUseAll, int fDualOut, int fSkipPhase, int fVerbose );
1163 extern Gia_Man_t * Gia_ManEquivReduceAndRemap( Gia_Man_t * p, int fSeq, int fMiterPairs );
1164 extern int Gia_ManEquivSetColors( Gia_Man_t * p, int fVerbose );
1165 extern Gia_Man_t * Gia_ManSpecReduce( Gia_Man_t * p, int fDualOut, int fSynthesis, int fReduce, int fSkipSome, int fVerbose );
1166 extern Gia_Man_t * Gia_ManSpecReduceInit( Gia_Man_t * p, Abc_Cex_t * pInit, int nFrames, int fDualOut );
1167 extern Gia_Man_t * Gia_ManSpecReduceInitFrames( Gia_Man_t * p, Abc_Cex_t * pInit, int nFramesMax, int * pnFrames, int fDualOut, int nMinOutputs );
1168 extern void Gia_ManEquivTransform( Gia_Man_t * p, int fVerbose );
1169 extern void Gia_ManEquivImprove( Gia_Man_t * p );
1170 extern Gia_Man_t * Gia_ManEquivToChoices( Gia_Man_t * p, int nSnapshots );
1171 extern int Gia_ManCountChoiceNodes( Gia_Man_t * p );
1172 extern int Gia_ManCountChoices( Gia_Man_t * p );
1173 extern int Gia_ManFilterEquivsForSpeculation( Gia_Man_t * pGia, char * pName1, char * pName2, int fLatchA, int fLatchB );
1174 extern int Gia_ManFilterEquivsUsingParts( Gia_Man_t * pGia, char * pName1, char * pName2 );
1175 extern void Gia_ManFilterEquivsUsingLatches( Gia_Man_t * pGia, int fFlopsOnly, int fFlopsWith, int fUseRiDrivers );
1176 /*=== giaFanout.c =========================================================*/
1177 extern void Gia_ObjAddFanout( Gia_Man_t * p, Gia_Obj_t * pObj, Gia_Obj_t * pFanout );
1178 extern void Gia_ObjRemoveFanout( Gia_Man_t * p, Gia_Obj_t * pObj, Gia_Obj_t * pFanout );
1179 extern void Gia_ManFanoutStart( Gia_Man_t * p );
1180 extern void Gia_ManFanoutStop( Gia_Man_t * p );
1181 extern void Gia_ManStaticFanoutStart( Gia_Man_t * p );
1182 extern void Gia_ManStaticFanoutStop( Gia_Man_t * p );
1183 /*=== giaForce.c =========================================================*/
1184 extern void For_ManExperiment( Gia_Man_t * pGia, int nIters, int fClustered, int fVerbose );
1185 /*=== giaFrames.c =========================================================*/
1186 extern Gia_Man_t * Gia_ManUnrollDup( Gia_Man_t * p, Vec_Int_t * vLimit );
1187 extern Vec_Ptr_t * Gia_ManUnrollAbs( Gia_Man_t * p, int nFrames );
1188 extern void * Gia_ManUnrollStart( Gia_Man_t * pAig, Gia_ParFra_t * pPars );
1189 extern void * Gia_ManUnrollAdd( void * pMan, int fMax );
1190 extern void Gia_ManUnrollStop( void * pMan );
1191 extern int Gia_ManUnrollLastLit( void * pMan );
1192 extern void Gia_ManFraSetDefaultParams( Gia_ParFra_t * p );
1193 extern Gia_Man_t * Gia_ManFrames( Gia_Man_t * pAig, Gia_ParFra_t * pPars );
1194 extern Gia_Man_t * Gia_ManFramesInitSpecial( Gia_Man_t * pAig, int nFrames, int fVerbose );
1195 /*=== giaFront.c ==========================================================*/
1196 extern Gia_Man_t * Gia_ManFront( Gia_Man_t * p );
1197 extern void Gia_ManFrontTest( Gia_Man_t * p );
1198 /*=== giaFx.c ==========================================================*/
1199 extern Gia_Man_t * Gia_ManPerformFx( Gia_Man_t * p, int nNewNodesMax, int LitCountMax, int fReverse, int fVerbose, int fVeryVerbose );
1200 /*=== giaHash.c ===========================================================*/
1201 extern void Gia_ManHashAlloc( Gia_Man_t * p );
1202 extern void Gia_ManHashStart( Gia_Man_t * p );
1203 extern void Gia_ManHashStop( Gia_Man_t * p );
1204 extern int Gia_ManHashXorReal( Gia_Man_t * p, int iLit0, int iLit1 );
1205 extern int Gia_ManHashMuxReal( Gia_Man_t * p, int iLitC, int iLit1, int iLit0 );
1206 extern int Gia_ManHashAnd( Gia_Man_t * p, int iLit0, int iLit1 );
1207 extern int Gia_ManHashOr( Gia_Man_t * p, int iLit0, int iLit1 );
1208 extern int Gia_ManHashXor( Gia_Man_t * p, int iLit0, int iLit1 );
1209 extern int Gia_ManHashMux( Gia_Man_t * p, int iCtrl, int iData1, int iData0 );
1210 extern int Gia_ManHashMaj( Gia_Man_t * p, int iData0, int iData1, int iData2 );
1211 extern int Gia_ManHashAndTry( Gia_Man_t * p, int iLit0, int iLit1 );
1212 extern Gia_Man_t * Gia_ManRehash( Gia_Man_t * p, int fAddStrash );
1213 extern void Gia_ManHashProfile( Gia_Man_t * p );
1214 extern int Gia_ManHashLookup( Gia_Man_t * p, Gia_Obj_t * p0, Gia_Obj_t * p1 );
1215 extern int Gia_ManHashAndMulti( Gia_Man_t * p, Vec_Int_t * vLits );
1216 /*=== giaIf.c ===========================================================*/
1217 extern void Gia_ManPrintMappingStats( Gia_Man_t * p, char * pDumpFile );
1218 extern void Gia_ManPrintPackingStats( Gia_Man_t * p );
1219 extern void Gia_ManPrintLutStats( Gia_Man_t * p );
1220 extern int Gia_ManLutFaninCount( Gia_Man_t * p );
1221 extern int Gia_ManLutSizeMax( Gia_Man_t * p );
1222 extern int Gia_ManLutNum( Gia_Man_t * p );
1223 extern int Gia_ManLutLevel( Gia_Man_t * p );
1224 extern void Gia_ManLutParams( Gia_Man_t * p, int * pnCurLuts, int * pnCurEdges, int * pnCurLevels );
1225 extern void Gia_ManSetRefsMapped( Gia_Man_t * p );
1226 extern void Gia_ManSetIfParsDefault( void * pIfPars );
1227 extern void Gia_ManMappingVerify( Gia_Man_t * p );
1228 extern void Gia_ManTransferMapping( Gia_Man_t * p, Gia_Man_t * pGia );
1229 extern void Gia_ManTransferPacking( Gia_Man_t * p, Gia_Man_t * pGia );
1230 extern void Gia_ManTransferTiming( Gia_Man_t * p, Gia_Man_t * pGia );
1231 extern Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pIfPars );
1232 extern Gia_Man_t * Gia_ManPerformSopBalance( Gia_Man_t * p, int nCutNum, int nRelaxRatio, int fVerbose );
1233 extern Gia_Man_t * Gia_ManPerformDsdBalance( Gia_Man_t * p, int nLutSize, int nCutNum, int nRelaxRatio, int fVerbose );
1234 /*=== giaJf.c ===========================================================*/
1235 extern void Jf_ManSetDefaultPars( Jf_Par_t * pPars );
1236 extern Gia_Man_t * Jf_ManPerformMapping( Gia_Man_t * pGia, Jf_Par_t * pPars );
1237 extern Gia_Man_t * Jf_ManDeriveCnf( Gia_Man_t * p, int fCnfObjIds );
1238 /*=== giaIso.c ===========================================================*/
1239 extern Gia_Man_t * Gia_ManIsoCanonicize( Gia_Man_t * p, int fVerbose );
1240 extern Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * p, Vec_Ptr_t ** pvPosEquivs, Vec_Ptr_t ** pvPiPerms, int fEstimate, int fDualOut, int fVerbose, int fVeryVerbose );
1241 extern Gia_Man_t * Gia_ManIsoReduce2( Gia_Man_t * p, Vec_Ptr_t ** pvPosEquivs, Vec_Ptr_t ** pvPiPerms, int fEstimate, int fBetterQual, int fDualOut, int fVerbose, int fVeryVerbose );
1242 /*=== giaLf.c ===========================================================*/
1243 extern void Lf_ManSetDefaultPars( Jf_Par_t * pPars );
1244 extern Gia_Man_t * Lf_ManPerformMapping( Gia_Man_t * pGia, Jf_Par_t * pPars );
1245 extern Gia_Man_t * Gia_ManPerformLfMapping( Gia_Man_t * p, Jf_Par_t * pPars, int fNormalized );
1246 /*=== giaLogic.c ===========================================================*/
1247 extern void Gia_ManTestDistance( Gia_Man_t * p );
1248 extern void Gia_ManSolveProblem( Gia_Man_t * pGia, Emb_Par_t * pPars );
1249  /*=== giaMan.c ===========================================================*/
1250 extern Gia_Man_t * Gia_ManStart( int nObjsMax );
1251 extern void Gia_ManStop( Gia_Man_t * p );
1252 extern void Gia_ManStopP( Gia_Man_t ** p );
1253 extern double Gia_ManMemory( Gia_Man_t * p );
1254 extern void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars );
1255 extern void Gia_ManPrintStatsShort( Gia_Man_t * p );
1256 extern void Gia_ManPrintMiterStatus( Gia_Man_t * p );
1257 extern void Gia_ManPrintStatsMiter( Gia_Man_t * p, int fVerbose );
1258 extern void Gia_ManSetRegNum( Gia_Man_t * p, int nRegs );
1259 extern void Gia_ManReportImprovement( Gia_Man_t * p, Gia_Man_t * pNew );
1260 extern void Gia_ManPrintNpnClasses( Gia_Man_t * p );
1261 /*=== giaMem.c ===========================================================*/
1262 extern Gia_MmFixed_t * Gia_MmFixedStart( int nEntrySize, int nEntriesMax );
1263 extern void Gia_MmFixedStop( Gia_MmFixed_t * p, int fVerbose );
1264 extern char * Gia_MmFixedEntryFetch( Gia_MmFixed_t * p );
1265 extern void Gia_MmFixedEntryRecycle( Gia_MmFixed_t * p, char * pEntry );
1266 extern void Gia_MmFixedRestart( Gia_MmFixed_t * p );
1267 extern int Gia_MmFixedReadMemUsage( Gia_MmFixed_t * p );
1269 extern Gia_MmFlex_t * Gia_MmFlexStart();
1270 extern void Gia_MmFlexStop( Gia_MmFlex_t * p, int fVerbose );
1271 extern char * Gia_MmFlexEntryFetch( Gia_MmFlex_t * p, int nBytes );
1272 extern void Gia_MmFlexRestart( Gia_MmFlex_t * p );
1273 extern int Gia_MmFlexReadMemUsage( Gia_MmFlex_t * p );
1274 extern Gia_MmStep_t * Gia_MmStepStart( int nSteps );
1275 extern void Gia_MmStepStop( Gia_MmStep_t * p, int fVerbose );
1276 extern char * Gia_MmStepEntryFetch( Gia_MmStep_t * p, int nBytes );
1277 extern void Gia_MmStepEntryRecycle( Gia_MmStep_t * p, char * pEntry, int nBytes );
1278 extern int Gia_MmStepReadMemUsage( Gia_MmStep_t * p );
1279 /*=== giaMf.c ===========================================================*/
1280 extern void Mf_ManSetDefaultPars( Jf_Par_t * pPars );
1281 extern Gia_Man_t * Mf_ManPerformMapping( Gia_Man_t * pGia, Jf_Par_t * pPars );
1282 /*=== giaMini.c ===========================================================*/
1283 extern Gia_Man_t * Gia_ManReadMiniAig( char * pFileName );
1284 extern void Gia_ManWriteMiniAig( Gia_Man_t * pGia, char * pFileName );
1285 /*=== giaMuxes.c ===========================================================*/
1286 extern void Gia_ManCountMuxXor( Gia_Man_t * p, int * pnMuxes, int * pnXors );
1287 extern void Gia_ManPrintMuxStats( Gia_Man_t * p );
1288 extern Gia_Man_t * Gia_ManDupMuxes( Gia_Man_t * p, int Limit );
1289 extern Gia_Man_t * Gia_ManDupNoMuxes( Gia_Man_t * p );
1290 /*=== giaPat.c ===========================================================*/
1291 extern void Gia_SatVerifyPattern( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_Int_t * vCex, Vec_Int_t * vVisit );
1292 /*=== giaRetime.c ===========================================================*/
1293 extern Gia_Man_t * Gia_ManRetimeForward( Gia_Man_t * p, int nMaxIters, int fVerbose );
1294 /*=== giaSat.c ============================================================*/
1295 extern int Sat_ManTest( Gia_Man_t * pGia, Gia_Obj_t * pObj, int nConfsMax );
1296 /*=== giaScl.c ============================================================*/
1297 extern int Gia_ManSeqMarkUsed( Gia_Man_t * p );
1298 extern int Gia_ManCombMarkUsed( Gia_Man_t * p );
1299 extern Gia_Man_t * Gia_ManCleanup( Gia_Man_t * p );
1300 extern Gia_Man_t * Gia_ManCleanupOutputs( Gia_Man_t * p, int nOutputs );
1301 extern Gia_Man_t * Gia_ManSeqCleanup( Gia_Man_t * p );
1302 extern Gia_Man_t * Gia_ManSeqStructSweep( Gia_Man_t * p, int fConst, int fEquiv, int fVerbose );
1303 /*=== giaShrink.c ===========================================================*/
1304 extern Gia_Man_t * Gia_ManMapShrink4( Gia_Man_t * p, int fKeepLevel, int fVerbose );
1305 extern Gia_Man_t * Gia_ManMapShrink6( Gia_Man_t * p, int nFanoutMax, int fKeepLevel, int fVerbose );
1306 /*=== giaSopb.c ============================================================*/
1307 extern Gia_Man_t * Gia_ManExtractWindow( Gia_Man_t * p, int LevelMax, int nTimeWindow, int fVerbose );
1308 extern Gia_Man_t * Gia_ManPerformSopBalanceWin( Gia_Man_t * p, int LevelMax, int nTimeWindow, int nCutNum, int nRelaxRatio, int fVerbose );
1309 extern Gia_Man_t * Gia_ManPerformDsdBalanceWin( Gia_Man_t * p, int LevelMax, int nTimeWindow, int nLutSize, int nCutNum, int nRelaxRatio, int fVerbose );
1310 /*=== giaSort.c ============================================================*/
1311 extern int * Gia_SortFloats( float * pArray, int * pPerm, int nSize );
1312 /*=== giaSim.c ============================================================*/
1313 extern void Gia_ManSimSetDefaultParams( Gia_ParSim_t * p );
1314 extern int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars );
1315 extern unsigned * Gia_SimDataExt( Gia_ManSim_t * p, int i );
1316 extern unsigned * Gia_SimDataCiExt( Gia_ManSim_t * p, int i );
1317 extern unsigned * Gia_SimDataCoExt( Gia_ManSim_t * p, int i );
1318 extern void Gia_ManSimInfoInit( Gia_ManSim_t * p );
1319 extern void Gia_ManSimInfoTransfer( Gia_ManSim_t * p );
1320 extern void Gia_ManSimulateRound( Gia_ManSim_t * p );
1321 /*=== giaSpeedup.c ============================================================*/
1322 extern float Gia_ManDelayTraceLut( Gia_Man_t * p );
1323 extern float Gia_ManDelayTraceLutPrint( Gia_Man_t * p, int fVerbose );
1324 extern Gia_Man_t * Gia_ManSpeedup( Gia_Man_t * p, int Percentage, int Degree, int fVerbose, int fVeryVerbose );
1325 /*=== giaStg.c ============================================================*/
1326 extern void Gia_ManStgPrint( FILE * pFile, Vec_Int_t * vLines, int nIns, int nOuts, int nStates );
1327 extern Gia_Man_t * Gia_ManStgRead( char * pFileName, int kHot, int fVerbose );
1328 /*=== giaSweep.c ============================================================*/
1329 extern Gia_Man_t * Gia_ManFraigSweepSimple( Gia_Man_t * p, void * pPars );
1330 extern Gia_Man_t * Gia_ManSweepWithBoxes( Gia_Man_t * p, void * pParsC, void * pParsS, int fConst, int fEquiv, int fVerbose );
1331 extern void Gia_ManCheckIntegrityWithBoxes( Gia_Man_t * p );
1332 /*=== giaSweeper.c ============================================================*/
1333 extern Gia_Man_t * Gia_SweeperStart( Gia_Man_t * p );
1334 extern void Gia_SweeperStop( Gia_Man_t * p );
1335 extern int Gia_SweeperIsRunning( Gia_Man_t * p );
1336 extern void Gia_SweeperPrintStats( Gia_Man_t * p );
1337 extern void Gia_SweeperSetConflictLimit( Gia_Man_t * p, int nConfMax );
1338 extern void Gia_SweeperSetRuntimeLimit( Gia_Man_t * p, int nSeconds );
1339 extern Vec_Int_t * Gia_SweeperGetCex( Gia_Man_t * p );
1340 extern int Gia_SweeperProbeCreate( Gia_Man_t * p, int iLit );
1341 extern int Gia_SweeperProbeDelete( Gia_Man_t * p, int ProbeId );
1342 extern int Gia_SweeperProbeUpdate( Gia_Man_t * p, int ProbeId, int iLitNew );
1343 extern int Gia_SweeperProbeLit( Gia_Man_t * p, int ProbeId );
1345 extern int Gia_SweeperCondPop( Gia_Man_t * p );
1346 extern void Gia_SweeperCondPush( Gia_Man_t * p, int ProbeId );
1348 extern int Gia_SweeperCondCheckUnsat( Gia_Man_t * p );
1349 extern int Gia_SweeperCheckEquiv( Gia_Man_t * p, int ProbeId1, int ProbeId2 );
1350 extern Gia_Man_t * Gia_SweeperExtractUserLogic( Gia_Man_t * p, Vec_Int_t * vProbeIds, Vec_Ptr_t * vInNames, Vec_Ptr_t * vOutNames );
1351 extern void Gia_SweeperLogicDump( Gia_Man_t * p, Vec_Int_t * vProbeIds, int fDumpConds, char * pFileName );
1352 extern Gia_Man_t * Gia_SweeperCleanup( Gia_Man_t * p, char * pCommLime );
1353 extern Vec_Int_t * Gia_SweeperGraft( Gia_Man_t * pDst, Vec_Int_t * vProbes, Gia_Man_t * pSrc );
1354 extern int Gia_SweeperFraig( Gia_Man_t * p, Vec_Int_t * vProbeIds, char * pCommLime, int nWords, int nConfs, int fVerify, int fVerbose );
1355 extern int Gia_SweeperRun( Gia_Man_t * p, Vec_Int_t * vProbeIds, char * pCommLime, int fVerbose );
1356 /*=== giaSwitch.c ============================================================*/
1357 extern float Gia_ManEvaluateSwitching( Gia_Man_t * p );
1358 extern float Gia_ManComputeSwitching( Gia_Man_t * p, int nFrames, int nPref, int fProbOne );
1359 extern Vec_Int_t * Gia_ManComputeSwitchProbs( Gia_Man_t * pGia, int nFrames, int nPref, int fProbOne );
1361 /*=== giaTim.c ===========================================================*/
1362 extern int Gia_ManBoxNum( Gia_Man_t * p );
1363 extern int Gia_ManRegBoxNum( Gia_Man_t * p );
1364 extern int Gia_ManNonRegBoxNum( Gia_Man_t * p );
1365 extern int Gia_ManBoxCiNum( Gia_Man_t * p );
1366 extern int Gia_ManBoxCoNum( Gia_Man_t * p );
1367 extern int Gia_ManClockDomainNum( Gia_Man_t * p );
1368 extern int Gia_ManIsSeqWithBoxes( Gia_Man_t * p );
1369 extern int Gia_ManIsNormalized( Gia_Man_t * p );
1373 extern int Gia_ManLevelWithBoxes( Gia_Man_t * p );
1374 extern int Gia_ManLutLevelWithBoxes( Gia_Man_t * p );
1375 extern void * Gia_ManUpdateTimMan( Gia_Man_t * p, Vec_Int_t * vBoxPres );
1376 extern void * Gia_ManUpdateTimMan2( Gia_Man_t * p, Vec_Int_t * vBoxesLeft, int nTermsDiff );
1377 extern Gia_Man_t * Gia_ManUpdateExtraAig( void * pTime, Gia_Man_t * pAig, Vec_Int_t * vBoxPres );
1378 extern Gia_Man_t * Gia_ManUpdateExtraAig2( void * pTime, Gia_Man_t * pAig, Vec_Int_t * vBoxesLeft );
1379 extern Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * vBoxPres, int fSeq );
1380 extern int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, int nBTLimit, int nTimeLim, int fSeq, int fVerbose, char * pFileSpec );
1381 /*=== giaTruth.c ===========================================================*/
1382 extern word Gia_ObjComputeTruthTable6Lut( Gia_Man_t * p, int iObj, Vec_Wrd_t * vTemp );
1383 extern word Gia_ObjComputeTruthTable6( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t * vSupp, Vec_Wrd_t * vTruths );
1384 extern void Gia_ObjCollectInternal( Gia_Man_t * p, Gia_Obj_t * pObj );
1385 extern word * Gia_ObjComputeTruthTable( Gia_Man_t * p, Gia_Obj_t * pObj );
1386 extern void Gia_ObjComputeTruthTableStart( Gia_Man_t * p, int nVarsMax );
1387 extern void Gia_ObjComputeTruthTableStop( Gia_Man_t * p );
1388 extern word * Gia_ObjComputeTruthTableCut( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t * vLeaves );
1389 /*=== giaTsim.c ============================================================*/
1390 extern Gia_Man_t * Gia_ManReduceConst( Gia_Man_t * pAig, int fVerbose );
1391 /*=== giaUtil.c ===========================================================*/
1392 extern unsigned Gia_ManRandom( int fReset );
1393 extern word Gia_ManRandomW( int fReset );
1394 extern void Gia_ManRandomInfo( Vec_Ptr_t * vInfo, int iInputStart, int iWordStart, int iWordStop );
1395 extern char * Gia_TimeStamp();
1396 extern char * Gia_FileNameGenericAppend( char * pBase, char * pSuffix );
1397 extern void Gia_ManIncrementTravId( Gia_Man_t * p );
1398 extern void Gia_ManCleanMark01( Gia_Man_t * p );
1399 extern void Gia_ManSetMark0( Gia_Man_t * p );
1400 extern void Gia_ManCleanMark0( Gia_Man_t * p );
1401 extern void Gia_ManCheckMark0( Gia_Man_t * p );
1402 extern void Gia_ManSetMark1( Gia_Man_t * p );
1403 extern void Gia_ManCleanMark1( Gia_Man_t * p );
1404 extern void Gia_ManCheckMark1( Gia_Man_t * p );
1405 extern void Gia_ManCleanValue( Gia_Man_t * p );
1406 extern void Gia_ManCleanLevels( Gia_Man_t * p, int Size );
1407 extern void Gia_ManCleanTruth( Gia_Man_t * p );
1408 extern void Gia_ManFillValue( Gia_Man_t * p );
1409 extern void Gia_ObjSetPhase( Gia_Man_t * p, Gia_Obj_t * pObj );
1410 extern void Gia_ManSetPhase( Gia_Man_t * p );
1411 extern void Gia_ManSetPhasePattern( Gia_Man_t * p, Vec_Int_t * vCiValues );
1412 extern void Gia_ManSetPhase1( Gia_Man_t * p );
1413 extern void Gia_ManCleanPhase( Gia_Man_t * p );
1414 extern int Gia_ManCheckCoPhase( Gia_Man_t * p );
1415 extern int Gia_ManLevelNum( Gia_Man_t * p );
1416 extern Vec_Int_t * Gia_ManGetCiLevels( Gia_Man_t * p );
1417 extern int Gia_ManSetLevels( Gia_Man_t * p, Vec_Int_t * vCiLevels );
1420 extern void Gia_ManCreateValueRefs( Gia_Man_t * p );
1421 extern void Gia_ManCreateRefs( Gia_Man_t * p );
1422 extern int * Gia_ManCreateMuxRefs( Gia_Man_t * p );
1423 extern int Gia_ManCrossCut( Gia_Man_t * p, int fReverse );
1425 extern int Gia_ObjIsMuxType( Gia_Obj_t * pNode );
1426 extern int Gia_ObjRecognizeExor( Gia_Obj_t * pObj, Gia_Obj_t ** ppFan0, Gia_Obj_t ** ppFan1 );
1427 extern Gia_Obj_t * Gia_ObjRecognizeMux( Gia_Obj_t * pNode, Gia_Obj_t ** ppNodeT, Gia_Obj_t ** ppNodeE );
1428 extern int Gia_ObjRecognizeMuxLits( Gia_Man_t * p, Gia_Obj_t * pNode, int * iLitT, int * iLitE );
1429 extern int Gia_NodeMffcSize( Gia_Man_t * p, Gia_Obj_t * pNode );
1430 extern int Gia_ManHasDangling( Gia_Man_t * p );
1431 extern int Gia_ManMarkDangling( Gia_Man_t * p );
1432 extern Vec_Int_t * Gia_ManGetDangling( Gia_Man_t * p );
1433 extern void Gia_ObjPrint( Gia_Man_t * p, Gia_Obj_t * pObj );
1434 extern void Gia_ManPrint( Gia_Man_t * p );
1435 extern void Gia_ManPrintCo( Gia_Man_t * p, Gia_Obj_t * pObj );
1436 extern void Gia_ManPrintCone( Gia_Man_t * p, Gia_Obj_t * pObj, int * pLeaves, int nLeaves, Vec_Int_t * vNodes );
1437 extern void Gia_ManPrintCone2( Gia_Man_t * p, Gia_Obj_t * pObj );
1438 extern void Gia_ManInvertConstraints( Gia_Man_t * pAig );
1439 extern void Gia_ManInvertPos( Gia_Man_t * pAig );
1440 extern int Gia_ManCompare( Gia_Man_t * p1, Gia_Man_t * p2 );
1441 extern void Gia_ManMarkFanoutDrivers( Gia_Man_t * p );
1442 extern void Gia_ManSwapPos( Gia_Man_t * p, int i );
1443 extern Vec_Int_t * Gia_ManSaveValue( Gia_Man_t * p );
1444 extern void Gia_ManLoadValue( Gia_Man_t * p, Vec_Int_t * vValues );
1446 
1447 /*=== giaCTas.c ===========================================================*/
1448 typedef struct Tas_Man_t_ Tas_Man_t;
1449 extern Tas_Man_t * Tas_ManAlloc( Gia_Man_t * pAig, int nBTLimit );
1450 extern void Tas_ManStop( Tas_Man_t * p );
1451 extern Vec_Int_t * Tas_ReadModel( Tas_Man_t * p );
1452 extern void Tas_ManSatPrintStats( Tas_Man_t * p );
1453 extern int Tas_ManSolve( Tas_Man_t * p, Gia_Obj_t * pObj, Gia_Obj_t * pObj2 );
1454 extern int Tas_ManSolveArray( Tas_Man_t * p, Vec_Ptr_t * vObjs );
1455 
1456 
1458 
1459 
1460 #endif
1461 
1462 ////////////////////////////////////////////////////////////////////////
1463 /// END OF FILE ///
1464 ////////////////////////////////////////////////////////////////////////
1465 
static int Gia_WordHasOneBit(unsigned uWord)
Definition: gia.h:311
Tas_Man_t * Tas_ManAlloc(Gia_Man_t *pAig, int nBTLimit)
Definition: giaCTas.c:187
int nObjsAlloc
Definition: gia.h:102
static int Gia_ObjFanin2Copy(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:483
char * memset()
static void Gia_ManCleanCopyArray(Gia_Man_t *p)
Definition: gia.h:489
static void Gia_ManPatchCoDriver(Gia_Man_t *p, int iCoIndex, int iLit0)
Definition: gia.h:739
Gia_Man_t * Gia_ManDupMarked(Gia_Man_t *p)
Definition: giaDup.c:975
static void Gia_ManTruthCopy(unsigned *pOut, unsigned *pIn, int nVars)
Definition: gia.h:346
static void Gia_ObjRefFanin2Inc(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:526
word Mux7
Definition: gia.h:301
static int Gia_ObjIsCellBuf(Gia_Man_t *p, int iLit)
Definition: gia.h:962
static int Gia_ObjToLit(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:497
static int Gia_ObjLevelId(Gia_Man_t *p, int Id)
Definition: gia.h:500
int Tas_ManSolveArray(Tas_Man_t *p, Vec_Ptr_t *vObjs)
Definition: giaCTas.c:1423
void * pLutLib
Definition: gia.h:166
static int Gia_ManAppendAnd(Gia_Man_t *p, int iLit0, int iLit1)
Definition: gia.h:592
unsigned fFixed
Definition: gia.h:68
static void Gia_ObjSetCopyF(Gia_Man_t *p, int f, Gia_Obj_t *pObj, int iLit)
Definition: gia.h:486
static void Gia_ObjTerSimCo(Gia_Obj_t *pObj)
Definition: gia.h:797
void Gia_ManCountMuxXor(Gia_Man_t *p, int *pnMuxes, int *pnXors)
DECLARATIONS ///.
Definition: giaMuxes.c:47
void Gia_ManCreateRefs(Gia_Man_t *p)
Definition: giaUtil.c:715
static void Gia_ObjRefFanin0Inc(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:524
float Gia_ManDelayTraceLutPrint(Gia_Man_t *p, int fVerbose)
Definition: giaSpeedup.c:443
void Gia_MmStepStop(Gia_MmStep_t *p, int fVerbose)
Definition: giaMem.c:507
void Gia_ManCleanPhase(Gia_Man_t *p)
Definition: giaUtil.c:431
Gia_Man_t * Gia_ManMapShrink4(Gia_Man_t *p, int fKeepLevel, int fVerbose)
FUNCTION DEFINITIONS ///.
Definition: giaShrink.c:49
unsigned iDiff0
Definition: gia.h:77
static Gia_Obj_t * Gia_ObjChild0(Gia_Obj_t *pObj)
Definition: gia.h:457
VOID_HACK exit()
float * pTimesArr
Definition: gia.h:306
int nFrames
Definition: gia.h:227
static int Gia_ManMuxNum(Gia_Man_t *p)
Definition: gia.h:391
Gia_Man_t * Gia_SweeperCleanup(Gia_Man_t *p, char *pCommLime)
Definition: giaSweeper.c:461
int fCut
Definition: gia.h:199
word nHashMiss
Definition: gia.h:168
int Gia_ObjRecognizeExor(Gia_Obj_t *pObj, Gia_Obj_t **ppFan0, Gia_Obj_t **ppFan1)
Definition: giaUtil.c:921
static int Gia_ObjFaninC2(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:453
Gia_Man_t * Gia_ManSpecReduce(Gia_Man_t *p, int fDualOut, int fSynthesis, int fReduce, int fSkipSome, int fVerbose)
Definition: giaEquiv.c:848
Vec_Int_t * vUserFfIds
Definition: gia.h:159
Vec_Int_t * vConsts
Definition: gia.h:257
static void Gia_ObjUnsetRepr(Gia_Man_t *p, int Id)
Definition: gia.h:890
static void Gia_ObjSetLevelId(Gia_Man_t *p, int Id, int l)
Definition: gia.h:502
Gia_Man_t * Gia_ManDupUnshuffleInputs(Gia_Man_t *p)
Definition: giaTim.c:194
Vec_Wrd_t * vSims
Definition: gia.h:177
Gia_Man_t * Gia_ManDupCones(Gia_Man_t *p, int *pPos, int nPos, int fTrimPis)
Definition: giaDup.c:2691
static int Gia_ObjCellId(Gia_Man_t *p, int iLit)
Definition: gia.h:966
Vec_Int_t * Gia_ManGetCiLevels(Gia_Man_t *p)
Definition: giaUtil.c:546
word Gia_ObjComputeTruthTable6(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vSupp, Vec_Wrd_t *vTruths)
Definition: giaTruth.c:116
static int Gia_ObjFaninLit0(Gia_Obj_t *pObj, int ObjId)
Definition: gia.h:466
float Gia_ManComputeSwitching(Gia_Man_t *p, int nFrames, int nPref, int fProbOne)
Definition: giaSwitch.c:781
int Gia_ManEquivCountLits(Gia_Man_t *p)
Definition: giaEquiv.c:253
static void Gia_ObjTerSimRo(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:808
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
void Gia_ManInvertConstraints(Gia_Man_t *pAig)
Definition: giaUtil.c:1415
Gia_Man_t * Gia_ManDupTrimmed(Gia_Man_t *p, int fTrimCis, int fTrimCos, int fDualOut, int OutValue)
Definition: giaDup.c:1638
int Gia_ManIsSeqWithBoxes(Gia_Man_t *p)
Definition: giaTim.c:93
Gia_Man_t * Jf_ManPerformMapping(Gia_Man_t *pGia, Jf_Par_t *pPars)
Definition: giaJf.c:1712
static int Gia_ObjFaninLit2(Gia_Man_t *p, int ObjId)
Definition: gia.h:468
void Gia_ManDeriveReprs(Gia_Man_t *p)
Definition: giaEquiv.c:129
#define GIA_UND
Definition: gia.h:749
static int Gia_ObjIsAndNotBuf(Gia_Obj_t *pObj)
Definition: gia.h:428
Gia_Man_t * Gia_ManPerformDsdBalanceWin(Gia_Man_t *p, int LevelMax, int nTimeWindow, int nLutSize, int nCutNum, int nRelaxRatio, int fVerbose)
Definition: giaBalMap.c:298
static int Gia_ManAppendMuxReal(Gia_Man_t *p, int iLitC, int iLit1, int iLit0)
Definition: gia.h:664
void Lf_ManSetDefaultPars(Jf_Par_t *pPars)
Definition: giaLf.c:1981
Gia_Man_t * Gia_ManDupUnnormalize(Gia_Man_t *p)
Definition: giaTim.c:373
int nDims
Definition: gia.h:211
static int Gia_ObjIsClass(Gia_Man_t *p, int Id)
Definition: gia.h:919
static int Gia_ObjIsAndReal(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:426
int Gia_ManCrossCut(Gia_Man_t *p, int fReverse)
Definition: giaUtil.c:820
static int Gia_ObjFoffsetId(Gia_Man_t *p, int Id)
Definition: gia.h:937
static int Gia_ObjPhase(Gia_Obj_t *pObj)
Definition: gia.h:415
static void Gia_ObjTerSimSet0(Gia_Obj_t *pObj)
Definition: gia.h:770
int Gia_MmFixedReadMaxEntriesUsed(Gia_MmFixed_t *p)
Definition: giaMem.c:287
static void Gia_ObjSetTimeSlackObj(Gia_Man_t *p, Gia_Obj_t *pObj, float t)
Definition: gia.h:552
Gia_Man_t * Gia_ManPerformBidec(Gia_Man_t *p, int fVerbose)
Definition: giaBidec.c:233
static Gia_Obj_t * Gia_ObjSiblObj(Gia_Man_t *p, int Id)
Definition: gia.h:894
Gia_Man_t * Gia_ManIsoReduce(Gia_Man_t *p, Vec_Ptr_t **pvPosEquivs, Vec_Ptr_t **pvPiPerms, int fEstimate, int fDualOut, int fVerbose, int fVeryVerbose)
Definition: giaIso.c:1075
static int Gia_ObjIsTravIdPrevious(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:534
Gia_Man_t * Gia_ManExtractWindow(Gia_Man_t *p, int LevelMax, int nTimeWindow, int fVerbose)
Definition: giaBalMap.c:236
static int Gia_ManAppendXor(Gia_Man_t *p, int iLit0, int iLit1)
Definition: gia.h:735
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
Definition: giaDup.c:552
int nCutNum
Definition: gia.h:268
int Gia_ManSuppSize(Gia_Man_t *p, int *pNodes, int nNodes)
Definition: giaDfs.c:300
int nLutSize
Definition: gia.h:267
float MapArea
Definition: gia.h:303
float Gia_ManDelayTraceLut(Gia_Man_t *p)
Definition: giaSpeedup.c:230
void Gia_ObjCollectInternal(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: giaTruth.c:159
static int Gia_ObjPhaseReal(Gia_Obj_t *pObj)
Definition: gia.h:416
Vec_Int_t * vFanoutNums
Definition: gia.h:129
Vec_Int_t * vCis2Ids
Definition: gia.h:256
void Gia_ManStop(Gia_Man_t *p)
Definition: giaMan.c:77
Gia_Man_t * Gia_ManTransformMiter(Gia_Man_t *p)
Definition: giaDup.c:2324
static void Gia_AigerWriteInt(unsigned char *pPos, int Value)
Definition: gia.h:834
Gia_Man_t * Gia_ManDupOneHot(Gia_Man_t *p)
Definition: giaDup.c:2785
static void Vec_FltWriteEntry(Vec_Flt_t *p, int i, float Entry)
Definition: vecFlt.h:364
Gia_Man_t * Gia_ManUpdateExtraAig(void *pTime, Gia_Man_t *pAig, Vec_Int_t *vBoxPres)
Definition: giaTim.c:683
Vec_Int_t * Cbs_ManSolveMiter(Gia_Man_t *pGia, int nConfs, Vec_Str_t **pvStatus, int fVerbose)
Definition: giaCSatOld.c:708
int nWords
Definition: gia.h:241
void Gia_ManEquivPrintOne(Gia_Man_t *p, int i, int Counter)
Definition: giaEquiv.c:292
void Gia_ManSolveProblem(Gia_Man_t *pGia, Emb_Par_t *pPars)
Definition: giaEmbed.c:1791
word Edge
Definition: gia.h:299
int * pHTable
Definition: gia.h:110
int * pTravIds
Definition: gia.h:153
unsigned * Gia_SimDataCiExt(Gia_ManSim_t *p, int i)
Definition: giaSim.c:35
Gia_Man_t * Gia_ManEquivReduceAndRemap(Gia_Man_t *p, int fSeq, int fMiterPairs)
Definition: giaEquiv.c:638
int Gia_SweeperIsRunning(Gia_Man_t *p)
Definition: giaSweeper.c:164
void Tas_ManStop(Tas_Man_t *p)
Definition: giaCTas.c:223
int Gia_ManVerifyCex(Gia_Man_t *pAig, Abc_Cex_t *p, int fDualOut)
DECLARATIONS ///.
Definition: giaCex.c:44
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition: vecVec.h:42
void Gia_ManSetRefsMapped(Gia_Man_t *p)
Definition: giaIf.c:245
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
Definition: giaMan.c:389
void Gia_ObjComputeTruthTableStart(Gia_Man_t *p, int nVarsMax)
Definition: giaTruth.c:282
Gia_Man_t * pAigExtra
Definition: gia.h:149
int * pNexts
Definition: gia.h:122
Gia_Man_t * Gia_AigerRead(char *pFileName, int fSkipStrash, int fCheck)
Definition: giaAiger.c:821
void Gia_ManLoadValue(Gia_Man_t *p, Vec_Int_t *vValues)
Definition: giaUtil.c:1615
Gia_Man_t * Gia_ManDupCofAllInt(Gia_Man_t *p, Vec_Int_t *vSigs, int fVerbose)
Definition: giaCof.c:936
static int Gia_ManPoNum(Gia_Man_t *p)
Definition: gia.h:386
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
Definition: gia.h:452
int nLutSizeMux
Definition: gia.h:296
static int Gia_ObjTerSimGet0Fanin1(Gia_Obj_t *pObj)
Definition: gia.h:782
int nIters
Definition: gia.h:213
static void Gia_ObjSetValue(Gia_Obj_t *pObj, int i)
Definition: gia.h:414
static Gia_Obj_t * Gia_ManCi(Gia_Man_t *p, int v)
Definition: gia.h:403
static int Gia_ObjColor(Gia_Man_t *p, int Id, int c)
Definition: gia.h:903
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
Definition: gia.h:703
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Gia_SweeperSetRuntimeLimit(Gia_Man_t *p, int nSeconds)
Definition: giaSweeper.c:225
static Gia_Obj_t * Gia_NotCond(Gia_Obj_t *p, int c)
Definition: gia.h:379
int fSaveLastLit
Definition: gia.h:229
int Gia_ManLutLevel(Gia_Man_t *p)
Definition: giaIf.c:163
static int Gia_ManChoiceNum(Gia_Man_t *p)
Definition: gia.h:398
int Gia_ManHashXor(Gia_Man_t *p, int iLit0, int iLit1)
Definition: giaHash.c:658
Gia_Man_t * Gia_ManDupPerm(Gia_Man_t *p, Vec_Int_t *vPiPerm)
Definition: giaDup.c:632
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
int Gia_ManRegBoxNum(Gia_Man_t *p)
Definition: giaTim.c:53
static void Gia_ObjRefFanin1Inc(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:525
Vec_Int_t * vRegClasses
Definition: gia.h:144
word * Gia_ObjComputeTruthTableCut(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vLeaves)
Definition: giaTruth.c:351
int Gia_ManSimSimulate(Gia_Man_t *pAig, Gia_ParSim_t *pPars)
Definition: giaSim.c:598
void Gia_ManStgPrint(FILE *pFile, Vec_Int_t *vLines, int nIns, int nOuts, int nStates)
Definition: giaStg.c:407
Vec_Int_t * Gia_ManCollectNodesCis(Gia_Man_t *p, int *pNodes, int nNodes)
Definition: giaDfs.c:178
Gia_Man_t * Gia_AigerReadFromMemory(char *pContents, int nFileSize, int fSkipStrash, int fCheck)
Definition: giaAiger.c:176
static Gia_Obj_t * Gia_Regular(Gia_Obj_t *p)
Definition: gia.h:377
int Gia_ManCompare(Gia_Man_t *p1, Gia_Man_t *p2)
Definition: giaUtil.c:1511
static int Gia_ObjFaninLit2p(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:471
static int Gia_ObjIsTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:533
static void Gia_ObjSetTravIdPrevious(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:532
Gia_Man_t * Gia_ManDupOrderAiger(Gia_Man_t *p)
Definition: giaDup.c:397
static int Gia_ManIsConstLit(int iLit)
Definition: gia.h:375
Vec_Int_t * vObjClasses
Definition: gia.h:142
static int Gia_ManCiLit(Gia_Man_t *p, int CiId)
Definition: gia.h:435
static char * Gia_ManName(Gia_Man_t *p)
Definition: gia.h:382
static Gia_Obj_t * Gia_ObjFromLit(Gia_Man_t *p, int iLit)
Definition: gia.h:496
static int Gia_ObjFanin1CopyF(Gia_Man_t *p, int f, Gia_Obj_t *pObj)
Definition: gia.h:492
Vec_Int_t * Gia_ManFirstFanouts(Gia_Man_t *p)
Definition: giaUtil.c:1635
Gia_Man_t * Gia_ManDupCofactorObj(Gia_Man_t *p, int iObj, int Value)
Definition: giaDup.c:1319
Gia_Man_t * Gia_ManReadMiniAig(char *pFileName)
Definition: giaMini.c:167
static Gia_Obj_t * Gia_ManPo(Gia_Man_t *p, int v)
Definition: gia.h:406
void Gia_ManSetMark1(Gia_Man_t *p)
Definition: giaUtil.c:253
int nFront
Definition: gia.h:119
int fOrPos
Definition: gia.h:231
#define ABC_REALLOC(type, obj, num)
Definition: abc_global.h:233
static int Gia_ObjFaninLit0p(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:469
static int Gia_ObjIsCand(Gia_Obj_t *pObj)
Definition: gia.h:429
static int Gia_ObjNum(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:513
Gia_Man_t * Gia_ManDupPermFlop(Gia_Man_t *p, Vec_Int_t *vFfPerm)
Definition: giaDup.c:663
ush Pos
Definition: deflate.h:88
int fLutProf
Definition: gia.h:201
int * pSibls
Definition: gia.h:123
void Gia_MmFlexRestart(Gia_MmFlex_t *p)
Definition: giaMem.c:411
Vec_Int_t * Gia_SweeperGetCex(Gia_Man_t *p)
Definition: giaSweeper.c:230
Vec_Int_t * vSwitching
Definition: gia.h:152
int Gia_ManSeqMarkUsed(Gia_Man_t *p)
Definition: giaScl.c:156
Vec_Int_t * Gia_SweeperGraft(Gia_Man_t *pDst, Vec_Int_t *vProbes, Gia_Man_t *pSrc)
Definition: giaSweeper.c:985
void Mf_ManSetDefaultPars(Jf_Par_t *pPars)
Definition: giaMf.c:1380
void Gia_ManInvertPos(Gia_Man_t *pAig)
Definition: giaUtil.c:1425
static int Gia_ObjLutMuxId(Gia_Man_t *p, int Id)
Definition: gia.h:956
static int Gia_ManConstrNum(Gia_Man_t *p)
Definition: gia.h:395
static int Gia_ObjPhaseRealLit(Gia_Man_t *p, int iLit)
Definition: gia.h:498
int nProcNum
Definition: gia.h:269
Gia_Man_t * Gia_ManFrames(Gia_Man_t *pAig, Gia_ParFra_t *pPars)
Definition: giaFrames.c:840
Gia_Man_t * Gia_ManDupOntop(Gia_Man_t *p, Gia_Man_t *p2)
Definition: giaDup.c:1772
static void Gia_ObjSetGateLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:509
#define GIA_ZER
Definition: gia.h:747
Vec_Int_t * Gia_ManGetDangling(Gia_Man_t *p)
Definition: giaUtil.c:1224
Gia_Man_t * Lf_ManPerformMapping(Gia_Man_t *pGia, Jf_Par_t *pPars)
Definition: giaLf.c:2193
char * Gia_TimeStamp()
Definition: giaUtil.c:101
static int Gia_ManAppendCi(Gia_Man_t *p)
Definition: gia.h:583
static int Gia_ObjDiff1(Gia_Obj_t *pObj)
Definition: gia.h:450
int Gia_ManLevelWithBoxes(Gia_Man_t *p)
Definition: giaTim.c:469
Gia_Man_t * pAig
Definition: giaCTas.c:85
Gia_Man_t * Gia_ManDupOrderDfs(Gia_Man_t *p)
Definition: giaDup.c:170
static int Gia_ObjTerSimGet0Fanin0(Gia_Obj_t *pObj)
Definition: gia.h:779
void Gia_ManCleanValue(Gia_Man_t *p)
Definition: giaUtil.c:310
Gia_Man_t * Gia_SweeperStart(Gia_Man_t *p)
Definition: giaSweeper.c:145
int nAreaTuner
Definition: gia.h:274
void Gia_ManCheckIntegrityWithBoxes(Gia_Man_t *p)
Definition: giaSweep.c:406
void Gia_ManCleanMark0(Gia_Man_t *p)
Definition: giaUtil.c:215
Gia_Man_t * Gia_ManRemoveEnables(Gia_Man_t *p)
Definition: giaEnable.c:514
void Gia_ManRandomInfo(Vec_Ptr_t *vInfo, int iInputStart, int iWordStart, int iWordStop)
Definition: giaUtil.c:80
static int Gia_ObjIsConst0(Gia_Obj_t *pObj)
Definition: gia.h:430
float * pTimesReq
Definition: gia.h:307
int nCutNumMax
Definition: gia.h:294
static int Abc_Var2Lit(int Var, int fCompl)
Definition: abc_global.h:263
int fVerbose
Definition: gia.h:219
int nFansAlloc
Definition: gia.h:128
Gia_Man_t * Gia_ManDupOutputGroup(Gia_Man_t *p, int iOutStart, int iOutStop)
Definition: giaDup.c:203
int nTerStates
Definition: gia.h:126
Vec_Int_t * vClassOld
Definition: gia.h:179
int fCutSimple
Definition: gia.h:290
static int Gia_ObjRefNumId(Gia_Man_t *p, int Id)
Definition: gia.h:518
Gia_Obj_t * pObjs
Definition: gia.h:103
static int Gia_ManObjIsConst0(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:431
void Gia_ObjComputeTruthTableStop(Gia_Man_t *p)
Definition: giaTruth.c:293
void Gia_ManLutParams(Gia_Man_t *p, int *pnCurLuts, int *pnCurEdges, int *pnCurLevels)
Definition: giaIf.c:195
Vec_Int_t * vCos
Definition: gia.h:109
int fDumpLarge
Definition: gia.h:217
Abc_Cex_t * Gia_ManCexExtendToIncludeAllObjects(Gia_Man_t *p, Abc_Cex_t *pCex)
Definition: giaCex.c:349
Gia_Man_t * Gia_ManDupDfsClasses(Gia_Man_t *p)
Definition: giaDup.c:1940
static int Gia_ObjRefDecId(Gia_Man_t *p, int Id)
Definition: gia.h:520
static int Gia_WordFindFirstBit(unsigned uWord)
Definition: gia.h:321
unsigned * pMuxes
Definition: gia.h:104
void Gia_ManEquivImprove(Gia_Man_t *p)
Definition: giaEquiv.c:1375
Gia_Man_t * Gia_ManStgRead(char *pFileName, int kHot, int fVerbose)
Definition: giaStg.c:508
static int Gia_ObjValue(Gia_Obj_t *pObj)
Definition: gia.h:413
Vec_Int_t * vBarBufs
Definition: gia.h:146
static int Gia_ObjFaninId1p(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:464
int nSols
Definition: gia.h:212
unsigned fColorA
Definition: gia.h:61
Vec_Int_t * vFlopClasses
Definition: gia.h:140
unsigned * pData2
Definition: gia.h:170
static int Gia_ObjIsHead(Gia_Man_t *p, int Id)
Definition: gia.h:916
Abc_Cex_t * pCexComb
Definition: gia.h:135
int Gia_ManSetLevels(Gia_Man_t *p, Vec_Int_t *vCiLevels)
Definition: giaUtil.c:558
static int Gia_ObjIsTerm(Gia_Obj_t *pObj)
Definition: gia.h:418
float MapDelay
Definition: gia.h:302
static int Gia_ObjRefNum(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:521
Gia_Man_t * Mf_ManPerformMapping(Gia_Man_t *pGia, Jf_Par_t *pPars)
Definition: giaMf.c:1575
int Gia_SweeperProbeDelete(Gia_Man_t *p, int ProbeId)
Definition: giaSweeper.c:258
void Gia_ManPrintStatsShort(Gia_Man_t *p)
Definition: giaMan.c:522
static void Vec_IntSetEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:418
static Vec_Flt_t * Vec_FltAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecFlt.h:78
static int Gia_WordCountOnes(unsigned uWord)
Definition: gia.h:313
word Clause
Definition: gia.h:300
int nBufs
Definition: gia.h:107
Gia_Man_t * Gia_ManDupFlopClass(Gia_Man_t *p, int iClass)
Definition: giaDup.c:930
void * Gia_ManUnrollAdd(void *pMan, int fMax)
Definition: giaFrames.c:437
Gia_MmFixed_t * Gia_MmFixedStart(int nEntrySize, int nEntriesMax)
FUNCTION DEFINITIONS ///.
Definition: giaMem.c:96
int * pIso
Definition: gia.h:124
Gia_Man_t * Gia_ManMapShrink6(Gia_Man_t *p, int nFanoutMax, int fKeepLevel, int fVerbose)
Definition: giaShrink6.c:401
void Gia_ManPrintCone2(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: giaUtil.c:1392
static void Gia_ObjTerSimPrint(Gia_Obj_t *pObj)
Definition: gia.h:817
static int Gia_ObjIsBuf(Gia_Obj_t *pObj)
Definition: gia.h:427
int Gia_ObjRecognizeMuxLits(Gia_Man_t *p, Gia_Obj_t *pNode, int *iLitT, int *iLitE)
Definition: giaUtil.c:1036
Gia_Man_t * Gia_ManSpecReduceInit(Gia_Man_t *p, Abc_Cex_t *pInit, int nFrames, int fDualOut)
Definition: giaEquiv.c:985
static int Vec_IntGetEntry(Vec_Int_t *p, int i)
Definition: bblif.c:401
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
Definition: giaMan.c:628
int RandSeed
Definition: gia.h:243
int nTtWords
Definition: gia.h:183
Gia_Man_t * Jf_ManDeriveCnf(Gia_Man_t *p, int fCnfObjIds)
Definition: giaJf.c:1746
static int Gia_ManPoIsConst0(Gia_Man_t *p, int iPoIndex)
Definition: gia.h:475
static int Gia_ManAndNotBufNum(Gia_Man_t *p)
Definition: gia.h:393
int fAreaOnly
Definition: gia.h:277
static int Gia_XsimNotCond(int Value, int fCompl)
Definition: gia.h:751
static int Abc_TruthWordNum(int nVars)
Definition: abc_global.h:256
int Gia_ManHashAndTry(Gia_Man_t *p, int iLit0, int iLit1)
Definition: giaHash.c:627
unsigned fMark1
Definition: gia.h:84
int nVerbLimit
Definition: gia.h:275
unsigned iRepr
Definition: gia.h:58
static void Gia_AigerWriteUnsigned(Vec_Str_t *vStr, unsigned x)
Definition: gia.h:848
Vec_Int_t * vPacking
Definition: gia.h:133
Gia_Man_t * Gia_ManIsoReduce2(Gia_Man_t *p, Vec_Ptr_t **pvPosEquivs, Vec_Ptr_t **pvPiPerms, int fEstimate, int fBetterQual, int fDualOut, int fVerbose, int fVeryVerbose)
Definition: giaIso2.c:718
int nLevels
Definition: gia.h:116
int Gia_ManLutNum(Gia_Man_t *p)
Definition: giaIf.c:144
Gia_Man_t * Gia_ManAigSyn3(Gia_Man_t *p, int fVerbose, int fVeryVerbose)
Definition: giaScript.c:152
static int Gia_XsimAndCond(int Value0, int fCompl0, int Value1, int fCompl1)
Definition: gia.h:759
Gia_Man_t * Gia_ManDupZero(Gia_Man_t *p)
Definition: giaDup.c:608
int fCnfObjIds
Definition: gia.h:285
static int Gia_ObjTerSimGet1Fanin0(Gia_Obj_t *pObj)
Definition: gia.h:780
Gia_Man_t * Gia_ManPerformFx(Gia_Man_t *p, int nNewNodesMax, int LitCountMax, int fReverse, int fVerbose, int fVeryVerbose)
Definition: giaFx.c:451
int nWords
Definition: gia.h:255
Gia_Man_t * Gia_ManDupAndOr(Gia_Man_t *p, int nOuts, int fUseOr, int fCompl)
Definition: giaDup.c:2275
int Sat_ManTest(Gia_Man_t *pGia, Gia_Obj_t *pObj, int nConfsMax)
int nObjs
Definition: gia.h:101
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
static void Vec_StrPush(Vec_Str_t *p, char Entry)
Definition: vecStr.h:535
Vec_Wrd_t * vSimsPi
Definition: gia.h:178
void Gia_ObjAddFanout(Gia_Man_t *p, Gia_Obj_t *pObj, Gia_Obj_t *pFanout)
Definition: giaFanout.c:116
void Gia_ManPrintCo(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: giaUtil.c:1349
int Gia_ManCounterExampleValueLookup(Gia_Man_t *pGia, int Id, int iFrame)
Definition: giaCex.c:262
unsigned * Gia_SimDataExt(Gia_ManSim_t *p, int i)
Definition: giaSim.c:34
int fCutHashing
Definition: gia.h:289
void Gia_ManCleanTruth(Gia_Man_t *p)
Definition: giaUtil.c:487
static int Vec_WrdSize(Vec_Wrd_t *p)
Definition: vecWrd.h:336
int Gia_ManSetFailedPoCex(Gia_Man_t *pAig, Abc_Cex_t *p)
Definition: giaCex.c:135
static int Gia_ObjFoffset(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:938
Gia_Man_t * Gia_ManDupAppendCones(Gia_Man_t *p, Gia_Man_t **ppCones, int nCones, int fOnlyRegs)
Definition: giaDup.c:836
int nSuppMax
Definition: llb3Image.c:83
unsigned fColorB
Definition: gia.h:62
void Gia_ManPrintMappingStats(Gia_Man_t *p, char *pDumpFile)
Definition: giaIf.c:423
static int Gia_ObjTerSimGetX(Gia_Obj_t *pObj)
Definition: gia.h:777
static float Gia_ObjTimeRequiredObj(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:545
Gia_Man_t * Gia_ManPerformMapping(Gia_Man_t *p, void *pIfPars)
Definition: giaIf.c:1986
static void Vec_FltFill(Vec_Flt_t *p, int nSize, float Entry)
Definition: vecFlt.h:450
int nWords
Definition: abcNpn.c:127
int Gia_ManCountChoiceNodes(Gia_Man_t *p)
Definition: giaEquiv.c:1686
static void Vec_FltFreeP(Vec_Flt_t **p)
Definition: vecFlt.h:235
static Gia_Obj_t * Gia_ManObj(Gia_Man_t *p, int v)
Definition: gia.h:402
int Gia_FileSize(char *pFileName)
FUNCTION DECLARATIONS ///.
Definition: giaAiger.c:64
static void Gia_ObjSetTimeArrivalObj(Gia_Man_t *p, Gia_Obj_t *pObj, float t)
Definition: gia.h:550
static int Abc_LitNotCond(int Lit, int c)
Definition: abc_global.h:267
Vec_Int_t * vStore
Definition: gia.h:190
Gia_Man_t * Gia_ManDupFromVecs(Gia_Man_t *p, Vec_Int_t *vCis, Vec_Int_t *vAnds, Vec_Int_t *vCos, int nRegs)
Definition: giaDup.c:2853
Gia_Man_t * Gia_ManPerformDsdBalance(Gia_Man_t *p, int nLutSize, int nCutNum, int nRelaxRatio, int fVerbose)
Definition: giaIf.c:2058
int fPower
Definition: gia.h:280
int * pRefs
Definition: gia.h:114
Definition: gia.h:75
int fVerbose
Definition: gia.h:246
void Gia_ManCleanMark1(Gia_Man_t *p)
Definition: giaUtil.c:272
static Gia_Obj_t * Gia_ManConst1(Gia_Man_t *p)
Definition: gia.h:401
char * pDumpFile
Definition: gia.h:205
unsigned * pDataSimCis
Definition: gia.h:260
Vec_Int_t * vInitClasses
Definition: gia.h:143
int Gia_ManFindFailedPoCex(Gia_Man_t *pAig, Abc_Cex_t *p, int nOutputs)
Definition: giaCex.c:87
Vec_Ptr_t * Gia_ManUnrollAbs(Gia_Man_t *p, int nFrames)
Definition: giaFrames.c:155
static Gia_Obj_t * Gia_ObjChild2(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:459
Gia_Man_t * Gia_ManDupNoMuxes(Gia_Man_t *p)
Definition: giaMuxes.c:159
void Gia_ManPrintFanio(Gia_Man_t *pGia, int nNodes)
Definition: giaCof.c:746
Gia_Man_t * Gia_ManDupZeroUndc(Gia_Man_t *p, char *pInit, int fVerbose)
Definition: giaDup.c:2390
Vec_Flt_t * vTiming
Definition: gia.h:164
float Gia_ManEvaluateSwitching(Gia_Man_t *p)
Definition: giaSwitch.c:719
Gia_Man_t * Gia_ManDupOutputVec(Gia_Man_t *p, Vec_Int_t *vOutPres)
Definition: giaDup.c:232
static void Gia_ObjSetBufLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:505
void Gia_ManEquivPrintClasses(Gia_Man_t *p, int fVerbose, float Mem)
Definition: giaEquiv.c:304
void Gia_ManStopP(Gia_Man_t **p)
Definition: giaMan.c:177
int fVeryVerbose
Definition: gia.h:292
void Gia_ManDetectSeqSignals(Gia_Man_t *p, int fSetReset, int fVerbose)
Definition: giaEnable.c:130
static int Gia_ManPoIsConst1(Gia_Man_t *p, int iPoIndex)
Definition: gia.h:476
int Gia_ManHasDangling(Gia_Man_t *p)
Definition: giaUtil.c:1155
void Gia_ManSetIfParsDefault(void *pIfPars)
FUNCTION DEFINITIONS ///.
Definition: giaIf.c:57
Vec_Int_t * vFanout
Definition: gia.h:130
static int Gia_ManAppendOr(Gia_Man_t *p, int iLit0, int iLit1)
Definition: gia.h:718
static word * Gia_ObjSimPi(Gia_Man_t *p, int PiId)
Definition: gia.h:555
static int Gia_ManHasChoices(Gia_Man_t *p)
Definition: gia.h:397
word * Gia_ObjComputeTruthTable(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: giaTruth.c:177
int nRelaxRatio
Definition: gia.h:272
static int Gia_ObjDiffColors2(Gia_Man_t *p, int i, int j)
Definition: gia.h:909
static int Gia_ManTruthIsConst0(unsigned *pIn, int nVars)
Definition: gia.h:330
int nXors
Definition: gia.h:105
void Gia_ManEquivTransform(Gia_Man_t *p, int fVerbose)
Definition: giaEquiv.c:1114
Vec_Int_t * Cbs_ManSolveMiterNc(Gia_Man_t *pGia, int nConfs, Vec_Str_t **pvStatus, int fVerbose)
Definition: giaCSat.c:998
unsigned Gia_ManRandom(int fReset)
FUNCTION DEFINITIONS ///.
Definition: giaUtil.c:49
float Epsilon
Definition: gia.h:305
int Gia_SweeperRun(Gia_Man_t *p, Vec_Int_t *vProbeIds, char *pCommLime, int fVerbose)
Definition: giaSweeper.c:1106
int fSweeper
Definition: gia.h:113
float MapDelayTarget
Definition: gia.h:304
word Delay
Definition: gia.h:297
word Area
Definition: gia.h:298
static int Gia_WordHasOnePair(unsigned uWord)
Definition: gia.h:312
static Gia_Obj_t * Gia_ObjChild1(Gia_Obj_t *pObj)
Definition: gia.h:458
static int Gia_ManConst0Lit()
Definition: gia.h:371
unsigned yCoord
Definition: gia.h:71
static int Gia_ObjWhatFanin(Gia_Obj_t *pObj, Gia_Obj_t *pFanin)
Definition: gia.h:473
Gia_Man_t * Gia_ManEquivReduce(Gia_Man_t *p, int fUseAll, int fDualOut, int fSkipPhase, int fVerbose)
Definition: giaEquiv.c:417
Gia_Man_t * Gia_ManEquivToChoices(Gia_Man_t *p, int nSnapshots)
Definition: giaEquiv.c:1629
int fOptEdge
Definition: gia.h:278
Vec_Int_t * vClassNew
Definition: gia.h:180
static Gia_Obj_t * Gia_Not(Gia_Obj_t *p)
Definition: gia.h:378
int * Gia_ManCreateMuxRefs(Gia_Man_t *p)
Definition: giaUtil.c:746
static void Gia_ObjSetRepr(Gia_Man_t *p, int Id, int Num)
Definition: gia.h:888
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
Gia_Man_t * Gia_ManDupAppendNew(Gia_Man_t *pOne, Gia_Man_t *pTwo)
Definition: giaDup.c:783
void Gia_MmFixedStop(Gia_MmFixed_t *p, int fVerbose)
Definition: giaMem.c:132
static int Gia_ManAppendMux(Gia_Man_t *p, int iCtrl, int iData1, int iData0)
Definition: gia.h:722
static int Gia_ManAndNum(Gia_Man_t *p)
Definition: gia.h:389
void Gia_ManCreateValueRefs(Gia_Man_t *p)
Definition: giaUtil.c:687
static int Abc_MinInt(int a, int b)
Definition: abc_global.h:239
static int Gia_ObjLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:501
Gia_Man_t * Gia_ManUpdateExtraAig2(void *pTime, Gia_Man_t *pAig, Vec_Int_t *vBoxesLeft)
Definition: giaTim.c:702
static int Gia_ObjSibl(Gia_Man_t *p, int Id)
Definition: gia.h:893
void Gia_ManCheckMark1(Gia_Man_t *p)
Definition: giaUtil.c:291
void Gia_ManPrintCone(Gia_Man_t *p, Gia_Obj_t *pObj, int *pLeaves, int nLeaves, Vec_Int_t *vNodes)
Definition: giaUtil.c:1368
static int Abc_LitIsCompl(int Lit)
Definition: abc_global.h:265
static void Gia_ObjRefFanin2Dec(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:529
void Gia_ManCounterExampleValueStop(Gia_Man_t *pGia)
Definition: giaCex.c:242
Gia_Man_t * Gia_ManSpeedup(Gia_Man_t *p, int Percentage, int Degree, int fVerbose, int fVeryVerbose)
Definition: giaSpeedup.c:628
int Gia_ManCombMarkUsed(Gia_Man_t *p)
Definition: giaScl.c:60
void Gia_AigerWriteSimple(Gia_Man_t *pInit, char *pFileName)
Definition: giaAiger.c:1361
static int Gia_ManIdToCioId(Gia_Man_t *p, int Id)
Definition: gia.h:437
static int Gia_ObjIsMuxId(Gia_Man_t *p, int iObj)
Definition: gia.h:424
int iData2
Definition: gia.h:172
unsigned fTerm
Definition: gia.h:80
static Gia_Obj_t * Gia_ManPi(Gia_Man_t *p, int v)
Definition: gia.h:405
static void Gia_ObjSetTimeSlack(Gia_Man_t *p, int Id, float t)
Definition: gia.h:549
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
static int Gia_AigerReadInt(unsigned char *pPos)
Definition: gia.h:827
void Gia_ManCheckMark0(Gia_Man_t *p)
Definition: giaUtil.c:234
Gia_Man_t * Gia_ManFramesInitSpecial(Gia_Man_t *pAig, int nFrames, int fVerbose)
Definition: giaFrames.c:941
int Gia_ManHashMaj(Gia_Man_t *p, int iData0, int iData1, int iData2)
Definition: giaHash.c:700
Gia_Man_t * Gia_ManSeqCleanup(Gia_Man_t *p)
Definition: giaScl.c:183
int nConstrs
Definition: gia.h:117
Gia_Man_t * Gia_ManSpecReduceInitFrames(Gia_Man_t *p, Abc_Cex_t *pInit, int nFramesMax, int *pnFrames, int fDualOut, int nMinOutputs)
Definition: giaEquiv.c:1075
static int Gia_ObjFaninLit1(Gia_Obj_t *pObj, int ObjId)
Definition: gia.h:467
Vec_Int_t * vTruths
Definition: gia.h:139
char * pName
Definition: gia.h:97
static int Gia_ObjLutSize(Gia_Man_t *p, int Id)
Definition: gia.h:953
Gia_Man_t * Gia_ManReduceConst(Gia_Man_t *pAig, int fVerbose)
Definition: giaTsim.c:737
void Gia_ManSimInfoTransfer(Gia_ManSim_t *p)
Definition: giaSim.c:452
Gia_Man_t * Gia_ManDupCof(Gia_Man_t *p, int iVar)
Definition: giaCof.c:862
void Gia_ManFanoutStop(Gia_Man_t *p)
Definition: giaFanout.c:98
int nTravIds
Definition: gia.h:118
int fCheckMiter
Definition: gia.h:245
Vec_Str_t * Gia_AigerWriteIntoMemoryStrPart(Gia_Man_t *p, Vec_Int_t *vCis, Vec_Int_t *vAnds, Vec_Int_t *vCos, int nRegs)
Definition: giaAiger.c:940
static float Gia_ObjTimeSlack(Gia_Man_t *p, int Id)
Definition: gia.h:543
int Gia_ManVerifyWithBoxes(Gia_Man_t *pGia, int nBTLimit, int nTimeLim, int fSeq, int fVerbose, char *pFileSpec)
Definition: giaTim.c:859
static int Gia_ObjFanin1CopyArray(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:494
int fShowImage
Definition: gia.h:218
Gia_Man_t * Gia_ManAigSyn2(Gia_Man_t *p, int fOldAlgo, int fCoarsen, int fCutMin, int nRelaxRatio, int fDelayMin, int fVerbose, int fVeryVerbose)
Definition: giaScript.c:69
Definition: gia.h:265
int Gia_ManLutFaninCount(Gia_Man_t *p)
Definition: giaIf.c:106
int Gia_ManBoxNum(Gia_Man_t *p)
DECLARATIONS ///.
Definition: giaTim.c:49
int iPatsPi
Definition: gia.h:176
static void Gia_ObjSetProved(Gia_Man_t *p, int Id)
Definition: gia.h:897
int Gia_ManEquivCountLitsAll(Gia_Man_t *p)
Definition: giaEquiv.c:160
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
Definition: gia.h:482
static void Gia_ObjFlipFaninC0(Gia_Obj_t *pObj)
Definition: gia.h:472
static int Gia_ObjIsRo(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:443
void Gia_ObjSetPhase(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: giaUtil.c:346
static int Gia_ObjCellFanin(Gia_Man_t *p, int iLit, int i)
Definition: gia.h:965
Gia_Man_t * Gia_ManUnrollAndCofactor(Gia_Man_t *p, int nFrames, int nFanMax, int fVerbose)
Definition: giaEnable.c:403
void Jf_ManSetDefaultPars(Jf_Par_t *pPars)
Definition: giaJf.c:1679
void Gia_ManSwapPos(Gia_Man_t *p, int i)
Definition: giaUtil.c:1582
Vec_Int_t * vGateClasses
Definition: gia.h:141
Gia_Man_t * Gia_ManBalance(Gia_Man_t *p, int fSimpleAnd, int fVerbose)
Definition: giaBalAig.c:365
Gia_Man_t * Gia_ManDupOrderDfsChoices(Gia_Man_t *p)
Definition: giaDup.c:328
Gia_Man_t * Gia_ManDupNormalize(Gia_Man_t *p)
Definition: giaTim.c:134
int fVerbose
Definition: gia.h:232
static void Gia_ObjSetFanout(Gia_Man_t *p, Gia_Obj_t *pObj, int i, Gia_Obj_t *pFan)
Definition: gia.h:944
static Gia_Obj_t * Gia_ObjRoToRi(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:446
Gia_Man_t * Gia_ManRetimeForward(Gia_Man_t *p, int nMaxIters, int fVerbose)
Definition: giaRetime.c:267
static int Gia_ManAppendBuf(Gia_Man_t *p, int iLit)
Definition: gia.h:694
void Gia_ManStaticFanoutStop(Gia_Man_t *p)
Definition: giaFanout.c:290
static int Gia_ObjIsRi(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:444
Gia_Man_t * pAig
Definition: gia.h:253
void Gia_SweeperSetConflictLimit(Gia_Man_t *p, int nConfMax)
Definition: giaSweeper.c:220
void Gia_ManSetMark0(Gia_Man_t *p)
Definition: giaUtil.c:196
int Gia_MmStepReadMemUsage(Gia_MmStep_t *p)
Definition: giaMem.c:586
static void Gia_ObjSetAndLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:506
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static void Gia_ObjSetCioId(Gia_Obj_t *pObj, int v)
Definition: gia.h:412
static int Gia_ObjReprSelf(Gia_Man_t *p, int Id)
Definition: gia.h:892
static int Gia_ObjCellSize(Gia_Man_t *p, int iLit)
Definition: gia.h:963
Gia_Man_t * Gia_ManDupDfs(Gia_Man_t *p)
Definition: giaDup.c:1238
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static void Gia_ObjSetTravIdCurrent(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:531
static unsigned Gia_ObjCutSign(unsigned ObjId)
Definition: gia.h:310
Gia_Man_t * Gia_ManFront(Gia_Man_t *p)
Definition: giaFront.c:147
Vec_Ptr_t * vTtInputs
Definition: gia.h:186
Gia_Man_t * Gia_ManDupWithNewPo(Gia_Man_t *p1, Gia_Man_t *p2)
Definition: giaDup.c:1816
static int Gia_ObjDiffColors(Gia_Man_t *p, int i, int j)
Definition: gia.h:908
void * pData
Definition: gia.h:169
static int Gia_ObjIsConst(Gia_Man_t *p, int Id)
Definition: gia.h:915
static int Gia_ObjCopyArray(Gia_Man_t *p, int iObj)
Definition: gia.h:487
static int Gia_ObjRefInc(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:522
Vec_Int_t * vDoms
Definition: gia.h:145
unsigned * pDataSimCos
Definition: gia.h:261
Gia_Man_t * Gia_ManDupSelf(Gia_Man_t *p)
Definition: giaDup.c:890
static int Gia_ManIsConst0Lit(int iLit)
Definition: gia.h:373
void Gia_ManPrintPackingStats(Gia_Man_t *p)
Definition: giaIf.c:553
void Gia_ManFrontTest(Gia_Man_t *p)
Definition: giaFront.c:262
unsigned * pDataSim
Definition: gia.h:259
int Gia_ManHashMux(Gia_Man_t *p, int iCtrl, int iData1, int iData0)
Definition: giaHash.c:677
static float Gia_ObjTimeSlackObj(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:546
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
Definition: bblif.c:356
void For_ManExperiment(Gia_Man_t *pGia, int nIters, int fClustered, int fVerbose)
Definition: giaForce.c:1039
void Gia_ManHashStart(Gia_Man_t *p)
Definition: giaHash.c:117
unsigned char * pSwitching
Definition: gia.h:147
char * pSpec
Definition: gia.h:98
static int Gia_ObjIsAndOrConst0(Gia_Obj_t *pObj)
Definition: gia.h:419
word nHashHit
Definition: gia.h:167
void Gia_ManStaticFanoutStart(Gia_Man_t *p)
Definition: giaFanout.c:238
int Gia_SweeperProbeCreate(Gia_Man_t *p, int iLit)
Definition: giaSweeper.c:249
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
Definition: giaMan.c:52
static int Gia_ObjFanoutNum(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:940
Gia_Man_t * Gia_ManDupMuxes(Gia_Man_t *p, int Limit)
Definition: giaMuxes.c:96
void Gia_ManCollectCis(Gia_Man_t *p, int *pNodes, int nNodes, Vec_Int_t *vSupp)
Definition: giaDfs.c:71
Gia_Man_t * Gia_ManDupOrderDfsReverse(Gia_Man_t *p)
Definition: giaDup.c:363
Vec_Int_t * vCiNumsOrig
Definition: gia.h:160
int Gia_ManCheckCoPhase(Gia_Man_t *p)
Definition: giaUtil.c:450
static int Gia_ObjIsXor(Gia_Obj_t *pObj)
Definition: gia.h:423
Gia_Man_t * Gia_ManSeqStructSweep(Gia_Man_t *p, int fConst, int fEquiv, int fVerbose)
Definition: giaScl.c:258
Gia_Man_t * Gia_ManDupCofAll(Gia_Man_t *p, int nFanLim, int fVerbose)
Definition: giaCof.c:987
int nIters
Definition: gia.h:242
static int Gia_ObjLutIsMux(Gia_Man_t *p, int Id)
Definition: gia.h:957
static int * Gia_ObjLutFanins(Gia_Man_t *p, int Id)
Definition: gia.h:954
Gia_Man_t * Gia_ManDupTopAnd(Gia_Man_t *p, int fVerbose)
Definition: giaDup.c:2075
static float Gia_ObjTimeRequired(Gia_Man_t *p, int Id)
Definition: gia.h:542
int Gia_ManHashXorReal(Gia_Man_t *p, int iLit0, int iLit1)
Definition: giaHash.c:465
Gia_Man_t * Gia_ManRehash(Gia_Man_t *p, int fAddStrash)
Definition: giaHash.c:719
unsigned * Gia_ManConvertAigToTruth(Gia_Man_t *p, Gia_Obj_t *pRoot, Vec_Int_t *vLeaves, Vec_Int_t *vTruth, Vec_Int_t *vVisited)
Definition: giaBidec.c:90
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
unsigned fCompl1
Definition: gia.h:83
Vec_Flt_t * vOutReqs
Definition: gia.h:151
int fTents
Definition: gia.h:197
Gia_Man_t * Gia_ManDupWithAttributes(Gia_Man_t *p)
Definition: giaDup.c:583
int Gia_ManBoxCiNum(Gia_Man_t *p)
Definition: giaTim.c:61
void * pManTime
Definition: gia.h:165
void Gia_ManFilterEquivsUsingLatches(Gia_Man_t *pGia, int fFlopsOnly, int fFlopsWith, int fUseRiDrivers)
Definition: giaEquiv.c:2147
static int Gia_ObjId(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:410
void Gia_ManCleanLevels(Gia_Man_t *p, int Size)
Definition: giaUtil.c:470
static int Counter
int * pFanData
Definition: gia.h:127
static void Gia_ManTimeStop(Gia_Man_t *p)
Definition: gia.h:540
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
void Gia_ManFillValue(Gia_Man_t *p)
Definition: giaUtil.c:328
static int Gia_ManXorNum(Gia_Man_t *p)
Definition: gia.h:390
void Gia_ObjPrint(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: giaUtil.c:1258
void Gia_ManTransferTiming(Gia_Man_t *p, Gia_Man_t *pGia)
Definition: giaIf.c:1912
static int Gia_ManCandNum(Gia_Man_t *p)
Definition: gia.h:394
int Gia_ManBoxCoNum(Gia_Man_t *p)
Definition: giaTim.c:65
Gia_Man_t * Gia_ManDupDfsNode(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: giaDup.c:1528
static int Gia_ObjTerSimGet0(Gia_Obj_t *pObj)
Definition: gia.h:775
static void Gia_ManTruthFill(unsigned *pOut, int nVars)
Definition: gia.h:358
int fRefine
Definition: gia.h:214
int Gia_ManConeSize(Gia_Man_t *p, int *pNodes, int nNodes)
Definition: giaDfs.c:351
Vec_Int_t * Tas_ReadModel(Tas_Man_t *p)
Definition: giaCTas.c:250
int Gia_ManLutSizeMax(Gia_Man_t *p)
Definition: giaIf.c:125
int nProcNumMax
Definition: gia.h:295
static void Gia_ManTruthNot(unsigned *pOut, unsigned *pIn, int nVars)
Definition: gia.h:364
static int Gia_ObjIsCellInv(Gia_Man_t *p, int iLit)
Definition: gia.h:961
int Gia_ManFilterEquivsUsingParts(Gia_Man_t *pGia, char *pName1, char *pName2)
Definition: giaEquiv.c:1999
void Gia_ManMappingVerify(Gia_Man_t *p)
Definition: giaIf.c:1807
static int Gia_ManConst1Lit()
Definition: gia.h:372
int fNpn
Definition: gia.h:200
static int Gia_ManCoIdToId(Gia_Man_t *p, int CoId)
Definition: gia.h:439
int Gia_ManCountChoices(Gia_Man_t *p)
Definition: giaEquiv.c:1708
Vec_Int_t * vCellMapping
Definition: gia.h:132
word Gia_ManRandomW(int fReset)
Definition: giaUtil.c:62
Gia_Man_t * Gia_ManChoiceMiter(Vec_Ptr_t *vGias)
Definition: giaDup.c:2574
static int Gia_ObjFanoutId(Gia_Man_t *p, int Id, int i)
Definition: gia.h:941
static Gia_Obj_t * Gia_ObjNextObj(Gia_Man_t *p, int Id)
Definition: gia.h:911
Vec_Vec_t * Gia_ManLevelize(Gia_Man_t *p)
Definition: giaDfs.c:379
int Gia_SweeperCheckEquiv(Gia_Man_t *p, int ProbeId1, int ProbeId2)
Definition: giaSweeper.c:789
char * Gia_FileNameGenericAppend(char *pBase, char *pSuffix)
Definition: giaUtil.c:125
void Gia_ManReportImprovement(Gia_Man_t *p, Gia_Man_t *pNew)
Definition: giaMan.c:646
int nTtVars
Definition: gia.h:182
void Gia_ManSetPhase1(Gia_Man_t *p)
Definition: giaUtil.c:409
static void Gia_ObjSetReprRev(Gia_Man_t *p, int Id, int Num)
Definition: gia.h:889
int * Gia_ManDeriveNexts(Gia_Man_t *p)
Definition: giaEquiv.c:97
static int Gia_ObjLitCopy(Gia_Man_t *p, int iLit)
Definition: gia.h:479
static int pPerm[13719]
Definition: rwrTemp.c:32
static int Gia_ObjDiff0(Gia_Obj_t *pObj)
Definition: gia.h:449
void Gia_AigerWrite(Gia_Man_t *p, char *pFileName, int fWriteSymbols, int fCompact)
Definition: giaAiger.c:1024
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
Vec_Int_t * Gia_ManRequiredLevel(Gia_Man_t *p)
Definition: giaUtil.c:639
Vec_Ptr_t * vSeqModelVec
Definition: gia.h:137
int Gia_SweeperProbeUpdate(Gia_Man_t *p, int ProbeId, int iLitNew)
Definition: giaSweeper.c:267
void Gia_ManFanoutStart(Gia_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition: giaFanout.c:66
Vec_Ptr_t * vNamesOut
Definition: gia.h:156
void Gia_ManPrintNpnClasses(Gia_Man_t *p)
Definition: giaMan.c:668
void Gia_ManPrintMuxStats(Gia_Man_t *p)
Definition: giaMuxes.c:61
unsigned fUndef
Definition: gia.h:70
Abc_Cex_t * Gia_ManCexExtendToIncludeCurrentStates(Gia_Man_t *p, Abc_Cex_t *pCex)
Definition: giaCex.c:302
Gia_Man_t * Gia_ManFraigSweepSimple(Gia_Man_t *p, void *pPars)
Definition: giaSweep.c:556
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
Definition: gia.h:481
Gia_Man_t * Gia_ManUnrollDup(Gia_Man_t *p, Vec_Int_t *vLimit)
Definition: giaFrames.c:107
char * Gia_MmFixedEntryFetch(Gia_MmFixed_t *p)
Definition: giaMem.c:161
Gia_Man_t * Gia_ManPerformLfMapping(Gia_Man_t *p, Jf_Par_t *pPars, int fNormalized)
Definition: giaLf.c:2243
word Gia_ObjComputeTruthTable6Lut(Gia_Man_t *p, int iObj, Vec_Wrd_t *vTemp)
Definition: giaTruth.c:76
void Gia_MmStepEntryRecycle(Gia_MmStep_t *p, char *pEntry, int nBytes)
Definition: giaMem.c:563
static Gia_Obj_t * Gia_ObjCopy(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:478
Vec_Int_t * vUserPiIds
Definition: gia.h:157
static Gia_Obj_t * Gia_ObjFanin2(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:456
int nAnd2Delay
Definition: gia.h:173
int Gia_ManEquivCountClasses(Gia_Man_t *p)
Definition: giaEquiv.c:179
void Gia_ManDupAppendShare(Gia_Man_t *p, Gia_Man_t *pTwo)
Definition: giaDup.c:765
static int Gia_ObjColors(Gia_Man_t *p, int Id)
Definition: gia.h:904
static int Gia_ObjIsTravIdCurrentId(Gia_Man_t *p, int Id)
Definition: gia.h:536
static int Gia_ObjIsCo(Gia_Obj_t *pObj)
Definition: gia.h:421
static int Gia_ObjNext(Gia_Man_t *p, int Id)
Definition: gia.h:912
static void Gia_ObjSetNext(Gia_Man_t *p, int Id, int Num)
Definition: gia.h:913
Gia_MmStep_t * Gia_MmStepStart(int nSteps)
Definition: giaMem.c:468
int Gia_ManNonRegBoxNum(Gia_Man_t *p)
Definition: giaTim.c:57
void Gia_DumpAiger(Gia_Man_t *p, char *pFilePrefix, int iFileNum, int nFileNumDigits)
Definition: giaAiger.c:1343
int fDoAverage
Definition: gia.h:288
Vec_Int_t * vCis
Definition: gia.h:108
Gia_Man_t * Gia_ManDupDfsCiMap(Gia_Man_t *p, int *pCi2Lit, Vec_Int_t *vLits)
Definition: giaDup.c:1890
static int Gia_ObjRefDec(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:523
Gia_ParSim_t * pPars
Definition: gia.h:254
static int Gia_ManAppendAnd2(Gia_Man_t *p, int iLit0, int iLit1)
Definition: gia.h:627
static Gia_Obj_t * Gia_ObjReprObj(Gia_Man_t *p, int Id)
Definition: gia.h:886
static void Gia_ObjSetTimeArrival(Gia_Man_t *p, int Id, float t)
Definition: gia.h:547
int fMuxXor
Definition: gia.h:202
static void Gia_ObjSetColors(Gia_Man_t *p, int Id)
Definition: gia.h:906
Gia_Man_t * Gia_ManDupCollapse(Gia_Man_t *p, Gia_Man_t *pBoxes, Vec_Int_t *vBoxPres, int fSeq)
Definition: giaTim.c:748
int Gia_ObjIsMuxType(Gia_Obj_t *pNode)
Definition: giaUtil.c:885
void Gia_ManPrintStatsMiter(Gia_Man_t *p, int fVerbose)
Definition: giaMan.c:594
static void Gia_ObjSetTimeRequiredObj(Gia_Man_t *p, Gia_Obj_t *pObj, float t)
Definition: gia.h:551
int nHTable
Definition: gia.h:111
static int Gia_ManCiNum(Gia_Man_t *p)
Definition: gia.h:383
static Gia_Obj_t * Gia_ManAppendObj(Gia_Man_t *p)
Definition: gia.h:561
void Gia_ManPrint(Gia_Man_t *p)
Definition: giaUtil.c:1329
int Gia_ManFilterEquivsForSpeculation(Gia_Man_t *pGia, char *pName1, char *pName2, int fLatchA, int fLatchB)
Definition: giaEquiv.c:1862
static int Abc_LitNot(int Lit)
Definition: abc_global.h:266
static int Gia_ObjIsTail(Gia_Man_t *p, int Id)
Definition: gia.h:918
static int Gia_ObjLutFanin(Gia_Man_t *p, int Id, int i)
Definition: gia.h:955
static void Gia_ObjSetNumId(Gia_Man_t *p, int Id, int n)
Definition: gia.h:514
static int Gia_ObjHasSameRepr(Gia_Man_t *p, int i, int k)
Definition: gia.h:920
int nRounds
Definition: gia.h:270
Vec_Vec_t * vClockDoms
Definition: gia.h:163
static void Gia_ObjRefFanin0Dec(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:527
unsigned fPhase
Definition: gia.h:85
#define GIA_VOID
Definition: gia.h:45
static void Gia_ObjSetCopyArray(Gia_Man_t *p, int iObj, int iLit)
Definition: gia.h:488
static Gia_Obj_t * Gia_ManCo(Gia_Man_t *p, int v)
Definition: gia.h:404
static int Gia_ManTruthIsConst1(unsigned *pIn, int nVars)
Definition: gia.h:338
static int Gia_ObjTerSimGet1(Gia_Obj_t *pObj)
Definition: gia.h:776
Gia_Man_t * Gia_ManDupCofactorVar(Gia_Man_t *p, int iVar, int Value)
Definition: giaDup.c:1281
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
void Gia_SweeperPrintStats(Gia_Man_t *p)
Definition: giaSweeper.c:181
int iData
Definition: gia.h:171
static Gia_Obj_t * Gia_ObjFanout(Gia_Man_t *p, Gia_Obj_t *pObj, int i)
Definition: gia.h:943
int nRegs
Definition: gia.h:99
static word * Gia_ObjSimObj(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:557
static int Gia_ManHasMapping(Gia_Man_t *p)
Definition: gia.h:951
static int Gia_IsComplement(Gia_Obj_t *p)
Definition: gia.h:380
void Gia_ManPrintMiterStatus(Gia_Man_t *p)
Definition: giaMan.c:543
int Gia_ManHashLookup(Gia_Man_t *p, Gia_Obj_t *p0, Gia_Obj_t *p1)
Definition: giaHash.c:79
static int Gia_ObjFanoutNumId(Gia_Man_t *p, int Id)
Definition: gia.h:939
Vec_Int_t * vCofVars
Definition: gia.h:162
int Gia_MmFlexReadMemUsage(Gia_MmFlex_t *p)
Definition: giaMem.c:439
void Gia_MmFixedRestart(Gia_MmFixed_t *p)
Definition: giaMem.c:232
static void Gia_ObjSetCoLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:504
Gia_Man_t * Gia_ManDupLastPis(Gia_Man_t *p, int nLastPis)
Definition: giaDup.c:429
unsigned fMark0
Definition: gia.h:79
static int Gia_ObjTerSimGet1Fanin1(Gia_Obj_t *pObj)
Definition: gia.h:783
Gia_Man_t * Gia_ManDupSliced(Gia_Man_t *p, int nSuppMax)
Definition: giaDup.c:2888
void Gia_ManTestDistance(Gia_Man_t *p)
Definition: giaEmbed.c:904
static int Gia_ObjVisitColor(Gia_Man_t *p, int Id, int c)
Definition: gia.h:907
Gia_Man_t * Gia_ManDupFlip(Gia_Man_t *p, int *pInitState)
Definition: giaDup.c:460
void * Gia_ManUpdateTimMan2(Gia_Man_t *p, Vec_Int_t *vBoxesLeft, int nTermsDiff)
Definition: giaTim.c:664
Gia_Man_t * Gia_ManCleanupOutputs(Gia_Man_t *p, int nOutputs)
Definition: giaScl.c:101
Gia_Man_t * Gia_ManPerformSopBalance(Gia_Man_t *p, int nCutNum, int nRelaxRatio, int fVerbose)
Definition: giaIf.c:2031
static Gia_Obj_t * Gia_ObjRiToRo(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:447
Vec_Int_t * vTtNodes
Definition: gia.h:185
Gia_Obj_t * Gia_ObjRecognizeMux(Gia_Obj_t *pNode, Gia_Obj_t **ppNodeT, Gia_Obj_t **ppNodeE)
Definition: giaUtil.c:959
unsigned xCoord
Definition: gia.h:69
Definition: gia.h:95
int Gia_ManIsNormalized(Gia_Man_t *p)
Definition: giaTim.c:109
void Gia_ManCollectAnds(Gia_Man_t *p, int *pNodes, int nNodes, Vec_Int_t *vNodes)
Definition: giaDfs.c:123
Gia_Man_t * Gia_SweeperExtractUserLogic(Gia_Man_t *p, Vec_Int_t *vProbeIds, Vec_Ptr_t *vInNames, Vec_Ptr_t *vOutNames)
Definition: giaSweeper.c:358
void Gia_SatVerifyPattern(Gia_Man_t *p, Gia_Obj_t *pRoot, Vec_Int_t *vCex, Vec_Int_t *vVisit)
Definition: giaPat.c:93
static int Gia_ManBufNum(Gia_Man_t *p)
Definition: gia.h:392
int fPureAig
Definition: gia.h:287
static int Gia_ObjIsCell(Gia_Man_t *p, int iLit)
Definition: gia.h:960
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
Definition: gia.h:422
static void Gia_ManTimeStart(Gia_Man_t *p)
Definition: gia.h:539
int Gia_ManHashAndMulti(Gia_Man_t *p, Vec_Int_t *vLits)
Definition: giaHash.c:763
int fSwitch
Definition: gia.h:198
void Gia_ManDupAppend(Gia_Man_t *p, Gia_Man_t *pTwo)
Definition: giaDup.c:746
char * Gia_MmFlexEntryFetch(Gia_MmFlex_t *p, int nBytes)
Definition: giaMem.c:366
int fCutMin
Definition: gia.h:282
int Gia_ManUnrollLastLit(void *pMan)
Definition: giaFrames.c:490
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
Definition: gia.h:400
static int Gia_ObjIsNone(Gia_Man_t *p, int Id)
Definition: gia.h:917
static int Gia_ObjNumId(Gia_Man_t *p, int Id)
Definition: gia.h:512
#define GIA_NONE
INCLUDES ///.
Definition: gia.h:44
int fSkipMap
Definition: gia.h:204
int Gia_MmFixedReadMemUsage(Gia_MmFixed_t *p)
Definition: giaMem.c:271
int nTerLoop
Definition: gia.h:125
static void Gia_ObjTerSimSetC(Gia_Obj_t *pObj)
Definition: gia.h:769
static void Gia_ObjSetMuxLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:508
static int Gia_ManAppendMaj(Gia_Man_t *p, int iData0, int iData1, int iData2)
Definition: gia.h:728
Gia_Man_t * Gia_ManDupCycled(Gia_Man_t *pAig, Abc_Cex_t *pCex, int nFrames)
Definition: giaDup.c:523
void Gia_ManHashProfile(Gia_Man_t *p)
Definition: giaHash.c:203
Gia_MmFlex_t * Gia_MmFlexStart()
Definition: giaMem.c:305
Gia_Plc_t * pPlacement
Definition: gia.h:148
void Gia_ManUnrollStop(void *pMan)
Definition: giaFrames.c:310
static void Gia_ObjTerSimSet1(Gia_Obj_t *pObj)
Definition: gia.h:771
Gia_Man_t * Gia_ManDupDfsCone(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: giaDup.c:1484
int fMiter
Definition: gia.h:203
void Gia_ManSimSetDefaultParams(Gia_ParSim_t *p)
Definition: giaSim.c:164
Gia_Man_t * Gia_ManDupTimes(Gia_Man_t *p, int nTimes)
Definition: giaDup.c:1078
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
Vec_Flt_t * Gia_ManPrintOutputProb(Gia_Man_t *p)
Definition: giaSwitch.c:813
void Gia_ManTransferPacking(Gia_Man_t *p, Gia_Man_t *pGia)
Definition: giaIf.c:1878
static int Gia_ManIsConst1Lit(int iLit)
Definition: gia.h:374
Vec_Int_t * vCoNumsOrig
Definition: gia.h:161
int fInit
Definition: gia.h:228
static int Gia_ObjFaninId0p(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:463
int nTravIdsAlloc
Definition: gia.h:154
static void Gia_ObjSetXorLevel(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:507
static int * Gia_ObjCellFanins(Gia_Man_t *p, int iLit)
Definition: gia.h:964
typedefABC_NAMESPACE_HEADER_START struct Vec_Flt_t_ Vec_Flt_t
INCLUDES ///.
Definition: vecFlt.h:42
void Gia_ManSimInfoInit(Gia_ManSim_t *p)
Definition: giaSim.c:429
static void Gia_ClassUndoPair(Gia_Man_t *p, int i)
Definition: gia.h:923
static int Gia_ObjIsPo(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:442
static int Gia_ObjFaninId2p(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:465
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
Definition: gia.h:455
void Gia_MmFixedEntryRecycle(Gia_MmFixed_t *p, char *pEntry)
Definition: giaMem.c:212
Gia_Man_t * Gia_ManDupDfsSkip(Gia_Man_t *p)
Definition: giaDup.c:1454
static int Gia_ObjFailed(Gia_Man_t *p, int Id)
Definition: gia.h:900
void Gia_ManWriteMiniAig(Gia_Man_t *pGia, char *pFileName)
Definition: giaMini.c:176
int fFuncDsd
Definition: gia.h:283
int nRegsAlloc
Definition: gia.h:100
int fCluster
Definition: gia.h:215
int fVerbose
Definition: gia.h:174
unsigned fFailed
Definition: gia.h:60
Vec_Int_t * Gia_ManCollectPoIds(Gia_Man_t *p)
Definition: giaUtil.c:863
Vec_Wrd_t * vTtMemory
Definition: gia.h:187
#define ABC_INFINITY
MACRO DEFINITIONS ///.
Definition: abc_global.h:216
static float Gia_ObjTimeArrival(Gia_Man_t *p, int Id)
Definition: gia.h:541
int Gia_ManLutLevelWithBoxes(Gia_Man_t *p)
Definition: giaTim.c:572
void Gia_ManCounterExampleValueStart(Gia_Man_t *pGia, Abc_Cex_t *pCex)
Definition: giaCex.c:184
static int Gia_ObjProved(Gia_Man_t *p, int Id)
Definition: gia.h:896
void Gia_ManTransferMapping(Gia_Man_t *p, Gia_Man_t *pGia)
Definition: giaIf.c:1855
DECLARATIONS ///.
Definition: giaMem.c:30
int Gia_NodeMffcSize(Gia_Man_t *p, Gia_Obj_t *pNode)
Definition: giaUtil.c:1132
Gia_Rpr_t * pReprs
Definition: gia.h:121
int * Gia_SortFloats(float *pArray, int *pPerm, int nSize)
Definition: giaSort.c:251
int fGenCnf
Definition: gia.h:284
static void Gia_AigerWriteUnsignedFile(FILE *pFile, unsigned x)
Definition: gia.h:860
#define assert(ex)
Definition: util_old.h:213
static int * Vec_IntEntryP(Vec_Int_t *p, int i)
Definition: vecInt.h:417
int Gia_SweeperFraig(Gia_Man_t *p, Vec_Int_t *vProbeIds, char *pCommLime, int nWords, int nConfs, int fVerify, int fVerbose)
Definition: giaSweeper.c:1064
static word * Gia_ObjSim(Gia_Man_t *p, int Id)
Definition: gia.h:556
double Gia_ManMemory(Gia_Man_t *p)
Definition: giaMan.c:156
void Gia_ManSetPhase(Gia_Man_t *p)
Definition: giaUtil.c:379
int Gia_ManLevelNum(Gia_Man_t *p)
Definition: giaUtil.c:505
int Gia_ManEquivSetColors(Gia_Man_t *p, int fVerbose)
Definition: giaEquiv.c:692
static int Gia_ObjFaninId2(Gia_Man_t *p, int ObjId)
Definition: gia.h:462
static int Gia_ObjFanin0CopyArray(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:493
unsigned Value
Definition: gia.h:87
int Gia_ManHashMuxReal(Gia_Man_t *p, int iLitC, int iLit1, int iLit0)
Definition: giaHash.c:517
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
Definition: gia.h:66
static int Gia_ObjIsFailedPair(Gia_Man_t *p, int i, int k)
Definition: gia.h:921
static unsigned Gia_AigerReadUnsigned(unsigned char **ppPos)
Definition: gia.h:840
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
Definition: utilCex.h:39
static float Vec_FltEntry(Vec_Flt_t *p, int i)
Definition: vecFlt.h:342
Vec_Int_t * vLevels
Definition: gia.h:115
int Tas_ManSolve(Tas_Man_t *p, Gia_Obj_t *pObj, Gia_Obj_t *pObj2)
Definition: giaCTas.c:1366
static int Gia_ObjIsLut(Gia_Man_t *p, int Id)
Definition: gia.h:952
static Gia_Obj_t * Gia_Lit2Obj(Gia_Man_t *p, int iLit)
Definition: gia.h:434
unsigned fCompl0
Definition: gia.h:78
unsigned fProved
Definition: gia.h:59
int Gia_SweeperCondPop(Gia_Man_t *p)
Definition: giaSweeper.c:324
int nLutSizeMax
Definition: gia.h:293
void Gia_ManHashAlloc(Gia_Man_t *p)
Definition: giaHash.c:99
void Gia_ManPrintLutStats(Gia_Man_t *p)
Definition: giaIf.c:613
void Tas_ManSatPrintStats(Tas_Man_t *p)
Definition: giaCTas.c:1487
Vec_Int_t * Gia_SweeperCondVector(Gia_Man_t *p)
Definition: giaSweeper.c:329
unsigned iDiff1
Definition: gia.h:82
Vec_Ptr_t * vNamesIn
Definition: gia.h:155
void Gia_ManIncrementTravId(Gia_Man_t *p)
Definition: giaUtil.c:149
int iOutFail
Definition: gia.h:247
Gia_Man_t * Gia_ManSweepWithBoxes(Gia_Man_t *p, void *pParsC, void *pParsS, int fConst, int fEquiv, int fVerbose)
Definition: giaSweep.c:683
Gia_Man_t * Gia_ManAreaBalance(Gia_Man_t *p, int fSimpleAnd, int nNewNodesMax, int fVerbose, int fVeryVerbose)
Definition: giaBalAig.c:968
Gia_Man_t * Gia_ManDupSelectedOutputs(Gia_Man_t *p, Vec_Int_t *vOutsLeft)
Definition: giaDup.c:266
int fAddStrash
Definition: gia.h:112
static int Gia_ManHasCellMapping(Gia_Man_t *p)
Definition: gia.h:959
static int Gia_AigerWriteUnsignedBuffer(unsigned char *pBuffer, int Pos, unsigned x)
Definition: gia.h:872
void Gia_SweeperCondPush(Gia_Man_t *p, int ProbeId)
Definition: giaSweeper.c:319
void Gia_ManFraSetDefaultParams(Gia_ParFra_t *p)
Definition: giaFrames.c:631
Vec_Int_t * vMapping
Definition: gia.h:131
void * Gia_ManUnrollStart(Gia_Man_t *pAig, Gia_ParFra_t *pPars)
Definition: giaFrames.c:402
Gia_Man_t * Gia_ManIsoCanonicize(Gia_Man_t *p, int fVerbose)
Definition: giaIso.c:958
unsigned * Gia_SimDataCoExt(Gia_ManSim_t *p, int i)
Definition: giaSim.c:36
Gia_Man_t * Gia_ManDupLevelized(Gia_Man_t *p)
Definition: giaDup.c:2812
static int Gia_ObjFaninLit1p(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:470
Gia_Man_t * Gia_ManDupDfsLitArray(Gia_Man_t *p, Vec_Int_t *vLits)
Definition: giaDup.c:1553
Definition: gia.h:56
Vec_Int_t * Gia_ManOrderReverse(Gia_Man_t *p)
Definition: giaDfs.c:407
Vec_Int_t * Gia_ManSaveValue(Gia_Man_t *p)
Definition: giaUtil.c:1605
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
Definition: gia.h:451
Gia_Man_t * Gia_ManTransformToDual(Gia_Man_t *p)
Definition: giaDup.c:2353
Vec_Int_t * vSuper
Definition: gia.h:189
static int Gia_ManPiNum(Gia_Man_t *p)
Definition: gia.h:385
static Gia_Obj_t * Gia_ManRo(Gia_Man_t *p, int v)
Definition: gia.h:407
void Gia_SweeperStop(Gia_Man_t *p)
Definition: giaSweeper.c:157
static void Gia_ObjUnsetProved(Gia_Man_t *p, int Id)
Definition: gia.h:898
static int Gia_ObjTerSimGetC(Gia_Obj_t *pObj)
Definition: gia.h:774
int Gia_SweeperProbeLit(Gia_Man_t *p, int ProbeId)
Definition: giaSweeper.c:276
void Gia_ManCleanMark01(Gia_Man_t *p)
Definition: giaUtil.c:177
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
Definition: gia.h:420
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
Definition: giaScl.c:84
static void Gia_ObjSetTravIdCurrentId(Gia_Man_t *p, int Id)
Definition: gia.h:535
Vec_Int_t * vUserPoIds
Definition: gia.h:158
Vec_Int_t * Gia_ManComputeSwitchProbs(Gia_Man_t *pGia, int nFrames, int nPref, int fProbOne)
Definition: giaSwitch.c:658
static void Gia_ObjSetTimeRequired(Gia_Man_t *p, int Id, float t)
Definition: gia.h:548
Gia_Man_t * Gia_ManDupPermFlopGap(Gia_Man_t *p, Vec_Int_t *vFfPerm)
Definition: giaDup.c:725
static int Gia_ObjFaninId1(Gia_Obj_t *pObj, int ObjId)
Definition: gia.h:461
void Gia_ObjRemoveFanout(Gia_Man_t *p, Gia_Obj_t *pObj, Gia_Obj_t *pFanout)
Definition: giaFanout.c:163
static int Gia_ObjIsMux(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:425
int Gia_ManHashOr(Gia_Man_t *p, int iLit0, int iLit1)
Definition: giaHash.c:611
static int Gia_ManAppendXorReal(Gia_Man_t *p, int iLit0, int iLit1)
Definition: gia.h:639
Gia_Man_t * Gia_ManDupWithConstraints(Gia_Man_t *p, Vec_Int_t *vPoTypes)
Definition: giaDup.c:2627
void Gia_ManSetPhasePattern(Gia_Man_t *p, Vec_Int_t *vCiValues)
Definition: giaUtil.c:386
Vec_Str_t * Gia_AigerWriteIntoMemoryStr(Gia_Man_t *p)
Definition: giaAiger.c:866
Gia_Man_t * Gia_ManPerformSopBalanceWin(Gia_Man_t *p, int LevelMax, int nTimeWindow, int nCutNum, int nRelaxRatio, int fVerbose)
Definition: giaBalMap.c:265
int Gia_ManMarkDangling(Gia_Man_t *p)
Definition: giaUtil.c:1193
int nRoundsEla
Definition: gia.h:271
void Gia_ManEquivFixOutputPairs(Gia_Man_t *p)
Definition: giaEquiv.c:480
int Gia_ManCheckTopoOrder(Gia_Man_t *p)
Definition: giaEquiv.c:73
char * Gia_MmStepEntryFetch(Gia_MmStep_t *p, int nBytes)
Definition: giaMem.c:534
static int Gia_ObjFanin0CopyF(Gia_Man_t *p, int f, Gia_Obj_t *pObj)
Definition: gia.h:491
int nMuxes
Definition: gia.h:106
static void Gia_ObjTerSimSetX(Gia_Obj_t *pObj)
Definition: gia.h:772
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
Definition: vecWrd.h:42
int fUseMux7
Definition: gia.h:279
void Gia_SweeperLogicDump(Gia_Man_t *p, Vec_Int_t *vProbeIds, int fDumpConds, char *pFileName)
Definition: giaSweeper.c:428
int Gia_SweeperCondCheckUnsat(Gia_Man_t *p)
Definition: giaSweeper.c:924
static int Gia_ObjSimWords(Gia_Man_t *p)
Definition: gia.h:554
void * Gia_ManUpdateTimMan(Gia_Man_t *p, Vec_Int_t *vBoxPres)
Definition: giaTim.c:657
int DelayTarget
Definition: gia.h:276
static void Gia_ManTruthClear(unsigned *pOut, int nVars)
Definition: gia.h:352
static void Gia_ObjRefFanin1Dec(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:528
int nCoarseLimit
Definition: gia.h:273
Gia_Man_t * Gia_ManAigSyn4(Gia_Man_t *p, int fVerbose, int fVeryVerbose)
Definition: giaScript.c:184
void Gia_MmFlexStop(Gia_MmFlex_t *p, int fVerbose)
Definition: giaMem.c:337
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
Definition: giaHash.c:572
int fDump
Definition: gia.h:216
Vec_Int_t * Gia_SweeperCollectValidProbeIds(Gia_Man_t *p)
Definition: giaSweeper.c:295
Gia_Man_t * Gia_ManMiter(Gia_Man_t *pAig0, Gia_Man_t *pAig1, int nInsDup, int fDualOut, int fSeq, int fImplic, int fVerbose)
Definition: giaDup.c:2128
static void Gia_ObjSetFailed(Gia_Man_t *p, int Id)
Definition: gia.h:901
static int Gia_ObjCioId(Gia_Obj_t *pObj)
Definition: gia.h:411
static int Gia_Obj2Lit(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:433
int Gia_ManClockDomainNum(Gia_Man_t *p)
Definition: giaTim.c:69
static int Gia_ManObjNum(Gia_Man_t *p)
Definition: gia.h:388
int * pReprsOld
Definition: gia.h:120
Gia_Man_t * Gia_ManMiter2(Gia_Man_t *p, char *pInit, int fVerbose)
Definition: giaDup.c:2462
static int Gia_ObjRepr(Gia_Man_t *p, int Id)
Definition: gia.h:887
Vec_Int_t * Tas_ManSolveMiterNc(Gia_Man_t *pGia, int nConfs, Vec_Str_t **pvStatus, int fVerbose)
Definition: giaCTas.c:1517
Gia_Man_t * Gia_ManDupExist(Gia_Man_t *p, int iVar)
Definition: giaDup.c:1360
int fAddOrCla
Definition: gia.h:286
Vec_Int_t * vLutConfigs
Definition: gia.h:134
static int Gia_ClassIsPair(Gia_Man_t *p, int i)
Definition: gia.h:922
int fVerbose
Definition: gia.h:291
void Gia_ManMarkFanoutDrivers(Gia_Man_t *p)
Definition: giaUtil.c:1553
static int Gia_ObjRefIncId(Gia_Man_t *p, int Id)
Definition: gia.h:519
static void Gia_ObjTerSimAnd(Gia_Obj_t *pObj)
Definition: gia.h:785
static void Gia_ManTimeClean(Gia_Man_t *p)
Definition: gia.h:538
Vec_Flt_t * vInArrs
Definition: gia.h:150
#define GIA_ONE
Definition: gia.h:748
static Gia_Obj_t * Gia_ObjFanout0(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:942
void Gia_ManSimulateRound(Gia_ManSim_t *p)
Definition: giaSim.c:475
static void Gia_ObjSetColor(Gia_Man_t *p, int Id, int c)
Definition: gia.h:905
static int Gia_ManCiIdToId(Gia_Man_t *p, int CiId)
Definition: gia.h:438
static float Gia_ObjTimeArrivalObj(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:544
static Gia_Obj_t * Gia_ManRi(Gia_Man_t *p, int v)
Definition: gia.h:408
Vec_Int_t * Gia_ManReverseLevel(Gia_Man_t *p)
Definition: giaUtil.c:595
void Gia_ManHashStop(Gia_Man_t *p)
Definition: giaHash.c:142
static int Gia_ObjFaninId0(Gia_Obj_t *pObj, int ObjId)
Definition: gia.h:460
int fCoarsen
Definition: gia.h:281
static int Gia_ObjIsPi(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:441
static int Gia_ManCoNum(Gia_Man_t *p)
Definition: gia.h:384
void Gia_ManDupRemapEquiv(Gia_Man_t *pNew, Gia_Man_t *p)
DECLARATIONS ///.
Definition: giaDup.c:46
int fDisableSt
Definition: gia.h:230
Vec_Int_t vCopies
Definition: gia.h:138
static void Gia_ObjSetLevel(Gia_Man_t *p, Gia_Obj_t *pObj, int l)
Definition: gia.h:503
Vec_Int_t * vTtNums
Definition: gia.h:184
Abc_Cex_t * pCexSeq
Definition: gia.h:136
static int Gia_ObjHasRepr(Gia_Man_t *p, int Id)
Definition: gia.h:891
static word * Vec_WrdEntryP(Vec_Wrd_t *p, int i)
Definition: vecWrd.h:401
static int Gia_ObjCopyF(Gia_Man_t *p, int f, Gia_Obj_t *pObj)
Definition: gia.h:485
static void Gia_ManFlipVerbose(Gia_Man_t *p)
Definition: gia.h:396
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387
int TimeLimit
Definition: gia.h:244