IP Library Granted Patent US 12,093,179
Granted Patent B2
US 12,093,179 · App. 17/747,513 · Granted Sep 17, 2024

Store-to-load forwarding correctness checks using physical address proxies stored in load queue entries

Inventors: John G. Favor (San Francisco, CA); Srivatsan Srinivasan (Cedar Park, TX)
Assignee: Ventana Micro Systems Inc.
G06F12/0864G06F2212/6032
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,093,179
App. No.
17/747,513
Granted
Sep 17, 2024
Kind
B2
Abstract

A microprocessor includes a load/store unit that performs store-to-load forwarding, a PIPT L2 set-associative cache, a store queue having store entries, and a load queue having load entries. Each L2 entry is uniquely identified by a set index and a way. Each store/load entry holds, for an associated store/load instruction, a store/load physical address proxy (PAP) for a store/load physical memory line address (PMLA). The store/load PAP specifies the set index and the way of the L2 entry into which a cache line specified by the store/load PMLA is allocated. Each load entry also holds associated load instruction store-to-load forwarding information. The load/store unit compares the store PAP with the load PAP of each valid load entry whose associated load instruction is younger in program order than the store instruction and uses the comparison and associated forwarding information to check store-to-load forwarding correctness with respect to each younger load instruction.

Claims (94)

1. A microprocessor, comprising:

a load/store unit configured to perform store-to-load forwarding;

a physically-indexed physically-tagged second-level set-associative cache, wherein each entry in the second-level cache is uniquely identified by a set index and a way of the second-level cache;

a store queue having store entries, wherein each store entry is configured to hold, for an associated store instruction to which the store entry has been allocated:

a store physical address proxy (PAP) for a store physical memory line address that is a translation of a store virtual memory line address specified by the associated store instruction, wherein the store PAP specifies the set index and the way of the entry in the second-level cache into which a cache line specified by the store physical memory line address is allocated; and

a load queue having load entries, wherein each load entry is configured to hold, for an associated load instruction to which the load entry has been allocated:

a load PAP for a load physical memory line address that is a translation of a load virtual memory line address specified by the associated load instruction, wherein the load PAP specifies the set index and the way of the entry in the second-level cache into which a cache line specified by the load physical memory line address is allocated; and

forwarding information about store-to-load forwarding with respect to the associated load instruction; and

wherein the load/store unit is configured to:

make a comparison of the store PAP associated with the store instruction with the load PAP of each valid entry of the load queue whose associated load instruction is younger in program order than the store instruction; and

use the comparison, along with the associated forwarding information, to make a store-to-load forwarding correctness check with respect to each younger load instruction.

2. The microprocessor of claim 1 ,

wherein the load/store unit is configured to make the comparison of the store PAP associated with the store instruction with the load PAP of each valid entry of the load queue whose associated load instruction is younger in program order than the store instruction rather than making a comparison of the store physical memory line address associated with the store instruction with the load physical memory line address of each valid entry of the load queue whose associated load instruction is younger in program order than the store instruction.

3. The microprocessor of claim 1 ,

wherein to make the store-to-load forwarding correctness check, the load/store unit selectively updates the forwarding information; and

wherein the forwarding information cumulatively indicates, as each older store instruction is committed, whether the load/store unit performed a store-to-load forwarding violation with respect to the load instruction.

4. The microprocessor of claim 1 ,

wherein the load/store unit is further configured to, for each load instruction of the younger load instructions:

determine when all store instructions older in program order than the load instruction have committed and the load instruction has become the oldest outstanding load/store instruction; and

if the store-to-load forwarding correctness checks indicate the load/store unit performed a store-to-load forwarding violation with respect to the load instruction:

signal a request to abort the load instruction and all instructions younger in program order than the load instruction; and

otherwise, commit the load instruction.

5. The microprocessor of claim 1 ,

wherein the forwarding information identifies a store instruction, if any, from which store data was forwarded to the associated load instruction.

6. The microprocessor of claim 1 ,

wherein the load/store unit is configured to make the comparison and use the comparison when committing a store instruction; and

wherein the committing the store instruction comprises writing store data specified by the store instruction to a cache memory of the microprocessor.

7. The microprocessor of claim 1 ,

wherein each store entry is further configured to hold additional store address and size information that indicates a location and size of store data within a memory line specified by the store physical memory line address for which the store PAP is a proxy;

wherein each load entry is further configured to hold additional load address and size information that indicates a location and size of load data within a memory line specified by the load physical memory line address for which the load PAP is a proxy; and

wherein the comparison further includes comparing the additional store address and size information with the additional load address and size information of each valid entry of the load queue whose associated load instruction is younger in program order than the store instruction.

8. A method, comprising:

in a microprocessor comprising:

a load/store unit configured to perform store-to-load forwarding;

a physically-indexed physically-tagged second-level set-associative cache, wherein each entry in the second-level cache is uniquely identified by a set index and a way of the second-level cache;

a store queue having store entries, wherein each store entry is configured to hold, for an associated store instruction to which the store entry has been allocated:

a store physical address proxy (PAP) for a store physical memory line address that is a translation of a store virtual memory line address specified by the associated store instruction, wherein the store PAP specifies the set index and the way of the entry in the second-level cache into which a cache line specified by the store physical memory line address is allocated; and

a load queue having load entries, wherein each load entry is configured to hold, for an associated load instruction to which the load entry has been allocated:

a load PAP for a load physical memory line address that is a translation of a load virtual memory line address specified by the associated load instruction, wherein the load PAP specifies the set index and the way of the entry in the second-level cache into which a cache line specified by the load physical memory line address is allocated; and

forwarding information about store-to-load forwarding with respect to the associated load instruction;

by the load/store unit:

making a comparison of the store PAP associated with the store instruction with the load PAP of each valid entry of the load queue whose associated load instruction is younger in program order than the store instruction; and

using the comparison, along with the associated forwarding information, to make a store-to-load forwarding correctness check with respect to each younger load instruction.

9. The method of claim 8 , further comprising:

said making the comparison of the store PAP associated with the store instruction with the load PAP of each valid entry of the load queue whose associated load instruction is younger in program order than the store instruction rather than making a comparison of the store physical memory line address associated with the store instruction with the load physical memory line address of each valid entry of the load queue whose associated load instruction is younger in program order than the store instruction.

10. The method of claim 8 ,

wherein said using the comparison, along with the associated forwarding information, to make the store-to-load forwarding correctness check, comprises:

selectively updating the forwarding information, wherein the forwarding information cumulatively indicates, as each older store instruction is committed, whether the load/store unit performed a store-to-load forwarding violation with respect to the load instruction.

11. The method of claim 8 , further comprising:

for each load instruction of the younger load instructions:

determining when all store instructions older in program order than the load instruction have committed and the load instruction has become the oldest outstanding load/store instruction; and

if the store-to-load forwarding correctness checks indicate the load/store unit performed a store-to-load forwarding violation with respect to the load instruction:

signaling a request to abort the load instruction and all instructions younger in program order than the load instruction; and

otherwise, committing the load instruction.

12. The method of claim 8 ,

wherein the forwarding information identifies a store instruction, if any, from which store data was forwarded to the associated load instruction.

13. The method of claim 8 ,

wherein said making the comparison and said using the comparison are performed by the load/store unit when committing a store instruction; and

wherein said committing the store instruction comprises writing store data specified by the store instruction to a cache memory of the microprocessor.

14. The method of claim 8 ,

wherein each store entry is further configured to hold additional store address and size information that indicates a location and size of store data within a memory line specified by the store physical memory line address for which the store PAP is a proxy;

wherein each load entry is further configured to hold additional load address and size information that indicates a location and size of load data within a memory line specified by the load physical memory line address for which the load PAP is a proxy; and

wherein said making the comparison further includes comparing the additional store address and size information with the additional load address and size information of each valid entry of the load queue whose associated load instruction is younger in program order than the store instruction.

15. A non-transitory computer-readable medium having instructions stored thereon that are capable of causing or configuring a microprocessor comprising:

a load/store unit configured to perform store-to-load forwarding;

a physically-indexed physically-tagged second-level set-associative cache, wherein each entry in the second-level cache is uniquely identified by a set index and a way of the second-level cache;

a store queue having store entries, wherein each store entry is configured to hold, for an associated store instruction to which the store entry has been allocated:

a store physical address proxy (PAP) for a store physical memory line address that is a translation of a store virtual memory line address specified by the associated store instruction, wherein the store PAP specifies the set index and the way of the entry in the second-level cache into which a cache line specified by the store physical memory line address is allocated; and

a load queue having load entries, wherein each load entry is configured to hold, for an associated load instruction to which the load entry has been allocated:

a load PAP for a load physical memory line address that is a translation of a load virtual memory line address specified by the associated load instruction, wherein the load PAP specifies the set index and the way of the entry in the second-level cache into which a cache line specified by the load physical memory line address is allocated; and

forwarding information about store-to-load forwarding with respect to the associated load instruction; and

wherein the load/store unit is configured to:

make a comparison of the store PAP associated with the store instruction with the load PAP of each valid entry of the load queue whose associated load instruction is younger in program order than the store instruction; and

use the comparison, along with the associated forwarding information, to make a store-to-load forwarding correctness check with respect to each younger load instruction.

16. The non-transitory computer-readable medium of claim 15 ,

wherein the load/store unit is configured to make the comparison of the store PAP associated with the store instruction with the load PAP of each valid entry of the load queue whose associated load instruction is younger in program order than the store instruction rather than making a comparison of the store physical memory line address associated with the store instruction with the load physical memory line address of each valid entry of the load queue whose associated load instruction is younger in program order than the store instruction.

17. The non-transitory computer-readable medium of claim 15 ,

wherein to make the store-to-load forwarding correctness check, the load/store unit selectively updates the forwarding information; and

wherein the forwarding information cumulatively indicates, as each older store instruction is committed, whether the load/store unit performed a store-to-load forwarding violation with respect to the load instruction.

18. The non-transitory computer-readable medium of claim 15 ,

wherein the load/store unit is further configured to, for each load instruction of the younger load instructions:

determine when all store instructions older in program order than the load instruction have committed and the load instruction has become the oldest outstanding load/store instruction; and

if the store-to-load forwarding correctness checks indicate the load/store unit performed a store-to-load forwarding violation with respect to the load instruction:

signal a request to abort the load instruction and all instructions younger in program order than the load instruction; and

otherwise, commit the load instruction.

19. The non-transitory computer-readable medium of claim 15 ,

wherein the forwarding information identifies a store instruction, if any, from which store data was forwarded to the associated load instruction.

20. The non-transitory computer-readable medium of claim 15 ,

wherein the load/store unit is configured to make the comparison and use the comparison when committing a store instruction; and

wherein the committing the store instruction comprises writing store data specified by the store instruction to a cache memory of the microprocessor.

21. The non-transitory computer-readable medium of claim 15 ,

wherein each store entry is further configured to hold additional store address and size information that indicates a location and size of store data within a memory line specified by the store physical memory line address for which the store PAP is a proxy;

wherein each load entry is further configured to hold additional load address and size information that indicates a location and size of load data within a memory line specified by the load physical memory line address for which the load PAP is a proxy; and

wherein the comparison further includes comparing the additional store address and size information with the additional load address and size information of each valid entry of the load queue whose associated load instruction is younger in program order than the store instruction.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 24, 2022
From: FAVOR, JOHN G.; SRINIVASAN, SRIVATSAN
To: VENTANA MICRO SYSTEMS INC.
Reel/Frame 059999/0941 →
Continuity (12)
Continuation In Part 17370009 · Jul 8, 2021
Continuation In Part 17351946 · Jun 18, 2021
Continuation In Part 17351927 · Jun 18, 2021
Continuation In Part 17351927 · Jun 18, 2021
Continuation In Part 17351946 · Jun 18, 2021
Continuation In Part 17315262 · May 7, 2021
Continuation In Part 17315262 · May 7, 2021
Continuation In Part 17315262 · May 7, 2021
Continuation In Part 17315262 · May 7, 2021
Provisional Application 63331487 · Apr 15, 2022
Provisional Application 63271934 · Oct 26, 2021
Related Publication 20220358044A1 · Nov 10, 2022