ruby: remove random seed

We no longer use the C library based random number generator: random().
Instead we use the C++ library provided rng.  So setting the random seed for
the RubySystem class has no effect.  Hence the variable and the corresponding
option are being dropped.
This commit is contained in:
Nilay Vaish 2015-09-01 15:50:33 -05:00
parent 5d555df359
commit fe47f0a72f
4 changed files with 0 additions and 10 deletions

View file

@ -82,9 +82,6 @@ def define_options(parser):
parser.add_option("--recycle-latency", type="int", default=10, parser.add_option("--recycle-latency", type="int", default=10,
help="Recycle latency for ruby controller input buffers") help="Recycle latency for ruby controller input buffers")
parser.add_option("--random_seed", type="int", default=1234,
help="Used for seeding the random number generator")
protocol = buildEnv['PROTOCOL'] protocol = buildEnv['PROTOCOL']
exec "import %s" % protocol exec "import %s" % protocol
eval("%s.define_options(parser)" % protocol) eval("%s.define_options(parser)" % protocol)
@ -236,7 +233,6 @@ def create_system(options, full_system, system, piobus = None, dma_ports = []):
ruby._cpu_ports = cpu_sequencers ruby._cpu_ports = cpu_sequencers
ruby.num_of_sequencers = len(cpu_sequencers) ruby.num_of_sequencers = len(cpu_sequencers)
ruby.random_seed = options.random_seed
# Create a backing copy of physical memory in case required # Create a backing copy of physical memory in case required
if options.access_backing_store: if options.access_backing_store:

View file

@ -34,7 +34,6 @@ from SimpleMemory import *
class RubySystem(ClockedObject): class RubySystem(ClockedObject):
type = 'RubySystem' type = 'RubySystem'
cxx_header = "mem/ruby/system/System.hh" cxx_header = "mem/ruby/system/System.hh"
random_seed = Param.Int(1234, "random seed used by the simulation");
randomization = Param.Bool(False, randomization = Param.Bool(False,
"insert random delays on message enqueue times"); "insert random delays on message enqueue times");
block_size_bytes = Param.UInt32(64, block_size_bytes = Param.UInt32(64,

View file

@ -45,7 +45,6 @@
using namespace std; using namespace std;
int RubySystem::m_random_seed;
bool RubySystem::m_randomization; bool RubySystem::m_randomization;
uint32_t RubySystem::m_block_size_bytes; uint32_t RubySystem::m_block_size_bytes;
uint32_t RubySystem::m_block_size_bits; uint32_t RubySystem::m_block_size_bits;
@ -60,8 +59,6 @@ RubySystem::RubySystem(const Params *p)
: ClockedObject(p), m_access_backing_store(p->access_backing_store), : ClockedObject(p), m_access_backing_store(p->access_backing_store),
m_cache_recorder(NULL) m_cache_recorder(NULL)
{ {
m_random_seed = p->random_seed;
srandom(m_random_seed);
m_randomization = p->randomization; m_randomization = p->randomization;
m_block_size_bytes = p->block_size_bytes; m_block_size_bytes = p->block_size_bytes;

View file

@ -70,7 +70,6 @@ class RubySystem : public ClockedObject
~RubySystem(); ~RubySystem();
// config accessors // config accessors
static int getRandomSeed() { return m_random_seed; }
static int getRandomization() { return m_randomization; } static int getRandomization() { return m_randomization; }
static uint32_t getBlockSizeBytes() { return m_block_size_bytes; } static uint32_t getBlockSizeBytes() { return m_block_size_bytes; }
static uint32_t getBlockSizeBits() { return m_block_size_bits; } static uint32_t getBlockSizeBits() { return m_block_size_bits; }
@ -130,7 +129,6 @@ class RubySystem : public ClockedObject
private: private:
// configuration parameters // configuration parameters
static int m_random_seed;
static bool m_randomization; static bool m_randomization;
static uint32_t m_block_size_bytes; static uint32_t m_block_size_bytes;
static uint32_t m_block_size_bits; static uint32_t m_block_size_bits;