From 9a8cb7db7e86c25a755f2e2817a0385b13e3ac32 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Tue, 22 Sep 2009 15:24:16 -0700 Subject: python: Move more code into m5.util allow SCons to use that code. Get rid of misc.py and just stick misc things in __init__.py Move utility functions out of SCons files and into m5.util Move utility type stuff from m5/__init__.py to m5/util/__init__.py Remove buildEnv from m5 and allow access only from m5.defines Rename AddToPath to addToPath while we're moving it to m5.util Rename read_command to readCommand while we're moving it Rename compare_versions to compareVersions while we're moving it. --HG-- rename : src/python/m5/convert.py => src/python/m5/util/convert.py rename : src/python/m5/smartdict.py => src/python/m5/util/smartdict.py --- tests/configs/inorder-timing.py | 2 +- tests/configs/o3-timing-mp-ruby.py | 2 +- tests/configs/o3-timing-mp.py | 2 +- tests/configs/o3-timing-ruby.py | 2 +- tests/configs/o3-timing.py | 2 +- tests/configs/t1000-simple-atomic.py | 2 +- tests/configs/tsunami-o3-dual.py | 2 +- tests/configs/tsunami-o3.py | 2 +- tests/configs/tsunami-simple-atomic-dual.py | 2 +- tests/configs/tsunami-simple-atomic.py | 2 +- tests/configs/tsunami-simple-timing-dual.py | 2 +- tests/configs/tsunami-simple-timing.py | 2 +- tests/configs/twosys-tsunami-simple-atomic.py | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) (limited to 'tests/configs') diff --git a/tests/configs/inorder-timing.py b/tests/configs/inorder-timing.py index 62f8b5850..10f9e4232 100644 --- a/tests/configs/inorder-timing.py +++ b/tests/configs/inorder-timing.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') class MyCache(BaseCache): assoc = 2 diff --git a/tests/configs/o3-timing-mp-ruby.py b/tests/configs/o3-timing-mp-ruby.py index eab9bfaf2..77e1ba992 100644 --- a/tests/configs/o3-timing-mp-ruby.py +++ b/tests/configs/o3-timing-mp-ruby.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') nb_cores = 4 cpus = [ DerivO3CPU(cpu_id=i) for i in xrange(nb_cores) ] diff --git a/tests/configs/o3-timing-mp.py b/tests/configs/o3-timing-mp.py index fc6a72a82..59776d5c3 100644 --- a/tests/configs/o3-timing-mp.py +++ b/tests/configs/o3-timing-mp.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') # -------------------- # Base L1 Cache diff --git a/tests/configs/o3-timing-ruby.py b/tests/configs/o3-timing-ruby.py index a91a9cf39..f7ad41d99 100644 --- a/tests/configs/o3-timing-ruby.py +++ b/tests/configs/o3-timing-ruby.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') import ruby_config diff --git a/tests/configs/o3-timing.py b/tests/configs/o3-timing.py index 366a3eb0d..563772213 100644 --- a/tests/configs/o3-timing.py +++ b/tests/configs/o3-timing.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') class MyCache(BaseCache): assoc = 2 diff --git a/tests/configs/t1000-simple-atomic.py b/tests/configs/t1000-simple-atomic.py index 6a078e715..35b329f57 100644 --- a/tests/configs/t1000-simple-atomic.py +++ b/tests/configs/t1000-simple-atomic.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') import FSConfig cpu = AtomicSimpleCPU(cpu_id=0) diff --git a/tests/configs/tsunami-o3-dual.py b/tests/configs/tsunami-o3-dual.py index 3044f5433..76aca3806 100644 --- a/tests/configs/tsunami-o3-dual.py +++ b/tests/configs/tsunami-o3-dual.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') import FSConfig diff --git a/tests/configs/tsunami-o3.py b/tests/configs/tsunami-o3.py index 34fa235bd..9b52cd92b 100644 --- a/tests/configs/tsunami-o3.py +++ b/tests/configs/tsunami-o3.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') import FSConfig diff --git a/tests/configs/tsunami-simple-atomic-dual.py b/tests/configs/tsunami-simple-atomic-dual.py index 593b02680..dfbdd101d 100644 --- a/tests/configs/tsunami-simple-atomic-dual.py +++ b/tests/configs/tsunami-simple-atomic-dual.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') import FSConfig # -------------------- diff --git a/tests/configs/tsunami-simple-atomic.py b/tests/configs/tsunami-simple-atomic.py index 0c6feaeac..cfc619b06 100644 --- a/tests/configs/tsunami-simple-atomic.py +++ b/tests/configs/tsunami-simple-atomic.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') import FSConfig # -------------------- diff --git a/tests/configs/tsunami-simple-timing-dual.py b/tests/configs/tsunami-simple-timing-dual.py index 212449914..ce17475e3 100644 --- a/tests/configs/tsunami-simple-timing-dual.py +++ b/tests/configs/tsunami-simple-timing-dual.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') import FSConfig # -------------------- diff --git a/tests/configs/tsunami-simple-timing.py b/tests/configs/tsunami-simple-timing.py index f0eaa08d7..0c3984628 100644 --- a/tests/configs/tsunami-simple-timing.py +++ b/tests/configs/tsunami-simple-timing.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') import FSConfig diff --git a/tests/configs/twosys-tsunami-simple-atomic.py b/tests/configs/twosys-tsunami-simple-atomic.py index e7214a059..ce191930e 100644 --- a/tests/configs/twosys-tsunami-simple-atomic.py +++ b/tests/configs/twosys-tsunami-simple-atomic.py @@ -28,7 +28,7 @@ import m5 from m5.objects import * -m5.AddToPath('../configs/common') +m5.util.addToPath('../configs/common') from FSConfig import * from Benchmarks import * -- cgit v1.2.3 From 3cf24f9716eebab8c24fa645d02c636584033514 Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Wed, 18 Nov 2009 13:55:58 -0800 Subject: ruby: Support for merging ALPHA_FS and ruby Connects M5 cpu and dma ports directly to ruby sequencers and dma sequencers. Rubymem also includes a pio port so that pio requests and be forwarded to a special pio bus connecting to device pio ports. --- tests/configs/ruby_config.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'tests/configs') diff --git a/tests/configs/ruby_config.py b/tests/configs/ruby_config.py index 7b8e27613..000b7d23f 100644 --- a/tests/configs/ruby_config.py +++ b/tests/configs/ruby_config.py @@ -4,17 +4,25 @@ import subprocess from os.path import dirname, join as joinpath import m5 +from m5.params import * -def generate(config_file, cores=1, memories=1, memory_size=1024): +def generate(config_file, cores=1, memories=1, memory_size=1024, \ + cache_size=32768, cache_assoc=8, dmas=1, + ruby_tick='1t'): default = joinpath(dirname(__file__), '../../src/mem/ruby/config') ruby_config = os.environ.get('RUBY_CONFIG', default) args = [ "ruby", "-I", ruby_config, joinpath(ruby_config, "print_cfg.rb"), "-r", joinpath(ruby_config, config_file), "-p", str(cores), - "-m", str(memories), "-s", str(memory_size)] + "-m", str(memories), "-s", str(memory_size), "-C", str(cache_size), + "-A", str(cache_assoc), "-D", str(dmas)] temp_config = joinpath(m5.options.outdir, "ruby.config") ret = subprocess.call(args, stdout=file(temp_config, "w")) if ret != 0: raise RuntimeError, "subprocess failed!" - return m5.objects.RubyMemory(config_file=temp_config, num_cpus=cores) + return m5.objects.RubyMemory(clock = ruby_tick, + config_file = temp_config, + num_cpus = cores, + range = AddrRange(str(memory_size)+"MB"), + num_dmas = dmas) -- cgit v1.2.3 From 90d6e2652fc8590116d436a1143700e11893cfa4 Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Wed, 18 Nov 2009 13:55:58 -0800 Subject: ruby: included ruby config parameter ports per core Slightly improved the major hack need to correctly assign the number of ports per core. CPUs have two ports: icache + dcache. MemTester has one port. --- tests/configs/ruby_config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/configs') diff --git a/tests/configs/ruby_config.py b/tests/configs/ruby_config.py index 000b7d23f..fec7bd36c 100644 --- a/tests/configs/ruby_config.py +++ b/tests/configs/ruby_config.py @@ -8,7 +8,7 @@ from m5.params import * def generate(config_file, cores=1, memories=1, memory_size=1024, \ cache_size=32768, cache_assoc=8, dmas=1, - ruby_tick='1t'): + ruby_tick='1t', ports_per_cpu=2): default = joinpath(dirname(__file__), '../../src/mem/ruby/config') ruby_config = os.environ.get('RUBY_CONFIG', default) args = [ "ruby", "-I", ruby_config, joinpath(ruby_config, "print_cfg.rb"), @@ -25,4 +25,5 @@ def generate(config_file, cores=1, memories=1, memory_size=1024, \ config_file = temp_config, num_cpus = cores, range = AddrRange(str(memory_size)+"MB"), - num_dmas = dmas) + num_dmas = dmas, + ports_per_core = ports_per_cpu) -- cgit v1.2.3 From 295516a590b6e47c9a881f193027447e500c749c Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Wed, 18 Nov 2009 18:00:41 -0800 Subject: m5: refreshed the ruby memtest regression stats --- tests/configs/memtest-ruby.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/configs') diff --git a/tests/configs/memtest-ruby.py b/tests/configs/memtest-ruby.py index 00a668a7b..c564ec600 100644 --- a/tests/configs/memtest-ruby.py +++ b/tests/configs/memtest-ruby.py @@ -35,7 +35,10 @@ nb_cores = 8 cpus = [ MemTest() for i in xrange(nb_cores) ] import ruby_config -ruby_memory = ruby_config.generate("MI_example-homogeneous.rb", nb_cores) +ruby_memory = ruby_config.generate("MI_example-homogeneous.rb", + cores = nb_cores, + cache_size = 256, + cache_assoc = 2) # system simulated system = System(cpu = cpus, funcmem = PhysicalMemory(), -- cgit v1.2.3