abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
amapMan.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [amapMan.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Technology mapper for standard cells.]
8 
9  Synopsis [Mapping manager.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: amapMan.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "amapInt.h"
22 
24 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 ////////////////////////////////////////////////////////////////////////
31 /// FUNCTION DEFINITIONS ///
32 ////////////////////////////////////////////////////////////////////////
33 
34 /**Function*************************************************************
35 
36  Synopsis [Starts the AIG manager.]
37 
38  Description []
39 
40  SideEffects []
41 
42  SeeAlso []
43 
44 ***********************************************************************/
45 Amap_Man_t * Amap_ManStart( int nNodes )
46 {
47  Amap_Man_t * p;
48  // start the manager
49  p = ABC_ALLOC( Amap_Man_t, 1 );
50  memset( p, 0, sizeof(Amap_Man_t) );
51  p->fEpsilonInternal = (float)0.01;
52  // allocate arrays for nodes
53  p->vPis = Vec_PtrAlloc( 100 );
54  p->vPos = Vec_PtrAlloc( 100 );
55  p->vObjs = Vec_PtrAlloc( 100 );
56  p->vTemp = Vec_IntAlloc( 100 );
57  p->vCuts0 = Vec_PtrAlloc( 100 );
58  p->vCuts1 = Vec_PtrAlloc( 100 );
59  p->vCuts2 = Vec_PtrAlloc( 100 );
60  // prepare the memory manager
61  p->pMemObj = Aig_MmFixedStart( sizeof(Amap_Obj_t), nNodes );
65  return p;
66 }
67 
68 /**Function*************************************************************
69 
70  Synopsis []
71 
72  Description []
73 
74  SideEffects []
75 
76  SeeAlso []
77 
78 ***********************************************************************/
80 {
81  Vec_PtrFree( p->vPis );
82  Vec_PtrFree( p->vPos );
83  Vec_PtrFree( p->vObjs );
84  Vec_PtrFree( p->vCuts0 );
85  Vec_PtrFree( p->vCuts1 );
86  Vec_PtrFree( p->vCuts2 );
87  Vec_IntFree( p->vTemp );
88  Aig_MmFixedStop( p->pMemObj, 0 );
89  Aig_MmFlexStop( p->pMemCuts, 0 );
90  Aig_MmFlexStop( p->pMemCutBest, 0 );
91  Aig_MmFlexStop( p->pMemTemp, 0 );
92  ABC_FREE( p->pMatsTemp );
93  ABC_FREE( p->ppCutsTemp );
94  ABC_FREE( p->pCutsPi );
95  ABC_FREE( p );
96 }
97 
98 ////////////////////////////////////////////////////////////////////////
99 /// END OF FILE ///
100 ////////////////////////////////////////////////////////////////////////
101 
102 
104 
char * memset()
Vec_Int_t * vTemp
Definition: amapInt.h:99
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Aig_MmFlex_t * pMemCuts
Definition: amapInt.h:90
Vec_Ptr_t * vCuts0
Definition: amapInt.h:103
void Aig_MmFixedStop(Aig_MmFixed_t *p, int fVerbose)
Definition: aigMem.c:132
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
Aig_MmFixed_t * Aig_MmFixedStart(int nEntrySize, int nEntriesMax)
FUNCTION DEFINITIONS ///.
Definition: aigMem.c:96
Aig_MmFlex_t * pMemCutBest
Definition: amapInt.h:91
Amap_Cut_t ** ppCutsTemp
Definition: amapInt.h:101
Vec_Ptr_t * vObjs
Definition: amapInt.h:88
ABC_NAMESPACE_IMPL_START Amap_Man_t * Amap_ManStart(int nNodes)
DECLARATIONS ///.
Definition: amapMan.c:45
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
Vec_Ptr_t * vPis
Definition: amapInt.h:86
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
Aig_MmFixed_t * pMemObj
Definition: amapInt.h:89
Vec_Ptr_t * vCuts2
Definition: amapInt.h:105
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
Aig_MmFlex_t * Aig_MmFlexStart()
Definition: aigMem.c:305
#define ABC_FREE(obj)
Definition: abc_global.h:232
void Aig_MmFlexStop(Aig_MmFlex_t *p, int fVerbose)
Definition: aigMem.c:337
void Amap_ManStop(Amap_Man_t *p)
Definition: amapMan.c:79
int * pMatsTemp
Definition: amapInt.h:100
Aig_MmFlex_t * pMemTemp
Definition: amapInt.h:92
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
Vec_Ptr_t * vCuts1
Definition: amapInt.h:104
Amap_Cut_t * pCutsPi
Definition: amapInt.h:102
Vec_Ptr_t * vPos
Definition: amapInt.h:87
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
float fEpsilonInternal
Definition: amapInt.h:81