IP Library › Granted Patent US 12,675,312
Granted Patent B2
US 12,675,312 · App. 18/753,113 · Granted Jul 7, 2026

Pseudo-random way selection

Inventors: Abhijeet Ashok Chachad (Plano, TX); David Matthew Thompson (Dallas, TX)
Assignee: Texas Instruments Incorporated
G06F9/467G06F9/30047G06F9/30079G06F9/30098G06F9/30101G06F9/30189G06F9/3867G06F9/4498G06F9/4881G06F9/544G06F11/3037G06F12/0811G06F12/0813G06F12/0824G06F12/0828G06F12/0831G06F12/0855G06F12/0871G06F12/0888G06F12/0891G06F12/12G06F13/1668G06F12/0804G06F12/121G06F2212/1016G06F2212/1044G06F2212/621
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,675,312
App. No.
18/753,113
Filed
Jun 25, 2024
Granted
Jul 7, 2026
Kind
B2
Art Unit
2132
USPC
711/141
Abstract

A method includes receiving a first request to allocate a line in an N-way set associative cache and, in response to a cache coherence state of a way indicating that a cache line stored in the way is invalid, allocating the way for the first request. The method also includes, in response to no ways in the set having a cache coherence state indicating that the cache line stored in the way is invalid, randomly selecting one of the ways in the set. The method also includes, in response to a cache coherence state of the selected way indicating that another request is not pending for the selected way, allocating the selected way for the first request.

Claims (57)

1 . A method, comprising:

receiving a first request to allocate a line in an N-way set associative cache;

in response to a cache coherence state of a way in the N-way set associative cache indicating that a cache line stored in the way is invalid, allocating the way for the first request; and

in response to no ways in the N-way set associative cache having a cache coherence state indicating that the cache line stored in the way is invalid, pseudo-randomly selecting one of the ways in the N-way set associative cache;

determining whether a cache coherence state of the pseudo-randomly selected way indicates that another request is not pending for the pseudo-randomly selected way in response to pseudo-randomly selecting the one of the ways; and

allocating the pseudo-randomly selected way for the first request in response to determining that the cache coherence state of the pseudo-randomly selected way indicates that another request is not pending for the pseudo-randomly selected way.

2 . The method of claim 1 , further comprising:

servicing the first request without allocating a line in the N-way set associative cache in response to determining that the cache coherence state of the pseudo-randomly selected way indicates that another request is pending for the pseudo-randomly selected way.

3 . The method of claim 2 , wherein servicing the first request without allocating a line in the N-way set associative cache further comprises converting the first request to a non-allocating request and sending the non-allocating request to a memory endpoint identified by the first request.

4 . The method of claim 1 , further comprising:

pseudo-randomly selecting another of the ways in the N-way set associative cache in response to determining that the cache coherence state of the pseudo-randomly selected way indicates that another request is pending for the pseudo-randomly selected way.

5 . The method of claim 4 , further comprising continuing to pseudo-randomly select another of the ways in the N-way set associative cache until the cache coherence state of the pseudo-randomly selected way does not indicate that another request is pending for the pseudo-randomly selected way.

6 . The method of claim 4 , further comprising continuing to pseudo-randomly select another of the ways in the N-way set associative cache until a threshold number of pseudo-random selections have been performed.

7 . The method of claim 1 , wherein allocating the pseudo-randomly selected way for the first request further comprises updating the cache coherence state of the pseudo-randomly selected way to indicate that the first request is pending for the pseudo-randomly selected way and sending the first request to a memory endpoint identified by the first request.

8 . A level two (L2) cache subsystem, comprising:

a L2 cache configured as an N-way set associative cache; and

a L2 controller configured to:

receive a first request to allocate a line in the L2 cache;

determine whether a cache coherence state of a way in the N-way set associative cache indicates that a cache line stored in the way is invalid;

allocate the way for the first request in response to determining that the cache coherence state of the way indicates that the cache line stored in the way is invalid;

pseudo-randomly select one of the ways in the N-way set associative cache in response to determining that no ways in the N-way set associative cache have a cache coherence state indicating that the cache line stored in the way is invalid;

determine whether a cache coherence state of the pseudo-randomly selected way indicates that another request is not pending allocation for the pseudo-randomly selected way; and

allocate the pseudo-randomly selected way for the first request in response to determining that the cache coherence state of the pseudo-randomly selected way indicates that another request is not pending for the pseudo-randomly selected way.

9 . The L2 cache subsystem of claim 8 , wherein the L2controller is further configured to service the first request without allocating a line in the L2 cache in response to determining that based on the cache coherence state of the pseudo-randomly selected way indicates that another request is pending for the pseudo-randomly selected way.

10 . The L2 cache subsystem of claim 9 , wherein in response to the L2 controller servicing the first request without allocating a line in the L2 cache, the L2 controller is further configured to convert the first request to a non-allocating request and send the non-allocating request to a memory endpoint identified by the first request.

11 . The L2 cache subsystem of claim 8 , wherein the L2 controller is further configured to pseudo-randomly select another of the ways in the N-way set associative cache in response to determining that the cache coherence state of the pseudo-randomly selected way indicates that another request is pending for the pseudo-randomly selected way.

12 . The L2 cache subsystem of claim 11 , wherein the L2 controller is further configured to continue to pseudo-randomly select another of the ways in the N-way set associative cache until the cache coherence state of the pseudo-randomly selected way does not indicate that another request is pending for the pseudo-randomly selected way.

13 . The L2 cache subsystem of claim 11 , wherein the L2 controller is further configured to continue to pseudo-randomly select another of the ways in the N-way set associative cache until a threshold number of pseudo-random selections have been performed.

14 . The L2 cache subsystem of claim 8 , wherein in response to the L 2 controller allocating the pseudo-randomly selected way for the first request, the L2 controller is further configured to update the cache coherence state of the pseudo-randomly selected way to indicate that the first request is pending for the pseudo-randomly selected way and send the first request to a memory endpoint identified by the first request.

15 . A system, comprising:

a cache that includes lines arranged in a set of ways;

a memory configured to store a respective value for each of the lines of the cache, wherein the value for each line includes a first portion and a second portion, and wherein the first portion indicates a modified state, an exclusive state, or a shared state of the line, and the first portion and the second portion collectively indicate an invalid state or a pending state of the line; and

a controller coupled to the cache and the memory and configured to:

receive a request associated with the set of ways of the cache;

determine whether any line of the lines has the invalid state based on the values for the lines stored in the memory;

allocate a first line of the lines to the request in response to determining the first line of the lines has the invalid state based on the value for the first line;

pseudo-randomly select one of the lines in response to determining that none of the lines has the invalid state based on the values for the lines stored in the memory;

determine whether the pseudo-randomly selected line does not have the pending state based on the value for the pseudo-randomly selected line in response to pseudo-randomly selecting the one of the lines; and

allocate the pseudo-randomly selected line to the request in response to determining that the pseudo-randomly selected line does not have the pending state.

16 . The system of claim 15 , wherein the first portion and the second portion collectively further indicate an available for new allocations state or an unavailable for new allocations state of the line.

17 . The system of claim 16 , wherein the first portion of the value for each line includes a 2-bit value, and wherein the second portion includes a 1-bit value.

18 . The system of claim 17 , wherein the first portion and the second portion of the value for each line collectively indicate the state of the line as:

the invalid state based on the first portion and the second portion collectively being equal to 000;

the pending state based on the first portion and the second portion collectively being equal to 001;

the shared state and the available for new allocations state based on the first portion and the second portion collectively being equal to 010;

the shared state and the unavailable for new allocations state based on the first portion and the second portion collectively being equal to 011;

the exclusive state and the available for new allocations state based on the first portion and the second portion collectively being equal to 100;

the exclusive state and the unavailable for new allocations state based on the first portion and the second portion collectively being equal to 101;

the modified state and the available for new allocations state based on the first portion and the second portion collectively being equal to 110; and

the modified state and the unavailable for new allocations state based on the first portion and the second portion collectively being equal to 111.

19 . The system of claim 15 , wherein the controller is configured to:

in response to determining that none of the lines has the invalid state:

mask a first subset of the lines having the pending state to determine a second subset of the lines that does not have the pending state;

pseudo-randomly select the one of the lines out of the second subset of lines; and

allocate the pseudo-randomly selected line to the request in response to pseudo-randomly selecting the one of the lines out of the second subset of lines.

20 . The system of claim 19 , wherein the controller is configured to:

service the request without allocating a line in the cache to the request in response to determining that the second subset of the lines is empty.

Continuity (3)
Division 16882287 · May 22, 2020
Provisional Application 62852461 · May 24, 2019
Related Publication 20240345868A1 · Oct 17, 2024
References Cited (163)
US 5651136A · Denton · 1997 [cited by applicant]
US 5860114A · Sell · 1999 [cited by applicant]
US 5926830A · Feiste · 1999 [cited by applicant]
US 5940858A · Green · 1999 [cited by applicant]
US 6145054A · Mehrotra · 2000 [cited by applicant]
US 6148372A · Mehrotra · 2000 [cited by applicant]
US 6148416A · Masubuchi · 2000 [cited by applicant]
US 6226713B1 · Mehrotra · 2001 [cited by applicant]
US 6430654B1 · Mehrotra · 2002 [cited by applicant]
US 6748495B2 · Rowlands et al. · 2004 [cited by applicant]
US 6775750B2 · Krueger · 2004 [cited by applicant]
US 6915396B2 · Wiens · 2005 [cited by applicant]
US 6918021B2 · Krick · 2005 [cited by applicant]
US 6928517B1 · Englin · 2005 [cited by applicant]
US 7062631B1 · Klaiber · 2006 [cited by applicant]
US 7127561B2 · Hill · 2006 [cited by applicant]
US 7386685B2 · Blumrich et al. · 2008 [cited by applicant]
US 7631132B1 · Neuman · 2009 [cited by applicant]
US 7769956B2 · Tsien · 2010 [cited by applicant]
US 8094677B2 · Juan · 2012 [cited by applicant]
US 8095734B2 · Lippert et al. · 2012 [cited by applicant]
US 8131948B2 · Moyer · 2012 [cited by applicant]
US 8181005B2 · Zuraski, Jr. · 2012 [cited by applicant]
US 8266383B1 · Minkin · 2012 [cited by applicant]
US 8271993B2 · Keladi · 2012 [cited by applicant]
US 8327082B2 · Moyer · 2012 [cited by applicant]
US 8341353B2 · Venkumahanti · 2012 [cited by applicant]
US 9092156B1 · Xu · 2015 [cited by applicant]
US 9170955B2 · Forsyth · 2015 [cited by applicant]
US 9223705B2 · Jayaseelan · 2015 [cited by applicant]
US 9229729B2 · Sanner, III · 2016 [cited by applicant]
US 9720833B2 · Drapala · 2017 [cited by applicant]
US 10459866B1 · Fleming, Jr. · 2019 [cited by applicant]
US 10891240B2 · Mathew · 2021 [cited by applicant]
US 10915471B2 · Chofleming · 2021 [cited by applicant]
US 11029958B1 · Zhang · 2021 [cited by applicant]
US 11194617B2 · Chachad · 2021 [cited by applicant]
US 11294707B2 · Chachad · 2022 [cited by applicant]
US 11307987B2 · Chachad · 2022 [cited by applicant]
US 11816032B2 · Chachad · 2023 [cited by applicant]
US 20020083244A1 · Hammarlund · 2002 [cited by applicant]
US 20020124143A1 · Barroso · 2002 [cited by applicant]
US 20020129208A1 · Barroso · 2002 [cited by applicant]
US 20020147889A1 · Kruckemyer · 2002 [cited by applicant]
US 20020169931A1 · Krick · 2002 [cited by applicant]
US 20020169935A1 · Krick · 2002 [cited by applicant]
US 20020174253A1 · Hayter · 2002 [cited by applicant]
US 20020188821A1 · Wiens · 2002 [cited by applicant]
US 20030028728A1 · Ito · 2003 [cited by applicant]
US 20030110356A1 · Williams, III · 2003 [cited by examiner]
US 20030200404A1 · Wicki et al. · 2003 [cited by applicant]
US 20040083341A1 · Robinson · 2004 [cited by applicant]
US 20040117561A1 · Quach · 2004 [cited by applicant]
US 20050027946A1 · Desai · 2005 [cited by examiner]
US 20050080994A1 · Cohen · 2005 [cited by applicant]
US 20060031640A1 · Henry · 2006 [cited by applicant]
US 20060059316A1 · Asher · 2006 [cited by applicant]
US 20060075192A1 · Golden · 2006 [cited by applicant]
US 20060136915A1 · Aingaran · 2006 [cited by applicant]
US 20060155963A1 · Bohrer · 2006 [cited by applicant]
US 20060224829A1 · Evrard · 2006 [cited by applicant]
US 20060282622A1 · Sistla · 2006 [cited by applicant]
US 20070055827A1 · Tsien · 2007 [cited by applicant]
US 20070186050A1 · Luick · 2007 [cited by applicant]
US 20070186073A1 · Luick · 2007 [cited by applicant]
US 20070260819A1 · Gao · 2007 [cited by applicant]
US 20080034024A1 · Savell · 2008 [cited by applicant]
US 20080091880A1 · Vishin · 2008 [cited by applicant]
US 20080140934A1 · Luick · 2008 [cited by applicant]
US 20080205438A1 · Juan · 2008 [cited by applicant]
US 20080252032A1 · Keeler · 2008 [cited by applicant]
US 20080270692A1 · Cochran · 2008 [cited by applicant]
US 20080282032A1 · Shen · 2008 [cited by examiner]
US 20090049279A1 · Steiss · 2009 [cited by applicant]
US 20090132764A1 · Moll · 2009 [cited by applicant]
US 20090172289A1 · Yamamura · 2009 [cited by examiner]
US 20090182944A1 · Comparan · 2009 [cited by applicant]
US 20100005246A1 · Beers · 2010 [cited by applicant]
US 20100057998A1 · Moyer · 2010 [cited by applicant]
US 20100058000A1 · Moyer · 2010 [cited by applicant]
US 20100088472A1 · Ukai · 2010 [cited by applicant]
US 20100274962A1 · Mosek · 2010 [cited by examiner]
US 20110016281A1 · Williamson · 2011 [cited by applicant]
US 20110072212A1 · Kojima · 2011 [cited by applicant]
US 20110082981A1 · Hoogerbrugge · 2011 [cited by applicant]
US 20110113196A1 · Hooker · 2011 [cited by applicant]
US 20110167243A1 · Yip · 2011 [cited by applicant]
US 20120042126A1 · Krick · 2012 [cited by applicant]
US 20120191914A1 · Tran · 2012 [cited by applicant]
US 20120191916A1 · Chachad · 2012 [cited by applicant]
US 20120221774A1 · Atkisson · 2012 [cited by applicant]
US 20120221793A1 · Tran · 2012 [cited by applicant]
US 20130117503A1 · Nellans · 2013 [cited by applicant]
US 20130191601A1 · Peterson · 2013 [cited by applicant]
US 20140115279A1 · Chirca · 2014 [cited by applicant]
US 20140129811A1 · Yamauchi · 2014 [cited by applicant]
US 20140136793A1 · Robertson · 2014 [cited by applicant]
US 20140189245A1 · Rupley · 2014 [cited by applicant]
US 20140195737A1 · Lilly · 2014 [cited by applicant]
US 20140201452A1 · Meredith · 2014 [cited by applicant]
US 20140258605A1 · Cai · 2014 [cited by examiner]
US 20140281242A1 · Abdallah · 2014 [cited by applicant]
US 20140297920A1 · Takeda · 2014 [cited by applicant]
US 20140297965A1 · Jayaseelan · 2014 [cited by applicant]
US 20140317351A1 · Rao · 2014 [cited by applicant]
US 20140317951A1 · Kauling · 2014 [cited by applicant]
US 20140365730A1 · Tsao · 2014 [cited by applicant]
US 20150006820A1 · Bhoria · 2015 [cited by applicant]
US 20150019840A1 · Anderson · 2015 [cited by applicant]
US 20150309939A1 · Sadoughi-Yarandi · 2015 [cited by applicant]
US 20150317248A1 · Lamb · 2015 [cited by applicant]
US 20160357680A1 · Hooker · 2016 [cited by examiner]
US 20170083444A1 · Dev · 2017 [cited by applicant]
US 20170123835A1 · Mizuno · 2017 [cited by applicant]
US 20170123987A1 · Cheng · 2017 [cited by applicant]
US 20170177500A1 · Shanbhogue · 2017 [cited by applicant]
US 20180004661A1 · Umehara · 2018 [cited by applicant]
US 20180060238A1 · Esser · 2018 [cited by applicant]
US 20180203798A1 · Hughes · 2018 [cited by examiner]
US 20180232311A1 · Bhati · 2018 [cited by applicant]
US 20180293693A1 · Ray · 2018 [cited by applicant]
US 20190042445A1 · Swaminathan · 2019 [cited by applicant]
US 20190058731A1 · Garg · 2019 [cited by applicant]
US 20190065404A1 · Kabra · 2019 [cited by applicant]
US 20190155732A1 · Hagersten · 2019 [cited by applicant]
US 20190171573A1 · Rose · 2019 [cited by applicant]
US 20190303159A1 · Fryman · 2019 [cited by applicant]
US 20190303297A1 · Fleming, Jr. · 2019 [cited by applicant]
US 20200004690A1 · Mathew · 2020 [cited by applicant]
US 20200104259A1 · Wang · 2020 [cited by applicant]
US 20200250099A1 · Campbell · 2020 [cited by applicant]
US 20200371924A1 · Chachad · 2020 [cited by applicant]
US 20200371925A1 · Chachad · 2020 [cited by applicant]
US 20200371926A1 · Chachad · 2020 [cited by applicant]
US 20200371935A1 · Chachad · 2020 [cited by applicant]
US 20210200541A1 · Zhang · 2021 [cited by applicant]
US 20210365374A1 · Chachad · 2021 [cited by applicant]
US 20210397524A1 · Chen et al. · 2021 [cited by applicant]
US 20220100680A1 · Chrysos · 2022 [cited by applicant]
CA 2238586A1 · 1998 [cited by applicant]
CN 102016810A · 2011 [cited by applicant]
CN 105740168B · 2018 [cited by applicant]
DE 102018126650A1 · 2019 [cited by applicant]
EP 0481233A2 · 1992 [cited by applicant]
EP 1217526A1 · 2002 [cited by applicant]
EP 1150213B1 · 2012 [cited by applicant]
KR 101681423B1 · 2016 [cited by applicant]
WO 2018031149A1 · 2018 [cited by applicant]
WO 2019194916A1 · 2019 [cited by applicant]
WO 2020005444A1 · 2020 [cited by applicant]
WO 2020005447A1 · 2020 [cited by applicant]
WO 2020243045A1 · 2020 [cited by applicant]
International Search Report for PCT/US2020/034458 mailed Aug. 27, 2020. [cited by applicant]
International Search Report for PCT/US2020/034471 mailed Aug. 20, 2020. [cited by applicant]
International Search Report for PCT/US2020/034557 mailed Sep. 10, 2020. [cited by applicant]
International Search Report for PCT/US2020/034560 mailed Aug. 20, 2020. [cited by applicant]
Meaney, et al.; “IBM z990 Soft Error Detection and Recovery”; Sep. 2005; IEEE; IEEE Transactions on Device and Materials Reliability. vol. 5 pp. 419-417. [cited by applicant]
Office Action for corresponding China Patent Application No. 202080038124.2 dated Apr. 25, 2025, 9 pgs. [cited by applicant]
Sorin, et al.; A Primer on Memory Consistency and Cache Coherence; 2011; Morgan & Claypool; pp. 99-114. [cited by applicant]
Barroso, et al; “Piranha: A Scalable Architecture Based on Single-Chip Multiprocessing”; ACM.ISCA 00; pp. 282-293. [cited by applicant]
Handy, Jim; The Cache Memory Book, 1998, Academic Press, 2nd edition, pp. 126-135 [cited by applicant]
IEEE.org IEEE Xplore; IEEE.sa; IEEE Spectrum; Advanced Search Results; 2021. [cited by applicant]
International Search Report for PCT/US2020/034472 mailed Aug. 27, 2020, 3 pgs. [cited by applicant]