JP2637853B2 - Cache memory device - Google Patents
Cache memory deviceInfo
- Publication number
- JP2637853B2 JP2637853B2 JP3038470A JP3847091A JP2637853B2 JP 2637853 B2 JP2637853 B2 JP 2637853B2 JP 3038470 A JP3038470 A JP 3038470A JP 3847091 A JP3847091 A JP 3847091A JP 2637853 B2 JP2637853 B2 JP 2637853B2
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- data
- address
- cache
- memory device
- 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
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明は、命令とデータとを分離
して格納するキャッシュメモリ装置に関し、特に、命令
で書き換えたデータを命令として処理を行う情報処理装
置で用いられるキャッシュメモリ装置に関するものであ
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory device for storing an instruction and data separately, and more particularly to a cache memory device used in an information processing device for processing data rewritten by an instruction as an instruction. It is.
【0002】[0002]
【従来の技術】近年、情報処理装置において、主記憶装
置に格納されているデータや命令のうち、頻繁にアクセ
スされる部分だけを格納し、主記憶装置よりも高速にア
クセスができるキャッシュメモリ装置を持つことによっ
て、性能を上げることがしばしば行われる。更に、キャ
ッシュメモリ装置に対して、命令とデータとを同時にア
クセスできるよう、命令を格納するキャッシュとデータ
を格納するキャッシュとに分離することが多い。2. Description of the Related Art In recent years, in an information processing apparatus, a cache memory device which stores only frequently accessed portions of data and instructions stored in a main storage device and which can access at a higher speed than the main storage device. Often, performance is enhanced by having Furthermore, the cache memory device is often separated into a cache for storing instructions and a cache for storing data so that instructions and data can be accessed simultaneously.
【0003】図5に従来のキャッシュメモリ装置を用い
た情報処理装置のブロック図を示す。図5において、1
はデータキャッシュであって、データとタグと有効ビッ
トVとを格納するエントリーを複数有する。2は命令キ
ャッシュであって、命令とタグと有効ビットVとを格納
するエントリーを複数有する。それぞれのタグには、デ
ータ又は命令に対応するアドレスの上位の部分が格納さ
れている。有効ビットVは対応するデータ又は命令が有
効かどうかを示す。50は制御回路であり、データキャ
ッシュ1及び命令キャッシュ2の制御や外部へのアクセ
スの要求等を行う。4はCPU(中央処理装置)であ
り、命令で指示された処理を行う。5,6はアドレス変
換装置であり、それぞれ論理アドレスLAとそれに対応
する物理アドレスPAとを格納するアドレス変換対2
0,21を複数有し、論理アドレスを物理アドレスに変
換する。CPU4がロード命令によってデータの読出し
を行う場合、論理データアドレス9を出力し、これをア
ドレス変換装置6によって物理データアドレス10に変
換し、データキャッシュ1のエントリーが読み出され
る。エントリーのタグと物理データアドレス10の上位
の部分とが一致し、有効ビットVが1の場合、即ちキャ
ッシュがヒットした場合は、エントリーのデータをデー
タバス13を介してCPU4に渡す。命令の読出しの場
合も同様にして、論理命令アドレス7をアドレス変換装
置5によって物理命令アドレス8に変換し、命令キャッ
シュ2から命令を読み出す。このように、命令キャッシ
ュ2とデータキャッシュ1とを分離することによって命
令とデータとのアクセスが同時にでき、性能を向上させ
ることができるが、次のような場合に問題が生じる。FIG. 5 is a block diagram of an information processing apparatus using a conventional cache memory device. In FIG. 5, 1
Is a data cache having a plurality of entries for storing data, tags, and valid bits V. An instruction cache 2 has a plurality of entries for storing instructions, tags, and valid bits V. Each tag stores an upper part of an address corresponding to data or an instruction. Valid bit V indicates whether the corresponding data or instruction is valid. A control circuit 50 controls the data cache 1 and the instruction cache 2 and requests external access. Reference numeral 4 denotes a CPU (Central Processing Unit) that performs a process specified by an instruction. Reference numerals 5 and 6 denote address translation devices, each of which is an address translation pair 2 for storing a logical address LA and a corresponding physical address PA.
It has a plurality of 0 and 21 and converts a logical address to a physical address. When the CPU 4 reads data by a load instruction, it outputs a logical data address 9, converts the logical data address 9 into a physical data address 10 by an address conversion device 6, and reads an entry in the data cache 1. When the tag of the entry matches the upper part of the physical data address 10 and the valid bit V is 1, that is, when the cache hits, the entry data is transferred to the CPU 4 via the data bus 13. Similarly, in the case of reading an instruction, the logical instruction address 7 is converted into the physical instruction address 8 by the address conversion device 5 and the instruction is read from the instruction cache 2. As described above, by separating the instruction cache 2 and the data cache 1, the instruction and the data can be accessed at the same time and the performance can be improved. However, a problem occurs in the following cases.
【0004】外部メモリ装置に格納された複数のプログ
ラムを1つに結合して実行したり、実行中にプログラム
の一部を修正して実行する場合がある。プログラム内の
命令を移動したり、書き換えたりする場合、通常、ロー
ド/ストア命令が用いられる。ストア命令を用いて、命
令を新しい番地に格納したり、ある番地の命令を書き換
える場合、外部メモリ装置は更新されずに、データキャ
ッシュだけが更新される。ところが、実行するために命
令を読み出そうとすると、データキャッシュではなく命
令キャッシュがアクセスされる。従って、命令キャッシ
ュにすでに格納されていた更新前の命令、或いは命令キ
ャッシュに格納されていない場合は外部メモリ装置から
更新前の命令が誤って読み出されて実行されるという問
題が起こる。これを避けるため、従来、移動或いは更新
された命令を読み出す前に、特別な命令を用いて、デー
タキャッシュに格納されている命令を外部メモリ装置に
書き込み、命令キャッシュを無効化して、命令として読
み出す場合には、必ず外部メモリ装置から最新の命令を
読み出すようにしていた。ここで言う外部メモリ装置と
は、階層構造の記憶装置の第2階層目以降の記憶装置を
指す。即ち、主記憶装置や第2階層目のキャッシュメモ
リ装置等である。There are cases where a plurality of programs stored in an external memory device are combined into one and executed, or a part of the program is modified and executed during execution. When an instruction in a program is moved or rewritten, a load / store instruction is usually used. When a store instruction is used to store an instruction at a new address or rewrite an instruction at a certain address, only the data cache is updated without updating the external memory device. However, when trying to read an instruction for execution, the instruction cache is accessed instead of the data cache. Therefore, there is a problem in that the pre-update instruction already stored in the instruction cache or, if not stored in the instruction cache, the pre-update instruction is erroneously read from the external memory device and executed. To avoid this, conventionally, before reading the moved or updated instruction, the instruction stored in the data cache is written to an external memory device using a special instruction, the instruction cache is invalidated, and the instruction is read as an instruction. In such a case, the latest instruction is always read from the external memory device. The external memory device referred to here refers to a storage device of the second or later hierarchy of the storage device having a hierarchical structure. That is, it is a main storage device, a second-level cache memory device, or the like.
【0005】[0005]
【発明が解決しようとする課題】従来例では、データキ
ャッシュに格納されている全てのデータを調べ、更新さ
れたものである場合は、それを外部メモリ装置に書き込
むのに、本来のプログラムの実行を中断し、しかも非常
に多くのサイクルを必要としていた。更に、命令キャッ
シュを全て無効化することによって、更新されていない
命令まで無効化されてしまい、必要以上に外部メモリ装
置から命令を読み出すことになり、命令の読出し時間の
増大による性能低下を生じる等の問題があった。In the prior art, all data stored in the data cache is checked, and if the data has been updated, it is written to an external memory device. Interrupted and required a very large number of cycles. Further, by invalidating the entire instruction cache, even the instruction that has not been updated is invalidated, and the instruction is read from the external memory device more than necessary. There was a problem.
【0006】本発明はかかる点に鑑みてなされたもの
で、ストア命令で命令を更新した場合でも、直ちに外部
メモリ装置を更新でき、命令キャッシュの必要な部分だ
け無効化するか、或いは更新された命令を読み出そうと
した場合は命令キャッシュではなく、データキャッシュ
又は外部メモリ装置から命令を読み出すことによって、
更新された命令を効率良く処理するキャッシュメモリ装
置を供給することを目的としている。The present invention has been made in view of the above circumstances. Even when an instruction is updated by a store instruction, the external memory device can be updated immediately, and only a necessary portion of the instruction cache is invalidated or updated. When trying to read an instruction, by reading the instruction from the data cache or external memory device instead of the instruction cache,
It is an object of the present invention to provide a cache memory device that efficiently processes updated instructions.
【0007】[0007]
【課題を解決するための手段】本発明は、前記問題点を
解決するため、命令のアドレスかデータのアドレスを選
択して出力するアドレス選択回路と制御回路とを備え、
書き込むデータが命令領域内にあることを示す制御信号
が与えられると、アドレス選択回路はデータのアドレス
を選択して命令キャッシュに与え、制御回路は、与えら
れたデータのアドレスに対応する命令キャッシュ内の命
令を無効化し、外部メモリ装置にデータの格納を要求す
るようにしたものである。According to the present invention, there is provided an address selecting circuit for selecting and outputting an instruction address or a data address, and a control circuit.
When a control signal indicating that data to be written is in the instruction area is provided, the address selection circuit selects an address of the data and supplies the selected data to the instruction cache. invalidates the instruction is obtained by such requests the storage of data in the external memory device.
【0008】前記問題点を解決する他の手段は、命令の
アドレスによる命令の読出しとデータのアドレスと無効
化要求信号によって命令を無効化できる命令キャッシュ
と制御回路とを備え、書き込むデータが命令領域内にあ
ることを示す信号が与えられると、制御回路は無効化要
求信号を出力し、外部メモリ装置にデータの格納を要求
するようにしたものである。Another means for solving the above problem comprises an instruction cache and a control circuit which can read an instruction by an instruction address, invalidate the instruction by a data address and an invalidation request signal, and write data in an instruction area. given a signal indicating that within the control circuit outputs an invalidation request signal, is obtained so as to request the storage of data in the external memory device.
【0009】更に他の手段は、命令のアドレスかデータ
のアドレスを選択して出力するアドレス選択回路と制御
回路とを備え、読み出す命令がデータ領域内にあること
を示す制御信号が与えられると、アドレス選択回路は命
令のアドレスを選択してデータキャッシュに与え、制御
回路は与えられた命令のアドレスに対応するデータキャ
ッシュ内のデータを読み出すか、又は外部メモリ装置に
命令の読出しを要求するようにしたものである。Still another means includes an address selection circuit for selecting and outputting an instruction address or a data address, and a control circuit. When a control signal indicating that the instruction to be read is in the data area is applied, The address selection circuit selects the address of the instruction and supplies it to the data cache, and the control circuit reads the data in the data cache corresponding to the address of the supplied instruction or requests the external memory device to read the instruction. It was done.
【0010】[0010]
【作用】本発明では、前記した1番目又は2番目の構成
により、ストア命令によって命令領域内にデータを書き
込もうとした場合、命令キャッシュ内の対応する命令を
無効化し、外部メモリ装置にデータ書き込むことによ
り、更新されたデータを命令として読み出す場合、命令
キャッシュ内の対応する命令はすでに無効化されている
ため、外部メモリ装置に対してアクセスが行われ、常に
最新の命令を読み出すことができる。According to the present invention, the first or second configuration described above, when an attempt is made to write the data in the instruction region by the store instruction, invalidates the corresponding instruction in the instruction cache, the data in the external memory device When reading updated data as an instruction by writing, since the corresponding instruction in the instruction cache has already been invalidated, the external memory device is accessed and the latest instruction can always be read. .
【0011】また3番目の構成により、データ領域内で
更新された命令を読み出そうとした場合、データキャッ
シュからか、或いは外部メモリ装置から更新後の正しい
命令を読み出すことができる。According to the third configuration, when an instruction updated in the data area is to be read, a correct updated instruction can be read from the data cache or the external memory device.
【0012】1〜3番目のいずれの構成でも、ストア命
令を用いて更新された命令を、特別な命令を用いること
なく、更新後の正しい命令を読み出すことができる。In any of the first to third configurations, an updated instruction using a store instruction can be read without using a special instruction.
【0013】[0013]
【実施例】以下、本発明の実施例を図面に基づいて説明
する。Embodiments of the present invention will be described below with reference to the drawings.
【0014】図1に本発明の実施例1のキャッシュメモ
リ装置を用いた情報処理装置のブロック図を示す。尚、
図5と同じ部分については同じ符号を付してその詳細な
説明は省略する。図1において、3aは制御回路であ
り、データキャッシュ1や命令キャッシュ2の制御或い
は外部のメモリに対してアクセスの要求を行う。アドレ
ス変換装置6のアドレス変換対21は、論理アドレスL
Aと物理アドレスPAとの他に命令領域ビットiを有す
る。命令領域ビットiが1である場合は、論理データア
ドレス9で指定される番地が命令の領域内であることを
示す。11はアドレス選択回路であり、物理データアド
レス10又は物理命令アドレス8を選択して、命令キャ
ッシュ2に与える。命令の読出しに対しては、アドレス
選択回路11が物理アドレス8を選択するほかは、従来
例と同様に行われる。FIG. 1 is a block diagram of an information processing apparatus using a cache memory device according to a first embodiment of the present invention. still,
The same parts as those in FIG. 5 are denoted by the same reference numerals, and detailed description thereof will be omitted. In FIG. 1, reference numeral 3a denotes a control circuit which controls the data cache 1 and the instruction cache 2 or requests access to an external memory. The address translation pair 21 of the address translation device 6 has a logical address L
It has an instruction area bit i in addition to A and the physical address PA. When the instruction area bit i is 1, it indicates that the address specified by the logical data address 9 is within the instruction area. An address selection circuit 11 selects a physical data address 10 or a physical instruction address 8 and supplies it to the instruction cache 2. Instruction reading is performed in the same manner as in the conventional example, except that the address selection circuit 11 selects the physical address 8.
【0015】命令領域内にデータを書き込む場合を説明
する。CPU4はストア命令を実行して、書き込むべき
データをデータバス13に出力し、論理データアドレス
9と書込み要求信号14とを出力する。アドレス変換装
置6は論理データアドレス9を物理データアドレス10
に変換する。この時、変換に使われたアドレス変換対2
1の命令領域ビットiは1であり、命令領域アクセス信
号15を出力して、データのアクセスが命令領域に対し
て行われていることを示す。書込み要求信号14と命令
領域アクセス信号15とによって、命令領域内を更新し
ようとしていることが示されると、アドレス選択回路1
1は物理データアドレス10を選択して、命令キャッシ
ュ2に与える。制御回路3aは、選択された物理データ
アドレスによって指定される命令キャッシュ2のエント
リーの有効ビットVを0にすることによって、命令を無
効化するとともに、物理データアドレス10によって指
定されるデータキャッシュ1のエントリーの有効ビット
Vを0にして無効化する。さらに、制御回路3aは主記
憶装置や2次キャッシュメモリ装置のような外部メモリ
装置に対してメモリアクセス要求16を出力して、物理
データアドレス10で示される外部メモリ装置の番地に
データバス13を介してCPU4より与えられたデータ
を書き込む。このようにして、物理データアドレス10
によって指定される、データキャッシュメモリと命令キ
ャッシュメモリのエントリーはどちらも無効化され、外
部メモリ装置がCPU4からのデータで更新される。A case where data is written in the instruction area will be described. The CPU 4 executes the store instruction, outputs data to be written to the data bus 13, and outputs a logical data address 9 and a write request signal 14. The address translator 6 converts the logical data address 9 into the physical data address 10
Convert to At this time, the address translation used for translation
The instruction area bit i of 1 is 1, and the instruction area access signal 15 is output to indicate that data access is being performed on the instruction area. When the write request signal 14 and the instruction area access signal 15 indicate that the instruction area is to be updated, the address selection circuit 1
1 selects the physical data address 10 and gives it to the instruction cache 2. The control circuit 3a invalidates the instruction by setting the valid bit V of the entry of the instruction cache 2 specified by the selected physical data address to 0, and also disables the instruction of the data cache 1 specified by the physical data address 10. The valid bit V of the entry is set to 0 and invalidated. Further, the control circuit 3a outputs a memory access request 16 to an external memory device such as a main storage device or a secondary cache memory device, and connects the data bus 13 to the address of the external memory device indicated by the physical data address 10. Then, the data given from the CPU 4 is written. Thus, the physical data address 10
Both the entry in the data cache memory and the entry in the instruction cache memory are invalidated, and the external memory device is updated with the data from the CPU 4.
【0016】図2に本発明の実施例2のキャッシュメモ
リ装置を用いた情報処理装置のブロック図を示す。図2
において、命令キャッシュ2aは第1の命令エントリー
アクセス手段33と第2の命令エントリーアクセス手段
34とを有し、第1の命令エントリーアクセス手段33
は物理命令アクセス8によって命令キャッシュ2aのエ
ントリーをアクセスし、第2の命令エントリーアクセス
手段34は命令無効化要求信号35が与えられると、物
理データアドレス10によって指定される命令キャッシ
ュ2aのエントリーの有効ビットVを0にすることによ
って、その命令を無効化する。第1の命令エントリーア
クセス手段33と第2の命令エントリーアクセス手段3
4とは独立に動作することができる。FIG. 2 is a block diagram of an information processing apparatus using a cache memory device according to a second embodiment of the present invention. FIG.
, The instruction cache 2a has a first instruction entry access unit 33 and a second instruction entry access unit 34, and the first instruction entry access unit 33
Accesses the entry of the instruction cache 2a by the physical instruction access 8, and when the instruction invalidation request signal 35 is given, the second instruction entry access means 34 validates the entry of the instruction cache 2a specified by the physical data address 10. By setting bit V to 0, the instruction is invalidated. First instruction entry access means 33 and second instruction entry access means 3
4 can operate independently.
【0017】命令領域内にデータを書き込む場合を説明
する。CPU4はストア命令を実行し、実施例1と同様
にして、書込み要求信号14と命令領域アクセス信号1
5とによって命令領域内を更新しようとしていることが
示されると、制御回路3bは、命令無効化要求信号35
を命令キャッシュ2aの第2の命令エントリーアクセス
手段34に与える。第2の命令アクセス手段34は、書
き込むデータの物理データアドレス10によって指定さ
れる命令のエントリーを無効化する。また、制御回路3
bは、物理データアドレス10によって指定されるデー
タキャッシュ1のエントリーの有効ビットVを0にし
て、対応するデータを無効化する。さらに、制御回路3
bは外部メモリ装置に対してメモリアクセス要求16を
出力して、物理データアドレス10で示される外部メモ
リ装置の番地にデータバス13を介してCPU4より与
えられたデータを書き込む。このようにして、物理デー
タアドレス10によって指定される、データキャッシュ
メモリと命令キャッシュメモリのエントリーはどちらも
無効化され、外部メモリ装置がCPU4からのデータで
更新される。A case where data is written in the instruction area will be described. The CPU 4 executes the store instruction, and executes the write request signal 14 and the instruction area access signal 1 in the same manner as in the first embodiment.
5 indicates that the instruction area is to be updated, the control circuit 3b sends the instruction invalidation request signal 35
To the second instruction entry access means 34 of the instruction cache 2a. The second instruction access unit 34 invalidates the entry of the instruction specified by the physical data address 10 of the data to be written. The control circuit 3
b sets the valid bit V of the entry of the data cache 1 designated by the physical data address 10 to 0, and invalidates the corresponding data. Further, the control circuit 3
b outputs a memory access request 16 to the external memory device and writes the data given from the CPU 4 via the data bus 13 to the address of the external memory device indicated by the physical data address 10. In this way, the entries in the data cache memory and the instruction cache memory specified by the physical data address 10 are both invalidated, and the external memory device is updated with the data from the CPU 4.
【0018】このように、実施例1,2においては、命
令領域内のデータを更新した後、同じアドレスで命令を
読み出して実行しようとした場合、命令キャッシュは必
ずミスするので、外部メモリ装置から更新後のデータを
読み出し実行することができる。更に、実施例2におい
ては、物理命令アドレスを用いた命令の読出しと、物理
データアドレスを用いた命令の無効化とが同時に行える
ので、無効化によって命令の読出しが妨げられることな
く、高速処理ができる。As described above, in the first and second embodiments, when the instruction in the instruction area is read and executed after updating the data in the instruction area, the instruction cache always misses. The updated data can be read and executed. Further, in the second embodiment, since the reading of the instruction using the physical instruction address and the invalidation of the instruction using the physical data address can be performed at the same time, the reading of the instruction is not hindered by the invalidation, and the high-speed processing can be performed. it can.
【0019】実施例1,2では、制御回路3a,3b
は、物理データアドレスによって指定される命令キャッ
シュ2のエントリーを無効化しているが、図3に示す実
施例3では、書込み要求信号14と命令領域アクセス信
号15とによって、命令領域内を更新しようとしている
ことが示されると、制御回路3cは、データ書込み信号
36を命令キャッシュに与え、CPU4がデータバス1
3に出力した書込みデータを物理データアドレスによっ
て指定される命令キャッシュ2のエントリーに書き込む
ことも可能である。この場合、更新後の命令を読み出す
時、命令キャッシュ2に更新後の命令が格納されている
ので、命令キャッシュ2から高速に読み出すことができ
る。In the first and second embodiments, the control circuits 3a, 3b
Invalidates the entry in the instruction cache 2 specified by the physical data address. In the third embodiment shown in FIG. 3, the write request signal 14 and the instruction area access signal 15 are used to update the instruction area. Control circuit 3c supplies a data write signal 36 to the instruction cache and the CPU 4
3 can be written to an entry of the instruction cache 2 specified by the physical data address. In this case, when the updated instruction is read, the updated instruction is stored in the instruction cache 2, so that the instruction can be read from the instruction cache 2 at high speed.
【0020】図4に本発明の実施例4のキャッシュメモ
リ装置を用いた情報処理装置のブロック図を示す。図4
において、3dは制御回路であり、データキャッシュ1
や命令キャッシュ2の制御或いは外部のメモリに対して
アクセスの要求を行う。アドレス変換装置5のアドレス
変換対22は、論理アドレスLAと物理アドレスPAの
他にデータ領域ビットdを有する。データ領域ビットd
が1である場合は、論理命令アドレス7で指定される番
地がデータの領域内であり、ストア命令によって更新さ
れる可能性があることを示す。41はアドレス選択回路
であり、物理データアドレス10か物理命令アドレス8
を選択して、データキャッシュ1に与える。ロード/ス
トア命令に対しては、アドレス選択回路41は物理デー
タアドレス10を選択する。FIG. 4 is a block diagram of an information processing apparatus using a cache memory device according to a fourth embodiment of the present invention. FIG.
, 3d is a control circuit, and the data cache 1
Or request for access to the control of the instruction cache 2 or an external memory. The address translation pair 22 of the address translation device 5 has a data area bit d in addition to the logical address LA and the physical address PA. Data area bit d
Is 1, it indicates that the address specified by the logical instruction address 7 is within the data area and may be updated by a store instruction. 41 is an address selection circuit, which is a physical data address 10 or a physical instruction address 8
Is given to the data cache 1. For a load / store instruction, the address selection circuit 41 selects the physical data address 10.
【0021】データ領域内から命令を読み出す場合を説
明する。CPU4は論理命令アドレス7と命令要求信号
42を出力する。アドレス変換装置5は論理命令アドレ
ス7を物理命令アドレス8に変換する。この時、変換に
使われたアドレス変換対のデータ領域ビットdは1であ
り、データ領域アクセス信号43を出力して、命令の読
出しがデータ領域に対して行われ、ストア命令によって
すでに更新された可能性があることを示す。命令要求信
号42とデータ領域アクセス信号43によって、データ
領域内からの命令の読出しを行おうとしていることが示
されると、アドレス選択回路41は物理命令アドレス8
を選択して、データキャッシュ1に与える。制御回路3
dは、命令キャッシュ2の読出しを禁止し、アドレス選
択回路41によって与えられた物理命令アドレス8によ
ってデータキャッシュ1を読み出す。データキャッシュ
1がヒットすると、バス接続手段44によって、読み出
されたデータを命令バス12に出力し、CPU4に与え
る。データキャッシュ1がミスすると外部メモリ装置に
メモリアクセス要求16を出して、外部メモリ記憶装置
から命令を読み出し、命令バス12を介してCPU4に
与える。このようにして、ストア命令を用いてデータキ
ャッシュが更新されていても、更新された領域を予めデ
ータ領域と指定しておくことによって、命令として読み
出す場合、更新されたデータを読み出すことができる。A case where an instruction is read from the data area will be described. The CPU 4 outputs a logical instruction address 7 and an instruction request signal 42. The address translator 5 translates the logical instruction address 7 into a physical instruction address 8. At this time, the data area bit d of the address translation pair used for translation is 1, and the data area access signal 43 is output, the instruction is read from the data area, and has already been updated by the store instruction. Indicates a possibility. When the instruction request signal 42 and the data area access signal 43 indicate that an instruction is to be read from the data area, the address selection circuit 41 sets the physical instruction address 8
Is given to the data cache 1. Control circuit 3
“d” inhibits reading of the instruction cache 2 and reads the data cache 1 by the physical instruction address 8 given by the address selection circuit 41. When the data cache 1 hits, the read data is output to the instruction bus 12 by the bus connection means 44 and given to the CPU 4. When the data cache 1 misses, it issues a memory access request 16 to the external memory device, reads an instruction from the external memory storage device, and gives it to the CPU 4 via the instruction bus 12. In this way, even if the data cache has been updated using the store instruction, by specifying the updated area as the data area in advance, the updated data can be read when read as an instruction.
【0022】[0022]
【発明の効果】以上述べてきたように、本発明によれ
ば、極めて簡単な構成で、ストア命令を用いて命令領域
内のデータを書き換えようとした時点で、命令キャッシ
ュ内の対応する命令を無効化し、外部メモリ装置のデー
タを更新することができる。或いは、データ領域内の命
令を読み出そうとした時点で、データキャッシュ或いは
外部メモリ装置から更新後の命令を読み出すことができ
る。従って、データキャッシュ内のデータを外部メモリ
装置へ転送したり、命令キャッシュを無効化するための
特別な命令を必要でなく、プログラムの簡略化と処理の
高速化が実現できる。さらに、命令キャッシュを無効化
する場合、従来は命令キャッシュ内の全ての命令に対し
て行われていたのに対して、書き込むデータのアドレス
に対応する命令だけを無効化するために、無効化されな
かった命令に対しては、命令キャッシュから高速に読み
出すことができ、処理の高速化が実現される。外部メモ
リ装置へのアクセスの回数を減らすことができるので、
他の装置が外部メモリ装置を利用することができ、シス
テム全体の性能を向上させることができる。As described above, according to the present invention, when an attempt is made to rewrite data in an instruction area using a store instruction with a very simple configuration, a corresponding instruction in the instruction cache is rewritten. disable can update the data in the external memory device. Alternatively, when an instruction in the data area is to be read, the updated instruction can be read from the data cache or the external memory device. Therefore, it is not necessary to transfer data in the data cache to the external memory device or to provide a special instruction for invalidating the instruction cache, and the program can be simplified and the processing can be speeded up. Further, when invalidating the instruction cache, the instruction is invalidated in order to invalidate only the instruction corresponding to the address of the data to be written, whereas conventionally, all instructions in the instruction cache are performed. The missing instruction can be read from the instruction cache at a high speed, and the processing can be speeded up. Since the number of accesses to the external memory device can be reduced,
Other devices can use the external memory device, which can improve the performance of the entire system.
【図1】本発明の実施例1のキャッシュメモリ装置を用
いた情報処理装置のブロック図である。FIG. 1 is a block diagram of an information processing apparatus using a cache memory device according to a first embodiment of the present invention.
【図2】本発明の実施例2のキャッシュメモリ装置を用
いた情報処理装置のブロック図である。FIG. 2 is a block diagram of an information processing apparatus using a cache memory device according to a second embodiment of the present invention.
【図3】本発明の実施例3のキャッシュメモリ装置を用
いた情報処理装置のブロック図である。FIG. 3 is a block diagram of an information processing apparatus using a cache memory device according to a third embodiment of the present invention.
【図4】本発明の実施例4のキャッシュメモリ装置を用
いた情報処理装置のブロック図である。FIG. 4 is a block diagram of an information processing apparatus using a cache memory device according to a fourth embodiment of the present invention.
【図5】従来のキャッシュメモリ装置を用いた情報処理
装置を用いたブロック図である。FIG. 5 is a block diagram using an information processing device using a conventional cache memory device.
1…データキャッシュ 2,2a…命令キャッシュ 3a,3b,3c,3d…制御回路 4…中央処理装置 5,6…アドレス変換装置 7…論理命令アドレス 8…物理命令アドレス 9…論理データアドレス 10…物理データアドレス 11,41…アドレス選択回路 14…書込み要求信号 15…命令領域アクセス信号 16…メモリアクセス信号 41…命令要求信号 42…データ領域アクセス信号 DESCRIPTION OF SYMBOLS 1 ... Data cache 2, 2a ... Instruction cache 3a, 3b, 3c, 3d ... Control circuit 4 ... Central processing unit 5, 6 ... Address converter 7 ... Logical instruction address 8 ... Physical instruction address 9 ... Logical data address 10 ... Physical Data address 11, 41 Address selection circuit 14 Write request signal 15 Command area access signal 16 Memory access signal 41 Command request signal 42 Data area access signal
Claims (6)
令キャッシュへ出力するアドレス選択回路と、 制御回路とを備え、 書き込むデータが命令領域内にあることを示す制御信号
が与えられると、前記アドレス選択回路は、前記書き込
むデータのアドレスを選択して前記命令キャッシュに与
え、 前記制御回路は、前記アドレス選択回路から与えられた
前記書き込むデータのアドレスに対応する前記命令キャ
ッシュ内の命令を無効化し、外部メモリ装置に前記書き
込むデータの格納を要求するように構成されたことを特
徴とするキャッシュメモリ装置。An instruction cache for storing an instruction, a data cache for storing data, an address selection circuit for selecting an address of data and an address of the instruction and outputting the selected address to the instruction cache, and a control circuit; When a control signal indicating that data to be written is in the instruction area is provided, the address selection circuit selects an address of the data to be written and provides the address to the instruction cache, and the control circuit provides an address from the address selection circuit. it was invalidated instructions of the instruction cache corresponding to the address of the data to be written the cache memory apparatus characterized by being configured to request storage of data to be written the outside portion memory apparatus.
を示す制御信号が与えられると、制御回路は、アドレス
選択回路から与えられた前記書き込むデータのアドレス
に対応する命令キャッシュ内の命令を無効化し、データ
キャッシュの前記書き込むデータのアドレスに対応する
データを無効化し、外部メモリ装置に前記書き込むデー
タの格納を要求するように構成されたことを特徴とする
請求項1記載のキャッシュメモリ装置。2. When a control signal indicating that data to be written is in an instruction area is supplied, the control circuit invalidates an instruction in an instruction cache corresponding to an address of the data to be written, which is supplied from an address selection circuit. 2. The cache memory device according to claim 1, wherein the data corresponding to the address of the write data in the data cache is invalidated, and the external memory device is requested to store the write data.
令キャッシュへ出力するアドレス選択回路と、 制御回路とを備え、 書き込むデータが命令領域内にあることを示す制御信号
が与えられると、前記制御回路は、アドレス選択回路か
ら与えられた前記書き込むデータのアドレスによって指
定される命令キャッシュの位置に書き込むデータを格納
し、データキャッシュの前記書き込むデータのアドレス
に対応するデータを無効化し、外部メモリ装置に前記書
き込むデータの格納を要求するように構成されたことを
特徴とするキャッシュメモリ装置。3. An instruction cache for storing an instruction, a data cache for storing data, a data address and an instruction address, and
And an address selection circuit for outputting to the decree cache, and a control circuit writes the data given the control signal indicating that the instruction region, the control circuit, the write data supplied from the address selection circuit The data to be written is stored in an instruction cache position specified by an address, data corresponding to the address of the data to be written in the data cache is invalidated, and an external memory device is requested to store the data to be written. It features and be Ruki Yasshumemori device.
示す制御信号は、書込み要求信号と命令領域アクセス信
号とで構成され、前記命令領域アクセス信号は論理アド
レスから物理アドレスに変換するアドレス変換装置によ
って与えられることを特徴とする請求項1記載のキャッ
シュメモリ装置。4. A control signal indicating that data to be written is in an instruction area is composed of a write request signal and an instruction area access signal. The instruction area access signal is provided by an address conversion device for converting a logical address to a physical address. The cache memory device according to claim 1, wherein the cache memory device is provided.
セス手段とを有し、前記第1のアクセス手段は命令アド
レスによって前記命令キャッシュ内の命令をアクセス
し、第2のアクセス手段はデータのアドレスによって前
記命令キャッシュ内の命令をアクセスし、命令無効化要
求信号が与えられると、データのアドレスで指定される
命令を無効化し、 書き込むデータが命令領域内にあることを示す制御信号
が与えられると、前記制御回路は、前記命令無効化要求
信号を出力し、外部メモリ装置に書き込むデータの格納
を要求するように構成されたことを特徴とするキャッシ
ュメモリ装置。5. An instruction cache for storing instructions, a data cache for storing data, and a control circuit, wherein the instruction cache has a first access unit and a second access unit, and Access means accesses an instruction in the instruction cache by an instruction address, second access means accesses an instruction in the instruction cache by an address of data, and when an instruction invalidation request signal is given, an address of the data is invalidates the instructions in specified, writing data is applied a control signal indicating that the instruction region, the control circuit outputs the instruction invalidation request signal, the data to be written to an external memory device A cache memory device configured to request storage.
ータキャッシュへ出力するアドレス選択回路と、 制御回路とを備え、 読み出す命令がデータ領域内にあることを示す制御信号
が与えられると、前記アドレス選択回路は前記読み出す
命令のアドレスを選択して前記データキャッシュに与
え、 前記制御回路は、前記命令キャッシュからの命令の読出
しを禁止し、前記アドレス選択回路から与えられた前記
読み出す命令のアドレスに対応するデータが前記データ
キャッシュ内に存在する場合は、前記読み出す命令のア
ドレスに対応するデータを読み出す一方、前記データキ
ャッシュ内に存在しない場合は、外部メモリ装置に命令
の読出しを要求するように構成されたことを特徴とする
キャッシュメモリ装置。6. An instruction cache for storing instructions, a data cache for storing data, an address selection circuit for selecting an address of data and an address of the instruction and outputting the selected data to the data cache, and a control circuit, When a control signal indicating that the instruction to be read is in the data area is provided, the address selection circuit selects an address of the instruction to be read and supplies the selected address to the data cache. When reading is prohibited and data corresponding to the address of the read instruction provided from the address selection circuit exists in the data cache, data corresponding to the address of the read instruction is read while data in the data cache is read. If not, request the external memory device to read the instruction Cache memory apparatus characterized by being configured urchin.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3038470A JP2637853B2 (en) | 1991-03-05 | 1991-03-05 | Cache memory device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3038470A JP2637853B2 (en) | 1991-03-05 | 1991-03-05 | Cache memory device |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH04363738A JPH04363738A (en) | 1992-12-16 |
JP2637853B2 true JP2637853B2 (en) | 1997-08-06 |
Family
ID=12526132
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP3038470A Expired - Fee Related JP2637853B2 (en) | 1991-03-05 | 1991-03-05 | Cache memory device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2637853B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06195264A (en) * | 1992-12-22 | 1994-07-15 | Nec Corp | Cache coincidence processor |
-
1991
- 1991-03-05 JP JP3038470A patent/JP2637853B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH04363738A (en) | 1992-12-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5586283A (en) | Method and apparatus for the reduction of tablewalk latencies in a translation look aside buffer | |
US5860146A (en) | Auxiliary translation lookaside buffer for assisting in accessing data in remote address spaces | |
JP4447580B2 (en) | Partitioned sparse directory for distributed shared memory multiprocessor systems | |
US5450563A (en) | Storage protection keys in two level cache system | |
US20040117588A1 (en) | Access request for a data processing system having no system memory | |
US20040117587A1 (en) | Hardware managed virtual-to-physical address translation mechanism | |
US20070283108A1 (en) | Memory Management System | |
JPS6135584B2 (en) | ||
JPH03142644A (en) | Cache memory control system | |
JP2009512943A (en) | Multi-level translation index buffer (TLBs) field updates | |
JPH0340046A (en) | Cache memory control method and information processing device | |
US6065099A (en) | System and method for updating the data stored in a cache memory attached to an input/output system | |
US5515522A (en) | Coherence index generation for use by an input/output adapter located outside of the processor to detect whether the updated version of data resides within the cache | |
JP2007048296A (en) | Method, apparatus and system for invalidating multiple address cache entries | |
US7017024B2 (en) | Data processing system having no system memory | |
US20050055528A1 (en) | Data processing system having a physically addressed cache of disk memory | |
US20040117590A1 (en) | Aliasing support for a data processing system having no system memory | |
JP7139719B2 (en) | Information processing device, arithmetic processing device, and control method for information processing device | |
EP0173909B1 (en) | Look-aside buffer least recently used marker controller | |
JP3116215B2 (en) | How to control double directory virtual cache | |
JP2637853B2 (en) | Cache memory device | |
JPH01288940A (en) | Logical address cache control system | |
JP2613258B2 (en) | Information processing method and apparatus | |
US20040117583A1 (en) | Apparatus for influencing process scheduling in a data processing system capable of utilizing a virtual memory processing scheme | |
US20040117589A1 (en) | Interrupt mechanism for a data processing system having hardware managed paging of disk data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |