summaryrefslogtreecommitdiffstats
path: root/src/map/fpga
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
commit6130e39b18b5f53902e4eab14f6d5cdde5219563 (patch)
tree0db0628479a1b750e9af1f66cb8379ebd0913d31 /src/map/fpga
parentf0e77f6797c0504b0da25a56152b707d3357f386 (diff)
downloadabc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.gz
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.bz2
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.zip
initial commit of public abc
Diffstat (limited to 'src/map/fpga')
-rw-r--r--src/map/fpga/fpga.c15
-rw-r--r--src/map/fpga/fpga.h16
-rw-r--r--src/map/fpga/fpgaCore.c5
-rw-r--r--src/map/fpga/fpgaCreate.c7
-rw-r--r--src/map/fpga/fpgaCut.c5
-rw-r--r--src/map/fpga/fpgaCutUtils.c5
-rw-r--r--src/map/fpga/fpgaFanout.c5
-rw-r--r--src/map/fpga/fpgaGENERIC.c5
-rw-r--r--src/map/fpga/fpgaInt.h8
-rw-r--r--src/map/fpga/fpgaLib.c5
-rw-r--r--src/map/fpga/fpgaMatch.c5
-rw-r--r--src/map/fpga/fpgaSwitch.c5
-rw-r--r--src/map/fpga/fpgaTime.c5
-rw-r--r--src/map/fpga/fpgaTruth.c11
-rw-r--r--src/map/fpga/fpgaUtils.c5
-rw-r--r--src/map/fpga/fpgaVec.c5
16 files changed, 97 insertions, 15 deletions
diff --git a/src/map/fpga/fpga.c b/src/map/fpga/fpga.c
index fa2a138c..08adb52e 100644
--- a/src/map/fpga/fpga.c
+++ b/src/map/fpga/fpga.c
@@ -19,6 +19,9 @@
#include "fpgaInt.h"
#include "main.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -78,9 +81,9 @@ void Fpga_Init( Abc_Frame_t * pAbc )
SeeAlso []
***********************************************************************/
-void Fpga_End()
+void Fpga_End( Abc_Frame_t * pAbc )
{
- Fpga_LutLibFree( Abc_FrameReadLibLut() );
+ Fpga_LutLibFree( (Fpga_LutLib_t *)Abc_FrameReadLibLut() );
}
@@ -153,7 +156,7 @@ int Fpga_CommandReadLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
goto usage;
}
// replace the current library
- Fpga_LutLibFree( Abc_FrameReadLibLut() );
+ Fpga_LutLibFree( (Fpga_LutLib_t *)Abc_FrameReadLibLut() );
Abc_FrameSetLibLut( pLib );
return 0;
@@ -224,7 +227,7 @@ int Fpga_CommandPrintLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
}
// set the new network
- Fpga_LutLibPrint( Abc_FrameReadLibLut() );
+ Fpga_LutLibPrint( (Fpga_LutLib_t *)Abc_FrameReadLibLut() );
return 0;
usage:
@@ -272,7 +275,7 @@ void Fpga_SetSimpleLutLib( int nLutSize )
}
if ( pLutLib == NULL )
return;
- Fpga_LutLibFree( Abc_FrameReadLibLut() );
+ Fpga_LutLibFree( (Fpga_LutLib_t *)Abc_FrameReadLibLut() );
Abc_FrameSetLibLut( Fpga_LutLibDup(pLutLib) );
}
@@ -281,3 +284,5 @@ void Fpga_SetSimpleLutLib( int nLutSize )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpga.h b/src/map/fpga/fpga.h
index 0479847c..082e6635 100644
--- a/src/map/fpga/fpga.h
+++ b/src/map/fpga/fpga.h
@@ -19,6 +19,7 @@
#ifndef __FPGA_H__
#define __FPGA_H__
+
////////////////////////////////////////////////////////////////////////
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
@@ -27,9 +28,10 @@
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
-#ifdef __cplusplus
-extern "C" {
-#endif
+
+
+ABC_NAMESPACE_HEADER_START
+
// the maximum size of LUTs used for mapping
#define FPGA_MAX_LUTSIZE 32
@@ -164,9 +166,11 @@ extern Fpga_NodeVec_t * Fpga_CollectNodeTfo( Fpga_Man_t * pMan, Fpga_Node_t * pN
/*=== fpga.c =============================================================*/
extern void Fpga_SetSimpleLutLib( int nLutSize );
-#ifdef __cplusplus
-}
-#endif
+
+
+ABC_NAMESPACE_HEADER_END
+
+
#endif
diff --git a/src/map/fpga/fpgaCore.c b/src/map/fpga/fpgaCore.c
index 17feac7c..74739852 100644
--- a/src/map/fpga/fpgaCore.c
+++ b/src/map/fpga/fpgaCore.c
@@ -18,6 +18,9 @@
#include "fpgaInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -186,3 +189,5 @@ ABC_PRT( "Time", clock() - clk );
}
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpgaCreate.c b/src/map/fpga/fpgaCreate.c
index 5245f050..168b69c6 100644
--- a/src/map/fpga/fpgaCreate.c
+++ b/src/map/fpga/fpgaCreate.c
@@ -19,6 +19,9 @@
#include "fpgaInt.h"
#include "main.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -169,7 +172,7 @@ Fpga_Man_t * Fpga_ManCreate( int nInputs, int nOutputs, int fVerbose )
// start the manager
p = ABC_ALLOC( Fpga_Man_t, 1 );
memset( p, 0, sizeof(Fpga_Man_t) );
- p->pLutLib = Abc_FrameReadLibLut();
+ p->pLutLib = (Fpga_LutLib_t *)Abc_FrameReadLibLut();
p->nVarsMax = p->pLutLib->LutMax;
p->fVerbose = fVerbose;
p->fAreaRecovery = 1;
@@ -580,3 +583,5 @@ void Fpga_ManStats( Fpga_Man_t * p )
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpgaCut.c b/src/map/fpga/fpgaCut.c
index aca4a8ef..5f46be18 100644
--- a/src/map/fpga/fpgaCut.c
+++ b/src/map/fpga/fpgaCut.c
@@ -18,6 +18,9 @@
#include "fpgaInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -1179,3 +1182,5 @@ Fpga_Cut_t * Fpga_CutArray2List( Fpga_Cut_t ** pArray, int nCuts )
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpgaCutUtils.c b/src/map/fpga/fpgaCutUtils.c
index 0f003ee7..9b5b2be9 100644
--- a/src/map/fpga/fpgaCutUtils.c
+++ b/src/map/fpga/fpgaCutUtils.c
@@ -18,6 +18,9 @@
#include "fpgaInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -469,3 +472,5 @@ void Fpga_MappingSetUsedCuts( Fpga_Man_t * pMan )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpgaFanout.c b/src/map/fpga/fpgaFanout.c
index c28a8799..e4e8894c 100644
--- a/src/map/fpga/fpgaFanout.c
+++ b/src/map/fpga/fpgaFanout.c
@@ -18,6 +18,9 @@
#include "fpgaInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
#ifdef MAP_ALLOCATE_FANOUT
////////////////////////////////////////////////////////////////////////
@@ -139,3 +142,5 @@ int Fpga_NodeGetFanoutNum( Fpga_Node_t * pNode )
#endif
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpgaGENERIC.c b/src/map/fpga/fpgaGENERIC.c
index 4483c215..c5a67228 100644
--- a/src/map/fpga/fpgaGENERIC.c
+++ b/src/map/fpga/fpgaGENERIC.c
@@ -18,6 +18,9 @@
#include "fpgaInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -44,3 +47,5 @@
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpgaInt.h b/src/map/fpga/fpgaInt.h
index ba9538c2..26de9b80 100644
--- a/src/map/fpga/fpgaInt.h
+++ b/src/map/fpga/fpgaInt.h
@@ -19,6 +19,7 @@
#ifndef __FPGA_INT_H__
#define __FPGA_INT_H__
+
////////////////////////////////////////////////////////////////////////
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
@@ -29,6 +30,9 @@
#include "extra.h"
#include "fpga.h"
+ABC_NAMESPACE_HEADER_START
+
+
////////////////////////////////////////////////////////////////////////
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
@@ -377,6 +381,10 @@ extern void Fpga_MappingSetChoiceLevels( Fpga_Man_t * pMan );
/*=== CUDD package.c ===============================================================*/
extern unsigned int Cudd_Prime( unsigned int p );
+
+
+ABC_NAMESPACE_HEADER_END
+
#endif
////////////////////////////////////////////////////////////////////////
diff --git a/src/map/fpga/fpgaLib.c b/src/map/fpga/fpgaLib.c
index d5b12293..1c173ad9 100644
--- a/src/map/fpga/fpgaLib.c
+++ b/src/map/fpga/fpgaLib.c
@@ -18,6 +18,9 @@
#include "fpgaInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -248,3 +251,5 @@ int Fpga_LutLibDelaysAreDiscrete( Fpga_LutLib_t * pLutLib )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpgaMatch.c b/src/map/fpga/fpgaMatch.c
index 30448750..08db4bb1 100644
--- a/src/map/fpga/fpgaMatch.c
+++ b/src/map/fpga/fpgaMatch.c
@@ -18,6 +18,9 @@
#include "fpgaInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -792,3 +795,5 @@ float Fpga_FindBestNode( Fpga_Man_t * p, Fpga_NodeVec_t * vNodes, Fpga_Node_t **
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpgaSwitch.c b/src/map/fpga/fpgaSwitch.c
index 5e881959..524262ec 100644
--- a/src/map/fpga/fpgaSwitch.c
+++ b/src/map/fpga/fpgaSwitch.c
@@ -18,6 +18,9 @@
#include "fpgaInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -149,3 +152,5 @@ float Fpga_MappingGetSwitching( Fpga_Man_t * pMan, Fpga_NodeVec_t * vMapping )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpgaTime.c b/src/map/fpga/fpgaTime.c
index d9bf7947..5454ce3c 100644
--- a/src/map/fpga/fpgaTime.c
+++ b/src/map/fpga/fpgaTime.c
@@ -18,6 +18,9 @@
#include "fpgaInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -260,3 +263,5 @@ void Fpga_TimePropagateArrival( Fpga_Man_t * p )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpgaTruth.c b/src/map/fpga/fpgaTruth.c
index 7eca8e3e..d37ff81d 100644
--- a/src/map/fpga/fpgaTruth.c
+++ b/src/map/fpga/fpgaTruth.c
@@ -19,6 +19,9 @@
#include "fpgaInt.h"
#include "cudd.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -81,17 +84,17 @@ void * Fpga_TruthsCutBdd( void * dd, Fpga_Cut_t * pCut )
assert( pCut->nLeaves > 1 );
// set the leaf variables
for ( i = 0; i < pCut->nLeaves; i++ )
- pCut->ppLeaves[i]->pCuts->uSign = (unsigned)(ABC_PTRUINT_T)Cudd_bddIthVar( dd, i );
+ pCut->ppLeaves[i]->pCuts->uSign = (unsigned)(ABC_PTRUINT_T)Cudd_bddIthVar( (DdManager *)dd, i );
// recursively compute the function
vVisited = Fpga_NodeVecAlloc( 10 );
- bFunc = Fpga_TruthsCutBdd_rec( dd, pCut, vVisited ); Cudd_Ref( bFunc );
+ bFunc = Fpga_TruthsCutBdd_rec( (DdManager *)dd, pCut, vVisited ); Cudd_Ref( bFunc );
// clean the intermediate BDDs
for ( i = 0; i < pCut->nLeaves; i++ )
pCut->ppLeaves[i]->pCuts->uSign = 0;
for ( i = 0; i < vVisited->nSize; i++ )
{
pCut = (Fpga_Cut_t *)vVisited->pArray[i];
- Cudd_RecursiveDeref( dd, (DdNode*)(ABC_PTRUINT_T)pCut->uSign );
+ Cudd_RecursiveDeref( (DdManager *)dd, (DdNode*)(ABC_PTRUINT_T)pCut->uSign );
pCut->uSign = 0;
}
// printf( "%d ", vVisited->nSize );
@@ -164,3 +167,5 @@ int Fpga_CutVolume( Fpga_Cut_t * pCut )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpgaUtils.c b/src/map/fpga/fpgaUtils.c
index f360254b..f10971ad 100644
--- a/src/map/fpga/fpgaUtils.c
+++ b/src/map/fpga/fpgaUtils.c
@@ -18,6 +18,9 @@
#include "fpgaInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -983,3 +986,5 @@ Fpga_NodeVec_t * Fpga_MappingOrderCosByLevel( Fpga_Man_t * pMan )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/map/fpga/fpgaVec.c b/src/map/fpga/fpgaVec.c
index b17697dd..35260029 100644
--- a/src/map/fpga/fpgaVec.c
+++ b/src/map/fpga/fpgaVec.c
@@ -18,6 +18,9 @@
#include "fpgaInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -406,3 +409,5 @@ void Fpga_NodeVecReverse( Fpga_NodeVec_t * vNodes )
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+