JPH0756755A - Method for controlling processor - Google Patents

Method for controlling processor

Info

Publication number
JPH0756755A
JPH0756755A JP5201469A JP20146993A JPH0756755A JP H0756755 A JPH0756755 A JP H0756755A JP 5201469 A JP5201469 A JP 5201469A JP 20146993 A JP20146993 A JP 20146993A JP H0756755 A JPH0756755 A JP H0756755A
Authority
JP
Japan
Prior art keywords
instruction
buffer memory
continuation
pointer
stored
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
JP5201469A
Other languages
Japanese (ja)
Other versions
JP2522176B2 (en
Inventor
Masato Motomura
真人 本村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP5201469A priority Critical patent/JP2522176B2/en
Publication of JPH0756755A publication Critical patent/JPH0756755A/en
Application granted granted Critical
Publication of JP2522176B2 publication Critical patent/JP2522176B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To obtain effective prefetch technique for a processor adopting a continuous buffer or the like by means of a simple hardware constitution by previously prefetching an instruction string pointed out by an instruction painter stored in the continuous buffer to a high speed buffer memory. CONSTITUTION:A prefetching device 150 prereads continuation to be executed in the future from the continuous buffer 120 based upon continuation prereading information 123 and prefetches a necessary instruction or data by means of the continuation. An instruction pointer 227-1 out of the continuation preread based upon the information 123 is transferred to a high speed buffer memory monitoring part 211 in an instruction prefetching part 210. The monitoring part 211 inspects whether a buffer memory line including an instruction specified by the painter 227-1 is included in the high speed buffer memory or not based upon high speed buffer memory inspecting information 152. When the memory line is not included, a prefetch request issuing part 212 issues a prefetch request for the buffer memory line.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は計算機システムの中核を
なすプロセッサに関し、特に一つのプログラムを並列に
処理可能な高性能なマイクロプロセッサに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a processor which is the core of a computer system, and more particularly to a high performance microprocessor capable of processing one program in parallel.

【0002】[0002]

【従来の技術】プロセッサ、特にマイクロプロセッサに
おいては、キャッシュメモリに代表される高速バッファ
メモリを活用し、演算に必要な命令及びデータを共に高
速バッファメモリに格納した上で、これに高速アクセス
して必要な処理を行なうことが一般的である。
2. Description of the Related Art In a processor, particularly a microprocessor, a high-speed buffer memory represented by a cache memory is utilized to store both instructions and data required for calculation in the high-speed buffer memory, and then to access this at high speed. It is common to perform the necessary processing.

【0003】高速バッファメモリに所望の命令又はデー
タが存在しない場合(以下この場合のことをバッファメ
モリミスと呼ぶ)、メインメモリ等から所望の命令又は
データを転送しなければならず、この転送に長い時間が
かかることがプロセッサの性能を低下させる一つの要因
となっている。なお、高速バッファメモリは複数のバッ
ファメモリラインから構成され、バッファメモリミスに
伴う上記の転送は要求されたこのバッファメモリライン
単位で行なわれる。
If the desired instruction or data does not exist in the high-speed buffer memory (hereinafter, this case is referred to as a buffer memory miss), the desired instruction or data must be transferred from the main memory or the like. A long time is one of the factors that reduce the performance of the processor. The high speed buffer memory is composed of a plurality of buffer memory lines, and the above transfer due to a buffer memory miss is performed in units of the requested buffer memory line.

【0004】バッファメモリミスの場合の転送処理のオ
ーバヘッドによる性能低下の課題を解決するために、プ
リフェッチという従来技術がある。ここでプリフェッチ
とは、必要となる命令またはデータをあらかじめ高速バ
ッファメモリへロードしておくことである。
In order to solve the problem of performance deterioration due to the overhead of transfer processing in the case of a buffer memory miss, there is a conventional technique called prefetch. Here, the prefetch is to load necessary instructions or data into the high speed buffer memory in advance.

【0005】プリフェッチ関する従来技術の要旨を以下
に示す。
The following is a summary of the prior art relating to prefetching.

【0006】[1] プリフェッチ命令によりソフトウ
ェア的かつ明示的に、必要なデータをあらかじめ高速バ
ッファメモリへロードしておくという技術である。
[1] It is a technique of preliminarily loading necessary data into a high-speed buffer memory in a software and explicit manner by a prefetch instruction.

【0007】コンパイラは、この命令を用いて、必要と
なるデータをあらかじめ高速バッファメモリへ取り込ん
でおくようにプログラムコードを構成する。
The compiler uses this instruction to configure the program code so that necessary data is loaded into the high speed buffer memory in advance.

【0008】このような技術を実際に採用した例とし
て、Digital Equipement Corp
oration社が発表したalphaアーキテクチャ
やMotorola社が発表したMC88110のアー
キテクチャなどがある。
As an example of actually adopting such a technique, Digital Equipment Corp.
There is an alpha architecture announced by the corporation or the MC88110 architecture announced by Motorola.

【0009】[2] ハードウェアによりプリフェッチ
装置を構成し、これによりプリフェッチを実現する技術
である。
[2] This is a technique for implementing prefetch by configuring a prefetch device with hardware.

【0010】Norman P.Jouppi,“Im
proving Direct−Mapped Cac
he Performance by the Add
ition of a Small Fully−As
sociative Cache and Prefe
tch Buffers”,The 17th Int
ernational Symposium on C
omputer Architecture,IEEE
Computer Society Press,1
990,pp.364−373の中でストリームバッフ
ァと呼んでいるものがある。
Norman P. Juppi, "Im
proving Direct-Mapped Cac
he Performance by the Add
edition of a Small Fully-As
social Cache and Prefe
tch Buffers ”, The 17th Int
international Symposium on C
computer Architecture, IEEE
Computer Society Press, 1
990, pp. Some of 364-373 are called stream buffers.

【0011】これは以前から知られているプリフェッチ
バッファの一種であり、ある一つの命令又はデータがア
クセスされた時に、それに続く命令又はデータを続けて
直列的にアクセスし、ストリームバッファに記憶させよ
うというものである。プログラムの挙動が直列的であれ
ば、このような手法により高速バッファメモリに所望の
命令又はデータが存在する確率を大幅に向上することが
可能である。
This is a kind of prefetch buffer that has been known for a long time. When a certain instruction or data is accessed, subsequent instructions or data are serially accessed and stored in a stream buffer. That is. If the program behavior is serial, such a method can significantly improve the probability that a desired instruction or data exists in the high-speed buffer memory.

【0012】同じく、並列処理計算機を構成する要素プ
ロセッサの従来技術として、マルチスレッド型アーキテ
クチャがある。
Similarly, there is a multi-thread type architecture as a conventional technique of the element processors constituting the parallel processing computer.

【0013】マルチスレッド型アーキテクチャでは、プ
ログラムを並列実行可能な複数のスレッドにコンパイル
する。ここでスレッドとは逐次的に実行される命令列の
ことである。これらのスレッドは並列処理計算機を構成
する各要素プロセッサに分配され、それぞれのプロセッ
サで演算処理が実行される。この際、一つのプロセッサ
に複数のスレッドを割り当て、プロセッサ間通信などの
待ち時間が生じた時に、他のスレッドに実行を切替え
て、待ち時間を有効に活用する点がマルチスレッド型ア
ーキテクチャの基本的なアイデアである。
In the multithreaded architecture, a program is compiled into a plurality of threads that can be executed in parallel. Here, a thread is a sequence of instructions that are sequentially executed. These threads are distributed to the respective element processors that make up the parallel processing computer, and the respective processors execute arithmetic processing. At this time, the basic point of the multithreaded architecture is that multiple threads are assigned to one processor, and when waiting time such as inter-processor communication occurs, execution is switched to another thread and the waiting time is effectively used. Is an idea.

【0014】マルチスレッド型アーキテクチャの代表的
な例としては、R.S.Nikhil,G.M.Pap
adopoulos,Arvind,“ *T:A Mu
ltithreaded Massively Par
allel Architecture”,The19
th International Symposiu
m on Computer Architectur
e,IEEE Computer Society P
ress,1992,pp.156−167)がある。
As a typical example of the multithreaded architecture, R. S. Nikhil, G .; M. Pap
adopoulos, Arvind, “* T: A Mu
lthreaded Massively Par
allell Architecture ", The19
th International Symposiu
m on Computer Architecture
e, IEEE Computer Society P
ress, 1992, pp. 156-167).

【0015】マルチスレッド型アーキテクチャにおいて
は、プロセッサがどのスレッドが実行可能であるか認識
しておく必要が生じる。このために継続バッファと呼ぶ
バッファをプロセッサ内に持つのが普通である。ここで
継続(またはコンティニュエーションという)とはスレ
ッドの先頭命令アドレスを示す命令ポインタとスレッド
が使用するデータ領域であるフレームの先頭アドレスを
指定するフレームポインタの組である。
In a multithreaded architecture, the processor needs to be aware of which threads can execute. For this reason, it is common to have a buffer in the processor called the continuation buffer. Here, the continuation (or continuation) is a set of an instruction pointer indicating the head instruction address of the thread and a frame pointer designating the head address of a frame which is a data area used by the thread.

【0016】スレッドの実行の開始するときは命令ポイ
ンタの値にしたがってスレッドの先頭命令のフェッチを
行なう。スレッド内の以後の命令は、通常の通りプログ
ラムカウンタの指定にしたがってフェッチする。命令の
実行に必要なデータは、フレームポインタで指定される
フレームの中からレジスタへフェッチされる。
When the execution of the thread is started, the leading instruction of the thread is fetched according to the value of the instruction pointer. Subsequent instructions in the thread are fetched as specified by the program counter as usual. The data required to execute the instruction is fetched into the register from the frame designated by the frame pointer.

【0017】[0017]

【発明が解決しようとする課題】上記の従来のプリフェ
ッチ技術において本発明が解決しようとする課題の要旨
は以下の2項に存する。
The gist of the problem to be solved by the present invention in the above-mentioned conventional prefetch technique lies in the following two items.

【0018】[1] コンパイル時にプリフェッチ命令
を命令列中に有効に挿入するのが困難である点や、プリ
フェッチ命令の発行のために少なくとも1サイクル以上
を消費してしまう点、またデータのプリフェッチのみに
有効で、命令のプリフェッチには用いることができない
点、などが課題である。
[1] It is difficult to effectively insert a prefetch instruction into an instruction sequence during compilation, at least one cycle is consumed for issuing a prefetch instruction, and only data prefetch is performed. The problem is that it is effective for prefetching and cannot be used for prefetching instructions.

【0019】[2] プログラムの挙動が直列的である
ことを仮定しているため、多くの場合、無駄な命令又は
データをプリフェッチしてしまうという課題がある。こ
れは高速バッファメモリのミス率を上昇させてしまうば
かりでなく、メインメモリと高速バッファメモリ間のバ
ンド幅を無駄使いしてしまうという点でも課題である。
[2] Since it is assumed that the behavior of the program is serial, in many cases, there is a problem of prefetching useless instructions or data. This not only increases the miss rate of the high speed buffer memory, but also wastes the bandwidth between the main memory and the high speed buffer memory.

【0020】本発明の目的は、マルチスレッド型アーキ
テクチャのような、継続バッファを有し、継続バッファ
に記憶された複数の実行可能な継続の中から一つを選ん
で演算処理を実行するプロセッサに対して、その特徴を
生かしたプリフェッチ技術を実現するプロセッサの制御
方法を提供することにある。
It is an object of the present invention to provide a processor having a continuation buffer, such as a multi-threaded architecture, which selects one of a plurality of executable continuations stored in the continuation buffer to execute arithmetic processing. On the other hand, another object of the present invention is to provide a control method of a processor that realizes a prefetch technique that takes advantage of the characteristics.

【0021】[0021]

【課題を解決するための手段】上記の課題を解決するた
めの本発明に手段の要旨は以下の6項に存する。
The gist of means of the present invention for solving the above-mentioned problems lies in the following 6 items.

【0022】[1] 実行可能な一連の命令である命令
列における先頭命令のアドレスを指定する命令ポインタ
及び前記命令列に対応するデータを記憶するデータ記憶
領域を指定するフレームポインタを記憶する継続バッフ
ァと、現在実行中の命令のアドレスを指定するプログラ
ムカウンタと、複数のバッファメモリラインを有し命令
及びデータを記憶する高速バッファメモリとを具備する
プロセッサにおいて、前記継続バッファ中に格納された
前記命令ポインタ及び前記命令ポインタに対応する前記
フレームポインタを取りだし、前記命令ポインタを前記
プログラムカウンタに格納し、前記プログラムカウンタ
に格納された前記命令ポインタを取りだし、取り出され
た前記命令ポインタで指示された前記命令列の前記先頭
命令の格納されているアドレスを決定し、前記フレーム
ポインタで指定される前記データ記憶領域に対して、前
記先頭命令から始まる前記命令列における演算処理を順
次に実行するときに、前記継続バッファ中に格納された
前記命令ポインタで指示された前記命令列をあらかじめ
前記高速バッファメモリへプリフェッチすることを特徴
とするプロセッサの制御方法。
[1] Continuation buffer that stores an instruction pointer that specifies the address of the first instruction in an instruction string that is a series of executable instructions and a frame pointer that specifies a data storage area that stores data corresponding to the instruction string And a program counter for designating an address of an instruction currently being executed, and a high-speed buffer memory having a plurality of buffer memory lines for storing instructions and data, in the processor, the instruction stored in the continuation buffer. The pointer and the frame pointer corresponding to the instruction pointer are fetched, the instruction pointer is stored in the program counter, the instruction pointer stored in the program counter is fetched, and the instruction designated by the fetched instruction pointer Stores the first instruction in the row The instruction stored in the continuation buffer when the arithmetic operation in the instruction sequence starting from the first instruction is sequentially executed for the data storage area designated by the frame pointer. A method of controlling a processor, characterized in that the instruction sequence designated by a pointer is prefetched into the high-speed buffer memory in advance.

【0023】[2] 前記高速バッファメモリを構成す
る前記バッファメモリラインに格納できる長さに前記命
令列の長さを制限することを特徴とする請求項1に記載
のプロセッサの制御方法。
[2] The method of controlling a processor according to claim 1, wherein the length of the instruction string is limited to a length that can be stored in the buffer memory line that constitutes the high-speed buffer memory.

【0024】[3] 前記命令列の長さを示す命令列長
情報を前記命令ポインタと一緒に前記継続バッファへ格
納し、前記継続バッファ中に格納された前記命令ポイン
タ及び前記命令ポインタに対応する前記命令列長情報を
用いて、必要となる前記命令列が含まれる全ての前記バ
ッファメモリラインをあらかじめ前記高速バッファメモ
リへプリフェッチすることを特徴とする請求項1に記載
のプロセッサの制御方法。
[3] Instruction sequence length information indicating the length of the instruction sequence is stored in the continuation buffer together with the instruction pointer, and corresponds to the instruction pointer and the instruction pointer stored in the continuation buffer. The processor control method according to claim 1, wherein all the buffer memory lines including the required instruction sequence are prefetched into the high-speed buffer memory in advance by using the instruction sequence length information.

【0025】[4] 前記継続バッファ中に格納された
前記フレームポインタを用いて、必要となる前記データ
記憶領域をあらかじめ前記高速バッファメモリへプリフ
ェッチすることを特徴とする請求項1に記載のプロセッ
サの制御方法。
[4] The processor according to claim 1, wherein the necessary data storage area is prefetched into the high-speed buffer memory in advance by using the frame pointer stored in the continuation buffer. Control method.

【0026】[5] 前記データ領域が前記高速バッフ
ァメモリを構成する前記バッファメモリライン内に格納
できるように、前記データ領域の大きさを制限すること
を特徴とする請求項4に記載のプロセッサの制御方法。
[5] A processor according to claim 4, wherein the size of the data area is limited so that the data area can be stored in the buffer memory line forming the high speed buffer memory. Control method.

【0027】[6] 前記データ領域の大きさを示すフ
レームサイズ情報を前記フレームポインタと一緒に前記
継続バッファへ格納し、前記継続バッファ中に格納され
た前記フレームポインタ及び前記フレームポインタに対
応する前記フレームサイズ情報を用いて、必要となる前
記データ領域をあらかじめ前記高速バッファメモリへプ
リフェッチすることを特徴とする請求項1に記載のプロ
セッサの制御方法。
[6] Frame size information indicating the size of the data area is stored in the continuation buffer together with the frame pointer, and the frame pointer stored in the continuation buffer and the frame pointer corresponding to the frame pointer are stored. The processor control method according to claim 1, wherein the required data area is prefetched into the high-speed buffer memory in advance using frame size information.

【0028】[0028]

【実施例】図1は本発明による制御方法を適用したプロ
セッサの実施例を示したブロック構成図である。
1 is a block diagram showing an embodiment of a processor to which a control method according to the present invention is applied.

【0029】図1においてプロセッサ110は、継続バ
ッファ120、プログラムカウンタ130、高速バッフ
ァメモリ140、プリフェッチ装置150、演算実行装
置160およびレジスタ170から構成されている。
In FIG. 1, the processor 110 comprises a continuation buffer 120, a program counter 130, a high speed buffer memory 140, a prefetch device 150, an arithmetic execution device 160 and a register 170.

【0030】以下、図1を参照しながら、プロセッサ1
10の制御方法の概略を説明する。継続バッファ120
は、実行可能なスレッドの先頭命令アドレスを示す命令
ポインタと、この命令ポインタに対応するデータの記憶
領域を示すフレームポインタの対から構成される継続を
複数個記憶する。この継続バッファ120へ格納されて
いる継続は、継続入力情報111を用いて他のプロセッ
サから与えられるか、又は継続格納情報161を用いて
演算実行装置160から与えられる。
Hereinafter, referring to FIG. 1, the processor 1
An outline of the control method of 10 will be described. Continuation buffer 120
Stores a plurality of continuations each composed of a pair of an instruction pointer indicating the start instruction address of an executable thread and a frame pointer indicating a storage area of data corresponding to this instruction pointer. The continuation stored in the continuation buffer 120 is given from another processor using the continuation input information 111 or from the arithmetic execution unit 160 using the continuation storage information 161.

【0031】演算実行装置160が新たなスレッドを実
行可能になった時点で、継続バッファ120に格納され
た継続の内から一つが選択され、選択された継続に含ま
れる命令ポインタが命令ポインタ読みだし情報121を
用いてプログラムカウンタ130へ読み出される。読み
出された命令ポインタの値に応じて、命令アドレス通知
情報131が高速バッファメモリ140へ実行すべき命
令のアドレスを指定し、指定された命令が命令転送情報
141を用いて演算実行装置160へ読み出され、実行
される。
When the arithmetic execution unit 160 becomes able to execute a new thread, one is selected from the continuations stored in the continuation buffer 120, and the instruction pointer included in the selected continuation reads out the instruction pointer. It is read to the program counter 130 using the information 121. The instruction address notification information 131 specifies the address of the instruction to be executed in the high speed buffer memory 140 according to the value of the instruction pointer read, and the specified instruction is sent to the arithmetic execution unit 160 using the instruction transfer information 141. It is read and executed.

【0032】継続バッファ120から選択された継続に
含まれるフレームポインタは、フレームポインタ読みだ
し情報122を用いて演算実行装置160へ読み出され
る。命令ポインタで指定される命令から始まるスレッド
の中で、メモリへアクセスする命令がある場合、フレー
ムポインタを用いて当該データのアドレスが計算され、
データアドレス通知情報162を用いて高速バッファメ
モリ140へ通知される。データ転送情報142を用い
て、当該データのレジスタ170と高速バッファメモリ
140間での受け渡しが行なわれる。
The frame pointer included in the continuation selected from the continuation buffer 120 is read to the arithmetic execution unit 160 using the frame pointer read information 122. If there is an instruction to access the memory in the thread starting from the instruction specified by the instruction pointer, the address of the data is calculated using the frame pointer,
The high speed buffer memory 140 is notified using the data address notification information 162. The data transfer information 142 is used to transfer the data between the register 170 and the high speed buffer memory 140.

【0033】高速バッファメモリ140に必要な命令又
はデータが存在しない場合、当該命令又はデータはデー
タ転送情報181を用いてメインメモリ180から高速
バッファメモリ140へ転送される。高速バッファメモ
リは、複数のバッファメモリラインから構成されてお
り、上記のメインメモリ180と高速バッファメモリ1
40間の転送は、このバッファメモリライン単位で行な
われる。プリフェッチ装置150は、継続バッファに格
納された継続を継続先読み情報123を用いて読み出
し、読み出した継続の中の命令ポインタ又はフレームポ
インタをそれぞれ用いて、命令又はデータのプリフェッ
チをプリフェッチ要求情報151を用いてメインメモリ
180へ要求する。
When the required instruction or data does not exist in the high speed buffer memory 140, the instruction or data is transferred from the main memory 180 to the high speed buffer memory 140 using the data transfer information 181. The high speed buffer memory is composed of a plurality of buffer memory lines, and includes the main memory 180 and the high speed buffer memory 1 described above.
The transfer between 40 is performed in units of this buffer memory line. The prefetch device 150 reads the continuation stored in the continuation buffer using the continuation readahead information 123, uses the instruction pointer or frame pointer in the read continuation, respectively, and prefetches the instruction or data using the prefetch request information 151. Request to the main memory 180.

【0034】図2は、図1のプロセッサ110の実施例
に対する制御方法の第1の実施例を説明するための、プ
リフェッチ装置150と継続バッファ120の詳細ブロ
ック構成図である。図2において、本発明のプリフェッ
チ装置150は、命令プリフェッチ部210、データプ
リフェッチ部220およびアービトレータ230とから
構成される。
FIG. 2 is a detailed block diagram of the prefetch device 150 and the continuation buffer 120 for explaining the first embodiment of the control method for the embodiment of the processor 110 of FIG. In FIG. 2, the prefetch device 150 of the present invention comprises an instruction prefetch unit 210, a data prefetch unit 220 and an arbitrator 230.

【0035】命令プリフェッチ部210とデータプリフ
ェッチ部220は、それぞれ、高速バッファメモリモニ
タ部211,221とプリフェッチ要求発行部212,
222から構成される。また継続バッファ120は、継
続(1)226−1から継続(n)226−nまでのn
個(nは正の整数)の継続を記憶する。それぞれの継続
は命令ポインタ227−1、フレームポインタ227−
2から構成される。
The instruction prefetch unit 210 and the data prefetch unit 220 respectively include a high speed buffer memory monitor unit 211 and 221 and a prefetch request issuing unit 212, respectively.
It is composed of 222. Further, the continuation buffer 120 stores n from continuation (1) 226-1 to continuation (n) 226-n.
Store the number of continuations (n is a positive integer). Each continuation is indicated by an instruction pointer 227-1 and a frame pointer 227-1.
It consists of two.

【0036】継続バッファ120の構成方法の例として
は、FIFO(ファーストインファーストアウト)型の
キューとして構成する方法がある。すなわち、継続入力
情報111又は継続格納情報161から入力された継続
はキューの後尾に入力され、キューの先頭に向けて順に
送られる。スレッドの実行のために継続を取りだすとき
はキューの先頭にある継続(1)226−1から命令ポ
インタ読みだし情報121と命令ポインタ読みだし情報
122を用いて読み出す。
As an example of the method of configuring the continuation buffer 120, there is a method of configuring it as a FIFO (first in first out) type queue. That is, the continuation input from the continuation input information 111 or the continuation storage information 161 is input to the tail of the queue and sequentially sent toward the head of the queue. When the continuation is taken out for the execution of the thread, it is read from continuation (1) 226-1 at the head of the queue by using the instruction pointer read information 121 and the instruction pointer read information 122.

【0037】以下、図2を参照しながら、本発明による
プロセッサの制御方法の第1の実施例を説明する。
A first embodiment of the processor control method according to the present invention will be described below with reference to FIG.

【0038】プリフェッチ装置150は、継続先読み情
報123を用いて、将来実行される継続を継続バッファ
120から先読みし、これを用いて必要な命令又はデー
タのプリフェッチを行なう。
The prefetch device 150 uses the continuation prefetch information 123 to prefetch a continuation to be executed in the future from the continuation buffer 120, and uses this to prefetch necessary instructions or data.

【0039】継続バッファからの先読みを行なう方法の
例としては、継続がキューの先頭に達した時点で行なう
方法や、先頭から順にm番目(mはn以下の正の整数)
までの継続に対して先読みを行なう方法などがある。継
続先読み情報123を用いて先読みされた継続のうちの
命令ポインタ227−1は命令プリフェッチ部210内
の高速バッファメモリモニタ部211へ転送される。
As an example of a method of prefetching from the continuation buffer, a method of performing it when the continuation reaches the head of the queue, or the m-th from the head (m is a positive integer less than or equal to n)
There is a method such as prefetching for continuation until. The instruction pointer 227-1 of the continuation prefetched using the continuation prefetch information 123 is transferred to the high-speed buffer memory monitor unit 211 in the instruction prefetch unit 210.

【0040】高速バッファメモリモニタ部211は、命
令ポインタ227−1で指定される命令を含むバッファ
メモリラインが高速バッファメモリに含まれるかどうか
を高速バッファメモリ検査情報152を用いて検査す
る。含まれていなければ、プリフェッチ要求発行部21
2がそのバッファメモリラインのプリフェッチ要求を発
行する。また、先読みされた継続のうちのフレームポイ
ンタ227−2は、データプリフェッチ部内の高速バッ
ファメモリモニタ部221へ転送される。
The high speed buffer memory monitor unit 211 uses the high speed buffer memory inspection information 152 to inspect whether or not the buffer memory line including the instruction designated by the instruction pointer 227-1 is included in the high speed buffer memory. If not included, the prefetch request issuing unit 21
2 issues a prefetch request for that buffer memory line. The frame pointer 227-2 of the prefetched continuation is transferred to the high speed buffer memory monitor unit 221 in the data prefetch unit.

【0041】高速バッファメモリモニタ部221は、フ
レームポインタ227−2で指定されるフレームの先頭
アドレスを含むバッファメモリラインが高速バッファメ
モリに含まれるかどうかを高速バッファメモリ検査情報
152を用いて検査する。含まれていなければ、プリフ
ェッチ要求発行部222がそのブロックのプリフェッチ
要求を発行する。アービトレータ230は、命令プリフ
ェッチ部210とデータプリフェッチ部220からのプ
リフェッチ要求が同時に発生した場合に、それらの間の
調停を行ない、プリフェッチ要求情報151を用いてメ
インメモリ180へプリフェッチを要求する。アービト
レーション方法の例としては、命令プリフェッチ部21
0からのプリフェッチ要求を常に優先する方法があげら
れる。
The high speed buffer memory monitor 221 uses the high speed buffer memory inspection information 152 to inspect whether or not the buffer memory line including the head address of the frame designated by the frame pointer 227-2 is included in the high speed buffer memory. . If it is not included, the prefetch request issuing unit 222 issues the prefetch request for the block. When prefetch requests from the instruction prefetch unit 210 and the data prefetch unit 220 occur at the same time, the arbitrator 230 arbitrates between them and uses the prefetch request information 151 to request prefetch from the main memory 180. As an example of the arbitration method, the instruction prefetch unit 21
There is a method in which the prefetch request from 0 is always prioritized.

【0042】上に説明した制御方法の第1の実施例で
は、プリフェッチされるバッファメモリラインが、命令
ポインタ227−1で指定される命令、又はフレームポ
インタ227−2で指定されるデータを含むことは保証
されても、上記命令ポインタ227−1で指定される命
令から始まるスレッド全て、又はフレームポインタ22
7−2で指定されるフレーム全てを含むことは保証され
ない。従って、スレッドの実行中に、高速バッファメモ
リ140に必要な命令又はデータが存在しないことがあ
る。
In the first embodiment of the control method described above, the prefetched buffer memory line contains the instruction specified by the instruction pointer 227-1 or the data specified by the frame pointer 227-2. Is guaranteed, all threads starting from the instruction specified by the instruction pointer 227-1 or the frame pointer 22
It is not guaranteed to include all the frames specified in 7-2. Therefore, during execution of the thread, the necessary instruction or data may not exist in the high speed buffer memory 140.

【0043】本発明によるプロセッサの制御方法の第2
の実施例は、このような点を改善するために、プロセッ
サの制御方法の第1の実施例に加えて、スレッドまたは
フレームが一つのバッファメモリラインの中に含まれる
ように、スレッドまたはフレームの大きさを制限するも
のである。これにより、命令ポインタ227−1又はフ
レームポインタ227−2の指定に応じてバッファメモ
リラインをプリフェッチすることにより、スレッドの全
ての命令およびデータを、スレッドの実行前に高速バッ
ファメモリ140にプリフェッチすることが可能にな
る。
A second method of controlling a processor according to the present invention
In order to improve such a point, in addition to the first embodiment of the control method of the processor, the embodiment of the above-mentioned method of the thread or the frame of the thread or frame is included in one buffer memory line. It limits the size. Thus, by prefetching the buffer memory line according to the designation of the instruction pointer 227-1 or the frame pointer 227-2, all the instructions and data of the thread are prefetched to the high speed buffer memory 140 before the execution of the thread. Will be possible.

【0044】図3は、図1のプロセッサ110の実施例
に対する制御方法の第3の実施例を説明するための、継
続バッファ120の詳細ブロック構成図である。図3に
おいて、継続バッファ120は継続(1)326−1か
ら継続(n)326−nまでのn個(nは正の整数)の
継続を記憶する。それぞれの継続は命令ポインタ327
−1、フレームポインタ327−2、スレッド長情報3
27−3、フレームサイズ情報327−4から構成され
る。
FIG. 3 is a detailed block diagram of the continuation buffer 120 for explaining the third embodiment of the control method for the embodiment of the processor 110 of FIG. In FIG. 3, the continuation buffer 120 stores n (n is a positive integer) continuations from continuation (1) 326-1 to continuation (n) 326-n. Each continuation is an instruction pointer 327
-1, frame pointer 327-2, thread length information 3
27-3 and frame size information 327-4.

【0045】この第3の実施例においては、継続のなか
にスレッドの長さを示すスレッド長情報327−3とフ
レームの大きさを示すフレームサイズ情報327−4が
含まれることが特徴である。プリフェッチ装置150は
これらの情報を用いて、以下のようなプリフェッチ動作
を行なう。まず命令のプリフェッチを行なう際は、命令
ポインタ327−1とスレッド長情報327−3を用い
て、スレッドを含んでいる全てのバッファメモリライン
を計算する。計算の結果判明したバッファメモリライン
が高速バッファメモリ140に格納されているかどうか
高速バッファメモリ検査情報152を用いて順次検査
し、含まれていなければ、プリフェッチ要求を順次発行
する。
The third embodiment is characterized in that the continuation includes thread length information 327-3 indicating the thread length and frame size information 327-4 indicating the frame size. The prefetch device 150 uses these pieces of information to perform the following prefetch operation. First, when prefetching an instruction, all buffer memory lines including the thread are calculated using the instruction pointer 327-1 and the thread length information 327-3. Whether or not the buffer memory line found as a result of the calculation is stored in the high speed buffer memory 140 is sequentially inspected using the high speed buffer memory inspection information 152, and if not included, the prefetch requests are sequentially issued.

【0046】また、データのプリフェッチを行なう際
は、フレームポインタ327−2とフレームサイズ情報
327−4を用いて、フレームを含んでいる全てのバッ
ファメモリラインを計算する。計算の結果判明したバッ
ファメモリラインが高速バッファメモリ140に格納さ
れているかどうか高速バッファメモリ検査情報152を
用いて順次検査し、含まれていなければ、プリフェッチ
要求を順次発行する。これにより、スレッドの全ての命
令およびデータを、スレッドの実行前に高速バッファメ
モリ140にプリフェッチすることが可能になる。
When prefetching data, all the buffer memory lines including the frame are calculated using the frame pointer 327-2 and the frame size information 327-4. Whether or not the buffer memory line found as a result of the calculation is stored in the high speed buffer memory 140 is sequentially inspected using the high speed buffer memory inspection information 152, and if not included, the prefetch requests are sequentially issued. This allows all instructions and data of a thread to be prefetched into the high speed buffer memory 140 before execution of the thread.

【0047】[0047]

【発明の効果】本発明のプロセッサの制御方法によれ
ば、簡単なハードウェア構成により、マルチスレッド型
アーキテクチャのような継続バッファ又はそれに類似す
る機構を採用したプロセッサに対して、有効なプリフェ
ッチ技術を提供することができる。
According to the processor control method of the present invention, an effective prefetch technique can be applied to a processor adopting a continuation buffer such as a multithreaded architecture or a mechanism similar to it by a simple hardware configuration. Can be provided.

【0048】とくに、継続バッファがFIFOのキュー
として構成されている場合など、次に実行されるスレッ
ドが一意的にあらかじめ決定されている場合、本発明に
よるプロセッサの制御方法が提供するプリフェッチ技術
は、無駄な命令又はデータをプリフェッチすることな
く、次のスレッドの実行に必要となるデータだけでなく
命令も確実にプリフェッチすることができる。
In particular, when the thread to be executed next is uniquely determined in advance, such as when the continuation buffer is configured as a FIFO queue, the prefetch technique provided by the processor control method according to the present invention is It is possible to surely prefetch not only the data necessary for the execution of the next thread but also the instruction without prefetching useless instructions or data.

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

【図1】本発明によるプロセッサの制御方法を示すため
のプロセッサの実施例の構成図である。
FIG. 1 is a configuration diagram of an embodiment of a processor for illustrating a method of controlling a processor according to the present invention.

【図2】図1における継続バッファならびにプリフェッ
チ装置の構成を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of a continuation buffer and a prefetch device in FIG.

【図3】図1における継続バッファの構成を示すブロッ
ク図である。
3 is a block diagram showing a configuration of a continuation buffer in FIG. 1. FIG.

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

110 プロセッサ 111 継続入力情報 120 継続バッファ 121 命令ポインタ読みだし情報 122 フレームポインタ読みだし情報 123 継続先読み情報 130 プログラムカウンタ 131 命令アドレス通知情報 140 高速バッファメモリ 142 データ転送情報 150 プリフェッチ装置 151 プリフェッチ要求情報 152 高速バッファメモリ検査情報 160 演算実行装置 161 継続格納情報 162 データアドレス通知情報 170 レジスタ 180 メインメモリ 181 データ転送情報 210 命令プリフェッチ部 220 データプリフェッチ部 226−1,…,226−n 継続(1),…,継続
(n) 227−1 命令ポインタ 227−2 フレームポインタ 230 アービトレータ 211,221 高速バッファメモリモニタ部 212,222 プリフェッチ要求発行部 226 継続 326 継続 326−1,…,326−n 継続(1),…,継続
(n) 327−1 命令ポインタ 327−2 フレームポインタ 327−3 スレッド長情報 327−4 フレームサイズ情報
110 Processor 111 Continuation Input Information 120 Continuation Buffer 121 Instruction Pointer Readout Information 122 Frame Pointer Readout Information 123 Continuation Lookahead Information 130 Program Counter 131 Instruction Address Notification Information 140 High Speed Buffer Memory 142 Data Transfer Information 150 Prefetch Device 151 Prefetch Request Information 152 High Speed Buffer memory check information 160 Operation execution device 161 Continuous storage information 162 Data address notification information 170 Register 180 Main memory 181 Data transfer information 210 Instruction prefetch unit 220 Data prefetch unit 226-1, ..., 226-n Continuation (1), ..., Continuation (n) 227-1 Instruction pointer 227-2 Frame pointer 230 Arbitrator 211,221 High speed buffer memory monitor Part 212,222 Prefetch request issuing part 226 Continuation 326 Continuation 326-1, ..., 326-n Continuation (1), ..., Continuation (n) 327-1 Instruction pointer 327-2 Frame pointer 327-3 Thread length information 327- 4 Frame size information

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 実行可能な一連の命令である命令列にお
ける先頭命令のアドレスを指定する命令ポインタ及び前
記命令列に対応するデータを記憶するデータ記憶領域を
指定するフレームポインタを記憶する継続バッファと、 現在実行中の命令のアドレスを指定するプログラムカウ
ンタと、 複数のバッファメモリラインを有し命令及びデータを記
憶する高速バッファメモリとを具備するプロセッサにお
いて、 前記継続バッファ中に格納された前記命令ポインタ及び
該命令ポインタに対応する前記フレームポインタを取り
だし、 前記命令ポインタを前記プログラムカウンタに格納し、 前記プログラムカウンタに格納された前記命令ポインタ
を取りだし、 取り出された前記命令ポインタの指示に基づいて、前記
命令列の前記先頭命令の格納されているアドレスを決定
し、 前記フレームポインタで指定される前記データ記憶領域
に対して、前記先頭命令から始まる前記命令列における
演算処理を順次に実行するときに、 前記継続バッファ中に格納された前記命令ポインタで指
示された前記命令列をあらかじめ前記高速バッファメモ
リへプリフェッチすることを特徴とするプロセッサの制
御方法。
1. A continuation buffer for storing an instruction pointer for designating an address of a first instruction in an instruction sequence which is a series of executable instructions and a frame pointer for designating a data storage area for storing data corresponding to the instruction sequence. A processor having a program counter for designating an address of an instruction currently being executed and a high speed buffer memory having a plurality of buffer memory lines for storing instructions and data, wherein the instruction pointer stored in the continuation buffer And fetching the frame pointer corresponding to the instruction pointer, storing the instruction pointer in the program counter, fetching the instruction pointer stored in the program counter, and based on the instruction of the fetched instruction pointer, The first instruction of the instruction sequence is stored The instruction stored in the continuation buffer when sequentially executing the arithmetic processing in the instruction sequence starting from the first instruction to the data storage area specified by the frame pointer A method of controlling a processor, characterized in that the instruction sequence designated by a pointer is prefetched into the high-speed buffer memory in advance.
【請求項2】 前記高速バッファメモリを構成する前記
バッファメモリラインに格納できる長さに前記命令列の
長さを制限することを特徴とする請求項1に記載のプロ
セッサの制御方法。
2. The method of controlling a processor according to claim 1, wherein the length of the instruction sequence is limited to a length that can be stored in the buffer memory line that constitutes the high speed buffer memory.
【請求項3】 前記命令列の長さを示す命令列長情報を
前記命令ポインタと一緒に前記継続バッファへ格納し、 前記継続バッファ中に格納された前記命令ポインタ及び
前記命令ポインタに対応する前記命令列長情報を用い
て、 必要となる前記命令列が含まれる全ての前記バッファメ
モリラインをあらかじめ前記高速バッファメモリへプリ
フェッチすることを特徴とする請求項1に記載のプロセ
ッサの制御方法。
3. The instruction string length information indicating the length of the instruction string is stored in the continuation buffer together with the instruction pointer, and the instruction pointer stored in the continuation buffer and the instruction pointer corresponding to the instruction pointer. 2. The processor control method according to claim 1, wherein all the buffer memory lines including the required instruction sequence are prefetched into the high-speed buffer memory in advance using the instruction sequence length information.
【請求項4】 前記継続バッファ中に格納された前記フ
レームポインタを用いて、 必要となる前記データ記憶領域をあらかじめ前記高速バ
ッファメモリへプリフェッチすることを特徴とする請求
項1に記載のプロセッサの制御方法。
4. The control of the processor according to claim 1, wherein the necessary data storage area is prefetched into the high-speed buffer memory in advance by using the frame pointer stored in the continuation buffer. Method.
【請求項5】 前記データ領域が前記高速バッファメモ
リを構成する前記バッファメモリライン内に格納できる
ように、前記データ領域の大きさを制限することを特徴
とする請求項4に記載のプロセッサの制御方法。
5. The control of the processor according to claim 4, wherein the size of the data area is limited so that the data area can be stored in the buffer memory line forming the high speed buffer memory. Method.
【請求項6】 前記データ領域の大きさを示すフレーム
サイズ情報を前記フレームポインタと一緒に前記継続バ
ッファへ格納し、 前記継続バッファ中に格納された前記フレームポインタ
及び前記フレームポインタに対応する前記フレームサイ
ズ情報を用いて、 必要となる前記データ領域をあらかじめ前記高速バッフ
ァメモリへプリフェッチすることを特徴とする請求項1
に記載のプロセッサの制御方法。
6. Frame size information indicating a size of the data area is stored in the continuation buffer together with the frame pointer, and the frame pointer stored in the continuation buffer and the frame corresponding to the frame pointer. 2. The size information is used to prefetch the required data area into the high-speed buffer memory in advance.
The method of controlling the processor according to.
JP5201469A 1993-08-13 1993-08-13 Processor control method Expired - Fee Related JP2522176B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5201469A JP2522176B2 (en) 1993-08-13 1993-08-13 Processor control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5201469A JP2522176B2 (en) 1993-08-13 1993-08-13 Processor control method

Publications (2)

Publication Number Publication Date
JPH0756755A true JPH0756755A (en) 1995-03-03
JP2522176B2 JP2522176B2 (en) 1996-08-07

Family

ID=16441604

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5201469A Expired - Fee Related JP2522176B2 (en) 1993-08-13 1993-08-13 Processor control method

Country Status (1)

Country Link
JP (1) JP2522176B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005100034A (en) * 2003-09-24 2005-04-14 Matsushita Electric Ind Co Ltd Information processing control system
US6948034B2 (en) 2001-11-30 2005-09-20 Nec Corporation Method for use of stack
JP2006040141A (en) * 2004-07-29 2006-02-09 Fujitsu Ltd Multithread processor
JP2008305082A (en) * 2007-06-06 2008-12-18 Kawasaki Microelectronics Kk Memory system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4680340B2 (en) * 1999-12-14 2011-05-11 独立行政法人科学技術振興機構 Processor

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6948034B2 (en) 2001-11-30 2005-09-20 Nec Corporation Method for use of stack
JP2005100034A (en) * 2003-09-24 2005-04-14 Matsushita Electric Ind Co Ltd Information processing control system
US8135909B2 (en) 2003-09-24 2012-03-13 Panasonic Corporation System for starting a preload of a second program while a first program is executing
JP2006040141A (en) * 2004-07-29 2006-02-09 Fujitsu Ltd Multithread processor
JP2008305082A (en) * 2007-06-06 2008-12-18 Kawasaki Microelectronics Kk Memory system

Also Published As

Publication number Publication date
JP2522176B2 (en) 1996-08-07

Similar Documents

Publication Publication Date Title
US5918033A (en) Method and apparatus for dynamic location and control of processor resources to increase resolution of data dependency stalls
JP3095802B2 (en) Data processing system with performance-enhancing instruction cache
US5297281A (en) Multiple sequence processor system
CA1325285C (en) Method and apparatus for ordering and queueing multiple memory requests
US5872985A (en) Switching multi-context processor and method overcoming pipeline vacancies
US5113521A (en) Method and apparatus for handling faults of vector instructions causing memory management exceptions
US7546444B1 (en) Register set used in multithreaded parallel processor architecture
KR100613923B1 (en) Context pipelines
US20040205719A1 (en) Hop method for stepping parallel hardware threads
JP4585647B2 (en) Support for multiple outstanding requests to multiple targets in a pipelined memory system
US5696939A (en) Apparatus and method using a semaphore buffer for semaphore instructions
JPH10301794A (en) Information processing system and loading method for cache memory
WO1997048042A1 (en) An operand cache for reducing latency of read instructions
US6892280B2 (en) Multiprocessor system having distributed shared memory and instruction scheduling method used in the same system
JP2522176B2 (en) Processor control method
US5897654A (en) Method and system for efficiently fetching from cache during a cache fill operation
US5623685A (en) Vector register validity indication to handle out-of-order element arrival for a vector computer with variable memory latency
EP0952527B1 (en) Interrupt processing
US20040128476A1 (en) Scheme to simplify instruction buffer logic supporting multiple strands
JP3112861B2 (en) Microprocessor
JP3147884B2 (en) Storage device and information processing device
JP3102399B2 (en) Data processing apparatus and method
JPH08161226A (en) Data look-ahead control method, cache controller and data processor
KR20000003930A (en) Instruction patch apparatus for decreasing loss when being instruction cache miss
JP2629479B2 (en) Information processing device

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: 19960402

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090531

Year of fee payment: 13

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100531

Year of fee payment: 14

LAPS Cancellation because of no payment of annual fees