[go: up one dir, main page]

JPS62194544A - Instruction pre-read control system - Google Patents

Instruction pre-read control system

Info

Publication number
JPS62194544A
JPS62194544A JP3700686A JP3700686A JPS62194544A JP S62194544 A JPS62194544 A JP S62194544A JP 3700686 A JP3700686 A JP 3700686A JP 3700686 A JP3700686 A JP 3700686A JP S62194544 A JPS62194544 A JP S62194544A
Authority
JP
Japan
Prior art keywords
instruction
branch
address
read
destination 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
JP3700686A
Other languages
Japanese (ja)
Inventor
Jun Koike
純 小池
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP3700686A priority Critical patent/JPS62194544A/en
Publication of JPS62194544A publication Critical patent/JPS62194544A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)

Abstract

PURPOSE:To perform the branch instruction at a high speed by holding a pre- read instruction and producing a branch address of the branch instruction selected by a decoder to store, to read as necessary and to set the produced address to an address counter. CONSTITUTION:The pre-read instruction read by an address counter 2 is stored in a pre-read memory 3 and also inputted to a decoder 5. The decoder 5 decides only a fact that the input instruction is equal to a branch instruction that has no reference to a general-purpose register which can be changed optionally in a program and calculates a branch address through an address generating circuit 6 to store it in a branch address store memory 4. Then the branch instruction is read out of the memory 3 and interpreted by an instruction execution control part 7 to be branched. Thus the branch address calculated previously is read out of the memory 4 and set to the counter 2. The counter 2 gives an access to the set branch address and therefore fetches the branch address instruction.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、電子計算機における命令先読み制御方式に関
する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an instruction prefetch control method in an electronic computer.

〔従来の技術〕[Conventional technology]

従来、命令先読み制御方式の一例として、命令コード及
び該命令実行に際して必要なデータを共通の外部データ
バスを使用してCPU内に時分割で読み込む場合、CP
Uが外部バスアクセスを必要としない命令実行中に次の
命令をプログラム順に前記外部バスを通じて先読みし、
レジスタ、バッファ等に単純に記憶させておく命令先読
み制御方式がある。
Conventionally, as an example of an instruction prefetch control method, when an instruction code and data necessary for executing the instruction are read into a CPU in a time-sharing manner using a common external data bus, the CPU
Prefetching the next instruction through the external bus in program order while U is executing an instruction that does not require external bus access;
There is a prefetch control method in which instructions are simply stored in registers, buffers, etc.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

このような従来の命令先読み制御方式では、プログラム
中にブランチ命令があると、該ブランチ命令をCPUが
命令デコーダでデコードし、デコードされた命令を実行
する時になってはじめてブランチ先アドレスを計算し、
新たにブランチ先のアドレスより命令コードを読み込ま
なければならないことにより、ブランチ命令実行に際し
ては、命令先読み制御による命令実行処理時間の節約の
効果かほとんどないという欠点かある。
In such a conventional instruction prefetch control method, when a branch instruction exists in a program, the CPU decodes the branch instruction using an instruction decoder, and calculates the branch destination address only when the CPU executes the decoded instruction.
Since the instruction code must be newly read from the branch destination address, when executing the branch instruction, there is a drawback that there is almost no saving in instruction execution processing time due to instruction prefetch control.

〔問題点を解決するための手段〕[Means for solving problems]

本発明の命令先読み制御方式は、バス上に出力された先
読みされた命令を順に取り込み記憶手段に保持し、取り
込むと同時に該先読みされた命令がブランチ命令である
が否が判断できるデコーダへ入力され、プログラム中に
値を任意に変更できる汎用レジスタを参照しないブラン
チ命令であることを該デコーダにより選択し、選択され
たブランチ命令のブランチ先アドレスを該ブランチ命令
のオペランド部と、プログラムメモリをアクセスするア
ドレスカウンタ値の少なくともどちらが一方を用いて生
成し、先読み命令が記憶されたと同様に前記生成された
ブランチ先アドレスを格納手段に記憶し、該ブランチ命
令が先読み命令より読み出されて、該命令実行によりブ
ランチすることが決まれば、あらかじめ生成され、記憶
されていたブランチ先アドレスを読み出し、プログラム
メモリをアクセスするアドレスカウンタへセラ)・する
手段を有している。
The instruction prefetch control method of the present invention sequentially captures prefetched instructions outputted onto a bus and holds them in a storage means, and at the same time as the fetched instructions are input to a decoder that can determine whether the prefetched instructions are branch instructions or not. , the decoder selects a branch instruction that does not refer to a general-purpose register whose value can be arbitrarily changed during programming, and accesses the branch destination address of the selected branch instruction and the operand part of the branch instruction and the program memory. At least one of the address counter values is generated using one of them, the generated branch destination address is stored in a storage means in the same way as a prefetch instruction is stored, and the branch instruction is read from the prefetch instruction and the instruction is executed. When it is decided to branch, the branch destination address generated and stored in advance is read out and stored in an address counter that accesses the program memory.

〔実施例]1 次に、本発明について図面を参照して説明する。[Example] 1 Next, the present invention will be explained with reference to the drawings.

第1図は、本発明の一実施例のフロック図である。まず
、プログラムメモリ内に格納されている命令をアドレス
カウンタ2によりアクセスし、バス1」二へ読み出す。
FIG. 1 is a block diagram of one embodiment of the present invention. First, the instructions stored in the program memory are accessed by the address counter 2 and read out onto the bus 1''2.

読み出された命令は、先読みメモリ3へ記憶されると共
に、テコーダ5f\入力される。デコーダ5は入力され
た命令がブロクラム中で任意に変更できる汎用レジスタ
を参照しないブランチ命令であることのみを判断し、該
フランチ命令である時のみ、該ブランチ命令のオペラン
ドとアドレスカウンタ2のアドレス値の少なくともとち
らか一方を用いてアドレスカウンタ6によってブランチ
先アドレスを計算し、ブランチ先アドレス格納メモリ4
へ入力され、記憶される。
The read command is stored in the pre-read memory 3 and is also input to the decoder 5f\. The decoder 5 only determines that the input instruction is a branch instruction that does not refer to general-purpose registers that can be arbitrarily changed in the blockrum, and only when it is a branch instruction, the operand of the branch instruction and the address value of the address counter 2 are determined. The branch destination address is calculated by the address counter 6 using at least one of the above, and the branch destination address is stored in the branch destination address storage memory 4.
and stored.

次に先読みメモリ3より該ブランチ命令が読み出され、
命令実行制御部7により解釈実行され、フランチするこ
とになると、前述のように前ちって算出されているフラ
ンチ先アドレスをブランチ先アドレス格納メモリ4より
読み出し、アドレスカウンタ2ヘセ・ソI−する。
Next, the branch instruction is read from the look-ahead memory 3,
When the instruction is interpreted and executed by the instruction execution control unit 7 and a branch is to be executed, the branch destination address calculated in advance as described above is read from the branch destination address storage memory 4 and is set in the address counter 2.

アドレスカウンタ2は、セットされたブランチ先アドレ
スをアクセスすることにより、ブランチ先命令をフエ・
・lチするようになる。従って、ブランチ命令が解釈実
行されるに際しては、この時既にブランチ先アドレス計
算が済んでいるので、ブランチ先アドレス格納メモリ4
よりアドレスカウンタ2ヘブランチ先アドレスを転送す
るだけで該ブランチを実行したことになり、ブランチ先
アドレス計Mi時間が全くないかのごとき高速にブラン
チ処理を行なうことができる。
The address counter 2 inputs the branch destination instruction by accessing the set branch destination address.
・Starts to do things. Therefore, when a branch instruction is interpreted and executed, since the branch destination address has already been calculated, the branch destination address storage memory 4
Therefore, simply transferring the branch destination address to the address counter 2 means that the branch is executed, and the branch process can be performed at high speed as if the branch destination address total time Mi does not exist at all.

1発明の効果〕 以上説明したように本発明は、命令を先読みしたと同時
に、先読みした命令がブランチ命令であり、かつプログ
ラム中で任意に変更できる汎用レーシスタ値をブランチ
先アドレス算出に際し参照しない命令であることをデコ
ードし、分かると、すぐにブランチ先アドレスを算出、
生成し、メモリl−記憶させておくことにより、該フラ
ンチ命令が先読みメモリより読み出され実行され、フラ
ンチすることが決まれば、前記ブランチ先をあらかじめ
生成されて記憶されていたメモリよりたた単に読み出し
、プログラムメモリをアクセスするアドレスカウンタ値
セ・ソトするだけでブ′う〉・子処理が行なえる。つま
り、該ブランチ命令が解釈実行される際には、ブランチ
先アドレスの計算時間が・B要なく、高速にブランチす
ることを可能とする効果がある。
1. Effects of the Invention As explained above, the present invention provides an instruction that prefetches an instruction, and at the same time, the prefetched instruction is a branch instruction and does not refer to the general purpose register value, which can be changed arbitrarily in the program, when calculating the branch destination address. After decoding and finding out that it is, immediately calculate the branch destination address,
By generating the branch instruction and storing it in memory, the branch instruction is read out from the read-ahead memory and executed, and when it is decided to execute the branch, the branch destination is simply stored in the memory that was generated and stored in advance. Boolean and child processing can be performed simply by reading and setting and sorting the address counter value that accesses the program memory. In other words, when the branch instruction is interpreted and executed, the time required to calculate the branch destination address is not required, and the branch can be executed at high speed.

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

第1図は本発明の命令先読み制御方式の一実施例のブロ
ック図である。
FIG. 1 is a block diagram of an embodiment of the instruction prefetch control method of the present invention.

Claims (1)

【特許請求の範囲】[Claims] バス上に出力された、先読みされた命令を順に取り込み
保持する記憶手段と、該先読みされた命令がブランチ命
令であるか否か判断するデコーダと、前記デコーダによ
り選択されたブランチ命令のブランチ先アドレスを生成
する手段と、前記生成されたブランチ先アドレスを先読
み命令が記憶されたと同様に記憶しておくブランチ先ア
ドレス格納手段と、必要に応じて前記格納されたブラン
チ先アドレスをブランチ先アドレス格納手段より読み出
し、プログラムメモリをアクセスするアドレスカウンタ
へ該ブランチ先アドレスをセットする手段とを有するこ
とを特徴とする命令先読み制御方式。
a storage means for sequentially capturing and holding prefetched instructions outputted on a bus; a decoder for determining whether the prefetched instruction is a branch instruction; and a branch destination address of the branch instruction selected by the decoder. branch destination address storage means for storing the generated branch destination address in the same manner as when the prefetch instruction is stored; and branch destination address storage means for storing the stored branch destination address as necessary. 1. An instruction prefetch control system comprising means for reading from a branch destination address and setting the branch destination address in an address counter for accessing a program memory.
JP3700686A 1986-02-20 1986-02-20 Instruction pre-read control system Pending JPS62194544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3700686A JPS62194544A (en) 1986-02-20 1986-02-20 Instruction pre-read control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3700686A JPS62194544A (en) 1986-02-20 1986-02-20 Instruction pre-read control system

Publications (1)

Publication Number Publication Date
JPS62194544A true JPS62194544A (en) 1987-08-27

Family

ID=12485608

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3700686A Pending JPS62194544A (en) 1986-02-20 1986-02-20 Instruction pre-read control system

Country Status (1)

Country Link
JP (1) JPS62194544A (en)

Citations (3)

* 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
JPS57114949A (en) * 1981-01-05 1982-07-17 Nec Corp Data processor
JPS58166452A (en) * 1982-03-26 1983-10-01 Toshiba Corp Data processor

Patent Citations (3)

* 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
JPS57114949A (en) * 1981-01-05 1982-07-17 Nec Corp Data processor
JPS58166452A (en) * 1982-03-26 1983-10-01 Toshiba Corp Data processor

Similar Documents

Publication Publication Date Title
JP2773471B2 (en) Information processing device
EP0166431A2 (en) An information processing apparatus having an instruction prefetch circuit
JPH10124312A (en) Central processor
JPS62194544A (en) Instruction pre-read control system
JPS63163929A (en) Microprocessor
JPH0646382B2 (en) Prefetch queue control method
JPS61250754A (en) Simple cache memory
JP2597744B2 (en) Branch control method
JPH0721018A (en) Central processing unit for microprogram control system
JPH0241770B2 (en)
JPH0795288B2 (en) Microcomputer
JPS62245439A (en) Symbolic processing system and method
JP2835179B2 (en) Parallel processing computer
JPS63206834A (en) Error detection processing method in command control
JPH11203136A (en) Information processor and storage medium
JPH0424731B2 (en)
JPH03164945A (en) Data processor
JPH0471028A (en) Microprocessor
JPS6395539A (en) Pipeline processing system
JPH02195433A (en) Central processor
JPH02173825A (en) Branch controller
JPH01193943A (en) Micro computer
JPH0895784A (en) Processor and method for arithmetic processing
JPH024011B2 (en)
JPS6191725A (en) Address match control method