MOESI_CMP_token.py (8923:820111f58fbb) MOESI_CMP_token.py (8929:4148f9af0b70)
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;

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

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

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

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

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

178 l2_select_num_bits = l2_bits,
179 ruby_system = ruby_system)
180
181 exec("system.dir_cntrl%d = dir_cntrl" % i)
182 dir_cntrl_nodes.append(dir_cntrl)
183
184 cntrl_count += 1
185
58
59 if buildEnv['PROTOCOL'] != 'MOESI_CMP_token':
60 panic("This script requires the MOESI_CMP_token protocol to be built.")
61
62 #
63 # number of tokens that the owner passes to requests so that shared blocks can
64 # respond to read requests
65 #

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

178 l2_select_num_bits = l2_bits,
179 ruby_system = ruby_system)
180
181 exec("system.dir_cntrl%d = dir_cntrl" % i)
182 dir_cntrl_nodes.append(dir_cntrl)
183
184 cntrl_count += 1
185
186 for i, dma_device in enumerate(dma_devices):
186 for i, dma_port in enumerate(dma_ports):
187 #
188 # Create the Ruby objects associated with the dma controller
189 #
190 dma_seq = DMASequencer(version = i,
191 ruby_system = ruby_system)
192
193 dma_cntrl = DMA_Controller(version = i,
194 cntrl_id = cntrl_count,
195 dma_sequencer = dma_seq,
196 ruby_system = ruby_system)
197
198 exec("system.dma_cntrl%d = dma_cntrl" % i)
187 #
188 # Create the Ruby objects associated with the dma controller
189 #
190 dma_seq = DMASequencer(version = i,
191 ruby_system = ruby_system)
192
193 dma_cntrl = DMA_Controller(version = i,
194 cntrl_id = cntrl_count,
195 dma_sequencer = dma_seq,
196 ruby_system = ruby_system)
197
198 exec("system.dma_cntrl%d = dma_cntrl" % i)
199 if dma_device.type == 'MemTest':
200 exec("system.dma_cntrl%d.dma_sequencer.slave = dma_device.test" % i)
201 else:
202 exec("system.dma_cntrl%d.dma_sequencer.slave = dma_device.dma" % i)
199 exec("system.dma_cntrl%d.dma_sequencer.slave = dma_port" % i)
203 dma_cntrl_nodes.append(dma_cntrl)
200 dma_cntrl_nodes.append(dma_cntrl)
204
205 cntrl_count += 1
206
207 all_cntrls = l1_cntrl_nodes + \
208 l2_cntrl_nodes + \
209 dir_cntrl_nodes + \
210 dma_cntrl_nodes
211
212 return (cpu_sequencers, dir_cntrl_nodes, all_cntrls)
201 cntrl_count += 1
202
203 all_cntrls = l1_cntrl_nodes + \
204 l2_cntrl_nodes + \
205 dir_cntrl_nodes + \
206 dma_cntrl_nodes
207
208 return (cpu_sequencers, dir_cntrl_nodes, all_cntrls)