I have three questions related to the cache of MPC5674.
The followings are the details of my questions.
1. 11.2 16 KB cache organization (P584 ~ P585 in e200z759CRM.pdf)
- What are the correct length of TAG, Lock bits, Dirty bits and Valid bit of cache line format ?
: TAG - Physical Address Tag (22bit) + Parity (?)
Dirty bits (?)
Valid bit (?)
2. 11.3 Cache lookup (P585 ~ P587 in e200z759CRM.pdf)
- What are the length of the TAG REFERENCE and the OFFSET ?
My understanding is that the length of TAG is 20. (32bit Address = 20 bits for tag + 7 bits for set(line) + 5 bits for word offset)
But, in the document, the length of TAG is 22. It's duplicated A［20,21］ of physical address and virtual address. Is it correct?
Almost of documents for cache describes that address size is equal to the sum of tag, index(set) and offset.
3. 11.7.3 Cache line replacement (P597 in e200z759CRM.pdf)
- Please describe the pseduo-round-robin replacement in more detail.
In the document, the pseduo-round-robin replacement is described as following.
: There is a single replacement counter for each cache. The replacement algorithm acts as follows:
On a miss, if the replacement pointer is pointing to a way that is not enabled for replacement (the selected line or way is locked),
it is incremented until an available way is selected (if any).
After a cache line is successfully filled without error, the replacement pointer increments to point to the next cache way.
If no way is available for the replacement, the access is treated as a single beat access and no cache linefill occurs.
==> The replacement pointer is pointing to a way. Is the meaning that the replacement pointer is pointing to the first line of a way?
Actually, we should find a available line to be filled. But, I can't find the description to search an available line in the document.
Could you check my understanding is correct ?
a. The replacement point can just point ways.(0 way, 1 way, 2way and 3way)
b. The replacement point shout move to next way if the way is locked or all of lines in the way are locked.
3. To find an available line, search sequentially from the first line.