abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
rsbMan.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [rsbMan.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Truth-table based resubstitution.]
8 
9  Synopsis [Manager maintenance.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: rsbMan.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "rsbInt.h"
22 
24 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 ////////////////////////////////////////////////////////////////////////
31 /// FUNCTION DEFINITIONS ///
32 ////////////////////////////////////////////////////////////////////////
33 
34 /**Function*************************************************************
35 
36  Synopsis []
37 
38  Description []
39 
40  SideEffects []
41 
42  SeeAlso []
43 
44 ***********************************************************************/
45 Rsb_Man_t * Rsb_ManAlloc( int nLeafMax, int nDivMax, int nDecMax, int fVerbose )
46 {
47  Rsb_Man_t * p;
48  assert( nLeafMax <= 20 );
49  assert( nDivMax <= 200 );
50  p = ABC_CALLOC( Rsb_Man_t, 1 );
51  p->nLeafMax = nLeafMax;
52  p->nDivMax = nDivMax;
53  p->nDecMax = nDecMax;
54  p->fVerbose = fVerbose;
55  // decomposition
56  p->vCexes = Vec_WrdAlloc( nDivMax + 150 );
57  p->vDecPats = Vec_IntAlloc( Abc_TtWordNum(nLeafMax) );
58  p->vFanins = Vec_IntAlloc( 10 );
59  p->vFaninsOld = Vec_IntAlloc( 10 );
60  p->vTries = Vec_IntAlloc( 10 );
61  return p;
62 }
64 {
65  Vec_WrdFree( p->vCexes );
66  Vec_IntFree( p->vDecPats );
67  Vec_IntFree( p->vFanins );
68  Vec_IntFree( p->vFaninsOld );
69  Vec_IntFree( p->vTries );
70  ABC_FREE( p );
71 }
72 
73 /**Function*************************************************************
74 
75  Synopsis []
76 
77  Description []
78 
79  SideEffects []
80 
81  SeeAlso []
82 
83 ***********************************************************************/
85 {
86  return p->vFanins;
87 }
89 {
90  return p->vFaninsOld;
91 }
92 
93 ////////////////////////////////////////////////////////////////////////
94 /// END OF FILE ///
95 ////////////////////////////////////////////////////////////////////////
96 
97 
99 
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
ABC_NAMESPACE_IMPL_START Rsb_Man_t * Rsb_ManAlloc(int nLeafMax, int nDivMax, int nDecMax, int fVerbose)
DECLARATIONS ///.
Definition: rsbMan.c:45
typedefABC_NAMESPACE_HEADER_START struct Rsb_Man_t_ Rsb_Man_t
INCLUDES ///.
Definition: rsb.h:39
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
void Rsb_ManFree(Rsb_Man_t *p)
Definition: rsbMan.c:63
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
static void Vec_WrdFree(Vec_Wrd_t *p)
Definition: vecWrd.h:260
static Vec_Wrd_t * Vec_WrdAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecWrd.h:80
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
static int Abc_TtWordNum(int nVars)
Definition: utilTruth.h:169
#define ABC_FREE(obj)
Definition: abc_global.h:232
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
#define assert(ex)
Definition: util_old.h:213
Vec_Int_t * Rsb_ManGetFaninsOld(Rsb_Man_t *p)
Definition: rsbMan.c:88
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
Vec_Int_t * Rsb_ManGetFanins(Rsb_Man_t *p)
Definition: rsbMan.c:84