JP2003173291A - Memory controller - Google Patents
Memory controllerInfo
- Publication number
- JP2003173291A JP2003173291A JP2001373084A JP2001373084A JP2003173291A JP 2003173291 A JP2003173291 A JP 2003173291A JP 2001373084 A JP2001373084 A JP 2001373084A JP 2001373084 A JP2001373084 A JP 2001373084A JP 2003173291 A JP2003173291 A JP 2003173291A
- Authority
- JP
- Japan
- Prior art keywords
- address
- read
- data
- prefetch buffer
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Abstract
(57)【要約】
【目的】 アクセス効率とプリフェッチバッファの有効
性の向上を図ることができるメモリ制御装置を提供する
こと。
【構成】 複数のマスタと接続し他方でメモリバスを介
してメモリデバイスと接続し、前記複数のマスタからの
要求に応じて前記メモリデバイスに対して書き込んで読
み出し動作を行うメモリ制御装置において、先行読み出
し動作を行ってその結果を保持するプリフェッチバッフ
ァと、アドレス範囲を指定する手段と、読み出し要求ア
ドレスとアドレス範囲指定手段の保持する情報とを比較
する手段とを設け、読み出し要求アドレスが前記アドレ
ス範囲指定手段によって指定された範囲内にある場合に
のみ前記先行読み出し動作の結果を前記プリフェッチバ
ッファに格納するよう制御する。
(57) [Summary] [Object] To provide a memory control device capable of improving access efficiency and effectiveness of a prefetch buffer. In a memory control device connected to a plurality of masters and connected to a memory device via a memory bus on the other side and performing a write operation and a read operation on the memory device in response to a request from the plurality of masters, A prefetch buffer for performing a read operation and storing the result; means for designating an address range; and means for comparing a read request address with information held by the address range designating means. Only when the value is within the range specified by the specifying means, the result of the preceding read operation is controlled to be stored in the prefetch buffer.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、コンピュータシス
テムにおけるメモリ制御装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory control device in a computer system.
【0002】[0002]
【従来の技術】近年においてもCPUの高速化は止まる
ところを知らず、年間1.5倍以上のペースで向上して
いる。これに伴い単位時間当たりに主記憶装置との間で
転送されるデータ量も同様なペースで増加している。こ
れを緩和するため、メモリアクセスの局所性を利用し、
高速な記憶アクセスを得るためにCPUに備え付けられ
るキャッシュの容量を増大したり、或はこれを階層化す
ることが行われている。2. Description of the Related Art In recent years, CPU speeds have never stopped increasing, and they are improving at a pace of 1.5 times or more per year. Along with this, the amount of data transferred to and from the main storage device per unit time is also increasing at a similar pace. To mitigate this, use the locality of memory access,
In order to obtain high-speed storage access, the capacity of the cache provided in the CPU has been increased, or the cache has been hierarchized.
【0003】しかし、それでもCPUの動作速度と主記
憶のアクセス速度のギャップの増大を解決することは年
々難しくなっている。これを根本的に解決するには、主
記憶それ自体のアクセス速度(メモリバンド幅)を大幅
に向上する必要がある。今日パーソナルコンピュータ
(PC)等の主記憶装置には通常半導体メモリであるダ
イナミックRAM(DRAM)が用いられている。CP
Uの速度向上は半導体デバイス自体の進歩による速度の
向上を超えているため、DRAMにおいても回路構成或
は方式面での工夫によりこれを達成しなければならな
い。However, it is still difficult to solve the increase in the gap between the operating speed of the CPU and the access speed of the main memory year after year. To solve this fundamentally, it is necessary to greatly improve the access speed (memory bandwidth) of the main memory itself. Today, a dynamic RAM (DRAM) which is a semiconductor memory is usually used for a main memory such as a personal computer (PC). CP
Since the speed improvement of U exceeds the speed improvement due to the progress of the semiconductor device itself, this must be achieved also in the DRAM by devising the circuit configuration or method.
【0004】このような経緯から、過去メモリバンド幅
を向上させるための様々な方式が考案され実用化されて
きたが、最近新たに実用化され注目を浴びている方式と
してダイレクトラムバスDRAMが挙げられる。ダイレ
クトラムバスDRAMではチャネルの概念を取り入れ1
チャネル当たり最大毎秒1.6GBの高いメモリバンド
幅を実現することができる。From such a background, various methods for improving the memory bandwidth in the past have been devised and put into practical use. Direct Rambus DRAM is one of the methods recently put into practical use and drawing attention. . Direct Rambus DRAM incorporates the concept of channel 1
High memory bandwidths of up to 1.6 GB per second per channel can be realized.
【0005】図1にダイレクトラムバスDRAMのRS
Lチャネルにおける転送プロトコルの一例を示す。ダイ
レクトラムバスでは1クロックサイクル当たりクロック
の立ち上がり立ち下がりの両タイミングでデータを転送
し、4クロックで1つのパケットを構成する。図1で
は、先ずサイクル0〜3において‘x’で指定されるペ
ージをアクティベートするロウパケットが発行されてい
る。ここに、‘x’はそれぞれ特定のビット数から成る
デバイスID、バンクアドレス、ロウアドレスの組を表
している。FIG. 1 shows an RS of a direct Rambus DRAM.
An example of a transfer protocol in the L channel is shown. In the direct Rambus, data is transferred at both rising and falling timings of a clock per one clock cycle, and one packet is formed by four clocks. In FIG. 1, first, in cycles 0 to 3, a row packet for activating a page designated by'x 'is issued. Here, 'x' represents a set of a device ID, a bank address, and a row address each having a specific number of bits.
【0006】次いで、サイクル7〜10において‘x
0’で指定されるアドレスのデータを読み出すことを指
示するカラムパケットが発行されている。ここに、‘x
0’はそれぞれ特定のビット数から成るデバイスID、
バンクアドレス、カラムアドレスの組を表しており、こ
こにおけるデバイスID、バンクアドレスは‘x’にお
けるものと同一である。カラムアドレスはページ内の1
つのアドレスを指定する。Then, in cycles 7-10, 'x
A column packet instructing to read the data of the address designated by 0'is issued. Where'x
0'is a device ID consisting of a specific number of bits,
It represents a set of bank address and column address, and the device ID and bank address here are the same as those in'x '. The column address is 1 in the page
Specify one address.
【0007】更に、サイクル11〜14において、‘x
1’で指定されるアドレスのデータを読み出すことを指
示するカラムパケットが発行されている。ここに、‘x
1’はそれぞれ特定のビット数から成るデバイスID、
バンクアドレス、カラムアドレスの組を表しており、こ
こでもデバイスID、バンクアドレスは‘x’における
ものと同一である。即ち、これらロウパケット、カラム
パケットの組により同一デバイス、同一バンク、同一ペ
ージ内の2つのアドレスからのリードが実行される。Further, in cycles 11-14, the'x
A column packet instructing to read the data of the address designated by 1'is issued. Where'x
1'is a device ID consisting of a specific number of bits,
It represents a set of bank address and column address, and the device ID and bank address are the same as those in'x 'here as well. That is, reading from two addresses in the same device, the same bank, and the same page is executed by a set of these row packets and column packets.
【0008】サイクル19〜22において、1番目(x
0)のリードコマンドに対応するデータがDRAMから
読み出され、サイクル23〜26において、2番目(x
1)のリードコマンドに対応するデータがDRAMから
読み出されている。In cycles 19-22, the first (x
The data corresponding to the read command of 0) is read from the DRAM and the second (x
Data corresponding to the read command 1) is read from the DRAM.
【0009】図1に示す例では、この一連のリード動作
と並行して他のバンクからのリードも行われている。即
ち、サイクル8〜11において‘y’で指定されるペー
ジをアクティベートするロウパケットが発行されてい
る。ここに、‘y’は先行する‘x’とは別のバンク
(別のデバイスか同じデバイスの干渉しないバンク)に
位置するページを指している。In the example shown in FIG. 1, reading from another bank is also performed in parallel with this series of read operations. That is, in cycles 8 to 11, row packets for activating the page designated by'y 'are issued. Here, 'y' refers to a page located in a different bank (a different device or a non-interfering bank of the same device) from the preceding'x '.
【0010】次いで、サイクル15〜18において‘y
0’で指定されるアドレスのデータを読み出すことを指
示するカラムパケットが発行されている。ここに、‘y
0’におけるデバイスID、バンクアドレスは‘y’に
おけるものと同一である。Then, in cycles 15-18, 'y
A column packet instructing to read the data of the address designated by 0'is issued. Where'y
The device ID and bank address at 0'are the same as those at'y '.
【0011】更に、サイクル19〜22において‘y
1’で指定されるアドレスのデータを読み出すことを指
示するカラムパケットが発行されている。ここでも、
‘y1’におけるデバイスID、バンクアドレスは
‘y’におけるものと同一である。サイクル27〜30
において、3番目(y0)のリードコマンドに対応する
データがDRAMから読み出され、サイクル31〜34
において、4番目(y1)のリードコマンドに対応する
データがDRAMから読み出されている。Further, in cycles 19 to 22, 'y
A column packet instructing to read the data of the address designated by 1'is issued. even here,
The device ID and bank address in "y1" are the same as those in "y". Cycle 27-30
, The data corresponding to the third (y0) read command is read from the DRAM, and the cycles 31 to 34
At, the data corresponding to the fourth (y1) read command is read from the DRAM.
【0012】以下、‘z’,‘z0’,‘z1’,
‘q’,‘q0’,‘q1’についても同様であり、
‘x’,‘y’とは干渉しないバンク‘q’のアクティ
ベート及び‘x’,‘y’,‘z’とは干渉しないバン
ク‘q’のアクティベートが行われ、5番目(z0)、
6番目(z1)、7 番目(q0)、8番目(q1)のリ
ードコマンドの発行に応じてそれぞれのデータが読み出
されている。このように連続するコマンドがロウパケッ
ト、カラムパケット、データバケットの各フェーズ毎に
パイプライン動作を行っている。このようにして、ダイ
レクトラムバスDRAMでは4段のパイプラインで32
バイト単位でアクセスした場合に最大のバンド幅が得ら
れる。Hereinafter, "z", "z0", "z1",
The same applies to "q", "q0", and "q1".
The activation of the bank'q 'that does not interfere with'x'and'y'and the activation of the bank'q' that does not interfere with'x ',' y 'and'z' are performed, and the fifth (z0),
The respective data is read in response to the issuance of the sixth (z1), seventh (q0), and eighth (q1) read commands. In this way, continuous commands perform pipeline operation for each phase of row packet, column packet, and data bucket. In this way, the direct Rambus DRAM has 32 pipelines with 4 stages.
Maximum bandwidth is obtained when accessed in bytes.
【0013】それ故、32バイトより小さいサイズでの
アクセスでは実効バンド幅が低下してしまう。例えば、
連続する32バイトのデータを一度に32バイトまとめ
てリードした場合と、16バイトずつ2回に分けてリー
ドした場合、前者の方が効率が良く短時間で終了する。
もし、32バイトより小さい単位のアクセスが頻繁に生
じるような場合には、メモリコントローラ内にプリフェ
ッチバッファを備えることによりアクセス効率を向上す
ることが可能である。Therefore, the effective bandwidth is lowered in the access with the size smaller than 32 bytes. For example,
In the case where continuous 32 bytes of data are collectively read in 32 bytes at a time, or when 16 bytes are read in two times, the former is more efficient and ends in a shorter time.
If access in units smaller than 32 bytes occurs frequently, it is possible to improve access efficiency by providing a prefetch buffer in the memory controller.
【0014】図2はプリフェッチバッファを備えるメモ
リコントローラの従来例の一構成例を説明する図であ
る。FIG. 2 is a diagram for explaining a configuration example of a conventional example of a memory controller having a prefetch buffer.
【0015】図2において、200はメモリコントロー
ラであり、システムバス210を介してCPUやDMA
コントローラ、バスブリッジ等のバスマスタ220,2
21,222,223と接続されると共にDRAM(本
例においてはダイレクトRDRAM)230,231,
232,233と接続される。前記バスマスタ220,
221,222,223はシステムバス上でのアクセス
競合を避けるため、図示されない調停装置によってアク
セスを調停され、同時に1つのマスタのみ前記メモリコ
ントローラ200にアクセスすることができるようにな
っている。241は双方向のデータ信号(DQA[8:
0],DQB[8:0])線であり、ライト時はメモリ
コントローラからDRAMへ、リード時にはDRAMか
らメモリコントローラヘデータを伝送する。242,2
43はそれぞれロウ信号(ROW[2:0])、カラム
信号(COL[4:0])線であり、メモリコントロー
ラからDRAMへそれぞれロウパケット、カラムパケッ
トを伝送する。244,255はチャネル上のクロック
信号(CTM,CFM)である。In FIG. 2, reference numeral 200 denotes a memory controller, which is a CPU or a DMA via the system bus 210.
Bus masters 220, 2 such as controllers and bus bridges
DRAM (direct RDRAM in this example) 230, 231, connected to 21, 222, 223
232, 233. The bus master 220,
In order to avoid access contention on the system bus, the access of 221, 222, and 223 is arbitrated by an arbitration device (not shown), and only one master can access the memory controller 200 at the same time. 241 is a bidirectional data signal (DQA [8:
0], DQB [8: 0]) line, and transmits data from the memory controller to the DRAM at the time of writing, and from the DRAM to the memory controller at the time of reading. 242,2
Reference numerals 43 are row signal (ROW [2: 0]) and column signal (COL [4: 0]) lines, respectively, for transmitting row packets and column packets from the memory controller to the DRAM. 244 and 255 are clock signals (CTM, CFM) on the channels.
【0016】201〜205は前記メモリコントローラ
200の構成要素である。203はシステムバスと接続
するためのシステムバスインターフェース回路である。
204はリード・ライトコマンドを一時格納しておくた
めのバッファである。202はリード・ライトコマンド
をメモリチャネル上のプロトコルに翻案してチャネル上
に送出し、又、リードデータをチャネルから受け取るた
めのメモリチャネルインターフェース回路である。20
5は必要に応じリードデータの一部とそのアドレスを格
納し、又、必要に応じて格納するデータをシステムバス
インターフェース203に転送するプリフェッチバッフ
ァであり、保持しているアドレス・データが有効である
か無効であるかを示す図示されない有効フラグを備えて
いる。201はメモリコントローラの各ブロックの動作
タイミングを制御する制御装置である。Reference numerals 201 to 205 are components of the memory controller 200. Reference numeral 203 denotes a system bus interface circuit for connecting to the system bus.
Reference numeral 204 is a buffer for temporarily storing the read / write command. Reference numeral 202 denotes a memory channel interface circuit for adapting the read / write command to the protocol on the memory channel and transmitting the read data to the channel, and for receiving read data from the channel. 20
A prefetch buffer 5 stores a part of read data and its address as necessary, and transfers the stored data to the system bus interface 203 as needed, and the address data held therein is effective. It has a valid flag (not shown) indicating whether it is invalid or invalid. A control device 201 controls the operation timing of each block of the memory controller.
【0017】一般にメモリヘのアクセスには局所性があ
り、メモリ内の或る番地からデータが読み出されたと
き、続く番地のデータが短時間のうちに読み出されるこ
とを高い確率で期待できる。前記バスマスタ220より
16バイトのリードアクセスが生じたとき、前記メモリ
コントローラ200はその指定されたアドレスのデータ
とともに、後続のアドレスに存在する16バイトのデー
タを含む32バイトのデータを前記DRAM230,2
31,232,233の何れかから行う。そして、指定
された16バイトのデータは前記システムバス210を
介してデータを要求した前記バスマスタ220に転送
し、残りの16バイトのデータを前記プリフェッチバッ
ファ205に格納し保持しておく。その後、前記何れか
のバスマスタより該後続アドレスヘのアクセス要求が生
じたとき、前記メモリコントローラ200は前記DRA
Mに対するリード動作を行わず、代わりに前記プリフェ
ッチバッファ205内に保持している前記データを前記
システムバスインターフェース203を介して前記アク
セス要求を出したバスマスタに転送する。Generally, access to the memory has locality, and when data is read from a certain address in the memory, it can be expected with a high probability that the data of the subsequent addresses will be read in a short time. When a 16-byte read access is generated from the bus master 220, the memory controller 200 stores the 32-byte data including the 16-byte data existing in the succeeding address together with the data of the designated address.
It is performed from any one of 31, 322, and 233. Then, the designated 16-byte data is transferred to the bus master 220 that requested the data via the system bus 210, and the remaining 16-byte data is stored and held in the prefetch buffer 205. After that, when an access request to the subsequent address is issued from any of the bus masters, the memory controller 200 causes the DRA
The read operation for M is not performed, and instead, the data held in the prefetch buffer 205 is transferred to the bus master that issued the access request via the system bus interface 203.
【0018】例えば、前記バスマスタ220からアドレ
ス‘h00120番地(‘hは16進数を表す)から
‘h0012f番地までに格納されている16バイトの
データに対するリードアクセス要求があったとする。こ
れらアドレスが前記DRAM230に割り当てられてい
るとすれば、前記メモリコントローラ200はこの要求
を受け付け一旦バッファ204に格納し、その後、メモ
リチャネルインターフェース202を通じて前記DRA
M230の当該番地に対するリードコマンドバケットを
送出する。このとき、更に当該番地の後続の16バイト
を読み出すカラムパケットも送出する。前記DRAM2
30はこれらリードコマンドに呼応し、既定の遅延時間
の後、当該連続番地に格納している合計32バイトのデ
ータを順次チャネル上に送出する。For example, it is assumed that there is a read access request from the bus master 220 for 16-byte data stored at addresses'h00120 ('h represents a hexadecimal number) to'h0012f. If these addresses are assigned to the DRAM 230, the memory controller 200 accepts this request, stores it in the buffer 204 once, and then, through the memory channel interface 202, the DRA.
The read command bucket for the address of M230 is transmitted. At this time, a column packet for reading the subsequent 16 bytes of the address is also transmitted. The DRAM 2
In response to these read commands, 30 sends out a total of 32 bytes of data stored in the continuous address to the channel sequentially after a predetermined delay time.
【0019】前記メモリコントローラ200は前記チャ
ネル上に送出された32バイトのデータを前記メモリチ
ャネルインターフェース202において受け取ると、該
データ中前半の16バイトをシステムバスインターフェ
ース203から前記システムバス210を介して前記バ
スマスタ220に送信する。When the memory controller 200 receives the 32-byte data sent on the channel at the memory channel interface 202, the first 16 bytes of the data are transferred from the system bus interface 203 to the system bus 210 via the system bus 210. It transmits to the bus master 220.
【0020】一方、後半の16バイトについてはその先
頭アドレス‘h00130番地と共に前記プリフェッチ
バッファ205に格納するとともに、プリフェッチバッ
ファ205の内容が有効であることを示す有効フラグを
立てる。その後、再び前記バスマスタ220よりアドレ
ス‘h00130番地(‘hは16進数を表す)から
‘h0013f番地までに格納されている16バイトの
データに対するリードアクセス要求があった場合、直ち
に前記プリフェッチバッファ205内の16バイトのデ
ータを前記システムバスインターフェース203から前
記システムバス210を介して前記バスマスタ220に
送信する。このようにしてメモリアクセスの効率を高め
るとともに、リードレイテンシを大幅に減少させること
ができる。On the other hand, the latter half 16 bytes are stored in the prefetch buffer 205 together with the start address'h00130 and a valid flag indicating that the content of the prefetch buffer 205 is valid is set. After that, when the bus master 220 again makes a read access request for the 16-byte data stored from the address'h00130 ('h represents a hexadecimal number) to the address'h0013f, the prefetch buffer 205 is immediately stored in the prefetch buffer 205. 16 bytes of data are transmitted from the system bus interface 203 to the bus master 220 via the system bus 210. In this way, the efficiency of memory access can be improved and the read latency can be significantly reduced.
【0021】もし、リードアクセスが生じて任意のアド
レスのデータを前記プリフェッチバッファ205に格納
した後、同一アドレスに対してライトアクセスが生じた
場合、前記メモリコントローラ200は前記プリフェッ
チバッファ205の保持する内容を無効化する。前記例
においては‘h00130番地〜‘h0013f番地ま
での連続する16バイトのデータをプリフェッチバッフ
ァ205に格納した後、バスマスタ222が同一アドレ
ス範囲或はこのアドレス範囲と重複するアドレス範囲に
対するライト要求を発行した場合、メモリコントローラ
200はプリフェッチバッファ205内の前記有効フラ
グを直ちにリセットする。このようにして古いデータが
バスマスタに返されるのを防ぎ、データの一貫性を保つ
ことができる。If a read access occurs and data of an arbitrary address is stored in the prefetch buffer 205, and then a write access occurs to the same address, the memory controller 200 holds the contents of the prefetch buffer 205. Invalidate. In the above example, after storing continuous 16-byte data from address “h00130” to address “h0013f” in the prefetch buffer 205, the bus master 222 issues a write request for the same address range or an address range overlapping with this address range. In this case, the memory controller 200 immediately resets the valid flag in the prefetch buffer 205. In this way, old data can be prevented from being returned to the bus master and the data can be kept consistent.
【0022】[0022]
【発明が解決しようとする課題】上述のようにメモリコ
ントローラにプリフェッチバッファを付加する場合、多
くのエントリ(バッファに格納するアドレスとデータの
対)を備えると回路規模が増大してしまう。そのため、
前記例においては1エントリのみを備えている。このと
き、1つのバスマスタのみ存在し、該マスタが局所的に
データをアクセスする場合にはプリフェッチバッファは
有効に機能するが、もしバスマスクが複数存在し、それ
らが交互に異なったアドレス範囲のデータをアクセスす
る場合、プリフェッチバッファの内容が参照される前に
置き換えられる状況が頻繁に生じ、プリフェッチバッフ
ァの有効性が損なわれてしまう。When the prefetch buffer is added to the memory controller as described above, the circuit scale increases if a large number of entries (address and data pairs to be stored in the buffer) are provided. for that reason,
In the above example, only one entry is provided. At this time, if there is only one bus master, and the master locally accesses the data, the prefetch buffer functions effectively, but if there are multiple bus masks, and they exist in different address ranges. When accessing the prefetch buffer, the contents of the prefetch buffer are frequently replaced before being referred to, and the effectiveness of the prefetch buffer is impaired.
【0023】例として、図3に2つのバスマスタ22
0’と222’がそれぞれ‘h10020番地〜‘h1
0fff番地までと‘h8a50番地〜‘h8c7f番
地までのアドレス範囲を連続的に16バイト毎にリード
する場合を示す。第1サイクルからバスマスタ220が
‘h10020番地〜‘h1002f番地までの16バ
イトのデータに対するリードアクセス要求を発行してい
る。この結果として第5サイクルにはプリフェッチバッ
ファ205には‘h10030番地〜‘h1003f番
地までの16バイトのデータが格納される。As an example, FIG. 3 shows two bus masters 22.
0'and 222 'are from'h10020'to'h1'
The case where address ranges from 0fff and from'h8a50 'to'h8c7f' are read continuously every 16 bytes is shown. From the first cycle, the bus master 220 issues a read access request for 16-byte data from the address “h10020” to the address “h1002f”. As a result, in the fifth cycle, the prefetch buffer 205 stores 16-byte data from the address “h10030” to the address “h1003f”.
【0024】次いで、第6サイクルにおいてバスマスタ
223が‘h8a40番地〜‘h8a4f番地までの1
6バイトのデータに対するリードアクセス要求を発行し
ている。これにより第10サイクルには、プリフェッチ
バッファ205は以前のデータを全く参照されることな
く‘h8a50番地〜‘h8a5f番地までの16バイ
トのデータに置き換えられてしまう。Next, in the sixth cycle, the bus master 223 sets 1 from the address'h8a40 to the address'h8a4f.
A read access request for 6-byte data is issued. As a result, in the tenth cycle, the prefetch buffer 205 is replaced with the 16-byte data from the address “h8a50” to the address “h8a5f” without referring to the previous data.
【0025】その後、第11サイクルでバスマスタ22
0が前回リードしたデータに続く‘h10030番地〜
‘h1003f番地までの16バイトのデータに対する
リードアクセス要求を発行する。このアドレスに対応す
るデータはプリフェッチバッファ205に既に存在しな
いため、再びメモリから読み出されることになり、第1
5サイクルにはプリフェッチバッファ205の内容は後
続アドレス‘h10040番地〜‘h1004f番地ま
での16バイトのデータに置き換えられる。Then, in the 11th cycle, the bus master 22
0 follows the data that was read last time.
Issue a read access request for 16-byte data up to address'h1003f. Since the data corresponding to this address does not already exist in the prefetch buffer 205, it will be read again from the memory, and the first
In 5 cycles, the contents of the prefetch buffer 205 are replaced with 16-byte data from the subsequent address'h10040 'to'h1004f'.
【0026】第16サイクルにおいて、バスマスタ22
3が前回リードしたデータに続く‘h8a50番地〜
‘h8a5f番地までの16バイトのデータに対するリ
ードアクセス要求を発行する。このアドレスに対応する
データも最早プリフェッチバッファ205内には存在し
ないため、再びメモリから読み出されなければならな
い。このように複数のバスマスタが同時に動作する場
合、少数のエントリのみ備えるプリフェッチバッファは
有効に機能できない。In the 16th cycle, the bus master 22
Following the data that 3 read last time, 'h8a50 address ~
Issue a read access request for 16-byte data up to address h8a5f. The data corresponding to this address no longer exists in the prefetch buffer 205, so it must be read again from the memory. When a plurality of bus masters operate simultaneously in this way, the prefetch buffer having only a small number of entries cannot function effectively.
【0027】本発明は上記問題に鑑みてなされたもの
で、その目的とする処は、アクセス効率とプリフェッチ
バッファの有効性の向上を図ることができるメモリ制御
装置を提供することにある。The present invention has been made in view of the above problems, and an object thereof is to provide a memory control device capable of improving access efficiency and effectiveness of a prefetch buffer.
【0028】[0028]
【課題を解決するための手段】上記目的を達成するた
め、本発明は、複数のマスタと接続し他方でメモリバス
を介してメモリデバイスと接続し、前記複数のマスタか
らの要求に応じて前記メモリデバイスに対して書き込ん
で読み出し動作を行うメモリ制御装置において、先行読
み出し動作を行ってその結果を保持するプリフェッチバ
ッファと、アドレス範囲を指定する手段と、読み出し要
求アドレスとアドレス範囲指定手段の保持する情報とを
比較する手段とを設け、読み出し要求アドレスが前記ア
ドレス範囲指定手段によって指定された範囲内にある場
合にのみ前記先行読み出し動作の結果を前記プリフェッ
チバッファに格納するよう制御することを特徴とする。In order to achieve the above-mentioned object, the present invention connects to a plurality of masters and, on the other hand, to a memory device via a memory bus, and according to a request from the plurality of masters, In a memory control device that performs a read operation by writing to a memory device, a prefetch buffer that performs a preceding read operation and holds the result, a unit that specifies an address range, and a read request address and an address range specification unit that holds the result Means for comparing with information, and controlling to store the result of the preceding read operation in the prefetch buffer only when the read request address is within the range designated by the address range designating means. To do.
【0029】[0029]
【発明の実施の形態】以下に本発明の実施の形態を図4
〜図6に基づいて説明する。BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to FIG.
~ It demonstrates based on FIG.
【0030】以下、比較のため図2と同一の構成要素に
ついては番号に’を付けて示している。For the sake of comparison, the same components as those shown in FIG. 2 are indicated by adding'to the numbers.
【0031】図4が図2と異なるのは、207のアドレ
ス範囲指定レジスタと208の比較器が追加されている
点である。前記アドレス範囲指定レジスタ207は指定
するアドレス範囲の下限値と上限値を1組又は複数組保
持するレジスタである。前記比較器208は図6に示す
ように2つのコンパレータとそれらの出力をANDする
ゲートを前記アドレス範囲指定レジスタ207で指定さ
れるアドレス範囲の紙数分を持ち、更にそれらの出力を
ORするゲートから構成される。本実施の形態では、読
み出し動作時におけるアドレスがアドレス範囲指定レジ
スタ207によって指定されるアドレス範囲と比較器2
08により比較され、その範囲内にある場合のみプリフ
ェッチバッファ205’の内容を置き換えることが可能
になる。FIG. 4 differs from FIG. 2 in that an address range designation register 207 and a comparator 208 are added. The address range designation register 207 is a register that holds one set or a plurality of sets of lower limit values and upper limit values of the designated address range. As shown in FIG. 6, the comparator 208 has a gate for ANDing two comparators and their outputs for the number of sheets in the address range designated by the address range designation register 207, and a gate for ORing their outputs. Composed of. In the present embodiment, the address at the time of the read operation is compared with the address range designated by the address range designation register 207 and the comparator 2.
08, it is possible to replace the contents of the prefetch buffer 205 ′ only if it is within that range.
【0032】今、2つのバスマスタ220’と222’
がそれぞれ‘h10020番地〜‘h10ff番地まで
と‘h8a50番地〜‘h8c7f番地までのアドレス
範囲を連続的に16バイト毎にリードし、又、前記アド
レス範囲指定レジスタ207に連続した1つのアドレス
範囲‘h10000〜‘h2000を設定した場合を例
としてシステムバス上の動作例を図5に説明する。Now, two bus masters 220 'and 222'
Respectively read the address ranges from'h10020 'to'h10ff'and'h8a50'to'h8c7f' in units of 16 bytes continuously, and one address range'h10000 continuous to the address range designation register 207. An example of operation on the system bus will be described with reference to FIG.
【0033】第1サイクルからバスマスタ220’が
‘h10020番地〜‘h1002f番地までの16バ
イトのデータに対するリードアクセス要求を発行してい
る。メモリコントローラ200’はこのアドレスと前記
アドレス範囲指定レジスタ207で指定されるアドレス
範囲の下限‘h10000と上限‘h20000が前記
比較器208において比較された結果から、この読み出
し動作によりプリフェッチバッファ205’の内容を置
き換えるよう制御する。結果として第5サイクルにはプ
リフェッチバッファ205’に前記リードアクセスにお
いて要求されたアドレス‘h10020番地から‘h1
002f番地に続く‘h10030番地〜‘h1003
f番地までの16バイトのデータが格納される。From the first cycle, the bus master 220 'issues a read access request for 16-byte data from the address "h10020" to the address "h1002f". The memory controller 200 'compares the address with the lower limit'h10000' and the upper limit'h20000 of the address range designated by the address range designation register 207 in the comparator 208, and based on the result of this read operation, the contents of the prefetch buffer 205 '. Control to replace. As a result, in the fifth cycle, the prefetch buffer 205 'starts from the address'h10020' requested to'h1 'in the read access.
'H10030' ~ 'h1003' following 002f
16 bytes of data up to address f are stored.
【0034】次いで第6サイクルからバスマスタ22
3’が‘h8a50番地〜‘h8a5f番地までの16
バイトのデータに対するリードアクセス要求を発行して
いる。メモリコントローラ200’はこのアドレスと前
記アドレス範囲指定レジスタ207で指定されるアドレ
ス範囲の下限‘h10000と上限‘h20000が前
記比較器208において比較された結果から、今度はこ
の読み出し動作によりプリフェッチバッファ205’の
内容を置き換えないように制御する。その結果このリー
ドアクセスによってはプリフェッチバッファ205’の
内容に変化はない。Next, from the sixth cycle, the bus master 22
3'is 16 from'h8a50 to'h8a5f
A read access request for byte data is issued. The memory controller 200 'compares this address with the lower limit'h10000' and the upper limit'h20000 of the address range designated by the address range designation register 207 in the comparator 208, and this time, this read operation causes the prefetch buffer 205 '. Controls not to replace the contents of. As a result, the contents of the prefetch buffer 205 'are not changed by this read access.
【0035】その後、第11サイクルからバスマスタ2
20’が前回リードしたデータに続く‘h10030番
地〜‘h1003f番地までの16バイトのデータに対
するリードアクセス要求を発行する。前記従来例とは異
なり、このアドレスに対応するデータはプリフェッチバ
ッファ205’に尚存在するため、第12サイクルでそ
の内容が直ちにシステムバス210’を通じてバスマス
タ220’に渡される。After that, the bus master 2 starts from the 11th cycle.
20 'issues a read access request for 16-byte data from'h10030'to'h1003f'following the previously read data. Unlike the conventional example, since the data corresponding to this address still exists in the prefetch buffer 205 ', its contents are immediately transferred to the bus master 220' through the system bus 210 'in the 12th cycle.
【0036】第14サイクルからバスマスタ220’が
前回リードしたデータに続く‘h10040番地〜‘h
1004f番地までの16バイトのデータに対するリー
ドアクセス要求を発行している。この結果、第18サイ
クルにはプリフェッチバッファ205’は‘h1005
0番地〜‘h1005f番地までの16バイトのデータ
に置き換えられる。以降同様にして、バスマスタ22
0’が読み出しを要求するアドレス範囲のみがプリフェ
ッチバッファの内容を置き換えることができるため、バ
スマスタ220’はプリフェッチバッファの機能を有効
に利用できる。From the 14th cycle, the address "h10040" to "h" following the data previously read by the bus master 220 '.
A read access request for 16-byte data up to address 1004f is issued. As a result, in the eighteenth cycle, the prefetch buffer 205 ′ has a value of “h1005”.
It is replaced with 16-byte data from address 0 to'h1005f. Similarly, the bus master 22
Only the address range where 0'requires reading can replace the contents of the prefetch buffer, so that the bus master 220 'can effectively use the function of the prefetch buffer.
【0037】又、第19サイクルからバスマスタ22
2’が‘h10040番地〜‘h1005f番地まで3
2バイトのデータをライトしている。このライトは現在
プリフェッチバッファに保持されているアドレス範囲を
包含するため、メモリコントローラ200’はこれら3
2バイトのデータを指定されたアドレスにライトするパ
ケットをメモリチャネルに発行すると同時に有効フラグ
をクリアすることによりプリフェッチバッファ205’
の内容を無効化する。From the 19th cycle, the bus master 22
2'is from'h10040 'to'h1005f' 3
Writing 2 bytes of data. Since this write includes the address range currently held in the prefetch buffer, the memory controller 200 'is
By issuing a packet to write 2-byte data to a specified address to the memory channel and clearing the valid flag at the same time, the prefetch buffer 205 '
Invalidates the contents of.
【0038】第22サイクルからバスマスタ220’が
前回リードしたデータに続く‘h10050番地〜‘h
1005f番地までの16バイトのデータに対するリー
ドアクセス要求を発行するが、プリフェッチバッファ2
05’の内容は既に無効化されているため、このリード
アクセスはDRAMからデータを読み出す。従って、古
いデータがバスマスタ220’に渡されることはない。From the 22nd cycle, the address "h10050" to "h" following the data read last time by the bus master 220 '.
A read access request for 16-byte data up to address 1005f is issued, but the prefetch buffer 2
Since the contents of 05 'have already been invalidated, this read access reads data from the DRAM. Therefore, old data will not be passed to the bus master 220 '.
【0039】以上、本実施の形態ではプリフェッチバッ
ファの持つエントリ数が1の場合について説明したが、
勿論、任意の数のエントリ数の場合にも本発明が適用で
きることは言うまでもない。As described above, in the present embodiment, the case where the prefetch buffer has one entry has been described.
Of course, it goes without saying that the present invention can be applied to an arbitrary number of entries.
【0040】又、本実施の形態においては、プリフェッ
チバッファに格納されるデータは、バスマスクによりリ
ード要求があったアドレスの後続アドレスに格納されて
いるデータとしているが、リード要求のあった該アドレ
スのデータを含む32バイト単位のブロック毎としても
良い。又、本実施の形態では、リード要求のあったアド
レスのデータはプリフェッチバッファに格納していない
が、これを含む32バイトのデータ全てを格納するよう
にしても良い。Further, in the present embodiment, the data stored in the prefetch buffer is the data stored in the subsequent address of the address for which the read request is made by the bus mask, but the address for which the read request is made is made. Alternatively, each block of 32 bytes including the above data may be used. Further, in the present embodiment, the data of the address for which the read request is made is not stored in the prefetch buffer, but all the 32-byte data including this may be stored.
【0041】本実施の形態では、説明の簡単のため32
バイト及び16バイト単位でのリード・ライトアクセス
のみを示しているが、より小さいサイズでアクセスして
も良いことは言うまでもない。その場合、32バイト境
界から該アクセスデータを含む32バイトのデータを同
時にリードし、プリフェッチバッファに格納すれば良
い。In the present embodiment, for simplicity of explanation, 32
Only the read / write access in units of bytes and 16 bytes is shown, but it goes without saying that the access may be performed in a smaller size. In that case, 32-byte data including the access data may be simultaneously read from the 32-byte boundary and stored in the prefetch buffer.
【0042】本実施の形態においては、プリフェッチバ
ッファの保持するデータと重複するアドレス範囲へのラ
イトが生じた場合、プリフェッチバッファの内容を無効
化するようにしているが、勿論、ライトされるデータと
入れ替えるようにしても良い。In this embodiment, the contents of the prefetch buffer are invalidated when a write occurs in an address range overlapping with the data held in the prefetch buffer. It may be replaced.
【0043】又、本実施の形態においては、DRAMと
してダイレクトRDRAMを用いる場合を例とし、32
バイト単位の転送時にバンド幅が最大になる場合を示し
たが、勿論、その他どのような種類のDRAM或は記憶
デバイスにおいても、任意の好適な転送サイズにおいて
本発明が適用できることは言うまでもない。In the present embodiment, the case where a direct RDRAM is used as the DRAM is taken as an example, and 32
Although the case where the bandwidth is maximized at the time of byte transfer is shown, it goes without saying that the present invention can be applied to any other type of DRAM or storage device with any suitable transfer size.
【0044】本実施の形態においては、プリフェッチバ
ッファの内容を置き換え可能なアドレス範囲を設定する
場合を説明したが、勿論、置き換え不可能なアドレス範
囲を設定するようにしても良い。又、アドレス範囲をレ
ジスタに設定するのではなく固定した場合にも本発明を
適用できることは言うまでもない。In the present embodiment, the case where the address range in which the contents of the prefetch buffer can be replaced is set has been described, but it goes without saying that an address range in which replacement is not possible may be set. Further, it goes without saying that the present invention can be applied to a case where the address range is fixed instead of being set in the register.
【0045】[0045]
【発明の効果】以上の説明で明らかなように、本発明に
よれば、複数のマスタと接続し他方でメモリバスを介し
てメモリデバイスと接続し、前記複数のマスタからの要
求に応じて前記メモリデバイスに対して書き込んで読み
出し動作を行うメモリ制御装置において、先行読み出し
動作を行ってその結果を保持するプリフェッチバッファ
と、アドレス範囲を指定する手段と、読み出し要求アド
レスとアドレス範囲指定手段の保持する情報とを比較す
る手段とを設け、読み出し要求アドレスが前記アドレス
範囲指定手段によって指定された範囲内にある場合にの
み前記先行読み出し動作の結果を前記プリフェッチバッ
ファに格納するよう制御するようにしたため、アクセス
効率とプリフェッチバッファの有効性の向上を図ること
ができるという効果が得られる。As is apparent from the above description, according to the present invention, a plurality of masters are connected, and on the other hand, a memory device is connected via a memory bus, and the above-mentioned masters are connected in response to requests from the plurality of masters. In a memory control device that performs a read operation by writing to a memory device, a prefetch buffer that performs a preceding read operation and holds the result, a unit that specifies an address range, and a read request address and an address range specification unit that holds the result A means for comparing information is provided, and the result of the preceding read operation is controlled to be stored in the prefetch buffer only when the read request address is within the range designated by the address range designating means. The effect that access efficiency and the effectiveness of the prefetch buffer can be improved It is obtained.
【図1】ダイレクトRAMバスチャネル上のメモリアク
セスプロトコルの一例を説明するための図である。FIG. 1 is a diagram for explaining an example of a memory access protocol on a direct RAM bus channel.
【図2】従来例におけるメモリコントローラの構成とそ
れを含むシステムを説明する図である。FIG. 2 is a diagram illustrating a configuration of a memory controller in a conventional example and a system including the same.
【図3】従来例におけるシステムバス上のリード・ライ
トアクセスのタイミング及びプリフェッチバッファの内
容を説明するタイミング図である。FIG. 3 is a timing diagram for explaining a read / write access timing on a system bus and contents of a prefetch buffer in a conventional example.
【図4】本発明の実施の形態を説明するための図であ
る。FIG. 4 is a diagram for explaining an embodiment of the present invention.
【図5】本発明の実施の形態に係るシステムバス上のリ
ード・ライトアクセスのタイミング及びプリフェッチバ
ッファの内容を説明するタイミング図である。FIG. 5 is a timing diagram illustrating a read / write access timing on a system bus and contents of a prefetch buffer according to the embodiment of the present invention.
【図6】図4における比較器の構成図である。6 is a configuration diagram of a comparator in FIG.
200 メモリ制御装置
201 制御回路
202 メモリチャンネルインターフェース回
路
203 システムバスインターフェース回路
204 バッファ
205 プリフェッチバッファ
210 システムバス
220〜223 バスマスタ
230〜233 DRAM
241 データ信号線
242 ロウ信号線
243 カラム信号線
244,245 クロック信号線200 memory control device 201 control circuit 202 memory channel interface circuit 203 system bus interface circuit 204 buffer 205 prefetch buffer 210 system bus 220-223 bus master 230-233 DRAM 241 data signal line 242 row signal line 243 column signal line 244, 245 clock signal line
Claims (7)
を介してメモリデバイスと接続し、前記複数のマスタか
らの要求に応じて前記メモリデバイスに対して書き込ん
で読み出し動作を行うメモリ制御装置において、 先行読み出し動作を行ってその結果を保持するプリフェ
ッチバッファと、アドレス範囲を指定する手段と、読み
出し要求アドレスとアドレス範囲指定手段の保持する情
報とを比較する手段とを設け、読み出し要求アドレスが
前記アドレス範囲指定手段によって指定された範囲内に
ある場合にのみ前記先行読み出し動作の結果を前記プリ
フェッチバッファに格納するよう制御することを特徴と
するメモリ制御装置。1. A memory control device which is connected to a plurality of masters and, on the other hand, is connected to a memory device via a memory bus, and performs a write operation and a read operation to the memory device in response to a request from the plurality of masters. , A prefetch buffer for performing a preceding read operation and holding the result, means for designating an address range, and means for comparing the read request address with the information held by the address range designating means are provided. A memory control device which controls to store the result of the preceding read operation in the prefetch buffer only when the result is within the range designated by the address range designating means.
アドレス範囲が可変であることを特徴とする請求項1記
載のメモリ制御装置。2. The memory control device according to claim 1, wherein the address range designating unit is capable of designating a variable address range.
接続することを特徴とする請求項1記載のメモリ制御装
置。3. The memory control device according to claim 1, wherein the plurality of masters are connected via a shared bus.
らの要求に対するメモリデバイスからの読み出し動作に
伴って同時に行うことを特徴とする請求項1記載のメモ
リ制御装置。4. The memory control device according to claim 1, wherein the read-ahead operation is performed simultaneously with a read operation from a memory device in response to a request from the master.
該データのアドレス及び有効フラグから成る情報を1又
は複数組格納することを特徴とする請求項1記載のメモ
リ制御装置。5. The memory control device according to claim 1, wherein the prefetch buffer stores one or more sets of information including data, an address of the data, and a valid flag.
レスとプリフェッチバッファに格納されているデータの
アドレス情報及び有効フラグを比較し、可能な場合には
プリフェッチバッファに格納されているデータを前記マ
スタのリードデータとして返し、不可能な場合には前記
アドレス範囲指定手段で指定されるアドレス範囲内にあ
った場合に先読み動作を行ってプリフェッチバッファに
格納するよう制御することを特徴とする請求項5記載の
メモリ制御装置。6. When a read request is issued from the master, the address is compared with the address information and the valid flag of the data stored in the prefetch buffer, and if possible, the data stored in the prefetch buffer is read by the master. 6. The control according to claim 5, wherein the data is returned as data, and when it is impossible, the prefetch operation is performed and the data is stored in the prefetch buffer when it is within the address range designated by the address range designating means. Memory controller.
ドレスとプリフェッチバッファに格納されているデータ
のアドレス情報とを比較し、必要に応じて前記有効フラ
グを無効な状態に変えることを特徴とする請求項5記載
のメモリ制御装置。7. A write request from the master is compared with an address and address information of data stored in a prefetch buffer, and the valid flag is changed to an invalid state as necessary. 5. The memory control device according to 5.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001373084A JP2003173291A (en) | 2001-12-06 | 2001-12-06 | Memory controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001373084A JP2003173291A (en) | 2001-12-06 | 2001-12-06 | Memory controller |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2003173291A true JP2003173291A (en) | 2003-06-20 |
Family
ID=19181865
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001373084A Pending JP2003173291A (en) | 2001-12-06 | 2001-12-06 | Memory controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2003173291A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2017049713A (en) * | 2015-08-31 | 2017-03-09 | 株式会社メガチップス | Memory controller |
-
2001
- 2001-12-06 JP JP2001373084A patent/JP2003173291A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2017049713A (en) * | 2015-08-31 | 2017-03-09 | 株式会社メガチップス | Memory controller |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4853846A (en) | Bus expander with logic for virtualizing single cache control into dual channels with separate directories and prefetch for different processors | |
| US5644788A (en) | Burst transfers using an ascending or descending only burst ordering | |
| EP0470734A1 (en) | Cache memory management system | |
| US20050253858A1 (en) | Memory control system and method in which prefetch buffers are assigned uniquely to multiple burst streams | |
| US5283880A (en) | Method of fast buffer copying by utilizing a cache memory to accept a page of source buffer contents and then supplying these contents to a target buffer without causing unnecessary wait states | |
| US5732409A (en) | Caching disk controller implemented by hardwired logic | |
| EP0470738A1 (en) | Cache memory system and operating method | |
| US5893917A (en) | Memory controller and method of closing a page of system memory | |
| EP0745941A2 (en) | A system and method for providing a flexible memory hierarchy | |
| JP4208541B2 (en) | Memory control device | |
| US6178467B1 (en) | Microprocessor system requests burstable access to noncacheable memory areas and transfers noncacheable address on a bus at burst mode | |
| US20050091458A1 (en) | Storage control apparatus, control system capable of DMA transfer, and method of controlling DMA transfer | |
| JP2003173291A (en) | Memory controller | |
| CN117389914A (en) | Cache system, cache write-back method, system on chip and electronic equipment | |
| US7406571B2 (en) | Memory system and method for controlling the same, and method for maintaining data coherency | |
| US20010002481A1 (en) | Data access unit and method therefor | |
| JP5091548B2 (en) | Memory system | |
| JP2002123420A (en) | Memory access device | |
| JP4220258B2 (en) | High-speed memory access method in non-cache area | |
| JP2006107021A (en) | Memory controller | |
| JP2682789B2 (en) | Computer I/O Cache System | |
| JP5393405B2 (en) | Memory control circuit | |
| JP3136681B2 (en) | Data processing device | |
| JP4856373B2 (en) | Memory system, control method thereof, and method of maintaining data coherency | |
| JP2001229074A (en) | Memory controller and information processor and memory control chip |