WO2021042705A1 - Pre-decoding system and method for instruction pipeline - Google Patents

Pre-decoding system and method for instruction pipeline Download PDF

Info

Publication number
WO2021042705A1
WO2021042705A1 PCT/CN2020/082067 CN2020082067W WO2021042705A1 WO 2021042705 A1 WO2021042705 A1 WO 2021042705A1 CN 2020082067 W CN2020082067 W CN 2020082067W WO 2021042705 A1 WO2021042705 A1 WO 2021042705A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
transfer
current
address
encoding information
Prior art date
Application number
PCT/CN2020/082067
Other languages
French (fr)
Chinese (zh)
Inventor
吴汉明
朱敏
Original Assignee
芯创智(北京)微电子有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 芯创智(北京)微电子有限公司 filed Critical 芯创智(北京)微电子有限公司
Publication of WO2021042705A1 publication Critical patent/WO2021042705A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3818Decoding for concurrent execution
    • G06F9/382Pipelined decoding, e.g. using predecoding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3005Arrangements for executing specific machine instructions to perform operations for flow control

Definitions

  • the present invention relates to the technical field of processors, in particular to a pre-decoding system and method of instruction pipeline.
  • the instruction pipeline obtains instructions from the first-level instruction buffer and submits them to the execution unit for execution.
  • the binary code of the instruction stored in the first-level instruction cache after the binary code of the instruction is read by the instruction pipeline, is converted into a control signal to instruct the operation of each component.
  • pre-decoding components and branch prediction components are set up in the instruction pipeline to detect branch instructions in the instruction flow, calculate their branch direction as soon as possible, and perform timely Information update and instruction flow direction adjustment.
  • the pre-decoding action (judging the type of branch instruction and calculating the branch direction of the program) will be performed multiple times. Since most of the branch instructions have the same pre-decoding result each time, it can be considered that the repeated pre-decoding actions are redundant. Therefore, the repetition of these pre-decoding actions causes a waste of dynamic power consumption when the processor is running. .
  • the purpose of the present invention is to provide an instruction pipeline pre-decoding system and method, which avoids repeated pre-decoding actions and can effectively reduce the dynamic power consumption in the front stage of the processor pipeline.
  • An instruction pipeline pre-decoding system comprising: an instruction pipeline, an instruction memory, a pre-decoding logic, and a next-level memory connected in sequence, the instruction memory being connected to the next-level memory;
  • the pre-decoding logic is used to obtain and output the second transfer instruction encoding information of the current instruction according to the address of the current instruction and the first transfer instruction encoding information when it is determined that the current instruction fetched from the next-level memory is a transfer instruction To the instruction memory;
  • the instruction pipeline is used to obtain the address of the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction obtained from the instruction memory and the address of the current instruction.
  • the first transfer instruction encoding information includes an instruction type and a transfer offset
  • the second transfer instruction encoding information includes a transfer instruction identifier and a simplified instruction type And transfer target information, where the simplified instruction type includes pre-decoded recognized information and transfer instruction subtypes
  • the transfer instruction identifier is used to identify whether the current instruction is a transfer instruction
  • the pre-decoded identification information is used to identify whether the transfer instruction has obtained the corresponding second transfer instruction encoding information through the pre-decode logic;
  • the transfer target information is used to record the address of the transfer target instruction of the transfer instruction
  • the transfer instruction subtype is used to identify the specific type of the transfer instruction.
  • the pre-decoding logic is used for:
  • the address of the transfer target instruction of the current instruction is calculated according to the transfer offset in the encoding information of the first transfer instruction of the current instruction and the address of the current instruction, and the transfer target instruction of the current instruction is calculated according to the calculation And the first transfer instruction encoding information of the current instruction to obtain the second transfer instruction encoding information of the current instruction.
  • the pre-decoding logic is used for:
  • the address of the branch target instruction of the current instruction is calculated according to the branch offset in the encoding information of the first branch instruction of the current instruction and the address of the current instruction, and the branch target instruction of the current instruction is calculated
  • the address of is divided into a high section and a low section, and the low section is used as the transfer target information in the second transfer instruction encoding information of the current instruction;
  • the pre-decoded identification information in the second transfer instruction encoding information of the current instruction is identified.
  • the pre-decoding logic is used for:
  • the pre-decode recognized information in the second branch instruction encoding information of the current instruction is identified as recognized.
  • the pre-decoding logic is used for:
  • an instruction pipeline pre-decoding system the instruction pipeline is used for:
  • an instruction pipeline pre-decoding system the instruction pipeline is used for:
  • the branch target information in the second branch instruction encoding information of the current instruction is combined with the current The high segment of the address of the instruction is spliced to get the address of the transfer target instruction of the current instruction.
  • a pre-decoding method for instruction pipeline includes:
  • the second transfer instruction encoding information of the current instruction is obtained according to the address of the current instruction and the first transfer instruction encoding information and output to the instruction memory ;
  • the first transfer instruction encoding information includes an instruction type and a transfer offset
  • the second transfer instruction encoding information includes a transfer instruction identifier and a simplified instruction type.
  • transfer target information where the simplified instruction type includes pre-decoded recognized information and transfer instruction subtypes;
  • the transfer instruction identifier is used to identify whether the current instruction is a transfer instruction
  • the pre-decoded identification information is used to identify whether the transfer instruction has obtained the corresponding second transfer instruction encoding information through the pre-decode logic;
  • the transfer target information is used to record the address of the transfer target instruction of the transfer instruction
  • the transfer instruction subtype is used to identify the specific type of the transfer instruction.
  • the beneficial effect of the present invention is that the system and method provided by the present invention analyze the transfer instructions in advance through the pre-decoding logic, and obtain the second transfer instruction encoding information and store it in the instruction memory.
  • the control logic of the pipeline is transferred from the instruction memory
  • the pre-decoding action can effectively reduce the dynamic power consumption at the front stage of the processor pipeline.
  • FIG. 1 is a schematic diagram of the relationship between the traditional pipeline and the pre-decoding logic provided in an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of an instruction pipeline pre-decoding system provided in an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of a transfer instruction encoding format stored in a next-level memory provided in an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a transfer instruction encoding format stored in an instruction memory provided in an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of the simplified instruction type in FIG. 4;
  • FIG. 6 is a schematic diagram of the working mechanism of the pre-decoding logic provided in Embodiment 1 of the present invention.
  • Figure 7 is a schematic flow diagram of a pre-decoding method for an instruction pipeline provided in an embodiment of the present invention.
  • the cache of the processor is generally organized into a multi-level structure.
  • the instruction pipeline obtains instructions from the first-level instruction cache, and the first-level instruction cache obtains instructions from the lower-level cache.
  • the pre-decoding unit which mainly includes the analysis of the instruction type and the calculation of the transfer type execution transfer direction. Since the instructions stored in the first-level instruction cache will be fetched multiple times and executed multiple times, for branch instructions, the pre-decoding action (judging the type of branch instruction and calculating the branch direction of the program) will be performed multiple times. Since most of the branch instructions have the same pre-decoding result each time, it can be considered that the repeated pre-decoding actions are redundant. Therefore, the repetition of these pre-decoding actions causes a waste of dynamic power consumption when the processor is running. .
  • the present invention proposes an instruction pipeline pre-decoding system and method.
  • the main structure includes three aspects: 1) Place the pre-decoding logic in the first-level instruction cache and the next-level cache Between; 2) The instruction storage structure design in the first-level instruction cache; 3) The transfer target address splicing in the instruction pipeline.
  • the design of the present invention advances the pre-decoding component to the write path of the first-level instruction cache, analyzes the transfer instructions in advance, calculates the transfer direction in advance, avoids repeated pre-decoding actions, and can effectively reduce the dynamic functions in the front stage of the processor pipeline. Consumption.
  • the present invention provides an instruction pipeline pre-decoding system.
  • the pre-decoding system includes: an instruction pipeline, an instruction memory, a pre-decoding logic, and a next-level memory that are connected in sequence, and the instruction memory and the next-level Memory connection
  • the pre-decoding logic is used to obtain the second transfer instruction encoding information of the current instruction according to the address of the current instruction and the first transfer instruction encoding information and output it to the instruction memory when it is determined that the current instruction fetched from the next-level memory is a transfer instruction;
  • the instruction pipeline is used to obtain the address of the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction obtained from the instruction memory and the address of the current instruction.
  • the first transfer instruction encoding information includes the instruction type and the transfer offset
  • the second transfer instruction encoding information includes the transfer instruction identifier, the simplified instruction type, and the transfer target information
  • the simplified instruction type includes the pre-decode identified information and the transfer instruction sub Types of
  • the transfer instruction identifier is used to identify whether the current instruction is a transfer instruction
  • the pre-decoded identification information is used to identify whether the transfer instruction has obtained the corresponding second transfer instruction encoding information through the pre-decode logic;
  • the transfer target information is used to record the address of the transfer target instruction of the transfer instruction
  • the branch instruction subtype is used to identify the specific type of the branch instruction.
  • the pre-decoding logic is used to:
  • the address of the transfer target instruction of the current instruction is calculated according to the transfer offset in the encoding information of the first transfer instruction of the current instruction and the address of the current instruction, and the transfer target instruction of the current instruction is calculated according to the calculation And the first transfer instruction encoding information of the current instruction to obtain the second transfer instruction encoding information of the current instruction.
  • the pre-decoding logic is used to:
  • the address of the branch target instruction of the current instruction is calculated according to the branch offset in the encoding information of the first branch instruction of the current instruction and the address of the current instruction, and the branch target instruction of the current instruction is calculated
  • the address of is divided into a high section and a low section, and the low section is used as the transfer target information in the second transfer instruction encoding information of the current instruction;
  • the pre-decoded identification information in the second transfer instruction encoding information of the current instruction is identified.
  • the pre-decoding logic is used to:
  • the pre-decode recognized information in the second branch instruction encoding information of the current instruction is identified as recognized.
  • the pre-decoding logic is used to:
  • the instruction pipeline is used to:
  • the instruction pipeline is used to:
  • the branch target information in the second branch instruction encoding information of the current instruction is combined with the current instruction The high segment of the address is spliced to obtain the address of the branch target instruction of the current instruction.
  • the present invention analyzes the first transfer instruction encoding information of the transfer instruction in advance through the pre-decoding logic, and obtains the second transfer instruction encoding information and stores it in the instruction memory.
  • the control logic of the pipeline fetches instructions from the instruction memory, it can directly By splicing the transfer target information in the second transfer instruction encoding information of the current instruction stored in the instruction store with the address high segment of the current instruction, the address of the transfer target instruction of the current instruction is obtained, avoiding repeated pre-decoding actions. Effectively reduce the dynamic power consumption in the front stage of the processor pipeline.
  • the pre-decoding logic is placed between the first-level instruction cache and the next-level cache. All instructions obtained from the next-level cache need to be analyzed by the pre-decoding logic, the transfer instruction is identified, and the transfer is calculated. direction. For most branch instructions, the calculation of the branch target is unchanged each time it is executed.
  • the calculation methods of the branch target of this type of instruction include:
  • Transfer target address of this instruction + some fields in the code of this instruction, formula one
  • the pre-decoding logic After the pre-decoding logic identifies the transfer type of the instruction and calculates the transfer direction, the information (including the transfer type and the transfer direction) is written into the first-level instruction cache.
  • the instruction encoding information written in the first level instruction cache (instruction memory in Figure 1) is exactly the same as the instruction encoding information in the next level cache (the next level memory in Figure 1).
  • the traditional The transfer instruction encoding information in the processor is shown in Figure 3.
  • a new instruction encoding information format is provided, mainly to distinguish transfer instructions and non-transfer instructions with minimal overhead, and at the same time record the transfer instruction information recognized by the pre-decoding logic in the instruction encoding .
  • the information passed to the pre-decoding logic by the next level of memory contains several instructions, and the information of each instruction is shown in Figure 3, that is, the first transfer instruction encoding information, and the pre-decoding logic transmits it to the instruction.
  • the information of the memory corresponds to the above-mentioned several instructions, and the information of each instruction is shown in Figure 4, that is, the second transfer instruction encoding information.
  • the transfer instruction encoding information of the present invention is shown in Fig. 4, and the main difference from the standard instruction encoding structure of Fig. 3 is:
  • the transfer target address the value of a certain register + the address of this instruction, where the value of a certain register needs to be obtained through a read register operation.
  • branch instructions There are many types of branch instructions that the processor needs to process.
  • One type is a). As shown in the case of a), the calculation of the branch target address needs to be dynamically changed each time it is executed (the root is that the target address calculation needs to obtain a dynamic The value of the register), so it cannot be calculated in advance.
  • the present invention is suitable for another type of transfer instruction, whose transfer target calculation only relies on static information, so it can be calculated in advance.
  • the "predecoding recognized” flag is set, indicating that when this instruction is output from the instruction memory shown in Figure 2, the second The "transfer target” field in the transfer instruction encoding information is directly spliced with the high segment of the "address of the current instruction” to obtain the transfer target address, and the pre-decoding logic is responsible for the judgment and setting.
  • the pre-decoding logic of the present invention will retain the "branch offset” field in the original transfer instruction encoding information of the instruction, and will not convert it into the "branch target” field.
  • the instruction is output from the instruction memory shown in Figure 2, it will re-use the above formula 1 to calculate the branch target address.
  • the pre-decoding logic fetches an instruction in the format of Figure 3 from the next level of memory, parses the instruction, recognizes that the instruction type of the instruction is a branch instruction, and based on the branch instruction address [50 :0] and transfer offset [20:0] to calculate the transfer target address [50:0] of the instruction, divide the transfer target address into high and low segments, of which the low segment [25:0] is stored in the instruction memory In the "transfer target" field in the format of Figure 4, the high segment [50:26] is used for subsequent judgment.
  • the pre-decoding logic sets the "pre-decoding recognized” flag.
  • the control logic directly obtains it from the "transfer target” field of the instruction storage location in the instruction memory For branch instructions that have set "pre-decoding recognized", you can directly use the "branch target” field as the lower segment of the branch target address.
  • the hardware logic of the pipeline itself concatenates the "branch target” field that the control logic fetched from the instruction memory with the high segment of the "current instruction address” stored by itself to obtain the branch target address of the current instruction, and then re-fetch the instruction from the branch target address , To avoid repeated pre-decoding actions at the front end of the pipeline.
  • the present invention analyzes transfer instructions in advance through the pre-decoding logic located between the instruction memory and the next-level memory, and calculates the transfer direction in advance.
  • the control logic of the pipeline fetches the instruction from the instruction memory, it can directly fetch the "transfer target" "Field, the transfer target address is obtained through hardware logic splicing, avoiding repeated pre-decoding actions, and effectively reducing the dynamic power consumption of the front stage of the processor pipeline.
  • a pre-decoding method of instruction pipeline includes:
  • S200 Obtain the address of the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction obtained from the instruction memory and the address of the current instruction.
  • the first transfer instruction encoding information includes the instruction type and the transfer offset
  • the second transfer instruction encoding information includes the transfer instruction identifier, the simplified instruction type, and the transfer target information
  • the simplified instruction type includes the pre-decode identified information and the transfer instruction sub Types of
  • the transfer instruction identifier is used to identify whether the current instruction is a transfer instruction
  • the pre-decoded identification information is used to identify whether the transfer instruction has obtained the corresponding second transfer instruction encoding information through the pre-decode logic;
  • the transfer target information is used to record the address of the transfer target instruction of the transfer instruction
  • the branch instruction subtype is used to identify the specific type of the branch instruction.
  • S100 includes:
  • the address of the transfer target instruction of the current instruction is calculated according to the transfer offset in the encoding information of the first transfer instruction of the current instruction and the address of the current instruction, and the transfer target instruction of the current instruction is calculated according to the calculation And the first transfer instruction encoding information of the current instruction to obtain the second transfer instruction encoding information of the current instruction.
  • S100 includes:
  • the address of the branch target instruction of the current instruction is calculated according to the branch offset in the encoding information of the first branch instruction of the current instruction and the address of the current instruction, and the branch target instruction of the current instruction is calculated
  • the address of is divided into a high section and a low section, and the low section is used as the transfer target information in the second transfer instruction encoding information of the current instruction;
  • the pre-decoded identification information in the second transfer instruction encoding information of the current instruction is identified.
  • S100 includes:
  • the pre-decode recognized information in the second branch instruction encoding information of the current instruction is identified as recognized.
  • S100 includes:
  • S200 includes:
  • S200 includes:
  • the branch target information in the second branch instruction encoding information of the current instruction is combined with the current instruction The high segment of the address is spliced to obtain the address of the branch target instruction of the current instruction.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Advance Control (AREA)

Abstract

Disclosed in the present invention are a pre-decoding system and method for an instruction pipeline. The pre-decoding system comprises an instruction pipeline, an instruction memory, pre-decoding logic, and a next-stage memory which are sequentially connected; the instruction memory is connected to the next-stage memory; the pre-decoding logic is used for obtaining, when determining that a current instruction taken out from the next-stage memory is a transfer instruction, second transfer instruction encoding information of the current instruction according to the address of the current instruction and first transfer instruction encoding information, and outputting the second transfer instruction encoding information to the instruction memory; the instruction pipeline is used for obtaining the address of a transfer target instruction of the current instruction according to the second transfer instruction encoding information of the current instruction obtained from the instruction memory and the address of the current instruction. The system and method provided by the present invention avoid repeated pre-decoding actions, and can effectively reduce dynamic power consumption of the front end of a processor pipeline.

Description

一种指令流水线的预译码系统及方法Pre-decoding system and method of instruction pipeline 技术领域Technical field
本发明涉及处理器技术领域,具体涉及一种指令流水线的预译码系统及方法。The present invention relates to the technical field of processors, in particular to a pre-decoding system and method of instruction pipeline.
背景技术Background technique
现代处理器设计中,指令流水线从一级指令缓冲中取得指令并提交执行部件执行。一级指令缓存中存放的指令二进制编码,指令流水线读取指令的二进制编码后,将其转换成控制信号,指示各部件的运行。In modern processor design, the instruction pipeline obtains instructions from the first-level instruction buffer and submits them to the execution unit for execution. The binary code of the instruction stored in the first-level instruction cache, after the binary code of the instruction is read by the instruction pipeline, is converted into a control signal to instruct the operation of each component.
为了维护正确的指令流,并且支持高效的指令执行,指令流水线中设置了预译码部件和转移预测部件,用于检测指令流中存在的转移类指令,尽早计算其转移方向,并进行适时的信息更新和指令流方向调整。In order to maintain the correct instruction flow and support efficient instruction execution, pre-decoding components and branch prediction components are set up in the instruction pipeline to detect branch instructions in the instruction flow, calculate their branch direction as soon as possible, and perform timely Information update and instruction flow direction adjustment.
由于一级指令缓存中存放的指令均会被多次取出并多次执行,因此对于转移类指令来说,其预译码动作(判断转移指令类型,计算程序的转移方向)会多次进行。由于大部分转移类指令每次预译码的结果均是相同的,可以认为重复的预译码动作是冗余的,因此这些预译码动作的重复造成了处理器运行时动态功耗的浪费。Since the instructions stored in the first-level instruction cache will be fetched multiple times and executed multiple times, for branch instructions, the pre-decoding action (judging the type of branch instruction and calculating the branch direction of the program) will be performed multiple times. Since most of the branch instructions have the same pre-decoding result each time, it can be considered that the repeated pre-decoding actions are redundant. Therefore, the repetition of these pre-decoding actions causes a waste of dynamic power consumption when the processor is running. .
发明内容Summary of the invention
针对现有技术中存在的缺陷,本发明的目的在于提供一种指令流水线的预译码系统及方法,避免了重复的预译码动作,可以有效减少处理器流水线前段的动态功耗。In view of the defects in the prior art, the purpose of the present invention is to provide an instruction pipeline pre-decoding system and method, which avoids repeated pre-decoding actions and can effectively reduce the dynamic power consumption in the front stage of the processor pipeline.
为实现上述目的,本发明采用的技术方案如下:In order to achieve the above objectives, the technical solutions adopted by the present invention are as follows:
一种指令流水线的预译码系统,所述预译码系统包括:依次连接的指令流水线、指令存储器、预译码逻辑和下一级存储器,所述指令存储器与所述下一级存储器连接;An instruction pipeline pre-decoding system, the pre-decoding system comprising: an instruction pipeline, an instruction memory, a pre-decoding logic, and a next-level memory connected in sequence, the instruction memory being connected to the next-level memory;
所述预译码逻辑用于当确定从所述下一级存储器中取出的当前指令为转移指令时根据当前指令的地址和第一转移指令编码信息得到当前指令的第二 转移指令编码信息并输出至所述指令存储器;The pre-decoding logic is used to obtain and output the second transfer instruction encoding information of the current instruction according to the address of the current instruction and the first transfer instruction encoding information when it is determined that the current instruction fetched from the next-level memory is a transfer instruction To the instruction memory;
所述指令流水线用于根据从所述指令存储器中取得的当前指令的第二转移指令编码信息和当前指令的地址得到当前指令的转移目标指令的地址。The instruction pipeline is used to obtain the address of the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction obtained from the instruction memory and the address of the current instruction.
进一步,如上所述的一种指令流水线的预译码系统,所述第一转移指令编码信息包括指令类型和转移偏移量,所述第二转移指令编码信息包括转移指令标识、简化后指令类型和转移目标信息,所述简化后指令类型包括预译码已识别信息和转移指令子类型;Further, in the pre-decoding system of an instruction pipeline as described above, the first transfer instruction encoding information includes an instruction type and a transfer offset, and the second transfer instruction encoding information includes a transfer instruction identifier and a simplified instruction type And transfer target information, where the simplified instruction type includes pre-decoded recognized information and transfer instruction subtypes;
所述转移指令标识用于标识当前指令是否为转移指令;The transfer instruction identifier is used to identify whether the current instruction is a transfer instruction;
所述预译码已识别信息用于标识该转移指令是否已经通过所述预译码逻辑获取对应的第二转移指令编码信息;The pre-decoded identification information is used to identify whether the transfer instruction has obtained the corresponding second transfer instruction encoding information through the pre-decode logic;
所述转移目标信息用于记录该转移指令的转移目标指令的地址;The transfer target information is used to record the address of the transfer target instruction of the transfer instruction;
所述转移指令子类型用于标识该转移指令的具体类型。The transfer instruction subtype is used to identify the specific type of the transfer instruction.
进一步,如上所述的一种指令流水线的预译码系统,所述预译码逻辑用于:Further, in an instruction pipeline pre-decoding system as described above, the pre-decoding logic is used for:
当确定当前指令为转移指令时根据当前指令的第一转移指令编码信息中的转移偏移量和当前指令的地址计算得到当前指令的转移目标指令的地址,根据计算得到的当前指令的转移目标指令的地址和当前指令的第一转移指令编码信息得到当前指令的第二转移指令编码信息。When it is determined that the current instruction is a branch instruction, the address of the transfer target instruction of the current instruction is calculated according to the transfer offset in the encoding information of the first transfer instruction of the current instruction and the address of the current instruction, and the transfer target instruction of the current instruction is calculated according to the calculation And the first transfer instruction encoding information of the current instruction to obtain the second transfer instruction encoding information of the current instruction.
进一步,如上所述的一种指令流水线的预译码系统,所述预译码逻辑用于:Further, in an instruction pipeline pre-decoding system as described above, the pre-decoding logic is used for:
当确定当前指令为转移指令时根据当前指令的第一转移指令编码信息中的转移偏移量和当前指令的地址计算得到当前指令的转移目标指令的地址,将计算得到的当前指令的转移目标指令的地址划分为高段和低段,将低段部分作为当前指令的第二转移指令编码信息中的转移目标信息;When it is determined that the current instruction is a branch instruction, the address of the branch target instruction of the current instruction is calculated according to the branch offset in the encoding information of the first branch instruction of the current instruction and the address of the current instruction, and the branch target instruction of the current instruction is calculated The address of is divided into a high section and a low section, and the low section is used as the transfer target information in the second transfer instruction encoding information of the current instruction;
根据高段部分的值与当前指令的地址高段的值,对当前指令的第二转移指令编码信息中的预译码已识别信息进行标识。According to the value of the high-segment part and the value of the high-segment address of the current instruction, the pre-decoded identification information in the second transfer instruction encoding information of the current instruction is identified.
进一步,如上所述的一种指令流水线的预译码系统,所述预译码逻辑用于:Further, in an instruction pipeline pre-decoding system as described above, the pre-decoding logic is used for:
当确定当前指令的转移目标指令的地址高段部分的值等于当前指令的地址高段的值时,将当前指令的第二转移指令编码信息中的预译码已识别信息标识为已识别。When it is determined that the value of the high section of the address of the branch target instruction of the current instruction is equal to the value of the high section of the address of the current instruction, the pre-decode recognized information in the second branch instruction encoding information of the current instruction is identified as recognized.
进一步,如上所述的一种指令流水线的预译码系统,所述预译码逻辑用于:Further, in an instruction pipeline pre-decoding system as described above, the pre-decoding logic is used for:
根据当前指令的第一转移指令编码信息中的指令类型判断当前指令是否为转移指令,并根据判断结果对当前指令的第二转移指令编码信息中的转移指令标识和转移指令子类型进行标识。Determine whether the current instruction is a transfer instruction according to the instruction type in the first transfer instruction encoding information of the current instruction, and identify the transfer instruction identifier and the transfer instruction subtype in the second transfer instruction encoding information of the current instruction according to the determination result.
进一步,如上所述的一种指令流水线的预译码系统,所述指令流水线用于:Further, as described above, an instruction pipeline pre-decoding system, the instruction pipeline is used for:
根据从所述指令存储器中取得的当前指令的第二转移指令编码信息中的预译码已识别信息确定是否根据当前指令的第二转移指令编码信息和当前指令的地址得到当前指令的转移目标指令的地址。Determine whether to obtain the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction and the address of the current instruction according to the pre-decoding identified information in the second branch instruction encoding information of the current instruction obtained from the instruction memory the address of.
进一步,如上所述的一种指令流水线的预译码系统,所述指令流水线用于:Further, as described above, an instruction pipeline pre-decoding system, the instruction pipeline is used for:
当确定从所述指令存储器中取得的当前指令的第二转移指令编码信息中的预译码已识别信息标识为已识别时,将当前指令的第二转移指令编码信息中的转移目标信息与当前指令的地址高段拼接得到当前指令的转移目标指令的地址。When it is determined that the pre-decoding identified information in the second branch instruction encoding information of the current instruction obtained from the instruction memory is identified as recognized, the branch target information in the second branch instruction encoding information of the current instruction is combined with the current The high segment of the address of the instruction is spliced to get the address of the transfer target instruction of the current instruction.
一种指令流水线的预译码方法,所述预译码方法包括:A pre-decoding method for instruction pipeline, the pre-decoding method includes:
(1)当确定从所述下一级存储器中取出的当前指令为转移指令时根据当前指令的地址和第一转移指令编码信息得到当前指令的第二转移指令编码信息并输出至所述指令存储器;(1) When it is determined that the current instruction fetched from the next-level memory is a transfer instruction, the second transfer instruction encoding information of the current instruction is obtained according to the address of the current instruction and the first transfer instruction encoding information and output to the instruction memory ;
(2)根据从所述指令存储器中取得的当前指令的第二转移指令编码信息 和当前指令的地址得到当前指令的转移目标指令的地址。(2) Obtain the address of the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction obtained from the instruction memory and the address of the current instruction.
进一步,如上所述的一种指令流水线的预译码方法,所述第一转移指令编码信息包括指令类型和转移偏移量,所述第二转移指令编码信息包括转移指令标识、简化后指令类型和转移目标信息,所述简化后指令类型包括预译码已识别信息和转移指令子类型;Further, in the pre-decoding method for an instruction pipeline as described above, the first transfer instruction encoding information includes an instruction type and a transfer offset, and the second transfer instruction encoding information includes a transfer instruction identifier and a simplified instruction type. And transfer target information, where the simplified instruction type includes pre-decoded recognized information and transfer instruction subtypes;
所述转移指令标识用于标识当前指令是否为转移指令;The transfer instruction identifier is used to identify whether the current instruction is a transfer instruction;
所述预译码已识别信息用于标识该转移指令是否已经通过所述预译码逻辑获取对应的第二转移指令编码信息;The pre-decoded identification information is used to identify whether the transfer instruction has obtained the corresponding second transfer instruction encoding information through the pre-decode logic;
所述转移目标信息用于记录该转移指令的转移目标指令的地址;The transfer target information is used to record the address of the transfer target instruction of the transfer instruction;
所述转移指令子类型用于标识该转移指令的具体类型。The transfer instruction subtype is used to identify the specific type of the transfer instruction.
本发明的有益效果在于:本发明所提供的系统及方法,通过预译码逻辑对转移类指令进行提前解析,得到第二转移指令编码信息存储在指令存储器中,当流水线的控制逻辑从指令存储器中取指时,可以直接通过将指令存储中存储的当前指令的第二转移指令编码信息中的转移目标信息与当前指令的地址高段拼接得到当前指令的转移目标指令的地址,避免了重复的预译码动作,可以有效减少处理器流水线前段的动态功耗。The beneficial effect of the present invention is that the system and method provided by the present invention analyze the transfer instructions in advance through the pre-decoding logic, and obtain the second transfer instruction encoding information and store it in the instruction memory. When the control logic of the pipeline is transferred from the instruction memory When fetching in the middle, you can directly obtain the address of the transfer target instruction of the current instruction by splicing the transfer target information in the second transfer instruction encoding information of the current instruction stored in the instruction store with the address of the current instruction, avoiding duplication The pre-decoding action can effectively reduce the dynamic power consumption at the front stage of the processor pipeline.
附图说明Description of the drawings
图1为本发明实施例中提供的传统流水线同预译码逻辑的关系示意图;FIG. 1 is a schematic diagram of the relationship between the traditional pipeline and the pre-decoding logic provided in an embodiment of the present invention;
图2为本发明实施例中提供的一种指令流水线的预译码系统的结构示意图;2 is a schematic structural diagram of an instruction pipeline pre-decoding system provided in an embodiment of the present invention;
图3为本发明实施例中提供的下一级存储器中存储的转移指令编码格式示意图;FIG. 3 is a schematic diagram of a transfer instruction encoding format stored in a next-level memory provided in an embodiment of the present invention;
图4为本发明实施例中提供的指令存储器中存储的转移指令编码格式示意图;4 is a schematic diagram of a transfer instruction encoding format stored in an instruction memory provided in an embodiment of the present invention;
图5为图4中的简化后指令类型的示意图;FIG. 5 is a schematic diagram of the simplified instruction type in FIG. 4;
图6为本发明实施例一中提供的预译码逻辑工作机制示意图;6 is a schematic diagram of the working mechanism of the pre-decoding logic provided in Embodiment 1 of the present invention;
图7为本发明实施例中提供的一种指令流水线的预译码方法的流程示意 图.Figure 7 is a schematic flow diagram of a pre-decoding method for an instruction pipeline provided in an embodiment of the present invention.
具体实施方式detailed description
下面结合说明书附图与具体实施方式对本发明做进一步的详细说明。The present invention will be further described in detail below in conjunction with the drawings and specific implementations of the specification.
传统流水线同预译码逻辑的关系如图1所示,处理器的缓存一般组织成多级结构,指令流水线从一级指令缓存中取得指令,一级指令缓存从更下级的缓存中取得指令。指令流水线取得指令之后,送入预译码部件,其中主要包含指令类型的解析和转移类执行转移方向的计算。由于一级指令缓存中存放的指令均会被多次取出并多次执行,因此对于转移类指令来说,其预译码动作(判断转移指令类型,计算程序的转移方向)会多次进行。由于大部分转移类指令每次预译码的结果均是相同的,可以认为重复的预译码动作是冗余的,因此这些预译码动作的重复造成了处理器运行时动态功耗的浪费。The relationship between the traditional pipeline and the pre-decoding logic is shown in Figure 1. The cache of the processor is generally organized into a multi-level structure. The instruction pipeline obtains instructions from the first-level instruction cache, and the first-level instruction cache obtains instructions from the lower-level cache. After the instruction pipeline obtains the instruction, it is sent to the pre-decoding unit, which mainly includes the analysis of the instruction type and the calculation of the transfer type execution transfer direction. Since the instructions stored in the first-level instruction cache will be fetched multiple times and executed multiple times, for branch instructions, the pre-decoding action (judging the type of branch instruction and calculating the branch direction of the program) will be performed multiple times. Since most of the branch instructions have the same pre-decoding result each time, it can be considered that the repeated pre-decoding actions are redundant. Therefore, the repetition of these pre-decoding actions causes a waste of dynamic power consumption when the processor is running. .
针对上述缺陷,本发明提出的一种指令流水线的预译码系统及方法,如图2所示,主要结构包括三方面:1)将预译码逻辑放置在一级指令缓存同下一级缓存之间;2)一级指令缓存中指令存储结构设计;3)指令流水线中转移目标地址拼接。本发明设计将预译码部件提前至一级指令缓存的写入通路,将转移类指令提前解析,并提前计算转移方向,避免重复的预译码动作,可以有效减少处理器流水线前段的动态功耗。In view of the above-mentioned defects, the present invention proposes an instruction pipeline pre-decoding system and method. As shown in Figure 2, the main structure includes three aspects: 1) Place the pre-decoding logic in the first-level instruction cache and the next-level cache Between; 2) The instruction storage structure design in the first-level instruction cache; 3) The transfer target address splicing in the instruction pipeline. The design of the present invention advances the pre-decoding component to the write path of the first-level instruction cache, analyzes the transfer instructions in advance, calculates the transfer direction in advance, avoids repeated pre-decoding actions, and can effectively reduce the dynamic functions in the front stage of the processor pipeline. Consumption.
如图2所示,本发明提供一种指令流水线的预译码系统,预译码系统包括:依次连接的指令流水线、指令存储器、预译码逻辑和下一级存储器,指令存储器与下一级存储器连接;As shown in Figure 2, the present invention provides an instruction pipeline pre-decoding system. The pre-decoding system includes: an instruction pipeline, an instruction memory, a pre-decoding logic, and a next-level memory that are connected in sequence, and the instruction memory and the next-level Memory connection
预译码逻辑用于当确定从下一级存储器中取出的当前指令为转移指令时根据当前指令的地址和第一转移指令编码信息得到当前指令的第二转移指令编码信息并输出至指令存储器;The pre-decoding logic is used to obtain the second transfer instruction encoding information of the current instruction according to the address of the current instruction and the first transfer instruction encoding information and output it to the instruction memory when it is determined that the current instruction fetched from the next-level memory is a transfer instruction;
指令流水线用于根据从指令存储器中取得的当前指令的第二转移指令编码信息和当前指令的地址得到当前指令的转移目标指令的地址。The instruction pipeline is used to obtain the address of the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction obtained from the instruction memory and the address of the current instruction.
第一转移指令编码信息包括指令类型和转移偏移量,第二转移指令编码信息包括转移指令标识、简化后指令类型和转移目标信息,简化后指令类型 包括预译码已识别信息和转移指令子类型;The first transfer instruction encoding information includes the instruction type and the transfer offset, the second transfer instruction encoding information includes the transfer instruction identifier, the simplified instruction type, and the transfer target information, and the simplified instruction type includes the pre-decode identified information and the transfer instruction sub Types of;
转移指令标识用于标识当前指令是否为转移指令;The transfer instruction identifier is used to identify whether the current instruction is a transfer instruction;
预译码已识别信息用于标识该转移指令是否已经通过预译码逻辑获取对应的第二转移指令编码信息;The pre-decoded identification information is used to identify whether the transfer instruction has obtained the corresponding second transfer instruction encoding information through the pre-decode logic;
转移目标信息用于记录该转移指令的转移目标指令的地址;The transfer target information is used to record the address of the transfer target instruction of the transfer instruction;
转移指令子类型用于标识该转移指令的具体类型。The branch instruction subtype is used to identify the specific type of the branch instruction.
预译码逻辑用于:The pre-decoding logic is used to:
当确定当前指令为转移指令时根据当前指令的第一转移指令编码信息中的转移偏移量和当前指令的地址计算得到当前指令的转移目标指令的地址,根据计算得到的当前指令的转移目标指令的地址和当前指令的第一转移指令编码信息得到当前指令的第二转移指令编码信息。When it is determined that the current instruction is a branch instruction, the address of the transfer target instruction of the current instruction is calculated according to the transfer offset in the encoding information of the first transfer instruction of the current instruction and the address of the current instruction, and the transfer target instruction of the current instruction is calculated according to the calculation And the first transfer instruction encoding information of the current instruction to obtain the second transfer instruction encoding information of the current instruction.
预译码逻辑用于:The pre-decoding logic is used to:
当确定当前指令为转移指令时根据当前指令的第一转移指令编码信息中的转移偏移量和当前指令的地址计算得到当前指令的转移目标指令的地址,将计算得到的当前指令的转移目标指令的地址划分为高段和低段,将低段部分作为当前指令的第二转移指令编码信息中的转移目标信息;When it is determined that the current instruction is a branch instruction, the address of the branch target instruction of the current instruction is calculated according to the branch offset in the encoding information of the first branch instruction of the current instruction and the address of the current instruction, and the branch target instruction of the current instruction is calculated The address of is divided into a high section and a low section, and the low section is used as the transfer target information in the second transfer instruction encoding information of the current instruction;
根据高段部分的值与当前指令的地址高段的值,对当前指令的第二转移指令编码信息中的预译码已识别信息进行标识。According to the value of the high-segment part and the value of the high-segment address of the current instruction, the pre-decoded identification information in the second transfer instruction encoding information of the current instruction is identified.
预译码逻辑用于:The pre-decoding logic is used to:
当确定当前指令的转移目标指令的地址高段部分的值等于当前指令的地址高段的值时,将当前指令的第二转移指令编码信息中的预译码已识别信息标识为已识别。When it is determined that the value of the high section of the address of the branch target instruction of the current instruction is equal to the value of the high section of the address of the current instruction, the pre-decode recognized information in the second branch instruction encoding information of the current instruction is identified as recognized.
预译码逻辑用于:The pre-decoding logic is used to:
根据当前指令的第一转移指令编码信息中的指令类型判断当前指令是否为转移指令,并根据判断结果对当前指令的第二转移指令编码信息中的转移指令标识和转移指令子类型进行标识。Determine whether the current instruction is a transfer instruction according to the instruction type in the first transfer instruction encoding information of the current instruction, and identify the transfer instruction identifier and the transfer instruction subtype in the second transfer instruction encoding information of the current instruction according to the determination result.
指令流水线用于:The instruction pipeline is used to:
根据从指令存储器中取得的当前指令的第二转移指令编码信息中的预译码已识别信息确定是否根据当前指令的第二转移指令编码信息和当前指令的地址得到当前指令的转移目标指令的地址。Determine whether to obtain the address of the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction and the address of the current instruction according to the pre-decoding recognized information in the second branch instruction encoding information of the current instruction obtained from the instruction memory .
指令流水线用于:The instruction pipeline is used to:
当确定从指令存储器中取得的当前指令的第二转移指令编码信息中的预译码已识别信息标识为已识别时,将当前指令的第二转移指令编码信息中的转移目标信息与当前指令的地址高段拼接得到当前指令的转移目标指令的地址。When it is determined that the pre-decoding identified information in the second branch instruction encoding information of the current instruction obtained from the instruction memory is identified as recognized, the branch target information in the second branch instruction encoding information of the current instruction is combined with the current instruction The high segment of the address is spliced to obtain the address of the branch target instruction of the current instruction.
本发明通过预译码逻辑对转移类指令的第一转移指令编码信息进行提前解析,得到第二转移指令编码信息存储在指令存储器中,当流水线的控制逻辑从指令存储器中取指时,可以直接通过将指令存储中存储的当前指令的第二转移指令编码信息中的转移目标信息与当前指令的地址高段进行拼接,得到当前指令的转移目标指令的地址,避免重复的预译码动作,可以有效减少处理器流水线前段的动态功耗。The present invention analyzes the first transfer instruction encoding information of the transfer instruction in advance through the pre-decoding logic, and obtains the second transfer instruction encoding information and stores it in the instruction memory. When the control logic of the pipeline fetches instructions from the instruction memory, it can directly By splicing the transfer target information in the second transfer instruction encoding information of the current instruction stored in the instruction store with the address high segment of the current instruction, the address of the transfer target instruction of the current instruction is obtained, avoiding repeated pre-decoding actions. Effectively reduce the dynamic power consumption in the front stage of the processor pipeline.
工作原理:working principle:
本发明通过将预译码逻辑放置在一级指令缓存与下一级缓存之间,所有从下一级缓存取得的指令均需要经过预译码逻辑的解析,识别出转移指令,并且计算出转移方向。对于大部分转移类指令,其转移目标的计算在每次执行时是不变的,这类指令的转移目标计算方法包括:In the present invention, the pre-decoding logic is placed between the first-level instruction cache and the next-level cache. All instructions obtained from the next-level cache need to be analyzed by the pre-decoding logic, the transfer instruction is identified, and the transfer is calculated. direction. For most branch instructions, the calculation of the branch target is unchanged each time it is executed. The calculation methods of the branch target of this type of instruction include:
转移目标=本指令地址+本指令编码中部分字段式一Transfer target = address of this instruction + some fields in the code of this instruction, formula one
预译码逻辑识别出指令的转移类型并计算出转移方向后,将该信息(包括转移类型和转移方向)写入一级指令缓存。在传统处理器设计中,一级指令缓存(图1中的指令存储器)中写入的指令编码信息同下一级缓存(图1中的下一级存储器)中指令的编码信息完全一致,传统处理器中的转移指令编码信息如图3所示。在本发明中,给出了一种新的指令编码信息格式,主要为了以最小开销区别出转移类指令和非转移类指令,同时在该指令编码中记录预译码逻辑识别出的转移指令信息。After the pre-decoding logic identifies the transfer type of the instruction and calculates the transfer direction, the information (including the transfer type and the transfer direction) is written into the first-level instruction cache. In traditional processor design, the instruction encoding information written in the first level instruction cache (instruction memory in Figure 1) is exactly the same as the instruction encoding information in the next level cache (the next level memory in Figure 1). The traditional The transfer instruction encoding information in the processor is shown in Figure 3. In the present invention, a new instruction encoding information format is provided, mainly to distinguish transfer instructions and non-transfer instructions with minimal overhead, and at the same time record the transfer instruction information recognized by the pre-decoding logic in the instruction encoding .
如图2所示,下一级存储器传递给预译码逻辑的信息包含若干条指令,每条指令的信息均如图3所示,即第一转移指令编码信息,预译码逻辑传递给指令存储器的信息对应上述若干条指令,每条指令的信息如图4所示,即第二转移指令编码信息。As shown in Figure 2, the information passed to the pre-decoding logic by the next level of memory contains several instructions, and the information of each instruction is shown in Figure 3, that is, the first transfer instruction encoding information, and the pre-decoding logic transmits it to the instruction. The information of the memory corresponds to the above-mentioned several instructions, and the information of each instruction is shown in Figure 4, that is, the second transfer instruction encoding information.
本发明的转移指令编码信息如图4所示,与图3的标准指令编码结构的 主要区别在于:The transfer instruction encoding information of the present invention is shown in Fig. 4, and the main difference from the standard instruction encoding structure of Fig. 3 is:
(1)在图3的指令编码宽度上增加1比特,用以标识当前指令是否为转移类指令,即图4中的C位。(1) One bit is added to the instruction encoding width in Figure 3 to identify whether the current instruction is a transfer instruction, that is, the C bit in Figure 4.
(2)缩短图3中的“指令类型”字段,图3中的“指令类型”字段需要编码处理器能够识别的所有指令类型,图4中“简化后指令类型”仅需要区分出不同的转移指令即可,即图5中的“转移指令子类型”,具有针对性,其中“预译码已识别”标记为1位,标记该转移指令的编码是否已经经过预译码逻辑完全转换。不能被预译码逻辑完全转换的指令包括两类:(2) Shorten the "instruction type" field in Figure 3, the "instruction type" field in Figure 3 needs to encode all instruction types that the processor can recognize, and the "simplified instruction type" in Figure 4 only needs to distinguish different transfers The instruction is sufficient, that is, the "branch instruction subtype" in Figure 5, which is pertinent, in which the "pre-decoding recognized" is marked with 1 bit to mark whether the encoding of the branch instruction has been completely converted by the pre-decoding logic. There are two types of instructions that cannot be fully converted by the pre-decoding logic:
a)转移目标计算方法不属于上文中列举的转移目标计算方法;a) The transfer target calculation method does not belong to the transfer target calculation methods listed above;
例如:转移目标地址=某寄存器的值+本指令地址,其中,某寄存器的值需要经过一次读寄存器操作获取。For example: the transfer target address = the value of a certain register + the address of this instruction, where the value of a certain register needs to be obtained through a read register operation.
处理器需要处理的转移指令有许多类型,其中一种类型为a)类情况所示,其转移目标地址的计算需要在每次执行时是动态改变的(根源在于其目标地址计算需要获取一个动态的寄存器的值),因此无法提前计算。本发明适用于另一类转移指令,其转移目标计算仅依赖于静态信息,因此可以实现提前计算。There are many types of branch instructions that the processor needs to process. One type is a). As shown in the case of a), the calculation of the branch target address needs to be dynamically changed each time it is executed (the root is that the target address calculation needs to obtain a dynamic The value of the register), so it cannot be calculated in advance. The present invention is suitable for another type of transfer instruction, whose transfer target calculation only relies on static information, so it can be calculated in advance.
b)预译码逻辑计算出的转移目标无法在图4中的“转移目标”字段中有效存储的转移指令。发生a)、b)两种情况时,本发明的预译码逻辑将保留指令原转移指令编码信息中的“转移偏移量”字段,不会将其转换为下文描述的“转移目标”字段。b) The branch target calculated by the pre-decoding logic cannot be effectively stored in the "branch target" field in Figure 4 for branch instructions. When two situations a) and b) occur, the pre-decoding logic of the present invention will retain the "branch offset" field in the original branch instruction encoding information of the instruction, and will not convert it to the "branch target" field described below .
(3)将图3中的“转移偏移量”字段转换为图4中的“转移目标”字段,用于记录该转移指令的转移目标指令的地址。由于处理器的指令地址宽度通常超过指令编码宽度,因此,图4中的“转移目标”字段无法完全储存完整的转移目标地址。本发明中,将预译码逻辑计算得到当前指令的转移目标指令的地址(转移目标地址)划分为高低两段,其中低段存储在图4所示的“转移目标”字段中,流水线执行转移指令时,存在两个地址:转移指令本身的地址和转移目标指令的地址。流水线自身会有专门的结构存储并维护转移指令本身的地址,本发明中,转移目标指令的地址的高段直接使用转移指令本身的地址的高段。(3) Convert the "branch offset" field in Figure 3 to the "branch target" field in Figure 4, which is used to record the address of the branch target instruction of the branch instruction. Since the instruction address width of the processor usually exceeds the instruction encoding width, the "branch target" field in Figure 4 cannot completely store the complete branch target address. In the present invention, the address of the branch target instruction (branch target address) of the current instruction calculated by the pre-decoding logic is divided into two sections, the lower section is stored in the "branch target" field shown in Figure 4, and the pipeline executes the branch. When instructing, there are two addresses: the address of the branch instruction itself and the address of the branch target instruction. The pipeline itself has a special structure to store and maintain the address of the transfer instruction itself. In the present invention, the high-segment of the address of the transfer target instruction directly uses the high-segment of the address of the transfer instruction itself.
若“当前指令地址”高段的值等于“转移目标地址”高段,则置位“预 译码已识别”标记,表示这条指令从图2所示的指令存储器输出时,可以利用第二转移指令编码信息中的“转移目标”字段与“当前指令的地址”高段直接拼接得到转移目标地址,判断和置位均由预译码逻辑负责。If the value of the high segment of the "current instruction address" is equal to the high segment of the "branch target address", the "predecoding recognized" flag is set, indicating that when this instruction is output from the instruction memory shown in Figure 2, the second The "transfer target" field in the transfer instruction encoding information is directly spliced with the high segment of the "address of the current instruction" to obtain the transfer target address, and the pre-decoding logic is responsible for the judgment and setting.
若“当前指令地址”高段的值不等于“转移目标地址”高段,则对应于上文b)类情形,预译码逻辑计算出的转移目标无法在图4中的“转移目标”字段中有效存储,本发明的预译码逻辑将保留指令原转移指令编码信息中的“转移偏移量”字段,不会将其转换为“转移目标”字段。该指令从图2所示的指令存储器输出时,将重新利用上文式一计算得到转移目标地址。If the value of the high section of the "current instruction address" is not equal to the high section of the "branch target address", it corresponds to the case of type b) above. The branch target calculated by the pre-decoding logic cannot be in the "branch target" field in Figure 4 In the effective storage, the pre-decoding logic of the present invention will retain the "branch offset" field in the original transfer instruction encoding information of the instruction, and will not convert it into the "branch target" field. When the instruction is output from the instruction memory shown in Figure 2, it will re-use the above formula 1 to calculate the branch target address.
实施例一Example one
如图6所示,预译码逻辑从下一级存储器中取出一条图3格式的指令,并对该指令进行解析,识别出该指令的指令类型为转移指令,并根据该转移指令地址[50:0]和转移偏移量[20:0]计算出该指令的转移目标地址[50:0],将转移目标地址划分为高低两段,其中低段部分[25:0]存储在指令存储器内的图4格式的“转移目标”字段中,高段部分[50:26]用于后续判断。As shown in Figure 6, the pre-decoding logic fetches an instruction in the format of Figure 3 from the next level of memory, parses the instruction, recognizes that the instruction type of the instruction is a branch instruction, and based on the branch instruction address [50 :0] and transfer offset [20:0] to calculate the transfer target address [50:0] of the instruction, divide the transfer target address into high and low segments, of which the low segment [25:0] is stored in the instruction memory In the "transfer target" field in the format of Figure 4, the high segment [50:26] is used for subsequent judgment.
从图中可知,“当前指令地址”高段的值[50:26]等于计算出的“转移目标地址”高段[50:26],则表明当前指令的编码已经被预译码逻辑完全转化,此时,预译码逻辑置位“预译码已识别”标记,当这条指令“指令存储器”输出时,控制逻辑直接从指令存储器中的该条指令存储位置的“转移目标”字段得到,对于已经置位了“预译码已识别”的转移类指令来说,可以直接将“转移目标”字段作为转移目标地址的低段。It can be seen from the figure that the value [50:26] of the high section of the "current instruction address" is equal to the calculated high section of the "branch target address" [50:26], which indicates that the encoding of the current instruction has been completely converted by the pre-decoding logic At this time, the pre-decoding logic sets the "pre-decoding recognized" flag. When the instruction "instruction memory" is output, the control logic directly obtains it from the "transfer target" field of the instruction storage location in the instruction memory For branch instructions that have set "pre-decoding recognized", you can directly use the "branch target" field as the lower segment of the branch target address.
流水线自身的硬件逻辑将控制逻辑从指令存储器中取出的“转移目标”字段,与自身存储的“当前指令地址”高段进行拼接,得到当前指令的转移目标地址,进而从转移目标地址重新取指,避免在流水线前端重复执行预译码动作。The hardware logic of the pipeline itself concatenates the "branch target" field that the control logic fetched from the instruction memory with the high segment of the "current instruction address" stored by itself to obtain the branch target address of the current instruction, and then re-fetch the instruction from the branch target address , To avoid repeated pre-decoding actions at the front end of the pipeline.
本发明通过位于指令存储器和下一级存储器之间的预译码逻辑对转移类指令提前解析,并提前计算转移方向,当流水线的控制逻辑从指令存储器中取指时,可以直接取出“转移目标”字段,通过硬件逻辑进行拼接得到转移目标地址,避免重复的预译码动作,可以有效减少处理器流水线前段的动态功耗。The present invention analyzes transfer instructions in advance through the pre-decoding logic located between the instruction memory and the next-level memory, and calculates the transfer direction in advance. When the control logic of the pipeline fetches the instruction from the instruction memory, it can directly fetch the "transfer target" "Field, the transfer target address is obtained through hardware logic splicing, avoiding repeated pre-decoding actions, and effectively reducing the dynamic power consumption of the front stage of the processor pipeline.
如图7所示,一种指令流水线的预译码方法,预译码方法包括:As shown in Fig. 7, a pre-decoding method of instruction pipeline, the pre-decoding method includes:
S100、当确定从下一级存储器中取出的当前指令为转移指令时根据当前指令的地址和第一转移指令编码信息得到当前指令的第二转移指令编码信息并输出至指令存储器;S100. When it is determined that the current instruction fetched from the next-level memory is a transfer instruction, obtain the second transfer instruction encoding information of the current instruction according to the address of the current instruction and the first transfer instruction encoding information and output it to the instruction memory;
S200、根据从指令存储器中取得的当前指令的第二转移指令编码信息和当前指令的地址得到当前指令的转移目标指令的地址。S200: Obtain the address of the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction obtained from the instruction memory and the address of the current instruction.
第一转移指令编码信息包括指令类型和转移偏移量,第二转移指令编码信息包括转移指令标识、简化后指令类型和转移目标信息,简化后指令类型包括预译码已识别信息和转移指令子类型;The first transfer instruction encoding information includes the instruction type and the transfer offset, the second transfer instruction encoding information includes the transfer instruction identifier, the simplified instruction type, and the transfer target information, and the simplified instruction type includes the pre-decode identified information and the transfer instruction sub Types of;
转移指令标识用于标识当前指令是否为转移指令;The transfer instruction identifier is used to identify whether the current instruction is a transfer instruction;
预译码已识别信息用于标识该转移指令是否已经通过预译码逻辑获取对应的第二转移指令编码信息;The pre-decoded identification information is used to identify whether the transfer instruction has obtained the corresponding second transfer instruction encoding information through the pre-decode logic;
转移目标信息用于记录该转移指令的转移目标指令的地址;The transfer target information is used to record the address of the transfer target instruction of the transfer instruction;
转移指令子类型用于标识该转移指令的具体类型。The branch instruction subtype is used to identify the specific type of the branch instruction.
S100包括:S100 includes:
当确定当前指令为转移指令时根据当前指令的第一转移指令编码信息中的转移偏移量和当前指令的地址计算得到当前指令的转移目标指令的地址,根据计算得到的当前指令的转移目标指令的地址和当前指令的第一转移指令编码信息得到当前指令的第二转移指令编码信息。When it is determined that the current instruction is a branch instruction, the address of the transfer target instruction of the current instruction is calculated according to the transfer offset in the encoding information of the first transfer instruction of the current instruction and the address of the current instruction, and the transfer target instruction of the current instruction is calculated according to the calculation And the first transfer instruction encoding information of the current instruction to obtain the second transfer instruction encoding information of the current instruction.
S100包括:S100 includes:
当确定当前指令为转移指令时根据当前指令的第一转移指令编码信息中的转移偏移量和当前指令的地址计算得到当前指令的转移目标指令的地址,将计算得到的当前指令的转移目标指令的地址划分为高段和低段,将低段部分作为当前指令的第二转移指令编码信息中的转移目标信息;When it is determined that the current instruction is a branch instruction, the address of the branch target instruction of the current instruction is calculated according to the branch offset in the encoding information of the first branch instruction of the current instruction and the address of the current instruction, and the branch target instruction of the current instruction is calculated The address of is divided into a high section and a low section, and the low section is used as the transfer target information in the second transfer instruction encoding information of the current instruction;
根据高段部分的值与当前指令的地址高段的值,对当前指令的第二转移指令编码信息中的预译码已识别信息进行标识。According to the value of the high-segment part and the value of the high-segment address of the current instruction, the pre-decoded identification information in the second transfer instruction encoding information of the current instruction is identified.
S100包括:S100 includes:
当确定当前指令的转移目标指令的地址高段部分的值等于当前指令的地址高段的值时,将当前指令的第二转移指令编码信息中的预译码已识别信息标识为已识别。When it is determined that the value of the high section of the address of the branch target instruction of the current instruction is equal to the value of the high section of the address of the current instruction, the pre-decode recognized information in the second branch instruction encoding information of the current instruction is identified as recognized.
S100包括:S100 includes:
根据当前指令的第一转移指令编码信息中的指令类型判断当前指令是否为转移指令,并根据判断结果对当前指令的第二转移指令编码信息中的转移指令标识和转移指令子类型进行标识。Determine whether the current instruction is a transfer instruction according to the instruction type in the first transfer instruction encoding information of the current instruction, and identify the transfer instruction identifier and the transfer instruction subtype in the second transfer instruction encoding information of the current instruction according to the determination result.
S200包括:S200 includes:
根据从指令存储器中取得的当前指令的第二转移指令编码信息中的预译码已识别信息确定是否根据当前指令的第二转移指令编码信息和当前指令的地址得到当前指令的转移目标指令的地址。Determine whether to obtain the address of the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction and the address of the current instruction according to the pre-decoding recognized information in the second branch instruction encoding information of the current instruction obtained from the instruction memory .
S200包括:S200 includes:
当确定从指令存储器中取得的当前指令的第二转移指令编码信息中的预译码已识别信息标识为已识别时,将当前指令的第二转移指令编码信息中的转移目标信息与当前指令的地址高段拼接得到当前指令的转移目标指令的地址。When it is determined that the pre-decoding identified information in the second branch instruction encoding information of the current instruction obtained from the instruction memory is identified as recognized, the branch target information in the second branch instruction encoding information of the current instruction is combined with the current instruction The high segment of the address is spliced to obtain the address of the branch target instruction of the current instruction.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其同等技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. In this way, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.

Claims (10)

  1. 一种指令流水线的预译码系统,其特征在于,所述预译码系统包括:依次连接的指令流水线、指令存储器、预译码逻辑和下一级存储器,所述指令存储器与所述下一级存储器连接;An instruction pipeline pre-decoding system, characterized in that the pre-decoding system includes: an instruction pipeline, an instruction memory, a pre-decoding logic, and a next-level memory connected in sequence, the instruction memory and the next Level memory connection;
    所述预译码逻辑用于当确定从所述下一级存储器中取出的当前指令为转移指令时根据当前指令的地址和第一转移指令编码信息得到当前指令的第二转移指令编码信息并输出至所述指令存储器;The pre-decoding logic is used to obtain and output the second transfer instruction encoding information of the current instruction according to the address of the current instruction and the first transfer instruction encoding information when it is determined that the current instruction fetched from the next-level memory is a transfer instruction To the instruction memory;
    所述指令流水线用于根据从所述指令存储器中取得的当前指令的第二转移指令编码信息和当前指令的地址得到当前指令的转移目标指令的地址。The instruction pipeline is used to obtain the address of the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction obtained from the instruction memory and the address of the current instruction.
  2. 根据权利要求1所述的一种指令流水线的预译码系统,其特征在于,所述第一转移指令编码信息包括指令类型和转移偏移量,所述第二转移指令编码信息包括转移指令标识、简化后指令类型和转移目标信息,所述简化后指令类型包括预译码已识别信息和转移指令子类型;The pre-decoding system of an instruction pipeline according to claim 1, wherein the first transfer instruction encoding information includes an instruction type and a transfer offset, and the second transfer instruction encoding information includes a transfer instruction identifier 1. Simplified instruction type and transfer target information, where the simplified instruction type includes pre-decoded recognized information and transfer instruction subtypes;
    所述转移指令标识用于标识当前指令是否为转移指令;The transfer instruction identifier is used to identify whether the current instruction is a transfer instruction;
    所述预译码已识别信息用于标识该转移指令是否已经通过所述预译码逻辑获取对应的第二转移指令编码信息;The pre-decoded identification information is used to identify whether the transfer instruction has obtained the corresponding second transfer instruction encoding information through the pre-decode logic;
    所述转移目标信息用于记录该转移指令的转移目标指令的地址;The transfer target information is used to record the address of the transfer target instruction of the transfer instruction;
    所述转移指令子类型用于标识该转移指令的具体类型。The transfer instruction subtype is used to identify the specific type of the transfer instruction.
  3. 根据权利要求2所述的一种指令流水线的预译码系统,其特征在于,所述预译码逻辑用于:An instruction pipeline pre-decoding system according to claim 2, wherein the pre-decoding logic is used for:
    当确定当前指令为转移指令时根据当前指令的第一转移指令编码信息中的转移偏移量和当前指令的地址计算得到当前指令的转移目标指令的地址,根据计算得到的当前指令的转移目标指令的地址和当前指令的第一转移指令编码信息得到当前指令的第二转移指令编码信息。When it is determined that the current instruction is a branch instruction, the address of the transfer target instruction of the current instruction is calculated according to the transfer offset in the encoding information of the first transfer instruction of the current instruction and the address of the current instruction, and the transfer target instruction of the current instruction is calculated according to the calculation And the first transfer instruction encoding information of the current instruction to obtain the second transfer instruction encoding information of the current instruction.
  4. 根据权利要求3所述的一种指令流水线的预译码系统,其特征在于,所述预译码逻辑用于:An instruction pipeline pre-decoding system according to claim 3, wherein the pre-decoding logic is used for:
    当确定当前指令为转移指令时根据当前指令的第一转移指令编码信息中的转移偏移量和当前指令的地址计算得到当前指令的转移目标指令的地址,将计算得到的当前指令的转移目标指令的地址划分为高段和低段,将低段部分作为当前指令的第二转移指令编码信息中的转移目标信息;When it is determined that the current instruction is a branch instruction, the address of the branch target instruction of the current instruction is calculated according to the branch offset in the encoding information of the first branch instruction of the current instruction and the address of the current instruction, and the branch target instruction of the current instruction is calculated The address of is divided into a high section and a low section, and the low section is used as the transfer target information in the second transfer instruction encoding information of the current instruction;
    根据高段部分的值与当前指令的地址高段的值,对当前指令的第二转移指令编码信息中的预译码已识别信息进行标识。According to the value of the high-segment part and the value of the high-segment address of the current instruction, the pre-decoded identification information in the second transfer instruction encoding information of the current instruction is identified.
  5. 根据权利要求4所述的一种指令流水线的预译码系统,其特征在于,所述预译码逻辑用于:An instruction pipeline pre-decoding system according to claim 4, wherein the pre-decoding logic is used for:
    当确定当前指令的转移目标指令的地址高段部分的值等于当前指令的地址高段的值时,将当前指令的第二转移指令编码信息中的预译码已识别信息标识为已识别。When it is determined that the value of the high section of the address of the branch target instruction of the current instruction is equal to the value of the high section of the address of the current instruction, the pre-decode recognized information in the second branch instruction encoding information of the current instruction is identified as recognized.
  6. 根据权利要求2所述的一种指令流水线的预译码系统,其特征在于,所述预译码逻辑用于:An instruction pipeline pre-decoding system according to claim 2, wherein the pre-decoding logic is used for:
    根据当前指令的第一转移指令编码信息中的指令类型判断当前指令是否为转移指令,并根据判断结果对当前指令的第二转移指令编码信息中的转移指令标识和转移指令子类型进行标识。Determine whether the current instruction is a transfer instruction according to the instruction type in the first transfer instruction encoding information of the current instruction, and identify the transfer instruction identifier and the transfer instruction subtype in the second transfer instruction encoding information of the current instruction according to the determination result.
  7. 根据权利要求5所述的一种指令流水线的预译码系统,其特征在于,所述指令流水线用于:An instruction pipeline pre-decoding system according to claim 5, wherein the instruction pipeline is used for:
    根据从所述指令存储器中取得的当前指令的第二转移指令编码信息中的预译码已识别信息确定是否根据当前指令的第二转移指令编码信息和当前指令的地址得到当前指令的转移目标指令的地址。Determine whether to obtain the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction and the address of the current instruction according to the pre-decoding identified information in the second branch instruction encoding information of the current instruction obtained from the instruction memory the address of.
  8. 根据权利要求7所述的一种指令流水线的预译码系统,其特征在于,所述指令流水线用于:An instruction pipeline pre-decoding system according to claim 7, wherein the instruction pipeline is used for:
    当确定从所述指令存储器中取得的当前指令的第二转移指令编码信息中的预译码已识别信息标识为已识别时,将当前指令的第二转移指令编码信息中的转移目标信息与当前指令的地址高段拼接得到当前指令的转移目标指令 的地址。When it is determined that the pre-decoding identified information in the second branch instruction encoding information of the current instruction obtained from the instruction memory is identified as recognized, the branch target information in the second branch instruction encoding information of the current instruction is combined with the current The high segment of the address of the instruction is spliced to get the address of the transfer target instruction of the current instruction.
  9. 一种指令流水线的预译码方法,应用于权利要求1-8任一项所述的一种指令流水线的预译码系统,其特征在于,所述预译码方法包括:An instruction pipeline pre-decoding method, applied to an instruction pipeline pre-decoding system according to any one of claims 1-8, characterized in that the pre-decoding method comprises:
    (1)当确定从所述下一级存储器中取出的当前指令为转移指令时根据当前指令的地址和第一转移指令编码信息得到当前指令的第二转移指令编码信息并输出至所述指令存储器;(1) When it is determined that the current instruction fetched from the next-level memory is a transfer instruction, the second transfer instruction encoding information of the current instruction is obtained according to the address of the current instruction and the first transfer instruction encoding information and output to the instruction memory ;
    (2)根据从所述指令存储器中取得的当前指令的第二转移指令编码信息和当前指令的地址得到当前指令的转移目标指令的地址。(2) Obtain the address of the branch target instruction of the current instruction according to the second branch instruction encoding information of the current instruction obtained from the instruction memory and the address of the current instruction.
  10. 根据权利要求9所述的一种指令流水线的预译码方法,其特征在于,所述第一转移指令编码信息包括指令类型和转移偏移量,所述第二转移指令编码信息包括转移指令标识、简化后指令类型和转移目标信息,所述简化后指令类型包括预译码已识别信息和转移指令子类型;An instruction pipeline pre-decoding method according to claim 9, wherein the first transfer instruction encoding information includes an instruction type and a transfer offset, and the second transfer instruction encoding information includes a transfer instruction identifier 1. Simplified instruction type and transfer target information, where the simplified instruction type includes pre-decoded recognized information and transfer instruction subtypes;
    所述转移指令标识用于标识当前指令是否为转移指令;The transfer instruction identifier is used to identify whether the current instruction is a transfer instruction;
    所述预译码已识别信息用于标识该转移指令是否已经通过所述预译码逻辑获取对应的第二转移指令编码信息;The pre-decoded identification information is used to identify whether the transfer instruction has obtained the corresponding second transfer instruction encoding information through the pre-decode logic;
    所述转移目标信息用于记录该转移指令的转移目标指令的地址;The transfer target information is used to record the address of the transfer target instruction of the transfer instruction;
    所述转移指令子类型用于标识该转移指令的具体类型。The transfer instruction subtype is used to identify the specific type of the transfer instruction.
PCT/CN2020/082067 2019-09-02 2020-03-30 Pre-decoding system and method for instruction pipeline WO2021042705A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910821767.3 2019-09-02
CN201910821767.3A CN110780925B (en) 2019-09-02 2019-09-02 Pre-decoding system and method of instruction pipeline

Publications (1)

Publication Number Publication Date
WO2021042705A1 true WO2021042705A1 (en) 2021-03-11

Family

ID=69383341

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/082067 WO2021042705A1 (en) 2019-09-02 2020-03-30 Pre-decoding system and method for instruction pipeline

Country Status (2)

Country Link
CN (1) CN110780925B (en)
WO (1) WO2021042705A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114116016A (en) * 2022-01-27 2022-03-01 广东省新一代通信与网络创新研究院 Instruction prefetching method and device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110780925B (en) * 2019-09-02 2021-11-16 芯创智(北京)微电子有限公司 Pre-decoding system and method of instruction pipeline
CN115878187B (en) * 2023-01-16 2023-05-02 北京微核芯科技有限公司 Processor instruction processing apparatus and method supporting compressed instructions

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1349160A (en) * 2001-11-28 2002-05-15 中国人民解放军国防科学技术大学 Correlation delay eliminating method for streamline control
CN1731346A (en) * 2005-08-15 2006-02-08 中国航天时代电子公司第七七一研究所 Method for implementing five-level tolerant flowing structure in integer unit of microprocessor
CN105975252A (en) * 2016-04-29 2016-09-28 龙芯中科技术有限公司 Method and device for realizing flow line of processing instructions and processor
CN110780925A (en) * 2019-09-02 2020-02-11 芯创智(北京)微电子有限公司 Pre-decoding system and method of instruction pipeline

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3698123B2 (en) * 2002-06-25 2005-09-21 セイコーエプソン株式会社 Information processing apparatus and electronic apparatus
US20080034132A1 (en) * 2006-08-01 2008-02-07 Nec Electronics Corporation Memory interface for controlling burst memory access, and method for controlling the same
JP5012084B2 (en) * 2007-02-22 2012-08-29 富士通セミコンダクター株式会社 Information processing device
CN101042641B (en) * 2007-04-24 2010-05-19 上海华龙信息技术开发中心 Digital signal processor with dynamic submitting pipeline function
CN100555225C (en) * 2008-03-17 2009-10-28 中国科学院计算技术研究所 A kind of risc processor device and method of supporting the X86 virtual machine
US8886920B2 (en) * 2011-05-13 2014-11-11 Oracle International Corporation Associating tag to branch instruction to access array storing predicted target addresses for page crossing targets for comparison with resolved address at execution stage
CN104504329A (en) * 2014-12-30 2015-04-08 中国人民解放军装备学院 Method for checking instruction of processor during program execution
US10203959B1 (en) * 2016-01-12 2019-02-12 Apple Inc. Subroutine power optimiztion
CN105824603B (en) * 2016-03-14 2018-07-31 西南交通大学 A kind of assembly line fetching and interpretation method based on cisc instruction set
CN106873944A (en) * 2016-12-23 2017-06-20 北京北大众志微系统科技有限责任公司 The method and apparatus that indirectly transferring instruction is processed in dynamic binary translation system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1349160A (en) * 2001-11-28 2002-05-15 中国人民解放军国防科学技术大学 Correlation delay eliminating method for streamline control
CN1731346A (en) * 2005-08-15 2006-02-08 中国航天时代电子公司第七七一研究所 Method for implementing five-level tolerant flowing structure in integer unit of microprocessor
CN105975252A (en) * 2016-04-29 2016-09-28 龙芯中科技术有限公司 Method and device for realizing flow line of processing instructions and processor
CN110780925A (en) * 2019-09-02 2020-02-11 芯创智(北京)微电子有限公司 Pre-decoding system and method of instruction pipeline

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114116016A (en) * 2022-01-27 2022-03-01 广东省新一代通信与网络创新研究院 Instruction prefetching method and device

Also Published As

Publication number Publication date
CN110780925A (en) 2020-02-11
CN110780925B (en) 2021-11-16

Similar Documents

Publication Publication Date Title
WO2021042705A1 (en) Pre-decoding system and method for instruction pipeline
US7609582B2 (en) Branch target buffer and method of use
JP5425627B2 (en) Method and apparatus for emulating branch prediction behavior of explicit subroutine calls
US9552207B2 (en) Method and apparatus for performance efficient ISA virtualization using dynamic partial binary translation
US7210024B2 (en) Conditional instruction execution via emissary instruction for condition evaluation
KR100974769B1 (en) Method and apparatus for managing instruction flushing in a microprocessor's instruction pipeline
JP2008521141A (en) Predecode error handling with branch correction
US6760835B1 (en) Instruction branch mispredict streaming
JP2009536770A (en) Branch address cache based on block
US7017030B2 (en) Prediction of instructions in a data processing apparatus
US20140281387A1 (en) Converting conditional short forward branches to computationally equivalent predicated instructions
KR20070116058A (en) Power saving methods and apparatus for variable length instructions
US20200310811A1 (en) Apparatus and method for making predictions for instruction flow changing instructions
US7346737B2 (en) Cache system having branch target address cache
US10635465B2 (en) Apparatuses and methods to prevent execution of a modified instruction
JPH0248732A (en) Micro processor for instruction pipe line system
JP2008533569A (en) Power saving method and apparatus for selectively enabling a comparator in a CAM renaming register file based on known processor states
JPH09330221A (en) System and method for tracking early exception of microprocessor
US8484007B2 (en) Method and apparatus of handling instruction rejects, partial rejects, stalls and branch wrong in a simulation model
GB2416412A (en) Branch target buffer memory array with an associated word line and gating circuit, the circuit storing a word line gating value
CN105786758A (en) Processor device with data caching function and data read-write method of processor device
CN113703842B (en) Value prediction method, device and medium based on branch prediction
US20020108022A1 (en) System and method for allowing back to back write operations in a processing system utilizing a single port cache
JPH01296342A (en) Data processor
KR20080000944A (en) Processor with pipelined architecture and control method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20861821

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20861821

Country of ref document: EP

Kind code of ref document: A1