summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:19 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:19 -0800
commited814899541d65783e93a37ab320650c5075c72d (patch)
tree4f7b7078d31deb951fa085aa1f20c3ab37ddaf00 /configs
parent42bebab77973114c5d81a37b50faf521b6f0a029 (diff)
downloadgem5-ed814899541d65783e93a37ab320650c5075c72d.tar.xz
ruby: Ruby changes required to use the python config system
This patch includes the necessary changes to connect ruby objects using the python configuration system. Mainly it consists of removing unnecessary ruby object pointers and connecting the necessary object pointers using the generated param objects. This patch includes the slicc changes necessary to connect generated ruby objects together using the python configuraiton system.
Diffstat (limited to 'configs')
-rw-r--r--configs/example/memtest-ruby.py44
1 files changed, 31 insertions, 13 deletions
diff --git a/configs/example/memtest-ruby.py b/configs/example/memtest-ruby.py
index 78acafca0..8c7923512 100644
--- a/configs/example/memtest-ruby.py
+++ b/configs/example/memtest-ruby.py
@@ -102,8 +102,6 @@ class L2Cache(RubyCache):
# consistent with the NetDest list. Therefore the l1 controller nodes must be
# listed before the directory nodes and directory nodes before dma nodes, etc.
#
-
-# net_nodes = []
l1_cntrl_nodes = []
dir_cntrl_nodes = []
@@ -112,24 +110,44 @@ dir_cntrl_nodes = []
# controller constructors are called before the network constructor
#
for (i, cpu) in enumerate(cpus):
- l1_cntrl = L1Cache_Controller()
- cpu_seq = RubySequencer(controller = l1_cntrl,
- icache = L1Cache(controller = l1_cntrl),
- dcache = L1Cache(controller = l1_cntrl))
- cpu.controller = l1_cntrl
- cpu.sequencer = cpu_seq
- cpu.test = cpu_seq.port
- cpu_seq.funcmem_port = system.physmem.port
- cpu.functional = system.funcmem.port
+ #
+ # First create the Ruby objects associated with this cpu
+ # Eventually this code should go in a python file specific to the
+ # MOESI_hammer protocol
+ #
+ l1i_cache = L1Cache()
+ l1d_cache = L1Cache()
+ l2_cache = L2Cache()
+
+ cpu_seq = RubySequencer(icache = l1i_cache,
+ dcache = l1d_cache,
+ funcmem_port = system.physmem.port)
+
+ l1_cntrl = L1Cache_Controller(version = i,
+ sequencer = cpu_seq,
+ L1IcacheMemory = l1i_cache,
+ L1DcacheMemory = l1d_cache,
+ L2cacheMemory = l2_cache)
+
dir_cntrl = Directory_Controller(version = i,
directory = RubyDirectoryMemory(),
- memory_control = RubyMemoryControl())
+ memBuffer = RubyMemoryControl())
- # net_nodes += [l1_cntrl, dir_cntrl]
+ #
+ # As noted above: Two independent list are track to maintain the order of
+ # nodes/controllers assumed by the ruby network
+ #
l1_cntrl_nodes.append(l1_cntrl)
dir_cntrl_nodes.append(dir_cntrl)
+ #
+ # Finally tie the memtester ports to the correct system ports
+ #
+ cpu.test = cpu_seq.port
+ cpu.functional = system.funcmem.port
+
+
#
# Important: the topology constructor must be called before the network
# constructor.