Instruction Address Translation and Instruction Prefetch Engine
A branch predictor in microprocessors prefetches address translations for alternate and lookahead paths into the level 1 TLB to mitigate branch latency, enhancing instruction fetch efficiency.
Patent Information
- Application Number
- JP2022578571
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-06-26
- Filing Date
- 2021-06-25
- Publication Date
- 2026-01-05
- Estimated Expiration
- 2041-06-25
AI Technical Summary
Branch instructions in microprocessors cause delays due to the need to evaluate branch outcomes, leading to inefficiencies in instruction fetch throughput, as branch prediction alone cannot eliminate the latency associated with branch evaluation.
Implement a branch predictor that prefetches address translations for both alternate and lookahead branch paths into the level 1 translation lookaside buffer (TLB) to reduce latency from misses in the level 0 TLB, using techniques that include determining primary and alternate control flow path instruction addresses and requesting level 1 TLB to cache these translations.
Reduces branch misprediction penalties and overall latency by prefetching address translations, thereby improving instruction fetch throughput and reducing performance degradation.
Smart Images

Figure 0007793552000001 
Figure 0007793552000002 
Figure 0007793552000003
Abstract
Description
[Technical Field]
[0001] (CROSS-REFERENCE TO RELATED APPLICATIONS) This application claims the benefit of U.S. Patent Application No. 16 / 913,520, filed June 26, 2020, entitled "INSTRUCTION ADDRESS TRANSLATION AND INSTRUCTION PREFETCH ENGINE," which is incorporated herein by reference in its entirety. [Background technology]
[0002] In a microprocessor, instructions are fetched and executed sequentially until a branch is taken. A branch may cause a change in the address from which instructions are fetched, resulting in a delay in instruction fetch throughput. For example, a branch may need to be evaluated to determine not only whether the branch should be taken, but also what the branch destination is. However, the branch cannot be evaluated until the branch enters the instruction execution pipeline. Branch latency is associated with the difference between when a branch is fetched and when the branch is evaluated to determine the outcome of the branch and therefore which instruction needs to be fetched next. Branch prediction helps to mitigate this latency by predicting the existence and outcome of a branch instruction based on the instruction address. Therefore, it is desirable to improve the operation of branch predictors.
[0003] A more detailed understanding may be had from the following description, given by way of example in conjunction with the accompanying drawings, in which: [Brief explanation of the drawings]
[0004] [Figure 1] FIG. 1 is a block diagram of an example device capable of implementing one or more features of the present disclosure. [Figure 2] FIG. 2 is a block diagram of an instruction execution pipeline arranged within the processor of FIG. 1. [Figure 3A] FIG. 2 illustrates an exemplary instruction fetch subsystem. [Figure 3B]FIG. 2 illustrates another exemplary instruction fetch system. [Figure 4] 1 is a flow diagram of a method for performing an instruction fetch operation, according to an example. DETAILED DESCRIPTION OF THE INVENTION
[0005] Techniques for performing an instruction fetch operation are provided, including determining an instruction address of a primary branch prediction path, requesting a level 0 translation lookaside buffer (TLB) to cache an address translation of the primary branch prediction path, determining either or both of alternate control flow path instruction addresses and lookahead control flow path instruction addresses, and requesting a level 1 TLB to cache address translations of either or both of the alternate control flow path instruction addresses and lookahead control flow path instruction addresses.
[0006] 1 is a block diagram of an example device 100 in which aspects of the present disclosure may be implemented. Device 100 may include, for example, a computer, a gaming device, a handheld device, a set-top box, a television, a mobile phone, or a tablet computer. Device 100 includes a processor 102, a memory 104, a storage device 106, one or more input devices 108, and one or more output devices 110. Device 100 may also optionally include an input driver 112 and an output driver 114. It should be understood that device 100 may include additional components not shown in FIG. 1 .
[0007] The processor 102 may include a central processing unit (CPU), a graphics processing unit (GPU), a CPU and a GPU located on the same die, or one or more processor cores, each of which may be a CPU or a GPU. The memory 104 may be located on the same die as the processor 102 or may be located separately from the processor 102. The memory 104 may include volatile or non-volatile memory (e.g., random access memory (RAM), dynamic RAM, cache).
[0008] The storage devices 106 include fixed or removable storage devices (e.g., hard disk drives, solid state drives, optical disks, flash drives). The input devices 108 include keyboards, keypads, touchscreens, touchpads, detectors, microphones, accelerometers, gyroscopes, biometric scanners, or network connections (e.g., wireless local area network cards for transmitting and / or receiving wireless IEEE 802 signals). The output devices 110 include displays, speakers, printers, haptic feedback devices, one or more optics, antennas, or network connections (e.g., wireless local area network cards for transmitting and / or receiving wireless IEEE 802 signals).
[0009] Input driver 112 communicates with processor 102 and input device 108, allowing processor 102 to receive input from input device 108. Output driver 114 communicates with processor 102 and output device 110, allowing processor 102 to send output to output device 110. It should be noted that input driver 112 and output driver 114 are optional components, and that device 100 may be operated in the same manner without input driver 112 and output driver 114 present.
[0010] Figure 2 is a block diagram of an instruction execution pipeline 200 located within processor 102 of Figure 1. While one particular configuration of instruction execution pipeline 200 is shown, it should be understood that any instruction execution pipeline 200 that uses a branch target buffer to prefetch instructions into an instruction cache is within the scope of this disclosure. Instruction execution pipeline 200 retrieves instructions from memory, executes the instructions, outputs data to memory, and modifies the state of elements associated with instruction execution pipeline 200, such as registers in register file 218.
[0011] Instruction execution pipeline 200 includes an instruction fetch unit 204 that fetches instructions from system memory (such as memory 104) using instruction cache 202, a decoder 208 that decodes the fetched instructions, functional units 216 that perform calculations to process the instructions, a load store unit 214 that loads data from or stores data to system memory via data cache 220, and a register file 218 that includes registers that store working data for instructions. Reorder buffer 210 tracks instructions that are currently in-flight and ensures in-order retirement of instructions while allowing out-of-order execution while in-flight. The term "in-flight instruction" refers to an instruction that has been received by reorder buffer 210 but has not yet had its result committed to the processor's architectural state (e.g., written to a register file). Reservation stations 212 maintain in-flight instructions and track instruction operands. When all operands are ready for execution for a particular instruction, reservation station 212 sends the instruction to functional unit 216 or load / store unit 214 for execution. Completed instructions are marked for retirement in reorder buffer 210 and are retired when they are at the head of reorder buffer queue 210. Retirement refers to the act of committing the result of an instruction to the architectural state of the processor. For example, writing an addition result to a register via an add instruction, writing a loaded value to a register via a load instruction, or causing instruction flow to jump to a new location via a branch instruction are all examples of retiring an instruction.
[0012] The various elements of instruction execution pipeline 200 communicate via common data bus 222. For example, functional units 216 and load / store unit 214 write results to common data bus 222, which may be read by reservation stations 212 for execution of dependent instructions and by reorder buffer 210 as final processing results for in-flight instructions that have finished executing. Load / store unit 214 also reads data from common data bus 222. For example, load / store unit 214 reads results from completed instructions from common data bus 222 and writes the results to memory via data cache 220 for store instructions.
[0013] Typically, the instruction fetch unit 204 fetches instructions sequentially into memory. Sequential control flow may be interrupted by branch instructions, which cause the instruction pipeline 200 to fetch instructions from non-sequential addresses. Branch instructions may be conditional, meaning that the branch occurs only if a certain condition is met, or unconditional, and may specify a target directly or indirectly. Direct targets are specified by constants in the instruction byte itself, while indirect targets are specified by values in registers or memory. Direct and indirect branches may be conditional or unconditional.
[0014] As mentioned above, instruction fetch unit 204 fetches instructions from instruction cache 202 for execution by the rest of pipeline 200. Generally, instruction fetching involves several phases: branch prediction, address translation, and micro-op fetch.
[0015] Branch prediction involves predicting control flow paths through a program stored in memory. More specifically, as is commonly known, a program is laid out in memory in a fixed manner. Execution without control flow modification means fetching instructions sequentially and executing those instructions. Control flow instructions, such as branches and jumps, have the ability to modify the addresses from which instructions are fetched. Such instructions "jump" to a target address unconditionally or based on the result of a conditional evaluation. The branch predictor 302 predicts the outcome of these branch and jump instructions using heuristics to predict the most likely path through the program.
[0016] In some embodiments, the output of the branch prediction is an instruction address in a virtual address space. Address translation involves translating the addresses of instructions from the virtual address space to a physical address space so that the instructions can be loaded from memory. Generally, an address translation system includes a page table walker that accepts virtual addresses, looks up those virtual addresses in a page table, and provides a physical address accordingly. A cache called a translation lookaside buffer (TLB) caches address translations for faster access. TLBs, in some embodiments, are arranged in a hierarchy (e.g., including a level 0 (L0) TLB, a level 1 (L1) TLB, a level 2 (L2) TLB, etc.).
[0017] A micro-op fetch involves fetching an instruction from memory based on a physical address. In some embodiments, this fetching occurs through a cache hierarchy. The micro-op fetch also involves translating the fetched instruction into a micro-op through instruction-to-operation translation logic. In some embodiments, the instruction-to-operation translation is cached (e.g., in a micro-op cache) for rapid retrieval at a later time.
[0018] As described above, a translation lookaside buffer fetches instruction address translations for instructions in a predicted path. Techniques are provided herein for improving the latency at which address translations are fetched.
[0019] 3A illustrates an exemplary instruction fetch subsystem 300. The instruction fetch subsystem includes a branch predictor 302, an address translation subsystem 303, and a micro-operation subsystem 305.
[0020] Address translation subsystem 303 includes a level 0 TLB 304, a level 1 TLB 306, and higher address translation levels 308, which in various embodiments include a page table walker that performs address translations based on the contents of the higher TLB levels and / or one or more page tables.
[0021] The micro-operation subsystem 305 includes a lowest level instruction cache 310 and a higher level cache 312. In some examples, the lowest level instruction cache 310 includes a level 0 instruction cache and an operation cache 310. In some examples, the lowest level instruction cache 310 includes an instruction-to-micro-operation decoder (not shown) that decodes instructions into micro-operations for execution by the instruction pipeline 200.
[0022] The branch predictor performs branch prediction operations to identify predicted path addresses, which are instruction addresses from which the instruction fetch subsystem 300 fetches instructions. As shown, the branch predictor 302 sends these predicted addresses to the lowest-level TLB 304 for address translation. The lowest-level TLB 304 acts as a cache, storing a subset of all translations in page tables for quick translation. However, it is possible that the branch predictor 302 requests a translation that is not stored in the lowest-level TLB 304. In that case, the lowest-level TLB 304 requests such a translation from the level 1 TLB 306. If the level 1 TLB 306 has such a translation, the level 1 TLB 306 returns the translation to the lowest-level TLB 304. If the level 1 TLB 306 does not have the translation, the level 1 TLB 306 requests the translation from the higher address translation level 308, and so on. The L0 TLB 304 provides instruction address translation to the micro-operation subsystem 305 to retrieve instructions at that address and translate those instructions into micro-operations.
[0023] In the instruction fetch subsystem 300, the branch predictor 302 requests the level 1 TLB 304 to prefetch certain address translations to reduce performance degradation associated with misses in the level 0 TLB 306. Specifically, the branch predictor 302 prefetches address translations from alternate branch paths and / or address translations in "lookahead" branch paths that are further along in the program control flow than the "primary" branch path instruction address sent to the level 0 TLB 304. The alternate branch path may be code that is not the same as the predicted path. If a branch is predicted taken, the alternate path is the path that is not taken. If a branch is predicted not taken, the alternate path is the path that is taken. For indirect branches, the alternate path may be a less confident target of the indirect branch predictor.
[0024] In some embodiments, the branch predictor 302 selects a particular alternate path whose address translation is fetched into the level 1 TLB 306. In some embodiments, the branch predictor 302 maintains or calculates information indicating a confidence level that any particular branch decision and / or branch target (for a conditional branch) is correct. In some embodiments, the alternate branch paths whose address translations are prefetched into the level 1 TLB 306 include paths with a relatively low confidence level (a maintained or calculated confidence level below a threshold). In other words, the branch predictor 302 fetches into the level 1 TLB 306 translations for alternate paths that pass through branch points where the confidence level of the path taken at that branch point is below a threshold. In such cases, there is a relatively high probability that a branch misprediction will occur, and therefore, a relatively high probability that the translation in the level 1 TLB 306 will be used. In some embodiments, because such highly confident branch predictions may be incorrect, the branch predictor 302 periodically (e.g., once every certain number of cycles) includes in the alternate paths paths that are not taken by the highly confident branch predictions.
[0025] In some embodiments, branch predictor 302 detects loop execution and attempts to maintain the address translation of the loop exit (exit) target in L1 TLB 306. Note that this loop exit may be an taken branch to another page or an untaken branch near the end of the page. In some embodiments, branch predictor 302 detects loop execution by detecting that control flow repeatedly returns to the same code. A loop exit is the code that is executed when the loop terminates. In various embodiments, branch predictor 302 periodically requests L1 TLB 306 to fetch and / or store the address translation of the code that will be executed after the loop terminates.
[0026] In some embodiments, the branch predictor 302 limits the translations fetched from alternate paths based on a branch depth. The branch depth indicates the number of branches beyond the branch point at which the branch predictor 302 takes a translation. In various examples, the branch depth is a tunable parameter or a fixed parameter. In various embodiments, the tunable parameter is set based on a runtime heuristic or based on a parameter set by an entity such as an operating system or an application.
[0027] In some embodiments, the branch predictor 302 limits the translations fetched from the alternate paths based on an alternate path translation limit, which indicates a limit on the total number of translations in all alternate paths that can be prefetched into the L1 TLB 306 within a given sliding time window.
[0028] As mentioned above, branch predictor 302 alternatively or additionally prefetches address translations from the "primary" (execution) path that are further in program order than the predicted path address required to be stored in level 0 TLB 304. These are sometimes referred to herein as "look-ahead" address translations or look-ahead paths.
[0029] By fetching addresses into the level 1 TLB 306 that are further in time and / or that are on alternate paths than addresses fetched into the level 0 TLB 304, the resulting miss in the level 0 TLB 304 can fetch data from the level 1 TLB 306 rather than from a higher level in the address translation subsystem 303, thereby reducing the branch misprediction penalty or the overall latency of misses in the level 0 TLB 304.
[0030] The micro-operations subsystem 305 fetches micro-operations for execution by the instruction pipeline 200. The micro-operations subsystem 305 includes a lowest level instruction cache 310. In some embodiments, the lowest level instruction cache 305 includes a lowest level instruction cache memory that caches instructions for decoding and an operation cache that caches previously decoded instructions. If the lowest level instruction cache 310 receives instructions whose decoded micro-operations are already present in the operation cache, the lowest level instruction cache 310 sends those instructions to the rest of the instruction pipeline 200 for execution. If the lowest level instruction cache 310 receives instructions whose decoded micro-operations are not yet present in the operation cache, the lowest level instruction cache 310 fetches instructions from the cache hierarchy, starting with the lowest level instruction cache memory of the lowest level instruction cache 310 and proceeding up the hierarchy to higher cache levels 312, where they are decoded into micro-operations and sent to the instruction pipeline 200 for execution.
[0031] 3B illustrates another exemplary instruction fetch system 350. Instruction fetch system 350 includes a branch predictor 352, an address translation subsystem 353, and a micro-operation subsystem 355. Address translation subsystem 353 includes a level 0 TLB 354, a level 1 TLB 356, and higher address translation levels 358. Micro-operation subsystem 355 includes a lowest level instruction cache 360, a level 1 cache 362, and higher cache levels 364.
[0032] The branch predictor 352 performs the same operations with respect to the address translation subsystem 353 as the branch predictor 302 in FIG. 3A. Specifically, the branch predictor 352 generates the addresses of the "primary" paths and transmits those addresses to the level 0 TLB 354 for address translation. The branch predictor 352 also generates the addresses of the alternative paths and / or the look-ahead paths for transmission to the level 1 TLB 356. The level 0 TLB 354 and the level 1 TLB 356, and the higher address translation level 358, function in the same manner as the level 0 TLB 304, the level 1 TLB 306, and the higher address translation level 308 in FIG. 3A.
[0033] In addition to providing the instruction indicators of the alternative path addresses and optional look-ahead addresses to the address translation subsystem 353, the branch predictor 352 also provides the data indicating these instructions to the level 1 cache 362 for prefetching. Thus, in the instruction fetch system 350, in addition to prefetching instruction fetch address translations to the level 1 TLB 356, the level 1 cache 362 prefetches the instructions of the alternative paths and / or the look-ahead paths.
[0034] The instruction fetch system 350 is the same as the instruction fetch system 300 in FIG. 3A except that the branch predictor provides information for the micro-operation subsystem 305 to fetch instructions from the alternative paths and / or the look-ahead paths. Thus, in the system 350 of FIG. 3B, the micro-operation subsystem 305 fetches instructions from the alternative paths and / or the look-ahead paths in any of the instances where the address translation subsystem 353 prefetches the corresponding address translation (where the "corresponding address translation" to an instruction is the address translation of the address where that instruction is found). In other words, the present disclosure contemplates embodiments of an instruction fetch system 350 that prefetches instructions according to any combination when the address translation subsystem 35 prefetches the corresponding address translation described herein.
[0035] 4 is a flow diagram of a method 400 for performing an instruction fetch operation, according to an example. Although method 400 is described with respect to the systems of FIGS. 1-3B, one skilled in the art will recognize that any system configured to perform the steps of method 400 in any technically feasible order is within the scope of this disclosure.
[0036] Method 400 begins at step 402, where branch predictor 302 determines the instruction address of the primary branch prediction path. As described elsewhere herein, branch prediction is a known technique in which a branch predictor makes a prediction about the destination of a particular branch using branch prediction data, such as which instruction addresses are known or predicted to be branch instructions, information derived from at least a portion of the branch address, targets (instruction addresses jump to) of previously taken branch instructions, whether conditional branches have been previously taken, and previously seen control flow patterns. In some embodiments, branch predictor 302 stores branch prediction data on a cache line basis, including information indicating the number of branches within that cache line and information that enables branch predictor 302 to determine the predicted targets of those branches.
[0037] The branch predictor 302 determines a primary control flow path that includes an instruction address of a control flow path that the branch predictor 302 predicts will actually be taken by the instruction execution pipeline 200. This primary control flow path is distinguished from one or more alternative paths that include at least a portion of an instruction that the branch predictor 302 predicts will not be taken by the instruction execution pipeline 200. The primary control flow path is distinguished from a lookahead control flow path in that the lookahead control flow path includes instructions that temporally precede the primary control flow path in the predicted control flow path.
[0038] In step 404, the branch predictor 302 requests the level 0 translation lookaside buffer to cache the address translation of the primary branch predicted path. In some embodiments, the level 0 translation lookaside buffer is the lowest level TLB available for use by the branch predictor 302.
[0039] In step 406, the branch predictor 302 determines either or both an alternate control flow path instruction address and a lookahead control flow path instruction address. In the case of a lookahead control flow path instruction address, in some embodiments, the branch predictor 302 performs the same operations to determine the instruction address of the primary branch prediction path, but retrieves an instruction further in the program control flow than the primary branch prediction path (also referred to herein as "chronologically preceding"). In the case of an alternate control flow path instruction, the branch predictor 302 identifies control flow paths for conditional branch decisions other than those predicted (e.g., if a branch is predicted taken, identifies control flow paths that pass through the "not taken" branch) and / or identifies branch targets for indirect branches that are predicted not to be taken. Because indirect branches identify branch targets based on variables rather than constants, the branch predictor 302 may store multiple candidate targets for indirect branches. In some cases, the branch predictor predicts a target to be taken for an indirect branch and, for an alternate control flow path, selects one or more not taken targets of such a branch as indicating a control flow path for obtaining an instruction address.
[0040] In step 408, branch predictor 302 requests level 1 TLB 306 to cache translations of the instruction addresses determined in step 406. Caching these addresses hides the latency from level 1 TLB 306 to higher portions of address translation subsystem 303.
[0041] In some embodiments, the granularity at which branch predictor 302 requests new address translations is at the memory page level rather than the individual instruction level because typically the virtual and physical addresses share the same offset within a page but different page numbers. Thus, in some embodiments, branch predictor 302 sends address translation subsystem 303 a new page address for each translation and does not send the same page address for translations of multiple instructions that occur within a given period (e.g., a given cycle).
[0042] 3B, L1 TLB 356 (e.g., at the direction of branch predictor 302 or other logic) requests L1 cache 362 to fetch instructions at addresses corresponding to the alternate and / or look-ahead paths. This is in addition to requesting L1 TLB 356 to cache address translations for the alternate and / or look-ahead paths.
[0043] It should be understood that with respect to flow diagram 400, the operations described as being performed by branch predictor 302, L0 TLB 304, L1 TLB 306, and higher address translation levels 308 are performed by branch predictor 352, L0 TLB 354, L1 TLB 356, and higher address translation levels 358 in the embodiment of FIG. 3B.
[0044] In some examples, the steps of FIG. 4 are performed within a single clock cycle or within a particular period, and are repeated every cycle or every particular period.
[0045] It should be understood that many variations are possible based on the disclosure herein. While features and elements are described above in particular combinations, each feature or element can be used alone without other features and elements, or in various combinations with or without other features and elements. In some examples, alternate path or fetch-ahead address translations or instructions are described as being located in a level 1 TLB or level 1 instruction cache, but it should be understood that these items can be located in either or both different TLB levels (e.g., a level 0 TLB or a level 2 TLB, or a level 0 instruction cache or a level 2 instruction cache) or different instruction cache levels.
[0046] The various functional units illustrated in the figures and / or described herein (including, where appropriate, processor 102, input drivers 112, input devices 108, output drivers 114, output devices 110, instruction cache 202, instruction fetch unit 204, decoder 208, reorder buffer 210, reservation station 212, data cache 220, load / store unit 214, functional units 216, register file 218, common data bus 222, branch predictor, and cache) may be implemented as a general-purpose computer, processor, or processor core, or as a program, software, or firmware stored on a non-transitory computer-readable storage medium or another storage medium executable by the general-purpose computer, processor, or processor core. The provided methods may be implemented in a general-purpose computer, processor, or processor core. Suitable processors include, by way of example, general-purpose processors, special-purpose processors, conventional processors, digital signal processors (DSPs), multiple microprocessors, one or more microprocessors in association with a DSP core, a controller, a microcontroller, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) circuit, any other type of integrated circuit (IC), and / or a state machine. Such processors may be fabricated by configuring a manufacturing process using the results of processed hardware description language (HDL) instructions and other intermediate data such as a netlist (such instructions may be stored on a computer-readable storage medium). The result of such processing may be a mask work that is used in subsequent semiconductor manufacturing processes to produce a processor implementing features of the present disclosure.
[0047] The methods or flow diagrams provided herein may be implemented in a computer program, software, or firmware embodied in a non-transitory computer-readable storage medium for execution by a general-purpose computer or processor. Examples of non-transitory computer-readable storage media include read-only memory (ROM), random-access memory (RAM), registers, cache memory, semiconductor memory devices, magnetic media (e.g., internal hard disks and removable disks), magneto-optical media, and optical media (e.g., CD-ROM disks and digital versatile disks (DVDs)).
Claims
1. 1. A method for performing an instruction fetch operation, comprising: determining an instruction address of a primary branch prediction path, the primary branch prediction path including a control flow path along which execution is predicted to flow; requesting a level 0 translation lookaside buffer (TLB) to cache the address translation of the primary branch predicted path; determining one or both of an alternative control flow path instruction address that is an instruction address of an alternative control flow path and a lookahead control flow path instruction address that is an instruction address of a lookahead control flow path, the alternative control flow path including a control flow path that is not predicted to be followed by execution, and the lookahead control flow path including a control flow path that is further in the program control flow than the primary branch prediction path; requesting either the level 0 TLB or an alternate TLB level to cache address translations of either or both of the alternate control flow path instruction addresses and the lookahead control flow path instruction addresses; A method comprising:
2. the primary branch prediction path includes a control flow path that passes through a branch target that is predicted to be taken and that does not pass through a branch target that is predicted to be not taken; 10. The method of claim 1.
3. the alternative control flow path instruction addresses include instruction addresses of one or more alternative control flow paths defined by control flow passing through one or more branch targets that are predicted not executed; 10. The method of claim 1.
4. the lookahead control flow path instruction addresses include instruction addresses of control flow paths that pass through branch targets that are predicted to be taken, at least one of the instruction addresses being at a point in the program control flow that passes through the primary branch prediction path; 10. The method of claim 1.
5. requesting an instruction cache to store instructions corresponding to the alternative control flow path instruction addresses; requesting the instruction cache to store an instruction corresponding to the look-ahead control flow path instruction address; Further comprising one or more of:
10. The method of claim 1.
6. the alternative control flow path instruction addresses include one or more of a loop exit and a not-taken branch target of a branch where the taken target has a low confidence metric; 10. The method of claim 1.
7. and periodically including in the alternative control flow path instruction addresses non-taken branch targets of branches whose taken targets have a high confidence metric.
10. The method of claim 1.
8. the instruction addresses of the primary branch prediction path, the instruction addresses of the alternate control flow path, and the instruction addresses of the lookahead control flow path comprise page addresses; 10. The method of claim 1.
9. the alternative control flow path instruction addresses include non-taken addresses of indirect branches; 10. The method of claim 1.
10. 1. An instruction fetch system for performing an instruction fetch operation, comprising: a level 0 translation lookaside buffer (TLB); a branch predictor; The branch predictor determining an instruction address of a primary branch prediction path, the primary branch prediction path including a control flow path along which execution is predicted to flow; requesting the level 0 translation lookaside buffer (TLB) to cache the address translation of the primary branch predicted path; determining one or both of an alternative control flow path instruction address that is an instruction address of an alternative control flow path and a lookahead control flow path instruction address that is an instruction address of a lookahead control flow path, the alternative control flow path including a control flow path that is not predicted to be followed by execution, and the lookahead control flow path including a control flow path that is further in the program control flow than the primary branch prediction path; requesting either the level 0 TLB or an alternate TLB level to cache an address translation for the alternate control flow path instruction address; configured to: Instruction fetch system.
11. the primary branch prediction path includes a control flow path that passes through a branch target that is predicted to be taken and that does not pass through a branch target that is predicted to be not taken; 11. The instruction fetch system of claim 10.
12. the alternative control flow path instruction addresses include instruction addresses of one or more alternative control flow paths defined by control flow passing through one or more branch targets that are predicted not executed; 11. The instruction fetch system of claim 10.
13. the lookahead control flow path instruction addresses include instruction addresses of control flow paths that pass through branch targets that are predicted to be taken, at least one of the instruction addresses being at a point in the program control flow that passes through the primary branch prediction path; 11. The instruction fetch system of claim 10.
14. The branch predictor requesting an instruction cache to store instructions corresponding to the alternative control flow path instruction addresses; requesting the instruction cache to store an instruction corresponding to the look-ahead control flow path instruction address; and further configured to perform one or more of:
11. The instruction fetch system of claim 10.
15. the alternative control flow path instruction addresses include one or more of a loop exit and a not-taken branch target of a branch where the taken target has a low confidence metric; 11. The instruction fetch system of claim 10.
16. The branch predictor further configured to periodically include within the alternative control flow path instruction addresses non-taken branch targets of branches whose taken targets have a high confidence metric.
11. The instruction fetch system of claim 10.
17. the instruction addresses of the primary branch prediction path, the instruction addresses of the alternate control flow path, and the instruction addresses of the lookahead control flow path comprise page addresses; 11. The instruction fetch system of claim 10.
18. the alternative control flow path instruction addresses include non-taken addresses of indirect branches; 11. The instruction fetch system of claim 10.
19. 1. A system for performing an instruction fetch operation, comprising: The system comprises: an instruction execution pipeline; a memory for storing instructions to be executed by the instruction execution pipeline; The instruction execution pipeline includes: determining an instruction address of a primary branch prediction path, the primary branch prediction path including a control flow path along which execution is predicted to flow; requesting a level 0 translation lookaside buffer (TLB) to cache the address translation of the primary branch predicted path; determining one or both of an alternative control flow path instruction address that is an instruction address of an alternative control flow path and a lookahead control flow path instruction address that is an instruction address of a lookahead control flow path, the alternative control flow path including a control flow path that is not predicted to be followed by execution, and the lookahead control flow path including a control flow path that is further in the program control flow than the primary branch prediction path; requesting either the level 0 TLB or an alternate TLB level to cache address translations of either or both of the alternate control flow path instruction addresses and the lookahead control flow path instruction addresses; configured to: system.
20. the primary branch prediction path includes a control flow path that passes through a branch target that is predicted to be taken and that does not pass through a branch target that is predicted to be not taken; 20. The system of claim 19.
Citation Information
Patent Citations
Instruction fetching circuit
JP1994301537A
A store buffer that transfers data based on index and any format match
JP2003514299A
Method and apparatus for dynamically managing instruction buffer depth for non-predicted branch
JP2009054150A
Store buffer which forwards data based on index and optional way match
US6662280B1