summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abcXsim.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-06-22 23:04:43 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2015-06-22 23:04:43 -0700
commit70697f868a263930e971c062e5b46e64fbb1ee18 (patch)
tree7ecd062ec16b58d5a625fe3591589728f705814c /src/base/abci/abcXsim.c
parentd5b0fdee741dbc64bcfe75c54420219a7cbeac1a (diff)
downloadabc-70697f868a263930e971c062e5b46e64fbb1ee18.tar.gz
abc-70697f868a263930e971c062e5b46e64fbb1ee18.tar.bz2
abc-70697f868a263930e971c062e5b46e64fbb1ee18.zip
Version abc90528
committer: Baruch Sterin <baruchs@gmail.com>
Diffstat (limited to 'src/base/abci/abcXsim.c')
-rw-r--r--src/base/abci/abcXsim.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/base/abci/abcXsim.c b/src/base/abci/abcXsim.c
index 5e9093e7..b77f9d77 100644
--- a/src/base/abci/abcXsim.c
+++ b/src/base/abci/abcXsim.c
@@ -20,6 +20,8 @@
#include "abc.h"
+extern unsigned Gia_ManRandom( int fReset );
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -50,13 +52,15 @@ static inline int Abc_XsimAnd( int Value0, int Value1 )
}
static inline int Abc_XsimRand2()
{
- return (rand() & 1) ? XVS1 : XVS0;
+// return (rand() & 1) ? XVS1 : XVS0;
+ return (Gia_ManRandom(0) & 1) ? XVS1 : XVS0;
}
static inline int Abc_XsimRand3()
{
int RetValue;
do {
- RetValue = rand() & 3;
+// RetValue = rand() & 3;
+ RetValue = Gia_ManRandom(0) & 3;
} while ( RetValue == 0 );
return RetValue;
}
@@ -108,7 +112,8 @@ void Abc_NtkXValueSimulate( Abc_Ntk_t * pNtk, int nFrames, int fXInputs, int fXS
Abc_Obj_t * pObj;
int i, f;
assert( Abc_NtkIsStrash(pNtk) );
- srand( 0x12341234 );
+// srand( 0x12341234 );
+ Gia_ManRandom( 1 );
// start simulation
Abc_ObjSetXsim( Abc_AigConst1(pNtk), XVS1 );
if ( fXInputs )
@@ -194,7 +199,8 @@ void Abc_NtkCycleInitState( Abc_Ntk_t * pNtk, int nFrames, int fUseXval, int fVe
Abc_Obj_t * pObj;
int i, f;
assert( Abc_NtkIsStrash(pNtk) );
- srand( 0x12341234 );
+// srand( 0x12341234 );
+ Gia_ManRandom( 1 );
// initialize the values
Abc_ObjSetXsim( Abc_AigConst1(pNtk), XVS1 );
Abc_NtkForEachLatch( pNtk, pObj, i )