JPH036734A - Instruction fetching system - Google Patents
Instruction fetching systemInfo
- Publication number
- JPH036734A JPH036734A JP14356389A JP14356389A JPH036734A JP H036734 A JPH036734 A JP H036734A JP 14356389 A JP14356389 A JP 14356389A JP 14356389 A JP14356389 A JP 14356389A JP H036734 A JPH036734 A JP H036734A
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- address
- operation pattern
- fetching
- fetch
- 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
Links
- 238000000034 method Methods 0.000 claims abstract description 13
- 230000008859 change Effects 0.000 claims abstract description 8
- 230000006870 function Effects 0.000 claims description 2
- 230000008569 process Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Landscapes
- Advance Control (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は命令フェッチ方式、特にプログラム制御によっ
て動作する情報処理のプロセッサが命令の先取りを行な
うための命令フェッチ方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an instruction fetch method, and particularly to an instruction fetch method for prefetching instructions by an information processing processor operating under program control.
従来、この種の命令フェッチ方式は、命令フェッチ部が
順次、次アドレスの論理命令をフェッチし、蓄積し、命
令実行部に供給している。命令実行部が判断命令等を実
行し、次に実行する命令のアドレスを変更する場合は、
命令実行部からの指示により、命令フェッチ部は蓄積し
ている命令群をクリアし、指示されたアドレスからフェ
ッチを始める方式となっている。Conventionally, in this type of instruction fetch method, an instruction fetch section sequentially fetches logical instructions at the next address, stores them, and supplies them to an instruction execution section. When the instruction execution unit executes a judgment instruction etc. and changes the address of the next instruction to be executed,
In response to an instruction from the instruction execution section, the instruction fetch section clears the stored instruction group and starts fetching from the specified address.
上述した従来の命令フェッチ方式は、順次、次アドレス
の命令を定形的にフェッチしているため、判断命令等を
実行して別のアドレスに実行を移す場合には、その時点
から命令のフェッチを始めるため、命令の先取り効果が
なくなり、処理能力の低下をまねくという欠点がある。The conventional instruction fetch method described above sequentially fetches the instructions at the next address in a fixed format, so when executing a judgment instruction etc. and moving execution to another address, it is necessary to fetch the instructions from that point. This has the drawback that the effect of preempting instructions is lost, leading to a decrease in processing performance.
一般に判断命令を実行した別のアドレスに実行を移るこ
とのある処理は、命令実行部ではそれまでの処理から、
例えば電話交換の発信処理において発呼から回転ダイヤ
ルと押釦ダイヤルとの受信が一つのプログラムで構成さ
れ、回転ダイヤルに対するものと押釦ダイヤルに対する
ものとが判断命令の時点で分岐する場合に、命令実行部
はそれまでの発信電話機の収容位置の入手処理等から、
何れをとるか、即ち移るか移らないかが判っており、し
かも分岐したそれぞれのプログラムの形が知られている
にも拘らず、上述のような先取りの効果を生かすことが
できないとい云う問題点を有している。In general, in a process that may move execution to another address where a judgment instruction has been executed, the instruction execution unit
For example, in the outgoing process of a telephone exchange, if the process from making a call to receiving a call to a rotary dial and a push button dial is configured in one program, and the process for the rotary dial and the process for the push button dial diverge at the time of a judgment command, the instruction execution unit From the previous process of obtaining the location of the calling phone, etc.
The problem of not being able to take advantage of the above-mentioned effect of preemption is that even though it is known which path to take, that is, whether to move or not, and the form of each branched program is known. have.
本発明の命令フェッチ方式は、命令の先取り機能を有す
るプロセッサにおいて、判断命令を含む一連のプログラ
ムとこのプログラムの判断命令等において別のアドレス
に実行を移すか否かを指定した動作パターンとを格納す
るメモリと、前記−連のプログラムの実行の前にそれま
での処理からこの一連のプログラムの動作パターンの種
別を判定する命令実行部と、この命令実行部が判定した
動作パターンの種別を受けて前記メモリからこの動作パ
ターンを読出し、前記メモリからフェッチした命令の実
行アドレスが変る可能性のある場合にはこの動作パター
ンに従って命令の格納および次のフェッチアドレスの変
更を行う命令フェッチ部と、この命令フェッチ部からの
命令を格納し、先入れ順に前記命令実行部に先出しする
キューとを有することにより構成される。The instruction fetch method of the present invention stores a series of programs including judgment instructions and an operation pattern specifying whether or not to move execution to another address in the judgment instructions of this program in a processor having an instruction prefetch function. an instruction execution unit that determines the type of operation pattern of the series of programs from the processing up to that point before execution of the series of programs; an instruction fetch unit that reads this operation pattern from the memory and stores the instruction and changes the next fetch address according to this operation pattern when there is a possibility that the execution address of the instruction fetched from the memory will change; It is configured by having a queue that stores instructions from the fetch section and outputs them to the instruction execution section in first-in order.
次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.
第1図は本発明の一実施例の構成図で、メモリ100は
プログラム、データおよび動作パターンを格納する記憶
装置、命令フェッチ部200はメモリ100から命令を
先取りする制御部、キュー300は命令フェッチ部20
0によりフェッチされた命令を順に格納するレジスタ、
命令実行部400はキュー300から命令を順に読出し
実行する部分である。また制御線401および情報線4
02は命令実行部400がそれまでの処理結果からこの
後に実行すべきプログラムのアドレスおよび動作パター
ンの種類を命令フェッチ部200に知らせる情報線であ
る。FIG. 1 is a block diagram of an embodiment of the present invention, in which a memory 100 is a storage device that stores programs, data, and operation patterns, an instruction fetch unit 200 is a control unit that preempts instructions from the memory 100, and a queue 300 is an instruction fetch unit. Part 20
a register that sequentially stores instructions fetched by 0;
The instruction execution section 400 is a section that sequentially reads and executes instructions from the queue 300. Also, the control line 401 and the information line 4
02 is an information line through which the instruction execution unit 400 notifies the instruction fetch unit 200 of the address and type of operation pattern of the program to be executed subsequently based on the processing results up to that point.
第2図および第3図はそれぞれ第1図の動作を説明する
ためのプログラムの一例およびこのプログラムのフェッ
チに用いられる2つの動作パターンAと動作パターンB
の内容を示している。以下第2図および第3図を参照し
て第1図の動作について説明を進めると、命令実行部4
00がそれまでの処理結果から、例えばこの先に実行す
べき第2図のプログラムとそのプログラムの動作パター
ンの種類である動作パターンAを知る。そこで命令実行
部400は制御部401および情報線402を介して命
令フェッチ部200に、命令1のアドレスと動作パター
ンAの種類とを知らせる。命令フェッチ部200はメモ
リ100から動作パターンAの内容を読出し記憶すると
ともに、命令1をフェッチする0次いで命令フェッチ部
200は命令1のオペランドを調べ、命令1が判断命令
またはジャンプ命令等の次のフェッチアドレスが変るこ
とのない命令であることを知り、命令1をキュー300
に格納して次の命令2をフェッチする0次で命令フェッ
チ部200は命令2を調べて、この命令が判断命令であ
ることから、既に格納されている動作パターンAのチエ
ツクを行なう、動作パターンは判断命令の出現層に分岐
すべきか次のアドレスを選ぶべきかが“1”。FIGS. 2 and 3 show an example of a program for explaining the operation shown in FIG. 1, and two operation patterns A and B used for fetching this program, respectively.
It shows the contents of. The operation of FIG. 1 will be explained below with reference to FIGS. 2 and 3.
From the processing results up to that point, 00 knows, for example, the program shown in FIG. 2 to be executed next and the operation pattern A, which is the type of operation pattern of that program. Therefore, the instruction execution unit 400 notifies the instruction fetch unit 200 of the address of the instruction 1 and the type of operation pattern A via the control unit 401 and the information line 402. The instruction fetch unit 200 reads and stores the contents of the operation pattern A from the memory 100, and also fetches the instruction 1. Next, the instruction fetch unit 200 examines the operand of the instruction 1, and determines whether the instruction 1 is the next instruction such as a judgment instruction or a jump instruction. Knowing that the fetch address does not change, instruction 1 is placed in the queue 300.
At the 0th order, the instruction fetch unit 200 checks instruction 2 and, since this instruction is a judgment instruction, checks the already stored operation pattern A. "1" indicates whether to branch to the layer where the judgment instruction appears or to select the next address.
“0″で示されているので、動作パターンAの第1ビツ
ト目が“1”であることから命令フェッチ部200は命
令2に示されている分岐アドレスにより命令6をフェッ
チする。なおこのとき命令2はキュー300に格納する
必要はなく、フェッチした命令6は次にフェッチするア
ドレスが変る命令ではないのでそのままキュー300に
格納する0次いで命令7をフェッチするが、この命令は
アドレスが変る可能性があるので再び動作パターンAを
チエツクし、第2ビツト目が“0”であることから、命
令7はそのままキュー300に格納する。なお命令7の
ような命令はプログラムによる演算の後で次のアドレス
が決定する場合で、フェッチのやり直しがあっても止む
を得ない、命令フェッチ部200は命令7をキュー30
0に格納すると、次の命令8をフェッチするがこの命令
も次のフェッチにアドレスが変わらないので、そのまま
キュー300に格納する0次に命令9をフェッチすると
次のフェッチアドレスが変る命令であるので、動作パタ
ーンAのチエツクを行ない3ビツト目が“1パであるの
で、命令2の場合と同様にキュー300には格納せず、
命令9に指定されているアドレス命令5をフェッチしキ
ュー300に格納する、この結果、命令実行部400は
キュー300に格納された命令1,6.7,8.5を実
行することになる。Since the first bit of operation pattern A is "1", the instruction fetch unit 200 fetches instruction 6 using the branch address indicated in instruction 2. Note that at this time, instruction 2 does not need to be stored in the queue 300, and since the fetched instruction 6 is not an instruction that changes the address to be fetched next, it is stored in the queue 300 as it is.Next, instruction 7 is fetched, but this instruction does not change the address Since there is a possibility that the command will change, operation pattern A is checked again, and since the second bit is "0", instruction 7 is stored in the queue 300 as is. Note that for an instruction such as instruction 7, the next address is determined after the calculation by the program, and it is unavoidable that the fetch must be re-fetched.
If it is stored in 0, the next instruction 8 will be fetched, but the address of this instruction will not change in the next fetch, so it will be stored in the queue 300.0 If instruction 9 is fetched next, the next fetch address will change. , the operation pattern A is checked and the third bit is "1 pass", so it is not stored in the queue 300 as in the case of instruction 2,
Address instruction 5 specified by instruction 9 is fetched and stored in queue 300. As a result, instruction execution unit 400 executes instructions 1, 6.7, and 8.5 stored in queue 300.
なお第3図の動作パターンBは、命令実行部400がそ
れまでの処理結果から、第2図のプログラムにおいて命
令2の次の命令のアドレスが分岐しない処理をする場合
に用いられる。Note that operation pattern B in FIG. 3 is used when the instruction execution unit 400 performs processing in which the address of the next instruction after instruction 2 does not branch in the program in FIG. 2 based on the processing results up to that point.
以上説明したように本発明は、動作パターンに従かい次
のフェッチアドレスから変更されることのない命令を先
取りすることができ、処理能力を向上することができる
効果がある。As described above, the present invention has the effect of being able to prefetch an instruction that will not be changed from the next fetch address according to the operation pattern, and improving processing performance.
第1図は本発明の一実施例の構成図、第2図および第3
図は第1図の動作を説明するためのプログラムおよび動
作パターンの一例を示す図である。
100・・・メモリ、200・・・命令フェッチ部、3
00・・・キュー 400・・・命令実行部。FIG. 1 is a block diagram of one embodiment of the present invention, FIG. 2 and FIG.
The figure is a diagram showing an example of a program and an operation pattern for explaining the operation of FIG. 1. 100...Memory, 200...Instruction fetch unit, 3
00...Queue 400...Instruction execution unit.
Claims (1)
令を含む一連のプログラムとこのプログラムの判断命令
等において別のアドレスに実行を移すか否かを指定した
動作パターンとを格納するメモリと、前記一連のプログ
ラムの実行の前にそれまでの処理からこの一連のプログ
ラムの動作パターンの種別を判定する命令実行部と、こ
の命令実行部が判定した動作パターンの種別を受けて前
記メモリからこの動作パターンを読出し、前記メモリか
らフェッチした命令の実行アドレスが変る可能性のある
場合にはこの動作パターンに従って命令の格納および次
のフェッチアドレスの変更を行う命令フェッチ部と、こ
の命令フェッチ部からの命令を格納し、先入れ順に前記
命令実行部に先出しするキューとを有することを特徴と
する命令フェッチ方式。In a processor having an instruction prefetch function, a memory for storing a series of programs including a judgment instruction and an operation pattern specifying whether or not to move execution to another address in the judgment instructions of this program, and the series of programs. an instruction execution unit that determines the type of operation pattern of this series of programs from the processing up to that point before execution; and upon receiving the type of operation pattern determined by the instruction execution unit, reads this operation pattern from the memory; an instruction fetch section that stores the instruction and changes the next fetch address according to this operation pattern when there is a possibility that the execution address of the instruction fetched from the memory may change; and an instruction fetch section that stores the instruction from the instruction fetch section; An instruction fetch method comprising: a queue that is first output to the instruction execution unit in the order of first input.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP14356389A JPH036734A (en) | 1989-06-05 | 1989-06-05 | Instruction fetching system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP14356389A JPH036734A (en) | 1989-06-05 | 1989-06-05 | Instruction fetching system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH036734A true JPH036734A (en) | 1991-01-14 |
Family
ID=15341656
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP14356389A Pending JPH036734A (en) | 1989-06-05 | 1989-06-05 | Instruction fetching system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH036734A (en) |
-
1989
- 1989-06-05 JP JP14356389A patent/JPH036734A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100439286B1 (en) | A processing system, a processor, a computer readable memory and a compiler | |
| JPS62226232A (en) | Control system for branch instruction | |
| JP3768516B1 (en) | Multiprocessor system and program execution method in the system | |
| JPH036734A (en) | Instruction fetching system | |
| JP2000284964A (en) | Efficient sub-instruction emulation in a VLIW processor | |
| JPH0377137A (en) | Information processor | |
| KR100329780B1 (en) | Interrupt processing apparatus reducing interrupt response time | |
| JPS60263238A (en) | Information processor | |
| JP3493110B2 (en) | High-speed branch processing unit | |
| JPH01222329A (en) | System for executing program including condition branching instruction | |
| JPS6373335A (en) | Information processor | |
| JP2568308B2 (en) | Multitask execution device | |
| JPH04140851A (en) | Diagnostic system for information processor | |
| JPS63318634A (en) | Instruction prefetching system | |
| JPS60250438A (en) | Information processor | |
| JPS61208129A (en) | Control system for preread of instruction | |
| JPH04145531A (en) | Microprogram controller | |
| KR19990026795A (en) | Microprocessor | |
| JPH0259829A (en) | Microcomputer | |
| JPS63303432A (en) | System for controlling writing in branching history table | |
| JPH01175635A (en) | Data processor | |
| JPS6330938A (en) | Microprogram control device | |
| JPS63178335A (en) | Microprocessor | |
| JPS5971542A (en) | Arithmetic processor | |
| JPH02193228A (en) | information processing equipment |