blob: 6304c078198cb7fc517a87f6190ceb7a1953ca3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
/**CFile****************************************************************
FileName [amapMan.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Technology mapper for standard cells.]
Synopsis [Mapping manager.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [$Id: amapMan.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
***********************************************************************/
#include "amapInt.h"
ABC_NAMESPACE_IMPL_START
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis [Starts the AIG manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Amap_Man_t * Amap_ManStart( int nNodes )
{
Amap_Man_t * p;
// start the manager
p = ABC_ALLOC( Amap_Man_t, 1 );
memset( p, 0, sizeof(Amap_Man_t) );
p->fEpsilonInternal = (float)0.01;
// allocate arrays for nodes
p->vPis = Vec_PtrAlloc( 100 );
p->vPos = Vec_PtrAlloc( 100 );
p->vObjs = Vec_PtrAlloc( 100 );
p->vTemp = Vec_IntAlloc( 100 );
p->vCuts0 = Vec_PtrAlloc( 100 );
p->vCuts1 = Vec_PtrAlloc( 100 );
p->vCuts2 = Vec_PtrAlloc( 100 );
// prepare the memory manager
p->pMemObj = Aig_MmFixedStart( sizeof(Amap_Obj_t), nNodes );
p->pMemCuts = Aig_MmFlexStart();
p->pMemCutBest = Aig_MmFlexStart();
p->pMemTemp = Aig_MmFlexStart();
return p;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Amap_ManStop( Amap_Man_t * p )
{
Vec_PtrFree( p->vPis );
Vec_PtrFree( p->vPos );
Vec_PtrFree( p->vObjs );
Vec_PtrFree( p->vCuts0 );
Vec_PtrFree( p->vCuts1 );
Vec_PtrFree( p->vCuts2 );
Vec_IntFree( p->vTemp );
Aig_MmFixedStop( p->pMemObj, 0 );
Aig_MmFlexStop( p->pMemCuts, 0 );
Aig_MmFlexStop( p->pMemCutBest, 0 );
Aig_MmFlexStop( p->pMemTemp, 0 );
ABC_FREE( p->pMatsTemp );
ABC_FREE( p->ppCutsTemp );
ABC_FREE( p->pCutsPi );
ABC_FREE( p );
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_IMPL_END
|