summaryrefslogtreecommitdiffstats
path: root/src/map/mpm/mpmCore.c
blob: 605e716ce67bd8f8037e7aaea489bb2aafa7e84f (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
/**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->DelayTarget    =      -1;  // delay target
    p->fVerbose       =       0;  // verbose output
}

/**Function*************************************************************

  Synopsis    []

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Gia_Man_t * Mpm_ManPerformTest( Mig_Man_t * pMig )
{
    Gia_Man_t * pNew;
    Mpm_LibLut_t * pLib;
    Mpm_Man_t * p;
    pLib = Mpm_LibLutSetSimple( 6 );
    p = Mpm_ManStart( pMig, pLib, 8 );
    Mpm_ManPrintStatsInit( p );
    Mpm_ManPrepare( p );
    Mpm_ManPerform( p );
    Mpm_ManPrintStats( p );
    pNew = (Gia_Man_t *)Mpm_ManFromIfLogic( p );
    Mpm_ManStop( p );
    Mpm_LibLutFree( pLib );
    return pNew;
}
Gia_Man_t * Mpm_ManMappingTest( Gia_Man_t * pGia, Mpm_Par_t * pPars )
{
    Mig_Man_t * p;
    Gia_Man_t * pNew;
    p = Mig_ManCreate( pGia );
    pNew = Mpm_ManPerformTest( p );
    Mig_ManStop( p );
    return pNew;
}

////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////


ABC_NAMESPACE_IMPL_END