ABC: A System for Sequential Synthesis and Verification
Loading...
Searching...
No Matches
amapCore.c
Go to the documentation of this file.
1
20
21
#include "
amapInt.h
"
22
#include "
base/main/main.h
"
23
24
ABC_NAMESPACE_IMPL_START
25
26
30
34
46
void
Amap_ManSetDefaultParams
(
Amap_Par_t
*
p
)
47
{
48
memset
(
p
, 0,
sizeof
(
Amap_Par_t
) );
49
p
->nIterFlow = 1;
// iterations of area flow
50
p
->nIterArea = 4;
// iteratoins of exact area
51
p
->nCutsMax = 500;
// the maximum number of cuts at a node
52
p
->fUseMuxes = 0;
// enables the use of MUXes
53
p
->fUseXors = 1;
// enables the use of XORs
54
p
->fFreeInvs = 0;
// assume inverters are free (area = 0)
55
p
->fEpsilon = (float)0.001;
// used to compare floating point numbers
56
p
->fVerbose = 0;
// verbosity flag
57
}
58
70
Vec_Ptr_t
*
Amap_ManTest
(
Aig_Man_t
* pAig,
Amap_Par_t
* pPars )
71
{
72
// extern void * Abc_FrameReadLibGen2();
73
Vec_Ptr_t
* vRes;
74
Amap_Man_t
*
p
;
75
Amap_Lib_t
* pLib;
76
abctime
clkTotal = Abc_Clock();
77
pLib = (
Amap_Lib_t
*)
Abc_FrameReadLibGen2
();
78
if
( pLib == NULL )
79
{
80
printf(
"Library is not available.\n"
);
81
return
NULL;
82
}
83
p
=
Amap_ManStart
( Aig_ManNodeNum(pAig) );
84
p
->pPars = pPars;
85
p
->pLib = pLib;
86
p
->fAreaInv = pPars->
fFreeInvs
? 0.0 : pLib->pGateInv->dArea;
87
p
->fUseMux = pPars->
fUseMuxes
&& pLib->fHasMux;
88
p
->fUseXor = pPars->
fUseXors
&& pLib->fHasXor;
89
p
->ppCutsTemp =
ABC_CALLOC
(
Amap_Cut_t
*, 2 * pLib->nNodes );
90
p
->pMatsTemp =
ABC_CALLOC
(
int
, 2 * pLib->nNodes );
91
Amap_ManCreate
(
p
, pAig );
92
Amap_ManMap
(
p
);
93
vRes = NULL;
94
vRes =
Amap_ManProduceMapped
(
p
);
95
Amap_ManStop
(
p
);
96
if
( pPars->
fVerbose
)
97
{
98
ABC_PRT
(
"Total runtime"
, Abc_Clock() - clkTotal );
99
}
100
return
vRes;
101
}
102
103
107
108
109
ABC_NAMESPACE_IMPL_END
110
abctime
ABC_INT64_T abctime
Definition
abc_global.h:332
ABC_PRT
#define ABC_PRT(a, t)
Definition
abc_global.h:255
ABC_CALLOC
#define ABC_CALLOC(type, num)
Definition
abc_global.h:265
ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_START
Definition
abc_namespaces.h:54
ABC_NAMESPACE_IMPL_END
#define ABC_NAMESPACE_IMPL_END
Definition
abc_namespaces.h:55
Aig_Man_t
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition
aig.h:50
Amap_ManSetDefaultParams
ABC_NAMESPACE_IMPL_START void Amap_ManSetDefaultParams(Amap_Par_t *p)
DECLARATIONS ///.
Definition
amapCore.c:46
Amap_ManTest
Vec_Ptr_t * Amap_ManTest(Aig_Man_t *pAig, Amap_Par_t *pPars)
Definition
amapCore.c:70
Amap_ManCreate
void Amap_ManCreate(Amap_Man_t *p, Aig_Man_t *pAig)
Definition
amapGraph.c:323
amapInt.h
Amap_Man_t
struct Amap_Man_t_ Amap_Man_t
Definition
amapInt.h:70
Amap_ManStop
void Amap_ManStop(Amap_Man_t *p)
Definition
amapMan.c:80
Amap_ManStart
Amap_Man_t * Amap_ManStart(int nNodes)
DECLARATIONS ///.
Definition
amapMan.c:45
Amap_ManProduceMapped
Vec_Ptr_t * Amap_ManProduceMapped(Amap_Man_t *p)
Definition
amapOutput.c:71
Amap_Cut_t
struct Amap_Cut_t_ Amap_Cut_t
Definition
amapInt.h:72
Amap_ManMap
void Amap_ManMap(Amap_Man_t *p)
Definition
amapMatch.c:657
Amap_Par_t
struct Amap_Par_t_ Amap_Par_t
Definition
amap.h:44
Amap_Lib_t
typedefABC_NAMESPACE_HEADER_START struct Amap_Lib_t_ Amap_Lib_t
INCLUDES ///.
Definition
amap.h:42
main.h
Abc_FrameReadLibGen2
ABC_DLL void * Abc_FrameReadLibGen2()
Definition
mainFrame.c:60
p
Cube * p
Definition
exorList.c:222
Amap_Par_t_::fUseXors
int fUseXors
Definition
amap.h:51
Amap_Par_t_::fUseMuxes
int fUseMuxes
Definition
amap.h:50
Amap_Par_t_::fVerbose
int fVerbose
Definition
amap.h:55
Amap_Par_t_::fFreeInvs
int fFreeInvs
Definition
amap.h:52
memset
char * memset()
Vec_Ptr_t
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition
vecPtr.h:42
src
map
amap
amapCore.c
Generated by Doxygen 1.13.2 © 2025 EPTansuo. All rights reserved.
鲁ICP备2021046540号