diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-03-21 21:22:22 -0700 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-03-21 21:22:22 -0700 |
commit | 898f1fc4a45454f5d70ef64de3c4b4caf686677a (patch) | |
tree | 6e3da37823d4f7b671263a715fc90190c6cb306e /configs/ruby/Ruby.py | |
parent | 61e6b9e701c25537319e91b74362b962616ffee6 (diff) | |
download | gem5-898f1fc4a45454f5d70ef64de3c4b4caf686677a.tar.xz |
ruby: Reorganized Ruby topology and protocol files
--HG--
rename : configs/ruby/MESI_CMP_directory.py => configs/ruby/protocols/MESI_CMP_directory.py
rename : configs/ruby/MI_example.py => configs/ruby/protocols/MI_example.py
rename : configs/ruby/MOESI_CMP_directory.py => configs/ruby/protocols/MOESI_CMP_directory.py
rename : configs/ruby/MOESI_CMP_token.py => configs/ruby/protocols/MOESI_CMP_token.py
rename : configs/ruby/MOESI_hammer.py => configs/ruby/protocols/MOESI_hammer.py
rename : configs/ruby/networks/MeshDirCorners.py => src/mem/ruby/network/topologies/MeshDirCorners.py
Diffstat (limited to 'configs/ruby/Ruby.py')
-rw-r--r-- | configs/ruby/Ruby.py | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index 44a160793..5912b1cd5 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -31,15 +31,11 @@ import m5 from m5.objects import * from m5.defines import buildEnv from m5.util import addToPath -addToPath('../ruby/networks') -from MeshDirCorners import * - -protocol = buildEnv['PROTOCOL'] - -exec "import %s" % protocol def create_system(options, physmem, piobus = None, dma_devices = []): + protocol = buildEnv['PROTOCOL'] + exec "import %s" % protocol try: (cpu_sequencers, dir_cntrls, all_cntrls) = \ eval("%s.create_system(options, physmem, piobus, dma_devices)" \ @@ -49,27 +45,16 @@ def create_system(options, physmem, piobus = None, dma_devices = []): sys.exit(1) # - # Important: the topology constructor must be called before the network - # constructor. + # Important: the topology must be created before the network and after the + # controllers. # - if options.topology == "crossbar": - net_topology = makeCrossbar(all_cntrls) - elif options.topology == "mesh": - # - # The uniform mesh topology assumes one router per cpu - # - net_topology = makeMesh(all_cntrls, - len(cpu_sequencers), - options.mesh_rows) + exec "import %s" % options.topology + try: + net_topology = eval("%s.makeTopology(all_cntrls, options)" % options.topology) + except: + print "Error: could not create topology %s" % options.topology + sys.exit(1) - elif options.topology == "mesh_dir_corner": - # - # The uniform mesh topology assumes one router per cpu - # - net_topology = makeMeshDirCorners(all_cntrls, - len(cpu_sequencers), - options.mesh_rows) - if options.garnet_network == "fixed": network = GarnetNetwork_d(topology = net_topology) elif options.garnet_network == "flexible": |