# US 2012/0084515 A1 · Cache memory controller and method for replacing a cache block

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

- Number: US 2012/0084515 A1
- Document ID: US20120084515A1
- Status: Published application
- Kind: A1
- Application number: 13/376,271
- Filed: 2009-09-02
- Published: 2012-04-05
- Earliest claimed: 2009-06-05
- Assignees: Sejong University Industry Academy Cooperation Foundation
- Inventors: Gi Ho Park
- Web page: https://patentgrep.com/patent/US20120084515A1

## CPC

- G06F 12/127: using additional replacement algorithms
- G06F 12/128: adapted to multidimensional cache systems, e.g. set-associative, multicache, multiset or multilevel
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure relates to a cache memory controller for controlling a set-associative cache memory, in which two or more blocks are arranged in the same set, the cache memory controller including a content modification status monitoring unit for monitoring whether some of the blocks arranged in the same set of the cache memory have been modified in contents, and a cache block replacing unit for replacing a block, which has not been modified in contents, if some of the blocks arranged in the same set have been modified in contents.

## Claims

### Claim 1

A cache memory controller for controlling a set-associative cache memory, in which two or more blocks are arranged in the same set, the cache memory controller comprising:
a write buffer monitoring unit configured to monitor whether a number of cache blocks stored in the write buffer is at least a predetermined threshold;
a content modification status monitoring unit configured to monitor whether some of the blocks arranged in the same set of the cache memory have been modified in contents; and
a cache block replacing unit configured to replace a lower memory block fetched as a result of cache miss, when the number of the cache blocks stored in the write buffer is at least the threshold, and some of the blocks arranged in the same set have not been modified in contents, with the blocks that have not been modified in contents.

### Claim 2 (depends on 1)

The cache memory controller of claim 1, further comprising:
a first cache replacement executing unit configured to execute a predetermined first cache replacement algorithm;
wherein the cache block replacing unit executes the first cache replacement algorithm when the number of cache blocks stored in the write buffer is less than the threshold.

### Claim 3 (depends on 2)

The cache memory controller of claim 2, wherein the cache block replacing unit executes the first cache replacement algorithm when all the blocks arranged in the same set of the cache memory have been modified in contents.

### Claim 4 (depends on 2)

The cache memory controller of claim 2, wherein the cache block replacing unit executes the first cache replacement algorithm, when a plurality of blocks have not been modified in contents among the blocks arranged in the same set of the cache memory, for the plurality of blocks, which have not been modified.

### Claim 5 (depends on 2)

The cache memory controller of claim 2, wherein the first cache replacement algorithm is an LRU (Least Recently Used) algorithm, which selects the least recently referenced block as a block to be replaced.

### Claim 6

A method for replacing a cache block of a set-associative cache memory, in which two or more blocks are arranged in the same set, the method comprising:
monitoring cache blocks stored in the write buffer upon cache miss;
determining whether a number of the stored cache blocks is at least a threshold;
determining whether a data array includes a dirty block, based on a dirty bit of a tag array; and
replacing a lower memory block fetched as a result of the cache miss with a clean block, if the number of the cache blocks stored in the write buffer is at least a threshold, and some of the two or more blocks arranged in the same set include a dirty block.

### Claim 7

(canceled)

### Claim 8 (depends on 6)

The method for replacing a cache block claimed in claim 6, wherein if the number of the stored cache blocks is less than the threshold, a first cache replacement algorithm is executed.

### Claim 9 (depends on 8)

The method for replacing a cache block claimed in claim 8, wherein even if the number of the stored cache blocks is at least the threshold, if the two or more blocks arranged in the same set are all dirty blocks, the first cache replacement algorithm is executed.

### Claim 10 (depends on 8)

The method for replacing a cache block claimed in claim 8, further comprising executing the first cache replacement algorithm, for a plurality of clean blocks if the plurality of clean blocks are arranged in the same set.

### Claim 11 (depends on 8)

The method for replacing a cache block claimed in claim 8, wherein the first cache replacement algorithm is an LRU (Least Recently Used) algorithm, which selects the least recently referenced block as a block to be replaced.
