config: ruby: remove piobus from protocols
This patch removes the piobus from the protocol config files. The ports are now connected to the piobus in the Ruby.py file.
This commit is contained in:
parent
f7e7fa6d90
commit
a20fbdfc23
8 changed files with 21 additions and 44 deletions
|
@ -56,7 +56,7 @@ def define_options(parser):
|
||||||
caches private to clusters")
|
caches private to clusters")
|
||||||
return
|
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':
|
if buildEnv['PROTOCOL'] != 'MESI_Three_Level':
|
||||||
fatal("This script requires the MESI_Three_Level protocol to be built.")
|
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,
|
cache = l1_cache, l2_select_num_bits = l2_bits,
|
||||||
cluster_id = i, ruby_system = ruby_system)
|
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" % (
|
exec("ruby_system.l0_cntrl%d = l0_cntrl" % (
|
||||||
i*num_cpus_per_cluster+j))
|
i*num_cpus_per_cluster+j))
|
||||||
exec("ruby_system.l1_cntrl%d = l1_cntrl" % (
|
exec("ruby_system.l1_cntrl%d = l1_cntrl" % (
|
||||||
|
|
|
@ -48,7 +48,7 @@ class L2Cache(RubyCache):
|
||||||
def define_options(parser):
|
def define_options(parser):
|
||||||
return
|
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':
|
if buildEnv['PROTOCOL'] != 'MESI_Two_Level':
|
||||||
fatal("This script requires the MESI_Two_Level protocol to be built.")
|
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)
|
ruby_system = ruby_system)
|
||||||
|
|
||||||
l1_cntrl.sequencer = cpu_seq
|
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)
|
exec("ruby_system.l1_cntrl%d = l1_cntrl" % i)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Cache(RubyCache):
|
||||||
def define_options(parser):
|
def define_options(parser):
|
||||||
return
|
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':
|
if buildEnv['PROTOCOL'] != 'MI_example':
|
||||||
panic("This script requires the MI_example protocol to be built.")
|
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)
|
ruby_system = ruby_system)
|
||||||
|
|
||||||
l1_cntrl.sequencer = cpu_seq
|
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)
|
exec("ruby_system.l1_cntrl%d = l1_cntrl" % i)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Add controllers and sequencers to the appropriate lists
|
# Add controllers and sequencers to the appropriate lists
|
||||||
#
|
#
|
||||||
|
|
|
@ -48,7 +48,7 @@ class L2Cache(RubyCache):
|
||||||
def define_options(parser):
|
def define_options(parser):
|
||||||
return
|
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':
|
if buildEnv['PROTOCOL'] != 'MOESI_CMP_directory':
|
||||||
panic("This script requires the MOESI_CMP_directory protocol to be built.")
|
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)
|
ruby_system = ruby_system)
|
||||||
|
|
||||||
l1_cntrl.sequencer = cpu_seq
|
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)
|
exec("ruby_system.l1_cntrl%d = l1_cntrl" % i)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Add controllers and sequencers to the appropriate lists
|
# Add controllers and sequencers to the appropriate lists
|
||||||
#
|
#
|
||||||
|
|
|
@ -55,7 +55,7 @@ def define_options(parser):
|
||||||
parser.add_option("--allow-atomic-migration", action="store_true",
|
parser.add_option("--allow-atomic-migration", action="store_true",
|
||||||
help="allow migratory sharing for atomic only accessed blocks")
|
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':
|
if buildEnv['PROTOCOL'] != 'MOESI_CMP_token':
|
||||||
panic("This script requires the MOESI_CMP_token protocol to be built.")
|
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)
|
ruby_system = ruby_system)
|
||||||
|
|
||||||
l1_cntrl.sequencer = cpu_seq
|
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)
|
exec("ruby_system.l1_cntrl%d = l1_cntrl" % i)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Add controllers and sequencers to the appropriate lists
|
# Add controllers and sequencers to the appropriate lists
|
||||||
#
|
#
|
||||||
|
|
|
@ -59,7 +59,7 @@ def define_options(parser):
|
||||||
parser.add_option("--dir-on", action="store_true",
|
parser.add_option("--dir-on", action="store_true",
|
||||||
help="Hammer: enable Full-bit Directory")
|
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':
|
if buildEnv['PROTOCOL'] != 'MOESI_hammer':
|
||||||
panic("This script requires the MOESI_hammer protocol to be built.")
|
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)
|
ruby_system = ruby_system)
|
||||||
|
|
||||||
l1_cntrl.sequencer = cpu_seq
|
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:
|
if options.recycle_latency:
|
||||||
l1_cntrl.recycle_latency = options.recycle_latency
|
l1_cntrl.recycle_latency = options.recycle_latency
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Cache(RubyCache):
|
||||||
def define_options(parser):
|
def define_options(parser):
|
||||||
return
|
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':
|
if buildEnv['PROTOCOL'] != 'Network_test':
|
||||||
panic("This script requires the Network_test protocol to be built.")
|
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
|
# The Garnet tester protocol does not support fs nor dma
|
||||||
#
|
#
|
||||||
assert(piobus == None)
|
|
||||||
assert(dma_ports == [])
|
assert(dma_ports == [])
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -107,7 +107,7 @@ def create_system(options, system, piobus = None, dma_ports = []):
|
||||||
exec "import %s" % protocol
|
exec "import %s" % protocol
|
||||||
try:
|
try:
|
||||||
(cpu_sequencers, dir_cntrls, topology) = \
|
(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)
|
% protocol)
|
||||||
except:
|
except:
|
||||||
print "Error: could not create sytem for ruby protocol %s" % protocol
|
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.network = network
|
||||||
ruby.mem_size = total_mem_size
|
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._cpu_ruby_ports = cpu_sequencers
|
||||||
ruby.num_of_sequencers = len(cpu_sequencers)
|
ruby.num_of_sequencers = len(cpu_sequencers)
|
||||||
ruby.random_seed = options.random_seed
|
ruby.random_seed = options.random_seed
|
||||||
|
|
Loading…
Reference in a new issue