Commit 55e7dd16 by Alan Mishchenko

Suggested fixes to compile with 'gcc -x c++'.

parent 9e20b301
...@@ -982,6 +982,7 @@ extern void Cba_ManDeriveFanout( Cba_Man_t * p ); ...@@ -982,6 +982,7 @@ extern void Cba_ManDeriveFanout( Cba_Man_t * p );
//extern void Cba_ManAssignInternNames( Cba_Man_t * p ); //extern void Cba_ManAssignInternNames( Cba_Man_t * p );
extern void Cba_ManAssignInternWordNames( Cba_Man_t * p ); extern void Cba_ManAssignInternWordNames( Cba_Man_t * p );
extern Cba_Man_t * Cba_ManCollapse( Cba_Man_t * p ); extern Cba_Man_t * Cba_ManCollapse( Cba_Man_t * p );
extern void Cba_ManSetupTypes( char ** pNames, char ** pSymbs );
/*=== cbaPtr.c ===============================================================*/ /*=== cbaPtr.c ===============================================================*/
extern void Cba_PtrFree( Vec_Ptr_t * vDes ); extern void Cba_PtrFree( Vec_Ptr_t * vDes );
extern int Cba_PtrMemory( Vec_Ptr_t * vDes ); extern int Cba_PtrMemory( Vec_Ptr_t * vDes );
......
...@@ -509,7 +509,7 @@ void Cba_NtkPrepareLibrary( Cba_Man_t * p, Mio_Library_t * pLib ) ...@@ -509,7 +509,7 @@ void Cba_NtkPrepareLibrary( Cba_Man_t * p, Mio_Library_t * pLib )
int Cba_NtkBuildLibrary( Cba_Man_t * p ) int Cba_NtkBuildLibrary( Cba_Man_t * p )
{ {
int RetValue = 1; int RetValue = 1;
Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen( Abc_FrameGetGlobalFrame() ); Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen();
if ( pLib == NULL ) if ( pLib == NULL )
printf( "The standard cell library is not available.\n" ), RetValue = 0; printf( "The standard cell library is not available.\n" ), RetValue = 0;
else else
......
...@@ -47,7 +47,7 @@ ABC_NAMESPACE_IMPL_START ...@@ -47,7 +47,7 @@ ABC_NAMESPACE_IMPL_START
int Prs_ManIsMapped( Prs_Ntk_t * pNtk ) int Prs_ManIsMapped( Prs_Ntk_t * pNtk )
{ {
Vec_Int_t * vSigs; int iBox; Vec_Int_t * vSigs; int iBox;
Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen( Abc_FrameGetGlobalFrame() ); Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen();
if ( pLib == NULL ) if ( pLib == NULL )
return 0; return 0;
Prs_NtkForEachBox( pNtk, vSigs, iBox ) Prs_NtkForEachBox( pNtk, vSigs, iBox )
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "base/abc/abc.h" #include "base/abc/abc.h"
#include "base/main/mainInt.h" #include "base/main/mainInt.h"
#include "map/mio/mio.h" #include "map/mio/mio.h"
#include "cba.h"
ABC_NAMESPACE_IMPL_START ABC_NAMESPACE_IMPL_START
...@@ -321,7 +322,7 @@ Vec_Ptr_t * Cba_ManCollectGateNamesByTruth( Mio_Library_t * pLib ) ...@@ -321,7 +322,7 @@ Vec_Ptr_t * Cba_ManCollectGateNamesByTruth( Mio_Library_t * pLib )
void Cba_PtrUpdateBox( Vec_Ptr_t * vBox, Vec_Ptr_t * vGatesNames ) void Cba_PtrUpdateBox( Vec_Ptr_t * vBox, Vec_Ptr_t * vGatesNames )
{ {
Mio_Gate_t * pGate; Mio_Pin_t * pPin; int i = 1; Mio_Gate_t * pGate; Mio_Pin_t * pPin; int i = 1;
Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen( Abc_FrameGetGlobalFrame() ); Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen();
// update gate name // update gate name
char * pNameNew, * pName = (char *)Vec_PtrEntry(vBox, 0); char * pNameNew, * pName = (char *)Vec_PtrEntry(vBox, 0);
if ( !strcmp(pName, "Const0T") ) if ( !strcmp(pName, "Const0T") )
...@@ -419,7 +420,7 @@ Vec_Ptr_t * Cba_PtrTransformTest( Vec_Ptr_t * vDes ) ...@@ -419,7 +420,7 @@ Vec_Ptr_t * Cba_PtrTransformTest( Vec_Ptr_t * vDes )
printf( "ABC framework is not started.\n" ); printf( "ABC framework is not started.\n" );
return NULL; return NULL;
} }
pLib = (Mio_Library_t *)Abc_FrameReadLibGen( Abc_FrameGetGlobalFrame() ); pLib = (Mio_Library_t *)Abc_FrameReadLibGen();
if ( pLib == NULL ) if ( pLib == NULL )
{ {
printf( "Standard cell library is not entered.\n" ); printf( "Standard cell library is not entered.\n" );
......
...@@ -169,7 +169,7 @@ void Cba_ManWriteBlifLines( FILE * pFile, Cba_Ntk_t * p ) ...@@ -169,7 +169,7 @@ void Cba_ManWriteBlifLines( FILE * pFile, Cba_Ntk_t * p )
else if ( Cba_ObjIsGate(p, i) ) else if ( Cba_ObjIsGate(p, i) )
{ {
char * pGateName = Abc_NamStr(p->pDesign->pMods, Cba_BoxNtkId(p, i)); char * pGateName = Abc_NamStr(p->pDesign->pMods, Cba_BoxNtkId(p, i));
Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen( Abc_FrameGetGlobalFrame() ); Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen();
Mio_Gate_t * pGate = Mio_LibraryReadGateByName( pLib, pGateName, NULL ); Mio_Gate_t * pGate = Mio_LibraryReadGateByName( pLib, pGateName, NULL );
fprintf( pFile, ".gate %s", pGateName ); fprintf( pFile, ".gate %s", pGateName );
Cba_BoxForEachBi( p, i, iTerm, k ) Cba_BoxForEachBi( p, i, iTerm, k )
......
...@@ -395,7 +395,7 @@ static inline void Cba_ManWriteGate( Cba_Ntk_t * p, int iObj ) ...@@ -395,7 +395,7 @@ static inline void Cba_ManWriteGate( Cba_Ntk_t * p, int iObj )
{ {
Vec_Str_t * vStr = p->pDesign->vOut; int iTerm, k; Vec_Str_t * vStr = p->pDesign->vOut; int iTerm, k;
char * pGateName = Abc_NamStr(p->pDesign->pMods, Cba_BoxNtkId(p, iObj)); char * pGateName = Abc_NamStr(p->pDesign->pMods, Cba_BoxNtkId(p, iObj));
Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen( Abc_FrameGetGlobalFrame() ); Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen();
Mio_Gate_t * pGate = Mio_LibraryReadGateByName( pLib, pGateName, NULL ); Mio_Gate_t * pGate = Mio_LibraryReadGateByName( pLib, pGateName, NULL );
Vec_StrPrintStr( vStr, " " ); Vec_StrPrintStr( vStr, " " );
Vec_StrPrintStr( vStr, pGateName ); Vec_StrPrintStr( vStr, pGateName );
......
...@@ -83,7 +83,7 @@ static Smt_Pair_t s_Types[SMT_PRS_END] = ...@@ -83,7 +83,7 @@ static Smt_Pair_t s_Types[SMT_PRS_END] =
}; };
static inline char * Smt_GetTypeName( Smt_LineType_t Type ) static inline char * Smt_GetTypeName( Smt_LineType_t Type )
{ {
Smt_LineType_t i; int i;
for ( i = 1; i < SMT_PRS_END; i++ ) for ( i = 1; i < SMT_PRS_END; i++ )
if ( s_Types[i].Type == Type ) if ( s_Types[i].Type == Type )
return s_Types[i].pName; return s_Types[i].pName;
...@@ -91,7 +91,7 @@ static inline char * Smt_GetTypeName( Smt_LineType_t Type ) ...@@ -91,7 +91,7 @@ static inline char * Smt_GetTypeName( Smt_LineType_t Type )
} }
static inline void Smt_AddTypes( Abc_Nam_t * p ) static inline void Smt_AddTypes( Abc_Nam_t * p )
{ {
Smt_LineType_t Type; int Type;
for ( Type = 1; Type < SMT_PRS_END; Type++ ) for ( Type = 1; Type < SMT_PRS_END; Type++ )
Abc_NamStrFindOrAdd( p, Smt_GetTypeName(Type), NULL ); Abc_NamStrFindOrAdd( p, Smt_GetTypeName(Type), NULL );
assert( Abc_NamObjNumMax(p) == SMT_PRS_END ); assert( Abc_NamObjNumMax(p) == SMT_PRS_END );
......
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