JP2927160B2 - Register device - Google Patents

Register device

Info

Publication number
JP2927160B2
JP2927160B2 JP5287939A JP28793993A JP2927160B2 JP 2927160 B2 JP2927160 B2 JP 2927160B2 JP 5287939 A JP5287939 A JP 5287939A JP 28793993 A JP28793993 A JP 28793993A JP 2927160 B2 JP2927160 B2 JP 2927160B2
Authority
JP
Japan
Prior art keywords
data
register
prefetch
address
signal
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 - Fee Related
Application number
JP5287939A
Other languages
Japanese (ja)
Other versions
JPH07141174A (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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP5287939A priority Critical patent/JP2927160B2/en
Publication of JPH07141174A publication Critical patent/JPH07141174A/en
Application granted granted Critical
Publication of JP2927160B2 publication Critical patent/JP2927160B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Advance Control (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明はマイクロプロセッサ及び
マイクロコントローラにおけるレジスタ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor and a register device in a microcontroller.

【0002】[0002]

【従来の技術】従来のレジスタ装置としては、例えば特
開平4-90038号公報に示されている。図3はこの従来の
レジスタ装置を用いたシステムのブロック図であり、図
4は本従来例の動作例を示すプログラムである。1はレ
ジスタ装置、2は命令実行ユニット、3はデータキャッ
シュメモリ、4は主記憶装置であり、9は各エントリに
データを格納するレジスタ装置1のメモリ部、15は書
き込み検出回路を含んだレジスタ装置1の制御回路であ
り、100,101はそれぞれ命令実行ユニット2から
レジスタ装置1へのアクセスにおけるアクセス要求信
号、リード/ライト信号であり、103はメモリ部9の
エントリを選択するためのアドレスバス、105はメモ
リ部9に対する読みだし、書き込みを行なうためのデー
タバス、107はプリフェッチ要求信号である。また、
110は命令実行ユニット2とデータキャッシュメモリ
3の間のデータ転送手段であり、120はデータキャッ
シュメモリ3と主記憶装置4の間のデータ転送手段であ
る。以上のように構成された従来のレジスタ装置の動作
を図3に基づいて、図4のプログラム順に説明する。な
お、本従来例におけるレジスタ装置1は4つのレジスタ
を有し、それぞれレジスタr0,r1,r2,r3という名称で呼
ぶものとする。
2. Description of the Related Art A conventional register device is disclosed, for example, in Japanese Patent Application Laid-Open No. Hei 4-90038. FIG. 3 is a block diagram of a system using the conventional register device, and FIG. 4 is a program showing an operation example of the conventional example. 1 is a register device, 2 is an instruction execution unit, 3 is a data cache memory, 4 is a main storage device, 9 is a memory unit of the register device 1 for storing data in each entry, and 15 is a register including a write detection circuit. 100 and 101 are an access request signal and a read / write signal for accessing the register device 1 from the instruction execution unit 2, and 103 is an address bus for selecting an entry in the memory unit 9. , 105 are data buses for reading and writing to and from the memory unit 9, and 107 is a prefetch request signal. Also,
Reference numeral 110 denotes data transfer means between the instruction execution unit 2 and the data cache memory 3, and reference numeral 120 denotes data transfer means between the data cache memory 3 and the main storage device 4. The operation of the conventional register device configured as described above will be described with reference to FIG. It should be noted that the register device 1 in the conventional example has four registers, which are called registers r0, r1, r2, and r3, respectively.

【0003】(1)set r0,ADDR レジスタr0にアドレスADDRをセットする命令である。AD
DRは後にレジスタr2に得られるデータの格納されている
アドレスである。この命令により命令実行ユニット2は
アクセス要求信号100をアサートし、リード/ライト
信号101をライトイネーブルにし、アドレスバス10
3にレジスタr0のアドレスを出力し、データバス105
にアドレスADDRの値を出力する。制御回路15はアクセ
ス要求信号100がアサートされており、リード/ライ
ト信号101がライトイネーブルになっているのでリー
ド/ライト信号200をライトイネーブルにし、メモリ
部9はアドレスバス103により選択されているエント
リにデータバス105の値を書き込む。さらに、制御回
路15はリード/ライト信号200をリードイネーブル
にしプリフェッチ要求信号107をアサートする。メモ
リ部9はリード/ライト信号200がアサートされてい
るので、アドレスバス103により選択されているエン
トリのデータをデータバス105に出力する。データキ
ャッシュメモリ3はプリフェッチ要求信号107がアサ
ートされるとデータバス(プリフェッチアドレスバス)
105をアドレスとしたプリフェッチを行う。プリフェ
ッチは要求されたアドレスがデータキャッシュメモリ3
にない場合、主記憶装置4から読みだしデータキャッシ
ュメモリ3に格納するものである。このことにより、ア
ドレスADDRをアドレスとするデータをデータキャッシュ
メモリ3にプリフェッチすることができる。また、次回
以降のレジスタr0の値の変更でも同様に自動的にプリフ
ェッチが行なわれる。この後、データキャッシュメモリ
3がプリフェッチを行なっている間、命令実行ユニット
2は他の命令を実行することができるため、プリフェッ
チが完了するまでの数命令はメモリアクセス、ポインタ
の変更を行なわない命令が実行されてるものとする。
(1) set r0, ADDR This is an instruction to set the address ADDR in the register r0. AD
DR is an address where data obtained later in the register r2 is stored. In response to this instruction, the instruction execution unit 2 asserts the access request signal 100, enables the read / write signal 101 to write enable, and sets the address bus 10
3 and outputs the address of the register r0 to the data bus 105.
To output the value of address ADDR. The control circuit 15 enables the read / write signal 200 because the access request signal 100 is asserted and the read / write signal 101 is write-enabled, and the memory unit 9 selects the entry selected by the address bus 103. Is written to the data bus 105. Further, the control circuit 15 enables the read / write signal 200 to read and asserts the prefetch request signal 107. Since the read / write signal 200 is asserted, the memory unit 9 outputs the data of the entry selected by the address bus 103 to the data bus 105. When the prefetch request signal 107 is asserted, the data cache memory 3 outputs a data bus (prefetch address bus).
Prefetch is performed with 105 as an address. In the prefetch, the requested address is stored in the data cache memory 3
If not, the data is read from the main storage device 4 and stored in the data cache memory 3. Thus, data having the address ADDR as an address can be prefetched into the data cache memory 3. Also, the prefetch is automatically performed in the same manner even when the value of the register r0 is changed from the next time. Thereafter, while the data cache memory 3 is performing prefetch, the instruction execution unit 2 can execute other instructions. Is executed.

【0004】(2)load r2,[r0] レジスタr0の値をアドレスとするデータをレジスタr2に
格納する命令である。レジスタr0の値をアドレスとする
データは(1)のプリフェッチによりデータキャッシュ
メモリ3に格納されているので、データキャッシュメモ
リ3に対する読みだしはヒットすることになり、主記憶
装置4をアクセスすることなく読み出すことができる。
[0004] (2) load r2, [r0] This is an instruction to store data having the value of the register r0 as an address in the register r2. Since the data having the address of the register r0 as the address is stored in the data cache memory 3 by the prefetch of (1), the reading to the data cache memory 3 is hit, and the main storage device 4 is not accessed. Can be read.

【0005】(3)set r1,DATA レジスタr1にデータDATAをセットする命令である。この
命令も命令(1)と同様にレジスタr1に値をセットし、
データDATAをアドレスとするデータのプリフェッチを行
なう。
(3) set r1, DATA An instruction to set data DATA in the register r1. This instruction also sets the value in register r1 in the same way as instruction (1),
Prefetch of data having the data DATA as an address is performed.

【0006】[0006]

【発明が解決しようとする課題】しかしながら、上記の
ような構成では、レジスタの値の変更が行なわれると変
更後の値がアドレス、データに関係なく必ずプリフェッ
チを行う。例えば、図4の命令(3)におけるデータDA
TAはアドレスではないがプリフェッチが実行されてい
る。このようなプリフェッチ実行は無駄な処理であり、
このようなプリフェッチを実行するための時間は性能を
低下させる要因である。また、使うはずのないデータが
データキャッシュメモリに格納されるので、使用され得
るデータがデータキャッシュメモリからリプレースさ
れ、データキャッシュメモリのヒット率の低下を招く。
さらに、データDATAの値がアドレスとしては不適切な値
であった場合、メモリアクセス違反といった本来発生し
ない例外処理を引き起こすことも考えられる。
However, in the above configuration, when the value of the register is changed, the changed value is always prefetched regardless of the address and data. For example, the data DA in the instruction (3) in FIG.
TA is not an address, but prefetch has been performed. Such prefetch execution is useless processing,
The time required to execute such prefetch is a factor that degrades performance. Further, since data that should not be used is stored in the data cache memory, usable data is replaced from the data cache memory, and the hit rate of the data cache memory is reduced.
Furthermore, when the value of the data DATA is an inappropriate value as an address, exception processing that does not originally occur, such as a memory access violation, may be caused.

【0007】従って、本発明の目的は、アドレスでない
データを保持するレジスタの変更による無駄なプリフェ
ッチを行なうことがないレジスタ装置を提供することに
ある。
SUMMARY OF THE INVENTION It is therefore an object of the present invention to provide a register device that does not perform useless prefetch by changing a register that holds non-address data.

【0008】[0008]

【課題を解決するための手段】本発明は、プロセッサの
レジスタにおいて、複数のエントリを有し、前記各エン
トリに前記プロセッサの命令実行ユニットにより読み
し、書き込み可能なデータを保持するデータフィール
ドと前記命令実行ユニットにより書き込み可能なポイン
タ属性を保持するポインタ属性フィールドを有するメモ
リ部と、前記メモリ部へ前記命令実行ユニットからの書
き込みがあったことを検出する書き込み検出回路と、書
き込みが検出されたとき書き込みのあった前記エントリ
の前記データフィールドのデータと前記ポインタ属性フ
ィールドのポインタ属性を読み出す読み出し手段と、前
記ポインタ属性がセットされている場合はデータキャッ
シュメモリに対し前記読み出し手段により読み
ータをプリフェッチアドレスとするプリフェッチ要求を
出す手段を有するレジスタ装置である。
Means for Solving the Problems The present invention, in a processor register, a plurality of entries, the each entry, read by the instruction execution unit of the processor
Out, and a memory unit having a pointer attribute field that holds a writable pointer attribute by the data field <br/> de and the instruction execution unit that holds a writable data, from the instruction execution unit to the memory unit A write detection circuit for detecting that a write has been performed; reading means for reading data of the data field of the entry and a pointer attribute of the pointer attribute field where the write has been performed when the write is detected; If it is a register device having means to issue a prefetch request to the de-<br/> chromatography data was read out by said reading means to the data cache memory and prefetch address.

【0009】[0009]

【作用】上記の構成により、更新によりプリフェッチを
行なうレジスタをポインタ属性のついたものに限定する
ことができるため、アドレスでないデータを保持するレ
ジスタの変更による無駄なプリフェッチを行なうことが
ない。従って、無駄なプリフェッチによる性能の低下を
なくすことができ、また、データキャッシュメモリに使
用されないデータが格納されヒット率の低下を回避でき
る。
According to the above configuration, the registers that perform prefetching by updating can be limited to those having the pointer attribute, so that useless prefetching due to the change of the register that holds non-address data is prevented. Therefore, performance degradation due to useless prefetch can be eliminated, and a decrease in hit rate can be avoided by storing unused data in the data cache memory.

【0010】[0010]

【実施例】本発明の一実施例のレジスタ装置について、
図面を参照しながら説明する。図1は本発明の一実施例
におけるレジスタ装置を用いたシステムのブロック図で
あり、図2は本実施例の動作例を示すプログラムであ
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A register device according to an embodiment of the present invention will be described.
This will be described with reference to the drawings. FIG. 1 is a block diagram of a system using a register device according to an embodiment of the present invention, and FIG. 2 is a program showing an operation example of the embodiment.

【0011】図1において1はレジスタ装置、2は命令
実行ユニット、3はデータキャッシュメモリ、4は主記
憶装置である。また、9はレジスタ装置1のメモリ部、
10,11はそれぞれ、メモリ部9のデータフィール
ド、ポインタ属性フィールド、12は書き込み検出回路
を含んだレジスタ装置1の制御回路、13はポインタ属
性信号104が1でプリフェッチイネーブル信号106
がアサートされている場合はプリフェッチ要求信号10
7をアサートし、それ以外はデアサートするプリフェッ
チ要求信号生成回路である。100,101は命令実行
ユニット2からレジスタ装置1へのアクセスにおけるア
クセス要求信号、リード/ライト信号であり、102は
ポインタ属性をセット/リセットするためのポインタ属
性制御信号、103はメモリ部9のエントリを選択する
ためのアドレスバス、104はポインタ属性フィールド
に対する読みだし、書き込みを行なうためのポインタ属
性信号、105はデータフィールド10に対する読みだ
し、書き込みを行なうためのデータバス、106は命令
実行ユニットからレジスタ装置1への書き込みによるプ
リフェッチを発生させるためのプリフェッチイネーブル
信号、107はレジスタ装置1からデータキャッシュメ
モリ3へのプリフェッチ要求信号、200はデータフィ
ールド10に対するリードもしくはライトを制御するリ
ード/ライト信号、201はポインタ属性フィールド1
1に対するリードもしくはライトを制御するリード/ラ
イト信号である。110は命令実行ユニット2とデータ
キャッシュメモリ3の間のデータ転送手段であり、12
0はデータキャッシュメモリ3と主記憶装置4の間のデ
ータ転送手段である。
In FIG. 1, 1 is a register device, 2 is an instruction execution unit, 3 is a data cache memory, and 4 is a main storage device. 9 is a memory unit of the register device 1,
Numerals 10 and 11 denote a data field and a pointer attribute field of the memory unit 9, respectively, 12 a control circuit of the register device 1 including a write detection circuit, 13 a pointer attribute signal 104 of 1 and a prefetch enable signal 106
Is asserted, the prefetch request signal 10
7 is a prefetch request signal generation circuit that asserts 7 and deasserts the rest. Reference numerals 100 and 101 denote an access request signal and a read / write signal for access from the instruction execution unit 2 to the register device 1, reference numeral 102 denotes a pointer attribute control signal for setting / resetting a pointer attribute, and reference numeral 103 denotes an entry in the memory unit 9. Is a pointer attribute signal for reading and writing the pointer attribute field; 104 is a data bus for reading and writing the data field 10; and 106 is a register from the instruction execution unit to the register. A prefetch enable signal for generating a prefetch by writing to the device 1; 107, a prefetch request signal from the register device 1 to the data cache memory 3; 200, control of reading or writing to the data field 10 Read / write signal 201, pointer attribute field 1
1 is a read / write signal for controlling the read or write for 1. 110 is a data transfer means between the instruction execution unit 2 and the data cache memory 3;
Reference numeral 0 denotes a data transfer unit between the data cache memory 3 and the main storage device 4.

【0012】以上のように構成されたレジスタ装置の動
作を図1に基づいて、図2のプログラム順に説明する。
なお、本実施例におけるレジスタ装置1は4つエントリ
を有し、4つのレジスタに対応している。4つのレジス
タはそれぞれ、レジスタr0,r1,r2,r3という名称で呼ぶ
ものとする。
The operation of the register device configured as described above will be described with reference to FIG. 1 in the order of the program shown in FIG.
Note that the register device 1 in this embodiment has four entries and corresponds to four registers. The four registers are respectively called registers r0, r1, r2, and r3.

【0013】(1)pointer r0 レジスタr0のポインタ属性をセットする命令である。こ
の命令により命令実行ユニット2はアクセス要求信号1
00とポインタ属性制御信号102をアサートし、アド
レスバス103にレジスタr0のアドレスを出力し、ポイ
ンタ属性信号104に1を出力する。制御回路12はア
クセス要求信号100とポインタ属性制御信号102が
アサートされているので、リード/ライト信号201を
ライトイネーブルにする。リード/ライト信号201に
よりメモリ部9はポインタ属性フィールド11のアドレ
スバス103により選択されているエントリにポインタ
属性信号104の値を書き込む。このことにより、命令
実行ユニット2はレジスタr0のポインタ属性ビットに1
を書き込む。
(1) pointer r0 This is an instruction to set the pointer attribute of the register r0. This instruction causes the instruction execution unit 2 to access the access request signal 1
00 and the pointer attribute control signal 102 are asserted, the address of the register r0 is output to the address bus 103, and 1 is output to the pointer attribute signal 104. Since the access request signal 100 and the pointer attribute control signal 102 are asserted, the control circuit 12 enables the read / write signal 201 to be write-enabled. The memory unit 9 writes the value of the pointer attribute signal 104 to the entry of the pointer attribute field 11 selected by the address bus 103 in response to the read / write signal 201. As a result, the instruction execution unit 2 sets the pointer attribute bit of the register r0 to 1
Write.

【0014】(2)data r1 レジスタr1のポインタ属性をリセットする命令である。
この命令により命令実行ユニット2はアクセス要求信号
100とポインタ属性制御信号102をアサートし、ア
ドレスバス103にレジスタr1のアドレスを出力し、ポ
インタ属性信号104に0を出力する。制御回路12は
アクセス要求信号100とポインタ属性制御信号102
がアサートされているので、リード/ライト信号201
をライトイネーブルにする。リード/ライト信号201
によりメモリ部9はポインタ属性フィールド11のアド
レスバス103により選択されているエントリにポイン
タ属性信号104の値を書き込む。このことにより、命
令実行ユニット2はレジスタr1のポインタ属性ビットに
0を書き込む。
(2) data r1 This is an instruction to reset the pointer attribute of the register r1.
With this instruction, the instruction execution unit 2 asserts the access request signal 100 and the pointer attribute control signal 102, outputs the address of the register r1 to the address bus 103, and outputs 0 to the pointer attribute signal 104. The control circuit 12 includes an access request signal 100 and a pointer attribute control signal 102
Is asserted, the read / write signal 201 is
Is write enabled. Read / write signal 201
Accordingly, the memory unit 9 writes the value of the pointer attribute signal 104 to the entry of the pointer attribute field 11 selected by the address bus 103. As a result, the instruction execution unit 2 writes 0 to the pointer attribute bit of the register r1.

【0015】(3)set r0,ADDR レジスタr0にアドレスADDRをセットする命令である。ア
ドレスADDRは後にレジスタr2に得られるデータの格納さ
れているアドレスである。この命令により命令実行ユニ
ット2はアクセス要求信号100をアサートし、リード
/ライト信号101をライトイネーブルにし、アドレス
バス103にレジスタr0のアドレスを出力し、データバ
ス105にアドレスADDRの値を出力する。制御回路12
はアクセス要求信号100がアサートされており、リー
ド/ライト信号101がライトイネーブルになっている
のでリード/ライト信号200をライトイネーブルにす
る。リード/ライト信号200によりメモリ部9はデー
タフィールド10のアドレスバス103により選択され
ているエントリにデータバス105の値を書き込む。
(3) set r0, ADDR This is an instruction to set the address ADDR in the register r0. The address ADDR is an address where data obtained later in the register r2 is stored. With this instruction, the instruction execution unit 2 asserts the access request signal 100, enables the read / write signal 101 to write, outputs the address of the register r0 to the address bus 103, and outputs the value of the address ADDR to the data bus 105. Control circuit 12
Enable the read / write signal 200 because the access request signal 100 is asserted and the read / write signal 101 is write enabled. In response to the read / write signal 200, the memory unit 9 writes the value of the data bus 105 to the entry selected by the address bus 103 of the data field 10.

【0016】さらに、制御回路12はリード/ライト信
号200,201をリードイネーブルにしプリフェッチ
イネーブル信号106をアサートする。リード/ライト
信号200、201によりメモリ部9はデータフィール
ド10およびポインタ属性フィールド11のアドレスバ
ス103により選択されているエントリのデータをデー
タバス105に、ポインタ属性をポインタ属性信号10
4に出力する。ポインタ属性信号104とプリフェッチ
イネーブル信号106はプリフェッチ要求信号生成回路
13に入力され、ポインタ属性信号103が1でプリフ
ェッチイネーブル信号106がアサートされていること
からプリフェッチ要求信号107をアサートする。デー
タキャッシュメモリ3はプリフェッチ要求信号107が
アサートされるとデータバス(プリフェッチアドレスバ
ス)105をアドレスとしたプリフェッチを行なう。プ
リフェッチは要求されたアドレスがデータキャッシュメ
モリ3にない場合、主記憶装置4からデータを読みだし
データキャッシュメモリ3に格納するものである。この
ことにより、アドレスADDRをアドレスとするデータをデ
ータキャッシュメモリ3にプリフェッチすることができ
る。また、次回以降のレジスタr0の値の変更でも同様に
自動的にプリフェッチが行なわれ、それはポインタ属性
がリセットされるまで続く。この命令の後、データキャ
ッシュメモリ3がプリフェッチを行なっている間、命令
実行ユニット2は他の命令を実行することができるた
め、プリフェッチが完了するまでの数命令はメモリアク
セス、ポインタの変更を行なわない命令を実行している
ものとする。
Further, the control circuit 12 enables the read / write signals 200 and 201 to read and asserts the prefetch enable signal 106. The read / write signals 200 and 201 cause the memory unit 9 to transfer the data of the entry selected by the address bus 103 of the data field 10 and the pointer attribute field 11 to the data bus 105 and to transfer the pointer attribute to the pointer attribute signal 10.
4 is output. The pointer attribute signal 104 and the prefetch enable signal 106 are input to the prefetch request signal generation circuit 13, and the prefetch request signal 107 is asserted because the pointer attribute signal 103 is 1 and the prefetch enable signal 106 is asserted. When the prefetch request signal 107 is asserted, the data cache memory 3 performs prefetch using the data bus (prefetch address bus) 105 as an address. In the prefetch, when the requested address is not in the data cache memory 3, data is read from the main storage device 4 and stored in the data cache memory 3. Thus, data having the address ADDR as an address can be prefetched into the data cache memory 3. Similarly, the prefetch is automatically performed in the subsequent change of the value of the register r0, and continues until the pointer attribute is reset. After this instruction, while data cache memory 3 is prefetching, instruction execution unit 2 can execute another instruction. Therefore, several instructions until the prefetch is completed perform memory access and pointer change. Assume that no instruction is being executed.

【0017】(4)load r2,[r0] レジスタr0の値をアドレスとするデータをレジスタr2に
格納する命令である。命令実行ユニット2はアクセス要
求信号100をアサートし、リード/ライト信号101
をリードイネーブルにし、アドレスバス103にレジス
タr0のアドレスを出力する。制御回路12はリード/ラ
イト信号200をリードイネーブルにし、メモリ部9は
データフィールド10のアドレスバス103で選択され
ているエントリのデータをデータバス105に出力す
る。命令実行ユニット2はデータバス105のデータを
アドレスとしてデータキャッシュメモリ3からリードす
る。この場合命令(3)でプリフェッチがなされている
のでデータキャッシュメモリ3ではヒットし、データを
すぐに読み出すことができる。次に、命令実行ユニット
2はアクセス要求信号100をアサートし、リード/ラ
イト信号101をライトイネーブルにし、アドレスバス
103にレジスタr2のアドレスを出力し、データバス1
05に先ほどデータキャッシュメモリ3から読み出した
データを出力する。制御回路12はアクセス要求信号1
00がアサートされており、リード/ライト信号101
がライトイネーブルになっているので、リード/ライト
信号200をライトイネーブルにする。メモリ部9はデ
ータフィールド10のアドレスバス103で選択されて
いるエントリにデータバス105のデータを書き込む。
こうすることで、レジスタr0をアドレスとするデータを
データキャッシュメモリ3がミスヒットすることなく、
レジスタr2に格納することができる。ここで、load r2,
[r0+4]のような実効アドレスの場合でもデータキャッシ
ュメモリ3の1ライン内にあればデータキャッシュメモ
リ3は同様にヒットする。
(4) load r2, [r0] This is an instruction to store data having the value of the register r0 as an address in the register r2. The instruction execution unit 2 asserts the access request signal 100 and reads / writes the read / write signal 101
Is read enabled, and the address of the register r0 is output to the address bus 103. The control circuit 12 enables the read / write signal 200 to be read, and the memory section 9 outputs the data of the entry selected by the address bus 103 of the data field 10 to the data bus 105. The instruction execution unit 2 reads the data on the data bus 105 from the data cache memory 3 as an address. In this case, since the prefetch is performed by the instruction (3), a hit occurs in the data cache memory 3, and the data can be read immediately. Next, the instruction execution unit 2 asserts the access request signal 100, enables the read / write signal 101 to write, outputs the address of the register r2 to the address bus 103, and outputs the data bus 1
At 05, the data read from the data cache memory 3 is output. The control circuit 12 outputs the access request signal 1
00 is asserted and the read / write signal 101
Is write enabled, the read / write signal 200 is write enabled. The memory unit 9 writes data on the data bus 105 to an entry of the data field 10 selected by the address bus 103.
By doing so, the data cache memory 3 does not hit the data having the address of the register r0 as a mishit,
It can be stored in register r2. Where load r2,
Even in the case of an effective address such as [r0 + 4], if it is within one line of the data cache memory 3, the data cache memory 3 hits similarly.

【0018】(5)set r1,DATA レジスタr1にデータDATAをセットする命令である。この
命令により命令実行ユニット2はアクセス要求信号10
0をアサートし、リード/ライト信号101をライトイ
ネーブルにし、アドレスバス103にレジスタr1のアド
レスを出力し、データバス105にデータDATAの値を出
力する。制御回路12はアクセス要求信号100がアサ
ートされており、リード/ライト信号101がライトイ
ネーブルになっているのでリード/ライト信号200を
ライトイネーブルにする。リード/ライト信号200に
よりメモリ部9はデータフィールド10のアドレスバス
103により選択されているエントリにデータバス10
5の値を書き込む。さらに、制御回路12はリード/ラ
イト信号200,201をリードイネーブルにしプリフ
ェッチイネーブル信号106をアサートする。メモリ部
9はデータフィールド10およびポインタ属性フィール
ド11のアドレスバス103により選択されているエン
トリのデータをデータバス105に、ポインタ属性をポ
インタ属性信号104に出力する。ポインタ属性信号1
03とプリフェッチイネーブル信号106はプリフェッ
チ要求信号生成回路13に入力され、ポインタ属性信号
103が0でプリフェッチイネーブル信号106がアサ
ートされているのでプリフェッチ要求信号107をデア
サートする。データキャッシュメモリ3はプリフェッチ
要求信号107がデアサートされているのでプリフェッ
チは実行しない。
(5) set r1, DATA This is an instruction to set data DATA in the register r1. This instruction causes the instruction execution unit 2 to access the access request signal 10
0 is asserted, the read / write signal 101 is write-enabled, the address of the register r1 is output to the address bus 103, and the value of the data DATA is output to the data bus 105. The control circuit 12 enables the read / write signal 200 because the access request signal 100 is asserted and the read / write signal 101 is write enabled. The read / write signal 200 causes the memory unit 9 to add the data bus 10 to the entry selected by the address bus 103 of the data field 10.
Write the value of 5. Further, the control circuit 12 makes the read / write signals 200 and 201 read-enable, and asserts the prefetch enable signal 106. The memory unit 9 outputs the data of the entry selected by the address bus 103 of the data field 10 and the pointer attribute field 11 to the data bus 105, and outputs the pointer attribute to the pointer attribute signal 104. Pointer attribute signal 1
03 and the prefetch enable signal 106 are input to the prefetch request signal generation circuit 13, and the pointer attribute signal 103 is 0 and the prefetch enable signal 106 is asserted, so that the prefetch request signal 107 is deasserted. The data cache memory 3 does not execute prefetch because the prefetch request signal 107 is deasserted.

【0019】上記したように、各レジスタのポインタ属
性を命令により設定することができ、ポインタ属性の設
定されたレジスタが更新された場合だけプリフェッチを
行なう。
As described above, the pointer attribute of each register can be set by the instruction, and the prefetch is performed only when the register in which the pointer attribute is set is updated.

【0020】なお、本実施例ではロード命令の例を示し
ているが、ストア命令の場合も同様である。
Although the present embodiment shows an example of a load instruction, the same applies to a store instruction.

【0021】[0021]

【発明の効果】以上説明したように、本発明は各レジス
タのポインタ属性を命令により設定することができ、ポ
インタ属性の設定されたレジスタに更新があった場合だ
けプリフェッチを行なう。従って、従来のレジスタ装置
にあった場合のようにすべてのレジスタ更新でプリフェ
ッチする場合と比較して、無駄なプリフェッチの実行時
間が不要であるため効果的にプリフェッチすることがで
き、性能を向上できる。
As described above, according to the present invention, the pointer attribute of each register can be set by the instruction, and the prefetch is performed only when the register in which the pointer attribute is set is updated. Therefore, compared to the case where the prefetch is performed for all register updates as in the case of the conventional register device, unnecessary prefetch execution time is not required, so that the prefetch can be performed effectively and the performance can be improved. .

【0022】また、従来のレジスタ装置にある無駄なプ
リフェッチにより、データキャッシュメモリに使用され
ないデータが格納されることでヒット率が低下すること
も回避できその効果は大きい。
Further, it is possible to avoid a decrease in the hit rate due to the storage of unused data in the data cache memory due to useless prefetch in the conventional register device, and the effect is large.

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

【図1】本発明の実施例におけるレジスタ装置を用いた
システムブロック図
FIG. 1 is a system block diagram using a register device according to an embodiment of the present invention.

【図2】本発明の実施例における動作例を示すプログラ
ムを示す説明図
FIG. 2 is an explanatory diagram showing a program showing an operation example in the embodiment of the present invention.

【図3】本発明の従来例におけるレジスタ装置を用いた
システムブロック図
FIG. 3 is a system block diagram using a register device in a conventional example of the present invention.

【図4】本発明の従来例における動作例を示すプログラ
ムを示す説明図
FIG. 4 is an explanatory diagram showing a program showing an operation example in a conventional example of the present invention.

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

1 レジスタ装置 2 命令実行ユニット 3 データキャッシュメモリ 4 主記憶装置 9 レジスタ装置のメモリ部 10 メモリ部9のデータフィールド 11 メモリ部9のポインタ属性フィールド 12 書き込み検出回路を含んた制御回路 13 プリフェッチ要求信号生成回路 100 アクセス要求信号 101 リード・ライト信号 102 ポインタ属性制御信号 103 アドレスバス 104 ポインタ属性信号 105 データバス REFERENCE SIGNS LIST 1 register device 2 instruction execution unit 3 data cache memory 4 main storage device 9 memory unit of register device 10 data field of memory unit 9 pointer attribute field of memory unit 12 control circuit including write detection circuit 13 prefetch request signal generation Circuit 100 Access request signal 101 Read / write signal 102 Pointer attribute control signal 103 Address bus 104 Pointer attribute signal 105 Data bus

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 プロセッサのレジスタにおいて、複数の
エントリを有し、 前記各エントリに、 前記プロセッサの命令実行ユニットにより読みし、書
き込み可能なデータを保持するデータフィールドと前記
命令実行ユニットにより書き込み可能なポインタ属性を
保持するポインタ属性フィールドを有するメモリ部と、 前記メモリ部へ前記命令実行ユニットからの書き込みが
あったことを検出する書き込み検出回路と、 書き込みが検出されたとき書き込みのあった前記エント
リの前記データフィールドのデータと前記ポインタ属性
フィールドのポインタ属性を読み出す読み出し手段と、 前記ポインタ属性がセットされている場合はデータキャ
ッシュメモリに対し前記読み出し手段により読み
データをプリフェッチアドレスとするプリフェッチ要求
を出す手段とを有することを特徴とするレジスタ装置。
1. A processor of the register has a plurality of entries, the each entry, read out by the instruction execution unit of the processor, it can be written by the data field and the instruction execution unit that holds a writable data Memory section having a pointer attribute field for holding a pointer attribute , a write detection circuit for detecting that the instruction execution unit has written to the memory section, and the entry to which writing has been performed when writing has been detected. said prefetch reading means for reading the data field of the data pointer attributes of the pointer attribute field, a <br/> data when the pointer attribute is set to the read out by the reading means to the data cache memory Address Register apparatus characterized by having means for issuing a fetch request.
JP5287939A 1993-11-17 1993-11-17 Register device Expired - Fee Related JP2927160B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5287939A JP2927160B2 (en) 1993-11-17 1993-11-17 Register device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5287939A JP2927160B2 (en) 1993-11-17 1993-11-17 Register device

Publications (2)

Publication Number Publication Date
JPH07141174A JPH07141174A (en) 1995-06-02
JP2927160B2 true JP2927160B2 (en) 1999-07-28

Family

ID=17723698

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5287939A Expired - Fee Related JP2927160B2 (en) 1993-11-17 1993-11-17 Register device

Country Status (1)

Country Link
JP (1) JP2927160B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006524850A (en) * 2003-04-04 2006-11-02 ペーアーツェーテー イクスペーペー テクノロジーズ アクチエンゲゼルシャフト Data processing method and data processing apparatus
CN111639042B (en) * 2020-06-04 2023-06-02 中科芯集成电路有限公司 Processing method and device for prefetching buffer data consistency

Also Published As

Publication number Publication date
JPH07141174A (en) 1995-06-02

Similar Documents

Publication Publication Date Title
US5499355A (en) Prefetching into a cache to minimize main memory access time and cache size in a computer system
US5265236A (en) Method and apparatus for increasing the speed of memory access in a virtual memory system having fast page mode
US5644788A (en) Burst transfers using an ascending or descending only burst ordering
US6205521B1 (en) Inclusion map for accelerated cache flush
US5802569A (en) Computer system having cache prefetching amount based on CPU request types
EP1029280B1 (en) Cache memory operation
JPH0630075B2 (en) Data processing device having cache memory
US7577791B2 (en) Virtualized load buffers
US5161219A (en) Computer system with input/output cache
US5530835A (en) Computer memory data merging technique for computers with write-back caches
US5420994A (en) Method for reading a multiple byte data element in a memory system with at least one cache and a main memory
US5367657A (en) Method and apparatus for efficient read prefetching of instruction code data in computer memory subsystems
JP2002196981A (en) Data processor
JP3164732B2 (en) Data processing device
US5287483A (en) Prefetched operand storing system for an information processor
JP2927160B2 (en) Register device
KR960007833B1 (en) Method and apparatus for fast page mode selection
EP0726524A2 (en) Protocol and system for performing line-fill addressing during copy-back operation
JPH07121443A (en) Information process system and its operating method
US9645825B2 (en) Instruction cache with access locking
JP3971807B2 (en) Cache storage device and method
JP4037806B2 (en) Cache memory device
JPH07234819A (en) Cache memory
JP3039391B2 (en) Memory system
JPH0628258A (en) Microprocessor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees