JP2003271445A - Memory control device and method - Google Patents

Memory control device and method

Info

Publication number
JP2003271445A
JP2003271445A JP2002071321A JP2002071321A JP2003271445A JP 2003271445 A JP2003271445 A JP 2003271445A JP 2002071321 A JP2002071321 A JP 2002071321A JP 2002071321 A JP2002071321 A JP 2002071321A JP 2003271445 A JP2003271445 A JP 2003271445A
Authority
JP
Japan
Prior art keywords
request
read
issued
write
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002071321A
Other languages
Japanese (ja)
Inventor
Katsuhiko Yamanaka
克彦 山中
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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2002071321A priority Critical patent/JP2003271445A/en
Publication of JP2003271445A publication Critical patent/JP2003271445A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To enhance access efficiency by causing read and write commands not to occur alternately when accessing to SDRAM. <P>SOLUTION: A request hold circuit 11 holds read requests and write requests from a processor 5A and 5B in order. In a request permutation circuit 12, the read requests or write requests held in the request hold circuit 12 are permuted so as to the read commands or the write commands are continued. In a command generation circuit 13, the command for accessing to a memory (SDRAM) 2 is generated. This prevents wasteful cycles from occurring to improve the access efficiency to the memory. <P>COPYRIGHT: (C)2003,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、例えば、ビデオ
データを処理するための画像処理チップで画像データを
蓄えるメモリとして使用されるSDRAMの制御に用い
て好適なメモリ制御う装置及び方法に関するもので、特
に、SDRAMのアクセス効率の向上に係わる。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory control device and method suitable for controlling an SDRAM used as a memory for storing image data in an image processing chip for processing video data. Particularly, it relates to improvement of access efficiency of SDRAM.

【0002】[0002]

【従来の技術】例えば、MPEG(Moving Picture Cod
ing Experts Group )2のトランスポートストリームを
入力し、このトランスポートストリームからビデオパケ
ットやオーディオパケットを分離し、デコードされたビ
デオデータに対して、画像処理を行ったり、OSD(On
Screen Display)画像を重畳したりするような画像処
理チップの開発が進められている。このような画像処理
チップには、MPEG2のTS(Transport Stream)パ
ケットを分離するためのトランスポートストリームプロ
セッサや、種々の画像処理を行うためのグラフィックス
エンジンや、任意のソース矩形領域の画像をデスティネ
ーション領域にコピーするためのBitBLTエンジン
や、OSD画面を生成して重畳したり、画面の拡大、縮
小を行うディスプレイプロセッサ等が配される。これら
のプロセッサの処理には、全て大容量のメモリが必要で
あり、各プロセッサでメモリが共用される。このような
画像処理プロセッサのためのメモリとしては、SDRA
M(Synchronous Dynamic Random Access Memory)が用
いられている。
2. Description of the Related Art For example, MPEG (Moving Picture Cod)
ing Experts Group) 2 transport stream is input, video packets and audio packets are separated from this transport stream, image processing is performed on the decoded video data, and OSD (On
Screen Display) Development of image processing chips for superimposing images is in progress. In such an image processing chip, a transport stream processor for separating a TS (Transport Stream) packet of MPEG2, a graphics engine for performing various kinds of image processing, and an image of an arbitrary source rectangular area A BitBLT engine for copying to the nation area, a display processor for generating and superimposing an OSD screen, and enlarging and reducing the screen are arranged. A large amount of memory is required for the processing of these processors, and the memory is shared by the processors. SDRA is used as a memory for such an image processor.
M (Synchronous Dynamic Random Access Memory) is used.

【0003】SDRAMは、クロックに同期した連続的
なデータ転送が可能であり、バースト転送を指定する
と、指定したバイト数分のデータ転送を1クロック単位
で連続して行うことができる。また、SDRAM内の記
憶領域は、複数のバンクに分割した構成とされている。
The SDRAM is capable of continuous data transfer in synchronism with a clock, and when burst transfer is specified, data transfer of a specified number of bytes can be continuously performed in units of one clock. Further, the storage area in the SDRAM is divided into a plurality of banks.

【0004】図8は、このような画像処理プロセッサで
使用される従来のメモリコントローラのブロック図を示
すものである。
FIG. 8 is a block diagram of a conventional memory controller used in such an image processor.

【0005】図8において、メモリコントローラ101
は、SDRAMからなるメモリ102に接続されてお
り、メモリ102に対するデータの読み出し或いは書き
込みの制御を行っている。メモリコントローラ101
は、レジスタバス103及びメモリバス104を介し
て、各プロセッサ105A、105B、…に接続されて
いる。プロセッサ105A、105B、…は、例えば、
画像処理チップの場合には、トランスポートストリーム
プロセッサや、種々の画像処理を行うためのグラフィッ
クスエンジン、BitBLT(Bit Block Transfer)エン
ジン、ディスプレイプロセッサ、ホストCPU(Centra
l Processing Unit )等である。
In FIG. 8, a memory controller 101
Is connected to a memory 102 including an SDRAM and controls reading or writing of data from or to the memory 102. Memory controller 101
Are connected to the processors 105A, 105B, ... Through the register bus 103 and the memory bus 104. The processors 105A, 105B, ...
In the case of an image processing chip, a transport stream processor, a graphics engine for performing various image processes, a BitBLT (Bit Block Transfer) engine, a display processor, a host CPU (Centra)
l Processing Unit).

【0006】メモリコントローラ101は、メモリ10
2に対するアクセスのリクエストを保持するリクエスト
保持回路111と、リクエスト保持回路111からのリ
クエストをメモリ102へのコマンドとして発行するコ
マンド生成回路113と、リード/ライトされたデータ
の受け渡しを行うデータ制御回路114とからなる。
The memory controller 101 includes a memory 10
2, a request holding circuit 111 that holds a request to access 2, a command generation circuit 113 that issues a request from the request holding circuit 111 as a command to the memory 102, and a data control circuit 114 that delivers read / write data. Consists of.

【0007】プロセッサ105A、105B、…は、メ
モリ102をアクセスする場合には、レジスタバス10
3を介して、メモリコントローラ101に対して、リク
エストを送る。リクエストには、メモリ102からデー
タを読み出すリードリクエストと、メモリ102にデー
タを書き込むライトリクエストとがある。プロセッサ1
05A、105B、…からのリクエストは、リクエスト
保持回路111に保持される。メモリ102から読み出
されたデータは、メモリバス104を介して、メモリコ
ントローラ101から各プロセッサ105A、105
B、…送られる。また、メモリ102にデータを書き込
む場合には、各プロセッサ105A、105B、…から
メモリバス104を介して、メモリコントローラ101
に書き込みデータが送られる。
When accessing the memory 102, the processors 105A, 105B, ...
A request is sent to the memory controller 101 via the No. 3. The requests include a read request for reading data from the memory 102 and a write request for writing data in the memory 102. Processor 1
Requests from 05A, 105B, ... Are held in the request holding circuit 111. The data read from the memory 102 is transferred from the memory controller 101 to the processors 105A and 105A via the memory bus 104.
B ... Sent. Further, when writing data to the memory 102, the memory controller 101 is connected from each of the processors 105A, 105B, ...
Write data is sent to.

【0008】リクエスト保持回路111には、プロセッ
サ105A、105B、…から送られてきたリクエスト
が順番に保持される。このリクエスト保持回路111に
保持されているリクエストは、順番に、コマンド生成回
路113に送られる。
Requests sent from the processors 105A, 105B, ... Are sequentially held in the request holding circuit 111. The requests held in the request holding circuit 111 are sequentially sent to the command generation circuit 113.

【0009】コマンド生成回路113は、このリクエス
トに対応するメモリのコマンドを生成する。コマンド
は、ある要求に対するバンクアクティブ、リード/ライ
ト、プリチャージのコマンドセットからなる。コマンド
生成回路113で生成されたコマンドは、メモリ102
に与えられる。
The command generation circuit 113 generates a memory command corresponding to this request. The command consists of a bank active, read / write, and precharge command set for a certain request. The command generated by the command generation circuit 113 is stored in the memory 102.
Given to.

【0010】コマンド生成回路113に送られたリクエ
ストがリードリクエストの場合には、コマンド生成回路
113から、読み出しのためのコマンドセットが発生さ
れる。これにより、メモリ102からデータが読み出さ
れる。読み出されたデータがデータ制御回路114に送
られる。そして、この読み出されたデータは、メモリバ
ス104を介して、リクエストを発行したプロセッサ1
05A、105B、…に送られる。
When the request sent to the command generation circuit 113 is a read request, the command generation circuit 113 generates a command set for reading. As a result, the data is read from the memory 102. The read data is sent to the data control circuit 114. Then, this read data is sent to the processor 1 that issued the request via the memory bus 104.
05A, 105B, ...

【0011】コマンド生成回路113に送られたリクエ
ストがライトリクエストの場合には、コマンド生成回路
113から書き込みのためのコマンドセットが発生され
る。リクエストを発行したプロセッサ105A、105
B、…からは、メモリバス104を介して、データ制御
回路114に、データが送られる。このデータ制御回路
114に送られてきたデータがメモリ102に書き込ま
れる。
When the request sent to the command generation circuit 113 is a write request, the command generation circuit 113 generates a command set for writing. The processor 105A, 105 that issued the request
Data is sent from B, ... To the data control circuit 114 via the memory bus 104. The data sent to the data control circuit 114 is written in the memory 102.

【0012】[0012]

【発明が解決しようとする課題】上述のように、従来の
メモリコントローラ101では、リクエスト保持回路1
11に順番にリクエストが保持され、このリクエストが
順番にコマンド生成回路113に送られる。コマンド生
成回路113では、リクエスト保持回路111からのリ
クエストに基づいて、メモリ102を構成するSDRA
Mのコマンドセットが生成される。
As described above, in the conventional memory controller 101, the request holding circuit 1
The requests are held in order at 11, and the requests are sequentially sent to the command generation circuit 113. In the command generation circuit 113, based on the request from the request holding circuit 111, SDRA forming the memory 102 is formed.
A command set of M is generated.

【0013】SDRAMのコマンドには、アクティブ、
リード/ライト、プリチャージがある。アクティブコマ
ンドは、選択したメモリセルに対応するワード線に所定
のパルス電圧(ワード線を活性化させる)ことを指示す
るコマンドである。リードコマンドは、選択されたメモ
リセルのデータ線の電位から記憶データを読み取ること
を指示するコマンドである。ライトコマンドは、選択さ
れたメモリセルのデータ線に、書き込むデータに応じた
電位を印加することを指示するコマンドである。プリチ
ャージコマンドは、SDRAM内のアクセスを行うメモ
リセルに対応するデータ線を所定の電位に設定すること
を指示するコマンドである。
SDRAM commands include active,
There are read / write and precharge. The active command is a command for instructing the word line corresponding to the selected memory cell to have a predetermined pulse voltage (activate the word line). The read command is a command instructing to read stored data from the potential of the data line of the selected memory cell. The write command is a command for instructing to apply a potential according to the data to be written to the data line of the selected memory cell. The precharge command is a command instructing to set a data line corresponding to a memory cell to be accessed in the SDRAM to a predetermined potential.

【0014】各プロセッサ105A、105B、…から
のリクエストには、メモリ102からデータを読み出す
ためのリードリクエストと、メモリ102にデータを書
き込むためのライトリクエストとがある。リクエスト保
持回路111は、各プロセッサ105A、105B、…
からのリクエストを順番に保持し、保持されているリク
エストをコマンド生成回路113に順番に送っている。
したがって、コマンド生成回路113から出力されるコ
マンドとしては、リードのコマンドが連続して出力され
る場合と、ライトのコマンドが連続して出力される場合
と、リードのコマンドとライトのコマンドとが交互に出
力される場合とが考えられる。
Requests from the processors 105A, 105B, ... Include a read request for reading data from the memory 102 and a write request for writing data to the memory 102. The request holding circuit 111 includes the processors 105A, 105B, ...
Requests are sequentially stored, and the stored requests are sequentially transmitted to the command generation circuit 113.
Therefore, as the commands output from the command generation circuit 113, a read command is continuously output, a write command is continuously output, and a read command and a write command are alternated. It may be output to.

【0015】SDRAMでは、リードだけ、或いはライ
トだけを連続して行う場合には、リード或いはライトの
コマンドを連続的に発行することができるため、データ
アクセスを連続的に行うことができ、データバスを有効
に使用し効率を上げることができる。
In the SDRAM, when only reading or only writing is continuously performed, a read or write command can be continuously issued, so that data access can be continuously performed and a data bus is provided. Can be used effectively and efficiency can be improved.

【0016】ところが、リードとライトが交互に行われ
る場合には、リードコマンド及びライトコマンドと、リ
ードコマンド及びライトコマンドに対応するデータとの
間のレイテンシが異なることによるバスの衝突の回避等
に起因するSDRAMへのコマンド発行の制約により、
リードデータとライトデータとの間に無効なサイクルが
発生し、連続的にコマンドを発生することができない。
このため、メモリのアクセス効率が低下するという問題
が生じる。
However, when the read and the write are alternately performed, it is caused by avoiding a bus collision due to a difference in latency between the read command and the write command and the data corresponding to the read command and the write command. Due to the restriction of issuing commands to SDRAM,
An invalid cycle occurs between read data and write data, and commands cannot be continuously generated.
Therefore, there arises a problem that the memory access efficiency is reduced.

【0017】上述の従来のメモリコントローラ101で
は、リードのコマンドセットとライトのコマンドとが交
互に出力される場合があるため、メモリのアクセス効率
の低下が生じる。
In the conventional memory controller 101 described above, the read command set and the write command may be alternately output, so that the access efficiency of the memory decreases.

【0018】つまり、図9は、コマンド生成回路113
にリードリクエストが連続的に送られてきた場合にコマ
ンド生成回路113から発行されるコマンドと、メモリ
102から入出力されるデータとの関係を示すタイミン
グチャートである。
That is, FIG. 9 shows the command generation circuit 113.
6 is a timing chart showing the relationship between the command issued from the command generation circuit 113 and the data input / output from / to the memory 102 when read requests are continuously sent.

【0019】なお、ここでは、リードコマンド1個に対
し2個のデータが出力されるモード(バーストモード、
バースト長2)とし、リードコマンドから対応する最初
のデータが出力されるまでのレイテンシ(CASレイテ
ンシ)が2クロックのSDRAMを想定している。ま
た、簡単のために、全てのリードリクエストが同一バン
クの同一カラムに対して発行されているものとしてい
る。
In this case, a mode in which two data are output for one read command (burst mode,
It is assumed that the burst length is 2) and the latency (CAS latency) from the read command to the output of the corresponding first data is 2 clocks. Further, for simplicity, it is assumed that all read requests are issued to the same column in the same bank.

【0020】図9において、時点T1でアクティブコマ
ンド(ACT)が発行され、時点T3で、アドレスC1
のリードコマンド(READ)が発行される。リードコ
マンドが連続する場合には、それから、時点T5、T7
において、アドレスC2、C3のリードコマンド(RE
AD)が連続的に発行される。なお、PREはプリチャ
ージコマンドを示し、NOPはウェイトを示す。
In FIG. 9, the active command (ACT) is issued at time T1 and the address C1 is issued at time T3.
Read command (READ) is issued. If the read commands continue, then the time points T5, T7
At the read command (RE
AD) is issued continuously. Note that PRE indicates a precharge command and NOP indicates a wait.

【0021】バースト長が2、CASレイテンシが2ク
ロックなので、時点T3でアドレスC1のリードコマン
ドが発行されると、それから2クロック後の時点T5
で、アドレスC1のデータRd1が読み出され、時点T
6で、アドレスC1のデータRd2が読み出される。
Since the burst length is 2 and the CAS latency is 2 clocks, when the read command of the address C1 is issued at time T3, time T5 two clocks after that is issued.
At the time T, the data Rd1 at the address C1 is read.
At 6, the data Rd2 of the address C1 is read.

【0022】それから、時点T5、T7において、アド
レスC2、C3のリードコマンドが連続的に発行されて
いるので、これに対応して、時点T7及びT8でアドレ
スC2のデータRd3及びRd4が読み出され、時点T
9及びT10でアドレスC3のデータRd5及びRd6
が読み出される。
Since the read commands for the addresses C2 and C3 are continuously issued at the times T5 and T7, the data Rd3 and Rd4 of the address C2 are read at the times T7 and T8 correspondingly. , Time T
Data Rd5 and Rd6 of address C3 at 9 and T10
Is read.

【0023】このように、リードリクエストが連続的に
送られてきた場合には、時点T3、T5、T7でリード
コマンドを連続的に発行することができ、時点T5から
T10で、データRd1、Rd2、Rd3、Rd4、R
d5、Rd6が途切れることなく出力されることにな
る。
As described above, when the read requests are continuously sent, the read command can be continuously issued at the times T3, T5, and T7, and the data Rd1 and Rd2 are sent from the times T5 to T10. , Rd3, Rd4, R
d5 and Rd6 are output without interruption.

【0024】これに対して、図10は、コマンド生成回
路113にリードリクエストとライトリクエストとが交
互に送られてきた場合にコマンド生成回路113から発
行されるコマンドと、メモリ102から入出力されるデ
ータとの関係を示すタイミングチャートである。
On the other hand, in FIG. 10, when a read request and a write request are alternately sent to the command generation circuit 113, a command issued from the command generation circuit 113 and input / output from the memory 102. It is a timing chart which shows the relationship with data.

【0025】図10において、時点T1でアクティブコ
マンド(ACT)が発行される。そして、時点T3でア
ドレスC1のリードコマンド(READ)が発行され
る。
In FIG. 10, an active command (ACT) is issued at time T1. Then, at time T3, the read command (READ) of the address C1 is issued.

【0026】時点T3でアドレスC1のリードコマンド
が発行されると、バースト長が2、CASレイテンシが
2クロックなので、これに対応して、時点T5及びT6
でアドレスC1のデータRd1及びRd2が読み出され
る。
When the read command for the address C1 is issued at the time point T3, the burst length is 2 and the CAS latency is 2 clocks. Therefore, correspondingly, the time points T5 and T6.
Then, the data Rd1 and Rd2 of the address C1 are read.

【0027】それから、データの読み出しが終了した時
点T7で、アドレスC2のライトコマンド(Writ
e)が発行され、時点T7及び時点T8で、データWd
1及びWd2が書き込まれる。
Then, at time T7 when the data reading is completed, the write command (Writ) of the address C2 is written.
e) is issued, and at time T7 and time T8, data Wd
1 and Wd2 are written.

【0028】それから、データの書き込みが終了した時
点T9で、アドレスC3のリードコマンド(READ)
が発行され、これに対応して、時点T11及びT12で
アドレスC3のデータRd3及びRd4が読み出され
る。
Then, at the time T9 when the data writing is completed, the read command (READ) of the address C3 is issued.
Is issued, and correspondingly, the data Rd3 and Rd4 of the address C3 are read at the time points T11 and T12.

【0029】それから、データの読み出しが終了した時
点T13で、アドレスC4のライトコマンド(Writ
e)が発行され、時点T13及び時点T14で、データ
Wd3及びWd4が書き込まれる。
Then, at time T13 when the data reading is completed, the write command (Writ) of the address C4 is written.
e) is issued, and the data Wd3 and Wd4 are written at time T13 and time T14.

【0030】このように、リードリクエストとライトリ
クエストとが交互に送られてきた場合には、リードコマ
ンドに対するデータの読み出しが終了してから、ライト
コマンドを出してデータを書き込み、ライトコマンドに
対するデータの書き込みが終了してから、リードコマン
ドを出してデータの読み出しを行うことになる。この場
合、時点T3において最初のリードコマンドを発行した
後、次に続くライトコマンドの発行は、バスの衝突を防
ぐため、時点T7で発行される。ライト後のリードコマ
ンドの発行は時点T9に続くが、CASレイテンシのた
め、時点T9、T10においてデータバスが使用されな
いサイクルが発生し、効率を落とす原因となる。
As described above, when the read request and the write request are alternately sent, the write command is issued and the data is written after the reading of the data corresponding to the read command is completed. After the writing is completed, the read command is issued to read the data. In this case, after issuing the first read command at time T3, the issuance of the next write command is issued at time T7 in order to prevent bus collision. Issuance of the read command after writing continues at time T9, but due to the CAS latency, a cycle in which the data bus is not used occurs at times T9 and T10, which causes a drop in efficiency.

【0031】したがって、この発明の目的は、リードコ
マンドとライトコマンドとが交互に発生することがない
ようにして、メモリのアクセス効率を高めるようにした
メモリ制御装置及び方法を提供することにある。
Therefore, an object of the present invention is to provide a memory control device and method for improving the access efficiency of a memory by preventing a read command and a write command from being alternately generated.

【0032】[0032]

【課題を解決するための手段】この発明は、クロックを
使用してデータのリード或いはライトを行う同期型メモ
リを制御するメモリ制御装置であって、メモリに対する
リードリクエスト或いはライトリクエストを保存するリ
クエスト保持手段と、リクエスト保持手段に保持されて
いるリクエストの中から、リードリクエスト同士或いは
ライトリクエスト同士が連続するようにリクエストの順
番を入れ替えるリクエスト入れ替え手段と、リクエスト
に応じてメモリをリード或いはライトするためのコマン
ドを生成するコマンド生成手段とを備えるようにしたメ
モリ制御装置である。
SUMMARY OF THE INVENTION The present invention is a memory control device for controlling a synchronous memory which reads or writes data by using a clock, and holds a request for storing a read request or a write request to the memory. Means and a request exchanging means for exchanging the order of requests from the requests held in the request holding means so that read requests or write requests are continuous, and for reading or writing the memory according to the request The memory control device includes a command generation unit that generates a command.

【0033】この発明は、クロックを使用してデータの
リード或いはライトを行う同期型メモリを制御するメモ
リ制御方法であって、メモリに対するリードリクエスト
或いはライトリクエストを保存し、保持されているリク
エストの中から、リードリクエスト同士或いはライトリ
クエスト同士が連続するようにリクエストの順番を入れ
替え、リクエストに応じてメモリをリード或いはライト
するためのコマンドを生成するようにしたメモリ制御方
法である。
The present invention is a memory control method for controlling a synchronous memory for reading or writing data using a clock, which stores a read request or a write request to the memory and In this memory control method, the order of requests is changed so that read requests or write requests are continuous, and a command for reading or writing the memory is generated according to the request.

【0034】リクエスト保持回路には、リードリクエス
ト或いはライトリクエストが順に保持される。リクエス
トリードリクエストとライトリクエストとが交互に送ら
れてきた場合には、リードコマンドに対するデータの読
み出しが終了してから、ライトコマンドを出してデータ
を書き込み、ライトコマンドに対するデータの書き込み
が終了してから、リードコマンドを出してデータの読み
出しを行うことになる。ライト後のリードコマンドの発
行は、CASレイテンシのため、データバスが使用され
ないサイクルが発生し、効率を落とす原因となる。
The request holding circuit holds read requests or write requests in order. Request If a read request and a write request are sent alternately, after reading the data corresponding to the read command is completed, the write command is issued to write the data, and after writing the data corresponding to the write command is completed. , The read command is issued to read the data. Issuing a read command after writing causes a cycle in which the data bus is not used due to CAS latency, which causes a drop in efficiency.

【0035】そこで、この発明では、リードコマンド同
士或いはライトコマンド同士が続くように、リクエスト
保持回路に保持されているリードリクエスト或いはライ
トリクエストの順番を入れ替えている。これにより、無
駄なサイクルが発生することがなくなり、メモリのアク
セス効率が向上する。
Therefore, in the present invention, the order of the read request or the write request held in the request holding circuit is exchanged so that the read commands or the write commands continue. As a result, useless cycles do not occur and the memory access efficiency is improved.

【0036】[0036]

【発明の実施の形態】以下、この発明の実施の形態につ
いて図面を参照して説明する。図1は、この発明の一実
施の形態を示すものである。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows an embodiment of the present invention.

【0037】図1において、メモリコントローラ1は、
SDRAMからなるメモリ2に接続されており、メモリ
2に対するデータの読み出し或いは書き込みの制御を行
っている。メモリコントローラ1は、レジスタバス3及
びメモリバス4を介して、各プロセッサ5A、5B、…
に接続されている。プロセッサ5A、5B、…は、例え
ば、画像処理チップの場合には、トランスポートストリ
ームプロセッサや、グラフィックスエンジン、BitB
LTエンジン、ディスプレイプロセッサ、ホストCPU
等である。
In FIG. 1, the memory controller 1 is
The memory 2 is connected to the SDRAM 2 and controls reading or writing of data from or to the memory 2. The memory controller 1 uses the register bus 3 and the memory bus 4 to connect the processors 5A, 5B, ...
It is connected to the. The processors 5A, 5B, ... Are, for example, transport stream processors, graphics engines, BitBs in the case of image processing chips.
LT engine, display processor, host CPU
Etc.

【0038】メモリコントローラ1は、メモリ2に対す
るアクセスのリクエストを保持するリクエスト保持回路
11と、リクエスト保持回路11に保持されているリク
エストの中からリード或いはライトアクセスが連続する
ようにリクエストを選択してコマンド生成回路13に送
るリクエスト入れ替え回路12と、リクエスト入れ替え
回路12からのリクエストをメモリ2へのコマンドとし
て発行するコマンド生成回路13と、読み出し或いは書
き込みされたデータの受け渡しを行うデータ制御回路1
4とからなる。
The memory controller 1 selects a request holding circuit 11 for holding a request for access to the memory 2 and a request held in the request holding circuit 11 so that read or write access is continuous. A request exchanging circuit 12 to be sent to the command generating circuit 13, a command generating circuit 13 for issuing a request from the request exchanging circuit 12 as a command to the memory 2, and a data control circuit 1 for passing read or written data.
4 and.

【0039】プロセッサ5A、5B、…は、メモリ2を
アクセスする場合には、レジスタバス3を介して、メモ
リコントローラ1に対して、リクエストを送る。リクエ
ストには、メモリ2からデータを読み出すリードリクエ
ストと、メモリ2にデータを書き込みライトリクエスト
とがある。プロセッサ5A、5B、…からのリクエスト
は、リクエスト保持回路11に保持される。メモリ2か
ら読み出されたデータは、メモリバス4を介して、メモ
リコントローラ1から各プロセッサ5A、5B、…送ら
れる。また、メモリ2にデータを書き込み場合には、各
プロセッサ5A、5B、…からメモリバス4を介して、
メモリコントローラ1に送られる。
When accessing the memory 2, the processors 5A, 5B, ... Send a request to the memory controller 1 via the register bus 3. The requests include a read request for reading data from the memory 2 and a write request for writing data in the memory 2. Requests from the processors 5A, 5B, ... Are held in the request holding circuit 11. The data read from the memory 2 is sent from the memory controller 1 to the processors 5A, 5B, ... Through the memory bus 4. Further, when writing data to the memory 2, each processor 5A, 5B, ...
It is sent to the memory controller 1.

【0040】リクエスト保持回路11には、プロセッサ
5A、5B、…から送られてきたリクエストが順番に保
持される。このリクエスト保持回路11に保持されてい
るリクエストは、リクエスト入れ替え回路12により、
リード或いはライトアクセスが連続するように順番が入
れ替えられて、コマンド生成回路13に送られる。
Requests sent from the processors 5A, 5B, ... Are sequentially held in the request holding circuit 11. The request held in the request holding circuit 11 is processed by the request exchanging circuit 12.
The order is changed so that the read or write access is continuous, and the data is sent to the command generation circuit 13.

【0041】コマンド生成回路13は、このリクエスト
に対応するメモリのコマンドを生成する。このコマンド
は、ある要求に対するバンクアクティブ、リード/ライ
ト、プリチャージのコマンドセットからなる。コマンド
生成回路13で生成されたコマンドは、メモリ2に与え
られる。
The command generation circuit 13 generates a command in the memory corresponding to this request. This command consists of a command set of bank active, read / write, and precharge for a certain request. The command generated by the command generation circuit 13 is given to the memory 2.

【0042】コマンド生成回路13に送られたリクエス
トがリードリクエストの場合には、コマンド生成回路1
3から、読み出しのためのコマンドセットが発生され
る。これにより、メモリ2からデータが読み出される。
読み出されたデータがデータ制御回路14に送られる。
そして、この読み出されたデータは、メモリバス4を介
して、リクエストを発行したプロセッサ5A、5B、…
に送られる。
When the request sent to the command generation circuit 13 is a read request, the command generation circuit 1
From 3, a command set for reading is generated. As a result, the data is read from the memory 2.
The read data is sent to the data control circuit 14.
Then, the read data is sent via the memory bus 4 to the processor 5A, 5B, ... Which issued the request.
Sent to.

【0043】コマンド生成回路13に送られたリクエス
トがライトリクエストの場合には、コマンド生成回路1
3から書き込みのためのコマンドセットが発生される。
このとき、リクエストを発行したプロセッサ5A、5
B、…からは、メモリバス4を介して、データ制御回路
14に、データが送られる。このデータ制御回路14に
送られてきたデータがメモリ2に書き込まれる。
When the request sent to the command generation circuit 13 is a write request, the command generation circuit 1
3, a command set for writing is generated.
At this time, the processor 5A, 5 which issued the request
From B, ..., Data is sent to the data control circuit 14 via the memory bus 4. The data sent to the data control circuit 14 is written in the memory 2.

【0044】上述のように、この発明が適用されたメモ
リコントローラ1では、リクエスト入れ替え回路12が
設けられ、このリクエスト入れ替え回路12により、リ
ードアクセスとライトアクセスが連続して行われるよう
に、リクエスト保持回路11からリクエストの順番が入
れ替えられて、コマンド生成回路13に送られる。
As described above, in the memory controller 1 to which the present invention is applied, the request exchanging circuit 12 is provided, and the request exchanging circuit 12 holds the request so that the read access and the write access are continuously performed. The order of requests is exchanged from the circuit 11 and sent to the command generation circuit 13.

【0045】なお、リクエスト入れ替え回路12は、後
に説明するように、現在発行しているリクエストと、次
に発行すべきリクエストとでリード同士或いはライト同
士が続くかどうかを判断し、リード同士或いはライト同
士が続かなければ、現在発行しているリクエストと、更
にその次に発行すべきリクエストとでリード同士或いは
ライト同士が続くかどうかを判断し、現在発行している
リクエストと、更にその次に発行すべきリクエストとで
リード同士或いはライト同士が続くなら、次に発行すべ
きリクエストと更に次に発行すべきリクエストとを入れ
替えるような処理を行う判断回路と、この判断回路で判
断された順に、リクエスト保持回路11からのデータを
選択して出力する選択回路とから構成されている。
As will be described later, the request exchanging circuit 12 determines whether or not the read request and the write request to be issued next are continuous with each other or with each other. If they do not continue, it is judged whether read or write continues between the request currently issued and the request to be issued next, and the request currently issued and the next issue If there is a read request or a write request following the request to be issued, a request is issued in the order of the determination circuit that performs processing to switch the request to be issued next and the request to be issued next. It comprises a selection circuit for selecting and outputting the data from the holding circuit 11.

【0046】このように、リクエスト入れ替え回路12
により、リード同士或いはライト同士が続くようにリク
エストが入れ替えられることにより、メモリアクセス効
率の向上が実現される。
In this way, the request exchange circuit 12
As a result, the requests are exchanged so that the reads or the writes continue, thereby improving the memory access efficiency.

【0047】例えば、リクエスト保持回路11に、図2
Aに示すように、リクエストreq0、req1、re
q2、req3が保持されているとする。そして、リク
エストreq0はリード、リクエストreq1はライ
ト、リクエストreq2はリード、リクエストreq3
はライトの各リクエストであるとする。
For example, in the request holding circuit 11, FIG.
As shown in A, the requests req0, req1, re
It is assumed that q2 and req3 are held. The request req0 is read, the request req1 is write, the request req2 is read, and the request req3.
Is each request for a light.

【0048】このように、リードのリクエストとライト
のリクエストとが交互に保持されている場合には、リク
エスト入れ替え回路12により、リード或いはライト続
くように、リクエストの順番が変更される。
As described above, when the read request and the write request are held alternately, the request exchanging circuit 12 changes the order of the requests so that the read or the write continues.

【0049】すなわち、図2Aに示すように、リクエス
ト保持回路11に、リードのリクエストreq0、ライ
トのリクエストreq1、リードのリクエストreq
2、ライトのリクエストreq3が保持されている場合
には、図2Bに示すように、リクエスト入れ替え回路1
2により、リードのリクエストreq0、リードのリク
エストreq2、ライトのリクエストreq1、ライト
のリクエストreq3の順になるようにリクエストの順
番が変更される。これにより、リード或いはライトのリ
クエストが続くようになる。
That is, as shown in FIG. 2A, the request holding circuit 11 has a read request req0, a write request req1, and a read request req.
2. If the write request req3 is held, as shown in FIG. 2B, the request exchange circuit 1
2, the request order is changed so that the read request req0, the read request req2, the write request req1, and the write request req3 are in this order. As a result, the read or write request continues.

【0050】図3は、リクエスト保持回路11に保持さ
れているリードのリクエストreq0、ライトのリクエ
ストreq1、リードのリクエストreq2、ライトの
リクエストreq3を、そのままの順にコマンド生成回
路13に送った場合にコマンド生成回路13から発行さ
れるコマンドと、メモリ2から入出力されるデータとの
関係を示すタイミングチャートである。
FIG. 3 shows commands when the read request req0, the write request req1, the read request req2, and the write request req3 held in the request holding circuit 11 are sent to the command generation circuit 13 in that order. 4 is a timing chart showing the relationship between commands issued from the generation circuit 13 and data input / output from the memory 2.

【0051】なお、ここでは、リードコマンド1個に対
し2個のデータが出力されるモード(バーストモード、
バースト長2)とし、リードコマンドから対応する最初
のデータが出力されるまでのレイテンシ(CASレイテ
ンシ)が2クロックのSDRAMを想定している。ま
た、簡単のために、全てのリードリクエストが同一バン
クの同一カラムに対して発行されているものとしてい
る。
In this case, a mode in which two data are output for one read command (burst mode,
It is assumed that the burst length is 2) and the latency (CAS latency) from the read command to the output of the corresponding first data is 2 clocks. Further, for simplicity, it is assumed that all read requests are issued to the same column in the same bank.

【0052】図3において、時点T1でアクティブコマ
ンド(ACT)が発行される。そして、時点T3でアド
レスC1のリードコマンド(READ)が発行される。
In FIG. 3, an active command (ACT) is issued at time T1. Then, at time T3, the read command (READ) of the address C1 is issued.

【0053】時点T3でアドレスC1のリードコマンド
が発行されると、バースト長が2、CASレイテンシが
2クロックなので、これに対応して、時点T5及びT6
でアドレスC1のデータRd1及びRd2が読み出され
る。
When the read command for the address C1 is issued at the time point T3, the burst length is 2 and the CAS latency is 2 clocks. Therefore, corresponding to this, the time points T5 and T6.
Then, the data Rd1 and Rd2 of the address C1 are read.

【0054】それから、データの読み出しが終了した時
点T7で、アドレスC2のライトコマンド(Writ
e)が発行され、時点T7及び時点T8で、データWd
1及びWd2が書き込まれる。
Then, at the time T7 when the data reading is completed, the write command (Writ) of the address C2 is written.
e) is issued, and at time T7 and time T8, data Wd
1 and Wd2 are written.

【0055】それから、データの書き込みが終了した時
点T9で、アドレスC3のリードコマンド(READ)
が発行され、これに対応して、時点T11及びT12で
アドレスC3のデータRd3及びRd4が読み出され
る。
Then, at the time T9 when the data writing is completed, the read command (READ) of the address C3 is issued.
Is issued, and correspondingly, the data Rd3 and Rd4 of the address C3 are read at the time points T11 and T12.

【0056】それから、データの読み出しが終了した時
点T13で、アドレスC4のライトコマンド(Writ
e)が発行され、時点T13及び時点T14で、データ
Wd3及びWd4が書き込まれる。
Then, at the time T13 when the data reading is completed, the write command (Writ) of the address C4 is written.
e) is issued, and the data Wd3 and Wd4 are written at time T13 and time T14.

【0057】図4は、リクエスト保持回路11に保持さ
れているリードのリクエストreq0、ライトのリクエ
ストreq1、リードのリクエストreq2、ライトの
リクエストreq3を、リードのリクエストreq0、
リードのリクエストreq2、ライトのリクエストre
q1、ライトのリクエストreq3の順に入れ替えた場
合にコマンド生成回路13から発行されるコマンドと、
メモリ2から入出力されるデータとの関係を示すタイミ
ングチャートである。
In FIG. 4, a read request req0, a write request req1, a read request req2, and a write request req3 held in the request holding circuit 11 are read request req0,
Read request req2, Write request re
a command issued from the command generation circuit 13 when the q1 and the write request req3 are exchanged in this order;
6 is a timing chart showing a relationship with data input / output from the memory 2.

【0058】図4において、時点T1でアクティブコマ
ンド(ACT)が発行される。そして、時点T3でアド
レスC1のリードコマンド(READ)が発行され、時
点T5でアドレスC2のリードコマンドが発行される。
In FIG. 4, an active command (ACT) is issued at time T1. Then, a read command (READ) for the address C1 is issued at time T3, and a read command for the address C2 is issued at time T5.

【0059】バースト長が2、CASレイテンシが2ク
ロックなので、時点T3で発行されたアドレスC1のリ
ードコマンドに対応して、時点T5及びT6でアドレス
C1のデータRd1及びRd2が読み出され、時点T5
で発行されたアドレスC2のリードコマンドに対応し
て、時点T7及びT8でアドレスC1のデータRd3及
びRd4が読み出される。
Since the burst length is 2 and the CAS latency is 2 clocks, the data Rd1 and Rd2 of the address C1 are read at the times T5 and T6 in response to the read command of the address C1 issued at the time T3, and the time T5.
The data Rd3 and Rd4 of the address C1 are read at time points T7 and T8 in response to the read command of the address C2 issued in step S7.

【0060】データの読み出しが終了した時点T9で、
アドレスC3のライトコマンド(Write)が発行さ
れ、時点T11で、アドレスC4のライトコマンドが発
行される。これに対応して、時点T9及び時点T10
で、データWd1及びWd2が書き込まれ、時点T11
及び時点T12で、データWd3及びWd4が書き込ま
れ、
At time T9 when the data reading is completed,
The write command (Write) for the address C3 is issued, and at time T11, the write command for the address C4 is issued. Correspondingly, time points T9 and T10
At the time T11, the data Wd1 and Wd2 are written.
And at time T12, the data Wd3 and Wd4 are written,

【0061】このように、リードリクエストとライトリ
クエストとが交互に送られてきた場合には、リードコマ
ンドに対するデータの読み出しが終了してから、ライト
コマンドを出してデータを書き込み、ライトコマンドに
対するデータの書き込みが終了してから、リードコマン
ドを出してデータの読み出しを行うことになる。この場
合、時点T3において最初のリードコマンドを発行した
後、次に続くライトコマンドの発行は、バスの衝突を防
ぐため、時点T7で発行される。ライト後のリードコマ
ンドの発行は時点T9に続くが、CASレイテンシのた
め、時点T9、T10においてデータバスが使用されな
いサイクルが発生し、効率を落とす原因となる。
As described above, when the read request and the write request are alternately transmitted, the write command is issued and the data is written after the reading of the data corresponding to the read command is completed. After the writing is completed, the read command is issued to read the data. In this case, after issuing the first read command at time T3, the issuance of the next write command is issued at time T7 in order to prevent bus collision. Issuance of the read command after writing continues at time T9, but due to the CAS latency, a cycle in which the data bus is not used occurs at times T9 and T10, which causes a drop in efficiency.

【0062】これに対し、図4に示すように、2ワード
のリードコマンド、2ワードのライトコマンドとなるよ
うに、コマンドの順番を変更した場合には、無駄なサイ
クルが発生することがなくなり、アクセス効率が上が
る。
On the other hand, as shown in FIG. 4, when the command order is changed so that the command is a 2-word read command and a 2-word write command, useless cycles will not occur. Access efficiency increases.

【0063】また、バスの衝突を防ぐために、最後のリ
ードデータ時点と、最初のライトデータ時点との間を空
けるために、ライトコマンドを1クロック遅らせるよう
にすることがある。すなわち、図3における時点T6と
時点T7との間、時点T12と時点T13との間では、
リードとライトが繋がっている。リードとライトとが繋
がっていると、バス上で、メモリから読み出されるデー
タと、メモリに書き込むデータとが衝突を起こすことが
考えられる。そこで、バスの衝突を防ぐために、最後の
リードデータ時点と最初のライトデータ時点との間を空
けるようにすることがある。
In order to prevent a bus collision, the write command may be delayed by one clock in order to leave a space between the last read data time and the first write data time. That is, between the time points T6 and T7 and between the time points T12 and T13 in FIG.
Reads and writes are connected. When the read and the write are connected, it is conceivable that the data read from the memory and the data written to the memory may collide on the bus. Therefore, in order to prevent a bus collision, a time may be set between the last read data time and the first write data time.

【0064】最後のリードデータ時点と最初のライトデ
ータ時点との間を空けた場合、リクエスト保持回路11
に保持されているリードのリクエストreq0、ライト
のリクエストreq1、リードのリクエストreq2、
ライトのリクエストreq3をそのままの順にコマンド
生成回路13に送ると、図5に示すタイミングチャート
のようになる。すなわち、図3におけるタイミングチャ
ートの時点T6と時点T7との間、時点T12と時点T
13との間では、リードデータとライトデータとが繋が
っており、そこに、それぞれ、1クロックの遅延を入れ
たのが図5である。
If there is a gap between the last read data point and the first write data point, the request holding circuit 11
Read request req0, write request req1, read request req2,
When the write request req3 is sent to the command generation circuit 13 in that order, the timing chart shown in FIG. 5 is obtained. That is, between the time points T6 and T7 of the timing chart in FIG.
In FIG. 5, read data and write data are connected to each other, and a delay of one clock is added to each of them in FIG.

【0065】これに対して、図6は、最後のリードデー
タ時間と、最初のライトデータ時間との間に1クロック
遅延を入れ、リクエスト保持回路11に保持されている
リードのリクエストreq0、ライトのリクエストre
q1、リードのリクエストreq2、ライトのリクエス
トreq3を、リードのリクエストreq0、リードの
リクエストreq2、ライトのリクエストreq1、ラ
イトのリクエストreq3の順に入れ替えた場合のタイ
ミングチャートである。すなわち、図4に示すタイミン
グチャートの時点T8と時点T9との間ではリードデー
タとライトデータとが繋がっており、そこに、1クロッ
クの遅延を入れたのが図6である。
On the other hand, in FIG. 6, a 1-clock delay is inserted between the last read data time and the first write data time, and the read request req0 held by the request holding circuit 11 and the write request Request re
9 is a timing chart when q1, read request req2, and write request req3 are replaced in the order of read request req0, read request req2, write request req1, and write request req3. That is, the read data and the write data are connected between time points T8 and T9 in the timing chart shown in FIG. 4, and FIG. 6 shows a delay of 1 clock inserted therein.

【0066】図3と図4を比較すると、図3の時点T
9、T10でデータバスに無効なサイクルがあり、8ワ
ード転送に10クロックかかっているが、図4では順番
を入れ替えることによって、8ワードを8クロックで転
送できていることが分かる。
Comparing FIG. 3 and FIG. 4, time point T in FIG.
At 9 and T10, there is an invalid cycle in the data bus, and it takes 10 clocks to transfer 8 words. However, in FIG. 4, it is understood that 8 words can be transferred at 8 clocks by changing the order.

【0067】また、図5と図6を比較すると、図5では
8ワード転送に12クロック必要としているが、図6で
は9クロックで終了している。したがって、バスの衝突
を防ぐために、最後のリードと最初のライトとの間を空
けるようにした場合には、この発明の効果がより大きく
なる。
Further, comparing FIG. 5 and FIG. 6, although 12 clocks are required for 8-word transfer in FIG. 5, it is completed in 9 clocks in FIG. Therefore, when the space between the last read and the first write is provided in order to prevent the bus collision, the effect of the present invention becomes greater.

【0068】以上のように、リクエスト入れ替え回路1
2を付加し、リード或いはライトが連続になるようにリ
クエストの順番を入れ替えることにより、データアクセ
ス効率を向上することができる。
As described above, the request exchange circuit 1
Data access efficiency can be improved by adding 2 and changing the order of requests so that reading or writing is continuous.

【0069】なお、順番を入れ替える際の制限事項とし
ては、同じユニットからのリクエストについては、順番
を入れ替えないということがある。例えば、CPUがあ
るアドレスにデータを書き込み、それをすぐ読み込む場
合、順番を入れ替えると結果が異なるので、リクエスト
にそのリクエストを出したユニットの情報を付加し、こ
れを入れ替えの条件とすることで、このような場合の読
み込みデータを保障する。
As a restriction when changing the order, there is a case that the order is not changed for requests from the same unit. For example, when the CPU writes data to a certain address and reads it immediately, the result will be different if the order is changed, so by adding the information of the unit that issued the request to the request and setting this as the condition for replacement, Guarantee the read data in such a case.

【0070】次に、このように、リード或いはライトが
続くようにリクエストを入れ替えるリクエスト入れ替え
回路12について説明する。
Next, the request exchanging circuit 12 for exchanging requests so that reading or writing continues in this way will be described.

【0071】図7は、リクエスト入れ替え回路12の動
作を示すフローチャートである。ここでは、リクエスト
保持回路11に保持されるリクエストは、リクエストR
eq0、リクエストReq1、リクエストReq2であ
り、各リクエストReq0からReq3は、以下のよう
なものとする。
FIG. 7 is a flowchart showing the operation of the request exchanging circuit 12. Here, the request held in the request holding circuit 11 is the request R
eq0, request Req1, and request Req2, and each request Req0 to Req3 is as follows.

【0072】リクエストReq0は、現在処理中のリク
エストの情報である。リクエストReq0がリードであ
る場合は、リードが続くように、ライトである場合はラ
イトが続くように選択を行う。
The request Req0 is information on the request currently being processed. If the request Req0 is a read, the read is continued, and if it is a write, the write is continued.

【0073】リクエストReq1は、現在、リクエスト
保持回路11に保持されているリクエストの中で1番目
のリクエストであり、次に発行するべきリクエストであ
る。ただし、リクエスト入れ替え回路12によりリクエ
ストReq2が先に選択された場合には、その後に発行
されることになる。
The request Req1 is the first request currently held in the request holding circuit 11 and is the request to be issued next. However, when the request replacement circuit 12 first selects the request Req2, the request Req2 is issued after that.

【0074】リクエストReq2は、現在、リクエスト
保持回路11に保持されているリクエストの中で2番目
のリクエストであり、リクエストReq1の次に発行す
るべきリクエストである。ただし、リクエスト入れ替え
回路12は、リクエストReq1より前にリクエストR
eq2を発行するべきかどうかを判定しており、リクエ
ストReq2がリクエストReq1より先行して発行さ
れることもある。
The request Req2 is the second request currently held in the request holding circuit 11, and is the request to be issued next to the request Req1. However, the request replacement circuit 12 receives the request R before the request Req1.
It is determined whether or not eq2 should be issued, and the request Req2 may be issued prior to the request Req1.

【0075】また、メモリコントローラ1に来るリクエ
ストの順番によっては、あるリクエストがリクエストR
eq1として際限なく後回しとなる状態が起こり得る。
これを防ぐために、リクエストReq1を後回しにする
ことができる回数の上限を外部から設定できるようにし
ている。この制限値を先発行閾値と呼ぶことにする。
Depending on the order of the requests coming to the memory controller 1, a certain request may be a request R.
A state in which eq1 is postponed indefinitely may occur.
In order to prevent this, the upper limit of the number of times that the request Req1 can be postponed can be set from the outside. This limit value will be called a pre-issue threshold.

【0076】また、セレクト信号は、次に処理すべきリ
クエストとして選択されたリクエストの番号を示す。
The select signal indicates the number of the request selected as the request to be processed next.

【0077】図7に示すフローチャートは、基本的に、
リクエストReq0が発行されたら、リクエストReq
1、リクエストReq2の順にリクエストを発行してい
くが、リクエストReq0とリクエストReq1とでリ
ードとリードが続く或いはライトとライトとが続かなけ
れば、リクエストReq0とリクエストReq2とでリ
ードとリードが続く或いはライトとライトとが続くかを
判断し、リクエストReq0とリクエストReq2とで
リードとリードが続く或いはライトとライトとが続くな
ら、リクエストReq2をリクエストReq1より先行
して発行させることで、リード或いはライトが続くよう
にリクエストを入れ替えている。ただし、リクエストR
eq1を後回しにすることができる回数の上限を先発行
閾値内とするようにしている。
The flowchart shown in FIG. 7 is basically
When request Req0 is issued, request Req
1. Requests are issued in order of request Req2, but if read and read continue with request Req0 and request Req1 or if write and write do not continue, read and read continue or write with request Req0 and request Req2. Read and write continue with the request Req0 and the request Req2 or if write and write continue, the request Req2 is issued prior to the request Req1 to continue the read or write. To replace the request. However, request R
The upper limit of the number of times that eq1 can be postponed is set within the pre-issue threshold.

【0078】図7において、リクエストReq2がある
か否かが判断される(ステップS1)。ステップS1
で、リクエストReq2がなければ、次に発行すべきリ
クエストはリクエストReq1になるので、先発行カウ
ンタがリセットされ(ステップS2)、リクエストRe
q1が発行される(ステップS3)。
In FIG. 7, it is judged whether or not there is a request Req2 (step S1). Step S1
If there is no request Req2, the request to be issued next is the request Req1, so the previous issue counter is reset (step S2), and the request Req2 is issued.
q1 is issued (step S3).

【0079】ステップS1で、リクエストReq2があ
る場合には、現在発行しているリクエストReq0と次
に発行すべきリクエストReq1との関係が、リードが
続く或いはライトが続く関係であるか否かが判断される
(ステップS4)。
In step S1, if there is a request Req2, it is judged whether the relationship between the request Req0 that is currently issued and the request Req1 that should be issued next is a relationship in which a read continues or a write continues. (Step S4).

【0080】ステップS4で、リクエストReq0とリ
クエストReq1との関係が、リードが続く或いはライ
トが続く関係であるなら、次に発行すべきリクエストは
リクエストReq1になり、先発行カウンタがリセット
され(ステップS2)、リクエストReq1が発行され
る(ステップS3)。
In step S4, if the relationship between the request Req0 and the request Req1 is such that the read continues or the write continues, the request to be issued next becomes the request Req1 and the previous issue counter is reset (step S2 ), And the request Req1 is issued (step S3).

【0081】ステップS4で、リクエストReq0とリ
クエストReq1との関係が、リードが続く或いはライ
トが続く関係ではなければ、現在発行しているリクエス
トReq0と、リクエストReq1の次に発行すべきリ
クエストReq2との関係が、リードが続く或いはライ
トが続く関係であるか否かが判断される(ステップS
5)
In step S4, if the relationship between the request Req0 and the request Req1 is not such that the read continues or the write continues, the currently issued request Req0 and the request Req2 that should be issued next to the request Req1. It is determined whether or not the relationship is such that the read continues or the write continues (step S).
5)

【0082】ステップS5で、リクエストReq0とリ
クエストReq2との関係が、リードが続く或いはライ
トが続く関係でないなら、リクエストReq0とリクエ
ストReq1との関係も、リクエストReq0とリクエ
ストReq2との関係も、共にリードが続く或いはライ
トが続く関係でないので、リクエストの入れ替えは行わ
れない。この場合、次に発行すべきリクエストはリクエ
ストReq1になり、先発行カウンタがリセットされ
(ステップS2)、リクエストReq1が発行される
(ステップS3)。
In step S5, if the relationship between the request Req0 and the request Req2 is not the relationship in which the read continues or the write continues, both the relationship between the request Req0 and the request Req1 and the relationship between the request Req0 and the request Req2 are both read. Requests are not exchanged because there is no relation between or continues with or light. In this case, the request to be issued next becomes the request Req1, the previous issue counter is reset (step S2), and the request Req1 is issued (step S3).

【0083】ステップS5で、リクエストReq0とリ
クエストReq2との関係が、リードが続く或いはライ
トが続く関係であるなら、リクエストReq1とリクエ
ストReq2とのアクセス領域が重なるか否かが判断さ
れる(ステップS6)。
If the relationship between the request Req0 and the request Req2 is such that the read continues or the write continues in step S5, it is determined whether the access areas of the request Req1 and the request Req2 overlap (step S6). ).

【0084】リクエストReq1がアクセスする領域
と、リクエストReq2がアクセスする領域が重なって
いる場合、順番を変えることはできない。この場合に
は、順番を入れ替えることなく、リクエストReq1を
発行することになり、先発行カウンタがリセットされ
(ステップS2)、リクエストReq1が発行される
(ステップS3)。
When the area accessed by the request Req1 and the area accessed by the request Req2 overlap, the order cannot be changed. In this case, the request Req1 is issued without changing the order, the previous issue counter is reset (step S2), and the request Req1 is issued (step S3).

【0085】なお、判定の方法は、リクエストReq
1,リクエストReq2、それぞれのアクセス開始アド
レス、終了アドレスを計算し、次の2つの条件 (1)リクエストReq1の開始アドレス<リクエスト
Req2の開始アドレス<リクエストReq1の終了ア
ドレス (2)リクエストReq1の開始アドレス<リクエスト
Req2の終了アドレス<リクエストReq1の終了ア
ドレス の両方を満たさない場合は、重なっていない、逆に、ど
ちらか一方でも満たした場合は重なっているものと判定
している。
The method of determination is the request Req.
1, request Req2, each access start address and end address are calculated, and the following two conditions (1) start address of request Req1 <start address of request Req2 <end address of request Req1 (2) start address of request Req1 <End address of request Req2 <If both end addresses of request Req1 are not satisfied, it is determined that they are not overlapped, and conversely, if either one is satisfied, it is determined that they are overlapped.

【0086】ステップS6で、リクエストReq1とリ
クエストReq2とのアクセス領域が重ならない場合に
は、先発行カウンタの値が閾値以下か否かが判断され
(ステップS7)、閾値以下なら、リクエストの入れ替
えが行われる。この場合、次に発行すべきリクエストは
リクエストReq2になり、先発行カウンタがインクリ
メントされ(ステップS8)、リクエストReq2が発
行される(ステップS9)。
In step S6, when the access areas of the request Req1 and the request Req2 do not overlap, it is determined whether or not the value of the pre-issue counter is less than or equal to the threshold value (step S7). Done. In this case, the request to be issued next becomes the request Req2, the previous issue counter is incremented (step S8), and the request Req2 is issued (step S9).

【0087】なお、この例では、リクエストReq0と
リクエストReq1とでリードとリードが続く或いはラ
イトとライトとが続かなければ、リクエストReq0と
リクエストReq2とでリードとリードが続く或いはラ
イトとライトとが続くかを判断し、リクエストReq0
とリクエストReq2とでリードとリードが続く或いは
ライトとライトとが続くなら、リクエストReq2をリ
クエストReq1より先行して発行させることで、リー
ド或いはライトが続くようにリクエストを入れ替えてい
るが、リクエストの入れ替えの方法は、このような方法
に限定されるものではない。
In this example, if the request Req0 and the request Req1 continue to be read and read or the write and write do not continue, the request Req0 and the request Req2 continue to read and read or the write and write continue. Request, Req0
If read and read continue or write and write continue with request Req2, request Req2 is issued before request Req1 so that the request is switched so that read or write continues, but the request replacement The method is not limited to such a method.

【0088】以上のように、この発明の実施の形態で
は、リクエスト保持回路11に保持されたリクエスト
を、そのままの順にコマンド生成回路13に送るのでは
なく、リード同士或いはライト同士が続くように、リク
エストを入れ替えるようにしている。その結果、データ
アクセス効率を向上することができる。
As described above, according to the embodiment of the present invention, the requests held in the request holding circuit 11 are not sent to the command generation circuit 13 in the same order, but read or write is continued. I'm trying to replace the requests. As a result, the data access efficiency can be improved.

【0089】[0089]

【発明の効果】この発明によれば、リードコマンド同士
或いはライトコマンド同士が続くように、リクエスト保
持回路に保持されているリードリクエスト或いはライト
リクエストの順番を入れ替えるようにしている。これに
より、無駄なサイクルが発生することがなくなり、メモ
リのアクセス効率が向上する。
According to the present invention, the order of read requests or write requests held in the request holding circuit is switched so that read commands or write commands continue. As a result, useless cycles do not occur and the memory access efficiency is improved.

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

【図1】この発明が適用されたメモリコントローラの一
例のブロック図である。
FIG. 1 is a block diagram of an example of a memory controller to which the present invention is applied.

【図2】この発明が適用されたメモリコントローラの説
明に用いる略線図である。
FIG. 2 is a schematic diagram used for explaining a memory controller to which the present invention is applied.

【図3】この発明が適用されたメモリコントローラの一
例の説明に用いるタイミングチャートである。
FIG. 3 is a timing chart used for explaining an example of a memory controller to which the present invention is applied.

【図4】この発明が適用されたメモリコントローラの一
例の説明に用いるタイミングチャートである。
FIG. 4 is a timing chart used for explaining an example of a memory controller to which the present invention is applied.

【図5】この発明が適用されたメモリコントローラの一
例の説明に用いるタイミングチャートである。
FIG. 5 is a timing chart used for explaining an example of a memory controller to which the present invention is applied.

【図6】この発明が適用されたメモリコントローラの一
例の説明に用いるタイミングチャートである。
FIG. 6 is a timing chart used for explaining an example of a memory controller to which the present invention is applied.

【図7】リクエストの入れ替え処理の説明に用いるフロ
ーチャートである。
FIG. 7 is a flowchart used to explain request replacement processing.

【図8】従来のメモリコントローラの一例のブロック図
である。
FIG. 8 is a block diagram of an example of a conventional memory controller.

【図9】従来のメモリコントローラの一例の説明に用い
るタイミングチャートである。
FIG. 9 is a timing chart used to describe an example of a conventional memory controller.

【図10】従来のメモリコントローラの一例の説明に用
いるタイミングチャートである。
FIG. 10 is a timing chart used to describe an example of a conventional memory controller.

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

1・・・メモリコントローラ、2・・・メモリ、5A、
5B・・・プロセッサ、11・・・リクエスト保持回
路、12・・・リクエスト入れ替え回路、13・・・コ
マンド生成回路、14・・・データ制御回路
1 ... Memory controller, 2 ... Memory, 5A,
5B ... Processor, 11 ... Request holding circuit, 12 ... Request replacement circuit, 13 ... Command generation circuit, 14 ... Data control circuit

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 クロックを使用してデータのリード或い
はライトを行う同期型メモリを制御するメモリ制御装置
であって、 上記メモリに対するリードリクエスト或いはライトリク
エストを保存するリクエスト保持手段と、 上記リクエスト保持手段に保持されているリクエストの
中から、リードリクエスト同士或いはライトリクエスト
同士が連続するようにリクエストの順番を入れ替えるリ
クエスト入れ替え手段と、 上記リクエストに応じて上記メモリをリード或いはライ
トするためのコマンドを生成するコマンド生成手段とを
備えるようにしたメモリ制御装置。
1. A memory control device for controlling a synchronous memory for reading or writing data by using a clock, comprising: request holding means for storing a read request or write request for the memory; and the request holding means. Request exchange means for changing the order of the requests so that read requests or write requests continue from among the requests held in, and a command for reading or writing the memory according to the request is generated. A memory control device comprising a command generating means.
【請求項2】 上記メモリは、SDRAMである請求項
1に記載のメモリ制御装置。
2. The memory control device according to claim 1, wherein the memory is an SDRAM.
【請求項3】 上記リクエスト入れ替え手段は、現在発
行しているリクエストと、次に発行すべきリクエストと
でリード同士或いはライト同士が続くかどうかを判断
し、リード同士或いはライト同士が続かなければ、現在
発行しているリクエストと、更にその次に発行すべきリ
クエストとでリード同士或いはライト同士が続くかどう
かを判断し、現在発行しているリクエストと、更にその
次に発行すべきリクエストとでリード同士或いはライト
同士が続くなら、次に発行すべきリクエストと更に次に
発行すべきリクエストとを入れ替えるようにした請求項
1に記載のメモリ制御装置。
3. The request exchanging means determines whether or not reads or writes continue between a request currently issued and a request to be issued next, and if reads or writes do not continue, It is determined whether read or write continues between the request currently issued and the request that should be issued next, and read between the request currently issued and the request that should be issued next. 2. The memory control device according to claim 1, wherein if a plurality of write requests or a plurality of write requests continue, the request to be issued next and the request to be issued next are exchanged.
【請求項4】 上記リクエスト入れ替え手段は、更に、
次に発行すべきリクエストと更に次に発行すべきリクエ
ストとの入れ替えの回数をカウントするカウント手段を
備え、上記次に発行すべきリクエストと更に次に発行す
べきリクエストとの入れ替えの回数が所定値に達した
ら、次に発行すべきリクエストと更に次に発行すべきリ
クエストとの入れ替えを制限するようにした請求項3に
記載のメモリ制御装置。
4. The request replacement means further comprises:
A count means for counting the number of exchanges of the request to be issued next and the request to be issued next is provided, and the number of exchanges of the request to be issued next and the request to be issued next is a predetermined value. 4. The memory control device according to claim 3, wherein when the request reaches, the exchange of the request to be issued next and the request to be issued next is restricted.
【請求項5】 クロックを使用してデータのリード或い
はライトを行う同期型メモリを制御するメモリ制御方法
であって、 上記メモリに対するリードリクエスト或いはライトリク
エストを保存し、 上記保持されているリクエストの中から、リードリクエ
スト同士或いはライトリクエスト同士が連続するように
リクエストの順番を入れ替え、 上記リクエストに応じて上記メモリをリード或いはライ
トするためのコマンドを生成するようにしたメモリ制御
方法。
5. A memory control method for controlling a synchronous memory for reading or writing data by using a clock, wherein a read request or a write request to the memory is stored, and the stored request is stored. Then, the order of the requests is switched so that the read requests or the write requests are consecutive, and a command for reading or writing the memory is generated according to the request.
【請求項6】 上記メモリは、SDRAMである請求項
5に記載のメモリ制御方法。
6. The memory control method according to claim 5, wherein the memory is an SDRAM.
【請求項7】 上記リクエスト入れ替えは、現在発行し
ているリクエストと、次に発行すべきリクエストとでリ
ード同士或いはライト同士が続くかどうかを判断し、リ
ード同士或いはライト同士が続かなければ、現在発行し
ているリクエストと、更にその次に発行すべきリクエス
トとでリード同士或いはライト同士が続くかどうかを判
断し、現在発行しているリクエストと、更にその次に発
行すべきリクエストとでリード同士或いはライト同士が
続くなら、次に発行すべきリクエストと更に次に発行す
べきリクエストとを入れ替えるようにした請求項5に記
載のメモリ制御方法。
7. The request exchange is performed by determining whether a read request and a request to be issued next are continuously read or written, and if the read or write is not continued, Reads between the request being issued and the request to be issued next, read or write between the requests, and read between the request currently issued and the request to be issued next. The memory control method according to claim 5, wherein if the writes continue, the request to be issued next and the request to be issued next are exchanged.
【請求項8】 上記リクエスト入れ替えは、更に、次に
発行すべきリクエストと更に次に発行すべきリクエスト
との入れ替えの回数をカウントし、上記次に発行すべき
リクエストと更に次に発行すべきリクエストとの入れ替
えの回数が所定値に達したら、次に発行すべきリクエス
トと更に次に発行すべきリクエストとの入れ替えを制限
するようにした請求項7に記載のメモリ制御方法。
8. The request exchange further counts the number of exchanges of a request to be issued next and a request to be issued next, and the request to be issued next and the request to be issued next. 8. The memory control method according to claim 7, wherein when the number of replacements of the request and the request to be issued next reaches a predetermined value, the replacement of the request to be issued next and the request to be issued next is limited.
JP2002071321A 2002-03-15 2002-03-15 Memory control device and method Pending JP2003271445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002071321A JP2003271445A (en) 2002-03-15 2002-03-15 Memory control device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002071321A JP2003271445A (en) 2002-03-15 2002-03-15 Memory control device and method

Publications (1)

Publication Number Publication Date
JP2003271445A true JP2003271445A (en) 2003-09-26

Family

ID=29201635

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002071321A Pending JP2003271445A (en) 2002-03-15 2002-03-15 Memory control device and method

Country Status (1)

Country Link
JP (1) JP2003271445A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009157886A (en) * 2007-12-28 2009-07-16 Nec Corp Method and system for controlling load store queue
JP2009543269A (en) * 2006-07-07 2009-12-03 エス. アクア セミコンダクター, エルエルシー Memory with front-end precharge
JP2010244408A (en) * 2009-04-08 2010-10-28 Fujitsu Semiconductor Ltd Memory controller and memory interface method
US8095853B2 (en) 2007-10-19 2012-01-10 S. Aqua Semiconductor Llc Digital memory with fine grain write operation
JP2013020450A (en) * 2011-07-11 2013-01-31 Ricoh Co Ltd Memory controller, information processor, and memory control method
JP2015103008A (en) * 2013-11-25 2015-06-04 富士通株式会社 Memory controller, information processing apparatus, and memory controller control method
JP2017054483A (en) * 2015-09-08 2017-03-16 ソニー株式会社 Memory controller, memory system, and control method of memory controller

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009543269A (en) * 2006-07-07 2009-12-03 エス. アクア セミコンダクター, エルエルシー Memory with front-end precharge
US8095853B2 (en) 2007-10-19 2012-01-10 S. Aqua Semiconductor Llc Digital memory with fine grain write operation
JP2009157886A (en) * 2007-12-28 2009-07-16 Nec Corp Method and system for controlling load store queue
JP4569628B2 (en) * 2007-12-28 2010-10-27 日本電気株式会社 Load store queue control method and control system thereof
JP2010244408A (en) * 2009-04-08 2010-10-28 Fujitsu Semiconductor Ltd Memory controller and memory interface method
JP2013020450A (en) * 2011-07-11 2013-01-31 Ricoh Co Ltd Memory controller, information processor, and memory control method
US9166933B2 (en) 2011-07-11 2015-10-20 Ricoh Company, Limited Memory control apparatus, information processing apparatus, and memory control method
JP2015103008A (en) * 2013-11-25 2015-06-04 富士通株式会社 Memory controller, information processing apparatus, and memory controller control method
JP2017054483A (en) * 2015-09-08 2017-03-16 ソニー株式会社 Memory controller, memory system, and control method of memory controller

Similar Documents

Publication Publication Date Title
JP4786209B2 (en) Memory access device
US7707328B2 (en) Memory access control circuit
US8095744B2 (en) Device for controlling access from a plurality of masters to shared memory composed of a plurality of banks each having a plurality of pages
US7281110B1 (en) Random access memory controller with out of order execution
JP5272274B2 (en) System, apparatus, and method for changing memory access order
US20010019331A1 (en) Unified memory architecture for use in computer system
JP5893632B2 (en) Memory controller, system, and method for applying page management policy based on stream transaction information
JP2008204487A (en) Out of order dram sequencer
JP2009015832A (en) Inter-access arbitration circuit, semiconductor device, and inter-access arbitration method
US9330025B2 (en) Information processing apparatus, memory control apparatus, and control method thereof
US6922770B2 (en) Memory controller providing dynamic arbitration of memory commands
KR20030029030A (en) Memory control method, memory control circuit using the control method, and integrated circuit device with the memory control circuit
JP2003271445A (en) Memory control device and method
JP2007018222A (en) Memory access control circuit
JP4693843B2 (en) Memory control device and memory control method
JP2011034214A (en) Memory controller
JP2010129029A (en) Memory access control apparatus and memory access control method
JP2013089030A (en) Information processing system, control system, and semiconductor device
KR100546678B1 (en) Apparatus and Method for Controlling Refresh Operation of Data Processing System
JP2008269348A (en) Memory control device and memory control method
JP2001209573A (en) Memory address converter
JP2006164099A (en) Memory control unit
US20070073961A1 (en) Memory controller
TW202407702A (en) Pseudo-static random access memory
JP3303420B2 (en) Memory access control device