abc/src/map/mpm/mpmCore.c

108 lines
3.0 KiB
C
Raw Normal View History

2013-07-12 22:02:32 +02:00
/**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) );
2013-07-13 04:33:46 +02:00
p->pLib = NULL; // LUT library
p->nNumCuts = 8; // cut number
p->fUseTruth = 0; // uses truth tables
2013-07-13 18:52:20 +02:00
p->fUseDsd = 0; // uses DSDs
2013-07-13 04:33:46 +02:00
p->fCutMin = 0; // enables cut minimization
p->DelayTarget = -1; // delay target
p->fDeriveLuts = 0; // use truth tables to derive AIG structure
p->fVerbose = 0; // verbose output
2013-07-14 08:40:51 +02:00
p->fVeryVerbose = 0; // verbose output
2013-07-12 22:02:32 +02:00
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
2013-07-13 04:33:46 +02:00
Gia_Man_t * Mpm_ManPerformTest( Mig_Man_t * pMig, Mpm_Par_t * pPars )
2013-07-12 22:02:32 +02:00
{
Gia_Man_t * pNew;
Mpm_Man_t * p;
2013-07-13 04:33:46 +02:00
p = Mpm_ManStart( pMig, pPars );
2013-07-12 22:02:32 +02:00
Mpm_ManPrintStatsInit( p );
Mpm_ManPrepare( p );
Mpm_ManPerform( p );
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;
2013-07-13 21:20:53 +02:00
if ( pPars->fUseGates )
{
pGia = Gia_ManDupMuxes( pGia );
p = Mig_ManCreate( pGia );
Gia_ManStop( pGia );
}
else
p = Mig_ManCreate( pGia );
2013-07-13 04:33:46 +02:00
pNew = Mpm_ManPerformTest( p, pPars );
2013-07-12 22:02:32 +02:00
Mig_ManStop( p );
return pNew;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_IMPL_END