From ff963167fe66bf053f9050bc61f2c1caee45ceda Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 27 Jul 2011 18:30:08 +0700 Subject: Added random generation of 64-bit numbers. --- src/aig/aig/aig.h | 1 + src/aig/aig/aigUtil.c | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'src') 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************************************************************* -- cgit v1.2.3