ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
covMinMan.c
Go to the documentation of this file.
1
20
21#include "covInt.h"
22
24
25
29
33
45Min_Man_t * Min_ManAlloc( int nVars )
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}
71
83void Min_ManClean( Min_Man_t * p, int nSupp )
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}
92
105{
106 Extra_MmFixedStop( p->pMemMan );
107 ABC_FREE( p->ppStore );
108 ABC_FREE( p );
109}
110
111
115
116
118
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
#define ABC_FREE(obj)
Definition abc_global.h:267
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
struct Min_Cube_t_ Min_Cube_t
Definition covInt.h:35
ABC_NAMESPACE_IMPL_START Min_Man_t * Min_ManAlloc(int nVars)
DECLARATIONS ///.
Definition covMinMan.c:45
void Min_ManFree(Min_Man_t *p)
Definition covMinMan.c:104
void Min_ManClean(Min_Man_t *p, int nSupp)
Definition covMinMan.c:83
Cube * p
Definition exorList.c:222
void Extra_MmFixedStop(Extra_MmFixed_t *p)
Extra_MmFixed_t * Extra_MmFixedStart(int nEntrySize)
typedefABC_NAMESPACE_IMPL_START struct Min_Man_t_ Min_Man_t
DECLARATIONS ///.
Definition giaPat2.c:34
char * memset()