How can I modify the cache architecture in the gem5 simulator? I want to be able to configure the cache so that it is used differently (either set-associative or fully associative) depending on a certain execution mode? I am new to gem5 and still finding my way. Where can I change the modelling of the cache architecture and how it is used in the source files? Thanks!
Asked
Active
Viewed 1,322 times
2
-
1Welcome to SO, G. I have the following advice: try to keep the question as precise as possible, specially in the title. E.g., a good one would be "How to change between set-associative and fully associative caches in gem5?". Since a more general "cache architecture" question would likely not be answerable. Also send an email to the gem5 mailing list just in case. I don't know the answer to this one in particular. – Ciro Santilli Jul 17 '18 at 16:48
1 Answers
0
You can change the modelling of the cache architecture by changing the Tags. The Tags are instantiated in src/mem/cache/cache.py.
This modification can be done either by:
Creating a config file. It is the correct approach and will give you more control over the simulation (check Jason's tutorial http://learning.gem5.org/book/part1/simple_config.html to learn how to create a config file).
Quick and dirty approach by modifying the default value of Tags between BaseSetAssoc and FullyAssoc within the cache.py file. This, however, will not work towards your final goal of changing the model according to the execution mode.

Daniel Carvalho
- 473
- 1
- 5
- 17