ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
rewire_rng.h File Reference
#include "base/abc/abc.h"
Include dependency graph for rewire_rng.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NUMBER1   3716960521u
 
#define NUMBER2   2174103536u
 

Functions

unsigned Random_Int (int fReset)
 
word Random_Word (int fReset)
 
unsigned Random_Num (int Seed)
 

Macro Definition Documentation

◆ NUMBER1

#define NUMBER1   3716960521u

CFile****************************************************************

FileName [rewire_rng.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Re-wiring.]

Synopsis []

Author [Jiun-Hao Chen]

Affiliation [National Taiwan University]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id
rewire_rng.h,v 1.00 2005/06/20 00:00:00 alanmi Exp

]

Definition at line 35 of file rewire_rng.h.

◆ NUMBER2

#define NUMBER2   2174103536u

Definition at line 36 of file rewire_rng.h.

Function Documentation

◆ Random_Int()

unsigned Random_Int ( int fReset)

CFile****************************************************************

FileName [rewire_rng.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Re-wiring.]

Synopsis []

Author [Jiun-Hao Chen]

Affiliation [National Taiwan University]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id
rewire_rng.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]

Definition at line 25 of file rewire_rng.c.

25 {
26 static unsigned int m_z = NUMBER1;
27 static unsigned int m_w = NUMBER2;
28 if (fReset) {
29 m_z = NUMBER1;
30 m_w = NUMBER2;
31 }
32 m_z = 36969 * (m_z & 65535) + (m_z >> 16);
33 m_w = 18000 * (m_w & 65535) + (m_w >> 16);
34 return (m_z << 16) + m_w;
35}
#define NUMBER2
Definition aigUtil.c:1157
#define NUMBER1
Definition aigUtil.c:1156
Here is the caller graph for this function:

◆ Random_Num()

unsigned Random_Num ( int Seed)

Definition at line 43 of file rewire_rng.c.

43 {
44 static unsigned RandMask = 0;
45 if (Seed == 0)
46 return RandMask ^ Random_Int(0);
47 RandMask = Random_Int(1);
48 for (int i = 0; i < Seed; i++)
49 RandMask = Random_Int(0);
50 return RandMask;
51}
ABC_NAMESPACE_IMPL_START unsigned Random_Int(int fReset)
Definition rewire_rng.c:25
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Random_Word()

word Random_Word ( int fReset)

Definition at line 37 of file rewire_rng.c.

37 {
38 return ((word)Random_Int(fReset) << 32) | ((word)Random_Int(fReset) << 0);
39}
unsigned __int64 word
DECLARATIONS ///.
Definition kitPerm.c:36
Here is the call graph for this function: