Commit 2c8c0d87 by Alan Mishchenko

Compiler warnings.

parent 77dbe2b6
...@@ -616,7 +616,7 @@ int Cba_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -616,7 +616,7 @@ int Cba_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
extern void Prs_ManReadBlifTest(); extern void Prs_ManReadBlifTest();
extern void Prs_ManReadVerilogTest(); extern void Prs_ManReadVerilogTest();
Cba_Man_t * p = Cba_AbcGetMan(pAbc); //Cba_Man_t * p = Cba_AbcGetMan(pAbc);
int c, fVerbose = 0; int c, fVerbose = 0;
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF )
......
...@@ -328,70 +328,6 @@ static inline int Prs_ManMemory( Vec_Ptr_t * vPrs ) ...@@ -328,70 +328,6 @@ static inline int Prs_ManMemory( Vec_Ptr_t * vPrs )
} }
/**Function*************************************************************
Synopsis [Count range size.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline int Prs_ManRangeSizeName( Prs_Ntk_t * p, int Name )
{
return 1;
}
static inline int Prs_ManRangeSizeRange( Prs_Ntk_t * p, int Range )
{
char * pStr;
int Left, Right;
if ( Range == 0 )
return 1;
pStr = Prs_NtkStr( p, Range );
assert( pStr[0] == '[' );
Left = Right = atoi( pStr + 1 );
pStr = strstr( pStr, "=" );
if ( pStr )
Right = atoi( pStr + 1 );
return 1 + (Left > Right ? Left - Right : Right - Left);
}
static inline int Prs_ManRangeSizeConst( Prs_Ntk_t * p, int Const )
{
return atoi( Prs_NtkStr(p, Const) );
}
static inline int Prs_ManRangeSizeConcat( Prs_Ntk_t * p, int Con )
{
extern int Prs_ManRangeSizeArray( Prs_Ntk_t * p, Vec_Int_t * vSlices, int Start, int Stop );
Vec_Int_t * vSigs = Prs_CatSignals(p, Con);
return Prs_ManRangeSizeArray( p, vSigs, 0, Vec_IntSize(vSigs) );
}
static inline int Prs_ManRangeSizeSignal( Prs_Ntk_t * p, int Sig )
{
int Value = Abc_Lit2Var2( Sig );
Prs_ManType_t Type = Abc_Lit2Att2( Sig );
if ( Type == CBA_PRS_NAME )
return Prs_ManRangeSizeName( p, Value );
if ( Type == CBA_PRS_SLICE )
return Prs_ManRangeSizeRange( p, Prs_SliceRange(p, Value) );
if ( Type == CBA_PRS_CONST )
return Prs_ManRangeSizeConst( p, Value );
if ( Type == CBA_PRS_CONCAT )
return Prs_ManRangeSizeConcat( p, Value );
assert( 0 );
return 0;
}
static inline int Prs_ManRangeSizeArray( Prs_Ntk_t * p, Vec_Int_t * vSlices, int Start, int Stop )
{
int i, Sig, Count = 0;
assert( Vec_IntSize(vSlices) > 0 );
Vec_IntForEachEntryStartStop( vSlices, Sig, i, Start, Stop )
Count += Prs_ManRangeSizeSignal( p, Sig );
return Count;
}
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// ITERATORS /// /// ITERATORS ///
......
...@@ -33,6 +33,70 @@ ABC_NAMESPACE_IMPL_START ...@@ -33,6 +33,70 @@ ABC_NAMESPACE_IMPL_START
/**Function************************************************************* /**Function*************************************************************
Synopsis [Count range size.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline int Prs_ManRangeSizeName( Prs_Ntk_t * p, int Name )
{
return 1;
}
static inline int Prs_ManRangeSizeRange( Prs_Ntk_t * p, int Range )
{
char * pStr;
int Left, Right;
if ( Range == 0 )
return 1;
pStr = Prs_NtkStr( p, Range );
assert( pStr[0] == '[' );
Left = Right = atoi( pStr + 1 );
pStr = strstr( pStr, "=" );
if ( pStr )
Right = atoi( pStr + 1 );
return 1 + (Left > Right ? Left - Right : Right - Left);
}
static inline int Prs_ManRangeSizeConst( Prs_Ntk_t * p, int Const )
{
return atoi( Prs_NtkStr(p, Const) );
}
static inline int Prs_ManRangeSizeConcat( Prs_Ntk_t * p, int Con )
{
extern int Prs_ManRangeSizeArray( Prs_Ntk_t * p, Vec_Int_t * vSlices, int Start, int Stop );
Vec_Int_t * vSigs = Prs_CatSignals(p, Con);
return Prs_ManRangeSizeArray( p, vSigs, 0, Vec_IntSize(vSigs) );
}
static inline int Prs_ManRangeSizeSignal( Prs_Ntk_t * p, int Sig )
{
int Value = Abc_Lit2Var2( Sig );
Prs_ManType_t Type = Abc_Lit2Att2( Sig );
if ( Type == CBA_PRS_NAME )
return Prs_ManRangeSizeName( p, Value );
if ( Type == CBA_PRS_SLICE )
return Prs_ManRangeSizeRange( p, Prs_SliceRange(p, Value) );
if ( Type == CBA_PRS_CONST )
return Prs_ManRangeSizeConst( p, Value );
if ( Type == CBA_PRS_CONCAT )
return Prs_ManRangeSizeConcat( p, Value );
assert( 0 );
return 0;
}
int Prs_ManRangeSizeArray( Prs_Ntk_t * p, Vec_Int_t * vSlices, int Start, int Stop )
{
int i, Sig, Count = 0;
assert( Vec_IntSize(vSlices) > 0 );
Vec_IntForEachEntryStartStop( vSlices, Sig, i, Start, Stop )
Count += Prs_ManRangeSizeSignal( p, Sig );
return Count;
}
/**Function*************************************************************
Synopsis [] Synopsis []
Description [] Description []
......
...@@ -222,7 +222,7 @@ void Cba_ManCollectGateNameOne( Mio_Library_t * pLib, Ptr_ObjType_t Type, word T ...@@ -222,7 +222,7 @@ void Cba_ManCollectGateNameOne( Mio_Library_t * pLib, Ptr_ObjType_t Type, word T
} }
Vec_Ptr_t * Cba_ManCollectGateNamesByTruth( Mio_Library_t * pLib ) Vec_Ptr_t * Cba_ManCollectGateNamesByTruth( Mio_Library_t * pLib )
{ {
static word uTruth, uTruths6[3] = { static word uTruths6[3] = {
ABC_CONST(0xAAAAAAAAAAAAAAAA), ABC_CONST(0xAAAAAAAAAAAAAAAA),
ABC_CONST(0xCCCCCCCCCCCCCCCC), ABC_CONST(0xCCCCCCCCCCCCCCCC),
ABC_CONST(0xF0F0F0F0F0F0F0F0), ABC_CONST(0xF0F0F0F0F0F0F0F0),
......
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