IP Library Granted Patent US 9,348,743
Granted Patent B2
US 9,348,743 · App. 13/772,400 · Granted May 24, 2016

Inter-set wear-leveling for caches with limited write endurance

Inventor: Xiangyu Dong (La Jolla, CA)
Assignee: QUALCOMM INCORPORATED
G06F12/0238G06F12/0802G06F12/0864G06F12/0891G06F2212/7211
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,348,743
App. No.
13/772,400
Granted
May 24, 2016
Kind
B2
Abstract

A cache controller includes a first register that updates after every memory location swap operation on a number of cache sets in a cache memory and resets every N−1 memory location swap operations. N is a number of the cache sets in the cache memory. The memory controller also has a second register that updates after every N−1 memory location swap operations, and resets every (N 2 −N) memory location swap operations. The first and second registers track a relationship between logical locations and physical locations of the cache sets.

Claims (47)

1. A method for wear-leveling of an on-chip, non-volatile cache memory, comprising:

dynamically rotating cache sets of the on-chip, non-volatile cache memory by performing a plurality of memory location swap operations on the cache sets when a number of memory write operations to the cache memory reaches a threshold value, each swap operation including invalidating contents from cache sets being swapped and leaving memory contents of other cache sets intact by swapping a mapping of at least two of the cache sets being swapped at a time without moving contents of the at least two of the cache sets being swapped between the cache set, and shifting the cache sets by at least one step after a complete swap rotation; and

tracking the swapped cache sets to convert a logical cache set number to a physical cache set number.

2. The method of claim 1 , in which dynamically rotating the cache sets further comprises:

counting the number of memory write operations to the cache memory in a global counter;

initiating the plurality of memory location swap operations when the global counter reaches the threshold value; and

resetting the global counter.

3. The method of claim 2 , in which dynamically rotating the cache sets comprises:

setting a swap register (SwapReg) to (the SwapReg+1) mod (N−1), in which N is a number of the cache sets in the cache memory; and

setting a shift register (ShiftReg) to (the ShiftReg+1) mod N when the SwapReg is zero.

4. The method of claim 1 , further comprising:

counting the number of memory write operations to the cache memory with a global counter by incrementing the global counter for each memory write operation to the cache memory;

performing a swap operation and incrementing a swap counter when the global counter equals the threshold value;

incrementing a shift counter and resetting the swap counter value when a swap counter value equals N−1, in which N is a number of the cache sets in the cache memory; and

when a shift counter value equals N, resetting the shift counter.

5. The method of claim 1 , in which swapping memory locations of the at least two of the swapped cache sets comprises:

storing dirty data within the at least two swapped cache sets into a write back buffer; and

invalidating other data in the at least two swapped cache sets.

6. The method of claim 4 , further comprising converting an input cache set number to an output cache set number by:

setting an output physical set number to the shift counter value when an input logical set number equals the swap counter value;

setting the output physical set number to (the input logical set number+the shift counter value) modulo N when the input logical set number is greater than the swap counter value; and

setting the output physical set number to (the input logical set number+the shift counter value+1) modulo N when the input logical set number is less than the swap counter value.

7. The method of claim 4 , in which tracking the swapped cache sets comprises:

setting an output logical set number to the swap counter value when an input physical set number equals the shift counter value;

setting the output logical set number to (the input physical set number−the shift counter value) modulo N when (the input physical set number−the shift counter value) modulo N is greater than the swap counter value; and

otherwise, setting the output logical set number to (the input physical set number−the shift counter value−1) modulo N.

8. The method of claim 1 , further comprising integrating the cache memory into a mobile phone, a set top box, a music player, a video player, an entertainment unit, a navigation device, a computer, a hand-held personal communication systems (PCS) unit, a portable data unit, and/or a fixed location data unit.

9. A cache controller, comprising:

a first register that updates after each memory location swap operation on a plurality of cache sets of an on-chip, non-volatile cache memory, and resets at each N−1 memory location swap operations, in which N is a number of cache sets in the cache memory; and

a second register that updates after every N−1 memory location swap operations on the plurality of cache sets of the on-chip, non-volatile cache memory, and resets every (N 2 −N) memory location swap operations, in which the first register and the second register track a relationship between logical locations and physical locations of the cache sets and in which each swap operation includes invalidating contents from cache sets being swapped, and leaving memory contents of other cache sets intact by swapping a mapping of at least two of the cache sets being swapped at a time without moving contents of the at least two of the cache sets being swapped between the cache sets, and shifting the cache sets by at least one step after a complete swap rotation.

10. The cache controller of claim 9 , in which the cache controller is operable to dynamically swap two memory locations and to track the swap operations of the cache sets to convert a logical cache set number to a physical cache set number using the first register and the second register.

11. The cache controller of claim 9 , in which the first register is a swap register (SwapReg) that is set to (the SwapReg+1) mod (N−1) when a memory swap operation is performed.

12. The cache controller of claim 11 , in which the second register is a shift register (ShiftReg) that is set to (the ShiftReg+1) mod N when the SwapReg equals zero.

13. The cache controller of claim 9 ,

in which the first register is a swap register (SwapReg) that is set to (the SwapReg+1) mod (N−1) when a memory swap operation is performed, and

in which the second register is a shift register (ShiftReg) that is set to (the ShiftReg+1) mod N when the SwapReg equals zero.

14. The cache controller of claim 13 , in which the cache controller is operable to dynamically swap two memory locations and to track the swap operations of the cache sets to convert a logical cache set number to a physical cache set number using the SwapReg and the ShiftReg.

15. The cache controller of claim 9 , in which the cache controller is operable to initiate the memory location swap operation when a write counter register equals a threshold value.

16. The cache controller of claim 9 , integrated into a mobile phone, a set top box, a music player, a video player, an entertainment unit, a navigation device, a computer, a hand-held personal communication systems (PCS) unit, a portable data unit, and/or a fixed location data unit.

17. A cache controller for wear-leveling of an on-chip, non-volatile cache memory, comprising:

means for dynamically rotating cache sets of the on-chip, non-volatile cache memory by performing a plurality of memory location swap operations on the cache sets when a number of memory write operations to the cache memory reaches a threshold value, each swap operation including invalidating contents from cache sets being swapped and leaving memory contents of other cache sets intact by swapping a mapping of at least two of the cache sets being swapped at a time without moving contents of the at least two of the cache sets being swapped between the cache sets, and shifting the cache sets by at least one step after a complete swap rotation; and

means for tracking the swapped cache sets to convert a logical cache set number to a physical cache set number.

18. The cache controller of claim 17 , integrated into a mobile phone, a set top box, a music player, a video player, an entertainment unit, a navigation device, a computer, a hand-held personal communication systems (PCS) unit, a portable data unit, and/or a fixed location data unit.

19. A method for wear-leveling of an on-chip, non-volatile cache memory, comprising:

the step of dynamically rotating cache sets of the on-chip, non-volatile cache memory by performing a plurality of memory location swap operations on the cache sets when a number of memory write operations to the cache memory reaches a threshold value, each swap operation including invalidating contents from cache sets being swapped and leaving memory contents of other cache sets intact by swapping a mapping of at least two of the cache sets being swapped at a time without moving contents of the at least two of the cache sets being swapped between the cache sets and shifting the cache sets by at least one step after a complete swap rotation; and

the step of tracking the swapped cache sets to convert a logical cache set number to a physical cache set number.

20. The method of claim 19 , further comprising integrating the cache memory into a mobile phone, a set top box, a music player, a video player, an entertainment unit, a navigation device, a computer, a hand-held personal communication systems (PCS) unit, a portable data unit, and/or a fixed location data unit.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 21, 2013
From: DONG, XIANGYU
To: QUALCOMM INCORPORATED
Reel/Frame 029845/0919 →
Continuity (1)
Related Publication 20140237160A1 · Aug 21, 2014