JP2011034214A - Memory controller - Google Patents

Memory controller Download PDF

Info

Publication number
JP2011034214A
JP2011034214A JP2009178050A JP2009178050A JP2011034214A JP 2011034214 A JP2011034214 A JP 2011034214A JP 2009178050 A JP2009178050 A JP 2009178050A JP 2009178050 A JP2009178050 A JP 2009178050A JP 2011034214 A JP2011034214 A JP 2011034214A
Authority
JP
Japan
Prior art keywords
memory
command
priority
access request
memory access
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
JP2009178050A
Other languages
Japanese (ja)
Inventor
Masato Uchihara
正人 内原
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2009178050A priority Critical patent/JP2011034214A/en
Publication of JP2011034214A publication Critical patent/JP2011034214A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To achieve parallel processing of low-priority memory access without lowering efficiency of high-priority memory access. <P>SOLUTION: This memory controller divides a memory access request, decides priority of the memory access requests, and distribute them to a high-priority command buffer 105 holding the high-priority memory access request and a low-priority command buffer 106 holding the low-priority memory access request. The memory controller compares the high-priority memory access request and the low-priority memory access request, determines execution order of memory commands, and performs control to select and execute the high-priority memory access request and the low-priority memory access request according to the execution order of the memory commands. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明はメモリ制御装置に関し、特に、メモリアクセス要求に対するアクセス制御に用いて好適な技術に関する。   The present invention relates to a memory control device, and more particularly to a technique suitable for use in access control for a memory access request.

近年、システムLSIの構成として、複数のバスマスタが1つのメモリデバイスを主記憶として共有するユニファイドメモリ構成が多く用いられ、また主記憶には一般的にDRAMが用いられている。このようなシステムでは、各バスマスタからのメモリアクセス要求に対するアクセス制御は、システムの性能に大きな影響を与える。   In recent years, as a configuration of a system LSI, a unified memory configuration in which a plurality of bus masters share one memory device as a main memory is often used, and a DRAM is generally used as the main memory. In such a system, access control with respect to a memory access request from each bus master greatly affects the performance of the system.

DRAMに保存された映像データを液晶表示素子(LCD)に出力する場合、データ読み出し/書き込みの繰り返し処理と、液晶表示回路が決められたフレームレートで映像表示するためのデータ読み出し処理とが並列実行される。したがって、CPUからのメモリアクセスの割り込みにより映像データ処理回路のデータ読み出し/書き込み処理が滞ってしまうと、液晶表示回路が読み出す伸張データが欠損し、LCDに正常な映像を出力できなくなる。このようなシステムの破綻を防ぐためには、リアルタイム処理が必要な映像データ処理回路のメモリアクセス帯域を制御し、一定期間内のデータ読み出し/書き込み処理の完了を保証する必要がある。   When video data stored in DRAM is output to a liquid crystal display (LCD), repeated data read / write processing and data read processing for displaying images at a frame rate determined by the liquid crystal display circuit are executed in parallel. Is done. Therefore, if the data read / write processing of the video data processing circuit is delayed due to the memory access interruption from the CPU, the decompressed data read by the liquid crystal display circuit is lost, and normal video cannot be output to the LCD. In order to prevent such a failure of the system, it is necessary to control the memory access bandwidth of the video data processing circuit that requires real-time processing to guarantee the completion of the data reading / writing processing within a certain period.

従来、アクセス要求に対する帯域を保証する方法として、複数のバスマスタからのメモリアクセス要求の実行順序及び実行頻度を、各バスマスタとメモリ制御回路とを接続するバスで調整するバスアービタ方式が一般的に用いられている。すなわち、複数のバスマスタからのメモリアクセスが競合した際に、ラウンドロビン方式で順次アクセスを許可したり、固定された優先度でアクセスを許可したりする。これにより、バスマスタ毎のメモリアクセス頻度を優先度に応じて可変にすることが可能となる。   Conventionally, as a method for guaranteeing a bandwidth for an access request, a bus arbiter method is generally used in which the execution order and execution frequency of memory access requests from a plurality of bus masters are adjusted by a bus connecting each bus master and the memory control circuit. ing. That is, when memory accesses from a plurality of bus masters compete, sequential access is permitted in a round robin manner, or access is permitted with a fixed priority. As a result, the memory access frequency for each bus master can be made variable according to the priority.

特開平7−319756号公報Japanese Patent Laid-Open No. 7-319756

しかしながら、従来技術に示される手法では、メモリアクセス許可を切り替える際に優先度の高いバスマスタのメモリアクセスの効率が低下してしまうという問題がある。バスアービタ方式では、優先度の高いバスマスタに対して一定期間優先的にメモリアクセスを保証することが可能であるが、優先度の低いバスマスタに対しても一定の割合でメモリアクセスを許可する。このとき、メモリアクセス許可を切り替えるタイミングはラウンドロビン方式や固定優先方式といったバスアービタに内蔵された手順に従っており、直前のメモリアクセスとの連続性等は考慮されない。このため、優先度の低いバスマスタのメモリアクセス要求が、優先度の高いバスマスタの連続するメモリアクセス要求にバスアービタにて決定されたタイミングで割り込んでしまう。これにより、メモリアクセスの効率の低下、さらには優先度の高いメモリアクセスの帯域が保証されなくなる可能性がある。   However, the technique shown in the prior art has a problem that the memory access efficiency of the bus master having a high priority is lowered when switching the memory access permission. In the bus arbiter method, it is possible to preferentially guarantee memory access to a bus master having a high priority for a certain period of time, but memory access is permitted to a bus master having a low priority at a certain ratio. At this time, the timing for switching the memory access permission follows the procedure built in the bus arbiter such as the round robin method or the fixed priority method, and the continuity with the immediately preceding memory access is not considered. For this reason, a memory access request of a bus master having a low priority interrupts a memory access request of a bus master having a high priority at a timing determined by the bus arbiter. As a result, there is a possibility that the memory access efficiency is lowered, and further, the high-priority memory access bandwidth is not guaranteed.

本発明は前述の問題点に鑑み、優先度の高いメモリアクセスの効率を低下させることなく、優先度の低いメモリアクセスの並列処理を実現できるようにすることを目的としている。   The present invention has been made in view of the above-described problems, and an object of the present invention is to realize parallel processing of low-priority memory access without reducing the efficiency of high-priority memory access.

本発明のメモリ制御装置は、バスマスタからのメモリアクセス要求を受けてメモリデバイスにメモリコマンドを発行するメモリ制御装置であって、前記バスマスタからのメモリアクセス要求をメモリコマンド単位に分割する分割手段と、前記分割手段によって分割されたメモリアクセス要求の優先度を判定する判定手段と、前記判定手段によって判定された優先度の高いメモリアクセス要求を保持する第1の保持手段と、前記判定手段によって判定された優先度の低いメモリアクセス要求を保持する第2の保持手段と、前記第1の保持手段に保持された優先度の高いメモリアクセス要求と、前記第2の保持手段に保持された優先度の低いメモリアクセス要求とを比較し、メモリコマンドの実行の順序を決定する決定手段と、前記メモリコマンドの実行の順序に従って、前記優先度の高いメモリアクセス要求と前記優先度の低いメモリアクセス要求とを選択して実行する実行手段とを備えることを特徴とする。   A memory control device according to the present invention is a memory control device that receives a memory access request from a bus master and issues a memory command to a memory device, and a dividing unit that divides the memory access request from the bus master into memory command units; The determination means for determining the priority of the memory access request divided by the dividing means, the first holding means for holding the memory access request with the high priority determined by the determination means, and the determination means A second holding unit that holds a low-priority memory access request, a high-priority memory access request that is held in the first holding unit, and a priority level that is held in the second holding unit. Determining means for comparing a low memory access request and determining an execution order of memory commands; and the memory command According to the order of execution, characterized by comprising an execution means for selecting and executing the higher priority memory access request and said low priority memory access requested.

本発明によれば、複数のバスマスタからの共有メモリアクセスにおいて、優先度の高いメモリアクセスの効率を低下させることなく、優先度の低いメモリアクセスの並列処理を実行することができる。   According to the present invention, in shared memory access from a plurality of bus masters, it is possible to execute parallel processing of low priority memory access without reducing the efficiency of high priority memory access.

本発明の実施形態に係るメモリ制御回路の構成例を示すブロック図である。It is a block diagram which shows the structural example of the memory control circuit which concerns on embodiment of this invention. 生成されるメモリコマンド情報の一例を示す図である。It is a figure which shows an example of the memory command information produced | generated. メモリコマンド情報の生成手順の一例を示すフローチャートである。It is a flowchart which shows an example of the production | generation procedure of memory command information. DRAMバスの挙動を示す図である。It is a figure which shows the behavior of DRAM bus. 高優先度コマンドバッファの状態を示す図である。It is a figure which shows the state of a high priority command buffer. 低優先度コマンドバッファの状態を示す図である。It is a figure which shows the state of a low priority command buffer. メモリバス未使用期間の算出方法を示す図である。It is a figure which shows the calculation method of a memory bus unused period. メモリバス使用期間の算出方法を示す図である。It is a figure which shows the calculation method of a memory bus use period. DRAMバスの挙動を示す図である。It is a figure which shows the behavior of DRAM bus.

(第1の実施形態)
以下、本発明の実施形態について、図面を参照しながら説明する。
図1は、本実施形態に係るメモリ制御装置100の構成例を示すブロック図である。
図1において、バスマスタ101からメモリデバイスである共有のDRAM111へメモリアクセスが要求されると、その要求がバス102を介してメモリ制御装置100に転送される。メモリ制御装置100で受け付けられたメモリアクセス要求は、コマンド分割回路103によってメモリコマンド単位の実行情報を有するメモリコマンド情報に分割される。メモリコマンド情報は、発行元であるバスマスタ101の識別子を元に優先度振り分け回路104により、高優先度メモリコマンド情報、低優先度メモリコマンド情報に振り分けられる。そして、それぞれ第1の保持手段である高優先度コマンドバッファ105、または第2の保持手段である低優先度コマンドバッファ106に保持される。
(First embodiment)
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram illustrating a configuration example of the memory control device 100 according to the present embodiment.
In FIG. 1, when a memory access is requested from the bus master 101 to the shared DRAM 111 which is a memory device, the request is transferred to the memory control device 100 via the bus 102. The memory access request received by the memory control device 100 is divided by the command dividing circuit 103 into memory command information having execution information in units of memory commands. The memory command information is distributed to high priority memory command information and low priority memory command information by the priority distribution circuit 104 based on the identifier of the bus master 101 that is the issuer. Then, the data is held in the high priority command buffer 105 serving as the first holding unit or the low priority command buffer 106 serving as the second holding unit.

各コマンドバッファに入力されたメモリコマンド情報は、先頭のメモリコマンド情報からメモリコマンド制御回路109に順次転送される。メモリコマンド情報は、転送可能なあるタイミングにおいて、選択回路108により高優先度コマンドバッファ105あるいは低優先度コマンドバッファ106のメモリコマンド情報のどちらか1つだけが選択される。メモリコマンド比較回路107は、低優先度メモリコマンドが高優先度メモリコマンドの間に、メモリバスの効率が低下することなく挿入可能であるかどうかを判断する。低優先度メモリコマンドが挿入可能な場合は、選択回路108に対して入力切り替え信号が出力され、メモリコマンド制御回路109に低優先度メモリコマンドが転送される。   Memory command information input to each command buffer is sequentially transferred to the memory command control circuit 109 from the top memory command information. As for the memory command information, only one of the memory command information of the high priority command buffer 105 or the low priority command buffer 106 is selected by the selection circuit 108 at a certain transferable timing. The memory command comparison circuit 107 determines whether or not a low priority memory command can be inserted between high priority memory commands without reducing the efficiency of the memory bus. When a low priority memory command can be inserted, an input switching signal is output to the selection circuit 108 and the low priority memory command is transferred to the memory command control circuit 109.

次に、本実施形態のコマンド分割回路103の詳細について図2及び図3を参照しながら説明する。
バスマスタ101からのメモリアクセス要求は、データ転送開始アドレス、データ転送長及びデータ転送方向(読み出し/書き込み)により構成される。コマンド分割回路103は、これらの情報をもとにメモリアクセス要求を実行するのに必要な一連のメモリコマンド情報を生成する。
Next, the details of the command dividing circuit 103 of this embodiment will be described with reference to FIGS.
A memory access request from the bus master 101 is constituted by a data transfer start address, a data transfer length, and a data transfer direction (read / write). The command division circuit 103 generates a series of memory command information necessary for executing a memory access request based on these pieces of information.

図2は、生成されるメモリコマンド情報の一例を示す図である。
図2に示すように、メモリコマンド情報は、コマンド種類(CMD)、チップセレクト信号(CS)、バンクセレクト信号(BS)、ロウアドレス信号(ROW)が含まれる。さらに、カラムアドレス信号(COL)、バーストイネーブル信号(BEN),バスマスタ識別子(ID)が含まれる。
FIG. 2 is a diagram illustrating an example of the generated memory command information.
As shown in FIG. 2, the memory command information includes a command type (CMD), a chip select signal (CS), a bank select signal (BS), and a row address signal (ROW). Further, a column address signal (COL), a burst enable signal (BEN), and a bus master identifier (ID) are included.

コマンド種別(CMD)には、DRAM111のページ制御に必要なプリチャージコマンド(PRE)がある。さらに、アクティブコマンド(ACT)とDRAM111とからのデータ読み出し/書き込み制御のためのリードコマンド(READ)、ライトコマンド(WRITE)がある。CS,BS,ROW,COLは、メモリコマンド発行の対象となるDRAM111のチップ、バンクおよびページを指定する指標である。これらの指標の一部は、コマンドによってはケアされないものもある。例えば、PREコマンドを発行する場合にCOL情報は使用されない。また、READまたはWRITEコマンドを発行する場合にROW情報は使用されない。   The command type (CMD) includes a precharge command (PRE) necessary for page control of the DRAM 111. Further, there are an active command (ACT) and a read command (READ) and a write command (WRITE) for data read / write control from the DRAM 111. CS, BS, ROW, and COL are indexes that specify the chip, bank, and page of the DRAM 111 that is the target of issuing memory commands. Some of these indicators may not be cared for by some commands. For example, COL information is not used when issuing a PRE command. Also, ROW information is not used when issuing READ or WRITE commands.

BENは、データ転送の有効範囲を示す指標である。DRAM111は一回のREAD/WRITEコマンド発行で転送するデータ長が固定となる。このため、メモリアクセス要求が一回のREAD/WRITEコマンドで転送できるデータ長より大きい場合は、複数回のREAD/WRITEコマンド発行が必要となる。逆に、メモリアクセス要求が一回のREAD/WRITEコマンドで転送されるデータ長より小さい場合は、データマスク信号を用いて有効なデータ範囲を指定する。BENは、READ/WRITEコマンド実行時のデータマスク信号制御に使用される。バス識別子IDは優先度振り分け回路に参照され、分割されたメモリアクセス要求の優先度振り分けに利用される。   BEN is an index indicating the effective range of data transfer. The DRAM 111 has a fixed data length to be transferred by issuing a single READ / WRITE command. For this reason, when the memory access request is longer than the data length that can be transferred by one READ / WRITE command, it is necessary to issue a plurality of READ / WRITE commands. Conversely, if the memory access request is smaller than the data length transferred by a single READ / WRITE command, a valid data range is specified using a data mask signal. BEN is used for data mask signal control when a READ / WRITE command is executed. The bus identifier ID is referred to by the priority distribution circuit and used for the priority distribution of the divided memory access requests.

図3は、コマンド分割回路103におけるメモリコマンド情報の生成手順の一例を示すフローチャートである。
図3において、コマンド分割回路103は、バスマスタからのメモリ転送要求を受け付けると、まず、ステップS301において、転送開始アドレスをDRAM111におけるCS,BS,ROW,COLに対応する情報にデコードする。
FIG. 3 is a flowchart illustrating an example of a procedure for generating memory command information in the command dividing circuit 103.
In FIG. 3, when receiving a memory transfer request from the bus master, the command dividing circuit 103 first decodes the transfer start address into information corresponding to CS, BS, ROW, and COL in the DRAM 111 in step S301.

次に、ステップS302において、ページ制御コマンド生成を行う。このステップS302では、ステップS301で生成されたCS, BS, ROW,COLを元に、対応するDRAM111のページのオープン/クローズの状況に応じてPREあるいはACTコマンド発行が必要であるか否かを判断する。そして、一度そのページをクローズ状態に戻すためのプリチャージコマンド(PRE)と、ROWに対応するページをオープン状態にするためのアクティブコマンド(ACT)とをメモリコマンド情報として生成する。   Next, in step S302, a page control command is generated. In this step S302, based on the CS, BS, ROW, and COL generated in step S301, it is determined whether a PRE or ACT command is required depending on the open / close status of the corresponding DRAM 111 page. To do. Then, a precharge command (PRE) for returning the page to the closed state once and an active command (ACT) for opening the page corresponding to the ROW are generated as memory command information.

また、アクセス対象となるCS、BSにおいてオープンでない場合は、ROWに対応するページをオープン状態にするためのアクティブコマンド(ACT)を発行するようなメモリコマンド情報のみが生成される。一方、アクセス対象となるCS,BSにおいてROWに対応するページが既にオープンになっている場合は、ページ制御コマンドは発行する必要がないためメモリコマンド情報は生成されない。   If the CS or BS to be accessed is not open, only memory command information for issuing an active command (ACT) for opening the page corresponding to the ROW is generated. On the other hand, when the page corresponding to the ROW is already open in the CS and BS to be accessed, no memory command information is generated because it is not necessary to issue a page control command.

次に、ステップS303において、アクセス要求データ長に応じてREAD(読み出し)/WRITE(書き込み)コマンドの発行回数を決定し、発行回数分のメモリコマンド情報を生成する。そして、処理を終了する。例えば、メモリアクセス要求データ長が32バイト、DRAM111のREAD/WRITEコマンド発行一回あたりのデータ転送長が16バイトである場合、発行回数は32/16=2となり2回のREADあるいはWRITEコマンド発行が必要となる。この場合、有効なデータ転送のビート長を示すBENはいずれのREAD/WRITEコマンドに対しても4となる。別の例としてメモリアクセス要求データ長が12で、DRAM111のREAD/WRITEコマンド発行1回あたりのデータ転送長が16バイトである場合、12/16=0.75となり1回のREADあるいはWRITEコマンドが発行される。ここで、有効データ転送のビート長は最初の3ビート分のみであるため、BENには3が設定される。   Next, in step S303, the number of READ (read) / WRITE (write) commands issued is determined according to the access request data length, and memory command information corresponding to the number of issued times is generated. Then, the process ends. For example, if the memory access request data length is 32 bytes and the data transfer length per READ / WRITE command issue of the DRAM 111 is 16 bytes, the number of issuances is 32/16 = 2 and two READ or WRITE command issuances are issued. Necessary. In this case, the BEN indicating the valid data transfer beat length is 4 for any READ / WRITE command. As another example, if the memory access request data length is 12 and the data transfer length per read / write command issued by the DRAM 111 is 16 bytes, 12/16 = 0.75, and one READ or WRITE command is issued. publish. Here, since the beat length of valid data transfer is only the first three beats, 3 is set in BEN.

次に、優先度振り分け回路104について説明する。優先度振り分け回路104は、前記分割されたメモリコマンドに含まれている優先度情報をもとに高優先度コマンドバッファ105、及び低優先度コマンドバッファ106へメモリコマンドを振り分ける。本実施形態のように複数のバスマスタが存在する場合は、優先度情報としてバスマスタ識別情報(識別子)を用いることができる。優先度振り分け回路104にあらかじめ優先すべきバスマスタの情報を記憶させておくことにより、優先度の高いバスマスタからのメモリ要求を高優先度コマンドバッファに振り分けることが可能となる。また、バスマスタが1つの場合には、本実施形態とは異なるが、メモリアクセス要求にアクセス優先度識別情報を持たせることで優先度振り分け回路の実装が可能である。   Next, the priority distribution circuit 104 will be described. The priority distribution circuit 104 distributes the memory command to the high priority command buffer 105 and the low priority command buffer 106 based on the priority information included in the divided memory command. When there are a plurality of bus masters as in the present embodiment, bus master identification information (identifier) can be used as priority information. By storing information on the bus master to be prioritized in the priority distribution circuit 104 in advance, it becomes possible to distribute memory requests from the bus master having a high priority to the high priority command buffer. In addition, when there is one bus master, unlike the present embodiment, it is possible to implement a priority distribution circuit by giving access priority identification information to a memory access request.

次に、各コマンドバッファと選択回路108、メモリコマンド制御回路109の関係について説明する。高優先度コマンドバッファ105及び低優先度コマンドバッファ106は、コマンド分割回路103で生成されたメモリアクセス要求をメモリコマンド情報単位で保持する。各々に保持されたメモリコマンドは選択回路108からの制御信号を得て、バッファの先頭にあるメモリコマンド情報からメモリコマンド制御回路109に順次転送される。バッファの先頭に保持されたメモリコマンド情報が実行された後は、2番目以降のメモリコマンド情報が1段分バッファ先頭位置に向かってシフトする。各バッファの先頭にあるメモリコマンド情報は、選択回路108により択一的にメモリコマンド制御回路109に送られる。   Next, the relationship between each command buffer, the selection circuit 108, and the memory command control circuit 109 will be described. The high priority command buffer 105 and the low priority command buffer 106 hold the memory access request generated by the command dividing circuit 103 in units of memory command information. The memory command held in each of them obtains a control signal from the selection circuit 108 and is sequentially transferred to the memory command control circuit 109 from the memory command information at the head of the buffer. After the memory command information held at the head of the buffer is executed, the second and subsequent memory command information shifts by one stage toward the buffer head position. Memory command information at the head of each buffer is alternatively sent to the memory command control circuit 109 by the selection circuit 108.

メモリコマンド制御回路109は、受け付けたメモリコマンド情報をDRAM111のメモリコマンドに変換して実行する。また、メモリコマンド制御回路109は、DRAM111の各種タイミング制約に基づいて発行するメモリコマンドの発行間隔制御を行う。例えばメモリコマンド制御回路109は、ACTコマンド発行後に同CS,BSの同ページに対するREAD/WRITEコマンド発行までの間隔を3サイクル経てから発行するようなタイミング制御を行う。   The memory command control circuit 109 converts the received memory command information into a memory command of the DRAM 111 and executes it. Further, the memory command control circuit 109 controls the issue interval of memory commands issued based on various timing constraints of the DRAM 111. For example, the memory command control circuit 109 performs timing control so that an interval from issuing an ACT command to issuing a READ / WRITE command for the same page of the CS and BS is issued after three cycles.

図4は、高優先度コマンドバッファ105が、図5に示すような状態にある場合の選択回路108とメモリコマンド制御回路109との間、及びDRAMバス110の挙動を示す図である。なお、図5においては、右端がバッファの先頭位置とする。また、本実施形態では、メモリコマンド制御回路109が選択回路108から最大2つまでのメモリコマンド情報を受け取ることができるものとする。そして、メモリコマンド情報の受け付けからDRAMバス110へのメモリコマンド実行までの最小サイクルを1サイクルとする。また、DRAMバス110は、DDRタイプのDRAM111を想定しており、動作モードとしてはCasLatencyが2サイクル、BurstLengthが4ビートとする。   FIG. 4 is a diagram showing the behavior of the DRAM bus 110 between the selection circuit 108 and the memory command control circuit 109 when the high priority command buffer 105 is in the state shown in FIG. In FIG. 5, the right end is the head position of the buffer. In the present embodiment, it is assumed that the memory command control circuit 109 can receive up to two memory command information from the selection circuit 108. The minimum cycle from the reception of the memory command information to the execution of the memory command to the DRAM bus 110 is defined as one cycle. The DRAM bus 110 is assumed to be a DDR type DRAM 111, and the operation mode is CasLatency of 2 cycles and BurstLength of 4 beats.

図4において、信号(メモリコマンド情報、メモリコマンド入力Ready)は選択回路108とメモリコマンド制御回路109との間のデータ転送を示している。メモリコマンド情報は、選択回路108からメモリコマンド制御回路109に転送され、メモリコマンド入力Readyはメモリコマンド制御回路109から選択回路108に転送される。選択回路108は、メモリコマンド入力Ready信号がアサートされている間、1サイクル毎にコマンドバッファの先頭メモリコマンド情報を抜き出し、メモリコマンド制御回路109に転送する。メモリコマンド制御回路109は、受け付けたメモリコマンド情報が2つ以上になるとメモリコマンド入力Ready信号をデアサートする。   In FIG. 4, signals (memory command information, memory command input Ready) indicate data transfer between the selection circuit 108 and the memory command control circuit 109. The memory command information is transferred from the selection circuit 108 to the memory command control circuit 109, and the memory command input Ready is transferred from the memory command control circuit 109 to the selection circuit 108. The selection circuit 108 extracts the top memory command information of the command buffer every cycle and transfers it to the memory command control circuit 109 while the memory command input Ready signal is asserted. The memory command control circuit 109 deasserts the memory command input Ready signal when the received memory command information becomes two or more.

図4の下段にある3つの信号(Command、Address、Data)は、DRAMバス110上のデータ転送を示している。図4の時刻T2において、図5に示す高優先度コマンドバッファ105の先頭のREADコマンドが実行されている。続いて、時刻T3において、2番目に位置する(実際には時刻T2ではバッファの先頭にシフトしている)PREコマンドが実行されている。さらに、ACTコマンドを発行する際には、メモリコマンド制御回路109においてDRAM111のタイミングパラメータtRPを満たすために2サイクルのウェイトが挿入され、時刻T6においてACTコマンドが発行される。   Three signals (Command, Address, and Data) in the lower part of FIG. 4 indicate data transfer on the DRAM bus 110. At time T2 in FIG. 4, the first READ command in the high priority command buffer 105 shown in FIG. 5 is executed. Subsequently, at time T3, the second PRE command (actually shifted to the beginning of the buffer at time T2) is executed. Further, when the ACT command is issued, a 2-cycle wait is inserted in the memory command control circuit 109 to satisfy the timing parameter tRP of the DRAM 111, and the ACT command is issued at time T6.

また、図5に示す高優先度コマンドバッファ105の4番目に位置するWRITEコマンドを発行する際には、DRAM111のタイミングパラメータtRCDを満たすために1サイクルのウェイトが挿入される。そして、時刻T8において、WRITEコマンドが実行されている。さらに、最後のREADコマンドを発行する際には、DRAM111のタイミングパラメータtWTRを満たすために4サイクルのウェイトが挿入され、時刻T13において、READコマンドが実行されている。   Further, when a WRITE command located at the fourth position in the high priority command buffer 105 shown in FIG. 5 is issued, a one-cycle wait is inserted to satisfy the timing parameter tRCD of the DRAM 111. At time T8, the WRITE command is executed. Furthermore, when the last READ command is issued, a 4-cycle wait is inserted to satisfy the timing parameter tWTR of the DRAM 111, and the READ command is executed at time T13.

次に、本実施形態のメモリコマンド比較回路107について詳細を説明する。メモリコマンド比較回路107は、高優先度のメモリコマンドを実行する時のメモリバス未使用期間の算出と、算出された期間に低優先度のメモリコマンドが発行可能か否かの判定を行い、発行可能な場合は選択回路108に出力する制御信号の切り替えを行う。図7は、高優先度のメモリコマンドを実行する時のメモリバス未使用期間の算出方法を示す図である。メモリバスの未使用期間は、連続する2つの高優先度のメモリコマンド間でコマンドバス、データバスのそれぞれについて算出される。   Next, details of the memory command comparison circuit 107 of this embodiment will be described. The memory command comparison circuit 107 calculates a memory bus unused period when executing a high priority memory command, and determines whether or not a low priority memory command can be issued during the calculated period. When possible, the control signal output to the selection circuit 108 is switched. FIG. 7 is a diagram illustrating a method of calculating a memory bus unused period when executing a high priority memory command. The unused period of the memory bus is calculated for each of the command bus and the data bus between two consecutive high priority memory commands.

また、図8は、低優先度のメモリコマンドを実行する時のメモリバス使用期間の算出方法を示す図である。メモリコマンド比較回路107は、高優先度コマンドバッファ105が更新される毎にコマンドバッファの先頭のメモリコマンドとそれに続く2番目のメモリコマンドとの間でメモリバス未使用期間を算出する。そして、低優先度コマンドバッファ106の先頭に保持されたメモリコマンドのコマンドバス使用期間、データバス使用期間と比較する。そして、高優先度のメモリコマンドを実行する時のメモリバス未使用期間が低優先度のメモリコマンド実行の使用期間と等しいか大きい場合は、低優先のメモリコマンドを高優先のメモリコマンドの先頭のメモリコマンドに続いて発行可能であると判断する。そして、選択回路108への入力切り替え信号をアサートする。   FIG. 8 is a diagram illustrating a method of calculating a memory bus usage period when a low priority memory command is executed. Each time the high priority command buffer 105 is updated, the memory command comparison circuit 107 calculates a memory bus unused period between the first memory command in the command buffer and the second memory command following the command command. Then, the command bus use period and the data bus use period of the memory command held at the head of the low priority command buffer 106 are compared. If the unused period of the memory bus when executing the high priority memory command is equal to or greater than the usage period of the low priority memory command execution, the low priority memory command is changed to the head of the high priority memory command. It is determined that it can be issued following the memory command. Then, an input switching signal to the selection circuit 108 is asserted.

図9は、高優先度コマンドバッファ105が図5に示す状態で、かつ低優先度コマンドバッファ106の状態が図6に示すような状態であるような場合のDRAMバス110のコマンドの順序の挙動を示す図である。ここで、タイミング制約をtRP=3サイクル、tRCD=2サイクル、CasLatency=2サイクル、BurstLength=4ビート、tWTR=3サイクルとする。   FIG. 9 shows the behavior of the order of commands on the DRAM bus 110 when the high priority command buffer 105 is in the state shown in FIG. 5 and the low priority command buffer 106 is in the state shown in FIG. FIG. Here, timing constraints are tRP = 3 cycles, tRCD = 2 cycles, CasLatency = 2 cycles, BurstLength = 4 beats, and tWTR = 3 cycles.

まず、高優先度コマンドバッファ105のREADコマンドが先頭に来た時点でメモリコマンド比較回路107は、高優先度コマンドバッファ105の先頭から2つのメモリコマンドと低優先度コマンドバッファ106の先頭メモリコマンドとを比較する。そして、低優先度のメモリコマンドが実行可能であるかどうか判断する。図7に示す例では、高優先度コマンドバッファ105の先頭から2つのメモリコマンドはRD-PRE(diff. bank)であり、コマンドバス、データバスの未使用期間は0となる。さらに、図8に示す例では、低優先度コマンドバッファ106の先頭のメモリコマンド情報はREADであるので、実行には1サイクル以上のコマンドバス使用期間が必要であるため、コマンド発行は不可能と判断される。   First, when the READ command of the high priority command buffer 105 comes to the top, the memory command comparison circuit 107 starts with two memory commands from the top of the high priority command buffer 105 and the top memory command of the low priority command buffer 106. Compare Then, it is determined whether or not a low priority memory command can be executed. In the example shown in FIG. 7, the two memory commands from the top of the high priority command buffer 105 are RD-PRE (diff. Bank), and the unused period of the command bus and data bus is zero. Further, in the example shown in FIG. 8, since the memory command information at the head of the low priority command buffer 106 is READ, a command bus usage period of one cycle or more is required for execution, and therefore it is impossible to issue a command. To be judged.

次に、高優先度コマンドバッファ105のPRE−ACTと低優先度コマンドバッファ106のREADとが比較される。高優先度のPRE-ACTコマンドを実行する時のコマンドバスの未試用期間は(tRP−1)=(3−1)=2サイクルであり、コマンドの発行が可能である。さらに、データバスの未試用期間は、(tRP+tRCD−1)=(3+2−1)=4サイクルであり、低優先度のREADの実行に必要なデータバス使用期間は(CL+BL/2−1)=(2+4+4/2−1)=3サイクルであり、条件を満たす。よって、高優先度のPREコマンドに続いて低優先度のREADが発行可能と判断される。この場合には、メモリコマンド比較回路107は、高優先度コマンドバッファ105のPREコマンドに続いて低優先度コマンドバッファ106のREADコマンドがメモリコマンド制御回路109に転送されるように選択回路108へ入力切り替え信号を出力する。   Next, PRE-ACT of the high priority command buffer 105 and READ of the low priority command buffer 106 are compared. The untrial period of the command bus when executing a high-priority PRE-ACT command is (tRP-1) = (3-1) = 2 cycles, and a command can be issued. Further, the data bus untrial period is (tRP + tRCD-1) = (3 + 2-1) = 4 cycles, and the data bus use period necessary for executing the low-priority READ is (CL + BL / 2-1) = (2 + 4 + 4 / 2-1) = 3 cycles, which satisfies the condition. Therefore, it is determined that a low priority READ can be issued following a high priority PRE command. In this case, the memory command comparison circuit 107 inputs to the selection circuit 108 so that the READ command of the low priority command buffer 106 is transferred to the memory command control circuit 109 following the PRE command of the high priority command buffer 105. Outputs a switching signal.

次に、高優先度コマンドバッファ105のACT-WRITEと低優先度のACTとが比較される。高優先度のACT-WRITEを実行する時のコマンドバス未使用期間は(tRCD−1)=1サイクルであり、低優先度のACTコマンドの発行に必要なコマンドバス使用期間1サイクルを満たす。よってこの場合も高優先度のACTコマンドに続いて低優先度のACTがメモリコマンド制御回路109に転送される。さらに、高優先度コマンドバッファ105のWRITE-READと低優先度のWRITEとが比較される。高優先度のWRITE-READを実行する時のコマンドバスの未使用期間は4サイクルで、データバスの未使用期間も4サイクルである。一方、低優先度のWRITEを実行する時のコマンドバス使用期間は1サイクル、データバスの使用期間は2サイクルであり、条件を満たす。したがって、高優先度のWRITEに続いて低優先度のWRITEがメモリコマンド制御回路109に転送される。   Next, the ACT-WRITE in the high priority command buffer 105 and the low priority ACT are compared. The command bus unused period when executing high-priority ACT-WRITE is (tRCD-1) = 1 cycle, which satisfies one cycle of command bus use necessary for issuing a low-priority ACT command. Therefore, also in this case, the low priority ACT is transferred to the memory command control circuit 109 following the high priority ACT command. Furthermore, WRITE-READ in the high priority command buffer 105 is compared with WRITE with low priority. When the high-priority WRITE-READ is executed, the unused period of the command bus is 4 cycles, and the unused period of the data bus is also 4 cycles. On the other hand, when the low-priority WRITE is executed, the command bus usage period is 1 cycle, and the data bus usage period is 2 cycles, which satisfies the condition. Therefore, the low priority WRITE is transferred to the memory command control circuit 109 following the high priority WRITE.

以上より、メモリコマンド制御回路109へは、図9に示すように、READ、PRE、READ(低優先度)、ACT、ACT(低優先度)、WRITE、WRITE(低優先度)、READの順にメモリコマンドが転送される。その結果、図4、図9に示すように、低優先度のメモリコマンドは高優先度のメモリコマンドの実行を妨げないタイミングで実行される。また、図9の入力切り替えReady信号は、メモリコマンド制御回路109から選択回路108に入力されるメモリコマンド入力Ready信号と同期している。入力切り替えReady信号がデアサートされている場合は、メモリコマンド比較回路107は入力切り替え信号を同じ値でアサート保持し続ける。   As described above, the memory command control circuit 109 is read in the order of READ, PRE, READ (low priority), ACT, ACT (low priority), WRITE, WRITE (low priority), and READ, as shown in FIG. Memory command is transferred. As a result, as shown in FIGS. 4 and 9, the low priority memory command is executed at a timing that does not hinder the execution of the high priority memory command. Further, the input switching ready signal in FIG. 9 is synchronized with the memory command input ready signal input from the memory command control circuit 109 to the selection circuit 108. When the input switching ready signal is deasserted, the memory command comparison circuit 107 keeps asserting and holding the input switching signal at the same value.

(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

101 バスマスタ、103 コマンド分割回路、104 優先度振り分け回路、105 高優先度コマンドバッファ、106 低優先度コマンドバッファ、107 メモリコマンド比較回路、108 選択回路、109 メモリコマンド制御回路、110 DRAMバス、111 DRAM DESCRIPTION OF SYMBOLS 101 Bus master, 103 Command division circuit, 104 Priority distribution circuit, 105 High priority command buffer, 106 Low priority command buffer, 107 Memory command comparison circuit, 108 Selection circuit, 109 Memory command control circuit, 110 DRAM bus, 111 DRAM

Claims (5)

バスマスタからのメモリアクセス要求を受けてメモリデバイスにメモリコマンドを発行するメモリ制御装置であって、
前記バスマスタからのメモリアクセス要求をメモリコマンド単位に分割する分割手段と、
前記分割手段によって分割されたメモリアクセス要求の優先度を判定する判定手段と、
前記判定手段によって判定された優先度の高いメモリアクセス要求を保持する第1の保持手段と、
前記判定手段によって判定された優先度の低いメモリアクセス要求を保持する第2の保持手段と、
前記第1の保持手段に保持された優先度の高いメモリアクセス要求と、前記第2の保持手段に保持された優先度の低いメモリアクセス要求とを比較し、メモリコマンドの実行の順序を決定する決定手段と、
前記メモリコマンドの実行の順序に従って、前記優先度の高いメモリアクセス要求と前記優先度の低いメモリアクセス要求とを選択して実行する実行手段とを備えることを特徴とするメモリ制御装置。
A memory control device that issues a memory command to a memory device in response to a memory access request from a bus master,
Dividing means for dividing a memory access request from the bus master into memory command units;
Determining means for determining the priority of the memory access request divided by the dividing means;
First holding means for holding a memory access request having a high priority determined by the determining means;
Second holding means for holding a low-priority memory access request determined by the determining means;
The memory access request having a high priority held in the first holding unit and the memory access request having a low priority held in the second holding unit are compared to determine the execution order of the memory commands. A determination means;
A memory control apparatus comprising: an execution unit that selects and executes the memory access request having a high priority and the memory access request having a low priority according to an execution order of the memory commands.
前記メモリデバイスはDRAMであることを特徴とする請求項1に記載のメモリ制御装置。   The memory control device according to claim 1, wherein the memory device is a DRAM. 前記分割手段は、前記メモリアクセス要求を前記メモリデバイスのアクセスごとに分割し、前記メモリデバイスのデータ転送のメモリアクセスを終了するのに必要な回数の読み出しまたは書き込みコマンドを生成することを特徴とする請求項1に記載のメモリ制御装置。   The dividing unit divides the memory access request for each access of the memory device, and generates a read or write command as many times as necessary to finish the memory access of the data transfer of the memory device. The memory control device according to claim 1. 前記決定手段は、前記優先度の高いメモリアクセス要求のメモリコマンドを実行する時に、前記メモリデバイスのタイミング制約によるメモリバスの未使用期間を算出する算出手段と、前記優先度の低いメモリコマンドが前記メモリバスの未試用期間に発行可能か否かを判定する手段と、前記判定する手段による判定の結果に従い、どちらのメモリコマンドを発行するかを決定する手段とを有することを特徴とする請求項1に記載のメモリ制御装置。   The determining means includes a calculating means for calculating an unused period of the memory bus due to timing constraints of the memory device when executing a memory command of the memory access request having a high priority, and the memory command having the low priority is the And a means for determining which memory command is to be issued according to a result of determination by the determination means. 2. The memory control device according to 1. 前記判定手段は、前記バスマスタからのメモリアクセス要求に含まれるバスマスタ識別情報、またはアクセス優先度識別情報に基づいてメモリアクセス要求の優先度を判定することを特徴とする請求項1に記載のメモリ制御装置。   2. The memory control according to claim 1, wherein the determination unit determines the priority of the memory access request based on bus master identification information or access priority identification information included in the memory access request from the bus master. apparatus.
JP2009178050A 2009-07-30 2009-07-30 Memory controller Pending JP2011034214A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009178050A JP2011034214A (en) 2009-07-30 2009-07-30 Memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009178050A JP2011034214A (en) 2009-07-30 2009-07-30 Memory controller

Publications (1)

Publication Number Publication Date
JP2011034214A true JP2011034214A (en) 2011-02-17

Family

ID=43763245

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009178050A Pending JP2011034214A (en) 2009-07-30 2009-07-30 Memory controller

Country Status (1)

Country Link
JP (1) JP2011034214A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014035628A (en) * 2012-08-08 2014-02-24 Canon Inc Information processing apparatus, memory control apparatus, and control method thereof
JP2015508546A (en) * 2012-01-18 2015-03-19 ▲ホア▼▲ウェイ▼技術有限公司 Message-based memory access device and access method thereof
JP2019109726A (en) * 2017-12-19 2019-07-04 富士通株式会社 Arithmetic processing unit, memory access controller, and control method of arithmetic processing unit

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015508546A (en) * 2012-01-18 2015-03-19 ▲ホア▼▲ウェイ▼技術有限公司 Message-based memory access device and access method thereof
US9870327B2 (en) 2012-01-18 2018-01-16 Huawei Technologies Co., Ltd. Message-based memory access apparatus and access method thereof
JP2014035628A (en) * 2012-08-08 2014-02-24 Canon Inc Information processing apparatus, memory control apparatus, and control method thereof
JP2019109726A (en) * 2017-12-19 2019-07-04 富士通株式会社 Arithmetic processing unit, memory access controller, and control method of arithmetic processing unit
JP7060784B2 (en) 2017-12-19 2022-04-27 富士通株式会社 Arithmetic processing unit, memory access controller and operation processing unit control method

Similar Documents

Publication Publication Date Title
KR101881089B1 (en) Memory controllers, systems, and methods for applying page management policies based on stream transaction information
JP4715801B2 (en) Memory access control device
US20120239873A1 (en) Memory access system and method for optimizing SDRAM bandwidth
US8707002B2 (en) Control apparatus
JP6053384B2 (en) Information processing apparatus, memory control apparatus, and control method thereof
JP2009193107A (en) Memory access device
JP6146128B2 (en) Data processing device
JP2009015832A (en) Inter-access arbitration circuit, semiconductor device, and inter-access arbitration method
JP7075528B2 (en) Semiconductor integrated circuit
JP3819004B2 (en) Memory control device
JP2010027006A (en) Memory access system, memory control device, memory control method, and program
JP2011034214A (en) Memory controller
US7913013B2 (en) Semiconductor integrated circuit
US8301816B2 (en) Memory access controller, system, and method
JP2006215621A (en) Dma controller
US6845418B2 (en) Bus system for master-slave device accesses, has multiple pseudo-delayer connected to controllers which delay and output access commands to slave devices for having longer latency periods
JP4335327B2 (en) Arbitration apparatus and method
KR100546678B1 (en) Apparatus and Method for Controlling Refresh Operation of Data Processing System
JP3820831B2 (en) Memory control method and apparatus
US20080263290A1 (en) Memory control apparatus and memory control method
KR100678784B1 (en) Access to a collective resource
JP2006331008A (en) Memory interface
KR20010050234A (en) Addressing of a memory
WO2020066934A1 (en) Command control system, vehicle, command control method and program
JP5752091B2 (en) Memory controller