diff options
-rw-r--r-- | configs/ruby/MESI_Three_Level.py | 7 | ||||
-rw-r--r-- | configs/ruby/MESI_Two_Level.py | 8 | ||||
-rw-r--r-- | configs/ruby/MI_example.py | 9 | ||||
-rw-r--r-- | configs/ruby/MOESI_CMP_directory.py | 9 | ||||
-rw-r--r-- | configs/ruby/MOESI_CMP_token.py | 9 | ||||
-rw-r--r-- | configs/ruby/MOESI_hammer.py | 8 | ||||
-rw-r--r-- | configs/ruby/Network_test.py | 3 | ||||
-rw-r--r-- | configs/ruby/Ruby.py | 12 |
8 files changed, 21 insertions, 44 deletions
diff --git a/configs/ruby/MESI_Three_Level.py b/configs/ruby/MESI_Three_Level.py index 67ed9af74..966c80172 100644 --- a/configs/ruby/MESI_Three_Level.py +++ b/configs/ruby/MESI_Three_Level.py @@ -56,7 +56,7 @@ def define_options(parser): caches private to clusters") return -def create_system(options, system, piobus, dma_ports, ruby_system): +def create_system(options, system, dma_ports, ruby_system): if buildEnv['PROTOCOL'] != 'MESI_Three_Level': fatal("This script requires the MESI_Three_Level protocol to be built.") @@ -116,11 +116,6 @@ def create_system(options, system, piobus, dma_ports, ruby_system): cache = l1_cache, l2_select_num_bits = l2_bits, cluster_id = i, ruby_system = ruby_system) - if piobus != None: - cpu_seq.pio_master_port = piobus.slave - cpu_seq.mem_master_port = piobus.slave - cpu_seq.pio_slave_port = piobus.master - exec("ruby_system.l0_cntrl%d = l0_cntrl" % ( i*num_cpus_per_cluster+j)) exec("ruby_system.l1_cntrl%d = l1_cntrl" % ( diff --git a/configs/ruby/MESI_Two_Level.py b/configs/ruby/MESI_Two_Level.py index 518336168..845d5cf22 100644 --- a/configs/ruby/MESI_Two_Level.py +++ b/configs/ruby/MESI_Two_Level.py @@ -48,7 +48,7 @@ class L2Cache(RubyCache): def define_options(parser): return -def create_system(options, system, piobus, dma_ports, ruby_system): +def create_system(options, system, dma_ports, ruby_system): if buildEnv['PROTOCOL'] != 'MESI_Two_Level': fatal("This script requires the MESI_Two_Level protocol to be built.") @@ -104,12 +104,6 @@ def create_system(options, system, piobus, dma_ports, ruby_system): ruby_system = ruby_system) l1_cntrl.sequencer = cpu_seq - - if piobus != None: - cpu_seq.pio_master_port = piobus.slave - cpu_seq.mem_master_port = piobus.slave - cpu_seq.pio_slave_port = piobus.master - exec("ruby_system.l1_cntrl%d = l1_cntrl" % i) # diff --git a/configs/ruby/MI_example.py b/configs/ruby/MI_example.py index ed18c14cb..9fb6ca366 100644 --- a/configs/ruby/MI_example.py +++ b/configs/ruby/MI_example.py @@ -42,7 +42,7 @@ class Cache(RubyCache): def define_options(parser): return -def create_system(options, system, piobus, dma_ports, ruby_system): +def create_system(options, system, dma_ports, ruby_system): if buildEnv['PROTOCOL'] != 'MI_example': panic("This script requires the MI_example protocol to be built.") @@ -90,13 +90,8 @@ def create_system(options, system, piobus, dma_ports, ruby_system): ruby_system = ruby_system) l1_cntrl.sequencer = cpu_seq - - if piobus != None: - cpu_seq.pio_master_port = piobus.slave - cpu_seq.mem_master_port = piobus.slave - cpu_seq.pio_slave_port = piobus.master - exec("ruby_system.l1_cntrl%d = l1_cntrl" % i) + # # Add controllers and sequencers to the appropriate lists # diff --git a/configs/ruby/MOESI_CMP_directory.py b/configs/ruby/MOESI_CMP_directory.py index 0af4643af..a7de3bf8f 100644 --- a/configs/ruby/MOESI_CMP_directory.py +++ b/configs/ruby/MOESI_CMP_directory.py @@ -48,7 +48,7 @@ class L2Cache(RubyCache): def define_options(parser): return -def create_system(options, system, piobus, dma_ports, ruby_system): +def create_system(options, system, dma_ports, ruby_system): if buildEnv['PROTOCOL'] != 'MOESI_CMP_directory': panic("This script requires the MOESI_CMP_directory protocol to be built.") @@ -100,13 +100,8 @@ def create_system(options, system, piobus, dma_ports, ruby_system): ruby_system = ruby_system) l1_cntrl.sequencer = cpu_seq - - if piobus != None: - cpu_seq.pio_master_port = piobus.slave - cpu_seq.mem_master_port = piobus.slave - cpu_seq.pio_slave_port = piobus.master - exec("ruby_system.l1_cntrl%d = l1_cntrl" % i) + # # Add controllers and sequencers to the appropriate lists # diff --git a/configs/ruby/MOESI_CMP_token.py b/configs/ruby/MOESI_CMP_token.py index 78ccef71a..52c1b44f4 100644 --- a/configs/ruby/MOESI_CMP_token.py +++ b/configs/ruby/MOESI_CMP_token.py @@ -55,7 +55,7 @@ def define_options(parser): parser.add_option("--allow-atomic-migration", action="store_true", help="allow migratory sharing for atomic only accessed blocks") -def create_system(options, system, piobus, dma_ports, ruby_system): +def create_system(options, system, dma_ports, ruby_system): if buildEnv['PROTOCOL'] != 'MOESI_CMP_token': panic("This script requires the MOESI_CMP_token protocol to be built.") @@ -120,13 +120,8 @@ def create_system(options, system, piobus, dma_ports, ruby_system): ruby_system = ruby_system) l1_cntrl.sequencer = cpu_seq - - if piobus != None: - cpu_seq.pio_master_port = piobus.slave - cpu_seq.mem_master_port = piobus.slave - cpu_seq.pio_slave_port = piobus.master - exec("ruby_system.l1_cntrl%d = l1_cntrl" % i) + # # Add controllers and sequencers to the appropriate lists # diff --git a/configs/ruby/MOESI_hammer.py b/configs/ruby/MOESI_hammer.py index d716aba7a..eaa3bc7a2 100644 --- a/configs/ruby/MOESI_hammer.py +++ b/configs/ruby/MOESI_hammer.py @@ -59,7 +59,7 @@ def define_options(parser): parser.add_option("--dir-on", action="store_true", help="Hammer: enable Full-bit Directory") -def create_system(options, system, piobus, dma_ports, ruby_system): +def create_system(options, system, dma_ports, ruby_system): if buildEnv['PROTOCOL'] != 'MOESI_hammer': panic("This script requires the MOESI_hammer protocol to be built.") @@ -113,12 +113,6 @@ def create_system(options, system, piobus, dma_ports, ruby_system): ruby_system = ruby_system) l1_cntrl.sequencer = cpu_seq - - if piobus != None: - cpu_seq.pio_master_port = piobus.slave - cpu_seq.mem_master_port = piobus.slave - cpu_seq.pio_slave_port = piobus.master - if options.recycle_latency: l1_cntrl.recycle_latency = options.recycle_latency diff --git a/configs/ruby/Network_test.py b/configs/ruby/Network_test.py index f48f5a792..d331163b3 100644 --- a/configs/ruby/Network_test.py +++ b/configs/ruby/Network_test.py @@ -42,7 +42,7 @@ class Cache(RubyCache): def define_options(parser): return -def create_system(options, system, piobus, dma_ports, ruby_system): +def create_system(options, system, dma_ports, ruby_system): if buildEnv['PROTOCOL'] != 'Network_test': panic("This script requires the Network_test protocol to be built.") @@ -52,7 +52,6 @@ def create_system(options, system, piobus, dma_ports, ruby_system): # # The Garnet tester protocol does not support fs nor dma # - assert(piobus == None) assert(dma_ports == []) # diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index c74e887a8..e66a68f1d 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -107,7 +107,7 @@ def create_system(options, system, piobus = None, dma_ports = []): exec "import %s" % protocol try: (cpu_sequencers, dir_cntrls, topology) = \ - eval("%s.create_system(options, system, piobus, dma_ports, ruby)" + eval("%s.create_system(options, system, dma_ports, ruby)" % protocol) except: print "Error: could not create sytem for ruby protocol %s" % protocol @@ -187,6 +187,16 @@ def create_system(options, system, piobus = None, dma_ports = []): ruby.network = network ruby.mem_size = total_mem_size + + # Connect the cpu sequencers and the piobus + if piobus != None: + for cpu_seq in cpu_sequencers: + cpu_seq.pio_master_port = piobus.slave + cpu_seq.mem_master_port = piobus.slave + + if buildEnv['TARGET_ISA'] == "x86": + cpu_seq.pio_slave_port = piobus.master + ruby._cpu_ruby_ports = cpu_sequencers ruby.num_of_sequencers = len(cpu_sequencers) ruby.random_seed = options.random_seed |