[go: up one dir, main page]

JP2006004464A - Memory controller - Google Patents

Memory controller Download PDF

Info

Publication number
JP2006004464A
JP2006004464A JP2004176511A JP2004176511A JP2006004464A JP 2006004464 A JP2006004464 A JP 2006004464A JP 2004176511 A JP2004176511 A JP 2004176511A JP 2004176511 A JP2004176511 A JP 2004176511A JP 2006004464 A JP2006004464 A JP 2006004464A
Authority
JP
Japan
Prior art keywords
unit
refresh
comparison
address
control device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004176511A
Other languages
Japanese (ja)
Other versions
JP4463019B2 (en
Inventor
Motoki Higashida
基樹 東田
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.)
Renesas Technology Corp
Original Assignee
Renesas Technology 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 Renesas Technology Corp filed Critical Renesas Technology Corp
Priority to JP2004176511A priority Critical patent/JP4463019B2/en
Publication of JP2006004464A publication Critical patent/JP2006004464A/en
Application granted granted Critical
Publication of JP4463019B2 publication Critical patent/JP4463019B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Dram (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a memory controller capable of improving the efficiency of data transfer execution for a memory (e.g., SDRAM). <P>SOLUTION: This memory controller 100 is provided with a BANK/ROW address comparison section 7, and a refresh request generation section 8. The BANK/ROW address comparison section 7 is a circuit for comparing a first address in active ROW information with a second address in a memory access request for an SDRAM 300. The refresh request generation section 8 is a circuit for generating a refresh request for the SDRAM 300 according to the comparison results of the BANK/ROW address comparison section 7. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

この発明は、メモリ制御装置に係る発明であり、例えば、SDRAMのリフレッシュ処理を制御するメモリ制御装置として適用することができる。   The present invention relates to a memory control device, and can be applied as, for example, a memory control device that controls SDRAM refresh processing.

SDRAM(Synchronous Dynamic Random Access Memory)を利用する場合には、メモリセルの記憶内容を再充電する必要がある。ここで、当該再充電は、一定間隔でオートリフレッシュコマンドを発行することにより、行われる。   When an SDRAM (Synchronous Dynamic Random Access Memory) is used, it is necessary to recharge the memory contents of the memory cell. Here, the recharging is performed by issuing an auto refresh command at regular intervals.

従来技術に係るSDRAMのリフレッシュ制御方式では、SDRAMコマンド発行部の状態と無関係に、一定間隔でオートリフレッシュコマンドが実行されていた(例えば、非特許文献1参照。)。   In the refresh control method of the SDRAM according to the prior art, the auto-refresh command is executed at regular intervals regardless of the state of the SDRAM command issuing unit (for example, see Non-Patent Document 1).

ここで、SDRAMコマンド発行部とは、メモリアクセスコマンドとリフレッシュコマンドとを受付、受付順にSDRAMに対するコマンドシーケンスを発行する装置である。   Here, the SDRAM command issuing unit is a device that accepts a memory access command and a refresh command and issues a command sequence for the SDRAM in the order of acceptance.

なお、SDRAMの所定の記憶素子からデータを読み出される(または、書き込まれる)前に、SDRAMは、対応するバンクおよびROW(行)に対して、バンクプリチャージ・バンクアクティベート処理が施される。ここで、バンクアクティベート処理とは、リード、ライトコマンドの実行に先立って、アクセス対象のバンクおよびロウアドレスを選択、活性化する処理である。また、バンクプリチャージ動作とは、バンクアクティベート処理によって活性化されたバンクおよびロウアドレスを非活性(アイドル)の状態に戻す処理である。同一のバンクに対して複数のロウアドレスの活性化はできない。別のロウアドレスを活性化するには、既に活性化済みのロウアドレスの非活性化処理が必要となる。   Note that before data is read (or written) from a predetermined storage element of the SDRAM, the SDRAM performs bank precharge / bank activation processing on the corresponding bank and ROW (row). Here, the bank activation process is a process of selecting and activating an access target bank and row address prior to execution of a read / write command. The bank precharge operation is a process for returning the bank and row address activated by the bank activation process to an inactive (idle) state. A plurality of row addresses cannot be activated for the same bank. In order to activate another row address, it is necessary to deactivate the already activated row address.

ここで、同一のバンク・同一ROWに属する記憶素子に対して、連続してデータの読み出し(または、書き込み)処理が行われるとする。この場合には、SDRAMには、バンクアクティベート処理が施されること無く、連続してリード(またはライト)コマンドが発行される。   Here, it is assumed that data reading (or writing) processing is continuously performed on storage elements belonging to the same bank and the same ROW. In this case, a read (or write) command is continuously issued to the SDRAM without performing bank activation processing.

「日立SuperH RISC engine SH7615 ハードウェアマニュアル」、pp315(7−61)−pp316(7−62)、「7.5.8 リフレッシュ、(1)オートリフレッシュ」、[online]、平成12年8月、株式会社日立製作所 半導体グループ電子統括営業本部、[平成16年4月23日検索]、インターネット<http://www.renesas.com/avs/resource/japan/jpn/pdf/mpumcu/j602209_sh7615.pdf>“Hitachi SuperH RISC engine SH7615 Hardware Manual”, pp315 (7-61) -pp316 (7-62), “7.5.8 Refresh, (1) Auto-refresh”, [online], August 2000, Hitachi, Ltd., Semiconductor Group Electronic Business Sales Division, [Search April 23, 2004], Internet <http: // www. renesas. com / avs / resource / japan / jpn / pdf / mpumcu / j602209_sh7615. pdf>

ところで、SDRAMに対してリフレッシュ処理が施された後は、SDRAMに対してリード(または、ライト)コマンドを発行する前に、所定のバンクおよびROWに対してバンクアクティベート処理を施す必要がある。   By the way, after the refresh process is performed on the SDRAM, it is necessary to perform the bank activation process on a predetermined bank and ROW before issuing a read (or write) command to the SDRAM.

しかし、非特許文献1に係る技術において、同一バンク・同一ROWアドレスでカラムアドレスのみ異なるメモリ領域に対する連続アクセスが行われる途中に、定期的に発行されるリフレッシュコマンドが強制的に挿入されたとする。リフレッシュ処理が行われた場合には、全てのバンクがアイドル状態となる。したがって、上記のような場合には、必ずバンクアクティベート処理からコマンドシーケンスを実行する必要がある。   However, in the technique according to Non-Patent Document 1, it is assumed that a refresh command that is periodically issued is forcibly inserted during continuous access to a memory area that differs in column address by the same bank and the same ROW address. When the refresh process is performed, all banks are in an idle state. Therefore, in the above case, it is necessary to execute the command sequence from the bank activation process.

これにより、本来不必要なバンクアクティベート処理を、SDRAMのリフレッシュ処理後に改めて行う必要が生じる。つまり、リフレッシュ処理に必要な実行サイクルのみだけでなく、バンクアクティベート処理サイクルが余分に必要となる。したがって、SDRAMの実効的な転送効率が損なわれる結果となる。   This makes it necessary to perform bank activation processing that is essentially unnecessary after the SDRAM refresh processing. That is, not only an execution cycle necessary for the refresh process but also an extra bank activation process cycle is required. Therefore, the effective transfer efficiency of the SDRAM is impaired.

そこで、この発明は、例えメモリに対するリフレッシュ処理が施されたとしても、実効的なデータ転送効率の損失を最小限にすることができるメモリ制御装置を提供することを目的とする。   Therefore, an object of the present invention is to provide a memory control device that can minimize the loss of effective data transfer efficiency even if a refresh process is performed on the memory.

上記の目的を達成するために、本発明に係る請求項1に記載のメモリ制御装置は、メモリのアクティブ状況を示すアクティブ情報内の第一のアドレスと、メモリアクセス要求内の第二のアドレスとを比較するアドレス比較部と、前記アドレス比較部の比較結果に応じて、メモリに対するリフレッシュ要求を生成するリフレッシュ要求生成部とを、備えている。   In order to achieve the above object, the memory control device according to claim 1 of the present invention includes a first address in active information indicating an active state of a memory, a second address in a memory access request, And a refresh request generator for generating a refresh request for the memory according to the comparison result of the address comparator.

また、請求項2に記載のメモリ制御装置は、メモリに対するアクセスがないアイドルサイクルを検出するアイドルサイクル検出部と、前記アイドルサイクル検出部のアイドルサイクルの検出に応じて、メモリに対するリフレッシュ要求を生成するリフレッシュ要求生成部とを、備えている。   According to a second aspect of the present invention, there is provided a memory control device that detects an idle cycle in which there is no access to the memory, and generates a refresh request for the memory in response to detection of an idle cycle by the idle cycle detection unit. And a refresh request generation unit.

また、請求項15に記載のメモリ制御装置は、メモリのアクティブ状況を示すアクティブ情報内の第一のアドレスと、メモリアクセス要求内の第二のアドレスとを比較するアドレス比較部と、前記メモリに対するアクセスがないアイドルサイクルを検出するアイドルサイクル検出部と、前記アドレス比較部の比較結果と、前記アイドルサイクル検出部のアイドルサイクルの検出とに応じて、メモリに対するリフレッシュ要求を生成するリフレッシュ要求生成部とを、備えている。   The memory control device according to claim 15, wherein an address comparison unit that compares a first address in active information indicating an active state of a memory with a second address in a memory access request, and the memory An idle cycle detection unit that detects an idle cycle without access; a refresh request generation unit that generates a refresh request for a memory in response to a comparison result of the address comparison unit and an idle cycle detection of the idle cycle detection unit; Is provided.

本発明の請求項1に記載のメモリ制御装置は、メモリのアクティブ状況を示すアクティブ情報内の第一のアドレスと、メモリアクセス要求内の第二のアドレスとを比較するアドレス比較部と、前記アドレス比較部の比較結果に応じて、メモリに対するリフレッシュ要求を生成するリフレッシュ要求生成部とを、備えているので、メモリに対するアクティベート処理の時期を判断し、当該時期を狙ってメモリのリフレッシュ処理を行うことができる。したがって、リフレッシュ処理に伴う無駄なアクティベート処理を施す必要がなくなる。よって、メモリに対する実効的なデータ転送効率を向上させることができる。   According to a first aspect of the present invention, there is provided a memory control device comprising: an address comparing unit that compares a first address in active information indicating a memory active state with a second address in a memory access request; and the address A refresh request generation unit that generates a refresh request for the memory according to the comparison result of the comparison unit is provided, so the timing of the activation process for the memory is determined, and the memory refresh process is performed aiming at the time Can do. Therefore, it is not necessary to perform a useless activation process associated with the refresh process. Therefore, effective data transfer efficiency with respect to the memory can be improved.

また、請求項2に記載のメモリ制御装置は、メモリに対するアクセスがないアイドルサイクルを検出するアイドルサイクル検出部と、前記アイドルサイクル検出部のアイドルサイクルの検出に応じて、メモリに対するリフレッシュ要求を生成するリフレッシュ要求生成部とを、備えているので、アイドルサイクルを利用して、メモリのリフレッシュ処理を行うことができる。したがって、メモリに対する実効的なデータ転送効率を向上させることができる。   According to a second aspect of the present invention, there is provided a memory control device that detects an idle cycle in which there is no access to the memory, and generates a refresh request for the memory in response to detection of an idle cycle by the idle cycle detection unit. Since the refresh request generator is provided, the memory refresh process can be performed using the idle cycle. Therefore, effective data transfer efficiency with respect to the memory can be improved.

また、請求項15に記載のメモリ制御装置は、メモリのアクティブ状況を示すアクティブ情報内の第一のアドレスと、メモリアクセス要求内の第二のアドレスとを比較するアドレス比較部と、前記メモリに対するアクセスがないアイドルサイクルを検出するアイドルサイクル検出部と、前記アドレス比較部の比較結果と、前記アイドルサイクル検出部のアイドルサイクルの検出とに応じて、メモリに対するリフレッシュ要求を生成するリフレッシュ要求生成部とを、備えているので、請求項1,2に記載のメモリ制御装置を組み合わせたメモリ制御装置を提供することができる。   The memory control device according to claim 15, wherein an address comparison unit that compares a first address in active information indicating an active state of a memory with a second address in a memory access request, and the memory An idle cycle detection unit that detects an idle cycle without access; a refresh request generation unit that generates a refresh request for a memory in response to a comparison result of the address comparison unit and an idle cycle detection of the idle cycle detection unit; Therefore, it is possible to provide a memory control device in which the memory control devices according to claims 1 and 2 are combined.

以下に示す例からも分かるように、リフレッシュ処理が実施されるタイミングによって、SDRAM(Synchronous Dynamic Random Access Memory)の実効的な転送効率が変化する。例えば、図1に示すメモリアクセスシーケンスを例に取って説明する。   As can be seen from the example shown below, the effective transfer efficiency of SDRAM (Synchronous Dynamic Random Access Memory) varies depending on the timing at which the refresh process is performed. For example, the memory access sequence shown in FIG. 1 will be described as an example.

ここで、図1において、「RD」は、リードアクセスを意味している。また、「Bi」は、i番目のバンクアドレスを示している。また、「Ri」は、i行目のロウアドレスを示している。また、「Ci」は、i列目のカラムアドレスを示している。例えば、1番目のメモリアクセス要求ID1は、1番目のバンクアドレス、1番目のロウアドレス、および1番目のカラムアドレスに属する記憶素子に対しする、リードアクセスコマンドである。   Here, “RD” in FIG. 1 means read access. “Bi” indicates the i-th bank address. “Ri” indicates the row address of the i-th row. “Ci” indicates a column address of the i-th column. For example, the first memory access request ID1 is a read access command for the storage elements belonging to the first bank address, the first row address, and the first column address.

図1から分かるように、メモリアクセス要求ID1とメモリアクセス要求ID2とは、同一バンク・同一ROWアドレスに対する連続アクセスである。また、メモリアクセス要求ID2とメモリアクセス要求ID3とは、異なったROWアドレス(バンクアドレスは同一である)に対する連続アクセスである。   As can be seen from FIG. 1, the memory access request ID1 and the memory access request ID2 are continuous accesses to the same bank and the same ROW address. Memory access request ID2 and memory access request ID3 are continuous accesses to different ROW addresses (the bank addresses are the same).

図1に示したメモリアクセスシーケンスにおいて、メモリアクセス要求ID1とメモリアクセス要求ID2との間にリフレッシュ処理を施した場合(ケースA)、およびメモリアクセス要求ID2とメモリアクセス要求ID3との間にリフレッシュ処理を施した場合(ケースB)、を各々考える。   In the memory access sequence shown in FIG. 1, when refresh processing is performed between memory access request ID1 and memory access request ID2 (Case A), and refresh processing is performed between memory access request ID2 and memory access request ID3. Each case is considered (Case B).

図2は、ケースAのSDRAMに対するコマンドシーケンスを示す。図3は、ケースBのSDRAMに対するコマンドシーケンスを示す。   FIG. 2 shows a command sequence for the SDRAM of case A. FIG. 3 shows a command sequence for the SDRAM of case B.

ここで、図2,3において、「ACT」は、バンクアクティベートコマンドを意味する。また、「READ」は、リードコマンドを意味する。また、「WRITE」は、ライトコマンドを意味する。また、「PRE」は、プリチャージコマンドを意味する。また、「REF」は、リフレッシュコマンドを意味する。   Here, in FIGS. 2 and 3, “ACT” means a bank activate command. “READ” means a read command. “WRITE” means a write command. “PRE” means a precharge command. “REF” means a refresh command.

さて、図2から分かるように、ケースAでは、一連の処理が完了するまでに9サイクル要している。これに対して、図3から分かるように、ケースBでは、一連の処理が完了するまでに7サイクルしか要していない。   As can be seen from FIG. 2, in case A, nine cycles are required to complete a series of processing. On the other hand, as can be seen from FIG. 3, in case B, only 7 cycles are required to complete a series of processing.

このように、リフレッシュ処理が挿入される場所によって、SDRAMの実効的な転送効率が変化することが分かる。本発明は、このようにリフレッシュの実施タイミングを最適化することで、SDRAMの実効的な転送効率の低下を抑制するものである。   Thus, it can be seen that the effective transfer efficiency of the SDRAM changes depending on the place where the refresh process is inserted. The present invention suppresses a decrease in the effective transfer efficiency of the SDRAM by optimizing the refresh execution timing in this way.

以下、この発明をその実施の形態を示す図面に基づいて、どのタイミングでリフレッシュ処理を施すのかを具体的に説明する。   Hereinafter, based on the drawings showing the embodiments of the present invention, the timing at which the refresh process is performed will be specifically described.

<実施の形態1>
本実施の形態に係るメモリ制御装置は、バンクアクティベート処理が必要なタイミングを狙って、SDRAMに対してリフレッシュ処理を施すことを特徴とする。図4は、本実施の形態に係るメモリ制御装置の構成を示すブロック図である。
<Embodiment 1>
The memory control device according to the present embodiment is characterized in that refresh processing is performed on the SDRAM at the timing when bank activation processing is required. FIG. 4 is a block diagram showing a configuration of the memory control device according to the present embodiment.

図4に示すように、メモリ制御装置100は、第一、二の閾値設定部1,2、リフレッシュカウンタ3、平均リフレッシュ間隔設定部4、第一、二の比較部5,6、BANK/ROWアドレス比較部7、リフレッシュ要求生成部8、要求調停部9、およびSDRAMコマンド発行部10により、構成されている。   As shown in FIG. 4, the memory control device 100 includes first and second threshold setting units 1 and 2, a refresh counter 3, an average refresh interval setting unit 4, first and second comparison units 5 and 6, and BANK / ROW. The address comparison unit 7, the refresh request generation unit 8, the request arbitration unit 9, and the SDRAM command issue unit 10 are configured.

また、図4には、メモリ制御装置100の他に、バスマスタ200およびSDRAM300も図示している。   FIG. 4 also shows the bus master 200 and the SDRAM 300 in addition to the memory control device 100.

ここで、SDRAM300は、外部から入力されるクロックに同期して動作するDRAMである。また、SDRAM300は、同一BANK・同一ROWアドレスに属する記憶領域については、バンクアクティベート処理無しに、連続してリード・ライト処理が実施される。   Here, the SDRAM 300 is a DRAM that operates in synchronization with a clock input from the outside. Further, in the SDRAM 300, read / write processing is continuously performed on the storage areas belonging to the same BANK / same ROW address without bank activation processing.

バスマスタ200は、SDRAM300へのメモリアクセス要求を発行する装置である。なお、バスマスタ200が複数存在するケースもある。しかし、ここでは、簡略化のため一つのみを図示している。バスマスタ200として、例えば、CPU(Central Processing Unit)やDMAC(Direct Memory Access Controller)などがある。   The bus master 200 is a device that issues a memory access request to the SDRAM 300. There may be cases where a plurality of bus masters 200 exist. However, only one is shown here for simplicity. Examples of the bus master 200 include a CPU (Central Processing Unit) and a DMAC (Direct Memory Access Controller).

図4に示すように、第一の閾値設定部1の出力部o1は、第一の比較部5の入力部i3と接続されている。また、第二の閾値設定部2の出力部o2は、第二の比較部6の入力部i5と接続されている。   As shown in FIG. 4, the output unit o <b> 1 of the first threshold setting unit 1 is connected to the input unit i <b> 3 of the first comparison unit 5. The output unit o2 of the second threshold setting unit 2 is connected to the input unit i5 of the second comparison unit 6.

リフレッシュカウンタ3の出力部o3は、第一の比較部5の入力部i4と第二の比較部6の入力部i6と、各々接続されている。また、リフレッシュカウンタ3の入力部i1は、平均リフレッシュ間隔設定部4の出力部o4と接続されており、入力部i2には、要求調停部9の出力部o9と接続されている。   The output unit o3 of the refresh counter 3 is connected to the input unit i4 of the first comparison unit 5 and the input unit i6 of the second comparison unit 6. The input unit i1 of the refresh counter 3 is connected to the output unit o4 of the average refresh interval setting unit 4, and the input unit i2 is connected to the output unit o9 of the request arbitration unit 9.

リフレッシュ要求生成部8の入力部i9は、BANK/ROWアドレス比較部7の出力部o7と接続されており、入力部i10には、第一の比較部5の出力部o5と接続されており、入力部i11には、第二の比較部6の出力部o6と接続されている。また、リフレッシュ要求生成部8の出力部o8は、要求調停部9の入力部i12と接続されている。   The input unit i9 of the refresh request generation unit 8 is connected to the output unit o7 of the BANK / ROW address comparison unit 7, and the input unit i10 is connected to the output unit o5 of the first comparison unit 5. The input unit i11 is connected to the output unit o6 of the second comparison unit 6. The output unit o8 of the refresh request generation unit 8 is connected to the input unit i12 of the request arbitration unit 9.

要求調停部9の出力部o10は、SDRAMコマンド発行部10の入力部i14に接続されている。SDRAMコマンド発行部10の出力部o11は、SDRAM300の入力部i15に接続されており、出力部o12は、BANK/ROWアドレス比較部7の入力部i8と接続されている。   The output unit o10 of the request arbitration unit 9 is connected to the input unit i14 of the SDRAM command issue unit 10. The output unit o11 of the SDRAM command issuing unit 10 is connected to the input unit i15 of the SDRAM 300, and the output unit o12 is connected to the input unit i8 of the BANK / ROW address comparing unit 7.

バスマスタ200の出力部o13は、BANK/ROWアドレス比較部7の入力部i7と、要求調停部9の入力部i13とに、各々接続されている。   The output unit o13 of the bus master 200 is connected to the input unit i7 of the BANK / ROW address comparison unit 7 and the input unit i13 of the request arbitration unit 9, respectively.

次に、メモリ制御装置100を構成する各部の説明をする。   Next, each part which comprises the memory control apparatus 100 is demonstrated.

第一、二の閾値設定部1,2は、リフレッシュ制御方法を切り替えるための基準値となる、閾値を保持(格納)するレジスタである。   The first and second threshold setting units 1 and 2 are registers that hold (store) threshold values that serve as reference values for switching the refresh control method.

平均リフレッシュ間隔設定部4は、必要とされるリフレッシュ間隔の平均値(以下、平均リフレッシュ間隔値と称する)を保持(格納)するレジスタである。   The average refresh interval setting unit 4 is a register that holds (stores) an average value of required refresh intervals (hereinafter referred to as an average refresh interval value).

リフレッシュカウンタ3は、サイクル数が増加するに従って、通常はダウンカウントを行う装置である。また、SDRAM300に対するリフレッシュ処理が実行されたなら、リフレッシュカウンタ3は、平均リフレッシュ間隔設定部4に保持されている平均リフレッシュ間隔値を、現在のカウント値に加算する。   The refresh counter 3 is a device that normally counts down as the number of cycles increases. When the refresh process for the SDRAM 300 is executed, the refresh counter 3 adds the average refresh interval value held in the average refresh interval setting unit 4 to the current count value.

第一の比較部5は、リフレッシュカウンタ3のカウント値と、第一の閾値設定部1に保持されている閾値(以下、第一の閾値と称する)との大小関係を比較する装置である。もし、カウント値の方が大きければ、第一の比較部5は、「1」の信号を出力する。   The first comparison unit 5 is a device for comparing the magnitude relationship between the count value of the refresh counter 3 and the threshold value (hereinafter referred to as the first threshold value) held in the first threshold value setting unit 1. If the count value is larger, the first comparison unit 5 outputs a signal “1”.

第二の比較部6は、リフレッシュカウンタ3のカウント値と、第二の閾値設定部2に保持されている閾値(以下、第二の閾値と称する)との大小関係を比較する装置である。もし、カウント値の方が大きければ、第二の比較部6は、「1」の信号を出力する。   The second comparison unit 6 is a device for comparing the magnitude relationship between the count value of the refresh counter 3 and a threshold value (hereinafter referred to as a second threshold value) held in the second threshold value setting unit 2. If the count value is larger, the second comparison unit 6 outputs a signal “1”.

BANK/ROWアドレス比較部7は、SDRAMコマンド発行部10から出力された現在のアクティブROW情報(BANK情報を含む)ARと、バスマスタ200から出力されたメモリアクセス要求内のBANK/ROWアドレスとを比較する。当該比較の結果、両者が一致すれば、BANK/ROWアドレス比較部7は、「1」の信号を出力する。   The BANK / ROW address comparison unit 7 compares the current active ROW information (including BANK information) AR output from the SDRAM command issuing unit 10 with the BANK / ROW address in the memory access request output from the bus master 200. To do. If the two match as a result of the comparison, the BANK / ROW address comparison unit 7 outputs a signal of “1”.

ここで、アクティブROW情報ARとは、SDRAMコマンド発行部10が内部情報として保持している情報であり、当該アクティブROW情報ARにより、SDRAM300のアクティブ状態にあるBANKアドレス、ROWアドレスを知ることができる。   Here, the active ROW information AR is information held by the SDRAM command issuing unit 10 as internal information, and the BANK address and ROW address in the active state of the SDRAM 300 can be known from the active ROW information AR. .

後に説明されるが、SDRAMコマンド発行部10は、複数のコマンドから構成されるコマンドシーケンスを発行する。SDRAMコマンド発行部10は、当該コマンドシーケンスの内容を参酌することにより、上記アクティブROW情報ARを作成する。そして、当該作成されたアクティブROW情報ARを、SDRAMコマンド発行部10は、内部状態として保持する。   As will be described later, the SDRAM command issuing unit 10 issues a command sequence including a plurality of commands. The SDRAM command issuing unit 10 creates the active ROW information AR by referring to the contents of the command sequence. Then, the SDRAM command issuing unit 10 holds the created active ROW information AR as an internal state.

リフレッシュ要求生成部8は、以下のような論理を実現する。   The refresh request generator 8 implements the following logic.

もし、第一の比較部5から「0」の信号が出力された場合(つまり、第一の比較部5での比較処理の結果、リフレッシュカウンタ3のカウント値が、第一の閾値以下である場合)には(以下、ケースαと称する)、リフレッシュ要求生成部8は、リフレッシュ要求信号を出力する(「1」の信号を出力する)。   If a signal of “0” is output from the first comparison unit 5 (that is, as a result of comparison processing in the first comparison unit 5, the count value of the refresh counter 3 is less than or equal to the first threshold value. Case) (hereinafter referred to as case α), the refresh request generator 8 outputs a refresh request signal (outputs a signal of “1”).

もし、第一の比較部5から「1」の信号が出力され(つまり、第一の比較部5での比較処理の結果、リフレッシュカウンタ3のカウント値が、第一の閾値より大きいとき)、かつ、第二の比較部6から「0」の信号が出力され(つまり、第二の比較部6での比較処理の結果、リフレッシュカウンタ3のカウント値が、第二の閾値以下である場合)た場合において、BANK/ROWアドレス比較部7から「0」の信号が出力される場合(つまり、BANK/ROWアドレス比較部7での、SDRAMコマンド発行部10から出力された現在のアクティブROW情報(BANK情報を含む)と、バスマスタ200から出力されたメモリアクセス要求内のBANK/ROWアドレスとの比較処理の結果、BANKアドレスまたはROWアドレスが異なる場合)には(以下、ケースβと称する)、リフレッシュ要求生成部8は、リフレッシュ要求信号を出力する(「1」の信号を出力する)。   If the first comparison unit 5 outputs a signal of “1” (that is, when the count value of the refresh counter 3 is greater than the first threshold as a result of the comparison process in the first comparison unit 5), In addition, a signal of “0” is output from the second comparison unit 6 (that is, when the count value of the refresh counter 3 is equal to or smaller than the second threshold value as a result of the comparison process in the second comparison unit 6). In the case where the signal “0” is output from the BANK / ROW address comparison unit 7 (that is, the current active ROW information output from the SDRAM command issuing unit 10 in the BANK / ROW address comparison unit 7 ( BANK information) and the BANK / ROW address in the memory access request output from the bus master 200, as a result of comparison processing, the BANK address or ROW address is To become case) (hereinafter, referred to as casing beta), a refresh request generation unit 8 outputs a signal to output a refresh request signal ( "1").

もし、第一の比較部5から「1」の信号が出力され、かつ、第二の比較部6から「0」の信号が出力された場合において、BANK/ROWアドレス比較部7から「1」の信号が出力される場合(つまり、BANK/ROWアドレス比較部7での、SDRAMコマンド発行部10から出力された現在のアクティブROW情報(BANK情報を含む)ARと、バスマスタ200から出力されたメモリアクセス要求内のBANK/ROWアドレスとの比較処理の結果、BANKアドレスおよびROWアドレスが、各々一致する場合)には(以下、ケースγと称する)、リフレッシュ要求生成部8は、リフレッシュ要求信号を出力しない(「0」の信号を出力する)。   If the signal “1” is output from the first comparator 5 and the signal “0” is output from the second comparator 6, the BANK / ROW address comparator 7 outputs “1”. (That is, the current active ROW information (including BANK information) AR output from the SDRAM command issuing unit 10 in the BANK / ROW address comparison unit 7 and the memory output from the bus master 200) When the BANK address and the ROW address match each other as a result of the comparison process with the BANK / ROW address in the access request (hereinafter referred to as case γ), the refresh request generation unit 8 outputs a refresh request signal. No (outputs a signal of “0”).

もし、第一の比較部5から「1」の信号が出力され、かつ、第二の比較部6から「1」の信号が出力された場合(つまり、第二の比較部6での比較処理の結果、リフレッシュカウンタ3のカウント値が、第二の閾値より大きいとき)には(以下、ケースδと称する)、リフレッシュ要求生成部8は、リフレッシュ要求信号を出力しない(「0」の信号を出力する)。   If a signal “1” is output from the first comparator 5 and a signal “1” is output from the second comparator 6 (that is, a comparison process in the second comparator 6). As a result, when the count value of the refresh counter 3 is larger than the second threshold value (hereinafter referred to as case δ), the refresh request generator 8 does not output a refresh request signal (“0” signal is output). Output).

なお、ケースαおよびケースδのときは、BANK/ROWアドレス比較部7から出力される信号に関わらず、上記処理を行う。   In case α and case δ, the above processing is performed regardless of the signal output from the BANK / ROW address comparison unit 7.

要求調停部9は、バスマスタ200から出力されるメモリアクセス要求と、リフレッシュ要求生成部8から出力されるリフレッシュ要求との調停を行う。そして、どちらか一方の要求を、SDRAMコマンド発行部10に対して出力する。ここで、要求調停部9の調停方式は、常にリフレッシュ要求を優先的に、SDRAMコマンド発行部10に対して出力する方式である。   The request arbitration unit 9 arbitrates between a memory access request output from the bus master 200 and a refresh request output from the refresh request generation unit 8. Then, one of the requests is output to the SDRAM command issuing unit 10. Here, the arbitration method of the request arbitration unit 9 is a method in which a refresh request is always output to the SDRAM command issuing unit 10 with priority.

SDRAMコマンド発行部10は、要求調停部9を経由して入力されてくる、メモリアクセス要求とリフレッシュ要求とを受付ける。そして、SDRAM300に対して出力するために、SDRAMコマンド発行部10は、受付順に構成されたコマンドシーケンスを発行する。   The SDRAM command issuing unit 10 receives a memory access request and a refresh request input via the request arbitration unit 9. Then, in order to output to the SDRAM 300, the SDRAM command issuing unit 10 issues a command sequence configured in the order of acceptance.

次に、図4に示した本実施の形態に係るメモリ制御装置100の動作について説明する。なお、第一の閾値設定部1には、第一の閾値として「5」が設定されている。また、第二の閾値設定部2には、第二の閾値として「9」が設定されている。また、平均リフレッシュ間隔設定部4には、平均リフレッシュ間隔値として「10」が設定されている。   Next, the operation of the memory control device 100 according to the present embodiment shown in FIG. 4 will be described. In the first threshold setting unit 1, “5” is set as the first threshold. In the second threshold setting unit 2, “9” is set as the second threshold. The average refresh interval setting unit 4 is set to “10” as the average refresh interval value.

また、バスマスタ200からは、図5に示す一連(図5では9個)のメモリアクセス要求から成るメモリアクセスシーケンスが出力されるものとする。   Further, it is assumed that the bus master 200 outputs a memory access sequence including a series (9 in FIG. 5) of memory access requests shown in FIG.

図5において、メモリアクセス要求IDi(i=1,2,・・・,9)は、i番目のメモリアクセス要求を示す。また、RDは、SDRAM300に対するリードアクセスを示す。また、WTは、SDRAM300に対するライトアクセスを示す。   In FIG. 5, a memory access request IDi (i = 1, 2,..., 9) indicates the i-th memory access request. RD indicates read access to the SDRAM 300. WT indicates a write access to the SDRAM 300.

また、BANK addressBkは、k番目のバンクアドレスを示す。また、ROW addressRlは、l行目の行アドレスを示す。また、COLUMN addressCmは、m列目の列アドレスを示す。なお、k、l、mは自然数である。   BANK address Bk indicates the kth bank address. ROW addressRl indicates the row address of the lth row. Further, COLUMN addressCm indicates the column address of the m-th column. Note that k, l, and m are natural numbers.

また、図6に、図5に示したメモリアクセスシーケンスに対する、図4で示した各回路の状態や信号の変化を示す。   FIG. 6 shows changes in the states and signals of the circuits shown in FIG. 4 with respect to the memory access sequence shown in FIG.

図6において、1行目は、サイクル数である。2行目は、バスマスタ200から出力されたメモリアクセス要求のID番号である。3行目は、リフレッシュカウンタ3のカウンタ値である。4行目は、第二の比較部6の出力信号である。5行目は、第一の比較部5の出力信号である。   In FIG. 6, the first line is the number of cycles. The second line is the memory access request ID number output from the bus master 200. The third line is the counter value of the refresh counter 3. The fourth line is an output signal of the second comparison unit 6. The fifth line is an output signal of the first comparison unit 5.

また、6行目は、SDRAMコマンド発行部10が管理(保持)する、現在アクティブ状態にあるROW情報(アクティブROW情報)のうち、BANKアドレスを示している。7行目は、当該ROW情報のうちROWアドレスを示している。8行目は、バスマスタ200から出力されたメモリアクセス要求のBANKアドレスであり、9行目は、ROWアドレスである。   The sixth line shows the BANK address among the currently active ROW information (active ROW information) managed (held) by the SDRAM command issuing unit 10. The seventh line indicates a ROW address in the ROW information. The eighth line is the BANK address of the memory access request output from the bus master 200, and the ninth line is the ROW address.

また、10行目は、BANK/ROWアドレス比較部7の出力信号である。11行目は、リフレッシュ要求生成部8の出力信号である。12行目は、SDRAMコマンド発行部10から出力される、SDRAM300に対するコマンドである。13行目は、SDRAMコマンド発行部10から出力される、SDRAM300に対するBANKアドレスである。さらに、14行目は、SDRAMコマンド発行部10から出力される、SDRAM300に対するROWアドレスまたはCOLUMNアドレスである。   The 10th line is an output signal of the BANK / ROW address comparison unit 7. The eleventh line is an output signal of the refresh request generation unit 8. The twelfth line is a command for the SDRAM 300 output from the SDRAM command issuing unit 10. The thirteenth line is a BANK address for the SDRAM 300 output from the SDRAM command issuing unit 10. Furthermore, the 14th line is a ROW address or a COLUMN address for the SDRAM 300, which is output from the SDRAM command issuing unit 10.

なお、図6の11行目のコマンド表示において、「READ」は、読み出し処理コマンドを示している。また、「WRITE」は、書き込み処理コマンドを示している。また、「ACT」はバンクアクティベート処理コマンドを示している。また、「PRE」は、バンクプリチャージ処理コマンドを示している。また、「REF」は、リフレッシュ処理コマンドを示している。   In the command display on the eleventh line in FIG. 6, “READ” indicates a read processing command. “WRITE” indicates a write processing command. “ACT” represents a bank activation processing command. “PRE” indicates a bank precharge processing command. “REF” represents a refresh processing command.

まず、図6に示されているように、第一サイクルでは、バスマスタ200からメモリアクセス要求ID1が出力される。メモリアクセス要求ID1は、図5で示した様に、アドレスB1,R1,C1に対応する、SDRAM300の記憶素子からのデータ読み出し処理コマンドである。   First, as shown in FIG. 6, in the first cycle, the memory access request ID <b> 1 is output from the bus master 200. The memory access request ID1 is a data read processing command from the storage element of the SDRAM 300 corresponding to the addresses B1, R1, and C1, as shown in FIG.

SDRAM300においては、メモリアクセス要求ID1の読み出し処理(第二サイクル)を行う前に、BANKアドレスB1、ROWアドレスR1の記憶領域に対して、バンクアクティベート処理が実行される(図6の第一サイクル)。つまり、データの読み出しコマンドの前に、バンクアクティベート処理コマンドが発行される。   In the SDRAM 300, the bank activation process is executed for the storage areas of the BANK address B1 and the ROW address R1 before the memory access request ID1 read process (second cycle) (first cycle in FIG. 6). . That is, the bank activation processing command is issued before the data read command.

なお、このとき、リフレッシュカウンタ3のカウンタ値は、「10」である。したがって、当該カウンタ値「10」は、第二の閾値設定部2に記憶されている第二の閾値「9」よりも大きいので、第二の比較部6からは、「1」の信号が出力される。また、当該カウンタ値「10」は、第一の閾値設定部1に記憶されている第一の閾値「5」よりも大きいので、第一の比較部5からは、「1」の信号が出力される。   At this time, the counter value of the refresh counter 3 is “10”. Therefore, since the counter value “10” is larger than the second threshold value “9” stored in the second threshold value setting unit 2, a signal “1” is output from the second comparison unit 6. Is done. Further, since the counter value “10” is larger than the first threshold value “5” stored in the first threshold value setting unit 1, a signal “1” is output from the first comparison unit 5. Is done.

さて、上記でも説明したように、リフレッシュカウンタ3のカウンタ値は、サイクル数が増加する度に、減少する。したがって、第二サイクル以降は、リフレッシュカウンタ3のカウンタ値は、第二の閾値以下となる。よって、第二の比較部6からは、「0」の信号が出力される(図6の4行目)。   As described above, the counter value of the refresh counter 3 decreases as the number of cycles increases. Therefore, after the second cycle, the counter value of the refresh counter 3 is equal to or less than the second threshold value. Therefore, a signal “0” is output from the second comparison unit 6 (the fourth line in FIG. 6).

第三サイクルには、バスマスタ200から出力される、図5で示したメモリアクセス要求ID2(アドレスB1,R1,C2に対応する、SDRAM300の記憶素子からのデータ読み出し処理)が、各回路7,9に入力される。このとき、リフレッシュカウンタ3のカウンタ値は、「8」である。つまり、第一の閾値「5」よりも大きく、第二の閾値「9」より小さい。したがって、第一の比較部5からは、「1」の信号が出力され、第二の比較部6からは、「0」の信号が出力される。   In the third cycle, the memory access request ID2 (data read processing from the storage element of the SDRAM 300 corresponding to the addresses B1, R1, and C2) shown in FIG. Is input. At this time, the counter value of the refresh counter 3 is “8”. That is, it is larger than the first threshold “5” and smaller than the second threshold “9”. Therefore, a signal “1” is output from the first comparison unit 5, and a signal “0” is output from the second comparison unit 6.

また、第三サイクルでは、SDRAMコマンド発行部10から出力されるアクティブROW情報ARは、(B1、R1)である。   In the third cycle, the active ROW information AR output from the SDRAM command issuing unit 10 is (B1, R1).

そうすると、BANK/ROWアドレス比較部7が受け取る、バスマスタ200からのメモリアクセス要求ID2内のBANK・ROWアドレス(B1,R1)と、第三サイクルでのアクティブ状態にあるBANK・ROWアドレス(B1,R1)とが、各々一致する(つまり、BANK/ROW比較部7から「1」の信号が出力される。図6参照)。これは、上記ケースγに該当する。   Then, the BANK / ROW address comparison unit 7 receives the BANK / ROW address (B1, R1) in the memory access request ID2 from the bus master 200, and the BANK / ROW address (B1, R1) in the active state in the third cycle. ) Match each other (that is, a signal of “1” is output from the BANK / ROW comparing unit 7 (see FIG. 6)). This corresponds to the above case γ.

したがって、リフレッシュ要求生成部8は、リフレッシュ要求を出力しない(つまり、リフレッシュ要求生成部8からは、「0」の信号が出力される。図6参照)。したがって、SDRAMコマンド発行部10は、メモリアクセス要求ID2に従い、SDRAM300の対応する記憶素子に対する、データの読み出し処理コマンドを発行する(図6参照)。   Therefore, the refresh request generator 8 does not output a refresh request (that is, a signal “0” is output from the refresh request generator 8 (see FIG. 6)). Therefore, the SDRAM command issuing unit 10 issues a data read processing command to the corresponding storage element of the SDRAM 300 according to the memory access request ID 2 (see FIG. 6).

次に、第四サイクルには、バスマスタ200から出力される、図5で示したメモリアクセス要求ID3(アドレスB1,R2,C3に対応する、SDRAM300の記憶素子からのデータ読み出し処理)が、各回路7,9に入力される。このとき、リフレッシュカウンタ3のカウンタ値は、「7」である。つまり、第一の閾値「5」よりも大きく、第二の閾値「9」より小さい。したがって、第一の比較部5からは、「1」の信号が出力され、第二の比較部6からは、「0」の信号が出力される。   Next, in the fourth cycle, the memory access request ID3 (data read processing from the storage element of the SDRAM 300 corresponding to the addresses B1, R2, and C3) output from the bus master 200 shown in FIG. 7 and 9. At this time, the counter value of the refresh counter 3 is “7”. That is, it is larger than the first threshold “5” and smaller than the second threshold “9”. Therefore, a signal “1” is output from the first comparison unit 5, and a signal “0” is output from the second comparison unit 6.

また、第四サイクルでは、SDRAMコマンド発行部10から出力されるアクティブROW情報ARは、(B1、R1)である。   In the fourth cycle, the active ROW information AR output from the SDRAM command issuing unit 10 is (B1, R1).

そうすると、BANK/ROWアドレス比較部7が受け取る、バスマスタ200からのメモリアクセス要求ID2内のBANK・ROWアドレス(B1,R2)と、第四サイクルでのアクティブ状態にあるBANK・ROWアドレス(B1,R1)とが、完全に一致しない(つまり、BANK/ROW比較部7から「0」の信号が出力される。図6参照)。これは、上記ケースβに該当する。   Then, the BANK / ROW address comparison unit 7 receives the BANK / ROW address (B1, R2) in the memory access request ID2 from the bus master 200, and the BANK / ROW address (B1, R1) in the active state in the fourth cycle. ) Does not completely match (that is, a signal of “0” is output from the BANK / ROW comparison unit 7, see FIG. 6). This corresponds to the case β.

したがって、リフレッシュ要求生成部8は、リフレッシュ要求を出力する(つまり、リフレッシュ要求生成部8からは、「1」の信号が出力される。図6参照)。そして、現在アクティブ状態にある記憶領域(アドレスB1,R1)を非アクティブ状態とするために、SDRAMコマンド発行部10は、バンクプリチャージ処理コマンドが発行される。また、このときのSDRAMコマンド発行部10から出力される、アクティブROW情報ARは、無効となる(図6では、「X」で表示する)。   Therefore, the refresh request generator 8 outputs a refresh request (that is, a signal “1” is output from the refresh request generator 8 (see FIG. 6)). Then, the SDRAM command issuing unit 10 issues a bank precharge processing command in order to set the storage area (addresses B1, R1) currently active in an inactive state. In addition, the active ROW information AR output from the SDRAM command issuing unit 10 at this time becomes invalid (indicated as “X” in FIG. 6).

そして、当該バンクプリチャージ処理コマンド発行後、第5サイクルには(リフレッシュカウンタ値は、「6」となる)、リフレッシュ要求に応じて、SDRAMコマンド発行部10は、SDRAM300に対してリフレッシュ処理コマンドを発行する(図6参照)。   Then, in the fifth cycle (the refresh counter value becomes “6”) after issuing the bank precharge processing command, the SDRAM command issuing unit 10 issues a refresh processing command to the SDRAM 300 in response to the refresh request. Issue (see FIG. 6).

また、要求調停部9を介して出力される、リフレッシュ要求に応じて、リフレッシュカウンタ3は、現在のカウント値「6」に、平均リフレッシュ間隔設定部4に記憶されている平均リフレッシュ間隔値「10」を加算する(図6の第六サイクル)。   Further, in response to the refresh request output via the request arbitration unit 9, the refresh counter 3 sets the average refresh interval value “10” stored in the average refresh interval setting unit 4 to the current count value “6”. Is added (sixth cycle in FIG. 6).

したがって、第六サイクルでは、リフレッシュカウンタのカウント値「16」は、第一、二の閾値よりも大きくなるので、第一、二の比較部5,6からは、「1」の信号が出力される。   Accordingly, in the sixth cycle, the count value “16” of the refresh counter is larger than the first and second threshold values, so that the first and second comparison units 5 and 6 output a signal “1”. The

また、第六サイクルでは、SDRAM300においては、メモリアクセス要求ID3の読み出し処理(第七サイクル)を行う前に、BANKアドレスB1、ROWアドレスR2の記憶領域に対して、バンクアクティベート処理が実行される。したがって、第6サイクルでは、SDRAMコマンド発行部10からは、読み出し処理コマンドに先立って、バンクアクティベート処理コマンドが発行される。   In the sixth cycle, in the SDRAM 300, the bank activation process is executed for the storage areas of the BANK address B1 and the ROW address R2 before the memory access request ID3 is read (seventh cycle). Therefore, in the sixth cycle, the SDRAM command issuing unit 10 issues a bank activate processing command prior to the read processing command.

さて、第六サイクルから第十二サイクルまでは、リフレッシュカウンタ3のカウント値が、第二の閾値「9」よりも大きい。これは、上記ケースδの場合である。   Now, from the sixth cycle to the twelfth cycle, the count value of the refresh counter 3 is larger than the second threshold “9”. This is the case of the above case δ.

したがって、第六サイクルから第十二サイクルまでの期間中は、リフレッシュ要求生成部8は、リフレッシュ要求信号を出力しない(「0」の信号を出力し続ける)。そして、SDRAMコマンド発行部10からは、バスメモリ200から出力されるメモリアクセス要求ID4,5,6に従って、SDRAM300に対する通常のデータ読み出し処理等のコマンドが発行される(図6参照)。   Therefore, during the period from the sixth cycle to the twelfth cycle, the refresh request generation unit 8 does not output the refresh request signal (continues to output the signal “0”). Then, the SDRAM command issuing unit 10 issues a command such as normal data read processing for the SDRAM 300 in accordance with the memory access request IDs 4, 5, and 6 output from the bus memory 200 (see FIG. 6).

つまり、アクティブ状態にある記憶領域が、BANKアドレスBi、ROWアドレスRiであり、バスマスタ200から出力されたメモリアクセス要求が、BANKアドレスBi、ROWアドレスRiの記憶領域に対するものであるとする(すなわち、両BANK/ROWアドレスが、完全に一致する場合)。このときは、バンクプリチャージ処理コマンドおよびバンクアクティベート処理コマンドを発行せずに、当該メモリアクセス要求に従ったデータの読み出し等の処理コマンドが発行される。   That is, the storage area in the active state is the BANK address Bi and the ROW address Ri, and the memory access request output from the bus master 200 is for the storage area of the BANK address Bi and the ROW address Ri (that is, Both BANK / ROW addresses match exactly). At this time, without issuing the bank precharge processing command and the bank activation processing command, a processing command such as data reading according to the memory access request is issued.

また、アクティブ状態にある記憶領域が、BANKアドレスBi、ROWアドレスRiであり、バスマスタ200から出力されたメモリアクセス要求が、BANKアドレスBj、ROWアドレスRjの記憶領域に対するものであるとする(すなわち、両アドレスのうち、BANKアドレスまたはROWアドレスが不一致の場合)。このときは、バンクプリチャージ処理コマンド、その後のバンクアクティベート処理コマンドの発行を行う。そして、その後に、当該メモリアクセス要求に従ったデータの読み出し等の処理コマンドが発行される。   Further, assume that the storage areas in the active state are the BANK address Bi and the ROW address Ri, and the memory access request output from the bus master 200 is for the storage areas of the BANK address Bj and the ROW address Rj (that is, (If the BANK address or the ROW address do not match) At this time, a bank precharge processing command and a subsequent bank activation processing command are issued. Thereafter, a processing command such as data reading according to the memory access request is issued.

さて、第十三サイクル以降になると、リフレッシュカウンタ3のカウンタ値は、「9」以下となる。すなわち、当該カウンタ値は、第二の閾値「9」以下となる。したがって、リフレッシュ要求生成部8は、ケースβまたはケースγのどちらかに示した動作を行うことになる。   Now, after the thirteenth cycle, the counter value of the refresh counter 3 becomes “9” or less. That is, the counter value is equal to or smaller than the second threshold “9”. Accordingly, the refresh request generator 8 performs the operation shown in either case β or case γ.

なお、第十三サイクル以降において、リフレッシュ要求生成部8がリフレッシュ要求を生成しない場合には、メモリ制御装置100は、SDRAM300に対しては、バスメモリ200から出力されるメモリアクセス要求ID7,8に従って、通常のデータ読み出し処理等が実行する(図6参照)。   If the refresh request generator 8 does not generate a refresh request after the thirteenth cycle, the memory control device 100 instructs the SDRAM 300 according to the memory access request IDs 7 and 8 output from the bus memory 200. Ordinary data read processing or the like is executed (see FIG. 6).

ここで、第十五、十六サイクルにおいて、BANK/ROWアドレス比較部7には、バスマスタ200から出力されたメモリアクセス要求ID7,8が入力される。当該メモリアクセス要求ID7,8内のBANKアドレスおよびROWアドレスは、アクティブROW情報(当該アクティブ情報は、第十五、十六サイクル時に、SDRAMコマンド発行部10から出力されたものである)内のBANKアドレスおよびROWアドレスと、一致する(ケースγ)。   Here, in the fifteenth and sixteenth cycles, the memory access request IDs 7 and 8 output from the bus master 200 are input to the BANK / ROW address comparison unit 7. The BANK address and the ROW address in the memory access request IDs 7 and 8 are the BANK in the active ROW information (the active information is output from the SDRAM command issuing unit 10 in the fifteenth and sixteenth cycles). It matches the address and ROW address (case γ).

したがって、SDRAMコマンド発行部10からは、SDRAM300のリフレッシュ処理コマンドの発行を行わず、メモリアクセス要求ID7,8に従って、該当する記憶素子に対するデータの読み出し、書き込み等の処理コマンドを発行する。   Therefore, the SDRAM command issuing unit 10 does not issue the refresh processing command of the SDRAM 300, but issues processing commands such as data reading and writing to the corresponding storage element according to the memory access request IDs 7 and 8.

さて、第十七サイクルでは、リフレッシュカウンタ3のカウンタ値は、「5」となる。当該カウンタ値は、第一の閾値「5」以下に該当する。つまり、第一、二の比較部5,6からは、共に「0」の信号が出力される。当該ケースは、ケースαに該当する。   In the seventeenth cycle, the counter value of the refresh counter 3 is “5”. The counter value corresponds to the first threshold “5” or less. That is, both the first and second comparison units 5 and 6 output “0” signals. This case corresponds to case α.

したがって、リフレッシュ要求生成部8は、BANK/ROWアドレス比較部7から出力される信号に関わらず、リフレッシュ要求信号を出力する(「1」の信号を出力する)。   Accordingly, the refresh request generator 8 outputs a refresh request signal (outputs a signal “1”) regardless of the signal output from the BANK / ROW address comparator 7.

これにより、第十七サイクルでは、SDRMAコマンド発行部10は、現在活性状態ある記憶領域を非活性化するために、バンクプリチャージ処理コマンドを発行する。   Thus, in the seventeenth cycle, the SDRMA command issuing unit 10 issues a bank precharge processing command in order to deactivate the storage area that is currently active.

そして、第十八サイクルでは、SDRAMコマンド発行部10からは、SDRAM300に対するリフレッシュ処理コマンドが発行される。   In the eighteenth cycle, the SDRAM command issuing unit 10 issues a refresh processing command for the SDRAM 300.

その後、第十九サイクルでは、SDRAMコマンド発行部10からは、メモリアクセス要求ID9に従ったデータの読み出し処理コマンド(第二十サイクル)を発行前に、該当するBANKアドレス、ROWアドレスの記憶領域に対しての、バンクアクティベート処理コマンドが発行される。   Thereafter, in the nineteenth cycle, before issuing a data read processing command (20th cycle) in accordance with the memory access request ID 9 from the SDRAM command issuing unit 10, the SDRAM command issuing unit 10 stores the corresponding BANK address and ROW address in the storage area. On the other hand, a bank activation processing command is issued.

なお、第十八サイクルにおいて、リフレッシュ処理が実施されたので、リフレッシュカウンタ3のカウント値「4」に、平均リフレッシュ間隔値「10」が加算される。つまり、第十九サイクルでは、リフレッシュカウンタ3のカウンタ値は、「14」となる。   In the eighteenth cycle, since the refresh process has been performed, the average refresh interval value “10” is added to the count value “4” of the refresh counter 3. That is, in the nineteenth cycle, the counter value of the refresh counter 3 is “14”.

したがって、第十九サイクル以降はケースδとなる。よって、カウンタ値が第二の閾値「9」以下となるまで、リフレッシュ要求生成部8は、BANK/ROW比較部7の出力に関わらず、リフレッシュ要求の信号は出力しない。   Therefore, the case δ is applied after the nineteenth cycle. Therefore, the refresh request generation unit 8 does not output a refresh request signal regardless of the output of the BANK / ROW comparison unit 7 until the counter value becomes equal to or smaller than the second threshold “9”.

本実施の形態に係るメモリ制御装置100を用いた場合の、サイクル数に対するリフレッシュカウンタ3のカウンタ値の変化を、図7に模式的に示す。図7において、縦軸はカウンタ値であり、横軸はサイクル数である。なお、上記実施の形態では、第一の閾値「5」、第二の閾値「9」、リフレッシュ間隔値「10」の場合に説明した。しかし、図7の模式図は、当該各閾値等の設定と異なる設定のものである。   FIG. 7 schematically shows changes in the counter value of the refresh counter 3 with respect to the number of cycles when the memory control device 100 according to the present embodiment is used. In FIG. 7, the vertical axis represents the counter value, and the horizontal axis represents the number of cycles. In the above embodiment, the first threshold value “5”, the second threshold value “9”, and the refresh interval value “10” have been described. However, the schematic diagram of FIG. 7 has a setting different from the setting of each threshold value and the like.

また、「丸印」は、メモリアクセス要求のBANK・ROWアドレスとアクティブROW情報ARのBANK・ROWアドレスとが、それぞれ一致する場合である。「星印」は、メモリアクセス要求のBANKアドレスまたはROWアドレスが、アクティブROW情報ARのBANKアドレスまたはROWアドレスと不一致の場合である。また、「矢印」は、リフレッシュ処理後の平均リフレッシュ間隔値の加算を示す。   “Circle” is a case where the BANK / ROW address of the memory access request and the BANK / ROW address of the active ROW information AR match each other. “Star” is a case where the BANK address or ROW address of the memory access request does not match the BANK address or ROW address of the active ROW information AR. An “arrow” indicates addition of an average refresh interval value after the refresh process.

図7が示すように、カウンタ値が第二の閾値以下の場合において、上記アドレスの不一致の事象が連続して発生すれば、その度にリフレッシュ処理が連続して実施される。そして、リフレッシュ処理が実施される度に、カウンタ値に平均リフレッシュ間隔値が加算される。   As shown in FIG. 7, in the case where the counter value is equal to or smaller than the second threshold value, if the address mismatch event occurs continuously, the refresh process is continuously performed each time. Each time the refresh process is performed, the average refresh interval value is added to the counter value.

しかし、カウンタ値が第二の閾値より大きくなれば、リフレッシュ処理が実施されることはない。   However, if the counter value is larger than the second threshold value, the refresh process is not performed.

また、上記アドレスの一致事象が連続して発生した場合、カウンタ値が第一の閾値以下となり得る。しかし、カウント値が減少し続けて第一の閾値以下となったときには、強制的にリフレッシュ処理が実施される。そして、カウント値に平均リフレッシュ間隔値が加算される。   Further, when the address coincidence event occurs continuously, the counter value can be equal to or less than the first threshold value. However, when the count value continues to decrease and falls below the first threshold value, the refresh process is forcibly executed. Then, the average refresh interval value is added to the count value.

以上のように、本実施の形態に係るメモリ制御装置100は、ケースβ、γのように、バンクアクティベート処理が必要なタイミングを狙って、SDRAM300に対するリフレッシュ処理を実施している。   As described above, the memory control device 100 according to the present embodiment performs the refresh process on the SDRAM 300 aiming at the timing when the bank activation process is necessary, as in the cases β and γ.

したがって、図2,3を用いた説明したように、同一BANK・同一ROWアドレスに対して連続してアクセスしている途中に、リフレッシュ処理が実施されることを防止することができる。つまり、無駄なバンクプリチャージ処理および無駄なバンクアクティベート処理を行う必要がなくなる。   Therefore, as described with reference to FIGS. 2 and 3, it is possible to prevent the refresh process from being performed while continuously accessing the same BANK / same ROW address. That is, it is not necessary to perform useless bank precharge processing and useless bank activation processing.

よって、SDRAM300に対するリフレッシュ処理が施されたとしても、バンクアクティベートが施されるタイミングで行われるので、実効的なデータ転送効率の損失を最小限にすることができる。   Therefore, even if the refresh process is performed on the SDRAM 300, since it is performed at the timing when the bank activation is performed, the loss of effective data transfer efficiency can be minimized.

また、本実施の形態に係るメモリ制御装置100は、平均リフレッシュ間隔値を保持する平均リフレッシュ間隔設定部4を有している。そして、リフレッシュ処理が実施された場合には、リフレッシュカウンタ3のカウンタ値に平均リフレッシュ間隔値が加算される。   In addition, the memory control device 100 according to the present embodiment has an average refresh interval setting unit 4 that holds an average refresh interval value. When the refresh process is performed, the average refresh interval value is added to the counter value of the refresh counter 3.

したがって、リフレッシュ処理の間隔は一定になることはないが、長期的に見た場合には、リフレッシュ処理の平均的な間隔は、平均リフレッシュ間隔値とほぼ等しくすることができる。   Therefore, although the refresh process interval does not become constant, the average refresh process interval can be made substantially equal to the average refresh interval value in the long term.

また、本実施の形態係るメモリ制御装置100は、第一の閾値とリフレッシュカウンタ3のカウント値とを比較する第一の比較部5を有している。そして、第一の比較部5の比較の結果、カウンタ値が第一の閾値以下となったときには、リフレッシュ要求生成部8は、リフレッシュ要求を生成している。   In addition, the memory control device 100 according to the present embodiment includes a first comparison unit 5 that compares the first threshold value with the count value of the refresh counter 3. When the counter value is equal to or smaller than the first threshold value as a result of the comparison by the first comparison unit 5, the refresh request generation unit 8 generates a refresh request.

したがって、バスマスタ200からのメモリアクセス要求のBANKアドレスおよびROWアドレスが、アクティブROW情報ARのBANKアドレスおよびROWアドレスと、それぞれ一致する事象が連続して発生した場合に、強制的にSDRAM300に対してリフレッシュ処理を実施することができる。   Therefore, when the BANK address and the ROW address of the memory access request from the bus master 200 continuously match the BANK address and the ROW address of the active ROW information AR, the SDRAM 300 is forcibly refreshed. Processing can be performed.

なお、リフレッシュ処理は、前段階の一のメモリアクセス要求に従った処理の終了後に、実施される。したがって、第一の閾値は、一のメモリアクセス要求に要する最大の処理サイクル数以上に設定しておくべきである。   The refresh process is performed after the process in accordance with the memory access request in the previous stage is completed. Therefore, the first threshold value should be set to be equal to or greater than the maximum number of processing cycles required for one memory access request.

また、本実施の形態に係るメモリ制御装置100は、第二の閾値とリフレッシュカウンタ3のカウント値とを比較する第二の比較部6を有している。そして、第二の比較部6の比較の結果、カウンタ値が第二の閾値より大きいときには、リフレッシュ要求生成部8は、リフレッシュ要求を生成することはない。   In addition, the memory control device 100 according to the present embodiment includes a second comparison unit 6 that compares the second threshold value with the count value of the refresh counter 3. When the counter value is larger than the second threshold as a result of the comparison by the second comparison unit 6, the refresh request generation unit 8 does not generate a refresh request.

したがって、第二の閾値を経験則等に基いて適正な値に設定することにより、SDRAM300内に記憶されている電荷量が十分であり、リフレッシュ処理を行う必要がない場合での、無用なSDRAM300のリフレッシュ処理を防止することができる。   Therefore, by setting the second threshold value to an appropriate value based on an empirical rule or the like, useless SDRAM 300 when the amount of charge stored in SDRAM 300 is sufficient and there is no need to perform refresh processing. The refresh process can be prevented.

なお、リフレッシュカウンタ3のカウンタ値が第二の閾値より大きくなると、リフレッシュ処理は実施されない。したがって、第二の閾値のときに、リフレッシュ処理が実施された場合が、リフレッシュカウンタ3の取り得る最大のカウンタ値である。   When the counter value of the refresh counter 3 becomes larger than the second threshold value, the refresh process is not performed. Therefore, the maximum counter value that the refresh counter 3 can take is when the refresh process is performed at the second threshold value.

また、上記のように、第一の閾値は、一つのメモリアクセス要求に要する最大の処理サイクル数以上に設定することが望ましい。したがって、当該制約を厳守すれば、リフレッシュカウンタ3の取り得る最小のカウンタ値は、「0」となる。つまり、リフレッシュカウンタ3のカウンタ値が「0」のときに、リフレッシュ処理が強制的に実施される可能性がある。   As described above, the first threshold value is desirably set to be equal to or greater than the maximum number of processing cycles required for one memory access request. Therefore, if the restriction is strictly observed, the minimum counter value that the refresh counter 3 can take is “0”. That is, when the counter value of the refresh counter 3 is “0”, the refresh process may be forcibly performed.

以上により、リフレッシュ処理間のサイクル数は、最大でも(第二の閾値)+(平均リフレッシュ間隔値)である。   As described above, the number of cycles between refresh processes is at most (second threshold value) + (average refresh interval value).

ところで、SDRAM300には、一度リフレッシュ処理を実施されたから、次にリフレッシュ処理が必要なときまでの上限期間tREFが、定義されている。したがって、第二の閾値をあまりにも大きくとると、リフレッシュ処理間のサイクル数が、上限期間tREFを超えてしまうことがある。   By the way, the SDRAM 300 defines an upper limit period tREF until the next refresh process is necessary after the refresh process is performed once. Therefore, if the second threshold value is set too large, the number of cycles between refresh processes may exceed the upper limit period tREF.

したがって、第二の閾値は、リフレッシュ処理間のサイクル数が、上限期間tREFを超えない範囲内で設定する必要がある。   Therefore, it is necessary to set the second threshold within a range in which the number of cycles between refresh processes does not exceed the upper limit period tREF.

また、本実施の形態に係るメモリ制御装置は、要求調停部9を有している。要求調停部9は、メモリアクセス要求とリフレッシュ要求との調停を行い、リフレッシュ要求を優先的に後段のSDRAMコマンド発行部10へ出力する装置である。したがって、以下の効果を有する。   Further, the memory control device according to the present embodiment has a request arbitration unit 9. The request arbitration unit 9 is a device that arbitrates between a memory access request and a refresh request, and outputs the refresh request to the subsequent SDRAM command issuing unit 10 with priority. Therefore, it has the following effects.

つまり、リフレッシュ要求よりもメモリアクセス要求の方が優先してSDRAMコマンド発行部10に入力されたとする。このとき、たとえ、バンクアクティベートが実施されるタイミングでリフレッシュ要求生成されたとしても、SDRAMコマンド発行部10で発行されるコマンドシーケンスにおいては、リフレッシュ要求の順序が前記タイミングより遅れてしまう。   That is, it is assumed that the memory access request is prioritized over the refresh request and is input to the SDRAM command issuing unit 10. At this time, even if a refresh request is generated at the timing when bank activation is performed, in the command sequence issued by the SDRAM command issuing unit 10, the order of the refresh requests is delayed from the timing.

しかし、上記要求調停部9を設けることにより、上記のような問題の発生を防止することができる。   However, by providing the request arbitration unit 9, it is possible to prevent the occurrence of the above problems.

また、本実施の形態に係るメモリ制御装置は、SDRAM300のアクティブROW情報ARを内部状態として保持しているSDRAMコマンド発行部10を有している。   In addition, the memory control device according to the present embodiment includes an SDRAM command issuing unit 10 that holds active ROW information AR of the SDRAM 300 as an internal state.

したがって、BANK/ROWアドレス比較部7での比較処理に際して、当該SDRAMコマンド発行部10の内部状態を参照することができる。よって、当該比較処理に際して、わざわざSDRAM300のアクティブ状態を参照する作業を削減でき、当該比較処理をより簡便に行うことができる。   Therefore, the internal state of the SDRAM command issuing unit 10 can be referred to during the comparison process in the BANK / ROW address comparing unit 7. Therefore, it is possible to reduce the work of referring to the active state of the SDRAM 300 during the comparison process, and to perform the comparison process more simply.

なお、上記では、SDRAMコマンド発行部10は、バンクを区別せずにアクティブROW情報ARの管理(保持)を行っていた。つまり、アクティブROW情報AR内のBANKアドレス、ROWアドレスと、メモリアクセス要求内のBANKアドレス、ROWアドレスとが、各々同じときには、バンクプリチャージ・バンクアクティベート処理を実施することは無かった。これは、メモリアクセスの効率化のための制御である。   In the above description, the SDRAM command issuing unit 10 manages (holds) the active ROW information AR without distinguishing between banks. That is, when the BANK address and ROW address in the active ROW information AR are the same as the BANK address and ROW address in the memory access request, the bank precharge / bank activation process is not performed. This is control for improving the efficiency of memory access.

一方、上記とは別に、SDRAMコマンド発行部10を、バンクを区別してアクティブROW情報ARを管理(保持)する構成としても良い。つまり、アクティブROW情報内のROWアドレスと、メモリアクセス要求内のROWアドレスとが同じときに、バンクプリチャージ・バンクアクティベート処理を不実施としても良い。これにより、前者の場合と比べて、よりメモリアクセスの効率化を図ることができる。   On the other hand, apart from the above, the SDRAM command issuing unit 10 may be configured to manage (hold) the active ROW information AR by distinguishing banks. In other words, when the ROW address in the active ROW information is the same as the ROW address in the memory access request, the bank precharge / bank activation process may not be performed. As a result, the memory access can be made more efficient than in the former case.

<実施の形態2>
本実施の形態に係るメモリ制御装置は、バスマスタからのメモリアクセス要求が無い(メモリに対するアクセスがない)アイドルサイクルのタイミングを狙って、SDRAMに対してリフレッシュ処理を施すことを特徴とする。図8は、本実施の形態に係るメモリ制御装置の構成を示すブロック図である。
<Embodiment 2>
The memory control device according to the present embodiment is characterized in that the SDRAM is subjected to refresh processing aiming at an idle cycle timing in which there is no memory access request from the bus master (no access to the memory). FIG. 8 is a block diagram showing a configuration of the memory control device according to the present embodiment.

本実施の形態に係るメモリ制御装置100(図8)と、実施の形態1に係るメモリ制御装置100(図4)とは、以下の点において異なる。   Memory control device 100 (FIG. 8) according to the present embodiment differs from memory control device 100 (FIG. 4) according to the first embodiment in the following points.

実施の形態1に係るメモリ制御装置100は、閾値設定部1,2および比較部5,6は、それぞれ二つ配設されていた。しかし、本実施の形態に係るメモリ制御装置100は、一つの閾値設定部21と一つの比較部22しか配設されていない。   In the memory control device 100 according to the first embodiment, two threshold setting units 1 and 2 and comparison units 5 and 6 are provided. However, the memory control device 100 according to the present embodiment includes only one threshold setting unit 21 and one comparison unit 22.

また、本実施の形態に係るメモリ制御装置100には、BANK/ROWアドレス比較部7の代わりに、アイドルサイクル検出部23が配設されている。   Further, in the memory control device 100 according to the present embodiment, an idle cycle detection unit 23 is arranged instead of the BANK / ROW address comparison unit 7.

その他の構成および接続関係は、実施の形態1に係るメモリ制御装置100と同じであるので、ここでの詳細な説明は省略する。   Since other configurations and connection relationships are the same as those of the memory control device 100 according to the first embodiment, a detailed description thereof is omitted here.

また、図8には、実施の形態1と同様に、メモリ制御装置100の他に、バスマスタ200およびSDRAM300も図示している。バスマスタ200およびSDRAM300の説明は、実施の形態1の通りである。   FIG. 8 also shows the bus master 200 and the SDRAM 300 in addition to the memory control device 100 as in the first embodiment. The description of bus master 200 and SDRAM 300 is as described in the first embodiment.

図8において、閾値設定部21は、リフレッシュ制御方法を切り替えるための基準となる、第三の閾値を保持(格納)するレジスタである。また、比較部22は、リフレッシュカウンタ3のカウント値と、閾値設定部21に設定されている第三の閾値との大小関係を比較する装置である。もし、カウント値の方が大きければ、比較部22は、「1」の信号を出力する。   In FIG. 8, a threshold value setting unit 21 is a register that holds (stores) a third threshold value that is a reference for switching the refresh control method. The comparison unit 22 is a device for comparing the magnitude relationship between the count value of the refresh counter 3 and the third threshold value set in the threshold value setting unit 21. If the count value is larger, the comparison unit 22 outputs a signal of “1”.

アイドルサイクル検出部23は、バスマスタ200から出力されるメモリアクセス要求の状態と、SDRAMコマンド発行部10から出力されるアクティブROW情報ARとを監視する回路である。   The idle cycle detection unit 23 is a circuit that monitors the state of the memory access request output from the bus master 200 and the active ROW information AR output from the SDRAM command issue unit 10.

アイドルサイクル検出部23は、バスマスタ200からメモリアクセス要求の出力が無く、かつ、SDRAMコマンド発行部10からSDRAM300に対してコマンドシーケンスが発行されていない場合には、アイドルサイクルであることを検出する。   The idle cycle detection unit 23 detects an idle cycle when there is no memory access request output from the bus master 200 and no command sequence is issued from the SDRAM command issuing unit 10 to the SDRAM 300.

そして、アイドルサイクル検出部23は、当該アイドルサイクルを検出すると、リフレッシュ要求生成部8に「1」の信号を出力する。これにより、アイドルサイクル検出部23がアイドルサイクルを検知したことを、リフレッシュ要求生成部8に知らせることができる。   When the idle cycle detection unit 23 detects the idle cycle, the idle cycle detection unit 23 outputs a signal “1” to the refresh request generation unit 8. As a result, the refresh request generator 8 can be notified that the idle cycle detector 23 has detected an idle cycle.

リフレッシュ要求生成部8は、以下のような論理を実現する。   The refresh request generator 8 implements the following logic.

もし、比較部22から「1」の信号が出力された場合(つまり、比較部22での比較処理の結果、リフレッシュカウンタ3のカウント値が、第三の閾値より大きな場合)には(以下、ケースεと称する)、リフレッシュ要求生成部8は、リフレッシュ要求信号を出力しない(「0」の信号を出力する)。   If a signal “1” is output from the comparison unit 22 (that is, if the count value of the refresh counter 3 is larger than the third threshold as a result of the comparison process in the comparison unit 22) (hereinafter, The refresh request generator 8 does not output a refresh request signal (outputs a signal “0”).

もし、比較部22から「0」の信号が出力され(つまり、比較部22での比較処理の結果、リフレッシュカウンタ3のカウント値が、第三の閾値以下である場合)、かつ、アイドルサイクル検出部23から「0」の信号が出力される(つまり、アイドルサイクル検出部23がアイドルサイクルを検出していない)場合には(以下、ケースζと称する)、リフレッシュ要求生成部8は、リフレッシュ要求信号を出力しない(「0」の信号を出力する)。   If the comparison unit 22 outputs a signal “0” (that is, if the count value of the refresh counter 3 is equal to or smaller than the third threshold as a result of the comparison process in the comparison unit 22), and the idle cycle is detected. When the signal “0” is output from the unit 23 (that is, the idle cycle detection unit 23 has not detected an idle cycle) (hereinafter referred to as case ζ), the refresh request generation unit 8 No signal is output (“0” signal is output).

もし、比較部22から「0」の信号が出力され、かつ、アイドルサイクル検出部23から「1」の信号が出力される(アイドルサイクル検出部23がアイドルサイクルを検出した)場合には(以下、ケースηと称する)、リフレッシュ要求生成部8は、リフレッシュ要求信号を出力する(「1」の信号を出力する)。   If the comparison unit 22 outputs a “0” signal and the idle cycle detection unit 23 outputs a “1” signal (the idle cycle detection unit 23 has detected an idle cycle) The refresh request generator 8 outputs a refresh request signal (outputs a signal “1”).

なお、ケースεのときは、アイドルサイクル検出部23からの出力結果に関わらず、上記処理を行う。   In case ε, the above processing is performed regardless of the output result from the idle cycle detection unit 23.

次に、図8に示した本実施の形態に係るメモリ制御装置100の動作について説明する。なお、閾値設定部21には、第三の閾値として「50」が設定されている。また、平均リフレッシュ間隔設定部4には、平均リフレッシュ間隔値として「10」が設定されている。   Next, the operation of the memory control device 100 according to the present embodiment shown in FIG. 8 will be described. In the threshold setting unit 21, “50” is set as the third threshold. The average refresh interval setting unit 4 is set to “10” as the average refresh interval value.

また、バスマスタ200からは、図9に示す一連(図9では5個である)のメモリアクセス要求から成るメモリアクセスシーケンス(図9では、途中に、メモリアクセス要求が出力されない部分「IDLE」も含まれている)が出力されるものとする。   Also, the bus master 200 includes a memory access sequence including a series of memory access requests shown in FIG. 9 (five in FIG. 9) (in FIG. 9, a part “IDLE” in which no memory access request is output is included in the middle). Is output).

なお、図9内に示されている各記号の意味内容は、実施の形態1で説明した図5内に示された各記号のそれと同じである。   The meaning content of each symbol shown in FIG. 9 is the same as that of each symbol shown in FIG. 5 described in the first embodiment.

また、図10に、図9に示したメモリアクセスシーケンスに対する、図8で示した各回路の状態や信号の変化を示す。   FIG. 10 shows changes in the states and signals of the circuits shown in FIG. 8 with respect to the memory access sequence shown in FIG.

図10において、1行目は、サイクル数である。2行目は、バスマスタ200から出力されたメモリアクセス要求のID番号である。3行目は、リフレッシュカウンタ3のカウンタ値である。4行目は、比較部22の出力信号である。5行目は、アイドルサイクル検出部23の出力信号である。6行目は、リフレッシュ要求生成部8の出力信号である。   In FIG. 10, the first line is the number of cycles. The second line is the memory access request ID number output from the bus master 200. The third line is the counter value of the refresh counter 3. The fourth line is an output signal of the comparison unit 22. The fifth line is an output signal of the idle cycle detection unit 23. The sixth line is an output signal of the refresh request generator 8.

また、7行目は、SDRAMコマンド発行部10から出力される、SDRAM300に対するコマンドである。8行目は、SDRAMコマンド発行部10から出力される、SDRAM300に対するBANKアドレスである。さらに、9行目は、SDRAMコマンド発行部10から出力される、SDRAM300に対するROWアドレスまたはCOLUMNアドレスである。   The seventh line is a command for the SDRAM 300 output from the SDRAM command issuing unit 10. The eighth line is a BANK address for the SDRAM 300 output from the SDRAM command issuing unit 10. Further, the ninth line is a ROW address or a COLUMN address for the SDRAM 300 output from the SDRAM command issuing unit 10.

なお、図10において、「NOP」は、SDRAMコマンド発行部10から発行されるコマンドが無い状態を示す。図10内に示されているそれ以外各記号の意味内容は、実施の形態1で説明した図6内に示された各記号のそれと同じである。   In FIG. 10, “NOP” indicates a state in which there is no command issued from the SDRAM command issuing unit 10. The meanings and contents of the other symbols shown in FIG. 10 are the same as those of the symbols shown in FIG. 6 described in the first embodiment.

まず、図10に示されているように、第一サイクルでは、バスマスタ200からメモリアクセス要求ID1が出力される。メモリアクセス要求ID1は、図9で示した様に、アドレスB1,R1,C1に対応する、SDRAM300の記憶素子からのデータ読み出し処理コマンドである。   First, as shown in FIG. 10, in the first cycle, the memory access request ID <b> 1 is output from the bus master 200. The memory access request ID1 is a data read processing command from the storage element of the SDRAM 300 corresponding to the addresses B1, R1, and C1, as shown in FIG.

SDRAM300においては、メモリアクセス要求ID1の読み出し処理(第二サイクル)を行う前に、BANKアドレスB1、ROWアドレスR1の記憶領域に対して、バンクアクティベート処理が実行される(図10の第一サイクル)。つまり、SDRAMコマンド発行部10からは、読み出し処理コマンドの発行前に、バンクアクティベート処理コマンドが発行される。   In the SDRAM 300, the bank activation process is executed for the storage area of the BANK address B1 and the ROW address R1 before the memory access request ID1 is read (second cycle) (first cycle in FIG. 10). . That is, the SDRAM command issuing unit 10 issues a bank activate processing command before issuing a read processing command.

なお、このとき、リフレッシュカウンタ3のカウンタ値は、「51」である。したがって、当該カウンタ値「51」は、閾値設定部21に記憶されている第三の閾値「50」よりも大きいので、比較部22からは、「1」の信号が出力される。   At this time, the counter value of the refresh counter 3 is “51”. Therefore, since the counter value “51” is larger than the third threshold value “50” stored in the threshold setting unit 21, a signal “1” is output from the comparison unit 22.

さて、実施の形態1と同様に、リフレッシュカウンタ3のカウンタ値は、サイクル数が増加する度に、減少する。したがって、第二サイクル以降は、リフレッシュカウンタ3のカウンタ値は、第三の閾値以下となる。よって、比較部22からは、「0」の信号が出力される(図6の4行目)。   As in the first embodiment, the counter value of the refresh counter 3 decreases every time the number of cycles increases. Accordingly, after the second cycle, the counter value of the refresh counter 3 is equal to or less than the third threshold value. Therefore, a signal “0” is output from the comparison unit 22 (fourth line in FIG. 6).

第二、三サイクルには、SDRAMコマンド発行部10からは、該当するアドレスの記憶素子に対する読み出し処理コマンドが発行される。ここで、当該読み出しコマンドは、バスマスタ200から出力された、図9で示したメモリアクセス要求ID1,ID2に従ったものである。   In the second and third cycles, the SDRAM command issuing unit 10 issues a read processing command for the storage element at the corresponding address. Here, the read command is in accordance with the memory access requests ID1 and ID2 shown in FIG.

なお、第二、三サイクル(リフレッシュカウンタ3のカウンタ値は、それぞれ「50」および「49」である)では、アイドルサイクルの検出はされない。よって、第二、三サイクルは、ケースζに該当する。したがって、リフレッシュ要求生成部8は、リフレッシュ要求を生成しない(つまり、リフレッシュ要求生成部8は、「0」の信号を出力する)。   In the second and third cycles (the counter values of the refresh counter 3 are “50” and “49”, respectively), the idle cycle is not detected. Therefore, the second and third cycles correspond to case ζ. Therefore, the refresh request generator 8 does not generate a refresh request (that is, the refresh request generator 8 outputs a signal “0”).

次に、第四サイクルには、アイドルサイクル検出部23は、バスマスタ200からメモリアクセス要求が出力されていないこと、および、SDRAMコマンド発行部10からSDRAM300に対してメモリアクセス要求が発行されていないこと、を検出する。つまり、アイドルサイクル検出部23は、アイドルサイクルを検出する。   Next, in the fourth cycle, the idle cycle detection unit 23 does not output a memory access request from the bus master 200, and does not issue a memory access request to the SDRAM 300 from the SDRAM command issue unit 10. , Is detected. That is, the idle cycle detection unit 23 detects an idle cycle.

したがって、アイドルサイクル検出部23は、「1」の信号を出力し、リフレッシュ要求生成部8は、当該信号を受信する。   Therefore, the idle cycle detection unit 23 outputs a signal “1”, and the refresh request generation unit 8 receives the signal.

ところで、第四サイクルには、リフレッシュカウンタ3のカウンタ値は、「48」である。つまり、当該カウンタ値は、第三の閾値以下の条件を満たす。   By the way, in the fourth cycle, the counter value of the refresh counter 3 is “48”. That is, the counter value satisfies a condition equal to or smaller than the third threshold value.

以上より、第四サイクルはケースηに該当し、リフレッシュ要求生成部8は、リフレッシュ要求を生成する。つまり、リフレッシュ要求生成部8は、「1」の信号を出力する(図10参照)。   From the above, the fourth cycle corresponds to case η, and the refresh request generator 8 generates a refresh request. That is, the refresh request generator 8 outputs a signal “1” (see FIG. 10).

したがって、第四サイクルには、SDRAM300に対するリフレッシュ処理に先立って、現在アクティブ状態にある記憶領域(アドレスB1,R1)を非アクティブ状態とするために、SDRAMコマンド発行部10から、バンクプリチャージ処理コマンドが発行される。   Therefore, in the fourth cycle, prior to the refresh process for the SDRAM 300, the SDRAM command issuing unit 10 issues a bank precharge process command to deactivate the storage areas (addresses B1 and R1) that are currently active. Is issued.

そして、当該バンクプリチャージ処理コマンド発行後、第5サイクルには(リフレッシュカウンタ値は、「47」となる)、SDRAMコマンド発行部10は、リフレッシュ要求に応じて、SDRAM300に対するリフレッシュ処理コマンドを発行する(図10参照)。   Then, after issuing the bank precharge processing command, in the fifth cycle (the refresh counter value becomes “47”), the SDRAM command issuing unit 10 issues a refresh processing command to the SDRAM 300 in response to the refresh request. (See FIG. 10).

また、要求調停部9を介して出力されるリフレッシュ要求に応じて、リフレッシュカウンタ3は、現在のカウント値「47」に、平均リフレッシュ間隔設定部4に記憶されている平均リフレッシュ間隔値「10」を加算する(図6の第六サイクル)。   Further, in response to the refresh request output via the request arbitration unit 9, the refresh counter 3 sets the average refresh interval value “10” stored in the average refresh interval setting unit 4 to the current count value “47”. Are added (sixth cycle in FIG. 6).

したがって、第六サイクルでは、リフレッシュカウンタのカウント値「57」は、第三の閾値よりも大きくなるので、比較部22からは、「1」の信号が出力される。   Therefore, in the sixth cycle, the count value “57” of the refresh counter becomes larger than the third threshold value, and therefore the signal “1” is output from the comparison unit 22.

また、第六サイクルでは、メモリアクセス要求ID3の読み出し処理コマンドの発行(第七サイクル)前に、SDRAMコマンド発行部10は、BANKアドレスB1、ROWアドレスR1の記憶領域に対する、バンクアクティベート処理コマンドを発行する。   Also, in the sixth cycle, before issuing the memory access request ID3 read processing command (seventh cycle), the SDRAM command issuing unit 10 issues a bank activation processing command to the storage areas of the BANK address B1 and the ROW address R1. To do.

さて、第六サイクルから第十二サイクルまでは、リフレッシュカウンタ3のカウント値が、第三の閾値「50」よりも大きい。これは、上記ケースεの場合である。   Now, from the sixth cycle to the twelfth cycle, the count value of the refresh counter 3 is larger than the third threshold “50”. This is the case of the case ε.

したがって、第十一サイクルには、アイドルサイクル検出部23は、アイドルサイクルを検出するが、リフレッシュ要求生成部8は、リフレッシュ要求信号を出力しない(「0」の信号を出力し続ける)。   Therefore, in the eleventh cycle, the idle cycle detection unit 23 detects the idle cycle, but the refresh request generation unit 8 does not output the refresh request signal (continues to output the signal “0”).

よって、第六サイクルから第十二サイクルまでの期間は、アイドルサイクルの検出の有無に係らず、SDRAMコマンド発行部10からは、バスメモリ200から出力されるメモリアクセス要求ID3,4,5に従って、通常のデータ読み出し処理コマンド等が発行される(図6参照)。   Therefore, during the period from the sixth cycle to the twelfth cycle, the SDRAM command issuing unit 10 according to the memory access request IDs 3, 4, and 5 output from the bus memory 200 regardless of whether or not the idle cycle is detected. A normal data read processing command or the like is issued (see FIG. 6).

つまり、アクティブ状態にある記憶領域が、BANKアドレスBi、ROWアドレスRiであり、バスマスタ200から出力されたメモリアクセス要求が、BANKアドレスBi、ROWアドレスRiの記憶領域に対するものであるとする(すなわち、両BANK/ROWアドレスが完全に一致する場合)。   That is, the storage area in the active state is the BANK address Bi and the ROW address Ri, and the memory access request output from the bus master 200 is for the storage area of the BANK address Bi and the ROW address Ri (that is, Both BANK / ROW addresses match exactly).

このときは、バンクプリチャージ処理コマンドおよびバンクアクティベート処理コマンドの発行は行わず、SDRAMコマンド発行部10からは、当該メモリアクセス要求に従ったデータの読み出し等の処理コマンドが発行される。   At this time, the bank precharge processing command and the bank activation processing command are not issued, and the SDRAM command issuing unit 10 issues a processing command such as data read according to the memory access request.

また、アクティブ状態にある記憶領域が、BANKアドレスBi、ROWアドレスRiであり、バスマスタ200から出力されたメモリアクセス要求が、BANKアドレスBj、ROWアドレスRjの記憶領域に対するものであるとする(すなわち、両アドレスのうち、BANKアドレスまたはROWアドレスが不一致の場合)。   Further, assume that the storage areas in the active state are the BANK address Bi and the ROW address Ri, and the memory access request output from the bus master 200 is for the storage areas of the BANK address Bj and the ROW address Rj (that is, (If the BANK address or the ROW address do not match)

このときは、SDRAMコマンド発行部10は、バンクプリチャージ処理コマンド、その後のバンクアクティベート処理コマンドの発行を行う。そして、その後に、SDRAMコマンド発行部10は、当該メモリアクセス要求に従ったデータの読み出し等の処理コマンドを発行する。   At this time, the SDRAM command issuing unit 10 issues a bank precharge processing command and a subsequent bank activation processing command. After that, the SDRAM command issuing unit 10 issues a processing command such as data reading according to the memory access request.

なお、第十一サイクルには、バスマスタ200からのメモリアクセス要求が出力されなかったので、SDRAMコマンド発行部10は、コマンドの発行は行わない(アイドルサイクル)。図10では、「NOP」と表記されている。   In the eleventh cycle, since no memory access request is output from the bus master 200, the SDRAM command issuing unit 10 does not issue a command (idle cycle). In FIG. 10, “NOP” is indicated.

以上のように、本実施の形態に係るメモリ制御装置100は、ケースζ,ηのように、アイドルサイクルのタイミングを狙って、SDRAM300に対するリフレッシュ処理を実施している。したがって、下記の効果を有する。   As described above, the memory control device 100 according to the present embodiment performs the refresh process on the SDRAM 300 aiming at the idle cycle timing as in the cases ζ and η. Therefore, it has the following effects.

例えば、アイドルサイクルと異なるサイクルのときに、SDRAM300に対するリフレッシュ処理を実施したとする。この場合には、アイドルサイクル数N1とリフレッシュ処理に要するサイクル数N2(バンクプリチャージ処理に要するサイクル数+リフレッシュ処理に要するサイクル数+バンクアクティベート処理に要するサイクル数)とが必要である。つまり、合計N1+N2のサイクル数を要する。   For example, it is assumed that the refresh process for the SDRAM 300 is performed in a cycle different from the idle cycle. In this case, the number of idle cycles N1 and the number of cycles N2 required for refresh processing (number of cycles required for bank precharge processing + number of cycles required for refresh processing + number of cycles required for bank activation processing) are required. That is, a total of N1 + N2 cycles are required.

しかし、本実施の形態のようにアイドルサイクルを利用して、当該アイドルサイクルのときにリフレッシュ処理を施すことにより、アイドルサイクル数N1を削減できる。つまり、合計のN2のサイクル数だけで良くなる。   However, the idle cycle number N1 can be reduced by using the idle cycle as in the present embodiment and performing the refresh process during the idle cycle. That is, only the total number of N2 cycles is sufficient.

したがって、本実施の形態に係るメモリ制御装置100を採用することにより、SDRAM300に対するリフレッシュ処理が施されたとしても、実効的なデータ転送効率の損失を最小限にすることができる。   Therefore, by adopting memory control device 100 according to the present embodiment, even if refresh processing is performed on SDRAM 300, loss of effective data transfer efficiency can be minimized.

また、本実施の形態に係るメモリ制御装置100おいても、平均リフレッシュ間隔値を保持する平均リフレッシュ間隔設定部4を有している。そして、リフレッシュ処理が実施された場合には、リフレッシュカウンタ3のカウンタ値に平均リフレッシュ間隔値が加算される。   The memory control device 100 according to the present embodiment also has an average refresh interval setting unit 4 that holds an average refresh interval value. When the refresh process is performed, the average refresh interval value is added to the counter value of the refresh counter 3.

したがって、実施の形態1と同様に、リフレッシュ処理の間隔は一定になることはないが、長期的に見た場合には、リフレッシュ処理の平均的な間隔は、平均リフレッシュ間隔値とほぼ等しくすることができる。   Therefore, as in the first embodiment, the refresh processing interval does not become constant, but when viewed in the long term, the average refresh processing interval should be approximately equal to the average refresh interval value. Can do.

また、本実施の形態係るメモリ制御装置100は、第三の閾値とリフレッシュカウンタ3のカウント値とを比較する比較部22を有している。そして、比較部22の比較の結果、カウンタ値が第三の閾値より大きいときには、リフレッシュ要求生成部8は、リフレッシュ要求を生成することはない。   Further, the memory control device 100 according to the present embodiment includes a comparison unit 22 that compares the third threshold value with the count value of the refresh counter 3. Then, as a result of the comparison by the comparison unit 22, when the counter value is larger than the third threshold value, the refresh request generation unit 8 does not generate a refresh request.

第三の閾値は、あまりに低く設定しすぎると、リフレッシュ処理が必要であるにもかかわらず、されない可能性が高くなる。これに対して、第三の閾値を、あまりに高く設定しすぎると、不必要なリフレッシュ処理が頻繁に行われる可能性がある。   If the third threshold value is set too low, there is a high possibility that the third threshold value will not be executed although the refresh process is required. On the other hand, if the third threshold is set too high, unnecessary refresh processing may be frequently performed.

したがって、第三の閾値を経験則等に基いて適正な値に設定することにより、SDRAM300内に記憶されている電荷量が十分であり、リフレッシュ処理を行う必要がない場合での、無用なSDRAM300のリフレッシュ処理を防止することができる。   Accordingly, by setting the third threshold value to an appropriate value based on an empirical rule or the like, useless SDRAM 300 when the amount of charge stored in SDRAM 300 is sufficient and there is no need to perform refresh processing. The refresh process can be prevented.

また、本実施の形態に係るメモリ制御装置100においても、要求調停部9、SDRAMコマンド発行部10を有している。したがって、実施の形態1で説明した効果と同様の効果を、本実施の形態においても得ることができる。   The memory control device 100 according to the present embodiment also includes a request arbitration unit 9 and an SDRAM command issue unit 10. Therefore, the effect similar to the effect demonstrated in Embodiment 1 can be acquired also in this Embodiment.

なお、上記では、SDRAMコマンド発行部10は、バンクを区別せずにアクティブROW情報ARの管理(保持)を行っていた。つまり、アクティブROW情報AR内のBANKアドレス、ROWアドレスと、メモリアクセス要求内のBANKアドレス、ROWアドレスとが、各々同じときには、バンクプリチャージ・バンクアクティベート処理を実施することは無かった。これは、メモリアクセスの効率化のための制御である。   In the above description, the SDRAM command issuing unit 10 manages (holds) the active ROW information AR without distinguishing between banks. That is, when the BANK address and ROW address in the active ROW information AR are the same as the BANK address and ROW address in the memory access request, the bank precharge / bank activation process is not performed. This is control for improving the efficiency of memory access.

一方、実施の形態1で説明したように、SDRAMコマンド発行部10を、バンクを区別してアクティブROW情報ARを管理(保持)する構成としても良い。つまり、アクティブROW情報内のROWアドレスと、メモリアクセス要求内のROWアドレスとが同じときに、バンクプリチャージ・バンクアクティベート処理を不実施としても良い。これにより、前者の場合と比べて、よりメモリアクセスの効率化を図ることができる。   On the other hand, as described in the first embodiment, the SDRAM command issuing unit 10 may be configured to manage (hold) the active ROW information AR by distinguishing banks. In other words, when the ROW address in the active ROW information is the same as the ROW address in the memory access request, the bank precharge / bank activation process may not be performed. As a result, the memory access can be made more efficient than in the former case.

<実施の形態3>
本実施の形態に係るメモリ制御装置は、実施の形態1と実施の形態2との組合せである。つまり、本実施の形態に係るメモリ制御装置は、バンクアクティベート処理が必要なタイミングと、バスマスタからのメモリアクセス要求が無いアイドルサイクルのタイミングとを狙って、SDRAMに対してリフレッシュ処理を施すことを特徴とする。図11は、本実施の形態に係るメモリ制御装置の構成を示すブロック図である。
<Embodiment 3>
The memory control device according to the present embodiment is a combination of the first embodiment and the second embodiment. In other words, the memory control device according to the present embodiment performs a refresh process on the SDRAM with the aim of the timing when the bank activation process is necessary and the timing of the idle cycle where there is no memory access request from the bus master. And FIG. 11 is a block diagram showing a configuration of the memory control device according to the present embodiment.

本実施の形態に係るメモリ制御装置100(図11)は、実施の形態1に係るメモリ制御装置100(図4)に、実施の形態2に係るメモリ制御装置100(図8)が有していた、アイドルサイクル検出部23と閾値設定部(本実施の形態では、第三の閾値設定部と称する)21と比較部(本実施の形態では、第三の比較部と称する)22とを加えたものである。   The memory control device 100 (FIG. 11) according to the present embodiment has the memory control device 100 (FIG. 8) according to the second embodiment in addition to the memory control device 100 (FIG. 4) according to the first embodiment. Further, an idle cycle detection unit 23, a threshold setting unit (referred to as a third threshold setting unit in the present embodiment) 21 and a comparison unit (referred to as a third comparison unit in the present embodiment) 22 are added. It is a thing.

その他の回路および構成等は、実施の形態1,2と同様なので、ここでの説明は省略する。   Other circuits, configurations, and the like are the same as those in the first and second embodiments, and a description thereof is omitted here.

また、図11には、実施の形態1,2と同様に、メモリ制御装置100の他に、バスマスタ200およびSDRAM300も図示している。バスマスタ200およびSDRAM300の説明は、実施の形態1,2の通りである。   FIG. 11 also shows the bus master 200 and the SDRAM 300 in addition to the memory control device 100 as in the first and second embodiments. The description of bus master 200 and SDRAM 300 is as in the first and second embodiments.

本実施の形態に係るSDRAMコマンド発行部10では、図11に示すように、4つのバンク毎にアクティブROW情報BARを管理(保持)している。つまり、メモリアクセス要求内のバンクアドレスに対応したアクティブROW情報内のROWアドレスと、メモリアクセス要求内のROWアドレスとが同じときには、バンクプリチャージ・バンクアクティベート処理を実施しない。   As shown in FIG. 11, the SDRAM command issuing unit 10 according to the present embodiment manages (holds) the active ROW information BAR for each of the four banks. That is, when the ROW address in the active ROW information corresponding to the bank address in the memory access request is the same as the ROW address in the memory access request, the bank precharge / bank activation process is not performed.

本実施の形態に係るリフレッシュ要求生成部8の論理を、図12を基に説明する。   The logic of the refresh request generation unit 8 according to this embodiment will be described with reference to FIG.

図12において、縦軸はリフレッシュカウンタ3のカウンタ値である。また、横軸は、サイクル数である。また、第一、二、三の閾値は、各々第一の閾値設定部1、第二の閾値設定部2および第三の閾値設定部21に設定されている閾値である。   In FIG. 12, the vertical axis represents the counter value of the refresh counter 3. The horizontal axis represents the number of cycles. The first, second, and third threshold values are threshold values set in the first threshold value setting unit 1, the second threshold value setting unit 2, and the third threshold value setting unit 21, respectively.

また、「丸印」は、メモリアクセス要求のBANK・ROWアドレスとアクティブROW情報のBANK・ROWアドレスとが、それぞれ一致する場合である。「星印」は、モリアクセス要求のBANKアドレスまたはROWアドレスが、アクティブROW情報のBANKアドレスまたはROWアドレスと不一致の場合である。また、「四角印」は、アイドルサイクルを検出した場合である。また、「矢印」は、リフレッシュ処理後の平均リフレッシュ間隔値の加算を示す。   “Circle” indicates a case where the BANK / ROW address of the memory access request and the BANK / ROW address of the active ROW information match. “Star” is a case where the BANK address or ROW address of the Mori access request does not match the BANK address or ROW address of the active ROW information. The “square mark” is a case where an idle cycle is detected. An “arrow” indicates addition of an average refresh interval value after the refresh process.

リフレッシュカウンタ3のカウンタ値が、第三の閾値よりも大きいときには、リフレッシュ要求生成部8は、アイドルサイクルの検出部23の結果およびBANK/ROWアドレス比較部7の結果に関わらず、リフレッシュ要求信号を出力しない(「0」の信号を出力する)。   When the counter value of the refresh counter 3 is larger than the third threshold value, the refresh request generator 8 outputs the refresh request signal regardless of the result of the idle cycle detector 23 and the result of the BANK / ROW address comparator 7. Does not output (outputs a signal of “0”).

また、リフレッシュカウンタ3のカウンタ値が、第三の閾値以下で、第二の閾値よりも大きいときには、もし、アイドルサイクルサイクル検出部23がアイドルサイクルを検出すれば、リフレッシュ要求生成部8は、リフレッシュ要求信号を出力する(「1」の信号を出力する)。   When the counter value of the refresh counter 3 is equal to or smaller than the third threshold and greater than the second threshold, if the idle cycle detection unit 23 detects an idle cycle, the refresh request generator 8 A request signal is output (a signal of “1” is output).

しかし、アイドルサイクルサイクル検出部23がアイドルサイクルを検出しない場合には、リフレッシュ要求生成部8は、BANK/ROWアドレス比較部7の結果に関わらず、リフレッシュ要求信号を出力しない(「0」の信号を出力する)。   However, when the idle cycle cycle detection unit 23 does not detect an idle cycle, the refresh request generation unit 8 does not output a refresh request signal (“0” signal) regardless of the result of the BANK / ROW address comparison unit 7. Is output).

また、リフレッシュカウンタ値が、第二の閾値以下で、第一の閾値よりも大きいときには、もし、アイドルサイクルサイクル検出部23がアイドルサイクルを検出した場合、または、BANK/ROWアドレス比較部7が、アクティブROW情報のBANKアドレス・ROWアドレスとメモリアクセス要求のBANKアドレス・ROWアドレスとの不一致を確認した場合には、それぞれの場合において、リフレッシュ要求生成部8は、リフレッシュ要求信号を出力する(「1」の信号を出力する)。   When the refresh counter value is equal to or smaller than the second threshold and greater than the first threshold, if the idle cycle cycle detection unit 23 detects an idle cycle, or the BANK / ROW address comparison unit 7 When a mismatch between the BANK address / ROW address of the active ROW information and the BANK address / ROW address of the memory access request is confirmed, in each case, the refresh request generator 8 outputs a refresh request signal (“1 ”Signal).

しかし、アイドルサイクルサイクル検出部23がアイドルサイクルを検出しない場合、および、BANK/ROWアドレス比較部7が、アクティブROW情報のBANKアドレス・ROWアドレスとメモリアクセス要求のBANKアドレス・ROWアドレスとの一致を確認した場合には、リフレッシュ要求生成部8は、リフレッシュ要求信号を出力しない(「0」の信号を出力する)。   However, when the idle cycle detection unit 23 does not detect an idle cycle, the BANK / ROW address comparison unit 7 determines that the BANK address / ROW address of the active ROW information matches the BANK address / ROW address of the memory access request. If confirmed, the refresh request generator 8 does not output a refresh request signal (outputs a signal of “0”).

また、リフレッシュカウンタ値が、第一の閾値以下のときには、リフレッシュ要求生成部8は、アイドルサイクルサイクル検出部23の検出結果およびBANK/ROWアドレス比較部7の比較結果に関わらず、強制的にリフレッシュ要求信号を出力する(「1」の信号を出力する)。   When the refresh counter value is equal to or smaller than the first threshold, the refresh request generator 8 forcibly refreshes regardless of the detection result of the idle cycle cycle detector 23 and the comparison result of the BANK / ROW address comparator 7. A request signal is output (a signal of “1” is output).

以上のように、本実施の形態に係るメモリ制御装置100は、実施の形態1,2に係るメモリ制御装置100を組み合わせているので、実施の形態1,2と同様な効果を奏することができる。   As described above, since the memory control device 100 according to the present embodiment is combined with the memory control device 100 according to the first and second embodiments, the same effects as the first and second embodiments can be obtained. .

メモリアクセスシーケンス例を示す図である。It is a figure which shows a memory access sequence example. データの転送効率の悪い例のコマンドシーケンスを示す図である。It is a figure which shows the command sequence of an example with bad data transfer efficiency. データの転送効率の良い例のコマンドシーケンスを示す図である。It is a figure which shows the command sequence of an example with the sufficient data transfer efficiency. 実施の形態1に係るメモリ制御装置の構成を示す図である。1 is a diagram illustrating a configuration of a memory control device according to a first embodiment. 実施の形態1に係るメモリ制御装置の動作を説明するためのメモリアクセスシーケンス例を示す図である。6 is a diagram illustrating an example of a memory access sequence for explaining an operation of the memory control device according to the first embodiment; FIG. 実施の形態1に係るメモリ制御装置の動作を説明するための図である。6 is a diagram for explaining an operation of the memory control device according to the first embodiment; FIG. リフレッシュカウンタのカウンタ値の変化の様子を示す図である。It is a figure which shows the mode of the change of the counter value of a refresh counter. 実施の形態2に係るメモリ制御装置の構成を示す図である。FIG. 4 is a diagram illustrating a configuration of a memory control device according to a second embodiment. 実施の形態2に係るメモリ制御装置の動作を説明するためのメモリアクセスシーケンス例を示す図である。FIG. 10 is a diagram showing a memory access sequence example for explaining the operation of the memory control device according to the second embodiment. 実施の形態2に係るメモリ制御装置の動作を説明するための図である。FIG. 10 is a diagram for explaining the operation of the memory control device according to the second embodiment. 実施の形態3に係るメモリ制御装置の構成を示す図である。FIG. 10 is a diagram illustrating a configuration of a memory control device according to a third embodiment. リフレッシュカウンタのカウンタ値の変化の様子を示す図である。It is a figure which shows the mode of the change of the counter value of a refresh counter.

符号の説明Explanation of symbols

1 第一の閾値設定部、2 第二の閾値設定部、3 リフレッシュカウンタ、4 平均リフレッシュ間隔設定部、5 第一の比較部、6 第二の比較部、7 BANK/ROWアドレス比較部、8 リフレッシュ要求生成部、9 要求調停部、10 SDRAMコマンド発行部、21 (第三の)閾値設定部、22 (第三の)比較部、23 アイドルサイクル検出部、100 メモリ制御装置、200 バスマスタ、300 SDRAM。
DESCRIPTION OF SYMBOLS 1 1st threshold value setting part, 2nd 2nd threshold value setting part, 3 refresh counter, 4 average refresh space | interval setting part, 5 1st comparison part, 6 2nd comparison part, 7 BANK / ROW address comparison part, 8 Refresh request generation unit, 9 request arbitration unit, 10 SDRAM command issuance unit, 21 (third) threshold setting unit, 22 (third) comparison unit, 23 idle cycle detection unit, 100 memory controller, 200 bus master, 300 SDRAM.

Claims (15)

メモリのアクティブ状況を示すアクティブ情報内の第一のアドレスと、メモリアクセス要求内の第二のアドレスとを比較するアドレス比較部と、
前記アドレス比較部の比較結果に応じて、メモリに対するリフレッシュ要求を生成するリフレッシュ要求生成部とを、
備えることを特徴とするメモリ制御装置。
An address comparison unit that compares the first address in the active information indicating the active state of the memory with the second address in the memory access request;
A refresh request generation unit that generates a refresh request for the memory according to the comparison result of the address comparison unit,
A memory control device comprising:
メモリに対するアクセスがないアイドルサイクルを検出するアイドルサイクル検出部と、
前記アイドルサイクル検出部のアイドルサイクルの検出に応じて、メモリに対するリフレッシュ要求を生成するリフレッシュ要求生成部とを、
備えることを特徴とするメモリ制御装置。
An idle cycle detector for detecting an idle cycle in which no memory is accessed;
A refresh request generator for generating a refresh request for the memory in response to detection of an idle cycle of the idle cycle detector;
A memory control device comprising:
平均リフレッシュ間隔値を保持する平均リフレッシュ間隔設定部と、
サイクル数が増加するに連れてカウント値を減少させ、前記リフレッシュ要求に基いて、前記メモリのリフレッシュ処理が行われたときは、前記カウンタ値に前記平均リフレッシュ間隔値を加算されるカウンタと、をさらに備えている、
ことを特徴とする請求項1または請求項2に記載のメモリ制御装置。
An average refresh interval setting unit for holding an average refresh interval value;
A counter that decreases the count value as the number of cycles increases, and adds the average refresh interval value to the counter value when the refresh process of the memory is performed based on the refresh request; In addition,
3. The memory control device according to claim 1, wherein the memory control device is a memory control device.
所定の閾値を保持する閾値設定部と、
前記所定の閾値と前記カウンタのカウント値とを比較する比較部と、をさらに備えており、
前記リフレッシュ要求生成部は、
前記アドレス比較部の比較結果と、前記比較部の比較結果とに応じて、リフレッシュ要求を生成する、
ことを特徴とする請求項1に記載のメモリ制御装置。
A threshold setting unit for holding a predetermined threshold;
A comparison unit that compares the predetermined threshold value with the count value of the counter, and
The refresh request generation unit
Generating a refresh request according to the comparison result of the address comparison unit and the comparison result of the comparison unit;
The memory control device according to claim 1.
前記閾値設定部は、
第一の閾値を保持する第一の閾値設定部と、
前記第一の閾値より大きな値の第二の閾値を保持する第二の閾値設定部と、を備えており、
前記比較部は、
第一の閾値と前記カウント値とを比較する第一の比較部と、
第二の閾値と前記カウント値とを比較する第二の比較部と、を備えている、
ことを特徴とする請求項4に記載のメモリ制御装置。
The threshold setting unit includes:
A first threshold value setting unit for holding a first threshold value;
A second threshold value setting unit that holds a second threshold value that is larger than the first threshold value,
The comparison unit includes:
A first comparison unit for comparing a first threshold value and the count value;
A second comparison unit that compares a second threshold value and the count value,
The memory control device according to claim 4.
前記リフレッシュ要求生成部は、
前記第二の比較部での比較の結果、前記カウンタ値が第二の閾値よりも大きいときは、リフレッシュ要求は生成しない、
ことを特徴とする請求項5に記載のメモリ制御装置。
The refresh request generation unit
As a result of the comparison in the second comparison unit, when the counter value is larger than the second threshold value, a refresh request is not generated.
The memory control device according to claim 5.
前記リフレッシュ要求生成部は、
前記第二の比較部での比較の結果、前記カウンタ値が第二の閾値以下であり、かつ、前記第一の比較部での比較の結果、前記カウンタ値が第一の閾値よりも大きいときには、前記アドレス比較部での比較の結果、前記第一のアドレスのBANKアドレスおよびROWアドレスが、前記第二のアドレスのBANKアドレスおよびROWアドレスと、それぞれ一致する場合には、リフレッシュ要求は生成せず、
前記第二の比較部での比較の結果、前記カウンタ値が第二の閾値以下であり、かつ、前記第一の比較部での比較の結果、前記カウンタ値が第一の閾値よりも大きいときには、前記アドレス比較部での比較の結果、前記第一のアドレスのBANKアドレスまたはROWアドレスが、前記第二のアドレスのBANKアドレスまたはROWアドレスと、一致しない場合には、リフレッシュ要求を生成する、
ことを特徴とする請求項5または請求項6に記載のメモリ制御装置。
The refresh request generation unit
When the counter value is less than or equal to a second threshold value as a result of comparison in the second comparison unit, and the counter value is greater than the first threshold value as a result of comparison in the first comparison unit If the BANK address and ROW address of the first address match the BANK address and ROW address of the second address, respectively, as a result of the comparison by the address comparison unit, no refresh request is generated. ,
When the counter value is less than or equal to a second threshold value as a result of comparison in the second comparison unit, and the counter value is greater than the first threshold value as a result of comparison in the first comparison unit If the BANK address or ROW address of the first address does not match the BANK address or ROW address of the second address as a result of the comparison by the address comparison unit, a refresh request is generated.
The memory control device according to claim 5, wherein the memory control device is a memory control device.
前記リフレッシュ要求生成部は、
前記第一の比較部での比較の結果、前記カウンタ値が第一の閾値以下のときは、リフレッシュ要求を生成する、
ことを特徴とする請求項5ないし請求項7のいずれかに記載のメモリ制御装置。
The refresh request generation unit
As a result of the comparison in the first comparison unit, when the counter value is less than or equal to the first threshold, a refresh request is generated.
8. The memory control device according to claim 5, wherein the memory control device is a memory control device.
所定の閾値を保持する閾値設定部と、
前記所定の閾値と前記カウンタのカウント値とを比較する比較部と、をさらに備えており、
前記リフレッシュ要求生成部は、
前記アイドルサイクル検出部のアイドルサイクルの検出と、前記比較部の比較結果とに応じて、リフレッシュ要求を生成する、
ことを特徴とする請求項2に記載のメモリ制御装置。
A threshold setting unit for holding a predetermined threshold;
A comparison unit that compares the predetermined threshold value with the count value of the counter, and
The refresh request generation unit
In response to detection of an idle cycle of the idle cycle detection unit and a comparison result of the comparison unit, a refresh request is generated.
The memory control device according to claim 2.
前記リフレッシュ要求生成部は、
前記比較部での比較の結果、前記カウンタ値が前記所定の閾値よりも大きいときは、リフレッシュ要求は生成しない、
ことを特徴とする請求項9に記載のメモリ制御装置。
The refresh request generation unit
As a result of the comparison in the comparison unit, when the counter value is larger than the predetermined threshold, a refresh request is not generated.
The memory control device according to claim 9.
前記リフレッシュ要求生成部は、
前記比較部での比較の結果、前記カウンタ値が前記所定の閾値以下であり、かつ、前記アイドルサイクル検出部が前記アイドルサイクルを検出したときには、前記リフレッシュ要求を生成し、
前記比較部での比較の結果、前記カウンタ値が前記所定の閾値以下であり、かつ、前記アイドルサイクル検出部が前記アイドルサイクルを検出しないときには、前記リフレッシュ要求を生成しない、
ことを特徴とする請求項9または請求項10に記載のメモリ制御装置。
The refresh request generation unit
As a result of the comparison in the comparison unit, when the counter value is equal to or less than the predetermined threshold value and the idle cycle detection unit detects the idle cycle, the refresh request is generated,
As a result of the comparison in the comparison unit, when the counter value is equal to or less than the predetermined threshold and the idle cycle detection unit does not detect the idle cycle, the refresh request is not generated.
The memory control device according to claim 9 or 10, wherein
受付け順に前記メモリに対するコマンドシーケンスを発行するコマンド発行部と、
前記メモリアクセス要求と、前記リフレッシュ要求とを調停し、前記リフレッシュ要求を優先して、前記コマンド発行部に対して出力する要求調停部と、をさらに備えている、
ことを特徴とする請求項1ないし請求項11のいずれかに記載のメモリ制御装置。
A command issuing unit for issuing a command sequence for the memory in the order of acceptance;
A request arbitration unit that arbitrates the memory access request and the refresh request, and prioritizes the refresh request and outputs the request to the command issuing unit;
12. The memory control device according to claim 1, wherein the memory control device is a memory control device.
前記コマンド発行部は、
前記アクティブROW情報を内部状態として保持している、
ことを特徴とする請求項12に記載のメモリ制御装置。
The command issuing unit
Holding the active ROW information as an internal state;
The memory control device according to claim 12.
前記メモリは、少なくと2以上のバンクから構成されており、
前記コマンド発行部は、
前記バンク毎に、前記アクティブROW情報を内部情報として保持している、
ことを特徴とする請求項13に記載のメモリ制御装置。
The memory is composed of at least two banks,
The command issuing unit
The active ROW information is held as internal information for each bank.
The memory control device according to claim 13.
メモリのアクティブ状況を示すアクティブ情報内の第一のアドレスと、メモリアクセス要求内の第二のアドレスとを比較するアドレス比較部と、
前記メモリに対するアクセスがないアイドルサイクルを検出するアイドルサイクル検出部と、
前記アドレス比較部の比較結果と、前記アイドルサイクル検出部のアイドルサイクルの検出とに応じて、メモリに対するリフレッシュ要求を生成するリフレッシュ要求生成部とを、
備えることを特徴とするメモリ制御装置。
An address comparison unit that compares the first address in the active information indicating the active state of the memory with the second address in the memory access request;
An idle cycle detector for detecting an idle cycle without access to the memory;
A refresh request generator for generating a refresh request for the memory in response to a comparison result of the address comparator and detection of an idle cycle of the idle cycle detector;
A memory control device comprising:
JP2004176511A 2004-06-15 2004-06-15 Memory control device Expired - Fee Related JP4463019B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004176511A JP4463019B2 (en) 2004-06-15 2004-06-15 Memory control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004176511A JP4463019B2 (en) 2004-06-15 2004-06-15 Memory control device

Publications (2)

Publication Number Publication Date
JP2006004464A true JP2006004464A (en) 2006-01-05
JP4463019B2 JP4463019B2 (en) 2010-05-12

Family

ID=35772757

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004176511A Expired - Fee Related JP4463019B2 (en) 2004-06-15 2004-06-15 Memory control device

Country Status (1)

Country Link
JP (1) JP4463019B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009157549A (en) * 2007-12-26 2009-07-16 Yokogawa Electric Corp SDRAM refresh control device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009157549A (en) * 2007-12-26 2009-07-16 Yokogawa Electric Corp SDRAM refresh control device

Also Published As

Publication number Publication date
JP4463019B2 (en) 2010-05-12

Similar Documents

Publication Publication Date Title
US9293188B2 (en) Memory and memory controller for high reliability operation and method
CN115516563B (en) Refresh management for DRAM
US5889714A (en) Adaptive precharge management for synchronous DRAM
JP6730453B2 (en) Fine grain refresh
US9281046B2 (en) Data processor with memory controller for high reliability operation and method
US9418723B2 (en) Techniques to reduce memory cell refreshes for a memory device
JP6783824B2 (en) Timing control in quantum memory system
JP7749662B2 (en) DRAM refresh management list
KR100685547B1 (en) Memory control system and memory bank refresh method
CN101981548B (en) Memory throughput increase via fine granularity of precharge management
JP2019520640A (en) Self-refresh state machine MOP array
US10430113B2 (en) Memory control circuit and memory control method
CN114077384A (en) Memory device and method for controlling refresh operation of memory device
US9514800B1 (en) DRAM and self-refresh method
JP2003007054A (en) Semiconductor storage device
TW201917558A (en) Minimizing performance degradation due to refresh operations in memory sub-systems
US7894290B2 (en) Method and apparatus for performing internal hidden refreshes while latching read/write commands, address and data information for later operation
US7093067B2 (en) DRAM architecture enabling refresh and access operations in the same bank
US10216658B2 (en) Refreshing of dynamic random access memory
CN101038783B (en) Semiconductor memory, memory system, and method of operating the memory system
US7778103B2 (en) Semiconductor memory device for independently selecting mode of memory bank and method of controlling thereof
JP4463019B2 (en) Memory control device
US12488823B2 (en) Memory device and operation method thereof
KR20110131634A (en) Bank Group Refresh Control
JP5861553B2 (en) MEMORY CONTROL METHOD, MEMORY CONTROLLER, AND ELECTRONIC DEVICE

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070508

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090818

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091007

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20091007

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20100216

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100216

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130226

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130226

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140226

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees