JP2993342B2 - Microprocessor control method - Google Patents

Microprocessor control method

Info

Publication number
JP2993342B2
JP2993342B2 JP5333434A JP33343493A JP2993342B2 JP 2993342 B2 JP2993342 B2 JP 2993342B2 JP 5333434 A JP5333434 A JP 5333434A JP 33343493 A JP33343493 A JP 33343493A JP 2993342 B2 JP2993342 B2 JP 2993342B2
Authority
JP
Japan
Prior art keywords
frame
register
buffer memory
register bank
buffer
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
JP5333434A
Other languages
Japanese (ja)
Other versions
JPH07191908A (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 JP5333434A priority Critical patent/JP2993342B2/en
Publication of JPH07191908A publication Critical patent/JPH07191908A/en
Application granted granted Critical
Publication of JP2993342B2 publication Critical patent/JP2993342B2/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 microprocessor as a core of an information processing system.

【0002】[0002]

【従来の技術】一般にマイクロプロセッサは複数個のレ
ジスタを備えており、メインメモリあるいはレジスタ内
のデータを用いて演算処理を施し、演算結果をメインメ
モリあるいはレジスタへ書き込むことによりプログラム
を実行していく。これら複数のレジスタを総称してレジ
スタファイルと呼ぶ。レジスタファイル内のレジスタの
総数は32個、すなわち32ワード程度とするのが普通
である。CISC(Complex Instruct
ion Set Computer)アーキテクチャと
呼ばれるアーキテクチャを用いたプロセッサでは、メイ
ンメモリ内のデータを演算命令で指定し、指定されたメ
モリ上のデータを用いて直接演算を実行することが可能
である。一方、RISC(Reduced Instr
uction Set Computer)アーキテク
チャもしくはLoad/Storeアーキテクチャと呼
ばれるアーキテクチャを用いたマイクロプロセッサは、
メインメモリとレジスタ間の処理をロードとストアに限
っている。すなわち、メインメモリ内のデータに対して
はロード/ストア命令でしかアクセスできない。演算処
理はレジスタ内にロードされたデータを演算命令で指定
して処理を施すことにより行なう。どちらの型のアーキ
テクチャであっても、メインメモリ上のデータへのアク
セスは命令で指定されるワードもしくはそれ以下の単位
で行なわれる。ここでワードとはそのアーキテクチャで
のレジスタの大きさであり、通常32bitないしは6
4bitである。
2. Description of the Related Art Generally, a microprocessor is provided with a plurality of registers, performs arithmetic processing using data in a main memory or a register, and executes a program by writing an arithmetic result to the main memory or a register. . These registers are collectively called a register file. Usually, the total number of registers in the register file is 32, that is, about 32 words. CISC (Complex Instruction)
In a processor using an architecture called an "ion Set Computer" architecture, data in a main memory can be specified by an operation instruction, and an operation can be directly performed using data on the specified memory. On the other hand, RISC (Reduced Instrument)
Microprocessor using an architecture called an “action set computer” architecture or a load / store architecture is
Processing between main memory and registers is limited to load and store. That is, data in the main memory can be accessed only by load / store instructions. The arithmetic processing is performed by designating the data loaded in the register by an arithmetic instruction and performing the processing. In either type of architecture, access to data on the main memory is performed in units of words or less specified by instructions. Here, the word is the size of a register in the architecture, and is usually 32 bits or 6 bits.
It is 4 bits.

【0003】マイクロプロセッサのアーキテクチャの如
何を問わず、キャッシュメモリと一般に呼ばれる小規模
のバッファリング用のメモリ(以下バッファメモリと呼
ぶ)がメインメモリとレジスタの間に設けられるのが普
通である。バッファメモリは、小規模なメモリ装置の方
が大規模なメモリ装置よりも高速にアクセス可能である
ことと、メインメモリへのアクセスに局所性が存在する
ことを利用して、プログラムの実行を高速化するために
使用されるものである。これはメインメモリへのアクセ
ス時間がマイクロプロセッサの命令処理時間に比べて大
きく、メインメモリへのアクセス時間が性能低下要因に
なっているために考え出されたものである。一般に、バ
ッファメモリは複数のバッファラインからなっており、
メインメモリ上のあるデータが例えばロード命令などで
アクセスされると、そのデータを含むバッファライン分
の大きさの領域をメインメモリからコピーしてバッファ
メモリ内に保持する。このとき、ロード命令などで実際
にアクセスされたデータは、バッファメモリからレジス
タへロードされる。コピーされたメインメモリ領域をど
のバッファラインに保持するかはそのメインメモリアド
レスの一部を用いて決定される。バッファメモリとレジ
スタの間でのデータ転送の単位は、メインメモリへのア
クセスがワード単位以下に規定されているので、ワード
単位以下に限定される。
Regardless of the architecture of a microprocessor, a small-scale buffering memory (hereinafter referred to as a buffer memory) generally called a cache memory is generally provided between a main memory and a register. The buffer memory speeds up program execution by utilizing the fact that a small memory device can be accessed faster than a large memory device and that locality exists in access to the main memory. It is used to convert This was conceived because the access time to the main memory is longer than the instruction processing time of the microprocessor, and the access time to the main memory is a cause of performance degradation. Generally, a buffer memory is composed of a plurality of buffer lines,
When certain data on the main memory is accessed by, for example, a load instruction or the like, an area having a size corresponding to a buffer line including the data is copied from the main memory and held in the buffer memory. At this time, data actually accessed by a load instruction or the like is loaded from the buffer memory to the register. Which buffer line holds the copied main memory area is determined by using a part of the main memory address. The unit of data transfer between the buffer memory and the register is limited to the word unit or less since the access to the main memory is specified in the word unit or less.

【0004】実行するプログラムが幾つかの手続きから
なっており、それらの手続きの間で手続き呼び出しが行
なわれる場合、従来技術のマイクロプロセッサではレジ
スタファイルの使用にあたって次のような手順を実行す
る必要がある。なお、以下で親手続きとは呼び出す側の
手続き、子手続きとは呼び出された側の手続きを指す。
まず、手続き呼び出し時は、親手続きがレジスタに割り
付けて使用していた変数をメインメモリ内のスタック領
域に退避する必要がある。これは、これらの変数の値が
子手続きにより書き換えられてしまうのを避けるためで
ある。更に親手続きは子手続きに引き渡す引数をレジス
タファイル内、もしくは上記のスタック領域内に書き込
まねばならない。子手続きはこれらの引数を利用して処
理を行なう。手続き呼び出しの終了時には、スタック領
域に退避された親手続きの変数をレジスタに回復する。
このように手続き呼び出しにあたっては、メインメモリ
内のスタック領域へのアクセスが頻繁に生じる。多くの
場合、スタック領域はバッファメモリにコピーされてい
るので、バッファメモリへのアクセスが頻繁に生じるこ
とになる。
When a program to be executed is composed of several procedures, and a procedure is called between the procedures, a conventional microprocessor needs to execute the following procedure when using a register file. is there. In the following, the parent procedure refers to the calling procedure, and the child procedure refers to the called procedure.
First, when a procedure is called, it is necessary to save variables used by the parent procedure by allocating the registers to the stack area in the main memory. This is to prevent the values of these variables from being rewritten by the child procedure. Furthermore, the parent procedure must write the arguments to be passed to the child procedure in the register file or in the stack area described above. The child procedure performs processing using these arguments. At the end of the procedure call, the variables of the parent procedure saved in the stack area are restored to the registers.
As described above, when a procedure is called, a stack area in the main memory is frequently accessed. In many cases, the stack area is copied to the buffer memory, so that access to the buffer memory occurs frequently.

【0005】[0005]

【発明が解決しようとする課題】従来技術のマイクロプ
ロセッサの第1の問題点は、レジスタファイルとバッフ
ァメモリ間のデータ転送の転送バンド幅に関するもので
ある。以下これを説明する。
A first problem of the prior art microprocessor relates to the transfer bandwidth of data transfer between the register file and the buffer memory. This will be described below.

【0006】従来技術のマイクロプロセッサでは、既に
説明したように、レジスタファイルとバッファメモリ間
のデータの移動は命令で指定された1ワードもしくはそ
れ以下を単位として行なわれる。
In the conventional microprocessor, as described above, data is moved between the register file and the buffer memory in units of one word or less specified by an instruction.

【0007】一方、半導体集積回路技術の進展により、
バッファメモリはマイクロプロセッサの一部としてレジ
スタファイルなどと一緒に一つの集積回路チップに集積
されるようになっている。一般に、ある二つの回路ブロ
ックが別々の集積回路チップに存在する場合と、一つの
集積回路チップに集積された場合とでは、これらの回路
ブロック間の信号転送の転送バンド幅に対する物理的な
制約条件が大きく異なる。別々の集積回路チップに集積
される場合は、これら回路ブロック間の接続経路は集積
回路チップ間の境界を通らなければならない。すなわ
ち、集積回路チップの外部入出力ピンを通らざるを得な
いため、一般にピンネックと呼ばれる問題で、広い転送
バンド幅を確保することは難しい。具体的にいうと、一
つの集積回路チップあたりの外部入出力ピンの本数は1
993年の時点で500本程度であり、今後の実装技術
の進展により次第に多くなっていくことは予想されるも
のの、例えば1桁程度の向上は難しい問題である。ま
た、たとえ外部入出力ピンを増やすことが技術的に可能
であったとしても、これを増やすことにより実装コスト
や消費電力が増大することは避けられない。言い替える
と、別々の集積回路チップ間の転送バンド幅のコストは
非常に高い。一方、同一の集積回路チップ内に集積され
た回路ブロック同士の場合は、一つの集積回路チップ内
に相互の回路ブロック間の接続経路が閉じられるため、
半導体集積回路の微細配線技術を用いることにより、容
易に広い転送バンド幅を確保することが出来る。言い替
えると、同一の集積回路チップ内の信号転送の転送バン
ド幅のコストは非常に安い。より具体的に比較すると、
集積回路チップ内の配線間の間隔は1〜2ミクロン程度
であるのに対し、外部入出力ピン間の間隔は、100〜
200ミクロン程度であり、単位転送バンド幅あたりの
面積で二桁の違いがある。
On the other hand, with the development of semiconductor integrated circuit technology,
The buffer memory is integrated on a single integrated circuit chip together with a register file and the like as a part of the microprocessor. In general, when two certain circuit blocks are present on separate integrated circuit chips or when they are integrated on one integrated circuit chip, physical constraints on the transfer bandwidth of signal transfer between these circuit blocks are different. Are very different. When integrated on separate integrated circuit chips, the connection path between these circuit blocks must pass through the boundary between the integrated circuit chips. That is, since the external input / output pins of the integrated circuit chip must pass through, it is difficult to secure a wide transfer bandwidth due to a problem generally called a pin neck. Specifically, the number of external input / output pins per integrated circuit chip is one.
The number is about 500 as of 993, and it is expected that the number will gradually increase with the progress of the packaging technology in the future, but it is difficult to improve it by, for example, about one digit. Further, even if it is technically possible to increase the number of external input / output pins, it is inevitable that mounting costs and power consumption increase by increasing the number of external input / output pins. In other words, the cost of transfer bandwidth between separate integrated circuit chips is very high. On the other hand, in the case of circuit blocks integrated in the same integrated circuit chip, the connection path between the circuit blocks is closed in one integrated circuit chip,
By using the fine wiring technology of the semiconductor integrated circuit, a wide transfer bandwidth can be easily secured. In other words, the transfer bandwidth cost of signal transfer within the same integrated circuit chip is very low. More specifically,
The distance between the wirings in the integrated circuit chip is about 1-2 microns, while the distance between the external input / output pins is 100-
It is about 200 microns, and there is a two-digit difference in area per unit transfer bandwidth.

【0008】従来技術のマイクロプロセッサの第1の問
題点とは、バッファメモリとレジスタファイルが一つの
集積回路チップに集積できるようになり、既に説明した
ように両者の間のデータ転送の転送バンド幅を広げるこ
とが物理的には容易になっているにも関わらず、アーキ
テクチャの制約により転送バンド幅が1ワードの大きさ
に限られているという点である。言い替えると、従来の
マイクロプロセッサ技術は、集積回路技術が未だ未発達
であった時代のものであり、集積回路技術の進展をうま
く利用できないという問題を抱えている。メモリネック
という言葉で一般に言われているように、プロセッサの
性能の向上が、演算器の演算能力よりも、むしろメモリ
からレジスへデータをロードするデータ転送能力により
律速されていることを考え併せると、この問題点を解決
することはマイクロプロセッサをより高性能化する上で
非常に重要であると言える。
A first problem with the prior art microprocessor is that the buffer memory and the register file can be integrated on one integrated circuit chip, and the transfer bandwidth of data transfer between the two as described above. Is that the transfer bandwidth is limited to one word size due to architectural constraints, despite the fact that it is physically easy to increase the bandwidth. In other words, the conventional microprocessor technology is in an era when the integrated circuit technology is still underdeveloped, and has a problem that the development of the integrated circuit technology cannot be used effectively. Considering that the improvement in processor performance is limited by the data transfer capability of loading data from memory to the register, rather than the computational capability of the computing unit, as generally said by the term memory neck, It can be said that solving this problem is very important for improving the performance of the microprocessor.

【0009】従来技術のマイクロプロセッサの第2の問
題点は、手続き呼び出しの手順を実行するのに時間が掛
かるという問題である。既に説明した手続き呼びだしの
手順から分かるように、従来技術のマイクロプロセッサ
では、手続き呼びだし時に頻繁にバッファメモリにアク
セスする必要があり、これによりマイクロプロセッサの
性能が低下する。このような問題を解決するために、従
来技術の一つのしてレジスタウィンドウという方式が提
案されている。レジスタウィンドウについては、例え
ば、“Computer Architecture:
A Quantitative Approach,
John L.Hennessy&David A.P
atterson,Morgan Kaufmann
Publishers Inc.”等の文献に解説され
ている。以下簡単に説明する。レジスタウィンドウ方式
では、レジスタファイルは幾つかのレジスタウィンドウ
から構成されている。それぞれのレジスタウインドウは
次の4つの部分から構成される。すなわち、左隣のレジ
スタウィンドウと共有する部分、そのレジスタウィンド
ウに固有の部分、右隣のレジスタウィンドウと共有する
部分、レジスタファイル内の全てのレジスタウィンドウ
で共有する部分である。それぞれの手続きはそれぞれ違
ったレジスタウィンドウを使用する。レジスタウィンド
ウ毎に固有の部分が存在するので、この部分に固有の変
数を保持することにより、変数の退避/回復処理を行な
う必要はなくなる。また、隣合うレジスタウィンドウ同
士で共有する部分を用いて、この部分に引数を書き込
み、また読み出すことにより手続き呼び出しにおける引
数の引き渡しを行なうことができる。このようにレジス
タウィンドウ方式をとることにより、手続き呼びだし手
順を実行するにあたってバッファメモリもしくはメイン
メモリへのアクセスが頻繁に起こるという問題を解決す
ることが出来る。
A second problem with prior art microprocessors is that it takes a long time to execute the procedure call procedure. As can be seen from the procedure call procedure already described, in the prior art microprocessor, it is necessary to frequently access the buffer memory at the time of the procedure call, which degrades the performance of the microprocessor. In order to solve such a problem, a method called a register window, which is one of the prior arts, has been proposed. Regarding the register window, for example, “Computer Architecture:
A Quantitative Approach,
John L. Hennessy & David A. P
atterson, Morgan Kaufmann
Publishers Inc. In the register window method, the register file is made up of several register windows. Each register window is made up of the following four parts. That is, a part shared with the register window on the left side, a part unique to the register window, a part shared with the register window on the right side, and a part shared by all the register windows in the register file. Use a different register window.Since each register window has a unique part, it is not necessary to perform a variable save / restore process by holding a unique variable in this part. Write the argument in this part using the part shared by By using the register window method, it is possible to frequently access the buffer memory or main memory when executing the procedure call procedure. Can be solved.

【0010】しかし、レジスタウィンドウ方式を用いた
手続き呼び出しの場合にも、レジスタウィンドウのオー
バーフロー、アンダーフローという問題が存在する。レ
ジスタファイル中に存在するレジスタウィンドウの数
は、ハードウエアとして実現された数に固定されてしま
う。手続き呼び出しの深さがこの数より深くなってしま
った場合は、レジスタウィンドウのオーバーフローとア
ンダーフローという問題が起きる。このような場合、レ
ジスタウィンドウ方式は、オペレーテイングシステムが
割り込みを起こし、オーバーフロー時にはレジスタウィ
ンドウの記憶内容をメインメモリに退避するという処理
を行ない、アンダーフロー時にはメインメモリに退避さ
れた記憶内容をレジスタウィンドウに回復するとう処理
を行なう。このようなオペレーテイングシステムによる
割り込みは、マイクロプロセッサの実行環境を、実行中
のプログラムからオペレーティングシステムに切替える
などの処理をオーバーヘッドが大きく、マイクロプロセ
ッサの性能低下要因となっている。
However, even in the case of a procedure call using the register window method, there is a problem that the register window overflows or underflows. The number of register windows existing in the register file is fixed to the number implemented as hardware. If the procedure call is deeper than this number, register window overflow and underflow problems will occur. In such a case, the register window method is such that the operating system generates an interrupt, saves the contents of the register window to the main memory when an overflow occurs, and saves the saved contents to the main memory when the underflow occurs. The recovery process is performed. Such an interrupt by the operating system causes a large overhead in processing such as switching the execution environment of the microprocessor from the program being executed to the operating system, and causes a decrease in the performance of the microprocessor.

【0011】本発明の目的は、以上のようなマイクロプ
ロセッサの従来技術におけるバッファメモリ及びレジス
タファイルの問題点を統一的に解決することにある。
An object of the present invention is to unify the problems of the buffer memory and the register file in the conventional microprocessor as described above.

【0012】[0012]

【課題を解決するための手段】上記目的を達成するため
に、本発明によるマイクロプロセッサの制御方法は、以
下のような特徴を有している。
In order to achieve the above object, a microprocessor control method according to the present invention has the following features.

【0013】本発明におけるマイクロプロセッサは、レ
ジスタファイルとバッファメモリとを備え、前記レジス
タファイルが複数の互いに独立したレジスタバンクと、
レジスタバンク選択手段とから構成され、前記レジスタ
バンクがそれぞれ同じ数の複数のレジスタから構成さ
れ、前記バッファメモリが複数のバッファラインと、バ
ッファライン選択手段とから構成され、前記バッファラ
インが前記レジスタバンクと同じビット幅を持つよう構
成され、前記レジスタバンクもしくは前記バッファライ
ンのビット幅を持つデータとしてフレームを規定し、ま
た前記レジスタのビット幅を持つデータとしてワードを
規定し、前記レジスタファイルと前記バッファメモリと
の間で前記フレーム単位でデータを相互転送するための
第1のデータ転送手段により、前記バッファメモリと前
記レジスタフアイルとが接続され、前記バッファメモリ
と前記マイクロプロセッサの外部に存在するメインメモ
リとの間で前記フレーム単位、もしくはワード単位以下
でデータを相互転送するための第2のデータ転送手段に
より、前記バッファメモリと前記メインメモリとが接続
されている。
A microprocessor according to the present invention includes a register file and a buffer memory, wherein the register file includes a plurality of independent register banks.
Register bank selecting means, wherein the register bank comprises a plurality of registers of the same number, respectively, wherein the buffer memory comprises a plurality of buffer lines and buffer line selecting means, and wherein the buffer line comprises the register bank. The register file and the buffer are defined by defining a frame as data having a bit width of the register bank or the buffer line, and defining a word as data having a bit width of the register. A first data transfer means for mutually transferring data in a frame unit between the buffer memory and the register file; and a main memory existing outside the microprocessor and the buffer memory. Between the frame The second data transfer means for mutually transferring data following beam unit or a word unit, and the buffer memory and the main memory.

【0014】また、前記マイクロプロセッサにおける前
記第1のデータ転送手段は、前記フレームを一度に一括
して転送できる転送バンド幅を持っている。
Further, the first data transfer means in the microprocessor has a transfer bandwidth capable of transferring the frames at once.

【0015】本発明によるマイクロプロセッサの制御方
法は、前記マイクロプロセッサにおいて、前記フレーム
を一意に指定するアドレスとしてフレームアドレスを規
定し、また前記レジスタバンクを一意に指定する番号と
してレジスタバンク番号を規定し、前記フレームアドレ
スと前記レジスタバンク番号とを指示し、前記フレーム
アドレスを前記バッファライン選択手段に与えることに
より指定された前記バッファメモリ内の前記フレームを
前記バッファメモリよりロードし、前記レジスタバンク
番号を前記レジスタバンク選択手段に与えることにより
選択された前記レジスタバンクにロードされた前記フレ
ームを格納することと、前記フレームアドレスと前記レ
ジスタバンク番号とを指示し、前記レジスタバンク番号
を前記レジスタバンク選択手段に与えることにより選択
された前記レジスタバンクから前記フレームを読みだ
し、前記フレームアドレスを前記レジスタバンク選択手
段に与えることにより指定された前記バッファメモリ内
の前記フレームに読み出された前記フレームをストアす
ることと、前記ロードと前記ストアの各動作において、
前記フレームアドレスにより指定された前記フレームが
前記バッファメモリ内に存在しない場合、前記第2のデ
ータ転送手段を介して、前記メインメモリから前記バッ
ファメモリへ前記フレームを転送することを特徴として
いる。
In the microprocessor control method according to the present invention, in the microprocessor, a frame address is specified as an address for uniquely specifying the frame, and a register bank number is specified as a number for uniquely specifying the register bank. Indicating the frame address and the register bank number, loading the frame in the buffer memory specified by giving the frame address to the buffer line selecting means from the buffer memory, and setting the register bank number to Storing the loaded frame in the selected register bank by giving it to the register bank selecting means; indicating the frame address and the register bank number; and setting the register bank number to the register bank. Reading the frame from the register bank selected by applying the frame address to the register bank, and reading the frame into the frame in the buffer memory specified by applying the frame address to the register bank selecting unit. And in each of the loading and storing operations,
When the frame specified by the frame address does not exist in the buffer memory, the frame is transferred from the main memory to the buffer memory via the second data transfer unit.

【0016】[0016]

【作用】本発明のマイクロプロセッサでは、レジスタフ
ァイルとバッファメモリは、同じビット幅を持つレジス
タバンクとバッファラインでそれぞれ構成されている。
レジスタに格納されたデータをワードと呼び、レジスタ
バンクもしくはバッファラインに格納されたデータをフ
レームと呼ぶことにする。同じビット幅を持つため、レ
ジスタバンクに格納されたフレームはそのままバッファ
ラインに格納できるし、またその逆も成り立つ。レジス
タファイルとバッファメモリとを接続する第1のデータ
転送手段は、フレームを一度に一括して転送できるかも
しくはそれに準ずる広い転送バンド幅を持った転送手段
である。本発明では、この第1のデータ転送手段を介し
てフレーム単位でバッファメモリとレジスタファイル間
でデータをロードもしくはストアすることにより、上述
の従来技術の第1の問題点を解決している。
In the microprocessor of the present invention, the register file and the buffer memory are respectively constituted by a register bank and a buffer line having the same bit width.
Data stored in a register is called a word, and data stored in a register bank or a buffer line is called a frame. Since the frames have the same bit width, the frames stored in the register bank can be stored in the buffer line as they are, and vice versa. The first data transfer unit that connects the register file and the buffer memory is a transfer unit that can transfer frames all at once or has a wide transfer bandwidth equivalent thereto. The present invention solves the above-mentioned first problem of the related art by loading or storing data between the buffer memory and the register file in frame units via the first data transfer means.

【0017】更に、本発明ではバッファメモリとレジス
タファイル間の広い転送バンド幅を利用して、手続き呼
び出し手順の高速化を実現できる。すなわち、親手続き
はあるレジスタバンクを指定し、このレジスタバンクに
格納されたフレームをレジスタファイルからバッファメ
モリにストアする。これにより親手続きが使用していた
変数のバッファメモリへの退避を行なう。退避した変数
の回復は、逆に変数を含むフレームをフレーム単位でバ
ッファメモリからレジスタフレームへロードすることに
より実行する。これにより、1ワードずつ退避/回復処
理を行なう従来技術と比べて、手続き呼びだし手順の高
速化を図ることが出来る。更に、この方式では、手続き
呼び出しの深さが深い場合でも従来のレジスタウィンド
ウ方式を用いた場合のような、オペレーティングシステ
ムによる割り込みという問題は生じない。なぜなら、バ
ッファメモリからメインメモリへの退避および回復は全
てハードウェアにより自動的に実行できるからである。
すなわち、変数を記憶したフレームは第1のデータ転送
手段を介してバッファメモリに退避され、このバッファ
メモリに格納し切れなくなったフレームは第2のデータ
転送手段を介してハードウェア管理の下でメインメモリ
に退避される。このように、バッファメモリとレジスタ
フレーム間を広いバンド幅を持つデータ転送手段で結合
し、これを利用して変数の退避/回復処理を行なうこと
により、従来技術の問題点を解決し、手続き呼びだし手
順の高速化を図ることが出来る。
Further, according to the present invention, the procedure call procedure can be speeded up by utilizing a wide transfer bandwidth between the buffer memory and the register file. That is, the parent procedure specifies a certain register bank, and stores the frame stored in this register bank from the register file to the buffer memory. As a result, the variables used by the parent procedure are saved in the buffer memory. The recovery of the saved variables is executed by loading a frame including the variables from the buffer memory to the register frame in frame units. As a result, the procedure calling procedure can be sped up as compared with the prior art in which the save / restore processing is performed one word at a time. Further, in this method, even when the depth of the procedure call is deep, there is no problem of the interruption by the operating system as in the case of using the conventional register window method. This is because saving and restoring from the buffer memory to the main memory can all be automatically executed by hardware.
That is, the frame in which the variable is stored is saved to the buffer memory via the first data transfer means, and the frame which cannot be stored in the buffer memory becomes the main data under the hardware management via the second data transfer means. Saved in memory. As described above, the buffer memory and the register frame are connected by the data transfer means having a wide bandwidth, and the saving / restoring process of the variable is performed by using the data transfer means. The procedure can be speeded up.

【0018】[0018]

【実施例】図1は本発明によるマイクロプロセッサの一
実施例に関して、本発明に関する部分を示したブロック
構成図である。図1において、本発明の実施例では、一
例として、レジスタファイル110は4つのレジスタバ
ンク120から構成され、一つのレジスタバンクは8ワ
ードから構成されるものとしている。すなわち、レジス
タファイル110を構成するレジスタの総数は一例とし
て32個であるとしている。図1において、レジスタフ
ァイル110は4つのレジスタバンク120とレジスタ
バンク番号入力端子111から入力されたレジスタバン
ク番号を用いてレジスタバンク120を選択するレジス
タバンク選択手段130とから構成されており、レジス
タバンク120は8個のレジスタ125から構成されて
いる。また、バッファメモリ150はレジスタバンク1
20と同じビット幅を持つ複数のバッファライン160
とバッファライン選択手段170とから構成されてい
る。本実施例では、バッファメモリ150としてダイレ
クトマップ方式と一般に呼ばれる方式を採用したものを
一例として示している。バッファライン選択手段170
は、フレームアドレス入力手段151から入力されるフ
レームアドレスを用いて、フレームを格納すべきもしく
は読み出すべきバッファライン160を一意に選択し、
選択されたバッファライン160に格納されたフレーム
がフレームアドレスで指定されたものか否かを判断す
る。レジスタファイル110とバッファメモリ150の
間は第1のデータ転送手段180により接続されてい
る。この第1のデータ転送手段180はフレームを一度
に一括して転送できるだけの転送バンド幅を持ち、フレ
ームもしくはワード以下を単位としてデータの相方向の
転送を行なう。ここでワード以下とは、一般にマイクロ
プロセッサの処理単位として指定される、ワード、ハー
フワード、バイトなどのことを指す。またバッファメモ
リ150とメインメモリ接続端子191は第2のデータ
転送手段190により接続されている。メインメモリ接
続端子191はマイクロプロセッサの外部に存在するメ
インメモリと接続される。
FIG. 1 is a block diagram showing an embodiment of a microprocessor according to the present invention, showing parts related to the present invention. In FIG. 1, in the embodiment of the present invention, as an example, the register file 110 includes four register banks 120, and one register bank includes eight words. That is, it is assumed that the total number of registers constituting the register file 110 is 32 as an example. In FIG. 1, the register file 110 includes four register banks 120 and register bank selecting means 130 for selecting the register bank 120 using the register bank number input from the register bank number input terminal 111. 120 includes eight registers 125. Further, the buffer memory 150 stores the register bank 1
A plurality of buffer lines 160 having the same bit width as 20
And a buffer line selection means 170. In the present embodiment, an example is shown in which the buffer memory 150 employs a system generally called a direct map system. Buffer line selection means 170
Uses the frame address input from the frame address input means 151 to uniquely select a buffer line 160 to store or read a frame from,
It is determined whether or not the frame stored in the selected buffer line 160 is specified by the frame address. The first data transfer means 180 connects between the register file 110 and the buffer memory 150. The first data transfer means 180 has a transfer bandwidth sufficient to transfer frames at one time, and transfers data in the direction of phase in units of frames or words or less. Here, the word or less refers to a word, half word, byte, or the like, which is generally designated as a processing unit of a microprocessor. The buffer memory 150 and the main memory connection terminal 191 are connected by the second data transfer means 190. The main memory connection terminal 191 is connected to a main memory existing outside the microprocessor.

【0019】図2は図1で示した一実施例のレジスタフ
ァイル110とバッファメモリ150、及び第1のデー
タ転送手段180により詳細な構成の実施例を示すブロ
ック構成図である。本実施例においては、レジスタファ
イル110を半導体集積回路のメモリアレイ、特にスタ
ティクRAMを用いて構成している。また本実施例にお
いては1ワードを32ビット構成としている。図2にお
いて、レジスタファイル110内のレジスタバンク12
0は、ワードを構成する1ビットずつに対応する32個
のレジスタサブバンク220 0〜220 31から構
成される。一つのレジスタサブバンク220内には、一
つのレジスタバンク120を構成するワード数が8ワー
ドであることに対応して、8個のメモリセル225が存
在する。メモリセル225はワード線221とビット線
対222に接続されており、ワード線221はレジスタ
バンク選択手段130の出力につながっている。レジス
タバンク選択手段130の入力であるレジスタ番号はレ
ジスタ番号入力端子111から入力される。各ビット線
対22は読みとり/書き込み回路235に接続される。
読みとり/書き込み回路235はビット線対222を介
してフレームもしくはワードを単位としてレジスタファ
イルの読みとり/書き込みを行う。読みとり/書き込み
をどちらの単位で行なうかは、レジスタ選択制御信号入
力端子213から入力されるレジスタ選択制御信号をデ
コーダ230によりデコードし、読みとり/書き込み回
路235に与えることにより指定される。ワード単位で
これを行なう場合、同じくデコーダ230からワードの
位置を読みとり/書き込み回路235に指定する。な
お、図中でビット線対222を太線で示しているが、こ
れは図面の冗長を避けるために細部を省略したことを示
すためのものである。
FIG. 2 is a block diagram showing an embodiment of the detailed configuration of the register file 110, the buffer memory 150, and the first data transfer means 180 of the embodiment shown in FIG. In the present embodiment, the register file 110 is configured using a memory array of a semiconductor integrated circuit, particularly, a static RAM. In this embodiment, one word has a 32-bit configuration. In FIG. 2, the register bank 12 in the register file 110
0 is composed of 32 register subbanks 220 0 to 220 31 corresponding to each bit forming a word. In one register sub-bank 220, there are eight memory cells 225 corresponding to the number of words constituting one register bank 120 being eight. The memory cell 225 is connected to a word line 221 and a bit line pair 222, and the word line 221 is connected to an output of the register bank selecting means 130. A register number, which is an input of the register bank selection means 130, is input from a register number input terminal 111. Each bit line pair 22 is connected to a read / write circuit 235.
The read / write circuit 235 reads / writes the register file via the bit line pair 222 in units of frames or words. Which unit is to be used for reading / writing is specified by decoding the register selection control signal input from the register selection control signal input terminal 213 by the decoder 230 and supplying the decoded signal to the read / write circuit 235. When this is performed in word units, the position of the word is similarly designated from the decoder 230 to the read / write circuit 235. Note that the bit line pairs 222 are indicated by bold lines in the figure, but this is to indicate that details have been omitted in order to avoid redundancy in the drawing.

【0020】バッファメモリ150において、バッファ
ライン160は、レジスタバンク120の場合と同様
に、32個のバッファサブライン260 0〜260
31から構成される。一つのバッファサブライン260
を構成するメモリセル265の数は同様に8個である。
ワード線261はバッファライン選択手段170に接続
される。バッファライン選択手段170は、フレームア
ドレス入力端子151から入力されるフレームアドレス
を用いて一つのバッファライン160に対応するワード
線261を選択する。また、バッファライン選択手段1
70は選択されたバッファライン160が真にフレーム
アドレスにより指定されるものであるかどうかを判断
し、その結果を制御信号として読みとり/書き込み回路
275に送る。読みとり/書き込み回路275はビット
線対262に接続されており、選択されたバッファライ
ン160が真にフレームアドレスにより指定されたもの
であった場合、ビット線対262を介してフレーム単位
もしくはワード単位でデータの読みとり/書き込みを行
なう。選択されたバッファライン160が真にフレーム
アドレスで指定されるものではなかった場合、正しいフ
レームがメインメモリからバッファメモリ150に転送
され、バッファライン選択手段170で選択されたバッ
ファライン160に格納され、その後上と同様な動作を
行なう。このフレームの転送には、図1で示した第2の
データ転送手段190が用いられる。 第1のデータ転
送手段180は、256本のビット転送線282により
レジスタファイル110内の読みとり/書き込み回路2
35とバッファメモリ150内の読みとり/書き込み回
路275とを接続している。一本のビット転送線282
は、読みとり/書き込み回路235もしくは275で読
み出された1ビットの情報を読みとり/書き込み回路2
75もしくは235にそれぞれ互いに転送する。1本の
ビット転送線が一組のビット線対222に対応する。こ
れにより、レジスタファイル110とバッファメモリ1
50間で256ビットという広いバンド幅のデータ転送
手段を実現している。図2においてビット転送線282
はシフト回路280を経由している。シフト回路280
はフレームもしくはワード以下の単位のデータの転送に
関して以下のように機能する。フレーム単位でデータを
転送する場合は、ビット転送線282上の信号をそのま
ま転送する。ワード以下の単位のデータ転送の場合は、
要求されたワード以下のデータが要求された位置に転送
されるように横方向にビット転送線282上の信号をシ
フトして転送する。フレーム単位で転送するか否かと、
ワード以下の単位で転送を行なう場合のシフト方向とシ
フト幅とはシフト制御信号入力端子281から入力され
る。
In the buffer memory 150, the buffer line 160 has 32 buffer sub-lines 2600 to 260 as in the case of the register bank 120.
31. One buffer subline 260
Is eight in the same manner.
The word line 261 is connected to the buffer line selection means 170. The buffer line selection unit 170 selects a word line 261 corresponding to one buffer line 160 using the frame address input from the frame address input terminal 151. In addition, buffer line selecting means 1
70 determines whether the selected buffer line 160 is truly specified by the frame address, and sends the result to the read / write circuit 275 as a control signal. The read / write circuit 275 is connected to the bit line pair 262. If the selected buffer line 160 is truly specified by the frame address, the read / write circuit 275 is connected to the bit line pair 262 in frame units or word units. Read / write data. If the selected buffer line 160 is not truly specified by the frame address, the correct frame is transferred from the main memory to the buffer memory 150 and stored in the buffer line 160 selected by the buffer line selecting means 170, Thereafter, the same operation as above is performed. The second data transfer unit 190 shown in FIG. 1 is used for transferring the frame. The first data transfer means 180 is connected to the read / write circuit 2 in the register file 110 by the 256 bit transfer lines 282.
35 and a read / write circuit 275 in the buffer memory 150 are connected. One bit transfer line 282
Reads 1-bit information read by the read / write circuit 235 or 275,
75 or 235 respectively. One bit transfer line corresponds to one set of bit line pairs 222. As a result, the register file 110 and the buffer memory 1
A data transfer means having a wide bandwidth of 256 bits between 50 is realized. In FIG. 2, the bit transfer line 282
Pass through the shift circuit 280. Shift circuit 280
Works as follows for the transfer of data in units of frames or words or less. When transferring data in frame units, the signal on the bit transfer line 282 is transferred as it is. For data transfer in units of words or less,
The signal on the bit transfer line 282 is shifted and transferred in the horizontal direction so that data below the requested word is transferred to the requested position. Whether to transfer in frame units,
A shift direction and a shift width in the case of performing transfer in units of words or less are input from a shift control signal input terminal 281.

【0021】図3は図1に示した本発明によるマイクロ
プロセッサの一実施例を用いて、本発明によるマイクロ
プロセッサの制御方法の実施例を説明するための説明図
である。図3には本発明によるマイクロプロセッサの制
御方式の第1、第2の実施例で使用する命令の一覧と命
令の一覧に使用した略称とが示されている。第1の命令
であるload frame命令はバッファメモリ15
0から一つのフレームをレジスタファイル110にロー
ドするための命令である。この命令の略称をlfとす
る。レジスタバンク番号をlf命令の第1引数として指
定し、フレームアドレスを第2引数、第3引数の組で指
定する。第3引数はフレームアドレスのベースを格納し
たレジスタのレジスタ番号を指定し、このベースに第2
引数で指定される直値を加算してフレームアドレスを求
める。図3中では第3引数を[]でで囲んで示してい
る。このフレームアドレスで指定されたフレームをバッ
ファメモリ150からロードし、第1引数で指定された
レジスタバンク120に格納する。第2の命令であるs
tore frame命令はレジスタファイル110か
ら一つのフレームをバッファメモリ150にストアする
ための命令である。この命令の略称をsfとする。sf
命令の引数の構成はlf命令と同様である。第1引数で
指定されたレジスタバンク120に格納されたフレーム
を第2引数、第3引数で指定されたフレームアドレスに
対応するバッファライン160にストアする。第3から
第6の命令は従来技術のマイクロプロセッサにも存在す
る命令である。本実施例では、特に米国MIPS社が定
めているMIPSアーキテクチャと呼ばれるアーキテク
チャで定義されている命令形式にしたがって、これらの
命令を定めている。これらの命令の詳細は、既にあげた
文献“Computer Architecture:
A Quantitative Approach”な
どの文献に記載されているので説明を省略する。なお、
jump and link命令は、実行の際、命令の
引数として陽に指定されていない31番のレジスタに戻
り命令アドレスを書き込むので注意が必要である。
FIG. 3 is an explanatory diagram for explaining an embodiment of a microprocessor control method according to the present invention, using one embodiment of the microprocessor according to the present invention shown in FIG. FIG. 3 shows a list of instructions used in the first and second embodiments of the microprocessor control method according to the present invention and abbreviations used in the list of instructions. The load frame instruction as the first instruction is stored in the buffer memory 15.
This is an instruction for loading one frame from 0 into the register file 110. The abbreviation of this instruction is lf. The register bank number is specified as the first argument of the If instruction, and the frame address is specified by the set of the second and third arguments. The third argument specifies the register number of the register that stores the base of the frame address.
The frame address is obtained by adding the immediate value specified by the argument. In FIG. 3, the third argument is enclosed by []. The frame specified by the frame address is loaded from the buffer memory 150 and stored in the register bank 120 specified by the first argument. The second instruction, s
The store frame instruction is an instruction for storing one frame from the register file 110 in the buffer memory 150. The abbreviation of this instruction is sf. sf
The structure of the argument of the instruction is the same as that of the lf instruction. The frame stored in the register bank 120 specified by the first argument is stored in the buffer line 160 corresponding to the frame address specified by the second and third arguments. The third through sixth instructions are those that are also present in prior art microprocessors. In the present embodiment, these instructions are defined in accordance with an instruction format defined by an architecture called MIPS architecture defined by MIPS Corporation in the United States. Details of these instructions can be found in the previously cited document "Computer Architecture:
A Quantitative Approach "is described in the literature and the description is omitted.
It should be noted that the jump and link instruction writes the return instruction address to the 31st register which is not explicitly specified as an argument of the instruction at the time of execution.

【0022】図3において、load frame命
令、store frame命令は、本発明によるマイ
クロプロセッサの制御方法の特徴となる命令である。以
下、例として、load frame命令のより詳細な
動作を図1、図2を参照しながら説明する。load
frame命令が発行されると、第2引数と第3引数か
ら求められたフレームアドレスがバッファメモリ150
のフレームアドレス入力端子151から与えられ、バッ
ファライン選択手段170により一つのバッファライン
160が選択される。選択されたバッファライン160
が真にフレームアドレスで指定されたフレームを格納し
ているか否かがバッファライン選択手段170によりチ
ェックされ、もしそうであれば、読みとり/書き込み回
路275を介してフレームが読み出され、第1のデータ
転送手段180を介して一度に一括してレジスタファイ
ル110に転送される。指定されたフレームを格納して
いなかった場合は、メインメモリから第2のデータ転送
手段190を介してフレームが転送され、このフレーム
をバッファライン160に格納し、更にこのフレームを
第1のデータ転送手段180を介して一度に一括してレ
ジスタファイル110に転送する。一方、load f
rame命令の第1引数のレジスタバンク番号はレジス
タファイル110のレジスタバンク入力端子111から
入力され、レジスタバンク選択手段130によりレジス
タバンク120が選択される。この選択されたレジスタ
バンク120にバッファメモリ150から転送されたフ
レームが格納される。
In FIG. 3, a load frame instruction and a store frame instruction are instructions which characterize the microprocessor control method according to the present invention. Hereinafter, as an example, a more detailed operation of the load frame instruction will be described with reference to FIGS. load
When the frame instruction is issued, the frame address obtained from the second and third arguments is stored in the buffer memory 150.
, And one buffer line 160 is selected by the buffer line selecting means 170. Selected buffer line 160
Is stored by the buffer line selecting means 170 to determine whether or not the frame is truly stored in the frame specified by the frame address. If so, the frame is read out via the read / write circuit 275 and the first The data is transferred to the register file 110 all at once via the data transfer means 180. If the designated frame has not been stored, the frame is transferred from the main memory via the second data transfer means 190, the frame is stored in the buffer line 160, and the frame is transferred to the first data transfer section. The data is transferred to the register file 110 all at once via the means 180. On the other hand, load f
The register bank number of the first argument of the "rame" instruction is inputted from the register bank input terminal 111 of the register file 110, and the register bank 120 is selected by the register bank selecting means 130. The frame transferred from the buffer memory 150 is stored in the selected register bank 120.

【0023】本発明によるマイクロプロセッサの制御方
法では、これらの命令の他にも従来技術のマイクロプロ
セッサで使用されている命令を併用してマイクロプロセ
ッサの制御を行なうが、これらの命令は従来技術により
十分に開示されているので本実施例では説明を省略す
る。
In the microprocessor control method according to the present invention, in addition to these instructions, the instructions used in the conventional microprocessor are used together to control the microprocessor. The description is omitted in this embodiment because it is sufficiently disclosed.

【0024】図4は、図3に示した命令を用いて本発明
によるマイクロプロセッサの制御方法を示した第1の実
施例の説明図である。図4中左側に示したプログラムコ
ードに対し、既に説明した命令を用いた図中右側の命令
列を生成し、これを用いてマイクロプロセッサを制御す
ることによりプログラムコードを実行する。図4におい
て、プログラムコードはc言語で記述されている。この
プログラムコードはそれぞれ8個の要素を持つベクトル
xとyを加算し、その結果をベクトルzとするものであ
る。また、図4に示した命令列においてRB3、RB2
等は、それぞれレジスタバンク番号2、レジスタバンク
番号3等を意味する。またR8、R24等はそれぞれレ
ジスタ番号8、レジスタ番号24等を意味する。なお、
以下ではレジスタバンク番号2により指定されるレジス
タバンクをレジスタバンク2、レジスタ番号8で指定さ
れるレジスタをレジスタ8などと記載する。更にR4は
x[0]のアドレス、R5はy[0]のアドレス、R6
はz[0]のアドレスをそれぞれ保持しているのものと
し、ベクトルx、y、zはそれぞれフレームの境界に整
列されているものとする。本命令列では、最初にベクト
ルxとベクトルyとをレジスタバンク3とレジスタバン
ク2にそれぞれload frame命令でロードして
いる。次にレジスタバンク3とレジスタバンク2に格納
されたフレームの各ワードに対してadd命令で加算を
行ない、その結果をレジスタバンク1内の各レジスタに
書き込んでいる。ここで、レジスタ番号とレジスタバン
ク番号との対応関係を、レジスタ0からレジスタ7はレ
ジスタバンク0に、レジスタ8からレジスタ15はレジ
スタバンク1に、レジスタ16からレジスタ23はレジ
スタバンク2に、レジスタ24からレジスタ31はレジ
スタバンク3に、それぞれ含まれるものとする。最後
に、store frame命令を用い、レジスタバン
ク1に記憶されたフレームをベクトルzにストアする。
このように、本発明のマイクロプロセッサの制御方法で
は、フレームを単位として一括してデータのロードもし
くはストアを行なうことにより、ワードを単位とする場
合に比べて、バッファメモリへのアクセスの回数を削減
することが出来る。図4の実施例では、従来技術のマイ
クロプロセッサの制御方法では計24回のバッファメモ
リアクセスが必要であったのに対し、本発明では計3回
である。図5は、図3に示した命令を用いて本発明によ
るマイクロプロセッサの制御方法を示した第2の実施例
の説明図である。本実施例は、本発明によるマイクロプ
ロセッサの制御方法による手続き呼びだし手順を示した
ものである。図5中左側に示したc言語によるプログラ
ムコードは、mainという手続きからfooという手
続きを呼び出している。fooの引数は二つの整数であ
り、mainは外部整数変数x、yの値をこの引数とし
て与えている。図中右側に対応する命令列を示した。こ
の命令列では変数xとyのアドレスがレジスタ16とレ
ジスタ17に格納されていると仮定する。またレジスタ
バンク1に格納されたフレームはmainが使用する変
数を格納するために使用されていると仮定する。本命令
列では、まずxとyをload word命令でレジス
タバンク2内のレジスタにそれぞれロードする。次に、
mainの使用している変数を退避するために、レジス
タバンク1に格納されたフレームを、R29に格納され
たフレームアドレスで指定されるフレームにstore
frame命令を用いてストアする。更に、引数をf
ooに引き渡すためにxとyが格納されているレジスタ
バンク2のフレームをR30に格納されたフレームアド
レスで指定されるフレームにstoreframe命令
を用いてストアし、jump and link命令で
fooを呼び出す。fooはR30で指定されるフレー
ムアドレスからload frame命令でフレームを
呼び出してレジスタバンク2に格納し、mainからの
変数を受けとる。fooは最後にjump regis
ter命令でmainに戻り、mainはバッファメモ
リに退避されたフレームをレジスタバンク2にload
frame命令を用いて回復する。なお、ここで引数
の引き渡しをレジスタだけで行なえる場合は、本実施例
のようにレジスタバンク1に格納されたフレームをバッ
ファメモリにストアせずに、直接fooが使用すること
も可能である。
FIG. 4 is an explanatory diagram of the first embodiment showing a microprocessor control method according to the present invention using the instructions shown in FIG. For the program code shown on the left side in FIG. 4, an instruction sequence on the right side in the figure is generated using the previously described instructions, and the program code is executed by controlling the microprocessor using this. In FIG. 4, the program code is described in the c language. This program code adds vectors x and y each having eight elements, and makes the result a vector z. Further, in the instruction sequence shown in FIG.
Mean the register bank number 2, the register bank number 3, etc., respectively. Also, R8, R24, etc. mean register number 8, register number 24, etc., respectively. In addition,
Hereinafter, the register bank designated by the register bank number 2 is referred to as register bank 2, and the register designated by the register number 8 is referred to as register 8. Further, R4 is the address of x [0], R5 is the address of y [0], R6
Is assumed to hold the address of z [0], and the vectors x, y, and z are respectively aligned at the frame boundaries. In this instruction sequence, first, the vector x and the vector y are loaded into the register bank 3 and the register bank 2 by the load frame instruction, respectively. Next, addition is performed by an add instruction for each word of the frame stored in the register bank 3 and the register bank 2, and the result is written in each register in the register bank 1. Here, the correspondence between the register number and the register bank number is as follows. Register 0 to register 7 are in register bank 0, register 8 to register 15 are in register bank 1, register 16 to register 23 are in register bank 2, and register 24 is register 24. Therefore, the register 31 is included in the register bank 3. Finally, the frame stored in the register bank 1 is stored in the vector z using the store frame instruction.
As described above, according to the microprocessor control method of the present invention, the number of accesses to the buffer memory is reduced as compared with the case of using words as a unit by loading or storing data collectively in units of frames. You can do it. In the embodiment of FIG. 4, the buffer memory access is required a total of 24 times in the conventional microprocessor control method, whereas the control method of the present invention requires a total of three times. FIG. 5 is an explanatory diagram of a second embodiment showing a microprocessor control method according to the present invention using the instructions shown in FIG. This embodiment shows a procedure calling procedure by the microprocessor control method according to the present invention. The program code in the c language shown on the left side in FIG. 5 calls a procedure called foo from a procedure called main. The argument of foo is two integers, and main gives the values of the external integer variables x and y as this argument. The corresponding instruction sequence is shown on the right side of the figure. In this instruction sequence, it is assumed that the addresses of the variables x and y are stored in the registers 16 and 17. It is also assumed that the frame stored in register bank 1 is being used to store variables used by main. In this instruction sequence, first, x and y are loaded into the registers in the register bank 2 by a load word instruction. next,
In order to save the variables used by main, the frame stored in register bank 1 is stored in the frame specified by the frame address stored in R29.
Store using the frame instruction. Furthermore, the argument is f
In order to transfer the frame to oo, the frame of the register bank 2 in which x and y are stored is stored in the frame specified by the frame address stored in R30 by using the storeframe instruction, and foo is called by the jump and link instruction. foo calls a frame from a frame address specified by R30 by a load frame instruction, stores the frame in the register bank 2 , and receives a variable from main. foo is finally jump regis
ter instruction returns to main, and main loads the frame saved in the buffer memory to register bank 2.
Recover using the frame instruction. In this case, if the transfer of the argument can be performed only by the register, the foo can be used directly without storing the frame stored in the register bank 1 in the buffer memory as in the present embodiment.

【0025】このように、本発明のマイクロプロセッサ
の制御方法では、フレームを単位として一括してデータ
のロードもしくはストアを行なうことにより、ワードを
単位とする場合に比べて、手続き呼びだし手順を実行す
る際にバッファメモリへのアクセスの回数を減らすこと
が出来る。
As described above, in the microprocessor control method of the present invention, the procedure call procedure is executed by loading or storing data collectively in units of frames, as compared with the case of using units of words. In this case, the number of accesses to the buffer memory can be reduced.

【0026】なお以上説明してきた実施例の中で、図1
で示した本発明によるマイクロプロセッサの構成の実施
例では、レジスタファイル110とマイクロプロセッサ
内の演算器間の接続について説明を省略したが、これは
接続方法が従来技術により十分に開示されているからで
ある。例えば、図2に示したレジスタファイル110の
構成例で、レジスタファイル110を構成するメモリを
マルチポートメモリとし、それぞれのポートを演算器へ
データを供給するための読みとりポート、演算結果を格
納するための書き込みポートなどとすれば良い。また、
バッファメモリ150の構成方式についても本発明に関
連する部分以外については詳しく触れなかったが、これ
も従来技術により十分に開示されているからである。更
に、図1の実施例では、バッファメモリ150の構成と
してダイレクトマップ、レジスタファイル110内のワ
ードの数として32ワード、レジスタバンク120の数
として4レジスタバンクなどの例を上げたが、これらは
単なる例であり、他の種々の構成により本発明によるマ
イクロプロセッサを実現することが可能である。
In the embodiment described above, FIG.
In the embodiment of the configuration of the microprocessor according to the present invention, the description of the connection between the register file 110 and the arithmetic unit in the microprocessor is omitted, but this is because the connection method is sufficiently disclosed by the prior art. It is. For example, in the configuration example of the register file 110 shown in FIG. 2, the memory constituting the register file 110 is a multi-port memory, and each port is used to store a read port for supplying data to an arithmetic unit and an arithmetic result. Write port. Also,
Although the configuration of the buffer memory 150 was not described in detail except for parts related to the present invention, this is because it is sufficiently disclosed by the prior art. Further, in the embodiment of FIG. 1, the configuration of the buffer memory 150 includes a direct map, the number of words in the register file 110 is 32 words, and the number of register banks 120 is 4 register banks. This is an example, and the microprocessor according to the present invention can be realized by various other configurations.

【0027】[0027]

【発明の効果】以上説明してきたように、本発明による
マイクロプロセッサ及びその制御方法により、マイクロ
プロセッサを構成するバッファメモリおよびレジスタフ
ァイル間を広い転送バンドを持つデータ転送手段で接続
し、レジスタバンクもしくはバッファラインのサイズを
持ち、複数のワードの集合からなるデータであるフレー
ムを単位としてロードおよびストアを行なうことによ
り、バッファメモリへのアクセス回数を減らし、マイク
ロプロセッサの性能を向上することが可能となる。特
に、手続き呼びだし手順の実行の際に、フレームを単位
として変数の退避/回復、引数の引り渡し等を行なうこ
とにより、バッファメモリアクセスの回数を減少させる
ことができ、また従来技術であるレジスタウィンドウ方
式の場合のようなウィンドウのオーバーフローに伴うオ
ーバーヘッドの問題もないという効果がある。
As described above, according to the microprocessor and the control method thereof according to the present invention, the buffer memory and the register file constituting the microprocessor are connected by the data transfer means having a wide transfer band, and the register bank or the register bank is connected. By loading and storing data in units of frames each having a buffer line size and consisting of a set of a plurality of words, the number of accesses to the buffer memory can be reduced and the performance of the microprocessor can be improved. . In particular, during execution of the procedure call procedure, the number of times of buffer memory access can be reduced by saving / recovering variables and passing arguments in units of frames, thereby reducing the number of accesses to the register. There is an effect that there is no problem of the overhead due to the overflow of the window as in the case of the window system.

【0028】本発明によるマイクロプロセッサの一実施
例として図2に示した第1のデータ転送手段の構成は、
レジスタファイルとバッファメモリが同一の集積回路チ
ップに集積される場合、如何に容易に広いバンド幅を確
保できるかを示している。図2において、第1の転送手
段180を構成するビット転送線282は、ビット線対
222あるいは262あたり一本の割合で配置される。
このように、レジスタファイル110とバッファメモリ
150を隣合わせに配置し、お互いの間を微細間隔な並
行配線で接続するだけで、第1のデータ転送手段180
は実現されている。
The structure of the first data transfer means shown in FIG. 2 as one embodiment of the microprocessor according to the present invention is as follows.
This shows how a wide bandwidth can be easily secured when the register file and the buffer memory are integrated on the same integrated circuit chip. In FIG. 2, the bit transfer lines 282 constituting the first transfer means 180 are arranged at a ratio of one bit line pair 222 or 262 per bit line pair.
As described above, the first data transfer unit 180 can be provided simply by arranging the register file 110 and the buffer memory 150 side by side and connecting each other with finely spaced parallel wiring.
Has been realized.

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

【図1】本発明によるマイクロプロセッサの一実施例に
関して、本発明に関わる部分を示したブロック構成図で
ある。
FIG. 1 is a block diagram showing a part related to the present invention in one embodiment of a microprocessor according to the present invention.

【図2】図1の実施例に示したマイクロプロセッサの、
レジスタファイルとバッファメモリ及びそれらの間の接
続手段のより詳細な構成を示したブロック構成図であ
る。
FIG. 2 shows the microprocessor of the embodiment shown in FIG.
FIG. 4 is a block diagram showing a more detailed configuration of a register file, a buffer memory, and connection means between them.

【図3】本発明によるマイクロプロセッサの制御方法を
説明するための説明図である。
FIG. 3 is an explanatory diagram for explaining a microprocessor control method according to the present invention.

【図4】本発明によるマイクロプロセッサの制御方法の
第1の実施例を示した説明図である。
FIG. 4 is an explanatory diagram showing a first embodiment of a microprocessor control method according to the present invention.

【図5】本発明によるマイクロプロセッサの制御方法の
第2の実施例を示した説明図である。
FIG. 5 is an explanatory diagram showing a second embodiment of the microprocessor control method according to the present invention.

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

110 レジスタファイル 120 レジスタバンク 130 レジスタバンク選択手段 150 バッファメモリ 160 バッファライン 170 バッファライン選択手段 180 第1のデータ転送手段 190 第2のデータ転送手段 111 レジスタバンク番号入力端子 151 フレームアドレス入力端子 191 メインメモリ接続端子 Reference Signs List 110 register file 120 register bank 130 register bank selecting means 150 buffer memory 160 buffer line 170 buffer line selecting means 180 first data transfer means 190 second data transfer means 111 register bank number input terminal 151 frame address input terminal 191 main memory Connecting terminal

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06F 12/08 G06F 9/30 - 9/355 G06F 9/40 - 9/42 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 6 , DB name) G06F 12/08 G06F 9/30-9/355 G06F 9/40-9/42

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】レジスタファイルとバッファメモリとを備
え、前記レジスタファイルが複数の互いに独立したレジ
スタバンクと、レジスタバンク選択手段とから構成さ
れ、前記レジスタバンクがそれぞれ同じ数の複数のレジ
スタから構成され、前記バッファメモリが複数のバッフ
ァラインと、バッファライン選択手段とから構成され、
前記バッファラインが前記レジスタバンクと同じビット
幅を持つよう構成され、前記レジスタバンクもしくは前
記バッファラインのビット幅を持つデータとしてフレー
ムを規定し、また前記レジスタのビット幅を持つデータ
としてワードを規定し、前記フレームを一度に一括して
転送できる転送バンド幅を持ち、前記レジスタファイル
と前記バッファメモリとの間で前記フレーム単位でデー
タを相互転送するための第1のデータ転送手段により、
前記バッファメモリと前記レジスタフイルとが接続さ
れ、前記バッファメモリと前記マイクロプロセッサの外
部に存在するメインメモリとの間で前記フレーム単位、
もしくはワード単位以下でデータを相互転送するための
第2のデータ転送手段により、前記バッファメモリと前
記メインメモリとが接続されているマイクロプロセッサ
の制御法であって、前記フレームを一意に指定するアド
レスとしてフレームアドレスを規定し、また前記レジス
タバンクを一意に指定する番号としてレジスタバンク番
号を規定し、前記フレームアドレスと前記レジスタバン
ク番号とを指示し、前記フレームアドレスを前記バッフ
ァライン選択手段に与えることにより指定された前記バ
ッファメモリ内の前記フレームを前記バッファメモリよ
りロードし、前記レジスタバンク番号を前記レジスタバ
ンク選択手段に与えることにより選択された前記レジス
タバンクにロードされた前記フレームを格納すること
と、前記フレームアドレスと前記レジスタバンク番号と
を指示し、前記レジスタバンク番号を前記レジスタバン
ク選択手段に与えることにより選択された前記レジスタ
バンクから前記フレームを読みだし、前記フレームアド
レスを前記バッファライン選択手段に与えることにより
指定された前記バッファメモリ内の前記バッファライン
に読み出された前記フレームをストアすることと、前記
ロードの動作において、前記フレームアドレスにより指
定された前記フレームが前記バッファメモリ内に存在し
ない場合、前記第2のデータ転送手段を介して、前記メ
インメモリから前記バッファメモリへ前記フレームを転
送することを特徴とするマイクロプロセッサの制御方
法。
1. A register file comprising a register file and a buffer memory, wherein the register file comprises a plurality of independent register banks and register bank selecting means, and the register bank comprises a plurality of registers of the same number. Wherein the buffer memory comprises a plurality of buffer lines and buffer line selecting means,
The buffer line is configured to have the same bit width as the register bank, a frame is defined as data having the bit width of the register bank or the buffer line, and a word is defined as data having the register bit width. A first data transfer unit having a transfer bandwidth capable of transferring the frames at one time and transferring data between the register file and the buffer memory in units of the frames;
Said buffer memory and said Rejisutafu § yl and are connected, the frame between the main memory existing outside of the buffer memory and the microprocessor,
Alternatively, a microprocessor in which the buffer memory and the main memory are connected by second data transfer means for mutually transferring data in word units or less.
A control method, wherein a frame address is defined as an address uniquely specifying the frame, a register bank number is defined as a number uniquely specifying the register bank, and the frame address and the register bank number are defined as The frame in the buffer memory designated by giving the instruction and giving the frame address to the buffer line selecting means is loaded from the buffer memory, and the frame is selected by giving the register bank number to the register bank selecting means. Storing the loaded frame in the register bank, indicating the frame address and the register bank number, and providing the register bank number to the register bank selecting means from the selected register bank. The frame Read the beam, and to store the frame in which the read buffer line <br/> in the designated said buffer memory by providing the frame address to the buffer line selecting means, wherein
In the loading operation, when the frame specified by the frame address does not exist in the buffer memory, transferring the frame from the main memory to the buffer memory via the second data transfer unit. Characteristic microprocessor control method.
【請求項2】 請求項1記載のマイクロプロセッサの制
御方法において、更に、親手続きから子手続きを呼び出
す手続き呼びだしの際、前記親手続きが使用している変
数の前記バッファメモリへの退避処理及び前記レジスタ
ファイルへの回復処理を、前記フレームを前記第1のデ
ータ転送手段を介して前記バッファメモリと前記レジス
タファイル間でストアおよびロードすることにより行な
い、前記バッファメモリを介した前記親手続きから前記
子手続きへの引数の引き渡しを、前記引数が書き込まれ
た前記フレームを前記親手続きが前記バッファメモリに
ストアし、前記引数が書き込まれた前記フレームを前記
子手続きが前記レジスタファイルにロードすることによ
り行なうことを特徴とするマイクロプロセッサの制御方
法。
2. The microprocessor control method according to claim 1, further comprising, when calling a procedure calling a child procedure from a parent procedure, saving variables used by said parent procedure to said buffer memory; The restoration process to the register file is performed by storing and loading the frame between the buffer memory and the register file via the first data transfer means, and from the parent procedure via the buffer memory to the child The passing of the argument to the procedure is performed by the parent procedure storing the frame in which the argument is written in the buffer memory, and loading the frame in which the argument is written into the register file by the child procedure. A method for controlling a microprocessor, comprising:
JP5333434A 1993-12-27 1993-12-27 Microprocessor control method Expired - Lifetime JP2993342B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5333434A JP2993342B2 (en) 1993-12-27 1993-12-27 Microprocessor control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5333434A JP2993342B2 (en) 1993-12-27 1993-12-27 Microprocessor control method

Publications (2)

Publication Number Publication Date
JPH07191908A JPH07191908A (en) 1995-07-28
JP2993342B2 true JP2993342B2 (en) 1999-12-20

Family

ID=18266067

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5333434A Expired - Lifetime JP2993342B2 (en) 1993-12-27 1993-12-27 Microprocessor control method

Country Status (1)

Country Link
JP (1) JP2993342B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1616415B1 (en) * 2003-04-22 2009-06-03 Agere Systems Inc. Method and apparatus for shared multi-bank memory
JP6418659B2 (en) * 2014-07-08 2018-11-07 インテル・コーポレーション System, program, and computer-readable storage medium for realizing area reduction by co-optimizing logic core block and memory redundancy

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61262922A (en) * 1985-05-17 1986-11-20 Fujitsu Ltd High-speed stack circuit for resister data
JPH05165641A (en) * 1991-04-30 1993-07-02 Toshiba Corp Single chip microcomputer

Also Published As

Publication number Publication date
JPH07191908A (en) 1995-07-28

Similar Documents

Publication Publication Date Title
EP0148478B1 (en) A data processor with control of the significant bit lenghts of general purpose registers
JP2539199B2 (en) Digital processor controller
US7694109B2 (en) Data processing apparatus of high speed process using memory of low speed and low power consumption
JP2644780B2 (en) Parallel computer with processing request function
US5740093A (en) 128-bit register file and 128-bit floating point load and store for quadruple precision compatibility
US5713038A (en) Microprocessor having register file
US4562538A (en) Microprocessor having decision pointer to process restore position
JP2001216194A (en) Arithmetic processor
CZ1695A3 (en) Microprocessor unit for generating address with segment addresses
JPS63156236A (en) Register device
US5764959A (en) Adaptive 128-bit floating point load and store instructions for quad-precision compatibility
JP2523814B2 (en) Moveout system
JP2993342B2 (en) Microprocessor control method
EP1039376B1 (en) Sub-instruction emulation in a VLIW processor
JPS6319058A (en) Memory device
JP2562838B2 (en) Processor and store buffer control method
JP3771682B2 (en) Vector processing equipment
JP4421148B2 (en) Debug system
KR970006411B1 (en) Output device of memory
JP3074897B2 (en) Memory circuit
JP2883488B2 (en) Instruction processing unit
JP2942449B2 (en) Data processing device
JPS5836434B2 (en) Batshua Memory Souch
JPH0926945A (en) Information processor
JPS6149695B2 (en)

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

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

Free format text: PAYMENT UNTIL: 20071022

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20081022

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20091022

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20091022

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20101022

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20111022

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20121022

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20131022

Year of fee payment: 14

EXPY Cancellation because of completion of term