RISC-V branch prediction method and device, electronic equipment and storage medium
A RISC-V and branch prediction technology, applied in machine execution devices, program control design, electrical digital data processing, etc., can solve problems such as waste of computing resources, reduction of processor instruction processing efficiency, and consumption of additional instruction cycles
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0047] See figure 1 , figure 1 A flow chart of a RISC-V branch prediction method provided in the embodiment of the present application, which includes the following steps:
[0048]S101: Obtain the remaining number of jumps of the target jump instruction;
[0049] This step aims to obtain the remaining number of jumps of the target jump instruction, that is, this step is based on the fact that a branch instruction has been confirmed as a jump instruction. As the name implies, the number of remaining jumps is a parameter used to indicate how many times the target jump instruction still needs to jump.
[0050] Wherein, the target jump instruction is provided by the RISC-V processor, specifically, provided by the PC register in the RISC-V processor; the remaining number of jumps can be recorded from certain bit fields of the target jump instruction There is a register address of the remaining number of jumps, and the remaining number of jumps is obtained from the register by ac...
Embodiment 2
[0064] See figure 2 , figure 2 It is a flowchart of a method for determining whether the next jump to be executed is the last jump in the RISC-V branch prediction method provided by the embodiment of the present application. For S103, this embodiment provides a The difference between the number of turns and the step length of a single jump is used to determine whether the jump to be performed by the target jump instruction is the last time the next jump needs to be performed, including the following steps:
[0065] S201: According to the remaining number of jumps respectively corresponding to two consecutive jumps of the target jump instruction, calculate and obtain a single jump step;
[0066] This step is the same as S102. For the corresponding description, please refer to S102, and the same parts will not be described again.
[0067] S202: Determine whether the difference between the remaining number of jumps and the step length of a single jump is 0, if it is 0, execut...
Embodiment 3
[0079] see below image 3 , image 3 A structural block diagram of a RISC-V branch prediction device provided in the embodiment of the present application, the device may include:
[0080] The remaining number of jumps acquisition unit 100 is used to acquire the remaining number of jumps of the target jump instruction;
[0081] The single jump step calculation unit 200 is used to calculate the single jump step according to the remaining number of jumps respectively corresponding to two consecutive jumps of the target jump instruction;
[0082] The last jump judging unit 300 is used to determine whether the jump to be performed by the target jump instruction is the last jump according to the single jump step size and the remaining number of jumps;
[0083] The last jump processing unit 400 is configured to perform the last jump on the target jump instruction when it is determined that the jump to be performed by the target jump instruction is the last jump;
[0084] The non-...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com