summaryrefslogtreecommitdiff
path: root/configs/ruby
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2012-04-05 11:09:19 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2012-04-05 11:09:19 -0500
commit4f4a710457af4a9c8e72632995b55f106110ac9c (patch)
tree816cc9af7167d0d016df34768fdf701ea5d3a140 /configs/ruby
parentf1a60906132fb816f80917d830b34df5e5d87ad4 (diff)
downloadgem5-4f4a710457af4a9c8e72632995b55f106110ac9c.tar.xz
Config: corrects the way Ruby attaches to the DMA ports
With recent changes to the memory system, a port cannot be assigned a peer port twice. While making use of the Ruby memory system in FS mode, DMA ports were assigned peer twice, once for the classic memory system and once for the Ruby memory system. This patch removes this double assignment of peer ports.
Diffstat (limited to 'configs/ruby')
-rw-r--r--configs/ruby/MESI_CMP_directory.py10
-rw-r--r--configs/ruby/MI_example.py11
-rw-r--r--configs/ruby/MOESI_CMP_directory.py10
-rw-r--r--configs/ruby/MOESI_CMP_token.py10
-rw-r--r--configs/ruby/MOESI_hammer.py9
-rw-r--r--configs/ruby/Network_test.py4
-rw-r--r--configs/ruby/Ruby.py5
7 files changed, 19 insertions, 40 deletions
diff --git a/configs/ruby/MESI_CMP_directory.py b/configs/ruby/MESI_CMP_directory.py
index 28aba4a1b..4d490705b 100644
--- a/configs/ruby/MESI_CMP_directory.py
+++ b/configs/ruby/MESI_CMP_directory.py
@@ -47,7 +47,7 @@ class L2Cache(RubyCache):
def define_options(parser):
return
-def create_system(options, system, piobus, dma_devices, ruby_system):
+def create_system(options, system, piobus, dma_ports, ruby_system):
if buildEnv['PROTOCOL'] != 'MESI_CMP_directory':
panic("This script requires the MESI_CMP_directory protocol to be built.")
@@ -162,7 +162,7 @@ def create_system(options, system, piobus, dma_devices, ruby_system):
cntrl_count += 1
- for i, dma_device in enumerate(dma_devices):
+ for i, dma_port in enumerate(dma_ports):
#
# Create the Ruby objects associated with the dma controller
#
@@ -175,12 +175,8 @@ def create_system(options, system, piobus, dma_devices, ruby_system):
ruby_system = ruby_system)
exec("system.dma_cntrl%d = dma_cntrl" % i)
- if dma_device.type == 'MemTest':
- exec("system.dma_cntrl%d.dma_sequencer.slave = dma_device.test" % i)
- else:
- exec("system.dma_cntrl%d.dma_sequencer.slave = dma_device.dma" % i)
+ exec("system.dma_cntrl%d.dma_sequencer.slave = dma_port" % i)
dma_cntrl_nodes.append(dma_cntrl)
-
cntrl_count += 1
all_cntrls = l1_cntrl_nodes + \
diff --git a/configs/ruby/MI_example.py b/configs/ruby/MI_example.py
index 29ed23b67..1285c4b1d 100644
--- a/configs/ruby/MI_example.py
+++ b/configs/ruby/MI_example.py
@@ -41,7 +41,7 @@ class Cache(RubyCache):
def define_options(parser):
return
-def create_system(options, system, piobus, dma_devices, ruby_system):
+def create_system(options, system, piobus, dma_ports, ruby_system):
if buildEnv['PROTOCOL'] != 'MI_example':
panic("This script requires the MI_example protocol to be built.")
@@ -135,7 +135,7 @@ def create_system(options, system, piobus, dma_devices, ruby_system):
cntrl_count += 1
- for i, dma_device in enumerate(dma_devices):
+ for i, dma_port in enumerate(dma_ports):
#
# Create the Ruby objects associated with the dma controller
#
@@ -148,13 +148,8 @@ def create_system(options, system, piobus, dma_devices, ruby_system):
ruby_system = ruby_system)
exec("system.dma_cntrl%d = dma_cntrl" % i)
- if dma_device.type == 'MemTest':
- exec("system.dma_cntrl%d.dma_sequencer.slave = dma_device.test" % i)
- else:
- exec("system.dma_cntrl%d.dma_sequencer.slave = dma_device.dma" % i)
- dma_cntrl.dma_sequencer.slave = dma_device.dma
+ exec("system.dma_cntrl%d.dma_sequencer.slave = dma_port" % i)
dma_cntrl_nodes.append(dma_cntrl)
-
cntrl_count += 1
all_cntrls = l1_cntrl_nodes + dir_cntrl_nodes + dma_cntrl_nodes
diff --git a/configs/ruby/MOESI_CMP_directory.py b/configs/ruby/MOESI_CMP_directory.py
index 753a3a37a..5bc23ea72 100644
--- a/configs/ruby/MOESI_CMP_directory.py
+++ b/configs/ruby/MOESI_CMP_directory.py
@@ -47,7 +47,7 @@ class L2Cache(RubyCache):
def define_options(parser):
return
-def create_system(options, system, piobus, dma_devices, ruby_system):
+def create_system(options, system, piobus, dma_ports, ruby_system):
if buildEnv['PROTOCOL'] != 'MOESI_CMP_directory':
panic("This script requires the MOESI_CMP_directory protocol to be built.")
@@ -159,7 +159,7 @@ def create_system(options, system, piobus, dma_devices, ruby_system):
cntrl_count += 1
- for i, dma_device in enumerate(dma_devices):
+ for i, dma_port in enumerate(dma_ports):
#
# Create the Ruby objects associated with the dma controller
#
@@ -172,12 +172,8 @@ def create_system(options, system, piobus, dma_devices, ruby_system):
ruby_system = ruby_system)
exec("system.dma_cntrl%d = dma_cntrl" % i)
- if dma_device.type == 'MemTest':
- exec("system.dma_cntrl%d.dma_sequencer.slave = dma_device.test" % i)
- else:
- exec("system.dma_cntrl%d.dma_sequencer.slave = dma_device.dma" % i)
+ exec("system.dma_cntrl%d.dma_sequencer.slave = dma_port" % i)
dma_cntrl_nodes.append(dma_cntrl)
-
cntrl_count += 1
all_cntrls = l1_cntrl_nodes + \
diff --git a/configs/ruby/MOESI_CMP_token.py b/configs/ruby/MOESI_CMP_token.py
index 064d6dd14..f621df767 100644
--- a/configs/ruby/MOESI_CMP_token.py
+++ b/configs/ruby/MOESI_CMP_token.py
@@ -54,7 +54,7 @@ def define_options(parser):
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, ruby_system):
+def create_system(options, system, piobus, dma_ports, ruby_system):
if buildEnv['PROTOCOL'] != 'MOESI_CMP_token':
panic("This script requires the MOESI_CMP_token protocol to be built.")
@@ -183,7 +183,7 @@ def create_system(options, system, piobus, dma_devices, ruby_system):
cntrl_count += 1
- for i, dma_device in enumerate(dma_devices):
+ for i, dma_port in enumerate(dma_ports):
#
# Create the Ruby objects associated with the dma controller
#
@@ -196,12 +196,8 @@ def create_system(options, system, piobus, dma_devices, ruby_system):
ruby_system = ruby_system)
exec("system.dma_cntrl%d = dma_cntrl" % i)
- if dma_device.type == 'MemTest':
- exec("system.dma_cntrl%d.dma_sequencer.slave = dma_device.test" % i)
- else:
- exec("system.dma_cntrl%d.dma_sequencer.slave = dma_device.dma" % i)
+ exec("system.dma_cntrl%d.dma_sequencer.slave = dma_port" % i)
dma_cntrl_nodes.append(dma_cntrl)
-
cntrl_count += 1
all_cntrls = l1_cntrl_nodes + \
diff --git a/configs/ruby/MOESI_hammer.py b/configs/ruby/MOESI_hammer.py
index dc9aa3392..3f9d31482 100644
--- a/configs/ruby/MOESI_hammer.py
+++ b/configs/ruby/MOESI_hammer.py
@@ -58,7 +58,7 @@ def define_options(parser):
parser.add_option("--dir-on", action="store_true",
help="Hammer: enable Full-bit Directory")
-def create_system(options, system, piobus, dma_devices, ruby_system):
+def create_system(options, system, piobus, dma_ports, ruby_system):
if buildEnv['PROTOCOL'] != 'MOESI_hammer':
panic("This script requires the MOESI_hammer protocol to be built.")
@@ -195,7 +195,7 @@ def create_system(options, system, piobus, dma_devices, ruby_system):
cntrl_count += 1
- for i, dma_device in enumerate(dma_devices):
+ for i, dma_port in enumerate(dma_ports):
#
# Create the Ruby objects associated with the dma controller
#
@@ -208,10 +208,7 @@ def create_system(options, system, piobus, dma_devices, ruby_system):
ruby_system = ruby_system)
exec("system.dma_cntrl%d = dma_cntrl" % i)
- if dma_device.type == 'MemTest':
- exec("system.dma_cntrl%d.dma_sequencer.slave = dma_device.test" % i)
- else:
- exec("system.dma_cntrl%d.dma_sequencer.slave = dma_device.dma" % i)
+ exec("system.dma_cntrl%d.dma_sequencer.slave = dma_port" % i)
dma_cntrl_nodes.append(dma_cntrl)
if options.recycle_latency:
diff --git a/configs/ruby/Network_test.py b/configs/ruby/Network_test.py
index 5c1936b51..ff07c6b4d 100644
--- a/configs/ruby/Network_test.py
+++ b/configs/ruby/Network_test.py
@@ -41,7 +41,7 @@ class Cache(RubyCache):
def define_options(parser):
return
-def create_system(options, system, piobus, dma_devices, ruby_system):
+def create_system(options, system, piobus, dma_ports, ruby_system):
if buildEnv['PROTOCOL'] != 'Network_test':
panic("This script requires the Network_test protocol to be built.")
@@ -52,7 +52,7 @@ def create_system(options, system, piobus, dma_devices, ruby_system):
# The Garnet tester protocol does not support fs nor dma
#
assert(piobus == None)
- assert(dma_devices == [])
+ assert(dma_ports == [])
#
# The ruby network creation expects the list of nodes in the system to be
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py
index c9788b0a0..1911a1eb7 100644
--- a/configs/ruby/Ruby.py
+++ b/configs/ruby/Ruby.py
@@ -76,7 +76,7 @@ def define_options(parser):
exec "import %s" % protocol
eval("%s.define_options(parser)" % protocol)
-def create_system(options, system, piobus = None, dma_devices = []):
+def create_system(options, system, piobus = None, dma_ports = []):
system.ruby = RubySystem(clock = options.clock,
stats_filename = options.ruby_stats,
@@ -87,8 +87,7 @@ def create_system(options, system, piobus = None, dma_devices = []):
exec "import %s" % protocol
try:
(cpu_sequencers, dir_cntrls, all_cntrls) = \
- eval("%s.create_system(options, system, piobus, \
- dma_devices, ruby)" \
+ eval("%s.create_system(options, system, piobus, dma_ports, ruby)"
% protocol)
except:
print "Error: could not create sytem for ruby protocol %s" % protocol