ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
lpkMan.c File Reference
#include "lpkInt.h"
Include dependency graph for lpkMan.c:

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START Lpk_Man_tLpk_ManStart (Lpk_Par_t *pPars)
 DECLARATIONS ///.
 
void Lpk_ManStop (Lpk_Man_t *p)
 

Function Documentation

◆ Lpk_ManStart()

ABC_NAMESPACE_IMPL_START Lpk_Man_t * Lpk_ManStart ( Lpk_Par_t * pPars)

DECLARATIONS ///.

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

FileName [lpkMan.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Fast Boolean matching for LUT structures.]

Synopsis []

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - April 28, 2007.]

Revision [

Id
lpkMan.c,v 1.00 2007/04/28 00:00:00 alanmi Exp

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file lpkMan.c.

46{
47 Lpk_Man_t * p;
48 int i, nWords;
49 assert( pPars->nLutsMax <= 16 );
50 assert( pPars->nVarsMax > 0 && pPars->nVarsMax <= 16 );
51 p = ABC_ALLOC( Lpk_Man_t, 1 );
52 memset( p, 0, sizeof(Lpk_Man_t) );
53 p->pPars = pPars;
54 p->nCutsMax = LPK_CUTS_MAX;
55 p->vTtElems = Vec_PtrAllocTruthTables( pPars->nVarsMax );
56 p->vTtNodes = Vec_PtrAllocSimInfo( 1024, Abc_TruthWordNum(pPars->nVarsMax) );
57 p->vCover = Vec_IntAlloc( 1 << 12 );
58 p->vLeaves = Vec_PtrAlloc( 32 );
59 p->vTemp = Vec_PtrAlloc( 32 );
60 for ( i = 0; i < 8; i++ )
61 p->vSets[i] = Vec_IntAlloc(100);
62 p->pDsdMan = Kit_DsdManAlloc( pPars->nVarsMax, 64 );
63 p->vMemory = Vec_IntAlloc( 1024 * 32 );
64 p->vBddDir = Vec_IntAlloc( 256 );
65 p->vBddInv = Vec_IntAlloc( 256 );
66 // allocate temporary storage for truth tables
67 nWords = Kit_TruthWordNum(pPars->nVarsMax);
68 p->ppTruths[0][0] = ABC_ALLOC( unsigned, 32 * nWords );
69 p->ppTruths[1][0] = p->ppTruths[0][0] + 1 * nWords;
70 for ( i = 1; i < 2; i++ )
71 p->ppTruths[1][i] = p->ppTruths[1][0] + i * nWords;
72 p->ppTruths[2][0] = p->ppTruths[1][0] + 2 * nWords;
73 for ( i = 1; i < 4; i++ )
74 p->ppTruths[2][i] = p->ppTruths[2][0] + i * nWords;
75 p->ppTruths[3][0] = p->ppTruths[2][0] + 4 * nWords;
76 for ( i = 1; i < 8; i++ )
77 p->ppTruths[3][i] = p->ppTruths[3][0] + i * nWords;
78 p->ppTruths[4][0] = p->ppTruths[3][0] + 8 * nWords;
79 for ( i = 1; i < 16; i++ )
80 p->ppTruths[4][i] = p->ppTruths[4][0] + i * nWords;
81 return p;
82}
int nWords
Definition abcNpn.c:127
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
Cube * p
Definition exorList.c:222
Kit_DsdMan_t * Kit_DsdManAlloc(int nVars, int nNodes)
DECLARATIONS ///.
Definition kitDsd.c:46
#define LPK_CUTS_MAX
Definition lpkInt.h:48
struct Lpk_Man_t_ Lpk_Man_t
Definition lpkInt.h:50
#define assert(ex)
Definition util_old.h:213
char * memset()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Lpk_ManStop()

void Lpk_ManStop ( Lpk_Man_t * p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 95 of file lpkMan.c.

96{
97 int i;
98 ABC_FREE( p->ppTruths[0][0] );
99 Vec_IntFree( p->vBddDir );
100 Vec_IntFree( p->vBddInv );
101 Vec_IntFree( p->vMemory );
102 Kit_DsdManFree( p->pDsdMan );
103 for ( i = 0; i < 8; i++ )
104 Vec_IntFree(p->vSets[i]);
105 if ( p->pIfMan )
106 {
107 void * pPars = p->pIfMan->pPars;
108 If_ManStop( p->pIfMan );
109 ABC_FREE( pPars );
110 }
111 if ( p->vLevels )
112 Vec_VecFree( p->vLevels );
113 if ( p->vVisited )
114 Vec_VecFree( p->vVisited );
115 Vec_PtrFree( p->vLeaves );
116 Vec_PtrFree( p->vTemp );
117 Vec_IntFree( p->vCover );
118 Vec_PtrFree( p->vTtElems );
119 Vec_PtrFree( p->vTtNodes );
120 ABC_FREE( p );
121}
#define ABC_FREE(obj)
Definition abc_global.h:267
void If_ManStop(If_Man_t *p)
Definition ifMan.c:212
void Kit_DsdManFree(Kit_DsdMan_t *p)
Definition kitDsd.c:72
Here is the call graph for this function:
Here is the caller graph for this function: