Hey Brad,
  This patch could not have come at a better time; Just this morning, I ran
into something that would take a lot of work to get around without
functional accesses in Ruby.  I'm gunning to use it asap.

  Anyway, I've merged with these three patches, but when I try to compile, I
get a missing file error:
------------------------------------------------
SLICC writing HTML files...
IOError: [Errno 2] No such file or directory:
'/home/joel/research/m5/gem5-test/build/X86_FS/mem/ruby/system/AbstractMemory.py':
  File "/home/joel/research/m5/gem5-test/SConstruct", line 989:
    exports = 'env')
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 616:
    return apply(method, args, kw)
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 553:
    return apply(_SConscript, [self.fs,] + files, subst_kw)
  File "/usr/lib/scons/SCons/Script/SConscript.py", line 262:
    exec _file_ in call_stack[-1].globals
  File "/home/joel/research/m5/gem5-test/build/X86_FS/SConscript", line 442:
    exec('from m5.objects import %s' % modname)
  File "<string>", line 1:
    None
  File "/home/joel/research/m5/gem5-test/build/X86_FS/SConscript", line 422:
    exec file(source.abspath, 'r') in mod.__dict__
------------------------------------------------

  Is the patch just missing this file, or is there another linking problem
going on?
  Thanks,
  Joel



On Thu, Jun 30, 2011 at 11:11 PM, Brad Beckmann <[email protected]>wrote:

> changeset 5648986156db in /z/repo/gem5
> details: http://repo.gem5.org/gem5?cmd=changeset;node=5648986156db
> description:
>        Ruby: Add support for functional accesses
>        This patch rpovides functional access support in Ruby. Currently
> only
>        the M5Port of RubyPort supports functional accesses. The support for
>        functional through the PioPort will be added as a separate patch.
>
> diffstat:
>
>  configs/example/ruby_direct_test.py                |    2 +-
>  configs/example/ruby_fs.py                         |    5 +-
>  configs/example/ruby_mem_test.py                   |   24 ++-
>  configs/example/ruby_network_test.py               |    2 +-
>  configs/example/ruby_random_test.py                |    8 +-
>  configs/example/se.py                              |    2 +-
>  configs/ruby/MESI_CMP_directory.py                 |   17 +-
>  configs/ruby/MI_example.py                         |   11 +-
>  configs/ruby/MOESI_CMP_directory.py                |   19 +-
>  configs/ruby/MOESI_CMP_token.py                    |   17 +-
>  configs/ruby/MOESI_hammer.py                       |   13 +-
>  configs/ruby/Ruby.py                               |   24 +-
>  src/cpu/testers/memtest/MemTest.py                 |    2 +
>  src/cpu/testers/memtest/memtest.cc                 |   59 ++++--
>  src/cpu/testers/memtest/memtest.hh                 |    2 +
>  src/mem/packet.cc                                  |    6 +-
>  src/mem/packet.hh                                  |   19 ++
>  src/mem/protocol/MESI_CMP_directory-L1cache.sm     |    7 +
>  src/mem/protocol/MESI_CMP_directory-L2cache.sm     |    9 +-
>  src/mem/protocol/MESI_CMP_directory-dir.sm         |   15 +-
>  src/mem/protocol/MESI_CMP_directory-dma.sm         |    4 +
>  src/mem/protocol/MI_example-cache.sm               |    4 +
>  src/mem/protocol/MI_example-dir.sm                 |   10 +-
>  src/mem/protocol/MI_example-dma.sm                 |    4 +
>  src/mem/protocol/MOESI_CMP_directory-L1cache.sm    |    7 +
>  src/mem/protocol/MOESI_CMP_directory-L2cache.sm    |   24 ++-
>  src/mem/protocol/MOESI_CMP_directory-dir.sm        |   18 +-
>  src/mem/protocol/MOESI_CMP_directory-dma.sm        |    4 +
>  src/mem/protocol/MOESI_CMP_token-L1cache.sm        |    4 +
>  src/mem/protocol/MOESI_CMP_token-L2cache.sm        |    4 +
>  src/mem/protocol/MOESI_CMP_token-dir.sm            |   14 +-
>  src/mem/protocol/MOESI_CMP_token-dma.sm            |    4 +
>  src/mem/protocol/MOESI_hammer-cache.sm             |    4 +
>  src/mem/protocol/MOESI_hammer-dir.sm               |   58 +++---
>  src/mem/protocol/MOESI_hammer-dma.sm               |    4 +
>  src/mem/protocol/RubySlicc_Exports.sm              |    7 +
>  src/mem/ruby/network/Network.cc                    |    1 +
>  src/mem/ruby/network/Network.py                    |    1 +
>  src/mem/ruby/profiler/Profiler.cc                  |    2 +
>  src/mem/ruby/profiler/Profiler.py                  |    1 +
>  src/mem/ruby/recorder/Tracer.cc                    |    2 +-
>  src/mem/ruby/recorder/Tracer.py                    |    1 +
>  src/mem/ruby/slicc_interface/AbstractController.hh |    9 +-
>  src/mem/ruby/slicc_interface/Controller.py         |    1 +
>  src/mem/ruby/slicc_interface/SConscript            |    1 +
>  src/mem/ruby/system/Cache.py                       |   41 ----
>  src/mem/ruby/system/DirectoryMemory.cc             |    4 +-
>  src/mem/ruby/system/DirectoryMemory.py             |   43 -----
>  src/mem/ruby/system/RubyPort.cc                    |  175
> ++++++++++++++++++++-
>  src/mem/ruby/system/RubyPort.hh                    |    7 +-
>  src/mem/ruby/system/RubySystem.py                  |    3 -
>  src/mem/ruby/system/SConscript                     |    3 +-
>  src/mem/ruby/system/Sequencer.py                   |    1 +
>  src/mem/ruby/system/System.cc                      |   28 ++-
>  src/mem/ruby/system/System.hh                      |   13 +-
>  src/mem/slicc/ast/MemberExprAST.py                 |   19 +-
>  tests/configs/memtest-ruby.py                      |   12 +-
>  tests/configs/rubytest-ruby.py                     |    8 +-
>  tests/configs/simple-timing-mp-ruby.py             |    2 +-
>  tests/configs/simple-timing-ruby.py                |    2 +-
>  60 files changed, 572 insertions(+), 245 deletions(-)
>
> diffs (truncated from 1916 to 300 lines):
>
> diff -r 4adb1148ef73 -r 5648986156db configs/example/ruby_direct_test.py
> --- a/configs/example/ruby_direct_test.py       Tue Jun 28 18:27:38 2011
> -0500
> +++ b/configs/example/ruby_direct_test.py       Thu Jun 30 19:49:26 2011
> -0500
> @@ -97,7 +97,7 @@
>                                    options.requests,
>                                    generator = generator)
>
> -system.ruby = Ruby.create_system(options, system)
> +Ruby.create_system(options, system)
>
>  assert(options.num_cpus == len(system.ruby._cpu_ruby_ports))
>
> diff -r 4adb1148ef73 -r 5648986156db configs/example/ruby_fs.py
> --- a/configs/example/ruby_fs.py        Tue Jun 28 18:27:38 2011 -0500
> +++ b/configs/example/ruby_fs.py        Thu Jun 30 19:49:26 2011 -0500
> @@ -117,10 +117,7 @@
>  else:
>     fatal("incapable of building non-alpha or non-x86 full system!")
>
> -system.ruby = Ruby.create_system(options,
> -                                 system,
> -                                 system.piobus,
> -                                 system._dma_devices)
> +Ruby.create_system(options, system, system.piobus, system._dma_devices)
>
>  system.cpu = [CPUClass(cpu_id=i) for i in xrange(options.num_cpus)]
>
> diff -r 4adb1148ef73 -r 5648986156db configs/example/ruby_mem_test.py
> --- a/configs/example/ruby_mem_test.py  Tue Jun 28 18:27:38 2011 -0500
> +++ b/configs/example/ruby_mem_test.py  Thu Jun 30 19:49:26 2011 -0500
> @@ -55,6 +55,10 @@
>                   help="Progress message interval "
>                   "[default: %default]")
>  parser.add_option("--num-dmas", type="int", default=0, help="# of dma
> testers")
> +parser.add_option("--functional", type="int", default=0,
> +                  help="percentage of accesses that should be functional")
> +parser.add_option("--suppress-func-warnings", action="store_true",
> +                  help="suppress warnings when functional accesses fail")
>
>  #
>  # Add the ruby specific and protocol specific options
> @@ -90,14 +94,15 @@
>      sys.exit(1)
>
>  #
> -# Currently ruby does not support atomic, functional, or uncacheable
> accesses
> +# Currently ruby does not support atomic or uncacheable accesses
>  #
>  cpus = [ MemTest(atomic = False, \
>                  max_loads = options.maxloads, \
>                  issue_dmas = False, \
> -                 percent_functional = 0, \
> +                 percent_functional = options.functional, \
>                  percent_uncacheable = 0, \
> -                 progress_interval = options.progress) \
> +                 progress_interval = options.progress, \
> +                 suppress_func_warnings = options.suppress_func_warnings)
> \
>          for i in xrange(options.num_cpus) ]
>
>  system = System(cpu = cpus,
> @@ -110,15 +115,14 @@
>                      issue_dmas = True, \
>                      percent_functional = 0, \
>                      percent_uncacheable = 0, \
> -                     progress_interval = options.progress) \
> +                     progress_interval = options.progress, \
> +                     warn_on_failure = options.warn_on_failure) \
>              for i in xrange(options.num_dmas) ]
>     system.dma_devices = dmas
>  else:
>     dmas = []
>
> -system.ruby = Ruby.create_system(options, \
> -                                 system, \
> -                                 dma_devices = dmas)
> +Ruby.create_system(options, system, dma_devices = dmas)
>
>  #
>  # The tester is most effective when randomization is turned on and
> @@ -141,6 +145,12 @@
>     #
>     system.ruby._cpu_ruby_ports[i].deadlock_threshold = 5000000
>
> +    #
> +    # Ruby doesn't need the backing image of memory when running with
> +    # the tester.
> +    #
> +    system.ruby._cpu_ruby_ports[i].access_phys_mem = False
> +
>  for (i, dma) in enumerate(dmas):
>     #
>     # Tie the dma memtester ports to the correct functional port
> diff -r 4adb1148ef73 -r 5648986156db configs/example/ruby_network_test.py
> --- a/configs/example/ruby_network_test.py      Tue Jun 28 18:27:38 2011
> -0500
> +++ b/configs/example/ruby_network_test.py      Thu Jun 30 19:49:26 2011
> -0500
> @@ -105,7 +105,7 @@
>  system = System(cpu = cpus,
>                 physmem = PhysicalMemory())
>
> -system.ruby = Ruby.create_system(options, system)
> +Ruby.create_system(options, system)
>
>  i = 0
>  for ruby_port in system.ruby._cpu_ruby_ports:
> diff -r 4adb1148ef73 -r 5648986156db configs/example/ruby_random_test.py
> --- a/configs/example/ruby_random_test.py       Tue Jun 28 18:27:38 2011
> -0500
> +++ b/configs/example/ruby_random_test.py       Thu Jun 30 19:49:26 2011
> -0500
> @@ -99,7 +99,7 @@
>  #
>  system = System(tester = tester, physmem = PhysicalMemory())
>
> -system.ruby = Ruby.create_system(options, system)
> +Ruby.create_system(options, system)
>
>  assert(options.num_cpus == len(system.ruby._cpu_ruby_ports))
>
> @@ -121,6 +121,12 @@
>     #
>     ruby_port.using_ruby_tester = True
>
> +    #
> +    # Ruby doesn't need the backing image of memory when running with
> +    # the tester.
> +    #
> +    ruby_port.access_phys_mem = False
> +
>  # -----------------------
>  # run simulation
>  # -----------------------
> diff -r 4adb1148ef73 -r 5648986156db configs/example/se.py
> --- a/configs/example/se.py     Tue Jun 28 18:27:38 2011 -0500
> +++ b/configs/example/se.py     Thu Jun 30 19:49:26 2011 -0500
> @@ -177,7 +177,7 @@
>
>  if options.ruby:
>     options.use_map = True
> -    system.ruby = Ruby.create_system(options, system)
> +    Ruby.create_system(options, system)
>     assert(options.num_cpus == len(system.ruby._cpu_ruby_ports))
>  else:
>     system.physmem.port = system.membus.port
> diff -r 4adb1148ef73 -r 5648986156db configs/ruby/MESI_CMP_directory.py
> --- a/configs/ruby/MESI_CMP_directory.py        Tue Jun 28 18:27:38 2011
> -0500
> +++ b/configs/ruby/MESI_CMP_directory.py        Thu Jun 30 19:49:26 2011
> -0500
> @@ -47,7 +47,7 @@
>  def define_options(parser):
>     return
>
> -def create_system(options, system, piobus, dma_devices):
> +def create_system(options, system, piobus, dma_devices, ruby_system):
>
>     if buildEnv['PROTOCOL'] != 'MESI_CMP_directory':
>         panic("This script requires the MESI_CMP_directory protocol to be
> built.")
> @@ -88,13 +88,15 @@
>                                       cntrl_id = cntrl_count,
>                                       L1IcacheMemory = l1i_cache,
>                                       L1DcacheMemory = l1d_cache,
> -                                      l2_select_num_bits = l2_bits)
> +                                      l2_select_num_bits = l2_bits,
> +                                      ruby_system = ruby_system)
>
>         cpu_seq = RubySequencer(version = i,
>                                 icache = l1i_cache,
>                                 dcache = l1d_cache,
>                                 physMemPort = system.physmem.port,
> -                                physmem = system.physmem)
> +                                physmem = system.physmem,
> +                                ruby_system = ruby_system)
>
>         l1_cntrl.sequencer = cpu_seq
>
> @@ -123,7 +125,8 @@
>
>         l2_cntrl = L2Cache_Controller(version = i,
>                                       cntrl_id = cntrl_count,
> -                                      L2cacheMemory = l2_cache)
> +                                      L2cacheMemory = l2_cache,
> +                                      ruby_system = ruby_system)
>
>         exec("system.l2_cntrl%d = l2_cntrl" % i)
>         l2_cntrl_nodes.append(l2_cntrl)
> @@ -148,9 +151,9 @@
>                                          cntrl_id = cntrl_count,
>                                          directory = \
>                                          RubyDirectoryMemory(version = i,
> -                                                             size = \
> -                                                               dir_size),
> -                                         memBuffer = mem_cntrl)
> +                                                             size =
> dir_size),
> +                                         memBuffer = mem_cntrl,
> +                                         ruby_system = ruby_system)
>
>         exec("system.dir_cntrl%d = dir_cntrl" % i)
>         dir_cntrl_nodes.append(dir_cntrl)
> diff -r 4adb1148ef73 -r 5648986156db configs/ruby/MI_example.py
> --- a/configs/ruby/MI_example.py        Tue Jun 28 18:27:38 2011 -0500
> +++ b/configs/ruby/MI_example.py        Thu Jun 30 19:49:26 2011 -0500
> @@ -41,7 +41,7 @@
>  def define_options(parser):
>     return
>
> -def create_system(options, system, piobus, dma_devices):
> +def create_system(options, system, piobus, dma_devices, ruby_system):
>
>     if buildEnv['PROTOCOL'] != 'MI_example':
>         panic("This script requires the MI_example protocol to be built.")
> @@ -80,13 +80,15 @@
>         #
>         l1_cntrl = L1Cache_Controller(version = i,
>                                       cntrl_id = cntrl_count,
> -                                      cacheMemory = cache)
> +                                      cacheMemory = cache,
> +                                      ruby_system = ruby_system)
>
>         cpu_seq = RubySequencer(version = i,
>                                 icache = cache,
>                                 dcache = cache,
>                                 physMemPort = system.physmem.port,
> -                                physmem = system.physmem)
> +                                physmem = system.physmem,
> +                                ruby_system = ruby_system)
>
>         l1_cntrl.sequencer = cpu_seq
>
> @@ -125,7 +127,8 @@
>                                                     use_map =
> options.use_map,
>                                                     map_levels = \
>                                                       options.map_levels),
> -                                         memBuffer = mem_cntrl)
> +                                         memBuffer = mem_cntrl,
> +                                         ruby_system = ruby_system)
>
>         exec("system.dir_cntrl%d = dir_cntrl" % i)
>         dir_cntrl_nodes.append(dir_cntrl)
> diff -r 4adb1148ef73 -r 5648986156db configs/ruby/MOESI_CMP_directory.py
> --- a/configs/ruby/MOESI_CMP_directory.py       Tue Jun 28 18:27:38 2011
> -0500
> +++ b/configs/ruby/MOESI_CMP_directory.py       Thu Jun 30 19:49:26 2011
> -0500
> @@ -47,8 +47,8 @@
>  def define_options(parser):
>     return
>
> -def create_system(options, system, piobus, dma_devices):
> -
> +def create_system(options, system, piobus, dma_devices, ruby_system):
> +
>     if buildEnv['PROTOCOL'] != 'MOESI_CMP_directory':
>         panic("This script requires the MOESI_CMP_directory protocol to be
> built.")
>
> @@ -88,13 +88,15 @@
>                                       cntrl_id = cntrl_count,
>                                       L1IcacheMemory = l1i_cache,
>                                       L1DcacheMemory = l1d_cache,
> -                                      l2_select_num_bits = l2_bits)
> +                                      l2_select_num_bits = l2_bits,
> +                                      ruby_system = ruby_system)
>
>         cpu_seq = RubySequencer(version = i,
>                                 icache = l1i_cache,
>                                 dcache = l1d_cache,
>                                 physMemPort = system.physmem.port,
> -                                physmem = system.physmem)
> +                                physmem = system.physmem,
> +                                ruby_system = ruby_system)
>
>         l1_cntrl.sequencer = cpu_seq
>
> @@ -122,7 +124,8 @@
>
>         l2_cntrl = L2Cache_Controller(version = i,
>                                       cntrl_id = cntrl_count,
> -                                      L2cacheMemory = l2_cache)
> +                                      L2cacheMemory = l2_cache,
> +                                      ruby_system = ruby_system)
>
>         exec("system.l2_cntrl%d = l2_cntrl" % i)
>         l2_cntrl_nodes.append(l2_cntrl)
> @@ -147,9 +150,9 @@
>                                          cntrl_id = cntrl_count,
>                                          directory = \
>                                          RubyDirectoryMemory(version = i,
> -                                                             size = \
> -                                                             dir_size),
> -                                         memBuffer = mem_cntrl)
> +                                                             size =
> dir_size),
> +                                         memBuffer = mem_cntrl,
> +                                         ruby_system = ruby_system)
>
>         exec("system.dir_cntrl%d = dir_cntrl" % i)
>         dir_cntrl_nodes.append(dir_cntrl)
> diff -r 4adb1148ef73 -r 5648986156db configs/ruby/MOESI_CMP_token.py
> --- a/configs/ruby/MOESI_CMP_token.py   Tue Jun 28 18:27:38 2011 -0500
> +++ b/configs/ruby/MOESI_CMP_token.py   Thu Jun 30 19:49:26 2011 -0500
> @@ -54,7 +54,7 @@
>     parser.add_option("--allow-atomic-migration", action="store_true",
>           help="allow migratory sharing for atomic only accessed blocks")
>
> -def create_system(options, system, piobus, dma_devices):
> +def create_system(options, system, piobus, dma_devices, ruby_system):
>
>     if buildEnv['PROTOCOL'] != 'MOESI_CMP_token':
> _______________________________________________
> gem5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/gem5-dev
>



-- 
  Joel Hestness
  PhD Student, Computer Architecture
  Dept. of Computer Science, University of Texas - Austin
  http://www.cs.utexas.edu/~hestness
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to