abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ifDec08.c File Reference
#include "if.h"
#include "misc/extra/extra.h"
#include "bool/kit/kit.h"

Go to the source code of this file.

Functions

void Kit_DsdPrintFromTruth (unsigned *pTruth, int nVars)
 
void Extra_PrintBinary (FILE *pFile, unsigned Sign[], int nBits)
 
static int If_Dec08WordNum (int nVars)
 FUNCTION DEFINITIONS ///. More...
 
static void If_Dec08PrintConfigOne (unsigned z)
 
void If_Dec08PrintConfig (unsigned *pZ)
 
static void If_Dec08ComposeLut4 (int t, word **pF, word *pR, int nVars)
 
void If_Dec08Verify (word *pF, int nVars, unsigned *pZ)
 
static int If_Dec08CofCount2 (word *pF, int nVars)
 
static int If_Dec08CofCount (word *pF, int nVars)
 
static void If_Dec08Copy (word *pOut, word *pIn, int nVars)
 
static void If_Dec08SwapAdjacent (word *pOut, word *pIn, int iVar, int nVars)
 
static void If_Dec08MoveTo (word *pF, int nVars, int v, int p, int Pla2Var[], int Var2Pla[])
 
static int If_DecSuppIsMinBase (int Supp)
 
static int If_Dec08HasVar (word *t, int nVars, int iVar)
 
static int If_Dec08Support (word *t, int nVars)
 
void If_Dec08Cofactors (word *pF, int nVars, int iVar, word *pCof0, word *pCof1)
 
static int If_Dec08Count16 (int Num16)
 
static void If_DecVerifyPerm (int Pla2Var[10], int Var2Pla[10], int nVars)
 
int If_Dec08Perform (word *pF, int nVars, int fDerive)
 
int If_CutPerformCheck08 (If_Man_t *p, unsigned *pTruth, int nVars, int nLeaves, char *pStr)
 

Variables

static ABC_NAMESPACE_IMPL_START int BitCount8 [256]
 DECLARATIONS ///. More...
 
static word PMasks [5][3]
 
static word Truth6 [6]
 
static word Truth10 [10][16]
 

Function Documentation

void Extra_PrintBinary ( FILE *  pFile,
unsigned  Sign[],
int  nBits 
)

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

Synopsis [Prints the bit string.]

Description []

SideEffects []

SeeAlso []

Definition at line 497 of file extraUtilFile.c.

498 {
499  int Remainder, nWords;
500  int w, i;
501 
502  Remainder = (nBits%(sizeof(unsigned)*8));
503  nWords = (nBits/(sizeof(unsigned)*8)) + (Remainder>0);
504 
505  for ( w = nWords-1; w >= 0; w-- )
506  for ( i = ((w == nWords-1 && Remainder)? Remainder-1: 31); i >= 0; i-- )
507  fprintf( pFile, "%c", '0' + (int)((Sign[w] & (1<<i)) > 0) );
508 
509 // fprintf( pFile, "\n" );
510 }
int nWords
Definition: abcNpn.c:127
int If_CutPerformCheck08 ( If_Man_t p,
unsigned *  pTruth,
int  nVars,
int  nLeaves,
char *  pStr 
)

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

Synopsis [Performs additional check.]

Description []

SideEffects []

SeeAlso []

Definition at line 481 of file ifDec08.c.

482 {
483  int nSupp, fDerive = 0;
484  word pF[16];
485  if ( nLeaves <= 5 )
486  return 1;
487  If_Dec08Copy( pF, (word *)pTruth, nVars );
488  nSupp = If_Dec08Support( pF, nLeaves );
489  if ( !nSupp || !If_DecSuppIsMinBase(nSupp) )
490  return 0;
491  if ( If_Dec08Perform( pF, nLeaves, fDerive ) )
492  {
493 // printf( "1" );
494  return 1;
495 // If_Dec08Verify( t, nLeaves, NULL );
496  }
497 // printf( "0" );
498  return 0;
499 }
static void If_Dec08Copy(word *pOut, word *pIn, int nVars)
Definition: ifDec08.c:198
static int If_DecSuppIsMinBase(int Supp)
Definition: ifDec08.c:304
static int If_Dec08Support(word *t, int nVars)
Definition: ifDec08.c:333
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
int If_Dec08Perform(word *pF, int nVars, int fDerive)
Definition: ifDec08.c:385
void If_Dec08Cofactors ( word pF,
int  nVars,
int  iVar,
word pCof0,
word pCof1 
)

Definition at line 343 of file ifDec08.c.

344 {
345  int nWords = If_Dec08WordNum( nVars );
346  assert( iVar < nVars );
347  if ( iVar < 6 )
348  {
349  int i, Shift = (1 << iVar);
350  for ( i = 0; i < nWords; i++ )
351  {
352  pCof0[i] = (pF[i] & ~Truth6[iVar]) | ((pF[i] & ~Truth6[iVar]) << Shift);
353  pCof1[i] = (pF[i] & Truth6[iVar]) | ((pF[i] & Truth6[iVar]) >> Shift);
354  }
355  return;
356  }
357  else
358  {
359  int i, k, Step = (1 << (iVar - 6));
360  for ( k = 0; k < nWords; k += 2*Step )
361  {
362  for ( i = 0; i < Step; i++ )
363  {
364  pCof0[i] = pCof0[Step+i] = pF[i];
365  pCof1[i] = pCof1[Step+i] = pF[Step+i];
366  }
367  pF += 2*Step;
368  pCof0 += 2*Step;
369  pCof1 += 2*Step;
370  }
371  return;
372  }
373 }
static word Truth6[6]
Definition: ifDec08.c:52
int nWords
Definition: abcNpn.c:127
#define assert(ex)
Definition: util_old.h:213
static int If_Dec08WordNum(int nVars)
FUNCTION DEFINITIONS ///.
Definition: ifDec08.c:80
static int If_Dec08CofCount ( word pF,
int  nVars 
)
inlinestatic

Definition at line 175 of file ifDec08.c.

176 {
177  int nShift = (1 << (nVars - 3));
178  word Mask = (((word)1) << nShift) - 1;
179  word iCofs[16], iCof;
180  int i, c, nCofs = 1;
181 // if ( nVars == 10 )
182 // Mask = ~(word)0;
183  iCofs[0] = pF[0] & Mask;
184  for ( i = 1; i < 8; i++ )
185  {
186  iCof = (pF[(i * nShift) / 64] >> ((i * nShift) & 63)) & Mask;
187  for ( c = 0; c < nCofs; c++ )
188  if ( iCof == iCofs[c] )
189  break;
190  if ( c == nCofs )
191  iCofs[nCofs++] = iCof;
192  }
193  return nCofs;
194 }
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static int If_Dec08CofCount2 ( word pF,
int  nVars 
)
inlinestatic

Definition at line 153 of file ifDec08.c.

154 {
155  int nShift = (1 << (nVars - 3));
156  word Mask = (((word)1) << nShift) - 1;
157  word iCof0 = pF[0] & Mask;
158  word iCof1 = iCof0, iCof;
159  int i;
160  assert( nVars >= 6 && nVars <= 8 );
161 // if ( nVars == 10 )
162 // Mask = ~(word)0;
163  for ( i = 1; i < 8; i++ )
164  {
165  iCof = (pF[(i * nShift) / 64] >> ((i * nShift) & 63)) & Mask;
166  if ( iCof == iCof0 )
167  continue;
168  if ( iCof1 == iCof0 )
169  iCof1 = iCof;
170  else if ( iCof != iCof1 )
171  return 3;
172  }
173  return 2;
174 }
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define assert(ex)
Definition: util_old.h:213
static void If_Dec08ComposeLut4 ( int  t,
word **  pF,
word pR,
int  nVars 
)
inlinestatic

Definition at line 103 of file ifDec08.c.

104 {
105  word pC[16];
106  int m, w, v, nWords;
107  assert( nVars <= 10 );
108  nWords = If_Dec08WordNum( nVars );
109  for ( w = 0; w < nWords; w++ )
110  pR[w] = 0;
111  for ( m = 0; m < 16; m++ )
112  {
113  if ( !((t >> m) & 1) )
114  continue;
115  for ( w = 0; w < nWords; w++ )
116  pC[w] = ~(word)0;
117  for ( v = 0; v < 4; v++ )
118  for ( w = 0; w < nWords; w++ )
119  pC[w] &= ((m >> v) & 1) ? pF[v][w] : ~pF[v][w];
120  for ( w = 0; w < nWords; w++ )
121  pR[w] |= pC[w];
122  }
123 }
int nWords
Definition: abcNpn.c:127
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define assert(ex)
Definition: util_old.h:213
static int If_Dec08WordNum(int nVars)
FUNCTION DEFINITIONS ///.
Definition: ifDec08.c:80
static void If_Dec08Copy ( word pOut,
word pIn,
int  nVars 
)
inlinestatic

Definition at line 198 of file ifDec08.c.

199 {
200  int w, nWords = If_Dec08WordNum( nVars );
201  for ( w = 0; w < nWords; w++ )
202  pOut[w] = pIn[w];
203 }
int nWords
Definition: abcNpn.c:127
static int If_Dec08WordNum(int nVars)
FUNCTION DEFINITIONS ///.
Definition: ifDec08.c:80
static int If_Dec08Count16 ( int  Num16)
inlinestatic

Definition at line 374 of file ifDec08.c.

375 {
376  assert( Num16 < (1<<16)-1 );
377  return BitCount8[Num16 & 255] + BitCount8[(Num16 >> 8) & 255];
378 }
static ABC_NAMESPACE_IMPL_START int BitCount8[256]
DECLARATIONS ///.
Definition: ifDec08.c:33
#define assert(ex)
Definition: util_old.h:213
static int If_Dec08HasVar ( word t,
int  nVars,
int  iVar 
)
inlinestatic

Definition at line 308 of file ifDec08.c.

309 {
310  int nWords = If_Dec08WordNum( nVars );
311  assert( iVar < nVars );
312  if ( iVar < 6 )
313  {
314  int i, Shift = (1 << iVar);
315  for ( i = 0; i < nWords; i++ )
316  if ( (t[i] & ~Truth6[iVar]) != ((t[i] & Truth6[iVar]) >> Shift) )
317  return 1;
318  return 0;
319  }
320  else
321  {
322  int i, k, Step = (1 << (iVar - 6));
323  for ( k = 0; k < nWords; k += 2*Step )
324  {
325  for ( i = 0; i < Step; i++ )
326  if ( t[i] != t[Step+i] )
327  return 1;
328  t += 2*Step;
329  }
330  return 0;
331  }
332 }
static word Truth6[6]
Definition: ifDec08.c:52
int nWords
Definition: abcNpn.c:127
#define assert(ex)
Definition: util_old.h:213
static int If_Dec08WordNum(int nVars)
FUNCTION DEFINITIONS ///.
Definition: ifDec08.c:80
static void If_Dec08MoveTo ( word pF,
int  nVars,
int  v,
int  p,
int  Pla2Var[],
int  Var2Pla[] 
)
inlinestatic

Definition at line 240 of file ifDec08.c.

241 {
242  word pG[16], * pIn = pF, * pOut = pG, * pTemp;
243  int iPlace0, iPlace1, Count = 0;
244  assert( Var2Pla[v] <= p );
245  while ( Var2Pla[v] != p )
246  {
247  iPlace0 = Var2Pla[v];
248  iPlace1 = Var2Pla[v]+1;
249  If_Dec08SwapAdjacent( pOut, pIn, iPlace0, nVars );
250  pTemp = pIn; pIn = pOut, pOut = pTemp;
251  Var2Pla[Pla2Var[iPlace0]]++;
252  Var2Pla[Pla2Var[iPlace1]]--;
253  Pla2Var[iPlace0] ^= Pla2Var[iPlace1];
254  Pla2Var[iPlace1] ^= Pla2Var[iPlace0];
255  Pla2Var[iPlace0] ^= Pla2Var[iPlace1];
256  Count++;
257  }
258  if ( Count & 1 )
259  If_Dec08Copy( pF, pIn, nVars );
260  assert( Pla2Var[p] == v );
261 }
static void If_Dec08Copy(word *pOut, word *pIn, int nVars)
Definition: ifDec08.c:198
static void If_Dec08SwapAdjacent(word *pOut, word *pIn, int iVar, int nVars)
Definition: ifDec08.c:204
static Llb_Mgr_t * p
Definition: llb3Image.c:950
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
#define assert(ex)
Definition: util_old.h:213
int If_Dec08Perform ( word pF,
int  nVars,
int  fDerive 
)

Definition at line 385 of file ifDec08.c.

386 {
387 // static int Cnt = 0;
388  word pCof0[16], pCof1[16];
389  int Pla2Var[10], Var2Pla[10], Count[210], Masks[210];
390  int i, i0,i1,i2, v, x;
391  assert( nVars >= 6 && nVars <= 8 );
392  // start arrays
393  for ( i = 0; i < nVars; i++ )
394  {
395  assert( If_Dec08HasVar( pF, nVars, i ) );
396  Pla2Var[i] = Var2Pla[i] = i;
397  }
398 /*
399  Cnt++;
400 //if ( Cnt == 108 )
401 {
402 printf( "%d\n", Cnt );
403 //Extra_PrintHex( stdout, (unsigned *)pF, nVars );
404 //printf( "\n" );
405 Kit_DsdPrintFromTruth( (unsigned *)pF, nVars );
406 printf( "\n" );
407 printf( "\n" );
408 }
409 */
410  // generate permutations
411  v = 0;
412  for ( i0 = 0; i0 < nVars; i0++ )
413  for ( i1 = i0+1; i1 < nVars; i1++ )
414  for ( i2 = i1+1; i2 < nVars; i2++, v++ )
415  {
416  If_Dec08MoveTo( pF, nVars, i0, nVars-1, Pla2Var, Var2Pla );
417  If_Dec08MoveTo( pF, nVars, i1, nVars-2, Pla2Var, Var2Pla );
418  If_Dec08MoveTo( pF, nVars, i2, nVars-3, Pla2Var, Var2Pla );
419  If_DecVerifyPerm( Pla2Var, Var2Pla, nVars );
420  Count[v] = If_Dec08CofCount( pF, nVars );
421  Masks[v] = (1 << i0) | (1 << i1) | (1 << i2);
422  assert( Count[v] > 1 );
423 //printf( "%d ", Count[v] );
424  if ( Count[v] == 2 || Count[v] > 5 )
425  continue;
426  for ( x = 0; x < 4; x++ )
427  {
428  If_Dec08Cofactors( pF, nVars, nVars-1-x, pCof0, pCof1 );
429  if ( If_Dec08CofCount2(pCof0, nVars) <= 2 && If_Dec08CofCount2(pCof1, nVars) <= 2 )
430  {
431  Count[v] = -Count[v];
432  break;
433  }
434  }
435  }
436 //printf( "\n" );
437  assert( v <= 210 );
438  // check if there are compatible bound sets
439  for ( i0 = 0; i0 < v; i0++ )
440  for ( i1 = i0+1; i1 < v; i1++ )
441  {
442  if ( If_Dec08Count16(Masks[i0] & Masks[i1]) > 8 - nVars )
443  continue;
444  if ( nVars == 8 )
445  {
446  if ( Count[i0] == 2 && Count[i1] == 2 )
447  return 1;
448  }
449  else if ( nVars == 7 )
450  {
451  if ( (Count[i0] == 2 && Count[i1] == 2) ||
452  (Count[i0] == 2 && Count[i1] < 0) ||
453  (Count[i0] < 0 && Count[i1] == 2) )
454  return 1;
455  }
456  else
457  {
458  if ( (Count[i0] == 2 && Count[i1] == 2) ||
459  (Count[i0] == 2 && Count[i1] < 0) ||
460  (Count[i0] < 0 && Count[i1] == 2) ||
461  (Count[i0] < 0 && Count[i1] < 0) )
462  return 1;
463  }
464  }
465 // printf( "not found\n" );
466  return 0;
467 }
static int If_Dec08CofCount2(word *pF, int nVars)
Definition: ifDec08.c:153
void If_Dec08Cofactors(word *pF, int nVars, int iVar, word *pCof0, word *pCof1)
Definition: ifDec08.c:343
static void If_Dec08MoveTo(word *pF, int nVars, int v, int p, int Pla2Var[], int Var2Pla[])
Definition: ifDec08.c:240
static int If_Dec08CofCount(word *pF, int nVars)
Definition: ifDec08.c:175
static void If_DecVerifyPerm(int Pla2Var[10], int Var2Pla[10], int nVars)
Definition: ifDec08.c:379
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static int If_Dec08HasVar(word *t, int nVars, int iVar)
Definition: ifDec08.c:308
#define assert(ex)
Definition: util_old.h:213
static int If_Dec08Count16(int Num16)
Definition: ifDec08.c:374
void If_Dec08PrintConfig ( unsigned *  pZ)

Definition at line 98 of file ifDec08.c.

99 {
100  while ( *pZ )
101  If_Dec08PrintConfigOne( *pZ++ );
102 }
static void If_Dec08PrintConfigOne(unsigned z)
Definition: ifDec08.c:84
static void If_Dec08PrintConfigOne ( unsigned  z)
static

Definition at line 84 of file ifDec08.c.

85 {
86  unsigned t;
87  t = (z & 0xffff) | ((z & 0xffff) << 16);
88  Extra_PrintBinary( stdout, &t, 16 );
89  printf( " " );
90  Kit_DsdPrintFromTruth( &t, 4 );
91  printf( " " );
92  printf( " %d", (z >> 16) & 7 );
93  printf( " %d", (z >> 20) & 7 );
94  printf( " %d", (z >> 24) & 7 );
95  printf( " %d", (z >> 28) & 7 );
96  printf( "\n" );
97 }
void Extra_PrintBinary(FILE *pFile, unsigned Sign[], int nBits)
void Kit_DsdPrintFromTruth(unsigned *pTruth, int nVars)
Definition: kitDsd.c:490
static int If_Dec08Support ( word t,
int  nVars 
)
inlinestatic

Definition at line 333 of file ifDec08.c.

334 {
335  int v, Supp = 0;
336  for ( v = 0; v < nVars; v++ )
337  if ( If_Dec08HasVar( t, nVars, v ) )
338  Supp |= (1 << v);
339  return Supp;
340 }
static int If_Dec08HasVar(word *t, int nVars, int iVar)
Definition: ifDec08.c:308
static void If_Dec08SwapAdjacent ( word pOut,
word pIn,
int  iVar,
int  nVars 
)
inlinestatic

Definition at line 204 of file ifDec08.c.

205 {
206  int i, k, nWords = If_Dec08WordNum( nVars );
207  assert( iVar < nVars - 1 );
208  if ( iVar < 5 )
209  {
210  int Shift = (1 << iVar);
211  for ( i = 0; i < nWords; i++ )
212  pOut[i] = (pIn[i] & PMasks[iVar][0]) | ((pIn[i] & PMasks[iVar][1]) << Shift) | ((pIn[i] & PMasks[iVar][2]) >> Shift);
213  }
214  else if ( iVar > 5 )
215  {
216  int Step = (1 << (iVar - 6));
217  for ( k = 0; k < nWords; k += 4*Step )
218  {
219  for ( i = 0; i < Step; i++ )
220  pOut[i] = pIn[i];
221  for ( i = 0; i < Step; i++ )
222  pOut[Step+i] = pIn[2*Step+i];
223  for ( i = 0; i < Step; i++ )
224  pOut[2*Step+i] = pIn[Step+i];
225  for ( i = 0; i < Step; i++ )
226  pOut[3*Step+i] = pIn[3*Step+i];
227  pIn += 4*Step;
228  pOut += 4*Step;
229  }
230  }
231  else // if ( iVar == 5 )
232  {
233  for ( i = 0; i < nWords; i += 2 )
234  {
235  pOut[i] = (pIn[i] & ABC_CONST(0x00000000FFFFFFFF)) | ((pIn[i+1] & ABC_CONST(0x00000000FFFFFFFF)) << 32);
236  pOut[i+1] = (pIn[i+1] & ABC_CONST(0xFFFFFFFF00000000)) | ((pIn[i] & ABC_CONST(0xFFFFFFFF00000000)) >> 32);
237  }
238  }
239 }
int nWords
Definition: abcNpn.c:127
#define ABC_CONST(number)
PARAMETERS ///.
Definition: abc_global.h:206
#define assert(ex)
Definition: util_old.h:213
static int If_Dec08WordNum(int nVars)
FUNCTION DEFINITIONS ///.
Definition: ifDec08.c:80
static word PMasks[5][3]
Definition: ifDec08.c:44
void If_Dec08Verify ( word pF,
int  nVars,
unsigned *  pZ 
)

Definition at line 124 of file ifDec08.c.

125 {
126  word pN[16][16], * pG[4];
127  int i, w, v, k, nWords;
128  unsigned z;
129  nWords = If_Dec08WordNum( nVars );
130  for ( k = 0; k < nVars; k++ )
131  for ( w = 0; w < nWords; w++ )
132  pN[k][w] = Truth10[k][w];
133  for ( i = 0; (z = pZ[i]); i++, k++ )
134  {
135  for ( v = 0; v < 4; v++ )
136  pG[v] = pN[ (z >> (16+(v<<2))) & 7 ];
137  If_Dec08ComposeLut4( (int)(z & 0xffff), pG, pN[k], nVars );
138  }
139  k--;
140  for ( w = 0; w < nWords; w++ )
141  if ( pN[k][w] != pF[w] )
142  {
143  If_Dec08PrintConfig( pZ );
144  Kit_DsdPrintFromTruth( (unsigned*)pF, nVars ); printf( "\n" );
145  Kit_DsdPrintFromTruth( (unsigned*)pN[k], nVars ); printf( "\n" );
146  printf( "Verification failed!\n" );
147  break;
148  }
149 }
void If_Dec08PrintConfig(unsigned *pZ)
Definition: ifDec08.c:98
int nWords
Definition: abcNpn.c:127
static word Truth10[10][16]
Definition: ifDec08.c:60
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
static void If_Dec08ComposeLut4(int t, word **pF, word *pR, int nVars)
Definition: ifDec08.c:103
void Kit_DsdPrintFromTruth(unsigned *pTruth, int nVars)
Definition: kitDsd.c:490
static int If_Dec08WordNum(int nVars)
FUNCTION DEFINITIONS ///.
Definition: ifDec08.c:80
static int If_Dec08WordNum ( int  nVars)
inlinestatic

FUNCTION DEFINITIONS ///.

Definition at line 80 of file ifDec08.c.

81 {
82  return nVars <= 6 ? 1 : 1 << (nVars-6);
83 }
static int If_DecSuppIsMinBase ( int  Supp)
inlinestatic

Definition at line 304 of file ifDec08.c.

305 {
306  return (Supp & (Supp+1)) == 0;
307 }
static void If_DecVerifyPerm ( int  Pla2Var[10],
int  Var2Pla[10],
int  nVars 
)
inlinestatic

Definition at line 379 of file ifDec08.c.

380 {
381  int i;
382  for ( i = 0; i < nVars; i++ )
383  assert( Pla2Var[Var2Pla[i]] == i );
384 }
#define assert(ex)
Definition: util_old.h:213
void Kit_DsdPrintFromTruth ( unsigned *  pTruth,
int  nVars 
)

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

Synopsis [Print the DSD formula.]

Description []

SideEffects []

SeeAlso []

Definition at line 490 of file kitDsd.c.

491 {
492  Kit_DsdNtk_t * pTemp, * pTemp2;
493 // pTemp = Kit_DsdDecomposeMux( pTruth, nVars, 5 );
494  pTemp = Kit_DsdDecomposeMux( pTruth, nVars, 8 );
495 // Kit_DsdPrintExpanded( pTemp );
496  pTemp2 = Kit_DsdExpand( pTemp );
497  Kit_DsdPrint( stdout, pTemp2 );
498  Kit_DsdVerify( pTemp2, pTruth, nVars );
499  Kit_DsdNtkFree( pTemp2 );
500  Kit_DsdNtkFree( pTemp );
501 }
Kit_DsdNtk_t * Kit_DsdExpand(Kit_DsdNtk_t *p)
Definition: kitDsd.c:1451
void Kit_DsdVerify(Kit_DsdNtk_t *pNtk, unsigned *pTruth, int nVars)
Definition: kitDsd.c:2492
void Kit_DsdPrint(FILE *pFile, Kit_DsdNtk_t *pNtk)
Definition: kitDsd.c:374
void Kit_DsdNtkFree(Kit_DsdNtk_t *pNtk)
Definition: kitDsd.c:163
Kit_DsdNtk_t * Kit_DsdDecomposeMux(unsigned *pTruth, int nVars, int nDecMux)
Definition: kitDsd.c:2350

Variable Documentation

ABC_NAMESPACE_IMPL_START int BitCount8[256]
static
Initial value:
= {
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,
3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8
}

DECLARATIONS ///.

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

FileName [ifDec08.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [FPGA mapping based on priority cuts.]

Synopsis [Performs additional check.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

Id:
ifDec08.c,v 1.00 2006/11/21 00:00:00 alanmi Exp

]

Definition at line 33 of file ifDec08.c.

word PMasks[5][3]
static
Initial value:
= {
{ ABC_CONST(0x9999999999999999), ABC_CONST(0x2222222222222222), ABC_CONST(0x4444444444444444) },
{ ABC_CONST(0xC3C3C3C3C3C3C3C3), ABC_CONST(0x0C0C0C0C0C0C0C0C), ABC_CONST(0x3030303030303030) },
{ ABC_CONST(0xF00FF00FF00FF00F), ABC_CONST(0x00F000F000F000F0), ABC_CONST(0x0F000F000F000F00) },
{ ABC_CONST(0xFF0000FFFF0000FF), ABC_CONST(0x0000FF000000FF00), ABC_CONST(0x00FF000000FF0000) },
{ ABC_CONST(0xFFFF00000000FFFF), ABC_CONST(0x00000000FFFF0000), ABC_CONST(0x0000FFFF00000000) }
}
#define ABC_CONST(number)
PARAMETERS ///.
Definition: abc_global.h:206

Definition at line 44 of file ifDec08.c.

word Truth10[10][16]
static
Initial value:
= {
{ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA),ABC_CONST(0xAAAAAAAAAAAAAAAA)},
{ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC),ABC_CONST(0xCCCCCCCCCCCCCCCC)},
{ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0),ABC_CONST(0xF0F0F0F0F0F0F0F0)},
{ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00),ABC_CONST(0xFF00FF00FF00FF00)},
{ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000),ABC_CONST(0xFFFF0000FFFF0000)},
{ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000),ABC_CONST(0xFFFFFFFF00000000)},
{ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF)},
{ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF)},
{ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF)},
{ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0x0000000000000000),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF),ABC_CONST(0xFFFFFFFFFFFFFFFF)}
}
#define ABC_CONST(number)
PARAMETERS ///.
Definition: abc_global.h:206

Definition at line 60 of file ifDec08.c.

word Truth6[6]
static
Initial value:
= {
ABC_CONST(0xAAAAAAAAAAAAAAAA),
ABC_CONST(0xCCCCCCCCCCCCCCCC),
ABC_CONST(0xF0F0F0F0F0F0F0F0),
ABC_CONST(0xFF00FF00FF00FF00),
ABC_CONST(0xFFFF0000FFFF0000),
}
#define ABC_CONST(number)
PARAMETERS ///.
Definition: abc_global.h:206

Definition at line 52 of file ifDec08.c.