abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mvcPrint.c File Reference
#include "mvc.h"

Go to the source code of this file.

Functions

static
ABC_NAMESPACE_IMPL_START void 
Mvc_CubePrintBinary (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 DECLARATIONS ///. More...
 
void Mvc_CoverPrint (Mvc_Cover_t *pCover)
 FUNCTION DEFINITIONS ///. More...
 
void Mvc_CubePrint (Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
 
void Mvc_CoverPrintBinary (Mvc_Cover_t *pCover)
 

Function Documentation

void Mvc_CoverPrint ( Mvc_Cover_t pCover)

FUNCTION DEFINITIONS ///.

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 47 of file mvcPrint.c.

48 {
49  Mvc_Cube_t * pCube;
50  int i;
51  // print general statistics
52  printf( "The cover contains %d cubes (%d bits and %d words)\n",
53  pCover->lCubes.nItems, pCover->nBits, pCover->nWords );
54  // iterate through the cubes
55  Mvc_CoverForEachCube( pCover, pCube )
56  Mvc_CubePrint( pCover, pCube );
57 
58  if ( pCover->pLits )
59  {
60  for ( i = 0; i < pCover->nBits; i++ )
61  printf( " %d", pCover->pLits[i] );
62  printf( "\n" );
63  }
64  printf( "End of cover printout\n" );
65 }
void Mvc_CubePrint(Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
Definition: mvcPrint.c:79
int nWords
Definition: mvc.h:85
int nItems
Definition: mvc.h:79
Mvc_List_t lCubes
Definition: mvc.h:88
if(last==0)
Definition: sparse_int.h:34
#define Mvc_CoverForEachCube(Cover, Cube)
Definition: mvc.h:528
int nBits
Definition: mvc.h:87
void Mvc_CoverPrintBinary ( Mvc_Cover_t pCover)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 101 of file mvcPrint.c.

102 {
103  Mvc_Cube_t * pCube;
104  int i;
105  // print general statistics
106  printf( "The cover contains %d cubes (%d bits and %d words)\n",
107  pCover->lCubes.nItems, pCover->nBits, pCover->nWords );
108  // iterate through the cubes
109  Mvc_CoverForEachCube( pCover, pCube )
110  Mvc_CubePrintBinary( pCover, pCube );
111 
112  if ( pCover->pLits )
113  {
114  for ( i = 0; i < pCover->nBits; i++ )
115  printf( " %d", pCover->pLits[i] );
116  printf( "\n" );
117  }
118  printf( "End of cover printout\n" );
119 }
int nWords
Definition: mvc.h:85
static ABC_NAMESPACE_IMPL_START void Mvc_CubePrintBinary(Mvc_Cover_t *pCover, Mvc_Cube_t *pCube)
DECLARATIONS ///.
Definition: mvcPrint.c:133
int nItems
Definition: mvc.h:79
Mvc_List_t lCubes
Definition: mvc.h:88
if(last==0)
Definition: sparse_int.h:34
#define Mvc_CoverForEachCube(Cover, Cube)
Definition: mvc.h:528
int nBits
Definition: mvc.h:87
void Mvc_CubePrint ( Mvc_Cover_t pCover,
Mvc_Cube_t pCube 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 79 of file mvcPrint.c.

80 {
81  int iBit, Value;
82  // iterate through the literals
83 // printf( "Size = %2d ", Mvc_CubeReadSize(pCube) );
84  Mvc_CubeForEachBit( pCover, pCube, iBit, Value )
85  printf( "%c", '0' + Value );
86  printf( "\n" );
87 }
#define Mvc_CubeForEachBit(Cover, Cube, iBit, Value)
Definition: mvc.h:553
void Mvc_CubePrintBinary ( Mvc_Cover_t pCover,
Mvc_Cube_t pCube 
)
static

DECLARATIONS ///.

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

FileName [mvcPrint.c]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [Printing cubes and covers.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id:
mvcPrint.c,v 1.6 2003/04/09 18:02:06 alanmi Exp

]

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 133 of file mvcPrint.c.

134 {
135  int iVar, Value;
136  // iterate through the literals
137 // printf( "Size = %2d ", Mvc_CubeReadSize(pCube) );
138  Mvc_CubeForEachVarValue( pCover, pCube, iVar, Value )
139  {
140  assert( Value != 0 );
141  if ( Value == 3 )
142  printf( "-" );
143  else if ( Value == 1 )
144  printf( "0" );
145  else
146  printf( "1" );
147  }
148  printf( "\n" );
149 }
#define Mvc_CubeForEachVarValue(Cover, Cube, iVar, Value)
Definition: mvc.h:558
#define assert(ex)
Definition: util_old.h:213