Go to the source code of this file.
◆ Extra_TruthCanonFastN()
| int Extra_TruthCanonFastN |
( |
int | nVarsMax, |
|
|
int | nVarsReal, |
|
|
unsigned * | pt, |
|
|
unsigned ** | pptRes, |
|
|
char ** | ppfRes ) |
AutomaticEnd Function********************************************************************
Synopsis [Computes the N-canonical form of the Boolean function up to 6 inputs.]
Description [The N-canonical form is defined as the truth table with the minimum integer value. This function exhaustively enumerates through the complete set of 2^N phase assignments. Returns pointers to the static storage to the truth table and phases. This data should be used before the function is called again.]
SideEffects []
SeeAlso []
Definition at line 374 of file extraUtilCanon.c.
375{
376 static unsigned uTruthStore6[2];
377 int RetValue;
379 assert( nVarsReal <= nVarsMax );
380 RetValue = Extra_TruthCanonN_rec( nVarsReal <= 3? 3: nVarsReal, (unsigned char *)pt, pptRes, ppfRes, 0 );
381 if ( nVarsMax == 6 && nVarsReal < nVarsMax )
382 {
383 uTruthStore6[0] = **pptRes;
384 uTruthStore6[1] = **pptRes;
385 *pptRes = uTruthStore6;
386 }
387 return RetValue;
388}
◆ Map_Var3Print()
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 585 of file extraUtilCanon.c.
586{
587 extern void Extra_Truth3VarN(
unsigned ** puCanons,
char *** puPhases,
char ** ppCounters );
588
589 unsigned * uCanons;
590 char ** uPhases;
591 char * pCounters;
592 int i, k;
593
595
596 for ( i = 0; i < 256; i++ )
597 {
598 if ( i % 8 == 0 )
599 printf( "\n" );
601 printf( ", " );
602 }
603 printf( "\n" );
604
605 for ( i = 0; i < 256; i++ )
606 {
607 printf( "%3d */ { %2d, ", i, pCounters[i] );
608 for ( k = 0; k < pCounters[i]; k++ )
609 printf( "%s%d", k? ", ":"", uPhases[i][k] );
610 printf( " }\n" );
611 }
612 printf( "\n" );
613}
void Extra_PrintHex(FILE *pFile, unsigned *pTruth, int nVars)
◆ Map_Var3Test()
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 626 of file extraUtilCanon.c.
627{
628 extern void Extra_Truth3VarN(
unsigned ** puCanons,
char *** puPhases,
char ** ppCounters );
629
630 unsigned * uCanons;
631 char ** uPhases;
632 char * pCounters;
633 int i;
634 unsigned * ptRes;
635 char * pfRes;
636 unsigned uTruth;
637 int Count;
638
640
641 for ( i = 0; i < 256; i++ )
642 {
643 uTruth = i;
645 }
646}
◆ Map_Var4Test()
Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
Definition at line 659 of file extraUtilCanon.c.
660{
661 extern void Extra_Truth4VarN(
unsigned short ** puCanons,
char *** puPhases,
char ** ppCounters,
int PhaseMax );
662
663 unsigned short * uCanons;
664 char ** uPhases;
665 char * pCounters;
666 int i;
667 unsigned * ptRes;
668 char * pfRes;
669 unsigned uTruth;
670 int Count;
671
673
674 for ( i = 0; i < 256*256; i++ )
675 {
676 uTruth = i;
678 }
679}