abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
if.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [if.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [FPGA mapping based on priority cuts.]
8 
9  Synopsis [External declarations.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - November 21, 2006.]
16 
17  Revision [$Id: if.h,v 1.00 2006/11/21 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__map__if__if_h
22 #define ABC__map__if__if_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/mem/mem.h"
36 #include "misc/tim/tim.h"
37 #include "misc/util/utilNam.h"
38 #include "misc/vec/vecMem.h"
39 #include "misc/util/utilTruth.h"
40 #include "opt/dau/dau.h"
41 #include "misc/vec/vecHash.h"
42 #include "misc/vec/vecWec.h"
43 
45 
46 
47 ////////////////////////////////////////////////////////////////////////
48 /// PARAMETERS ///
49 ////////////////////////////////////////////////////////////////////////
50 
51 // the maximum size of LUTs used for mapping (should be the same as FPGA_MAX_LUTSIZE defined in "fpga.h"!!!)
52 #define IF_MAX_LUTSIZE 32
53 // the largest possible number of LUT inputs when funtionality of the LUTs are computed
54 #define IF_MAX_FUNC_LUTSIZE 15
55 // a very large number
56 #define IF_INFINITY 100000000
57 // the largest possible user cut cost
58 #define IF_COST_MAX 8191 // ((1<<13)-1)
59 
60 #define IF_BIG_CHAR ((char)120)
61 
62 // object types
63 typedef enum {
64  IF_NONE, // 0: non-existent object
65  IF_CONST1, // 1: constant 1
66  IF_CI, // 2: combinational input
67  IF_CO, // 3: combinational output
68  IF_AND, // 4: AND node
69  IF_VOID // 5: unused object
70 } If_Type_t;
71 
72 ////////////////////////////////////////////////////////////////////////
73 /// BASIC TYPES ///
74 ////////////////////////////////////////////////////////////////////////
75 
76 typedef struct If_Man_t_ If_Man_t;
77 typedef struct If_Par_t_ If_Par_t;
78 typedef struct If_Obj_t_ If_Obj_t;
79 typedef struct If_Cut_t_ If_Cut_t;
80 typedef struct If_Set_t_ If_Set_t;
81 typedef struct If_LibLut_t_ If_LibLut_t;
82 typedef struct If_LibBox_t_ If_LibBox_t;
83 typedef struct If_DsdMan_t_ If_DsdMan_t;
84 typedef struct Ifn_Ntk_t_ Ifn_Ntk_t;
85 
86 typedef struct Ifif_Par_t_ Ifif_Par_t;
88 {
89  int nLutSize; // the LUT size
90  If_LibLut_t * pLutLib; // the LUT library
91  float pLutDelays[IF_MAX_LUTSIZE]; // pin-to-pin delays of the max LUT
92  float DelayWire; // wire delay
93  int nDegree; // structure degree
94  int fCascade; // cascade
95  int fVerbose; // verbose
96  int fVeryVerbose; // verbose
97 };
98 
99 // parameters
100 struct If_Par_t_
101 {
102  // user-controlable parameters
103  int nLutSize; // the LUT size
104  int nCutsMax; // the max number of cuts
105  int nFlowIters; // the number of iterations of area recovery
106  int nAreaIters; // the number of iterations of area recovery
107  int nGateSize; // the max size of the AND/OR gate to map into
108  int nNonDecLimit; // the max size of non-dec nodes
109  float DelayTarget; // delay target
110  float Epsilon; // value used in comparison floating point numbers
111  int nRelaxRatio; // delay relaxation ratio
112  int nStructType; // type of the structure
113  int fPreprocess; // preprossing
114  int fArea; // area-oriented mapping
115  int fFancy; // a fancy feature
116  int fExpRed; // expand/reduce of the best cuts
117  int fLatchPaths; // reset timing on latch paths
118  int fEdge; // uses edge-based cut selection heuristics
119  int fPower; // uses power-aware cut selection heuristics
120  int fCutMin; // performs cut minimization by removing functionally reducdant variables
121  int fDelayOpt; // special delay optimization
122  int fDelayOptLut; // delay optimization for LUTs
123  int fDsdBalance; // special delay optimization
124  int fUserRecLib; // use recorded library
125  int fBidec; // use bi-decomposition
126  int fUseBat; // use one specialized feature
127  int fUseBuffs; // use buffers to decouple outputs
128  int fEnableCheck07;// enable additional checking
129  int fEnableCheck08;// enable additional checking
130  int fEnableCheck10;// enable additional checking
131  int fEnableCheck75;// enable additional checking
132  int fEnableCheck75u;// enable additional checking
133  int fUseDsd; // compute DSD of the cut functions
134  int fUseDsdTune; // use matching based on precomputed manager
135  int fUseCofVars; // use cofactoring variables
136  int fUseAndVars; // use bi-decomposition
137  int fUseTtPerm; // compute truth tables of the cut functions
138  int fDeriveLuts; // enables deriving LUT structures
139  int fDoAverage; // optimize average rather than maximum level
140  int fVerbose; // the verbosity flag
141  char * pLutStruct; // LUT structure
142  float WireDelay; // wire delay
143  // internal parameters
144  int fSkipCutFilter;// skip cut filter
145  int fAreaOnly; // area only mode
146  int fTruth; // truth table computation enabled
147  int fUsePerm; // use permutation (delay info)
148  int fUseBdds; // use local BDDs as a cost function
149  int fUseSops; // use local SOPs as a cost function
150  int fUseCnfs; // use local CNFs as a cost function
151  int fUseMv; // use local MV-SOPs as a cost function
152  int nLatchesCi; // the number of latches among the CIs
153  int nLatchesCo; // the number of latches among the COs
154  int nLatchesCiBox; // the number of white box outputs among the CIs
155  int nLatchesCoBox; // the number of white box inputs among the COs
156  int fLiftLeaves; // shift the leaves for seq mapping
157  int fUseCoAttrs; // use CO attributes
158  float DelayTargetNew;// new delay target
159  float FinalDelay; // final delay after mapping
160  If_LibLut_t * pLutLib; // the LUT library
161  float * pTimesArr; // arrival times
162  float * pTimesReq; // required times
163  int (* pFuncCost) (If_Man_t *, If_Cut_t *); // procedure to compute the user's cost of a cut
164  int (* pFuncUser) (If_Man_t *, If_Obj_t *, If_Cut_t *); // procedure called for each cut when cut computation is finished
165  int (* pFuncCell) (If_Man_t *, unsigned *, int, int, char *); // procedure called for cut functions
166  void * pReoMan; // reordering manager
167 };
168 
169 // the LUT library
171 {
172  char * pName; // the name of the LUT library
173  int LutMax; // the maximum LUT size
174  int fVarPinDelays; // set to 1 if variable pin delays are specified
175  float pLutAreas[IF_MAX_LUTSIZE+1]; // the areas of LUTs
176  float pLutDelays[IF_MAX_LUTSIZE+1][IF_MAX_LUTSIZE+1];// the delays of LUTs
177 };
178 
179 // manager
180 struct If_Man_t_
181 {
182  char * pName;
183  // mapping parameters
185  // mapping nodes
186  If_Obj_t * pConst1; // the constant 1 node
187  Vec_Ptr_t * vCis; // the primary inputs
188  Vec_Ptr_t * vCos; // the primary outputs
189  Vec_Ptr_t * vObjs; // all objects
190  Vec_Ptr_t * vObjsRev; // reverse topological order of objects
191  Vec_Ptr_t * vTemp; // temporary array
192  int nObjs[IF_VOID];// the number of objects by type
193  // various data
194  int nLevelMax; // the max number of AIG levels
195  float fEpsilon; // epsilon used for comparison
196  float RequiredGlo; // global required times
197  float RequiredGlo2; // global required times
198  float AreaGlo; // global area
199  int nNets; // the sum total of fanins of all LUTs in the mapping
200  float dPower; // the sum total of switching activities of all LUTs in the mapping
201  int nCutsUsed; // the number of cuts currently used
202  int nCutsMerged; // the total number of cuts merged
203  unsigned * puTemp[4]; // used for the truth table computation
204  word * puTempW; // used for the truth table computation
205  int SortMode; // one of the three sorting modes
206  int fNextRound; // set to 1 after the first round
207  int nChoices; // the number of choice nodes
208  Vec_Int_t * vSwitching; // switching activity of each node
209  int pPerm[3][IF_MAX_LUTSIZE]; // permutations
210  unsigned uSharedMask; // mask of shared variables
211  int nShared; // the number of shared variables
212  int fReqTimeWarn; // warning about exceeding required times was printed
213  // SOP balancing
214  Vec_Int_t * vCover; // used to compute ISOP
215  Vec_Int_t * vArray; // intermediate storage
216  Vec_Wrd_t * vAnds; // intermediate storage
217  Vec_Wrd_t * vOrGate; // intermediate storage
218  Vec_Wrd_t * vAndGate; // intermediate storage
219  // sequential mapping
220  Vec_Ptr_t * vLatchOrder; // topological ordering of latches
221  Vec_Int_t * vLags; // sequentail lags of all nodes
222  int nAttempts; // the number of attempts in binary search
223  int nMaxIters; // the maximum number of iterations
224  int Period; // the current value of the clock period (for seq mapping)
225  // memory management
226  int nTruth6Words[IF_MAX_FUNC_LUTSIZE+1]; // the size of the truth table if allocated
227  int nPermWords; // the size of the permutation array (in words)
228  int nObjBytes; // the size of the object
229  int nCutBytes; // the size of the cut
230  int nSetBytes; // the size of the cut set
231  Mem_Fixed_t * pMemObj; // memory manager for objects (entrysize = nEntrySize)
232  Mem_Fixed_t * pMemSet; // memory manager for sets of cuts (entrysize = nCutSize*(nCutsMax+1))
233  If_Set_t * pMemCi; // memory for CI cutsets
234  If_Set_t * pMemAnd; // memory for AND cutsets
235  If_Set_t * pFreeList; // the list of free cutsets
236  int nSmallSupp; // the small support
238  int nCutsUseless[32];
239  int nCutsCount[32];
243  If_DsdMan_t * pIfDsdMan; // DSD manager
244  Vec_Mem_t * vTtMem[IF_MAX_FUNC_LUTSIZE+1]; // truth table memory and hash table
245  Vec_Wec_t * vTtIsops[IF_MAX_FUNC_LUTSIZE+1]; // mapping of truth table into DSD
246  Vec_Int_t * vTtDsds[IF_MAX_FUNC_LUTSIZE+1]; // mapping of truth table into DSD
247  Vec_Str_t * vTtPerms[IF_MAX_FUNC_LUTSIZE+1]; // mapping of truth table into permutations
248  Vec_Str_t * vTtVars[IF_MAX_FUNC_LUTSIZE+1]; // mapping of truth table into selected vars
249  Vec_Int_t * vTtDecs[IF_MAX_FUNC_LUTSIZE+1]; // mapping of truth table into decomposition pattern
250  Hash_IntMan_t * vPairHash; // hashing pairs of truth tables
251  Vec_Int_t * vPairRes; // resulting truth table
252  Vec_Str_t * vPairPerms; // resulting permutation
254  unsigned uCanonPhase;
259  int nCountNonDec[2];
260  Vec_Int_t * vCutData; // cut data storage
261 
262  // timing manager
264  Vec_Int_t * vCoAttrs; // CO attributes 0=optimize; 1=keep; 2=relax
265  // hash table for functions
266  int nTableSize[2]; // hash table size
267  int nTableEntries[2]; // hash table entries
268  void ** pHashTable[2]; // hash table bins
269  Mem_Fixed_t * pMemEntries; // memory manager for hash table entries
270  // statistics
271 // abctime timeTruth;
272 };
273 
274 // priority cut
275 struct If_Cut_t_
276 {
277  float Area; // area (or area-flow) of the cut
278  float Edge; // the edge flow
279  float Power; // the power flow
280  float Delay; // delay of the cut
281  int iCutFunc; // TT ID of the cut
282  int uMaskFunc; // polarity bitmask
283  unsigned uSign; // cut signature
284  unsigned Cost : 13; // the user's cost of the cut (related to IF_COST_MAX)
285  unsigned fCompl : 1; // the complemented attribute
286  unsigned fUser : 1; // using the user's area and delay
287  unsigned fUseless: 1; // using the user's area and delay
288  unsigned nLimit : 8; // the maximum number of leaves
289  unsigned nLeaves : 8; // the number of leaves
290  int pLeaves[0];
291 };
292 
293 // set of priority cut
294 struct If_Set_t_
295 {
296  short nCutsMax; // the max number of cuts
297  short nCuts; // the current number of cuts
298  If_Set_t * pNext; // next cutset in the free list
299  If_Cut_t ** ppCuts; // the array of pointers to the cuts
300 };
301 
302 // node extension
303 struct If_Obj_t_
304 {
305  unsigned Type : 4; // object
306  unsigned fCompl0 : 1; // complemented attribute
307  unsigned fCompl1 : 1; // complemented attribute
308  unsigned fPhase : 1; // phase of the node
309  unsigned fRepr : 1; // representative of the equivalence class
310  unsigned fMark : 1; // multipurpose mark
311  unsigned fVisit : 1; // multipurpose mark
312  unsigned fSpec : 1; // multipurpose mark
313  unsigned fDriver : 1; // multipurpose mark
314  unsigned fSkipCut: 1; // multipurpose mark
315  unsigned Level : 19; // logic level of the node
316  int Id; // integer ID
317  int IdPio; // integer ID of PIs/POs
318  int nRefs; // the number of references
319  int nVisits; // the number of visits to this node
320  int nVisitsCopy; // the number of visits to this node
321  If_Obj_t * pFanin0; // the first fanin
322  If_Obj_t * pFanin1; // the second fanin
323  If_Obj_t * pEquiv; // the choice node
324  float EstRefs; // estimated reference counter
325  float Required; // required time of the onde
326  float LValue; // sequential arrival time of the node
327  union{
328  void * pCopy; // used for object duplication
329  int iCopy;
330  };
331 
332  If_Set_t * pCutSet; // the pointer to the cutset
333  If_Cut_t CutBest; // the best cut selected
334 };
335 
336 typedef struct If_Box_t_ If_Box_t;
337 struct If_Box_t_
338 {
339  char * pName;
340  char fSeq;
341  char fBlack;
342  char fOuter;
343  char fUnused;
344  int Id;
345  int nPis;
346  int nPos;
347  int * pDelays;
348 };
349 
351 {
353 };
354 
355 static inline If_Obj_t * If_Regular( If_Obj_t * p ) { return (If_Obj_t *)((ABC_PTRUINT_T)(p) & ~01); }
356 static inline If_Obj_t * If_Not( If_Obj_t * p ) { return (If_Obj_t *)((ABC_PTRUINT_T)(p) ^ 01); }
357 static inline If_Obj_t * If_NotCond( If_Obj_t * p, int c ) { return (If_Obj_t *)((ABC_PTRUINT_T)(p) ^ (c)); }
358 static inline int If_IsComplement( If_Obj_t * p ) { return (int )(((ABC_PTRUINT_T)p) & 01); }
359 
360 static inline int If_ManCiNum( If_Man_t * p ) { return p->nObjs[IF_CI]; }
361 static inline int If_ManCoNum( If_Man_t * p ) { return p->nObjs[IF_CO]; }
362 static inline int If_ManAndNum( If_Man_t * p ) { return p->nObjs[IF_AND]; }
363 static inline int If_ManObjNum( If_Man_t * p ) { return Vec_PtrSize(p->vObjs); }
364 
365 static inline If_Obj_t * If_ManConst1( If_Man_t * p ) { return p->pConst1; }
366 static inline If_Obj_t * If_ManCi( If_Man_t * p, int i ) { return (If_Obj_t *)Vec_PtrEntry( p->vCis, i ); }
367 static inline If_Obj_t * If_ManCo( If_Man_t * p, int i ) { return (If_Obj_t *)Vec_PtrEntry( p->vCos, i ); }
368 static inline If_Obj_t * If_ManLi( If_Man_t * p, int i ) { return (If_Obj_t *)Vec_PtrEntry( p->vCos, If_ManCoNum(p) - p->pPars->nLatchesCo + i ); }
369 static inline If_Obj_t * If_ManLo( If_Man_t * p, int i ) { return (If_Obj_t *)Vec_PtrEntry( p->vCis, If_ManCiNum(p) - p->pPars->nLatchesCi + i ); }
370 static inline If_Obj_t * If_ManObj( If_Man_t * p, int i ) { return (If_Obj_t *)Vec_PtrEntry( p->vObjs, i ); }
371 
372 static inline int If_ObjIsConst1( If_Obj_t * pObj ) { return pObj->Type == IF_CONST1; }
373 static inline int If_ObjIsCi( If_Obj_t * pObj ) { return pObj->Type == IF_CI; }
374 static inline int If_ObjIsCo( If_Obj_t * pObj ) { return pObj->Type == IF_CO; }
375 static inline int If_ObjIsTerm( If_Obj_t * pObj ) { return pObj->Type == IF_CI || pObj->Type == IF_CO; }
376 static inline int If_ObjIsLatch( If_Obj_t * pObj ) { return If_ObjIsCi(pObj) && pObj->pFanin0 != NULL; }
377 static inline int If_ObjIsAnd( If_Obj_t * pObj ) { return pObj->Type == IF_AND; }
378 
379 static inline int If_ObjId( If_Obj_t * pObj ) { return pObj->Id; }
380 static inline If_Obj_t * If_ObjFanin0( If_Obj_t * pObj ) { return pObj->pFanin0; }
381 static inline If_Obj_t * If_ObjFanin1( If_Obj_t * pObj ) { return pObj->pFanin1; }
382 static inline int If_ObjFaninC0( If_Obj_t * pObj ) { return pObj->fCompl0; }
383 static inline int If_ObjFaninC1( If_Obj_t * pObj ) { return pObj->fCompl1; }
384 static inline void * If_ObjCopy( If_Obj_t * pObj ) { return pObj->pCopy; }
385 static inline int If_ObjLevel( If_Obj_t * pObj ) { return pObj->Level; }
386 static inline void If_ObjSetLevel( If_Obj_t * pObj, int Level ) { pObj->Level = Level; }
387 static inline void If_ObjSetCopy( If_Obj_t * pObj, void * pCopy ) { pObj->pCopy = pCopy; }
388 static inline void If_ObjSetChoice( If_Obj_t * pObj, If_Obj_t * pEqu ) { pObj->pEquiv = pEqu; }
389 
390 static inline int If_CutLeaveNum( If_Cut_t * pCut ) { return pCut->nLeaves; }
391 static inline int * If_CutLeaves( If_Cut_t * pCut ) { return pCut->pLeaves; }
392 static inline If_Obj_t * If_CutLeaf( If_Man_t * p, If_Cut_t * pCut, int i ) { assert(i >= 0 && i < (int)pCut->nLeaves); return If_ManObj(p, pCut->pLeaves[i]); }
393 static inline unsigned If_CutSuppMask( If_Cut_t * pCut ) { return (~(unsigned)0) >> (32-pCut->nLeaves); }
394 static inline int If_CutTruthWords( int nVarsMax ) { return nVarsMax <= 5 ? 2 : (1 << (nVarsMax - 5)); }
395 static inline int If_CutPermWords( int nVarsMax ) { return nVarsMax / sizeof(int) + ((nVarsMax % sizeof(int)) > 0); }
396 static inline int If_CutLeafBit( If_Cut_t * pCut, int i ) { return (pCut->uMaskFunc >> i) & 1; }
397 static inline char * If_CutPerm( If_Cut_t * pCut ) { return (char *)(pCut->pLeaves + pCut->nLeaves); }
398 static inline void If_CutCopy( If_Man_t * p, If_Cut_t * pDst, If_Cut_t * pSrc ) { memcpy( pDst, pSrc, p->nCutBytes ); }
399 static inline void If_CutSetup( If_Man_t * p, If_Cut_t * pCut ) { memset(pCut, 0, p->nCutBytes); pCut->nLimit = p->pPars->nLutSize; }
400 
401 static inline If_Cut_t * If_ObjCutBest( If_Obj_t * pObj ) { return &pObj->CutBest; }
402 static inline unsigned If_ObjCutSign( unsigned ObjId ) { return (1 << (ObjId % 31)); }
403 static inline unsigned If_ObjCutSignCompute( If_Cut_t * p ) { unsigned s = 0; int i; for ( i = 0; i < If_CutLeaveNum(p); i++ ) s |= If_ObjCutSign(p->pLeaves[i]); return s; }
404 
405 static inline float If_ObjArrTime( If_Obj_t * pObj ) { return If_ObjCutBest(pObj)->Delay; }
406 static inline void If_ObjSetArrTime( If_Obj_t * pObj, float ArrTime ) { If_ObjCutBest(pObj)->Delay = ArrTime; }
407 
408 static inline float If_ObjLValue( If_Obj_t * pObj ) { return pObj->LValue; }
409 static inline void If_ObjSetLValue( If_Obj_t * pObj, float LValue ) { pObj->LValue = LValue; }
410 
411 static inline void * If_CutData( If_Cut_t * pCut ) { return *(void **)pCut; }
412 static inline void If_CutSetData( If_Cut_t * pCut, void * pData ) { *(void **)pCut = pData; }
413 
414 static inline int If_CutDataInt( If_Cut_t * pCut ) { return *(int *)pCut; }
415 static inline void If_CutSetDataInt( If_Cut_t * pCut, int Data ) { *(int *)pCut = Data; }
416 
417 static inline int If_CutTruthLit( If_Cut_t * pCut ) { assert( pCut->iCutFunc >= 0 ); return pCut->iCutFunc; }
418 static inline int If_CutTruthIsCompl( If_Cut_t * pCut ) { assert( pCut->iCutFunc >= 0 ); return Abc_LitIsCompl(pCut->iCutFunc); }
419 static inline word * If_CutTruthWR( If_Man_t * p, If_Cut_t * pCut ) { return p->vTtMem ? Vec_MemReadEntry(p->vTtMem[pCut->nLeaves], Abc_Lit2Var(pCut->iCutFunc)) : NULL; }
420 static inline unsigned * If_CutTruthUR( If_Man_t * p, If_Cut_t * pCut) { return (unsigned *)If_CutTruthWR(p, pCut); }
421 static inline word * If_CutTruthW( If_Man_t * p, If_Cut_t * pCut ) { if ( p->vTtMem == NULL ) return NULL; assert( pCut->iCutFunc >= 0 ); Abc_TtCopy( p->puTempW, If_CutTruthWR(p, pCut), p->nTruth6Words[pCut->nLeaves], If_CutTruthIsCompl(pCut) ); return p->puTempW; }
422 static inline unsigned * If_CutTruth( If_Man_t * p, If_Cut_t * pCut ) { return (unsigned *)If_CutTruthW(p, pCut); }
423 
424 static inline int If_CutDsdLit( If_Man_t * p, If_Cut_t * pCut ) { return Abc_Lit2LitL( Vec_IntArray(p->vTtDsds[pCut->nLeaves]), If_CutTruthLit(pCut) ); }
425 static inline int If_CutDsdIsCompl( If_Man_t * p, If_Cut_t * pCut ) { return Abc_LitIsCompl( If_CutDsdLit(p, pCut) ); }
426 static inline char * If_CutDsdPerm( If_Man_t * p, If_Cut_t * pCut ) { return Vec_StrEntryP( p->vTtPerms[pCut->nLeaves], Abc_Lit2Var(pCut->iCutFunc) * Abc_MaxInt(6, pCut->nLeaves) ); }
427 
428 static inline float If_CutLutArea( If_Man_t * p, If_Cut_t * pCut ) { return pCut->fUser? (float)pCut->Cost : (p->pPars->pLutLib? p->pPars->pLutLib->pLutAreas[pCut->nLeaves] : (float)1.0); }
429 static inline float If_CutLutDelay( If_LibLut_t * p, int Size, int iPin ) { return p ? (p->fVarPinDelays ? p->pLutDelays[Size][iPin] : p->pLutDelays[Size][0]) : 1.0; }
430 
431 
432 ////////////////////////////////////////////////////////////////////////
433 /// MACRO DEFINITIONS ///
434 ////////////////////////////////////////////////////////////////////////
435 
436 #define IF_MIN(a,b) (((a) < (b))? (a) : (b))
437 #define IF_MAX(a,b) (((a) > (b))? (a) : (b))
438 
439 // the small and large numbers (min/max float are 1.17e-38/3.40e+38)
440 #define IF_FLOAT_LARGE ((float)1.0e+20)
441 #define IF_FLOAT_SMALL ((float)1.0e-20)
442 #define IF_INT_LARGE (10000000)
443 
444 // iterator over the primary inputs
445 #define If_ManForEachCi( p, pObj, i ) \
446  Vec_PtrForEachEntry( If_Obj_t *, p->vCis, pObj, i )
447 // iterator over the primary outputs
448 #define If_ManForEachCo( p, pObj, i ) \
449  Vec_PtrForEachEntry( If_Obj_t *, p->vCos, pObj, i )
450 // iterator over the primary inputs
451 #define If_ManForEachPi( p, pObj, i ) \
452  Vec_PtrForEachEntryStop( If_Obj_t *, p->vCis, pObj, i, If_ManCiNum(p) - p->pPars->nLatchesCi - p->pPars->nLatchesCiBox )
453 // iterator over the primary outputs
454 #define If_ManForEachPo( p, pObj, i ) \
455  Vec_PtrForEachEntryStartStop( If_Obj_t *, p->vCos, pObj, i, p->pPars->nLatchesCoBox, If_ManCoNum(p) - p->pPars->nLatchesCo )
456 // iterator over the latches
457 #define If_ManForEachLatchInput( p, pObj, i ) \
458  Vec_PtrForEachEntryStart( If_Obj_t *, p->vCos, pObj, i, If_ManCoNum(p) - p->pPars->nLatchesCo )
459 #define If_ManForEachLatchOutput( p, pObj, i ) \
460  Vec_PtrForEachEntryStartStop( If_Obj_t *, p->vCis, pObj, i, If_ManCiNum(p) - p->pPars->nLatchesCi - p->pPars->nLatchesCiBox, If_ManCiNum(p) - p->pPars->nLatchesCiBox )
461 // iterator over all objects in topological order
462 #define If_ManForEachObj( p, pObj, i ) \
463  Vec_PtrForEachEntry( If_Obj_t *, p->vObjs, pObj, i )
464 // iterator over all objects in reverse topological order
465 #define If_ManForEachObjReverse( p, pObj, i ) \
466  Vec_PtrForEachEntry( If_Obj_t *, p->vObjsRev, pObj, i )
467 // iterator over logic nodes
468 #define If_ManForEachNode( p, pObj, i ) \
469  If_ManForEachObj( p, pObj, i ) if ( pObj->Type != IF_AND ) {} else
470 // iterator over cuts of the node
471 #define If_ObjForEachCut( pObj, pCut, i ) \
472  for ( i = 0; (i < (pObj)->pCutSet->nCuts) && ((pCut) = (pObj)->pCutSet->ppCuts[i]); i++ )
473 // iterator over the leaves of the cut
474 #define If_CutForEachLeaf( p, pCut, pLeaf, i ) \
475  for ( i = 0; (i < (int)(pCut)->nLeaves) && ((pLeaf) = If_ManObj(p, (pCut)->pLeaves[i])); i++ )
476 #define If_CutForEachLeafReverse( p, pCut, pLeaf, i ) \
477  for ( i = (int)(pCut)->nLeaves - 1; (i >= 0) && ((pLeaf) = If_ManObj(p, (pCut)->pLeaves[i])); i-- )
478 //#define If_CutForEachLeaf( p, pCut, pLeaf, i ) \ \\prevent multiline comment
479 // for ( i = 0; (i < (int)(pCut)->nLeaves) && ((pLeaf) = If_ManObj(p, p->pPars->fLiftLeaves? (pCut)->pLeaves[i] >> 8 : (pCut)->pLeaves[i])); i++ )
480 // iterator over the leaves of the sequential cut
481 #define If_CutForEachLeafSeq( p, pCut, pLeaf, Shift, i ) \
482  for ( i = 0; (i < (int)(pCut)->nLeaves) && ((pLeaf) = If_ManObj(p, (pCut)->pLeaves[i] >> 8)) && (((Shift) = ((pCut)->pLeaves[i] & 255)) >= 0); i++ )
483 
484 ////////////////////////////////////////////////////////////////////////
485 /// FUNCTION DECLARATIONS ///
486 ////////////////////////////////////////////////////////////////////////
487 
488 /*=== ifCore.c ===========================================================*/
489 extern void If_ManSetDefaultPars( If_Par_t * pPars );
490 extern int If_ManPerformMapping( If_Man_t * p );
491 extern int If_ManPerformMappingComb( If_Man_t * p );
492 extern void If_ManComputeSwitching( If_Man_t * p );
493 /*=== ifCut.c ============================================================*/
494 extern int If_CutVerifyCuts( If_Set_t * pCutSet, int fOrdered );
495 extern int If_CutFilter( If_Set_t * pCutSet, If_Cut_t * pCut, int fSaveCut0 );
496 extern void If_CutSort( If_Man_t * p, If_Set_t * pCutSet, If_Cut_t * pCut );
497 extern void If_CutOrder( If_Cut_t * pCut );
498 extern int If_CutMergeOrdered( If_Man_t * p, If_Cut_t * pCut0, If_Cut_t * pCut1, If_Cut_t * pCut );
499 extern int If_CutMerge( If_Man_t * p, If_Cut_t * pCut0, If_Cut_t * pCut1, If_Cut_t * pCut );
500 extern int If_CutCheck( If_Cut_t * pCut );
501 extern void If_CutPrint( If_Cut_t * pCut );
502 extern void If_CutPrintTiming( If_Man_t * p, If_Cut_t * pCut );
503 extern void If_CutLift( If_Cut_t * pCut );
504 extern void If_CutCopy( If_Man_t * p, If_Cut_t * pCutDest, If_Cut_t * pCutSrc );
505 extern float If_CutAreaFlow( If_Man_t * p, If_Cut_t * pCut );
506 extern float If_CutEdgeFlow( If_Man_t * p, If_Cut_t * pCut );
507 extern float If_CutPowerFlow( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * pRoot );
508 extern float If_CutAverageRefs( If_Man_t * p, If_Cut_t * pCut );
509 extern float If_CutAreaDeref( If_Man_t * p, If_Cut_t * pCut );
510 extern float If_CutAreaRef( If_Man_t * p, If_Cut_t * pCut );
511 extern float If_CutAreaDerefed( If_Man_t * p, If_Cut_t * pCut );
512 extern float If_CutAreaRefed( If_Man_t * p, If_Cut_t * pCut );
513 extern float If_CutEdgeDeref( If_Man_t * p, If_Cut_t * pCut );
514 extern float If_CutEdgeRef( If_Man_t * p, If_Cut_t * pCut );
515 extern float If_CutEdgeDerefed( If_Man_t * p, If_Cut_t * pCut );
516 extern float If_CutEdgeRefed( If_Man_t * p, If_Cut_t * pCut );
517 extern float If_CutPowerDeref( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * pRoot );
518 extern float If_CutPowerRef( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * pRoot );
519 extern float If_CutPowerDerefed( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * pRoot );
520 extern float If_CutPowerRefed( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * pRoot );
521 /*=== ifDec.c =============================================================*/
522 extern word If_CutPerformDerive07( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
523 extern int If_CutPerformCheck07( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
524 extern int If_CutPerformCheck08( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
525 extern int If_CutPerformCheck10( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
526 extern int If_CutPerformCheck16( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
527 extern int If_CutPerformCheck45( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
528 extern int If_CutPerformCheck54( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
529 extern int If_CutPerformCheck75( If_Man_t * p, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
530 extern float If_CutDelayLutStruct( If_Man_t * p, If_Cut_t * pCut, char * pStr, float WireDelay );
531 extern int If_CluCheckExt( void * p, word * pTruth, int nVars, int nLutLeaf, int nLutRoot,
532  char * pLut0, char * pLut1, word * pFunc0, word * pFunc1 );
533 extern int If_CluCheckExt3( void * p, word * pTruth, int nVars, int nLutLeaf, int nLutLeaf2, int nLutRoot,
534  char * pLut0, char * pLut1, char * pLut2, word * pFunc0, word * pFunc1, word * pFunc2 );
535 /*=== ifDelay.c =============================================================*/
536 extern int If_CutDelaySop( If_Man_t * p, If_Cut_t * pCut );
537 extern int If_CutSopBalanceEvalInt( Vec_Int_t * vCover, int * pTimes, int * pFaninLits, Vec_Int_t * vAig, int * piRes, int nSuppAll, int * pArea );
538 extern int If_CutSopBalanceEval( If_Man_t * p, If_Cut_t * pCut, Vec_Int_t * vAig );
539 extern int If_CutSopBalancePinDelaysInt( Vec_Int_t * vCover, int * pTimes, word * pFaninRes, int nSuppAll, word * pRes );
540 extern int If_CutSopBalancePinDelays( If_Man_t * p, If_Cut_t * pCut, char * pPerm );
541 extern int If_CutLutBalanceEval( If_Man_t * p, If_Cut_t * pCut );
542 extern int If_CutLutBalancePinDelays( If_Man_t * p, If_Cut_t * pCut, char * pPerm );
543 /*=== ifDsd.c =============================================================*/
544 extern If_DsdMan_t * If_DsdManAlloc( int nVars, int nLutSize );
545 extern void If_DsdManAllocIsops( If_DsdMan_t * p, int nLutSize );
546 extern void If_DsdManPrint( If_DsdMan_t * p, char * pFileName, int Number, int Support, int fOccurs, int fTtDump, int fVerbose );
547 extern void If_DsdManTune( If_DsdMan_t * p, int LutSize, int fFast, int fAdd, int fSpec, int fVerbose );
548 extern void Id_DsdManTuneStr( If_DsdMan_t * p, char * pStruct, int nConfls, int nProcs, int fVerbose );
549 extern void If_DsdManFree( If_DsdMan_t * p, int fVerbose );
550 extern void If_DsdManSave( If_DsdMan_t * p, char * pFileName );
551 extern If_DsdMan_t * If_DsdManLoad( char * pFileName );
552 extern void If_DsdManMerge( If_DsdMan_t * p, If_DsdMan_t * pNew );
553 extern void If_DsdManCleanOccur( If_DsdMan_t * p, int fVerbose );
554 extern void If_DsdManCleanMarks( If_DsdMan_t * p, int fVerbose );
555 extern void If_DsdManInvertMarks( If_DsdMan_t * p, int fVerbose );
556 extern If_DsdMan_t * If_DsdManFilter( If_DsdMan_t * p, int Limit );
557 extern int If_DsdManCompute( If_DsdMan_t * p, word * pTruth, int nLeaves, unsigned char * pPerm, char * pLutStruct );
558 extern char * If_DsdManFileName( If_DsdMan_t * p );
559 extern int If_DsdManVarNum( If_DsdMan_t * p );
560 extern int If_DsdManObjNum( If_DsdMan_t * p );
561 extern int If_DsdManLutSize( If_DsdMan_t * p );
562 extern void If_DsdManSetLutSize( If_DsdMan_t * p, int nLutSize );
563 extern int If_DsdManSuppSize( If_DsdMan_t * p, int iDsd );
564 extern int If_DsdManCheckDec( If_DsdMan_t * p, int iDsd );
565 extern int If_DsdManReadMark( If_DsdMan_t * p, int iDsd );
566 extern void If_DsdManSetNewAsUseless( If_DsdMan_t * p );
567 extern word If_DsdManGetFuncPerm( If_DsdMan_t * p, int iDsd );
568 extern char * If_DsdManGetCellStr( If_DsdMan_t * p );
569 extern unsigned If_DsdManCheckXY( If_DsdMan_t * p, int iDsd, int LutSize, int fDerive, unsigned uMaskNot, int fHighEffort, int fVerbose );
570 extern int If_CutDsdBalanceEval( If_Man_t * p, If_Cut_t * pCut, Vec_Int_t * vAig );
571 extern int If_CutDsdBalancePinDelays( If_Man_t * p, If_Cut_t * pCut, char * pPerm );
572 /*=== ifLib.c =============================================================*/
573 extern If_LibLut_t * If_LibLutRead( char * FileName );
574 extern If_LibLut_t * If_LibLutDup( If_LibLut_t * p );
575 extern void If_LibLutFree( If_LibLut_t * pLutLib );
576 extern void If_LibLutPrint( If_LibLut_t * pLutLib );
577 extern int If_LibLutDelaysAreDiscrete( If_LibLut_t * pLutLib );
578 extern int If_LibLutDelaysAreDifferent( If_LibLut_t * pLutLib );
579 extern If_LibLut_t * If_LibLutSetSimple( int nLutSize );
580 extern float If_LibLutFastestPinDelay( If_LibLut_t * p );
581 extern float If_LibLutSlowestPinDelay( If_LibLut_t * p );
582 /*=== ifLibBox.c =============================================================*/
583 extern If_LibBox_t * If_LibBoxStart();
584 extern void If_LibBoxFree( If_LibBox_t * p );
585 extern If_Box_t * If_LibBoxReadBox( If_LibBox_t * p, int Id );
586 extern If_Box_t * If_LibBoxFindBox( If_LibBox_t * p, char * pName );
587 extern void If_LibBoxAdd( If_LibBox_t * p, If_Box_t * pBox );
588 extern If_LibBox_t * If_LibBoxRead( char * pFileName );
589 extern If_LibBox_t * If_LibBoxRead2( char * pFileName );
590 extern void If_LibBoxPrint( FILE * pFile, If_LibBox_t * p );
591 extern void If_LibBoxWrite( char * pFileName, If_LibBox_t * p );
592 extern int If_LibBoxLoad( char * pFileName );
593 /*=== ifMan.c =============================================================*/
594 extern If_Man_t * If_ManStart( If_Par_t * pPars );
595 extern void If_ManRestart( If_Man_t * p );
596 extern void If_ManStop( If_Man_t * p );
597 extern If_Obj_t * If_ManCreateCi( If_Man_t * p );
598 extern If_Obj_t * If_ManCreateCo( If_Man_t * p, If_Obj_t * pDriver );
599 extern If_Obj_t * If_ManCreateAnd( If_Man_t * p, If_Obj_t * pFan0, If_Obj_t * pFan1 );
600 extern If_Obj_t * If_ManCreateXor( If_Man_t * p, If_Obj_t * pFan0, If_Obj_t * pFan1 );
601 extern If_Obj_t * If_ManCreateMux( If_Man_t * p, If_Obj_t * pFan0, If_Obj_t * pFan1, If_Obj_t * pCtrl );
602 extern void If_ManCreateChoice( If_Man_t * p, If_Obj_t * pRepr );
603 extern void If_ManSetupCutTriv( If_Man_t * p, If_Cut_t * pCut, int ObjId );
604 extern void If_ManSetupCiCutSets( If_Man_t * p );
605 extern If_Set_t * If_ManSetupNodeCutSet( If_Man_t * p, If_Obj_t * pObj );
606 extern void If_ManDerefNodeCutSet( If_Man_t * p, If_Obj_t * pObj );
607 extern void If_ManDerefChoiceCutSet( If_Man_t * p, If_Obj_t * pObj );
608 extern void If_ManSetupSetAll( If_Man_t * p, int nCrossCut );
609 /*=== ifMap.c =============================================================*/
610 extern void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPreprocess, int fFirst );
611 extern void If_ObjPerformMappingChoice( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPreprocess );
612 extern int If_ManPerformMappingRound( If_Man_t * p, int nCutsUsed, int Mode, int fPreprocess, int fFirst, char * pLabel );
613 /*=== ifReduce.c ==========================================================*/
614 extern void If_ManImproveMapping( If_Man_t * p );
615 /*=== ifSat.c ==========================================================*/
616 extern void * If_ManSatBuildXY( int nLutSize );
617 extern void * If_ManSatBuildXYZ( int nLutSize );
618 extern void If_ManSatUnbuild( void * p );
619 extern int If_ManSatCheckXY( void * pSat, int nLutSize, word * pTruth, int nVars, unsigned uSet, word * pTBound, word * pTFree, Vec_Int_t * vLits );
620 extern unsigned If_ManSatCheckXYall( void * pSat, int nLutSize, word * pTruth, int nVars, Vec_Int_t * vLits );
621 /*=== ifSeq.c =============================================================*/
622 extern int If_ManPerformMappingSeq( If_Man_t * p );
623 /*=== ifTime.c ============================================================*/
624 extern float If_CutDelay( If_Man_t * p, If_Obj_t * pObj, If_Cut_t * pCut );
625 extern void If_CutPropagateRequired( If_Man_t * p, If_Obj_t * pObj, If_Cut_t * pCut, float Required );
626 extern float If_ManDelayMax( If_Man_t * p, int fSeq );
627 extern void If_ManComputeRequired( If_Man_t * p );
628 /*=== ifTruth.c ===========================================================*/
629 extern void If_CutRotatePins( If_Man_t * p, If_Cut_t * pCut );
630 extern int If_CutComputeTruth( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut_t * pCut1, int fCompl0, int fCompl1 );
631 extern int If_CutComputeTruthPerm( If_Man_t * p, If_Cut_t * pCut, If_Cut_t * pCut0, If_Cut_t * pCut1, int fCompl0, int fCompl1 );
632 /*=== ifTune.c ===========================================================*/
633 extern Ifn_Ntk_t * Ifn_NtkParse( char * pStr );
634 extern int Ifn_NtkMatch( Ifn_Ntk_t * p, word * pTruth, int nVars, int nConfls, int fVerbose, int fVeryVerbose, word * pPerm );
635 extern void Ifn_NtkPrint( Ifn_Ntk_t * p );
636 extern int Ifn_NtkLutSizeMax( Ifn_Ntk_t * p );
637 extern int Ifn_NtkInputNum( Ifn_Ntk_t * p );
638 extern void * If_ManSatBuildFromCell( char * pStr, Vec_Int_t ** pvPiVars, Vec_Int_t ** pvPoVars, Ifn_Ntk_t ** ppNtk );
639 extern int If_ManSatFindCofigBits( void * pSat, Vec_Int_t * vPiVars, Vec_Int_t * vPoVars, word * pTruth, int nVars, word Perm, int nInps, Vec_Int_t * vValues );
640 extern int If_ManSatDeriveGiaFromBits( void * pNew, Ifn_Ntk_t * p, Vec_Int_t * vLeaves, Vec_Int_t * vValues );
641 /*=== ifUtil.c ============================================================*/
642 extern void If_ManCleanNodeCopy( If_Man_t * p );
643 extern void If_ManCleanCutData( If_Man_t * p );
644 extern void If_ManCleanMarkV( If_Man_t * p );
645 extern float If_ManScanMapping( If_Man_t * p );
646 extern float If_ManScanMappingDirect( If_Man_t * p );
647 extern float If_ManScanMappingSeq( If_Man_t * p );
648 extern void If_ManResetOriginalRefs( If_Man_t * p );
649 extern int If_ManCrossCut( If_Man_t * p );
650 
651 extern Vec_Ptr_t * If_ManReverseOrder( If_Man_t * p );
652 extern void If_ManMarkMapping( If_Man_t * p );
655 
656 extern int If_ManCountSpecialPos( If_Man_t * p );
657 extern void If_CutTraverse( If_Man_t * p, If_Obj_t * pRoot, If_Cut_t * pCut, Vec_Ptr_t * vNodes );
658 extern void If_ObjPrint( If_Obj_t * pObj );
659 
660 
662 
663 #endif
664 
665 ////////////////////////////////////////////////////////////////////////
666 /// END OF FILE ///
667 ////////////////////////////////////////////////////////////////////////
668 
void If_ManComputeSwitching(If_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition: abcIf.c:58
int nTruth6Words[IF_MAX_FUNC_LUTSIZE+1]
Definition: if.h:226
char * memset()
If_Obj_t * pFanin0
Definition: if.h:321
Vec_Ptr_t * vObjs
Definition: if.h:189
char fBlack
Definition: if.h:341
void If_CutRotatePins(If_Man_t *p, If_Cut_t *pCut)
Definition: ifTruth.c:67
If_DsdMan_t * pIfDsdMan
Definition: if.h:243
static int * Vec_IntArray(Vec_Int_t *p)
Definition: vecInt.h:328
float If_ManScanMappingDirect(If_Man_t *p)
unsigned uSharedMask
Definition: if.h:210
float If_ManScanMappingSeq(If_Man_t *p)
int If_DsdManCheckDec(If_DsdMan_t *p, int iDsd)
Definition: ifDsd.c:185
int If_CluCheckExt(void *p, word *pTruth, int nVars, int nLutLeaf, int nLutRoot, char *pLut0, char *pLut1, word *pFunc0, word *pFunc1)
Definition: ifDec16.c:2066
If_Set_t * pCutSet
Definition: if.h:332
unsigned nLeaves
Definition: if.h:289
static If_Obj_t * If_NotCond(If_Obj_t *p, int c)
Definition: if.h:357
int Id
Definition: if.h:316
static int If_ObjIsLatch(If_Obj_t *pObj)
Definition: if.h:376
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
int fUseMv
Definition: if.h:151
unsigned Type
Definition: if.h:305
void Ifn_NtkPrint(Ifn_Ntk_t *p)
Definition: ifTune.c:141
int If_LibBoxLoad(char *pFileName)
Definition: ifLibBox.c:375
float If_CutPowerFlow(If_Man_t *p, If_Cut_t *pCut, If_Obj_t *pRoot)
Definition: ifCut.c:979
float dPower
Definition: if.h:200
int * pDelays
Definition: if.h:347
int If_DsdManCompute(If_DsdMan_t *p, word *pTruth, int nLeaves, unsigned char *pPerm, char *pLutStruct)
Definition: ifDsd.c:2032
int If_CutPerformCheck10(If_Man_t *p, unsigned *pTruth, int nVars, int nLeaves, char *pStr)
Definition: ifDec10.c:480
static void If_ObjSetLValue(If_Obj_t *pObj, float LValue)
Definition: if.h:409
float RequiredGlo2
Definition: if.h:197
int If_CutSopBalancePinDelays(If_Man_t *p, If_Cut_t *pCut, char *pPerm)
Definition: ifDelay.c:159
int nBestCutSmall[2]
Definition: if.h:258
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
Definition: vecWec.h:42
unsigned fDriver
Definition: if.h:313
int nCutsUsed
Definition: if.h:201
int If_CutMerge(If_Man_t *p, If_Cut_t *pCut0, If_Cut_t *pCut1, If_Cut_t *pCut)
Definition: ifCut.c:364
int If_CluCheckExt3(void *p, word *pTruth, int nVars, int nLutLeaf, int nLutLeaf2, int nLutRoot, char *pLut0, char *pLut1, char *pLut2, word *pFunc0, word *pFunc1, word *pFunc2)
Definition: ifDec16.c:2079
int nLutSize
Definition: if.h:89
static If_Obj_t * If_ManObj(If_Man_t *p, int i)
Definition: if.h:370
unsigned nLimit
Definition: if.h:288
void If_DsdManSetLutSize(If_DsdMan_t *p, int nLutSize)
Definition: ifDsd.c:177
Vec_Str_t * vTtVars[IF_MAX_FUNC_LUTSIZE+1]
Definition: if.h:248
int iCopy
Definition: if.h:329
int nLutSize
Definition: if.h:103
float If_CutEdgeRefed(If_Man_t *p, If_Cut_t *pCut)
Definition: ifCut.c:1210
static int If_ObjLevel(If_Obj_t *pObj)
Definition: if.h:385
int If_ManSatFindCofigBits(void *pSat, Vec_Int_t *vPiVars, Vec_Int_t *vPoVars, word *pTruth, int nVars, word Perm, int nInps, Vec_Int_t *vValues)
Definition: ifTune.c:687
float If_CutAreaDeref(If_Man_t *p, If_Cut_t *pCut)
Definition: ifCut.c:1032
Vec_Wec_t * vTtIsops[IF_MAX_FUNC_LUTSIZE+1]
Definition: if.h:245
static int If_ObjId(If_Obj_t *pObj)
Definition: if.h:379
float Edge
Definition: if.h:278
int If_ManPerformMappingSeq(If_Man_t *p)
Definition: ifSeq.c:334
void If_LibBoxWrite(char *pFileName, If_LibBox_t *p)
Definition: ifLibBox.c:351
int fUseCnfs
Definition: if.h:150
static void If_CutSetup(If_Man_t *p, If_Cut_t *pCut)
Definition: if.h:399
void If_CutTraverse(If_Man_t *p, If_Obj_t *pRoot, If_Cut_t *pCut, Vec_Ptr_t *vNodes)
Definition: ifUtil.c:565
void If_LibBoxFree(If_LibBox_t *p)
Definition: ifLibBox.c:98
void If_ManResetOriginalRefs(If_Man_t *p)
Definition: ifUtil.c:287
static void * If_ObjCopy(If_Obj_t *pObj)
Definition: if.h:384
static int If_ManAndNum(If_Man_t *p)
Definition: if.h:362
int nMaxIters
Definition: if.h:223
int If_DsdManObjNum(If_DsdMan_t *p)
Definition: ifDsd.c:169
void If_LibLutPrint(If_LibLut_t *pLutLib)
Definition: ifLibLut.c:193
float If_CutAreaFlow(If_Man_t *p, If_Cut_t *pCut)
Definition: ifCut.c:919
static Llb_Mgr_t * p
Definition: llb3Image.c:950
float If_CutPowerRef(If_Man_t *p, If_Cut_t *pCut, If_Obj_t *pRoot)
Definition: ifCut.c:1262
void If_DsdManPrint(If_DsdMan_t *p, char *pFileName, int Number, int Support, int fOccurs, int fTtDump, int fVerbose)
Definition: ifDsd.c:684
Mem_Fixed_t * pMemSet
Definition: if.h:232
Definition: if.h:100
Vec_Mem_t * vTtMem[IF_MAX_FUNC_LUTSIZE+1]
Definition: if.h:244
static unsigned * If_CutTruthUR(If_Man_t *p, If_Cut_t *pCut)
Definition: if.h:420
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
Vec_Int_t * vTtDecs[IF_MAX_FUNC_LUTSIZE+1]
Definition: if.h:249
void * If_ManSatBuildXYZ(int nLutSize)
Definition: ifSat.c:63
If_LibLut_t * If_LibLutRead(char *FileName)
FUNCTION DEFINITIONS ///.
Definition: ifLibLut.c:47
Vec_Ptr_t * vTemp
Definition: if.h:191
void If_LibBoxPrint(FILE *pFile, If_LibBox_t *p)
Definition: ifLibBox.c:334
If_Set_t * pMemCi
Definition: if.h:233
static int If_CutDsdIsCompl(If_Man_t *p, If_Cut_t *pCut)
Definition: if.h:425
If_Man_t * If_ManStart(If_Par_t *pPars)
FUNCTION DEFINITIONS ///.
Definition: ifMan.c:50
char fOuter
Definition: if.h:342
void If_DsdManFree(If_DsdMan_t *p, int fVerbose)
Definition: ifDsd.c:316
static int Abc_Lit2LitL(int *pMap, int Lit)
Definition: abc_global.h:270
unsigned If_DsdManCheckXY(If_DsdMan_t *p, int iDsd, int LutSize, int fDerive, unsigned uMaskNot, int fHighEffort, int fVerbose)
Definition: ifDsd.c:1986
void If_ManSetDefaultPars(If_Par_t *pPars)
FUNCTION DECLARATIONS ///.
Definition: ifCore.c:47
static float If_CutLutArea(If_Man_t *p, If_Cut_t *pCut)
Definition: if.h:428
Definition: if.h:303
void If_ManCleanMarkV(If_Man_t *p)
Definition: ifUtil.c:83
static int If_ObjIsAnd(If_Obj_t *pObj)
Definition: if.h:377
Definition: if.h:275
static int If_CutTruthWords(int nVarsMax)
Definition: if.h:394
int fDeriveLuts
Definition: if.h:138
int fVerbose
Definition: if.h:95
static int If_ObjIsCo(If_Obj_t *pObj)
Definition: if.h:374
int pPerm[3][IF_MAX_LUTSIZE]
Definition: if.h:209
static int If_CutLeaveNum(If_Cut_t *pCut)
Definition: if.h:390
Vec_Ptr_t * vObjsRev
Definition: if.h:190
float Required
Definition: if.h:325
int If_CutVerifyCuts(If_Set_t *pCutSet, int fOrdered)
Definition: ifCut.c:62
unsigned fRepr
Definition: if.h:309
int fDelayOptLut
Definition: if.h:122
int fVerbose
Definition: if.h:140
void If_ManComputeRequired(If_Man_t *p)
Definition: ifTime.c:294
static void If_CutSetData(If_Cut_t *pCut, void *pData)
Definition: if.h:412
int fSkipCutFilter
Definition: if.h:144
int nCutsCountAll
Definition: if.h:240
If_LibLut_t * pLutLib
Definition: if.h:90
int fEnableCheck10
Definition: if.h:130
void If_DsdManInvertMarks(If_DsdMan_t *p, int fVerbose)
Definition: ifDsd.c:1233
static int If_ObjFaninC0(If_Obj_t *pObj)
Definition: if.h:382
static void If_CutCopy(If_Man_t *p, If_Cut_t *pDst, If_Cut_t *pSrc)
Definition: if.h:398
static char * If_CutPerm(If_Cut_t *pCut)
Definition: if.h:397
int LutMax
Definition: if.h:173
If_Obj_t * If_ManCreateXor(If_Man_t *p, If_Obj_t *pFan0, If_Obj_t *pFan1)
Definition: ifMan.c:404
char * pLutStruct
Definition: if.h:141
int If_ManCountSpecialPos(If_Man_t *p)
Definition: ifUtil.c:520
int nLevelMax
Definition: if.h:194
short nCutsMax
Definition: if.h:296
unsigned fUseless
Definition: if.h:287
void If_ObjPerformMappingAnd(If_Man_t *p, If_Obj_t *pObj, int Mode, int fPreprocess, int fFirst)
Definition: ifMap.c:95
int nCutsMerged
Definition: if.h:202
void If_DsdManCleanMarks(If_DsdMan_t *p, int fVerbose)
Definition: ifDsd.c:1224
int nChoices
Definition: if.h:207
typedefABC_NAMESPACE_IMPL_START struct Vec_Mem_t_ Vec_Mem_t
DECLARATIONS ///.
Definition: utilMem.c:35
char * memcpy()
float pLutDelays[IF_MAX_LUTSIZE+1][IF_MAX_LUTSIZE+1]
Definition: if.h:176
int fDoAverage
Definition: if.h:139
static If_Obj_t * If_ObjFanin0(If_Obj_t *pObj)
Definition: if.h:380
int Ifn_NtkLutSizeMax(Ifn_Ntk_t *p)
Definition: ifTune.c:159
Vec_Str_t * vTtPerms[IF_MAX_FUNC_LUTSIZE+1]
Definition: if.h:247
int fVeryVerbose
Definition: if.h:96
word If_CutPerformDerive07(If_Man_t *p, unsigned *pTruth, int nVars, int nLeaves, char *pStr)
Definition: ifDec07.c:1029
Hash_IntMan_t * vPairHash
Definition: if.h:250
void If_LibBoxAdd(If_LibBox_t *p, If_Box_t *pBox)
Definition: ifLibBox.c:136
static int If_ObjIsCi(If_Obj_t *pObj)
Definition: if.h:373
If_LibBox_t * If_LibBoxRead2(char *pFileName)
Definition: ifLibBox.c:155
int nCutsTotal
Definition: if.h:237
static If_Cut_t * If_ObjCutBest(If_Obj_t *pObj)
Definition: if.h:401
int(* pFuncCost)(If_Man_t *, If_Cut_t *)
Definition: if.h:163
char fUnused
Definition: if.h:343
int If_ManPerformMappingRound(If_Man_t *p, int nCutsUsed, int Mode, int fPreprocess, int fFirst, char *pLabel)
Definition: ifMap.c:491
unsigned fUser
Definition: if.h:286
float If_CutEdgeDerefed(If_Man_t *p, If_Cut_t *pCut)
Definition: ifCut.c:1187
int fUseCoAttrs
Definition: if.h:157
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
Vec_Int_t * vSwitching
Definition: if.h:208
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
float If_LibLutFastestPinDelay(If_LibLut_t *p)
Definition: ifLibLut.c:319
int(* pFuncUser)(If_Man_t *, If_Obj_t *, If_Cut_t *)
Definition: if.h:164
float DelayTargetNew
Definition: if.h:158
void If_CutOrder(If_Cut_t *pCut)
Definition: ifCut.c:797
int If_CutPerformCheck07(If_Man_t *p, unsigned *pTruth, int nVars, int nLeaves, char *pStr)
Definition: ifDec07.c:1071
int nCacheMisses
Definition: if.h:256
static void If_ObjSetLevel(If_Obj_t *pObj, int Level)
Definition: if.h:386
static unsigned If_CutSuppMask(If_Cut_t *pCut)
Definition: if.h:393
int If_CutPerformCheck08(If_Man_t *p, unsigned *pTruth, int nVars, int nLeaves, char *pStr)
Definition: ifDec08.c:481
float WireDelay
Definition: if.h:142
int nLatchesCi
Definition: if.h:152
int nRefs
Definition: if.h:318
void If_DsdManMerge(If_DsdMan_t *p, If_DsdMan_t *pNew)
Definition: ifDsd.c:1177
int fUseCofVars
Definition: if.h:135
Mem_Fixed_t * pMemObj
Definition: if.h:231
If_Box_t * If_LibBoxReadBox(If_LibBox_t *p, int Id)
Definition: ifLibBox.c:121
Vec_Wrd_t * vAndGate
Definition: if.h:218
If_Obj_t * If_ManCreateCo(If_Man_t *p, If_Obj_t *pDriver)
Definition: ifMan.c:338
If_LibBox_t * If_LibBoxRead(char *pFileName)
Definition: ifLibBox.c:273
int fExpRed
Definition: if.h:116
int fEnableCheck75u
Definition: if.h:132
int nFlowIters
Definition: if.h:105
Definition: if.h:68
static int If_CutTruthIsCompl(If_Cut_t *pCut)
Definition: if.h:418
Definition: if.h:69
static If_Obj_t * If_Not(If_Obj_t *p)
Definition: if.h:356
int nCuts5a
Definition: if.h:242
void If_DsdManAllocIsops(If_DsdMan_t *p, int nLutSize)
Definition: ifDsd.c:289
char * If_DsdManFileName(If_DsdMan_t *p)
FUNCTION DEFINITIONS ///.
Definition: ifDsd.c:161
Definition: if.h:64
int nSmallSupp
Definition: if.h:236
If_Obj_t * If_ManCreateMux(If_Man_t *p, If_Obj_t *pFan0, If_Obj_t *pFan1, If_Obj_t *pCtrl)
Definition: ifMan.c:423
int nCuts5
Definition: if.h:242
Tim_Man_t * pManTim
Definition: if.h:263
int nGateSize
Definition: if.h:107
unsigned Cost
Definition: if.h:284
static int If_ObjFaninC1(If_Obj_t *pObj)
Definition: if.h:383
char * pName
Definition: if.h:339
Definition: if.h:67
int If_CutPerformCheck54(If_Man_t *p, unsigned *pTruth, int nVars, int nLeaves, char *pStr)
Definition: ifDec16.c:1886
static word * If_CutTruthW(If_Man_t *p, If_Cut_t *pCut)
Definition: if.h:421
If_Set_t * If_ManSetupNodeCutSet(If_Man_t *p, If_Obj_t *pObj)
Definition: ifMan.c:579
void * pReoMan
Definition: if.h:166
static int If_ManCiNum(If_Man_t *p)
Definition: if.h:360
If_Cut_t CutBest
Definition: if.h:333
Definition: if.h:87
int fEnableCheck75
Definition: if.h:131
float AreaGlo
Definition: if.h:198
unsigned fVisit
Definition: if.h:311
int pLeaves[0]
Definition: if.h:290
void Id_DsdManTuneStr(If_DsdMan_t *p, char *pStruct, int nConfls, int nProcs, int fVerbose)
Definition: ifDsd.c:2519
int fEdge
Definition: if.h:118
int nCutsUseless[32]
Definition: if.h:238
Vec_Ptr_t * vCis
Definition: if.h:187
static int Abc_LitIsCompl(int Lit)
Definition: abc_global.h:265
void If_ObjPerformMappingChoice(If_Man_t *p, If_Obj_t *pObj, int Mode, int fPreprocess)
Definition: ifMap.c:407
char * pName
Definition: if.h:182
void ** pHashTable[2]
Definition: if.h:268
int fUsePerm
Definition: if.h:147
void If_ManSetupSetAll(If_Man_t *p, int nCrossCut)
Definition: ifMan.c:675
void * If_ManSatBuildFromCell(char *pStr, Vec_Int_t **pvPiVars, Vec_Int_t **pvPoVars, Ifn_Ntk_t **ppNtk)
Definition: ifTune.c:622
int fPreprocess
Definition: if.h:113
static unsigned If_ObjCutSignCompute(If_Cut_t *p)
Definition: if.h:403
int nTableSize[2]
Definition: if.h:266
If_LibBox_t * If_LibBoxStart()
Definition: ifLibBox.c:86
unsigned * puTemp[4]
Definition: if.h:203
static void Abc_TtCopy(word *pOut, word *pIn, int nWords, int fCompl)
Definition: utilTruth.h:221
float If_CutEdgeRef(If_Man_t *p, If_Cut_t *pCut)
Definition: ifCut.c:1160
float Power
Definition: if.h:279
int fDsdBalance
Definition: if.h:123
int fAreaOnly
Definition: if.h:145
Vec_Ptr_t * If_ManReverseOrder(If_Man_t *p)
Definition: ifUtil.c:363
char fSeq
Definition: if.h:340
int If_CutSopBalanceEvalInt(Vec_Int_t *vCover, int *pTimes, int *pFaninLits, Vec_Int_t *vAig, int *piRes, int nSuppAll, int *pArea)
Definition: ifDelay.c:192
static void If_CutSetDataInt(If_Cut_t *pCut, int Data)
Definition: if.h:415
float RequiredGlo
Definition: if.h:196
int fVarPinDelays
Definition: if.h:174
unsigned If_ManSatCheckXYall(void *pSat, int nLutSize, word *pTruth, int nVars, Vec_Int_t *vLits)
Definition: ifSat.c:476
static If_Obj_t * If_ManCo(If_Man_t *p, int i)
Definition: if.h:367
void If_DsdManSave(If_DsdMan_t *p, char *pFileName)
Definition: ifDsd.c:1032
Vec_Wrd_t * vAnds
Definition: if.h:216
int fTruth
Definition: if.h:146
int fLatchPaths
Definition: if.h:117
static word * If_CutTruthWR(If_Man_t *p, If_Cut_t *pCut)
Definition: if.h:419
#define IF_MAX_LUTSIZE
INCLUDES ///.
Definition: if.h:52
static int * If_CutLeaves(If_Cut_t *pCut)
Definition: if.h:391
float If_CutDelayLutStruct(If_Man_t *p, If_Cut_t *pCut, char *pStr, float WireDelay)
Definition: ifDec16.c:2103
static int If_CutTruthLit(If_Cut_t *pCut)
Definition: if.h:417
int nNonDecLimit
Definition: if.h:108
Definition: if.h:180
int nLatchesCiBox
Definition: if.h:154
static If_Obj_t * If_CutLeaf(If_Man_t *p, If_Cut_t *pCut, int i)
Definition: if.h:392
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
int nLatchesCoBox
Definition: if.h:155
int If_ManPerformMappingComb(If_Man_t *p)
Definition: ifCore.c:104
int fEnableCheck07
Definition: if.h:128
void If_ManSetupCutTriv(If_Man_t *p, If_Cut_t *pCut, int ObjId)
Definition: ifMan.c:499
int If_ManCrossCut(If_Man_t *p)
Definition: ifUtil.c:316
static void If_ObjSetCopy(If_Obj_t *pObj, void *pCopy)
Definition: if.h:387
static If_Obj_t * If_ManConst1(If_Man_t *p)
Definition: if.h:365
int fReqTimeWarn
Definition: if.h:212
void If_CutPrint(If_Cut_t *pCut)
Definition: ifCut.c:856
float If_CutAreaDerefed(If_Man_t *p, If_Cut_t *pCut)
Definition: ifCut.c:1086
unsigned fSkipCut
Definition: if.h:314
float LValue
Definition: if.h:326
float DelayWire
Definition: if.h:92
float If_CutAverageRefs(If_Man_t *p, If_Cut_t *pCut)
Definition: ifCut.c:1010
int nCutsUselessAll
Definition: if.h:241
#define IF_MAX_FUNC_LUTSIZE
Definition: if.h:54
Vec_Int_t * vArray
Definition: if.h:215
float * pTimesArr
Definition: if.h:161
static int If_CutDataInt(If_Cut_t *pCut)
Definition: if.h:414
int Ifn_NtkInputNum(Ifn_Ntk_t *p)
Definition: ifTune.c:167
int If_DsdManVarNum(If_DsdMan_t *p)
Definition: ifDsd.c:165
int fCascade
Definition: if.h:94
static unsigned * If_CutTruth(If_Man_t *p, If_Cut_t *pCut)
Definition: if.h:422
static If_Obj_t * If_ManCi(If_Man_t *p, int i)
Definition: if.h:366
static If_Obj_t * If_ObjFanin1(If_Obj_t *pObj)
Definition: if.h:381
Vec_Int_t * vCutData
Definition: if.h:260
int nPis
Definition: if.h:345
int nSetBytes
Definition: if.h:230
int If_CutLutBalancePinDelays(If_Man_t *p, If_Cut_t *pCut, char *pPerm)
Definition: ifDelay.c:327
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
void * If_ManSatBuildXY(int nLutSize)
DECLARATIONS ///.
Definition: ifSat.c:45
void If_ManSatUnbuild(void *p)
Definition: ifSat.c:85
float If_ManScanMapping(If_Man_t *p)
If_Obj_t * pFanin1
Definition: if.h:322
typedefABC_NAMESPACE_HEADER_START struct Mem_Fixed_t_ Mem_Fixed_t
DECLARATIONS ///.
Definition: mem.h:33
int If_ManSatDeriveGiaFromBits(void *pNew, Ifn_Ntk_t *p, Vec_Int_t *vLeaves, Vec_Int_t *vValues)
Definition: ifTune.c:731
void If_ObjPrint(If_Obj_t *pObj)
Definition: ifUtil.c:604
int If_CutSopBalancePinDelaysInt(Vec_Int_t *vCover, int *pTimes, word *pFaninRes, int nSuppAll, word *pRes)
Definition: ifDelay.c:120
word * puTempW
Definition: if.h:204
float If_CutEdgeDeref(If_Man_t *p, If_Cut_t *pCut)
Definition: ifCut.c:1133
static void If_ObjSetArrTime(If_Obj_t *pObj, float ArrTime)
Definition: if.h:406
int If_ManSatCheckXY(void *pSat, int nLutSize, word *pTruth, int nVars, unsigned uSet, word *pTBound, word *pTFree, Vec_Int_t *vLits)
Definition: ifSat.c:150
int nCountNonDec[2]
Definition: if.h:259
int fBidec
Definition: if.h:125
Mem_Fixed_t * pMemEntries
Definition: if.h:269
int If_CutMergeOrdered(If_Man_t *p, If_Cut_t *pCut0, If_Cut_t *pCut1, If_Cut_t *pCut)
Definition: ifCut.c:290
float Epsilon
Definition: if.h:110
int If_LibLutDelaysAreDiscrete(If_LibLut_t *pLutLib)
Definition: ifLibLut.c:224
float * pTimesReq
Definition: if.h:162
If_Obj_t * pEquiv
Definition: if.h:323
int fUseAndVars
Definition: if.h:136
static int pPerm[13719]
Definition: rwrTemp.c:32
static void * If_CutData(If_Cut_t *pCut)
Definition: if.h:411
int nAttempts
Definition: if.h:222
int If_CutSopBalanceEval(If_Man_t *p, If_Cut_t *pCut, Vec_Int_t *vAig)
Definition: ifDelay.c:248
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
float fEpsilon
Definition: if.h:195
static int If_ObjIsTerm(If_Obj_t *pObj)
Definition: if.h:375
int If_CutComputeTruth(If_Man_t *p, If_Cut_t *pCut, If_Cut_t *pCut0, If_Cut_t *pCut1, int fCompl0, int fCompl1)
Definition: ifTruth.c:98
void * pCopy
Definition: if.h:328
If_Box_t * If_LibBoxFindBox(If_LibBox_t *p, char *pName)
Definition: ifLibBox.c:125
Vec_Ptr_t * vBoxes
Definition: if.h:352
static unsigned If_ObjCutSign(unsigned ObjId)
Definition: if.h:402
If_LibLut_t * If_LibLutDup(If_LibLut_t *p)
Definition: ifLibLut.c:153
float If_CutPowerDeref(If_Man_t *p, If_Cut_t *pCut, If_Obj_t *pRoot)
Definition: ifCut.c:1234
int If_DsdManSuppSize(If_DsdMan_t *p, int iDsd)
Definition: ifDsd.c:181
unsigned Level
Definition: if.h:315
int nVisitsCopy
Definition: if.h:320
Vec_Int_t * vCover
Definition: if.h:214
int nDegree
Definition: if.h:93
static float If_ObjArrTime(If_Obj_t *pObj)
Definition: if.h:405
int nObjBytes
Definition: if.h:228
abctime timeCache[6]
Definition: if.h:257
void If_CutPrintTiming(If_Man_t *p, If_Cut_t *pCut)
Definition: ifCut.c:876
int fFancy
Definition: if.h:115
float If_ManDelayMax(If_Man_t *p, int fSeq)
Definition: ifTime.c:250
void If_ManSetupCiCutSets(If_Man_t *p)
Definition: ifMan.c:548
int nCacheHits
Definition: if.h:255
If_DsdMan_t * If_DsdManFilter(If_DsdMan_t *p, int Limit)
Definition: ifDsd.c:1263
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
static int If_ManObjNum(If_Man_t *p)
Definition: if.h:363
Vec_Int_t * vPairRes
Definition: if.h:251
static int If_CutLeafBit(If_Cut_t *pCut, int i)
Definition: if.h:396
int nPermWords
Definition: if.h:227
int fUseDsd
Definition: if.h:133
int If_CutCheck(If_Cut_t *pCut)
Definition: ifCut.c:826
static void If_ObjSetChoice(If_Obj_t *pObj, If_Obj_t *pEqu)
Definition: if.h:388
int nRelaxRatio
Definition: if.h:111
Vec_Wrd_t * vOrGate
Definition: if.h:217
float FinalDelay
Definition: if.h:159
static If_Obj_t * If_Regular(If_Obj_t *p)
Definition: if.h:355
int nShared
Definition: if.h:211
static int If_CutDsdLit(If_Man_t *p, If_Cut_t *pCut)
Definition: if.h:424
If_Par_t * pPars
Definition: if.h:184
word If_DsdManGetFuncPerm(If_DsdMan_t *p, int iDsd)
Definition: ifDsd.c:199
float DelayTarget
Definition: if.h:109
Definition: if.h:337
Vec_Int_t * vLags
Definition: if.h:221
int uMaskFunc
Definition: if.h:282
If_Type_t
Definition: if.h:63
Vec_Int_t * vTtDsds[IF_MAX_FUNC_LUTSIZE+1]
Definition: if.h:246
short nCuts
Definition: if.h:297
void If_ManRestart(If_Man_t *p)
Definition: ifMan.c:178
int fUseBdds
Definition: if.h:148
Vec_Int_t * vCoAttrs
Definition: if.h:264
int nLatchesCo
Definition: if.h:153
If_DsdMan_t * If_DsdManAlloc(int nVars, int nLutSize)
Definition: ifDsd.c:248
Vec_Ptr_t * If_ManCollectMappingDirect(If_Man_t *p)
Definition: ifUtil.c:462
void If_CutLift(If_Cut_t *pCut)
Definition: ifCut.c:897
float If_CutDelay(If_Man_t *p, If_Obj_t *pObj, If_Cut_t *pCut)
Definition: ifTime.c:91
Definition: if.h:66
int(* pFuncCell)(If_Man_t *, unsigned *, int, int, char *)
Definition: if.h:165
int If_CutFilter(If_Set_t *pCutSet, If_Cut_t *pCut, int fSaveCut0)
Definition: ifCut.c:146
int fUseDsdTune
Definition: if.h:134
char pCanonPerm[IF_MAX_LUTSIZE]
Definition: if.h:253
static int If_ObjIsConst1(If_Obj_t *pObj)
Definition: if.h:372
int Period
Definition: if.h:224
void If_ManCreateChoice(If_Man_t *p, If_Obj_t *pRepr)
Definition: ifMan.c:442
int If_ManPerformMapping(If_Man_t *p)
Definition: ifCore.c:80
int nAreaIters
Definition: if.h:106
int If_DsdManLutSize(If_DsdMan_t *p)
Definition: ifDsd.c:173
int If_LibLutDelaysAreDifferent(If_LibLut_t *pLutLib)
Definition: ifLibLut.c:248
static int If_CutPermWords(int nVarsMax)
Definition: if.h:395
void If_ManCleanCutData(If_Man_t *p)
Definition: ifUtil.c:64
int fUserRecLib
Definition: if.h:124
int Ifn_NtkMatch(Ifn_Ntk_t *p, word *pTruth, int nVars, int nConfls, int fVerbose, int fVeryVerbose, word *pPerm)
Definition: ifTune.c:1207
int fPower
Definition: if.h:119
If_Obj_t * If_ManCreateCi(If_Man_t *p)
Definition: ifMan.c:316
void If_DsdManTune(If_DsdMan_t *p, int LutSize, int fFast, int fAdd, int fSpec, int fVerbose)
Definition: ifDsd.c:2377
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
void If_LibLutFree(If_LibLut_t *pLutLib)
Definition: ifLibLut.c:173
int fDelayOpt
Definition: if.h:121
If_DsdMan_t * If_DsdManLoad(char *pFileName)
Definition: ifDsd.c:1086
int fUseBuffs
Definition: if.h:127
int fUseBat
Definition: if.h:126
float pLutAreas[IF_MAX_LUTSIZE+1]
Definition: if.h:175
Definition: if.h:294
unsigned uSign
Definition: if.h:283
Vec_Int_t * If_ManCollectMappingInt(If_Man_t *p)
Definition: ifUtil.c:486
int nVisits
Definition: if.h:319
int fCutMin
Definition: if.h:120
static float If_CutLutDelay(If_LibLut_t *p, int Size, int iPin)
Definition: if.h:429
float pLutDelays[IF_MAX_LUTSIZE]
Definition: if.h:91
char * If_DsdManGetCellStr(If_DsdMan_t *p)
Definition: ifDsd.c:203
int fUseTtPerm
Definition: if.h:137
float If_CutPowerRefed(If_Man_t *p, If_Cut_t *pCut, If_Obj_t *pRoot)
Definition: ifCut.c:1313
static If_Obj_t * If_ManLo(If_Man_t *p, int i)
Definition: if.h:369
int nObjs[IF_VOID]
Definition: if.h:192
int Id
Definition: if.h:344
float EstRefs
Definition: if.h:324
int fUseSops
Definition: if.h:149
char * pName
Definition: if.h:172
If_Obj_t * If_ManCreateAnd(If_Man_t *p, If_Obj_t *pFan0, If_Obj_t *pFan1)
Definition: ifMan.c:366
void If_ManCleanNodeCopy(If_Man_t *p)
DECLARATIONS ///.
Definition: ifUtil.c:45
#define assert(ex)
Definition: util_old.h:213
Vec_Ptr_t * vCos
Definition: if.h:188
int nCutBytes
Definition: if.h:229
int nCutsMax
Definition: if.h:104
int nCutsCount[32]
Definition: if.h:239
int nNets
Definition: if.h:199
If_Cut_t ** ppCuts
Definition: if.h:299
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
Definition: tim.h:92
int If_CutDsdBalanceEval(If_Man_t *p, If_Cut_t *pCut, Vec_Int_t *vAig)
Definition: ifDsd.c:2288
static int If_ManCoNum(If_Man_t *p)
Definition: if.h:361
int nTableEntries[2]
Definition: if.h:267
int If_CutPerformCheck75(If_Man_t *p, unsigned *pTruth, int nVars, int nLeaves, char *pStr)
Definition: ifDec75.c:303
unsigned fCompl
Definition: if.h:285
int fNextRound
Definition: if.h:206
int SortMode
Definition: if.h:205
unsigned fSpec
Definition: if.h:312
Vec_Ptr_t * vLatchOrder
Definition: if.h:220
If_LibLut_t * If_LibLutSetSimple(int nLutSize)
Definition: ifLibLut.c:279
float If_LibLutSlowestPinDelay(If_LibLut_t *p)
Definition: ifLibLut.c:335
static word * Vec_MemReadEntry(Vec_Mem_t *p, int i)
Definition: vecMem.h:191
void If_DsdManSetNewAsUseless(If_DsdMan_t *p)
Definition: ifDsd.c:193
static float If_ObjLValue(If_Obj_t *pObj)
Definition: if.h:408
int If_CutLutBalanceEval(If_Man_t *p, If_Cut_t *pCut)
Definition: ifDelay.c:369
int fArea
Definition: if.h:114
void If_ManImproveMapping(If_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition: ifReduce.c:51
static If_Obj_t * If_ManLi(If_Man_t *p, int i)
Definition: if.h:368
int nStructType
Definition: if.h:112
If_Set_t * pMemAnd
Definition: if.h:234
static int If_IsComplement(If_Obj_t *p)
Definition: if.h:358
float If_CutAreaRefed(If_Man_t *p, If_Cut_t *pCut)
Definition: ifCut.c:1109
int fLiftLeaves
Definition: if.h:156
Definition: if.h:65
ABC_INT64_T abctime
Definition: abc_global.h:278
static char * If_CutDsdPerm(If_Man_t *p, If_Cut_t *pCut)
Definition: if.h:426
If_Set_t * pFreeList
Definition: if.h:235
void If_DsdManCleanOccur(If_DsdMan_t *p, int fVerbose)
Definition: ifDsd.c:1217
void If_CutPropagateRequired(If_Man_t *p, If_Obj_t *pObj, If_Cut_t *pCut, float Required)
Definition: ifTime.c:170
float If_CutAreaRef(If_Man_t *p, If_Cut_t *pCut)
Definition: ifCut.c:1059
int If_CutPerformCheck16(If_Man_t *p, unsigned *pTruth, int nVars, int nLeaves, char *pStr)
Definition: ifDec16.c:2216
float If_CutEdgeFlow(If_Man_t *p, If_Cut_t *pCut)
Definition: ifCut.c:949
unsigned fCompl1
Definition: if.h:307
int If_DsdManReadMark(If_DsdMan_t *p, int iDsd)
Definition: ifDsd.c:189
unsigned fCompl0
Definition: if.h:306
int iCutFunc
Definition: if.h:281
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
Definition: vecWrd.h:42
void If_ManStop(If_Man_t *p)
Definition: ifMan.c:205
int fEnableCheck08
Definition: if.h:129
unsigned fPhase
Definition: if.h:308
void If_CutSort(If_Man_t *p, If_Set_t *pCutSet, If_Cut_t *pCut)
Definition: ifCut.c:738
If_Obj_t * pConst1
Definition: if.h:186
Vec_Str_t * vPairPerms
Definition: if.h:252
static char * Vec_StrEntryP(Vec_Str_t *p, int i)
Definition: vecStr.h:353
float Delay
Definition: if.h:280
int If_CutComputeTruthPerm(If_Man_t *p, If_Cut_t *pCut, If_Cut_t *pCut0, If_Cut_t *pCut1, int fCompl0, int fCompl1)
Definition: ifTruth.c:263
void If_ManMarkMapping(If_Man_t *p)
Definition: ifUtil.c:434
float If_CutPowerDerefed(If_Man_t *p, If_Cut_t *pCut, If_Obj_t *pRoot)
Definition: ifCut.c:1290
int If_CutDelaySop(If_Man_t *p, If_Cut_t *pCut)
Definition: ifDelay.c:64
void If_ManDerefNodeCutSet(If_Man_t *p, If_Obj_t *pObj)
Definition: ifMan.c:602
unsigned fMark
Definition: if.h:310
int nPos
Definition: if.h:346
int IdPio
Definition: if.h:317
int If_CutDsdBalancePinDelays(If_Man_t *p, If_Cut_t *pCut, char *pPerm)
Definition: ifDsd.c:2152
unsigned uCanonPhase
Definition: if.h:254
int If_CutPerformCheck45(If_Man_t *p, unsigned *pTruth, int nVars, int nLeaves, char *pStr)
Definition: ifDec16.c:1865
void If_ManDerefChoiceCutSet(If_Man_t *p, If_Obj_t *pObj)
Definition: ifMan.c:645
float Area
Definition: if.h:277
If_LibLut_t * pLutLib
Definition: if.h:160
Ifn_Ntk_t * Ifn_NtkParse(char *pStr)
Definition: ifTune.c:439
If_Set_t * pNext
Definition: if.h:298