1# Copyright (c) 2006-2007 The Regents of The University of Michigan 2# Copyright (c) 2009,2015 Advanced Micro Devices, Inc. 3# Copyright (c) 2013 Mark D. Hill and David A. Wood 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28# 29# Authors: Brad Beckmann 30# Nilay Vaish 31 32import math 33import m5 34from m5.objects import * 35from m5.defines import buildEnv |
36from Ruby import create_topology, create_directories |
37from Ruby import send_evicts 38 39# 40# Declare caches used by the protocol 41# 42class L0Cache(RubyCache): pass 43class L1Cache(RubyCache): pass 44class L2Cache(RubyCache): pass --- 16 unchanged lines hidden (view full) --- 61 # The ruby network creation expects the list of nodes in the system to be 62 # consistent with the NetDest list. Therefore the l1 controller nodes 63 # must be listed before the directory nodes and directory nodes before 64 # dma nodes, etc. 65 # 66 l0_cntrl_nodes = [] 67 l1_cntrl_nodes = [] 68 l2_cntrl_nodes = [] |
69 dma_cntrl_nodes = [] 70 71 assert (options.num_cpus % options.num_clusters == 0) 72 num_cpus_per_cluster = options.num_cpus / options.num_clusters 73 74 assert (options.num_l2caches % options.num_clusters == 0) 75 num_l2caches_per_cluster = options.num_l2caches / options.num_clusters 76 --- 111 unchanged lines hidden (view full) --- 188 189 l2_cntrl.unblockToL2Cache = MessageBuffer() 190 l2_cntrl.unblockToL2Cache.slave = ruby_system.network.master 191 l2_cntrl.L1RequestToL2Cache = MessageBuffer() 192 l2_cntrl.L1RequestToL2Cache.slave = ruby_system.network.master 193 l2_cntrl.responseToL2Cache = MessageBuffer() 194 l2_cntrl.responseToL2Cache.slave = ruby_system.network.master 195 |
196 # Run each of the ruby memory controllers at a ratio of the frequency of 197 # the ruby system 198 # clk_divider value is a fix to pass regression. 199 ruby_system.memctrl_clk_domain = DerivedClockDomain( 200 clk_domain = ruby_system.clk_domain, clk_divider = 3) 201 |
202 dir_cntrl_nodes = create_directories(options, system.mem_ranges, 203 ruby_system) 204 for dir_cntrl in dir_cntrl_nodes: |
205 # Connect the directory controllers and the network 206 dir_cntrl.requestToDir = MessageBuffer() 207 dir_cntrl.requestToDir.slave = ruby_system.network.master 208 dir_cntrl.responseToDir = MessageBuffer() 209 dir_cntrl.responseToDir.slave = ruby_system.network.master 210 dir_cntrl.responseFromDir = MessageBuffer() 211 dir_cntrl.responseFromDir.master = ruby_system.network.slave 212 dir_cntrl.responseFromMemory = MessageBuffer() --- 50 unchanged lines hidden --- |