Victim cache that supports draining write-miss entries
A caching system including a first sub-cache and a second sub-cache in parallel with the first sub-cache, wherein the second sub-cache includes a set of cache lines, line type bits configured to store an indication that a corresponding cache line of the set of cache lines is configured to store write-miss data, and an eviction controller configured to flush stored write-miss data based on the line type bits.
1. An eviction method, comprising:
detecting an idle activity on a processor interface; and
in response to detecting the idle activity on the processor interface:
determining a write-miss entry inside a victim cache, wherein the write-miss entry is associated with a line type; and
draining the write-miss entry from the victim cache based on the line type.
2. The eviction method of claim 1 , wherein:
the idle activity is detected when a processor has not issued a command on the processor interface for N number of clock cycles.
3. The eviction method of claim 2 , wherein:
the N number of clock cycles is predetermined.
4. The eviction method of claim 2 , wherein:
the N number of clock cycles is configurable.
5. The eviction method of claim 1 , wherein:
the determining the write-miss entry includes examining each line of the victim cache in logical order for the write-miss entry.
6. The eviction method of claim 1 , wherein:
the write-miss entry is a plurality of write-miss entries;
each of the plurality of write-miss entries is stored in respective lines of the victim cache; and
the draining the write-miss entry includes draining the plurality of write-miss entries in one of a first in first out, least recently used, or random basis.
7. The eviction method of claim 1 , wherein:
the determining the write-miss entry inside the victim cache includes sending an eviction trigger request to a victim cache controller for a selected line of the victim cache associated with the write-miss entry.
8. The eviction method of claim 7 , wherein:
in response to receiving the eviction trigger request, the victim cache controller determines if an entry in a store queue corresponds to the selected line of the victim cache; and
and in response to determining the entry exists, the victim cache controller waits for the store queue to empty to evict the selected line of the victim cache.
9. The eviction method of claim 1 , further comprising:
storing the write-miss entry in a drain buffer until the write-miss entry is accepted by a memory.
10. The eviction method of claim 1 , wherein:
the draining the write-miss entry from the victim cache is in response to a processor writing out half of the write-miss entry.
11. A device, comprising:
a victim cache; and
a victim cache controller configured to detect an idle activity on a processor interface;
wherein in response to detecting the idle activity on the processor interface, the victim cache controller is configured to:
determine a write-miss entry inside the victim cache, wherein the write-miss entry is associated with a line type; and
flush the write-miss entry from the victim cache based on the line type.
12. The device of claim 11 , wherein:
the idle activity is detected when a processor has not issued a command on the processor interface for N number of clock cycles.
13. The device of claim 12 , wherein:
the N number of clock cycles is predetermined.
14. The device of claim 12 , wherein:
the N number of clock cycles is configurable.
15. The device of claim 11 , wherein:
the victim cache controller is configured to determine the write-miss entry by examining each line of the victim cache in logical order for the write-miss entry.
16. The device of claim 11 , wherein:
the write-miss entry is a plurality of write-miss entries;
each of the plurality of write-miss entries is stored in respective lines of the victim cache; and
the victim cache controller is configured to flush the write-miss entry by flushing the plurality of write-miss entries in one of a first in first out, least recently used, or random basis.
17. The device of claim 11 , wherein:
the victim cache controller is configured to determine the write-miss entry inside the victim cache in response to an eviction trigger request for a selected line of the victim cache associated with the write-miss entry.
18. The device of claim 17 , wherein:
in response to receiving the eviction trigger request, the victim cache controller determines if an entry in a store queue corresponds to the selected line of the victim cache; and
and in response to determining the entry exists, the victim cache controller waits for the store queue to empty to evict the selected line of the victim cache.
19. The device of claim 11 , wherein:
the victim cache controller is configured to store the write-miss entry in a drain buffer until the write-miss entry is accepted by a memory.
20. The device of claim 11 , wherein:
the victim cache controller is configured to flush the write-miss entry from the victim cache is in response to a processor writing out half of the write-miss entry.