diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-04-10 00:28:36 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-04-10 00:28:36 -0700 |
commit | f16457aaf5d00b5b44ef3aeef8062d1df9b8f1df (patch) | |
tree | 789b0aa05ebbb61a342f8f19dcb90fdf6db2ac6c | |
parent | f380bb5ac15fd5e63b026d11426497c3f97450ce (diff) | |
download | abc-f16457aaf5d00b5b44ef3aeef8062d1df9b8f1df.tar.gz abc-f16457aaf5d00b5b44ef3aeef8062d1df9b8f1df.tar.bz2 abc-f16457aaf5d00b5b44ef3aeef8062d1df9b8f1df.zip |
Added/moved several APIs.
-rw-r--r-- | src/aig/gia/giaBidec.c | 4 | ||||
-rw-r--r-- | src/bool/bdc/bdc.h | 4 | ||||
-rw-r--r-- | src/misc/extra/extra.h | 1 | ||||
-rw-r--r-- | src/misc/extra/extraUtilFile.c | 24 |
4 files changed, 20 insertions, 13 deletions
diff --git a/src/aig/gia/giaBidec.c b/src/aig/gia/giaBidec.c index ae938798..19277f12 100644 --- a/src/aig/gia/giaBidec.c +++ b/src/aig/gia/giaBidec.c @@ -28,10 +28,6 @@ ABC_NAMESPACE_IMPL_START /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// -static inline int Bdc_FunObjCopy( Bdc_Fun_t * pObj ) { return Abc_LitNotCond( Bdc_FuncCopyInt(Bdc_Regular(pObj)), Bdc_IsComplement(pObj) ); } -static inline int Bdc_FunFanin0Copy( Bdc_Fun_t * pObj ) { return Bdc_FunObjCopy( Bdc_FuncFanin0(pObj) ); } -static inline int Bdc_FunFanin1Copy( Bdc_Fun_t * pObj ) { return Bdc_FunObjCopy( Bdc_FuncFanin1(pObj) ); } - //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// //////////////////////////////////////////////////////////////////////// diff --git a/src/bool/bdc/bdc.h b/src/bool/bdc/bdc.h index 6c88857a..a7572fe8 100644 --- a/src/bool/bdc/bdc.h +++ b/src/bool/bdc/bdc.h @@ -78,6 +78,10 @@ extern int Bdc_FuncCopyInt( Bdc_Fun_t * p ); extern void Bdc_FuncSetCopy( Bdc_Fun_t * p, void * pCopy ); extern void Bdc_FuncSetCopyInt( Bdc_Fun_t * p, int iCopy ); +/*=== working with saved copies ==========================================*/ +static inline int Bdc_FunObjCopy( Bdc_Fun_t * pObj ) { return Abc_LitNotCond( Bdc_FuncCopyInt(Bdc_Regular(pObj)), Bdc_IsComplement(pObj) ); } +static inline int Bdc_FunFanin0Copy( Bdc_Fun_t * pObj ) { return Bdc_FunObjCopy( Bdc_FuncFanin0(pObj) ); } +static inline int Bdc_FunFanin1Copy( Bdc_Fun_t * pObj ) { return Bdc_FunObjCopy( Bdc_FuncFanin1(pObj) ); } ABC_NAMESPACE_HEADER_END diff --git a/src/misc/extra/extra.h b/src/misc/extra/extra.h index 0e9caf84..e9daa87e 100644 --- a/src/misc/extra/extra.h +++ b/src/misc/extra/extra.h @@ -115,6 +115,7 @@ extern char * Extra_TimeStamp(); extern char * Extra_StringAppend( char * pStrGiven, char * pStrAdd ); extern unsigned Extra_ReadBinary( char * Buffer ); extern void Extra_PrintBinary( FILE * pFile, unsigned Sign[], int nBits ); +extern int Extra_ReadHex( unsigned Sign[], char * pString, int nDigits ); extern int Extra_ReadHexadecimal( unsigned Sign[], char * pString, int nVars ); extern void Extra_PrintHexadecimal( FILE * pFile, unsigned Sign[], int nVars ); extern void Extra_PrintHexadecimalString( char * pString, unsigned Sign[], int nVars ); diff --git a/src/misc/extra/extraUtilFile.c b/src/misc/extra/extraUtilFile.c index 9f73a5f1..de8a11cb 100644 --- a/src/misc/extra/extraUtilFile.c +++ b/src/misc/extra/extraUtilFile.c @@ -446,16 +446,9 @@ void Extra_PrintBinary( FILE * pFile, unsigned Sign[], int nBits ) SeeAlso [] ***********************************************************************/ -int Extra_ReadHexadecimal( unsigned Sign[], char * pString, int nVars ) +int Extra_ReadHex( unsigned Sign[], char * pString, int nDigits ) { - int nWords, nDigits, Digit, k, c; - nWords = Extra_TruthWordNum( nVars ); - for ( k = 0; k < nWords; k++ ) - Sign[k] = 0; - // read the number from the string - nDigits = (1 << nVars) / 4; - if ( nDigits == 0 ) - nDigits = 1; + int Digit, k, c; for ( k = 0; k < nDigits; k++ ) { c = nDigits-1-k; @@ -470,6 +463,19 @@ int Extra_ReadHexadecimal( unsigned Sign[], char * pString, int nVars ) } return 1; } +int Extra_ReadHexadecimal( unsigned Sign[], char * pString, int nVars ) +{ + int nWords, nDigits, k; + nWords = Extra_TruthWordNum( nVars ); + for ( k = 0; k < nWords; k++ ) + Sign[k] = 0; + // read the number from the string + nDigits = (1 << nVars) / 4; + if ( nDigits == 0 ) + nDigits = 1; + Extra_ReadHex( Sign, pString, nDigits ); + return 1; +} /**Function************************************************************* |