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

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START
Min_Man_t
Min_ManAlloc (int nVars)
 DECLARATIONS ///. More...
 
void Min_ManClean (Min_Man_t *p, int nSupp)
 
void Min_ManFree (Min_Man_t *p)
 

Function Documentation

ABC_NAMESPACE_IMPL_START Min_Man_t* Min_ManAlloc ( int  nVars)

DECLARATIONS ///.

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

FileName [covMinMan.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Mapping into network of SOPs/ESOPs.]

Synopsis [SOP manipulation.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id:
covMinMan.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [Starts the minimization manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file covMinMan.c.

46 {
47  Min_Man_t * pMan;
48  // start the manager
49  pMan = ABC_ALLOC( Min_Man_t, 1 );
50  memset( pMan, 0, sizeof(Min_Man_t) );
51  pMan->nVars = nVars;
52  pMan->nWords = Abc_BitWordNum( nVars * 2 );
53  pMan->pMemMan = Extra_MmFixedStart( sizeof(Min_Cube_t) + sizeof(unsigned) * (pMan->nWords - 1) );
54  // allocate storage for the temporary cover
55  pMan->ppStore = ABC_ALLOC( Min_Cube_t *, pMan->nVars + 1 );
56  // create tautology cubes
57  Min_ManClean( pMan, nVars );
58  pMan->pOne0 = Min_CubeAlloc( pMan );
59  pMan->pOne1 = Min_CubeAlloc( pMan );
60  pMan->pTemp = Min_CubeAlloc( pMan );
61  pMan->pBubble = Min_CubeAlloc( pMan ); pMan->pBubble->uData[0] = 0;
62  // create trivial cubes
63  Min_ManClean( pMan, 1 );
64  pMan->pTriv0[0] = Min_CubeAllocVar( pMan, 0, 0 );
65  pMan->pTriv0[1] = Min_CubeAllocVar( pMan, 0, 1 );
66  pMan->pTriv1[0] = Min_CubeAllocVar( pMan, 0, 0 );
67  pMan->pTriv1[1] = Min_CubeAllocVar( pMan, 0, 1 );
68  Min_ManClean( pMan, nVars );
69  return pMan;
70 }
char * memset()
unsigned nVars
Definition: covInt.h:57
void Min_ManClean(Min_Man_t *p, int nSupp)
Definition: covMinMan.c:83
static Min_Cube_t * Min_CubeAllocVar(Min_Man_t *p, int iVar, int fCompl)
Definition: covInt.h:149
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
Extra_MmFixed_t * Extra_MmFixedStart(int nEntrySize)
static Min_Cube_t * Min_CubeAlloc(Min_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition: covInt.h:126
static int Abc_BitWordNum(int nBits)
Definition: abc_global.h:255
typedefABC_NAMESPACE_HEADER_START struct Min_Man_t_ Min_Man_t
DECLARATIONS ///.
Definition: covInt.h:34
void Min_ManClean ( Min_Man_t p,
int  nSupp 
)

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

Synopsis [Cleans the minimization manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 83 of file covMinMan.c.

84 {
85  // set the size of the cube manager
86  p->nVars = nSupp;
87  p->nWords = Abc_BitWordNum(2*nSupp);
88  // clean the storage
89  memset( p->ppStore, 0, sizeof(Min_Cube_t *) * (nSupp + 1) );
90  p->nCubes = 0;
91 }
char * memset()
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Abc_BitWordNum(int nBits)
Definition: abc_global.h:255
int nVars
Definition: llb3Image.c:58
void Min_ManFree ( Min_Man_t p)

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

Synopsis [Stops the minimization manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 104 of file covMinMan.c.

105 {
106  Extra_MmFixedStop( p->pMemMan );
107  ABC_FREE( p->ppStore );
108  ABC_FREE( p );
109 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Extra_MmFixedStop(Extra_MmFixed_t *p)
#define ABC_FREE(obj)
Definition: abc_global.h:232