summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-08-16 18:28:41 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-08-16 18:28:41 -0700
commit97e620a4b7e926a036447e2b1d2b1b6e5a24eacd (patch)
treee352fe691e9739951d0e9f973891600da733a7a8 /src
parent06100279cdf00acc67a3e08da389220d6dc47f92 (diff)
downloadabc-97e620a4b7e926a036447e2b1d2b1b6e5a24eacd.tar.gz
abc-97e620a4b7e926a036447e2b1d2b1b6e5a24eacd.tar.bz2
abc-97e620a4b7e926a036447e2b1d2b1b6e5a24eacd.zip
Adding specialized matching to 'if'.
Diffstat (limited to 'src')
-rw-r--r--src/base/abci/abcIf.c2
-rw-r--r--src/map/if/ifData2.c52
-rw-r--r--src/map/if/ifMan.c14
-rw-r--r--src/map/if/ifMatch2.c62
-rw-r--r--src/map/if/module.make2
5 files changed, 132 insertions, 0 deletions
diff --git a/src/base/abci/abcIf.c b/src/base/abci/abcIf.c
index 51b2e66c..06c290f9 100644
--- a/src/base/abci/abcIf.c
+++ b/src/base/abci/abcIf.c
@@ -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) )
Abc_TtFlip( pTruth, Abc_TtWordNum(pCutBest->nLeaves), i );
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
if ( pCutBest->fCompl && !pIfMan->pPars->fDelayOpt && !pIfMan->pPars->fDsdBalance )
diff --git a/src/map/if/ifData2.c b/src/map/if/ifData2.c
new file mode 100644
index 00000000..719cfa99
--- /dev/null
+++ b/src/map/if/ifData2.c
@@ -0,0 +1,52 @@
+/**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
+
diff --git a/src/map/if/ifMan.c b/src/map/if/ifMan.c
index 43f7b7e0..f65775d2 100644
--- a/src/map/if/ifMan.c
+++ b/src/map/if/ifMan.c
@@ -125,6 +125,15 @@ If_Man_t * If_ManStart( If_Par_t * pPars )
p->vPairRes = Vec_IntAlloc( 1000 );
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
p->pConst1 = If_ManSetupObj( p );
p->pConst1->Type = IF_CONST1;
@@ -249,6 +258,11 @@ void If_ManStop( If_Man_t * p )
Tim_ManStop( p->pManTim );
if ( p->vSwitching )
Vec_IntFree( p->vSwitching );
+ if ( p->pPars->fUseBat )
+ {
+ extern void Bat_ManFuncSetdownTable();
+ Bat_ManFuncSetdownTable();
+ }
// hash table
// if ( p->pPars->fVerbose && p->nTableEntries[0] )
// printf( "Hash table 2: Entries = %7d. Size = %7d.\n", p->nTableEntries[0], p->nTableSize[0] );
diff --git a/src/map/if/ifMatch2.c b/src/map/if/ifMatch2.c
new file mode 100644
index 00000000..e635e226
--- /dev/null
+++ b/src/map/if/ifMatch2.c
@@ -0,0 +1,62 @@
+/**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
+
diff --git a/src/map/if/module.make b/src/map/if/module.make
index 13c40ef9..6651d465 100644
--- a/src/map/if/module.make
+++ b/src/map/if/module.make
@@ -2,6 +2,7 @@ SRC += src/map/if/ifCom.c \
src/map/if/ifCache.c \
src/map/if/ifCore.c \
src/map/if/ifCut.c \
+ src/map/if/ifData2.c \
src/map/if/ifDec07.c \
src/map/if/ifDec08.c \
src/map/if/ifDec10.c \
@@ -13,6 +14,7 @@ SRC += src/map/if/ifCom.c \
src/map/if/ifLibLut.c \
src/map/if/ifMan.c \
src/map/if/ifMap.c \
+ src/map/if/ifMatch2.c \
src/map/if/ifReduce.c \
src/map/if/ifSat.c \
src/map/if/ifSelect.c \