diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-11-03 15:41:50 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-11-03 15:41:50 -0800 |
commit | 93ad6e7dd4d35716848a6a22b85828d93c5c7c91 (patch) | |
tree | 5e48e3f0903b4b69b27d2508f5566c00f055ecc7 /src | |
parent | 505747d443b4e72af88777716b6f204491b29377 (diff) | |
download | abc-93ad6e7dd4d35716848a6a22b85828d93c5c7c91.tar.gz abc-93ad6e7dd4d35716848a6a22b85828d93c5c7c91.tar.bz2 abc-93ad6e7dd4d35716848a6a22b85828d93c5c7c91.zip |
Making public some APIs.
Diffstat (limited to 'src')
-rw-r--r-- | src/aig/gia/gia.h | 21 | ||||
-rw-r--r-- | src/aig/gia/giaSim.c | 24 | ||||
-rw-r--r-- | src/bool/lucky/luckySimple.c | 6 |
3 files changed, 30 insertions, 21 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h index dba5c9db..683c868a 100644 --- a/src/aig/gia/gia.h +++ b/src/aig/gia/gia.h @@ -189,7 +189,6 @@ struct Gia_Man_t_ }; - typedef struct Gps_Par_t_ Gps_Par_t; struct Gps_Par_t_ { @@ -246,6 +245,20 @@ struct Gia_ParSim_t_ int iOutFail; // index of the failed output }; +typedef struct Gia_ManSim_t_ Gia_ManSim_t; +struct Gia_ManSim_t_ +{ + Gia_Man_t * pAig; + Gia_ParSim_t * pPars; + int nWords; + Vec_Int_t * vCis2Ids; + Vec_Int_t * vConsts; + // simulation information + unsigned * pDataSim; // simulation data + unsigned * pDataSimCis; // simulation data for CIs + unsigned * pDataSimCos; // simulation data for COs +}; + typedef struct Jf_Par_t_ Jf_Par_t; struct Jf_Par_t_ { @@ -1279,6 +1292,12 @@ extern int * Gia_SortFloats( float * pArray, int * pPerm, int nSiz /*=== giaSim.c ============================================================*/ extern void Gia_ManSimSetDefaultParams( Gia_ParSim_t * p ); extern int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars ); +extern unsigned * Gia_SimDataExt( Gia_ManSim_t * p, int i ); +extern unsigned * Gia_SimDataCiExt( Gia_ManSim_t * p, int i ); +extern unsigned * Gia_SimDataCoExt( Gia_ManSim_t * p, int i ); +extern void Gia_ManSimInfoInit( Gia_ManSim_t * p ); +extern void Gia_ManSimInfoTransfer( Gia_ManSim_t * p ); +extern void Gia_ManSimulateRound( Gia_ManSim_t * p ); /*=== giaSpeedup.c ============================================================*/ extern float Gia_ManDelayTraceLut( Gia_Man_t * p ); extern float Gia_ManDelayTraceLutPrint( Gia_Man_t * p, int fVerbose ); diff --git a/src/aig/gia/giaSim.c b/src/aig/gia/giaSim.c index 4871f17d..90224062 100644 --- a/src/aig/gia/giaSim.c +++ b/src/aig/gia/giaSim.c @@ -27,24 +27,14 @@ ABC_NAMESPACE_IMPL_START /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// -typedef struct Gia_ManSim_t_ Gia_ManSim_t; -struct Gia_ManSim_t_ -{ - Gia_Man_t * pAig; - Gia_ParSim_t * pPars; - int nWords; - Vec_Int_t * vCis2Ids; - Vec_Int_t * vConsts; - // simulation information - unsigned * pDataSim; // simulation data - unsigned * pDataSimCis; // simulation data for CIs - unsigned * pDataSimCos; // simulation data for COs -}; - static inline unsigned * Gia_SimData( Gia_ManSim_t * p, int i ) { return p->pDataSim + i * p->nWords; } static inline unsigned * Gia_SimDataCi( Gia_ManSim_t * p, int i ) { return p->pDataSimCis + i * p->nWords; } static inline unsigned * Gia_SimDataCo( Gia_ManSim_t * p, int i ) { return p->pDataSimCos + i * p->nWords; } +unsigned * Gia_SimDataExt( Gia_ManSim_t * p, int i ) { return Gia_SimData(p, i); } +unsigned * Gia_SimDataCiExt( Gia_ManSim_t * p, int i ) { return Gia_SimDataCi(p, i); } +unsigned * Gia_SimDataCoExt( Gia_ManSim_t * p, int i ) { return Gia_SimDataCo(p, i); } + //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// //////////////////////////////////////////////////////////////////////// @@ -436,7 +426,7 @@ static inline void Gia_ManSimulateNode( Gia_ManSim_t * p, Gia_Obj_t * pObj ) SeeAlso [] ***********************************************************************/ -static inline void Gia_ManSimInfoInit( Gia_ManSim_t * p ) +void Gia_ManSimInfoInit( Gia_ManSim_t * p ) { int iPioNum, i; Vec_IntForEachEntry( p->vCis2Ids, iPioNum, i ) @@ -459,7 +449,7 @@ static inline void Gia_ManSimInfoInit( Gia_ManSim_t * p ) SeeAlso [] ***********************************************************************/ -static inline void Gia_ManSimInfoTransfer( Gia_ManSim_t * p ) +void Gia_ManSimInfoTransfer( Gia_ManSim_t * p ) { int iPioNum, i; Vec_IntForEachEntry( p->vCis2Ids, iPioNum, i ) @@ -482,7 +472,7 @@ static inline void Gia_ManSimInfoTransfer( Gia_ManSim_t * p ) SeeAlso [] ***********************************************************************/ -static inline void Gia_ManSimulateRound( Gia_ManSim_t * p ) +void Gia_ManSimulateRound( Gia_ManSim_t * p ) { Gia_Obj_t * pObj; int i, iCis = 0, iCos = 0; diff --git a/src/bool/lucky/luckySimple.c b/src/bool/lucky/luckySimple.c index c38fc28c..f9128f3f 100644 --- a/src/bool/lucky/luckySimple.c +++ b/src/bool/lucky/luckySimple.c @@ -103,7 +103,7 @@ void fillInFlipArray(permInfo* pi) } -inline int factorial(int n) +static inline int factorial(int n) { return (n == 1 || n == 0) ? 1 : factorial(n - 1) * n; } @@ -129,14 +129,14 @@ void freePermInfoPtr(permInfo* x) free(x->swapArray); free(x); } -inline void minWord(word* a, word* b, word* minimal, int nVars) +static inline void minWord(word* a, word* b, word* minimal, int nVars) { if(memCompare(a, b, nVars) == -1) Kit_TruthCopy_64bit( minimal, a, nVars ); else Kit_TruthCopy_64bit( minimal, b, nVars ); } -inline void minWord3(word* a, word* b, word* minimal, int nVars) +static inline void minWord3(word* a, word* b, word* minimal, int nVars) { if (memCompare(a, b, nVars) <= 0) { |