diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-07-27 18:30:08 +0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-07-27 18:30:08 +0700 |
commit | ff963167fe66bf053f9050bc61f2c1caee45ceda (patch) | |
tree | 6b2241bd44845fd4efe81f1856c1c137416fe9e3 /src | |
parent | 701296451e84be83826d87136422bd1b8709f23d (diff) | |
download | abc-ff963167fe66bf053f9050bc61f2c1caee45ceda.tar.gz abc-ff963167fe66bf053f9050bc61f2c1caee45ceda.tar.bz2 abc-ff963167fe66bf053f9050bc61f2c1caee45ceda.zip |
Added random generation of 64-bit numbers.
Diffstat (limited to 'src')
-rw-r--r-- | src/aig/aig/aig.h | 1 | ||||
-rw-r--r-- | src/aig/aig/aigUtil.c | 23 |
2 files changed, 21 insertions, 3 deletions
diff --git a/src/aig/aig/aig.h b/src/aig/aig/aig.h index 4b95f682..d446837f 100644 --- a/src/aig/aig/aig.h +++ b/src/aig/aig/aig.h @@ -676,6 +676,7 @@ extern void Aig_ManCleanPioNumbers( Aig_Man_t * p ); extern int Aig_ManChoiceNum( Aig_Man_t * p ); extern char * Aig_FileNameGenericAppend( char * pBase, char * pSuffix ); extern unsigned Aig_ManRandom( int fReset ); +extern word Aig_ManRandom64( int fReset ); extern void Aig_ManRandomInfo( Vec_Ptr_t * vInfo, int iInputStart, int iWordStart, int iWordStop ); extern void Aig_NodeUnionLists( Vec_Ptr_t * vArr1, Vec_Ptr_t * vArr2, Vec_Ptr_t * vArr ); extern void Aig_NodeIntersectLists( Vec_Ptr_t * vArr1, Vec_Ptr_t * vArr2, Vec_Ptr_t * vArr ); diff --git a/src/aig/aig/aigUtil.c b/src/aig/aig/aigUtil.c index 1ce181ea..d8adaa6a 100644 --- a/src/aig/aig/aigUtil.c +++ b/src/aig/aig/aigUtil.c @@ -1118,7 +1118,7 @@ char * Aig_FileNameGenericAppend( char * pBase, char * pSuffix ) /**Function************************************************************* - Synopsis [Creates a sequence or random numbers.] + Synopsis [Creates a sequence of random numbers.] Description [] @@ -1148,7 +1148,7 @@ void Aig_ManRandomTest2() /**Function************************************************************* - Synopsis [Creates a sequence or random numbers.] + Synopsis [Creates a sequence of random numbers.] Description [] @@ -1181,7 +1181,7 @@ void Aig_ManRandomTest1() /**Function************************************************************* - Synopsis [Creates a sequence or random numbers.] + Synopsis [Creates a sequence of random numbers.] Description [] @@ -1204,6 +1204,23 @@ unsigned Aig_ManRandom( int fReset ) return (m_z << 16) + m_w; } +/**Function************************************************************* + + Synopsis [Creates a sequence of random numbers.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +word Aig_ManRandom64( int fReset ) +{ + word Res = ((word)Aig_ManRandom(fReset)) << 32; + return Res | (word)Aig_ManRandom(0); +} + /**Function************************************************************* |