JPH01320555A - Buffer storage device - Google Patents

Buffer storage device

Info

Publication number
JPH01320555A
JPH01320555A JP63155698A JP15569888A JPH01320555A JP H01320555 A JPH01320555 A JP H01320555A JP 63155698 A JP63155698 A JP 63155698A JP 15569888 A JP15569888 A JP 15569888A JP H01320555 A JPH01320555 A JP H01320555A
Authority
JP
Japan
Prior art keywords
data
address
write
memory
buffer
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
JP63155698A
Other languages
Japanese (ja)
Inventor
Takashi Kikuchi
隆 菊池
Hiroshi Fukuda
宏 福田
Yasuhiko Saikou
齋江 靖彦
Kanji Ooishi
貫時 大石
Susumu Hatano
進 波多野
Kunio Uchiyama
邦男 内山
Hirokazu Aoki
郭和 青木
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 ULSI Engineering Corp
Hitachi Ltd
Original Assignee
Hitachi ULSI Engineering Corp
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 ULSI Engineering Corp, Hitachi Ltd filed Critical Hitachi ULSI Engineering Corp
Priority to JP63155698A priority Critical patent/JPH01320555A/en
Priority to KR1019890007950A priority patent/KR970000837B1/en
Publication of JPH01320555A publication Critical patent/JPH01320555A/en
Priority to KR94011054A priority patent/KR970000839B1/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To improve throughput by providing plural buffers for write to hold an address for write and data, and comprising a device of a register of dual port. CONSTITUTION:A directory memory 1 and a data memory compare an address inputted from a CPU with a tag address stored in the memory 1. Simultaneously, since they perform the comparison of the addresses in a store buffer, it is possible to read/write the data by the CPU with the minimum machine cycles without making access to a main memory even when noncoincidence is obtained in a comparison result with the memory 1 if coincidence is obtained in the comparison result of the addresses. In addition to that, since registers (6a-6d) of dual port format are provided in the buffer 6, it is possible to execute the write on the data memory 2 or the main memory even when the write cycle of the memory by the CPU continues, thereby, the throughput can be improved.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、記憶管理技術さらにはバッファ記憶装置の
制御方式に適用して特に有効な技術に関し、例えばバッ
ファ記憶方式を採用した情報処理システムにおけるキャ
ッシュメモリの構成に利用して有効な技術に関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a storage management technique and a technique that is particularly effective when applied to a control method for a buffer storage device, for example, in an information processing system employing a buffer storage method. This article relates to techniques that are effective for use in configuring cache memory.

[従来の技術] 従来、バッファ記憶方式を採用したマイクロコンピュー
タにおいて、ダイナミックRAM等からなる主記憶装置
内の情報のうち使用頻度の高いものをキャッシュメモリ
内に入れておいて、これをキャッシュ・コントローラと
呼ばれる記憶管理装置によって制御して、スループット
を向上させるようにしているものがある。
[Prior Art] Conventionally, in a microcomputer that employs a buffer storage method, frequently used information in a main storage device such as a dynamic RAM is stored in a cache memory, and this information is stored in a cache controller. There are some devices that are controlled by a storage management device called ``Storage Management System'' to improve throughput.

なお、−日本電気製μPD43608のようにキャッシ
ュコントローラを内蔵したキャッシュメモリも提供され
ている。
Incidentally, a cache memory with a built-in cache controller, such as μPD43608 manufactured by NEC Corporation, is also provided.

第9図にバッファ記憶方式のマイクロコンピュータ・シ
ステムの構成例を示す。
FIG. 9 shows an example of the configuration of a buffer storage type microcomputer system.

読み出しの場合、キャッシュメモリC−MEMは、セン
トラルプロセッシングユニット(以下、CPUと称する
)から出力されるアドレスによってアクセスされ、所望
のデータがキャッシュメモリC−MEM内にあると、つ
まりキャッシュがヒツトすると、CPUはキャッシュメ
モリのスピードでデータをアクセスすることができるた
め、システムのスループットが向上する。また、CPU
から供給された読出しアドレスとキャッシュメモリC−
MEM内部のディレクトリメモリのアドレスタグとを比
較して、所望のデータがメモリ内にないと判定すると、
つまりキャッシュがミスヒツトすると、その読出しアド
レスをメインメモリM−MEMに送って所望のデータを
読み出し、CPUに渡す。書込みの場合も同様に対応す
るアドレスのデータがキャッシュメモリC−MEM内に
あるときはキャッシュメモリをアクセスするが、ないと
きはメインメモリをアクセスする。ところが、バッファ
記憶方式のシステムにおけるメインメモリは安価なダイ
ナミックRAMで構成されることが多い。その場合、メ
インメモリへの書込み時間はキャッシュメモリの読出し
時間に比べてかなり長いため、ライトサイクル時にCP
Uがメインメモリを直接アクセスしていたのでは、CP
Uの待ち時間が長くなり、スループットが低下する。
In the case of reading, the cache memory C-MEM is accessed by the address output from the central processing unit (hereinafter referred to as CPU), and when the desired data is in the cache memory C-MEM, that is, when the cache is hit, The CPU can access data at the speed of cache memory, improving system throughput. Also, CPU
The read address and cache memory C- supplied from
When it is determined that the desired data is not in the memory by comparing it with the address tag of the directory memory inside the MEM,
That is, when a cache miss occurs, the read address is sent to the main memory M-MEM, the desired data is read out, and the data is passed to the CPU. Similarly, in the case of writing, when the data at the corresponding address exists in the cache memory C-MEM, the cache memory is accessed, but when there is no data, the main memory is accessed. However, the main memory in a buffer storage type system is often composed of an inexpensive dynamic RAM. In that case, the writing time to the main memory is considerably longer than the reading time from the cache memory, so the CP
If U was directly accessing main memory, then CP
U's waiting time increases and throughput decreases.

そこで、前述のキャッシュメモリでは、CPUから出力
された書込みアドレスと書込みデータを保持するバッフ
ァ(書込み用バッファ)を設けている(「日経マイクロ
デバイスJ 1987年4月号、p86〜p90参照)
Therefore, the aforementioned cache memory is provided with a buffer (write buffer) that holds the write address and write data output from the CPU (see "Nikkei Microdevice J, April 1987 issue, p.86-p.90").
.

[発明が解決しようとする課題] しかしながら、上記キャッシュメモリにあっては、書込
み用バッファが1セット分しか設けられておらず、しか
も書込みと吐出しか同時に行なえないシングルポート構
成であった。そのため、例えば1命令サイクル中にメモ
リへのライトサイクルが2回以上続くような命令の実行
の際には、書込み用バッファのアドレスおよびデータが
吐き出されるまで次のアドレスおよびデータをバッファ
に入れることができない。その結果、CPUのライトサ
イクルの実行時間がメインメモリのサイクルタイムによ
って拘束され、CPUの待ち時間が長くなってシステム
のスループットが低下するという欠点があった。
[Problems to be Solved by the Invention] However, the cache memory described above is provided with only one set of write buffers, and has a single port configuration in which only writing and discharging can be performed at the same time. Therefore, for example, when executing an instruction in which a write cycle to memory continues two or more times in one instruction cycle, the next address and data cannot be stored in the buffer until the address and data in the write buffer are flushed out. Can not. As a result, the CPU's write cycle execution time is constrained by the main memory's cycle time, which increases the CPU's waiting time and reduces system throughput.

この発明の目的は、ライトサイクルが連続するような場
合においてもCPUから続けて複数のアドレスとライト
データを格納しておいて、バスの空いている時間にメイ
ンメモリを間接的にアクセスできるようにしてスルーブ
ツトを向上させることができるキャッシュメモリを提供
することにある。
The purpose of this invention is to store multiple addresses and write data from the CPU in succession even when write cycles are continuous, so that the main memory can be indirectly accessed when the bus is idle. An object of the present invention is to provide a cache memory that can improve throughput.

この発明の他の目的は、アドレスタグの格納されたディ
レクトリメモリ部におけるキャツシュヒツトの判定より
も速く所望のデータを得られるようにしてスループット
の向上を図ることが可能なキャッシュメモリを提供する
ことにある。
Another object of the present invention is to provide a cache memory capable of improving throughput by obtaining desired data faster than determining cache hits in a directory memory section in which address tags are stored. .

この発明の前記ならびにそのほかの目的と新規な特徴に
ついては、本明細書の記述および添附図面から明らかに
なるであろう。
The above and other objects and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings.

[課題を解決するための手段] 本願において開示される発明のうち代表的なものの概要
を説明すれば、下記のとおりである。
[Means for Solving the Problems] Representative inventions disclosed in this application will be summarized as follows.

すなわち、書込み用のアドレスおよびデータを保持する
書込み用バッファを複数セット設けるとともに、その書
込み用バッファをデュアルポートのレジスタで構成する
ものである。
That is, a plurality of sets of write buffers for holding write addresses and data are provided, and the write buffers are configured with dual-port registers.

また、外部から供給されたアドレスと上記バッファ内の
アドレスとを比較するアドレス比較器を設け1両者が一
致したときに対応するレジスタ内のデータをバス」二へ
出力させるようにした。
Further, an address comparator is provided to compare the address supplied from the outside with the address in the buffer, and when the two match, the data in the corresponding register is output to the bus.

[作用コ 上記した手段によれば、書込み用バッファが複数セット
用意されているため、ライトサイクルが連続する場合に
、−回のライトサイクルが終了したらすぐに次のライト
サイクルでそのアドレスとデータを格納することができ
るとともに、書込み用バッファへの書込みと書込み用バ
ッファから内部のデータメモリ部へのデータ転送(以下
、これを吐出しと称する)を非同期に行なうことができ
るため、内部バスまたはメインメモリバスの空いている
時間に次々とライ]〜データを吐き出してデータメモリ
またはメインメモリに対する書込みを行なうことができ
るようになりスループットが向上する。
[Operation] According to the above-mentioned means, multiple sets of write buffers are prepared, so when write cycles are consecutive, the address and data can be read in the next write cycle as soon as - write cycles are completed. In addition to being able to write to the write buffer and transfer data from the write buffer to the internal data memory section (hereinafter referred to as output), it is possible to It is now possible to write data into the data memory or main memory by discharging data one after another when the memory bus is free, improving throughput.

またタグ比較器によるアドレスタグの比較と並行して上
記書込み用バッファに対応して設けられた比較器による
アドレスの比較を行ない、アドレスが一致したときに書
込み用バッファ内のデータをCP Uがリード/ライト
することができるため、書込み用バッファがヒツトした
場合にはヒツト率を向上させることができる。
In addition, in parallel with the comparison of address tags by the tag comparator, addresses are compared by a comparator provided corresponding to the write buffer, and when the addresses match, the CPU reads the data in the write buffer. /write, so if the write buffer is hit, the hit rate can be improved.

[実施例] 第1図には、本発明をキャッシュコントローラ内蔵のキ
ャッシュメモリに適用した場合の一実施例の要部の構成
が示されている。
[Embodiment] FIG. 1 shows the configuration of essential parts of an embodiment in which the present invention is applied to a cache memory with a built-in cache controller.

同図のキャッシュメモリ10は、1チツプで構成され、
一つの半導体基板上にディレクトリメモリ】とデータメ
モリ2とLRU(Least  Reeently  
Used)方式のブロック置換制御回路3とからなるメ
モリアレイやタグ比較器4、CPUインタフェース11
、システムバスインタフェース12等が形成されており
、メインメモリが接続されたシステムバスとCP Uバ
スとの間に接続される。
The cache memory 10 in the figure is composed of one chip,
directory memory], data memory 2, and LRU (Least Recently
(Used) type block replacement control circuit 3, a memory array consisting of a tag comparator 4, and a CPU interface 11.
, a system bus interface 12, etc. are formed, and are connected between the system bus to which the main memory is connected and the CPU bus.

ディレクトリメモリ1内には、データメモリ2の同一カ
ラム位置に入っているデータのメインメモリ上でのアド
レスの上位10数ビツトがタグとして格納されている。
In the directory memory 1, the upper ten or more bits of the address on the main memory of data stored in the same column position of the data memory 2 are stored as a tag.

CP Uインタフェース11を介してCPUより与えら
れたアドレスADのうちカラムアドレス部CLMが、デ
ィレクトリメモリ1とデータメモリ2およびLRU3の
共通のデコーダに供給されると、各メモリの同一カラム
からアドレスタグとデータが同時に読み出される。
When the column address part CLM of the address AD given by the CPU via the CPU interface 11 is supplied to the common decoder of the directory memory 1, data memory 2, and LRU 3, the address tag and the address tag from the same column of each memory are supplied. Data is read simultaneously.

このうちディレクトリメモリ1から読み出されたアドレ
スタグはタグ比較器4に供給される。このタグ比較器4
には、CPUからメモリアレイに与えられたアドレスA
Dのうちタグ部TAGのデータも供給されており、ディ
レクトリメモリ1から読み出されたタグと比較し、一致
(キャツシュヒツト)または不一致(ミスヒツト)を示
す信号CHが出力される。キャッシュがヒツトするとデ
ータメモリ2の対応するカラム位置から読み出されたデ
ータがデータバス5よりCPUインタフェース11を介
してCPUへ供給される。一方、ミスヒツトが生じると
、システムバスインタフェース】2を介してシステムバ
スと接続されてメインメモリをアクセスし、所望のデー
タを得ることができる。
Among these, the address tag read from the directory memory 1 is supplied to the tag comparator 4. This tag comparator 4
is the address A given to the memory array by the CPU.
The data of the tag portion TAG of D is also supplied, and compared with the tag read from the directory memory 1, a signal CH indicating a match (cat hit) or a mismatch (miss hit) is output. When the cache hits, data read from the corresponding column position of the data memory 2 is supplied to the CPU from the data bus 5 via the CPU interface 11. On the other hand, if a mishit occurs, the main memory can be accessed by connecting to the system bus via the system bus interface 2 and desired data can be obtained.

この実施例では、メモリのライトサイクル時にCPUか
ら供給されたアドレスおよびデータをラッチして保持す
るレジスタを複数本(実施例では4本)有する書込み用
バッファとしてのストアバッファ6が設けられている。
In this embodiment, a store buffer 6 is provided as a write buffer having a plurality of registers (four in this embodiment) for latching and holding addresses and data supplied from the CPU during a memory write cycle.

このストアバッファを構成する各レジスタ68〜6dは
、CPUから与えられるアドレスADとバイトコントロ
ールデータBC(以下、バイトコードと称する)および
書込みデータの全てを保持可能なビット数を有するとと
もに、レジスタ6a〜6dごとに内部のデータが有効か
否かすなわち書込みが行なわれたか否かを示すバリッド
ビットVと、当該レジスタがアクセス中であるか否かを
示すアクセスビットAを有している。
Each of the registers 68 to 6d constituting this store buffer has a number of bits capable of holding all of address AD given by the CPU, byte control data BC (hereinafter referred to as byte code), and write data, and registers 6a to 6d. Each 6d has a valid bit V indicating whether the internal data is valid, that is, whether writing has been performed, and an access bit A indicating whether the register is being accessed.

しかも、上記ストアバッファ6は、レジスタを構成する
フリップフロップとして、例えば第2図に示すようなデ
ュアルポートのフリップフロップを使用し、トランスフ
ァMO8Qz、Qzを介してリード用データ線とライト
用データ線を接続し、かつライト側トランスファMO8
Q、とリード側トランスファMO8Q、を別々のワード
線W2゜W2で選択的にオンさせることができるように
されている。これによって、ストアバッファ6を構成す
るレジスタは、読出しと書込みを非同期に行なうことが
できる。
Moreover, the store buffer 6 uses a dual-port flip-flop as shown in FIG. 2, for example, as a flip-flop constituting a register, and connects a read data line and a write data line via transfer MO8Qz, Qz. Connect and light side transfer MO8
Q and the read-side transfer MO8Q can be selectively turned on using separate word lines W2 and W2. Thereby, the registers constituting the store buffer 6 can be read and written asynchronously.

そして、上記4本のレジスタ68〜6dのうちいずれか
一つを選択できるようにするため、第1図に示すごとく
ライトカウンタ7aとデコーダ8aおよびリードカウン
タ7bとデコーダ8bとが設けられている。上記ライト
カウンタ7aはCPUから出力されるバス起動信号BS
によってカウントアツプされ、リードカウンタ7bはキ
ャッシュメモリに供給されるシステムクロックに同期し
て所定の条件が満たされた場合にカウントアツプする。
In order to be able to select any one of the four registers 68 to 6d, a write counter 7a and a decoder 8a and a read counter 7b and a decoder 8b are provided as shown in FIG. The write counter 7a is a bus activation signal BS output from the CPU.
The read counter 7b counts up when a predetermined condition is satisfied in synchronization with the system clock supplied to the cache memory.

また、キャッシュメモリの動作状態に応じて上記各レジ
スタ68〜6d内のバリッドビット■やアクセスビット
Aをセットもしくはリセットしたり、バリッドビットV
およびアクセスビットAの状態に応じて上記カウンタ7
a、7bを制御したすするコントロール回路9が設けら
れている。
In addition, depending on the operating state of the cache memory, the valid bits and access bits A in each of the registers 68 to 6d are set or reset, and the valid bits V and V are set or reset.
and the counter 7 according to the state of access bit A.
A sip control circuit 9 is provided which controls the components a and 7b.

さらに、この実施例では、特に制限されないが、ストア
バッファ6内に格納されているデータのうちアドレスお
よびバイトコードと、CPUからキャッシュメモリに供
給されたアドレスおよびバイトコードとを比較する比較
回路20が設けられている。この比較回路20は、例え
ば第3図に示すように、各レジスタ6a〜6dに対応し
た4個のコンパレータCMP工〜CMP4とそれらの出
力の論理和をとるORゲートG。とによって構成されて
おり、全レジスタ6a〜6d内のデータとCPUからの
アドレスADおよびバイトコードBCとを同時に比較し
、一致するとヒツト信号H1〜H4を出力する。これら
のヒツト信号H8〜H,はストアバッファコントロール
回路9またはデコーダ8a、8bに供給され、一致した
レジスタを選択させるような信号を形成する。
Furthermore, in this embodiment, although not particularly limited, a comparison circuit 20 is provided which compares the address and bytecode of the data stored in the store buffer 6 with the address and bytecode supplied from the CPU to the cache memory. It is provided. This comparison circuit 20 is, for example, as shown in FIG. 3, an OR gate G that takes the logical sum of four comparators CMP-CMP4 corresponding to each register 6a-6d and their outputs. It simultaneously compares the data in all registers 6a to 6d with the address AD and byte code BC from the CPU, and outputs hit signals H1 to H4 when they match. These hit signals H8-H are supplied to the store buffer control circuit 9 or decoders 8a, 8b to form a signal for selecting the matching register.

また、ORゲートG0の出力信号は、ストアバッファヒ
ツト信号SBHとして、CPUインタフェース回路11
を介してCPUに供給される。
Further, the output signal of the OR gate G0 is sent to the CPU interface circuit 11 as a store buffer hit signal SBH.
is supplied to the CPU via.

ディレクトリメモリ1とデータメモリ2とからなるメモ
リアレイでは、CPUがら入力されるアドレスとディレ
クトリメモリ1に格納されているタグアドレスとの比較
を行なう、これと同時に、上記実施例ではストアバッフ
ァ6内のアドレスの比較を行なっているので、このアド
レスの比較結果が一致(ヒツト)すれば、ディレクトリ
メモリ1との比較の結果が不一致(ミスヒツト)の場合
でも、メインメモリをアクセスすることなく、最小マシ
ンサイクルでCPUがデータをリード/ライトすること
ができる。これにより、キャッシュメモリのヒツト率向
上が図れる。
In the memory array consisting of the directory memory 1 and the data memory 2, the address input from the CPU is compared with the tag address stored in the directory memory 1. At the same time, in the above embodiment, the address in the store buffer 6 is compared. Since addresses are compared, if the comparison result of this address matches (hit), even if the comparison result with directory memory 1 does not match (mishit), the main memory is not accessed and the minimum machine cycle is The CPU can read/write data. As a result, the hit rate of the cache memory can be improved.

しかもこの実施例では、ストアバッファ6内に4本のデ
ュアルポート形式のレジスタ6a〜6dが設けられてい
るので、CPUによるメモリのライトサイクルが連続し
た場合にも、次々とライトアドレスとデータをストアバ
ッファ6に入れておき、内部バスまたはメインメモリバ
スが空いたときにストアバッファからアドレスとデータ
を吐き出させてデータメモリまたはメインメモリへの書
込みを実行することができる。
Furthermore, in this embodiment, four dual-port registers 6a to 6d are provided in the store buffer 6, so even when the CPU performs consecutive memory write cycles, write addresses and data are stored one after another. The address and data can be stored in the buffer 6, and when the internal bus or main memory bus becomes free, the address and data can be discharged from the store buffer and written into the data memory or main memory.

なお、CPUのライトサイクルが何回も続いてストアバ
ッファ6内に空いているレジスタがなくなった場合には
、コントロール回路9からインタフェース回路11を介
してCPUに対してウェイト信号を送って待たせるよう
にすればよい。ただし、通常のCPUではライトサイク
ルが5回以上続くケースはほとんどないため、ウェイト
がかがる確率は、ストアバッファが1本の場合に比べず
っと低くなる。
Note that if the CPU write cycle continues many times and there are no free registers in the store buffer 6, the control circuit 9 sends a wait signal to the CPU via the interface circuit 11 to make it wait. Just do it. However, in a normal CPU, there are almost no cases where a write cycle continues more than five times, so the probability that the weight will increase is much lower than when there is only one store buffer.

第4図にはコントロール回@9によるストアバッファ6
およびその周辺回路の制御手順の一例が示されている。
Figure 4 shows the store buffer 6 by the control circuit @9.
An example of a control procedure for the circuit and its peripheral circuits is shown.

コントロール回路9は、CPUからのバス起動信号BS
によってバスサイクルの開始を知ると、CPUインタフ
ェース側の処理として先ずCPUからのアドレスとバイ
トコードを使ってストアバッファ6の検索を開始する(
ステップ5ll)。
The control circuit 9 receives a bus activation signal BS from the CPU.
When the start of a bus cycle is known, the CPU interface side first starts searching the store buffer 6 using the address and byte code from the CPU (
Step 5ll).

このとき、タグ比較器4によるアドレスタグの比較も同
時に開始されている。また、これと並行して、システム
バスインタフェース側の処理として、システムクロック
の立上りごとに、ストアバッファ吐出しの起動を監視し
、ストアバッファ6a〜6dのバリッドビットVとアク
セスビットAの状態を見てストアバッファ6内のデータ
の吐出しフローの起動をかける(ステップ521)。つ
まりストアバッファにおけるライ1−とリードが非同期
に処理されていく。以下、CPU側のリード/ライ1−
動作(cpuインタフェース側処理)と、吐出し動作(
システムバスインタフェース側処理)とに分けて説明す
る。
At this time, comparison of address tags by the tag comparator 4 is also started at the same time. In parallel, as a process on the system bus interface side, every time the system clock rises, the startup of store buffer discharge is monitored, and the states of valid bits V and access bits A of store buffers 6a to 6d are checked. Then, the flow of discharging the data in the store buffer 6 is activated (step 521). In other words, write 1- and read in the store buffer are processed asynchronously. Below, read/write 1- on the CPU side
operation (processing on the CPU interface side) and dispensing operation (
Processing on the system bus interface side) will be explained separately.

CPUインタフェース側処理ではCPUからのアドレス
によるストアバッファの検索後、CP Uからのリード
・ライト信号R/Wを見てCPUのリードサイクルかラ
イトサイクルか判定しくステップ512)、リードサイ
クルならばステップ51−3でストアバッファがヒツト
したか否かすなわち、アドレスの一致したlノジスタが
あるか否か判定する。このステップS13でストアバッ
ファがヒツトすれば、ヒツトしたレジスタよりデータを
リードしてデータバス5」二へ出力しくステップ515
)タグ比較器4による比較を停止させてから。
In the CPU interface side processing, after searching the store buffer using the address from the CPU, it checks the read/write signal R/W from the CPU to determine whether it is a CPU read cycle or a write cycle (step 512), and if it is a read cycle, step 51). -3, it is determined whether the store buffer has been hit or not, that is, whether there is a register with a matching address. If the store buffer is hit in this step S13, the data is read from the hit register and output to the data bus 5''2 (step 515).
) After stopping the comparison by the tag comparator 4.

ストアバッファヒツト信号SBHをCPUへ返してバス
サイクルを終了する。しかして、ステップ、S13でス
トアバッファがミスヒツトした場合には、ディレクトリ
メモリ(アドレスタグアレイ)側でのアドレスタグの判
定を待ち、アドレスタグも一致しなかった場合にはCP
Uがメインメモリへデータを取りに行く。
The store buffer hit signal SBH is returned to the CPU to end the bus cycle. If the store buffer misses in step S13, the address tag determination on the directory memory (address tag array) side is waited, and if the address tags also do not match, the CP
U goes to the main memory to retrieve data.

一方、開始されたバスサイクルがCI’Uのライトサイ
クルであった場合には、ステップ312からステップS
15へ進んでストアバッファがヒツトしたか否か判定し
、ヒツトしていればヒツトしたレジスタにライトアドレ
スとバイトコードおよびライトデータを格納(ステップ
818)t、てから、格納したレジスタのVビットを1
11 Itにセットシてバスサイクルを終了する(ステ
ップ319)。
On the other hand, if the started bus cycle is a CI'U write cycle, steps 312 to S
Step 15 determines whether the store buffer has been hit, and if so, stores the write address, byte code, and write data in the hit register (step 818), and then stores the V bit of the stored register. 1
11 It is set to end the bus cycle (step 319).

一方、ライトサイクルでストアバッファがヒツトしなか
った場合には、Vビットを調べて空レジスタがあるか否
か判定(ステップ816)t、、空レジスタがなければ
、空きが生じるまで待ち、空きが生じたところでそのレ
ジスタにライトアドレス、バイトコードおよびライトデ
ータを格納(ステップ517)t、てから格納したレジ
スタのVビットをセットしてバスサイクルを終了する(
ステップ519)。
On the other hand, if the store buffer is not hit in the write cycle, check the V bit and determine whether there is an empty register (step 816). When the write address, byte code, and write data are generated, the write address, byte code, and write data are stored in the register (step 517), and then the V bit of the stored register is set to end the bus cycle (
step 519).

システムバスインタフェース側処理では、システムクロ
ックの立上りによりストアバッファの吐出しか起動され
ると先ずストアバッファのリードボー1−とディレクト
リメモリ1が使用中であるか否かを判定する(ステップ
S 21− )。ここでディレクトリメモリ1が使用中
であればストアバッファの吐出し起動状態のまま待つ。
In the process on the system bus interface side, when discharge of the store buffer is activated by the rise of the system clock, it is first determined whether or not the read baud 1- of the store buffer and the directory memory 1 are in use (step S21-). Here, if the directory memory 1 is in use, it waits while the store buffer discharge is activated.

これはデータメモリからのリードデータとストアバッフ
ァからの吐出しデータが内部データバス5上で衝突する
のを防止するためである。使用中でないときにはステッ
プ322へ進み、ここでストアバッファ内のVビットを
調べてストアバッファ内に有効データの入っているレジ
スタがあるか否か判定し、有効データがあればリードカ
ウンタ7bによって選択されたレジスタのAビットにl
/ I 11をセットしてから、そのレジスタ内に格納
されているライトアドレスを出力して、そのアドレスを
使ってディレクトリメモリ1の検索を開始する(ステッ
プ523)。そして、アドレスタグアレイがヒツトして
いれば、ステップS24から825へ移行してストアバ
ッファの対応するレジスタ内のライトデータをデータメ
モリ2へ向かって吐出す。一方、ステップS24でアド
レスタグアレイでの検索の結果、ミスヒツトと判定され
ると、ステップS26へ進みストアバッファ内のライト
データを、ステムバスインタフェースを介してメインメ
モリへ向かって吐き出す。
This is to prevent read data from the data memory and discharge data from the store buffer from colliding on the internal data bus 5. If it is not in use, the process advances to step 322, where the V bit in the store buffer is checked to determine whether there is a register containing valid data in the store buffer, and if there is valid data, it is selected by the read counter 7b. l to the A bit of the register
/I 11 is set, the write address stored in the register is output, and the search in directory memory 1 is started using that address (step 523). If the address tag array is hit, the process moves from step S24 to 825, and the write data in the corresponding register of the store buffer is discharged to the data memory 2. On the other hand, if it is determined in step S24 that there is a miss as a result of the search in the address tag array, the process advances to step S26 and the write data in the store buffer is discharged to the main memory via the stem bus interface.

しかる後、吐出しを行なったレジスタのAビットとVビ
ットを“Otzにリセットしてから、リードカウンタ7
bを更新(カウントアツプ)して次のストアバッファ吐
出し起動待ちとなる(ステップS27,528)。
After that, the A bit and V bit of the register where the discharge was performed are reset to "Otz", and then the read counter 7 is reset.
b is updated (counted up) and the process waits for the next store buffer to be discharged (steps S27, 528).

なお、ステップS22における判定で、Vビットが′O
″のときはそのまま何もせずステップS28ヘジヤンプ
し、リードカウンタ7bを更新して次のストアバッファ
吐出し起動待ちとなる。
Note that in the determination in step S22, the V bit is
'', the process jumps to step S28 without doing anything, updates the read counter 7b, and waits for the start of the next store buffer discharge.

第5図には、CPUによるリードサイクルにおいてCP
Uがアクセスしたアドレスとストアバッファ6内に格納
されているアドレスとを比較して、一致するものがあっ
た場合の各種信号のタイミングが示されている。同図に
おいて、符号CLKはシステムクロック、ADはアドレ
ス、BCはバイトコントロール信号、R/Wはリードま
たはライト状態を示す信号、BSで示されているのはバ
スサイクルの開始を示すバススタート信号、As。
Figure 5 shows that the CP
The timings of various signals when the address accessed by U and the address stored in the store buffer 6 are compared and a match is found are shown. In the figure, CLK is a system clock, AD is an address, BC is a byte control signal, R/W is a signal indicating a read or write state, BS is a bus start signal indicating the start of a bus cycle, As.

DSはそれぞれバス上に有効なアドレス、データが存在
することを示すアドレスストローブ信号とデータストロ
ーブ信号で、これらの信号はCPUからキャッシュメモ
リに与えられる。また、SBHはストアバッファがヒツ
トしたことを示す信号である。さらに、DCはCPUか
ら要求されたデータが用意できたことを示すデータコン
プリート信号で、キャッシュメモリからCPUに与えら
れる。
DS is an address strobe signal and a data strobe signal respectively indicating that a valid address and data are present on the bus, and these signals are given from the CPU to the cache memory. Further, SBH is a signal indicating that the store buffer has been hit. Furthermore, DC is a data complete signal indicating that the data requested by the CPU is ready, and is given to the CPU from the cache memory.

また、第6図にはCPUによるライトサイクルにおける
各種信号のタイミングが示されている。
Further, FIG. 6 shows the timing of various signals in a write cycle by the CPU.

このサイクルでは必ずCPUから供給されたアドレスと
データをス1〜アバッフ76に格納するようになってお
り、先ずストアバッファ6を検索して空いているレジス
タが見つかった時点でアドレスとデータを格納する。
In this cycle, the address and data supplied from the CPU are always stored in the storage buffer 76. First, the store buffer 6 is searched, and when an empty register is found, the address and data are stored. .

さらに、第7図にはストアバッファからライトアドレス
とデータを吐き出す際のタイミングが示されている。こ
のサイクルは、CPUのサイクルと非同期に行なわれる
。すなわち、システムクロックCLKの立上りに同期し
てアドレスタグアレイの検索が開始され、ヒツトすれば
反ドアバッファ内のデータをデータアレイに転送する。
Furthermore, FIG. 7 shows the timing for discharging write addresses and data from the store buffer. This cycle is performed asynchronously with the CPU cycle. That is, a search of the address tag array is started in synchronization with the rising edge of the system clock CLK, and if a search is found, the data in the anti-door buffer is transferred to the data array.

ミスヒツトの場合は、メインメモリへ向かつてライトデ
ータを転送する。
In the case of a miss, the write data is transferred to the main memory.

さらに、上記実施例においてはストアバッファ6を構成
するレジスタ68〜6dのデータ格納部(32ビツト)
の入力ポートに対し、例えば第8図に示すように8ビツ
トごとに、ゲート01〜G4を設け、これをCPUより
供給されるバイトコードBCで制御することによってス
トアバッファ6を構成するレジスタ6a〜6dの4バイ
トのデータ部に対して1バイトごとに読出しまたは書込
みを行なういわゆるパーシャルリード/ライト機能を有
する。
Furthermore, in the above embodiment, the data storage section (32 bits) of the registers 68 to 6d constituting the store buffer 6
For example, as shown in FIG. 8, gates 01 to G4 are provided for every 8 bits to the input port of , and registers 6a to G4 which constitute the store buffer 6 are controlled by the byte code BC supplied from the CPU. It has a so-called partial read/write function that reads or writes 1 byte at a time to the 4-byte data section of 6d.

以上説明したように上記実施例は、書込み用のアドレス
およびデータを保持するレジスタを複数本設けるととも
に、そのレジスタをデュアルポートレジスタで構成する
ようにしたので、ライトサイクルが連続する場合にも、
ライトアドレスとデータを連続して入れておくことがで
きるとともに、上記4本のレジスタからなる書込み用バ
ッファへの書込みと吐出しを非同期に行なうことができ
るため、バスの空いている時間に次々とライトデータを
吐き出してデータメモリまたはメインメモリに対する書
込みを行なうことができるようになるため、システムの
スループットが向上するという効果がある。
As explained above, in the above embodiment, a plurality of registers are provided to hold write addresses and data, and the registers are configured with dual port registers, so even when write cycles are continuous,
In addition to being able to store write addresses and data continuously, it is also possible to write to and output from the write buffer consisting of the four registers mentioned above asynchronously, so they can be written one after another when the bus is free. Since write data can be written to the data memory or main memory by discharging the write data, the throughput of the system can be improved.

また、外部から供給されたアドレスと上記バッファ内の
アドレスとを比較するアドレス比較器を設け1両者が一
致したとき対応するレジスタ内のデータをバス上へ出力
させるようにしたので、タグ比較器によるアドレスタグ
の比較と並行して書込み用バッファとしてのストアバッ
ファに対応して設けられた比較器によるアドレスの比較
を行ない、一致したときに書込み用バッファ内のデータ
をCPUに与えることができるため、システムスループ
ットの向上が図れるという効果がある。
In addition, an address comparator is provided to compare the address supplied from the outside with the address in the buffer.1 When the two match, the data in the corresponding register is output onto the bus. In parallel with the comparison of address tags, a comparator provided corresponding to the store buffer as a write buffer compares the addresses, and when a match occurs, the data in the write buffer can be given to the CPU. This has the effect of improving system throughput.

以上本発明者によってなされた発明を実施例に基づき具
体的に説明したが、本発明は上記実施例に限定されるも
のではなく、その要旨を逸脱しない範囲で種々変更可能
であることはいうまでもない。例えば、上記実施例のC
PUインタフェース側処理中(ステップSll〜519
)において。
Although the invention made by the present inventor has been specifically explained above based on Examples, it goes without saying that the present invention is not limited to the above Examples and can be modified in various ways without departing from the gist thereof. Nor. For example, C in the above embodiment
Processing on the PU interface side (steps Sll to 519)
) in.

上記Aビットを監視してCPUによるリードアクセスを
待たせるウェイト信号を形成する等の処理にAビットを
利用することができる。
The A bit can be used for processing such as monitoring the A bit and forming a wait signal to make read access by the CPU wait.

また、パリティチエッカあるいはデータメモリにリード
/ライトされるデータをブロック単位で保持するバッフ
ァ等積々の機能回路を付加するにうにしてもよい。
Furthermore, a number of functional circuits such as a parity checker or a buffer for holding data read/written to the data memory in units of blocks may be added.

以−Lの説明では主として本発明者によってなされた発
明をその背景となった利用分野であるキャッシュコント
ローラを内蔵したキャッシュメモリに適用した場合につ
いて説明したが、この発明はそれに限定されるものでは
なく、キャッシュコントローラとキャッシュメモリが別
々のチップで構成されているシステムに適用することも
できる。
In the following explanation, the invention made by the present inventor was mainly applied to a cache memory with a built-in cache controller, which is the field of application in which the invention was made, but the invention is not limited thereto. , it can also be applied to a system in which the cache controller and cache memory are configured on separate chips.

[発明の効果] 本願において開示される発明のうち代表的なものによっ
て得られる効果を簡単に説明すれば下記のとおりである
[Effects of the Invention] The effects obtained by typical inventions disclosed in this application are briefly explained below.

すなわち、ライトサイクルが連続する場合に。That is, when the write cycles are consecutive.

−回のライトサイクルが完全に終了する前に次のライト
アドレスとデータを入れておくことができるとともに、
書込み用バッファへの書込みと吐出しを非同期に行なう
ことができるため、バスの空いている時間に次々とライ
トデータを吐き出してデータメモリまたはメインメモリ
に対する書込みを行なうことができるようになってスル
ーブッ1−が向上するとともに、ディレクトリメモリ部
におけるキャツシュヒツトの判定と同時にストアバッフ
ァのピッl−判定を行なうことにより、ヒツト率の向上
を図ることができる。
- The next write address and data can be entered before the previous write cycle is completely completed, and
Since writing and discharging to the write buffer can be performed asynchronously, it is possible to write data to the data memory or main memory by discharging write data one after another during the bus's free time. In addition, the hit ratio can be improved by performing the store buffer hit determination at the same time as the cache hit determination in the directory memory section.

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

第1図は、本発明に係るキャッシュコントローラ内蔵の
キャッシュメモリに適用した場合の一実施例を示すブロ
ック図、 第2図はそのキャッシュメモリに使用されるストアバッ
ファを構成するデュアルポー1・のフリップフロップの
一例を示す回路図、 第3図はストアバッファのアドレス比較を行なう比較回
路の要部の構成を示すブロック図、第4図(A)、(B
)は上記コントローラによるストアバッファへのリード
、ライトの制御手順の一例を示すフローチャート、 第5図はCPUリードサイクル時のストアバッファのタ
イムチャート。 第6図はCPUライトサイクル時のストアバッファのタ
イムチャーl−1 第7図はCPUサイクルと非同期に実行されるストアバ
ッファ吐出し動作のタイムチャート、第8図はストアバ
ッファの入力ポート部の構成例を示すブロック図、 第9図は、バッファ記憶方式を採用したマイクロコンピ
ュータシステムの構成例を示すシステム構成図である。 1・・・・ディレクトリメモリ、2・・・・データメモ
リ、4・・・・タグ比較器、5・・・・内部データバス
、6・・・・書込み用バッファ(ストアバッファ)、1
0・・・・キャッシュメモリ。 第2図 crI BH 第4図 (A) (B) 第5図 第6図 ’□(X5−一←=]− 第7図 第8図
FIG. 1 is a block diagram showing an embodiment of the invention applied to a cache memory with a built-in cache controller, and FIG. FIG. 3 is a block diagram showing the configuration of the main part of a comparison circuit that compares addresses of store buffers, and FIGS. 4(A) and (B)
) is a flowchart showing an example of a control procedure for reading and writing to the store buffer by the controller, and FIG. 5 is a time chart of the store buffer during a CPU read cycle. Figure 6 is a time chart of the store buffer during a CPU write cycle. Figure 7 is a time chart of the store buffer discharge operation that is executed asynchronously with the CPU cycle. Figure 8 is the configuration of the input port section of the store buffer. Block Diagram Showing an Example FIG. 9 is a system configuration diagram showing an example of the configuration of a microcomputer system employing the buffer storage method. 1... Directory memory, 2... Data memory, 4... Tag comparator, 5... Internal data bus, 6... Write buffer (store buffer), 1
0...Cache memory. Figure 2 crI BH Figure 4 (A) (B) Figure 5 Figure 6 '□ (X5-1←=]- Figure 7 Figure 8

Claims (1)

【特許請求の範囲】 1、セントラルプロセッシングユニットおよびメインメ
モリから転送されたデータの入るデータメモリ部と、該
データメモリ部に格納されたデータのメインメモリ上で
の記憶位置を示すアドレスタグの入るディレクトリメモ
リ部と、外部から入力されたアドレスと上記ディレクト
リメモリ部から読み出されたアドレスタグとを比較する
タグ比較器とを備えたバッファ記憶装置において、セン
トラルプロセッシングユニットから供給された書込み用
のアドレスとデータを一時的に保持する複数個のデュア
ルポートレジスタからなるバッファを設けたことを特徴
とするバッファ記憶装置。 2、上記バッファを構成する各レジスタには、そのレジ
スタの状態を示すビットが設けられていることを特徴と
する請求項1記載のバッファ記憶装置。 3、外部よりの書込みと、セントラルプロセッシングユ
ニットから供給された書込み用のアドレスおよびデータ
を格納するバッファから内部のデータメモリ部へのデー
タ転送を非同期に行なうようにしたことを特徴とする請
求項1記載のバッファ記憶装置。 4、外部から供給されたアドレスと上記バッファ内のア
ドレスとを比較するアドレス比較器を備え、両者が一致
したときに対応するレジスタ内のデータがバス上へ出力
可能にされていることを特徴とする請求項1または請求
項2記載のバッファ記憶制御装置。
[Claims] 1. A data memory section into which data transferred from the central processing unit and the main memory is stored, and a directory into which an address tag indicating the storage location on the main memory of the data stored in the data memory section is stored. In a buffer storage device comprising a memory section and a tag comparator that compares an address input from the outside with an address tag read from the directory memory section, a write address supplied from a central processing unit and a tag comparator are provided. 1. A buffer storage device comprising a buffer consisting of a plurality of dual port registers that temporarily holds data. 2. The buffer storage device according to claim 1, wherein each register constituting the buffer is provided with a bit indicating the state of the register. 3. Claim 1, characterized in that writing from the outside and data transfer from a buffer storing write addresses and data supplied from the central processing unit to an internal data memory section are performed asynchronously. Buffer storage as described. 4. It is characterized by being equipped with an address comparator that compares the address supplied from the outside with the address in the buffer, and when the two match, the data in the corresponding register can be output onto the bus. The buffer storage control device according to claim 1 or claim 2.
JP63155698A 1988-06-10 1988-06-22 Buffer storage device Pending JPH01320555A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP63155698A JPH01320555A (en) 1988-06-22 1988-06-22 Buffer storage device
KR1019890007950A KR970000837B1 (en) 1988-06-10 1989-06-09 Single chip cache memory
KR94011054A KR970000839B1 (en) 1988-06-10 1994-05-20 Memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63155698A JPH01320555A (en) 1988-06-22 1988-06-22 Buffer storage device

Publications (1)

Publication Number Publication Date
JPH01320555A true JPH01320555A (en) 1989-12-26

Family

ID=15611567

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63155698A Pending JPH01320555A (en) 1988-06-10 1988-06-22 Buffer storage device

Country Status (1)

Country Link
JP (1) JPH01320555A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120110230A1 (en) * 2005-03-30 2012-05-03 Canon Kabushiki Kaisha Device for arbitrating bus accesses and method for controlling same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120110230A1 (en) * 2005-03-30 2012-05-03 Canon Kabushiki Kaisha Device for arbitrating bus accesses and method for controlling same
US8706939B2 (en) * 2005-03-30 2014-04-22 Canon Kabushiki Kaisha Device for arbitrating bus accesses and method for controlling same

Similar Documents

Publication Publication Date Title
US6604180B2 (en) Pipelined memory controller
JP3218773B2 (en) Cache controller
US6295592B1 (en) Method of processing memory requests in a pipelined memory controller
US6389514B1 (en) Method and computer system for speculatively closing pages in memory
US4453230A (en) Address conversion system
US6226722B1 (en) Integrated level two cache and controller with multiple ports, L1 bypass and concurrent accessing
EP0375121B1 (en) Method and apparatus for efficient DRAM control
US5329629A (en) Apparatus and method for reading, writing, and refreshing memory with direct virtual or physical access
EP0700003B1 (en) Data processor with controlled burst memory accesses and method therefor
KR100955433B1 (en) Cache memory having pipeline structure and method for controlling the same
US5329489A (en) DRAM having exclusively enabled column buffer blocks
JPH04230551A (en) Cache memory of hierarchical integrated circuit
US6219765B1 (en) Memory paging control apparatus
US5440717A (en) Computer pipeline including dual-ported, content-addressable writebuffer
JP4071942B2 (en) Data processing apparatus and data processor
US6219764B1 (en) Memory paging control method
KR950006590B1 (en) Microprocessor with a cache memory
JP2003256275A (en) Bank conflict determination
US5253358A (en) Cache memory expansion and transparent interconnection
US5553270A (en) Apparatus for providing improved memory access in page mode access systems with pipelined cache access and main memory address replay
JP2002007373A (en) Semiconductor device
US5359557A (en) Dual-port array with storage redundancy having a cross-write operation
US20040049642A1 (en) Method and architecture capable of accessing data and instructions using store and forward
JPH01320555A (en) Buffer storage device
JPH01235100A (en) Semiconductor memory device