summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2010-01-29 20:29:17 -0800
committerSteve Reinhardt <steve.reinhardt@amd.com>2010-01-29 20:29:17 -0800
commit0b54f1db8e8af9094229a55fab302ebfb84c31b5 (patch)
treefebc2db26bde0cb0dcd6ab168c29d08c5e04fb57 /configs
parent184cf4db5b1354552de3960fd3becbeb7ef49767 (diff)
downloadgem5-0b54f1db8e8af9094229a55fab302ebfb84c31b5.tar.xz
ruby: Add support for generating topologies in Python.
Diffstat (limited to 'configs')
-rw-r--r--configs/example/memtest-ruby.py31
1 files changed, 21 insertions, 10 deletions
diff --git a/configs/example/memtest-ruby.py b/configs/example/memtest-ruby.py
index e6684fb5a..a520754fb 100644
--- a/configs/example/memtest-ruby.py
+++ b/configs/example/memtest-ruby.py
@@ -97,24 +97,35 @@ class L2Cache(RubyCache):
latency = 15
size = 1048576
-class CrossbarTopology(Topology):
- connections="hi"
-
- for cpu in cpus:
+# It would be nice to lump all the network nodes into a single list,
+# but for consistency with the old scripts I'm segregating them by
+# type. I'm not sure if this is really necessary or not.
+
+# net_nodes = []
+l1_cntrl_nodes = []
+dir_cntrl_nodes = []
+
+for cpu in cpus:
l1_cntrl = L1Cache_Controller()
- cpu_seq = RubySequencer(controller=l1_cntrl,
- icache=L1Cache(controller=l1_cntrl),
- dcache=L1Cache(controller=l1_cntrl))
+ 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
- dir_cntrl = Directory_Controller(directory=RubyDirectoryMemory(),
- memory_control=RubyMemoryControl())
+ dir_cntrl = Directory_Controller(version = i,
+ directory = RubyDirectoryMemory(),
+ memory_control = RubyMemoryControl())
+
+ # net_nodes += [l1_cntrl, dir_cntrl]
+ l1_cntrl_nodes.append(l1_cntrl)
+ dir_cntrl_nodes.append(dir_cntrl)
-network = SimpleNetwork(topology=CrossbarTopology())
+network = SimpleNetwork(topology = makeCrossbar(l1_cntrl_nodes + \
+ dir_cntrl_nodes))
system.ruby = RubySystem(network = network,
profiler = RubyProfiler(),