Pipeline risc processing unit with improved efficiency when handling data dependency
First Claim
1. A pipeline processing apparatus including a plurality of registers and a data memory, comprising:
- memory access means for accessing the data memory to read data therefrom in response to a load instruction;
register access means responsive to an operation instruction for reading out data to be processed from said plurality of registers;
first operation means for performing an operation on data received from said register access means;
determination means for determining whether said operation instruction has a data dependency on said load instruction;
first selection means responsive to a result of determination by said determination means for selecting data necessary for an operation according to said operation instruction among the data from said register access means and the data loaded by said memory access means;
second operation means for performing the operation on data selected by said first selection means;
second selection means responsive to the result of determination by said determination means for selecting either of an output of said first operation means and an output of said second operation means, thus selected output being written back into a register in said plurality of registers.
1 Assignment
0 Petitions
Accused Products
Abstract
Source operand data supplied from a register file are held in registers. The data of the registers and load data from a data memory are bypassed and supplied to a selection circuit. An execution stage includes an arithmetic and logic unit for performing an operation on the source operand data and a memory access stage includes an arithmetic and logic unit for performing an operation on data selected by the selection circuit. Selection of the selection circuit is controlled by data dependency between a load instruction and an operation instruction following the same. The output of the arithmetic and logic unit in the execution stage and the output of the arithmetic and logic unit in the memory access stage are selected in a selector according to a presence/absence of data dependency. Load data from the data memory is also supplied to the selector. If an operation instruction supplied following a load instruction uses load data, execution of this operation instruction in the memory access stage eliminates a pipeline stall and the need for inserting a "NOP" instruction for pipeline stall prevention, making it possible for an operational processing unit to operate at a high speed without causing a slot in the pipeline.
-
Citations
10 Claims
-
1. A pipeline processing apparatus including a plurality of registers and a data memory, comprising:
-
memory access means for accessing the data memory to read data therefrom in response to a load instruction; register access means responsive to an operation instruction for reading out data to be processed from said plurality of registers; first operation means for performing an operation on data received from said register access means; determination means for determining whether said operation instruction has a data dependency on said load instruction; first selection means responsive to a result of determination by said determination means for selecting data necessary for an operation according to said operation instruction among the data from said register access means and the data loaded by said memory access means; second operation means for performing the operation on data selected by said first selection means; second selection means responsive to the result of determination by said determination means for selecting either of an output of said first operation means and an output of said second operation means, thus selected output being written back into a register in said plurality of registers. - View Dependent Claims (2, 3)
-
-
4. A pipeline processor including a register file with a plurality of registers, comprising:
-
an instruction decode stage for decoding an instruction fetched from an instruction memory, said decode stage including register access means for reading data of a register in the register file corresponding to a fetched and decoded instruction, and detection means for detecting an operation instruction to be executed following a load instruction; an instruction execution stage for performing a predetermined operation on data received from said register access means, and including bypassing means for bypassing the data from said register access means without any arithmetic or logical operation thereon; determination means responsive to said detection means for determining whether there exists data dependency between said operation instruction and said load instruction; a memory access stage for accessing a data memory when a load instruction is supplied from said instruction stage, said memory access stage including selection means responsive to said determination means for selectively passing one of the data from said bypassing means and data loaded from said data memory, and another operation means for performing the predetermined operation on data received from said selection means; and a write back stage for writing data into a register in the register file, said write back stage including another selection means responsive to said determination means for selectively passing one of the outputs of the operation means and the another operation means, for the writing back into a register of the register file. - View Dependent Claims (5, 6, 7)
-
-
8. A method of executing an instruction comprising the steps of:
-
decoding an instruction fetched from an instruction memory, and reading data of a corresponding register of a register file; performing an operation on data read out from the corresponding register; bypassing the data read out from the corresponding register; detecting that a currently executed instruction is an operation instruction immediately following a load instruction and having data dependency thereon; accessing a data memory in response to the load instruction for reading out data designated by the load instruction therefrom; bypassing data read out and loaded from the data memory; selectively passing the data read out from the corresponding register and the data read out and loaded from the data memory to provide data necessary for execution of said operation in response to the result of the detection in said step of detecting; performing said operation on the data thus selectively passed; and further selectively passing the result of operation on the data from the corresponding register and the result of operation on the data thus selectively passed in response to the result of the detection in said step of detecting. - View Dependent Claims (9, 10)
-
Specification