JPS61136131A - Information processor - Google Patents

Information processor

Info

Publication number
JPS61136131A
JPS61136131A JP25759084A JP25759084A JPS61136131A JP S61136131 A JPS61136131 A JP S61136131A JP 25759084 A JP25759084 A JP 25759084A JP 25759084 A JP25759084 A JP 25759084A JP S61136131 A JPS61136131 A JP S61136131A
Authority
JP
Japan
Prior art keywords
register
physical
instruction
physical register
logical
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.)
Pending
Application number
JP25759084A
Other languages
Japanese (ja)
Inventor
Eiki Kamata
釜田 栄樹
Yoichi Shintani
洋一 新谷
Toru Shonai
亨 庄内
Shigeo Takeuchi
武内 茂雄
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.)
Hitachi ULSI Engineering Corp
Hitachi Ltd
Original Assignee
Hitachi ULSI Engineering Corp
Hitachi 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 Hitachi ULSI Engineering Corp, Hitachi Ltd filed Critical Hitachi ULSI Engineering Corp
Priority to JP25759084A priority Critical patent/JPS61136131A/en
Publication of JPS61136131A publication Critical patent/JPS61136131A/en
Pending legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To simplify the control with an information processor by attaining the dynamic allocation of registers just in a single block with no intervention of control signals given from other function blocks. CONSTITUTION:A virtual register control circuit 4 contains a conversion table showing the correspondence between logical and physical register numbers. When the signal ASP requesting the new allocation is set at ''0'', the logical register numbers LR1, LR2 and LWR are converted into physical register numbers PR1, PE2 and PWR respectively with retrieval of the conversion table. In the dame way, the numbers LR1 and LR2 are converted into PR1 and PR2 respectively when the signal ASP sent to a register unit 5 is set at ''1''. However the LWR undergoes a different conversion process. That is, a physical number which is not presently registered in the conversion table is selected and then delivered as the PWR. Then the physical register number entered to the conversion table and corresponding to the LWR is rewritten to the selected physical register number.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明はディジタルコンピュータに係り、特に複数命令
を並列に処理することによって高速化を図る際に動的な
レジスタ割当てを行う情報処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a digital computer, and particularly to an information processing device that dynamically allocates registers when processing multiple instructions in parallel to increase speed.

〔発明の背景〕[Background of the invention]

複数の命令処理を並列に行うことによって処理の高速化
を図るマシンにおいて、並列に処理すべきデータの間に
は依存関係がないにもかかわらずそれらの処理が同一レ
ジスタの使用を指定しているという理由で並列処理が阻
害され処理能力の低下を招くことがある。この同一レジ
スタの繰返し使用に起因する並列処理阻害要因を除去す
るために、仮想レジスタ方式と呼ばれる方式が特願昭5
8−237777に提案されている。
In a machine that aims to speed up processing by processing multiple instructions in parallel, these processes specify the use of the same register even though there is no dependency between the data to be processed in parallel. For this reason, parallel processing may be inhibited, leading to a decrease in processing performance. In order to eliminate this factor that inhibits parallel processing caused by the repeated use of the same register, a method called the virtual register method was proposed in a patent application filed in 1973.
No. 8-237777.

仮想レジスタ方式によ九ば、命令で指定されている汎用
レジスタはプログラマから見た論理的なレジスタであり
論理レジスタと呼ばれる。また。
According to the virtual register method, the general-purpose register specified by an instruction is a logical register seen from the programmer and is called a logical register. Also.

実際に演算結果を保持するレジスタは物理レジスタと呼
ばれ、論理レジスタと動的に対応づけられる。並列処理
すべき命令が同一の論理レジスタを指定している場合に
は、それぞれ異なる物理レジスタが割当てられるので、
上記の並列処理阻害要因を除去できる。
Registers that actually hold operation results are called physical registers, and are dynamically associated with logical registers. If instructions to be processed in parallel specify the same logical register, different physical registers are assigned to each, so
The above factors inhibiting parallel processing can be removed.

仮想レジスタ方式においては、ある論理レジスタに新た
な物理レジスタを割当てることが頻繁に行われるが、そ
のためには、物理レジスタを使用している機能ブロック
からの制御信号による物理レジスタの複雑な状態管理制
御を行う必要があった。
In the virtual register method, a new physical register is frequently assigned to a certain logical register, but this requires complex state management control of the physical register using control signals from the functional block that uses the physical register. It was necessary to do this.

〔発明の目的〕[Purpose of the invention]

本発明の目的は、上記の問題に鑑み、他の機能ブロック
からの制御が関与することのない、簡単かつ有効なレジ
スタ割当て方式を有する情報処理装置を提供することに
ある。
SUMMARY OF THE INVENTION In view of the above problems, an object of the present invention is to provide an information processing apparatus having a simple and effective register allocation method that does not involve control from other functional blocks.

〔発明の概要〕[Summary of the invention]

このような目的を達成するために1本発明は、論理レジ
スタに対して割当てられていない物理レジスタの番号を
キューに保持し、新たな物理レジスタの割当て要求があ
ると、新たに割当てるべき物理レジスタの番号をそのキ
ューから取出して用い、その際、解放された物理レジス
タの番号をそのキューに戻すことによって、他の機能ブ
ロックからの制御が関与することなしに、動的な物理レ
ジスタ割当てを行うことを可能にしていることに特徴が
ある。
In order to achieve such an object, the present invention stores the numbers of physical registers that are not allocated to logical registers in a queue, and when a new physical register allocation request is received, the numbers of physical registers to be newly allocated are stored in a queue. Dynamic physical register allocation is performed without involvement of control from other functional blocks by taking the number of the physical register from the queue and using it, and then returning the freed physical register number to the queue. It is unique in that it makes it possible.

(発明の実施例〕 以下1本発明の詳細な説明する。説明の都合上、日立製
作所のMシリーズアーキテクチャに基づくマシンを前提
とする。
(Embodiments of the Invention) The present invention will be described in detail below.For convenience of explanation, a machine based on Hitachi's M series architecture is assumed.

第2図は、典型的な命令型式を示している。第2(a)
図は、RR型式と呼ばれる命令型式であり、02部で指
定された演算が、R1部で指定された汎用レジスタの内
容を第1オペランド、R2部で指定された汎用レジスタ
の内容を第2オペランドとして実行される。第2(b)
図は、RX型式と呼ばれる命令型式であり、R1部で指
定された汎用レジスタの内容を第1オペランド、x2部
、82部でそれぞれ指定された汎用レジスタの内容とD
2部の内容を加えて得られるアドレスで示されるメモリ
の内容を第2オペランドとして、02部で措定された演
算が実行される。
FIG. 2 shows a typical instruction format. Section 2(a)
The figure shows an instruction format called the RR format, in which the operation specified in part 02 uses the contents of the general-purpose register specified in part R1 as the first operand, and the contents of the general-purpose register specified in part R2 as the second operand. is executed as Second (b)
The figure shows an instruction format called the RX format, in which the contents of the general-purpose register specified in the R1 part are combined with the contents of the general-purpose register specified in the first operand, x2 part, and 82 part, respectively.
The operation specified in part 02 is executed using the contents of the memory indicated by the address obtained by adding the contents of part 2 as the second operand.

第3@は、全体構成を示している。The third @ shows the overall configuration.

命令レジスタ1は、処理を行うべき命令を保持している
。命令レジスタに命令を設定するための論理については
、本発明の説明上不要であり、また公知の技術により構
成可能であるので図示せず説明も省略する。命令レジス
タ1に保持された命令は、信号線rNSを介して命令デ
コーダ2に送られる。
Instruction register 1 holds instructions to be processed. The logic for setting an instruction in the instruction register is not necessary for explaining the present invention, and can be configured using a known technique, so it is not shown in the drawings and its explanation will be omitted. The command held in the command register 1 is sent to the command decoder 2 via the signal line rNS.

命令デコーダ2は、命令を解読して各種制御信号やオペ
ランドアドレスを生成し出力する。これらの制御信号の
うち本発明の説明に必要なものの意味は次の通りである
The instruction decoder 2 decodes instructions and generates and outputs various control signals and operand addresses. Among these control signals, the meanings of those necessary for explaining the present invention are as follows.

1)OPC:命令の02部であり、演算ユニット7で実
行する演算の種類を指定する。
1) OPC: This is part 02 of the instruction and specifies the type of operation to be executed by the operation unit 7.

2)FTP:解読した命令がメモリからオペランドを読
出す命令であることを示す。
2) FTP: Indicates that the decoded instruction is an instruction to read an operand from memory.

3)STP:解読した命令がメモリへ演算結果を芹込む
命令であることを示す。
3) STP: Indicates that the decoded instruction is an instruction to insert the operation result into memory.

4)A[)R:メモリからオペランドを読出すアドレス
またメモリへ演算結果を書込むアドレスを指定する。
4) A[)R: Specifies the address to read the operand from the memory or the address to write the operation result to the memory.

5)NDP:解読した命令が汎用レジスタからオペラン
ドを読出す命令であることを示す。
5) NDP: Indicates that the decoded instruction is an instruction to read an operand from a general-purpose register.

6)CHP:解読した命令が汎用レジスタへ演算結果を
書込む命令であることを示す6 7)ASP:解読した命令が命令で指定された論理レジ
スタに対して新たな物理レジスタを割当てる命令である
ことを示す。
6) CHP: Indicates that the decoded instruction is an instruction to write an operation result to a general-purpose register.6) ASP: Indicates that the decoded instruction is an instruction to allocate a new physical register to the logical register specified by the instruction. Show that.

8)LRI:第1オペランドを読出すべき論理レジスタ
番号を指定する6 9)LR2:第2オペランドを読出すべき論理レジスタ
番号を指定する。
8) LRI: Specifies the logical register number from which the first operand is to be read.6 9) LR2: Specifies the logical register number from which the second operand is to be read.

10)LWR:演算結果を書込むべき論理レジスタ番号
を指定する。
10) LWR: Specifies the logical register number into which the operation result is to be written.

OPCは演算ユニツ1〜7に、FTP、STP。OPC is for operation units 1 to 7, FTP and STP.

ADHは記憶ユニット6に、NDP、CI(Pはレジス
タユニット5に、ASP、LRI、LR2゜LWRは仮
想レジスタ制御回路4に送出され、各機能ブロックの制
御に用いられる。
ADH is sent to the storage unit 6, NDP, CI (P is sent to the register unit 5, ASP, LRI, LR2°LWR is sent to the virtual register control circuit 4, and used to control each functional block.

デコード制御回路3は、命令の解読が完了すると信号D
Sを1にして、新たな命令を命令レジスタ1に設定して
もよいことを示す。デコード制御回路3は、ある要因に
よって命令の解読が阻害されるとDSをOにして、新た
な命令の命令レジスタ1への設定を抑止する。このデコ
ード制御回路の機能や構成は、従来の情報処理装置にお
けると同様であり、また本発明の説明には不要なため、
詳細は省略する。
The decoding control circuit 3 sends a signal D when the decoding of the instruction is completed.
Setting S to 1 indicates that a new instruction may be set in instruction register 1. When the decoding of an instruction is inhibited by a certain factor, the decode control circuit 3 sets DS to O to inhibit setting of a new instruction to the instruction register 1. The functions and configuration of this decoding control circuit are the same as those in conventional information processing devices, and are unnecessary for the description of the present invention, so
Details are omitted.

仮想レジスタ制御回路4は、論理レジスタ番号から物理
レジスタ番号への変換、および、論理レジスタ番号に対
する物理レジスタ番号の新規の割当てを管理する。ここ
では、その概略について述べ、詳細は後述することとす
る。
The virtual register control circuit 4 manages the conversion of logical register numbers to physical register numbers and the new assignment of physical register numbers to logical register numbers. An overview will be given here, and details will be given later.

仮想レジスタ制御回路4は、論理レジスタ番号と物理レ
ジスタ番号との対応関係を保持する変換表を有している
。新規割当てを要求する信号ASPがOのときには、論
理レジスタ番号LRI。
The virtual register control circuit 4 has a conversion table that maintains the correspondence between logical register numbers and physical register numbers. When the signal ASP requesting new allocation is O, the logical register number LRI.

LR2,LWRは、変換表を索引することにより、それ
ぞれ物理レジスタ番号PRI、PR2゜PWRに変換さ
れて、レジスタユニット5に送られる。ASPが1のと
きにも、LRl、LR2は同様にしてPRI、PR2に
変換されるが、LWRは異なる変換過程と経る。まず、
現在変換表中に登録されていない物理レジスタ番号を1
つ選択し、その選択した物理レジスタ番号をPWRとし
て出力する0次に、LWRに対応する変換表のエントリ
の物理レジスタ番号を、選択した物理レジスタ番号に書
換える。これで、論理レジスタ番号LWRには、新たな
物理レジスタ番号が割当てられたことになる。
By indexing the conversion table, LR2 and LWR are converted into physical register numbers PRI and PR2°PWR, respectively, and sent to the register unit 5. When ASP is 1, LR1 and LR2 are similarly converted to PRI and PR2, but LWR undergoes a different conversion process. first,
Set the physical register number that is not currently registered in the conversion table to 1.
Then, the physical register number of the entry in the conversion table corresponding to the LWR is rewritten to the selected physical register number. A new physical register number is now assigned to the logical register number LWR.

レジスタユニット5は、演算結果を保持するための物理
レジスタを有する。レジスタユニット5の制御は、16
本の汎用レジスタが、16以上の本数の物理レジスタに
置換えられただけで、従来とほとんど変わるところがな
い。つまり、レジスタ続出し要求信号NDPが1のとき
には、PRY。
The register unit 5 has physical registers for holding calculation results. Control of the register unit 5 is performed by 16
There is almost no difference from the conventional system, except that the general-purpose registers of the book have been replaced with 16 or more physical registers. That is, when the register successive output request signal NDP is 1, PRY.

PR2で指定された物理レジスタの内容を、それぞれ第
1オペランド、第2オペランドとして読出し、信号線O
LR,02Rを介して演算ユニット7に送る。また、レ
ジスタ書込み要求信号CT(Pが1のときには、信号線
RSTを介して演算ユニット7から送られてくる演算結
果を、PWRで指定された物理レジスタに書込む。
The contents of the physical register specified by PR2 are read as the first operand and second operand, respectively, and the signal line O
It is sent to the arithmetic unit 7 via LR and 02R. Further, when the register write request signal CT (P is 1), the operation result sent from the operation unit 7 via the signal line RST is written into the physical register designated by PWR.

記憶ユニット6は、メモリとその制御回路から構成され
る。記憶ユニット6は、FTPが1のときADHで示さ
れるメモリアドレスからオペランドを読出し信号線02
Mを介して演算ユニット7に送る。また、STPが1の
ときADHで示されるメモリアドレスにR3Tを介して
送られてくる演算結果を書込む。
The storage unit 6 is composed of a memory and its control circuit. When FTP is 1, the storage unit 6 reads the operand from the memory address indicated by ADH and sends it to the signal line 02.
It is sent to the arithmetic unit 7 via M. Further, when STP is 1, the calculation result sent via R3T is written to the memory address indicated by ADH.

演算ユニット7は、oPCで指定された演算を実行する
。第1オペランドは、OIRを介して得られる。第2オ
ペランドは、演算の種類によって02Rか02Mの一方
を介して得られる。演算結果はR5Tを介して、レジス
タユニット5と記憶ユニット6に送られる。
The calculation unit 7 executes the calculation specified by the oPC. The first operand is obtained via OIR. The second operand is obtained via either 02R or 02M depending on the type of operation. The calculation result is sent to the register unit 5 and storage unit 6 via R5T.

!ts1図は、仮想レジスタ制御回路4の内部構成を示
している。
! ts1 shows the internal configuration of the virtual register control circuit 4.

変換部41は、変換表(以下RxT)411を管理し、
論理レジスタ番号を物理レジスタ番号に変換する。RX
T411は、論理レジスタ対応のエントリに、各々の論
理レジスタに対して割当てられている物理レジスタの番
号を保持している。
The conversion unit 41 manages a conversion table (hereinafter referred to as RxT) 411,
Convert logical register number to physical register number. RX
T411 holds the number of the physical register assigned to each logical register in the entry corresponding to the logical register.

従って、ある論理レジスタ番号でRXT411を索引す
ることによって、その論理レジスタに対して割当てられ
ている物理レジスタの番号を得ることができる。読出し
レジスタを指定する論理レジスタ番号LRI、LR2は
1以上のようにして。
Therefore, by indexing RXT 411 with a certain logical register number, the number of the physical register assigned to that logical register can be obtained. Logical register numbers LRI and LR2 specifying read registers are set to 1 or more.

それぞれ物理レジスタ番号PRI、PR2に変換される
These are converted into physical register numbers PRI and PR2, respectively.

レジスタへの書込みに対しては、その書込みを。For writing to a register, write that write.

既に割当てられている物理レジスタに対して行うか、新
たに割当てられる物理レジスタに対して行うかによって
、動作が異なる。書込みレジスタに対して新たな物理レ
ジスタを割当てるか否かは、物理レジスタ割当て要求信
号ASPによって決定される。ASP′hSOの場合、
新たな物理レジスタの割当ては行われないので、書込み
レジスタを指定する論理レジスタ番号LWRは、RXT
411を索引することによって、物理レジスタ番号PW
Rに変換される。ASPが1の場合、新たな物理レジス
タの割当てが、論理レジスタの番号LWRで指定される
論理レジスタに対して行われる。新たに割当てられるべ
き物理レジスタは、キュ一部42より送られてくる割当
て物理レジスタ番号PASによって指定される。変換部
41は。
The operation differs depending on whether it is performed on an already allocated physical register or a newly allocated physical register. Whether or not to allocate a new physical register to the write register is determined by the physical register allocation request signal ASP. In the case of ASP'hSO,
Since no new physical register is allocated, the logical register number LWR specifying the write register is RXT
By indexing 411, the physical register number PW
Converted to R. If ASP is 1, a new physical register is allocated to the logical register specified by the logical register number LWR. The physical register to be newly allocated is specified by the allocated physical register number PAS sent from the queue section 42. The conversion unit 41 is.

書込みレジスタを指定する論理レジスタ番号り、WRの
値にかかわらず、PASの値をそのまま物理レジスタ番
号PWRとして送出する。次に、この物理レジスタの新
たな割当てをRXT411゜に反映させる必要がある。
Regardless of the logical register number specifying the write register or the value of WR, the value of PAS is sent as is as the physical register number PWR. Next, it is necessary to reflect this new allocation of physical registers in the RXT 411°.

このために、まず、論理レジスタ番号LWRでRXT4
1 Lを索引して得られる物理レジスタ番号を、解放物
理レジスタ番号PRLに出力し、キュ一部42に送る。
For this purpose, first, RXT4 with logical register number LWR.
The physical register number obtained by indexing 1L is output to the released physical register number PRL and sent to the queue section 42.

これは、解放した物理レジスタを再使用するためである
。そして、論理レジスタ番号LWRに対応するRXT4
11のエントリに新たに割当てられた物理レジスタの番
号PASを登録する。
This is to reuse the released physical registers. Then, RXT4 corresponding to the logical register number LWR
The newly allocated physical register number PAS is registered in entry No. 11.

キュ一部42は、物理レジスタ番号キュー(以下PRQ
)421を管理する。RXT411に登録されていない
物理レジスタ番号は、すべてPRQ421に保持される
。PR0421は、入口点をインポインタ(以下QIP
)422.出口点をアウトポインタ(以下QOP)42
3で指示されるファーストイン・ファーストアウト(F
IFO)制御のキューを構成する。このFIFOキュー
をこのように構成する必然性はなく、例えば、シフトレ
ジスタによって構成してもよい。
The queue part 42 is a physical register number queue (hereinafter referred to as PRQ).
)421. All physical register numbers not registered in the RXT 411 are held in the PRQ 421. PR0421 sets the entry point to an inpointer (hereinafter referred to as QIP
)422. Exit point out pointer (hereinafter referred to as QOP) 42
First in/first out (F
Configure a queue for IFO) control. It is not necessary to configure this FIFO queue in this way; for example, it may be configured using a shift register.

キュ一部42は、QOP423が指示しているPRQ4
21の内容を、新たに割当てられるべき物理レジスタ番
号PASとして変換部41に出力する。このPASの値
が実際に変換部41によって用いられるのは、前述した
ように、物理レジスタ割当て要求信号ASPが1のとき
である。このとき、キュ一部42では、次のような動作
を行う。
The queue part 42 is the PRQ4 indicated by the QOP423.
The contents of 21 are output to the conversion unit 41 as the physical register number PAS to be newly allocated. The value of this PAS is actually used by the conversion unit 41 when the physical register allocation request signal ASP is 1, as described above. At this time, the cue section 42 performs the following operations.

まず、変換部41から送られてくる解放された物理レジ
スタ番号PRLを、QIP422で指示されているPR
Q421のエントリに保持する。そして、QIP422
、QOP423をインクリメントする。このインクリメ
ントにより、PRQ421は、FIFOキューとしての
動作をする。
First, the released physical register number PRL sent from the conversion unit 41 is converted into the PR indicated by the QIP 422.
It is held in the entry of Q421. And QIP422
, QOP423 is incremented. This increment causes PRQ 421 to operate as a FIFO queue.

PRQ421の長さは有限であるので、QIP422、
QOP423のインクリメントは、PRQ421の畏さ
でラップアラウンドさせる。
Since the length of PRQ421 is finite, QIP422,
Incrementing QOP423 causes it to wrap around with PRQ421.

これにより、PRQ421は、下端と上端がつながった
環状と考えることができ、PRO421の各エントリを
再利用することができる。
Thereby, the PRQ 421 can be thought of as a ring with the lower end and the upper end connected, and each entry of the PRO 421 can be reused.

第4図は、新たな物理レジスタの割当て動作を示してい
る。第4(a)図の状態から加算命令AR2,3 を処理した後の状態を第4(b)図に示している。
FIG. 4 shows the new physical register allocation operation. FIG. 4(b) shows the state after processing the addition instruction AR2, AR3 from the state of FIG. 4(a).

第4図には、RXT411とPRQ421(71内容の
一部と、QIP422とQOP423が指示するPRQ
421のエントリが示されている。また、この加算命令
は、論理レジスタの2番(以下LR#2と略記)の内容
を第1オペランド、LR#3の内容を第2オペランドと
して加算を施し、演算結果をLR#2に格納することを
意味している6I2XT411は、論理レジスタ番号に
対応するエントリに、その論理レジスタに対して割当て
ら九でいる物理レジスタの番号を保持している。図中に
おいては、例えば、LR#Oに対して物理レジスタの3
3番(以下PR433と略記)、LR#1に対してPR
#7が割当てられている。
Figure 4 shows RXT411 and PRQ421 (a part of the 71 contents, and the PRQ commanded by QIP422 and QOP423).
421 entries are shown. Also, this addition instruction performs addition with the contents of logical register number 2 (hereinafter abbreviated as LR#2) as the first operand and the contents of LR#3 as the second operand, and stores the operation result in LR#2. This means that the 6I2XT 411 holds in the entry corresponding to the logical register number the number of the physical register that is assigned to that logical register. In the figure, for example, physical register 3 is used for LR#O.
No. 3 (hereinafter abbreviated as PR433), PR for LR#1
#7 is assigned.

PRQ421は、論理レジスタに対して割当てられてい
ない物理レジスタの番号をキューイングしている。図中
においては、最も以前に解放され要求があったとき割当
てられるべき物理レジスタの番号は13で、また、!&
後に解放された物理レジスタの番号は15であって、そ
の間に解放された物理レジスタの番号が順にキューイン
グされている。
The PRQ 421 queues physical register numbers that are not assigned to logical registers. In the figure, the number of the physical register that was released the earliest and should be allocated when requested is 13, and! &
The number of physical registers released later is 15, and the numbers of physical registers released during that time are queued in order.

以下、この状態において、該加算命令がデコードされた
ときの動作を説明する。
The operation when the addition instruction is decoded in this state will be described below.

まず、オペランドを読出すべき物理レジスタを指定する
物理レジスタ番号が、読出し論理レジスタ番号でRXT
411を索引することによって求められる。従って、読
出し論理レジスタ番号2゜3は、それぞれ、物理レジス
タ番号19.1に変換される。次に、演算結果を書込む
べき物理レジスタを指定する物理レジスタ番号が求めら
れる。
First, the physical register number that specifies the physical register from which the operand is to be read is the read logical register number.
411. Therefore, read logical register numbers 2.3 are converted to physical register numbers 19.1, respectively. Next, a physical register number designating the physical register into which the operation result is to be written is determined.

該加算命令は、新たな物理レジスタの割当て要求を行う
こととすると、この場合、QOP422が指示している
PRQ421のエントリの内容が、書込み物理レジスタ
番号となる。従って、書込み物理レジスタ番号は13と
なる。結局、該加算命令は、PR#19とPH10の内
容を加えて、その結果をPR#13に格納することとな
る。
Assuming that the addition instruction requests allocation of a new physical register, in this case, the contents of the entry of PRQ 421 pointed to by QOP 422 become the write physical register number. Therefore, the write physical register number is 13. In the end, the addition instruction adds the contents of PR#19 and PH10 and stores the result in PR#13.

さらに、新たな物理レジスタの割当てを、RXT411
、PRQ421に反映さセル必要がある。そのために、
新たに割当てられた物理レジスタを指定する物理レジス
タ番号をRXT411に登録し、それに伴って解放され
た物理レジスタを指定する物理レジスタ番号をPRQ4
21にキューイングする。詳述すると、書込み論理レジ
スタ番号2に対応するRXT411のエントリに保持さ
れている物理レジスタ番号19を、QIP422が指示
しているPRQ421のエントリに書込み、QOP42
3が指示しているP RQ421のエントリに保持され
ている物理レジスタ番号13を、書込み論理レジスタ番
号2に対応するRXT411(1)xントリニ!*L、
で、Q I P422゜QOP423をインクリメント
する。
Furthermore, new physical register allocation is made to RXT411.
, the cell needs to be reflected in PRQ421. for that,
Register the physical register number specifying the newly allocated physical register in RXT411, and register the physical register number specifying the freed physical register in PRQ4.
Queue on 21. In detail, physical register number 19 held in the entry of RXT411 corresponding to write logical register number 2 is written to the entry of PRQ421 indicated by QIP422, and QOP42
Write physical register number 13 held in the entry of PRQ421 pointed to by RXT411(1)xintrini! corresponding to write logical register number 2! *L,
Then, Q I P422°QOP423 is incremented.

以下に1本発明を用いてマシンを構成したときの物理レ
ジスタの本数について述べる。
The number of physical registers when a machine is constructed using the present invention will be described below.

本発明のようなレジスタの動的割当てを行った場合、物
理レジスタの本数は、一般に、論理レジスタの本数(例
えば、■シリーズアーキテクチャでは16)以上必要で
あり、そうであれば、矛盾が生じることはない、しかし
、複数命令の並列処理を行うことにより処理の高速化を
図る際には、        !並列に処理される命令
が同一の物理レジスタの使用(書換え)を指定しないこ
とが重要である6それは、同一レジスタの繰返し使用に
起因する並列処理阻害要因を完全に除去することができ
るからであり、また、それに伴って同一レジスタの繰返
し使用を検出するための論理や検出したときの処理の待
合せのための論理などを省略することができ、そのハー
ドウェア量を大幅に軽減できるからである。従って、同
一物理レジスタの繰返し使用が起こらないだけの本数の
物理レジスタを用意すべきであり、その本数nは、次の
ようにした求めることができる。すなわち、任意の時刻
においてマシン内で並列に処理される命令のうち、最も
以前の命令から最も新しい命令までの最大の命令数をN
としたとき、換言すれば、ある命令の処理が完了するま
でに処理の開始される可能性のある最大の命令数をNと
したとき、このN個の命令によって書換えが行われつる
最大のレジスタの本数と、割当てが行われているレジス
タの本数、つまり。
When dynamically allocating registers as in the present invention, the number of physical registers is generally required to be greater than the number of logical registers (for example, 16 in the ■ series architecture), and if this is the case, conflicts may occur. However, when trying to speed up processing by processing multiple instructions in parallel, ! It is important that instructions to be processed in parallel do not specify the use (rewriting) of the same physical register.6 This is because the factors inhibiting parallel processing caused by the repeated use of the same register can be completely removed. In addition, the logic for detecting repeated use of the same register and the logic for queuing processing upon detection can be omitted, and the amount of hardware can be significantly reduced. Therefore, a sufficient number of physical registers should be prepared to prevent repeated use of the same physical register, and the number n can be determined as follows. In other words, among the instructions processed in parallel in the machine at any given time, the maximum number of instructions from the earliest to the latest instruction is N.
In other words, if the maximum number of instructions that may start processing before the processing of a certain instruction is completed is N, then the largest register that can be rewritten by these N instructions is and the number of registers being allocated, that is.

論理レジスタの本数との和が、最低用意すべき物理レジ
スタの本数nである。命令処理の追越しを許さないマシ
ンにおいては、命令数Nを常に一意に決定することがで
きるが、命令処理の追越しを無制限に許すようなマシン
においCは、命令数Nを決定できない。しかし、命令処
理の追越しに制限を加えれば、そのような命令処理装置
においても命令数Nを一意に決定することができる。
The sum with the number of logical registers is the minimum number n of physical registers that should be prepared. In a machine that does not allow overtaking of instruction processing, the number N of instructions can always be determined uniquely, but in a machine that allows unlimited overtaking of instruction processing, C cannot determine the number N of instructions. However, if a limit is placed on the overtaking of instruction processing, the number N of instructions can be uniquely determined even in such an instruction processing device.

以上のようにして求められたn本以上の物理レジスタを
用意し1本発明を用いて構成されたマシンにおいては、
並列処理される命令が同一の物理レジスタを使用しない
ことを次に示す。
In a machine configured using the present invention and having n or more physical registers obtained as described above,
The following shows that instructions processed in parallel do not use the same physical registers.

まず、命令iがLR#Rへの書込みを指定し新たにPR
#pが割当てられたとする6その後、命令3jがLR#
ρへの芹込みを指定したとするとPR#pは解放されそ
の物理レジスタ番号pはPRQ421に戻されろ、PR
Q421の長さは。
First, instruction i specifies writing to LR#R and newly writes PR.
Suppose that #p is assigned6, then instruction 3j is assigned to LR#
If you specify the addition to ρ, PR#p will be released and its physical register number p will be returned to PRQ421.
What is the length of Q421?

物理レジスタの本数から物理レジスタの本数を引いた値
であり、N個の命令によって書換えか行われうる最大の
レジスタ本数以上であるから、PRQ421に戻された
物理レジスタ番号pは。
The physical register number p returned to PRQ421 is the value obtained by subtracting the number of physical registers from the number of physical registers, and is greater than the maximum number of registers that can be rewritten by N instructions.

少なくともN個の命令を処理しない限り、再び割当てら
れることはない。このとき、命令、j以前の命令処理は
、PR#pを使用している命令iを含めて、既にN7し
ている。従って、並列処理される命令が同一の物理レジ
スタを使用することはない。
It will not be reallocated until at least N instructions have been processed. At this time, the processing of instructions before instruction j, including instruction i using PR#p, has already reached N7. Therefore, instructions processed in parallel do not use the same physical register.

ただし、ここで述べた物理レジスタの本数nが本発明に
必須のものではないことは、前述した通りである。
However, as described above, the number n of physical registers described here is not essential to the present invention.

〔発明の効果〕〔Effect of the invention〕

以上の説明のように、本発明によれば、他の機能ブロッ
クからの制御信号が関与することなしに。
As described above, according to the present invention, control signals from other functional blocks are not involved.

1つの機能ブロック(仮想レジスタ制御回路4)のみで
、動的なレジスタ割当て制御が可能となるので、その制
御を筒略化できる効果がある。また、並列処理されうる
最大数の命令が使用しつるレジスタ本数以上の物理レジ
スタを用意した場合には、同一レジスタの繰返し使用に
起因する並列処理阻害要因を完全に除去できるだけでな
く、同一レジスタの繰返し使用の検出論理や検出したと
きの処理の待合せ論理などを省略することができるとい
う効果がある。
Since dynamic register allocation control is possible with only one functional block (virtual register control circuit 4), the control can be simplified. In addition, if you prepare more physical registers than the number of registers used by the maximum number of instructions that can be processed in parallel, you can not only completely eliminate the factors that inhibit parallel processing caused by the repeated use of the same register, but also This has the advantage that it is possible to omit the logic for detecting repeated use and the logic for queuing processing upon detection.

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

図はいずれも本発明に関するもので、第1図は仮想レジ
スタ制御回路の内部構成図、第2図は典型的な命令型式
を示す図、第3図は全体構成を示す図、第4図は仮想レ
ジスタ制御回路の動作を示す図である。 1・・・命令レジスタ、2・・・命令デコーダ、3・・
・デコード制御回路、4・・・仮想レジスタ制御回路、
41・・・変換部、411・・・変換表(RXT)、4
2・・・キュ一部、421・・・物理レジスタ番号キュ
ー(PRQ)、422・・・インポインタ (QIP)
。 423・・・アウトポインタ(QOP)、5・・・レジ
スタユニット、6・・・記憶ユニット、7・・・演算ユ
ニット。 ”I−+■ ¥−20(α) V、2目(17) を3因 頁の続き i間者 風向 茂雄 小平市JJ繻14791地株式会
社内 日立超LSIエンジニアリング
The figures are all related to the present invention; Fig. 1 is an internal configuration diagram of the virtual register control circuit, Fig. 2 is a diagram showing a typical instruction format, Fig. 3 is a diagram showing the overall configuration, and Fig. 4 is a diagram showing the overall configuration. FIG. 3 is a diagram showing the operation of a virtual register control circuit. 1...Instruction register, 2...Instruction decoder, 3...
・Decode control circuit, 4...virtual register control circuit,
41... Conversion unit, 411... Conversion table (RXT), 4
2...Queue part, 421...Physical register number queue (PRQ), 422...In pointer (QIP)
. 423...Out pointer (QOP), 5...Register unit, 6...Storage unit, 7...Arithmetic unit. "I-+■ ¥-20 (α) V, 2nd item (17) Continuation of the 3rd page Shigeo Kazamata Hitachi Ultra LSI Engineering Co., Ltd., 14791 JJ, Kodaira City

Claims (1)

【特許請求の範囲】 1、複数の命令を並列処理する情報処理装置において、 命令で論理的に指定される1個または複数の第1のレジ
スタと、実際に命令の演算結果を保持する1個または複
数の第2のレジスタと、第1のレジスタの番号に対して
割当てられている第2のレジスタの番号を保持する第1
の手段と、第1のレジスタの番号に対して割当てられて
いない第2のレジスタの番号を保持する第2の手段とを
有し、 第1のレジスタに対して新たな第2のレジスタの割当て
要求があつた場合には、新たに割当てられるべき第2の
レジスタの番号を第2の手段から取出し第1の手段に保
持させ、それに伴つて解放される第1の手段から取除か
れる第2のレジスタの番号を第2の手段に戻すことによ
つて、第1のレジスタに対する第2のレジスタの動的な
割当てを行うことを特徴とする情報処理装置。
[Claims] 1. In an information processing device that processes a plurality of instructions in parallel, one or more first registers are logically specified by the instruction, and one register actually holds the operation result of the instruction. or a plurality of second registers, and a first register holding the number of the second register assigned to the number of the first register.
and second means for holding a second register number that has not been assigned to the first register number, and assigning a new second register to the first register. When a request is made, the number of the second register to be newly allocated is taken out from the second means and held in the first means, and the number of the second register to be newly allocated is taken out from the first means, and the number of the second register to be newly allocated is taken out from the first means. An information processing apparatus characterized in that dynamic allocation of a second register to a first register is performed by returning the number of the register to the second means.
JP25759084A 1984-12-07 1984-12-07 Information processor Pending JPS61136131A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25759084A JPS61136131A (en) 1984-12-07 1984-12-07 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25759084A JPS61136131A (en) 1984-12-07 1984-12-07 Information processor

Publications (1)

Publication Number Publication Date
JPS61136131A true JPS61136131A (en) 1986-06-24

Family

ID=17308378

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25759084A Pending JPS61136131A (en) 1984-12-07 1984-12-07 Information processor

Country Status (1)

Country Link
JP (1) JPS61136131A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6417126A (en) * 1987-07-01 1989-01-20 Ibm Register renaming apparatus
JPH05250157A (en) * 1991-01-16 1993-09-28 Internatl Business Mach Corp <Ibm> Computer system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6417126A (en) * 1987-07-01 1989-01-20 Ibm Register renaming apparatus
JPH05250157A (en) * 1991-01-16 1993-09-28 Internatl Business Mach Corp <Ibm> Computer system

Similar Documents

Publication Publication Date Title
US4459661A (en) Channel address control system for a virtual machine system
US4511964A (en) Dynamic physical memory mapping and management of independent programming environments
JPH04290150A (en) Device and method for controlling bidirectional fifo as interface between two buses in multi-task system
JPH0242569A (en) Context switching method and apparatus used for vector processing system
JPH07175698A (en) File system
JPH076115A (en) Control method of hardware data movement function by software user of data- processing system, synchronization method of operation between processors and method for giving of plurality of device control blocks
US3778776A (en) Electronic computer comprising a plurality of general purpose registers and having a dynamic relocation capability
US5696990A (en) Method and apparatus for providing improved flow control for input/output operations in a computer system having a FIFO circuit and an overflow storage area
JPH0340868B2 (en)
JPS61136131A (en) Information processor
US4816992A (en) Method of operating a data processing system in response to an interrupt
JPS6032220B2 (en) information processing equipment
JPH04120652A (en) Parallel processors
JP3206580B2 (en) DMA data transfer control method and input / output processing device
JPS60142429A (en) Method and apparatus for executing input/output of virtual computer system
JPS61253544A (en) Information processor
JP2735400B2 (en) Asynchronous I / O control method
JPH10507548A (en) Data processing systems and methods and communication systems with such systems
JPH0833869B2 (en) Data processing device
JP2535584B2 (en) Real memory fixed processing computer
JP2528394B2 (en) Arithmetic control device
JP2742245B2 (en) Parallel computer
JPH05151174A (en) Synchronizing system for multiprocessor
JPH02188865A (en) Inter-processor shared memory controller
JPH0346033A (en) Data transfer control method for inter-job