JPH11272551A - Flash control system for cache memory and cache memory - Google Patents

Flash control system for cache memory and cache memory

Info

Publication number
JPH11272551A
JPH11272551A JP10070410A JP7041098A JPH11272551A JP H11272551 A JPH11272551 A JP H11272551A JP 10070410 A JP10070410 A JP 10070410A JP 7041098 A JP7041098 A JP 7041098A JP H11272551 A JPH11272551 A JP H11272551A
Authority
JP
Japan
Prior art keywords
cache memory
flash
cache
request
processing
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
JP10070410A
Other languages
Japanese (ja)
Inventor
Shuji Kikuchi
修司 菊地
Katsunori Hirano
克典 平野
Tadanobu Toba
忠信 鳥羽
Satoshi Muraoka
諭 村岡
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP10070410A priority Critical patent/JPH11272551A/en
Publication of JPH11272551A publication Critical patent/JPH11272551A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To avoid a bus time out error by dividing a cache memory into a plurality of small sections, returning control to cache control logic whenever the flashing of the small sections completes, processing a bus operation which is held and continuing a flashing operation on the next small section. SOLUTION: Flash control logic is divided into two hierarchies. Low-order control logic controls a flashing processing in individual small sections and high-order control logic monitors low-order control logic until the flashing processing of all cache memory areas completes. Cache control logic 14-1 gives a signal permitting the flashing processing to flash low-order control logic 14-4 at the timing of the good punctuation of a bus operation. Flash low-order control logic 14-4 executes the flashing processing of the small section. When the processing on one small section completes, cache control logic 14-1 starts the bus operation which is held with the notice of a processing termination signal 25.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、コンピュータシス
テムにおいてメモリへのアクセスを見かけ上高速化する
キャッシュの制御方式に係り、特に、キャッシュメモリ
に格納された最新のデータを主メモリ(主記憶)に書き
戻す際の制御方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache control method for apparently speeding up access to a memory in a computer system, and more particularly, to storing the latest data stored in the cache memory in a main memory (main memory). It relates to a control method when writing back.

【0002】[0002]

【従来の技術】まず、キャッシュメモリの一般的な方式
について説明した後、キャッシュから主メモリ(主記
憶)への書き戻しを一括して行うフラッシュ処理の一般
形態について説明する。
2. Description of the Related Art First, a general method of a cache memory will be described, and then a general form of flash processing for collectively writing back data from a cache to a main memory (main memory) will be described.

【0003】図2に、キャッシュメモリにおけるエント
リの状態を示す。初期状態においてキャッシュメモリ1
には何も入っていず、各エントリは無効(Invali
d)状態3にある。プロセッサがアクセス要求を出した
アドレスに該当するエントリが、キャッシュ内に見つか
らない場合(キャッシュミス)、主記憶2から該当する
アドレスのデータをキャッシュ内に取込み(リードI
N)、そのエントリを有効(Valid)状態4とす
る。Valid状態4では、キャッシュエントリの内容
と主記憶2の内容とは一致している。図2の例では、ア
ドレス207に対応するエントリが有効状態(V)4に
あり、主記憶2のデータ5678と一致している。
FIG. 2 shows a state of an entry in a cache memory. Cache memory 1 in the initial state
Is empty, and each entry is invalid (Invali
d) In state 3. If the entry corresponding to the address to which the processor has issued the access request is not found in the cache (cache miss), the data at the corresponding address is fetched from the main memory 2 into the cache (read I).
N), the entry is set to a valid state 4. In the valid state 4, the contents of the cache entry and the contents of the main memory 2 match. In the example of FIG. 2, the entry corresponding to the address 207 is in the valid state (V) 4 and matches the data 5678 in the main memory 2.

【0004】本発明で対象としているライトバック方式
のキャッシュの場合、プロセッサからのライトアクセス
がキャッシュ内の有効なエントリにヒットすると、キャ
ッシュ内のエントリのみを更新して、主記憶内のデータ
は更新しないため、キャッシュ1と主記憶2との間で内
容の不一致が生じる。このようなエントリは、変更(M
odified)状態5にあり、最新のデータはキャッ
シュ1にのみ存在する。図2の例では、アドレス541
に対応するエントリが変更(M)状態5にあり、データ
4871がこのアドレスの最新データである。このと
き、主記憶2には古いデータ3729があり、キャッシ
ュ内容とは不一致状態にある。
In the case of the write-back type cache targeted by the present invention, when a write access from the processor hits a valid entry in the cache, only the entry in the cache is updated and the data in the main memory is updated. Therefore, there is a mismatch between the contents of the cache 1 and the main memory 2. Such an entry is modified (M
modified state 5, and the latest data exists only in the cache 1. In the example of FIG.
Is in the change (M) state 5, and the data 4871 is the latest data at this address. At this time, the main memory 2 has old data 3729, and is in a state of being inconsistent with the cache contents.

【0005】キャッシュメモリにおけるフラッシュ処理
とは、キャッシュ内の各エントリに関し、変更(Mod
ified)状態5となった内容を主記憶1に書き戻し
てデータを一致させ、エントリ状態を有効(Vali
d)状態4に戻す処理を言う。
[0005] Flush processing in the cache memory refers to a change (Mod) for each entry in the cache.
(ifified) state 5 is written back to the main memory 1 so that the data matches, and the entry state is valid (Vali).
d) A process for returning to the state 4.

【0006】図3に、ダイレクトマップ方式の簡単なキ
ャッシュ構成例を示す。キャッシュ1内の各エントリ
は、アドレスタグ11とデータ12そしてエントリ状態
を示すビット13−1から構成される。この例では、簡
単のために、16ビットアドレスを持つ16ビットデー
タのアドレス空間を想定し、256エントリのダイレク
トマップ方式について示している。ダイレクトマップ方
式のため、各データは下位のアドレスビット値7−3に
よって、格納されるエントリ位置が決定される。アドレ
スタグとして、上位のアドレスビット7−2が用いられ
る。
FIG. 3 shows an example of a simple cache configuration of the direct map system. Each entry in the cache 1 includes an address tag 11, data 12, and a bit 13-1 indicating an entry state. In this example, for the sake of simplicity, an address space of 16-bit data having a 16-bit address is assumed, and a direct mapping method of 256 entries is shown. Because of the direct map method, the entry position where each data is stored is determined by the lower address bit value 7-3. The upper address bit 7-2 is used as the address tag.

【0007】あるアドレスに対するリードアクセスがあ
った場合、キャッシュ1は、下位のアドレスビット7−
3で指定されるエントリ位置を読み出し、格納されてい
るアドレスタグ11とアクセス要求のあったアドレス上
位ビット7−2との比較を行うと共に、エントリから読
み出された状態ビット13−1を判定する。
When a read access is made to a certain address, the cache 1 stores the lower address bits 7-
3 is read, the stored address tag 11 is compared with the upper address bit 7-2 for which the access was requested, and the status bit 13-1 read from the entry is determined. .

【0008】状態が有効(V)あるいは変更(M)であ
り、かつアドレスタグ(11、7−2)が一致している
場合、このアクセスはキャッシュ1にヒットし、キャッ
シュエントリから取り出したデータ12を、リードデー
タとしてデータバス6に送出する。リードアクセス時に
読み出したエントリ状態が無効(I)であった場合はリ
ードミスであり、キャッシュは、このアクセスアドレス
の上位ビット7−2をアドレスタグとしてエントリに新
規登録すると共に、主記憶から供給されるリードデータ
6を有効状態(V)としてこのエントリに書き込む。
If the status is valid (V) or changed (M) and the address tags (11, 7-2) match, this access hits the cache 1 and the data 12 Is transmitted to the data bus 6 as read data. If the entry status read at the time of read access is invalid (I), it is a read miss, and the cache newly registers the upper bit 7-2 of the access address as an address tag in the entry and is supplied from the main memory. The read data 6 is written to this entry as a valid state (V).

【0009】有効状態(V)のエントリに対するライト
ヒットがあった場合、キャッシュは、エントリに格納さ
れていたデータにライトデータ6を上書きすると共に、
状態ビットを有効(V)から変更(M)に更新する。
When there is a write hit for an entry in the valid state (V), the cache overwrites the data stored in the entry with the write data 6 and
Update the status bits from valid (V) to changed (M).

【0010】通常、キャッシュは、エントリのアクセス
を与えられたアドレスの下位ビット7−3を用いて行う
が、フラッシュ処理要求があった場合は、内部のアドレ
スカウンタ8に切り替えて全エントリを次々と読み出し
ながらフラッシュを行う。
Normally, the cache performs entry access using the lower bits 7-3 of the given address. However, when there is a flush processing request, the cache is switched to the internal address counter 8 and all entries are successively read. Flash is performed while reading.

【0011】図4に、フラッシュ処理時の制御フローを
示す。フラッシュ要求があった場合、キャッシュは全エ
ントリを走査しながら、「変更(M)状態」のものが検
出される度に主記憶への書き戻しを行い、順次、主記憶
との不一致を解消する。
FIG. 4 shows a control flow during the flash processing. When there is a flush request, the cache scans all entries, writes back to the main memory every time a "change (M) state" is detected, and sequentially eliminates inconsistencies with the main memory. .

【0012】これを実現するために、図4に示すよう
に、フラッシュ要求時にキャッシュアクセスは、図3の
SEL1セレクタ9−1により内部アドレスカウンタ8
側に切り替えると共に、このカウンタ(フラッシュアド
レス)の初期値として0を代入する。以降、キャッシュ
メモリの全領域にわたり、個々のエントリについてフラ
ッシュ処理を行う。まず、フラッシュアドレスに対応し
たキャッシュエントリをアクセスする。このエントリが
「変更(M)状態」になければ、フラッシュアドレスを
インクリメントして次のエントリへと進む。一方、読み
出したエントリが「変更(M)状態」であった場合は、
ストアバッファ16を経由して主記憶2に書き戻すこと
によりデータを一致させ、エントリ状態を「有効
(V)」に更新する。そして、フラッシュアドレス8を
インクリメントし、最終エントリまで同様の処理を繰り
返す。
To realize this, as shown in FIG. 4, a cache access at the time of a flush request is performed by the internal address counter 8 by the SEL1 selector 9-1 of FIG.
Side, and 0 is substituted as the initial value of this counter (flash address). Thereafter, flush processing is performed for each entry over the entire area of the cache memory. First, the cache entry corresponding to the flash address is accessed. If this entry is not in the "change (M) state", the flash address is incremented and the process proceeds to the next entry. On the other hand, if the read entry is in the “changed (M) state”,
The data is matched by writing back to the main memory 2 via the store buffer 16, and the entry state is updated to "valid (V)". Then, the flash address 8 is incremented, and the same processing is repeated until the last entry.

【0013】[0013]

【発明が解決しようとする課題】図5は、キャッシュメ
モリ回りのバス構成とキャッシュの通常動作モードを示
している。キャッシュ制御回路42は、プロセッサバス
41を介してCPU40と接続される一方、メインバス
45を介して主記憶44およびI/O側とのインタフェ
ース46に接続されている。ここで、キャッシュ制御回
路42は、プロセッサ(CPU)40およびI/O側か
らのアクセス要求の双方に対応しなければならない。こ
れらのアクセス要求は、データの流れの点から主に次の
4つに分類することができる。
FIG. 5 shows a bus configuration around a cache memory and a normal operation mode of the cache. The cache control circuit 42 is connected to the CPU 40 via the processor bus 41, while being connected to the main memory 44 and the interface 46 with the I / O side via the main bus 45. Here, the cache control circuit 42 must respond to both access requests from the processor (CPU) 40 and the I / O side. These access requests can be mainly classified into the following four from the point of data flow.

【0014】プロセッサからのキャッシュヒットアク
セス プロセッサ40とキャッシュ43間でのデータ転送のみ
で処理を完了する。メインバス45へはトランザクショ
ンを伝達しない。
Cache hit access from processor The processing is completed only by data transfer between the processor 40 and the cache 43. No transaction is transmitted to the main bus 45.

【0015】プロセッサからのキャッシュミスアクセ
ス メインバス45へトランザクションを伝達し、主記憶4
4から該当アドレスを読み出す。リードミスの場合は、
主記憶44からのデータをプロセッサバス41へ転送す
ると同時に、キャッシュメモリ43に取り込んで新規に
エントリに登録する。ライトミスの場合は、主記憶44
からのデータをキャッシュメモリ43に取り込んだ後、
プロセッサ40からのライトデータを上書きする。キャ
ッシュミスを起こしたエントリに別のアドレスが「変更
(M)」状態で登録されていた場合は、これを主記憶4
4に書き戻す。
A cache miss access from the processor A transaction is transmitted to the main bus 45 and the main memory 4
4 and the corresponding address is read. In case of a read mistake,
At the same time as transferring data from the main memory 44 to the processor bus 41, the data is taken into the cache memory 43 and newly registered in the entry. In the case of a write error, the main memory 44
From the cache memory 43,
The write data from the processor 40 is overwritten. If another address is registered in the “changed (M)” state in the entry in which the cache miss has occurred, this address is stored in the main memory 4.
Write back to 4.

【0016】プロセッサからのI/O空間へのアクセ
ス メインバス45へトランザクションを伝達する。この空
間はキャッシュ禁止の空間であり、キャッシュメモリ4
3へのアクセスは行われない。
Access to I / O space from processor Transmits transaction to main bus 45. This space is a cache-prohibited space, and the cache memory 4
No access to 3 is made.

【0017】I/O側からのDMA(Direct Memory
Access)アクセス メインバス45のバス権は通常、キャッシュ制御回路4
2にある。I/O側47からメモリにDMAアクセスす
る場合は、まず、キャッシュ制御回路に対してバス権を
要求し、メインバス45へのアクセス権を獲得しなけれ
ばならない。バス権が許可された後、I/O側(46、
47)からメインバス45へアクセスするが、同時に、
キャッシュメモリ43に対してスヌープを行い、該当す
るアドレスのエントリおよびその状態が検査される。こ
こで「変更(M)状態」のエントリにスヌープリードヒ
ットした場合、主記憶44には最新のデータが無いた
め、主記憶44の読み出しを中止させて、キャッシュメ
モリ43からI/O側46へ最新のデータを供給する。
キャッシュ43にスヌープヒットした場合でもエントリ
が「有効(V)」状態であれば、主記憶44のデータは
最新データであることが保証されるため、キャッシュ4
3ではなく主記憶44からデータを供給する。
DMA (Direct Memory) from the I / O side
Access) Access The bus right of the main bus 45 is normally
There are two. When performing DMA access to the memory from the I / O side 47, first, a bus right must be requested to the cache control circuit to obtain an access right to the main bus 45. After the bus right is granted, the I / O side (46,
47) accesses the main bus 45, but at the same time,
A snoop is performed on the cache memory 43, and the entry at the corresponding address and its state are inspected. Here, when a snoop read hit occurs in the entry of the “change (M) state”, since there is no latest data in the main memory 44, the reading of the main memory 44 is stopped and the cache memory 43 transfers the data to the I / O side 46. Supply the latest data.
Even if a snoop hit occurs in the cache 43, if the entry is in the “valid (V)” state, the data in the main memory 44 is guaranteed to be the latest data.
The data is supplied from the main memory 44 instead of 3.

【0018】以上が、通常の動作であるが、キャッシュ
がフラッシュ処理を行っている間、双方のバスからのア
クセスは保留となり、フラッシュ処理が完了するまで待
たされる。図6にこの状態を示す。フラッシュ処理が開
始されると、キャッシュ制御回路42は、CPU40か
らのアクセスに対するアクノリッジ信号の返送を保留に
して、フラッシュ処理が完了するまでプロセッサバスサ
イクルを延長する。また、フラッシュ処理中にI/O側
からDMAのためのバス権要求があっても、フラッシュ
完了までバス権を許可することなく、実質的にI/O側
からメインバス45へのアクセスを禁止する。この状態
でキャッシュ制御回路42は、全てのキャッシュエント
リを順次アクセスして、「変更(M)」状態のものがあ
れば主記憶44への書き戻しを行い「有効(V)」状態
にする。
The above is the normal operation. While the cache is performing the flushing process, the access from both buses is suspended, and the process waits until the flushing process is completed. FIG. 6 shows this state. When the flush process is started, the cache control circuit 42 suspends the return of the acknowledge signal for the access from the CPU 40, and extends the processor bus cycle until the flush process is completed. Also, even if a bus right request for DMA is issued from the I / O side during the flash processing, access to the main bus 45 from the I / O side is substantially prohibited without granting the bus right until the flash is completed. I do. In this state, the cache control circuit 42 sequentially accesses all the cache entries, and if there is one in the “change (M)” state, writes back to the main memory 44 to set it to the “valid (V)” state.

【0019】このように、フラッシュ処理中は、CPU
40から見れば、バスにアクセス要求を出しても無応答
状態が長時間続くことになる。同様にI/O側にとって
も、バス権を要求する信号に対して無応答状態が長く続
くことになる。
As described above, during the flash processing, the CPU
From the point of view of 40, the non-response state continues for a long time even if an access request is issued to the bus. Similarly, on the I / O side, a non-response state for a signal requesting the bus right continues for a long time.

【0020】先の例では図の簡単化のために256エン
トリのキャッシュ構成を示したが、一般にエントリ数は
数万から数百万のオーダである。ここで仮に64Kのエ
ントリ数があるとし、各エントリには32バイトのデー
タが格納されており、これをCPUクロック(100M
Hzとする)の1/2の周波数クロックをベースとして
動作するメインバスを介し主記憶に書き戻すのに、各エ
ントリあたり20クロック(CPUクロック)を要する
とする。全エントリの80%が変更(M)状態にあった
とすれば、フラッシュ処理におよそ10msの時間を要
することになる。この間、CPUおよびI/Oにとって
バスの無応答状態が続き、キャッシュが大容量になれば
なる程、バスタイムアウトエラー発生の原因となる。
In the above example, a cache configuration of 256 entries is shown for simplification of the drawing, but the number of entries is generally on the order of tens of thousands to several millions. Here, it is assumed that there are 64K entries, and each entry stores 32 bytes of data.
It is assumed that 20 clocks (CPU clocks) are required for each entry to write back to the main memory via a main bus that operates on the basis of a half frequency clock (assumed to be Hz). Assuming that 80% of all entries are in the changed (M) state, the flash processing takes about 10 ms. During this time, the CPU and the I / O keep the bus unresponsive, and the larger the cache capacity, the more the bus timeout error occurs.

【0021】このような問題に対し、従来、例えば特開
平8−44626号公報(「キャッシュシステムのフラ
ッシュサイクル制御方法」)に示されるように、キャッ
シュの各エントリの状態検索を高速化することで、回避
することが行われていた。しかし、このような方法によ
っても、キャッシュメモリの大容量化が進むと共に、例
えばほとんどのキャッシュエントリが変更状態にあって
主記憶への書き戻しが必要な場合など、キャッシュがバ
スを長時間独占することになり、上記問題の本質的な解
決にはならない。
In order to solve such a problem, conventionally, as disclosed in Japanese Patent Application Laid-Open No. Hei 8-44626 ("a flush cycle control method for a cache system"), the state search of each entry of the cache is speeded up. Had been done, to avoid. However, even with such a method, the capacity of the cache memory is increased, and the cache monopolizes the bus for a long time, for example, when most of the cache entries are in a changed state and need to be written back to the main memory. As a result, the above problem is not essentially solved.

【0022】本発明は、キャッシュメモリが大容量化し
ても、長時間バスを独占状態にせずにフラッシュ処理が
可能な制御方式を提供することを目的としている。
An object of the present invention is to provide a control method capable of performing flash processing without keeping the bus in an exclusive state for a long time even when the cache memory has a large capacity.

【0023】[0023]

【課題を解決するための手段】図7および図8に、従来
のキャッシュ制御論理とフラッシュ制御論理との関係お
よびその動作を示し、まず上記問題点の原因を明らかに
する。フラッシュ開始の指示20はキャッシュ制御論理
14−1に与えられる。キャッシュ制御論理14−1
は、フラッシュ指示20が与えられると、プロセッサバ
スおよびメインバス動作の区切りの良いタイミングで、
フラッシュ処理開始信号21によりフラッシュ制御論理
14−2に制御を移す。ここで、フラッシュ制御論理1
4−2はフラッシュ処理28を開始し、一方のキャッシ
ュ制御論理は、バスからのアクセス要求があっても動作
を開始することなくフラッシュ処理完了信号22が返送
されるまでバス動作を保留にする。フラッシュ処理28
が完了するとフラッシュ制御論理14−2からキャッシ
ュ制御論理14−1にフラッシュ処理完了信号22が返
され、キャッシュ制御論理14−1は保留していたバス
動作を開始する。
FIG. 7 and FIG. 8 show the relationship between the conventional cache control logic and the flash control logic and the operation thereof, and first clarify the cause of the above problem. The flush start instruction 20 is given to the cache control logic 14-1. Cache control logic 14-1
When the flash instruction 20 is given, the timing at which the operation of the processor bus and the main bus is well separated is
The control is transferred to the flash control logic 14-2 by the flash processing start signal 21. Here, flash control logic 1
4-2 starts the flash processing 28, and one cache control logic suspends the bus operation until the flash processing completion signal 22 is returned without starting the operation even when an access request from the bus is issued. Flash processing 28
Is completed, the flush control completion signal 22 is returned from the flush control logic 14-2 to the cache control logic 14-1, and the cache control logic 14-1 starts the bus operation which has been suspended.

【0024】ここで、バスタイムアウトの問題となるの
は、フラッシュ処理28を行っている間、無応答状態で
バスがホールドされる時間長である。フラッシュ処理2
8に要する時間は、主記憶およびメインバスの動作速度
によって制約されるため、全処理に要する時間長を短縮
することはできない。
Here, the problem of the bus timeout is the length of time during which the bus is held in a non-response state during the flush processing 28. Flash processing 2
8 is limited by the operation speed of the main memory and the main bus, so that the time length required for all the processing cannot be reduced.

【0025】そこで、キャッシュメモリを複数の小区間
に分割し、各々の小区間のフラッシュが完了する毎にキ
ャッシュ制御論理に制御を戻して、保留していたバス動
作を処理した後、次の小区間についてフラッシュ処理を
継続することで、フラッシュ処理中のバスタイムアウト
エラーを回避することができる。
Therefore, the cache memory is divided into a plurality of small sections, and control is returned to the cache control logic each time the flushing of each small section is completed, and the bus operation which has been suspended is processed. By continuing the flash processing for the section, a bus timeout error during the flash processing can be avoided.

【0026】[0026]

【発明の実施の形態】図9および図10に、本発明によ
るフラッシュ階層制御方式を示す。本方式では、キャッ
シュメモリを複数の小区間に分割し、各々の小区間のフ
ラッシュが完了する毎にキャッシュ制御論理に制御を戻
して、保留していたバス動作を処理した後、次の小区間
についてフラッシュ処理を継続することで、フラッシュ
処理中のバスタイムアウトエラーを回避するため、フラ
ッシュ制御論理は2つの階層に分割される。下位の制御
論理は、個々の小区間におけるフラッシュ処理の制御を
行い、上位の制御論理は、全てのキャッシュメモリ領域
のフラッシュ処理が完了するまで、下位の制御論理の監
視を行う。
FIG. 9 and FIG. 10 show a flash hierarchy control method according to the present invention. In this method, the cache memory is divided into a plurality of small sections, and control is returned to the cache control logic each time the flushing of each small section is completed, and after processing the suspended bus operation, the next small section is executed. The flash control logic is split into two layers to avoid bus timeout errors during the flash process by continuing the flash process for. The lower control logic controls the flash processing in each small section, and the upper control logic monitors the lower control logic until the flash processing of all the cache memory areas is completed.

【0027】図9に示すように、フラッシュの指示20
はフラッシュ上位制御論理14−3に対して行われる。
フラッシュ上位制御論理14―3は、キャッシュ制御論
理14−1に対してフラッシュ処理のために制御を移す
ことを、フラッシュ処理要求信号23により要求する。
キャッシュ制御論理14−1は、バス動作の区切りの良
いタイミングで、フラッシュ下位制御論理14−4に対
してフラッシュ処理を許可する信号24を与える。フラ
ッシュ下位制御論理14−4は小区間のフラッシュ処理
(フラッシュサブ処理)30を行い、1つの小区間に対
する処理が完了すると、この旨をフラッシュサブ処理終
了信号25により、キャッシュ制御論理14−1に通知
する。キャッシュ制御論理14−1は、保留していたバ
ス動作27を開始する。一方、フラッシュ上位制御論理
14−3は、全てのキャッシュメモリ領域のフラッシュ
処理が完了するまでフラッシュ処理要求信号23を出し
続ける(図10の29の期間)ため、キャッシュ制御論
理14−1は、再びバス動作の区切りの良いタイミング
で、フラッシュ下位制御論理14−4に対してフラッシ
ュ許可24を出す。
As shown in FIG.
Is performed on the flash higher-level control logic 14-3.
The flash higher-level control logic 14-3 requests the cache control logic 14-1 to transfer control for flash processing by the flash processing request signal 23.
The cache control logic 14-1 gives a signal 24 for permitting the flash processing to the flash lower-level control logic 14-4 at a timing when the bus operation is well separated. The flash lower-level control logic 14-4 performs the flash processing (flash sub-processing) 30 for the small section, and when the processing for one small section is completed, this is sent to the cache control logic 14-1 by the flash sub-processing end signal 25. Notice. The cache control logic 14-1 initiates the pending bus operation 27. On the other hand, the flash higher-level control logic 14-3 keeps outputting the flush processing request signal 23 until the flush processing of all the cache memory areas is completed (period 29 in FIG. 10). At a timing when the bus operation is well separated, the flash enable 24 is issued to the flash lower control logic 14-4.

【0028】以下、各小区間のフラッシュ処理30が完
了する毎に、保留していたバス動作の処理27を挿入す
ることを繰り返しながら、全ての小区間についてフラッ
シュ処理を行う。最後の小区間のフラッシュ処理30が
完了したとき、フラッシュ下位制御論理14−4は、キ
ャッシュ制御論理14−1に対してフラッシュサブ処理
終了信号25を出力すると共に、フラッシュ上位制御論
理14−3に対してフラッシュ処理完了信号26を出
す。これにより、フラッシュ上位制御論理14−3はフ
ラッシュ処理要求信号23をネゲートして、すべてのフ
ラッシュ動作が完了する。
Thereafter, every time the flash processing 30 of each small section is completed, the flash processing is performed for all the small sections while repeating the insertion of the reserved bus operation processing 27. When the flash processing 30 of the last small section is completed, the lower flash control logic 14-4 outputs a flash sub-processing end signal 25 to the cache control logic 14-1 and outputs the same to the upper flash control logic 14-3. In response, a flash processing completion signal 26 is issued. As a result, the flash host control logic 14-3 negates the flash processing request signal 23, and all flash operations are completed.

【0029】図11にフラッシュ上位制御論理の動作フ
ローを、図12にフラッシュ下位制御論理動作フローを
各々示す。
FIG. 11 shows the operation flow of the flash upper control logic, and FIG. 12 shows the operation flow of the flash lower control logic.

【0030】フラッシュ上位制御論理は、フラッシュ処
理の指示により、フラッシュアドレスを0にクリアした
後、フラッシュ処理要求信号をアサートする。以後、フ
ラッシュ下位制御論理からフラッシュ処理完了信号が出
されるまで、フラッシュ処理要求信号をアサートし続け
る。
The flash higher-level control logic asserts a flash processing request signal after clearing a flash address to 0 in response to a flash processing instruction. Thereafter, the flash processing request signal is kept asserted until a flash processing completion signal is output from the flash lower control logic.

【0031】一方、フラッシュ下位制御論理は、キャッ
シュ制御論理からフラッシュ処理許可が与えられると、
フラッシュアドレスに対応したキャッシュのエントリを
アクセスして、「変更(M)」状態か否かを判定する。
「変更(M)」状態で書き戻しが必要な場合、ストアバ
ッファを経由して主記憶に書き出し、エントリ状態を
「有効(V)」にする。1つのエントリの処理が終了す
ると、フラッシュアドレスをインクリメントして次のエ
ントリの処理を行う。小区間(サブ区間)の処理が全て
終了すると、フラッシュサブ処理終了信号を出力して下
位のフラッシュ制御を終了する。このとき、全ての小区
間について処理が完了していれば、フラッシュ上位制御
論理に対してフラッシュ処理完了信号を出力して処理を
終了する。
On the other hand, when the flash processing permission is given from the cache control logic,
An entry in the cache corresponding to the flash address is accessed to determine whether or not the state is “change (M)”.
When write-back is required in the "change (M)" state, the data is written to the main memory via the store buffer, and the entry state is set to "valid (V)". When the processing of one entry is completed, the flash address is incremented and the processing of the next entry is performed. When all the processes in the small section (sub-section) are completed, a flash sub-processing end signal is output, and the lower flash control ends. At this time, if the processing has been completed for all the small sections, a flash processing completion signal is output to the flash higher-level control logic, and the processing ends.

【0032】図1は、上述した制御論理およびキャッシ
ュのデータパスを統合してなる、本発明の1実施形態に
係るメモリ制御システムの構成例を示すブロック図であ
る。
FIG. 1 is a block diagram showing a configuration example of a memory control system according to an embodiment of the present invention, which integrates the above-described control logic and data path of a cache.

【0033】制御論理14は、常にバス上のトランザク
ションを監視しており、制御空間として割り付けられた
特定のアドレスにCPUがライトしたことを検出するこ
とにより、キャッシュでのフラッシュ処理開始をCPU
が指示していることを認識する。すなわち、具体的には
図示していないが、特定のアドレスへ書込むトランザク
ションをデコードしたときにデータバス上のデータを取
込むレジスタをキャッシュ制御論理内に設けることによ
り、このレジスタへの書き込みパルスあるいはこのレジ
スタの出力をフラッシュ指示信号20として利用するこ
とができる。
The control logic 14 constantly monitors transactions on the bus, and detects that the CPU has written to a specific address allocated as the control space, thereby initiating the start of a flush process in the cache.
Recognizes that he is pointing. That is, although not specifically shown, by providing a register for taking in data on the data bus when decoding a transaction to be written to a specific address in the cache control logic, a write pulse to this register or The output of this register can be used as the flash instruction signal 20.

【0034】図1のフラッシュ上位制御論理14−3
は、先のフラッシュ指示信号20により、フラッシュ処
理要求信号23を出力すると共に、フラッシュ処理用の
アドレスカウンタ8に対して制御信号100により初期
値‘0’を代入することを指示する。キャッシュ制御論
理14−1は、区切れの良いタイミングでフラッシュ許
可信号24を出力する。フラッシュ下位制御論理14−
4は、フラッシュ許可信号24を受け取ると、選択信号
102によりSEL1セレクタ9−1をアドレスカウン
タ8側に切り替えて、キャッシュメモリ1にフラッシュ
アドレスを与える。これによりキャッシュメモリ1は、
アドレスカウンタの指し示すエントリの内容を読み出
す。
Flash upper control logic 14-3 in FIG.
Outputs the flash processing request signal 23 in response to the previous flash instruction signal 20, and instructs the address counter 8 for flash processing to substitute the initial value '0' by the control signal 100. The cache control logic 14-1 outputs the flush permission signal 24 at a well-defined timing. Flash lower control logic 14-
4 receives the flash permission signal 24 and switches the SEL1 selector 9-1 to the address counter 8 side by the selection signal 102, and gives a flash address to the cache memory 1. As a result, the cache memory 1
Reads the contents of the entry pointed to by the address counter.

【0035】フラッシュ下位制御論理14−4は、読み
出されたエントリの現在の状態ビット13−1を検査す
る。読み出されたエントリの状態13−1が有効(V)
あるいは無効(I)であった場合は、このエントリに対
して何も行わないが、これが状態M(変更)を示してい
た場合、ストアバッファ16が空であるかどうかを制御
信号105により検査して、空であれば即座に、空でな
ければ空になるのを待ってから、このエントリの保持デ
ータ12をストアバッファ16に書き込む。同様に、読
み出されたアドレスタグと、アドレスカウンタ8の指し
示しているフラッシュアドレス(エントリ番号)とを、
各々アドレスの上位ビット/下位ビットとしてアドレス
バッファ17へ格納する(このアドレスバッファの値
は、ストアバッファ16のデータを主記憶へ書き戻す際
に、ライトアドレスとして使用する)。これと並行し
て、このエントリの新しい状態V(有効)を13−2に
よりキャッシュメモリ1に書き戻す。
The flash sub-control logic 14-4 examines the current status bit 13-1 of the entry read. State 13-1 of the read entry is valid (V)
Alternatively, if the entry is invalid (I), nothing is performed on this entry. If this entry indicates the state M (change), the control signal 105 checks whether or not the store buffer 16 is empty. If it is empty, it waits for it to become empty, and if it is empty, it writes the held data 12 of this entry to the store buffer 16. Similarly, the read address tag and the flash address (entry number) indicated by the address counter 8 are set
Each is stored in the address buffer 17 as upper / lower bits of the address (the value of this address buffer is used as a write address when writing back the data in the store buffer 16 to the main memory). In parallel with this, the new state V (valid) of this entry is written back to the cache memory 1 by 13-2.

【0036】次に、フラッシュ下位制御論理14−4
は、アドレスカウンタ8からのアドレスサブカウント終
了信号107の状態を見て、キャッシュ小区間のフラッ
シュ処理が完了したかどうかを判定する。具体的には、
アドレスカウンタ8の下位のビットが特定の値、例えば
下位の4ビットが全て‘1’になっているかどうかを論
理積ゲートなどにより検出して、フラッシュ小区間が完
了したかどうかを判定する。
Next, the flash lower control logic 14-4
Checks the state of the address sub-count end signal 107 from the address counter 8 to determine whether or not the flush process for the small cache section has been completed. In particular,
Whether the lower bits of the address counter 8 are a specific value, for example, whether all the lower 4 bits are “1” is detected by an AND gate or the like, and it is determined whether the flash small section is completed.

【0037】小区間の処理が未完である場合、フラッシ
ュ下位制御論理14−4は、アドレスカウンタ制御信号
100により、アドレスカウンタ8の値を+1する。以
下、アドレスカウンタ8により指し示された次のエント
リに対して、上述した処理内容を繰り返す。
When the processing of the small section is not completed, the flash lower-order control logic 14-4 increments the value of the address counter 8 by +1 according to the address counter control signal 100. Hereinafter, the above-described processing content is repeated for the next entry pointed to by the address counter 8.

【0038】フラッシュ下位制御論理14−4が、アド
レスカウンタ8の値により、フラッシュ小区間の処理が
完了したことを検出した場合、キャッシュ制御論理14
−1に対してフラッシュサブ処理終了信号25を出力し
て、小区間処理が完了したことを通知する。ここでキャ
ッシュ制御論理14−1は、保留していたバストランザ
クションがあれば、これを処理して通常のキャッシュア
クセスを行う。
When the flash lower-level control logic 14-4 detects from the value of the address counter 8 that the processing of the flash subsection has been completed, the cache control logic 14-4
A flash sub-processing end signal 25 is output for -1 to notify that the small section processing has been completed. Here, the cache control logic 14-1 processes a pending bus transaction, if any, to perform a normal cache access.

【0039】バストランザクションの区切れの良いタイ
ミング(1つあるいは複数のトランザクションを処理完
了した段階)で、キャッシュ制御論理14−1はフラッ
シュ処理要求23があれば、再びフラッシュ許可信号2
4により、フラッシュ下位制御論理14−4に制御を移
す。
At a timing when a bus transaction is well-separated (when one or a plurality of transactions have been processed), the cache control logic 14-1 receives the flush enable signal 2 again when there is a flush request 23.
4 transfers control to the flash lower control logic 14-4.

【0040】フラッシュ下位制御論理14−4は、アド
レスカウンタ8の値を+1しながら、次の小区間につい
て、フラッシュ処理を行う。アドレスカウンタ8の状態
信号であるフラッシュサブ処理終了信号25およびアド
レスカウント終了信号101がフラッシュ小区間の完了
と共にキャッシュメモリ全エリアの処理完了を示してい
た場合、フラッシュ下位制御論理14−4は、フラッシ
ュサブ処理終了信号25をキャッシュ制御論理14−1
に出力すると共に、フラッシュ上位制御論理14−3に
対してフラッシュ処理完了信号26を出力する。
The flash lower control logic 14-4 performs a flash process on the next small section while incrementing the value of the address counter 8 by one. When the flash sub-processing end signal 25 and the address count end signal 101, which are the status signals of the address counter 8, indicate the completion of the processing of all areas of the cache memory along with the completion of the flash subsection, the flash lower control logic 14-4 sets the flash The sub-processing end signal 25 is sent to the cache control logic 14-1.
And outputs a flash processing completion signal 26 to the flash higher-level control logic 14-3.

【0041】キャッシュ制御論理14−1は、フラッシ
ュサブ処理終了25を受けて、保留していたバストラン
ザクション処理を再開する。一方、フラッシュ上位制御
論理14―3は、フラッシュ処理完了信号26を受け
て、フラッシュ処理要求信号23をネゲートする。
In response to the flush sub-process end 25, the cache control logic 14-1 resumes the bus transaction process which has been suspended. On the other hand, the flash higher-level control logic 14-3 receives the flash processing completion signal 26 and negates the flash processing request signal 23.

【0042】ここで、具体的には説明しなかったが、フ
ラッシュ処理において、状態M(変更)にあるエントリ
はストアバッファ16およびアドレスバッファ17を経
由して、主記憶に書き戻される。これら、ストアバッフ
ァ16およびアドレスバッファ17は、キャッシュ制御
論理14−1が管理している。新たなアドレスおよびデ
ータが各々アドレスバッファ17およびストアバッファ
16に格納されたことを検出すると、キャッシュ制御論
理14−1は、バス権を獲得して、SEL2セレクタ9
−2への選択信号103によりストアバッファ16を選
択させると共に、制御信号104および106により3
ステートバッファ15−1および15−2を駆動して、
バス上にデータとアドレスを送出し、主記憶の該当アド
レスにデータを書き戻す。この処理が完了すると、スト
アバッファ16およびアドレスバッファ17は空状態と
なり、新たなデータおよびアドレスを受け入れることが
できる。
Here, although not specifically described, in the flash processing, the entry in the state M (change) is written back to the main memory via the store buffer 16 and the address buffer 17. The store buffer 16 and the address buffer 17 are managed by the cache control logic 14-1. Upon detecting that a new address and data have been stored in the address buffer 17 and the store buffer 16, respectively, the cache control logic 14-1 acquires the bus right and selects the SEL2 selector 9
-2, the selection signal 103 selects the store buffer 16, and the control signals 104 and 106
By driving the state buffers 15-1 and 15-2,
The data and address are sent out on the bus, and the data is written back to the corresponding address in the main memory. When this process is completed, the store buffer 16 and the address buffer 17 become empty, and can accept new data and addresses.

【0043】ここで、フラッシュ処理に際してストアバ
ッファ16およびアドレスバッファ17を経由して主記
憶に書き戻すことは、フラッシュのためのキャッシュエ
ントリ検索と主記憶への書き戻し動作を並行処理して性
能を上げるためであり、本発明に本質的なことではな
い。したがって、キャッシュのエントリで状態M(変
更)のものが検出された場合、キャッシュエントリ検索
を一旦停止して、ストアバッファ等を使用せずに、直
接、主記憶の該当アドレスへ、キャッシュから読み出さ
れたデータを書き戻しても良い。
Here, writing back to the main memory via the store buffer 16 and the address buffer 17 at the time of the flash processing is performed by performing the cache entry search for the flash and the write-back operation to the main storage in parallel to improve the performance. It is not essential to the present invention. Therefore, when a cache entry having a state of M (change) is detected, the cache entry search is temporarily stopped and the cache entry is directly read from the cache to the corresponding address in the main memory without using a store buffer or the like. The written data may be written back.

【0044】本実施形態では、キャッシュのフラッシュ
処理時間を分割してバスタイムアウトエラーを防止する
ため、フラッシュ処理中に状態Mのエントリ検索に使用
するアドレスカウンタの下位ビットを使用した。すなわ
ち、フラッシュアドレスカウンタの複数の下位ビットが
特定の値(例えば下位の4ビットが全て‘1’)になる
たびに、フラッシュ処理を一時中断して、保留状態で待
たされているバストランザクションの処理を行うように
した例を用いて説明を行った。
In the present embodiment, in order to prevent a bus timeout error by dividing the cache flush processing time, the lower bits of the address counter used to search for the state M entry during the flush processing are used. That is, each time a plurality of lower bits of the flash address counter become a specific value (for example, all the lower 4 bits are “1”), the flash processing is temporarily suspended, and the bus transaction waiting in the suspended state is processed. The description has been made using an example in which the above is performed.

【0045】しかし、保留状態のバストランザクション
がタイムアウトエラーを起こさない程度に、フラッシュ
処理時間を分割することが本発明の本質であり、上述の
例に限ることなく、例えば、タイマーなどにより、フラ
ッシュ処理時間を一定時間ごとに中断するようにしても
良い。
However, the essence of the present invention is to divide the flush processing time to such an extent that the pending bus transaction does not cause a time-out error, and the present invention is not limited to the above-mentioned example. The time may be interrupted at regular intervals.

【0046】これを行うには、タイマー用にカウンタを
用意して、キャッシュ制御論理からフラッシュ下位制御
論理に制御を移すときにこのカウンタに適当な値をロー
ドし、以降、フラッシュ処理を行っている間は、既知の
周期のクロックによりこのカウンタの値を−1して、カ
ウンタの値が‘0’になったときにフラッシュ小区間の
処理を中止して、キャッシュ制御論理に制御を戻すよう
にする。
To do this, a counter is prepared for the timer, and when transferring control from the cache control logic to the flash lower control logic, an appropriate value is loaded into this counter, and thereafter, the flash processing is performed. During this period, the value of this counter is decremented by 1 with a clock having a known cycle, and when the value of the counter becomes '0', the processing of the flash small section is stopped, and control is returned to the cache control logic. I do.

【0047】タイマーカウンタの値は、この例とは逆
に、各フラッシュ小区間の処理開始時にリセット(カウ
ンタの値を‘0’にする)して、フラッシュ小区間処理
中にクロックによりこのカウンタの値を+1し、カウン
タの値が特定の値になったとき(特定の値を保持させる
レジスタと比較回路によりカウンタ値と比較して検出す
るか、あるいは、カウンタの各出力ビットの値をそのま
まあるいは反転して多入力の論理積ゲートに入力するこ
とで特定の値になったことを検出する)にフラッシュ小
区間の処理を中断して、キャッシュ制御論理に制御を戻
して、保留状態となっていたバストランザクションの処
理を行わせても良い。
Contrary to this example, the value of the timer counter is reset at the start of processing of each flash small section (the value of the counter is set to "0"), and the value of this counter is controlled by a clock during the processing of the flash small section. The value is incremented by one, and when the value of the counter reaches a specific value (either detected by comparing with the counter value by a register holding a specific value and a comparator, or the value of each output bit of the counter as it is or Inverting and inputting to the multi-input AND gate detects that the value has reached a specific value), interrupts the processing of the flash small section, returns control to the cache control logic, and is in a suspended state. Bus transaction may be performed.

【0048】またさらに、上述した実施形態では、フラ
ッシュのために検索を行ったキャッシュエントリの数
(フラッシュアドレスカウンタの複数の下位ビットが全
て‘1’になることを検出するため)で小区間を規定し
ていたが、変更状態(状態M)が検出され、フラッシュ
処理により主記憶に書き戻したエントリの数で、小区間
を規定しても良い。すなわち、タイマカウンタに代えて
「書き戻し」カウンタを用意し、キャッシュ制御論理か
らフラッシュ下位制御論理に制御が移されたときにこの
カウンタをリセットし、さらにフラッシュのエントリ検
索により「状態M(変更状態)」が検出されるたびにカ
ウンタを+1して、このカウンタがある値に達したとき
にフラッシュ小区間の処理を中断して、再びキャッシュ
制御論理に制御を戻すようにするのである。
Further, in the above-described embodiment, the small section is determined by the number of cache entries searched for flash (to detect that all of the plurality of lower bits of the flash address counter become "1"). Although defined, a small section may be defined by the number of entries that have been written back to the main memory by the flash processing when the change state (state M) is detected. That is, a "write-back" counter is prepared in place of the timer counter, this counter is reset when the control is transferred from the cache control logic to the lower-level control logic, and the "state M (changed state)" )) Is incremented by 1 each time the counter reaches a certain value, the processing of the flash small section is interrupted, and control is returned to the cache control logic again.

【0049】何れの方法によっても、フラッシュ処理中
に保留状態にあるバストランザクションがタイムアウト
エラーを起こさない程度に、フラッシュ処理時間を分割
することが本発明の本質であり、それが検索処理したキ
ャッシュエントリ数によっても、タイマーカウンタを用
いた一定時間によっても、あるいは主記憶へ書き戻した
エントリ数によっても、いずれの方法でも良いのであ
る。
In any method, the essence of the present invention is to divide the flush processing time so that a bus transaction in a pending state during the flush processing does not cause a time-out error. Either method may be used depending on the number, a fixed time using a timer counter, or the number of entries written back to the main memory.

【0050】以上説明した階層制御方式により、フラッ
シュ処理の間、CPUあるいはI/Oからのバスへのア
クセス要求が無応答状態で待たされる時間は、個々の小
区間に対するフラッシュ処理時間に限られる。実際には
512エントリを1つの小区間としたため、1エントリ
あたりの書き戻し時間を20クロック(50MHzクロ
ック)、80%のエントリが「変更(M)状態」にある
とすると、各小区間のフラッシュ処理時間は160μs
となる。キャッシュメモリが大容量化しても、小区間の
数は増えるが、各小区間の処理時間が長大化することは
なく、バスタイムアウトエラーが発生することはない。
According to the hierarchical control method described above, the time during which a bus access request from the CPU or I / O waits in a no-response state during the flash processing is limited to the flash processing time for each small section. Since 512 entries are actually one small section, if the write-back time per entry is 20 clocks (50 MHz clock) and 80% of the entries are in the "changed (M) state", the flashing of each small section is performed. Processing time is 160μs
Becomes Even if the cache memory has a large capacity, the number of small sections increases, but the processing time of each small section does not increase and a bus timeout error does not occur.

【0051】[0051]

【発明の効果】以上のように本発明によれば、大容量キ
ャッシュメモリのフラッシュ処理において、キャッシュ
メモリを複数の小区間に分割し、各々の小区間ごとのフ
ラッシュが完了するたびに通常のキャッシュ制御論理に
制御を戻して、フラッシュ中に保留となっていたCPU
やバスデバイスからのメモリアクセスを処理した後に、
次の小区間についてフラッシュ処理を継続することがで
きるので、大容量のキャッシュメモリにおけるフラッシ
ュ処理中のバスタイムアウトエラーを防止することがで
きる。
As described above, according to the present invention, in the flush processing of a large-capacity cache memory, the cache memory is divided into a plurality of small sections, and each time the flushing of each small section is completed, the normal cache is read. Returns control to the control logic and the CPU that was suspended during the flush
And after processing memory access from the bus device,
Since flash processing can be continued for the next small section, a bus timeout error during flash processing in a large-capacity cache memory can be prevented.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の1実施形態にキャッシュメモリ制御方
式が適用されるメモリ制御システムの1構成例を示すブ
ロック図である。
FIG. 1 is a block diagram showing one configuration example of a memory control system to which a cache memory control method is applied to one embodiment of the present invention.

【図2】キャッシュメモリにおける各エントリの状態遷
移を示す説明図である。
FIG. 2 is an explanatory diagram showing a state transition of each entry in a cache memory.

【図3】通常のキャッシュメモリ制御方式が適用される
メモリ制御システムの構成例を示すブロック図である。
FIG. 3 is a block diagram illustrating a configuration example of a memory control system to which a normal cache memory control method is applied;

【図4】通常のフラッシュ処理の制御フローを示すフロ
ーチャート図である。
FIG. 4 is a flowchart illustrating a control flow of a normal flash process.

【図5】バスの階層構造と種々のアクセス形態を示す説
明図である。
FIG. 5 is an explanatory diagram showing a hierarchical structure of a bus and various access modes.

【図6】キャッシュメモリのフラッシュ処理時における
各バスからのアクセス状態を示す説明図である。
FIG. 6 is an explanatory diagram showing an access state from each bus at the time of flush processing of the cache memory.

【図7】従来のキャッシュ制御論理およびフラッシュ制
御論理の構成を示す説明図である。
FIG. 7 is an explanatory diagram showing the configuration of a conventional cache control logic and flush control logic.

【図8】従来のキャッシュ制御論理およびフラッシュ制
御論理の動作概念を示す説明図である。
FIG. 8 is an explanatory diagram showing the operation concept of the conventional cache control logic and flush control logic.

【図9】本発明を実施した場合のキャッシュ制御論理お
よびフラッシュ制御論理(フラッシュ上位制御論理、フ
ラッシュ下位制御論理)の構成を示す説明図である。
FIG. 9 is an explanatory diagram showing the configuration of a cache control logic and a flash control logic (flash upper control logic, flash lower control logic) when the present invention is implemented.

【図10】本発明を実施した場合のキャッシュ制御論理
およびフラッシュ制御論理(フラッシュ上位制御論理、
フラッシュ下位制御論理)の動作概念を示す説明図であ
る。
FIG. 10 shows a cache control logic and a flash control logic (flash upper control logic,
FIG. 4 is an explanatory diagram showing an operation concept of flash lower-order control logic).

【図11】本発明におけるフラッシュ上位制御論理の動
作フローを示すフローチャート図である。
FIG. 11 is a flowchart showing an operation flow of the flash higher-level control logic in the present invention.

【図12】本発明におけるフラッシュ下位制御論理の動
作フローを示すフローチャート図である。
FIG. 12 is a flowchart showing an operation flow of the flash lower control logic according to the present invention.

【符号の説明】[Explanation of symbols]

1 キャッシュメモリ 2 主記憶 3 エントリ無効状態(Invalid状態) 4 エントリ有効状態(Valid状態) 5 エントリ変更状態(Modified状態) 6 データ 7−1 アドレス 7−2 上位アドレスビット 7−3 下位アドレスビット 8 アドレスカウンタ 9−1 下位アドレスビットセレクタ(SEL1セレク
タ) 9−2 送出データセレクタ(SEL2セレクタ) 10 アドレスタグ比較器 11 アドレスタグ 12 読み出しデータ 13−1 エントリ現在状態ビット 13−2 エントリ次の状態ビット 14 制御論理 14−1 キャッシュ制御論理 14−2 フラッシュ制御論理 14−3 フラッシュ上位制御論理 14−4 フラッシュ下位制御論理 15−1 データ送出3ステートバッファ 16 ストアバッファ 17 アドレスバッファ 20 フラッシュ指示信号 21 フラッシュ処理開始信号 22 フラッシュ処理完了信号 23 フラッシュ処理要求信号 24 フラッシュ許可信号 25 フラッシュサブ処理終了信号 26 フラッシュ処理完了信号 27 キャッシュ通常動作期間 28 フラッシュ処理期間 29 フラッシュ処理未完了期間 30 フラッシュサブ処理期間 40 CPU 41 プロセッサバス 42 キャッシュ制御回路 43 キャッシュメモリ 44 主記憶 45 メインバス 46 バスI/F 47 I/Oバス 100 アドレスカウンタ制御信号 101 アドレスカウント終了信号 102 アドレス選択信号 103 送出データ選択信号 104 データ送出制御信号 105 ストアバッファ制御信号 106 アドレス送出制御信号 107 アドレスサブカウント終了信号
1 Cache Memory 2 Main Memory 3 Entry Invalid State (Invalid State) 4 Entry Valid State (Valid State) 5 Entry Change State (Modified State) 6 Data 7-1 Address 7-2 Upper Address Bit 7-3 Lower Address Bit 8 Address Counter 9-1 Lower address bit selector (SEL1 selector) 9-2 Transmission data selector (SEL2 selector) 10 Address tag comparator 11 Address tag 12 Read data 13-1 Entry current status bit 13-2 Entry next status bit 14 Control Logic 14-1 Cache control logic 14-2 Flash control logic 14-3 Flash upper control logic 14-4 Flash lower control logic 15-1 Data transmission 3 state buffer 16 Store buffer 17 Address Buffer 20 Flash instruction signal 21 Flash processing start signal 22 Flash processing completion signal 23 Flash processing request signal 24 Flash enable signal 25 Flash sub-processing end signal 26 Flash processing completion signal 27 Cache normal operation period 28 Flash processing period 29 Flash processing incomplete period 30 Flash sub-processing period 40 CPU 41 Processor bus 42 Cache control circuit 43 Cache memory 44 Main memory 45 Main bus 46 Bus I / F 47 I / O bus 100 Address counter control signal 101 Address count end signal 102 Address selection signal 103 Send data Select signal 104 Data transmission control signal 105 Store buffer control signal 106 Address transmission control signal 107 Address sub count end signal

───────────────────────────────────────────────────── フロントページの続き (72)発明者 村岡 諭 神奈川県横浜市戸塚区吉田町292番地 株 式会社日立製作所生産技術研究所内 ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Satoshi Muraoka 292 Yoshida-cho, Totsuka-ku, Yokohama-shi, Kanagawa Pref.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 ライトバック方式のキャッシュメモリに
おいて、最新データを格納し主記憶と不一致状態にある
キャッシュ内のエントリを検索して主記憶に書き戻すフ
ラッシュ処理であって、フラッシュ処理開始から全キャ
ッシュエントリの検索終了までの間に、少なくとも1回
はバスからのメモリアクセス要求に対応したキャッシュ
タグの検索を優先して行うことを特徴としたキャッシュ
メモリのフラッシュ制御方式。
In a write-back type cache memory, a flash process for storing the latest data, searching for an entry in a cache that is in a state inconsistent with the main storage, and writing it back to the main storage, wherein all the caches are started from the start of the flash processing A flush control method for a cache memory, characterized in that a search for a cache tag corresponding to a memory access request from a bus is performed at least once prior to completion of an entry search.
【請求項2】 メモリ空間を識別するnビットのアドレ
スの中のmビット(n>m)と、該アドレスに対応した
データと、該データのキャッシュにおける状態を示す状
態データとを各々対応づけられた位置に格納するキャッ
シュメモリのフラッシュ制御方式において、 バス上のトランザクションを監視して該トランザクショ
ンがメモリ空間上のアドレスに対するリードあるいはラ
イトを要求していることを検出するアクセス要求検出手
段と、該アクセス要求検出手段により検出されたリード
あるいはライト要求に対応してキャッシュメモリのアク
セスを行う第1のキャッシュメモリアクセス制御手段
と、バス上のトランザクションあるいは制御信号を監視
してフラッシュ要求があることを検出するフラッシュ要
求検出手段と、該フラッシュ要求検出手段でのフラッシ
ュ要求検出を受けてフラッシュ処理のためにキャッシュ
メモリの各エントリのアクセスを順次行う第2のキャッ
シュメモリアクセス制御手段とを備え、 上記フラッシュ要求検出手段がフラッシュ要求を検出し
てから、上記第2のキャッシュメモリアクセス制御手段
が全てのキャッシュメモリエントリのアクセスを終了す
るまでの間に、上記アクセス要求検出手段においてメモ
リに対するリードあるいはライト要求があった場合、少
なくとも1回は上記第1のキャッシュメモリアクセス制
御手段によるキャッシュメモリアクセスを行うようにし
たことを特徴とするキャッシュメモリのフラッシュ制御
方式。
2. An m-bit (n> m) of an n-bit address for identifying a memory space, data corresponding to the address, and status data indicating a status of the data in a cache are associated with each other. Access request detecting means for monitoring a transaction on a bus and detecting that the transaction requests a read or a write to an address in a memory space; First cache memory access control means for accessing the cache memory in response to the read or write request detected by the request detection means, and monitoring of a transaction or control signal on the bus to detect the presence of a flush request Flash request detecting means; Second cache memory access control means for sequentially accessing each entry of the cache memory for the flash processing in response to the detection of the flash request by the detection means, and after the flash request detection means detects the flash request, If there is a read or write request to the memory by the access request detection means until the second cache memory access control means finishes accessing all the cache memory entries, at least one time the first cache memory access control means makes the first access request. A cache memory access control means for performing a cache memory access.
【請求項3】 メモリ空間を識別するnビットのアドレ
スの中のmビット(n>m)と、該アドレスに対応した
データと、該データのキャッシュにおける状態を示す状
態データとを各々対応づけられた位置に格納するキャッ
シュメモリのフラッシュ制御方式において、 バス上のトランザクションを監視して該トランザクショ
ンがメモリ空間上のアドレスに対するリードあるいはラ
イトを要求していることを検出するアクセス要求検出手
段と、該アクセス要求検出手段により検出されたリード
あるいはライト要求に対応してキャッシュメモリのアク
セスを行う第1のキャッシュメモリアクセス制御手段
と、バス上のトランザクションあるいは制御信号を監視
してフラッシュ要求があることを検出するフラッシュ要
求検出手段と、該フラッシュ要求検出手段でのフラッシ
ュ要求検出を受けてフラッシュ処理のためにキャッシュ
メモリの各エントリのアクセスを順次行う第2のキャッ
シュメモリアクセス制御手段と、該第2のキャッシュメ
モリアクセス制御手段がキャッシュメモリアクセスを開
始したことに対応して計数を開始する計数手段と、該計
数手段における計数値が特定の値あるいはそれを超えた
値になったことを検出する計数値検出手段とを備え、 該計数値検出手段において上記計数手段における計数値
が特定の値あるいはそれを超えた値になったことを検出
した場合、上記アクセス要求検出手段において既に検出
されたリードあるいはライト要求で上記第1のキャッシ
ュメモリアクセス制御手段によるキャッシュメモリアク
セスが未完状態にあるアクセス要求があれば、該アクセ
ス要求に対応したキャッシュメモリのアクセスを行うよ
うにしたことを特徴とするキャッシュメモリのフラッシ
ュ制御方式。
3. An m-bit (n> m) in an n-bit address for identifying a memory space, data corresponding to the address, and status data indicating a status of the data in a cache are associated with each other. Access request detecting means for monitoring a transaction on a bus and detecting that the transaction requests a read or a write to an address in a memory space; First cache memory access control means for accessing the cache memory in response to the read or write request detected by the request detection means, and monitoring of a transaction or control signal on the bus to detect the presence of a flush request Flash request detecting means; A second cache memory access control means for sequentially accessing each entry of the cache memory for the flash processing in response to the detection of the flush request by the detection means, and the second cache memory access control means starts the cache memory access Counting means for starting counting in response to the operation, and count value detecting means for detecting that the count value of the counting means has become a specific value or a value exceeding the specific value. When it is detected that the count value in the counting means has reached a specific value or a value exceeding the value, the first cache memory access control means responds to the read or write request already detected by the access request detecting means. If there is an access request in which the cache memory access by the Flash control method of the cache memory, characterized in that to perform the cache memory access corresponding to Seth request.
【請求項4】 請求項3に記載のキャッシュメモリのフ
ラッシュ制御方式において、 第2のキャッシュメモリアクセス制御手段がフラッシュ
処理のためにキャッシュメモリアクセスを開始したこと
に対応して計数を開始する計数手段で、第2のキャッシ
ュメモリアクセス制御手段がフラッシュのために検索し
たキャッシュエントリの数を計数して、この検査済みの
キャッシュエントリの数が特定の値あるいはそれを超え
た値になったことを検出した場合、アクセス要求検出手
段において既に検出されたリードあるいはライト要求で
第1のキャッシュメモリアクセス制御手段によるキャッ
シュメモリアクセスが未完状態にあるアクセス要求があ
れば、該アクセス要求に対応したキャッシュメモリのア
クセスを行うようにしたことを特徴とするキャッシュメ
モリのフラッシュ制御方式。
4. A flash memory control method according to claim 3, wherein said second cache memory access control means starts counting in response to the start of cache memory access for flush processing. Counting the number of cache entries retrieved by the second cache memory access control means for flushing, and detecting that the number of checked cache entries has reached a specific value or a value exceeding it. In this case, if there is an access request in which the cache memory access by the first cache memory access control unit is in an uncompleted state in the read or write request already detected by the access request detection unit, the access of the cache memory corresponding to the access request is performed. Key which is characterized by performing Flash control system of Sshumemori.
【請求項5】 請求項3に記載のキャッシュメモリのフ
ラッシュ制御方式において、 第2のキャッシュメモリアクセス制御手段がフラッシュ
処理のためにキャッシュメモリアクセスを開始したこと
に対応して計数を開始する計数手段で、フラッシュ処理
によって主記憶に書き戻したキャッシュエントリの数を
計数して、この書き戻し済みのキャッシュエントリの数
が特定の値あるいはそれを超えた値になったことを検出
した場合、アクセス要求検出手段において既に検出され
たリードあるいはライト要求で第1のキャッシュメモリ
アクセス制御手段によるキャッシュメモリアクセスが未
完状態にあるアクセス要求があれば、該アクセス要求に
対応したキャッシュメモリのアクセスを行うようにした
ことを特徴とするキャッシュメモリのフラッシュ制御方
式。
5. The cache control method according to claim 3, wherein the second cache memory access control means starts counting in response to the start of the cache memory access for the flash processing. Then, the number of cache entries written back to the main memory by the flash processing is counted, and when it is detected that the number of cache entries that have been written back has reached a specific value or a value exceeding it, an access request is issued. If there is an access request in which the cache memory access by the first cache memory access control unit is in an unfinished state in the read or write request already detected by the detection unit, the cache memory corresponding to the access request is accessed. Cache memory flash Interview control system.
【請求項6】 請求項1乃至5の何れか1つに記載のフ
ラッシュ制御方式を採用して、フラッシュ処理中にアク
セス保留となるバストランザクションのバスタイムアウ
トエラーを防止したことを特徴としたキャッシュメモ
リ。
6. A cache memory employing the flash control method according to claim 1, wherein a bus time-out error of a bus transaction whose access is suspended during a flash process is prevented. .
JP10070410A 1998-03-19 1998-03-19 Flash control system for cache memory and cache memory Pending JPH11272551A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10070410A JPH11272551A (en) 1998-03-19 1998-03-19 Flash control system for cache memory and cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10070410A JPH11272551A (en) 1998-03-19 1998-03-19 Flash control system for cache memory and cache memory

Publications (1)

Publication Number Publication Date
JPH11272551A true JPH11272551A (en) 1999-10-08

Family

ID=13430685

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10070410A Pending JPH11272551A (en) 1998-03-19 1998-03-19 Flash control system for cache memory and cache memory

Country Status (1)

Country Link
JP (1) JPH11272551A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006112111A1 (en) * 2005-04-08 2006-10-26 Matsushita Electric Industrial Co., Ltd. Cache memory system, and control method therefor
US9262079B2 (en) 2007-07-13 2016-02-16 Samsung Electronics Co., Ltd. Cache memory device and data processing method of the device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006112111A1 (en) * 2005-04-08 2006-10-26 Matsushita Electric Industrial Co., Ltd. Cache memory system, and control method therefor
US7953935B2 (en) 2005-04-08 2011-05-31 Panasonic Corporation Cache memory system, and control method therefor
US9262079B2 (en) 2007-07-13 2016-02-16 Samsung Electronics Co., Ltd. Cache memory device and data processing method of the device

Similar Documents

Publication Publication Date Title
EP0664030B1 (en) Double buffering operations between the memory bus and the expansion bus of a computer system
US5774700A (en) Method and apparatus for determining the timing of snoop windows in a pipelined bus
JP3067112B2 (en) How to reload lazy push into copy back data cache
US5561783A (en) Dynamic cache coherency method and apparatus using both write-back and write-through operations
US5539890A (en) Microprocessor interface apparatus having a boot address relocator, a request pipeline, a prefetch queue, and an interrupt filter
US6366984B1 (en) Write combining buffer that supports snoop request
JP3987577B2 (en) Method and apparatus for caching system management mode information along with other information
US5778431A (en) System and apparatus for partially flushing cache memory
KR100228940B1 (en) Method for maintaining memory coherency in a computer system having a cache
JP2000250813A (en) Data managing method for i/o cache memory
US5479636A (en) Concurrent cache line replacement method and apparatus in microprocessor system with write-back cache memory
JP2008502069A (en) Memory cache controller and method for performing coherency operations therefor
JPH06318174A (en) Cache memory system and method for performing cache for subset of data stored in main memory
US7464227B2 (en) Method and apparatus for supporting opportunistic sharing in coherent multiprocessors
US5557622A (en) Method and apparatus for parity generation
JPH03163640A (en) Multi-processor system and cache memory used therefor
JP3957240B2 (en) Data processing system
JPH11272551A (en) Flash control system for cache memory and cache memory
JP3733604B2 (en) Cache memory
JPH0210446A (en) Buffer storage device
JP2703255B2 (en) Cache memory writing device
JPH06103477B2 (en) Parallel cache memory
JPH07152650A (en) Cache control unit
Luo et al. A VLSI design for an efficient multiprocessor cache memory
JPH02307123A (en) Computer