# US 2008/0120471 A1 · Method and apparatus for least-recently-used replacement of a block frame in an electronic memory device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2008/0120471 A1
- Document ID: US20080120471A1
- Status: Published application
- Kind: A1
- Application number: 11/935,970
- Filed: 2007-11-06
- Published: 2008-05-22
- Earliest claimed: 2006-11-06
- Assignees: On Demand Microelectronics
- Inventors: Florian Blaschegg
- Web page: https://patentgrep.com/patent/US20080120471A1

## CPC

- G06F 12/123: with age lists, e.g. queue, most recently used [MRU] list or least recently used [LRU] list
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and apparatus for replacement in a least-recently-used strategies is disclosed. An exemplary embodiment of the replacement strategy presented herein is a replacement strategy for set associative caches. The method and apparatus stores a priority level to determine which block frame is to be selected for replacement. Due to its simplicity, the disclosed approach and apparatus enables small implementations and is easily scalable. Consequently, the present method and apparatus is highly desirable for implementations of area critical applications.

## Claims

### Claim 1

An electronic system to implement a replacement strategy, the system comprising:
a set of N blocks, each of the set of N blocks capable of storing at least one value; and
a set of N priority modules, each of the N priority modules being electrically coupled to a select one of the set of N blocks, each of the set of N priority modules including:
a priority level register configured to store a priority level value, the priority level being an integer within a range of 0 to N−1;
an incrementor configured to generate a next higher priority level value;
an equal comparator configured to compare the priority level value with a reference value and generate an equal signal when the priority level value and the reference value are equal, the reference value being an integer from 0 to N−1;
a second comparator configured to compare the priority level value with the reference value and generate a second signal when the priority level value is greater than the reference value; and
a logic circuit configured to load the priority level register, the logic circuit further configured to be responsive to the equal signal and the second signal.

### Claim 2 (depends on 1)

The electronic system of claim 1 further comprising the logic circuit being configured to:
load the priority level register with a zero when the priority level value and the reference value are equal;
load the priority level register with a next higher priority level value when the priority level value is lower than the reference value; and
load the priority level register with the priority level value when the priority level is higher than the reference value.

### Claim 3 (depends on 1)

The electronic system of claim 1 wherein the priority level register has log(N−1)+1 bits.

### Claim 4 (depends on 1)

The electronic system of claim 1 wherein the logic includes a means to reset the priority level register to a certain reset value.

### Claim 5 (depends on 1)

The electronic system of claim 1 wherein the set of N blocks forms a set of an N-associative cache.

### Claim 6

A method of reading a block from a set of N blocks in a data processing environment, the method comprising:
storing a select one of a plurality of priority level values in each of a set of N priority modules;
determining whether a selected block in the set of N blocks is available using an address of the block;
determining a current priority level value,
the current priority level value being a priority level of the selected block to be read;
reading the selected block;
resetting the current priority level to zero; and
incrementing each priority level of a set of N priority level registers to a next higher priority level which are lower than a reference value.

### Claim 7 (depends on 6)

The method of claim 6 further comprising selecting the priority level register to have log(N−1)+1 bits.

### Claim 8 (depends on 6)

The method of claim 6 wherein the set of N blocks forms a set of a N-associative cache.

### Claim 9 (depends on 6)

The method of claim 6 further comprising:
passing each of the plurality of priority level values of the plurality of priority modules to a logic circuit;
selecting one of the priority levels passed to the logic circuit;
selecting a reference value from a set of possible values, the set of possible values comprising the integers of “0,” “N−1,” and the selected priority level; and
applying the reference value to each of the plurality of priority modules.

### Claim 10 (depends on 9)

The method of claim 9 wherein the “0” is selected when a set of a selected cache is not accessed, the value of “N−1” is selected when a block is written to the set of the selected cache, and the selected priority level is selected when a block is read from the set of the selected cache.

### Claim 11

A method of replacing a current block in a set of N blocks with a new block in the set of N blocks in a data processing environment, the method comprising:
storing one of a plurality of priority level values in each of a plurality of priority modules;
determining whether the current block has a priority level value of N−1;
overwriting the current block with the new block; and
resetting the priority level value assigned to the current block to zero;
incrementing each priority level of the set of N priority level registers to a next higher priority level except for the priority level assigned to the current block.

### Claim 12 (depends on 11)

The method of claim 11 further comprising selecting the priority level register to have log(N−1)+1 bits.

### Claim 13 (depends on 11)

The method of claim 11 wherein the set of N blocks forms a set of a N-associative cache.

### Claim 14 (depends on 11)

The method of claim 11 further comprising:
passing each of the plurality of priority level values of the plurality of priority modules to a logic circuit;
selecting one of the priority levels passed to the logic circuit;
selecting a reference value from a set of possible values, the set of possible values comprising the integers of “0,” “N−1,” and the selected priority level; and
applying the reference value to each of the plurality of priority modules.

### Claim 15 (depends on 14)

The method of claim 14 wherein the “0” is selected when a set of a selected cache is not accessed, the value of “N−1” is selected when a block is written to the set of the selected cache, and the selected priority level is selected when a block is read from the set of the selected cache.
