MOESI_CMP_token.py (10311:ad9c042dce54) MOESI_CMP_token.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;

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

50 help="Token_CMP: # of l1 retries before going persistent")
51 parser.add_option("--timeout-latency", type="int", default=300,
52 help="Token_CMP: cycles until issuing again");
53 parser.add_option("--disable-dyn-timeouts", action="store_true",
54 help="Token_CMP: disable dyanimc timeouts, use fixed latency instead")
55 parser.add_option("--allow-atomic-migration", action="store_true",
56 help="allow migratory sharing for atomic only accessed blocks")
57
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;

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

50 help="Token_CMP: # of l1 retries before going persistent")
51 parser.add_option("--timeout-latency", type="int", default=300,
52 help="Token_CMP: cycles until issuing again");
53 parser.add_option("--disable-dyn-timeouts", action="store_true",
54 help="Token_CMP: disable dyanimc timeouts, use fixed latency instead")
55 parser.add_option("--allow-atomic-migration", action="store_true",
56 help="allow migratory sharing for atomic only accessed blocks")
57
58def create_system(options, system, dma_ports, ruby_system):
58def create_system(options, full_system, system, dma_ports, ruby_system):
59
60 if buildEnv['PROTOCOL'] != 'MOESI_CMP_token':
61 panic("This script requires the MOESI_CMP_token protocol to be built.")
62
63 #
64 # number of tokens that the owner passes to requests so that shared blocks can
65 # respond to read requests
66 #

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

217 dir_cntrl.dmaResponseFromDir = ruby_system.network.slave
218
219
220 for i, dma_port in enumerate(dma_ports):
221 #
222 # Create the Ruby objects associated with the dma controller
223 #
224 dma_seq = DMASequencer(version = i,
59
60 if buildEnv['PROTOCOL'] != 'MOESI_CMP_token':
61 panic("This script requires the MOESI_CMP_token protocol to be built.")
62
63 #
64 # number of tokens that the owner passes to requests so that shared blocks can
65 # respond to read requests
66 #

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

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