IP Library › Granted Patent US 9,996,471
Granted Patent B2
US 9,996,471 · App. 15/194,902 · Granted Jun 12, 2018

Cache with compressed data and tag

Inventors: Ali Saidi (Austin, TX); Kshitij Sudan (Austin, TX); Andrew Joseph Rushing (Austin, TX); Andreas Hansson (Cambridge, GB); Michael Filippo (Driftwood, TX)
Assignee: Arm Limited
G06F12/0871G06F12/0873G06F12/0895G06F2212/305G06F2212/401G06F2212/466
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,996,471
App. No.
15/194,902
Granted
Jun 12, 2018
Kind
B2
Abstract

Cache line data and metadata are compressed and stored in first and, optionally, second memory regions, the metadata including an address tag When the compressed data fit entirely within a primary block in the first memory region, both data and metadata are retrieved in a single memory access. Otherwise, overflow data is stored in an overflow block in the second memory region. The first and second memory regions may be located in the same row of a DRAM, for example, or in different regions of a DRAM and may be configured to enable standard DRAM components to be used. Compression and decompression logic circuits may be included in a memory controller.

Claims (62)

1. An apparatus for storing a plurality of cache lines, where each cache line is configured to store data and metadata associated with the data, and where the metadata includes an address tag, the apparatus comprising:

a first memory region comprising a plurality of rows, each row of the plurality of rows comprising one or more primary blocks and each primary block sized to store data of a cache line;

a second memory region comprising a plurality of overflow blocks, each overflow block associated with a primary block of the plurality of primary blocks;

a first logic circuit configured to:

compress data of a first cache line or both data and metadata of the first cache line to produce a compressed data block;

when the compressed data block fits in a primary block, store the compressed data block in the first primary block; and

a second logic circuit configured to:

decompress data retrieved from a second primary block to recover data and metadata of a second cache line associated with an address; and

determine if an address tag of the metadata matches the address,

where the first logic circuit is further configured to:

assert a ‘Fits’ bit associated with a first primary block when the compressed data block fits in a primary block and is stored in the first primary block; and

when the compressed data block does not fit in a primary block, de-assert the ‘Fits’ bit associated with the first primary block, store a first portion of the data and metadata of the first cache line in the first primary block and store a second portion of the data and metadata of the first cache line in an overflow block associated with the first primary block; and

where the second logic circuit is further configured to:

decompress data retrieved from a second primary block to recover data and metadata of a second cache line associated with an address when a ‘Fits’ bit associated with a second primary block is asserted; and

when the ‘Fits’ bit associated with the second primary block is not asserted, retrieve a first portion of the data and metadata of the second cache line from the second primary block and retrieve a second portion of the data and metadata of the second cache line from a second overflow block, where the second overflow block is associated with the second primary block.

2. The apparatus of claim 1 , where an overflow block of the plurality of overflow blocks is located in the same memory row as the primary block with which it associated.

3. The apparatus of claim 2 , where a size of an overflow block of the plurality of overflow blocks is insufficient to store metadata of a cache line and where the memory row is configured to store a ‘RowOverflow’ bit, the apparatus further comprising:

a third memory region of sufficient size to store metadata of the plurality of cache lines in a plurality of third overflow blocks;

where the first logic circuit is configured to:

store a first portion of the data and metadata of the first cache line in the first primary block and store a second portion of the data and metadata of the first cache line of the first cache line in a third overflow block associated with the first primary block when a memory row is not large enough to hold all of the compressed data associated with the memory and assert the ‘RowOverflow’ bit of the memory row; and

where the second logic circuit is configured:

retrieve data from the second primary block and a third overflow block to recover data and metadata of the first cache line, when the ‘RowOverflow’ bit is asserted, where the third overflow block is associated with the second primary block.

4. The apparatus of claim 3 , where each primary block of the first memory region is associated with one overflow block of the third memory region in a direct mapping.

5. The apparatus of claim 1 , where an overflow block of the plurality of overflow blocks is sized to store metadata of a cache line.

6. The apparatus of claim 1 , where each primary block of the first memory region is associated with one overflow block of the second memory region.

7. The apparatus of claim 1 , further comprising a memory controller that comprises the first and second logic circuits, where the first memory region and the second memory region are regions of a dynamic random access memory (DRAM) and where the memory controller is coupled to the DRAM via a bus.

8. The apparatus of claim 1 , where the first logic circuit is configured to store the first and second portions of the data and metadata of the first cache line in a compressed form when the compressed data block does not fit in a primary block.

9. The apparatus of claim 1 , where the first logic circuit is configured to store the first and second portions of the data and metadata of the first cache line in uncompressed form when the compressed data block does not fit in a primary block.

10. The apparatus of claim 1 , further comprising a cache client.

11. The apparatus of claim 1 , further comprising a memory controller that comprises the first and second logic circuits.

12. The apparatus of claim 1 , further comprising a backing storage device, where the address comprises an address in the backing storage device.

13. The apparatus of claim 12 , where the backing storage device comprises a storage class memory (SCM).

14. A non-transient computer readable medium containing instructions of a hardware language that define the apparatus of claim 1 .

15. A method of reading a cache line containing cache line data and cache line metadata, the method comprising:

locating a primary block in a first memory region, the primary block associated with the cache line;

reading first data in the located primary block;

if a ‘fits’ bit associated with the first data is asserted, decompressing the first data, to obtain the cache line data and the cache line metadata;

if the ‘fits’ bit associated with the first data is not asserted:

locating an overflow block in a second memory region, the overflow block associated with the located primary block;

reading second data held in the overflow block; and

combining the first and second data to obtain the cache line data and the cache line metadata.

16. The method of claim 15 , further comprising:

identifying the cache line from an address in a backing storage device;

identifying a first address tag from the address;

comparing the first address tag with a second address tag of the metadata;

where the cache line is associated with an address, the method further comprising; and

reading the backing storage device at the address if the first and second tags do not match.

17. The method of claim 16 , where the backing storage device comprises a storage class memory (SCM).

18. The method of claim 16 , where the first memory region and the second memory region are regions of a dynamic random access memory (DRAM) and where reading the first data comprises accessing the DRAM via a data bus structure.

19. A method of writing a cache line containing cache line data and cache line metadata to a memory comprising a first memory region configured as a plurality of primary block and a second memory region configured as a plurality of overflow blocks, each overflow block of the plurality of overflow block associated with a corresponding primary block of the plurality of primary block, the method comprising:

compressing the cache line data and the cache line metadata to produce compressed data;

if the compressed data fits within a primary block of the plurality of primary blocks:

identifying a primary block associated with the cache line;

writing the compressed data to the identified primary block; and

asserting a ‘fits’ bit associated with the identified primary block; and

if the compressed data does not fit within a primary block of the plurality of primary blocks:

identifying a primary block associated with the cache line;

writing a first portion of the cache line data and the cache line metadata to the identified primary block;

identifying an overflow block associated with the cache line;

writing a second portion of the cache line data and the cache line metadata to the identified overflow block; and

de-asserting a ‘fits’ bit associated with the identified primary block.

20. The method of claim 19 , where the first memory region and the second memory region are regions of a dynamic random access memory (DRAM) and where reading the first data comprises accessing the DRAM via a data bus structure.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 28, 2016
From: SAIDI, ALI; SUDAN, KSHITIJ; RUSHING, ANDREW JOSEPH; HANSSON, ANDREAS; FILIPPO, MICHAEL
To: ARM LIMITED
Reel/Frame 039186/0872 →
Continuity (1)
Related Publication 20170371793A1 · Dec 28, 2017