gem5-users@gem5.org

The gem5 Users mailing list

View all threads

Fully Associative cache.

NS
Nazmus Sakib
Mon, Mar 4, 2024 6:26 PM

Hello.
There is a FALRU() class in src/mem/cache/tags.
Now, in the config/common/CacheConfig.py, if I instantiate l1 Data cache, and then do:
dcache.tags=FALRU();
Will this work ?
Or do I need to, calculate by hand the number of cacheline in my cahce , based on cacheline size and cache size  and then set the "assoc" to that value?
What else do I need to do ?

PS: For specific reasons, I have to do it in Cacheconfig.py and not in mem/caches/Cache.py or in config/common/Caches.py. I was able to changes values like dcache.size="something" from CacheConfig.py, so I am assuming I will be able to do so for associativity and tags as well.

Hello. There is a FALRU() class in src/mem/cache/tags. Now, in the config/common/CacheConfig.py, if I instantiate l1 Data cache, and then do: dcache.tags=FALRU(); Will this work ? Or do I need to, calculate by hand the number of cacheline in my cahce , based on cacheline size and cache size and then set the "assoc" to that value? What else do I need to do ? PS: For specific reasons, I have to do it in Cacheconfig.py and not in mem/caches/Cache.py or in config/common/Caches.py. I was able to changes values like dcache.size="something" from CacheConfig.py, so I am assuming I will be able to do so for associativity and tags as well.