abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
amapCore.c File Reference
#include "amapInt.h"
#include "base/main/main.h"

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START void Amap_ManSetDefaultParams (Amap_Par_t *p)
 DECLARATIONS ///. More...
 
Vec_Ptr_tAmap_ManTest (Aig_Man_t *pAig, Amap_Par_t *pPars)
 

Function Documentation

ABC_NAMESPACE_IMPL_START void Amap_ManSetDefaultParams ( Amap_Par_t p)

DECLARATIONS ///.

MACRO DEFINITIONS ///.

CFile****************************************************************

FileName [amapCore.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Technology mapper for standard cells.]

Synopsis [Core mapping procedures.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id:
amapCore.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [This procedure sets default parameters.]

Description []

SideEffects []

SeeAlso []

Definition at line 46 of file amapCore.c.

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 }
char * memset()
int nIterArea
Definition: amap.h:48
int fVerbose
Definition: amap.h:55
int nIterFlow
Definition: amap.h:47
int fUseXors
Definition: amap.h:51
int nCutsMax
Definition: amap.h:49
int fUseMuxes
Definition: amap.h:50
int fFreeInvs
Definition: amap.h:52
float fEpsilon
Definition: amap.h:53
Vec_Ptr_t* Amap_ManTest ( Aig_Man_t pAig,
Amap_Par_t pPars 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 70 of file amapCore.c.

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 }
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
ABC_DLL void * Abc_FrameReadLibGen2()
Definition: mainFrame.c:57
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Amap_ManMap(Amap_Man_t *p)
Definition: amapMatch.c:593
static abctime Abc_Clock()
Definition: abc_global.h:279
static int Aig_ManNodeNum(Aig_Man_t *p)
Definition: aig.h:256
Amap_Cut_t ** ppCutsTemp
Definition: amapInt.h:101
int fVerbose
Definition: amap.h:55
float fAreaInv
Definition: amapInt.h:82
Amap_Lib_t * pLib
Definition: amapInt.h:79
int fUseMux
Definition: amapInt.h:84
typedefABC_NAMESPACE_HEADER_START struct Amap_Lib_t_ Amap_Lib_t
INCLUDES ///.
Definition: amap.h:42
Amap_Par_t * pPars
Definition: amapInt.h:78
#define ABC_PRT(a, t)
Definition: abc_global.h:220
void Amap_ManCreate(Amap_Man_t *p, Aig_Man_t *pAig)
Definition: amapGraph.c:323
int fUseXors
Definition: amap.h:51
void Amap_ManStop(Amap_Man_t *p)
Definition: amapMan.c:79
int * pMatsTemp
Definition: amapInt.h:100
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
Amap_Man_t * Amap_ManStart(int nNodes)
DECLARATIONS ///.
Definition: amapMan.c:45
Vec_Ptr_t * Amap_ManProduceMapped(Amap_Man_t *p)
Definition: amapOutput.c:71
int fUseXor
Definition: amapInt.h:83
ABC_INT64_T abctime
Definition: abc_global.h:278
int fUseMuxes
Definition: amap.h:50
int fFreeInvs
Definition: amap.h:52