MOESI_hammer.py (10440:1e3497e20cd4) MOESI_hammer.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;

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

54def define_options(parser):
55 parser.add_option("--allow-atomic-migration", action="store_true",
56 help="allow migratory sharing for atomic only accessed blocks")
57 parser.add_option("--pf-on", action="store_true",
58 help="Hammer: enable Probe Filter")
59 parser.add_option("--dir-on", action="store_true",
60 help="Hammer: enable Full-bit Directory")
61
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;

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

54def define_options(parser):
55 parser.add_option("--allow-atomic-migration", action="store_true",
56 help="allow migratory sharing for atomic only accessed blocks")
57 parser.add_option("--pf-on", action="store_true",
58 help="Hammer: enable Probe Filter")
59 parser.add_option("--dir-on", action="store_true",
60 help="Hammer: enable Full-bit Directory")
61
62def create_system(options, system, dma_ports, ruby_system):
62def create_system(options, full_system, system, dma_ports, ruby_system):
63
64 if buildEnv['PROTOCOL'] != 'MOESI_hammer':
65 panic("This script requires the MOESI_hammer protocol to be built.")
66
67 cpu_sequencers = []
68
69 #
70 # The ruby network creation expects the list of nodes in the system to be

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

219 dir_cntrl.dmaRequestToDir = ruby_system.network.master
220
221
222 for i, dma_port in enumerate(dma_ports):
223 #
224 # Create the Ruby objects associated with the dma controller
225 #
226 dma_seq = DMASequencer(version = i,
63
64 if buildEnv['PROTOCOL'] != 'MOESI_hammer':
65 panic("This script requires the MOESI_hammer protocol to be built.")
66
67 cpu_sequencers = []
68
69 #
70 # The ruby network creation expects the list of nodes in the system to be

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

219 dir_cntrl.dmaRequestToDir = ruby_system.network.master
220
221
222 for i, dma_port in enumerate(dma_ports):
223 #
224 # Create the Ruby objects associated with the dma controller
225 #
226 dma_seq = DMASequencer(version = i,
227 ruby_system = ruby_system)
227 ruby_system = ruby_system,
228 slave = dma_port)
228
229 dma_cntrl = DMA_Controller(version = i,
230 dma_sequencer = dma_seq,
231 transitions_per_cycle = options.ports,
232 ruby_system = ruby_system)
233
234 exec("ruby_system.dma_cntrl%d = dma_cntrl" % i)
229
230 dma_cntrl = DMA_Controller(version = i,
231 dma_sequencer = dma_seq,
232 transitions_per_cycle = options.ports,
233 ruby_system = ruby_system)
234
235 exec("ruby_system.dma_cntrl%d = dma_cntrl" % i)
235 exec("ruby_system.dma_cntrl%d.dma_sequencer.slave = dma_port" % i)
236 dma_cntrl_nodes.append(dma_cntrl)
237
238 if options.recycle_latency:
239 dma_cntrl.recycle_latency = options.recycle_latency
240
241 # Connect the dma controller to the network
242 dma_cntrl.responseFromDir = ruby_system.network.master
243 dma_cntrl.requestToDir = ruby_system.network.slave
244
236 dma_cntrl_nodes.append(dma_cntrl)
237
238 if options.recycle_latency:
239 dma_cntrl.recycle_latency = options.recycle_latency
240
241 # Connect the dma controller to the network
242 dma_cntrl.responseFromDir = ruby_system.network.master
243 dma_cntrl.requestToDir = ruby_system.network.slave
244
245
246 all_cntrls = l1_cntrl_nodes + dir_cntrl_nodes + dma_cntrl_nodes
245 all_cntrls = l1_cntrl_nodes + dir_cntrl_nodes + dma_cntrl_nodes
246
247 # Create the io controller and the sequencer
248 if full_system:
249 io_seq = DMASequencer(version=len(dma_ports), ruby_system=ruby_system)
250 ruby_system._io_port = io_seq
251 io_controller = DMA_Controller(version = len(dma_ports),
252 dma_sequencer = io_seq,
253 ruby_system = ruby_system)
254 ruby_system.io_controller = io_controller
255
256 # Connect the dma controller to the network
257 io_controller.responseFromDir = ruby_system.network.master
258 io_controller.requestToDir = ruby_system.network.slave
259
260 all_cntrls = all_cntrls + [io_controller]
261
247 topology = create_topology(all_cntrls, options)
248 return (cpu_sequencers, dir_cntrl_nodes, topology)
262 topology = create_topology(all_cntrls, options)
263 return (cpu_sequencers, dir_cntrl_nodes, topology)