MOESI_CMP_directory.py (10311:ad9c042dce54) | MOESI_CMP_directory.py (10519:7a3ad4b09ce4) |
---|---|
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; --- 34 unchanged lines hidden (view full) --- 43# Note: the L2 Cache latency is not currently used 44# 45class L2Cache(RubyCache): 46 latency = 15 47 48def define_options(parser): 49 return 50 | 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; --- 34 unchanged lines hidden (view full) --- 43# Note: the L2 Cache latency is not currently used 44# 45class L2Cache(RubyCache): 46 latency = 15 47 48def define_options(parser): 49 return 50 |
51def create_system(options, system, dma_ports, ruby_system): | 51def create_system(options, full_system, system, dma_ports, ruby_system): |
52 53 if buildEnv['PROTOCOL'] != 'MOESI_CMP_directory': 54 panic("This script requires the MOESI_CMP_directory protocol to be built.") 55 56 cpu_sequencers = [] 57 58 # 59 # The ruby network creation expects the list of nodes in the system to be --- 127 unchanged lines hidden (view full) --- 187 dir_cntrl.forwardFromDir = ruby_system.network.slave 188 189 190 for i, dma_port in enumerate(dma_ports): 191 # 192 # Create the Ruby objects associated with the dma controller 193 # 194 dma_seq = DMASequencer(version = i, | 52 53 if buildEnv['PROTOCOL'] != 'MOESI_CMP_directory': 54 panic("This script requires the MOESI_CMP_directory protocol to be built.") 55 56 cpu_sequencers = [] 57 58 # 59 # The ruby network creation expects the list of nodes in the system to be --- 127 unchanged lines hidden (view full) --- 187 dir_cntrl.forwardFromDir = ruby_system.network.slave 188 189 190 for i, dma_port in enumerate(dma_ports): 191 # 192 # Create the Ruby objects associated with the dma controller 193 # 194 dma_seq = DMASequencer(version = i, |
195 ruby_system = ruby_system) | 195 ruby_system = ruby_system, 196 slave = dma_port) |
196 197 dma_cntrl = DMA_Controller(version = i, 198 dma_sequencer = dma_seq, 199 transitions_per_cycle = options.ports, 200 ruby_system = ruby_system) 201 202 exec("ruby_system.dma_cntrl%d = dma_cntrl" % i) | 197 198 dma_cntrl = DMA_Controller(version = i, 199 dma_sequencer = dma_seq, 200 transitions_per_cycle = options.ports, 201 ruby_system = ruby_system) 202 203 exec("ruby_system.dma_cntrl%d = dma_cntrl" % i) |
203 exec("ruby_system.dma_cntrl%d.dma_sequencer.slave = dma_port" % i) | |
204 dma_cntrl_nodes.append(dma_cntrl) 205 | 204 dma_cntrl_nodes.append(dma_cntrl) 205 |
206 # Connect the dma controller to the network 207 dma_cntrl.responseFromDir = ruby_system.network.master 208 dma_cntrl.reqToDir = ruby_system.network.slave 209 dma_cntrl.respToDir = ruby_system.network.slave |
|
206 | 210 |
211 |
|
207 all_cntrls = l1_cntrl_nodes + \ 208 l2_cntrl_nodes + \ 209 dir_cntrl_nodes + \ 210 dma_cntrl_nodes 211 | 212 all_cntrls = l1_cntrl_nodes + \ 213 l2_cntrl_nodes + \ 214 dir_cntrl_nodes + \ 215 dma_cntrl_nodes 216 |
217 # Create the io controller and the sequencer 218 if full_system: 219 io_seq = DMASequencer(version=len(dma_ports), ruby_system=ruby_system) 220 ruby_system._io_port = io_seq 221 io_controller = DMA_Controller(version = len(dma_ports), 222 dma_sequencer = io_seq, 223 ruby_system = ruby_system) 224 ruby_system.io_controller = io_controller 225 226 # Connect the dma controller to the network 227 io_controller.responseFromDir = ruby_system.network.master 228 io_controller.reqToDir = ruby_system.network.slave 229 io_controller.respToDir = ruby_system.network.slave 230 231 all_cntrls = all_cntrls + [io_controller] 232 233 |
|
212 topology = create_topology(all_cntrls, options) 213 return (cpu_sequencers, dir_cntrl_nodes, topology) | 234 topology = create_topology(all_cntrls, options) 235 return (cpu_sequencers, dir_cntrl_nodes, topology) |