abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ifCount.h File Reference

Go to the source code of this file.

Functions

static
ABC_NAMESPACE_HEADER_START int 
If_LogCreateAnd (Vec_Int_t *vAig, int iLit0, int iLit1, int nSuppAll)
 INCLUDES ///. More...
 
static int If_LogCreateMux (Vec_Int_t *vAig, int iLitC, int iLit1, int iLit0, int nSuppAll)
 
static int If_LogCreateXor (Vec_Int_t *vAig, int iLit0, int iLit1, int nSuppAll)
 
static int If_LogCreateAndXor (Vec_Int_t *vAig, int iLit0, int iLit1, int nSuppAll, int fXor)
 
static int If_LogCreateAndXorMulti (Vec_Int_t *vAig, int *pFaninLits, int nFanins, int nSuppAll, int fXor)
 
static int If_LogCounterAddAig (int *pTimes, int *pnTimes, int *pFaninLits, int Num, int iLit, Vec_Int_t *vAig, int nSuppAll, int fXor, int fXorFunc)
 
static int If_LogCounterDelayXor (int *pTimes, int nTimes)
 
static int If_CutPinDelayGet (word D, int v)
 
static void If_CutPinDelaySet (word *pD, int v, int d)
 
static word If_CutPinDelayInit (int v)
 
static word If_CutPinDelayMax (word D1, word D2, int nVars, int AddOn)
 
static word If_CutPinDelayDecrement (word D1, int nVars)
 
static int If_CutPinDelayEqual (word D1, word D2, int nVars)
 
static int If_CutPinDelayDom (word D1, word D2, int nVars)
 
static void If_CutPinDelayTranslate (word D, int nVars, char *pPerm)
 
static void If_CutPinDelayPrint (word D, int nVars)
 
static int If_LogCounterPinDelays (int *pTimes, int *pnTimes, word *pPinDels, int Num, word PinDel, int nSuppAll, int fXor)
 
static word If_LogPinDelaysMulti (word *pPinDels, int nFanins, int nSuppAll, int fXor)
 
static word If_AigVerifyArray (Vec_Int_t *vAig, int nLeaves)
 
static void If_AigPrintArray (Vec_Int_t *vAig, int nLeaves)
 
static int If_LogCounter64Eval (word Count)
 
static word If_LogCounter64Add (word Count, int Num)
 
static int If_LogCounter32Eval (unsigned Count, int Start)
 
static unsigned If_LogCounter32Add (unsigned Count, int *pStart, int Num)
 
static int If_LogCounterAdd (int *pTimes, int *pnTimes, int Num, int fXor)
 

Function Documentation

static void If_AigPrintArray ( Vec_Int_t vAig,
int  nLeaves 
)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 300 of file ifCount.h.

301 {
302  assert( Vec_IntSize(vAig) > 0 );
303  assert( Vec_IntEntryLast(vAig) < 2 );
304  if ( Vec_IntSize(vAig) == 1 ) // const
305  printf( "Const %d\n", Vec_IntEntry(vAig, 0) );
306  else if ( Vec_IntSize(vAig) == 2 ) // variable
307  printf( "Variable %s\n", Vec_IntEntry(vAig, 1) ? "Compl" : "" );
308  else
309  {
310  int i, iLit0, iLit1;
311  assert( Vec_IntSize(vAig) & 1 );
312  Vec_IntForEachEntryDouble( vAig, iLit0, iLit1, i )
313  printf( "%d %d\n", iLit0, iLit1 );
314  assert( i == Vec_IntSize(vAig) - 1 );
315  printf( "%s\n", Vec_IntEntry(vAig, i) ? "Compl" : "" );
316  }
317 }
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
Definition: vecInt.h:66
static int Vec_IntEntryLast(Vec_Int_t *p)
Definition: bblif.c:319
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
#define assert(ex)
Definition: util_old.h:213
static word If_AigVerifyArray ( Vec_Int_t vAig,
int  nLeaves 
)
inlinestatic

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 251 of file ifCount.h.

252 {
253  assert( Vec_IntSize(vAig) > 0 );
254  assert( Vec_IntEntryLast(vAig) < 2 );
255  if ( Vec_IntSize(vAig) == 1 ) // const
256  return Vec_IntEntry(vAig, 0) ? ~((word)0) : 0;
257  if ( Vec_IntSize(vAig) == 2 ) // variable
258  {
259  assert( Vec_IntEntry(vAig, 0) == 0 );
260  return Vec_IntEntry(vAig, 1) ? ~s_Truths6[0] : s_Truths6[0];
261  }
262  else
263  {
264  word Truth0 = 0, Truth1 = 0, TruthR;
265  int i, iVar0, iVar1, iLit0, iLit1;
266  assert( Vec_IntSize(vAig) & 1 );
267  Vec_IntForEachEntryDouble( vAig, iLit0, iLit1, i )
268  {
269  iVar0 = Abc_Lit2Var( iLit0 );
270  iVar1 = Abc_Lit2Var( iLit1 );
271  Truth0 = iVar0 < nLeaves ? s_Truths6[iVar0] : Vec_WrdEntry( (Vec_Wrd_t *)vAig, iVar0 - nLeaves );
272  Truth1 = iVar1 < nLeaves ? s_Truths6[iVar1] : Vec_WrdEntry( (Vec_Wrd_t *)vAig, iVar1 - nLeaves );
273  if ( Abc_LitIsCompl(iLit0) )
274  Truth0 = ~Truth0;
275  if ( Abc_LitIsCompl(iLit1) )
276  Truth1 = ~Truth1;
277  assert( (i & 1) == 0 );
278  Vec_WrdWriteEntry( (Vec_Wrd_t *)vAig, Abc_Lit2Var(i), Truth0 & Truth1 ); // overwriting entries
279  }
280  assert( i == Vec_IntSize(vAig) - 1 );
281  TruthR = Truth0 & Truth1;
282  if ( Vec_IntEntry(vAig, i) )
283  TruthR = ~TruthR;
284  Vec_IntClear( vAig ); // useless
285  return TruthR;
286  }
287 }
static int Abc_LitIsCompl(int Lit)
Definition: abc_global.h:265
static void Vec_WrdWriteEntry(Vec_Wrd_t *p, int i, word Entry)
Definition: vecWrd.h:418
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
Definition: vecInt.h:66
static int Vec_IntEntryLast(Vec_Int_t *p)
Definition: bblif.c:319
static word s_Truths6[6]
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static word Vec_WrdEntry(Vec_Wrd_t *p, int i)
Definition: vecWrd.h:384
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
#define assert(ex)
Definition: util_old.h:213
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
Definition: vecWrd.h:42
static word If_CutPinDelayDecrement ( word  D1,
int  nVars 
)
inlinestatic

Definition at line 156 of file ifCount.h.

157 {
158  int v;
159  word D = 0;
160  for ( v = 0; v < nVars; v++ )
161  if ( If_CutPinDelayGet(D1, v) )
162  If_CutPinDelaySet( &D, v, If_CutPinDelayGet(D1, v) - 1 );
163  return D;
164 }
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static void If_CutPinDelaySet(word *pD, int v, int d)
Definition: ifCount.h:145
static int If_CutPinDelayGet(word D, int v)
Definition: ifCount.h:144
static int If_CutPinDelayDom ( word  D1,
word  D2,
int  nVars 
)
inlinestatic

Definition at line 173 of file ifCount.h.

174 {
175  int v;
176  for ( v = 0; v < nVars; v++ )
177  if ( If_CutPinDelayGet(D1, v) > If_CutPinDelayGet(D2, v) )
178  return 0;
179  return 1;
180 }
static int If_CutPinDelayGet(word D, int v)
Definition: ifCount.h:144
static int If_CutPinDelayEqual ( word  D1,
word  D2,
int  nVars 
)
inlinestatic

Definition at line 165 of file ifCount.h.

166 {
167  int v;
168  for ( v = 0; v < nVars; v++ )
169  if ( If_CutPinDelayGet(D1, v) != If_CutPinDelayGet(D2, v) )
170  return 0;
171  return 1;
172 }
static int If_CutPinDelayGet(word D, int v)
Definition: ifCount.h:144
static int If_CutPinDelayGet ( word  D,
int  v 
)
inlinestatic

Function*************************************************************

Synopsis [Compute delay/area profile of the structure.]

Description []

SideEffects []

SeeAlso []

Definition at line 144 of file ifCount.h.

144 { assert(v >= 0 && v < IF_MAX_FUNC_LUTSIZE); return (int)((D >> (v << 2)) & 0xF); }
#define IF_MAX_FUNC_LUTSIZE
Definition: if.h:54
#define assert(ex)
Definition: util_old.h:213
static word If_CutPinDelayInit ( int  v)
inlinestatic

Definition at line 146 of file ifCount.h.

146 { assert(v >= 0 && v < IF_MAX_FUNC_LUTSIZE); return (word)1 << (v << 2); }
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define IF_MAX_FUNC_LUTSIZE
Definition: if.h:54
#define assert(ex)
Definition: util_old.h:213
static word If_CutPinDelayMax ( word  D1,
word  D2,
int  nVars,
int  AddOn 
)
inlinestatic

Definition at line 147 of file ifCount.h.

148 {
149  int v, Max;
150  word D = 0;
151  for ( v = 0; v < nVars; v++ )
152  if ( (Max = Abc_MaxInt(If_CutPinDelayGet(D1, v), If_CutPinDelayGet(D2, v))) )
153  If_CutPinDelaySet( &D, v, Abc_MinInt(Max + AddOn, 15) );
154  return D;
155 }
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
static int Abc_MinInt(int a, int b)
Definition: abc_global.h:239
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static void If_CutPinDelaySet(word *pD, int v, int d)
Definition: ifCount.h:145
static int If_CutPinDelayGet(word D, int v)
Definition: ifCount.h:144
static void If_CutPinDelayPrint ( word  D,
int  nVars 
)
inlinestatic

Definition at line 191 of file ifCount.h.

192 {
193  int v;
194  printf( "Delay profile = {" );
195  for ( v = 0; v < nVars; v++ )
196  printf( " %d", If_CutPinDelayGet(D, v) );
197  printf( " }\n" );
198 }
static int If_CutPinDelayGet(word D, int v)
Definition: ifCount.h:144
static void If_CutPinDelaySet ( word pD,
int  v,
int  d 
)
inlinestatic

Definition at line 145 of file ifCount.h.

145 { assert(v >= 0 && v < IF_MAX_FUNC_LUTSIZE); assert(d >= 0 && d < IF_MAX_FUNC_LUTSIZE); *pD |= ((word)d << (v << 2)); }
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define IF_MAX_FUNC_LUTSIZE
Definition: if.h:54
#define assert(ex)
Definition: util_old.h:213
static void If_CutPinDelayTranslate ( word  D,
int  nVars,
char *  pPerm 
)
inlinestatic

Definition at line 181 of file ifCount.h.

182 {
183  int v, Delay;
184  for ( v = 0; v < nVars; v++ )
185  {
186  Delay = If_CutPinDelayGet(D, v);
187  assert( Delay > 1 );
188  pPerm[v] = Delay - 1;
189  }
190 }
static int pPerm[13719]
Definition: rwrTemp.c:32
#define assert(ex)
Definition: util_old.h:213
static int If_CutPinDelayGet(word D, int v)
Definition: ifCount.h:144
static unsigned If_LogCounter32Add ( unsigned  Count,
int *  pStart,
int  Num 
)
static

Definition at line 372 of file ifCount.h.

373 {
374  int Start = Abc_Lit2Var(*pStart);
375  if ( Num < Start )
376  {
377  *pStart |= 1;
378  return Count;
379  }
380  if ( Num > Start + 16 )
381  {
382  int Shift = Num - (Start + 16);
383  if ( !Abc_LitIsCompl(*pStart) && (Shift >= 32 ? Count : Count & ~(~0 << Shift)) > 0 )
384  *pStart |= 1;
385  Count >>= Shift;
386  Start += Shift;
387  *pStart = Abc_Var2Lit( Start, Abc_LitIsCompl(*pStart) );
388  assert( Num <= Start + 16 );
389  }
390  return Count + (1 << (Num-Start));
391 }
static int Abc_Var2Lit(int Var, int fCompl)
Definition: abc_global.h:263
static int Abc_LitIsCompl(int Lit)
Definition: abc_global.h:265
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
#define assert(ex)
Definition: util_old.h:213
static int If_LogCounter32Eval ( unsigned  Count,
int  Start 
)
static

Function*************************************************************

Synopsis [Implementation of log-counter.]

Description [Incrementally computes [log2(SUMi(2^di)). Supposed to work correctly up to 16 entries.]

SideEffects []

SeeAlso []

Definition at line 361 of file ifCount.h.

362 {
363  int n = (Abc_LitIsCompl(Start) || (Count & (Count - 1)) > 0) ? -1 : 0;
364  assert( Count > 0 );
365  if ( (Count & 0xFFFF0000) == 0 ) { n += 16; Count <<= 16; }
366  if ( (Count & 0xFF000000) == 0 ) { n += 8; Count <<= 8; }
367  if ( (Count & 0xF0000000) == 0 ) { n += 4; Count <<= 4; }
368  if ( (Count & 0xC0000000) == 0 ) { n += 2; Count <<= 2; }
369  if ( (Count & 0x80000000) == 0 ) { n++; }
370  return Abc_Lit2Var(Start) + 31 - n;
371 }
static int Abc_LitIsCompl(int Lit)
Definition: abc_global.h:265
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
#define assert(ex)
Definition: util_old.h:213
static word If_LogCounter64Add ( word  Count,
int  Num 
)
static

Definition at line 343 of file ifCount.h.

344 {
345  assert( Num < 48 );
346  return Count + (((word)1) << Num);
347 }
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define assert(ex)
Definition: util_old.h:213
static int If_LogCounter64Eval ( word  Count)
inlinestatic

Function*************************************************************

Synopsis [Naive implementation of log-counter.]

Description [Incrementally computes [log2(SUMi(2^di)).]

SideEffects []

SeeAlso []

Definition at line 331 of file ifCount.h.

332 {
333  int n = ((Count & (Count - 1)) > 0) ? -1 : 0;
334  assert( Count > 0 );
335  if ( (Count & ABC_CONST(0xFFFFFFFF00000000)) == 0 ) { n += 32; Count <<= 32; }
336  if ( (Count & ABC_CONST(0xFFFF000000000000)) == 0 ) { n += 16; Count <<= 16; }
337  if ( (Count & ABC_CONST(0xFF00000000000000)) == 0 ) { n += 8; Count <<= 8; }
338  if ( (Count & ABC_CONST(0xF000000000000000)) == 0 ) { n += 4; Count <<= 4; }
339  if ( (Count & ABC_CONST(0xC000000000000000)) == 0 ) { n += 2; Count <<= 2; }
340  if ( (Count & ABC_CONST(0x8000000000000000)) == 0 ) { n++; }
341  return 63 - n;
342 }
#define ABC_CONST(number)
PARAMETERS ///.
Definition: abc_global.h:206
#define assert(ex)
Definition: util_old.h:213
static int If_LogCounterAdd ( int *  pTimes,
int *  pnTimes,
int  Num,
int  fXor 
)
inlinestatic

Function*************************************************************

Synopsis [Testing of the counter]

Description []

SideEffects []

SeeAlso [] Function*************************************************************

Synopsis [Adds the number to the numbers stored.]

Description []

SideEffects []

SeeAlso []

Definition at line 454 of file ifCount.h.

455 {
456  int nTimes = *pnTimes;
457  pTimes[nTimes++] = Num;
458  if ( nTimes > 1 )
459  {
460  int i, k;
461  for ( k = nTimes-1; k > 0; k-- )
462  {
463  if ( pTimes[k] < pTimes[k-1] )
464  break;
465  if ( pTimes[k] > pTimes[k-1] )
466  {
467  ABC_SWAP( int, pTimes[k], pTimes[k-1] );
468  continue;
469  }
470  pTimes[k-1] += 1 + fXor;
471  for ( nTimes--, i = k; i < nTimes; i++ )
472  pTimes[i] = pTimes[i+1];
473  }
474  }
475  assert( nTimes > 0 );
476  *pnTimes = nTimes;
477  return pTimes[0] + (nTimes > 1 ? 1 + fXor : 0);
478 }
#define ABC_SWAP(Type, a, b)
Definition: abc_global.h:218
#define assert(ex)
Definition: util_old.h:213
static int If_LogCounterAddAig ( int *  pTimes,
int *  pnTimes,
int *  pFaninLits,
int  Num,
int  iLit,
Vec_Int_t vAig,
int  nSuppAll,
int  fXor,
int  fXorFunc 
)
inlinestatic

Definition at line 88 of file ifCount.h.

89 {
90  int nTimes = *pnTimes;
91  if ( vAig )
92  pFaninLits[nTimes] = iLit;
93  pTimes[nTimes++] = Num;
94  if ( nTimes > 1 )
95  {
96  int i, k;
97  for ( k = nTimes-1; k > 0; k-- )
98  {
99  if ( pTimes[k] < pTimes[k-1] )
100  break;
101  if ( pTimes[k] > pTimes[k-1] )
102  {
103  ABC_SWAP( int, pTimes[k], pTimes[k-1] );
104  if ( vAig )
105  ABC_SWAP( int, pFaninLits[k], pFaninLits[k-1] );
106  continue;
107  }
108  pTimes[k-1] += 1 + fXor;
109  if ( vAig )
110  pFaninLits[k-1] = If_LogCreateAndXor( vAig, pFaninLits[k], pFaninLits[k-1], nSuppAll, fXorFunc );
111  for ( nTimes--, i = k; i < nTimes; i++ )
112  {
113  pTimes[i] = pTimes[i+1];
114  if ( vAig )
115  pFaninLits[i] = pFaninLits[i+1];
116  }
117  }
118  }
119  assert( nTimes > 0 );
120  *pnTimes = nTimes;
121  return pTimes[0] + (nTimes > 1 ? 1 + fXor : 0);
122 }
static int If_LogCreateAndXor(Vec_Int_t *vAig, int iLit0, int iLit1, int nSuppAll, int fXor)
Definition: ifCount.h:76
#define ABC_SWAP(Type, a, b)
Definition: abc_global.h:218
#define assert(ex)
Definition: util_old.h:213
static int If_LogCounterDelayXor ( int *  pTimes,
int  nTimes 
)
inlinestatic

Definition at line 123 of file ifCount.h.

124 {
125  int i;
126  assert( nTimes > 0 );
127  for ( i = nTimes - 1; i > 0; i-- )
128  pTimes[i-1] = 2 + Abc_MaxInt( pTimes[i], pTimes[i-1] );
129  return pTimes[0];
130 }
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
#define assert(ex)
Definition: util_old.h:213
static int If_LogCounterPinDelays ( int *  pTimes,
int *  pnTimes,
word pPinDels,
int  Num,
word  PinDel,
int  nSuppAll,
int  fXor 
)
inlinestatic

Definition at line 199 of file ifCount.h.

200 {
201  int nTimes = *pnTimes;
202  pPinDels[nTimes] = PinDel;
203  pTimes[nTimes++] = Num;
204  if ( nTimes > 1 )
205  {
206  int i, k;
207  for ( k = nTimes-1; k > 0; k-- )
208  {
209  if ( pTimes[k] < pTimes[k-1] )
210  break;
211  if ( pTimes[k] > pTimes[k-1] )
212  {
213  ABC_SWAP( int, pTimes[k], pTimes[k-1] );
214  ABC_SWAP( word, pPinDels[k], pPinDels[k-1] );
215  continue;
216  }
217  pTimes[k-1] += 1 + fXor;
218  pPinDels[k-1] = If_CutPinDelayMax( pPinDels[k], pPinDels[k-1], nSuppAll, 1 + fXor );
219  for ( nTimes--, i = k; i < nTimes; i++ )
220  {
221  pTimes[i] = pTimes[i+1];
222  pPinDels[i] = pPinDels[i+1];
223  }
224  }
225  }
226  assert( nTimes > 0 );
227  *pnTimes = nTimes;
228  return pTimes[0] + (nTimes > 1 ? 1 + fXor : 0);
229 }
static word If_CutPinDelayMax(word D1, word D2, int nVars, int AddOn)
Definition: ifCount.h:147
#define ABC_SWAP(Type, a, b)
Definition: abc_global.h:218
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define assert(ex)
Definition: util_old.h:213
static ABC_NAMESPACE_HEADER_START int If_LogCreateAnd ( Vec_Int_t vAig,
int  iLit0,
int  iLit1,
int  nSuppAll 
)
inlinestatic

INCLUDES ///.

CFile****************************************************************

FileName [ifCount.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [FPGA mapping based on priority cuts.]

Synopsis [External declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - November 21, 2006.]

Revision [

Id:
ifCount.h,v 1.00 2006/11/21 00:00:00 alanmi Exp

]PARAMETERS ///BASIC TYPES ///MACRO DEFINITIONS ///FUNCTION DECLARATIONS /// Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 57 of file ifCount.h.

58 {
59  int iObjId = Vec_IntSize(vAig)/2 + nSuppAll;
60  assert( Abc_Lit2Var(iLit0) != Abc_Lit2Var(iLit1) );
61  Vec_IntPush( vAig, iLit0 );
62  Vec_IntPush( vAig, iLit1 );
63  return Abc_Var2Lit( iObjId, 0 );
64 }
static int Abc_Var2Lit(int Var, int fCompl)
Definition: abc_global.h:263
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
#define assert(ex)
Definition: util_old.h:213
static int If_LogCreateAndXor ( Vec_Int_t vAig,
int  iLit0,
int  iLit1,
int  nSuppAll,
int  fXor 
)
inlinestatic

Definition at line 76 of file ifCount.h.

77 {
78  return fXor ? If_LogCreateXor(vAig, iLit0, iLit1, nSuppAll) : If_LogCreateAnd(vAig, iLit0, iLit1, nSuppAll);
79 }
static ABC_NAMESPACE_HEADER_START int If_LogCreateAnd(Vec_Int_t *vAig, int iLit0, int iLit1, int nSuppAll)
INCLUDES ///.
Definition: ifCount.h:57
static int If_LogCreateXor(Vec_Int_t *vAig, int iLit0, int iLit1, int nSuppAll)
Definition: ifCount.h:72
static int If_LogCreateAndXorMulti ( Vec_Int_t vAig,
int *  pFaninLits,
int  nFanins,
int  nSuppAll,
int  fXor 
)
inlinestatic

Definition at line 80 of file ifCount.h.

81 {
82  int i;
83  assert( nFanins > 0 );
84  for ( i = nFanins - 1; i > 0; i-- )
85  pFaninLits[i-1] = If_LogCreateAndXor( vAig, pFaninLits[i], pFaninLits[i-1], nSuppAll, fXor );
86  return pFaninLits[0];
87 }
static int If_LogCreateAndXor(Vec_Int_t *vAig, int iLit0, int iLit1, int nSuppAll, int fXor)
Definition: ifCount.h:76
#define assert(ex)
Definition: util_old.h:213
static int If_LogCreateMux ( Vec_Int_t vAig,
int  iLitC,
int  iLit1,
int  iLit0,
int  nSuppAll 
)
inlinestatic

Definition at line 65 of file ifCount.h.

66 {
67  int iFanLit0 = If_LogCreateAnd( vAig, iLitC, iLit1, nSuppAll );
68  int iFanLit1 = If_LogCreateAnd( vAig, Abc_LitNot(iLitC), iLit0, nSuppAll );
69  int iResLit = If_LogCreateAnd( vAig, Abc_LitNot(iFanLit0), Abc_LitNot(iFanLit1), nSuppAll );
70  return Abc_LitNot(iResLit);
71 }
static ABC_NAMESPACE_HEADER_START int If_LogCreateAnd(Vec_Int_t *vAig, int iLit0, int iLit1, int nSuppAll)
INCLUDES ///.
Definition: ifCount.h:57
static int Abc_LitNot(int Lit)
Definition: abc_global.h:266
static int If_LogCreateXor ( Vec_Int_t vAig,
int  iLit0,
int  iLit1,
int  nSuppAll 
)
inlinestatic

Definition at line 72 of file ifCount.h.

73 {
74  return If_LogCreateMux( vAig, iLit0, Abc_LitNot(iLit1), iLit1, nSuppAll );
75 }
static int If_LogCreateMux(Vec_Int_t *vAig, int iLitC, int iLit1, int iLit0, int nSuppAll)
Definition: ifCount.h:65
static int Abc_LitNot(int Lit)
Definition: abc_global.h:266
static word If_LogPinDelaysMulti ( word pPinDels,
int  nFanins,
int  nSuppAll,
int  fXor 
)
inlinestatic

Definition at line 230 of file ifCount.h.

231 {
232  int i;
233  assert( nFanins > 0 );
234  for ( i = nFanins - 1; i > 0; i-- )
235  pPinDels[i-1] = If_CutPinDelayMax( pPinDels[i], pPinDels[i-1], nSuppAll, 1 + fXor );
236  return pPinDels[0];
237 }
static word If_CutPinDelayMax(word D1, word D2, int nVars, int AddOn)
Definition: ifCount.h:147
#define assert(ex)
Definition: util_old.h:213