MESI_Three_Level.py (12065:e3e51756dfef) | MESI_Three_Level.py (12598:b80b2d9a251b) |
---|---|
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 --- 35 unchanged lines hidden (view full) --- 44class L2Cache(RubyCache): pass 45 46def define_options(parser): 47 parser.add_option("--num-clusters", type = "int", default = 1, 48 help = "number of clusters in a design in which there are shared\ 49 caches private to clusters") 50 return 51 | 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 --- 35 unchanged lines hidden (view full) --- 44class L2Cache(RubyCache): pass 45 46def define_options(parser): 47 parser.add_option("--num-clusters", type = "int", default = 1, 48 help = "number of clusters in a design in which there are shared\ 49 caches private to clusters") 50 return 51 |
52def create_system(options, full_system, system, dma_ports, ruby_system): | 52def create_system(options, full_system, system, dma_ports, bootmem, 53 ruby_system): |
53 54 if buildEnv['PROTOCOL'] != 'MESI_Three_Level': 55 fatal("This script requires the MESI_Three_Level protocol to be\ 56 built.") 57 58 cpu_sequencers = [] 59 60 # --- 133 unchanged lines hidden (view full) --- 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 | 54 55 if buildEnv['PROTOCOL'] != 'MESI_Three_Level': 56 fatal("This script requires the MESI_Three_Level protocol to be\ 57 built.") 58 59 cpu_sequencers = [] 60 61 # --- 133 unchanged lines hidden (view full) --- 195 l2_cntrl.responseToL2Cache.slave = ruby_system.network.master 196 197 # Run each of the ruby memory controllers at a ratio of the frequency of 198 # the ruby system 199 # clk_divider value is a fix to pass regression. 200 ruby_system.memctrl_clk_domain = DerivedClockDomain( 201 clk_domain = ruby_system.clk_domain, clk_divider = 3) 202 |
202 dir_cntrl_nodes = create_directories(options, system.mem_ranges, 203 ruby_system) | 203 mem_dir_cntrl_nodes, rom_dir_cntrl_node = create_directories( 204 options, system.mem_ranges, bootmem, ruby_system, system) 205 dir_cntrl_nodes = mem_dir_cntrl_nodes[:] 206 if rom_dir_cntrl_node is not None: 207 dir_cntrl_nodes.append(rom_dir_cntrl_node) |
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 --- 42 unchanged lines hidden (view full) --- 254 io_controller.responseFromDir.slave = ruby_system.network.master 255 io_controller.requestToDir = MessageBuffer() 256 io_controller.requestToDir.master = ruby_system.network.slave 257 258 all_cntrls = all_cntrls + [io_controller] 259 260 ruby_system.network.number_of_virtual_networks = 3 261 topology = create_topology(all_cntrls, options) | 208 for dir_cntrl in dir_cntrl_nodes: 209 # Connect the directory controllers and the network 210 dir_cntrl.requestToDir = MessageBuffer() 211 dir_cntrl.requestToDir.slave = ruby_system.network.master 212 dir_cntrl.responseToDir = MessageBuffer() 213 dir_cntrl.responseToDir.slave = ruby_system.network.master 214 dir_cntrl.responseFromDir = MessageBuffer() 215 dir_cntrl.responseFromDir.master = ruby_system.network.slave --- 42 unchanged lines hidden (view full) --- 258 io_controller.responseFromDir.slave = ruby_system.network.master 259 io_controller.requestToDir = MessageBuffer() 260 io_controller.requestToDir.master = ruby_system.network.slave 261 262 all_cntrls = all_cntrls + [io_controller] 263 264 ruby_system.network.number_of_virtual_networks = 3 265 topology = create_topology(all_cntrls, options) |
262 return (cpu_sequencers, dir_cntrl_nodes, topology) | 266 return (cpu_sequencers, mem_dir_cntrl_nodes, topology) |