JPH02113355A - Cache memory - Google Patents
Cache memoryInfo
- Publication number
- JPH02113355A JPH02113355A JP63266078A JP26607888A JPH02113355A JP H02113355 A JPH02113355 A JP H02113355A JP 63266078 A JP63266078 A JP 63266078A JP 26607888 A JP26607888 A JP 26607888A JP H02113355 A JPH02113355 A JP H02113355A
- Authority
- JP
- Japan
- Prior art keywords
- address
- cache memory
- physical
- entry
- bits
- 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
Links
- 230000015654 memory Effects 0.000 title claims abstract description 56
- 238000006243 chemical reaction Methods 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 238000000034 method Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Landscapes
- Multi Processors (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、マイクロプロセッサ等に組み込まれて論理ア
ドレスでアクセスされるキャッシュメモリに係り、とく
にマルチプロセッサ環境でのデータの一致性を容易に確
保できるキャッシュメモリに関する。[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a cache memory that is incorporated into a microprocessor and accessed using logical addresses, and in particular, a cache memory that easily ensures data consistency in a multiprocessor environment. Regarding cache memory that can be used.
コンピュータで高速操作を行うため、コンピュータの大
容量メモリとしてのメインメモリとは別に、そのメモリ
データの一部を有し高速に動作するキャッシュメモリを
装備することが行われるが、このようなコンピュータに
おいて、コンピュータユーザは通常いわゆる論理アドレ
スを介してキャッシュメモリにアクセスし、例えばキャ
ッシュメモリに所要のデータがないようないわゆるキャ
ッシュミスが発生した場合には、さらに物理アドレスを
介してメインメモリから所要のデータを取り込んでキャ
ッシュメモリを書替えたりするような場合がある。In order to perform high-speed operations on a computer, in addition to the computer's main memory, which serves as a large capacity memory, a cache memory that contains part of the memory data and operates at high speed is installed. , a computer user usually accesses the cache memory via a so-called logical address, and if a so-called cache miss occurs, for example when the required data is not in the cache memory, the required data is further accessed from the main memory via a physical address. There are cases where the cache memory is rewritten by importing the data.
本発明はこのようなコンピュータ操作に好適なキャッシ
ュメモリに関するものである。The present invention relates to a cache memory suitable for such computer operations.
最近開発されている32ビツトマイクロプロセツサユニ
ツト(MPU)には1例えばモトローラ社製のM C6
8030のように性能向上を目指してキャッシュメモリ
がチップ上に組み込まれる傾向にある、また、仮想記憶
をサポートするためのアドレス変換部もチップ上に組み
込まれるようになってきた。この全体構成を第4図に示
す。One of the recently developed 32-bit microprocessor units (MPUs) is the Motorola MC6.
There is a trend for cache memory to be incorporated on chips to improve performance, as in the case of the 8030, and address translation units to support virtual memory have also begun to be incorporated on chips. This overall configuration is shown in FIG.
第4図においてMPUチップは、コアである演算実行部
、命令あるいはデータを一次記憶するキャッシュメモリ
、およびメインメモリをアクセスするため内部の論理ア
ドレスを物理アドレスに変換するアドレス変換部から構
成される。In FIG. 4, the MPU chip is composed of an arithmetic execution unit which is a core, a cache memory which temporarily stores instructions or data, and an address translation unit which converts an internal logical address into a physical address in order to access the main memory.
演算実行部でのデータの取り込みを高速に行うためにチ
ップ上に組み込まれたキャッシュメモリは通常論理アド
レスでアクセスされる。一方、キャッシュミスが発生し
た場合、アドレス変換部で論理アドレスが物理アドレス
に変換され、メインメモリから所望のデータを持ってき
てこれがキャッシュメモリに格納される。したがって、
キャッシュメモリには、論理アドレスとそのアドレスに
相当するデータのセットがエントリ数分格納されている
。その−例を第5図に示す。A cache memory built into a chip to allow the arithmetic execution unit to fetch data at high speed is normally accessed using a logical address. On the other hand, if a cache miss occurs, the address conversion unit converts the logical address into a physical address, fetches desired data from the main memory, and stores it in the cache memory. therefore,
The cache memory stores sets of logical addresses and data corresponding to the addresses for the number of entries. An example thereof is shown in FIG.
第5図の例ではキャッシュ容量2にバイト、ブロックサ
イズ16バイトのいわゆるフルアソシアティブ構成例で
あり、128のエントリの各々に各ブロックを特定する
28ビツトの論理アドレスおよびそのアドレスの16バ
イトのデータが記憶される。The example in Figure 5 is a so-called fully associative configuration with a cache capacity of 2 bytes and a block size of 16 bytes, and each of the 128 entries contains a 28-bit logical address that specifies each block and 16-byte data for that address. be remembered.
また各エントリ対応に有効フラグビットが用意され、エ
ントリ内容の有効/無効を識別する。A valid flag bit is also provided for each entry to identify whether the entry contents are valid or invalid.
ところで、このような論理アドレスでアクセスされるキ
ャッシュメモリをチップ上に組み込んだMPUを複数個
使用するシステム、すなわちマルチプロセッサ環境にお
いては、キャッシュメモリとメインメモリのデーター敵
性のために、1つのMPUでデータの書替えがあった場
合、他のMPU内のキャッシュメモリのデータの有効性
を確保する必要がある。By the way, in a system that uses multiple MPUs that incorporate cache memory on the chip that is accessed using logical addresses, that is, in a multiprocessor environment, one MPU can When data is rewritten, it is necessary to ensure the validity of data in cache memories in other MPUs.
これまでのMPUチップに組み込まれ、いわばオンチッ
プ化されたキャッシュメモリにおいては、外部の物理ア
ドレスに対応する論理アドレスを特定できず、このため
物理アドレスに対応するデータを無効化したいような場
合にはキャッシュメモリ内の全エントリを無効化するこ
とでデータの有効性を確保していた。この方法は、無効
化する必要のないものまでも無効化することになり、キ
ャッシュメモリのオンチップ化による性能向上を著しく
低下させ、事実上マルチプロセッサとしての使用に大き
な制限を与えていた。With conventional cache memory built into MPU chips, so to speak, on-chip, it is not possible to specify the logical address that corresponds to an external physical address, so when you want to invalidate the data corresponding to the physical address. ensured data validity by invalidating all entries in cache memory. This method ends up invalidating even things that do not need to be invalidated, which significantly reduces the performance improvement achieved by putting the cache memory on-chip, and in effect places a large limit on its use as a multiprocessor.
一方、オンチップ化したキャッシュメモリを物理アドレ
スでアクセスするMPUも存在するが、この場合にはデ
ータのアクセス時に必ずアドレス変換が必要となり、デ
ータの取り込みに要する時間が長くなり、プロセッサと
しての性能低下を引起こしていた。On the other hand, there are MPUs that access on-chip cache memory using physical addresses, but in this case, address conversion is always required when accessing data, which increases the time required to capture data and reduces performance as a processor. was causing
[発明が解決しようとする課M]
以上のように従来技術では、論理アドレスでアクセスさ
れる場合には物理アドレスに対応する論理アドレスが特
定できず、マルチプロセッサとしての性能低下をもたら
す問題があり、また物理アドレスでアクセスされる場合
にもプロセッサとしての性能低下をもたらす問題があっ
てその解決を要する課題があった。[Problem M to be solved by the invention] As described above, in the conventional technology, when access is made using a logical address, the logical address corresponding to the physical address cannot be specified, leading to a problem in which performance as a multiprocessor is degraded. Furthermore, there is a problem that the performance of the processor deteriorates even when access is performed using a physical address, which requires a solution.
本発明の目的は、論理アドレスでアクセスでき。The object of the present invention is to provide access using logical addresses.
かつプロセッサの性能低下を招くこともなくマルチプロ
セッサ環境下でのデータの一致性を確保できるキャッシ
ュメモリを提供することにある。Another object of the present invention is to provide a cache memory that can ensure data consistency in a multiprocessor environment without causing a decrease in processor performance.
[課題を解決するための手段]
上記の目的を達成するため1本発明では1次の手段を講
じた。すなわち、
論理アドレスでアクセスされるキャッシュメモリにおい
て、該論理アドレスと、そのアドレス変換後の物理アド
レスとの相互に共通なページ内オフセットアドレスの少
なくとも一部を検索アドレスとして入力する検索アドレ
ス入力部と、上記キャッシュメモリ内のアドレスタグ部
で上記検索アドレス入力部から入力された検索アドレス
と一致するエントリを無効化する手段とを付加した。[Means for Solving the Problems] In order to achieve the above object, the present invention takes the following measures. That is, in a cache memory accessed by a logical address, a search address input section that inputs at least a part of an in-page offset address common to the logical address and the physical address after address conversion as a search address; Means is added for invalidating an entry in the address tag section in the cache memory that matches the search address input from the search address input section.
[作 用コ
論理アドレスと、そのアドレス変換後の物理アドレスと
の相互に共通なページ内オフセットアドレスの少なくと
も一部を検索アドレスとして入力する検索アドレス入力
部をキャッシュメモリに付加したことは、無効化したい
物理アドレスのページ内オフセットアドレスフィールド
の検索アドレスによってキャッシュメモリを検索するこ
とを可能にするものである。しかもその際、プロセッサ
としての性能低下を招くこともない。[Function] The addition of a search address input section to the cache memory that inputs at least a part of the mutually common in-page offset address between the logical address and the physical address after address conversion as the search address is invalidated. This makes it possible to search the cache memory using the search address in the in-page offset address field of the desired physical address. Moreover, in this case, the performance of the processor does not deteriorate.
そしてこの検索により関連すべきエントリが検索される
ことになるので、さらに本発明の付加手段により、キャ
ッシュメモリ内のアドレスタグ部で上記検索アドレス入
力部から入力された検索アドレスと一致するエントリを
無効化することになる。このことは例えば、従来、物理
アドレスによるキャッシュメモリへの検索ができなかっ
たためにキャッシュメモリの全エントリを無効化してい
た従来技術に比較し、著しい性能向上をもたらす。Since this search results in a search for a related entry, the additional means of the present invention invalidates the entry that matches the search address input from the search address input section in the address tag section in the cache memory. It will become This brings about a significant performance improvement, for example, compared to the conventional technology in which all entries in the cache memory were invalidated because it was not possible to search the cache memory using a physical address.
すなわち本発明の手段は、プロセッサの性能低下を招く
こともなく効率良くマルチプロセッサ環境でのデータの
一致性を確保することを可能とするものである。That is, the means of the present invention makes it possible to efficiently ensure data consistency in a multiprocessor environment without causing a decrease in processor performance.
本発明は、例えばページサイズが4KB固定のMPUに
おいて32ビツトの論理アドレスを32ビツトの物理ア
ドレスに変換する場合、第1図に示すように論理アドレ
スの上位ビット、例えば20ビツトを変換しメインメモ
リの物理ページ番号20ビツトを得る方法を利用する。For example, when converting a 32-bit logical address into a 32-bit physical address in an MPU with a fixed page size of 4 KB, the present invention converts the upper bits of the logical address, for example, 20 bits, as shown in FIG. The method of obtaining the physical page number of 20 bits is used.
すなわち、論理アドレスの下位ビット(本例では12ビ
ツト)はメインメモリの物理ページ内のオフセットアド
レスを意味し、このページ内オフセットアドレスのフィ
ールドは論理アドレスと物理アドレスにおいて同一アド
レス情報である。したがって、無効化したい物理アドレ
スのページ内オフセットアドレスフィールドのみでキャ
ッシュメモリを検索すれば、関連すべきエントリが検出
されるので、そのエントリの有効フラグを“0”にリセ
ットすることによりキャッシュメモリのデータが保証さ
れることになる。That is, the lower bits of the logical address (12 bits in this example) mean the offset address within the physical page of the main memory, and the field of this intra-page offset address is the same address information for the logical address and the physical address. Therefore, if you search the cache memory using only the in-page offset address field of the physical address you want to invalidate, the relevant entry will be found, and by resetting the valid flag of that entry to "0", the cache memory data will be will be guaranteed.
第2図(a)に本発明の第1の実施例を示す。FIG. 2(a) shows a first embodiment of the present invention.
この例はブロックサイズ16バイトのフルアソシアティ
ブ構成の例であり、各エントリ毎に論理アドレス28ビ
ツト、有効フラグビット、データ16バイトが格納され
る。通常のキャッシュメモリのアクセスでは、論理アド
レスであるオペランドアドレスがアドレスタグ部に入力
され、上位28ビツトが全エントリのアドレスタグ部で
比較され、一致したエントリがありかつその有効フラグ
が41171にセットされていれば、そのエントリに属
する16バイトのデータの中から4バイトを選択して出
力する。一方、無効化したい物理アドレスが入力された
場合には、検索アドレス入力部で上位20ビツトがマス
クされ、下位8ビツトのページ内オフセットアドレスの
一部を用いて、全エントリを検索する。そして一致した
エントリが存在すれば、その有効フラグをtt OII
にリセットする。この場合、ページ内オフセットアドレ
スフィールドのみでアドレス検索するので、無効化した
いエントリ以外のエントリが無効化されることがあるが
、データの局所性という性質を考えると同一ページ内オ
フセットフィールドを有するエントリ数は数少ないと予
想され、キャッシュメモリの全エントリを無効化する従
来技術と比較し性能向上が著しいと考えられる。This example is an example of a fully associative configuration with a block size of 16 bytes, and each entry stores a 28-bit logical address, a valid flag bit, and 16 bytes of data. In normal cache memory access, the operand address, which is a logical address, is input to the address tag section, and the upper 28 bits are compared in the address tag section of all entries, and if there is a matching entry, its valid flag is set to 41171. If so, select and output 4 bytes from the 16 bytes of data belonging to that entry. On the other hand, when a physical address to be invalidated is input, the upper 20 bits are masked in the search address input section, and all entries are searched using part of the lower 8 bits of the intra-page offset address. If a matching entry exists, its valid flag is set to tt OII
Reset to . In this case, since the address is searched only using the intra-page offset address field, entries other than the entry you want to invalidate may be invalidated, but considering the nature of data locality, the number of entries with the same intra-page offset field It is expected that there will be a small number of entries, and it is thought that the performance will be significantly improved compared to the conventional technology that invalidates all entries in the cache memory.
第2図(b)は第2図(a)を実現する具体的回路例で
ある。アドレスタグ部はCAMセルを2次元に配列して
構成し、マスクされていないページ内オフセットアドレ
スフィールド8ビットを検索アドレスとしてSL、5L
(i=1〜8)に入力し、全エントリに対し検索を行う
。格納されているアドレスタグ部の下位8ビツトと一致
したエントリでは、一致線MLがl#[ighl+とな
るので、リセットクロックφkを立上げることにより、
該エントリの有効フラグをリセットする。FIG. 2(b) is a specific example of a circuit that realizes FIG. 2(a). The address tag section is constructed by arranging CAM cells two-dimensionally, and uses the unmasked 8-bit in-page offset address field as the search address for SL, 5L.
(i=1 to 8) and search all entries. In an entry that matches the lower 8 bits of the stored address tag part, the match line ML becomes l#[ighl+, so by raising the reset clock φk,
Reset the valid flag of the entry.
また第3図は本発明の第2の実施例であり、ブロックサ
イズ16バイトのいわゆるダイレクトマツピング構成の
例である。本構成では、検索アドレス入力部はアドレス
デコーダで構成され、入力アドレスの下位5ビツトで形
成されるセットアドレスによりアドレスタグ部の1つの
エントリをアクセスし、そのエントリの内容が入力アド
レスと−致し、かつ有効フラグが“1”の場合に該エン
トリのデータが読出される。したがって1本構成におい
ては、無効化したい物理アドレスのページ内オフセット
アドレスフィールドの一部で構成されるセットアドレス
を入力し、そのセットアドレスのエントリの有効フラグ
を無条件に無効化する。FIG. 3 shows a second embodiment of the present invention, which is an example of a so-called direct mapping configuration with a block size of 16 bytes. In this configuration, the search address input section is composed of an address decoder, which accesses one entry in the address tag section using the set address formed by the lower 5 bits of the input address, and if the contents of that entry match the input address, And when the valid flag is "1", the data of the entry is read. Therefore, in a single configuration, a set address consisting of a part of the intra-page offset address field of the physical address to be invalidated is input, and the valid flag of the entry of the set address is unconditionally invalidated.
したがって、このダイレクトマツピング構成のキャッシ
ュメモリにおいては、入力セットアドレスに対応して有
効フラグをリセットする回路のみを付加すればよい、ま
た、2ウエイあるいは4ウエイのセットアソシアティブ
構成のキャッシュメモリでもこの第2の実施例と同様の
構成により、無効化したい物理アドレスに関連するエン
トリのみを容易に無効化できる。Therefore, in a cache memory with this direct mapping configuration, it is only necessary to add a circuit that resets the valid flag in response to an input set address, and even in a cache memory with a 2-way or 4-way set associative configuration, this With a configuration similar to that of the second embodiment, it is possible to easily invalidate only the entry related to the physical address to be invalidated.
以上説明したように、本発明は論理アドレスでアクセス
されるキャッシュメモリのデーター敵性を確保するため
に、外部より入力される物理アドレスのページ内オフセ
ットアドレスフィールドのみでアドレス検索することが
可能でありかつ一致したエントリを無効化する回路を付
加しているので、外部より入力される無効化したい物理
アドレスに関連するエントリのみを無効化でき、外部の
メインメモリとのデータの一致性を確保しつつキャッシ
ュメモリを効率良く使用することができる。As explained above, in order to ensure the compatibility of cache memory data accessed by logical addresses, the present invention is capable of searching for addresses using only the in-page offset address field of a physical address input from the outside. Since a circuit is added to invalidate matching entries, it is possible to invalidate only the entries related to the physical address input from the outside that you want to invalidate, ensuring data consistency with the external main memory and cache. Memory can be used efficiently.
第1図は本発明の詳細な説明する図、第2図(a)、(
b)は本発明の第1の実施例、第3図は本発明の第2の
実施例、第4図は従来のキャッシュメモリをオンチップ
化したマイクロプロセッサユニットの概略図、第5図は
従来のキャッシュメモリの構成例である。
特許出願人 日本電信電話株式会社Fig. 1 is a diagram explaining the present invention in detail, Fig. 2(a), (
b) is a first embodiment of the present invention, FIG. 3 is a second embodiment of the present invention, FIG. 4 is a schematic diagram of a microprocessor unit with a conventional cache memory on-chip, and FIG. 5 is a conventional This is an example of the configuration of a cache memory. Patent applicant Nippon Telegraph and Telephone Corporation
Claims (1)
て、該論理アドレスと、そのアドレス変換後の物理アド
レスとの相互に共通なページ内オフセットアドレスの少
なくとも一部を検索アドレスとして入力する検索アドレ
ス入力部と、上記キャッシュメモリ内のアドレスタグ部
で上記検索アドレス入力部から入力された検索アドレス
と一致するエントリを無効化する手段とを付加したこと
を特徴とするキャッシュメモリ。In a cache memory accessed by a logical address, a search address input section for inputting at least a part of an offset address in a page common to the logical address and a physical address after address conversion as a search address; A cache memory further comprising means for invalidating an entry in an address tag section in the memory that matches a search address input from the search address input section.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63266078A JPH02113355A (en) | 1988-10-24 | 1988-10-24 | Cache memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63266078A JPH02113355A (en) | 1988-10-24 | 1988-10-24 | Cache memory |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH02113355A true JPH02113355A (en) | 1990-04-25 |
Family
ID=17426043
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP63266078A Pending JPH02113355A (en) | 1988-10-24 | 1988-10-24 | Cache memory |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH02113355A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07191907A (en) * | 1993-11-09 | 1995-07-28 | Internatl Business Mach Corp <Ibm> | Method and system for efficient management of effective status of data stored in cache memory array |
-
1988
- 1988-10-24 JP JP63266078A patent/JPH02113355A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07191907A (en) * | 1993-11-09 | 1995-07-28 | Internatl Business Mach Corp <Ibm> | Method and system for efficient management of effective status of data stored in cache memory array |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5628404B2 (en) | Cache memory attribute indicator with cached memory data | |
JP2833062B2 (en) | Cache memory control method, processor and information processing apparatus using the cache memory control method | |
US6304944B1 (en) | Mechanism for storing system level attributes in a translation lookaside buffer | |
US8151085B2 (en) | Method for address translation in virtual machines | |
US8984254B2 (en) | Techniques for utilizing translation lookaside buffer entry numbers to improve processor performance | |
JP4065660B2 (en) | Translation index buffer with distributed functions in parallel | |
CN112631962B (en) | Memory management device, memory management method, processor and computer system | |
US8185692B2 (en) | Unified cache structure that facilitates accessing translation table entries | |
US6073226A (en) | System and method for minimizing page tables in virtual memory systems | |
JPH07200399A (en) | Microprocessor and method for access to memory in microprocessor | |
JP2003067357A (en) | Nonuniform memory access (numa) data processing system and method of operating the system | |
US12141076B2 (en) | Translation support for a virtual cache | |
TW201617886A (en) | Instruction cache translation management | |
US10606762B2 (en) | Sharing virtual and real translations in a virtual cache | |
CN114328295A (en) | Storage management apparatus, processor, related apparatus and related method | |
US8015361B2 (en) | Memory-centric page table walker | |
US5737575A (en) | Interleaved key memory with multi-page key cache | |
US7984263B2 (en) | Structure for a memory-centric page table walker | |
JPH0371355A (en) | Apparatus and method for retrieving cache | |
EP0486154B1 (en) | Method of operating a virtual memory system | |
US7171540B1 (en) | Object-addressed memory hierarchy that facilitates accessing objects stored outside of main memory | |
US5649155A (en) | Cache memory accessed by continuation requests | |
JPH02113355A (en) | Cache memory | |
CN115080464A (en) | Data processing method and data processing device | |
JPH03211643A (en) | Translation lookaside buffer parallel exception inspection and update buffer |