JPS5822452A - Instruction pre-fetch control system - Google Patents

Instruction pre-fetch control system

Info

Publication number
JPS5822452A
JPS5822452A JP11919681A JP11919681A JPS5822452A JP S5822452 A JPS5822452 A JP S5822452A JP 11919681 A JP11919681 A JP 11919681A JP 11919681 A JP11919681 A JP 11919681A JP S5822452 A JPS5822452 A JP S5822452A
Authority
JP
Japan
Prior art keywords
instruction
operand
data
procedure
instructions
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.)
Granted
Application number
JP11919681A
Other languages
Japanese (ja)
Other versions
JPS6148737B2 (en
Inventor
Minoru Yokota
実 横田
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
Agency of Industrial Science and Technology
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 Agency of Industrial Science and Technology filed Critical Agency of Industrial Science and Technology
Priority to JP11919681A priority Critical patent/JPS5822452A/en
Publication of JPS5822452A publication Critical patent/JPS5822452A/en
Publication of JPS6148737B2 publication Critical patent/JPS6148737B2/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/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • G06F9/322Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
    • G06F9/325Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address for loops, e.g. loop detection or loop counter

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)
  • Executing Machine-Instructions (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To inform a data processor of pieces of information that indicate the starting of repetitive operation and the ending of a machine word instruction string constituting the procedure of the operation, and to easily grasp macro- information of this kind, by providing said indication information. CONSTITUTION:Instructions of a computer each consists of an instruction code part and an operand part, and the operand part contains a data attribute, and an array address and an index address for showing storage locations in a main storage device wherein data are stored, thus indicating the starting of repetition and the ending of machine word instructions. Those instructions are stored in the main storage device 5 of the computer and read out by an instruction fetch part 1 through a memory interface device 4 to form an internal format with fixed length to be handled internally and systematically, thereby storing it in a buffer memory 2 together with operand data. An instruction execution part 3 accesses the memory 2 on the basis of an address from an operand writing data bus 9 independently of a readout part 1 to read data out of the memory 2, thus grasping macrodata of the kind.

Description

【発明の詳細な説明】 本発明はデータ処理装置におけるループ処理の先取り方
式に関するものである。更に詳しく言えば、命令の取り
出しと実行とが各、並列/非同期に処理されるデータ処
理装置においてプログラムで指示される手続きの繰り返
し動作を高度に先取りしようとした場合に必要とされる
命令先取り制御方式に関テるものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a prefetching method for loop processing in a data processing device. More specifically, instruction preemption control is required when attempting to highly preempt repetitive operations of procedures instructed by a program in a data processing device where instruction fetching and execution are processed in parallel/asynchronously. It is related to the method.

通常の大型計算機においては、命令実行速度の一]速化
を図るために1命令の実行はいくつかのス、テップに分
散されて処理されるのが普通である。
In a normal large-scale computer, the execution of one instruction is normally divided into several steps in order to speed up the instruction execution speed.

各処理ステップは一般に結線論理回路で構成された専用
ハードウェアにより実行され、あるステップの処理結果
は1次のステップの入力となるように構成されている。
Each processing step is generally executed by dedicated hardware comprised of hard-wired logic circuits, and the processing result of one step is configured to serve as an input to the next step.

従って、1つの命令は順次、各処理ステップを経過して
処理されてゆく。一方、各処理ステップを構成している
八−ドウエア回路はl命令分の処理を完了した後、直ち
に次の命令の処理を開始丁・ることか可能であり、結果
として、分解したステップの数とほぼ同数の命令を同時
に処理できることになる。このような命令の処理方杯は
一般にパイプライン処理方式と呼ばれ、命令の取り出し
動作と、実行とが独立かつ並列に処理されるため、命令
実行に先立って、命令の先取り処理が効率良く行われる
Therefore, one instruction is processed sequentially through each processing step. On the other hand, after the eight-doware circuit that makes up each processing step completes processing for one instruction, it is possible to immediately start processing the next instruction, and as a result, the number of decomposed steps increases. This means that approximately the same number of instructions can be processed simultaneously. This method of processing instructions is generally called a pipeline processing method, in which instruction fetching and execution are processed independently and in parallel. be exposed.

しかしながら、このような従来の命令先取り処理方式で
はループ処理を効率良く先取りすることができない。詳
しく説明するために、ループ処理を実行する簡単なプロ
グラムを例に挙げて説明する。
However, such conventional instruction prefetch processing methods cannot efficiently prefetch loop processing. To explain in detail, a simple program that executes loop processing will be taken as an example.

第1図(、)はFORTRAN で記述された簡単なル
ープ処理プログラムの例で、配列Aの全要素をゼロ・ク
リアすると共に、配列Bの各要素を順次、lから100
までの整数を設定する初期化プログラムである。変数I
はDo文に含まれる手続きの繰り返し回数を制御する制
御変数であると同時に、手続き内で参照される通常の変
数でもある。第1図(b)は通常の汎用計算機において
181図(a)のプログラムを処理する場合の一般的な
処理手順を示した実行されることもある。しかしながら
、処理2の命令(列)を先取りしようとした場合、配列
要素人(I)の記憶位置は処理5の実行が完了しないと
求めることができないため、先取り処理が行えない。
Figure 1 (,) is an example of a simple loop processing program written in FORTRAN, which clears all elements of array A to zero and sequentially clears each element of array B from l to 100.
This is an initialization program that sets integers up to. variable I
is a control variable that controls the number of repetitions of the procedure included in the Do statement, and is also a normal variable referenced within the procedure. FIG. 1(b) shows a general processing procedure for processing the program shown in FIG. 181(a) on a general-purpose computer, which may be executed. However, if an attempt is made to prefetch the instruction (column) of process 2, the storage location of array element (I) cannot be determined until the execution of process 5 is completed, so the prefetch process cannot be performed.

このように、従来の命令先取り処理方式でループ処理を
効率良く扱えないのは、手続きの繰り返しを制御する制
御変数と通常の変数との区別がつけられないこと、及び
命令を先取りする機構の中に、該制御変数の値を更新す
る手段を持たないことに起因している。
As described above, the reason why conventional instruction prefetching processing methods cannot handle loop processing efficiently is that they cannot distinguish between control variables that control procedure repetition and normal variables, and that the mechanism for prefetching instructions is not able to handle loop processing efficiently. This is mainly due to the fact that there is no means to update the value of the control variable.

本発明の目的は、このような従来の命令先取り処理方式
の欠点を無くし、ループ処理を効率良く先取り可能とす
ることにある。
An object of the present invention is to eliminate the drawbacks of the conventional instruction prefetch processing method and to enable efficient prefetching of loop processing.

本発明によればプログラムの実行における命令の取り出
しを行う第1の処理部と、取り出した命令を実行するI
Jgの処理部とを含み、1つの命令1♂ ・の取り出しと実行とが互に独立に処理されるデータ処
理装置において任意の手続きを繰り返し実行せしめる場
合に、繰り返し動作の開始と該手続きを構成する機械語
命令列の終端を指示する情報とること−を識別する手段
と、該繰り返し動作を制御するために必要な制御情報な
一格納する手段と、取り出した命令の任意のオペランド
が該繰り返し動作の終了を制御するために用いられる制
御変数と同じものであることを識別する手段と、繰り返
される該手続きを構成する機械語命令列の終端を検出す
る手段と、該終端を検出した場合に該制御変数の値が該
繰り返し動作の終了条件を満足させるか否かの判定及び
該制御変数の更新を行う手段と覧設けることによって該
制御変数の読み出しと更られる。
According to the present invention, there is provided a first processing section that takes out an instruction in executing a program, and an I that executes the taken out instruction.
Jg processing unit, and in which the retrieval and execution of one instruction 1♂ are processed independently of each other, when an arbitrary procedure is repeatedly executed, the start of the repetitive operation and the configuration of the procedure means for storing information indicating the end of a sequence of machine language instructions to be executed; means for storing control information necessary to control the repetitive operation; means for identifying that the control variable is the same as the control variable used to control the termination of the procedure, means for detecting the end of the machine language instruction sequence constituting the repeated procedure, and means for detecting the end of the machine language instruction sequence that constitutes the repeated procedure; The reading of the control variable is performed by determining whether the value of the control variable satisfies the end condition of the repetitive operation and updating the control variable.

以下、本発明について実施例を用いて詳細に説明する。Hereinafter, the present invention will be explained in detail using Examples.

132図は本発明の詳細な説明したもので、従来の計算
機における命令の処理を大きく2つに分け、各々を命令
取出部と命令実行部と呼ぶこととし、図示しである。命
令取出部によって先取りされた命令は実行部に送られて
実行されるが、この命令の流れを命令ストリームとして
表現してあり、図において下端が実行すべき命令の先頭
を示している。本発明の要旨は、従来の命令先取り処理
カ式に、手続きの繰り返し動作と、繰り返しを制御す効
率の良い先取りが可能になるということである。
FIG. 132 is a detailed explanation of the present invention, in which instruction processing in a conventional computer is roughly divided into two parts, each of which is called an instruction fetch section and an instruction execution section. The instructions pre-fetched by the instruction fetching section are sent to the execution section and executed, and the flow of these instructions is expressed as an instruction stream, with the bottom end in the figure indicating the beginning of the instruction to be executed. The gist of the present invention is that it is possible to repeat the procedure and perform efficient prefetching to control the repetition in the manner of conventional instruction prefetch processing.

第1図(a)の例を用いて説明すれば、変数Iが制御変
数であることを命令取出部は認識しておりそれによって
Iを1から1()0まで順次1ずつ更新してゆくと共に
、100になった時点で、Do文の次の命令の取り出し
を開始することが可能である。更で保存している制御変
数Iと同じものであることを認識Tることによって、そ
の値を記憶装置から読み出すことなく保存している値で
代替することか可能である。従って、 A(I)、B(
I)の記憶位置は命令取出部で単独に決定することがで
き、IIAIIIA(b)で述べたように実行部での命
令実行結果を待ち合わせる必要が無い。代入文の右辺に
現われる変数■についても同様である。本発明の命令先
取り方式では、結果として第2図に示した命令ストリー
ムを命令取出部が実行部と独立に生成することが可能で
ある。
To explain using the example in Figure 1(a), the instruction fetching unit recognizes that the variable I is a control variable, and accordingly updates I one by one from 1 to 1()0. At the same time, when the number reaches 100, it is possible to start fetching the next instruction of the Do statement. By further recognizing that the control variable I is the same as the stored control variable I, it is possible to replace the value with the stored value without reading it from the storage device. Therefore, A(I), B(
The storage location of I) can be determined independently by the instruction fetch section, and there is no need to wait for the instruction execution result in the execution section as described in IIIAIIIA(b). The same applies to the variable ■ appearing on the right side of the assignment statement. In the instruction prefetching method of the present invention, as a result, the instruction fetch section can generate the instruction stream shown in FIG. 2 independently of the execution section.

第8図は本発明の一実施例である計算機の゛機械語命令
形式を説明したものである。
FIG. 8 illustrates a machine language instruction format for a computer according to an embodiment of the present invention.

゛て構成されている。オペランド部は更にデづの、11 一肩1性(データ・タイプ、配列等のデータ構造など)
とデータの格納されている主記憶装置上の記憶位Tオペ
ランド記述子と指標/添字を指すカベランド記述子によ
り構成されている。
It is composed of: The operand part is further divided into 11 characteristics (data type, data structure such as array, etc.)
, a memory location T on the main memory where data is stored, an operand descriptor, and a Coverand descriptor pointing to an index/subscript.

9J14図は本計算機のブロック図である。本実施例は
命令取出部11バツフア・メモリ2、命令実行部8、メ
モリ・インタフェース装置4、主記憶装置5、命令の内
部形式を命令取出部lからバッファメモリ2へ転送する
パス6、バッファ・メモリzから命令実行部8へ転送す
るパス7、命令取出部lが命令及びオペランド・データ
を主記憶装置5から読み出すためのパス8、命令実行部
8が主記憶装置5へ処理結果の書き込みを行うためのパ
ス9より構成される。
Figure 9J14 is a block diagram of this computer. This embodiment includes an instruction fetching section 11, a buffer memory 2, an instruction execution section 8, a memory interface device 4, a main storage device 5, a path 6 for transferring the internal format of an instruction from the instruction fetching section 1 to the buffer memory 2, a buffer A path 7 for transferring from memory z to the instruction execution unit 8, a path 8 for the instruction fetching unit l to read instructions and operand data from the main storage device 5, and a path 8 for the instruction execution unit 8 to write processing results to the main storage device 5. It consists of a path 9 to perform the process.

し、内部で統一的に扱うための固定長の内部形式を生成
し、パス6を介してバッファ・メモリ2に格納する。読
み出した命令がオペランド・データを必要とする場合に
は、更にメモリ・インタフニスし、命令が格納されてい
ればそれを取り出す。
Then, a fixed-length internal format for uniform handling is generated and stored in the buffer memory 2 via a path 6. If the read instruction requires operand data, memory interface is further performed, and if the instruction is stored, it is retrieved.

この時、バッファ・メモリ2が空であれば命令が格納さ
れるまで待ち合わせる。命令実行部8は、取り出した命
令の種類に応じて、更に、後続するオペランド・データ
もしくはオペランドの記憶位、′−一 ′sE、$報を示す内部形式をパス7を介してバッファ
・インタフェース装置4を介して主記憶装置5に書込ま
れる。例えば命令力i2つのオペランド・データ間での
演算を行い、その結果をある主記憶アドレスへ格納Tる
ことを指示するものであれば、命令実行部8は命令取出
部lよリバッファ・メモリ2及びパス6.7を介して命
令、第1オペランド・データ、gJ2オペランド・デー
タ、格納先主記憶アドレスの順に内部形式を受けとる。
At this time, if the buffer memory 2 is empty, it waits until the instruction is stored. Depending on the type of instruction taken out, the instruction execution unit 8 further sends an internal format indicating the following operand data or the storage location of the operand, '-1'sE, and $ information to the buffer interface device via the path 7. 4 to the main storage device 5. For example, if an instruction i instructs to perform an operation between two operand data and store the result in a certain main memory address, the instruction execution unit 8 will send an instruction from the instruction fetch unit l to the rebuffer memory 2 and The internal format is received in the order of instruction, first operand data, gJ2 operand data, and storage destination main memory address via path 6.7.

形式を生成する内部形式生成部104、生成した内部形
式を一時的に保存するディスクリブタ・レジスタA 1
05及びディスクリブタ・レジスタB 106、処理中
の命令の主記憶アドレスを保存する命令ア給するデータ
・レジスタ110、すべての演算及びデータ変換を実行
する演算論理部Ill 、作画用レジスタとして、また
ループ処理における制御変数の格納に用いるワーク−・
レジスターファイル112及び全体の制御を行うシーケ
ンス制御部118より構成される。
An internal format generation unit 104 that generates a format, and a descriptor register A1 that temporarily stores the generated internal format.
05 and a discriminator register B 106, an instruction supply data register 110 that stores the main memory address of the instruction being processed, an arithmetic logic section Ill that performs all operations and data conversion, and serves as a drawing register and as a loop. A workpiece used to store control variables in processing.
It is composed of a register file 112 and a sequence control section 118 that performs overall control.

以下に命令取出部の動作を詳細に説明する。The operation of the instruction fetching section will be explained in detail below.

命令はバッファ争アドレス・レジスタ101で指示され
る主記憶アドレスに従って9JII4図の主記憶装置5
よりパス8を介して読み出され命令バッファ・レジスタ
RU2に置かれる□。読み出された命令の命令コード部
は命令コード・レジスタ108に格納され、パス6を介
して第4図のバッフ、ア・メモ°9′″gに転送される
。命令のオペランド部は内部形ディスクリブタ・レジス
タA 105へ置かれる。ここで生成される内部形式は
、第8図に示したオペランド部のデータ属性と主記憶ア
ドレスとが、内部で扱い易いように固定長形式に整理さ
れたものである。本計算機の命令は、演算対象となるオ
ペランド・データを必要とするのが普通で、その場合、
ディスクリブタ・レジスタA 105に置かれたオペラ
ンドの主記憶アドレスをメモリ・アドレス・ルジスタ1
09に転送し、対応するオペランド・データの読み出し
を行う。読み出されたデータは一担、データ・レジスタ
110に格納された後前記ディスクリブタ・レジスタA
 105中のデータ属性に応じて演算論理部111で必
要なデータ変換を施されディスクリブタ・レジスタB 
106に送られる。
The instruction is sent to the main memory device 5 in FIG. 9JII4 according to the main memory address indicated by the buffer address register 101.
□ is read out via path 8 and placed in instruction buffer register RU2. The instruction code portion of the read instruction is stored in the instruction code register 108 and transferred to the buffer 9'''g in FIG. 4 via path 6. The operand portion of the instruction is stored in the internal format. The data is placed in the descriptor register A 105.The internal format generated here is such that the data attributes and main memory addresses of the operand part shown in Figure 8 are organized into a fixed length format for easy internal handling. The instructions of this computer usually require operand data to be operated on, and in that case,
The main memory address of the operand placed in the discriminator register A 105 is stored in the memory address register 1.
09, and the corresponding operand data is read. The read data is stored in the data register 110, and then transferred to the discriminator register A.
The arithmetic logic unit 111 performs necessary data conversion according to the data attributes in the discriminator register B.
106.

ディスクリブタ・レジスタB106の内容は、命令コー
ド・レジスタ108に格納された命令コード部と同様に
パス6を介して第4図のバッファ・メモリ2に転送され
る。ディスクリブタ・レジスタA1塑]に生成された内
部形式が・演算結果0移送先ような主記憶アドレスな表
わ丁オペランドに対応する場合には、オペランド・デー
タの読み出しは不要で、そのままディスクリブタ・レジ
スタBl()6に送られ、パス6を介してバッファ・メ
モリ2に転送される。
The contents of the discriminator register B 106, as well as the instruction code section stored in the instruction code register 108, are transferred to the buffer memory 2 of FIG. 4 via path 6. If the internal format generated in the disc libter register A1 corresponds to an operand that is a main memory address such as an operation result 0 transfer destination, there is no need to read the operand data and it can be directly transferred to the disc libter register. It is sent to register Bl() 6 and transferred to buffer memory 2 via path 6.

オペランドが配列要素に関するものである場合、第8図
に示したように、ディスクリブタ・レジスタ、ム105
に初めに生成されるものは配列の先頭を示す主記憶アド
レスを持った内部形式である。目iの配列要素の主記憶
アドレスを求めるためには機続の指標/添字データを用
いて該配列要素の配列先頭位置からの相対値を加算する
必要がある。
If the operand relates to an array element, the descriptor register 105, as shown in FIG.
The first thing created is an internal format with a main memory address indicating the beginning of the array. In order to obtain the main memory address of the i-th array element, it is necessary to add the relative value of the array element from the array head position using the index/subscript data of the sequence.

この処理を行うために、ディスクリブタ・レジスタム1
05の内容を一時的にワーク・レジスタ・ファイルIl
lに退避する。次に後!する指標/添字を示すオペラン
ド記述子を命令バッファ・レジスタ102より取り出し
、通常のオペランド・データの読み出しと同様の処理に
よりその値をデータ・レジスタ110に読み出す、最後
に、ワーク・レジスタ・ファイル112に格納してあっ
た配列先頭を示す内部形式の主記憶アドレスに、読み出
した指標/添字の値を加算し、目的とする配列要素の内
部形式としてディスクリブタ・レジスタB 106に格
納し、パス6を介してバッファ・メモリ2へ転送する。
In order to perform this process, the discriminator register 1
Temporarily save the contents of 05 to work register file Il.
Evacuate to l. Next up! The operand descriptor indicating the index/subscript to be read is retrieved from the instruction buffer register 102, and its value is read into the data register 110 using processing similar to reading normal operand data.Finally, the value is read into the work register file 112. Add the read index/subscript value to the stored main memory address in the internal format indicating the beginning of the array, store it in the descriptor register B 106 as the internal format of the target array element, and perform pass 6. The data is transferred to the buffer memory 2 via the buffer memory 2.

このようにして、命令コード部と、必要な数のオペラン
ド部の内部形式をバッファ・メモリzにのバッファ・メ
モリ2よりパス7を介して取り出される命令コード部を
格納する命令コード・レジスタ、オペランド部の内部形
式を格納するディスクリブタ・レジスタ、第4図の主記
憶装置5にメモリ・インタフェース装置4及びパス9を
介し演算結果な豊き込むためのメモリ・アドレス・レジ
スタ、データ・レジスタ、汎用ワーク・レジスタ・ファ
イル等(以上図示せず)から構成されている。
In this way, the internal format of the instruction code part and the necessary number of operand parts is transferred to the buffer memory z. a discriminator register for storing the internal format of the section, a memory address register for enriching the main memory 5 in FIG. It consists of work register files, etc. (not shown above).

最終的な命令実行を司る部分として、算術演算論連部等
の演算機能が強力になっているが1本発明要件には直接
関係しないので詳細は省略する。
As a part that controls final instruction execution, arithmetic functions such as an arithmetic operation logic section are powerful, but since they are not directly related to the requirements of the present invention, details will be omitted.

次に、1181図(a)のプログラム例が本計算機によ
って、どのように処理されるかを示すことにより命令取
出部1の動作を具体的に説明する。
Next, the operation of the instruction fetching section 1 will be specifically explained by showing how the program example shown in FIG. 1181 (a) is processed by this computer.

第6図は、!J1図(a)のプログラムを実行するだめ
の本計算機の機械語命令列を示したものである。
Figure 6 is! This figure shows the machine language instruction sequence of this computer for executing the program shown in Figure J1 (a).

DO命令は、本計算機に対し以下に続く命令列を繰り返
し実行することを指示する命令であり第1オペランド部
では繰り返しを制御する制御変数、第2オペランド部で
は制御変数の初期値、第8オ、へ つ、増加するものとされている。また、本プロゲラ−″
に−では、制御度数の初期値、終値が共に小さV・数で
あるため命令のオペランド部内に直接その値を持つ形式
として実現されている。
The DO instruction is an instruction that instructs this computer to repeatedly execute the instruction sequence that follows.The first operand part contains a control variable that controls the repetition, and the second operand part contains the initial value of the control variable and the eighth operand part. , and is expected to increase. In addition, this progera
In NI-, both the initial value and the final value of the control frequency are small V-numbers, so this is realized as a format in which the values are directly stored in the operand part of the instruction.

MOTH命令は本計算機に対し、データの移送を行うこ
とを指示する命令で、第1オペランド部では移送すべき
データを表わす変数、第2オペランド部では移送先の主
記憶位置を表わす変数を指示する。本プログラム例では
、データの移送先が配列要素であるため、第8図に示し
たように2つのオペランド記述子によって第2オペラン
ド部が表現されている。C0NT命令は本計算機に対し
DO命令によって繰り返される命令列の鰻後な指示す゛
未゛−御用命令であり、それ自身は何もしない彼令で狐
る。以下に命令取出部lの動作を詳しく説明す島。
The MOTH instruction is an instruction that instructs this computer to transfer data.The first operand section specifies a variable that represents the data to be transferred, and the second operand section specifies a variable that represents the main memory location of the transfer destination. . In this program example, since the data destination is an array element, the second operand portion is expressed by two operand descriptors as shown in FIG. The C0NT instruction is a general instruction that directs the computer to the sequence of instructions repeated by the DO instruction, and it is a command that does nothing by itself. The operation of the instruction fetching unit 1 will be explained in detail below.

命令取出部lでは、第5図の命令バッファ・レジスタ1
01に読み出した命令を命令解説器108により解説し
た結果Do命令であることを認識すると、第1オペラン
ド部で指示されるオペランド(I)の主記憶アドレスを
ワーク・レジスタ・ファイル112に格納し、その初期
値として第2オペランドイル11Bに格納する。
In the instruction fetching unit l, the instruction buffer register 1 shown in FIG.
As a result of explaining the instruction read in 01 by the instruction interpreter 108, it recognizes that it is a Do instruction, stores the main memory address of the operand (I) specified in the first operand part in the work register file 112, It is stored in the second operand oil 11B as its initial value.

更に、次の命令の主記憶アドレス(Ll)をDO文によ
って繰り返される命令列の先頭位置として、ワーク中レ
ジスターファイル112に格納する。D。
Further, the main memory address (Ll) of the next instruction is stored in the working register file 112 as the starting position of the instruction sequence repeated by the DO statement. D.

命令についての処理はこれで完了し命令実行部8へは何
も転送されない。次の命令は単なるデータ移送の命令で
あるが、命令中に含まれるオペランドの主記憶アドレス
がワーク・レジスタ・ファイうことにより実現される。
The processing for the command is now complete and nothing is transferred to the command execution unit 8. The next instruction is simply a data transfer instruction, but it is realized by writing the main memory address of the operand included in the instruction into a work register.

比較の結果一致した場合には、オペランド・データとし
てワーク・レジスタ・ファイル112に格納されている
値(1)がとられる。ここでは命令に含まれるオペラン
ドの主記憶アドレスのうち、第2オペランド部の添字I
のものがワーク・レジスターファイル112に格納され
ている制御変数(I)と一致するので、ワーク・レジス
タ・ファイル112に格納されている値(1)が添字の
値として用いられる。同様にして、次の命令でも、iJ
lオペランド部の変数Iと、第2オペランド部の添字I
の主記憶アドレスが格納されていに処理される。次に制
御命令であるC0NT命令が命令解読器108によって
識別されると命令取出部■は、DO文によって繰り返さ
れる命令列の終端に達したと判断し、DO文の繰り返し
終了条件をチェックする。制御変数の現在値(1)と終
値(100)ばブ戸り・レジスタ・ファイル112に格
納されて! いるのでこれを読み出し演算論理部111によって比較
する。この時、まだ結果は一致しないので制御変数の現
在値を1増やし再びワーク・レジスタ・ファイルIll
に格納する。その後ワーク・レジスタ・ファイル112
に格納されている、繰り返し手続きの先頭、記憶位W(
LL )から命令な続み高下ことにより手続きの繰り返
し実行が達成される。
If the comparison results in a match, the value (1) stored in the work register file 112 is taken as operand data. Here, the subscript I of the second operand part of the main memory address of the operand included in the instruction is
Since this matches the control variable (I) stored in the work register file 112, the value (1) stored in the work register file 112 is used as the subscript value. Similarly, in the next instruction, iJ
Variable I in the l operand part and subscript I in the second operand part
The main memory address of is stored and processed. Next, when the C0NT instruction, which is a control instruction, is identified by the instruction decoder 108, the instruction fetching unit (2) determines that the end of the instruction sequence repeated by the DO statement has been reached, and checks the repeat end condition of the DO statement. The current value (1) and final value (100) of the control variable are stored in the register file 112! Therefore, the read arithmetic logic section 111 compares these. At this time, the results do not match yet, so the current value of the control variable is increased by 1 and the work register file Ill is
Store in. Then the work register file 112
The beginning of the iterative procedure, stored in memory location W (
Repeated execution of the procedure is achieved by continuing the command from LL).

以上の処理を繰り返すことにより制御変数(I)の値は
やがて100に達する。この時、C0NT命令の処−に
おいて、制御変数の値はワーク・レジスタ・ファイル1
12に格納されている終値(100)と一致するので、
命令取出imlはC0NT命令の次の命令(記憶位[L
2)の読み出しを行うことにより手続きの繰り返しを終
了する。
By repeating the above process, the value of the control variable (I) eventually reaches 100. At this time, in the processing of the C0NT instruction, the value of the control variable is set to work register file 1.
Since it matches the closing price (100) stored in 12,
The instruction fetch iml is the instruction next to the C0NT instruction (memory location [L
The repetition of the procedure is completed by reading step 2).

以上の説明より、制御変数がDo文によって繰り返され
る手続きの中で通常の変数として利用される場合の処理
と、手続きの繰り返し及び繰り返し動作の終了の各処理
が命令実行部8の動作と無関係に命令先取部1だけで処
理できることが明らか可能である。
From the above explanation, the processing when a control variable is used as a normal variable in a procedure repeated by a Do statement, and the processing of repeating a procedure and ending a repeated operation are independent of the operation of the instruction execution unit 8. It is clearly possible that the instruction prefetch unit 1 alone can process this.

本実施例の計算機では、本発明請求範囲における繰り返
し動作の開始を指示する命令としてDOi令゛を、繰り
返し手続きの終端を指示する命令としてCON?命令を
設け、取り出した命令が該繰り返し動作の開始を指示す
る命令であることを識別する手段として命令解読器10
BによるDO命令の檎アを用い、繰り返し動作を制御す
るために必要な情報を格納する手段としてワーク・レジ
スタ・ファイル11″2を設け、取り出した命令の任意
のオペランドが該繰り返し動作の終了を制御する制御変
数であることを識別する手段としてディスクリブタ入レ
ジスタA 105とワーク・レジスタ・ファイル112
の内容を演算論理部111を用いて比較する方法を用い
、繰り返される手続きの終端を検出する手段として命令
解読器10BによるC0NT命令の検出を用い、該終端
を検出した場合に該制御変数の値が該繰り返し動作の終
了条件を満足させるか否かの判定手段として演算論理部
111によるワーク・レジスタ・ファイル112に格納
されている本実施例は本発明を説明するための一例にす
ぎず、本発明の特許請求4@曲を制限するものではない
。坤ち、本実施例におけるDO命令のような手続きの繰
り返し実行を指示する命令としては種々の形式が考えら
れ、オペランドとして複数の制御度数を持たせる形式、
1回の繰り返し動作に対する制御変数の増分、もしくは
減少分を指示するオ意のオペランドが、繰り返し動作の
終了を制限する制御変数であることな識別するために専
用の比較器を設けても良い。
In the computer of this embodiment, the DOi instruction is used as an instruction to start a repetitive operation within the scope of the present invention, and the CON? An instruction decoder 10 is used as means for providing an instruction and identifying that the retrieved instruction is an instruction for instructing the start of the repetitive operation.
Using the DO instruction by B, a work register file 11''2 is provided as a means of storing information necessary to control the repetitive operation, and any operand of the retrieved instruction indicates the end of the repetitive operation. As a means for identifying a control variable to be controlled, a discriminator input register A 105 and a work register file 112 are used.
, and the detection of the C0NT instruction by the instruction decoder 10B is used as a means of detecting the end of the repeated procedure, and when the end is detected, the value of the control variable is is stored in the work register file 112 by the arithmetic logic unit 111 as a means for determining whether or not the end condition of the repetitive operation is satisfied. Claim 4 of the invention does not limit the song. Various formats can be considered for the instruction to repeatedly execute a procedure such as the DO instruction in this embodiment, including a format that has multiple control degrees as operands,
A dedicated comparator may be provided to identify whether an intended operand indicating an increment or a decrease in a control variable for one repetitive operation is a control variable that limits the end of the repetitive operation.

以上の説明より明らかなように、本発明によって手続き
の繰り返し処理を効率良く先取りすることが可能である
As is clear from the above description, according to the present invention, it is possible to efficiently anticipate repeated processing of procedures.

本発明の説明のためには手続きの繰り返し処理としてF
ORTRANにおけるDO文を取り挙げたが、C0DO
Lにおける8N!!ARCH文、PBRFORM文等も
本発゛明における手続きの繰り返し処理に含まれる。
In order to explain the present invention, F is used as a repetitive process of the procedure.
We have discussed the DO statement in ORTRAN, but C0DO
8N in L! ! ARCH statements, PBRFORM statements, etc. are also included in the procedural repetition process in the present invention.

また5本実施例では比較的簡単なり0文による繰り返し
処理を扱ったが、実際のプログラムで使われるDO文は
複雑かつ多様である。 C0BOLにおけるaEARC
H文等の他プログラム言語における手続きQ繰り返し処
理では異なった制御情報が必要に4色。
Furthermore, although this embodiment deals with a relatively simple repetitive process using zero statements, the DO statements used in actual programs are complex and diverse. aEARC in COBOL
Procedures in other programming languages such as H statements Q Repetitive processing requires different control information 4 colors.

従って、手続きの繰り返しを制御するために保持してお
かなければならない情報量は、本実施例より増加し得る
が、本発明の要件を損うものではない。
Therefore, although the amount of information that must be maintained to control repetition of procedures may be greater than in this embodiment, this does not impair the requirements of the present invention.

本発明の応用としては機械語命令を高級なプログラミン
グ言語に近づけた計算機(鵠級見語マシン)への適用が
効果的である。本発明ではある手続きを繰り返ずという
、プログラム中に含まれるマクロ的な情報を有効に利用
しており、高級言語マシンのような、機械語のレベルが
高い場合に、このようなマクロ的情報を把握しやすい。
As an application of the present invention, it is effective to apply it to a computer in which machine language instructions are similar to those of a high-level programming language (a computer called a computer language machine). The present invention makes effective use of macro information included in a program by not repeating a certain procedure, and when the machine language level is high, such as a high-level language machine, such macro information is easy to understand.

半導体技術の進歩により、複雑なハードウェアが低コス
トで容易に構築可能になってきており、用計算機で処理
する場合の一般的な処理手順を示す図、第2図は本発明
の詳細な説明するための、命令取出部から命令実行部へ
の命令の流れを示す図、第8図は本発明の命令先取り制
御方式を採用した計算機の機械語命令の形式を説明する
図、第4図は本発明を用い実施した一例である計算機の
ブロック図、1g5図は本発明を用いた計算機の命令取
出部lを説明するための八−ドウエア構成図、第6図は
本発明によって第1図(a)のプログラムが効率良く先
取りできることを説明するための本発明を用いた計算機
における第1図(a)のプログラムのオブジェクト命令
列を示す図。
Advances in semiconductor technology have made it possible to easily construct complex hardware at low cost, and Figure 2 is a diagram showing a general processing procedure when processing on a computer. Figure 8 is a diagram illustrating the format of machine language instructions for a computer that employs the instruction prefetch control method of the present invention. FIG. 1g5 is a block diagram of a computer which is an example of a computer implemented using the present invention. FIG. FIG. 2 is a diagram showing an object instruction sequence of the program of FIG. 1(a) in a computer using the present invention for explaining that the program of FIG. 1(a) can be preempted efficiently;

図において1は命令取出部、2はバッファーメモリ、8
は命令実行部、4はメモリ・インタフェース装置、5は
主記憶装置、6は命令取出部1からバッファ・メモリ2
への命令の内部形式転送用データ・パス、7はバッファ
・メモリ2より命令実行部3への命令の内部形式転送用
データ・パス、8は命令もしくはオペランド・データ読
み出し用データ・パス、9はオペランド・データ書込み
用データ・パス、101はバッファ・アドレス・レジス
タ、10zは命令バッファ・レジスタ、108は命令解
読器、 104は内部形式生成部、105はディスクリ
ブタ・レジスタA% 1116はディスクリブタ・レジ
スタB、  107は命令アドレス・レジスタ、108
は命令コード・レジスタ、109はメモリ・アドレス・
レジスタ、110はデータ・レジスタ、Illは演算論
理部、112はワーク・レジスタ・ファイル、118は
シーケンス制御部である。
In the figure, 1 is an instruction fetching unit, 2 is a buffer memory, and 8
4 is an instruction execution unit, 4 is a memory interface device, 5 is a main storage device, and 6 is an instruction fetch unit 1 to a buffer memory 2.
7 is a data path for internal format transfer of instructions from the buffer memory 2 to the instruction execution unit 3; 8 is a data path for reading instructions or operand data; 9 is a data path for reading instructions or operand data; Data path for writing operand data, 101 is a buffer address register, 10z is an instruction buffer register, 108 is an instruction decoder, 104 is an internal format generator, 105 is a discrettor register A%, 1116 is a discrettor register Register B, 107 is an instruction address register, 108
is the instruction code register, and 109 is the memory address.
110 is a data register, Ill is an arithmetic logic unit, 112 is a work register file, and 118 is a sequence control unit.

局°許出門人  工′T:技術院長  石板域−賽 1
 図 (b) 乎 3 図 蝉 4 図
Bureau degree student Tech'T: Technical director Stone tablet area - Dice 1
Figure (b) 乎 3 fig. cicada 4 fig.

Claims (1)

【特許請求の範囲】[Claims] プロゲラ、ムの実行における命令の取り出しを行う第1
の処理部と、取り出した命令を実行する第2の処理部と
を含み、1つの分会の取り出しと実行とが互に独立に処
理されるデータ処理装置において任意の手続きを繰り返
し実行せしめる場合に、繰り返し動作の開始と該手続き
を構成する機械語命令列の終端を指示する情報とを該デ
ータ処理装置に通知せしめる機械語命令を設けると共に
、該第1の処理部内に、取り出した命令が該繰り返し動
作の開始を指示する命令であることを識別する′手段と
、該繰り返し動作を制御するために必要な制御情報を格
納する手段と、取り出した命令の任意のオペランドが該
繰り返し動作の終了を制御するために用いられる制御変
数と同じものであることを識別する手段と、繰り返され
る該手続きを構成する機械語命令列の終端を検出する手
段と、該終端を検出した場合に該制御変数の値が該繰り
返が繰り返し動作の対象となる該手続きの中で通常のオ
ペランドとして用いられた場合の先取りを可能としたこ
とを特徴とする命令先取り制御方式。
The first step is to retrieve instructions in the execution of the program.
When an arbitrary procedure is repeatedly executed in a data processing device that includes a processing unit and a second processing unit that executes the fetched instructions, and in which the fetching and execution of one branch are processed independently of each other, A machine language instruction is provided for notifying the data processing device of the start of a repeat operation and information indicating the end of a sequence of machine language instructions constituting the procedure, and the first processing section is provided with a machine language instruction that informs the data processor of the start of a repeat operation and information indicating the end of a sequence of machine language instructions constituting the procedure. means for identifying that the instruction is an instruction to start an operation, means for storing control information necessary to control the repetitive operation, and an arbitrary operand of the retrieved instruction to control the end of the repetitive operation. means for identifying that the control variable is the same as the control variable used to perform the procedure; means for detecting the end of the machine language instruction sequence that constitutes the repeated procedure; and means for identifying the value of the control variable when the end is detected. An instruction prefetch control system, characterized in that it is possible to prefetch when the repetition is used as a normal operand in the procedure that is the target of the repeated operation.
JP11919681A 1981-07-31 1981-07-31 Instruction pre-fetch control system Granted JPS5822452A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11919681A JPS5822452A (en) 1981-07-31 1981-07-31 Instruction pre-fetch control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11919681A JPS5822452A (en) 1981-07-31 1981-07-31 Instruction pre-fetch control system

Publications (2)

Publication Number Publication Date
JPS5822452A true JPS5822452A (en) 1983-02-09
JPS6148737B2 JPS6148737B2 (en) 1986-10-25

Family

ID=14755296

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11919681A Granted JPS5822452A (en) 1981-07-31 1981-07-31 Instruction pre-fetch control system

Country Status (1)

Country Link
JP (1) JPS5822452A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4658927A (en) * 1984-11-19 1987-04-21 Mazda Motor Corporation Steering system for vehicle

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0317864Y2 (en) * 1988-02-09 1991-04-16
JPH0245740U (en) * 1988-09-24 1990-03-29

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4658927A (en) * 1984-11-19 1987-04-21 Mazda Motor Corporation Steering system for vehicle

Also Published As

Publication number Publication date
JPS6148737B2 (en) 1986-10-25

Similar Documents

Publication Publication Date Title
US3949379A (en) Pipeline data processing apparatus with high speed slave store
US4587632A (en) Lookahead stack oriented computer
JPH01502700A (en) RISC type computer and method for processing unaligned references
JPH0429093B2 (en)
US4484272A (en) Digital computer for executing multiple instruction sets in a simultaneous-interleaved fashion
US3624616A (en) Dynamic allocation of multidimensional array memory space
US3496550A (en) Digital processor with variable field length operands using a first and second memory stack
US4430708A (en) Digital computer for executing instructions in three time-multiplexed portions
JPS5822452A (en) Instruction pre-fetch control system
JPS6049340B2 (en) Branch instruction prefetch method
JP2000284964A (en) Efficient sub-instruction emulation in vliw processor
US5819081A (en) Method of executing a branch instruction of jumping to a subroutine in a pipeline control system
JPH0544049B2 (en)
JPS60108973A (en) Method for finding the minimum value of array elements and element number of the minimum element
JPH04268928A (en) Emulation device and semiconductor device
JPS5925264B2 (en) Vector instruction processing method
JPH02157939A (en) Instruction processing method and instruction processor
JPH0267602A (en) Numerical arithmetic unit
JPS62245439A (en) Symbolic processing system and method
JP2727023B2 (en) Information processing device
JP2622026B2 (en) Register writing control method in central processing unit
JPS6047616B2 (en) information processing equipment
JPS5846439A (en) Program editing method of computer
JPH0364903B2 (en)
JPS5917464B2 (en) data processing equipment