JPS5890244A - Data processor - Google Patents

Data processor

Info

Publication number
JPS5890244A
JPS5890244A JP18702281A JP18702281A JPS5890244A JP S5890244 A JPS5890244 A JP S5890244A JP 18702281 A JP18702281 A JP 18702281A JP 18702281 A JP18702281 A JP 18702281A JP S5890244 A JPS5890244 A JP S5890244A
Authority
JP
Japan
Prior art keywords
instruction
loop
buffer
branch
address
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.)
Pending
Application number
JP18702281A
Other languages
Japanese (ja)
Inventor
Michitaka Yamamoto
山本 通敬
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP18702281A priority Critical patent/JPS5890244A/en
Publication of JPS5890244A publication Critical patent/JPS5890244A/en
Pending legal-status Critical Current

Links

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 or look ahead
    • G06F9/3802Instruction prefetching
    • G06F9/3808Instruction prefetching for instruction reuse, e.g. trace cache, branch target cache
    • G06F9/381Loop buffering

Landscapes

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

Abstract

PURPOSE:To shorten the reading time of an instruction for a small-scale instruction loop, by reading the instruction directly out of an instruction buffer while the branching conditions of a branch are satisfied. CONSTITUTION:For a small-scale instruction loop formed by a specific instruction loop, an instruction loop is assumed with a specific branch instruction. Then a detecting circuit 15 is provided to check whether the instruction loop can enter an instruction buffer 2. If the instruction loop can enter the buffer 2, the reading of an extra instruction is inhibited so that the entire instruction included in the loop can be held within the buffer 2 while the loop is carrying out a process. This can eliminated a delay of process which is caused while the instruction given from a buffer memory 1 is read and then stored in the buffer 2 and with each branching.

Description

【発明の詳細な説明】 本発明は、命令バッファを用いたブランチ命令の分岐先
命令の読み出しに係り、特に数命令。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to reading a branch destination instruction of a branch instruction using an instruction buffer, particularly for several instructions.

の命令7繰り返し実行する、いわゆる命令ルー。This is a so-called instruction loop in which 7 instructions are repeatedly executed.

ブの小規模なものに好適なデータ処理装置に関−。The present invention relates to a data processing device suitable for small-scale applications.

する0 従来、ブランチ命令において、その分岐先命令は必らず
メモリより命令バッファへ読み出して命令の処理乞開始
していた。このため、命令バッファの中に入り得る程度
の小規模な命令ルl11−プの場合、繰り返し実行する
命令が既に命令バッファの中に読み出されているにもか
かわらず、再度メモリより読み出し、この読み出し時間
が必要となる欠点があった。
Conventionally, in a branch instruction, the branch destination instruction is necessarily read from the memory to the instruction buffer to start processing the instruction. Therefore, in the case of a small-scale instruction loop that can fit into the instruction buffer, even though the instruction to be repeatedly executed has already been read into the instruction buffer, it is read out from memory again and the There is a drawback that reading time is required.

本発明の目的は、小規模な命令ループZ構成する場合に
よく使用されろブランチ命令ン他のブランチ命令と区別
し、そのような特定のブランチ命令による小規模な命令
ループにおいて、その命令読み出し時間ン短縮すること
にある。
An object of the present invention is to distinguish a branch instruction that is often used when configuring a small-scale instruction loop Z from other branch instructions, and to reduce the instruction read time in a small-scale instruction loop using such a specific branch instruction. The goal is to shorten the time.

小規模な命令ループにおいて、既に命令バノファに取り
込んだ命令な直接読出し、バックアメモリからの命令読
出し時間乞短縮するために1、特定のブランチ命令で命
令ループ?仮定し、命令ループが命令バッファに人つ得
ろか否かの検。
In a small-scale instruction loop, in order to shorten the time of directly reading instructions that have already been taken into the instruction buffer, or reading instructions from the backup memory, 1. Instruction loop with a specific branch instruction? Assuming that, the instruction loop checks whether the instruction buffer gets filled.

串回路乞設け、命令バッファ内でループ可能な。It has a built-in circuit and can loop within the instruction buffer.

らば余分な命令読出しf %%止し、ループに含まれろ
命令全体がループ処理中命令バッフ7内に。
If so, stop reading the extra instructions and include them in the loop.The entire instruction is placed in the instruction buffer 7 during loop processing.

保存できろ方式とした。We decided to use a method that allows it to be saved.

以下、本発明の一火施例〉図により説明する。EMBODIMENT OF THE INVENTION Hereinafter, one example of the present invention will be explained with reference to the drawings.

1はバッファメモリである。このバッフ7メモリ1は、
主記憶装作J:り小容量で高速であり、プログラムの命
令が主記憶装置の写しとして格納される。
1 is a buffer memory. This buffer 7 memory 1 is
Main memory J: has a small capacity and high speed, and program instructions are stored as a copy of the main memory.

この実施例では、主記憶装置の命令は、丁べてバッファ
メモリ1内にあるものとし、命令長は16ヒ゛ノド又は
32ビットの2イ車とする。
In this embodiment, it is assumed that all instructions in the main memory are stored in the buffer memory 1, and the instruction length is 16 strings or 32 bits.

バッファメモリ1かもの命令の読出し幅は64ビツトで
ある。2は命令バッファである。命令バッファ2は64
ビツトのレジスタ4個で構成する。酋令バッファ2は主
記憶」二で連続した命令データを256ビツトまで保持
することができろ。
The read width of an instruction for one buffer memory is 64 bits. 2 is an instruction buffer. Instruction buffer 2 is 64
It consists of four bit registers. The command buffer 2 is the main memory and can hold up to 256 bits of consecutive command data.

命令読出しは命令読出しアドレスレジスタ6゜によりア
ドレスされた64ビツト乞バツフ7メモ。
Instruction read is a 64-bit request buffer 7 memo addressed by the instruction read address register 6°.

りから命令バッファ2へ取り込むことにより行う。This is done by loading it into the instruction buffer 2 from the beginning.

ブランチ命令以外の命令は、主記憶上で連続した命令乞
順次実行するので1回の命令読出しが終り命令バッファ
にまだ空きがあれば命令読出しアドレスレジスタ6の内
容はカロ算器21により+1し、次の命令読出しアドレ
スとして命令読出しン要求する。
Instructions other than branch instructions are executed sequentially in the main memory, so if one instruction read is completed and there is still space in the instruction buffer, the contents of the instruction read address register 6 are incremented by 1 by the Caro calculator 21. An instruction read request is made as the next instruction read address.

命令切出し回路3は命令バッファ2より所望の命令7左
づめにして命令レジスタ4へ転送する。命令レジスタ4
は切り出された命令ン取り込み、命令の処理Z開始する
The instruction extraction circuit 3 transfers the desired instruction 7 from the instruction buffer 2 to the instruction register 4, left-justified. instruction register 4
takes in the extracted instruction and starts processing the instruction.

命令切出しレジスタ7は、命令レジスタ4へ切■した命
令の命令バッファ2内のアドレスを保持する。命令レジ
スタ4に入った命令よりデコーダ5はその命令長tデコ
ードし、加算器8へ入力する。加算器8は命令切出しレ
ジスタの内容と命令長7加え、次の命令切出しの先頭ア
ドレスを出力する。
The instruction extraction register 7 holds the address in the instruction buffer 2 of the instruction extracted to the instruction register 4. The decoder 5 decodes the instruction length t from the instruction entered in the instruction register 4 and inputs it to the adder 8. The adder 8 adds the contents of the instruction extraction register and the instruction length 7, and outputs the start address of the next instruction extraction.

以上説明したように、命令Ml出しは通常、順次アドレ
スされ、命令バッファ2、命令レジス。
As explained above, the instruction M1 is normally addressed sequentially, including the instruction buffer 2 and the instruction register.

り4へと転送7行うが、ブランチ命令で分岐条。Transfer 7 to 4 is executed, but the branch instruction is executed.

件が成立すると命令読出しj111序が乱れることにな
る。
If the condition holds true, the order of instruction reading j111 will be disrupted.

ここで、本発明の対象とする命令ループ7仮。Here, the instruction loop 7 which is the subject of the present invention.

定するタイプのブランチ命令(以下ループ命令と呼ぶ)
の処理について述べる。
branch instruction (hereinafter referred to as loop instruction)
The following describes the processing.

命令カウンタ9は命令レジスタ4に取り込んでいる命令
のアドレスを通常示している。
The instruction counter 9 normally indicates the address of the instruction loaded into the instruction register 4.

ループ命令が命令レジスタ4に取り込まれると、その分
岐先アドレス7アドレス計算回路11で計算し、アドレ
ス線10乞介しループ検出回路15に入力するとともに
、ループ命令自牙のアドレスもアドレス線20ン介し人
力する。ループ検出口路15では、入力した2つのアド
レスを比較し、命令ループ全体が、命令バッファ2に入
り得るか否かのテスト7行う。
When a loop instruction is taken into the instruction register 4, its branch destination address 7 is calculated by the address calculation circuit 11, and is input to the intervening loop detection circuit 15 via the address line 10, and the address of the loop instruction itself is also input via the address line 20. Manpower. The loop detection path 15 compares the two input addresses and performs a test 7 to determine whether the entire instruction loop can be entered into the instruction buffer 2.

このテストで命令バッファ2内でループ可能。This test allows a loop within instruction buffer 2.

であれば、ループ命令処理中を示すフリップフロップ、
Z、12Y1とし、フリップフロップIJ12が0なら
ばループ命令準備中7示すフリップフロップP13ン1
とする。
If so, the flip-flop indicates that the loop instruction is being processed,
Z, 12Y1, and if flip-flop IJ12 is 0, flip-flop P13 indicates 7 in preparation for loop instruction.
shall be.

フリップフロップL12が1となっている間命令カウン
タ9の史新乞禁止しループ命令アドレスを保持する。
While the flip-flop L12 is at 1, updating of the instruction counter 9 is prohibited and the loop instruction address is held.

分岐先アドレスレジスター4は、フリップフロップLi
2が0で、ループ命令が命令レジスタ4に入った後、そ
の分岐先アドレスヶ入力し、フリップフロップL12が
1となっている間その分岐先アドレス乞保持する。
The branch destination address register 4 is a flip-flop Li.
2 is 0, and after the loop instruction enters the instruction register 4, the branch destination address is input, and the branch destination address is held while the flip-flop L12 is set to 1.

フリップフロップL12が1となると分岐先命令からル
ープ命令までの命令読出しのみ行ないループ命令以降の
命令読出は禁止する。
When the flip-flop L12 becomes 1, only instructions from the branch destination instruction to the loop instruction are read, and reading of instructions after the loop instruction is prohibited.

ループ命令準備中に読出し要求した命令が、全部命令バ
ッファ2に読出された時、フリップフロップP15ン0
とし、ループ命令の準備は完了する。分岐検出回路16
では、アドレス線19乞介して人力″″f7.;)命令
切Lllt、アドレスとループ命令の命令アドレスン保
持している命令カウンタ。
When all instructions requested to be read during loop instruction preparation have been read into instruction buffer 2, flip-flop P15 pin 0
The preparation for the loop instruction is completed. Branch detection circuit 16
Then, address line 19 is required and human power ″″f7. ;) An instruction counter that holds the instruction address and the instruction address of the loop instruction.

9の内容とを常時比較しており、それらが一致するとル
ープ命令が命令レジスタ4へ取り込ま。
9 is constantly compared, and if they match, the loop instruction is taken into the instruction register 4.

れたと仮定し、命令切出しレジスタ7へ分岐先命令アド
レスレジスタ14より分岐先命令(7)切出しアドレス
Z入力する。次のサイクルでは、加算器8は+0乞行な
い、分岐先命令が命令バッファより切出される。
The branch destination instruction (7) extraction address Z is input to the instruction extraction register 7 from the branch destination instruction address register 14. In the next cycle, the adder 8 goes to +0 and the branch destination instruction is extracted from the instruction buffer.

以下、同様にループ命令の分岐条件が不成立となるまで
分岐を続ける。ループ命令が実行され分岐条件が不成立
となると、フリップフロップL12、フリップフロップ
P 1 !、 Y共に0とし。
Thereafter, branching is continued in the same manner until the branching condition of the loop instruction is not satisfied. When the loop instruction is executed and the branch condition is not satisfied, flip-flop L12 and flip-flop P 1 ! , Y are both 0.

ループ命令の次に実行することン仮定していた分岐先命
令以降の命令処Jl! Y無効化する。
Instruction processing after the branch destination instruction that was assumed to be executed next to the loop instruction Jl! Y Disable.

命令読出しアドレスレジスタ6はループ命令ン含む64
ビットの命令読出しの後加算器21により+1され、次
に読出丁べぎ64ピツトン示しており、このアドレスを
用いて命令読1ilt、’Y開始し、通當の動作へ戻る
The instruction read address register 6 includes a loop instruction 64
After the instruction read of the bit, the bit is incremented by 1 by the adder 21, and then the read address is indicated by 64 pits. Using this address, the instruction read 1ilt, 'Y is started and the operation returns to the current operation.

その他、命令ループ内の命令により命令ループ内の命令
’fWき換えたり、ループ命令の分岐先アドレスが変更
されたつすることがある。 。
In addition, the instruction 'fW' in the instruction loop may be replaced by the instruction in the instruction loop, or the branch destination address of the loop instruction may be changed. .

このような場合、これまで述べたループ命令処理は不可
能となる。
In such a case, the loop instruction processing described above becomes impossible.

このため、プログラムストア検出回路1Bで命令ループ
内命令の書き換え乞、又分岐先アドレス比較回路17で
、ループ命令の分岐先アドレスの変更をチェックする。
Therefore, the program store detection circuit 1B checks whether the instruction within the instruction loop has been rewritten, and the branch destination address comparison circuit 17 checks whether the branch destination address of the loop instruction has been changed.

ストアアドレスレジスタ22は、メモリの内容7書き換
えろ時そのアドレスン保持する。
The store address register 22 holds the address when the memory contents 7 are rewritten.

プログラムストア検出回[18には、ループ命令のアド
レスが、アドレスN 20 Y介し、ループ命令の分岐
先アドレスがアドレス線23を介し。
At the program store detection time [18], the address of the loop instruction is sent through the address N 20 Y, and the branch destination address of the loop instruction is sent through the address line 23.

又、書き換えるメモリのアト1/スがアドレス線24ン
介し入力される。
Further, the address of the memory to be rewritten is input via the address line 24.

プログラムストア検出回路18は、ループ命令の分岐先
からループ命令までの区間の命令’k VJ’き換える
場合、これン検出し、書き換え乞行った。次の命令以降
の処理乞無効化し、フリップフロップL12、フリップ
フロップP13’Yともに0とし、薔ぎ換え1行なった
次の命令の命令読出しより処理ン再開する。
The program store detection circuit 18 detects when an instruction 'kVJ' in the section from the branch destination of the loop instruction to the loop instruction is to be replaced and requests rewriting. Processing after the next instruction is invalidated, flip-flop L12 and flip-flop P13'Y are both set to 0, and processing is restarted from reading the next instruction after performing one change.

分岐先アドレス比較回路17にはループ命令の開始時点
で取り込んだループ命令の分岐先アド−レヌがアドレス
線23乞介し、又ループ命令が命令レジスタへ取り込ま
れるたびにそのループ命令の分岐先アドレスがアドレス
M 107介して入力されている。
The branch destination address comparison circuit 17 receives the branch destination address of the loop instruction taken in at the start of the loop instruction via the address line 23, and the branch destination address of the loop instruction is sent to the address line 23 each time the loop instruction is taken into the instruction register. It is input via M107.

分岐先アドレス比較回路17ば、この2つのアlイJ ドレスン比較し、不一致を検Ilf:I″′fると、フ
リップフロップL12及びフリップ70ツブP13乞0
とし、辿當の分岐命令として処理する。
The branch destination address comparison circuit 17 compares these two arrays and detects a mismatch. When the branch destination address comparison circuit 17 compares these two arrays and detects a mismatch, the flip-flop L12 and the flip-flop 70 turn P13.
and is processed as a branch instruction.

以上述べたように、本発明によれば、分岐条件が成立す
る頻度の高い特定のブランチ命令で5 の命令バッファに入る程度の小規模な命令ループにおい
て、その分岐のたびに生じるバッフ7メモリから命令を
読出しから命令バッファへ格納する筐での処理の遅れZ
無く丁ことかでき、性能が同上する効果がある。
As described above, according to the present invention, in a small-scale instruction loop where a specific branch instruction in which a branch condition is frequently satisfied can be stored in a 5-instruction buffer, the buffer 7 memory that is generated each time the branch is Processing delay Z in the case from reading the instruction to storing it in the instruction buffer
It can be used without any problems and has the effect of improving performance.

 −

【図面の簡単な説明】[Brief explanation of the drawing]

図は、本発明によるデータ処理装置jltY示すブロッ
ク図である。 2・・パ命令バッファ、 12・−・フリップフロップL。 13・・・フリップフロップP。 15・・・ループ検出回路。 16・・・分岐検出回路、 17・・・分岐先アドレス比較回路、 18・・・プログラムストア検出回路。
The figure is a block diagram showing a data processing device jltY according to the present invention. 2...Pa instruction buffer, 12...Flip-flop L. 13...Flip-flop P. 15...Loop detection circuit. 16... Branch detection circuit, 17... Branch destination address comparison circuit, 18... Program store detection circuit.

Claims (1)

【特許請求の範囲】 1、 メモリより複数の命令を読み出し、貯えて。 おくための命令バッファを有すデータ処理装装置に於い
て、特定のブランチ命令ケ検出する回路とブランチ命令
の分岐先から、そのブランチ命令までの連続した命令が
全部命令バッファに入り得ることを検出する回路と、特
定のブランチ命令を検出し、かつそのブランチ命令の分
岐先からブランチ命令自身までの命令が命令バッファに
入り得ること乞検出した場合、そのブランチ命令の分岐
先からブランチ命令自身までの命令ン一度読み出した後
は、その命令列を命令バッファに保存し、そのブト ランチの分岐条件が成立している間は、メモリからの命
令読み出しを待たず、命令バッファより直接命令を取り
出す手段〉設けたことZ%徴とするデータ処理装置。
[Claims] 1. Read and store multiple instructions from memory. In a data processing device that has an instruction buffer for storing a specific branch instruction, a circuit detects a specific branch instruction and detects that all consecutive instructions from the branch destination of the branch instruction to that branch instruction can be stored in the instruction buffer. If a circuit detects a specific branch instruction and detects that the instructions from the branch destination of the branch instruction to the branch instruction itself can enter the instruction buffer, the circuit from the branch destination of the branch instruction to the branch instruction itself Once an instruction has been read, the instruction string is saved in the instruction buffer, and as long as the branch condition for that branch is met, a means is provided for directly retrieving the instruction from the instruction buffer without waiting for the instruction to be read from memory. A data processing device that uses Z%.
JP18702281A 1981-11-24 1981-11-24 Data processor Pending JPS5890244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18702281A JPS5890244A (en) 1981-11-24 1981-11-24 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18702281A JPS5890244A (en) 1981-11-24 1981-11-24 Data processor

Publications (1)

Publication Number Publication Date
JPS5890244A true JPS5890244A (en) 1983-05-28

Family

ID=16198819

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18702281A Pending JPS5890244A (en) 1981-11-24 1981-11-24 Data processor

Country Status (1)

Country Link
JP (1) JPS5890244A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01311326A (en) * 1988-06-10 1989-12-15 Oki Electric Ind Co Ltd Program control device
US7080240B2 (en) 1997-02-17 2006-07-18 Hitachi, Ltd. Data processing apparatus
JP2009116621A (en) * 2007-11-06 2009-05-28 Toshiba Corp Arithmetic processing apparatus
JP2010066892A (en) * 2008-09-09 2010-03-25 Renesas Technology Corp Data processor and data processing system
JP2013097638A (en) * 2011-11-02 2013-05-20 Renesas Electronics Corp Cache memory device, cache control method and microprocessor system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01311326A (en) * 1988-06-10 1989-12-15 Oki Electric Ind Co Ltd Program control device
US7080240B2 (en) 1997-02-17 2006-07-18 Hitachi, Ltd. Data processing apparatus
JP2009116621A (en) * 2007-11-06 2009-05-28 Toshiba Corp Arithmetic processing apparatus
JP2010066892A (en) * 2008-09-09 2010-03-25 Renesas Technology Corp Data processor and data processing system
JP2013097638A (en) * 2011-11-02 2013-05-20 Renesas Electronics Corp Cache memory device, cache control method and microprocessor system

Similar Documents

Publication Publication Date Title
JP2539199B2 (en) Digital processor controller
JPH0814801B2 (en) Programmable access memory
JPS6324428A (en) Cache memory
US4924425A (en) Method for immediately writing an operand to a selected word location within a block of a buffer memory
JPS5890244A (en) Data processor
US20210165654A1 (en) Eliminating execution of instructions that produce a constant result
JPS6049340B2 (en) Branch instruction prefetch method
JPS5890247A (en) Pipeline controlling system of information processor
JPS6236258B2 (en)
JP2815850B2 (en) Data processing unit
JPS63136229A (en) Instruction extracting device
JPS60134937A (en) Address extension device
JPS6152505B2 (en)
JPS5836434B2 (en) Batshua Memory Souch
JP2559416B2 (en) Information processing device
JPH09114733A (en) Non-aligned data transfer mechanism in cache storage device
JPS6410858B2 (en)
JPS62298866A (en) Control system for lock between processors
JPS61136145A (en) Cache memory control circuit
JPS62147530A (en) Microprogram control system
JPS62126442A (en) Data processor
JPS6244839A (en) Instruction fetching device
JPS61170830A (en) Register reference control system
JPH04344531A (en) Instruction fetching control system
JPS6361332A (en) Data processor