# US 2021/0081331 A1 · Hybrid cache memory and method for controlling the same

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

- Number: US 2021/0081331 A1
- Document ID: US20210081331A1
- Status: Published application
- Kind: A1
- Application number: 16/571,210
- Filed: 2019-09-16
- Published: 2021-03-18
- Earliest claimed: 2019-09-16
- Assignees: Taiwan Semiconductor Manufacturing Company, Ltd.
- Applicants: Taiwan Semiconductor Manufacturing Co., Ltd.
- Inventors: Shih-Lien Linus Lu
- Web page: https://patentgrep.com/patent/US20210081331A1

## CPC

- G06F 12/123: with age lists, e.g. queue, most recently used [MRU] list or least recently used [LRU] list
- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0864: using pseudo-associative means, e.g. set-associative or hashing
- G06F 12/0877: Cache access modes
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 12/0895: of parts of caches, e.g. directory or tag array
- G06F 12/0815: Cache consistency protocols
- G06F 12/0888: using selective caching, e.g. bypass
- G06F 2212/1036: Life time enhancement
- G06F 2212/225: Hybrid cache memory, e.g. having both volatile and non-volatile portions
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A hybrid cache memory and a method for controlling the same are provided. The method for controlling a cache includes: receiving a request for data; determining whether the requested data is present in a first portion of the cache, a second portion of cache, or not in the cache, wherein the first portion of cache has a smaller access latency than the second portion of cache; loading the requested data from a memory of a next level into the first portion of the cache and the second portion of the cache if the requested data is not in the cache, and retrieving the requested data from the first portion of the cache; and retrieving the requested data from the first portion of the cache or the second portion of the cache without writing data to the second portion of the cache if the requested data is in the cache.

## Claims

### Claim 1

A method for controlling a cache, comprising:
receiving a request for data;
determining whether the requested data is present in a first portion of the cache, a second portion of cache, or not in the cache, wherein the first portion of cache has a smaller access latency than the second portion of cache;
loading the requested data from a memory of a next level into the first portion of the cache and the second portion of the cache if the requested data is not in the cache, and retrieving the requested data from the first portion of the cache; and
retrieving the requested data from the first portion of the cache or the second portion of the cache without writing data to the second portion of the cache if the requested data is in the cache.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
duplicating the requested data in the second portion of the cache to the first portion of the cache if the requested data is located in the second portion of the cache and data in the first portion of the cache has been written back to a main memory.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
determining whether the requested data is located in a way of a LRU portion in the second portion of the cache; and
updating a replacement status to point to another way of the second portion of the cache if the requested data is located in the way of the LRU portion.

### Claim 4 (depends on 2)

The method of claim 2, further comprising:
invalidating a way of the second portion of the cache where the requested data is located after duplication.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
duplicating the requested data in the second portion of the cache to a second most recently used way in the first portion of the cache if the requested data is located in the second portion of the cache.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
updating a replacement status to point to another way of the second portion of the cache if the requested data is located in a way of a least recently used (LRU) portion in the second portion of the cache and the data in the first portion of the cache has not been written back to a main memory.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
duplicating the data in the second portion of the cache to the first portion of the cache and merging new data with the duplicated data if the requested data is located in the second portion of the cache and the data in the first portion of the cache has been written back to a main memory; and
invalidating the way of the second portion of the cache where the requested data is located after duplication.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
determining whether the requested data is located in a way of a LRU portion in the second portion of the cache; and
updating a replacement status to point to another way of the second portion of the cache if the requested data is located in the way of the LRU portion.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
writing the data in the first portion of the cache back to a main memory, duplicating the data in the second portion of the cache to the first portion of the cache and merging new data with the duplicated data if the requested data is located in the second portion of the cache and the data in the first portion of the cache has not been written back to the main memory; and
invalidating the way of the second portion of the cache where the requested data is located after duplication.

### Claim 10 (depends on 1)

The method of claim 1, wherein the cache is collocated with a processor on a single chip package.

### Claim 11

A hardware implemented finite state machine, comprising:
a digital logic circuit, which, when operating, causes the hardware implemented finite state machine to perform operations comprising:
receiving a request for data;
determining whether the requested data is present in a first portion of the cache, a second portion of cache, or not in the cache, wherein the first portion of cache has a smaller access latency than the second portion of cache;
loading the requested data from a memory of a next level into the first portion of the cache and the second portion of the cache if the requested data is not in the cache, and retrieving the requested data from the first portion of the cache; and
retrieving the requested data from the first portion of the cache or the second portion of the cache without writing data to the second portion of the cache if the requested data is in the cache.

### Claim 12

A semiconductor memory device, comprising:
a processor;
a first portion of cache comprising at least one block of data storage and implemented using a first type of memory;
a second portion of cache comprising a plurality of blocks of data storage and implemented using a second type of memory having a larger access latency than the first type of memory; and
hardware implemented logic configured to:
receive a request for data from the processor;
determine whether the requested data is present in the first portion of the cache, the second portion of cache, or not in the cache; and
load the requested data from a memory of a next level into the first portion of the cache and the second portion of the cache if the requested data is not in the cache, and retrieve the requested data from the first portion of the cache; and
retrieve the requested data from the first portion of the cache or the second portion of the cache without writing data to the second portion of the cache if the requested data is in the cache.

### Claim 13 (depends on 12)

The semiconductor device of claim 12, wherein the hardware implemented logic is further configured to duplicate the requested data in the second portion of the cache to the first portion of the cache if the requested data is located in the second portion of the cache and data in the first portion of the cache has been written back a main memory.

### Claim 14 (depends on 13)

The semiconductor device of claim 13, wherein the hardware implemented logic is further configured to determine whether the requested data is located in a way of a LRU portion in the second portion of the cache, and update a replacement status to point to another way of the second portion of the cache if the requested data is located in the way of the LRU portion.

### Claim 15 (depends on 13)

The semiconductor device of claim 13, wherein the hardware implemented logic is further configured to invalidate a way of the second portion of the cache where the requested data is located after duplication.

### Claim 16 (depends on 12)

The semiconductor device of claim 12, wherein the hardware implemented logic is further configured to duplicate the requested data in the second portion of the cache to a second most recently used way in the first portion of the cache if the requested data is located in the second portion of the cache.

### Claim 17 (depends on 12)

The semiconductor device of claim 12, wherein the hardware implemented logic is further configured to update a replacement status to point to another way of the second portion of the cache if the requested data is located in a way of a LRU portion in the second portion of the cache and the data in the first portion of the cache has not been written back to a main memory.

### Claim 18 (depends on 12)

The semiconductor device of claim 12, wherein the hardware implemented logic is further configured to duplicate the data in the second portion of the cache to the first portion of the cache and merging new data with the duplicated data if the requested data is located in the second portion of the cache and the data in the first portion of the cache has been written back to a main memory, and invalidate the way of the second portion of the cache where the requested data is located after duplication.

### Claim 19 (depends on 12)

The semiconductor device of claim 12, wherein the hardware implemented logic is further configured to duplicate the data in the first portion of the cache to a main memory, duplicate the data in the second portion of the cache to the first portion of the cache and merge new data with the duplicated data if the requested data is located in the second portion of the cache and the data in the first portion of the cache has not been written back to the main memory, and invalidate the way of the second portion of the cache where the requested data is located after duplication.

### Claim 20 (depends on 12)

The semiconductor device of claim 12, wherein the first portion of cache comprises at least one block of data storage implemented using static random access memory (SRAM) and the second portion of cache comprises a plurality of blocks of data storage implemented using a second memory technology with a smaller cell size than SRAM.
