Deleted Added
sdiff udiff text old ( 11266:452e10b868ea ) new ( 12065:e3e51756dfef )
full compact
1# Copyright (c) 2006-2007 The Regents of The University of Michigan
2# Copyright (c) 2009 Advanced Micro Devices, Inc.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 17 unchanged lines hidden (view full) ---

26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28# Authors: Brad Beckmann
29
30import math
31import m5
32from m5.objects import *
33from m5.defines import buildEnv
34from Ruby import create_topology, create_directories
35from Ruby import send_evicts
36
37#
38# Declare caches used by the protocol
39#
40class L1Cache(RubyCache): pass
41class L2Cache(RubyCache): pass
42

--- 9 unchanged lines hidden (view full) ---

52
53 #
54 # The ruby network creation expects the list of nodes in the system to be
55 # consistent with the NetDest list. Therefore the l1 controller nodes must be
56 # listed before the directory nodes and directory nodes before dma nodes, etc.
57 #
58 l1_cntrl_nodes = []
59 l2_cntrl_nodes = []
60 dma_cntrl_nodes = []
61
62 #
63 # Must create the individual controllers before the network to ensure the
64 # controller constructors are called before the network constructor
65 #
66 l2_bits = int(math.log(options.num_l2caches, 2))
67 block_size_bits = int(math.log(options.cacheline_size, 2))

--- 84 unchanged lines hidden (view full) ---

152 l2_cntrl.GlobalRequestToL2Cache = MessageBuffer()
153 l2_cntrl.GlobalRequestToL2Cache.slave = ruby_system.network.master
154 l2_cntrl.L1RequestToL2Cache = MessageBuffer()
155 l2_cntrl.L1RequestToL2Cache.slave = ruby_system.network.master
156 l2_cntrl.responseToL2Cache = MessageBuffer()
157 l2_cntrl.responseToL2Cache.slave = ruby_system.network.master
158 l2_cntrl.triggerQueue = MessageBuffer(ordered = True)
159
160 # Run each of the ruby memory controllers at a ratio of the frequency of
161 # the ruby system.
162 # clk_divider value is a fix to pass regression.
163 ruby_system.memctrl_clk_domain = DerivedClockDomain(
164 clk_domain=ruby_system.clk_domain,
165 clk_divider=3)
166
167
168 dir_cntrl_nodes = create_directories(options, system.mem_ranges,
169 ruby_system)
170 for dir_cntrl in dir_cntrl_nodes:
171 # Connect the directory controllers and the network
172 dir_cntrl.requestToDir = MessageBuffer()
173 dir_cntrl.requestToDir.slave = ruby_system.network.master
174 dir_cntrl.responseToDir = MessageBuffer()
175 dir_cntrl.responseToDir.slave = ruby_system.network.master
176 dir_cntrl.responseFromDir = MessageBuffer()
177 dir_cntrl.responseFromDir.master = ruby_system.network.slave
178 dir_cntrl.forwardFromDir = MessageBuffer()

--- 61 unchanged lines hidden ---