JPH04205154A - Microprocessor system - Google Patents

Microprocessor system

Info

Publication number
JPH04205154A
JPH04205154A JP2336177A JP33617790A JPH04205154A JP H04205154 A JPH04205154 A JP H04205154A JP 2336177 A JP2336177 A JP 2336177A JP 33617790 A JP33617790 A JP 33617790A JP H04205154 A JPH04205154 A JP H04205154A
Authority
JP
Japan
Prior art keywords
data
cache memory
address information
stored
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2336177A
Other languages
Japanese (ja)
Inventor
Toshiyuki Hiraki
俊行 平木
Yoshiiku Azekawa
善郁 畔川
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2336177A priority Critical patent/JPH04205154A/en
Publication of JPH04205154A publication Critical patent/JPH04205154A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To make data which are high in use frequency reside at all times by providing a cache memory system with plural storage areas and storing at least part of address information, used to access a main storage, in the respective storage areas. CONSTITUTION:On a 1st cache memory 22, data stored in a tag memory 10 and a 1st data memory 12 are rewritten on condition that data corresponding to address information is not stored in the 1st data memory 12 when the address information is generated. On a 2nd cache memory 23, the stored data are rewritten independently of whether or not the data corresponding to the address information is stored in the tag memory 10 and 1st data memory 12. The 1st and 2nd cache memories 22 and 23 are switched to selectively exclude a data group from objects to be written. Consequently, the data which are used frequently such as instructions of an OS can be stored on the 2nd cache memory at all times.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、マイクロプロセッサシステムにおけるキャ
ッシュメモリに関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] This invention relates to a cache memory in a microprocessor system.

〔従来の技術〕[Conventional technology]

第4図は従来のキャッシュメモリ内蔵マイクロプロセッ
サの内部ブロック概略図であり、同図において、1はキ
ャッンユメモリ内蔵マイクロプロセッサ(MPU)、2
はキャッシュメモリ部、3はデータ演算部、4は命令デ
コート部、5はデコート結果に基づく演算部制御信号、
6は主記憶等からの命令やデータを入力するバスインタ
ーフェース部、7はフェッチしたデータ、8はデータバ
スである。
FIG. 4 is a schematic diagram of the internal blocks of a conventional microprocessor with a built-in cache memory, in which 1 is a microprocessor with a built-in cache memory (MPU);
is a cache memory section, 3 is a data calculation section, 4 is an instruction decoding section, 5 is a calculation section control signal based on the decoding result,
6 is a bus interface section for inputting instructions and data from the main memory etc., 7 is fetched data, and 8 is a data bus.

第3図は第4図のうちキャッシュメモリ部2を説明する
ための4ウ工イセツトアソシアテイブ方式のキャッシュ
メモリを示すブロック図である。
FIG. 3 is a block diagram showing a four-way set associative type cache memory for explaining the cache memory unit 2 of FIG. 4. In FIG.

図において、9はキャッジメモリへの入力アドレスであ
り、キャッジメモリはア)・レス9をアドレスタグ9−
1と、セットセレクト9−2、およびワードセレクト9
−3に分けて入力する。10はタグメモリ、11はバリ
ッドビット、12は複数のエントリから成り、1エント
リに4ワードデータを格納するデータメモリ、13はア
ドレスタグ9−1とタグメモ1月0を入力とし一致不一
致を判定するアドレスタグ比較器、14は与えられるワ
ードセレクト9−3に基づいて、1エントリのデータプ
ロ・ツク中に含まれるワードセレクト9−3に基づし)
て、lエントリのて−たプロ、ツク中に含まれる4ワ一
ド分のデータのうち、いずれか1つのワードを選択する
ワードセレクタ、15は各ウェイ毎のワードセレクタ1
4により選択された1ワードデータのうちヒツトしたウ
ェイの1ワードデータを選択するウェイセレクタ、16
はL RU (Least Recentlytlse
d)ビット、17はウェイ選択信号、18はアドレスタ
グ9−1の比較の結果データかデータメモリ12に存在
していることを示すヒツト信号である。
In the figure, 9 is an input address to the cache memory, and the cache memory inputs address 9 to the address tag 9-
1, set select 9-2, and word select 9
-Enter in three parts. 10 is a tag memory, 11 is a valid bit, 12 is a data memory consisting of multiple entries and stores 4 words of data in one entry, 13 is an input address tag 9-1 and a tag memo 1/0, and determines whether or not they match. The address tag comparator 14 is based on the word select 9-3 given, based on the word select 9-3 contained in the data block of one entry)
15 is a word selector 1 for each way.
a way selector 16 for selecting one word data of the hit way from among the one word data selected by 4;
is LRU
d) Bit 17 is a way selection signal, and 18 is a hit signal indicating that data exists in the data memory 12 as a result of the comparison of the address tag 9-1.

この図でのキャッジメモリの構成は4ウニイセ・ントア
ソシアティブ方式であるので、タグメモリ間、バリッド
ビット11、データメモリ12、アドレスタグ比較器1
3、ワードセレクタ14、ウェイセレクタ15かそれぞ
れ各ウェイに1組づつ4ウ工イ分存在する。
The configuration of the cache memory in this figure is a 4-unit associative system, so between tag memories, valid bit 11, data memory 12, and address tag comparator 1.
3. There are four sets of word selectors 14 and way selectors 15 for each way.

次に動作について説明する。まず、第4図において通常
MPUIではハスインターフェース部6がデータバス8
を通し主記憶(ここでは図示していない)より命令やデ
ータなどをフェッチする。
Next, the operation will be explained. First, in FIG. 4, in a normal MPUI, the hash interface section 6 is connected to the data bus 8.
Instructions, data, etc. are fetched from main memory (not shown here) through the .

フェッチされたデータ7はデータの意味を解読するデコ
ート部4に送られる。デコート部4ては解読した結果に
応じてデータの演算処理を行う演算部3に演算処理のた
めのデータや制置信号5を送る。ここでキャッジメモリ
部2は命令フェッチ部6か主記憶に頻繁にアクセスする
データを一時的に格納し、命令フェッチ部が要求してい
るデータに該当するデータが存在する場合主記憶の動作
を終了させ、データバス8を通し主記憶をアクセスする
場合より高速に命令フェッチ部6にデータを提供するも
のである。このキャッジメモリ部2の動作にいて第3図
で説明する。命令フェッチ部6よりデータバス8を通し
リートアクセスが行われると、キャッシュメモリ部2で
は入力アドレス9のセットセレクト9−2により選択さ
れたエントリのタグメモリlOのデータか各ウェイ毎に
アドレスタグ比較器13に入力される。又、入力アトレ
ス9のアドレスタグ9−1はそのまま各ウェイのアドレ
スタグ比較器13に読み出される。アドレスタグ比較器
13で比較された結果はヒツト信号18及びどのウェイ
でヒツトしたかを示すウェイ選択信号17として出力さ
れる。一方、選択されたエントリに対応してデータメモ
リ12から各ウェイ毎に読み出された4ワードのデータ
ブロックはワードセレクタ14によって各ウェイ毎に1
ワードか選択され、最後に、ウェイセレクタ】5がアド
レスタグ比較器13からウェイの選択信号17を受けl
ワードか決定されデータバス8に出力される。
The fetched data 7 is sent to a decoding section 4 that decodes the meaning of the data. The decoding section 4 sends data for arithmetic processing and a control signal 5 to the arithmetic section 3 which performs arithmetic processing on the data according to the decoding result. Here, the cache memory section 2 temporarily stores data that is frequently accessed in the main memory by the instruction fetch section 6, and terminates the operation of the main memory when the data corresponding to the data requested by the instruction fetch section exists. , data is provided to the instruction fetch section 6 at a higher speed than when accessing the main memory through the data bus 8. The operation of this cache memory section 2 will be explained with reference to FIG. When a read access is performed from the instruction fetch unit 6 through the data bus 8, the cache memory unit 2 compares the address tag for each way with the data in the tag memory IO of the entry selected by the set select 9-2 of the input address 9. The signal is input to the device 13. Further, the address tag 9-1 of the input address 9 is read out as is to the address tag comparator 13 of each way. The results of the comparison by the address tag comparator 13 are output as a hit signal 18 and a way selection signal 17 indicating in which way the hit occurred. On the other hand, the 4-word data block read out for each way from the data memory 12 corresponding to the selected entry is processed by the word selector 14 for each way.
The word is selected, and finally, the way selector 5 receives the way selection signal 17 from the address tag comparator 13.
A word is determined and output to the data bus 8.

上記のごと(、ヒツトした場合はキャッシュメモリ2か
ら直ちにデータが読み出されてバスインターフェース部
6に送られるか、キャッシュミスの場合は、入力アドレ
ス9よって主記憶へのアクセスが実行され、主記憶の所
定のデータか読み出されて使用される。この時、キャッ
シュメモリ2では、データの入れ替えか行われ、入力ア
ドレス9のアドレスタグ9−1と主記憶から読み出され
たデータブロックとかそれぞれタグメモリlO及びデー
タメモリ12の選択されたエントリに書き込まれる。こ
のデータの入れ替え時において、LRUメモリ16はデ
ータの使用頻度か少ないものから置換するLRUアルゴ
リズムに従ってとのウェイのデータを入れ替えるかを制
御している。
As described above (if there is a hit, the data is immediately read from the cache memory 2 and sent to the bus interface unit 6, or in the case of a cache miss, the main memory is accessed by the input address 9, and the data is Predetermined data is read out and used. At this time, the data is replaced in the cache memory 2, and the address tag 9-1 of the input address 9 and the data block read from the main memory are used. The data is written to the selected entry in the memory IO and the data memory 12. At the time of this data replacement, the LRU memory 16 controls whether to replace the data in the way according to the LRU algorithm that replaces the least frequently used data. ing.

なお、各ウェイ毎にかつ各エントリ毎に設けられたバリ
ッドビット11は対応するエントリのデータの有効性を
示すものであり、このバリッドヒツト11かリセットさ
れているエントリについてはたとえアドレスタグの一致
が検出されてもヒツトしたと判定されない。
Note that the valid bit 11 provided for each way and each entry indicates the validity of the data of the corresponding entry, and for entries whose valid hit 11 has been reset, even if a match of the address tag is detected. Even if it is, it will not be determined as a hit.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記のような従来のマイクロプロセッサに内蔵されたキ
ャッシュメモリシステムでは、同一エントリに対して複
数回キャッシュミスか連続して生ずると、そのエントリ
に保持されている全ウェイのデータがキャッシュメモリ
から追い出されてしまう。従って、たとえば使用頻度の
高いサブルーチンのデータが割込み等による他のルーチ
ンを実行中にキャッシュメモリから追い出されてしまう
ことかある。そのためもとのサブルーチンに戻ったとき
にデータを再度主記憶から読みたしてキャッシュメモリ
への格納(キャッシング)しなければならずキャッシュ
メモリの持つ高速アクセス機能を有効に活用することか
できずにシステム全体の性能低下をもたらすなとの問題
点かあった。
In the cache memory system built into conventional microprocessors as described above, if a cache miss occurs multiple times in a row for the same entry, the data of all ways held in that entry is evicted from the cache memory. I end up. Therefore, for example, data of a frequently used subroutine may be evicted from the cache memory while another routine is being executed due to an interrupt or the like. Therefore, when returning to the original subroutine, the data must be read from main memory again and stored in the cache memory (caching), making it impossible to effectively utilize the high-speed access function of the cache memory. There was a problem with not causing a drop in the performance of the entire system.

この発明は上記のような問題点を解消するためになされ
たもので、例えば使用頻度の高いサブルーチンなどを常
時駐在させておくことが可能なキャッシュメモリ内蔵の
マイクロプロセッサシステムを得ることを目的とする。
This invention was made to solve the above-mentioned problems, and aims to provide a microprocessor system with a built-in cache memory that allows frequently used subroutines to reside at all times. .

〔課題を解決するための手段〕[Means to solve the problem]

この発明にかかるマイクロプロセッサに内蔵されたキャ
ッシュメモリシステムは前記課題を解決するために、主
記憶から読み出されたデータを一時的に保管するキャッ
ソユメモリシステムであって、複数の記憶領域を存し、
各記憶領域に主記憶のアクセスに使用されたアドレス情
報の少なくとも一部を記憶する第1のアドレス記憶手段
、アドレス情報に対応するデータを記憶する第1のデー
タ記憶手段、アドレス情報か発生したときに、当該アド
レス情報に対応するデータがデータ記憶手段に記憶され
ているか否かを判別する第1の判別手段、および判別手
段かデータ記憶手段に対応するデータが存在しないこと
を判別した結果に対応して、アドレス記憶手段及びデー
タ記憶手段に記憶されているデータの書換を行う第1の
書換手段を備える第1のキャッシュメモリと、複数の記
憶領域を有し、各記憶領域に主記憶のアクセスに使用さ
れたアドレス情報を記憶する第2のアドレス記憶手段、
アドレス情報に対応するデータを記憶する第2のデータ
記憶手段、アドレス情報か発生したときに、当該アドレ
ス情報に対応するデータがデータ記憶手段に記憶されて
いるか否かを判別する第2の判別手段および判別手段の
判別結果とは独立してアドレス記憶手段及びデータ記憶
手段に記憶されているデータの書換を行う第2の書換手
段を備える第2のキャッシュメモリと、アドレス情報が
発生したときに、第1のキャッシュメモリと第2のキャ
ッシュメモリを選択する選択手段、および選択手段によ
り第1のキャッシュメモリと第2のキャッシュメモリの
動作を制御する制御手段を備えている。
In order to solve the above problems, a cache memory system built into a microprocessor according to the present invention is a cache memory system that temporarily stores data read from main memory, and has a plurality of storage areas. death,
a first address storage means that stores at least a part of address information used to access the main memory in each storage area; a first data storage means that stores data corresponding to the address information; and when address information is generated. a first determining means for determining whether or not data corresponding to the address information is stored in the data storage means; a first cache memory comprising a first rewriting means for rewriting data stored in the address storage means and data storage means; and a plurality of storage areas, each storage area being accessed by the main memory. second address storage means for storing address information used for
a second data storage means for storing data corresponding to address information; and a second determination means for determining whether data corresponding to the address information is stored in the data storage means when address information is generated. and a second cache memory comprising a second rewriting means for rewriting data stored in the address storage means and the data storage means independently of the determination result of the determination means, and when address information is generated, A selection means for selecting the first cache memory and the second cache memory, and a control means for controlling the operations of the first cache memory and the second cache memory by the selection means.

〔作用〕[Effect]

この発明においては、選択手段と制御手段を設け、アド
レス情報か発生したときに当該アドレス情報に対応する
データか第1のデータ記憶手段に記憶されていないこと
に対応して第1のアドレス記憶手段及び第1のデータ記
憶手段に記憶されているデータの書換を行う第1のキャ
ッシュメモリと当該アドレス情報に対応するデータが第
1のアドレス記憶手段及び第1のデータ記憶手段に記憶
されていないことは独立して記憶されているデータの書
換を行う第2のキャッシュメモリを切り替えることで選
択的にデータ群を書換の対象から除外するようにしてい
るので、例えばosの命令のように頻繁に使用されるデ
ータを第2のキャッシュメモリ内に常時保管することか
できる。
In this invention, the selection means and the control means are provided, and when address information is generated, the first address storage means responds to the fact that the data corresponding to the address information is not stored in the first data storage means. and a first cache memory for rewriting data stored in the first data storage means, and that data corresponding to the address information is not stored in the first address storage means and the first data storage means. By switching the second cache memory that rewrites independently stored data, data groups are selectively excluded from being rewritten, so for example, frequently used OS commands, etc. The data stored in the second cache memory can be stored at all times in the second cache memory.

〔実施例〕〔Example〕

第2図のこの発明のMPUIの概略ブロックに示す。本
図では第4図に示したブロック図にこの発明を実施する
ために次のものを書き加えている。
A schematic block diagram of the MPUI of the present invention is shown in FIG. In this figure, the following has been added to the block diagram shown in FIG. 4 in order to implement the present invention.

19はデータ判別手段である領域制御レジスタ、20は
デコーダ部4から領域制御レジスタ19に条件を設定す
るだめのレジスタ設定信号、21は領域制御レジスタ1
9の設定内容である領域制御レジスタ信号である。
Reference numeral 19 indicates an area control register which is a data discrimination means; 20 indicates a register setting signal for setting conditions from the decoder section 4 to the area control register 19; and 21 indicates an area control register 1.
This is the area control register signal which is the setting content of No.9.

第1図は第2図の内、この発明によるキャッシュメモリ
部2を説明するためのブロック図である。
FIG. 1 is a block diagram for explaining a cache memory section 2 according to the present invention in FIG. 2. As shown in FIG.

同図において、22は第4図に示した4ウ工イセツトア
ソシアテイブ方式のキャッシュメモリと等価な第1のキ
ャッシュメモリ部である。23は第1のキャッシュメモ
リ部とは独立に動作可能なフルアソシアティブ方式を用
いた第2のキャッシュメモリである。9−4は第1のキ
ャッシュメモリと同様に外部より与えられる入力アドレ
ス9の一部であるフルタグアドレスである。24はフル
タグアドレス9−4を記憶するとともに、比較動作時記
憶した内容と入力されたフルタグアドレス9−4とを比
較する事ができるC A M (CONTENT AD
DRESABLE MEMORY)で構成された第2の
TAGメモリである。25は複数のエントリから成り、
1エントリに4ワードデータを格納する第2のデータメ
モリ、26は領域制置レジスタ19の出力信号である領
域制御レジスタ信号21を入力とする領域制御装置、2
7は領域制御装置26の出力である領域制御信号、28
は領域制御信号27によって制御され、第1のキャッシ
ュメモリ部22と第2のキャッシュメモリ部23から出
力されるlワードのデータを選択的に出力するデータの
入出力制御装置、29は領域制御信号27によって制御
され、第1のキャッシュメモリ部22と第2のキャッシ
ュメモリ部23から出力されるヒツト信号を選択的に出
力するとヒツト信号装置装置、30は第2.のキャッシ
ュメモリ部23のデータリプレースメントをFIFOア
ルゴリズムで制御されるFIFO制御装置である。
In the figure, reference numeral 22 denotes a first cache memory section equivalent to the four-way set associative type cache memory shown in FIG. Reference numeral 23 denotes a second cache memory using a fully associative method that can operate independently of the first cache memory section. 9-4 is a full tag address which is part of the input address 9 given from the outside like the first cache memory. 24 stores the full tag address 9-4, and can also compare the stored contents with the input full tag address 9-4 during comparison operation.
This is the second TAG memory configured with DRESABLE MEMORY. 25 consists of multiple entries,
a second data memory storing 4 words of data in one entry; 26 an area control device which receives an area control register signal 21 which is an output signal of the area control register 19;
7 is an area control signal which is the output of the area control device 26; 28
is a data input/output control device that is controlled by an area control signal 27 and selectively outputs l word data output from the first cache memory section 22 and the second cache memory section 23; 29 is an area control signal; 27, and selectively outputs the hit signals output from the first cache memory section 22 and the second cache memory section 23, the hit signal device 30 is controlled by the second cache memory section 27. This is a FIFO control device that controls data replacement in the cache memory section 23 using a FIFO algorithm.

第1図及び第2図を用いてキャッシュメモリ部2に対し
てリードアクセスが行われた場合についてその動作を説
明する。ここでは従来例で示したキャッシュメモリ部2
の基本動作については省略する。
The operation when a read access is made to the cache memory section 2 will be explained using FIG. 1 and FIG. 2. Here, the cache memory section 2 shown in the conventional example is
The basic operation of is omitted.

MPUIが実行するアプリケーションプログラム中の領
域制御レジスタ19へ書込み命令つまりキャッシュメモ
リ部2内に常駐させたいデータをデコード部4が検出す
るとデコード部4はデコード結果に基づいて領域制御レ
ジ3夕19に値をセットする。このセットによって領域
制御装置26への領域制御レジスタ信号21かアサート
される。前記領域制御レジスタ信号21は領域制御装置
26を介して領域制御信号27がアサートされる。
When the decoding unit 4 detects a write command to the area control register 19 in the application program executed by the MPUI, that is, data to be made resident in the cache memory unit 2, the decoding unit 4 writes a value to the area control register 319 based on the decoding result. Set. This setting causes the area control register signal 21 to be asserted to the area control device 26. A region control signal 27 is asserted as the region control register signal 21 via a region control device 26.

この状態でリード動作が行われると第1のキャッシュメ
モリ部22及び第2のキャッシュメモリ部23か独立に
動作し第2のキャッシュメモリ部23でヒツトすると、
前記領域制御信号27によりデータ入出力制御装置28
及びヒツト信号制御装置29が制御され、第2のキャッ
シュメモリ部23がらヒツト信号18−2、データ8−
2がバスインターフェース部6へ送られる。
When a read operation is performed in this state, the first cache memory section 22 and the second cache memory section 23 operate independently, and when a hit occurs in the second cache memory section 23,
The data input/output control device 28 is controlled by the area control signal 27.
and the hit signal control device 29 are controlled, and the hit signal 18-2 and data 8- are controlled from the second cache memory section 23.
2 is sent to the bus interface section 6.

第2のキャッシュメモリ部23でミスをするとヒツト信
号18−2はミスを示すとともに外部メモリ(図示せず
)をアクセスして必要とするデータを読み出しバスイン
ターフェース部6に送られるとともに、第2のキャッシ
ュメモリ部23の対応する第2のデータメモリ25に格
納する。同時に、セットセレクト9−2をデコードした
エントリの位置に関係なく、対応する入力アドレス9の
一部であるフルタグアドレス9−4を第2のTAGメモ
リに記憶する。データ及びフルタグアドレス9−4の格
納位置は、第2のキャッシュメモリ部23がフルアソシ
アティブ構成となっているため、全エントリに対してF
IFO制御装置30で決定される。
When a miss occurs in the second cache memory unit 23, the hit signal 18-2 indicates the miss, and the external memory (not shown) is accessed to read out the necessary data, which is then sent to the bus interface unit 6. The data is stored in the corresponding second data memory 25 of the cache memory section 23. At the same time, the full tag address 9-4, which is part of the corresponding input address 9, is stored in the second TAG memory, regardless of the position of the entry that decoded the set select 9-2. Since the second cache memory section 23 has a fully associative configuration, the data and full tag address 9-4 are stored at F for all entries.
It is determined by the IFO control device 30.

しかしながら、第1のキャッシュメモリ部22において
ヒツトしていれば外部メモリへのアクセスは行なわず、
第1.のキャッシュメモリ部22のヒツトしたデータを
バスインターフェース6に返すと同時に第2のキャッシ
ュメモリ部23に格納し、コヒーレシンを保つため第1
のキャッシュメモリ部22の対応するデータをインバリ
ッドにする。
However, if there is a hit in the first cache memory section 22, no access is made to the external memory;
1st. The hit data in the cache memory section 22 of the second cache memory section 22 is returned to the bus interface 6 and simultaneously stored in the second cache memory section 23.
The corresponding data in the cache memory unit 22 is made invalid.

次に領域制御レジスタ19かリセットされると、領域制
御装置26への領域制御レジスタ信号2Iはネゲートさ
れ、領域制御装置26より出力される領域制御信号27
もネゲートされる。データ入出力制御装置28、ヒツト
信号制置装置29は前記領域制御信号27により制御さ
れる。
Next, when the area control register 19 is reset, the area control register signal 2I to the area control device 26 is negated, and the area control signal 27 output from the area control device 26 is
is also negated. The data input/output control device 28 and the hit signal control device 29 are controlled by the area control signal 27.

この状態でリード動作か行なわれ第1のキャッシュメモ
リ部22でヒツトすると、第1のキャッシュメモリ部2
2からヒツト信号18−1.データ8−1かバスインタ
ーフェース部6へ送られる。第1のキャッシュメモリ部
22をミスするとヒント信号18−1はミスを示すとと
もに外部にメモリをアクセスして必要とするデータを読
み出し、第1のキャッシュメモリ部22のLRU制御に
より対応する第1のデータメモリ12に格納する。この
第1のキャッシュメモリ部22内の動作は従来例で示し
たキャッシュメモリ部2の動作と同じである。
When a read operation is performed in this state and a hit occurs in the first cache memory section 22, the first cache memory section 2
2 to hit signal 18-1. The data 8-1 is sent to the bus interface unit 6. If the first cache memory section 22 misses, the hint signal 18-1 indicates a miss, and the necessary data is read by accessing the memory externally, and the corresponding first cache memory section 22 is accessed by LRU control. The data is stored in the data memory 12. The operation within this first cache memory section 22 is the same as the operation of the cache memory section 2 shown in the conventional example.

この時、第2のキャッシュメモリ部23においてヒツト
していれば外部メモリへのアクセスは行なわず第2のキ
ャッシュメモリ部23にヒツト信号18−2とデータ8
−2をバスインターフェース6に返す。この場合におい
ては第2のキャッシュメモリ部23のデータを第1のキ
ャソノユメモリ部22に再格納する事は行なわない。
At this time, if there is a hit in the second cache memory section 23, the external memory is not accessed and the second cache memory section 23 receives the hit signal 18-2 and the data 8.
-2 is returned to the bus interface 6. In this case, the data in the second cache memory section 23 is not stored again in the first cache memory section 22.

以上の、この発明の実施例について、ここでは領域制御
レジスタ19への設定か書換命令をデコートした場合で
説明したか領域制御レジスタ19に書換の対象としたく
ないプログラムの実行されているアドレスを比較し、ア
ドレスか一致した場合その一致したアドレス範囲でデー
タフェッチ部6に入力されるデータを第2のキャッシュ
メモリ部23に格納するようにしても良い。また、外部
からの設定信号を受けてメモリ部23に格納するように
しても良い。また、外部からの設定信号を受けて領域制
御レジスタ19を設定しても同様である。第2のキャッ
シュメモリ部23ではバリッドヒツト部を示していない
が備えてもよい。
Regarding the above embodiments of the present invention, here we have explained the case where the setting to the area control register 19 or the rewriting instruction is decoded. However, if the addresses match, the data input to the data fetch unit 6 within the matched address range may be stored in the second cache memory unit 23. Alternatively, the setting signal may be received from the outside and stored in the memory section 23. Further, the same effect can be obtained even if the area control register 19 is set in response to a setting signal from the outside. Although a valid hit section is not shown in the second cache memory section 23, it may be provided.

なお、マイクロプロセッサに内蔵されていないキャッシ
ュメモリでもキャッシュメモリかもつ領域制御レジスタ
にマイクロプロセッサか上記実施例同様値を書込むこと
で制御すれば同様の効果を得る。
The same effect can be obtained even if a cache memory that is not built into the microprocessor is controlled by writing a value to the area control register of the cache memory using the microprocessor as in the above embodiment.

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

以上のように、この発明によればO8命令等のように頻
繁に使用されるデータをキャッシュメモリ上に常時保持
させておくことが可能となり、その結果キャッシュメモ
リの高速アクセス機能を有効に活用することができ、シ
ステムの性能向上を図ることができる。
As described above, according to the present invention, frequently used data such as O8 instructions can be kept in the cache memory at all times, and as a result, the high-speed access function of the cache memory can be effectively utilized. It is possible to improve the performance of the system.

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

第1図はこの発明によるキャッシュメモリ部2を説明す
るためのブロック図、第2図はこの発明のMPU lの
概略ブロック図、第3図は従来のキャッシュメモリ部2
を説明するためのブロック図、第4図は従来のMPUI
の概略ブロック図である。 図において、19は領域制御レジスタ、20はレジスタ
設定信号、21は領域制御レジスタ信号、22は第1の
キャッシュメモリ部、23は第2キヤツシユメモリ。2
6は領域制御装置、27は領域制御信号、28はデータ
入出力制御装置、29はヒツト信号制置装置、30はF
IF○制御装置である。 なお、図中、同一符号は同一、または相当部分を示す。 代  理  人   大  岩  増  雄11jiの
浄書(内容に変更なし) 第1図 1 :’rYソノvメF:’)内7シ(マづ7[17’
Ot’)7(MPLI)
FIG. 1 is a block diagram for explaining a cache memory section 2 according to the present invention, FIG. 2 is a schematic block diagram of an MPU 1 according to the present invention, and FIG. 3 is a conventional cache memory section 2.
Figure 4 is a block diagram for explaining the conventional MPUI.
FIG. In the figure, 19 is an area control register, 20 is a register setting signal, 21 is an area control register signal, 22 is a first cache memory section, and 23 is a second cache memory. 2
6 is an area control device, 27 is an area control signal, 28 is a data input/output control device, 29 is a human signal control device, 30 is an F
It is an IF○ control device. In addition, in the figures, the same reference numerals indicate the same or equivalent parts. Agent Masu Oiwa Engraving of 11ji (no changes in content) Fig. 1 1: 'rYsonovmeF:') 7th page (Mazu7 [17')
Ot')7 (MPLI)

【図3】 に図41[Figure 3] Figure 41

Claims (1)

【特許請求の範囲】 1 マイクロプロセッサに内蔵された主記憶から読み出
されたデータを一時的に保管するキャッシュメモリシス
テムであって、前記マイクロプロセッサに内蔵されたキ
ャッシュメモリシステムは、複数の記憶領域を育し、各
記憶領域に前記主記憶のアクセスに使用されたアドレス
情報の少なくとも一部を記憶する第1のアドレス記憶手
段。 2 前記アドレス情報に対応するデータを記憶する第1
のデータ記憶手段、アドレス情報が発生したときに、当
該アドレス情報に対応するデータが前記データ記憶手段
に記憶されているか否かを判別する第1の判別手段、お
よび前記判別手段が前記データ記憶手段に対応するデー
タが存在しないことを判別した結果に対応して、前記ア
ドレス記憶手段及び前記データ記憶手段に記憶されてい
るデータの書換を行う第1の書換手段を備える第1のキ
ャッシュメモリ、および複数の記憶領域を有し、各記憶
領域に前記主記載のアクセスに使用されたアドレス情報
を記憶する第2のアドレス記憶手段、前記アドレス情報
が発生したときに、当該アドレス情報に対応するデータ
が前記データ記憶手段に記憶されているか否かを判別す
る第2の判別手段、および前記判別手段の判別結果とは
独立して前記アドレス記憶手段及び前記データ記憶手段
に記憶れさているデータの書換を行う第2の書換手段を
備える第2のキャッシュメモリ、アドレス情報が発生し
たときに、前記第1のキャッシュメモリと前記第2のキ
ャッシュメモリを選択する選択手段、および、前記選択
手段により前記第1のキャッシュメモリと前記第2のキ
ャッシュメモリの動作を制御する制御手段を備えること
を特徴とするマイクロプロセッサシステム。
[Scope of Claims] 1. A cache memory system that temporarily stores data read from a main memory built into a microprocessor, the cache memory system built into the microprocessor having a plurality of storage areas. first address storage means for storing at least a part of address information used to access the main memory in each storage area; 2 a first memory storing data corresponding to the address information;
a data storage means, a first determination means for determining whether data corresponding to the address information is stored in the data storage means when address information is generated; and the determination means is the data storage means. a first cache memory comprising a first rewriting means for rewriting data stored in the address storage means and the data storage means in response to a result of determining that data corresponding to the data does not exist; a second address storage means having a plurality of storage areas and storing address information used for the main access in each storage area; when the address information is generated, data corresponding to the address information is stored; a second determining means for determining whether the data is stored in the data storing means; and a second determining means for rewriting the data stored in the address storing means and the data storing means independently of the determination result of the determining means. a second cache memory comprising second rewriting means for rewriting, a selection means for selecting the first cache memory and the second cache memory when address information is generated; A microprocessor system comprising a control means for controlling operations of a second cache memory and a second cache memory.
JP2336177A 1990-11-29 1990-11-29 Microprocessor system Pending JPH04205154A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2336177A JPH04205154A (en) 1990-11-29 1990-11-29 Microprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2336177A JPH04205154A (en) 1990-11-29 1990-11-29 Microprocessor system

Publications (1)

Publication Number Publication Date
JPH04205154A true JPH04205154A (en) 1992-07-27

Family

ID=18296459

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2336177A Pending JPH04205154A (en) 1990-11-29 1990-11-29 Microprocessor system

Country Status (1)

Country Link
JP (1) JPH04205154A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1995009393A1 (en) * 1993-09-27 1995-04-06 Apple Computer, Inc. Apparatus and method for emulation routine instruction issue
US5574887A (en) * 1993-09-20 1996-11-12 Apple Computer, Inc. Apparatus and method for emulation routine pointer prefetch
US5668969A (en) * 1993-09-20 1997-09-16 Apple Computer, Inc. Address selective emulation routine pointer address mapping system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5574887A (en) * 1993-09-20 1996-11-12 Apple Computer, Inc. Apparatus and method for emulation routine pointer prefetch
US5668969A (en) * 1993-09-20 1997-09-16 Apple Computer, Inc. Address selective emulation routine pointer address mapping system
WO1995009393A1 (en) * 1993-09-27 1995-04-06 Apple Computer, Inc. Apparatus and method for emulation routine instruction issue

Similar Documents

Publication Publication Date Title
US4811209A (en) Cache memory with multiple valid bits for each data indication the validity within different contents
US6092172A (en) Data processor and data processing system having two translation lookaside buffers
US6772316B2 (en) Method and apparatus for updating and invalidating store data
JP2822588B2 (en) Cache memory device
EP0408058B1 (en) Microprocessor
US7676632B2 (en) Partial cache way locking
JPH08235072A (en) Method and apparatus for dynamic fractionation of set associative memory
JPH0347540B2 (en)
JPH04242848A (en) System for controlling cache memory by running mode
EP0470739B1 (en) Method for managing a cache memory system
EP0470738B1 (en) Cache memory system and operating method
US6434670B1 (en) Method and apparatus for efficiently managing caches with non-power-of-two congruence classes
US5619673A (en) Virtual access cache protection bits handling method and apparatus
EP0470736B1 (en) Cache memory system
JPH04205154A (en) Microprocessor system
EP0470735B1 (en) Computer memory system
CN101243416A (en) Apparatus and method for storing data and/or instructions in a computer system having at least two processing units and at least one first memory or memory area for data and/or instructions
JP2659007B2 (en) Information processing method and apparatus
JPH02213960A (en) Cache memory
JPH01255944A (en) Cache memory
JPH0628258A (en) Microprocessor
JP2613258B2 (en) Information processing method and apparatus
JPH0289145A (en) Cache memory
JPH04175946A (en) Multiprocessor data processing system and cache device used therein
JPH04315235A (en) Cache data replace method and cache data replace device for cache memory