From 10e25cb1d05bd04e177cfa44a0c529af01acfad8 Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Fri, 20 Aug 2010 11:46:11 -0700 Subject: config: Improve ruby simobject names This patch attaches ruby objects to the system before the topology is created so that their simobject names read their meaningful variable names instead of their topology name. --- configs/ruby/Ruby.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'configs/ruby/Ruby.py') diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index 77c975842..2e46dd352 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -52,13 +52,13 @@ def define_options(parser): exec "import %s" % protocol eval("%s.define_options(parser)" % protocol) -def create_system(options, physmem, piobus = None, dma_devices = []): +def create_system(options, system, piobus = None, dma_devices = []): protocol = buildEnv['PROTOCOL'] exec "import %s" % protocol try: (cpu_sequencers, dir_cntrls, all_cntrls) = \ - eval("%s.create_system(options, physmem, piobus, dma_devices)" \ + eval("%s.create_system(options, system, piobus, dma_devices)" \ % protocol) except: print "Error: could not create sytem for ruby protocol %s" % protocol @@ -91,7 +91,8 @@ def create_system(options, physmem, piobus = None, dma_devices = []): total_mem_size = MemorySize('0B') for dir_cntrl in dir_cntrls: total_mem_size.value += dir_cntrl.directory.size.value - physmem_size = long(physmem.range.second) - long(physmem.range.first) + 1 + physmem_size = long(system.physmem.range.second) - \ + long(system.physmem.range.first) + 1 assert(total_mem_size.value == physmem_size) ruby_profiler = RubyProfiler(num_of_sequencers = len(cpu_sequencers)) -- cgit v1.2.3