JP2927102B2 - Instruction string switching method and arithmetic processor using the same - Google Patents

Instruction string switching method and arithmetic processor using the same

Info

Publication number
JP2927102B2
JP2927102B2 JP10807192A JP10807192A JP2927102B2 JP 2927102 B2 JP2927102 B2 JP 2927102B2 JP 10807192 A JP10807192 A JP 10807192A JP 10807192 A JP10807192 A JP 10807192A JP 2927102 B2 JP2927102 B2 JP 2927102B2
Authority
JP
Japan
Prior art keywords
token
instruction
instruction sequence
register
memory
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 - Lifetime
Application number
JP10807192A
Other languages
Japanese (ja)
Other versions
JPH05303493A (en
Inventor
薫 内田
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
Nippon Electric Co 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP10807192A priority Critical patent/JP2927102B2/en
Publication of JPH05303493A publication Critical patent/JPH05303493A/en
Application granted granted Critical
Publication of JP2927102B2 publication Critical patent/JP2927102B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、フォン・イノマン方式
で動作する演算プロセッサにおける命令列切り替え方法
及びそれを利用した演算プロセッサに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for switching an instruction sequence in an arithmetic processor operating in the von Innoman system and an arithmetic processor using the same.

【0002】[0002]

【従来の技術】従来フォン・イノマン方式で動作する演
算プロセッサにおいては、命令列を順に実行している中
で、メモリにアクセスする命令があった場合、その命令
を実行し、そのメモリアクセスが終了するまで、演算部
の処理動作は次の命令の処理に進まずにそこで待ってい
るという制御方式をとっていた。特にアクセスがメモリ
読み出し動作の場合には読み出した値をそれ以降の命令
で使用するために、このように待つという動作は必須と
なる。
2. Description of the Related Art Conventionally, in an arithmetic processor operating according to the von Innoman method, if an instruction for accessing a memory is found in the execution of an instruction sequence, the instruction is executed and the memory access is terminated. Until the operation, the processing operation of the arithmetic unit takes a control method of waiting for the next instruction without proceeding to the processing of the next instruction. In particular, when the access is a memory read operation, such an operation of waiting is indispensable in order to use the read value in subsequent instructions.

【0003】[0003]

【発明が解決しようとする課題】このような制御方式を
とると、メモリのアクセスを起動してからそれを終了す
るまでにかかる時間が演算プロセッサの一命令を実行す
る時間に比べて長い場合には、演算プロセッサが演算処
理を実行せずに無駄に費やすサイクルが生じることにな
り、処理性能を低下させる原因となる。
According to such a control method, when the time required from the start of memory access to the end thereof is longer than the time required to execute one instruction of the arithmetic processor. Causes a cycle in which the arithmetic processor wastes time without executing the arithmetic processing, which causes a reduction in processing performance.

【0004】本発明の目的は、このような問題点を解決
し、処理性能を低下させず処理を進める命令列切り替え
方式及びそれを使用した演算プロセッサを提供すること
にある。
An object of the present invention is to solve such a problem and to provide an instruction sequence switching method for performing processing without deteriorating processing performance and an arithmetic processor using the same.

【0005】[0005]

【課題を解決するための手段】第1の発明の命令列切り
替え方法は、実行可能な命令列をその命令列で実行を開
始すべき命令のアドレスの値を含むトークンの形で表現
しトークンメモリに保持しておき、前記トークンメモリ
内のトークンのうちの一つを選択してそのトークン内に
含まれる前記実行開始命令アドレスを演算部のプログラ
ムカウンタにロードするという命令列フェッチ動作によ
りその命令列の実行を開始し、その命令列実行中に実行
開始アドレスとしてのそのときのプログラムカウンタの
値と外部で行う動作の記述とを含むトークンを生成し、
そのトークンを外部に対して発行すると共に前記命令列
の実行を中断した後に前記命令列フェッチ動作により別
の命令列の実行を開始し、前述のように外部に発行した
トークンが演算プロセッサに戻ってきた時には前記トー
クンメモリにそのトークンを保持し、前記トークンがト
ークンメモリ内で次に命令列フェッチ動作の対象として
選択されたときにはトークン内に保持された実行開始ア
ドレスを演算制御部のプログラムカウンタにロードして
命令列処理を再開することを特徴とする。
According to a first aspect of the present invention, an instruction sequence switching method includes a token memory which expresses an executable instruction sequence in the form of a token including an address value of an instruction to start execution by the instruction sequence. And executing the instruction sequence fetch operation of selecting one of the tokens in the token memory and loading the execution start instruction address contained in the token into the program counter of the arithmetic unit. To generate a token including the value of the current program counter as the execution start address and a description of the operation to be performed externally during execution of the instruction sequence,
After the token is issued to the outside and the execution of the instruction sequence is interrupted, the execution of another instruction sequence is started by the instruction sequence fetch operation, and the token issued to the outside returns to the arithmetic processor as described above. When the token is selected in the token memory as the target of the next instruction fetch operation, the execution start address held in the token is loaded into the program counter of the arithmetic control unit Then, the instruction sequence processing is restarted.

【0006】第2の発明の演算プロセッサは、一つの命
令列内の命令を順に実行する演算処理部と、外部から入
力されたトークンを保持し演算処理部に供給するトーク
ンメモリと、前記演算処理部からアクセスされるデータ
を保持するレジスタ群と、実行中の命令列でのそのとき
のプログラムカウンタの値と外部で行う動作の記述とを
含むトークンを生成し外部へ送出するトークン生成部
と、演算処理部の命令列の実行の中断、前記トークンメ
モリから演算処理部へ供給する命令列トークンの選択、
トークン内に含まれる値の演算処理部へのロードの動作
と、前記トークンメモリ、トークン生成部の動作を制御
する命令列制御部と、を有することを特徴とする。
According to a second aspect of the present invention, there is provided an arithmetic processor for sequentially executing instructions in one instruction sequence, a token memory for holding an externally input token and supplying the token to the arithmetic processor, A register group for holding data accessed from the unit, a token generation unit for generating a token including the value of the program counter at that time in the instruction sequence being executed and a description of the operation to be performed externally, and transmitting the token to the outside; Interrupting execution of the instruction sequence of the arithmetic processing unit, selecting an instruction sequence token to be supplied from the token memory to the arithmetic processing unit,
It is characterized by including an operation of loading a value included in the token into the arithmetic processing unit, and an instruction sequence control unit that controls operations of the token memory and the token generation unit.

【0007】第3の発明は、第1の発明に加えて外部に
対して発行したトークンが演算プロセッサに戻ってきた
時に、もし外部で行った動作がメモリ読み出し動作であ
った場合にはトークン中の読み出しデータを演算プロセ
ッサ内のレジスタに書き込んだ後にトークンメモリにそ
のトークンを保持することを特徴とする。
In a third aspect, in addition to the first aspect, when the externally issued token returns to the arithmetic processor, if the externally performed operation is a memory read operation, the token After writing the read data in the register in the arithmetic processor, the token is held in the token memory.

【0008】第4の発明は、第2の発明に加えて外部か
ら演算プロセッサに戻ったトークンをトークンメモリに
保持するのに先立ってトークン中の読み出しデータをレ
ジスタ群中のレジスタに書き込む先行ロード部を有する
ことを特徴とする。
According to a fourth aspect of the present invention, in addition to the second aspect, a precedent load unit for writing read data in the token to a register in a register group before holding the token returned from the outside to the arithmetic processor in the token memory. It is characterized by having.

【0009】第5の発明は、第1の発明に加えてあらか
じめ与えられたレジスタ領域数で決まる数の命令列を実
行可能とし、実行可能な複数の命令列のそれぞれが独占
的に使用するレジスタ領域と全ての命令列から使用可能
なレジスタ領域を用意することを特徴とする。
According to a fifth aspect of the present invention, in addition to the first aspect, a number of instruction sequences determined by a predetermined number of register areas can be executed, and a register exclusively used by each of the plurality of executable instruction sequences is provided. A feature is to prepare a register area that can be used from the area and all instruction strings.

【0010】第6の発明は、第2の発明に加えて実行可
能な命令列のそれぞれが独占的に使用する複数のローカ
ルレジスタ領域と全ての命令列から使用可能なグローバ
ルレジスタ領域に分けられた演算レジスタ群を持つこと
を特徴とする。
According to a sixth aspect, in addition to the second aspect, the executable instruction sequence is divided into a plurality of local register areas exclusively used by each of the executable instruction sequences and a global register region usable from all the instruction sequences. It is characterized by having an operation register group.

【0011】[0011]

【作用】第1及び第2の発明では、外部に送られるトー
クン中に命令列実行中のプログラムカウンタの値を保持
し、そのトークンが演算プロセッサに戻り再び処理され
る時にその値をプログラムカウンタにロードすることに
より命令列実行を続行できる。トークンを外に出してい
る間、別の命令列の処理を行うことにより、演算部で無
駄に費やすサイクルを減らすことができ、処理性能を高
く保つことが可能になる。
In the first and second inventions, the value of the program counter during execution of the instruction sequence is held in the token sent to the outside, and when the token returns to the arithmetic processor and is processed again, the value is stored in the program counter. Execution of the instruction sequence can be continued by loading. By processing another instruction sequence while the token is out, it is possible to reduce unnecessary cycles in the arithmetic unit, and to maintain high processing performance.

【0012】第3及び第4の発明では、上で述べた作用
に加えてメモリから読み出したデータのレジスタへの書
き込みをその該当する命令列の処理が再開される前に完
了することができる。これにより効率的な演算サイクル
の使用が可能になる。
According to the third and fourth aspects of the present invention, in addition to the operation described above, the writing of the data read from the memory to the register can be completed before the processing of the corresponding instruction sequence is restarted. This enables efficient use of the operation cycle.

【0013】第5及び第6の発明では、上で述べた作用
に加えて命令列ごとに異なったレジスタ空間を使用でき
ることにより同じプログラム部分を走る複数の異なるコ
ンテキストの共存が可能になり、より柔軟なプログラム
を使用した効果的な処理が可能になる。
According to the fifth and sixth aspects of the present invention, in addition to the above-described operation, different register spaces can be used for each instruction sequence, so that a plurality of different contexts running in the same program portion can coexist, thereby providing more flexibility. Effective processing using a simple program becomes possible.

【0014】[0014]

【実施例】まず第1の発明の方法を使用する第2の発明
の演算プロセッサの実施例について、図面を用いて説明
する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First, an embodiment of an arithmetic processor according to the second invention using the method of the first invention will be described with reference to the drawings.

【0015】図1は第2の発明の演算プロセッサの一実
施例の基本構成図、図2は演算プロセッサで使用される
トークンの形式を示す図、図3は本演算プロセッサの命
令の形式を示す図である。
FIG. 1 is a diagram showing a basic configuration of an embodiment of an arithmetic processor according to the second invention, FIG. 2 is a diagram showing a format of a token used in the arithmetic processor, and FIG. 3 is a diagram showing an instruction format of the arithmetic processor. FIG.

【0016】図1の演算プロセッサ1は、命令列が与え
られたときに内部に持つプログラムカウンタの値を1つ
ずつ増やしながらそれで参照される命令列内の命令に従
った演算処理を行う演算処理部10と、演算処理部10
から参照・更新される複数のレジスタの集合であるレジ
スタ群11と、演算処理部内の命令とプログラムカウン
タの値からトークンを生成しメモリアクセスコントロー
ラ2に対して発行するトークン生成部12と、メモリア
クセスコントローラ2から入力されるトークンをFIF
O的に順に保持するトークンメモリ13と、トークンメ
モリ13と演算処理部10とトークン生成部12の動作
を制御し、またプログラムを保持するメモリを内部に持
つ命令列制御部14からなる。
The arithmetic processor 1 shown in FIG. 1 performs an arithmetic operation in accordance with an instruction in an instruction sequence referenced by the instruction sequence while increasing a value of a program counter provided therein when an instruction sequence is given. Unit 10 and arithmetic processing unit 10
A register group 11 which is a set of a plurality of registers referred to and updated from a memory; a token generation unit 12 which generates a token from an instruction in the arithmetic processing unit and a value of a program counter and issues the token to the memory access controller 2; FIF the token input from controller 2
It comprises a token memory 13 for sequentially storing O, an instruction sequence control unit 14 for controlling the operations of the token memory 13, the arithmetic processing unit 10 and the token generation unit 12 and having a memory for storing a program therein.

【0017】このような演算プロセッサ1を用いて演算
処理を行う場合、次のような手順で進める。
When the arithmetic processing is performed using such an arithmetic processor 1, the processing proceeds as follows.

【0018】まず外部から信号線90を介して命令列制
御部14に対して、全体の動作を記述したプログラム
を、ついでそれぞれが実行開始アドレスを持ったトーク
ンをいつくか与える。命令列制御部14内のプログラム
は一連の命令の連続であり、実行開始アドレスはその内
の1つのアドレスである。以下、プログラム内の、実行
開始アドレスからある終了点までの部分列を命令列と呼
ぶ。トークンはすべてトークンメモリ13内におかれ
る。トークンメモリ13内のトークンは図2の50に示
される形式をしており、実行開始アドレスのフィールド
51を持つ。フィールド60は使用しない。フラグ52
の値は“0”である。また外からトークンメモリ13へ
与えたトークンの数を命令列制御部14内のトークン数
カウンタにセットする。
First, a program describing the entire operation is given to the instruction sequence control unit 14 from the outside via the signal line 90, and then some tokens each having an execution start address are given. The program in the instruction sequence control unit 14 is a sequence of a series of instructions, and the execution start address is one of them. Hereinafter, a partial sequence from the execution start address to a certain end point in the program is referred to as an instruction sequence. All tokens are stored in the token memory 13. The token in the token memory 13 has a format shown by 50 in FIG. 2 and has a field 51 of an execution start address. Field 60 is not used. Flag 52
Is “0”. In addition, the number of tokens externally provided to the token memory 13 is set in a token number counter in the instruction sequence control unit 14.

【0019】外部から命令列制御部14に対して処理開
始信号が与えられると、トークンメモリ13内の先頭の
トークンが演算処理部10に送られ、そのトークン50
のフラグ52の値が“0”である場合には演算処理部1
0ではトークン内の実行開始アドレス51の値がプログ
ラムカウンタに設定される。これを以下命令列フェッチ
動作と呼ぶ。その後、その命令列の実行が開始される。
When a processing start signal is externally supplied to the instruction sequence control unit 14, the first token in the token memory 13 is sent to the arithmetic processing unit 10, and the token 50
If the value of the flag 52 is “0”, the arithmetic processing unit 1
At 0, the value of the execution start address 51 in the token is set in the program counter. This is hereinafter referred to as an instruction string fetch operation. Thereafter, execution of the instruction sequence is started.

【0020】演算処理部10の演算処理ではまずプログ
ラムカウンタの値を命令制御部14に送りそれをアドレ
スとしてそれで示される命令列制御部14内のプログラ
ム中の命令が演算処理部10にフェッチされる。これを
命令フェッチ動作と呼ぶ。ついで演算処理部10ではフ
ェッチされた命令に記述された演算を行った後にプログ
ラムカウンタの値を一つインクリメントして次の命令の
実行へ進む。以上が命令実行の基本動作である。
In the arithmetic processing of the arithmetic processing unit 10, first, the value of the program counter is sent to the instruction control unit 14, and the instruction in the program in the instruction sequence control unit 14 indicated by the address is fetched to the arithmetic processing unit 10. . This is called an instruction fetch operation. Then, the arithmetic processing unit 10 performs the operation described in the fetched instruction, increments the value of the program counter by one, and proceeds to the execution of the next instruction. The above is the basic operation of instruction execution.

【0021】命令フェッチで得られる命令の種類として
は、レジスタ群11内のレジスタの値を最大2つ参照し
て加減乗除などの演算を行い結果を指定されたレジスタ
に書き込むALU演算命令、外部メモリ上のデータをそ
のアドレスを指定することにより読み出してレジスタに
ロードするロード命令、レジスタ上のデータを外部メモ
リの指定された場所へ書き出すストア命令、命令列の終
わりで命令列実行を終了する命令列終了命令、がある。
The types of instructions obtained by the instruction fetch include an ALU operation instruction for performing operations such as addition, subtraction, multiplication, and division by referring to a maximum of two registers in the register group 11 and writing the result to a specified register, and an external memory. A load instruction that reads the above data by specifying its address and loads it into a register, a store instruction that writes data on a register to a specified location in external memory, and an instruction sequence that terminates instruction sequence execution at the end of the instruction sequence There is an end command.

【0022】命令フェッチで得られた命令がALU演算
命令の時は上述の基本動作を行う。ALU演算命令の形
式は図3の80のようである。読みレジスタ識別子Aと
読みレジスタ識別子Bが演算に用いるデータの入ったレ
ジスタを、書き込みレジスタ識別子が結果を格納すべき
レジスタを示す。レジスタ識別子はレジスタ群11中の
一つのレジスタを一意に識別する。
When the instruction obtained by the instruction fetch is an ALU operation instruction, the above-described basic operation is performed. The format of the ALU operation instruction is as shown at 80 in FIG. The read register identifier A and the read register identifier B indicate the register containing the data used for the operation, and the write register identifier indicates the register in which the result is to be stored. The register identifier uniquely identifies one register in the register group 11.

【0023】命令フェッチで得られた命令がロード命令
の場合には、命令列制御部14からトークン生成部12
に対しての指示により、トークン生成部12で図2の5
5に示す形式のトークンが生成される。ロード命令のフ
ォーマットを図3の70に示す。71はロード命令を示
す命令コード、73はメモリ読み出しを行うアドレス、
72は読み出したデータを書き込むレジスタの識別子で
ある。トークン55はそのときの演算処理部10内のプ
ログラムカウンタの値を実行開始アドレス58に、ロー
ド命令70中の外部メモリのアクセスすべきアドレス7
3をフィールド57に、メモリアクセスコントローラ2
で行う動作としてメモリ読み出しを指示するコードをオ
ペレーションコード56に持つ。フィールド81は使用
しない。この読み出し要求トークンは生成後信号線91
を介してメモリアクセスコントローラ2へ送られる。そ
の後命令列制御部14の制御により命令列フェッチ動作
が行われ、フェッチされた命令列の実行が開始される。
If the instruction obtained by the instruction fetch is a load instruction, the instruction sequence control unit 14
In response to the instruction shown in FIG.
5 is generated. The format of the load instruction is shown at 70 in FIG. 71 is an instruction code indicating a load instruction, 73 is an address at which memory reading is performed,
Reference numeral 72 denotes an identifier of a register in which the read data is written. The token 55 uses the value of the program counter in the arithmetic processing unit 10 at that time as the execution start address 58 and the address 7 to be accessed of the external memory in the load instruction 70.
3 in the field 57 and the memory access controller 2
The operation code 56 has a code for instructing a memory read as an operation performed in. Field 81 is not used. This read request token is generated after the signal line 91
To the memory access controller 2 via Thereafter, the instruction sequence fetch operation is performed under the control of the instruction sequence control unit 14, and the execution of the fetched instruction sequence is started.

【0024】命令フェッチで得られた命令がレジスタ上
のデータを外部メモリの指定された場所へ書き出すスト
ア命令であった場合には命令列制御部14からトークン
生成部12に対しての指示により、トークン生成部12
で図2の55に示す形式のトークンが生成される。スト
ア命令のフォーマットを図3の75に示す。76はスト
ア命令を示す命令コード、77はメモリ書き込みを行う
アドレス、78は書き込むデータを読み出すレジスタの
識別子である。トークン55はそのときの演算処理部1
0内のプログラムカウンタの値を実行開始アドレス58
に、ストア命令75中の外部メモリの書き込むべきアド
レス77をフィールド57に、メモリアクセスコントロ
ーラ2で行う動作としてメモリ書き込みを指示するコー
ドをオペレーションコード56に、命令のフィールド7
8で指定されたレジスタから読み出した書き込むべきデ
ータをフィールド59に持つ。フィールド61は使用し
ない。この書き込む要求トークンは生成後信号線91を
介してメモリアクセスコントローラ2へ送られる。トー
クン発行後、演算処理部10ではプログラムカウンタ基
本動作の場合と同様にプログラムカウンタの値を1つイ
ンクリメントしたのちにその命令列の演算処理が続行さ
れる。
If the instruction obtained by the instruction fetch is a store instruction for writing data in a register to a specified location in the external memory, the instruction sequence control unit 14 instructs the token generation unit 12 to Token generator 12
Generates a token in the format indicated by 55 in FIG. The format of the store instruction is shown at 75 in FIG. Reference numeral 76 denotes an instruction code indicating a store instruction, 77 denotes an address for writing to a memory, and 78 denotes an identifier of a register for reading data to be written. The token 55 is the arithmetic processing unit 1 at that time.
Execution start address 58
In the field 57, the address 77 to be written to the external memory in the store instruction 75, the code for instructing the memory write as an operation performed by the memory access controller 2, and the instruction code 7
The data to be written, which is read from the register designated by 8, is stored in the field 59. Field 61 is not used. This write request token is sent to the memory access controller 2 via the signal line 91 after generation. After the token is issued, the arithmetic processing unit 10 increments the value of the program counter by one and then continues the arithmetic processing of the instruction sequence, as in the case of the basic operation of the program counter.

【0025】命令フェッチで得られた命令が命令列の終
わりで命令列実行を終了する命令列終了命令であった場
合には、命令列制御部14内のトークン数カウンタの値
を1つデクリメントする。デクリメント後これが0にな
った信号線90を介して外部にプログラム実行終了を知
らせ、演算プロセッサ1は停止する。0でなければ、そ
の後命令列制御部14の制御により命令列フェッチ動作
が行われ、フェッチされた命令列の実行が開始される。
トークンメモリ13中にトークンが1つも存在しない場
合には演算処理部10はトークンが得られるまで待ち続
ける。
If the instruction obtained by the instruction fetch is an instruction sequence end instruction for terminating the instruction sequence execution at the end of the instruction sequence, the value of the token number counter in the instruction sequence control unit 14 is decremented by one. . After the decrement, the completion of the program execution is notified to the outside via the signal line 90 which has become 0, and the arithmetic processor 1 stops. If it is not 0, then the instruction sequence fetch operation is performed under the control of the instruction sequence control unit 14, and the execution of the fetched instruction sequence is started.
If no token exists in the token memory 13, the arithmetic processing unit 10 keeps waiting until a token is obtained.

【0026】メモリアクセスコントローラ2は前記読み
出しトークン55を受け取ると、そのオペレーションコ
ード56に従ってアクセスアドレス57で示される番地
からデータを読み出し、図2の形式50のトークンを生
成して演算プロセッサ1に対して送る。このときフィー
ルド51にはトークン55のフィールド58の値を、デ
ータ53にはメモリから読み出した値を、フラグ52に
は“1”を与える。フィールド60は使用しない。
When the memory access controller 2 receives the read token 55, it reads data from the address indicated by the access address 57 in accordance with the operation code 56, generates a token in the format 50 of FIG. send. At this time, the value of the field 58 of the token 55 is given to the field 51, the value read from the memory is given to the data 53, and "1" is given to the flag 52. Field 60 is not used.

【0027】メモリアクセスコントローラ2では前記書
き込みトークン55を受け取ると、そのオペレーション
コード56に従って、データ59をアクセスアドレス5
7で示される番地に書き込む。
When the memory access controller 2 receives the write token 55, it stores data 59 according to the operation code 56 in the access address 5.
Write to the address indicated by 7.

【0028】メモリアクセスコントローラ2からトーク
ンは信号線92を介して演算処理プロセッサ1に入力さ
れる。そのトークンの形式は図2の55のようである。
トークンが入力されると、そのトークンはトークンメモ
リ13のFIFOの最後尾に加えられる。FIFOでは
先頭のトークンが演算処理部10からフェッチされる度
にそれが取り除かれそれまで2番目であったトークンが
先頭になり、以下順に順序が繰り上がる。
The token from the memory access controller 2 is input to the arithmetic processor 1 via a signal line 92. The format of the token is as shown at 55 in FIG.
When a token is input, the token is added to the end of the FIFO in the token memory 13. In the FIFO, every time the first token is fetched from the arithmetic processing unit 10, it is removed, and the second token up to that point becomes first, and the order moves up in the following order.

【0029】命令列フェッチ動作において、フェッチさ
れたトークン50のフラグ52の値が“1”である場合
には、まず演算処理部10ではそのトークン内の実行開
始アドレス51の値をプログラムカウンタに設定する。
そのプログラムカウンタでアドレスされる命令列制御部
14中のプログラムの命令は、前回その属する命令列が
最後に実行していたロード命令であるので、図3の命令
70の形式のフィールド72で指定されるレジスタに対
してトークン50のデータ53を書き込んだのちにプロ
グラムカウンタをインクリメントし、次の命令からその
命令列の演算処理が再開される。
In the instruction sequence fetch operation, when the value of the flag 52 of the fetched token 50 is "1", the arithmetic processing unit 10 first sets the value of the execution start address 51 in the token to the program counter. I do.
Since the instruction of the program in the instruction sequence control unit 14 addressed by the program counter is the load instruction that the instruction sequence to which it belongs last was executed last, it is specified in the field 72 of the format of the instruction 70 in FIG. After writing the data 53 of the token 50 to the register, the program counter is incremented, and the arithmetic processing of the instruction sequence is restarted from the next instruction.

【0030】次に第3の発明の方法を使用する第4の発
明の演算プロセッサの実施例について、図4の第4の発
明の演算プロセッサの一実施例の基本構成図を用いて説
明する。
Next, an embodiment of the arithmetic processor of the fourth invention using the method of the third invention will be described with reference to the basic configuration diagram of one embodiment of the arithmetic processor of the fourth invention in FIG.

【0031】この演算プロセッサ20は図1の構成に加
えて、メモリアクセスコントローラ2から入力されるト
ークン中のデータをレジスタに書き込む先行ロード部2
1を持つ。この演算プロセッサ20の処理実行の動作
は、下記の点を除いては第2の発明の演算プロセッサと
同じである。
The arithmetic processor 20 includes, in addition to the configuration shown in FIG. 1, a preceding load unit 2 for writing data in a token input from the memory access controller 2 into a register.
Have one. The operation of the arithmetic processor 20 for executing processing is the same as that of the arithmetic processor according to the second invention except for the following points.

【0032】このような演算プロセッサ20にメモリア
クセスコントローラ2からの図2の50のような形式で
フィールド52のフラグが“1”であるようなトークン
が信号線92を介して演算プロセッサ20に入力された
場合には先行ロード部21において次のような動作が行
われる。
A token whose flag in the field 52 is "1" from the memory access controller 2 in a format as shown in FIG. 2 is input to the arithmetic processor 20 via the signal line 92. In this case, the following operation is performed in the preceding loading unit 21.

【0033】まずトークン50の中の実行開始アドレス
51を用いて命令列制御部14中のプログラムの命令が
信号線93、94を介して参照される。その命令は前回
その属する命令列が最後に実行していたロード命令であ
るので、図3の命令70の形式のフィールド72で指定
されるレジスタ群11中のレジスタに対してトークン5
0のデータ53を書き込む。なお演算処理部10がレジ
スタに対して書き込みを行っているサイクルでは先行ロ
ード部21から同時に書き込むことはできないので、そ
のときは先行ロード部21内のFIFOに書き込み要求
を保持し、最初に書き込みが可能になったときに書き込
む。また演算処理部10で命令列が切り替わるときに
は、必要なら新たな命令列の実効開始を遅らせてFIF
O内にある書き込み要求を全て完了させる。
First, using the execution start address 51 in the token 50, the instruction of the program in the instruction sequence controller 14 is referred to via the signal lines 93 and 94. Since this instruction is the load instruction that the instruction sequence to which it belongs last was executed last, the token 5 is added to the register in the register group 11 specified by the field 72 in the format of the instruction 70 in FIG.
The data 53 of 0 is written. In the cycle in which the arithmetic processing unit 10 is writing data to the register, the data cannot be simultaneously written from the preceding load unit 21. At that time, the write request is held in the FIFO in the preceding load unit 21 and the write is performed first. Write when possible. When the instruction sequence is switched by the arithmetic processing unit 10, the effective start of a new instruction sequence is delayed if necessary to
Complete all write requests in O.

【0034】書き込みが終了すると、トークン50の実
効開始アドレス51の値がインクリメントされ、さらに
フラグ52が“0”にセットされた後にそのトークンは
トークンメモリ13のFIFOの最後尾に加えられる。
When the writing is completed, the value of the effective start address 51 of the token 50 is incremented, and the token is added to the end of the FIFO of the token memory 13 after the flag 52 is set to "0".

【0035】そのトークンがトークンメモリ13の先頭
から演算処理部10へフェッチされ命令列が実行される
ときにはロード動作は先行ロード部21において完了し
ているので、ロード命令の次の命令から実行が続行され
る。
When the token is fetched from the beginning of the token memory 13 to the arithmetic processing unit 10 and the instruction sequence is executed, the load operation has been completed in the preceding load unit 21, and the execution continues from the instruction following the load instruction. Is done.

【0036】次に第5の発明の方法を使用する第6の発
明の演算プロセッサの実施例について、図5の第6の発
明の演算プロセッサの一実施例の基本構成図を用いて説
明する。
Next, an embodiment of the arithmetic processor of the sixth invention using the method of the fifth invention will be described with reference to the basic configuration diagram of one embodiment of the arithmetic processor of the sixth invention in FIG.

【0037】この演算プロセッサ30は、図1の構成に
おいてレジスタ群11の中が、グローバルレジスタフレ
ーム31と、N個のローカルレジスタフレーム32とに
分かれているものである。Nは2以上の整数、例えば1
6とする。
In the arithmetic processor 30, the register group 11 in the configuration of FIG. 1 is divided into a global register frame 31 and N local register frames 32. N is an integer of 2 or more, for example, 1
6 is assumed.

【0038】この演算プロセッサ30では、プログラム
の実行開始時に外から与えることが可能なトークン数を
N個以下に制限する。これにより同時にシステム内に存
在する実行可能な命令列数はN個以下となる。プログラ
ム起動時にN個以下のトークンが外部から与えられる
と、命令列制御部14はそれぞれのトークンに異なるフ
レーム識別子を与える。フレーム識別子はN個あるロー
カルレジスタフレームのうちそのトークンが表現する命
令列がどれを独占的に使用するかを識別するものであ
る。プログラム実行開始時に命令列制御部14からトー
クンメモリ13へ与えられたトークンは前述のように図
2の50に示す形式を持つが、このフレーム識別子はフ
ィールド60に書き込まれる。処理開始信号が与えられ
た場合の動作は下記の点を除いては第2の発明の演算プ
ロセッサと同じである。
In the arithmetic processor 30, the number of tokens that can be given from the outside at the start of program execution is limited to N or less. As a result, the number of executable instruction sequences simultaneously existing in the system becomes N or less. When N or less tokens are externally given at the time of program startup, the instruction sequence control unit 14 gives a different frame identifier to each token. The frame identifier identifies which of the N local register frames exclusively uses the instruction sequence represented by the token. The token given from the instruction sequence control unit 14 to the token memory 13 at the start of the program execution has the format indicated by 50 in FIG. 2 as described above, and this frame identifier is written in the field 60. The operation when the processing start signal is given is the same as the operation processor of the second invention except for the following points.

【0039】演算処理部10が図2の形式50のトーク
ンをフェッチして実行を開始するときには、実行開始ア
ドレス51をプログラムカウンタに保持するのに加えて
そのフレーム識別子60の値を演算処理部10の中のフ
レームレジスタに保持する。
When the arithmetic processing unit 10 fetches the token of the format 50 shown in FIG. 2 and starts execution, it stores not only the execution start address 51 in the program counter but also the value of the frame identifier 60 in the arithmetic processing unit 10. In the frame register in

【0040】ALU演算命令、ロード命令、ストア命令
を実行する場合、命令は図3の70、75、80の形式
のものであるが、この中のレジスタ識別子は直接にレジ
スタを識別するためではなく、その命令列に割り当てら
れたフレーム内での識別に利用される。レジスタ識別子
はまずそれがグローバルフレームのレジスタを指すかロ
ーカルフレームのレジスタを指すかを示す、前者である
場合は残りの部分がその内の一つをアドレスする。後者
である場合には、演算処理部10内フレームレジスタに
保持されているフレーム識別子で一つのフレームが決ま
り、命令の中のレジスタ識別子でその中の一つのレジス
タがアドレスされる。これはメモリ読み出しからトーク
ンが戻り、トークンメモリ13を経て演算処理部10内
でもう一度ロード命令を参照しながらメモリから読み出
した値を命令中で指定されたレジスタに書き込むときも
同様である。
When executing an ALU operation instruction, a load instruction, and a store instruction, the instructions are in the form of 70, 75, and 80 in FIG. 3, but the register identifier in these instructions is not for directly identifying the register. Is used for identification in the frame assigned to the instruction sequence. The register identifier first indicates whether it points to a global frame register or a local frame register, in which case the rest addresses one of them. In the latter case, one frame is determined by the frame identifier held in the frame register in the arithmetic processing unit 10, and one of the registers is addressed by the register identifier in the instruction. The same applies to the case where the token is returned from the memory read and the value read from the memory is written into the register specified in the instruction while referring to the load instruction again in the arithmetic processing unit 10 via the token memory 13.

【0041】ロード命令、ストア命令などの実行の際に
トークン生成部で生成されるトークンでは、図3の55
の61のフィールドに演算処理部10内に保持されたフ
レーム識別子が書き込まれる。また読み出し要求トーク
ンを受け取ってメモリアクセス動作を行うメモリアクセ
スコントローラ2は、演算プロセッサへの戻りトークン
を作る際に、受け取ったトークンのフレーム識別子の値
をそのまま戻りトークンの対応するフィールドに埋め込
む。
In the token generated by the token generation unit when executing a load instruction, a store instruction, etc., 55 in FIG.
The frame identifier held in the arithmetic processing unit 10 is written in the field 61 of (1). When the memory access controller 2 that receives the read request token and performs a memory access operation creates a return token to the arithmetic processor, the memory access controller 2 embeds the frame identifier value of the received token as it is in the corresponding field of the return token.

【0042】以上のようにして命令列ごとに異なったレ
ジスタセットを利用することが可能になるが、さらにこ
の仕組みと、第4の発明で述べた、先行ロード部の機構
と動作を組み込むことも可能である。
As described above, it is possible to use a different register set for each instruction sequence, but it is also possible to incorporate this mechanism and the mechanism and operation of the preceding load section described in the fourth invention. It is possible.

【0043】[0043]

【発明の効果】第1及び第2の発明では、外部に送られ
るトークン中にプログラムカウンタを保持することによ
り演算プロセッサに戻ったときに命令列実行を続行でき
る。トークンを外に出している間別の命令列の処理を続
行することにより、演算部で無駄に費やすサイクルを減
らすことができ、処理性能を高く保つことが可能にな
る。
According to the first and second aspects of the present invention, the execution of the instruction sequence can be continued when returning to the arithmetic processor by holding the program counter in the token sent to the outside. By continuing the processing of another instruction sequence while the token is out, the number of cycles wasted in the arithmetic unit can be reduced, and the processing performance can be kept high.

【0044】第3及び第4の発明では、上で述べた効果
に加えてメモリから読み出したデータのレジスタへの書
き込みをその該当する命令列の処理が再開される前に完
了することができる。これによりさらに効率的な演算サ
イクルの使用が可能になるという効果がある。
According to the third and fourth aspects of the present invention, in addition to the effects described above, the writing of the data read from the memory to the register can be completed before the processing of the corresponding instruction sequence is restarted. This has the effect of enabling more efficient use of the operation cycle.

【0045】第5及び第6の発明では、上で述べた効果
に加えて命令列ごとに異なったレジスタ空間を使用でき
ることにより同じプログラム部分を走る複数の異なるコ
ンテキストの共存が可能になり、より柔軟なプログラム
を効果的な処理が可能になるという効果がある。
According to the fifth and sixth aspects of the present invention, in addition to the above-described effects, different register spaces can be used for each instruction sequence, thereby enabling coexistence of a plurality of different contexts running in the same program part, and thereby providing more flexibility. There is an effect that effective processing of a simple program becomes possible.

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

【図1】本発明の一実施例である演算プロセッサの構成
を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an arithmetic processor according to an embodiment of the present invention.

【図2】本発明の一実施例である演算プロセッサで用い
られるトークンの形式を示す図である。
FIG. 2 is a diagram illustrating a format of a token used in an arithmetic processor according to an embodiment of the present invention.

【図3】本発明の一実施例である演算プロセッサで用い
られる命令の形式を示す図である。
FIG. 3 is a diagram illustrating a format of an instruction used in an arithmetic processor according to an embodiment of the present invention;

【図4】本発明の一実施例である演算プロセッサの構成
を示すブロック図である。
FIG. 4 is a block diagram illustrating a configuration of an arithmetic processor according to an embodiment of the present invention.

【図5】本発明の一実施例である演算プロセッサの構成
を示すブロック図である。
FIG. 5 is a block diagram illustrating a configuration of an arithmetic processor according to an embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1、20、30 演算プロセッサ 10 演算処理部 11 レジスタ群 12 トークン生成部 13 トークンメモリ 14 命令列制御部 21 先行ロード部 31 グローバルレジスタフレーム 32 ローカルレジスタフレーム 1, 20, 30 Arithmetic processor 10 Arithmetic processing unit 11 Register group 12 Token generation unit 13 Token memory 14 Instruction sequence control unit 21 Preceding load unit 31 Global register frame 32 Local register frame

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 命令列中の命令を順に実行することで動
作する演算プロセッサであらかじめ並行して実行可能な
命令列を複数用意しておきそれらを切り替えながら処理
を進める命令列切り替え方法において、実行可能な命令
列をその命令列で実行を開始すべき命令のアドレスの値
を含むトークンの形で表現してトークンメモリに保持し
ておき、前記トークンメモリ内のトークンのうちの一つ
を選択してそのトークン内に含まれる前記実行開始命令
アドレスを演算部のプログラムカウンタにロードすると
いう命令列フェッチ動作によりその命令列の実行を開始
し、その命令列実行中に実行開始アドレスとしてのその
ときのプログラムカウンタの値と外部で行う動作の記述
とを含むトークンを生成し、そのトークンを外部に対し
て発行すると共に前記命令列の実行を中断した後に前記
命令列フェッチ動作により別の命令列の実行を開始し、
前述のように外部に発行したトークンが演算プロセッサ
に戻ってきた時には前記トークンメモリにそのトークン
を保持し、前記トークンがトークンメモリ内で次に命令
列フェッチ動作の対象として選択されたときにはトーク
ン内に保持された実行開始アドレスを演算制御部のプロ
グラムカウンタにロードして命令列処理を再開すること
を特徴とする命令列切り替え方法。
1. An instruction sequence switching method for preparing a plurality of instruction sequences that can be executed in parallel by an arithmetic processor that operates by sequentially executing instructions in an instruction sequence, and performing processing while switching the instruction sequences. A possible instruction sequence is expressed in the form of a token including the value of the address of an instruction to start executing in the instruction sequence and is stored in the token memory, and one of the tokens in the token memory is selected. Then, the execution of the instruction sequence is started by an instruction sequence fetch operation of loading the execution start instruction address included in the token into the program counter of the arithmetic unit, and the execution start address as the execution start address during the execution of the instruction sequence Generate a token containing the value of the program counter and a description of the operation to be performed externally, issue the token to the external, and Starting the execution of another instruction sequence by the instruction sequence fetch operation after interrupting the execution of the instruction sequence,
As described above, when the token issued to the outside returns to the arithmetic processor, the token is held in the token memory. An instruction sequence switching method characterized by loading the held execution start address into a program counter of an arithmetic control unit and restarting instruction sequence processing.
【請求項2】 あらかじめ並行して実行可能な命令列を
複数用意しておきそのいずれかの命令列中の命令を順に
実行することで処理を進める演算プロセッサにおいて、
一つの命令列内の命令を順に実行する演算処理部と、外
部から入力されたトークンを保持し演算処理部に供給す
るトークンメモリと、前記演算処理部からアクセスされ
るデータを保持するレジスタ群と、実行中の命令列での
そのときのプログラムカウンタの値と外部で行う動作の
記述とを含むトークンを生成し外部へ送出するトークン
生成部と、演算処理部の命令列の実行の中断、前記トー
クンメモリから演算処理部へ供給する命令列トークンの
選択、トークン内に含まれる値の演算処理部へのロード
の動作と、前記トークンメモリ、トークン生成部の動作
を制御する命令列制御部と、を有することを特徴とする
演算プロセッサ。
2. An arithmetic processor which prepares a plurality of instruction sequences that can be executed in parallel in advance and executes processing by sequentially executing instructions in any one of the instruction sequences.
An arithmetic processing unit that sequentially executes instructions in one instruction sequence, a token memory that holds a token input from the outside and supplies it to the arithmetic processing unit, and a register group that holds data accessed from the arithmetic processing unit. A token generation unit that generates a token including the value of the program counter at that time in the instruction sequence being executed and a description of the operation to be performed externally and sends the token to the outside, and interrupts the execution of the instruction sequence of the arithmetic processing unit; An instruction sequence control unit that controls an operation of selecting an instruction sequence token to be supplied from the token memory to the operation processing unit and loading a value included in the token into the operation processing unit, and controlling the operation of the token memory and the token generation unit; An arithmetic processor comprising:
【請求項3】 外部に対して発行したトークンが演算プ
ロセッサに戻ってきた時に、もし外部で行った動作がメ
モリ読み出し動作であった場合にはトークン中の読み出
しデータを演算プロセッサ内のレジスタに書き込んだ後
にトークンメモリにそのトークンを保持することを特徴
とする請求項1記載の命令列切り替え方法。
3. When the externally issued token returns to the arithmetic processor, if the externally performed operation is a memory read operation, the read data in the token is written to a register in the arithmetic processor. 2. The instruction sequence switching method according to claim 1, wherein the token is held in a token memory afterwards.
【請求項4】 外部から演算プロセッサに戻ったトーク
ンをトークンメモリに保持するのに先立ってトークン中
のメモリ読み出しデータをレジスタ群中のレジスタに書
き込む先行ロード部を有することを特徴とする請求項2
記載の演算プロセッサ。
4. A preload unit for writing memory read data in a token to a register in a group of registers before holding a token returned from an external processor to an arithmetic processor in a token memory.
An arithmetic processor as described.
【請求項5】 あらかじめ与えられたレジスタ領域数で
決まる数の命令列を実行可能とし、実行可能な複数の命
令列のそれぞれが独占的に使用するレジスタ領域と全て
の命令列から使用可能なレジスタ領域を用意することを
特徴とする請求項1記載の命令列切り替え方法。
5. A register area exclusively used by each of a plurality of executable instruction sequences and a register usable from all the instruction sequences, wherein a predetermined number of instruction sequences determined by a predetermined number of register regions are made executable. 2. The method according to claim 1, wherein an area is prepared.
【請求項6】 実行可能な命令列のそれぞれが独占的に
使用する複数のローカルレジスタ領域と全ての命令列か
ら使用可能なグローバルレジスタ領域に分けられた演算
レジスタ群を持つことを特徴とする請求項2記載の演算
プロセッサ。
6. An executable instruction sequence having a plurality of local register areas exclusively used and an operation register group divided into global register areas usable from all instruction sequences. Item 3. The arithmetic processor according to item 2.
JP10807192A 1992-04-27 1992-04-27 Instruction string switching method and arithmetic processor using the same Expired - Lifetime JP2927102B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10807192A JP2927102B2 (en) 1992-04-27 1992-04-27 Instruction string switching method and arithmetic processor using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10807192A JP2927102B2 (en) 1992-04-27 1992-04-27 Instruction string switching method and arithmetic processor using the same

Publications (2)

Publication Number Publication Date
JPH05303493A JPH05303493A (en) 1993-11-16
JP2927102B2 true JP2927102B2 (en) 1999-07-28

Family

ID=14475149

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10807192A Expired - Lifetime JP2927102B2 (en) 1992-04-27 1992-04-27 Instruction string switching method and arithmetic processor using the same

Country Status (1)

Country Link
JP (1) JP2927102B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7680962B2 (en) 2004-12-22 2010-03-16 Nec Electronics Corporation Stream processor and information processing apparatus

Also Published As

Publication number Publication date
JPH05303493A (en) 1993-11-16

Similar Documents

Publication Publication Date Title
KR950012293B1 (en) Information processing apparatus and information processing method using it
EP0365188B1 (en) Central processor condition code method and apparatus
JP2560988B2 (en) Information processing apparatus and processing method
KR0138468B1 (en) Microcomputer
JP3439033B2 (en) Interrupt control device and processor
JP3797570B2 (en) Apparatus and method using semaphore buffer for semaphore instructions
JPH01310441A (en) Data processor
JPH03233630A (en) Information processor
JP2927102B2 (en) Instruction string switching method and arithmetic processor using the same
JPH10240546A (en) Execution time program translation method
US20030061468A1 (en) Forwarding the results of operations to dependent instructions quickly
JP2853460B2 (en) Data loading method and arithmetic processor using the same
JP2853458B2 (en) Instruction string switching method and arithmetic processor using the same
US5828861A (en) System and method for reducing the critical path in memory control unit and input/output control unit operations
US11681527B2 (en) Electronic device and multiplexing method of spatial
JPS60241136A (en) Data processor
JPH08137690A (en) Program execution control method
JPH033037A (en) Microprogram control system
CN113778640A (en) Task execution method and device, electronic equipment and storage medium
JPH1021067A (en) Dynamic correction method for program
JPH06149569A (en) Register number changing device
JPH02151930A (en) Storage buffer managing system
JP2002544619A (en) Object-oriented processing using dedicated pointer memory
JPH04127326A (en) Information processor and instruction generating method
JPH02278428A (en) Branch control system

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990413