JPH07141174A - Register - Google Patents

Register

Info

Publication number
JPH07141174A
JPH07141174A JP5287939A JP28793993A JPH07141174A JP H07141174 A JPH07141174 A JP H07141174A JP 5287939 A JP5287939 A JP 5287939A JP 28793993 A JP28793993 A JP 28793993A JP H07141174 A JPH07141174 A JP H07141174A
Authority
JP
Japan
Prior art keywords
data
register
write
read
prefetch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP5287939A
Other languages
Japanese (ja)
Other versions
JP2927160B2 (en
Inventor
Tetsuya Tanaka
哲也 田中
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

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

Abstract

PURPOSE:To provide a register making it unnecessary to execute useless prefetching due to a change in a register storing data other than addresses. CONSTITUTION:The register includes a memory part 9 having plural entries, a data field 10 for storing data to be read out/written from/in respective entries by a processor instruction execution unit 2 and a pointer attribute field 11 for storing pointer attributes to be written by the unit 2, a control circuit 12 for detecting the writing of data from the unit 2 to the memory part 9, reading means 104, 105 for reading out the data of the field 10 for a written entry and the pointer attribute of the field 11 at the time of detecting the writing, and a means 13 for outputting a prefetch request 107 for using the read data as a prefetch address to a data cache memory 3 when the pointer attribute is set up.

Description

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

【0001】[0001]

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

【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 in, for example, Japanese Patent Application Laid-Open No. 4-90038. FIG. 3 is a block diagram of a system using this conventional register device, and FIG. 4 is a program showing an operation example of this conventional example. 1 is a register device, 2 is an instruction execution unit, 3 is a data cache memory, 4 is a main memory 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. Reference numeral 100 is a control circuit of the device 1, 100 and 101 are access request signals and read / write signals for accessing the register device 1 from the instruction execution unit 2, and 103 is an address bus for selecting an entry of the memory unit 9. , 105 are data buses for reading and writing to the memory section 9, and 107 is a prefetch request signal. Also,
Reference numeral 110 is a data transfer means between the instruction execution unit 2 and the data cache memory 3, and 120 is a 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 in the order of programs shown in FIG. 4 with reference to FIG. The register device 1 in this conventional example has four registers, which will be referred to as 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 at which data obtained later in the register r2 is stored. By this instruction, the instruction execution unit 2 asserts the access request signal 100, enables the read / write signal 101, and enables the address bus 10.
3 outputs the address of register r0 to data bus 105
The value of address ADDR is output to. Since the access request signal 100 is asserted and the read / write signal 101 is write enabled, the control circuit 15 enables the read / write signal 200, and the memory unit 9 is the entry selected by the address bus 103. The value of the data bus 105 is written in. Further, the control circuit 15 sets the read / write signal 200 to read enable 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. The data cache memory 3 has a data bus (prefetch address bus) when the prefetch request signal 107 is asserted.
Prefetch is performed with 105 as an address. In the prefetch, the requested address is the data cache memory 3
If not present, it is read from the main memory 4 and stored in the data cache memory 3. As a result, data having the address ADDR as an address can be prefetched into the data cache memory 3. Further, the prefetch is automatically performed in the same manner even when the value of the register r0 is changed next time. After that, while the data cache memory 3 is prefetching, the instruction execution unit 2 can execute other instructions, so that some instructions until the prefetch is completed do not access the memory or change the pointer. Is executed.

【0004】(2)load r2,[r0] レジスタr0の値をアドレスとするデータをレジスタr2に
格納する命令である。レジスタr0の値をアドレスとする
データは(1)のプリフェッチによりデータキャッシュ
メモリ3に格納されているので、データキャッシュメモ
リ3に対する読みだしはヒットすることになり、主記憶
装置4をアクセスすることなく読み出すことができる。
(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 value 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 will be a hit, and the main memory 4 will not be accessed. Can be read.

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

【0006】[0006]

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

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

【0008】[0008]

【課題を解決するための手段】本発明は、プロセッサの
レジスタにおいて、複数のエントリを有し、前記各エン
トリに前記プロセッサの命令実行ユニットにより読みだ
し、書き込み可能なデータを保持するフィールドと前記
命令実行ユニットにより書き込み可能なポインタ属性を
保持するフィールドを有するメモリ部と、前記メモリ部
へ前記命令実行ユニットからの書き込みがあったことを
検出する書き込み検出回路と、書き込みが検出されたと
き書き込みのあった前記エントリの前記データフィール
ドのデータと前記ポインタ属性フィールドのポインタ属
性を読み出す手段と、前記ポインタ属性がセットされて
いる場合はデータキャッシュメモリに対し前記読みだし
データをプリフェッチアドレスとするプリフェッチ要求
を出す手段を有するレジスタ装置である。
According to the present invention, there are provided a plurality of entries in a register of a processor, each entry having a field for holding writable data read by an instruction execution unit of the processor and the instruction. A memory unit having a field holding a pointer attribute writable by the execution unit, a write detection circuit for detecting that the instruction execution unit has written to the memory unit, and a write operation when writing is detected. And means for reading the data in the data field of the entry and the pointer attribute in the pointer attribute field, and issuing a prefetch request to the data cache memory when the pointer attribute is set, using the read data as the prefetch address. Have means It is a register system.

【0009】[0009]

【作用】上記の構成により、更新によりプリフェッチを
行なうレジスタをポインタ属性のついたものに限定する
ことができるため、アドレスでないデータを保持するレ
ジスタの変更による無駄なプリフェッチを行なうことが
ない。従って、無駄なプリフェッチによる性能の低下を
なくすことができ、また、データキャッシュメモリに使
用されないデータが格納されヒット率の低下を回避でき
る。
With the above structure, the registers to be prefetched by updating can be limited to those having the pointer attribute, so that unnecessary prefetching due to the change of the register holding the data which is not the address is not performed. Therefore, it is possible to prevent performance deterioration due to useless prefetching, and it is possible to avoid a decrease in hit rate because unused data is stored 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,
A description will be given with reference to the drawings. FIG. 1 is a block diagram of a system using a register device in one embodiment of the present invention, and FIG. 2 is a program showing an operation example of this 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 memory device. Further, 9 is a memory unit of the register device 1,
Reference numerals 10 and 11 respectively denote a data field of the memory unit 9, a pointer attribute field, 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.
Prefetch request signal 10 when is asserted
This is a prefetch request signal generation circuit that asserts 7 and deasserts the others. Reference numerals 100 and 101 are access request signals and read / write signals for accessing the register device 1 from the instruction execution unit 2, 102 is a pointer attribute control signal for setting / resetting pointer attributes, and 103 is an entry of the memory unit 9. Is an address bus for selecting a pointer attribute field for reading and writing a pointer attribute field, 105 is a data bus for reading and writing a data field 10, and 106 is a register from an instruction execution unit. A prefetch enable signal for generating a prefetch by writing to the device 1, 107 is a prefetch request signal from the register device 1 to the data cache memory 3, and 200 is a read or write control for the data field 10. Read / write signal, 201 indicates pointer attribute field 1
This is a read / write signal for controlling the read or write for 1. Reference numeral 110 denotes a data transfer unit between the instruction execution unit 2 and the data cache memory 3, and 12
Reference numeral 0 is a data transfer means 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 in the order of programs shown in FIG. 2 with reference to FIG.
The register device 1 in this embodiment has four entries and corresponds to four registers. The four registers are referred to as registers r0, r1, r2, r3, respectively.

【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. The control circuit 12 enables the read / write signal 201 because the access request signal 100 and the pointer attribute control signal 102 are asserted. By the read / write signal 201, the memory unit 9 writes the value of the pointer attribute signal 104 to the entry selected by the address bus 103 of the pointer attribute field 11. As a result, the instruction execution unit 2 sets 1 to the pointer attribute bit of the register r0.
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.
By 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 uses the access request signal 100 and the pointer attribute control signal 102.
Is asserted, the read / write signal 201
Write enable. Read / write signal 201
Thus, the memory unit 9 writes the value of the pointer attribute signal 104 to the entry selected by the address bus 103 of the pointer attribute field 11. As a result, the instruction execution unit 2 writes 0 in 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 the address where the data obtained later in the register r2 is stored. This instruction causes the instruction execution unit 2 to assert the access request signal 100, enable the read / write signal 101, output the address of the register r0 to the address bus 103, and output the value of the address ADDR to the data bus 105. Control circuit 12
Since the access request signal 100 is asserted and the read / write signal 101 is write enable, the read / write signal 200 is write enabled. 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 by the read / write signal 200.

【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 sets the read / write signals 200 and 201 to read enable and asserts the prefetch enable signal 106. In response to the read / write signals 200 and 201, the memory section 9 causes the data field 10 and the data of the entry selected by the address bus 103 of the pointer attribute field 11 to the data bus 105 and the pointer attribute to the pointer attribute signal 10
Output to 4. 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 with 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, the data is read from the main memory 4 and stored in the data cache memory 3. As a result, data having the address ADDR as an address can be prefetched into the data cache memory 3. Similarly, the next time the value of register r0 is changed, prefetching is automatically performed in the same manner until the pointer attribute is reset. After this instruction, while the data cache memory 3 is performing the prefetch, the instruction execution unit 2 can execute another instruction, so that several instructions until the prefetch is completed perform memory access and change of the pointer. Assume that you are executing an instruction that does not exist.

【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 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, and the memory unit 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 of the data bus 105 as an address from the data cache memory 3. In this case, since the prefetch is performed by the instruction (3), the data cache memory 3 is hit and the data can be immediately read. Next, the instruction execution unit 2 asserts the access request signal 100, enables the read / write signal 101 for writing, outputs the address of the register r2 to the address bus 103, and outputs the data bus 1
The data read from the data cache memory 3 is output to 05. The control circuit 12 uses the access request signal 1
00 is asserted and read / write signal 101
Is write-enabled, the read / write signal 200 is write-enabled. The memory unit 9 writes the data of the data bus 105 to the entry selected by the address bus 103 of the data field 10.
By doing so, the data cache memory 3 does not miss the data whose address is the register r0,
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 also hits.

【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 the 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. In response to the read / write signal 200, the memory unit 9 sets 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 sets the read / write signals 200 and 201 to 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 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 since the pointer attribute signal 103 is 0 and the prefetch enable signal 106 is asserted, 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 an instruction, and prefetching is performed only when the register for which the pointer attribute is set is updated.

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

【0021】[0021]

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

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

【図面の簡単な説明】[Brief description of 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 データバス 1 Register Device 2 Instruction Execution Unit 3 Data Cache Memory 4 Main Memory 9 Memory Unit of Register Device 10 Data Field of Memory Unit 9 Pointer Attribute Field of Memory Unit 9 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)

【特許請求の範囲】[Claims] 【請求項1】プロセッサのレジスタにおいて、複数のエ
ントリを有し、 前記各エントリに、 前記プロセッサの命令実行ユニットにより読みだし、書
き込み可能なデータを保持するフィールドと前記命令実
行ユニットにより書き込み可能なポインタ属性を保持す
るフィールドを有するメモリ部と、 前記メモリ部へ前記命令実行ユニットからの書き込みが
あったことを検出する書き込み検出回路と、 書き込みが検出されたとき書き込みのあった前記エント
リの前記データフィールドのデータと前記ポインタ属性
フィールドのポインタ属性を読み出す手段と、 前記ポインタ属性がセットされている場合はデータキャ
ッシュメモリに対し前記読みだしデータをプリフェッチ
アドレスとするプリフェッチ要求を出す手段とを有する
ことを特徴とするレジスタ装置。
1. A processor register has a plurality of entries, each entry having a field for holding data writable and writable by an instruction execution unit of the processor and a pointer writable by the instruction execution unit. A memory section having a field for holding an attribute; a write detection circuit for detecting that there is a write from the instruction execution unit to the memory section; and the data field of the entry having a write when the write is detected. And a means for reading the pointer attribute of the pointer attribute field, and a means for issuing a prefetch request to the data cache memory when the pointer attribute is set, using the read data as a prefetch address. To Register apparatus.
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 true JPH07141174A (en) 1995-06-02
JP2927160B2 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)

Cited By (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
CN111639042A (en) * 2020-06-04 2020-09-08 中科芯集成电路有限公司 Method and device for processing consistency of prefetched buffer data

Cited By (3)

* 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
CN111639042A (en) * 2020-06-04 2020-09-08 中科芯集成电路有限公司 Method and device for processing consistency of prefetched buffer data
CN111639042B (en) * 2020-06-04 2023-06-02 中科芯集成电路有限公司 Processing method and device for prefetching buffer data consistency

Also Published As

Publication number Publication date
JP2927160B2 (en) 1999-07-28

Similar Documents

Publication Publication Date Title
US5265236A (en) Method and apparatus for increasing the speed of memory access in a virtual memory system having fast page mode
JPH11175391A (en) Method and device for expanding writing/erasing function of flash memory
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
US7577791B2 (en) Virtualized load buffers
JP2002196981A (en) Data processor
US6976130B2 (en) Cache controller unit architecture and applied method
JP3164732B2 (en) Data processing device
JPH0362243A (en) Apparatus for quickening memory access in information processing system
KR960007833B1 (en) Method and apparatus for fast page mode selection
JP2927160B2 (en) Register device
US9645825B2 (en) Instruction cache with access locking
JPH07121443A (en) Information process system and its operating method
JPS5953631B2 (en) storage controller
JPH07234819A (en) Cache memory
JP2003058420A (en) Method for reading data out of nand type flash memory
JPH06149669A (en) System and device for transferring cache data
JPH07152650A (en) Cache control unit
JPH0628258A (en) Microprocessor
JPH0784886A (en) Method and unit for cache memory control
JP3729832B2 (en) Cache memory device
JP3799451B2 (en) Electronic computer system
JPH1185613A (en) Cache memory
JP3761890B2 (en) Cache memory device
JP2001344152A (en) Cash memory device

Legal Events

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