JPH05233446A - Cache storage device - Google Patents

Cache storage device

Info

Publication number
JPH05233446A
JPH05233446A JP4069818A JP6981892A JPH05233446A JP H05233446 A JPH05233446 A JP H05233446A JP 4069818 A JP4069818 A JP 4069818A JP 6981892 A JP6981892 A JP 6981892A JP H05233446 A JPH05233446 A JP H05233446A
Authority
JP
Japan
Prior art keywords
write
memory
address
cache
processor
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.)
Granted
Application number
JP4069818A
Other languages
Japanese (ja)
Other versions
JPH0738173B2 (en
Inventor
Koichi Takeda
浩一 武田
Teruhiko Ohara
輝彦 大原
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
Agency of Industrial Science and Technology
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 Agency of Industrial Science and Technology filed Critical Agency of Industrial Science and Technology
Priority to JP4069818A priority Critical patent/JPH0738173B2/en
Publication of JPH05233446A publication Critical patent/JPH05233446A/en
Publication of JPH0738173B2 publication Critical patent/JPH0738173B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To improve the data processing capacity by continuously performing writing operation. CONSTITUTION:When a write ON/OFF flag 1 indicates writing, namely, when the memory operation command in a last cycle is a write command, the contents of an address register 2 are supplied to a data memory 12. When the write ON/OFF flag 1 indicates another command, the address which is supplied in the current cycle is supplied to the data memory 12. Consequently, when write commands succeed, writing corresponding to the precedent command and hit decision making corresponding to the following command are carried out in parallel. Consequently, the successive write commands are processed without delay.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、プロセッサと主記憶装
置との間に介在するキャッシュ記憶装置に関するもので
ある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory device interposed between a processor and a main memory device.

【0002】[0002]

【従来の技術】プロセッサ11からのメモリアクセスを
高速化する手法として、周知のように、キャッシュメモ
リを設ける手法がある(元岡編「コンピュータの事典」
初版朝倉書店、1983 p.122〜p.124 “キャッシュメモ
リ”参照)。図2は、従来のキャッシュ記憶装置の一例
のブロック図である。このような構成の装置において、
キャッシュヒットが生じた場合のタイミングの例を図3
及び図4に示す。図2において、キャッシュ記憶装置2
0は、プロセッサ21と、図示しない主記憶装置との間
に設けられている。
2. Description of the Related Art As is well known, a method of providing a cache memory is known as a method for accelerating memory access from a processor 11 (Motooka, Ed.
First edition Asakura Shoten, 1983 p.122-p.124 “Cache memory”). FIG. 2 is a block diagram of an example of a conventional cache storage device. In the device having such a configuration,
FIG. 3 shows an example of the timing when a cache hit occurs.
And shown in FIG. In FIG. 2, the cache storage device 2
0 is provided between the processor 21 and a main storage device (not shown).

【0003】キャッシュ記憶装置20は、データメモリ
22と、キャッシュタグメモリ23と、比較器24と、
キャッシュ制御部25とから成る。プロセッサ21は、
図示しない主記憶装置上のデータの読み出し及び書き込
みを繰り返して、当該主記憶装置上のデータの処理を行
なう。データメモリ22は、主記憶装置より高速でアク
セス可能な記憶素子から成るランダム・アクセス・メモ
リから成り、主記憶装置上のデータの一部の記憶、即ち
キャッシュ記憶を行なう。キャッシュタグメモリ23
は、キャッシュ記憶がされているデータの主記憶上のア
ドレスを記憶するメモリである。
The cache storage device 20 includes a data memory 22, a cache tag memory 23, a comparator 24,
The cache control unit 25. The processor 21
The data in the main memory is processed by repeatedly reading and writing data in the main memory (not shown). The data memory 22 is a random access memory composed of storage elements that can be accessed at a higher speed than the main memory, and stores a part of the data in the main memory, that is, cache memory. Cache tag memory 23
Is a memory for storing the address on the main memory of the data stored in the cache.

【0004】比較器24は、プロセッサ11から出力さ
れるアドレスと、キャッシュタグメモリ13に記憶され
たアドレスとを比較する。キャッシュ制御部25は、比
較器24の比較結果に基づいてデータメモリ22からの
データのアクセス又はプロセッサ21が直接主記憶上の
データをアクセスするための応答信号Holdの送出を
行なう。図2において、MOCはメモリ操作コマンドを
意味する。このコマンドは、プロセッサ21がメモリに
対して読み出しを行なうか書き込みを行なうかを指示す
る。Holdは、メモリアクセスがある定められた時間
内に完了できないとき(例えば、キャッシュミス時)に
メモリからプロセッサにそのことを知らせ、プロセッサ
に待たせるための信号である(「CY7C600 RISC FAMILY U
SERS GUIDE」 Cypress Semiconductor Corporation,1988
p.9-7〜p.9-8 参照)。次に、上述した装置の動作につ
いて説明する。
The comparator 24 compares the address output from the processor 11 with the address stored in the cache tag memory 13. The cache control unit 25 accesses the data from the data memory 22 or sends a response signal Hold for the processor 21 to directly access the data on the main memory based on the comparison result of the comparator 24. In FIG. 2, MOC means a memory operation command. This command instructs the processor 21 whether to read or write to the memory. Hold is a signal for notifying the processor from the memory when the memory access cannot be completed within a predetermined time (for example, when a cache miss), and causes the processor to wait (“CY7C600 RISC FAMILY U”).
SERS GUIDE '' Cypress Semiconductor Corporation, 1988
See p.9-7 to p.9-8). Next, the operation of the above-mentioned device will be described.

【0005】図3は、読み出しタイミングを説明するタ
イムチャートである。読み出しの場合は、プロセッサ2
1から出力されたアドレスAdrの下位ビットでキャッ
シュを読み出すと同時にキャッシュヒット判定を行なう
(図3(a)、(b)、(c))。このキャッシュヒット判定では、
アドレスAdrの下位ビットでキャッシュタグメモリ2
3を読み出し、その内容とアドレスAdrの上位ビット
とを比較する。キャッシュタグの内容が有効で且つアド
レスAdrと一致していた場合は、キャッシュヒットで
あり(図3(d))、データメモリ22の内容をプロセッサ
21に渡す(図3(e))。
FIG. 3 is a time chart for explaining the read timing. Processor 2 for reading
At the same time when the cache is read with the lower bit of the address Adr output from 1, the cache hit determination is performed (FIGS. 3A, 3B, and 3C). In this cache hit judgment,
Cache tag memory 2 with lower bit of address Adr
3 is read out, and its contents are compared with the upper bits of the address Adr. If the contents of the cache tag are valid and match the address Adr, there is a cache hit (FIG. 3 (d)), and the contents of the data memory 22 are passed to the processor 21 (FIG. 3 (e)).

【0006】図4は、書き込みタイミングを説明するタ
イムチャートである。書き込みの場合は、1サイクル目
でキャッシュヒット判定を行なう(図4(a)、(b)、(c))。
キャッシュヒットならば、プロセッサ21から出力され
たデータを次のサイクルでデータメモリ22に書き込む
(図4(d)、(e)、(f))。キャッシュミスの場合は、Hol
d信号を出力し、図示しない主記憶装置との間でデータ
転送を行なうが、詳細については省略する。
FIG. 4 is a time chart for explaining the write timing. In the case of writing, cache hit determination is performed in the first cycle (FIGS. 4 (a), (b), (c)).
If it is a cache hit, the data output from the processor 21 is written to the data memory 22 in the next cycle (FIGS. 4 (d), (e), (f)). In case of cache miss, Hol
The d signal is output and data is transferred to and from a main memory device (not shown), but details thereof will be omitted.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、上述し
た従来の技術には、次のような問題があった。即ち、書
き込みの場合は、1サイクル目でヒット判定を行ない、
2サイクル目で書き込みを行なうので、アドレスは2サ
イクルの間保存しておく必要がある(図4(b))。このた
め、プロセッサ21は、書き込みを行なった次のサイク
ルで別のアドレスに対する書き込みコマンドを発行する
ことはできないという制限を課される(図4(c))。特
に、1命令を1サイクルで実行するRISC(Reduced I
nstruction Set Computer)型プロセッサで書き込み命令
を連続して実行したい場合には、書き込み命令の間にN
OP(無操作)命令をはさむようにするか(図4(c))、
後続の書き込み命令を待たせる機構を付けなければなら
ない。いずれにしても、実質的に1命令を1サイクルで
実行できなくなり、データ処理能力が低下する。
However, the above-mentioned conventional techniques have the following problems. That is, in the case of writing, hit judgment is performed in the first cycle,
Since writing is performed in the second cycle, it is necessary to save the address for two cycles (Fig. 4 (b)). Therefore, the processor 21 is subject to the limitation that it cannot issue a write command to another address in the next cycle after writing (FIG. 4 (c)). In particular, RISC (Reduced I) that executes one instruction in one cycle
nstruction Set Computer) type processor, if you want to execute write command continuously, N
Whether to insert an OP (no operation) command (Fig. 4 (c)),
A mechanism to hold the subsequent write command must be added. In any case, one instruction cannot be executed substantially in one cycle, and the data processing capability is reduced.

【0008】本発明は、以上の点に着目してなされたも
ので、キャッシュヒットであれば、書き込み操作を行な
った次のサイクルでも後続の書き込み操作を遅延なく行
なえるキャッシュ記憶装置を提供することを目的とする
ものである。
The present invention has been made in view of the above points, and provides a cache memory device which can perform subsequent write operations without delay even in the cycle next to the write operation if a cache hit occurs. The purpose is.

【0009】[0009]

【課題を解決するための手段】本発明のキャッシュ記憶
装置は、プロセッサがアクセスする主記憶上のデータの
一部を記憶するデータメモリと、前記プロセッサの動作
するサイクルのうち、現在のサイクルの直前のサイクル
で書き込み要求があったか否かを記憶する書き込み有無
フラグと、前記プロセッサの直前のサイクルで与えられ
たアドレスを保持するアドレスレジスタと、前記データ
メモリにアドレスを与える場合に、前記書き込み有無フ
ラグが書き込み要求のあったことを示しているとき、前
記アドレスレジスタの内容を選択して与える一方、前記
書き込み有無フラグが書き込み要求のなかったことを示
しているとき、現在のサイクルで与えられているアドレ
スを選択して与えるアドレス選択手段とを備えたことを
特徴とするものである。
A cache storage device of the present invention includes a data memory for storing a part of data on a main memory accessed by a processor and a cycle immediately before the current cycle of the cycles in which the processor operates. Write cycle presence / absence flag for storing whether or not there is a write request, an address register for holding an address given in the cycle immediately preceding the processor, and the write presence / absence flag when an address is given to the data memory. When the write request is shown, the contents of the address register are selected and given, while when the write presence / absence flag shows that there is no write request, the address given in the current cycle Is provided with an address selecting means for selecting and giving That.

【0010】[0010]

【作用】本発明のキャッシュ記憶装置においては、書き
込み有無フラグが書き込みを示しているとき、即ち、直
前のサイクルのメモリ操作コマンドが書き込みであった
とき、アドレスレジスタの内容をデータメモリに与え
る。一方、書き込み有無フラグが書き込み以外を示して
いるとき、現在のサイクルで与えられているアドレスを
データメモリに与える。この結果、書き込みコマンドが
連続した場合、先行のコマンドに対応する書き込みと後
続のコマンドに対応するヒット判定とが並列に行なわれ
る。これにより、連続した書き込みコマンドが遅延なく
処理される。
In the cache memory device of the present invention, the content of the address register is given to the data memory when the write presence / absence flag indicates write, that is, when the memory operation command of the immediately preceding cycle is write. On the other hand, when the write presence / absence flag indicates other than write, the address given in the current cycle is given to the data memory. As a result, when the write commands are consecutive, the write corresponding to the preceding command and the hit determination corresponding to the subsequent command are performed in parallel. As a result, consecutive write commands are processed without delay.

【0011】[0011]

【実施例】以下、本発明の実施例を図面を参照して詳細
に説明する。図1は、本発明のキャッシュ記憶装置の実
施例のブロック図である。この図では、キャッシュヒッ
ト時に必要な部分のみが記述されており、キャッシュミ
ス時に使用する経路のいくつかは省略されている。図に
おいて、キャッシュ記憶装置10は、プロセッサ11
と、図示しない主記憶装置との間に設けられている。キ
ャッシュ記憶装置10は、データメモリ12と、キャッ
シュタグメモリ13と、比較器14と、キャッシュ制御
部15とから成る。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a block diagram of an embodiment of a cache storage device of the present invention. In this figure, only the necessary parts at the time of a cache hit are described, and some of the routes used at the time of a cache miss are omitted. In the figure, a cache storage device 10 is a processor 11
And a main storage device (not shown). The cache storage device 10 includes a data memory 12, a cache tag memory 13, a comparator 14, and a cache control unit 15.

【0012】プロセッサ11は、図示しない主記憶装置
上のデータの読み出し及び書き込みを繰り返して、当該
主記憶装置上のデータの処理を行なう。データメモリ1
2は、主記憶装置より高速でアクセス可能な記憶素子か
ら成るランダム・アクセス・メモリから成り、主記憶装
置上のデータの一部の記憶、即ちキャッシュ記憶を行な
う。キャッシュタグメモリ13は、キャッシュ記憶がさ
れているデータの主記憶上のアドレスを記憶するメモリ
である。
The processor 11 repeats reading and writing of data in a main memory device (not shown) to process the data in the main memory device. Data memory 1
Reference numeral 2 is a random access memory composed of storage elements that can be accessed at a higher speed than the main memory, and stores a part of data in the main memory, that is, cache memory. The cache tag memory 13 is a memory that stores an address on the main memory of data stored in the cache.

【0013】比較器14は、プロセッサ11から出力さ
れるアドレスと、キャッシュタグメモリ13に記憶され
たアドレスとを比較する。キャッシュ制御部15は、比
較器14の比較結果に基づいてデータメモリ12からの
データのアクセス又はプロセッサ11が直接主記憶上の
データをアクセスするための応答信号Holdの送出を
行なう。
The comparator 14 compares the address output from the processor 11 with the address stored in the cache tag memory 13. The cache control unit 15 accesses the data from the data memory 12 or sends the response signal Hold for the processor 11 to directly access the data in the main memory based on the comparison result of the comparator 14.

【0014】また、キャッシュ記憶装置10は、本発明
の特徴となる部分である、書き込み有無フラグ1と、ア
ドレスレジスタ2と、アドレス選択手段3とを備えてい
る。書き込み有無フラグ(PREV_WR)1は、プロ
セッサ11の直前のサイクルのメモリ操作が書き込みで
あったことを記憶するフラグである。アドレスレジスタ
(PREV_ADR)2は、直前のサイクルで与えられ
たアドレスを保持するレジスタである。アドレス選択手
段(AdrSel)3は、データメモリ12に与えるア
ドレスを現在のサイクルで与えられているアドレスか直
前のサイクルで与えられたアドレスから選択するセレク
タである。
Further, the cache storage device 10 is provided with a write presence / absence flag 1, an address register 2, and an address selecting means 3, which are the features of the present invention. The write presence / absence flag (PREV_WR) 1 is a flag for storing that the memory operation in the immediately preceding cycle of the processor 11 was a write. The address register (PREV_ADR) 2 is a register that holds the address given in the immediately preceding cycle. The address selection means (AdrSel) 3 is a selector for selecting an address to be given to the data memory 12 from an address given in the current cycle or an address given in the immediately preceding cycle.

【0015】また、プロセッサ11の入出力については
以下のようになっている。Adrは、プロセッサ11か
ら出力される図示しない主記憶上のアドレスである。M
OCは、プロセッサ11が主記憶又はデータメモリ12
に対して読み出しを行なうか書き込みを行なうかを指示
するメモリ操作コマンドである。Holdは、メモリア
クセスがある定められた時間内に完了できないとき(例
えば、キャッシュミス時)に、キャッシュ制御部15か
らプロセッサ11にそのことを知らせ、プロセッサ11
を待たせるための信号である。Dataは、プロセッサ
11とデータメモリ12との間でデータを転送するバス
である。
The input / output of the processor 11 is as follows. Adr is an address on the main memory (not shown) output from the processor 11. M
In the OC, the processor 11 is the main memory or the data memory 12
Is a memory operation command for instructing whether to read or write. When the memory access cannot be completed within a predetermined time (for example, a cache miss), Hold notifies the processor 11 from the cache controller 15 of the fact, and the processor 11
This is a signal to make the user wait. Data is a bus that transfers data between the processor 11 and the data memory 12.

【0016】次に、上述した装置の動作について説明す
る。図1において、キャッシュ記憶装置10は、プロセ
ッサ11からアドレスAdrとメモリ操作コマンドMO
Cとを受け取り、ヒット判定及び直前のサイクルと現在
のサイクルとのメモリ操作コマンドに対応した動作を行
なう。キャッシュ記憶装置10において、キャッシュヒ
ットしたか否かの判定するには、まず、アドレスAdr
の下位ビットでキャッシュタグメモリ13を読み出し、
内容が有効であるかを調べる。これと同時に、その内容
とアドレスAdrの上位ビットとを比較器14によって
比較する。内容が有効でかつこの内容がアドレスAdr
の上位ビットと一致していた場合は、キャッシュヒット
である。キャッシュタグメモリの内容が有効かどうか
は、キャッシュタグメモリの各ワード毎に有効フラグを
設け、それを調べることで実現できる。
Next, the operation of the above-mentioned device will be described. In FIG. 1, the cache storage device 10 receives the address Adr and the memory operation command MO from the processor 11.
C is received and the operation corresponding to the memory operation command of the immediately preceding cycle and the current cycle is performed. To determine whether or not a cache hit occurs in the cache memory device 10, first, the address Adr
The cache tag memory 13 is read by the lower bit of
Check if the contents are valid. At the same time, the comparator 14 compares the contents with the upper bits of the address Adr. Content is valid and this content is address Adr
If it matches with the high-order bit of, it is a cache hit. Whether the contents of the cache tag memory are valid can be realized by providing a valid flag for each word of the cache tag memory and checking it.

【0017】キャッシュミスの場合は、Hold信号を
出力し、主記憶との間でデータ転送を行なうが、詳細に
ついては、本発明の説明とは直接関係ないので、省略す
る。以下に、キャッシュヒットの場合について、図5及
び図6のタイムチャートを参照しながら説明する。
In the case of a cache miss, the Hold signal is output and data is transferred to and from the main memory, but the details are omitted since they are not directly related to the description of the present invention. The case of a cache hit will be described below with reference to the time charts of FIGS. 5 and 6.

【0018】図5は、読み出し、書き込みタイミングを
説明するタイムチャートである。この図は、書き込みコ
マンドwriteに連続するメモリ操作コマンドがない
場合、即ち書き込みコマンドwriteの直前及び直後
のサイクルで指定されるコマンドが無操作nopの場合
のタイミングを示している。図中のクロックCLOCK
は、プロセッサ11、書き込み有無フラグ1及びアドレ
スレジスタ2に入力されるクロックである(図5(a))。
FIG. 5 is a time chart for explaining the read and write timings. This figure shows the timing when there is no continuous memory operation command in the write command write, that is, when the commands specified in the cycles immediately before and after the write command write are no operations nop. Clock CLOCK in the figure
Is a clock input to the processor 11, the write presence / absence flag 1, and the address register 2 (FIG. 5A).

【0019】図示のように、プロセッサ11からのアド
レスAdr=A1(図5(b))、及びメモリ操作コマンド
MOC=readの出力(図5(c))により、読み出しコ
マンドが与えられたとする。このとき、アドレスレジス
タ2には直前のサイクルのAdr=A0がセットされて
いて(図5(d))、書き込み有無フラグ1はリセットされ
ている(図5(e))。これにより、キャッシュタグメモリ
13には、A1が与えられ、ヒット判定を行なう。これ
と同時にDMadrとして、アドレス選択手段3によっ
てアドレスAdr、即ち現在のサイクルにおいてプロセ
ッサ11から出力されているアドレスA1が選択され、
データメモリ12に与えられる(図5(f))。このサイク
ルの終わりで、データメモリ12から読み出された内容
D1がプロセッサ11に渡される(図5(h))。
As shown in the figure, it is assumed that a read command is given by the address Adr = A1 (FIG. 5 (b)) from the processor 11 and the output of the memory operation command MOC = read (FIG. 5 (c)). At this time, Adr = A0 of the immediately preceding cycle is set in the address register 2 (FIG. 5 (d)), and the write presence / absence flag 1 is reset (FIG. 5 (e)). As a result, A1 is given to the cache tag memory 13 and a hit determination is made. At the same time, as the address DMadr, the address selection unit 3 selects the address Adr, that is, the address A1 output from the processor 11 in the current cycle,
It is given to the data memory 12 (FIG. 5 (f)). At the end of this cycle, the content D1 read from the data memory 12 is passed to the processor 11 (FIG. 5 (h)).

【0020】次に、上述したサイクルの次の次のサイク
ルで、プロセッサ11からAdr=A2(図5(b))、及
び書き込みコマンドwriteが与えられたとする(図
5(c))。上述の場合と同様に、アドレスレジスタ2には
直前のサイクルのAdrがセットされていて(図5
(d))、書き込み有無フラグ1はリセットされている(図
5(e))。キャッシュタグメモリ13には、A2が与えら
れ、ヒット判定を行なう。図示の例では、結果として、
これと同時に、アドレス選択手段3によってAdr、即
ち現在のサイクルにプロセッサ11から出力されている
アドレスA2が選択され、データメモリ12に与えられ
るが(図5(f))、このサイクルではデータメモリ12の
アクセスを行なわない。キャッシュヒットならば、書き
込み有無フラグ1をセットする(図5(e))。
Next, it is assumed that Adr = A2 (FIG. 5B) and the write command write are given from the processor 11 in the cycle next to the above-described cycle (FIG. 5C). As in the case described above, Adr of the immediately preceding cycle is set in the address register 2 (see FIG. 5).
(d)), the write presence / absence flag 1 is reset (FIG. 5 (e)). A2 is given to the cache tag memory 13 to make a hit determination. In the example shown, as a result,
At the same time, the address selection means 3 selects Adr, that is, the address A2 output from the processor 11 in the current cycle and supplies it to the data memory 12 (FIG. 5 (f)). Will not be accessed. If there is a cache hit, the write presence flag 1 is set (FIG. 5 (e)).

【0021】その次のサイクルでは、メモリ操作コマン
ドMOCとして無操作nopが与えられたとする(図5
(c))。書き込み有無フラグ1はセットされているので
(図5(e))、アドレス選択手段3はアドレスレジスタ2
の内容、即ち直前のサイクルにプロセッサ11から出力
されていたアドレスA2(図5(d))を選択し、データメ
モリ12に与える(図5(f))。また、書き込み信号CW
Cがデータメモリ12に送られ(図5(g))、Dataに
出力されているデータD2が書き込まれる(図5(h))。
この後、書き込み有無フラグ1はリセットされる(図5
(e))。
In the next cycle, it is assumed that the non-operation nop is given as the memory operation command MOC (FIG. 5).
(c)). Since the write presence / absence flag 1 has been set (FIG. 5 (e)), the address selection means 3 uses the address register 2
, That is, the address A2 (FIG. 5 (d)) output from the processor 11 in the immediately preceding cycle is selected and given to the data memory 12 (FIG. 5 (f)). Also, the write signal CW
C is sent to the data memory 12 (FIG. 5 (g)), and the data D2 output to Data is written (FIG. 5 (h)).
After this, the write presence / absence flag 1 is reset (see FIG. 5).
(e)).

【0022】図6は、書き込みが連続する場合のタイミ
ングを説明するタイムチャートである。図中のクロック
CLOCKは、プロセッサ11、書き込み有無フラグ1
及びアドレスレジスタ2に入力されるクロックである
(図6(a))。図示のように、プロセッサ11からAdr
=A1(図6(b))、及びメモリ操作コマンドMOCを通
して書き込みコマンドwriteが与えられたとする
(図6(c))。このとき、アドレスレジスタ2には直前の
サイクルのAdr=A0がセットされていて(図6
(d))、書き込み有無フラグ1はリセットされている(図
6(e))。キャッシュタグメモリ13にはA1が与えら
れ、ヒット判定を行なう。データメモリ12に関して
は、図5の場合と同じ動作をする。キャッシュヒットな
らば、書き込み有無フラグ1をセットする(図6(e))。
FIG. 6 is a time chart for explaining the timing when writing is continued. The clock CLOCK in the figure is the processor 11 and the write presence / absence flag 1
And a clock input to the address register 2 (FIG. 6 (a)). As shown, processor 11 to Adr
= A1 (FIG. 6 (b)) and the write command write is given through the memory operation command MOC (FIG. 6 (c)). At this time, Adr = A0 of the immediately preceding cycle is set in the address register 2 (see FIG. 6).
(d)), the write presence / absence flag 1 is reset (FIG. 6 (e)). A1 is given to the cache tag memory 13 to make a hit determination. The data memory 12 operates in the same manner as in FIG. If there is a cache hit, the write presence flag 1 is set (FIG. 6 (e)).

【0023】次のサイクルで、プロセッサ11からAd
r=A2(図6(b))、及び書き込みコマンドwrite
が与えられたとする(図6(c))。アドレスレジスタ2に
は、直前のサイクルのAdr=A1がセットされていて
(図6(d))、書き込み有無フラグ1はセットされている
(図6(e))。キャッシュタグメモリ13にはA2が与え
られ、ヒット判定を行なう。これと同時に、アドレス選
択手段3によってアドレスレジスタ2の内容(図6
(b))、即ち直前のサイクルにプロセッサ11から出力さ
れていたアドレスA1を選択し、データメモリ12に与
える。また、書き込み信号CWCがデータメモリ12に
送られ(図6(g))、アドレスA1にデータD1が書き込
まれる(図6(h))。ここで、書き込み有無フラグ1はセ
ットされる(図6(e))。以上のように、アドレスA2の
ヒット判定(図6(b))とアドレスA1への書き込み(図
6(d)、(h))が並列に行なわれる。これは、書き込みコマ
ンドwriteが連続する限り行なわれる。
In the next cycle, the processor 11 sends an Ad
r = A2 (FIG. 6 (b)), and write command write
Is given (FIG. 6 (c)). In the address register 2, Adr = A1 in the immediately preceding cycle is set (FIG. 6 (d)), and the write presence / absence flag 1 is set (FIG. 6 (e)). A2 is given to the cache tag memory 13 to make a hit determination. At the same time, the contents of the address register 2 (see FIG.
(b)), that is, the address A1 output from the processor 11 in the immediately preceding cycle is selected and given to the data memory 12. Further, the write signal CWC is sent to the data memory 12 (FIG. 6 (g)), and the data D1 is written at the address A1 (FIG. 6 (h)). Here, the write presence / absence flag 1 is set (FIG. 6 (e)). As described above, the hit determination of the address A2 (FIG. 6B) and the writing to the address A1 (FIGS. 6D and 6H) are performed in parallel. This is performed as long as the write command write continues.

【0024】以上のようにして、書き込み有無フラグ1
が書き込みを示しているとき、即ち、直前のサイクルの
メモリ操作コマンドMOCが書き込みコマンドwrit
eであったとき、アドレスレジスタ2の内容をデータメ
モリ12に与える。この結果、書き込みコマンドwri
teが連続した場合、先行の書き込みコマンドwrit
eに対応する書き込みと後続の書き込みコマンドwri
teに対応するヒット判定とが並列に行なわれる。これ
により、連続した書き込みコマンドwriteが1コマ
ンド当たりほぼ1サイクルで遅延なく処理される。一
方、書き込み有無フラグ1が書き込み以外を示している
とき、現在のサイクルで与えられているアドレスをデー
タメモリ12に与える。この結果、プロセッサ11で現
在要求されているアドレスAdrに存在するデータが読
み出される。
As described above, the write presence / absence flag 1
Indicates write, that is, the memory operation command MOC of the immediately preceding cycle is the write command write.
When it is e, the contents of the address register 2 are given to the data memory 12. As a result, the write command wri
When te continues, the preceding write command writ
write corresponding to e and subsequent write command wri
Hit determination corresponding to te is performed in parallel. As a result, continuous write commands “write” are processed with almost one cycle per command without delay. On the other hand, when the writing presence / absence flag 1 indicates other than writing, the address given in the current cycle is given to the data memory 12. As a result, the data present at the address Adr currently requested by the processor 11 is read.

【0025】尚、書き込みコマンドwriteの直後に
読み出しコマンドreadが与えられる場合は、この構
成ではデータメモリ12に対するアクセスが競合するた
め、そのような組合せを禁止するか、読み出しコマンド
readを待たせる手段を追加しなければならない。
If the read command read is given immediately after the write command write, access to the data memory 12 conflicts with this configuration. Therefore, such a combination is prohibited or means for making the read command read wait. I have to add.

【0026】[0026]

【発明の効果】以上説明したように、本発明のキャッシ
ュ記憶装置によれば、直前のサイクルのメモリ操作コマ
ンドが書き込みであったことを記憶する書き込み有無フ
ラグと、直前のサイクルで与えられたアドレスを保持す
るアドレスレジスタと、キャッシュ記憶としてのデータ
を記憶するデータメモリに与えるアドレスを選択するア
ドレス選択手段とを備えるようにしたので、キャッシュ
ヒットであれば、書き込み操作を行なった次のサイクル
でも書き込み操作を遅延なく行なうことができる。従っ
て、1命令を1サイクルで実行するプロセッサで書き込
み命令を連続して実行する場合にも、命令の実行が待た
されることがなく、この結果、データ処理の性能を向上
させることができる。
As described above, according to the cache memory device of the present invention, the write presence / absence flag for storing the fact that the memory operation command in the immediately previous cycle was a write, and the address given in the immediately previous cycle. Since it is provided with an address register for holding and an address selection means for selecting an address to be given to a data memory for storing data as a cache memory, if a cache hit occurs, a write operation is performed even in the cycle next to the write operation. Operations can be performed without delay. Therefore, even when the write instruction is continuously executed by the processor that executes one instruction in one cycle, the execution of the instruction is not kept waiting, and as a result, the performance of data processing can be improved.

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

【図1】本発明のキャッシュ記憶装置の実施例のブロッ
ク図である。
FIG. 1 is a block diagram of an embodiment of a cache storage device of the present invention.

【図2】従来のキャッシュ記憶装置の一例のブロック図
である。
FIG. 2 is a block diagram of an example of a conventional cache storage device.

【図3】読み出しタイミングを説明するタイムチャート
である。
FIG. 3 is a time chart illustrating a read timing.

【図4】書き込みタイミングを説明するタイムチャート
である。
FIG. 4 is a time chart illustrating write timing.

【図5】読み出し、書き込みタイミングを説明するタイ
ムチャートである。
FIG. 5 is a time chart explaining read and write timings.

【図6】書き込みが連続する場合のタイミングを説明す
るタイムチャートである。
FIG. 6 is a time chart explaining a timing when writing is continued.

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

1 書き込み有無フラグ 2 アドレスレジスタ 3 アドレス選択手段 10 キャッシュ記憶装置 11 プロセッサ 12 データメモリ 13 キャッシュタグメモリ 14 比較器 15 キャッシュ制御部 1 Write Presence / Absence Flag 2 Address Register 3 Address Selector 10 Cache Storage Device 11 Processor 12 Data Memory 13 Cache Tag Memory 14 Comparator 15 Cache Control Unit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 プロセッサがアクセスする主記憶上のデ
ータの一部を記憶するデータメモリと、 前記プロセッサの動作するサイクルのうち、現在のサイ
クルの直前のサイクルで書き込み要求があったか否かを
記憶する書き込み有無フラグと、 前記プロセッサの直前のサイクルで与えられたアドレス
を保持するアドレスレジスタと、 前記データメモリにアドレスを与える場合に、前記書き
込み有無フラグが書き込み要求のあったことを示してい
るとき、前記アドレスレジスタの内容を選択して与える
一方、前記書き込み有無フラグが書き込み要求のなかっ
たことを示しているとき、現在のサイクルで与えられて
いるアドレスを選択して与えるアドレス選択手段とを備
えたことを特徴とするキャッシュ記憶装置。
1. A data memory for storing a part of data in a main memory accessed by a processor, and a memory for storing whether or not a write request is made in a cycle immediately before a current cycle among cycles in which the processor operates. A write presence / absence flag, an address register that holds an address given in the immediately preceding cycle of the processor, and a case where the write presence / absence flag indicates that there is a write request when the address is given to the data memory, Address selecting means for selecting and giving the address given in the current cycle when the write presence / absence flag indicates that there is no write request. A cache storage device characterized by the above.
JP4069818A 1992-02-19 1992-02-19 Cache storage Expired - Lifetime JPH0738173B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4069818A JPH0738173B2 (en) 1992-02-19 1992-02-19 Cache storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4069818A JPH0738173B2 (en) 1992-02-19 1992-02-19 Cache storage

Publications (2)

Publication Number Publication Date
JPH05233446A true JPH05233446A (en) 1993-09-10
JPH0738173B2 JPH0738173B2 (en) 1995-04-26

Family

ID=13413724

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4069818A Expired - Lifetime JPH0738173B2 (en) 1992-02-19 1992-02-19 Cache storage

Country Status (1)

Country Link
JP (1) JPH0738173B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5335335A (en) * 1976-09-13 1978-04-01 Nec Corp Buffer storage

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5335335A (en) * 1976-09-13 1978-04-01 Nec Corp Buffer storage

Also Published As

Publication number Publication date
JPH0738173B2 (en) 1995-04-26

Similar Documents

Publication Publication Date Title
KR100724557B1 (en) Out of order dram sequencer
US5265236A (en) Method and apparatus for increasing the speed of memory access in a virtual memory system having fast page mode
US6615326B1 (en) Methods and structure for sequencing of activation commands in a high-performance DDR SDRAM memory controller
JPH11175391A (en) Method and device for expanding writing/erasing function of flash memory
US4949242A (en) Microcomputer capable of accessing continuous addresses for a short time
JP2000194596A (en) Memory controller, cache device, system and method for memory control, and recording medium
US7007137B2 (en) Method and architecture capable of accessing data and instructions using store and forward
KR960007833B1 (en) Method and apparatus for fast page mode selection
JPH06214875A (en) Storage controller
JPH05233446A (en) Cache storage device
JP2851777B2 (en) Bus control method and information processing device
JPH0728990A (en) Graphic memory access circuit
JPH09319657A (en) Processor provided with buffer for reading instruction
JPH1055308A (en) Cache memory
JPH0447350A (en) Main storage read/response control
JP2864548B2 (en) Instruction cache device
KR100438893B1 (en) High speed SDRAM controller with intelligent bank analysis and method thereof
JPH1055303A (en) Memory system
JPS61237145A (en) Controlling system for store buffer
JPH10254782A (en) Data processor
JP2000066946A (en) Memory controller
JP2002049607A (en) Microcomputer with built-in cache
JPH11312123A (en) Cache controller
JPH07141174A (en) Register
JPH0553908A (en) High-speed access storage device

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term