IP Library Granted Patent US 12,430,134
Granted Patent B2
US 12,430,134 · App. 18/586,186 · Granted Sep 30, 2025

Instruction fetch using a sequential prediction circuit

Inventors: Pruthivi Vuyyuru (Santa Clara, CA); Ian D. Kountanis (Santa Clara, CA)
Assignee: Apple Inc.
G06F9/3806G06F9/30134
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,430,134
App. No.
18/586,186
Granted
Sep 30, 2025
Kind
B2
Abstract

An apparatus includes a sequential fetch circuit configured to provide a given sequential fetch address for use in a fetch request, and a sequential prediction circuit configured to store, for one or more sequential fetch addresses, respective sets of sequential fetch parameters for use in subsequent fetch requests. The apparatus further includes a fetch control circuit configured to, based at least on retrieving a particular sequential fetch address from the sequential fetch circuit, use the particular sequential fetch address to determine whether a particular set of sequential fetch parameters exists in the sequential prediction circuit. The fetch control circuit is also configured to, based at least on a determination that the particular set of sequential fetch parameters exists, use the particular set of sequential fetch parameters to create a next fetch request to retrieve instructions starting at the particular sequential fetch address.

Claims (55)

1. An apparatus comprising:

a sequential fetch circuit configured to provide a given sequential fetch address for use in a fetch request;

a sequential prediction circuit configured to store, for one or more sequential fetch addresses, respective sets of sequential fetch parameters for use in subsequent fetch requests, wherein a given set of sequential fetch parameters is stored based at least on a determination that one or more parameters of the given set satisfy a particular condition; and

a fetch control circuit configured to:

based at least on retrieving a particular sequential fetch address from the sequential fetch circuit, use the particular sequential fetch address to determine whether a particular set of sequential fetch parameters exists in the sequential prediction circuit; and

based at least on a determination that the particular set of sequential fetch parameters exists, use the particular set of sequential fetch parameters to create a next fetch request to retrieve instructions starting at the particular sequential fetch address.

2. The apparatus of claim 1 , wherein the particular set of sequential fetch parameters includes a fetch width that is less than a maximum fetch width.

3. The apparatus of claim 1 , further comprising a branch prediction circuit with a plurality of banks; and

wherein the particular set of sequential fetch parameters includes an indication of which banks of the plurality of banks to access.

4. The apparatus of claim 1 , wherein the fetch control circuit is further configured to:

prior to a storing of the particular set of sequential fetch parameters, determine the particular set of sequential fetch parameters based on a retrieval of a fetch group starting from the particular sequential fetch address; and

based at least on a determination that one or more of the particular set of sequential fetch parameters satisfies the particular condition, store the particular set of sequential fetch parameters in a particular entry in the sequential prediction circuit.

5. The apparatus of claim 4 , wherein the particular condition is that the fetch group includes a control transfer instruction.

6. The apparatus of claim 4 , wherein the particular condition is that a fetch width of the fetch group is less than a particular value.

7. The apparatus of claim 4 , further comprising a branch prediction circuit with a plurality of banks; and

wherein the particular condition is that less than all banks of the plurality of banks are accessed in response to the retrieval of the fetch group.

8. The apparatus of claim 4 , wherein the fetch control circuit is further configured to use a linear-shift feedback register to select the particular entry in the sequential prediction circuit.

9. The apparatus of claim 8 , wherein the fetch control circuit is further configured to:

in response to determining that no entry is currently available in the sequential prediction circuit:

adjust a respective counter for a selected entry of the sequential prediction circuit; and

in response to a determination that the respective counter has a particular value, replace a current set of sequential fetch parameters in the selected entry with the particular set of sequential fetch parameters.

10. A method comprising:

storing, by an instruction fetch circuit into ones of a plurality of entries, respective sets of sequential fetch parameters associated with selected ones of a plurality of sequential fetch addresses that have been used in performed fetch requests, wherein a given set of sequential fetch parameters is stored based at least on a determination that one or more parameters of the given set of sequential fetch parameters satisfies a particular condition;

accessing, by the instruction fetch circuit, the plurality of entries using a retrieved sequential fetch address;

determining, by the instruction fetch circuit, whether any of the plurality of entries corresponds to the retrieved sequential fetch address; and

based at least on identifying a corresponding entry, creating, by the instruction fetch circuit using a particular set of sequential fetch parameters included in the corresponding entry, a next fetch request to retrieve instructions starting at the retrieved sequential fetch address.

11. The method of claim 10 , further comprising:

prior to a storing of the particular set of sequential fetch parameters into the corresponding entry, determining the particular set of sequential fetch parameters based on a retrieval of a fetch group starting from the retrieved sequential fetch address; and

based at least on determining that one or more of the particular set of sequential fetch parameters satisfies the particular condition, identifying an available entry of the plurality of entries.

12. The method of claim 11 , further comprising:

in response to identifying the available entry of the plurality of entries, storing the particular set of sequential fetch parameters into the available entry, wherein the available entry is the corresponding entry.

13. The method of claim 11 , further comprising:

in response to determining that no entry of the plurality of entries is currently available:

adjusting a respective count value for a selected entry of the plurality of entries; and

in response to a determination that the respective count value satisfies a threshold value, replace a current set of sequential fetch parameters in the selected entry with the particular set of sequential fetch parameters, wherein the selected entry is the corresponding entry.

14. The method of claim 11 , wherein the particular condition is that a fetch width of the fetch group is less than a maximum width.

15. The method of claim 10 , wherein the particular set of sequential fetch parameters includes a fetch width indicating less than a maximum fetch width.

16. A system comprising:

a sequential fetch circuit configured to provide a given sequential fetch address for use in a given fetch request;

a sequential prediction circuit including a plurality of entries capable of storing, for one or more sequential fetch addresses, respective sets of sequential fetch parameters for use in subsequent fetch requests; and

a fetch control circuit is configured to:

issue a fetch request that uses, as a starting address, a particular sequential fetch address received from the sequential fetch circuit;

determine a particular set of sequential fetch parameters based on a performance of the issued fetch request;

based at least on a determination that one or more of the particular set of sequential fetch parameters satisfies a particular condition, identify an available entry of the plurality of entries; and

store the particular set of sequential fetch parameters in a particular entry identified in the sequential prediction circuit.

17. The system of claim 16 , wherein the fetch control circuit is further configured to:

subsequent to storing the particular set of sequential fetch parameters in the particular entry, receive the particular sequential fetch address for use in a subsequent fetch request; and

use the particular sequential fetch address to determine whether an entry in the sequential prediction circuit is associated with the particular sequential fetch address.

18. The system of claim 17 , wherein the fetch control circuit is further configured to:

based at least on a determination that the particular entry is associated with the particular sequential fetch address, use the particular set of sequential fetch parameters from the particular entry to create the subsequent fetch request to retrieve instructions starting at the particular sequential fetch address.

19. The system of claim 16 , wherein the fetch control circuit is further configured to:

prior to storing the particular set of sequential fetch parameters in the particular entry, determine that no entry is currently available in the sequential prediction circuit; and

based at least on a lack of an available entry, adjust a respective counter for a selected entry of the plurality of entries in the sequential prediction circuit.

20. The system of claim 19 , wherein the fetch control circuit is further configured to:

in response to a determination that the respective counter satisfies a threshold value, replace a current set of sequential fetch parameters in the selected entry with the particular set of sequential fetch parameters.

Continuity (2)
Continuation 17806234 · Jun 9, 2022
Related Publication 20240256280A1 · Aug 1, 2024
References Cited (11)
US 6973563B1 · Sander · 2005 [cited by applicant]
US 9201658B2 · Kountanis et al. · 2015 [cited by applicant]
US 9367471B2 · Blasco-Allue et al. · 2016 [cited by applicant]
US 10445102B1 · Pistol et al. · 2019 [cited by applicant]
US 20140075156A1 · Blasco-Allue · 2014 [cited by examiner]
US 20140344558A1 · Holman et al. · 2014 [cited by applicant]
US 20150169041A1 · Blasco et al. · 2015 [cited by applicant]
US 20190303161A1 · Nassi et al. · 2019 [cited by applicant]
US 20200081716A1 · Yalavarti · 2020 [cited by examiner]
US 20200310811A1 · Ishii et al. · 2020 [cited by applicant]
GB 2542831A · 2017 [cited by applicant]