blob: 7e7ab6157940e3b30334bc0deed348df28e1f9e5 (
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
105
106
107
108
109
110
111
112
113
114
|
/**CFile****************************************************************
FileName [mpmCore.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Configurable technology mapper.]
Synopsis [Core procedures.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 1, 2013.]
Revision [$Id: mpmCore.c,v 1.00 2013/06/01 00:00:00 alanmi Exp $]
***********************************************************************/
#include "aig/gia/gia.h"
#include "mpmInt.h"
ABC_NAMESPACE_IMPL_START
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Mpm_ManSetParsDefault( Mpm_Par_t * p )
{
memset( p, 0, sizeof(Mpm_Par_t) );
p->pLib = NULL; // LUT library
p->nNumCuts = 8; // cut number
p->fUseTruth = 0; // uses truth tables
p->fUseDsd = 0; // uses DSDs
p->fCutMin = 0; // enables cut minimization
p->fOneRound = 0; // enabled one round
p->DelayTarget = -1; // delay target
p->fDeriveLuts = 0; // use truth tables to derive AIG structure
p->fMap4Cnf = 0; // mapping for CNF
p->fMap4Aig = 0; // mapping for AIG
p->fVerbose = 0; // verbose output
p->fVeryVerbose = 0; // verbose output
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Gia_Man_t * Mpm_ManPerformTest( Mig_Man_t * pMig, Mpm_Par_t * pPars )
{
Gia_Man_t * pNew;
Mpm_Man_t * p;
p = Mpm_ManStart( pMig, pPars );
if ( p->pPars->fVerbose )
Mpm_ManPrintStatsInit( p );
Mpm_ManPrepare( p );
Mpm_ManPerform( p );
if ( p->pPars->fVerbose )
Mpm_ManPrintStats( p );
pNew = (Gia_Man_t *)Mpm_ManFromIfLogic( p );
Mpm_ManStop( p );
return pNew;
}
Gia_Man_t * Mpm_ManMappingTest( Gia_Man_t * pGia, Mpm_Par_t * pPars )
{
Mig_Man_t * p;
Gia_Man_t * pNew;
assert( pPars->pLib->LutMax <= MPM_VAR_MAX );
assert( pPars->nNumCuts <= MPM_CUT_MAX );
if ( pPars->fUseGates )
{
pGia = Gia_ManDupMuxes( pGia );
p = Mig_ManCreate( pGia );
Gia_ManStop( pGia );
}
else
p = Mig_ManCreate( pGia );
pNew = Mpm_ManPerformTest( p, pPars );
Mig_ManStop( p );
return pNew;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_IMPL_END
|