US5237664A - Pipeline circuit - Google Patents

Pipeline circuit Download PDF

Info

Publication number
US5237664A
US5237664A US07/272,948 US27294888A US5237664A US 5237664 A US5237664 A US 5237664A US 27294888 A US27294888 A US 27294888A US 5237664 A US5237664 A US 5237664A
Authority
US
United States
Prior art keywords
instruction
branch
address
unit
branch destination
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
US07/272,948
Inventor
Kimiyoshi Usami
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Assigned to KABUSHIKI KAISHA TOSHIBA reassignment KABUSHIKI KAISHA TOSHIBA ASSIGNMENT OF ASSIGNORS INTEREST. Assignors: USAMI, KIMIYOSHI
Application granted granted Critical
Publication of US5237664A publication Critical patent/US5237664A/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

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/22Microcontrol or microprogram arrangements
    • G06F9/28Enhancement of operational speed, e.g. by using several microcontrol devices operating in parallel
    • 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/3802Instruction prefetching
    • G06F9/3804Instruction prefetching for branches, e.g. hedging, branch folding

Definitions

  • the present invention relates to a pipeline circuit adopted for a CPU or a microprocessor in a computer system.
  • the present invention relates to a pipeline circuit which computes the effective branch destination address of a conditional branch instruction before or in parallel with the execution of the conditional branch instruction, judges according to a result of the execution of an instruction just before the conditional branch instruction whether or not a branch condition of the conditional branch instruction is met, and, if the branch condition is met, executes the conditional branch instruction while prefetching and decoding an instruction located at the branch destination address.
  • the pipeline circuit decomposes a series of processes starting from an instruction fetching operation to an instruction executing operation into a plurality of steps, and processes the steps in separate circuit stages where the instruction is transferred from the first stage toward the last stage while being processed.
  • instructions are not processed one by one but processed in parallel with each other in the respective circuit stages.
  • FIG. 1 is a view showing an example of a pipeline circuit adopted for a CPU according to a prior art.
  • a pipeline circuit 1 comprises an instruction fetching unit (IFU) 2, an instruction decoding unit (IDU) 3 and an instruction executing unit (EXU) 4.
  • IFU instruction fetching unit
  • IDU instruction decoding unit
  • EXU instruction executing unit
  • the IFU 2 fetches an instruction from a memory 5, stores the same in an instruction buffer (not shown), and reads out an instruction stored in the instruction buffer to send the same to the IDU 3.
  • the IDU 3 decodes the instruction supplied from the IFU 2 and sends a decoded instruction to the EXU 4.
  • the EXU 4 executes the decoded instruction sent from the IDU 3.
  • FIG. 2 shows the processes carried out in the pipeline circuit 1 in handling an instruction A1 which is not a conditional branch instruction and a conditional branch instruction Bcc following the instruction A1.
  • an instruction fetching operation in the IFU 2 and a decoding operation in the IDU 3 are supposed to be carried out each within one clock cycle, and an effective destination address of the conditional branch instruction Bcc is supposed to be computed in the EXU 4.
  • the instruction A1 is fetched in a clock cycle T1, decoded in a clock cycle T2 and executed in clock cycles T3 to T5.
  • the next conditional branch instruction Bcc is supplied to the IDU 3 in the clock cycle T2, decoded in the clock cycle T3 and executed in clock cycles T6 and T7.
  • the execution of the instruction Bcc includes judging (checking a flag) whether or not a branch condition of the instruction Bcc is met, computing a branch destination address of the instruction Bcc if the branch condition is met, etc.
  • an instruction C1 located at the branch destination address is fetched in a clock cycle T8 and decoded and executed in clock cycles starting from T9.
  • An object of the present invention is to provide a pipeline circuit which can improve the performance of a CPU without drastically increasing an amount of hardware and without complicating the controls.
  • the present invention provides a pipeline circuit comprising:
  • an instruction fetching unit for fetching an instruction code from a memory at an address specified by a program counter and storing the instruction code in an instruction buffer
  • an instruction decoding unit for decoding an instruction code supplied from the instruction fetching unit, sending an effective address generating request and information related to an addressing mode to an effective address generating unit, detecting, if the decoded instruction is a conditional branch instruction, the value of a status flag fixed by the execution of a previous instruction, and, if a branch condition of the conditional branch instruction is met, notifying the effective address generating unit of the fact that the branch condition has been met;
  • the effective address generating unit for receiving the effective address generating request and the information of addressing mode from the instruction decoding unit, reading a displacement out of the instruction buffer according to a request from the instruction decoding unit or from the effective address generating unit, computing an effective address according to the displacement, and setting the effective address in the program counter if a signal from the instruction decoding unit indicates that the branch condition has been met.
  • the pipeline circuit computes the effective branch destination address of a conditional branch instruction before or in parallel with the execution of the conditional branch instruction, judges according to a result of the execution of an instruction just before the conditional branch instruction whether or not a branch condition of the conditional branch instruction is met, and, if the branch condition is met, prefetches and decodes an instruction located a the branch destination address in parallel with the execution of the conditional branch instruction.
  • the pipeline circuit of the present invention can improve the performance of a CPU or a microprocessor in a computer system without drastically increasing the amount of hardware and without complicating its controls.
  • FIG. 1 is a block diagram showing a pipeline circuit according to a prior art
  • FIG. 2 is a timing chart showing processes carried out in the pipeline circuit of FIG. 1 in handling an instruction A1 which is not a conditional branch instruction and a conditional branch instruction Bcc following the instruction A1;
  • FIG. 3 is a block diagram showing a pipeline circuit according to an embodiment of the present invention.
  • FIG. 4 is a view showing formats of instructions processed in the pipeline circuit of FIG. 3;
  • FIG. 5 is a timing chart showing processes carried out in the pipeline circuit of FIG. 3 in handling an instruction A1 which is not a conditional branch instruction and a conditional branch instruction Bcc following the instruction A1;
  • FIGS. 6(A), 6(B) and 6(C) are views showing the relation between a conditional branch instruction to be read out of an instruction buffer of the embodiment of FIG. 3 and a pointer;
  • FIG. 7 is a block diagram showing a pipeline circuit modified from the pipeline circuit shown in FIG. 3.
  • FIG. 3 is a view showing a pipeline circuit according to an embodiment of the present invention.
  • a pipeline circuit 6 comprises an instruction fetching unit (IFU) 7, an instruction decoding unit (IDU) 8, an effective address generating unit (AGU) 9 and an executing unit (EXU) 10.
  • IFU instruction fetching unit
  • IDU instruction decoding unit
  • AGU effective address generating unit
  • EXU executing unit
  • the IFU 7 fetches an instruction from a memory 3 according to an address set in a program counter PCI 12 and stores the instruction in an instruction buffer 11.
  • the address in the PCI 12 is incremented for every instruction fetching operation. As will be described later in detail, a branch destination address is set in the PCI 12 to branch the execution of a program.
  • an instruction code of this embodiment comprises an operation code of 16 bits including information related to an addressing mode, and a displacement of 16 or 32 bits.
  • the instruction buffer 11 has a capacity of "16 bits ⁇ N words," and is read by word by word.
  • the instruction buffer 11 has a pointer indicating the address of a word to be read next. The value of the pointer is incremented whenever the contents of the instruction buffer 11 are read out.
  • the IDU 8 decodes an instruction code supplied from the IFU 7. By decoding an operation code of the instruction, an addressing mode thereof is identified so that the IDU 8 may send an effective address generating request for an operand and information related to an addressing mode to the AGU 9.
  • the IDU 8 sends, similar to the cases of other instructions, a request for generating an effective branch destination address and information related to an addressing mode to the AGU 9.
  • the IDU 8 detects the value of the status flag to judge whether or not a branch condition of the conditional branch instruction is met. If the branch condition is met, the IDU 8 notifies the AGU 9 of the fact that the branch condition has been met.
  • the AGU 9 determines an addressing mode based on the information of addressing mode supplied from the IDU 8. If there is a displacement, the AGU 9 sends a displacement sending request to the IFU 7, which then directly sends the displacement to the AGU 9.
  • the AGU 9 When receiving the displacement from the IFU 7, the AGU 9 computes an effective address according to the addressing mode.
  • the AGU 9 After computing the effective address, if a signal from the IDU 8 indicates that the branch condition has been met, the AGU 9 sets the effective address in the program counter (PCI) 12 of the IFU 7. Accordingly, the next instruction is prefetched from the branch destination address.
  • PCI program counter
  • the EXU 10 fetches an operand from an effective address generated by the AGU 9 or writes an operand into the effective address in executing an instruction decoded by the IDU 8.
  • FIG. 5 shows the operation of the pipeline circuit 6.
  • the pipeline circuit 6 receives an instruction A1 which is not a conditional branch instruction and a conditional branch instruction Bcc following the instruction A1.
  • the instruction A1 is fetched by the IFU 7 and stored in the instruction buffer 11 in a clock cycle T1, supplied to and decoded by the IDU 8 in a clock cycle T2, and computed for its effective address by the AGU 9 in a clock cycle T3.
  • the execution of the instruction A1 is started by the EXU 10 and completed in a clock cycle T5.
  • conditional branch instruction Bcc is prefetched in the clock cycle T2, decoded in the clock cycle T3, and computed for its branch destination address in the clock cycle T4. Even if the computation of the branch destination address is completed in the clock cycle T4, the execution of the instruction A1 will continue up to the clock cycle T5 so that a branch condition of the conditional branch instruction Bcc is not judged in the clock cycle T4. Therefore, in the clock cycle T5, the AGU 9 is in a waiting state and holds the branch destination address. In the clock cycle T5, the execution of the instruction A1 completes to fix a status flag. Then, the IDU 8 judges according to the status flag whether or not the branch condition of the conditional branch instruction Bcc is met.
  • the branch destination address from the AGU 9 is set in the PCI 12. Therefore, in the next clock cycle T6, the execution of the instruction Bcc starts, while an instruction C1 located at the branch destination address is prefetched and stored in the instruction buffer 11. When the instruction C1 is fetched, a pointer of the instruction buffer 11 changes to indicate the fetched instruction C1. Therefore, in the next clock cycle T7, the instruction C1 is supplied to and decoded by the IDU 8. When the execution of the instruction Bcc is completed in the clock cycle T7, the instruction C1 starts to be executed and computed for its effective address in a clock cycle T8.
  • the branch destination address held in the AGU 9 is not set in the PCI 12. Therefore, in the clock cycle T6, the instruction C1 located at the branch destination address is not fetched, but the next instruction is fetched from a current address in the PCI 12 (in FIG. 5, an address next to an address from which an instruction A5 has been fetched) and stored in the instruction buffer 11. Further, in the clock cycle T6, an instruction A3 next to the instruction Bcc is supplied from the instruction buffer 11 to the IDU 8 in which the instruction A3 is decoded.
  • a pointer of the instruction buffer 11 will indicate a displacement of the instruction Bcc as shown in FIG. 6(B). Therefore, the displacement of the instruction Bcc may be sent as the next instruction to the IDU 8 to cause an erroneous operation. To cope with this problem, the displacement of the instruction Bcc is read out of the instruction buffer 11 such that the pointer of the instruction buffer 11 will indicate an instruction next to the instruction Bcc as shown in FIG. 6(C).
  • the present invention can improve the performance of a CPU without drastically increasing an amount of hardware and without complicating controls.

Abstract

A pipeline circuit adopted for a CPU or a microprocessor in a computer system, computes the effective branch destination address of a conditional branch instruction before or in parallel with the execution of the conditional branch instruction, judges according to a result of the execution of an instruction just before the conditional branch instruction whether or not a branch condition of the conditional branch instruction is met, and, if the branch condition is met, executes the conditional branch instruction while prefetching and decoding an instruction located at the branch destination address.

Description

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to a pipeline circuit adopted for a CPU or a microprocessor in a computer system. Particularly, the present invention relates to a pipeline circuit which computes the effective branch destination address of a conditional branch instruction before or in parallel with the execution of the conditional branch instruction, judges according to a result of the execution of an instruction just before the conditional branch instruction whether or not a branch condition of the conditional branch instruction is met, and, if the branch condition is met, executes the conditional branch instruction while prefetching and decoding an instruction located at the branch destination address.
2. Description of the Prior Art
To improve the processing speed of a microprocessor or a CPU in a computer system, various pipeline circuits have been developed.
Generally, the pipeline circuit decomposes a series of processes starting from an instruction fetching operation to an instruction executing operation into a plurality of steps, and processes the steps in separate circuit stages where the instruction is transferred from the first stage toward the last stage while being processed. According to the pipeline circuit, instructions are not processed one by one but processed in parallel with each other in the respective circuit stages.
FIG. 1 is a view showing an example of a pipeline circuit adopted for a CPU according to a prior art.
In the figure, a pipeline circuit 1 comprises an instruction fetching unit (IFU) 2, an instruction decoding unit (IDU) 3 and an instruction executing unit (EXU) 4.
The IFU 2 fetches an instruction from a memory 5, stores the same in an instruction buffer (not shown), and reads out an instruction stored in the instruction buffer to send the same to the IDU 3. The IDU 3 decodes the instruction supplied from the IFU 2 and sends a decoded instruction to the EXU 4. The EXU 4 executes the decoded instruction sent from the IDU 3.
FIG. 2 shows the processes carried out in the pipeline circuit 1 in handling an instruction A1 which is not a conditional branch instruction and a conditional branch instruction Bcc following the instruction A1.
For the sake of explanation,, an instruction fetching operation in the IFU 2 and a decoding operation in the IDU 3 are supposed to be carried out each within one clock cycle, and an effective destination address of the conditional branch instruction Bcc is supposed to be computed in the EXU 4.
The instruction A1 is fetched in a clock cycle T1, decoded in a clock cycle T2 and executed in clock cycles T3 to T5. In parallel with the execution of the instruction A1, the next conditional branch instruction Bcc is supplied to the IDU 3 in the clock cycle T2, decoded in the clock cycle T3 and executed in clock cycles T6 and T7.
The execution of the instruction Bcc includes judging (checking a flag) whether or not a branch condition of the instruction Bcc is met, computing a branch destination address of the instruction Bcc if the branch condition is met, etc.
If the branch condition is met, an instruction C1 located at the branch destination address is fetched in a clock cycle T8 and decoded and executed in clock cycles starting from T9.
As described in the above, when a conditional branch instruction is supplied to the pipeline circuit and if a branch condition of the branch instruction is met, prefetched instructions are abandoned, and an instruction located at a branch destination address starts to be fetched. Therefore, execution stage of the pipeline circuit waits for the completion of fetching and decoding the instruction located at the branch destination address so that the processing speed of a CPU including the pipeline circuit may be slowed.
To solve the problem of branch in the pipeline circuit, various pipeline circuits have been developed. However, they encountered other problems, in improving the processing time of conditional branching operation, e.g., increased amounts of hardware and complicated controls.
SUMMARY OF THE INVENTION
An object of the present invention is to provide a pipeline circuit which can improve the performance of a CPU without drastically increasing an amount of hardware and without complicating the controls.
In order to accomplish the object, the present invention provides a pipeline circuit comprising:
an instruction fetching unit for fetching an instruction code from a memory at an address specified by a program counter and storing the instruction code in an instruction buffer;
an instruction decoding unit for decoding an instruction code supplied from the instruction fetching unit, sending an effective address generating request and information related to an addressing mode to an effective address generating unit, detecting, if the decoded instruction is a conditional branch instruction, the value of a status flag fixed by the execution of a previous instruction, and, if a branch condition of the conditional branch instruction is met, notifying the effective address generating unit of the fact that the branch condition has been met;
an instruction executing unit for executing a decoded instruction supplied from the instruction decoding unit; and
the effective address generating unit for receiving the effective address generating request and the information of addressing mode from the instruction decoding unit, reading a displacement out of the instruction buffer according to a request from the instruction decoding unit or from the effective address generating unit, computing an effective address according to the displacement, and setting the effective address in the program counter if a signal from the instruction decoding unit indicates that the branch condition has been met.
If the branch condition of the conditional branch instruction is met and after an instruction located at the branch destination address is prefetched, the instruction at the branch destination address and instruction following it are successively supplied to the decoding unit after the conditional branch instruction.
The pipeline circuit according to the present invention computes the effective branch destination address of a conditional branch instruction before or in parallel with the execution of the conditional branch instruction, judges according to a result of the execution of an instruction just before the conditional branch instruction whether or not a branch condition of the conditional branch instruction is met, and, if the branch condition is met, prefetches and decodes an instruction located a the branch destination address in parallel with the execution of the conditional branch instruction.
Therefore, the pipeline circuit of the present invention can improve the performance of a CPU or a microprocessor in a computer system without drastically increasing the amount of hardware and without complicating its controls.
These and other objects, features and advantages of the present invention will be more apparent from the following detailed description of preferred embodiments in conjunction with the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram showing a pipeline circuit according to a prior art;
FIG. 2 is a timing chart showing processes carried out in the pipeline circuit of FIG. 1 in handling an instruction A1 which is not a conditional branch instruction and a conditional branch instruction Bcc following the instruction A1;
FIG. 3 is a block diagram showing a pipeline circuit according to an embodiment of the present invention;
FIG. 4 is a view showing formats of instructions processed in the pipeline circuit of FIG. 3;
FIG. 5 is a timing chart showing processes carried out in the pipeline circuit of FIG. 3 in handling an instruction A1 which is not a conditional branch instruction and a conditional branch instruction Bcc following the instruction A1;
FIGS. 6(A), 6(B) and 6(C) are views showing the relation between a conditional branch instruction to be read out of an instruction buffer of the embodiment of FIG. 3 and a pointer; and
FIG. 7 is a block diagram showing a pipeline circuit modified from the pipeline circuit shown in FIG. 3.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
FIG. 3 is a view showing a pipeline circuit according to an embodiment of the present invention.
A pipeline circuit 6 comprises an instruction fetching unit (IFU) 7, an instruction decoding unit (IDU) 8, an effective address generating unit (AGU) 9 and an executing unit (EXU) 10.
The IFU 7 fetches an instruction from a memory 3 according to an address set in a program counter PCI 12 and stores the instruction in an instruction buffer 11.
The address in the PCI 12 is incremented for every instruction fetching operation. As will be described later in detail, a branch destination address is set in the PCI 12 to branch the execution of a program.
As shown in FIG. 4, an instruction code of this embodiment comprises an operation code of 16 bits including information related to an addressing mode, and a displacement of 16 or 32 bits.
As shown in FIG. 6, the instruction buffer 11 has a capacity of "16 bits×N words," and is read by word by word. The instruction buffer 11 has a pointer indicating the address of a word to be read next. The value of the pointer is incremented whenever the contents of the instruction buffer 11 are read out.
The IDU 8 decodes an instruction code supplied from the IFU 7. By decoding an operation code of the instruction, an addressing mode thereof is identified so that the IDU 8 may send an effective address generating request for an operand and information related to an addressing mode to the AGU 9.
If it is a conditional branch instruction, the IDU 8 sends, similar to the cases of other instructions, a request for generating an effective branch destination address and information related to an addressing mode to the AGU 9.
In addition, if it is the conditional branch instruction, an instruction just before the conditional branch instruction is executed to fix a status flag. After that, the IDU 8 detects the value of the status flag to judge whether or not a branch condition of the conditional branch instruction is met. If the branch condition is met, the IDU 8 notifies the AGU 9 of the fact that the branch condition has been met.
The AGU 9 determines an addressing mode based on the information of addressing mode supplied from the IDU 8. If there is a displacement, the AGU 9 sends a displacement sending request to the IFU 7, which then directly sends the displacement to the AGU 9.
Instead of outputting the displacement sending request from the AGU 9 to the IFU 7, it may be outputted from the IDU 8 to the IFU 7 as shown in FIG. 7.
When receiving the displacement from the IFU 7, the AGU 9 computes an effective address according to the addressing mode.
After computing the effective address, if a signal from the IDU 8 indicates that the branch condition has been met, the AGU 9 sets the effective address in the program counter (PCI) 12 of the IFU 7. Accordingly, the next instruction is prefetched from the branch destination address.
The EXU 10 fetches an operand from an effective address generated by the AGU 9 or writes an operand into the effective address in executing an instruction decoded by the IDU 8.
FIG. 5 shows the operation of the pipeline circuit 6. In the figure, the pipeline circuit 6 receives an instruction A1 which is not a conditional branch instruction and a conditional branch instruction Bcc following the instruction A1.
It is supposed that an instruction fetching operation and an instruction decoding operation are completed each within one clock cycle.
As shown in FIG. 5, the instruction A1 is fetched by the IFU 7 and stored in the instruction buffer 11 in a clock cycle T1, supplied to and decoded by the IDU 8 in a clock cycle T2, and computed for its effective address by the AGU 9 in a clock cycle T3. In addition, in the clock cycle T3, the execution of the instruction A1 is started by the EXU 10 and completed in a clock cycle T5.
The conditional branch instruction Bcc is prefetched in the clock cycle T2, decoded in the clock cycle T3, and computed for its branch destination address in the clock cycle T4. Even if the computation of the branch destination address is completed in the clock cycle T4, the execution of the instruction A1 will continue up to the clock cycle T5 so that a branch condition of the conditional branch instruction Bcc is not judged in the clock cycle T4. Therefore, in the clock cycle T5, the AGU 9 is in a waiting state and holds the branch destination address. In the clock cycle T5, the execution of the instruction A1 completes to fix a status flag. Then, the IDU 8 judges according to the status flag whether or not the branch condition of the conditional branch instruction Bcc is met.
If the branch condition is met, the branch destination address from the AGU 9 is set in the PCI 12. Therefore, in the next clock cycle T6, the execution of the instruction Bcc starts, while an instruction C1 located at the branch destination address is prefetched and stored in the instruction buffer 11. When the instruction C1 is fetched, a pointer of the instruction buffer 11 changes to indicate the fetched instruction C1. Therefore, in the next clock cycle T7, the instruction C1 is supplied to and decoded by the IDU 8. When the execution of the instruction Bcc is completed in the clock cycle T7, the instruction C1 starts to be executed and computed for its effective address in a clock cycle T8.
If the branch condition of the instruction Bcc is not met, the branch destination address held in the AGU 9 is not set in the PCI 12. Therefore, in the clock cycle T6, the instruction C1 located at the branch destination address is not fetched, but the next instruction is fetched from a current address in the PCI 12 (in FIG. 5, an address next to an address from which an instruction A5 has been fetched) and stored in the instruction buffer 11. Further, in the clock cycle T6, an instruction A3 next to the instruction Bcc is supplied from the instruction buffer 11 to the IDU 8 in which the instruction A3 is decoded.
If the number of execution cycles of an instruction just before a conditional branch instruction is small, a fact that a branch condition of the conditional branch instruction is not met may be found before the AGU 9 computes a branch destination address. In this case, the computation of the branch destination address is carried out to the end.
After the conditional branch instruction Bcc is decoded, a pointer of the instruction buffer 11 will indicate a displacement of the instruction Bcc as shown in FIG. 6(B). Therefore, the displacement of the instruction Bcc may be sent as the next instruction to the IDU 8 to cause an erroneous operation. To cope with this problem, the displacement of the instruction Bcc is read out of the instruction buffer 11 such that the pointer of the instruction buffer 11 will indicate an instruction next to the instruction Bcc as shown in FIG. 6(C).
Instead of computing the branch destination address to advance the pointer, it is possible to advance the pointer for the number of words of the displacement of the conditional branch instruction. However, according to this technique, controls shall be switched from one to another depending on whether a branch condition of the conditional branch instruction is found before the computation of the branch destination address or not. Therefore, the control of the instruction buffer 11 will be complicated.
As described in the above, the present invention can improve the performance of a CPU without drastically increasing an amount of hardware and without complicating controls.
The preferred embodiments of the present invention mentioned in the above are only illustrative and not intended to limit the scope of the present invention.

Claims (4)

What is claimed is:
1. An information processing system for processing instructions according to a pipeline circuit, comprising:
an instruction fetching unit for fetching an instruction from a memory;
an instruction decoding unit connected to said fetching unit for decoding an instruction transferred from said fetching unit;
an execution unit connected to said decoding unit for executing the instruction decoded by said decoding unit; and
an address generating unit connected to said decoding unit and said fetching unit for calculating an effective address of the decoded instruction in response to an address calculation request transferred from said decoding unit; wherein
said fetching unit includes a program counter for storing an address of an instruction to be fetched from said memory and an instruction buffer for storing a fetched instruction, said address generating unit being connected to said instruction buffer for calculating said effective address based on a displacement transferred from said instruction buffer when said displacement is used for the address calculation;
said address generating unit starting calculation of a branch destination address when a conditional branch instruction has been decoded by said decoding unit;
said branch destination being held by said address generating unit if it is not determined whether or not the branch condition is satisfied after said branch destination address is calculated by said address generating unit;
when it is determined that the branch condition is satisfied, the branch destination address being set in said program counter so that the fetching operation of said branch destination instruction is carried out;
when it is determined that the branch condition is not satisfied, said branch destination address not being set in said program counter so that the fetching operation of said branch destination instruction is not carried out; and
when it is determined that the branch condition is not satisfied before completion of the calculation of said branch destination address, said branch destination address calculation is continued up to the end.
2. The pipeline circuit in a computer system as claimed in claim 1, in which a reading operation of instructions stored in the instruction buffer is controlled by a pointer which indicates a position of a data to be read next and is advanced by one word whenever a data is read out of the instruction buffer according to a readout request from said instruction decoding unit or from said effective address generating unit.
3. The pipeline circuit in a computer system as claimed in claim 1, in which the branch destination address of the conditional branch instruction is computed even if it is found, before said effective address generating unit computes the effective branch destination address of the conditional branch instruction, that the branch condition of the conditional branch instruction is not met.
4. The information processing system as claimed in claim 1 wherein said execution unit is connected with said address generating unit through said instruction decoding unit.
US07/272,948 1988-01-18 1988-11-18 Pipeline circuit Expired - Fee Related US5237664A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP63007035A JP2723238B2 (en) 1988-01-18 1988-01-18 Information processing device
JP63-7035 1988-01-18

Publications (1)

Publication Number Publication Date
US5237664A true US5237664A (en) 1993-08-17

Family

ID=11654782

Family Applications (1)

Application Number Title Priority Date Filing Date
US07/272,948 Expired - Fee Related US5237664A (en) 1988-01-18 1988-11-18 Pipeline circuit

Country Status (5)

Country Link
US (1) US5237664A (en)
EP (1) EP0324952B1 (en)
JP (1) JP2723238B2 (en)
KR (1) KR920009999B1 (en)
DE (1) DE3855629T2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5408622A (en) * 1993-09-23 1995-04-18 Apple Computer, Inc. Apparatus and method for emulation routine control transfer via host jump instruction creation and insertion
US5485587A (en) * 1992-02-07 1996-01-16 Mitsubishi Denki Kabushiki Kaisha Data processor calculating branch target address of a branch instruction in parallel with decoding of the instruction
US5574887A (en) * 1993-09-20 1996-11-12 Apple Computer, Inc. Apparatus and method for emulation routine pointer prefetch
US5748976A (en) * 1993-10-18 1998-05-05 Amdahl Corporation Mechanism for maintaining data coherency in a branch history instruction cache
US6631464B1 (en) * 1988-12-27 2003-10-07 Fujitsu Limited Instruction pipeline with a branch prefetch when the branch is certain
US20080034188A1 (en) * 2006-08-03 2008-02-07 Nec Corporation Information processing apparatus and method for accelerating information processing

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19945940C2 (en) * 1999-09-24 2002-01-17 Infineon Technologies Ag Method and device for processing conditional jump instructions in a processor with PIPELINE computer architecture

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3881173A (en) * 1973-05-14 1975-04-29 Amdahl Corp Condition code determination and data processing
JPS573142A (en) * 1980-06-04 1982-01-08 Matsushita Electric Ind Co Ltd Instruction prefetching system
JPS5848144A (en) * 1981-09-16 1983-03-22 Nec Corp Branch instruction control system of data processor
US4430706A (en) * 1980-10-27 1984-02-07 Burroughs Corporation Branch prediction apparatus and method for a data processing system
US4435756A (en) * 1981-12-03 1984-03-06 Burroughs Corporation Branch predicting computer
EP0162778A2 (en) * 1984-05-21 1985-11-27 Digital Equipment Corporation Instruction prefetch system for conditional branch instruction for central processor unit
EP0213301A2 (en) * 1985-06-28 1987-03-11 Hewlett-Packard Company Concurrent transfer and branch
EP0219203A2 (en) * 1985-08-30 1987-04-22 Advanced Micro Devices, Inc. Computer control providing single-cycle branching
US4679141A (en) * 1985-04-29 1987-07-07 International Business Machines Corporation Pageable branch history table
US4760520A (en) * 1984-10-31 1988-07-26 Hitachi, Ltd. Data processor capable of executing instructions under prediction
US4827402A (en) * 1985-04-22 1989-05-02 Hitachi, Ltd. Branch advanced control apparatus for advanced control of a branch instruction in a data processing system
US4853840A (en) * 1986-01-07 1989-08-01 Nec Corporation Instruction prefetching device including a circuit for checking prediction of a branch instruction before the instruction is executed
US4858104A (en) * 1987-01-16 1989-08-15 Mitsubishi Denki Kabushiki Kaisha Preceding instruction address based branch prediction in a pipelined processor
US4870573A (en) * 1985-04-03 1989-09-26 Nec Corporation Microcomputer capable of testing execution of a program with no branch
US4881170A (en) * 1986-02-28 1989-11-14 Nec Corporation Instruction prefetch control apparatus
US4907192A (en) * 1985-11-08 1990-03-06 Nec Corporation Microprogram control unit having multiway branch
US4974154A (en) * 1986-10-07 1990-11-27 Mitsubishi Denki Kaisha Computer with instruction prefetch queue retreat unit
US4991080A (en) * 1986-03-13 1991-02-05 International Business Machines Corporation Pipeline processing apparatus for executing instructions in three streams, including branch stream pre-execution processor for pre-executing conditional branch instructions

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS51138355A (en) * 1975-05-26 1976-11-29 Hitachi Ltd Processing apparatus with a high speed branching feature
JPS5318931A (en) * 1976-08-06 1978-02-21 Hitachi Ltd Information processor
JPS57114949A (en) * 1981-01-05 1982-07-17 Nec Corp Data processor
JPS61289429A (en) * 1985-06-18 1986-12-19 Matsushita Electric Ind Co Ltd Arithmetic processing unit

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US3881173A (en) * 1973-05-14 1975-04-29 Amdahl Corp Condition code determination and data processing
JPS573142A (en) * 1980-06-04 1982-01-08 Matsushita Electric Ind Co Ltd Instruction prefetching system
US4430706A (en) * 1980-10-27 1984-02-07 Burroughs Corporation Branch prediction apparatus and method for a data processing system
JPS5848144A (en) * 1981-09-16 1983-03-22 Nec Corp Branch instruction control system of data processor
US4435756A (en) * 1981-12-03 1984-03-06 Burroughs Corporation Branch predicting computer
EP0162778A2 (en) * 1984-05-21 1985-11-27 Digital Equipment Corporation Instruction prefetch system for conditional branch instruction for central processor unit
US4760520A (en) * 1984-10-31 1988-07-26 Hitachi, Ltd. Data processor capable of executing instructions under prediction
US4870573A (en) * 1985-04-03 1989-09-26 Nec Corporation Microcomputer capable of testing execution of a program with no branch
US4827402A (en) * 1985-04-22 1989-05-02 Hitachi, Ltd. Branch advanced control apparatus for advanced control of a branch instruction in a data processing system
US4679141A (en) * 1985-04-29 1987-07-07 International Business Machines Corporation Pageable branch history table
EP0213301A2 (en) * 1985-06-28 1987-03-11 Hewlett-Packard Company Concurrent transfer and branch
EP0219203A2 (en) * 1985-08-30 1987-04-22 Advanced Micro Devices, Inc. Computer control providing single-cycle branching
US4907192A (en) * 1985-11-08 1990-03-06 Nec Corporation Microprogram control unit having multiway branch
US4853840A (en) * 1986-01-07 1989-08-01 Nec Corporation Instruction prefetching device including a circuit for checking prediction of a branch instruction before the instruction is executed
US4881170A (en) * 1986-02-28 1989-11-14 Nec Corporation Instruction prefetch control apparatus
US4991080A (en) * 1986-03-13 1991-02-05 International Business Machines Corporation Pipeline processing apparatus for executing instructions in three streams, including branch stream pre-execution processor for pre-executing conditional branch instructions
US4974154A (en) * 1986-10-07 1990-11-27 Mitsubishi Denki Kaisha Computer with instruction prefetch queue retreat unit
US4858104A (en) * 1987-01-16 1989-08-15 Mitsubishi Denki Kabushiki Kaisha Preceding instruction address based branch prediction in a pipelined processor

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
J. K. F. Lee, et al, Branch Prediction Strategies and Branch Target Buffer Design , Computer , Jan., 1984, p. 6 22. *
J. K. F. Lee, et al, Branch Prediction Strategies and Branch Target Buffer Design, "Computer", Jan., 1984, p. 6-22.

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6631464B1 (en) * 1988-12-27 2003-10-07 Fujitsu Limited Instruction pipeline with a branch prefetch when the branch is certain
US5485587A (en) * 1992-02-07 1996-01-16 Mitsubishi Denki Kabushiki Kaisha Data processor calculating branch target address of a branch instruction in parallel with decoding of the instruction
US5590296A (en) * 1992-02-07 1996-12-31 Mitsubishi Denki Kabushiki Kaisha Data processor processing a jump instruction
US5592637A (en) * 1992-02-07 1997-01-07 Mitsubishi Denki Kabushiki Kaisha Data processor processing a jump instruction
US5617550A (en) * 1992-02-07 1997-04-01 Mitsubishi Denki Kabushiki Kaisha Data processor generating jump target address of a jump instruction in parallel with decoding of the instruction
US5649145A (en) * 1992-02-07 1997-07-15 Mitsubishi Denki Kabushiki Kaisha Data processor processing a jump instruction
US5848268A (en) * 1992-02-07 1998-12-08 Mitsubishi Denki Kabushiki Kaisha Data processor with branch target address generating unit
US5574887A (en) * 1993-09-20 1996-11-12 Apple Computer, Inc. Apparatus and method for emulation routine pointer prefetch
US5408622A (en) * 1993-09-23 1995-04-18 Apple Computer, Inc. Apparatus and method for emulation routine control transfer via host jump instruction creation and insertion
US5748976A (en) * 1993-10-18 1998-05-05 Amdahl Corporation Mechanism for maintaining data coherency in a branch history instruction cache
US20080034188A1 (en) * 2006-08-03 2008-02-07 Nec Corporation Information processing apparatus and method for accelerating information processing
US7886133B2 (en) * 2006-08-03 2011-02-08 Nec Corporation Information processing apparatus and method for accelerating information processing

Also Published As

Publication number Publication date
EP0324952B1 (en) 1996-10-23
DE3855629T2 (en) 1997-03-27
KR890012226A (en) 1989-08-25
EP0324952A3 (en) 1991-09-25
DE3855629D1 (en) 1996-11-28
EP0324952A2 (en) 1989-07-26
JPH01183737A (en) 1989-07-21
JP2723238B2 (en) 1998-03-09
KR920009999B1 (en) 1992-11-10

Similar Documents

Publication Publication Date Title
US4827402A (en) Branch advanced control apparatus for advanced control of a branch instruction in a data processing system
US5404552A (en) Pipeline risc processing unit with improved efficiency when handling data dependency
US5202967A (en) Data processing apparatus for performing parallel decoding and parallel execution of a variable word length instruction
US4912635A (en) System for reexecuting branch instruction without fetching by storing target instruction control information
US4967338A (en) Loosely coupled pipeline processor
US5502827A (en) Pipelined data processor for floating point and integer operation with exception handling
US5416911A (en) Performance enhancement for load multiple register instruction
EP0094535B1 (en) Pipe-line data processing system
US5335330A (en) Information processing apparatus with optimization programming
JP2773471B2 (en) Information processing device
EP0354740B1 (en) Data processing apparatus for performing parallel decoding and parallel execution of a variable word length instruction
US5469552A (en) Pipelined data processor having combined operand fetch and execution stage to reduce number of pipeline stages and penalty associated with branch instructions
US5237664A (en) Pipeline circuit
EP0223150B1 (en) Information processing apparatus
EP0423726B1 (en) Branch control circuit
EP0394711A2 (en) Branch instruction control unit based on a pipeline method
US6757809B1 (en) Data processor having 2n bits width data bus for context switching functions
US5634136A (en) Data processor and method of controlling the same
US5142630A (en) System for calculating branch destination address based upon address mode bit in operand before executing an instruction which changes the address mode and branching
US6044455A (en) Central processing unit adapted for pipeline process
US7779236B1 (en) Symbolic store-load bypass
US5787276A (en) Microprocessor including circuit for generating signal used for tracing executed instruction stream
JPS61288230A (en) Pipeline control system
JP3100705B2 (en) Apparatus for instruction preparation in a microprocessor
JPH0248733A (en) Information processor

Legal Events

Date Code Title Description
AS Assignment

Owner name: KABUSHIKI KAISHA TOSHIBA, 72 HORIKAWA-CHO, SAIWAI-

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST.;ASSIGNOR:USAMI, KIMIYOSHI;REEL/FRAME:004971/0189

Effective date: 19881101

Owner name: KABUSHIKI KAISHA TOSHIBA, JAPAN

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:USAMI, KIMIYOSHI;REEL/FRAME:004971/0189

Effective date: 19881101

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

FPAY Fee payment

Year of fee payment: 4

FPAY Fee payment

Year of fee payment: 8

REMI Maintenance fee reminder mailed
LAPS Lapse for failure to pay maintenance fees
STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20050817