summaryrefslogtreecommitdiff
path: root/configs/ruby
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:13 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:13 -0700
commit72044e3f5a5b9455e07180806793127be2014451 (patch)
treefe2e7f7f129a31dccf84ee2d0bfc93d9c76b7f07 /configs/ruby
parentbcdd19df03ed047e4ce03dbf81bc40173cc3217b (diff)
downloadgem5-72044e3f5a5b9455e07180806793127be2014451.tar.xz
ruby: Disable migratory sharing for token and hammer
This patch allows one to disable migratory sharing for those cache blocks that are accessed by atomic requests. While the implementations are different between the token and hammer protocols, the motivation is the same. For Alpha, LLSC semantics expect that normal loads do not unlock cache blocks that have been locked by LL accesses. Therefore, locked blocks should not transfer write permissions when responding to these load requests. Instead, only they only transfer read permissions so that the subsequent SC access can possibly succeed.
Diffstat (limited to 'configs/ruby')
-rw-r--r--configs/ruby/MOESI_CMP_token.py8
-rw-r--r--configs/ruby/MOESI_hammer.py7
2 files changed, 11 insertions, 4 deletions
diff --git a/configs/ruby/MOESI_CMP_token.py b/configs/ruby/MOESI_CMP_token.py
index 3853ebbb4..ef110d682 100644
--- a/configs/ruby/MOESI_CMP_token.py
+++ b/configs/ruby/MOESI_CMP_token.py
@@ -51,7 +51,9 @@ def define_options(parser):
help="Token_CMP: cycles until issuing again");
parser.add_option("--disable-dyn-timeouts", action="store_true",
help="Token_CMP: disable dyanimc timeouts, use fixed latency instead")
-
+ 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_devices):
if buildEnv['PROTOCOL'] != 'MOESI_CMP_token':
@@ -111,7 +113,9 @@ def create_system(options, system, piobus, dma_devices):
fixed_timeout_latency = \
options.timeout_latency,
dynamic_timeout_enabled = \
- not options.disable_dyn_timeouts)
+ not options.disable_dyn_timeouts,
+ no_mig_atomic = not \
+ options.allow_atomic_migration)
exec("system.l1_cntrl%d = l1_cntrl" % i)
#
diff --git a/configs/ruby/MOESI_hammer.py b/configs/ruby/MOESI_hammer.py
index 818600a5a..02d958b09 100644
--- a/configs/ruby/MOESI_hammer.py
+++ b/configs/ruby/MOESI_hammer.py
@@ -44,7 +44,8 @@ class L2Cache(RubyCache):
latency = 10
def define_options(parser):
- return
+ 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_devices):
@@ -91,7 +92,9 @@ def create_system(options, system, piobus, dma_devices):
sequencer = cpu_seq,
L1IcacheMemory = l1i_cache,
L1DcacheMemory = l1d_cache,
- L2cacheMemory = l2_cache)
+ L2cacheMemory = l2_cache,
+ no_mig_atomic = not \
+ options.allow_atomic_migration)
exec("system.l1_cntrl%d = l1_cntrl" % i)
#