MI_example.py (10311:ad9c042dce54) | MI_example.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; --- 28 unchanged lines hidden (view full) --- 37# Note: the cache latency is only used by the sequencer on fast path hits 38# 39class Cache(RubyCache): 40 latency = 3 41 42def define_options(parser): 43 return 44 | 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; --- 28 unchanged lines hidden (view full) --- 37# Note: the cache latency is only used by the sequencer on fast path hits 38# 39class Cache(RubyCache): 40 latency = 3 41 42def define_options(parser): 43 return 44 |
45def create_system(options, system, dma_ports, ruby_system): | 45def create_system(options, full_system, system, dma_ports, ruby_system): |
46 47 if buildEnv['PROTOCOL'] != 'MI_example': 48 panic("This script requires the MI_example protocol to be built.") 49 50 cpu_sequencers = [] 51 52 # 53 # The ruby network creation expects the list of nodes in the system to be --- 114 unchanged lines hidden (view full) --- 168 exec("ruby_system.dma_cntrl%d = dma_cntrl" % i) 169 exec("ruby_system.dma_cntrl%d.dma_sequencer.slave = dma_port" % i) 170 dma_cntrl_nodes.append(dma_cntrl) 171 172 # Connect the directory controllers and the network 173 dma_cntrl.requestToDir = ruby_system.network.master 174 dma_cntrl.responseFromDir = ruby_system.network.slave 175 | 46 47 if buildEnv['PROTOCOL'] != 'MI_example': 48 panic("This script requires the MI_example protocol to be built.") 49 50 cpu_sequencers = [] 51 52 # 53 # The ruby network creation expects the list of nodes in the system to be --- 114 unchanged lines hidden (view full) --- 168 exec("ruby_system.dma_cntrl%d = dma_cntrl" % i) 169 exec("ruby_system.dma_cntrl%d.dma_sequencer.slave = dma_port" % i) 170 dma_cntrl_nodes.append(dma_cntrl) 171 172 # Connect the directory controllers and the network 173 dma_cntrl.requestToDir = ruby_system.network.master 174 dma_cntrl.responseFromDir = ruby_system.network.slave 175 |
176 | |
177 all_cntrls = l1_cntrl_nodes + dir_cntrl_nodes + dma_cntrl_nodes | 176 all_cntrls = l1_cntrl_nodes + dir_cntrl_nodes + dma_cntrl_nodes |
177 178 # Create the io controller and the sequencer 179 if full_system: 180 io_seq = DMASequencer(version=len(dma_ports), ruby_system=ruby_system) 181 ruby_system._io_port = io_seq 182 io_controller = DMA_Controller(version = len(dma_ports), 183 dma_sequencer = io_seq, 184 ruby_system = ruby_system) 185 ruby_system.io_controller = io_controller 186 187 # Connect the dma controller to the network 188 io_controller.responseFromDir = ruby_system.network.master 189 io_controller.requestToDir = ruby_system.network.slave 190 191 all_cntrls = all_cntrls + [io_controller] 192 |
|
178 topology = create_topology(all_cntrls, options) 179 return (cpu_sequencers, dir_cntrl_nodes, topology) | 193 topology = create_topology(all_cntrls, options) 194 return (cpu_sequencers, dir_cntrl_nodes, topology) |