Commit 97e620a4 by Alan Mishchenko

Adding specialized matching to 'if'.

parent 06100279
...@@ -2347,6 +2347,10 @@ SOURCE=.\src\map\if\ifCut.c ...@@ -2347,6 +2347,10 @@ SOURCE=.\src\map\if\ifCut.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\map\if\ifData2.c
# End Source File
# Begin Source File
SOURCE=.\src\map\if\ifDec07.c SOURCE=.\src\map\if\ifDec07.c
# End Source File # End Source File
# Begin Source File # Begin Source File
...@@ -2391,6 +2395,10 @@ SOURCE=.\src\map\if\ifMap.c ...@@ -2391,6 +2395,10 @@ SOURCE=.\src\map\if\ifMap.c
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\map\if\ifMatch2.c
# End Source File
# Begin Source File
SOURCE=.\src\map\if\ifReduce.c SOURCE=.\src\map\if\ifReduce.c
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -494,6 +494,8 @@ Abc_Obj_t * Abc_NodeFromIf_rec( Abc_Ntk_t * pNtkNew, If_Man_t * pIfMan, If_Obj_t ...@@ -494,6 +494,8 @@ Abc_Obj_t * Abc_NodeFromIf_rec( Abc_Ntk_t * pNtkNew, If_Man_t * pIfMan, If_Obj_t
if ( If_CutLeafBit(pCutBest, i) ) if ( If_CutLeafBit(pCutBest, i) )
Abc_TtFlip( pTruth, Abc_TtWordNum(pCutBest->nLeaves), i ); Abc_TtFlip( pTruth, Abc_TtWordNum(pCutBest->nLeaves), i );
pNodeNew->pData = Kit_TruthToHop( (Hop_Man_t *)pNtkNew->pManFunc, (unsigned *)pTruth, If_CutLeaveNum(pCutBest), vCover ); pNodeNew->pData = Kit_TruthToHop( (Hop_Man_t *)pNtkNew->pManFunc, (unsigned *)pTruth, If_CutLeaveNum(pCutBest), vCover );
// if ( pIfMan->pPars->fUseBat )
// Bat_ManFuncPrintCell( *pTruth );
} }
// complement the node if the cut was complemented // complement the node if the cut was complemented
if ( pCutBest->fCompl && !pIfMan->pPars->fDelayOpt && !pIfMan->pPars->fDsdBalance ) if ( pCutBest->fCompl && !pIfMan->pPars->fDelayOpt && !pIfMan->pPars->fDsdBalance )
......
/**CFile****************************************************************
FileName [ifData2.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [FPGA mapping based on priority cuts.]
Synopsis [Precomputed data.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - September 1, 2009.]
Revision [$Id: ifData2.c,v 1.00 2009/09/01 00:00:00 alanmi Exp $]
***********************************************************************/
#include "if.h"
ABC_NAMESPACE_IMPL_START
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_IMPL_END
...@@ -125,6 +125,15 @@ If_Man_t * If_ManStart( If_Par_t * pPars ) ...@@ -125,6 +125,15 @@ If_Man_t * If_ManStart( If_Par_t * pPars )
p->vPairRes = Vec_IntAlloc( 1000 ); p->vPairRes = Vec_IntAlloc( 1000 );
Vec_IntPush( p->vPairRes, -1 ); Vec_IntPush( p->vPairRes, -1 );
} }
if ( pPars->fUseBat )
{
// abctime clk = Abc_Clock();
extern int Bat_ManCellFuncLookup( void * pMan, unsigned * pTruth, int nVars, int nLeaves, char * pStr );
extern void Bat_ManFuncSetupTable();
pPars->pFuncCell = Bat_ManCellFuncLookup;
Bat_ManFuncSetupTable();
// Abc_PrintTime( 1, "Setup time", Abc_Clock() - clk );
}
// create the constant node // create the constant node
p->pConst1 = If_ManSetupObj( p ); p->pConst1 = If_ManSetupObj( p );
p->pConst1->Type = IF_CONST1; p->pConst1->Type = IF_CONST1;
...@@ -249,6 +258,11 @@ void If_ManStop( If_Man_t * p ) ...@@ -249,6 +258,11 @@ void If_ManStop( If_Man_t * p )
Tim_ManStop( p->pManTim ); Tim_ManStop( p->pManTim );
if ( p->vSwitching ) if ( p->vSwitching )
Vec_IntFree( p->vSwitching ); Vec_IntFree( p->vSwitching );
if ( p->pPars->fUseBat )
{
extern void Bat_ManFuncSetdownTable();
Bat_ManFuncSetdownTable();
}
// hash table // hash table
// if ( p->pPars->fVerbose && p->nTableEntries[0] ) // if ( p->pPars->fVerbose && p->nTableEntries[0] )
// printf( "Hash table 2: Entries = %7d. Size = %7d.\n", p->nTableEntries[0], p->nTableSize[0] ); // printf( "Hash table 2: Entries = %7d. Size = %7d.\n", p->nTableEntries[0], p->nTableSize[0] );
......
/**CFile****************************************************************
FileName [ifMatch2.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [FPGA mapping based on priority cuts.]
Synopsis [Specialized matching.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - September 1, 2009.]
Revision [$Id: ifMatch2.c,v 1.00 2009/09/01 00:00:00 alanmi Exp $]
***********************************************************************/
#include "if.h"
ABC_NAMESPACE_IMPL_START
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Bat_ManFuncSetupTable()
{
}
void Bat_ManFuncSetdownTable()
{
}
int Bat_ManCellFuncLookup( void * pMan, unsigned * pTruth, int nVars, int nLeaves, char * pStr )
{
return 1;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_IMPL_END
...@@ -2,6 +2,7 @@ SRC += src/map/if/ifCom.c \ ...@@ -2,6 +2,7 @@ SRC += src/map/if/ifCom.c \
src/map/if/ifCache.c \ src/map/if/ifCache.c \
src/map/if/ifCore.c \ src/map/if/ifCore.c \
src/map/if/ifCut.c \ src/map/if/ifCut.c \
src/map/if/ifData2.c \
src/map/if/ifDec07.c \ src/map/if/ifDec07.c \
src/map/if/ifDec08.c \ src/map/if/ifDec08.c \
src/map/if/ifDec10.c \ src/map/if/ifDec10.c \
...@@ -13,6 +14,7 @@ SRC += src/map/if/ifCom.c \ ...@@ -13,6 +14,7 @@ SRC += src/map/if/ifCom.c \
src/map/if/ifLibLut.c \ src/map/if/ifLibLut.c \
src/map/if/ifMan.c \ src/map/if/ifMan.c \
src/map/if/ifMap.c \ src/map/if/ifMap.c \
src/map/if/ifMatch2.c \
src/map/if/ifReduce.c \ src/map/if/ifReduce.c \
src/map/if/ifSat.c \ src/map/if/ifSat.c \
src/map/if/ifSelect.c \ src/map/if/ifSelect.c \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment