diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2010-01-29 20:29:17 -0800 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2010-01-29 20:29:17 -0800 |
commit | 0b54f1db8e8af9094229a55fab302ebfb84c31b5 (patch) | |
tree | febc2db26bde0cb0dcd6ab168c29d08c5e04fb57 /configs/example | |
parent | 184cf4db5b1354552de3960fd3becbeb7ef49767 (diff) | |
download | gem5-0b54f1db8e8af9094229a55fab302ebfb84c31b5.tar.xz |
ruby: Add support for generating topologies in Python.
Diffstat (limited to 'configs/example')
-rw-r--r-- | configs/example/memtest-ruby.py | 31 |
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(), |