gem5-dev@gem5.org

The gem5 Developer List

View all threads

src/cpu/decode_cache.hh Class AddrMap maybe has a bug

YZ
yb_zhang@mail.ustc.edu.cn
Mon, Mar 25, 2024 1:42 PM

Hello guys, I would like to report to you a problem I found in Class AddrMap(src/cpu/decode_cache.hh). According to the design of AddrMap, the size of a CacheChunk should be CacheChunkBytes bytes, but in reality, since a CacheChunk is an array of type Value, its size could be up tosizeof(Value) * CacheChunkBytes. and in src/arch/generic/decode_cache.hh, BasicDecodeCache instantiates this template using the template parameter AddrMapEntry, which means that the size of CacheChunk may become sizeof(AddrMapEntry) * CacheChunkBytes. I don't know. Whether this is consistent with the original design intent, and wanted to report this issue to the community.

My gem5 version: latest 23.1.0.0
Thanks!

Hello guys, I would like to report to you a problem I found in Class AddrMap(src/cpu/decode_cache.hh). According to the design of AddrMap, the size of a CacheChunk should be CacheChunkBytes bytes, but in reality, since a CacheChunk is an array of type Value, its size could be up tosizeof(Value) * CacheChunkBytes. and in src/arch/generic/decode_cache.hh, BasicDecodeCache instantiates this template using the template parameter AddrMapEntry, which means that the size of CacheChunk may become sizeof(AddrMapEntry) * CacheChunkBytes. I don't know. Whether this is consistent with the original design intent, and wanted to report this issue to the community. My gem5 version: latest 23.1.0.0 Thanks!