JPH02224043A - Cache memory - Google Patents

Cache memory

Info

Publication number
JPH02224043A
JPH02224043A JP63289470A JP28947088A JPH02224043A JP H02224043 A JPH02224043 A JP H02224043A JP 63289470 A JP63289470 A JP 63289470A JP 28947088 A JP28947088 A JP 28947088A JP H02224043 A JPH02224043 A JP H02224043A
Authority
JP
Japan
Prior art keywords
cpu
memory
address
block
cache memory
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
JP63289470A
Other languages
Japanese (ja)
Inventor
Katsunori Uchida
内田 克典
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP63289470A priority Critical patent/JPH02224043A/en
Publication of JPH02224043A publication Critical patent/JPH02224043A/en
Pending legal-status Critical Current

Links

Landscapes

  • Static Random-Access Memory (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To improve the hit rate of a cache memory by enlarging a block size without deteriorating a throughput of a CPU and without adding a hardware of a buffer by using an address comparing circuit, a priority order control circuit and a dual port memory cell array. CONSTITUTION:EX-OR gates 71, 72 of an address comparing circuit 1 input CPU side block addresses 10, 11 and memory bus side block addresses 20, 21, respectively, and output a coincidence signal to an AND gate 73 when they coincide with each other. The AND gate 73 outputs a coincidence signal 51 only in the case when all the coincidence signals of the EX-OR gates 71, 72 are inputted. A priority order control circuit 2 outputs a word enable signal 52 to a decoder 4, unless the CPU side block addresses 10, 11 and the memory bus side block addresses 20, 21 coincide with each other. The decoder 4 activates a word line of a dual port memory cell array 3 only in the case when a word enable signal 52 is inputted. In such a way, the block size can be enlarged without allowing an access to wait.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はキャッシュメモリに関し、特にCPU側のアク
セスとメモリバス側アクセスの並行処理を行うキャッシ
ュメモリに関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a cache memory, and particularly to a cache memory that performs parallel processing of accesses on the CPU side and accesses on the memory bus side.

〔従来の技術〕[Conventional technology]

従来、シングルボートメモリセルを用いたキャッシュメ
モリでは、1つのアドレスに対するアクセスしか処理で
きないため、キャッシュミスによるメインメモリからの
キャッシュメモリの書き換えのためのライ■・アクセス
とCPUからのアクセスとを同時に処理することができ
ない。通常、CP Uアクセスがキャッシュミスすると
、CPUが要求しているデータをメインメモリに取りに
行き、キャッシュメモリの内容を書換えると同時にcp
uヘデータを渡す。
Conventionally, cache memory using single-boat memory cells can only process access to one address, so it is necessary to simultaneously process accesses from the main memory to rewrite the cache memory due to cache misses and accesses from the CPU. Can not do it. Normally, when a CPU access misses the cache, the CPU retrieves the requested data from the main memory, rewrites the contents of the cache memory, and at the same time
Pass the data to u.

ここでキャッシュのヒツト率を向上させるために用いら
れる手法として、キャッシュミスによるキャッシュメモ
リのN換え単位(以下ブロックサイズという)をCPU
バス暢の4倍程度(32ビツトCPUならば16バイト
)にすることがある、この時、キャッシュメモリとメイ
ンメモリとの間のバス幅よりブロックサイズが大きい場
合は、メインメモリからキャッシュメモリへの転送(以
下ブロックロードという)は何回かに分けて行なわれる
。例えば、ブロックサイズが16バイト2メモリバス幅
が32ビツトの場合、2回転送されるわけであるが、そ
の転送の度にキャッシュメモリの更新が行なわれるなめ
、従来のキャッシュメモリでは、その間cpuはキャッ
シュメモリをアクセスすることができなかった6通常、
メインメモリのアクセス・サイクルは、CPIJアクセ
ス・サイクルに比べ長い時間がかかるなめ、ブロックロ
ード中にCPUがアクセスできないということは、CP
Uのスループッ1−を低下させてしまう。
Here, as a method used to improve the cache hit rate, the unit of N replacement of cache memory due to cache miss (hereinafter referred to as block size) is
It may be about four times the bus width (16 bytes for a 32-bit CPU). At this time, if the block size is larger than the bus width between the cache memory and main memory, the bus width from the main memory to the cache memory may be Transfer (hereinafter referred to as block load) is performed in several steps. For example, if the block size is 16 bytes and the memory bus width is 32 bits, it will be transferred twice, but the cache memory is updated each time, so with conventional cache memory, the CPU is 6 Usually, the cache memory could not be accessed.
Main memory access cycles take longer than CPIJ access cycles, so the fact that the CPU cannot access during block loading means that the CPU
This reduces the throughput of U.

この問題に対するキャッシュメモリの・一つの解決法と
して、メインメモリとキャッシュメモリの間にブロック
ロードによって転送されたデータを保持するバッファ(
以下ブロックロードバッファという)を備え、ブロック
ロード中はそのバッフ・Tへ転送し、ブロックが全部揃
ったところで、キャッシュメモリの更新を行な・うとい
う手段がある。この方法によれば、ブロックロード中で
もブロックロードの終了時にキャッシュメモリの更新を
行なう時を除いて、CPUはキャッシュメモリをアクセ
スすることができる。
One cache memory solution to this problem is a buffer (between main memory and cache memory that holds data transferred by block load).
There is a method of providing a block load buffer (hereinafter referred to as a block load buffer), transferring blocks to the buffer T during block loading, and updating the cache memory when all blocks are completed. According to this method, the CPU can access the cache memory even during block loading, except when updating the cache memory at the end of block loading.

しか17、この方法でもバッファからキャッシュメモリ
の書換え時には、そのアドレスがCP tJアドレスと
一致しているか否かによらずCPUアクセスが待たされ
、またバッファも大量のハードウェアが要求される。例
えば、ブロックサイズ16バイトの場合、】28ビツト
・分のバッファが必要となる。
However, even with this method, when rewriting the cache memory from the buffer, CPU access is made to wait regardless of whether the address matches the CP tJ address, and the buffer also requires a large amount of hardware. For example, if the block size is 16 bytes, a buffer of ]28 bits is required.

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

上述した従来のキャッシュメモリは、シングルボーI・
メモリセルを採用しているため、CPU側のキャッシュ
メモリに対するアクセスと、メインメモリ側からのキャ
ッシュメモリの書換えのためのアクセスが異なるアドレ
スであっても同時に処理できないという欠点がある。ま
た、そのためにキャッシュのヒツト率を向上させようと
してブロックサイズを大きくすると、CPUのスルーブ
ツトが低下したり、バッファのハードウェアが必要とな
るという間がかある。
The conventional cache memory mentioned above is a single baud I/
Since memory cells are used, there is a drawback that access to the cache memory from the CPU side and access for rewriting the cache memory from the main memory side cannot be processed simultaneously even if they are at different addresses. Furthermore, if the block size is increased in an attempt to improve the cache hit rate, the throughput of the CPU may drop or buffer hardware may be required.

本発明の目的は、このような問題を除き、CPLJ側の
アクセスのアドレスとメモリバス側のアクセスのアドレ
スが異なる場合にはどちらのアクセスも待たせることな
く処理することができ、ブロックロードバッファを備え
なくともアクセスを待たせることなくブロックサイズを
大きくすることができるキャッシュメモリを提供するこ
とにある9 〔課題を解決するための手段〕 本発明のキャッシュメモリの構成は、CPU側のブロッ
クアト1/スとメモリバス側のブロックアドレスとを比
較し、これらが一致した時一致信号を出力する比較回路
と、この比較回路から2つのアト1/スが一致した場合
どちらか一方のアドレスのアクセスを優先させるイネー
ブル信号および残りの一方へは待ち合わせ中であること
を示すビジー信号を返す優先順位制御回路と、前記CP
U側のブロックアドレスおよび前記メモリバス側のブロ
ックアドレスとそれぞれ接続されいずれか一方に前記イ
ネーブル信号を接続した第1および第2のデコーダと、
これら第1および第2のデコーダとそれぞれ接続されか
つ前記CP tJ側データおよび前記メモリバス側デ・
−夕をそれぞれX、/O回路を介して接続したデュアル
ポート・・メモリセルアレイとを備えたことを特徴とす
る。
An object of the present invention is to eliminate such problems, and when the address of the access on the CPLJ side and the address of the access on the memory bus side are different, it is possible to process both accesses without making them wait, and to save the block load buffer. An object of the present invention is to provide a cache memory in which the block size can be increased without having to wait for access even if the block size is not made to wait. A comparator circuit that compares the block address on the memory bus side with the block address on the memory bus side and outputs a match signal when they match, and a comparison circuit that outputs a match signal when the two addresses match. a priority control circuit that returns an enable signal to give priority and a busy signal to the other one indicating that the CP is in a waiting state;
first and second decoders connected to the block address on the U side and the block address on the memory bus side, respectively, and having the enable signal connected to one of them;
The CP tJ side data and the memory bus side data are connected to these first and second decoders, respectively.
- A dual-port memory cell array in which ports are connected via X and /O circuits, respectively.

〔実施例〕〔Example〕

次に本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は本発明の一実施例のブロック図であり、本発明
に関係する部分のみを示している。
FIG. 1 is a block diagram of one embodiment of the present invention, showing only parts related to the present invention.

アドレス比較回路1は、E)I−ORゲート7」、72
、ANDゲー■・73から成っており゛、EX−ORゲ
ート−71,72はCPU側ブロックアドレスj、0.
1.1と、メモリバス側ブロツクアドレス20.21を
それぞれ入力し、一致していたらANDゲート73A、
一致信号を出力する。このANDゲート73はすべての
EX〜ORゲート71.72の一致信号を入力した場合
にのみ一致信号5〕、を出力する。
Address comparison circuit 1 includes E) I-OR gate 7'', 72
, AND gate 73, and EX-OR gates 71 and 72 are CPU side block addresses j, 0 .
1.1 and memory bus side block address 20.21 respectively, and if they match, AND gate 73A,
Outputs a match signal. This AND gate 73 outputs a match signal 5] only when the match signals from all EX to OR gates 71 and 72 are input.

優先順位制御回路2は、CPU側ブロツクアドレス/O
.11と、メモリ・バス側ブロツクアドレス20.21
が一致していなければ8ワ一ドイネーブル信号52をデ
コーダ4に出力する。−・致していた場合には、ビジー
信号53をCPUへ出力する。デコーダ4はワードイネ
ーブル信号52が入力された場合のみデュアルボー1−
メモリセルアレイ3のワード線を活性化する。デコーダ
5はメモリバス側ブロツクアドレスを入力しデュアルポ
ートメモリセルアレイ3のワード線な活性化する。I/
O回路6はCPU側ではCPUデータをデュアルポート
メモリアレイ3に入出力し、メモリバス側ではメインメ
モリからのデータを入力し、デュアルボーI・メモリア
レイ3に書キ込む。
The priority control circuit 2 controls the CPU side block address /O
.. 11 and memory bus side block address 20.21
If they do not match, an 8-word enable signal 52 is output to the decoder 4. - If it is, output a busy signal 53 to the CPU. The decoder 4 deactivates the dual baud 1-only when the word enable signal 52 is input.
The word line of memory cell array 3 is activated. The decoder 5 inputs the memory bus side block address and activates the word line of the dual port memory cell array 3. I/
The O circuit 6 inputs and outputs CPU data to the dual port memory array 3 on the CPU side, and inputs data from the main memory on the memory bus side and writes it to the dual port I memory array 3.

なお、ブロックアト1ノスとは、キャッシュミスによる
キャッシュメモリの内容の書換え単位であるブロックを
示すアドレスのことである。
Note that the block at 1 nos is an address indicating a block that is a unit of rewriting the contents of the cache memory due to a cache miss.

本実施例によれば、CPU側のアクセスのアト1/スど
メモリバス側アクセスの7′ドレスが異なる場合にはど
ちらのアクセスも待たせることなく処理することができ
、従・って、ブロックロードバッファを備えなくともC
PUのキャッシュメモリへのアクセスを待たせることな
くブロック・サイズを大きくすることができる8 ただし1、デュアルポート・メモリセルでも同一アドレ
スでのリードとライトまたはライトとライトの同時アク
セスはできないため、同一アドレスでの同時アクセス時
のみCPU側アクセスを待たせることになる。
According to this embodiment, when the addresses of the CPU-side access (at 1/st) and the memory bus-side access (7') are different, both accesses can be processed without making the block wait. C even without a load buffer
The block size can be increased without having to wait for access to the PU's cache memory. Accesses on the CPU side are made to wait only when simultaneous accesses are made to addresses.

第2図は本発明の第2の実施例のブロック図である。E
X−ORゲーt−74,75はCPU倶1ワ・−ドアド
レス30.31と、メモリバス側ワードアドレス40.
41をそれぞれ比較しANDゲ・−ドア3に出力する。
FIG. 2 is a block diagram of a second embodiment of the invention. E
The X-OR gates t-74 and t-75 are connected to the CPU side word address 30.31 and the memory bus side word address 40.31.
41 and output to the AND game door 3.

この実施例では、CPU側のブロックアドレス]−o、
i1と、メモリバス側ブロツクアドレス20.21とが
一致し、かつCP tJ側側御−ドアドレス3031と
メモリバス側ワードアドレス40.42とが一致した場
合のみ、CPU側のアクセスを待たせるため、第1の実
施例に比べてCPIJのスルーブッI−の低下を抑える
という利点がある。なお、ワードアドレスとは、ブロッ
クアドレスhi示すキャッシュメモリの書換え単位のブ
ロック内でのCPUのワード単位を示すアドレスである
In this embodiment, the block address on the CPU side ]-o,
In order to make the access on the CPU side wait only when i1 matches the block address 20.21 on the memory bus side, and when the control address 3031 on the CP tJ side matches the word address 40.42 on the memory bus side. , this embodiment has the advantage of suppressing a decrease in CPIJ throughput I- compared to the first embodiment. Note that the word address is an address indicating a word unit of the CPU within a block of rewriting units of the cache memory indicated by the block address hi.

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

以上説明したように本発明は、アドレス比較回路、優先
順位制御回路、デュアルポートメモリセルアレイを用い
ることにより、C13Uのスルーブツトを低下させたり
、バッファのハードウェアを追加することなく、ブロッ
クサイズを太きくしてキャッシュメモリのヒラ1−率を
向上、させることができるという効果がある。
As explained above, the present invention uses an address comparison circuit, a priority control circuit, and a dual-port memory cell array to increase the block size without reducing the throughput of the C13U or adding buffer hardware. This has the effect of improving the fill rate of the cache memory.

第1図、第2図は本発明の第1および第2の実施例のブ
ロック図である。
1 and 2 are block diagrams of first and second embodiments of the present invention.

1・・・アドレス比較回路、2・・・優先順位制御回路
、3・・・デュアルポートメモリセルアレイ、4゜5・
・・デコーダ、6・・・I/O回路、/O.11・・・
CPU側ブロツクアドレス、20.21・・・メモリバ
ス側プロ゛ツクアドレス、30.31・・・CP IJ
側側御−ドアドレス40.41・・・メモリバス側ワー
ドアト1/・ス、51・・・アドレス比較回路出力線、
52.53・・・優先順位制御回路出力線、61・・・
CPUデータ、62・・・メモリバス側データ、71,
72.74.75・・・EXORゲー1−573・・・
ANDゲート、81,82.84.85・・・EX−O
Rゲート出力線。
DESCRIPTION OF SYMBOLS 1... Address comparison circuit, 2... Priority control circuit, 3... Dual port memory cell array, 4゜5.
...Decoder, 6...I/O circuit, /O. 11...
CPU side block address, 20.21...Memory bus side block address, 30.31...CP IJ
Side control address 40.41...Memory bus side word address 1/...S, 51...Address comparison circuit output line,
52.53...Priority control circuit output line, 61...
CPU data, 62...Memory bus side data, 71,
72.74.75...EXOR game 1-573...
AND gate, 81, 82.84.85...EX-O
R gate output line.

代理人 弁理士  内 原  晋Agent Patent Attorney Susumu Uchihara

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

刀 閃 ん ? 図 sword flash yeah ? figure

Claims (1)

【特許請求の範囲】[Claims] CPU側のブロックアドレスとメモリバス側のブロック
アドレスとを比較し、これらが一致した時一致信号を出
力する比較回路と、この比較回路から2つのアドレスが
一致した場合どちらか一方のアドレスのアクセスを優先
させるイネーブル信号および残りの一方へは待ち合わせ
中であることを示すビジー信号を返す優先順位制御回路
と、前記CPU側のブロックアドレスおよび前記メモリ
バス側のブロックアドレスとそれぞれ接続されいずれか
一方に前記イネーブル信号を接続した第1および第2の
デコーダと、これら第1および第2のデコーダとそれぞ
れ接続されかつ前記CPU側データおよび前記メモリバ
ス側データをそれぞれI/O回路を介して接続したデュ
アルポート・メモリセルアレイとを備えたことを特徴と
するキャッシュメモリ。
A comparison circuit that compares the block address on the CPU side and a block address on the memory bus side and outputs a match signal when they match, and a comparison circuit that outputs a match signal when the two addresses match, and a comparison circuit that controls access to either address when the two addresses match. A priority control circuit that returns an enable signal to be prioritized and a busy signal indicating that it is waiting to the other one, and a block address on the CPU side and a block address on the memory bus side, each connected to one of the first and second decoders to which an enable signal is connected; and a dual port connected to the first and second decoders, respectively, and to the CPU side data and the memory bus side data via I/O circuits. - A cache memory characterized by comprising a memory cell array.
JP63289470A 1988-11-15 1988-11-15 Cache memory Pending JPH02224043A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63289470A JPH02224043A (en) 1988-11-15 1988-11-15 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63289470A JPH02224043A (en) 1988-11-15 1988-11-15 Cache memory

Publications (1)

Publication Number Publication Date
JPH02224043A true JPH02224043A (en) 1990-09-06

Family

ID=17743693

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63289470A Pending JPH02224043A (en) 1988-11-15 1988-11-15 Cache memory

Country Status (1)

Country Link
JP (1) JPH02224043A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09152989A (en) * 1995-11-29 1997-06-10 Nec Corp Data cache memory system
US6507894B1 (en) 1998-12-10 2003-01-14 Nec Corporation Information processing apparatus and process

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54118739A (en) * 1978-03-07 1979-09-14 Ibm Cash memory control system
JPS63223846A (en) * 1987-03-12 1988-09-19 Matsushita Electric Ind Co Ltd Cache memory
JPS63240651A (en) * 1987-03-28 1988-10-06 Nec Corp Cache memory
JPS63260006A (en) * 1987-04-16 1988-10-27 Nippon Ferrite Ltd High density magnetic material

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54118739A (en) * 1978-03-07 1979-09-14 Ibm Cash memory control system
JPS63223846A (en) * 1987-03-12 1988-09-19 Matsushita Electric Ind Co Ltd Cache memory
JPS63240651A (en) * 1987-03-28 1988-10-06 Nec Corp Cache memory
JPS63260006A (en) * 1987-04-16 1988-10-27 Nippon Ferrite Ltd High density magnetic material

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09152989A (en) * 1995-11-29 1997-06-10 Nec Corp Data cache memory system
US6507894B1 (en) 1998-12-10 2003-01-14 Nec Corporation Information processing apparatus and process

Similar Documents

Publication Publication Date Title
US6192458B1 (en) High performance cache directory addressing scheme for variable cache sizes utilizing associativity
JP4829541B2 (en) Digital data processing apparatus with multi-level register file
EP0491697B1 (en) Apparatus and method for maintaining cache/main memory consistency
JPH0756815A (en) Cache operating method and cache
US6157980A (en) Cache directory addressing scheme for variable cache sizes
JPS62262160A (en) Writing buffer unit
JPH02227768A (en) Data processing system
US4658356A (en) Control system for updating a change bit
JPH06318174A (en) Cache memory system and method for performing cache for subset of data stored in main memory
EP0418621B1 (en) Data processing device for maintaining coherency of data stored in main memory, external cache memory and internal cache memory
US5557622A (en) Method and apparatus for parity generation
JPH02224043A (en) Cache memory
JP3381079B2 (en) Exclusive control system using cache memory
JPS60123952A (en) Input-output controlling system
JPH06274462A (en) Asynchronous writing system for shared memory
JPH02110646A (en) Pre-readout device for memory
US5737755A (en) System level mechanism for invalidating data stored in the external cache of a processor in a computer system
JP3465362B2 (en) Data processing device having cache memory
JP3074897B2 (en) Memory circuit
JPH0793215A (en) Semiconductor memory
JPH04123151A (en) System bus
JPH02307123A (en) Computer
JP3436497B2 (en) Memory access circuit
JPH1091571A (en) Method for detecting chain removal for dma controller and dma controller
JPH06222989A (en) Copy-back cache tag memory