summaryrefslogtreecommitdiff
path: root/configs/ruby/MI_example.py
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2017-03-13 18:19:08 +0000
committerNikos Nikoleris <nikos.nikoleris@arm.com>2017-06-13 15:52:32 +0000
commit12db50c89584938839e035da47d206250cbfd7c2 (patch)
tree831a4151b29cdc14958b8dab2cce97fc3136d7b6 /configs/ruby/MI_example.py
parentdd3fc1f996679f4cfd29f980d43a0652542e6d9b (diff)
downloadgem5-12db50c89584938839e035da47d206250cbfd7c2.tar.xz
ruby: Add support for address ranges in the directory
Previously the directory covered a flat address range that always started from address 0. This change adds a vector of address ranges with interleaving and hashing that each directory keeps track of and the necessary flexibility to support systems with non continuous memory ranges. Change-Id: I6ea1c629bdf4c5137b7d9c89dbaf6c826adfd977 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/2903 Reviewed-by: Bradford Beckmann <brad.beckmann@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'configs/ruby/MI_example.py')
-rw-r--r--configs/ruby/MI_example.py18
1 files changed, 4 insertions, 14 deletions
diff --git a/configs/ruby/MI_example.py b/configs/ruby/MI_example.py
index 24b0f9716..eb881e55c 100644
--- a/configs/ruby/MI_example.py
+++ b/configs/ruby/MI_example.py
@@ -31,7 +31,7 @@ import math
import m5
from m5.objects import *
from m5.defines import buildEnv
-from Ruby import create_topology
+from Ruby import create_topology, create_directories
from Ruby import send_evicts
#
@@ -55,7 +55,6 @@ def create_system(options, full_system, system, dma_ports, ruby_system):
# listed before the directory nodes and directory nodes before dma nodes, etc.
#
l1_cntrl_nodes = []
- dir_cntrl_nodes = []
dma_cntrl_nodes = []
#
@@ -126,18 +125,9 @@ def create_system(options, full_system, system, dma_ports, ruby_system):
clk_domain=ruby_system.clk_domain,
clk_divider=3)
- for i in xrange(options.num_dirs):
- dir_size = MemorySize('0B')
- dir_size.value = mem_module_size
- dir_cntrl = Directory_Controller(version = i,
- directory = RubyDirectoryMemory(
- version = i, size = dir_size),
- transitions_per_cycle = options.ports,
- ruby_system = ruby_system)
-
- exec("ruby_system.dir_cntrl%d = dir_cntrl" % i)
- dir_cntrl_nodes.append(dir_cntrl)
-
+ dir_cntrl_nodes = create_directories(options, system.mem_ranges,
+ ruby_system)
+ for dir_cntrl in dir_cntrl_nodes:
# Connect the directory controllers and the network
dir_cntrl.requestToDir = MessageBuffer(ordered = True)
dir_cntrl.requestToDir.slave = ruby_system.network.master