IP Library › Granted Patent US 12,216,591
Granted Patent B2
US 12,216,591 · App. 18/477,674 · Granted Feb 4, 2025

Atomic compare and swap in a coherent cache system

Inventors: Naveen Bhoria (Plano, TX); Timothy David Anderson (University Park, TX); Pete Michael Hippleheuser (Murphy, TX)
Assignee: Texas Instruments Incorporated
G06F12/128G06F9/3001G06F9/30043G06F9/30047G06F9/546G06F11/1064G06F12/0215G06F12/0238G06F12/0292G06F12/0802G06F12/0804G06F12/0806G06F12/0811G06F12/0815G06F12/082G06F12/0853G06F12/0855G06F12/0864G06F12/0884G06F12/0888G06F12/0891G06F12/0895G06F12/0897G06F12/12G06F12/121G06F12/126G06F12/127G06F13/1605G06F13/1642G06F13/1673G06F13/1689G06F15/8069G11C5/066G11C7/10G11C7/1015G11C7/106G11C7/1075G11C7/1078G11C7/1087G11C7/222G11C29/42G11C29/44G06F2212/1016G06F2212/1021G06F2212/1024G06F2212/1041G06F2212/1044G06F2212/301G06F2212/454G06F2212/603G06F2212/6032G06F2212/6042G06F2212/608G06F2212/62
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 12,216,591
App. No.
18/477,674
Granted
Feb 4, 2025
Kind
B2
Abstract

Methods, apparatus, systems and articles of manufacture to facilitate atomic compare and swap in cache for a coherent level 1 data cache system are disclosed. An example system includes a cache storage; a cache controller coupled to the cache storage wherein the cache controller is operable to: receive a memory operation that specifies a key, a memory address, and a first set of data; retrieve a second set of data corresponding to the memory address; compare the second set of data to the key; based on the second set of data corresponding to the key, cause the first set of data to be stored at the memory address; and based on the second set of data not corresponding to the key, complete the memory operation without causing the first set of data to be stored at the memory address.

Claims (42)

1. A device comprising:

a processor configured to:

receive a processor instruction; and

based on the processor instruction, provide a memory operation that specifies a value, an address, and a first set of data;

a cache controller coupled to the processor;

a tag memory coupled to the cache controller;

a store queue coupled to the cache controller; and

a first cache memory coupled to the store queue, wherein the cache controller is configured to, based on the memory operation:

determine whether the address is associated with a hit in the first cache memory;

based on the address being associated with a hit, determine whether to retrieve a second set of data from the first cache memory or a second cache memory based on a state stored in the tag memory and associated with the address; and

cause the store queue to:

determine whether the second set of data corresponds to the value; and

based on whether the second set of data corresponds to the value, determine whether to store the first set of data in the first cache memory.

2. The device of claim 1 , wherein the cache controller is configured to cause the store queue to replace the second set of data with the first set of data.

3. The device of claim 1 , wherein the cache controller is configured to, based on the address being associated with a miss in the first cache memory, retrieve the second set of data from the second cache memory.

4. The device of claim 1 , wherein the cache controller is configured to retrieve the second set of data from the second cache memory based on the address being associated with a hit and the state being a shared state.

5. The device of claim 4 , wherein the cache controller is configured to retrieve the second set of data from the first cache memory based on the address being associated with a hit and the state being a modified state or an exclusive state.

6. The device of claim 4 , wherein the cache controller is configured to retrieve the second set of data from the second cache memory by requesting the second set of data in an exclusive state.

7. The device of claim 6 , wherein the cache controller is configured to set the state stored in the tag memory to the exclusive state upon requesting the second set of data from the second cache memory.

8. The device of claim 6 , wherein the cache controller is configured to set the state stored in the tag memory to the exclusive state upon receiving the second set of data from the second cache memory.

9. The device of claim 1 , wherein the first cache memory is a level-one (L1) cache memory and the second cache memory is a level-two (L2) cache memory.

10. The device of claim 1 , wherein the first cache memory includes at least one of a main cache memory or a victim cache memory.

11. The device of claim 1 , wherein the store queue includes:

a compare circuit configured to:

determine whether the second set of data corresponds to the value; and

based on whether the second set of data corresponds to the value, determine whether to provide the first set of data for storing in the first cache memory at an output;

an arbitration manager coupled to the compare circuit and configured to store the first set of data in the first cache memory; and

a feedback path from the output of the compare circuit to an input of the compare circuit.

12. The device of claim 11 , wherein the store queue includes an arithmetic circuit coupled in parallel with the compare circuit.

13. The device of claim 11 , wherein the store queue includes a read-modify-write circuit coupled in parallel with the compare circuit.

14. A method comprising:

receiving, by a cache controller, a memory operation that specifies a value, an address, and a first set of data;

determining whether the address is associated with a hit in a first cache memory;

based on the address being associated with a hit, determining whether to retrieve a second set of data associated with the address from the first cache memory or a second cache memory based on a state stored in a tag memory;

determining whether the second set of data corresponds to the value; and

determining whether to store the first set of data in the first cache memory based on whether the second set of data corresponds to the value.

15. The method of claim 14 comprising, based on the second set of data corresponding to the value, replacing the second set of data with the first set of data.

16. The method of claim 14 comprising retrieving the second set of data from the second cache memory based on the address being associated with a hit and the state being a shared state.

17. The method of claim 16 , wherein the retrieving of the second set of data from the second cache memory includes requesting the second set of data in an exclusive state.

18. The method of claim 14 comprising retrieving the second set of data from the first cache memory based on the address being associated with a hit and the state being a modified state or an exclusive state.

19. The method of claim 14 , wherein the first cache memory is a level one (L1) cache memory and the second cache memory is a level two (L2) cache memory.

20. The method of claim 14 , wherein the first cache memory includes at least one of a main cache memory or a victim cache memory.

Continuity (4)
Continuation 17472811 · Sep 13, 2021
Continuation 16882272 · May 22, 2020
Provisional Application 62852494 · May 24, 2019
Related Publication 20240028523A1 · Jan 25, 2024
References Cited (12)
US 6243791B1 · Vondran, Jr. · 2001 [cited by examiner]
US 7401197B2 · Kezuka et al. · 2008 [cited by applicant]
US 9361408B2 · Marukame et al. · 2016 [cited by applicant]
US 10169091B2 · Barrow-Williams et al. · 2019 [cited by applicant]
US 11061810B2 · Campbell et al. · 2021 [cited by applicant]
US 20120079102A1 · Damodaran · 2012 [cited by examiner]
US 20130318288A1 · Khan et al. · 2013 [cited by applicant]
US 20150106597A1 · Godard et al. · 2015 [cited by applicant]
US 20150113228A1 · Huang · 2015 [cited by examiner]
US 20150278011A1 · Keppel et al. · 2015 [cited by applicant]
US 20150309942A1 · Moretti · 2015 [cited by applicant]
US 20200119753A1 · Chirca · 2020 [cited by examiner]