JP2007108996A - Memory device and memory control method - Google Patents

Memory device and memory control method Download PDF

Info

Publication number
JP2007108996A
JP2007108996A JP2005298992A JP2005298992A JP2007108996A JP 2007108996 A JP2007108996 A JP 2007108996A JP 2005298992 A JP2005298992 A JP 2005298992A JP 2005298992 A JP2005298992 A JP 2005298992A JP 2007108996 A JP2007108996 A JP 2007108996A
Authority
JP
Japan
Prior art keywords
write
memory
request
peak
read
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
JP2005298992A
Other languages
Japanese (ja)
Other versions
JP4699858B2 (en
Inventor
Yoshio Mizuyama
善雄 水山
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2005298992A priority Critical patent/JP4699858B2/en
Publication of JP2007108996A publication Critical patent/JP2007108996A/en
Application granted granted Critical
Publication of JP4699858B2 publication Critical patent/JP4699858B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a memory device and a memory control method for managing the peak of a read request or a write request, and for canceling peak excess. <P>SOLUTION: This memory device is provided with a memory; a module for outputting a write request or a read request; a memory controller for controlling the memory and a buffer. The memory controller is provided with a queue for storing the read request or write request of the module; a peak management part for monitoring whether or not the read request or the write request stored in the queue exceeds a preliminarily set peak value; and an arbiter for performing arbitration to the read request or the write request when the peak excess is not detected by the peak management part, and for making the buffer write the write data based on the write request stored in the queue when the peak excess is detected by the peak management part. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、リード要求またはライト要求を制御するメモリ装置およびメモリ制御方法に関し、より詳しくは、リード要求またはライト要求のピークを管理して、ピーク超過を解消するメモリ装置およびメモリ制御方法に関する。   The present invention relates to a memory device and a memory control method for controlling a read request or a write request, and more particularly, to a memory device and a memory control method for managing a peak of a read request or a write request and eliminating a peak excess.

パーソナルコンピュータ(以下、パソコン)やデジタル複写機(いわゆる、MFP(Multi Function Peripheral))を初めとして、多くの電子機器は、記憶手段としてSDRAM(Synchronous Dynamic RAM)、高速アクセスが可能なDDR−SDRAM(Double Data Rate SDRAM)のようなDRAMおよびSRAMやフラッシュメモリを使用する。これらメモリは、仕様、性能によってリード要求またはライト要求の帯域が決まっており、その帯域以上にリード要求またはライト要求が出力されると、必要な時間内に処理することができない。このためメモリは、その前段に備えられるバッファの容量を大きくして、ライト要求が一時に大量に発生しないように吸収するか、リード要求が大量に発生しないようリード要求を抑えなければならない。しかし、ライト要求対策のためにバッファ容量を大きくすることは、大容量バッファを必要とし、望ましくない。またリード対策のためにリード要求を抑える場合は、リード要求を発生するモジュールの動作を制限することになり、望ましくない。   Many electronic devices such as personal computers (hereinafter referred to as personal computers) and digital copying machines (so-called MFP (Multi Function Peripheral)) have SDRAM (Synchronous Dynamic RAM) as storage means and DDR-SDRAM (high-speed access). DRAM and SRAM such as Double Data Rate SDRAM and flash memory are used. In these memories, the bandwidth of the read request or write request is determined depending on the specification and performance, and if a read request or write request is output beyond that bandwidth, it cannot be processed within the required time. For this reason, the memory has to increase the capacity of the buffer provided in the preceding stage so as to absorb a large number of write requests at a time, or suppress the read requests so that a large number of read requests do not occur. However, increasing the buffer capacity as a countermeasure against the write request requires a large-capacity buffer and is not desirable. Further, when the read request is suppressed for the read countermeasure, the operation of the module that generates the read request is restricted, which is not desirable.

DDR−SDRAMのメモリ制御装置が、例えば特許文献1に開示されている。
特許文献1は、複数のDDR−SDRAMを制御するメモリ制御部が、読出しDMAコントローラと、書込みDMAコントローラと、セルフリフレッシュ制御部と、これらからの要求に対するアービトレーションを行うメモリアービタとを有し、メモリアービタは読出しDMAコントローラ及び書込みDMAコントローラが複数の要求信号を発した場合、それらを調停して、それぞれの要求を満たすように制御するものである。更にこの特許文献1は、DDR−SDRAMが省エネルギーモードから復帰する場合のDMA転送を迅速にするために、読出しDMAコントローラから次回アクセス予定の次回アドレスを出力して、メモリアービタに入力することにより、次回アドレスされる対象メモリに対してはセルフリフレッシュを実行せず、それ以外の対象外メモリセルに対してのみセルフリフレッシュを実行する技術を開示している。
A memory control device for a DDR-SDRAM is disclosed in, for example, Patent Document 1.
In Patent Document 1, a memory control unit that controls a plurality of DDR-SDRAMs includes a read DMA controller, a write DMA controller, a self-refresh control unit, and a memory arbiter that performs arbitration for a request from these, When the read DMA controller and the write DMA controller issue a plurality of request signals, the arbiter arbitrates them and controls to satisfy each request. Furthermore, in this Patent Document 1, in order to speed up the DMA transfer when the DDR-SDRAM returns from the energy saving mode, the next address scheduled to be accessed next time is output from the read DMA controller and input to the memory arbiter. A technique is disclosed in which self-refresh is not executed for a target memory to be addressed next time, and self-refresh is executed only for other non-target memory cells.

また、VCSDRAM(virtual channel synchronous DRAM)の制御方法が特許文献2に開示されている。特許文献2は、VCSDRAMが、内部に複数の高速レジスタ(バーチャルチャネル、「チャネル」と言う)を持ち、メモリ外部からのリード・ライト動作はフォアグランド処理としてチャネルとの間で直接行い、一方、メモリセルーチャネル間のデータ転送やメモリセルのプリチャージ、リフレッシュなどのメモリの内部動作はバックグランド処理として行うことにより、フォアグランド処理とバックグランド処理とを並行して独立した制御を可能にする技術を開示している。更に特許文献2では、フォアグランド動作とバックグランド動作を分離し、バックグランド動作発生時には優先的にバックグランド動作を実施させることにより、コマンド実行順序の最適化が実施され、VCSDRAMの転送レートを低下させないようにする技術を示している。   A control method for a VCSDRAM (virtual channel synchronous DRAM) is disclosed in Patent Document 2. According to Patent Document 2, a VCSRAM has a plurality of high-speed registers (virtual channels, referred to as “channels”), and read / write operations from the outside of the memory are directly performed between the channels as foreground processing, Technology that enables independent control of foreground processing and background processing in parallel by performing internal memory operations such as data transfer between memory cells and channels, memory cell precharge, and refresh as background processing. Is disclosed. Further, in Patent Document 2, the foreground operation and the background operation are separated, and the background operation is preferentially performed when the background operation occurs, so that the command execution order is optimized and the transfer rate of the VCSDRAM is lowered. It shows the technology to prevent it.

また特許文献3は、メモリとSCSIインターフェース間の処理速度に比べ、メモリと光磁気ディスク間の処理速度が遅いため、記録データ量がメモリの容量を超過したとき、予備のメモリに超過データを一時的に蓄え、その後の空き時間にメモリに転送する技術を開示している。
特開2004−102808号公報 特開2002−116950号公報 特開平07−295759号公報
In Patent Document 3, since the processing speed between the memory and the magneto-optical disk is slower than the processing speed between the memory and the SCSI interface, when the amount of recording data exceeds the capacity of the memory, the excess data is temporarily stored in the spare memory. A technique is disclosed in which the data is stored in the memory and transferred to the memory in the free time thereafter.
JP 2004-102808 A JP 2002-116950 A Japanese Patent Application Laid-Open No. 07-295759

特許文献1によれば、メモリアービタが読出しDMAコントローラと書込みDMAコントローラの複数の要求をそれぞれ満たすように調停を行い、省エネルギーモードから復帰する場合に、次回アドレスされる対象メモリに対してはセルフリフレッシュを実行せず、それ以外の対象外メモリセルに対してのみセルフリフレッシュを実行することによりDMA転送を迅速に行うことができる。また特許文献2によれば、フォアグランド動作とバックグランド動作を分離し、バックグランド動作発生時には優先的にバックグランド動作を実施させることにより、コマンド実行順序の最適化が実施され、VCSDRAMの転送レートを低下させないようにすることができる。しかし、これら特許文献1及び2は、要求信号がメモリ帯域以上になった場合の処理について説明がない。
また特許文献3では、記録データ量がメモリの容量を超過したとき、予備のメモリに超過データを一時的に蓄え、その後の空き時間にメモリに転送するが、データ転送速度の遅い光磁気ディスクを対象とする技術である。
According to Patent Document 1, when the memory arbiter performs arbitration so as to satisfy each of the plurality of requests of the read DMA controller and the write DMA controller and returns from the energy saving mode, the target memory to be addressed next time is self-refreshed. The DMA transfer can be quickly performed by executing the self-refresh only for the other non-target memory cells without executing the above. Further, according to Patent Document 2, the foreground operation and the background operation are separated, and when the background operation occurs, the background operation is preferentially performed, thereby optimizing the command execution order, and the transfer rate of the VCSRAM. Can be prevented from lowering. However, these Patent Documents 1 and 2 do not describe the processing when the request signal exceeds the memory band.
Further, in Patent Document 3, when the amount of recorded data exceeds the capacity of the memory, the excess data is temporarily stored in a spare memory and transferred to the memory in the free time thereafter. It is a target technology.

本発明は、リード要求またはライト要求のピークを管理し、ピーク超過を解消するメモリ装置およびメモリ制御方法を提供することを目的とするものである。またこのようにピークを管理し、ピーク超過を解消するために、安全にリード要求またはライト要求を処理するメモリ装置およびメモリ制御方法を提供することを目的とするものである。   An object of the present invention is to provide a memory device and a memory control method for managing a peak of a read request or a write request and eliminating an excess of the peak. It is another object of the present invention to provide a memory device and a memory control method for safely processing a read request or a write request in order to manage peaks and eliminate peak excess.

本発明のメモリ装置は、メモリと、ライト要求またはリード要求を出力するモジュールと、前記メモリを制御するメモリコントローラと、バッファとからなり、前記メモリコントローラは、前記モジュールのリード要求またはライト要求を蓄えるキューと、前記キューに蓄えられたリード要求またはライト要求が予め設定したピーク値を超過するか否かを監視するピーク管理部と、前記ピーク管理部が前記超過を検出しない場合は、前記ライト要求またはリード要求に対するアービトレーションを行い、前記ピーク管理部が前記超過を検出した場合は、前記キューに蓄えられたライト要求に基づいてライトデータを前記バッファに書き込み処理させるアビ−タとを備えることにより、前記課題を解決する。   A memory device according to the present invention includes a memory, a module that outputs a write request or a read request, a memory controller that controls the memory, and a buffer. The memory controller stores a read request or a write request for the module. A queue, a peak management unit that monitors whether a read request or write request stored in the queue exceeds a preset peak value, and if the peak management unit does not detect the excess, the write request Or, when arbitration is performed for a read request, and the peak management unit detects the excess, an arbiter is provided to write data to the buffer based on the write request stored in the queue. The problem is solved.

前記モジュールはライト要求を出力するライトモジュールと、リード要求を出力するリードモジュールを備え、前記ピーク管理部は前記ライトモジュールが出力するライト要求と前記リードモジュールが出力するリード要求に対応して、それぞれ予めピーク値を設定するピーク算出部を備えることが望ましい。
前記ピーク管理部は、更に前記ライトモジュールが出力するライト要求とリードモジュールが出力するリード要求の合計が、予め設定したピーク値を超過するか否かを監視するメモリ帯域ピーク算出部を備えることが望ましい。
前記ライト要求に基づいてライトデータをバッファに書き込んだライトデータのアドレスと、メモリに書き込むときのアドレスを関連付けて記憶する変換テーブルを更に備えることが望ましい。
前記アービタは、前記キューに蓄えられた最先のライト要求に基づいてライトデータを前記バッファに書き込み処理させることが望ましい。また前記アビ−タは、前記ピーク管理部が前記超過を検出しなくなるまでライト要求に基づいてライトデータをバッファに書き込み処理させることが望ましい。また前記アービタは、ライト要求に基づいてライトデータを前記バッファに書き込み処理させるのと並行して、他のリード要求またはライト要求を処理させることが望ましい。また前記アービタは、リード要求を受けたとき、前記変換テーブルを参照して、リードすべきデータが前記バッファにある場合、前記バッファからデータを読み出し処理させることが望ましい。また前記アービタは、前記変換テーブルを参照して、ライトすべきライトデータが前記バッファにある場合、前記ライトデータを前記メモリに書き込み処理させ、前記バッファ上のライトデータを消去処理させることが望ましい。
前記ピーク管理部が前記超過を検出しないとき、前記アービタは前記バッファに記憶されているライトデータを前記メモリに転送処理させることが望ましい。
前記バッファからメモリに転送後、前記変換テーブルに記憶したアドレスデータを消去することが望ましい。
The module includes a write module that outputs a write request and a read module that outputs a read request, and the peak management unit corresponds to the write request output by the write module and the read request output by the read module, respectively. It is desirable to provide a peak calculation unit that sets a peak value in advance.
The peak management unit further includes a memory bandwidth peak calculation unit that monitors whether the total of the write request output from the write module and the read request output from the read module exceeds a preset peak value. desirable.
It is desirable to further include a conversion table for storing the address of the write data in which the write data is written to the buffer based on the write request and the address at the time of writing to the memory in association with each other.
The arbiter preferably causes write data to be written into the buffer based on the earliest write request stored in the queue. The arbiter preferably writes the write data to the buffer based on the write request until the peak management unit no longer detects the excess. Further, it is desirable that the arbiter process other read requests or write requests in parallel with writing the write data to the buffer based on the write request. In addition, when the arbiter receives a read request, the arbiter preferably refers to the conversion table and reads data from the buffer when the data to be read is in the buffer. The arbiter preferably refers to the conversion table, and when the write data to be written is in the buffer, the write data is written into the memory, and the write data on the buffer is erased.
When the peak management unit does not detect the excess, the arbiter may transfer the write data stored in the buffer to the memory.
It is desirable to erase the address data stored in the conversion table after transfer from the buffer to the memory.

更に、本発明は別の観点によれば、メモリと、ライト要求またはリード要求を出力するモジュールと、前記メモリを制御するメモリコントローラと、バッファを備えるメモリ装置の制御方法であって、前記リード要求またはライト要求を蓄えるステップと、前記蓄えられたリード要求またはライト要求が、予め設定したピーク値を超過するか否かを監視するピーク管理ステップと、前記ピーク管理ステップで、前記ピーク管理部が前記超過を検出しない場合は、前記ライト要求またはリード要求に対するアービトレーションを行い、前記超過を検出した場合に、前記蓄えられたライト要求に基づいてライトデータを前記バッファに書き込み処理させる書込みステップとを備え、前記課題を解決する。   According to another aspect of the present invention, there is provided a memory device control method comprising a memory, a module for outputting a write request or a read request, a memory controller for controlling the memory, and a buffer, wherein the read request Or a step of storing a write request, a peak management step of monitoring whether the stored read request or write request exceeds a preset peak value, and the peak management step, wherein the peak management unit When the excess is not detected, arbitration is performed for the write request or the read request, and when the excess is detected, a write step is performed to write data to the buffer based on the stored write request. The problem is solved.

本発明のメモリ制御装置は、キューに蓄えられたリード要求またはライト要求が予め設定したピーク値を超過するか否かを監視するピーク管理部と、このピーク管理部が前記超過を検出した場合に、キューに蓄えられたライト要求に基づいてライトデータをバッファに書き込み処理させるアビ−タを備えるので、予め設定したピーク値の超過を解消することができる。これにより、ピーク値を超過するリード要求またはライト要求は、安全にキューに保存することができ、データが破壊されることがない。   The memory control device according to the present invention includes a peak management unit that monitors whether a read request or write request stored in a queue exceeds a preset peak value, and when the peak management unit detects the excess Since the arbiter for writing the write data to the buffer based on the write request stored in the queue is provided, the excess of the preset peak value can be solved. Thereby, a read request or a write request exceeding the peak value can be safely stored in the queue, and data is not destroyed.

また本発明のメモリ装置は、ライト要求を出力するライトモジュールと、リード要求を出力するリードモジュールを備え、前記ライトモジュールが出力するライト要求と前記リードモジュールが出力するリード要求に対応して、それぞれ予めピーク値を設定するピーク算出部を備えるので、ライトモジュールまたはリードモジュールごとに、ピーク値の超過を監視することができる。更に前記ライトモジュールが出力するライト要求とリードモジュールが出力するリード要求の合計が、予め設定したピーク値を超過するか否かを監視するメモリ帯域ピーク算出部を備えるので、メモリ帯域の超過を解消することができる。
また本発明のメモリ装置は、ライト要求に基づいてライトデータをバッファに書き込んだアドレスと、前記メモリに書き込むときのアドレスを関連付けて記憶する変換テーブルを更に備えるので、バッファに書き込んだライトデータをメモリの本来のアドレスに転送する場合、及びメモリに転送する前にそのアドレスのリード要求があった場合に備えることができる。
また本発明のメモリ装置は、アービタがキューに蓄えられた最先のライト要求に基づいてライトデータを前記バッファに書き込み処理させるので、処理が簡単になる。
また本発明のメモリ装置は、ピーク値の超過を検出しなくなるまでアービタがライト要求に基づいてライトデータをバッファに書き込み処理させるので、確実にピーク超過を解消することができる。またアービタがライト要求に基づいてライトデータを前記バッファに書き込み処理させるのと並行して、他のリード要求またはライト要求を処理させるので、安全にデータを処理することができる。
また本発明のメモリ装置は、アービタがリード要求を受けたとき、変換テーブルを参照して、リードすべきデータが前記バッファにある場合、前記バッファからデータを読み出し処理させるので、必要なデータを素早く読み出すことができる。
また本発明のメモリ装置は、アービタが変換テーブルを参照して、ライトすべきライトでーたがバッファにある場合、ライトデータをメモリに書き込み処理させ、前記バッファ上のライトデータを消去処理させるので、バッファの空き容量を確保することができる。
また本発明のメモリ装置は、前記ピーク管理部が前記超過を検出しないたとき、バッファに記憶されているライトデータをメモリに転送処理させるので、またバッファからメモリに転送後、前記変換テーブルに記憶したアドレスデータを消去するので、次にピークを超過した場合に備えて、バッファ及び変換テーブルの空き容量を確保することができる。
Further, the memory device of the present invention includes a write module that outputs a write request and a read module that outputs a read request, corresponding to the write request output by the write module and the read request output by the read module, respectively. Since the peak calculation unit for setting the peak value in advance is provided, the excess of the peak value can be monitored for each write module or read module. Furthermore, a memory bandwidth peak calculation unit is provided to monitor whether the total of the write request output from the write module and the read request output from the read module exceeds a preset peak value, thereby eliminating the excess of the memory bandwidth. can do.
The memory device according to the present invention further includes a conversion table that stores the address at which the write data is written to the buffer based on the write request and the address at the time of writing to the memory in association with each other. Can be prepared when the address is transferred to the original address, and when there is a read request for the address before transferring to the memory.
In the memory device of the present invention, since the arbiter writes the write data to the buffer based on the earliest write request stored in the queue, the processing becomes simple.
In the memory device of the present invention, the arbiter causes the write data to be written into the buffer based on the write request until the peak value is not detected to be exceeded, so that the peak excess can be reliably eliminated. Since the arbiter processes other read requests or write requests in parallel with the write data being written into the buffer based on the write request, the data can be processed safely.
The memory device of the present invention refers to the conversion table when the arbiter receives a read request, and when the data to be read is in the buffer, the data is read out from the buffer, so that necessary data can be quickly processed. Can be read.
In the memory device of the present invention, when the arbiter refers to the conversion table and the write to be written is in the buffer, the write data is written into the memory and the write data on the buffer is erased. The free space of the buffer can be secured.
In the memory device of the present invention, when the peak management unit does not detect the excess, the write data stored in the buffer is transferred to the memory, and after being transferred from the buffer to the memory, stored in the conversion table. Since the address data is erased, it is possible to secure free space in the buffer and the conversion table in preparation for the next peak.

本発明のメモリ装置は、パソコン、デジタル複写機、プリンタ、ファクシミリのような画像形成装置、その他電子機器に使用される書換え可能のメモリ装置およびメモリ制御方法である。
本発明のメモリ装置は、図1に示すように、メモリ1と、メモリコントローラ2と、ライトモジュール3と、リードモジュール4と、ピーク管理部5と、バッファ6と、アドレス保存部7からなる。
The memory device of the present invention is a rewritable memory device and a memory control method used for an image forming apparatus such as a personal computer, a digital copying machine, a printer, a facsimile, and other electronic devices.
As shown in FIG. 1, the memory device of the present invention includes a memory 1, a memory controller 2, a write module 3, a read module 4, a peak management unit 5, a buffer 6, and an address storage unit 7.

上記メモリ1は、例えばSDRAMや高速アクセスが可能なDDR−SDRAMのようなDRAMおよびSRAMやフラッシュメモリ、あるいはDIMM(Dual Inline Memory Module)である。図1は1個のDDR−SDRAMを示しているが、SRAMやフラッシュメモリであってもよい。また1個以上何個備えていても構わない。   The memory 1 is, for example, a DRAM such as an SDRAM or a DDR-SDRAM capable of high-speed access, an SRAM, a flash memory, or a DIMM (Dual Inline Memory Module). Although FIG. 1 shows one DDR-SDRAM, it may be an SRAM or a flash memory. One or more and any number may be provided.

メモリコントローラ2は、ライトモジュール3と、リードモジュール4にそれぞれ対応して、リード要求またはライト要求を蓄積するキュー11、12を備える。図1ではライトモジュール3が2個、リードモジュール4が2個であるので、キュー11、12はこれに対応して計4個備えている。キューは先に入力したデータを先に出力するデータ構造である。キュー11、12がライト要求またはリード要求を蓄える数は、各ライトモジュール3、各リードモジュール4が発生するライト要求またはリード要求の数に対応させる。つまり、要求数の多い、または頻度の多い、または速度の速いライトモジュール3またはリードモジュール4に対しては数多くのライト要求またはリード要求を蓄えられるキューを使用する。逆に要求数の少ない、または頻度の少ない、または速度の遅いライトモジュール3、リードモジュール4対しては数少ないライト要求またはリード要求を蓄えられるキューを使用するとよい。図1ではキューを明示するため小さい箱を積み重ねた模式的構造で示す。キュー11aはライトモジュール3aに対して備えられ、箱を6個有する。キュー11bはライトモジュール3bに対して備えられ、箱を4個有する。キュー12aはリードモジュール4aに対応し5個、キュー12bはリードモジュール4bに対応し5個備える。勿論、経済的な問題がないのであれば、最大の要求数を発生するライトモジュール3またはリードモジュール4に対応して、全部のライトモジュール3またはリードモジュール4に同数のキューを備えても構わない。   The memory controller 2 includes queues 11 and 12 for storing read requests or write requests, corresponding to the write module 3 and the read module 4, respectively. In FIG. 1, since there are two write modules 3 and two read modules 4, a total of four queues 11 and 12 are provided correspondingly. A queue is a data structure that outputs previously input data. The number of queues 11 and 12 that store write requests or read requests corresponds to the number of write requests or read requests generated by each write module 3 and each read module 4. In other words, a queue that can store a large number of write requests or read requests is used for the write module 3 or the read module 4 having a large number of requests, a high frequency, or a high speed. Conversely, for the write module 3 and the read module 4 having a small number of requests, a low frequency, or a low speed, a queue that can store a small number of write requests or read requests may be used. FIG. 1 shows a schematic structure in which small boxes are stacked to clearly indicate a cue. The cue 11a is provided for the light module 3a and has six boxes. The queue 11b is provided for the light module 3b and has four boxes. There are five queues 12a corresponding to the read modules 4a, and five queues 12b corresponding to the read modules 4b. Of course, if there is no economical problem, all the write modules 3 or read modules 4 may have the same number of queues corresponding to the write module 3 or read module 4 that generates the maximum number of requests. .

またメモリコントローラ2はアビ−タ13を備え、ライトモジュール3、リードモジュール4からのそれぞれの要求信号がある場合に、それぞれの要求に対するアービトレーションを行い、要求信号を出力したライトモジュール3またはリードモジュール4に応答信号(ACK)を出力する。ここで、アービトレーションとは要求信号が複数ある場合に、それらを調停して順番を決め、メモリ1またはバッファ6への書き込みを制御することにより、それぞれの要求を満たして行くことを言う。   The memory controller 2 also includes an arbiter 13, and when there is a request signal from each of the write module 3 and the read module 4, the memory controller 2 performs arbitration for each request and outputs the request signal. Output a response signal (ACK). Here, the arbitration means that when there are a plurality of request signals, the order is determined by arbitrating them and the writing to the memory 1 or the buffer 6 is controlled to satisfy each request.

ライトモジュール3、リードモジュール4は、DMAC(Direct memory Access Controller)よりなり、パソコン、デジタル複写機、プリンタ、スキャナ、ファクシミリ、画像形成装置、その他電子機器を構成するメモリ装置周辺からのライト要求、リード要求を受け、メモリ1にデータとアドレスの出し入れをする。例えば、パソコンあるいはスキャナからライト要求を受け、メモリ1にデータとアドレスを書き込む。またパソコンあるいは複写機からリード要求を受け、メモリ1からデータを読み出してレーザスキャンニングユニットを駆動し感光体上に画像を形成する。この図1では、ライトモジュール3と、リードモジュール4を2個ずつ示しているが、1個でもそれ以上でも構わない。ライトモジュール3、リードモジュール4は、書き込みまたは読み出しの前に、書き込み要求または読み出し要求を出力する。   The write module 3 and the read module 4 are made up of DMAC (Direct memory Access Controller), and write requests and reads from the periphery of memory devices constituting personal computers, digital copiers, printers, scanners, facsimiles, image forming apparatuses, and other electronic devices. In response to the request, data and addresses are transferred to and from the memory 1. For example, a write request is received from a personal computer or a scanner, and data and an address are written in the memory 1. In response to a read request from a personal computer or copying machine, data is read from the memory 1 and the laser scanning unit is driven to form an image on the photosensitive member. In FIG. 1, two write modules 3 and two read modules 4 are shown, but one or more may be used. The write module 3 and the read module 4 output a write request or a read request before writing or reading.

ピーク管理部5は、各キュー11、12に蓄えられたリード要求の数またはライト要求の数がそれぞれのピーク設定値を超過したか否かを監視する。またリード要求の数とライト要求の数の合計数がメモリ帯域のピーク設定値を超過したか否かを監視する。ピーク管理部5は、図1ではメモリコントローラ2の外に描いているが、メモリコントローラ5の内部に備えられていてもよい。図2にピーク管理部5の構成図を示すように、ピーク管理部5は、各キュー11、各キュー12に対応して、ピーク算出部14、15を備える。図1ではキュー11が2個、キュー12が2個であるので、ピーク算出部14、15もそれぞれ2個備える。またリード要求数とライト要求数の合計数がメモリ帯域のピーク設定値を超過したか否かを監視するため、メモリ帯域ピーク算出部16を備える。図2ではライトモジュール14aのライト要求数をクロック数に換算して、そのクラック数がピーク設定値以下の場合を示している。またリードモジュール15aのリード要求数をクロック数に換算して、そのクロック数がピーク設定値を超過している場合を示している。またメモリ帯域ピーク算出部16はピーク設定値以下である場合を示している。   The peak management unit 5 monitors whether the number of read requests or the number of write requests stored in each of the queues 11 and 12 exceeds the respective peak setting value. Further, it is monitored whether or not the total number of read requests and write requests exceeds the peak setting value of the memory bandwidth. The peak management unit 5 is drawn outside the memory controller 2 in FIG. 1, but may be provided inside the memory controller 5. As shown in the configuration diagram of the peak management unit 5 in FIG. 2, the peak management unit 5 includes peak calculation units 14 and 15 corresponding to the respective queues 11 and 12. Since there are two queues 11 and two queues 12 in FIG. 1, two peak calculation units 14 and 15 are also provided. In addition, a memory band peak calculation unit 16 is provided to monitor whether or not the total number of read requests and write requests exceeds the peak set value of the memory band. FIG. 2 shows a case where the number of write requests of the write module 14a is converted into the number of clocks and the number of cracks is equal to or less than the peak set value. Further, the number of read requests of the read module 15a is converted into the number of clocks, and the number of clocks exceeds the peak set value. In addition, the memory band peak calculation unit 16 shows a case where it is equal to or less than the peak set value.

ここで、ピーク算出部14、15および16は、リード要求数またはライト要求数をそのままパラメータとしてもよいし、メモリ1で要求するデータ転送に使用されるクロック数に換算してもよい。本発明の説明では、リード要求数またはライト要求数をそのままパラメータとする場合、およびメモリ1で要求するデータ転送に使用されるクロック数に換算したパラメータを使用する場合を含めて、リード要求数またはライト要求数として説明する。
ライト要求数またはリード要求数と、クロック数のパラメータ換算は、例えば次のようにして行われる。
メモリ1が266MHzで1ミリ秒間のクロック数換算を行う場合を説明する。
1ミリ秒間のクロック数 Allclk=266028
1ミリ秒間のリフレッシュクロック数 Ref=2176
1ライトコマンドのクロック数 WC=18
1リードコマンドのクロック数 RC=12
ライトコマンドの回数 WCN=R/W要求で決まる
ライトの平均バースト数 WB=32
リードコマンドの回数 RCN=R/W要求で決まる
ライトの平均バースト数 RB=32
とすると、
Allclk−Ref−(WC+WB)×WCN−(RC+RB)×RCN<0・・・・・(1)
上記(1)式のとき、ピーク値を検出する。
Here, the peak calculation units 14, 15, and 16 may use the number of read requests or the number of write requests as a parameter as it is, or may convert the number of clocks used for data transfer requested by the memory 1. In the description of the present invention, the number of read requests or the number of read requests including the case where the number of read requests or the number of write requests is used as a parameter and the case where a parameter converted to the number of clocks used for data transfer requested in the memory 1 is used. This will be described as the number of write requests.
For example, parameter conversion of the number of write requests or the number of read requests and the number of clocks is performed as follows.
A case will be described in which the memory 1 performs clock number conversion for 1 millisecond at 266 MHz.
Number of clocks per millisecond Allclk = 266028
Number of refresh clocks per millisecond Ref = 2176
Number of clocks for one write command WC = 18
Number of clocks for one read command RC = 12
Number of write commands Average number of write bursts determined by WCN = R / W request WB = 32
Number of read commands RCN = Average number of write bursts determined by R / W request RB = 32
Then,
Allclk−Ref− (WC + WB) × WCN− (RC + RB) × RCN <0 (1)
In the case of the above equation (1), the peak value is detected.

バッファ6は、SRAM(Static RAM)のような高速動作メモリよりなり、メモリコントローラ2に対して1個備えられ、ピーク対応として使用される。したがって、キュー11a〜12bのいずれか1つがピーク超過した場合または合計の要求数がピーク超過した場合、共通に使用される。SRAMの外にDRAMやフラッシュメモリも使用することができる。バッファ6の記憶容量は大きいほど好ましく、また動作速度は速いほど好ましいが、このメモリ装置において、ピーク時にオーバーフローする最大ライト要求数、最大リード要求数を勘案して決めればよい。特に複写機とスキャナとプリンタを備えるデジタル複合機やパソコンからの印字データ、スキャナで読み込んだデータは、データ量が多く、待機させることができないので、その頻度、印字データ量やスキャナの読み込み速度に応じて決めるとよく、以下の実施例の説明で明らかになるように少なくとも新たに追加されるライト要求またはリード要求の発生速度よりも速い動作速度が必要である。   The buffer 6 is composed of a high-speed operation memory such as SRAM (Static RAM). One buffer 6 is provided for the memory controller 2 and is used for peak correspondence. Therefore, when any one of the queues 11a to 12b exceeds the peak or the total number of requests exceeds the peak, the queues 11a to 12b are commonly used. In addition to SRAM, DRAM and flash memory can also be used. The larger the storage capacity of the buffer 6 is, and the faster the operation speed is, the better. However, in this memory device, it may be determined in consideration of the maximum number of write requests and the maximum number of read requests that overflow at the peak. In particular, the data read from digital copiers and PCs equipped with copiers, scanners, and printers, and data read by scanners are large in volume and cannot be placed on standby. As will be apparent from the following description of the embodiment, an operation speed that is at least faster than the generation speed of a newly added write request or read request is required.

アドレス保存部7は、バッファ6にデータを格納した場合にそのアドレスを格納するメモリである。アドレス保存部7もSRAMにより構成するのが好ましいが、DRAMやフラッシュメモリも使用することができる。アドレス保存部7は、バッファ6に書き込んだライトデータのアドレスと、ライトデータをメモリ1に書き込むときのアドレスと、データサイズを関連付けて記憶する。この場合に好ましくはテーブルを作成するのが好ましい。図1では、バッファ6とアドレス保存部7は、別のメモリとして示しているが、一体的であってもよい。またバッファ6に格納するデータと、アドレス保存部7のテーブルは、明示的には分離して示すが、データとテーブルは連続的であってもかまわない。   The address storage unit 7 is a memory for storing an address when data is stored in the buffer 6. The address storage unit 7 is also preferably composed of SRAM, but DRAM or flash memory can also be used. The address storage unit 7 stores the address of the write data written in the buffer 6, the address when the write data is written in the memory 1, and the data size in association with each other. In this case, it is preferable to create a table. In FIG. 1, the buffer 6 and the address storage unit 7 are illustrated as separate memories, but may be integrated. The data stored in the buffer 6 and the table of the address storage unit 7 are explicitly shown separately, but the data and the table may be continuous.

本発明のメモリ装置は以上のように構成され、次のように動作する。
ライトモジュール3a、3bは、例えばデジタル複写機、スキャナまたはパソコンのような外部機器よりライト要求信号を受ける。またリードモジュール4a、4bはデジタル複写機、パソコンのような外部機器よりリード要求信号を受ける。このライト要求信号またはリード要求信号はメモリコントローラ2に出力され、各キュー11a、11b、12a、12bに格納される。そして、各リード要求信号またはライト要求信号は、アービタ13によりアービトレーションが行われる。つまり各リード要求信号またはライト要求信号は、衝突しないようにアービタ13により調停され、リード要求信号により要求されたアドレスのデータをメモリ1から読み出し処理をさせる。またはライト要求信号により要求されたアドレスにデータを書き込み処理をさせる。
ここで、ピーク管理部5は各キューに予め設定したピーク値を超過しないか、各ピーク算出部14a〜15bが監視する。また各キューの合計要求数がメモリ帯域を超過しないか、メモリ帯域ピーク算出部16が監視する。各キューの要求数または合計要求数がピーク値を超過しない場合は、アービタ13がリード要求信号またはライト要求信号を調停することにより、読み出し処理または書き込み処理が順次実施される。
The memory device of the present invention is configured as described above and operates as follows.
The write modules 3a and 3b receive a write request signal from an external device such as a digital copying machine, a scanner, or a personal computer. The lead modules 4a and 4b receive a read request signal from an external device such as a digital copying machine or a personal computer. This write request signal or read request signal is output to the memory controller 2 and stored in each queue 11a, 11b, 12a, 12b. Each read request signal or write request signal is arbitrated by the arbiter 13. That is, each read request signal or write request signal is arbitrated by the arbiter 13 so as not to collide, and the data at the address requested by the read request signal is read from the memory 1. Alternatively, data is written to the address requested by the write request signal.
Here, the peak management unit 5 monitors whether or not the peak value preset in each queue is exceeded, by each of the peak calculation units 14a to 15b. The memory bandwidth peak calculation unit 16 monitors whether the total number of requests for each queue exceeds the memory bandwidth. When the number of requests in each queue or the total number of requests does not exceed the peak value, the arbiter 13 arbitrates the read request signal or the write request signal, so that the read process or the write process is sequentially performed.

以下には、本発明のメモリ装置の動作を、第1にリードモジュールのリード要求がピーク設定値を超過した場合、その超過したリード要求を優先的に処理する場合、第2にライトモジュール3aのライト要求がピーク設定値を超過した場合、その超過したライト要求をキューに蓄え、ライトデータをバッファに書き込む場合、第3にメモリ帯域のピークが設定値を超過した場合、第4にピーク超過の解消後、バッファからメモリへデータを移動させる場合について順次説明する。   The operation of the memory device of the present invention will be described below. First, when the read request of the read module exceeds the peak setting value, when the read request exceeding the peak setting is preferentially processed, secondly, the write module 3a When the write request exceeds the peak set value, the excess write request is stored in the queue and the write data is written to the buffer. Third, when the memory bandwidth peak exceeds the set value, the fourth A case where data is moved from the buffer to the memory after the cancellation is sequentially described.

図3は、第1のリードモジュール4aのリード要求がピーク設定値を超過した場合を説明する図である。リードモジュール4bのリード要求がピーク設定値を超過した場合も同様に動作する。
リードモジュール4aが外部機器よりリード要求信号を受け、そのリード要求信号をメモリコントローラ2に出力すると、アービタ13が調停してメモリ1からリード要求信号により指定されたアドレスのデータを読み出す。
ここで、キュー12aはリード要求信号を一時的に蓄え、そのリード要求数が予め設定したピーク値を超過したか否かをピーク管理部5のピーク算出部15aが監視する。超過しない場合は、アービタ13が調停することにより、必要なデータがメモリ1から読み出される。しかし、キュー12aに蓄えられたリード要求数が予め設定したピーク値より超過したことを、ピーク算出部15aが検出した場合、そのリード要求の実行される時間を早める必要がある。そのために、次のような手順によりリード要求を優先させる。
FIG. 3 is a diagram illustrating a case where the read request of the first read module 4a exceeds the peak set value. The same operation is performed when the read request of the read module 4b exceeds the peak set value.
When the read module 4 a receives a read request signal from an external device and outputs the read request signal to the memory controller 2, the arbiter 13 arbitrates and reads data at the address specified by the read request signal from the memory 1.
Here, the queue 12a temporarily stores the read request signal, and the peak calculation unit 15a of the peak management unit 5 monitors whether or not the number of read requests exceeds a preset peak value. If it does not exceed, necessary data is read from the memory 1 by arbitrating the arbiter 13. However, when the peak calculation unit 15a detects that the number of read requests stored in the queue 12a exceeds the preset peak value, it is necessary to advance the time for executing the read request. For this purpose, priority is given to read requests by the following procedure.

まず、ピーク管理部5のピーク算出部15aが予め定めたピーク値よりキュー12aに蓄えられたリード要求数の超過を検出すると、アービタはキュー11a〜12bの一番処理順の早い要求順のデータをバッファ6の空いている部分に格納させる。この場合、図3に示すようにキュー11aに処理順1があり、キュー11bに処理順2があり、キュー12aに処理順3と処理順5があり、キュー12bに処理順4がある。従って、キュー11aにあるライト要求が処理順1であり、一番早い処理順であるので、そのライト要求のデータをバッファ6の空いている部分に格納させる。またそのライト要求のメモリ1でのアドレスと、バッファ6のアドレスと、データサイズを、アドレス保存部7にテーブルとして格納する。例えば、図4に示すように、1列目にメモリ1のアドレスを格納する。2列目にはバッファ6のアドレスを格納する。さらに3列目にはデータサイズを格納する。このテーブルにおいて、行方向が1つのライト要求に対応し、メモリ1のアドレスと、バッファ6のアドレスを対応付け、アドレス変換を可能にする。
このようにして、処理順が一番早いライト要求に基づいてライトデータをバッファ6に格納することにより、実質的にメモリ1へのアクセスが減少したことになる。ここで、リードモジュール4aのリード要求の処理順3を、処理順1にアクセス順を置き換える。 その結果、処理順3のリード要求が優先され、1番に実行されることになる。
First, when the peak calculation unit 15a of the peak management unit 5 detects an excess of the number of read requests stored in the queue 12a from a predetermined peak value, the arbiter stores data in the request order with the earliest processing order of the queues 11a to 12b. Is stored in an empty part of the buffer 6. In this case, as shown in FIG. 3, the queue 11a has processing order 1, the queue 11b has processing order 2, the queue 12a has processing order 3 and processing order 5, and the queue 12b has processing order 4. Accordingly, since the write request in the queue 11a is processing order 1, which is the earliest processing order, the data of the write request is stored in an empty part of the buffer 6. The address of the write request in the memory 1, the address of the buffer 6, and the data size are stored in the address storage unit 7 as a table. For example, as shown in FIG. 4, the address of the memory 1 is stored in the first column. In the second column, the address of the buffer 6 is stored. Further, the data size is stored in the third column. In this table, the row direction corresponds to one write request, and the address of the memory 1 and the address of the buffer 6 are associated to enable address conversion.
In this way, by storing the write data in the buffer 6 based on the write request with the earliest processing order, the access to the memory 1 is substantially reduced. Here, the processing order 3 of the read request of the read module 4a is replaced with the processing order 1 in the access order. As a result, the read request in the processing order 3 is prioritized and executed first.

この説明では、一番処理順が早いライト要求のライトデータをバッファ6に格納したが、バッファ6に格納するライトデータは一番遅いライトデータであってもよく、またデータサイズの大きい順であってもよい。しかし上記説明のように、一番処理順の早いライト要求のライトデータをバッファに格納する場合は、キュー11aに蓄えられた順番にバッファ6へ転送すればよいので、処理が簡単である。
このように本発明のメモリ装置は、リード要求をライト要求に入れ替えるだけで、一部の入れ替わりを除くと、全体の処理順序には影響なく、ピーク超過を発生しているリードモジュールに対して、ピーク解消を行うことができる。この結果、ピーク値を超過したリード要求は、安全にキューに保存することができる。これによりピーク値の超過を実質的に解消することができ、データが破壊されることがない。
In this description, the write data of the write request with the earliest processing order is stored in the buffer 6, but the write data stored in the buffer 6 may be the slowest write data, and the data size is in descending order. May be. However, as described above, when the write data of the write request with the earliest processing order is stored in the buffer, the processing is simple because it may be transferred to the buffer 6 in the order stored in the queue 11a.
As described above, the memory device of the present invention only replaces the read request with the write request, and excluding a part of the replacement, the entire processing order is not affected, and the read module in which the peak excess has occurred, Peak elimination can be performed. As a result, read requests exceeding the peak value can be safely stored in the queue. Thereby, the excess of the peak value can be substantially eliminated, and the data is not destroyed.

次に、リードモジュール4aのリード動作について説明する。
初めに、リードモジュール4aより発せられたリード要求信号のアドレスが、アドレス保存部7に存在するか否かアドレスの調査を行う。リード要求信号のアドレスがアドレス保存部7に存在しない場合は、通常のメモリ1の読み出し動作を実行する。図5に示すように、リード要求信号のアドレスがアドレス保存部7に存在する場合は、バッファ6の読み出し動作を実行する。ここでは、バッファ6に格納しているデータおよびアドレス保存部7に格納しているアドレス、サイズのテーブルはそのまま保存しておく。この場合は、メモリ1の帯域を使用しないので、帯域に余裕を生じさせることができる。
Next, the read operation of the lead module 4a will be described.
First, an address is examined to determine whether or not the address of the read request signal issued from the read module 4a exists in the address storage unit 7. When the address of the read request signal does not exist in the address storage unit 7, a normal read operation of the memory 1 is executed. As shown in FIG. 5, when the address of the read request signal exists in the address storage unit 7, the read operation of the buffer 6 is executed. Here, the data stored in the buffer 6 and the address and size table stored in the address storage unit 7 are stored as they are. In this case, since the bandwidth of the memory 1 is not used, a margin can be generated in the bandwidth.

もし、リード要求信号のアドレスがメモリ1と、アドレス保存部7に分散して格納されている場合は、図5(a)に示すようにメモリ1とバッファ6からデータを読み出して、それらを合成して出力する。例えば、リード要求が、アドレス50番地と51番地のデータを要求している場合に、アドレス50のデータはメモリ1に存在し、アドレス51番地のデータがバッファ6に存在するときは、アドレス50番地のデータはメモリ1から読み出し、アドレス51番地のデータはバッファ6から読み出す。そして、この両者のデータを合成してリードモジュール4aに出力する。
この場合のメモリ1の空間的イメージ図を図5(b)に示す。図5(b)の四角い点線はメモリ1の空間的な配置図を示し、アドレス50番地と、アドレス51番地がこの空間に存在する様子を示している。このとき、バッファ6に格納しているデータおよびアドレス保存部7のテーブルに格納しているアドレス、サイズはそのまま保存しておく。
この説明はリード要求のアドレスが2つであるが、2以上のアドレスがメモリ1とバッファ6に分散している場合も同様にして実行することができる。
このようにして、本発明ではバッファ6からメモリ1に転送する前にリード要求があった場合、バッファ6に格納されているデータを活用して、リード要求に素早く対応することができる。
If the address of the read request signal is distributed and stored in the memory 1 and the address storage unit 7, the data is read from the memory 1 and the buffer 6 as shown in FIG. And output. For example, when the read request requests data at addresses 50 and 51, if the data at address 50 exists in the memory 1 and the data at address 51 exists in the buffer 6, the address 50 is stored. Is read from the memory 1 and the data at address 51 is read from the buffer 6. Then, both data are combined and output to the lead module 4a.
A spatial image diagram of the memory 1 in this case is shown in FIG. A square dotted line in FIG. 5B shows a spatial layout of the memory 1, and shows that address 50 and address 51 are present in this space. At this time, the data stored in the buffer 6 and the address and size stored in the table of the address storage unit 7 are stored as they are.
This explanation has two read request addresses, but the same can be executed when two or more addresses are distributed in the memory 1 and the buffer 6.
In this way, in the present invention, when there is a read request before transfer from the buffer 6 to the memory 1, the data stored in the buffer 6 can be utilized to quickly respond to the read request.

図6は、第2のライトモジュール3aのライト要求がピーク設定値を超過した場合を説明する図である。ライトモジュール3bのライト要求がピーク設定値を超過した場合も同様に動作する。
ライトモジュール3aが外部機器よりライト要求信号を受け、そのライト要求信号をメモリコントローラ2に出力すると、アービタ13が調停してメモリ1へライト要求信号により指定されたアドレスにデータを書き込み処理をさせる。
ここで、キュー11aはライト要求を一時的に蓄え、そのライト要求数が予め設定したピーク値を超過したか否かをピーク管理部5のピーク算出部14aが監視する。超過しない場合は、アービタ13が調停することにより、メモリ1にデータを書き込む。しかしもし、キュー11aに蓄えられたライト要求数が予め設定したピーク値より超過したことを、ピーク算出部14aが検出した場合、ピーク値の超過を解消する必要がある。そのために、次のような手順により一番早い処理順のデータを一時的にバッファ6へデータを格納し、ピーク値の超過を解消する。
FIG. 6 is a diagram illustrating a case where the write request of the second write module 3a exceeds the peak set value. The same operation is performed when the write request of the write module 3b exceeds the peak set value.
When the write module 3a receives a write request signal from an external device and outputs the write request signal to the memory controller 2, the arbiter 13 arbitrates and causes the memory 1 to write data to the address specified by the write request signal.
Here, the queue 11a temporarily stores write requests, and the peak calculation unit 14a of the peak management unit 5 monitors whether or not the number of write requests exceeds a preset peak value. If not exceeded, the arbiter 13 arbitrates to write data into the memory 1. However, if the peak calculation unit 14a detects that the number of write requests stored in the queue 11a exceeds the preset peak value, it is necessary to eliminate the peak value excess. For this purpose, the data in the earliest processing order is temporarily stored in the buffer 6 by the following procedure to eliminate the peak value excess.

まず、ピーク算出部14aがキュー11aに蓄えられたライト要求の数が設定されたピーク値より超過したことを検出すると、キュー11aの一番処理順の早いデータをバッファ6の空いている部分に格納する。この場合、キュー11aがピーク値を超過しているので、キュー11aに蓄えられているライト要求を少なくしなければならない。図6に示すようにキュー11aには処理順2と処理順5のライト要求があるので、一番前にある処理順2のライト要求のデータをバッファ6の空いている部分に格納する。またそのライト要求のメモリ1でのアドレスと、バッファ6のアドレスと、データサイズをアドレス保存部7に格納する。図7はアドレス保存部7に格納されるテーブルを示し、図4に示したテーブルと同様のフォーマットで、1列目にメモリ1のアドレス、2列目にバッファ6のアドレス、3列目にデータサイズを格納する。行方向が1つのライト要求を示す。
このようにして、キュー11aの一番処理順の早いライト要求(処理順2)のデータをバッファ6に格納して、書き込み済みとすることにより、実質的にメモリ1へのアクセスを減少させる。これにより、ライトモジュール3aに加えられたライト要求をキュー11aに追加することができる。もし処理順2のリード要求をバッファ6に格納するだけでは、まだピーク算出部14aが超過を検出する場合は、キュー11aの次のライト要求である処理順5のデータをバッファ6に格納して、ピークを解消する。
First, when the peak calculation unit 14a detects that the number of write requests stored in the queue 11a exceeds the set peak value, the data with the earliest processing order in the queue 11a is stored in an empty portion of the buffer 6. Store. In this case, since the queue 11a exceeds the peak value, the number of write requests stored in the queue 11a must be reduced. As shown in FIG. 6, since there are write requests of processing order 2 and processing order 5 in the queue 11 a, the data of the write request of processing order 2 at the forefront is stored in an empty part of the buffer 6. The address of the write request in the memory 1, the address of the buffer 6, and the data size are stored in the address storage unit 7. FIG. 7 shows a table stored in the address storage unit 7, in the same format as the table shown in FIG. 4, the address of the memory 1 in the first column, the address of the buffer 6 in the second column, and the data in the third column. Store the size. The row direction indicates one write request.
In this way, the data of the write request (processing order 2) with the earliest processing order in the queue 11a is stored in the buffer 6 and written, thereby substantially reducing access to the memory 1. Thereby, the write request added to the write module 3a can be added to the queue 11a. If the peak calculation unit 14a still detects an excess when only the read request of the processing order 2 is stored in the buffer 6, the data of the processing order 5 that is the next write request of the queue 11a is stored in the buffer 6. , Eliminate the peak.

次に、ライトモジュール3aのライト動作について説明する。
ライトモジュール3aより出力されたライト要求信号のアドレスが、アドレス保存部7に存在するか否かアドレスの比較を行う。ライト要求信号のアドレスがアドレス保存部7に存在しない場合は、通常のメモリ1の書き込み処理を実行する。しかしライト要求信号のアドレスがアドレス保存部7に存在する場合は、メモリ1に書き込み処理を実行するとともに、バッファ6に格納されているデータと、アドレス保存部7に格納されているそのアドレスおよびデータサイズを消去する。これにより、古いデータを消去する。
もし、ライト要求信号のアドレスの一部がアドレス保存部7に存在し、他の一部がアドレス保存部7に存在しない場合は、ライト要求されたデータをメモリ1に書き込む。同時に重複している部分をメモリ1に移動済みとするために、バッファ6に格納されているデータを修正し、アドレス保存部7アドレスとデータサイズを保存する。
Next, the write operation of the write module 3a will be described.
Address comparison is performed to determine whether the address of the write request signal output from the write module 3a exists in the address storage unit 7 or not. When the address of the write request signal does not exist in the address storage unit 7, normal write processing of the memory 1 is executed. However, when the address of the write request signal exists in the address storage unit 7, the write process is executed in the memory 1, the data stored in the buffer 6, and the address and data stored in the address storage unit 7. Erase size. This erases old data.
If a part of the address of the write request signal exists in the address storage unit 7 and the other part does not exist in the address storage unit 7, the data requested to be written is written in the memory 1. At the same time, the data stored in the buffer 6 is corrected and the address storage unit 7 address and data size are stored in order to make the overlapping portion moved to the memory 1.

図8は、第3のメモリ帯域のピークが設定値を超過した場合を説明する図である。
ピーク管理部5は、キュー11a、11b、12aおよび12bの各キュー数を合計するメモリ帯域ピーク算出部16を備える。もしメモリ帯域ピーク算出部16が予め設定したピーク値より超過したことを検出した場合、次のような手順により一番処理順の早いデータを一時的にバッファ6へデータを格納し、ピーク値の超過を解消する。
まず、ピーク管理部5のメモリ帯域ピーク算出部16がピーク超過を検出したとき、キュー11a〜12bの一番処理順の早いデータをバッファ6の空いている部分に格納する。この場合、図8に示すようにキュー11aに処理順1があり、キュー11bに処理順4があり、キュー12aに処理順2があり、キュー12bに処理順3がある。従って、処理順1が一番早い処理順であり、そのライト要求のデータをバッファ6の空いている部分に格納する。またそのライト要求のメモリ1でのアドレスと、バッファ6のアドレスを、アドレス保存部7に格納する。アドレス保存部7に格納するフォーマットは、図4、図6と同様のテーブルであるので、説明を省略する。
このようにして、一番処理順の早いライト要求(処理順1)のデータをバッファ6に格納することにより、実質的にメモリ1へのアクセスを減少させる。これにより、メモリ帯域のピーク超過を解消することができる。もし処理順1のライト要求のデータをバッファ6に格納するだけでは、まだメモリ帯域ピーク算出部16が超過を検出する場合は、キュー11bにある処理順4のライト要求のデータをバッファ6に格納して、ピークを解消する。
FIG. 8 is a diagram for explaining a case where the peak of the third memory band exceeds the set value.
The peak management unit 5 includes a memory bandwidth peak calculation unit 16 that sums the numbers of queues 11a, 11b, 12a, and 12b. If the memory bandwidth peak calculation unit 16 detects that the preset peak value is exceeded, the data with the earliest processing order is temporarily stored in the buffer 6 according to the following procedure, and the peak value Eliminate excess.
First, when the memory bandwidth peak calculation unit 16 of the peak management unit 5 detects a peak excess, the data with the earliest processing order in the queues 11a to 12b is stored in an empty portion of the buffer 6. In this case, as shown in FIG. 8, the queue 11a has processing order 1, the queue 11b has processing order 4, the queue 12a has processing order 2, and the queue 12b has processing order 3. Accordingly, the processing order 1 is the earliest processing order, and the write request data is stored in an empty part of the buffer 6. The address of the write request in the memory 1 and the address of the buffer 6 are stored in the address storage unit 7. Since the format stored in the address storage unit 7 is the same table as in FIGS. 4 and 6, the description thereof will be omitted.
In this way, by storing the data of the write request with the earliest processing order (processing order 1) in the buffer 6, the access to the memory 1 is substantially reduced. Thereby, it is possible to eliminate the peak excess of the memory bandwidth. If the memory bandwidth peak calculation unit 16 still detects excess only by storing the write request data in the processing order 1 in the buffer 6, the write request data in the processing order 4 in the queue 11 b is stored in the buffer 6. To eliminate the peak.

図9は、以上に説明したようにしてピーク超過を解消した後、バッファ6からメモリ1へデータを転送する場合を説明する図である。
ピーク管理部5は、キュー11a、11b、12aおよび12bの各キューの数が予め設定したピーク値を超過するか否か監視するピーク算出部14a〜15bと、キュー11a、11b、12aおよび12bの各キュー数を合計するメモリ帯域ピーク算出部16を備える。これら全てのピーク算出部14a〜15bと16がピーク値の超過を検出しない場合、アービタ13はバッファ6に格納されているデータをメモリ1に移動させるため、メモリ1に書き込み処理をさせる。
ここで、図10に示すように、バッファ6からメモリ1へ移動する場合に、メモリ1へ移動させるデータ量を加えても予め設定されているピーク値を超過しないように、転送時のピーク値を設定するのが好ましい。図10はライト要求数とリード要求数の合計をクロック数に換算して、そのクロック数がピーク設定値以下の場合を示しているが、ライト要求数とリード要求数の合計数によってピーク値を監視してもよい。
以上のように、バッファ6からメモリ1へデータ移動後、バッファ6のそのデータを消去するとともに、アドレス保存部7のそのアドレスおよびデータサイズを消去する。これにより、次にピークを超過した場合に備えて、バッファ6の空き容量を確保する。
FIG. 9 is a diagram for explaining a case where data is transferred from the buffer 6 to the memory 1 after the peak excess is eliminated as described above.
The peak management unit 5 includes a peak calculation unit 14a to 15b that monitors whether the number of queues 11a, 11b, 12a, and 12b exceeds a preset peak value, and the queues 11a, 11b, 12a, and 12b. A memory bandwidth peak calculation unit 16 that totals the number of queues is provided. When all of these peak calculation units 14a to 15b and 16 do not detect that the peak value has been exceeded, the arbiter 13 causes the memory 1 to perform a write process in order to move the data stored in the buffer 6 to the memory 1.
Here, as shown in FIG. 10, when moving from the buffer 6 to the memory 1, the peak value at the time of transfer is not exceeded even if the amount of data to be moved to the memory 1 is added. Is preferably set. FIG. 10 shows the case where the total number of write requests and the number of read requests is converted into the number of clocks, and the number of clocks is less than or equal to the peak set value. The peak value is determined by the total number of write requests and the number of read requests. You may monitor.
As described above, after data is moved from the buffer 6 to the memory 1, the data in the buffer 6 is erased, and the address and data size of the address storage unit 7 are erased. As a result, the free capacity of the buffer 6 is secured in preparation for the next peak exceeding.

メモリ装置の構成図を示す。1 shows a configuration diagram of a memory device. ピーク管理部の構成図を示す。The block diagram of a peak management part is shown. ピークモジュールがリードモジュールである場合を説明するメモリ装置の構成図を示す。The block diagram of the memory device explaining the case where a peak module is a lead module is shown. アドレス保存部に格納されるテーブルを示す。The table stored in an address preservation | save part is shown. ピークモジュールがリードモジュールである場合に、データを読み出す場合の動作説明図を示す。The operation explanatory view in the case of reading data when the peak module is a read module is shown. ピークモジュールがライトモジュールである場合を説明するメモリ装置の構成図を示す。The block diagram of the memory device explaining the case where a peak module is a light module is shown. アドレス保存部に格納されるテーブルを示す。The table stored in an address preservation | save part is shown. メモリ帯域がピーク値を超過した場合の説明図を示す。An explanatory view when a memory band exceeds a peak value is shown. バッファからメモリへデータ移動させる場合を説明するメモリ装置の構成図を示す。1 is a configuration diagram of a memory device for explaining a case where data is moved from a buffer to a memory. バッファからメモリへデータ移動させる場合を説明するピーク管理部の構成図を示す。The block diagram of the peak management part explaining the case where data is moved from a buffer to memory is shown.

符号の説明Explanation of symbols

1 メモリ
2 メモリコントロール
3 ライトモジュール
4 リードモジュール
5 ピーク管理部
6 バッファ
7 アドレス収納部
11、12 キュー
13 アービタ
14,15 ピーク算出部
16 メモリ帯域ピーク算出部
1 Memory 2 Memory Control 3 Write Module 4 Read Module 5 Peak Management Unit 6 Buffer 7 Address Storage Units 11 and 12 Queue 13 Arbiters 14 and 15 Peak Calculation Unit 16 Memory Band Peak Calculation Unit

Claims (12)

メモリと、ライト要求またはリード要求を出力するモジュールと、前記メモリを制御するメモリコントローラと、バッファとからなり、
前記メモリコントローラは、前記モジュールのリード要求またはライト要求を蓄えるキューと、前記キューに蓄えられたリード要求またはライト要求が予め設定したピーク値を超過するか否かを監視するピーク管理部と、前記ピーク管理部が前記超過を検出しない場合は、前記ライト要求またはリード要求に対するアービトレーションを行い、前記ピーク管理部が前記超過を検出した場合は、前記キューに蓄えられたライト要求に基づいてライトデータを前記バッファに書き込み処理させるアビ−タと
を備えることを特徴とするメモリ装置。
A memory, a module for outputting a write request or a read request, a memory controller for controlling the memory, and a buffer;
The memory controller includes a queue for storing a read request or a write request of the module, a peak management unit that monitors whether a read request or a write request stored in the queue exceeds a preset peak value, If the peak management unit does not detect the excess, it performs arbitration for the write request or read request, and if the peak management unit detects the excess, write data is stored based on the write request stored in the queue. And an arbiter for performing write processing on the buffer.
前記モジュールはライト要求を出力するライトモジュールと、リード要求を出力するリードモジュールを備え、前記ピーク管理部は前記ライトモジュールが出力するライト要求と前記リードモジュールが出力するリード要求に対応して、それぞれ予めピーク値を設定するピーク算出部を備えることを特徴とする請求項1に記載のメモリ装置。   The module includes a write module that outputs a write request and a read module that outputs a read request, and the peak management unit corresponds to the write request output by the write module and the read request output by the read module, respectively. The memory device according to claim 1, further comprising a peak calculation unit that sets a peak value in advance. 前記ピーク管理部は、更に前記ライトモジュールが出力するライト要求とリードモジュールが出力するリード要求の合計が、予め設定したピーク値を超過するか否かを監視するメモリ帯域ピーク算出部を備えることを特徴とする請求項1または2に記載のメモリ装置。   The peak management unit further includes a memory bandwidth peak calculation unit that monitors whether the total of the write request output from the write module and the read request output from the read module exceeds a preset peak value. The memory device according to claim 1, wherein the memory device is a memory device. 前記ライト要求に基づいてライトデータをバッファに書き込んだアドレスと、前記メモリに書き込むときのアドレスを関連付けて記憶する変換テーブルを更に備えることを特徴とする請求項1乃至3のいずれか1項に記載のメモリ装置。   4. The conversion table according to claim 1, further comprising: a conversion table that associates and stores an address at which write data is written to a buffer based on the write request and an address at the time of writing to the memory. Memory device. 前記アービタは、前記キューに蓄えられた最先のライト要求に基づいてライトデータを前記バッファに書き込み処理させることを特徴とする請求項1乃至4のいずれか1項に記載のメモリ装置。   5. The memory device according to claim 1, wherein the arbiter causes write data to be written into the buffer based on the earliest write request stored in the queue. 6. 前記アビ−タは、前記ピーク管理部が前記超過を検出しなくなるまでライト要求に基づいてライトデータをバッファに書き込み処理させることを特徴とする請求項1乃至5のいずれか1項に記載のメモリ装置。   The memory according to claim 1, wherein the arbiter causes write data to be written into a buffer based on a write request until the peak management unit no longer detects the excess. apparatus. 前記アービタは、ライト要求に基づいてライトデータを前記バッファに書き込み処理させるのと並行して、他のリード要求またはライト要求を処理させることを特徴とする請求項1乃至6のいずれか1項に記載のメモリ装置。   The arbiter causes another read request or write request to be processed in parallel with the write data being written into the buffer based on the write request. The memory device described. 前記アービタは、リード要求を受けたとき、前記変換テーブルを参照して、リードすべきデータが前記バッファにある場合、前記バッファからデータを読み出し処理させることを特徴とする請求項4に記載のメモリ装置。   5. The memory according to claim 4, wherein when the read request is received, the arbiter refers to the conversion table and reads data from the buffer when the data to be read is in the buffer. 6. apparatus. 前記アービタは、前記変換テーブルを参照して、ライトすべきライトデータが前記バッファにある場合、前記ライトデータを前記メモリに書き込み処理させ、前記バッファ上のライトデータを消去処理させることを特徴とする請求項4に記載のメモリ装置。   The arbiter refers to the conversion table, and when the write data to be written is in the buffer, the arbiter causes the write data to be written into the memory and the write data on the buffer to be erased. The memory device according to claim 4. 前記ピーク管理部が前記超過を検出しないとき、前記アービタは前記バッファに記憶されているライトデータを前記メモリに転送処理させることを特徴とする請求項1乃至9のいずれか1項に記載のメモリ装置。   10. The memory according to claim 1, wherein, when the peak management unit does not detect the excess, the arbiter causes the write data stored in the buffer to be transferred to the memory. 11. apparatus. 前記バッファからメモリに転送後、前記変換テーブルに記憶したアドレスデータを消去することを特徴とする請求項10に記載のメモリ装置。   The memory device according to claim 10, wherein the address data stored in the conversion table is erased after being transferred from the buffer to the memory. メモリと、ライト要求またはリード要求を出力するモジュールと、前記メモリを制御するメモリコントローラと、バッファを備えるメモリ装置の制御方法であって、
前記リード要求またはライト要求を蓄えるステップと、
前記蓄えられたリード要求またはライト要求が、予め設定したピーク値を超過するか否かを監視するピーク管理ステップと、
前記ピーク管理ステップで、前記超過を検出しない場合は、前記ライト要求またはリード要求に対するアービトレーションを行い、前記超過を検出した場合に、前記蓄えられたライト要求に基づいてライトデータを前記バッファに書き込み処理させる書込みステップと
を備えることを特徴とするメモリ制御方法。
A memory device comprising: a memory; a module for outputting a write request or a read request; a memory controller for controlling the memory; and a buffer.
Storing the read request or write request;
A peak management step for monitoring whether the stored read request or write request exceeds a preset peak value;
If the excess is not detected in the peak management step, the write request or the read request is arbitrated. If the excess is detected, write data is written to the buffer based on the stored write request. A memory control method comprising: a writing step.
JP2005298992A 2005-10-13 2005-10-13 Memory device and memory control method Active JP4699858B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005298992A JP4699858B2 (en) 2005-10-13 2005-10-13 Memory device and memory control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005298992A JP4699858B2 (en) 2005-10-13 2005-10-13 Memory device and memory control method

Publications (2)

Publication Number Publication Date
JP2007108996A true JP2007108996A (en) 2007-04-26
JP4699858B2 JP4699858B2 (en) 2011-06-15

Family

ID=38034820

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005298992A Active JP4699858B2 (en) 2005-10-13 2005-10-13 Memory device and memory control method

Country Status (1)

Country Link
JP (1) JP4699858B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008292542A (en) * 2007-05-22 2008-12-04 Nec Electronics Corp Image processor and image processing method
JP2011048744A (en) * 2009-08-28 2011-03-10 Nec Corp Memory access processing device and method
JP2011070666A (en) * 2009-09-23 2011-04-07 Samsung Electronics Co Ltd Electronic device controller for improving performance of electronic device
KR20140043867A (en) 2012-10-03 2014-04-11 후지쯔 세미컨덕터 가부시키가이샤 Semiconductor memory device
WO2021111583A1 (en) * 2019-12-05 2021-06-10 オリンパス株式会社 Data transfer device and data transfer method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06175911A (en) * 1992-12-08 1994-06-24 Nec Eng Ltd Memory control system
JP2000222226A (en) * 1999-01-27 2000-08-11 Matsushita Electric Ind Co Ltd Access controller and accessing method
JP2003337741A (en) * 2002-05-21 2003-11-28 Sony Corp Data transfer system, its method, and access monitoring device
WO2005003961A2 (en) * 2003-07-07 2005-01-13 Koninklijke Philips Electronics N.V. Data processing system and method for data processing
JP2005092630A (en) * 2003-09-18 2005-04-07 Sony Corp Memory control unit and control method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06175911A (en) * 1992-12-08 1994-06-24 Nec Eng Ltd Memory control system
JP2000222226A (en) * 1999-01-27 2000-08-11 Matsushita Electric Ind Co Ltd Access controller and accessing method
JP2003337741A (en) * 2002-05-21 2003-11-28 Sony Corp Data transfer system, its method, and access monitoring device
WO2005003961A2 (en) * 2003-07-07 2005-01-13 Koninklijke Philips Electronics N.V. Data processing system and method for data processing
JP2005092630A (en) * 2003-09-18 2005-04-07 Sony Corp Memory control unit and control method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008292542A (en) * 2007-05-22 2008-12-04 Nec Electronics Corp Image processor and image processing method
JP2011048744A (en) * 2009-08-28 2011-03-10 Nec Corp Memory access processing device and method
JP2011070666A (en) * 2009-09-23 2011-04-07 Samsung Electronics Co Ltd Electronic device controller for improving performance of electronic device
CN102033598A (en) * 2009-09-23 2011-04-27 三星电子株式会社 Electronic device controller for improving performance of the electronic device
KR20140043867A (en) 2012-10-03 2014-04-11 후지쯔 세미컨덕터 가부시키가이샤 Semiconductor memory device
US9053757B2 (en) 2012-10-03 2015-06-09 Fujitsu Semiconductor Limited Semiconductor memory device comprising a plurity of input/output ports and a plurity of memory blocks corresponding to the plurality of input/output ports
WO2021111583A1 (en) * 2019-12-05 2021-06-10 オリンパス株式会社 Data transfer device and data transfer method
JPWO2021111583A1 (en) * 2019-12-05 2021-06-10
JP7381603B2 (en) 2019-12-05 2023-11-15 オリンパス株式会社 Data transfer device and data transfer method
US11842071B2 (en) 2019-12-05 2023-12-12 Olympus Corporation Data transfer device and data transfer method

Also Published As

Publication number Publication date
JP4699858B2 (en) 2011-06-15

Similar Documents

Publication Publication Date Title
US7411859B2 (en) Multi-port memory device for buffering between hosts
JP4593575B2 (en) A common interface for each component of an embedded computer system
US20060195647A1 (en) System and method for memory hub-based expansion bus
JP4408263B2 (en) Data transfer system and data transfer method
US11385831B2 (en) Memory controller and storage device including the same
US8914592B2 (en) Data storage apparatus with nonvolatile memories and method for controlling nonvolatile memories
JP4699858B2 (en) Memory device and memory control method
US7934044B2 (en) Method for expediting data access of universal serial bus storage device
US10225425B2 (en) Information processing apparatus and method for controlling the same
CN113641603A (en) DDR arbitration and scheduling method and system based on AXI protocol
JP2008210088A (en) Memory controller, access control method for semiconductor memory and system
US8370564B2 (en) Access control device, information processing device, access control program and access control method
EP2998867B1 (en) Data writing method and memory system
JP2007213381A (en) Information processor
US20090313422A1 (en) Flash memory control apparatus having sequential writing procedure and method thereof
US8099530B2 (en) Data processing apparatus
US9667531B2 (en) Image processing apparatus and control method
JP6233287B2 (en) Memory access device, image processing device
JP2007264751A (en) Data transfer controller
US20090276553A1 (en) Controller, hard disk drive and control method
US7535792B2 (en) Data transmission control device, and data transmission control method
JP2007249662A (en) Memory card and control method of memory card
JP6590662B2 (en) Control device for controlling memory and memory power saving control method
JP5594127B2 (en) Electronic apparatus and image processing apparatus
WO2022180904A1 (en) Data recording device and control method for data recording device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110223

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: 20110301

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110303

R150 Certificate of patent or registration of utility model

Ref document number: 4699858

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150