JPS6125168B2 - - Google Patents

Info

Publication number
JPS6125168B2
JPS6125168B2 JP56099326A JP9932681A JPS6125168B2 JP S6125168 B2 JPS6125168 B2 JP S6125168B2 JP 56099326 A JP56099326 A JP 56099326A JP 9932681 A JP9932681 A JP 9932681A JP S6125168 B2 JPS6125168 B2 JP S6125168B2
Authority
JP
Japan
Prior art keywords
instruction
prefetch control
storage device
contents
signal
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
Application number
JP56099326A
Other languages
Japanese (ja)
Other versions
JPS581247A (en
Inventor
Mitsuaki Fujita
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP9932681A priority Critical patent/JPS581247A/en
Publication of JPS581247A publication Critical patent/JPS581247A/en
Publication of JPS6125168B2 publication Critical patent/JPS6125168B2/ja
Granted 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

Landscapes

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

Description

【発明の詳細な説明】 この発明は中央処理装置の命令先取り制御方法
に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an instruction prefetch control method for a central processing unit.

従来この種の装置として第1図に示すものがあ
つた。図において1は演算制御部、2は命令バツ
フア記憶装置、3は主記憶装置、4は命令先取り
制御回路、5は命令バツフア記憶装置へアドレス
するアドレスカウンタである。
A conventional device of this type is shown in FIG. In the figure, 1 is an arithmetic control unit, 2 is an instruction buffer storage device, 3 is a main storage device, 4 is an instruction prefetch control circuit, and 5 is an address counter for addressing the instruction buffer storage device.

また6は命令先取り制御信号、7はメモリアド
レス信号、8はデータ要求信号、9はレデイ信号
を表わし10はデータラインである。
Further, 6 represents an instruction prefetch control signal, 7 a memory address signal, 8 a data request signal, 9 a ready signal, and 10 a data line.

次に動作について説明する。演算制御部1にお
いて、プログラムの実行開始時、または分岐命令
が実行された時に、命令先取り制御信号6を命令
先取り制御回路4とアドレスカウンンタ5に与え
る。次に命令先取り制御回路4へは演算制御部1
の中のプログラムカウンタ(図示せず)の内容が
入力されるので、この内容を開始番地としてその
番地から連続した番地に記憶されている主記憶装
置3の内容を読出すために、命令先取り制御回路
4はメモリアドレス信号7を数値1づつ変化させ
ながら、次々とデータ要求信号8を主記憶装置3
に与える。
Next, the operation will be explained. In the arithmetic control unit 1, an instruction prefetch control signal 6 is applied to an instruction prefetch control circuit 4 and an address counter 5 at the start of program execution or when a branch instruction is executed. Next, the arithmetic control unit 1 is sent to the instruction prefetch control circuit 4.
Since the contents of the program counter (not shown) in the main memory 3 are input, the instruction prefetch control is executed to read the contents of the main memory 3 stored in consecutive addresses starting from this contents as the starting address. The circuit 4 sequentially sends the data request signal 8 to the main memory 3 while changing the memory address signal 7 by 1.
give to

主記憶装置3においては、各データ要求信号8
に対し、メモリアドレス信号7で指定された番地
の内容を読出しデータライン10にのせると共
に、レデイ信号9を送出しデータライン10上の
信号を命令バツフア記憶装置2に書込み次の書込
みにそなえてアドレスカウンタ5の数値を1だけ
増加する。演算制御部1は命令バツフア記憶装置
2から1つづつ命令を読出して逐次実行する。命
令先取り制御回路4は命令バツフア記憶装置2の
中に空いている部分がある限り、次々とデータ要
求信号8を主記憶装置3に与える。
In the main storage device 3, each data request signal 8
In response, the contents of the address specified by the memory address signal 7 are read out and placed on the data line 10, and the ready signal 9 is sent out and the signal on the data line 10 is written into the command buffer storage device 2 in preparation for the next write. Increase the value of address counter 5 by 1. The arithmetic control unit 1 reads out instructions one by one from the instruction buffer storage device 2 and executes them one by one. The instruction prefetch control circuit 4 sequentially supplies the data request signal 8 to the main memory 3 as long as there is a free space in the instruction buffer memory 2.

主記憶装置3に対するアクセス時間よりも命令
バツフア記憶装置2へのアクセス時間は遥かに短
く、上述の動作により、演算制御部1は命令バツ
フア記憶装置にだけアクセスすればよいので、綜
合的に命令実行速度を向上することが可能とな
る。
The access time to the instruction buffer storage device 2 is much shorter than the access time to the main storage device 3, and due to the above-described operation, the arithmetic control unit 1 only needs to access the instruction buffer storage device, so that instructions can be executed comprehensively. It becomes possible to improve the speed.

ただし、上述の従来の方法では、分岐命令など
によりメモリアドレスの値が不連続に変化する場
合は不便である。第2図は第1図の演算制御部1
において実行されるプログラムステツプの流れを
示す流れ図であつて111〜117及び201〜
203は各ステツプを示し(N−3)〜(N+
3)、(M)〜(M+2)は各ステツプの命令が記
憶されているメモリアドレスの数値を示す。N番
地の命令が読出されてステツプ114の判定が行
われ次に(N+1)番地の命令を読出すかM番地
の命令を読出すかが決定される。すなわちN番地
の命令は条件付き分岐命令である。このような命
令がある場合、従来の方法では、(N+1)番地
以降の命令先取りを全く停止するか、又は(N+
1)番地以降の命令先取りは行うが、番地Mへ分
岐することが決定された時点で、既に出されてい
る(N+1)番地以降に対するデータ要求を無効
とした後、M番地以降の命令先取りを開始しなけ
ればならぬ。
However, the conventional method described above is inconvenient when the value of a memory address changes discontinuously due to a branch instruction or the like. Figure 2 shows the arithmetic control section 1 in Figure 1.
111-117 and 201-1 are flowcharts showing the flow of program steps executed in
203 indicates each step (N-3) to (N+
3), (M) to (M+2) indicate the numerical value of the memory address where the instruction of each step is stored. The instruction at address N is read out and a determination is made in step 114 to determine whether the instruction at address (N+1) or the instruction at address M is to be read next. That is, the instruction at address N is a conditional branch instruction. If there is such an instruction, the conventional method is to either stop prefetching the instructions after address (N+1) or
1) Prefetching instructions from address onwards is performed, but at the time it is decided to branch to address M, data requests for addresses from address (N+1) onwards that have already been issued are invalidated, and then instructions from address M onwards are prefetched. Must start.

従来の命令先取り制御方法は以上のように行わ
れるので、条件付き分岐命令に対して、命令の先
取り制御を停止する方法をとれば制御は簡単であ
るが、条件によつて分岐しなかつた場合にも、あ
らためて命令の先取り制御を開始しなければなら
ぬので、命令実行速度が低下するという欠点があ
り、また命令の先取り制御を停止しない方法をと
れば、既に出されているデータ要求の無効化を制
御するための回路が一般に極めて複雑になるとい
う欠点がある。
Conventional instruction prefetch control methods are performed as described above, so if you use a method that stops instruction prefetch control for conditional branch instructions, control is simple, but if the condition does not cause the branch However, since it is necessary to start instruction prefetch control again, the instruction execution speed decreases, and if a method that does not stop instruction prefetch control is used, data requests that have already been issued may be invalidated. The disadvantage is that the circuitry for controlling the conversion is generally quite complex.

この発明は上記のような従来のものの欠点を除
去するためになされたもので、命令先取り制御信
号を送出する際、制御コードを付加することによ
つて、条件付き分岐命令に対して先取り制御を停
止する必要がなく、また分岐する場合にも既に送
出されているデータ要求を無効化する必要もな
い、命令先取り制御方法を提供することを目的と
している。
This invention was made in order to eliminate the drawbacks of the conventional ones as described above, and it is possible to perform preemption control for conditional branch instructions by adding a control code when sending an instruction prefetch control signal. It is an object of the present invention to provide an instruction prefetch control method that does not require stopping or invalidating already sent data requests when branching.

以下、この発明の一実施例を図について説明す
る。第3図はこの発明の一実施例を示すブロツク
図で、第1図と同一符号は同一又は相当部分を示
し同様に動作するので重複した説明は省略する。
第3図において11は先取り制御コードカウン
タ、12は先取り制御コードバツフア記憶装置、
13は比較回路、14はアンド回路であり、15
は書込み制御信号を示す。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 3 is a block diagram showing an embodiment of the present invention, and the same reference numerals as in FIG. 1 indicate the same or corresponding parts and operate in the same manner, so redundant explanation will be omitted.
In FIG. 3, 11 is a prefetch control code counter, 12 is a prefetch control code buffer storage device,
13 is a comparison circuit, 14 is an AND circuit, and 15
indicates a write control signal.

第3図に示す実施例では、先取り制御コードカ
ウンタ11には初期化によつて所定の初期値(た
とえば零)が設定され、命令先取り制御信号6ご
とにその内容が1づつ増加するものとする。演算
制御回路1は分岐などによつてメモリアドレスの
値が不連続に変化するごとに命令先取り制御信号
6を送出する。この信号により命令先取り制御回
路4は、第1図の場合と同じく、新しく設定され
たメモリアドレスによつて命令の先取り制御を開
始するが、その時、命令先取り制御信号6によつ
て更新された先取り制御コードカウンタ11の内
容を主記憶装置3内の先取り制御コードバツフア
記憶装置12に格納する。
In the embodiment shown in FIG. 3, the prefetch control code counter 11 is initialized to a predetermined initial value (for example, zero), and its contents are incremented by 1 for each instruction prefetch control signal 6. . The arithmetic control circuit 1 sends out an instruction prefetch control signal 6 every time the value of a memory address changes discontinuously due to branching or the like. In response to this signal, the instruction prefetch control circuit 4 starts prefetch control of the instruction based on the newly set memory address, as in the case of FIG. The contents of the control code counter 11 are stored in the prefetch control code buffer storage device 12 in the main storage device 3.

主記憶装置3では各データ要求信号8に対する
情報を読出してデータライン10に送出し、同時
にレデイ信号9を送出すると共に、その情報に対
するデータ要求信号8を受取つた時点の先取り制
御コードバツフア記憶装置12の内容を送出す
る。この内容と先取り制御コードカウンタ11の
内容とが比較回路13で比較され両内容が一致し
たときだけアンド回路14がレデイ信号9を書込
み制御信号15として出力しデータライン10上
の信号を命令バツフア記憶装置2に書込み、また
次の書込みのためアドレスカウンタ5の内容を数
値1だけ増加させる。
The main memory device 3 reads the information corresponding to each data request signal 8 and sends it to the data line 10, and at the same time sends out the ready signal 9, and stores the prefetch control code buffer storage device 12 at the time when the data request signal 8 for that information is received. Send the contents. This content and the content of the prefetch control code counter 11 are compared by the comparison circuit 13, and only when the two content match, the AND circuit 14 outputs the ready signal 9 as the write control signal 15 and stores the signal on the data line 10 in the command buffer. The data is written to the device 2, and the contents of the address counter 5 are incremented by 1 for the next write.

第2図に示すプログラムの流れを第3図の回路
により処理する場合を考えてみる。第2図ステツ
プ113の命令が演算制御部1で実施されている
時点で先取り制御コードカウンタ11の内容はX
であるとし、主記憶装置3へは(N+3)番地ま
でのデータ要求信号が与えられているとする。N
番地の命令が演算制御部1の命令レジスタ(図示
せず)に入力されステツプ114が実行され分岐
が決定されると、命令先取り制御信号6が送出さ
れ、先取り制御コードカウンタ11の内容はX+
1に更新され、以降のデータ要求の先取り制御コ
ードとして用いられる。プログラムステツプが1
14から201へ分岐した後、M番地以降の命令
の先取り制御が開始されるが、その時点で主記憶
装置3からは分岐決定以前に出されていたデータ
要求に対する情報がデータライン10上に出力さ
れることがある。しかしながら、これらの情報は
すべて先取り制御コードXを有しており、先取り
制御コードカウンタ11の内容はすでに更新され
てX+1になつているため、比較回路13から一
致信号が生成されないので、命令バツフア記憶装
置2への書込み制御信号15は発生しない。先取
り制御コードX+1を有するM番地以降の命令だ
けが命令バツフア記憶装置2に格納されることに
なる。
Consider a case where the program flow shown in FIG. 2 is processed by the circuit shown in FIG. 3. At the time when the instruction in step 113 in FIG.
Assume that the main memory device 3 is given a data request signal up to address (N+3). N
When the instruction at the address is input to the instruction register (not shown) of the arithmetic control unit 1, step 114 is executed, and a branch is determined, the instruction prefetch control signal 6 is sent, and the contents of the prefetch control code counter 11 are
It is updated to 1 and used as a preemption control code for subsequent data requests. Program step is 1
After branching from 14 to 201, prefetch control for instructions from address M onwards is started, but at that point, the main memory 3 outputs information for the data request that was issued before the branch was decided on the data line 10. It may be done. However, all of this information has a prefetch control code No write control signal 15 to device 2 is generated. Only the instructions from address M onwards having the prefetch control code X+1 will be stored in the instruction buffer storage device 2.

したがつて上述のような制御方法によれば、命
令によつて先取り制御を停止させる必要はなく、
またすでに出されているデータ要求の無効化処理
も不要であるため、命令の先取り制御回路全体を
簡単に構成できる。但し、命令先取り制御信号が
送出された時点において命令バツフア記憶装置2
内に残つている命令の無効化処理を行わなければ
ならない。この無効化処理は、第3図に示すよう
に、命令先取り制御信号6を用いてアドレスカウ
ンタ5をリセツトすることにより簡単に実行する
ことができ、このリセツト時点で命令バツフア記
憶装置2内に残つている命令は読出されない前
に、そのアドレス位置に新しく書込まれる命令に
よつて消去されてゆく。
Therefore, according to the control method described above, there is no need to stop the preemptive control by a command.
Furthermore, since there is no need to invalidate data requests that have already been issued, the entire instruction prefetch control circuit can be configured easily. However, at the time when the instruction prefetch control signal is sent, the instruction buffer storage device 2
It is necessary to invalidate the instructions remaining in the file. This invalidation process can be easily executed by resetting the address counter 5 using the instruction prefetch control signal 6, as shown in FIG. Before an existing instruction is read out, it is erased by a new instruction written to that address location.

なお、上記実施例では先取り制御コードをカウ
ンタ11で生成しているが、カウンタ11を用い
るかわりに簡単なレジスタを設け、演算制御部1
から分岐前と分岐後の識別をつけるためのコード
をレジスタに入力することにしてもよい。
In the above embodiment, the prefetch control code is generated by the counter 11, but instead of using the counter 11, a simple register is provided, and the arithmetic control section 1
A code for identifying before and after a branch may be input into the register.

以上のように、この発明によれば、分岐前と分
岐後とを識別するために先取り制御コードを導入
したので、命令先取り制御回路の構成を簡単化
し、命令の実行速度の向上をはかることができ
る。
As described above, according to the present invention, since a prefetch control code is introduced to distinguish before and after a branch, it is possible to simplify the configuration of the instruction prefetch control circuit and improve the instruction execution speed. can.

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

第1図は従来の装置の一例を示すブロツク図、
第2図は実行されるプログラムステツプの一例を
示す流れ図、第3図はこの発明の一実施例を示す
ブロツク図である。 1……演算制御部、2……命令バツフア記憶装
置、3……主記憶装置、4……命令先取り制御回
路、6……命令先取り制御信号、7……メモリア
ドレス信号、8……データ要求信号、9……レデ
イ信号、10……データライン、11……先取り
制御コードカウンタ、12……先取り制御コード
バツフア記憶装置、13……比較回路、15……
書込み制御信号。なお、図中同一符号は同一又は
相当部分を示す。
FIG. 1 is a block diagram showing an example of a conventional device.
FIG. 2 is a flow diagram illustrating one example of program steps that are executed, and FIG. 3 is a block diagram illustrating one embodiment of the present invention. DESCRIPTION OF SYMBOLS 1...Arithmetic control unit, 2...Instruction buffer storage device, 3...Main storage device, 4...Instruction prefetch control circuit, 6...Instruction prefetch control signal, 7...Memory address signal, 8...Data request Signal, 9...Ready signal, 10...Data line, 11...Preemption control code counter, 12...Preemption control code buffer storage device, 13...Comparison circuit, 15...
Write control signal. Note that the same reference numerals in the figures indicate the same or equivalent parts.

Claims (1)

【特許請求の範囲】 1 主記憶装置と演算制御部との間に命令バツフ
ア記憶装置を設け上記主記憶装置に記憶されてい
る命令のうちから先取りした命令を上記命令バツ
フア記憶装置に格納しておく場合の命令先取り制
御方法において、 上記演算制御回路では、分岐などによつてメモ
リアドレスの値が不連続に変化するごとに、命令
先取り制御信号を送出する段階と、 上記命令先取り制御信号によつて上記命令バツ
フア記憶装置内に格納されている命令を無効化す
る段階と、 上記命令先取り制御信号によつて先取り制御コ
ードカウンタの内容を変更する段階と、 上記命令先取り制御信号を受信した命令先取り
制御回路は新しいアドレス値からの命令先取り制
御を開始しその開始の時点における上記先取り制
御コードカウンタの内容を上記主記憶装置へ送出
する段階と、 上記命令先取り制御回路から送出された上記先
取り制御コードカウンタの内容を上記主記憶装置
内の先取り制御コードバツフア記憶装置に記憶す
る段階と、 上記主記憶装置では、上記命令先取り制御回路
からのデータ要求信号に応じメモリアドレス信号
によつて指定された番地の内容をデータライン上
に読出し、レデイ信号と、当該データ要求信号が
送出された時点における上記先取り制御コードバ
ツフア記憶装置の内容とを出力する段階と、 上記主記憶装置から出力された上記先取り制御
コードバツフア記憶装置の内容と上記先取り制御
コードカウンタの内容とが合致したときだけ上記
レデイ信号により上記データライン上のデータを
上記命令バツフア記憶装置に書込む段階とを備え
たことを特徴とする命令先取り制御方法。
[Scope of Claims] 1. An instruction buffer storage device is provided between the main storage device and the arithmetic control unit, and instructions prefetched from among the instructions stored in the main storage device are stored in the instruction buffer storage device. In the instruction prefetch control method in which the instruction prefetch control signal is used, the arithmetic control circuit includes a step of transmitting an instruction prefetch control signal every time the value of a memory address changes discontinuously due to a branch, etc.; a step of invalidating the instruction stored in the instruction buffer storage device; a step of changing the contents of a prefetch control code counter in accordance with the instruction prefetch control signal; and a step of prefetching the instruction having received the instruction prefetch control signal. The control circuit starts instruction prefetch control from a new address value and sends the contents of the prefetch control code counter at the time of the start to the main storage device, and the prefetch control code sent from the instruction prefetch control circuit. storing the contents of the counter in a prefetch control code buffer storage device in the main memory; reading the contents onto a data line and outputting a ready signal and the contents of the prefetch control code buffer storage device at the time when the data request signal was sent; An instruction prefetch control method comprising the step of writing the data on the data line to the instruction buffer storage device using the ready signal only when the contents of the device and the contents of the prefetch control code counter match. .
JP9932681A 1981-06-26 1981-06-26 Cntrolling method for instruction advance-fetch Granted JPS581247A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9932681A JPS581247A (en) 1981-06-26 1981-06-26 Cntrolling method for instruction advance-fetch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9932681A JPS581247A (en) 1981-06-26 1981-06-26 Cntrolling method for instruction advance-fetch

Publications (2)

Publication Number Publication Date
JPS581247A JPS581247A (en) 1983-01-06
JPS6125168B2 true JPS6125168B2 (en) 1986-06-14

Family

ID=14244505

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9932681A Granted JPS581247A (en) 1981-06-26 1981-06-26 Cntrolling method for instruction advance-fetch

Country Status (1)

Country Link
JP (1) JPS581247A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6047801A (en) * 1983-08-25 1985-03-15 Toshiba Corp Turbine control device
US4775927A (en) * 1984-10-31 1988-10-04 International Business Machines Corporation Processor including fetch operation for branch instruction with control tag
JPS61165145A (en) * 1984-12-24 1986-07-25 Fujitsu Ltd Access request cancellation controlling system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5582357A (en) * 1978-12-15 1980-06-21 Nec Corp Information processing unit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5582357A (en) * 1978-12-15 1980-06-21 Nec Corp Information processing unit

Also Published As

Publication number Publication date
JPS581247A (en) 1983-01-06

Similar Documents

Publication Publication Date Title
US4777588A (en) General-purpose register file optimized for intraprocedural register allocation, procedure calls, and multitasking performance
JPS63503177A (en) Command preemption control device
US4758949A (en) Information processing apparatus
US4985826A (en) Method and device to execute two instruction sequences in an order determined in advance
JPS6125168B2 (en)
IE61306B1 (en) Method and device to execute two instruction sequences in an order determined in advance
KR860007590A (en) Buffer Memory Control System
JPS6232508B2 (en)
JPS6032220B2 (en) information processing equipment
JP3130798B2 (en) Bus transfer device
JPS6148741B2 (en)
JPS595496A (en) Memory protect system
JPS5922314B2 (en) Storage device writing method
JP2902847B2 (en) Self-modifying code execution method
JPH0447350A (en) Main storage read/response control
JPS6391756A (en) Partial write instruction processing system for storage device
JPS6047616B2 (en) information processing equipment
KR880011658A (en) Information processing equipment
JPH0497459A (en) Cache coincidence processing system
JPH0526216B2 (en)
JPS6051736B2 (en) information processing equipment
JPS62127943A (en) Instruction buffer control system
JPH0136198B2 (en)
JPH0667982A (en) Address conversion system
JPS6036614B2 (en) information processing equipment