JING QU has uploaded a new patch set (#2) to the change originally created
by Mingyuan Xiang. (
https://gem5-review.googlesource.com/c/public/gem5/+/20879 )
Change subject: mem-ruby: Allow Ruby to use all replacement policies in
Classic
......................................................................
mem-ruby: Allow Ruby to use all replacement policies in Classic
Add support in Ruby to use all replacement policies in Classic.
Furthermore, if new replacement policies are added to the
Classic system, the Ruby system will recognize new policies
without any other changes in Ruby system. The following list
all the major changes:
* Make Ruby cache entries (AbstractCacheEntry) inherit from
Classic cache entries (ReplaceableEntry). By doing this,
replacement policies can use cache entries from Ruby caches.
AccessPermission and print function are moved from
AbstractEntry to AbstractCacheEntry, so AbstractEntry is no
longer needed.
* DirectoryMemory and all SLICC files are changed to use
AbstractCacheEntry as their cache entry interface. So do the
python files in mem/slicc/ast which check the entry
interface.
* "main='false'" argument is added to the protocol files where
the DirectoryEntry is defined. This change helps
differentiate DirectoryEntry from CacheEntry because they are
both the instances of AbstractCacheEntry now.
* Use BaseReplacementPolicy in Ruby caches instead of
AbstractReplacementPolicy so that Ruby caches will recognize
the replacement policies from Classic.
* Add getLastAccess() and useOccupancy() function to Classic
system so that Ruby caches can use them. Move lastTouchTick
to ReplacementData struct because it's needed by
getLastAccess() to return the correct value.
* Add a 2-dimensional array of ReplacementData in Ruby caches
to store information for different replacement policies. Note
that, unlike Classic caches, where policy information is
stored in cache entries, the policy information needs to be
stored in a new 2-dimensional array. This is due to Ruby
caches deleting the cache entry every time the corresponding
cache line get evicted.
Change-Id: Idff6fdd2102a552c103e9d5f31f779aae052943f
---
M src/learning_gem5/part3/MSI-cache.sm
M src/learning_gem5/part3/MSI-dir.sm
M src/mem/cache/replacement_policies/base.hh
M src/mem/cache/replacement_policies/bip_rp.cc
M src/mem/cache/replacement_policies/brrip_rp.hh
M src/mem/cache/replacement_policies/fifo_rp.hh
M src/mem/cache/replacement_policies/lfu_rp.hh
M src/mem/cache/replacement_policies/lru_rp.cc
M src/mem/cache/replacement_policies/lru_rp.hh
M src/mem/cache/replacement_policies/mru_rp.cc
M src/mem/cache/replacement_policies/mru_rp.hh
M src/mem/cache/replacement_policies/random_rp.hh
M src/mem/cache/replacement_policies/replaceable_entry.hh
M src/mem/cache/replacement_policies/tree_plru_rp.cc
M src/mem/ruby/SConscript
M src/mem/ruby/protocol/Garnet_standalone-dir.sm
M src/mem/ruby/protocol/MESI_Three_Level-L1cache.sm
M src/mem/ruby/protocol/MESI_Two_Level-L1cache.sm
M src/mem/ruby/protocol/MESI_Two_Level-L2cache.sm
M src/mem/ruby/protocol/MESI_Two_Level-dir.sm
M src/mem/ruby/protocol/MI_example-dir.sm
M src/mem/ruby/protocol/MOESI_AMD_Base-Region-dir.sm
M src/mem/ruby/protocol/MOESI_AMD_Base-dir.sm
M src/mem/ruby/protocol/MOESI_AMD_Base-probeFilter.sm
M src/mem/ruby/protocol/MOESI_CMP_directory-L2cache.sm
M src/mem/ruby/protocol/MOESI_CMP_directory-dir.sm
M src/mem/ruby/protocol/MOESI_CMP_token-L1cache.sm
M src/mem/ruby/protocol/MOESI_CMP_token-L2cache.sm
M src/mem/ruby/protocol/MOESI_CMP_token-dir.sm
M src/mem/ruby/protocol/MOESI_hammer-dir.sm
M src/mem/ruby/protocol/RubySlicc_Types.sm
M src/mem/ruby/slicc_interface/AbstractCacheEntry.cc
M src/mem/ruby/slicc_interface/AbstractCacheEntry.hh
M src/mem/ruby/slicc_interface/SConscript
M src/mem/ruby/structures/AbstractReplacementPolicy.cc
M src/mem/ruby/structures/AbstractReplacementPolicy.hh
M src/mem/ruby/structures/CacheMemory.cc
M src/mem/ruby/structures/CacheMemory.hh
M src/mem/ruby/structures/DirectoryMemory.cc
M src/mem/ruby/structures/DirectoryMemory.hh
M src/mem/ruby/structures/ReplacementPolicy.py
M src/mem/ruby/structures/RubyCache.py
M src/mem/ruby/system/VIPERCoalescer.hh
M src/mem/ruby/system/WeightedLRUPolicy.cc
M src/mem/ruby/system/WeightedLRUPolicy.hh
M src/mem/ruby/system/WeightedLRUReplacementPolicy.py
M src/mem/slicc/ast/FormalParamAST.py
M src/mem/slicc/ast/LocalVariableAST.py
M src/mem/slicc/ast/MemberExprAST.py
M src/mem/slicc/ast/MethodCallExprAST.py
50 files changed, 376 insertions(+), 254 deletions(-)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/20879
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Idff6fdd2102a552c103e9d5f31f779aae052943f
Gerrit-Change-Number: 20879
Gerrit-PatchSet: 2
Gerrit-Owner: Mingyuan Xiang <mxia...@wisc.edu>
Gerrit-Reviewer: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-Reviewer: JING QU <jq...@wisc.edu>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: John Alsop <johnathan.al...@amd.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Mingyuan Xiang <mxia...@wisc.edu>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-CC: Anthony Gutierrez <anthony.gutier...@amd.com>
Gerrit-CC: Nikos Nikoleris <nikos.nikole...@arm.com>
Gerrit-CC: Tiago Mück <tiago.m...@arm.com>
Gerrit-CC: Xianwei Zhang <xianwei.zh...@amd.com>
Gerrit-MessageType: newpatchset
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev