Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
4393a5fa
Commit
4393a5fa
authored
Sep 05, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added platform-independent random-number generator to 'fraig'.
parent
cd2bd708
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
src/proof/fraig/fraigInt.h
+5
-1
src/proof/fraig/fraigMan.c
+2
-1
No files found.
src/proof/fraig/fraigInt.h
View file @
4393a5fa
...
...
@@ -72,7 +72,8 @@ ABC_NAMESPACE_HEADER_START
#define FRAIG_NUM_WORDS(n) (((n)>>5) + (((n)&31) > 0))
// generating random unsigned (#define RAND_MAX 0x7fff)
#define FRAIG_RANDOM_UNSIGNED ((((unsigned)rand()) << 24) ^ (((unsigned)rand()) << 12) ^ ((unsigned)rand()))
//#define FRAIG_RANDOM_UNSIGNED ((((unsigned)rand()) << 24) ^ (((unsigned)rand()) << 12) ^ ((unsigned)rand()))
#define FRAIG_RANDOM_UNSIGNED Aig_ManRandom(0)
// macros to get hold of the bits in a bit string
#define Fraig_BitStringSetBit(p,i) ((p)[(i)>>5] |= (1<<((i) & 31)))
...
...
@@ -345,6 +346,9 @@ struct Fraig_HashTableStruct_t_
/// GLOBAL VARIABLES ///
////////////////////////////////////////////////////////////////////////
// random number generator imported from another package
extern
unsigned
Aig_ManRandom
(
int
fReset
);
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
...
...
src/proof/fraig/fraigMan.c
View file @
4393a5fa
...
...
@@ -188,7 +188,8 @@ Fraig_Man_t * Fraig_ManCreate( Fraig_Params_t * pParams )
// set the random seed for simulation
// srand( 0xFEEDDEAF );
srand
(
0xDEADCAFE
);
// srand( 0xDEADCAFE );
Aig_ManRandom
(
1
);
// set parameters for equivalence checking
if
(
pParams
==
NULL
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment