First post, by gregorem
I hope it is a proper place for thread like this?
So, I read article, which explain how cache addresses work:
https://medium.com/@himanshu0525125/breaking- … et-19e3a28e0662
So we have sets addressed by index address. Each set is divided into blocks, which are addressed by tag address, and particular bytes in a block are described by offset address. Clear.
My board manual informing, that max. cache config is: 512KB total, SRAM 8x 128k*8 and TAG 32K*8. Cache i s direct-mapped.
If I understood it correctly, it means that TAG address is 8bit wide and cover up to 256 blocks, and there are up to 32K (so 32 768) blocks in TAG space. I guess that TAG cache cover all TAG addresses in all sets, so we have 32 768 sets (15bit wide index). So offset address needs to be 9bit wide (32bit address bus) and cover 512 bytes in each block.
Let's calculate: 32 768 sets, each with 256 blocks, each 512 bytes wide gives us: 32 768 x 256 x 512 = 4 294 967 296 bytes (4GB). Nice, but I doubt if a vintage mobo with old chipset could cache the entire 32bit address space. Especially not with 512KB SRAM. So I get something wrong.
Could someone explain me, how that tag cache work? At least with direct-mapped mode?