JPH04175946A - Multiprocessor data processing system and cache device used therein - Google Patents
Multiprocessor data processing system and cache device used thereinInfo
- Publication number
- JPH04175946A JPH04175946A JP2302414A JP30241490A JPH04175946A JP H04175946 A JPH04175946 A JP H04175946A JP 2302414 A JP2302414 A JP 2302414A JP 30241490 A JP30241490 A JP 30241490A JP H04175946 A JPH04175946 A JP H04175946A
- Authority
- JP
- Japan
- Prior art keywords
- cache
- processor
- area
- data
- 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
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野]
本発明はマルチプロセッサ・データ処理システムおよび
それに用いられるキャッシュ装置に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a multiprocessor data processing system and a cache device used therein.
プロセッサシステムにおいて、プロセッサのマシンサイ
クル時間とメインメモリの動作時間のギャップを埋める
ために、高速の動作時間で働くキャッシュメモリをプロ
セッサとメインメモリの間に置き、システムの性能を向
上させる技術が知られている。従来、キャッシュへのス
トア方式については、ニー・シー・エム、コンピユーテ
イング・サーベイ、ボリューム14、ナンバー3、セブ
テンバー、1982の第500頁から第502頁(A
CM、 Computing、5urveys、VoQ
、 14 、 N13 。In processor systems, in order to fill the gap between the processor's machine cycle time and the main memory's operating time, there is a known technology that improves system performance by placing a cache memory that operates at high speed between the processor and main memory. ing. Conventional cache storage methods are described in NCM, Computing Survey, Volume 14, Number 3, September, 1982, pages 500 to 502 (A
CM, Computing, 5urveys, VoQ
, 14, N13.
September 1982. pp、500−5
02)に述べられているように、ライト・スルー方式と
コピー・バック方式がある。September 1982. pp, 500-5
As described in 02), there are write-through and copy-back methods.
前者のライト・スルー方式は、プロセッサが書き込みを
行なう場合にキャッシュにヒツトすれば、キャッシュと
メインメモリの両方に書き込みを行ない常にキャッシュ
とメインメモリの内容を一致させておく方式である。後
者のコピー・バック方式ではプロセッサ書き込みを行な
う場合にキャッシュにヒツトすれば、メインメモリには
書き込みを行なわず、キャッシュにのみ書き込みを行な
う方式である。このコピー・バック方式に関連するもの
として例えば1971年9月1o日の米国特許出願第1
79,376を優先権主張の基礎とした日本特公昭51
−49535号が挙げられる。The former write-through method is a method in which when a processor performs a write operation, if the cache is hit, the processor writes to both the cache and main memory, so that the contents of the cache and main memory always match. In the latter copy-back method, if a cache is hit when a processor writes, the write is not performed to the main memory, but only to the cache. For example, US Patent Application No. 1 filed on September 1, 1971 is related to this copy-back method.
79,376 as the basis for claiming priority
-49535 is mentioned.
しかしながら、性能面から見るとコピー・バック方式は
キャッシュにヒツトした時に、メインメモリに書き込み
を行なわないために、メインメモリへの書き込み時間が
省略でき、性能的にライト・スルー方式よりもメリット
がある。また、このメインメモリに対する書き込み時間
の省略により、メインメモリに要求されるスルー・プツ
トが軽減されるというメリットもある。マルチ・プロセ
ッサ・システムでは特にこのメモリ・スループットの軽
減が、システム性能を向上させるうえで重要なポイント
となる。However, from a performance perspective, the copy-back method does not write to the main memory when a cache is hit, so the time required to write to the main memory can be omitted, which has an advantage over the write-through method in terms of performance. . Further, by omitting the writing time to the main memory, there is an advantage that the throughput required for the main memory is reduced. Particularly in multi-processor systems, reducing memory throughput is an important point in improving system performance.
一方、米国特許筒4,264,953号には、ひとつの
メインメモリと通信する複数のプロセッサと、該複数の
プロセッサに対応した複数のキャッシュメモリと、複数
のプロセッサからの仮想アドレス(論理アドレス)を物
理アドレスに変換する複数のアドレス変換機構と、入出
力デバイスとを有するマルチプロセッサデータ処理シス
テムが開示されている。この米国特許によって開示され
たシステムにおいては、メインメモリの共有領域のデー
タがキャッシュに格納された場合にキャッシュ格納デー
タがメインメモリの共有領域の更新データと対応しなく
なると言う問題を回避するためにメインメモリの共有領
域のデータのキャッシュへの書き込みが禁止され、一方
入呂カデバイスのデータがキャッシュに格納された場合
にキャッシュ格納データが入出力デバイスの更新データ
と対応しなくなるという問題を回避するため入出力デバ
イスのデータがキャッシュ中で無効化(パージ)される
ものである。On the other hand, U.S. Patent No. 4,264,953 describes multiple processors communicating with one main memory, multiple cache memories corresponding to the multiple processors, and virtual addresses (logical addresses) from the multiple processors A multiprocessor data processing system is disclosed that has a plurality of address translation mechanisms that translate addresses into physical addresses, and an input/output device. In the system disclosed by this US patent, in order to avoid the problem that when data in a shared area of main memory is stored in the cache, the data stored in the cache no longer corresponds to updated data in the shared area of main memory. To avoid the problem that when data in the shared area of the main memory is prohibited from being written to the cache and data in the Iroka device is stored in the cache, the data stored in the cache does not correspond to the updated data of the input/output device. Therefore, the data of the input/output device is invalidated (purged) in the cache.
また従来、メインメモリとの一致性を保証しない高速な
メモリとしてレジスタが用いられている。Conventionally, registers have been used as high-speed memories that do not guarantee consistency with the main memory.
レジスタはプロセッサ固有のメモリとして、小容量では
あるが特に高速な動作が可能となっている。Registers are memory specific to processors, and although they have a small capacity, they can operate at particularly high speeds.
〔発明が解決しようとする課題]
従来、キャッシュメモリはメインメモリとの整合性を保
証するため、扱うデータ量がキャッシュ容量を越えたり
、アクセスするデータがキャッシュ内に無いと、メイン
メモリへのアクセスを起こし、性能低下の要因となる。[Problem to be solved by the invention] Conventionally, cache memory guarantees consistency with main memory, so if the amount of data to be handled exceeds the cache capacity or the data to be accessed is not in the cache, access to main memory is interrupted. This can cause performance deterioration.
しかし、マルチプロセッサシステムにおいて、共有メモ
リ空間へのアクセスの場合には整合性を取る必要がある
が、各プロセッサが個別に使用するメモリ空間へのアク
セスの場合には敢て整合性を保証する必要はない。However, in a multiprocessor system, it is necessary to ensure consistency when accessing the shared memory space, but it is necessary to ensure consistency when accessing the memory space that each processor uses individually. There isn't.
従来技術ではこの点が考慮されていなかった。This point has not been taken into account in the prior art.
またレジスタの場合には、ユーザー・アプリケーション
に合わせてレジスタ空間を適当なサイズに設定したり、
一つのマイクロプロセッサ内に収まりきれない容量のレ
ジスタ空間を持つことはできない。また、命令コード中
でも、メモリとレジスタへのアクセスは区別されている
。そのため、メモリ階層上のどの位置にどのデータを置
くといった指定をユーザーおよびシステム設計者が自由
に行なうことはできなかった。In the case of registers, set the register space to an appropriate size according to the user application,
It is not possible to have a register space larger than can fit within a single microprocessor. Furthermore, even in the instruction code, accesses to memory and registers are distinguished. Therefore, users and system designers cannot freely specify which data should be placed in which position on the memory hierarchy.
本発明の目的は、キャッシュメモリの特徴を活かしたう
えで、レジスタのようにローカルなメモリ空間をユーザ
ーが設定できるようにすることで、マルチプロセッサシ
ステムに適したメモリシステムを提供することにある。An object of the present invention is to provide a memory system suitable for a multiprocessor system by making use of the characteristics of a cache memory and allowing a user to set a local memory space like a register.
上記目的を達成するために、メモリ空間は多段階に分割
される。各段階の区別を行ないたいレベルには、その段
階よりも下位(メインメモリ)側のメモリとの整合性を
とるべき領域へのアクセスであるか否かを判定する領域
判定回路を設ける。To achieve the above objective, the memory space is divided into multiple stages. At a level where it is desired to differentiate each stage, an area determination circuit is provided to determine whether or not the access is to an area that should be consistent with the memory on the lower (main memory) side than that level.
例えば個々にキャッシュデバイスを有する複数のプロセ
ッサが、システムバスを介してメインメモリと結合して
いるマルチプロセッサシステムにおいては次のようにな
る。すなわち、メインメモリは複数のプロセッサ、入出
力デバイスによってライト・アクセスされる共有領域と
、複数のプロセッサによってそれぞれライト・アクセス
される複数のプライベート領域とに分割される。複数の
キャッシュデバイスは、プロセッサから発生されたアド
レスが共有領域またはプライベート領域のいずれかをア
クセスすることを判定する領域判定回路を具備する。プ
ロセッサからのアクセスが共有領域であれば、キャッシ
ュデバイスはライトスル一方式またはコピー・バック方
式に従って動作する。一方プロセッサからのアクセスが
プライベート領域であれば、キャッシュデバイスはあた
かもローカル・メモリのように動作する。For example, in a multiprocessor system in which a plurality of processors each having a cache device are coupled to a main memory via a system bus, the following will occur. That is, the main memory is divided into a shared area that is write-accessed by a plurality of processors and input/output devices, and a plurality of private areas that are write-accessed by each of the plurality of processors. The plurality of cache devices include an area determination circuit that determines whether an address generated from a processor accesses either a shared area or a private area. If the access from the processor is a shared area, the cache device operates according to the write-through method or the copy-back method. On the other hand, if the access from the processor is a private area, the cache device operates as if it were local memory.
さらに、キャッシュデバイスはメインメモリの共有領域
のデータが他のプロセッサもしくは入出力デバイスによ
って書き換えられた場合は、キャッシュの格納データを
無効化する無効化制御回路を具備する。Further, the cache device includes an invalidation control circuit that invalidates the data stored in the cache when the data in the shared area of the main memory is rewritten by another processor or input/output device.
[作用]
物理的なメモリ階層の、ある特定のレベルにおいて、下
位メモリとの整合性を保証する必要がない領域へのアク
セスであると判定されると、そのアクセスは下位のメモ
リへのアクセスを引き起こさない。[Effect] At a certain level of the physical memory hierarchy, if it is determined that the access is to an area that does not require guaranteeing consistency with the lower memory, that access will prevent access to the lower memory. Don't cause it.
そこでユーザーは、物理的なメモリ階層に応じて、物理
的なメモリ空間を多段階に分割する。論理的に上位段階
に位置する領域には、物理的に上位階層に位置するメモ
リ空間を割り当てる。その結果、論理的に上位に位置す
る領域へのアクセスに要する時間は最悪ケースにおいて
、下位に位置する領域へのアクセス時間よりも短くなる
。さらに、頻繁にアクセスするデータを、より上位段階
の領域に、ユーザーが意図的には位置すれば、平均アク
セス時間も゛短縮される。Therefore, the user divides the physical memory space into multiple stages according to the physical memory hierarchy. A memory space physically located at a higher level is allocated to an area located at a logically higher level. As a result, in the worst case, the time required to access an area located logically higher is shorter than the time required to access an area located lower. Furthermore, if the user intentionally places frequently accessed data in a higher level area, the average access time will be reduced.
例えば前記のマルチプロセッサシステムの場合、メイン
メモリもしくはキャッシュをアクセスするプロセッサの
アドレスが共有領域またはプライベート領域のいずれか
をアクセスするかが領域判定回路の出力によって判定さ
れる。For example, in the case of the above-mentioned multiprocessor system, it is determined whether the address of the processor accessing the main memory or cache accesses either the shared area or the private area, based on the output of the area determination circuit.
前者(共有領域アクセス)の場合、領域判定回路の出力
に従って、キャッシュデバイスはライト・スルー方式も
しくはコピー・バック方式に従って動作する。従って、
キャッシュとメインメモリの格納データの整合性が保証
され、他のプロセッサもしくは入出力デバイスは、メイ
ンメモリの格納データをリード・アクセスすることによ
って、プロセッサ間もしくはプロセッサー人出力デバイ
ス間のデータ通信が可能となる。コピー・バック方式に
従って動作しており、かつ、他のプロセッサもしくは入
出力デバイスがメインメモリの同一アドレスにライト動
作を行った場合は、キャッシュとメインメモリの格納デ
ータは一致しなくなるので、無効化制御回路はキャッシ
ュの格納データを無効化する。In the former case (shared area access), the cache device operates according to the write-through method or the copy-back method according to the output of the area determination circuit. Therefore,
The consistency of the data stored in the cache and main memory is guaranteed, and other processors or input/output devices can read and access the data stored in the main memory, allowing data communication between processors or between processors and output devices. Become. If the copy-back method is used and another processor or input/output device performs a write operation to the same address in main memory, the data stored in the cache and main memory will no longer match, so invalidation control is required. The circuit invalidates the data stored in the cache.
後者(プライベート領域アクセス)の場合、領域判定回
路の出力に従って、キャッシュデバイスはローカル・メ
モリとして動作する。すなわち、プロセッサからのライ
ト・アクセスのアドレスがキャッシュにヒツトした場合
は、プロセッサからのライト・データはメインメモリに
書き込まれることなく、キャッシュにのみ書き込まれる
ので、ライト動作を短時間で終了することが可能となる
。In the latter case (private area access), the cache device operates as a local memory according to the output of the area determination circuit. In other words, if the write access address from the processor hits the cache, the write data from the processor is not written to the main memory but only to the cache, so the write operation can be completed in a short time. It becomes possible.
本発明のその他の目的および特徴は、下記の実施例から
明らかとなろう。Other objects and features of the invention will become apparent from the following examples.
以下、本発明の一実施例を説明する。 An embodiment of the present invention will be described below.
第2図は本発明の一実施例による共有メモリ型マルチプ
ロセッサシステムの構成を示したものである。プロセッ
サ1,2は各々それに付属するキャッシュ3,4を持つ
。キャッシュ3,4はメインメモリバス7に接続され、
命令およびデータを格納するメインメモリ5につながる
。メインメモリバス7には、入出力デバイス6も接続さ
れ、メインメモリバス7を介してデータのやり取りを行
なう。FIG. 2 shows the configuration of a shared memory type multiprocessor system according to an embodiment of the present invention. Processors 1, 2 each have a cache 3, 4 associated with it. The caches 3 and 4 are connected to the main memory bus 7,
It is connected to main memory 5 which stores instructions and data. An input/output device 6 is also connected to the main memory bus 7, and data is exchanged via the main memory bus 7.
プロセッサ1,2内にはアドレス変換テーブル8.9が
存在し、プロセッサ1,2がデータをアクセスするとき
の論理アドレスから物理アドレスへのアドレス変換に用
いられる。プロセッサ1゜2とキャッシュ3,4とのイ
ンターフェース14゜15にはアドレス変換後の物理ア
ドレスが送出される。An address translation table 8.9 exists in the processors 1 and 2, and is used for address translation from a logical address to a physical address when the processors 1 and 2 access data. The physical address after address translation is sent to the interface 14-15 between the processor 1-2 and the caches 3 and 4.
キャッシュ3,4内にはアドレス・アレイ10゜11と
データ・アレイ12.13が存在する。データ・アレイ
12.13は、メインメモリ5のデータの一時記憶場所
として使用でき、かつその−部またはすべてをメインメ
モリ5とは独立なローカル・メモリとしても使用できる
。アドレス・アレイ10.11はデータアレイ12.1
3に格納されているデータの物理アドレスを保持してい
る。Within caches 3 and 4 there are address arrays 10.11 and data arrays 12.13. The data array 12.13 can be used as a temporary storage location for data in the main memory 5 and can also be used partially or completely as a local memory independent of the main memory 5. Address array 10.11 is data array 12.1
It holds the physical address of the data stored in 3.
第1図はキャッシュ3の内部構成を示したものである。FIG. 1 shows the internal structure of the cache 3.
尚、キャッシュ4の内部構成もキャッシュ3と同一であ
る。本実施例を通して、ワードは4バイト長のデータを
表す。14はプロセッサ1とキャッシュ3との間のイン
ターフェース信号群で、4バイト幅のデータ線14−1
、アドレスを示す24ビツト幅のアドレス線14−2、
および制御線14−3から成る。また、キャッシュ3は
メインメモリパス7につながる。メインメモリバス7は
、4バイト幅のデータ線7−1、ワードアドレスを示す
22ビツト幅のアドレス幅7−2、および制御線7−3
から成る。Note that the internal configuration of the cache 4 is also the same as that of the cache 3. Throughout this embodiment, a word represents data that is 4 bytes long. 14 is a group of interface signals between the processor 1 and the cache 3, and a 4-byte wide data line 14-1
, a 24-bit wide address line 14-2 indicating an address,
and a control line 14-3. The cache 3 is also connected to the main memory path 7. The main memory bus 7 includes a 4-byte wide data line 7-1, a 22-bit wide address line 7-2 indicating a word address, and a control line 7-3.
Consists of.
本実施例のキャッシュは、ブロック長4バイトのダイレ
クトマツプ方式を用いている。アドレス・アレイ10は
、8192カラムXIOビツトの2ボ一トRMA (R
andom Access Memory)で構成され
る。10ビツトの内訳は、9ビツトのアドレス・タグ、
1ビツトの有効ビットである。データ・アレイ12は8
192カラム×32ビツトのRAMで構成される。デー
タ・アレイ12はデータの一時記憶場所であり、データ
・アレイ12のあるカラムに有効なデータが格納されて
いる場合には、アドレス・アレイ10の同一のカラムに
該データのアドレスの上位9ビツトがアドレス・タグと
して格納され、有効ビットがオン(1)となる。The cache of this embodiment uses a direct map method with a block length of 4 bytes. Address array 10 consists of a two-vote RMA (R
andom Access Memory). The 10 bits consist of a 9 bit address tag,
This is one valid bit. Data array 12 is 8
It consists of 192 columns x 32 bits RAM. The data array 12 is a temporary storage location for data, and when valid data is stored in a certain column of the data array 12, the upper 9 bits of the address of the data are stored in the same column of the address array 10. is stored as an address tag, and the valid bit is turned on (1).
第3図はアドレス24ビツトのフィールドを示したもの
である。第0ビツトは最上位ビットで、第23ビツトは
最下位ビットである。第○ビットから第8ビツトはアド
レス・タグ・フィールドであり、アドレス・アレイ10
に格納される情報である。第9ビツトから第21ビツト
はカラム・フィールドであり、アドレス・アレイ10、
あるいはデータ・アレイ12のカラム選択すなわち、R
AMのアドレスに用いられる。また第Oビットから第1
1ビツトは領域判定フィールドでもあり、領域の判定を
行なうのに用いられる。第22゜23ビツトは、ワード
内のバイト位置を示すバイト・フィールドである。FIG. 3 shows a 24-bit address field. The 0th bit is the most significant bit and the 23rd bit is the least significant bit. The ○th bit to the 8th bit are the address tag field, and the address array 10
This is information stored in . The 9th bit to the 21st bit are column fields, and the address array 10,
Or column selection of data array 12, i.e. R
Used for AM addresses. Also, from the Oth bit to the 1st
One bit is also a region determination field and is used to determine the region. The 22nd and 23rd bits are a byte field indicating the byte position within the word.
第1図のアドレス・アレイ10のRAMのアドレスとし
ては、プロセッサ1からのアドレス線14−2のカラム
・フィールド33と、メインメモリバス7のアドレス線
7−2がらのカラム・フィールド34が用いられる。3
2.35は、14−2あるいは7−2のタグ・フィール
ドであり、アドレス・タグ比較器22.23に入力され
る。Column field 33 of address line 14-2 from processor 1 and column field 34 of address line 7-2 of main memory bus 7 are used as addresses in the RAM of address array 10 in FIG. . 3
2.35 is the tag field of 14-2 or 7-2 and is input to the address tag comparator 22.23.
アドレス・タグ比較器22.23のもう一方の入、
力は、アドレス・アレイ10の、2つのボートから読み
だされたアドレス・タグ41.42である。the other input of address tag comparator 22.23;
The forces are address tags 41, 42 read from two ports of address array 10.
比較結果は、ヒツト/ミス信号43.44とじてキャッ
シュ制御回路21に報告される。38は14−2のアド
レス・タグ・フィールドである。The comparison results are reported to the cache control circuit 21 as hit/miss signals 43 and 44. 38 is the address tag field of 14-2.
また、36は、プロセッサ側のアドレス線14−2とメ
インメモリ側のアドレス線7−2を結ぶパスである。Further, 36 is a path connecting the address line 14-2 on the processor side and the address line 7-2 on the main memory side.
データ・アレイ12のアドレス37は、アドレス線14
−2のカラム・フィールドが使われる。Address 37 of data array 12 is connected to address line 14.
-2 column fields are used.
データ・アレイ12への書き込み/読み出しパス39は
、プロセッサ側のデータ線14−1とメインメモリ側の
アドレス線7−1につながる。A write/read path 39 to the data array 12 connects to a data line 14-1 on the processor side and an address line 7-1 on the main memory side.
20はキャッシュメモリ3.4とメインメモリ5の間で
デニタの整合性を保熱する領域(整合性保証領域)と、
整合性を保証しない領域(整合性非保証領域)を判定す
るための領域判定回路である。領域判定回路20への入
力は、アドレス線14−2の領域判定フィールドの12
ビツト(信号30)と、アドレス線7−2の領域判定フ
ィールドの12ビツト(信号46)であり、判定結果は
それぞれ信号線31.45で報告される。信号線31.
45共に、値が1の時には整合性非保証領域を示し、0
の時には整合性保証領域を示す。20 is an area (consistency guarantee area) for maintaining the consistency of the data between the cache memory 3.4 and the main memory 5;
This is an area determination circuit for determining an area where consistency is not guaranteed (consistency non-guaranteed area). The input to the area determination circuit 20 is the area determination field 12 of the address line 14-2.
bit (signal 30) and 12 bits (signal 46) of the area determination field of address line 7-2, and the determination results are reported on signal lines 31 and 45, respectively. Signal line 31.
45, when the value is 1, it indicates a consistency non-guaranteed area, and 0
When , it indicates a consistency guaranteed area.
信号線31はキャッシュ制御回路2■に入力され、ステ
ートマシン120の入力となる。また、メインメモリ5
からキャッシュ3,4にデータ転送がなされる際に、信
号線31の値がキャッシュ3のデータ・アレイ10の領
域識別ビットとしてセットされる。これに対して信号線
4Sは、キャッシュ3のカラムの無効化制御に用いられ
る。The signal line 31 is input to the cache control circuit 2■, and becomes an input to the state machine 120. In addition, main memory 5
When data is transferred from the cache 3 to the caches 3 and 4, the value of the signal line 31 is set as the area identification bit of the data array 10 of the cache 3. On the other hand, the signal line 4S is used to control the invalidation of columns in the cache 3.
第4図は領域判定回路20の内部構成を示す図である。FIG. 4 is a diagram showing the internal configuration of the area determination circuit 20.
50.51はそれぞれ12ビツト長のレジスタであり、
50にはコピー・バック領域の上限アドレスの上位12
ビツトを設定し、51にはコピー・バック領域の下限ア
ドレスの上位12ビツトを設定するレジスタである。プ
ロセッサlからのアドレス線14−2の上位12ビツト
30の値Aとレジスタ50.51内の値U、Lが大lJ
X比較回路52で比較され、L≦A≦Uてあれば領域判
定信号31の値はl(整合性非保証領域を示す)となり
、A(LあるいはU)Aである時には信号31の値はO
(整合性保証領域を示す)となる。50 and 51 are registers each having a length of 12 bits,
50 contains the top 12 upper limit addresses of the copy back area.
A register 51 is used to set the upper 12 bits of the lower limit address of the copy back area. The value A of the upper 12 bits 30 of the address line 14-2 from the processor l and the values U and L in the register 50.51 are large lJ
It is compared in the X comparison circuit 52, and if L≦A≦U, the value of the area determination signal 31 becomes l (indicating a consistency non-guaranteed area), and when A (L or U)A, the value of the signal 31 becomes O
(indicates a consistency guaranteed area).
(同様に、メインメモリバス7上のアドレス・タグ・フ
ィールド′値46に対してもレジスタ50゜51内の値
との比較がなされる。その結果は信号45に反映され、
L、Uの間の値である場合に信号45の値は1になる。(Similarly, the address tag field value 46 on the main memory bus 7 is compared with the value in the registers 50 and 51. The result is reflected in the signal 45,
When the value is between L and U, the value of the signal 45 becomes 1.
) 第5図はメモリ空間の領域分割を示す図である。) FIG. 5 is a diagram showing region division of memory space.
メモリ空間は16進数でooooooからFFFFFF
までアドレッシング可能である。このうち、ooooo
oからFFFFFFまでは整合性保証領域60である。Memory space is hexadecimal from ooooooo to FFFFFF
It is possible to address up to Of these, ooooo
The area from o to FFFFFF is a consistency guaranteed area 60.
また、FF8000からFFFFFFまでは、整合性非
保証領域61゜62.63である。メインメモリの整合
性保証領域60には、プロセッサ1.プロセッサ2、お
よび、入出力デバイス6からのライト・アクセスが起こ
る。一方、メインメモリの整合性非保証領域61に対し
ては、入出力デバイス6からのライト・アクセスだけが
起こる。メモリ空間FF7FFFからFFFFFFにお
ける、プロセッサ1からのライト・アクセスはキャッシ
ュメモリ3に対してのみ起こり、プロセッサ2からのラ
イト・アクセスはキャッシュメモリ4に対してのみ起こ
る。プロセッサ1゜2からの整合性非保証領域62.6
3へのライト・アクセスはメインメモリに対しては行な
われない。これらのアクセス制御は、プロセッサ1ある
いはプロセッサ2内のアドレス変換テーブル8あるいは
9で行なわれる。例えば、プロセッサ1がデータをアク
セスするときに、その論理アドレスがメインメモリ5の
物理アドレスに変換されるが、その変換後のアドレスが
整合性保証領域60あるいは整合性非保証領域62のア
ドレス範囲になるように、アドレス変換テーブルの内容
が設定される。Further, from FF8000 to FFFFFF is a consistency non-guaranteed area of 61°62.63. In the consistency guaranteed area 60 of the main memory, processors 1. Write accesses from processor 2 and input/output device 6 occur. On the other hand, only write access from the input/output device 6 occurs to the consistency non-guaranteed area 61 of the main memory. In memory spaces FF7FFF to FFFFFF, write access from processor 1 occurs only to cache memory 3, and write access from processor 2 occurs only to cache memory 4. Consistency non-guaranteed area 62.6 from processor 1゜2
Write access to 3 is not performed to main memory. These access controls are performed by address translation table 8 or 9 in processor 1 or processor 2. For example, when the processor 1 accesses data, its logical address is translated into a physical address in the main memory 5, but the address after the translation falls within the address range of the consistency guaranteed area 60 or the consistency non-guaranteed area 62. The contents of the address translation table are set so that
入出力デバイス6のみによってアクセスされるプライベ
ート領域である整合性非保証領域61゜プロセッサ1の
みによってアクセスされるプライベート領域である整合
性非保証領域62.プロセッサ2のみによってアクセス
されるプライベート領域である整合性非保証領域63の
アドレスはアドレス空間中で重複しているが、それぞれ
プライベート領域であるため、この重複アドレス空間の
同一アドレスに対応するこれら整合性非保証領域61.
62,6.3のデータ相互の整合性を保証する必要は一
切無い。従って、これらの領域61゜62.63は入出
力デバイス6.プロセッサl。Consistency non-guaranteed area 61° which is a private area accessed only by the input/output device 6; Consistency non-guaranteed area 62 which is a private area accessed only by the processor 1. The addresses of the consistency non-guaranteed area 63, which is a private area accessed only by the processor 2, overlap in the address space, but since they are each private areas, these consistency addresses corresponding to the same address in this overlapping address space Non-guaranteed area 61.
There is no need to guarantee the mutual consistency of data between 62 and 6.3. Therefore, these areas 61, 62, and 63 are the input/output devices 6. Processor l.
2に対するローカルメモリのためのアドレス空間の領域
として利用することができる。It can be used as an address space area for local memory for 2.
上記領域を判定するために第4図におけるレジスタ50
に16進数Uが設定され、レジスタ51には16進数り
が設定される。これにより、プロセッサ1から整合性非
保証領域62にアクセスがなされたときには信号線31
の値が1となら、キャッシュ制御回路21はキャッシュ
3をローカルメモリとして扱う。The register 50 in FIG. 4 is used to determine the above area.
A hexadecimal number U is set in the register 51, and a hexadecimal number U is set in the register 51. As a result, when the processor 1 accesses the consistency non-guaranteed area 62, the signal line 31
If the value of is 1, the cache control circuit 21 treats the cache 3 as a local memory.
しかしながらここに一つの問題がある。すなわち、整合
性非保証領域のデータはすべてキャッシュ3,4に収ま
りきらなければならない。そのため、レジスタ5oと5
1を用いて設定する整合性非保証領域のサイズはキャッ
シュ容量によって制限され、本実施例の場合には最大で
32 kByteとなる。However, there is one problem here. That is, all the data in the consistency non-guaranteed area must fit in the caches 3 and 4. Therefore, registers 5o and 5
The size of the consistency non-guaranteed area set using 1 is limited by the cache capacity, and in this embodiment, the maximum size is 32 kBytes.
第6図は上記動作を制御するキャッシュ制御回路21の
内部構成を示す図である。120は整合性保証領域への
リード/ライト動作および整合性非保証領域へのリード
/ライト動作を制御するステート・マシンであり、14
0はメインメモリバスの監視によるアドレスアレイの無
効化動作を制御する回路である。FIG. 6 is a diagram showing the internal configuration of the cache control circuit 21 that controls the above operations. 120 is a state machine that controls read/write operations to the consistency guaranteed area and read/write operations to the consistency non-guaranteed area;
0 is a circuit that controls the invalidation operation of the address array by monitoring the main memory bus.
ステート・マシン120の入力は、現在のステートを示
すステート信号群110、プロセッサ側のアドレスタグ
とアドレスアレイ10内のタグとを比較した結果を報告
するヒツト/ミス信号43゜アドレスアレイ10から読
みだされた有効ビット信号100−a、および更新ビッ
ト信号100−b、領域判定結果の報告信号31.プロ
セッサとキャッシュ間のインターフェース制御入力信号
群1、4−3− a 、メモリバス制御信号7−3−a
である。インターフェース制御入力信号14−3−aは
、プロセッサがアクセスを開始したことを指示するアク
セス開始信号、リード/ライト識別信号からなる。メモ
リバス制御信号7−3−aは、メモリバスサイクル終了
を報告する信号である。Inputs to the state machine 120 include a set of state signals 110 indicating the current state, a hit/miss signal 43 that reports the result of comparing the address tag on the processor side with the tag in the address array 10 read from the address array 10; The updated valid bit signal 100-a, the updated bit signal 100-b, and the area determination result report signal 31. Interface control input signal group 1, 4-3-a between processor and cache, memory bus control signal 7-3-a
It is. The interface control input signal 14-3-a consists of an access start signal indicating that the processor has started access, and a read/write identification signal. The memory bus control signal 7-3-a is a signal that reports the end of the memory bus cycle.
ステート・マシン120の出力は、キャッシュ内のアド
レス・アレイ10.データ・アレイ12の読み出し・書
き込みを制御する内部制御信号群130、メモリバス制
御信号群7−3−b、インターフェース制御出力信号1
4−3−bである。The output of state machine 120 is stored in address array 10 . Internal control signal group 130 that controls read/write of data array 12, memory bus control signal group 7-3-b, interface control output signal 1
4-3-b.
メモリバス制御信号群7−3−bは、メモリバスサイク
ルの開始信号、読み出し/IFき込み指示信号から成る
。また、インターフェース制御出力信号14−3−bは
、プロセッサに対するアクセス終了信号である。The memory bus control signal group 7-3-b consists of a memory bus cycle start signal and a read/IF write instruction signal. Further, the interface control output signal 14-3-b is an access completion signal for the processor.
ステート・マシン120は、各入力信号に反応して、前
記制御動作を実現する出力信号を送出する。特に本ステ
ート・マシン120には、領域判定結果の報告信号31
が入力されているので、この判定結果により整合性保証
領域と整合性非保証領域の両方へのアクセスの制御動作
がこのステート・マシン120だけで実現されている。State machine 120 responds to each input signal to provide an output signal that implements the control operation. In particular, this state machine 120 includes a region determination result report signal 31.
is input, the control operation for access to both the consistency guaranteed area and the consistency non-guaranteed area is realized only by this state machine 120 based on this determination result.
アドレスアレイ10の無効化動作を制御する回路140
の入力は、メインメモリバス上のアドレスタグとアドレ
スアレイ内のタグとを比較した結果を報告するヒツト/
ミス信号44、同じくメインメモリバス7上のアドレス
・タグ・フィールド値の領域判定結果を報告する信号4
5.メインメモリバス上のアドレスによってアドレスア
レイから読み出された有効ビット信号100−c、およ
び、メモリバス制御信号群7.−3− bである。メモ
リバス制御信号群7−3−bはメモリバス開始信号、読
み呂し/書き込み指示信号からなる。Circuit 140 for controlling invalidation operation of address array 10
The input is a hit/dot that reports the result of comparing the address tag on the main memory bus with the tag in the address array.
A miss signal 44 and a signal 4 that also reports the area determination result of the address tag field value on the main memory bus 7
5. A valid bit signal 100-c read from the address array according to an address on the main memory bus, and a group of memory bus control signals 7. -3- b. The memory bus control signal group 7-3-b consists of a memory bus start signal and a read/write instruction signal.
回路140は、メモリバス制御信号群7−3−すからメ
インメモリバス上の他のマスクからメインメモリに対す
る書き込みがある。ことを認識し、そのときの信号44
および100−cの状態に従って、アドレスアレイ無効
化のための無効化制御信号150を送出する。The circuit 140 has memory bus control signal group 7-3--from which data is written to the main memory from another mask on the main memory bus. Recognizing that, the signal 44 at that time
and 100-c, it sends an invalidation control signal 150 for invalidating the address array.
以下に、第7図、第8図および第9図のフローチャート
を参照してキャッシュメモリ3のキャラ“シュ制御回路
21の制御動作を説明する。The control operation of the cache control circuit 21 of the cache memory 3 will be explained below with reference to the flowcharts of FIGS. 7, 8, and 9.
■、プロセッサ1によるキャッシュ3.メインメモリ5
のリード:
プロセッサ1から発生されたアドレス信号が整合性保証
領域へのアクセスか、整合性非保証領域へのアクセスか
を判定する(第7図 ステップ700)。■, Cache by processor 1 3. main memory 5
Read: It is determined whether the address signal generated from the processor 1 is an access to a consistency guaranteed area or a consistency not guaranteed area (step 700 in FIG. 7).
(1)整合性保証領域からのリード。(1) Read from consistency guaranteed area.
整合性保証領域においてはライト・スルー方式でライト
・アクセスが行なわれる。Write access is performed in the consistency guaranteed area using a write-through method.
第7図のステップ700において、プロセッサlから発
生されたアドレス信号の上位12ビツトの値AがA(L
またはUSAである時に、第4図の比較回路52の領域
判定信号31の値はOとなって、整合性保証領域60へ
のアクセスであることが判明する。この領域判定信号3
1が比較回路52より出力される間に、処理は第7図の
ステップ701のキャッシュ検索動作に移行される。In step 700 of FIG. 7, the value A of the upper 12 bits of the address signal generated from the processor
Alternatively, when the access point is USA, the value of the area determination signal 31 of the comparison circuit 52 in FIG. This area determination signal 3
While 1 is being output from the comparator circuit 52, the process moves to the cache search operation of step 701 in FIG.
このステップ701のキャッシュ検索動作において、キ
ャッシュ3のアドレス・アレイ10が検索され、その結
果ヒツトしていれば(すなわち、アクセスアドレスのア
ドレス・タグ・フィールドの値32とアドレス・アレイ
10から読み出された値41が一致してヒツト信号43
がアサートされ、かつ、アドレス・タグと同時に読み呂
された有効ビットが1であれば)、キャッシュ3のキャ
ッシュ制御回路21のステート・マシン120は整合性
保証領域判定信号31.ヒツト信号43等に応答して処
理を第7図のステップ702に移行せしめる。In the cache search operation of step 701, the address array 10 of the cache 3 is searched, and if the result is a hit (that is, the value 32 of the address tag field of the access address and the value read from the address array 10). If the value 41 matches, a hit signal 43 is generated.
is asserted and the valid bit read at the same time as the address tag is 1), the state machine 120 of the cache control circuit 21 of the cache 3 outputs the consistency guaranteed area determination signal 31. In response to the hit signal 43, etc., the process moves to step 702 in FIG.
このステップ702においては、プロセッサlから発生
されたアドレス信号のカラム・フィールドに従って、デ
ータ・アレイ12がらデータ線14−1にデータが高速
で読み出され、この読み出しデータはプロセット1に転
送される。In this step 702, data is read out from the data array 12 onto the data line 14-1 at high speed according to the column field of the address signal generated from the processor l, and this read data is transferred to the processor l. .
一方、ステップ701のキャッシュ検索動作において、
検索の結果ヒツトしていなければ、キャッシュ3のキャ
ッシュ制御回路21のステート・マシン120は整合性
保証領域判定信号31、ミス信号43等に応答して処理
を第7図のステップ703に移行せしめる。On the other hand, in the cache search operation at step 701,
If there is no hit as a result of the search, the state machine 120 of the cache control circuit 21 of the cache 3 moves the process to step 703 in FIG. 7 in response to the consistency guaranteed area determination signal 31, miss signal 43, etc.
このステップ703においては、アドレス・アレイ12
から読み出された有効ビットと領域識別ビットとを判定
する。アドレス・アレイ12がら読み出されたデータは
、プロセッサ側のアドレス信号14−2のカラムフィー
ルドのみを用いてアクセスされている。そのため、ステ
ップ701においてキャッシュミスと判断されても、そ
のカラムにアドレスタグフィールドの値が異なる、有効
なデータがそのカラムに保持されている場合がある。In this step 703, address array 12
The valid bit and area identification bit read from the area are determined. Data read from address array 12 is accessed using only the column field of address signal 14-2 on the processor side. Therefore, even if a cache miss is determined in step 701, valid data with a different address tag field value may be held in that column.
キャッシュ・ミスのリード時のアドレス・アレイ12か
ら読み出された有効ビットが1であり、領域識別ビット
が1であることは、プロセッサ1よりのアドレス信号の
カラム・フィールドに対応するキャッシュ3の格納デー
タが整合性非保証領域のデータであることを示している
。この場合、キャッシュメモリに保持されているデータ
を保持/
する必要があり、処理を第7図のステップ705に移行
する。それに対して、有効ビットが0(すなわち無効デ
ータが格納されている)の場合又は領域識別ビットがO
(すなわち整合性保証領域のデータである)の場合には
キャッシュメモリ中のそのカラムのデータを更新可能で
あり、処理を第7図のステップ704に移行する。The fact that the valid bit read from the address array 12 at the time of a cache miss read is 1 and the area identification bit is 1 means that the cache 3 stores data corresponding to the column field of the address signal from the processor 1. Indicates that the data is in a non-consistent area. In this case, it is necessary to hold/retain the data held in the cache memory, and the process moves to step 705 in FIG. On the other hand, if the valid bit is 0 (that is, invalid data is stored) or the area identification bit is O
(That is, the data is in the consistency guaranteed area), the data in that column in the cache memory can be updated, and the process moves to step 704 in FIG.
このステップ704においては、ステート・マシン12
0はメモリバスサイクルを開始し、プロセッサ1からの
アドレスが信号線36を介してメインメモリバス7のア
ドレス線7−2に供給される。このアドレスに従って、
メインメモリ5のデータが読み出され、データ線7−1
を介してそのデータがデータ・アレイ】2に書き込まれ
ると同時に、データ線14−1を介してプロセッサ1に
そのデータが転送される。一方、アドレス・アレイ1o
には、対応するカラムにアドレス・タグが書き込まれ、
有効ビットに1、領域識別ビットにOが書き込まれる。In this step 704, the state machine 12
0 starts a memory bus cycle and the address from processor 1 is provided via signal line 36 to address line 7-2 of main memory bus 7. According to this address,
The data in the main memory 5 is read and the data line 7-1
At the same time that data is written to data array 2 via data line 14-1, the data is transferred to processor 1 via data line 14-1. On the other hand, address array 1o
The address tag is written in the corresponding column and
1 is written to the valid bit and O is written to the area identification bit.
一方ステップ705においては、ステート・マシン12
0はメモリバスサイクルを開始し、プロセッサlからの
アドレスが信号線36を介してメインメモリバス7のア
ドレスM7−2に供給される。このアドレスに従って、
メインメモリ5のデータが読み出され、データ線7−1
とデータ線14−1を介してプロセッサ1にそのデータ
が転送される。ただしステップ705では、ステップ7
04と異なり、キャッシュ3への書き込みは行なわない
。Meanwhile, in step 705, the state machine 12
0 starts a memory bus cycle and the address from processor l is applied via signal line 36 to address M7-2 of main memory bus 7. According to this address,
The data in the main memory 5 is read and the data line 7-1
The data is transferred to the processor 1 via the data line 14-1. However, in step 705, step 7
Unlike 04, writing to cache 3 is not performed.
(2)整合性非保証領域からのリード:第7図のステッ
プ700において、プロセッサ1から発生されたアドレ
ス信号の上位12ビツトの値AがL≦A≦Uである時に
、第4図の比較回路52の領域判定信号31の値は1と
なって、整合性非保証領域62へのアクセスであること
が判明する。この領域判定信号31が比較回路52より
出力される間に、処理は第7図のステップ706のキャ
ッシュ検索動作に移行される。(2) Reading from a non-consistent area: When the value A of the upper 12 bits of the address signal generated from the processor 1 is L≦A≦U in step 700 of FIG. 7, the comparison shown in FIG. The value of the area determination signal 31 of the circuit 52 becomes 1, indicating that the access is to the consistency non-guaranteed area 62. While this area determination signal 31 is being output from the comparison circuit 52, the process shifts to the cache search operation of step 706 in FIG.
このステップ706のキャッシュ検索動作において、キ
ャッシュ3のアドレス・アレイ10が検索され、その結
果ヒツトしていれば、キャッシュ3のキャッシュ制御回
路21のステート・マシン120は整合性非保証領域判
定信号31.ヒツト信号43等に応答して処理を第7図
の上述したステップ702に移行せしめる。In the cache search operation in step 706, the address array 10 of the cache 3 is searched, and if the result is a hit, the state machine 120 of the cache control circuit 21 of the cache 3 sends the consistency non-guaranteed area determination signal 31. In response to the hit signal 43, etc., the process is shifted to the above-described step 702 in FIG.
一方、ステップ706のキャッシュ検索動作において、
検索の結果ヒツトしていなければ、キャッシュ3のキャ
ッシュ制御回路21のステート・マシン120は整合性
非保証領域判定信号31゜ミス信号43等に応答して処
理を第7図のステップ707に移行せしめる。On the other hand, in the cache search operation at step 706,
If there is no hit as a result of the search, the state machine 120 of the cache control circuit 21 of the cache 3 moves the process to step 707 in FIG. .
このステップ707おいては、キャッシュ3からプロセ
ッサ1に仮のデータが転送される。仮のデータは、0と
しても良いし、キャッシュ3のデータ・アレイ12から
読み出された値としてもよい。というのも、整合性非保
証領域からデータを読み出そうとしてキャッシュ・ミス
を起こす(ステップ7o7)ということは、とりもなお
さず設定されていないデータを読み出そうとしたことを
意味し、一般的にはそのプログラムにミスがあると判断
できるからである。In this step 707, temporary data is transferred from the cache 3 to the processor 1. The temporary data may be 0 or a value read from the data array 12 of the cache 3. This is because a cache miss occurs when attempting to read data from an area where consistency is not guaranteed (step 7o7), which means that an attempt is made to read data that has not been set in the first place. This is because it can be determined that there is an error in the program.
■、プロセッサ1によるキャッシュ3.メインメモリ5
へのライト:
プロセッサ1から発生されたアドレス信号が整合性保証
領域へのアクセスか、整合性非保証領域へのアクセスか
を判断する(第8図 ステップ800)。■, Cache by processor 1 3. main memory 5
Write to: It is determined whether the address signal generated from the processor 1 is an access to a consistency guaranteed area or a consistency not guaranteed area (step 800 in FIG. 8).
(3)整合性保証領域へのライト:
第8図のステップ800において、プロセッサ1から発
生されたアドレス信号の上位12ビツトの値AがA(L
またはU<Aである時に、第4図の比較回路52の領域
判定信号31の値はOとなって、整合性保証領域60へ
のアクセスであることが判明する。この領域判定信号3
1が比較回路52より出力される間に、処理は第8図の
ステップ801のキャッシュ検索動作に移行される。(3) Writing to the consistency guaranteed area: In step 800 of FIG. 8, the value A of the upper 12 bits of the address signal generated from the processor 1 is
Alternatively, when U<A, the value of the area determination signal 31 of the comparison circuit 52 in FIG. 4 becomes O, indicating that the access is to the consistency guaranteed area 60. This area determination signal 3
While 1 is being output from the comparator circuit 52, the process moves to the cache search operation of step 801 in FIG.
このステップ801のキャッシュ検索動作において、キ
ャッシュ3のアドレス・アレイ10が検索され、その結
果ヒツトしていれば(すなわち、アクセスアドレスのア
ドレス・タグ・フィールドの値32とアドレス・アレイ
10から読み出された値41が一致してヒツト信号43
がアサートされ、かつ、アドレス・タグと同時に読み出
された有効ビットが1であれば)、キャッシュ3のキャ
ッシュ制御回路21のステート・マシン120は整合性
保証領域判定信号31.ヒツト信号43等に応答して処
理を第8図のステップ802に移行せしめる。In the cache search operation of step 801, the address array 10 of the cache 3 is searched, and if there is a hit as a result (that is, the value 32 of the address tag field of the access address and the address array 10 are read out). If the value 41 matches, a hit signal 43 is generated.
is asserted and the valid bit read at the same time as the address tag is 1), the state machine 120 of the cache control circuit 21 of the cache 3 outputs the consistency guaranteed area determination signal 31. In response to the hit signal 43, etc., the process moves to step 802 in FIG.
このステップ802においては、プロセッサ1から発生
されたアドレス信号に従って、ライト・データをキャッ
シュ3のデータ・アレイ12に書き込む。一方、ステー
ト・マシン120はメモリバスサイクルを開始し、メイ
ンメモリ5にも同様にライト・データを書き込む。In this step 802, write data is written to the data array 12 of the cache 3 according to the address signal generated from the processor 1. On the other hand, the state machine 120 starts a memory bus cycle and writes write data to the main memory 5 as well.
一方、ステップ801のキャッシュ検索動作において、
検索の結果ヒツトしていなければ、キャッシュ3のキャ
ッシュ制御回路21のステート・マシン120の整合性
保証領域判定信号31.ミス信号43等に応答して処理
を第8図のステップ803に移行せしめる。On the other hand, in the cache search operation at step 801,
If there is no hit as a result of the search, the consistency guaranteed area determination signal 31 of the state machine 120 of the cache control circuit 21 of the cache 3 is output. In response to the miss signal 43, etc., the process moves to step 803 in FIG.
このステップ803においては、ライト・データのキャ
ッシュ3のデータ・アレイ12への書き込みは行われな
い。一方、ステート・マシン120はメモリバスサイク
ルを開始し、プロセッサ1からのアドレスに従って、メ
インメモリ5ヘライト・データを書き込む。In step 803, write data is not written to the data array 12 of the cache 3. Meanwhile, state machine 120 starts a memory bus cycle and writes write data to main memory 5 according to the address from processor 1.
(4)整合性非保証領域へのライト:
第8図のステップ800において、プロセッサ1から発
生されたアドレス信号の上位12ビツトの値AがL≦A
≦Uである時に、第4図の比較回路52の領域判定信号
31の値は1となって、整合性非保証領域62へのアク
セスであることが判明する。この場合、処理は第8図の
ステップ804に移行する。(4) Write to consistency non-guaranteed area: In step 800 of FIG. 8, the value A of the upper 12 bits of the address signal generated from the processor 1 is L≦A.
When ≦U, the value of the area determination signal 31 of the comparison circuit 52 in FIG. 4 becomes 1, indicating that the access is to the consistency non-guaranteed area 62. In this case, the process moves to step 804 in FIG.
このステップ804においては、プロセッサ1からのラ
イト・データをキャッシュ3のデータ・アレイ12に書
き込む。この時、プロセッサ1からのライト・データは
メインメモリ5に書き込まれないので、ライト動作を短
時間で終了することが可能となる。また、この際書き替
えられるデータは他のデバイスから直接にはアクセスで
きないため、後述の無効化処理を行なうためにアドレス
線7−2にアドレスを8力する必要がない。その結果、
メモリバス7のバストラフィックを減じ、しかも他のデ
バイスの処理に悪影響を与えない。In step 804, write data from processor 1 is written to data array 12 of cache 3. At this time, the write data from the processor 1 is not written to the main memory 5, so the write operation can be completed in a short time. Furthermore, since the data to be rewritten at this time cannot be accessed directly from other devices, there is no need to input an address to the address line 7-2 in order to perform invalidation processing, which will be described later. the result,
The bus traffic of the memory bus 7 is reduced, and the processing of other devices is not adversely affected.
■、他のプロセッサ2又は入出力デバイス6によるメモ
リ・ライトに対する処理:
プロセッサ1がキャッシュ3とメインメモリ5のライト
・スルー領域60とに同一データを書き込んだ後、他の
プロセッサ2または入出力デバイス6が上記データのア
ドレスと同一のアドレス位置のメインメモリ5に他のデ
ータを書き込む場合がある。この場合は、キャッシュ3
とメインメモリ5との格納データの対応が保証されなく
なるので、キャッシュ3に格納されたデータを無効化す
る必要がある。(2) Processing for memory write by another processor 2 or input/output device 6: After the processor 1 writes the same data to the cache 3 and the write-through area 60 of the main memory 5, the other processor 2 or input/output device 6 may write other data to the main memory 5 at the same address location as the address of the above data. In this case, cache 3
Since the correspondence between the stored data and the main memory 5 is no longer guaranteed, it is necessary to invalidate the data stored in the cache 3.
この無効化のために、キャッシュ3のアドレス・アレイ
10はメインメモリバス7を介して、メインメモリ5に
対するプロセッサ2あるいは入出力デバイス6からの書
き込みアドレスを監視する。For this purpose, the address array 10 of the cache 3 monitors the write address to the main memory 5 from the processor 2 or the input/output device 6 via the main memory bus 7.
書き込みアドレスはメインメモリ側のアドレス線7−2
から入力され、そのカラム・フィールドがアドレス・ア
レイ10の1つのボート・アドレス34に入る。メイン
メモリ5に対して書き込みがなされているか否かは、キ
ャッシュ3のキャッシュ制御回路21の制御回路140
が制御線7−3−bを監視することによってなされる。The write address is the address line 7-2 on the main memory side.
, and its column field goes into one boat address 34 of address array 10. The control circuit 140 of the cache control circuit 21 of the cache 3 determines whether or not writing has been done to the main memory 5.
is done by monitoring control line 7-3-b.
アドレス・アレイ10から読み出されたアドレス・タグ
42とアドレス線7−2のアドレス・タグ・フィールド
35の値が比較器23によって比較される。Comparator 23 compares address tag 42 read from address array 10 with the value of address tag field 35 of address line 7-2.
これらの値が一致して、ビット信号44がアサートされ
、かつ同時に読み出された有効ビットが1である場合に
は、そのカラムを無効化するために制御信号線150を
介してこの有効ビットに0を書き込む。これらの動作は
キャッシュ制御回路21によって制御される。If these values match, bit signal 44 is asserted, and the valid bit read at the same time is 1, this valid bit is sent via control signal line 150 to disable that column. Write 0. These operations are controlled by the cache control circuit 21.
以上の無効化の処理の流れが、第9図のフローチャート
に示されている。The flow of the above invalidation process is shown in the flowchart of FIG.
メインメモリ側のアドレス線7−2から書き込みアドレ
スが供給されると、ステップ900に処理が移行され、
このステップ900では書き込みアドレスによるアドレ
ス・アレイ10のキャッシュ検索が実行される。When a write address is supplied from the address line 7-2 on the main memory side, the process moves to step 900,
In this step 900, a cache search of the address array 10 based on the write address is performed.
この検索の結果、比較器23の出力からヒツト信号44
が出力されると、処理はステップ901の無効化処理に
移行される。このステップ901において、アドレス・
アレイ10の該当カラムの有効ビットにOが書き込まれ
る。一方、ステップ900のキャッシュ検索結果がミス
である場合、無効化のためのステップ901を経由する
こと無く、処理は終了される。この動作によりライト・
スルー領域にえけるキャッシュ3.キャッシュ4、およ
びメインメモリ5のデータの一貫性が保たれる。As a result of this search, the hit signal 44 is detected from the output of the comparator 23.
When is output, the process moves to the invalidation process of step 901. In this step 901, the address
O is written to the valid bit of the corresponding column of array 10. On the other hand, if the cache search result in step 900 is a miss, the process is ended without going through step 901 for invalidation. This operation causes the write
Cache in the through area 3. The consistency of data in cache 4 and main memory 5 is maintained.
本発明は上記の実施例に限定されるものではなく、種々
の変形実施形態を採用することが可能である。The present invention is not limited to the above embodiments, and various modified embodiments can be adopted.
例えば、第2図において、プロセッサ1,2およびキャ
ッシュ3,4の数は2個に限定されるものでは無く、3
個以上接続してデータ処理能力を強化できることは言う
までもない。尚、第2図において、プロセッサ1とキャ
ッシュ3とは1個のマイクロコンピュータのチップ中に
形成され、プロセッサ2とキャッシュ4とは別のマイク
ロコンピュータのチップ中に形成されることも可能であ
る。さらには、第2図の全構成要素を1個のマイクロコ
ンピュータのチップの中に形成することも可能である。For example, in FIG. 2, the number of processors 1, 2 and caches 3, 4 is not limited to two, but three.
Needless to say, data processing capacity can be enhanced by connecting more than one. In FIG. 2, processor 1 and cache 3 are formed in one microcomputer chip, and processor 2 and cache 4 can be formed in another microcomputer chip. Furthermore, it is also possible to form all the components shown in FIG. 2 in one microcomputer chip.
本実施例では、整合性保証領域と整合性非保証領域を1
つのキャッシュメモリで扱っているが、キャッシュメモ
リを複数に分割し、独立にイネーブル、クリア、ローカ
ルに使用するか否かを制御可能とすれば、マルチタスク
処理への対応が可能になる。キャッシュメモリが複数ウ
ェイのセット・アソシアティブ方式の場合には、例えば
ウェイ別にこれらの制御を行なうことができる。その場
合、いくつかのウェイはローカル・メモリとして使用し
、残りは通常のキャッシュ・メモリとして使用する。タ
スク切り替え時には、オペレーティング・システムがこ
れらウェイ別の状態を待避し、異なるタスクが誤って同
じローカル・メモリを使用しないように管理する。タス
クの処理を再開するときには、待避しておいた情報を基
に、再びローカル・メモリの使用を可能にする。In this example, the consistency guaranteed area and consistency non-guaranteed area are set to 1.
However, if the cache memory is divided into multiple parts and it is possible to independently enable, clear, and control whether or not to use them locally, it becomes possible to handle multitasking. If the cache memory is of a set-associative type with multiple ways, these controls can be performed for each way, for example. In that case, some ways are used as local memory and the rest are used as regular cache memory. When switching tasks, the operating system saves the states of these ways and manages them so that different tasks do not accidentally use the same local memory. When resuming task processing, the local memory can be used again based on the saved information.
また本実施例では、整合性保証領域に対してはすべてラ
イト・スルー方式に採っているが、さらにこの領域をラ
イト・スルー方式で制御する領域とコピー・バック方式
で制御する領域に2分することが可能である。その場合
、領域判定回路は、整合性非保証領域、整合性保証領域
(コピー・バック領域)、整合性保証領域(ライト・ス
ルー領域)を区別し、その判定結果にしたがってキャッ
シュメモリが制御されることになる。そのようにすると
、複数プロセッサ間の共有データではあっても稀にした
他のデバイスによってアクセスされないデータを、コピ
ー・バック領域に置くことによってさらにメインメモリ
へのアクセスを減らすことができる。In addition, in this embodiment, the write-through method is used for all consistency guaranteed areas, but this area is further divided into an area controlled by the write-through method and an area controlled by the copy-back method. Is possible. In that case, the area determination circuit distinguishes between the consistency non-guaranteed area, the consistency guaranteed area (copy-back area), and the consistency guaranteed area (write-through area), and the cache memory is controlled according to the determination result. It turns out. In this way, accesses to the main memory can be further reduced by placing data that is shared among multiple processors but rarely accessed by other devices in the copy back area.
[従来の技術]
本発明によれば、高速アクセス可能なキャッシュメモリ
を、ローカルメモリとして使用するようにユーザーが設
定できる。その結果、平均データアクセス時間が短縮さ
れると共に、パストラフィックが減少し、システム性能
が向上する。[Prior Art] According to the present invention, a user can set a cache memory that can be accessed at high speed to be used as a local memory. As a result, average data access time is reduced, path traffic is reduced, and system performance is improved.
本発明の効果は、マルチプロセッサ・システムにおいて
、より顕著である。ローカルなメモリ空間へのアクセス
が、他のプロセッサのキャッシュの処理に影響を与えな
くできるため、システム性能が向上する。また、各プロ
セッサの使用するローカルな空間(整合性非保証領域)
はメモリ空間上で同じアドレスを指定することができる
ため、プログラムの共通化が図れる。The effects of the present invention are more noticeable in multiprocessor systems. System performance is improved because accesses to local memory space do not affect the cache processing of other processors. In addition, the local space used by each processor (consistency-unguaranteed area)
Since the same address can be specified in the memory space, programs can be standardized.
第1図は本発明の実施例によるキャッシュデバイスの内
部構成を示すブロックダイヤグラム、第2図は本発明の
実施例によるマルチプロセッサ・データ処理システムの
ブロックダイヤグラム、第3図は本発明の実施例による
メモリ・アクセスのアドレス・フィールドを示す図、第
4図は本発明の実施例によるキャッシュデバイス中の領
域判定回路のブロックダイヤグラム、第5図は第2図の
システムにおけるメインメモリの領域分割を示す図、第
6図は本発明の実施例によるキャッシュデバイス中のキ
ャッシュ制御回路のブロックダイヤグラム、第7図は本
発明の実施例によるマルチプロセッサ・データ処理シス
テムのリード動作を説明するフローチャート、第8図は
本発明の実施例によるマルチプロセッサ・データ処理シ
ステムのライト動作を説明するフローチャート、第9図
は本発明の実施例によるマルチプロセッサ・データ処理
システムの無効化動作を説明するフローチャートである
。
1.2・・・プロセッサ、3,4・・・キャッシュ、5
・・・メインメモリ、6・・・入呂カデバイス、7・・
・メモリバス、8,9・・・アドレス変換器、10.1
1・・・アドレスアレイ、12.13・・・データアレ
イ、14゜15・・・プロセッサ・キャッシュ間信号線
、14−1・・・データ線、14−2、アドレス線、1
4−3・・・制御線、30・・・領域判定フィールド(
プロセッサ)、31・・・領域判定信号(プロセッサ)
、45・・・領域判定信号(メインメモリ)、46・・
・領域判定フィールド(メインメモリ)、5o・・・上
限アドレスレジスタ、51・・・下限アドレスレジスタ
、52・・・大小比較器、120・・・ステートマシン
、η2[2]
!ti3 (2)
′fJ40
VI5 タ
Y z 口
5q 図
f37 口
猶 方 口FIG. 1 is a block diagram showing the internal configuration of a cache device according to an embodiment of the present invention, FIG. 2 is a block diagram of a multiprocessor data processing system according to an embodiment of the present invention, and FIG. 3 is a block diagram according to an embodiment of the present invention. FIG. 4 is a block diagram of an area determination circuit in a cache device according to an embodiment of the present invention; FIG. 5 is a diagram showing area division of main memory in the system of FIG. 2. , FIG. 6 is a block diagram of a cache control circuit in a cache device according to an embodiment of the present invention, FIG. 7 is a flowchart explaining a read operation of a multiprocessor data processing system according to an embodiment of the present invention, and FIG. 8 is a block diagram of a cache control circuit in a cache device according to an embodiment of the invention. FIG. 9 is a flowchart illustrating the write operation of the multiprocessor data processing system according to the embodiment of the present invention. FIG. 9 is a flowchart illustrating the invalidation operation of the multiprocessor data processing system according to the embodiment of the present invention. 1.2... Processor, 3, 4... Cache, 5
... Main memory, 6... Iroka device, 7...
・Memory bus, 8, 9...address converter, 10.1
1...Address array, 12.13...Data array, 14゜15...Processor-cache signal line, 14-1...Data line, 14-2, Address line, 1
4-3... Control line, 30... Area determination field (
processor), 31... area determination signal (processor)
, 45... area determination signal (main memory), 46...
- Area determination field (main memory), 5o... Upper limit address register, 51... Lower limit address register, 52... Size comparator, 120... State machine, η2[2]! ti3 (2) 'fJ40 VI5 TaY z 口5q Figure f37 口 口 口 口
Claims (1)
れる第1のキャッシュデバイスと、 (6)上記第2のプロセッサと上記バスとの間に結合さ
れる第2のキャッシュデバイスとを具備してなり、 上記メインメモリは上記第1のプロセッサ、上記第2の
プロセッサ、上記入出力デバイスによってライト・アク
セスされる共有領域と、上記第1または第2のプロセッ
サによってライト・アクセスされるプライベート領域と
に分割されてなり、 該第1と第2のキャッシュデバイスのそれぞれは、 (A)上記第1または第2のプロセッサから発生された
アドレスが上記共有領域または上記プライベート領域の
いずれかをアクセスすることを判定する領域判定回路と
、 (B)上記領域判定回路の出力に応答して上記キャッシ
ュデバイスおよび上記メインメモリへのデータ格納を制
御するキャッシュ制御回路とを有してなり、 上記第1または第2のプロセッサから発生されたアドレ
スが上記共有領域をアクセスする際に、上記キャッシュ
制御回路の出力は上記キャッシュデバイスにライト・ス
ルー方式又はコピー・バック方式によるデータ・ライト
動作を行なわせしめ、 上記第1または第2のプロセッサから発生されたアドレ
スが上記プライベート領域をアクセスする際に、上記キ
ャッシュ制御回路の出力は上記キャッシュデバイスをロ
ーカルメモリとして、データ・ライト動作を行なわせし
めることを特徴とするマルチプロセッサ・データ処理シ
ステム。 2、請求項1記載のマルチプロセッサ・データ処理シス
テムであって、 上記第2のプロセッサもしくは上記入出力デバイスが上
記メインメモリの上記共有領域のデータを書き換える際
に、上記第1のキャッシュデバイスの上記キャッシュ制
御回路は上記第1のキャッシュデバイスの上記共有領域
の格納データを無効化することを特徴とするマルチプロ
セッサ・データ処理システム。 3、アドレスを発生する第1と第2のプロセッサと、バ
スと、該バスに結合されたメインメモリと、該バスに結
合された入出力デバイスとを有し、上記メインメモリは
上記第1のプロセッサ、上記第2のプロセッサ、上記入
出力デバイスによってライト・アクセスされる共有領域
と、上記第1または第2のプロセッサによってライト・
アクセスされるプライベート領域とに分割されてなるマ
ルチプロセッサ・データ処理システム中に用いられるキ
ャッシュ装置であって、該キャッシュ装置は上記第1の
プロセッサと上記バスとの間に結合される第1のキャッ
シュデバイスと、上記第2のプロセッサと上記バスとの
間に結合される第2のキャッシュデバイスとからなり、 該第1と第2のキャッシュデバイスのそれぞれは (A)上記第1または第2のプロセッサから発生された
アドレスが上記共有領域または上記プライベート領域の
いずれかをアクセスすることを判定する領域判定回路と
、 (B)上記領域判定回路の出力に応答して上記キャッシ
ュデバイスおよび上記メインメモリへのデータ格納を制
御するキャッシュ制御回路とを有してなり、 上記第1または第2のプロセッサから発生されたアドレ
スが上記共有領域をアクセスする際に、上記キャッシュ
制御回路の出力は上記キャッシュデバイスにライト・ス
ルー方式もしくはコピー・バック方式によるデータ・ラ
イト動作を行なわせしめ、 上記第1または第2のプロセッサから発生されたアドレ
スが上記プライベート領域をアクセスする際に、上記キ
ャッシュ制御回路の出力は上記キャッシュデバイスにロ
ーカルメモリとしてのデータ・ライト動作を行なわせし
めることを特徴とするキャッシュ装置。 4、請求項3記載のキャッシュ装置であって、上記第2
のプロセッサもしくは上記入出力デバイスが上記メイン
メモリの上記共有領域のデータを書き換える際に、上記
第1のキャッシュデバイスの上記キャッシュ制御回路は
上記第1のキャッシュデバイスの上記共有領域の格納デ
ータを無効化することを特徴とするキャッシュ装置。[Claims] 1. A multiprocessor data processing system comprising: (1) first and second processors that generate addresses; (2) a bus; and (3) a main unit coupled to the bus. (4) an input/output device coupled to the bus; (5) a first cache device coupled between the first processor and the bus; (6) the second processor. and a second cache device coupled between the main memory and the bus, the main memory being a shared area that is write accessed by the first processor, the second processor, and the input/output device. and a private area that is write-accessed by the first or second processor, and each of the first and second cache devices is divided into: (A) a private area that is write-accessed by the first or second processor; an area determination circuit that determines whether the generated address accesses either the shared area or the private area; (B) data to the cache device and the main memory in response to the output of the area determination circuit; and a cache control circuit that controls storage, and when an address generated from the first or second processor accesses the shared area, the output of the cache control circuit is written to the cache device. A data write operation is performed using a through method or a copy back method, and when an address generated from the first or second processor accesses the private area, the output of the cache control circuit is used to write data to the cache device. A multiprocessor data processing system characterized by having data write operations performed as a local memory. 2. The multiprocessor data processing system according to claim 1, wherein when the second processor or the input/output device rewrites the data in the shared area of the main memory, the A multiprocessor data processing system, wherein a cache control circuit invalidates data stored in the shared area of the first cache device. 3. first and second processors that generate addresses; a bus; a main memory coupled to the bus; and an input/output device coupled to the bus; A shared area that is write accessed by a processor, the second processor, and the input/output device, and a shared area that is write accessed by the first or second processor.
A cache device for use in a multiprocessor data processing system comprising: a first cache coupled between the first processor and the bus; a second cache device coupled between the second processor and the bus, each of the first and second cache devices comprising: (A) a second cache device coupled between the second processor and the bus; (B) an area determination circuit that determines whether the address generated from the area accesses either the shared area or the private area; and a cache control circuit that controls data storage, and when an address generated from the first or second processor accesses the shared area, the output of the cache control circuit is written to the cache device. - A data write operation is performed using a through method or a copy back method, and when an address generated from the first or second processor accesses the private area, the output of the cache control circuit is transmitted to the cache device. A cache device characterized in that a cache device is configured to perform a data write operation as a local memory. 4. The cache device according to claim 3, wherein the second
When the processor or the input/output device rewrites data in the shared area of the main memory, the cache control circuit of the first cache device invalidates the data stored in the shared area of the first cache device. A cache device characterized by:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2302414A JPH04175946A (en) | 1990-11-09 | 1990-11-09 | Multiprocessor data processing system and cache device used therein |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2302414A JPH04175946A (en) | 1990-11-09 | 1990-11-09 | Multiprocessor data processing system and cache device used therein |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH04175946A true JPH04175946A (en) | 1992-06-23 |
Family
ID=17908637
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2302414A Pending JPH04175946A (en) | 1990-11-09 | 1990-11-09 | Multiprocessor data processing system and cache device used therein |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH04175946A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6253290B1 (en) | 1998-09-04 | 2001-06-26 | Mitsubishi Denki Kabushiki Kaisha | Multiprocessor system capable of circumventing write monitoring of cache memories |
| EP2634702A1 (en) | 2012-02-29 | 2013-09-04 | Fujitsu Limited | Processor, information processing apparatus, and arithmetic method |
| US8583872B2 (en) | 2007-12-28 | 2013-11-12 | Fujitsu Limited | Cache memory having sector function |
-
1990
- 1990-11-09 JP JP2302414A patent/JPH04175946A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6253290B1 (en) | 1998-09-04 | 2001-06-26 | Mitsubishi Denki Kabushiki Kaisha | Multiprocessor system capable of circumventing write monitoring of cache memories |
| US8583872B2 (en) | 2007-12-28 | 2013-11-12 | Fujitsu Limited | Cache memory having sector function |
| EP2634702A1 (en) | 2012-02-29 | 2013-09-04 | Fujitsu Limited | Processor, information processing apparatus, and arithmetic method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6092172A (en) | Data processor and data processing system having two translation lookaside buffers | |
| US4445174A (en) | Multiprocessing system including a shared cache | |
| JP3259969B2 (en) | Cache memory controller | |
| US5526509A (en) | Method and apparatus for controlling one or more hierarchical memories using a virtual storage scheme and physical to virtual address translation | |
| EP0408058B1 (en) | Microprocessor | |
| JPH0250237A (en) | Multi-processor data processing system and cache device using the same | |
| US5802574A (en) | Method and apparatus for quickly modifying cache state | |
| US5717894A (en) | Method and apparatus for reducing write cycle wait states in a non-zero wait state cache system | |
| JPH0519176B2 (en) | ||
| JPH0727492B2 (en) | Buffer storage | |
| JPH04175946A (en) | Multiprocessor data processing system and cache device used therein | |
| US6480940B1 (en) | Method of controlling cache memory in multiprocessor system and the multiprocessor system based on detection of predetermined software module | |
| JPH05216765A (en) | Hierarchical buffer storage device | |
| JP2580263B2 (en) | Buffer storage device | |
| JPH0736170B2 (en) | Multiprocessor system | |
| KR920005296B1 (en) | Information processing device | |
| JP3564343B2 (en) | Data transfer device and method during cache bypass | |
| JPH01217530A (en) | Cache memory | |
| JPH04205154A (en) | microprocessor system | |
| JPH02226447A (en) | Computer system and memory access therefor | |
| JPH04205535A (en) | Copy on write system | |
| JPH0237446A (en) | Cache control system | |
| JPH0336648A (en) | Electronic computer, TLB device and microprocessor chip | |
| JPH06124235A (en) | Cache control system | |
| JPH0775009B2 (en) | Cache memory that can be directly controlled |