[go: up one dir, main page]

JP2004047051A - Memory control device and method and program - Google Patents

Memory control device and method and program Download PDF

Info

Publication number
JP2004047051A
JP2004047051A JP2003136362A JP2003136362A JP2004047051A JP 2004047051 A JP2004047051 A JP 2004047051A JP 2003136362 A JP2003136362 A JP 2003136362A JP 2003136362 A JP2003136362 A JP 2003136362A JP 2004047051 A JP2004047051 A JP 2004047051A
Authority
JP
Japan
Prior art keywords
memory
data
area
unit
refresh
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003136362A
Other languages
Japanese (ja)
Inventor
Kenichi Kubota
憲一 窪田
Hiroyuki Wake
裕之 和氣
Junichiro Soeda
純一郎 添田
Masashige 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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2003136362A priority Critical patent/JP2004047051A/en
Publication of JP2004047051A publication Critical patent/JP2004047051A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Memory System (AREA)
  • Dram (AREA)

Abstract

【課題】効果的に電力消費を低減することができるメモリ制御装置を提供する。
【解決手段】本発明は、リフレッシュのための電力供給を単位領域毎に制御するメモリ制御装置である。判定部22は、確保要求をアプリケーションから受け付け、当該確保要求に基づいて、データがリフレッシュの必要があるか否かを判定する。次に、メモリ割当部23は、リフレッシュの必要があると判定されたデータに対しては第1のメモリバンク中のメモリ領域を割り当て、リフレッシュの必要がないと判定されたデータに対しては第2のメモリバンク中のメモリ領域を割り当てる。そして、メモリ制御部25は、第1のメモリバンクをリフレッシュを行うリフレッシュ領域に設定するとともに、第2のメモリバンクをリフレッシュを停止する非リフレッシュ領域に設定する。
【選択図】    図2
A memory control device capable of effectively reducing power consumption is provided.
The present invention is a memory control device that controls power supply for refresh for each unit area. The determination unit 22 receives a reservation request from the application, and determines whether data needs to be refreshed based on the reservation request. Next, the memory allocating unit 23 allocates a memory area in the first memory bank for data determined to need to be refreshed, and allocates a memory area for data determined to not need to be refreshed. A memory area in the second memory bank is allocated. Then, the memory control unit 25 sets the first memory bank as a refresh area for refreshing, and sets the second memory bank as a non-refresh area for stopping refreshing.
[Selection] Fig. 2

Description

【0001】
【発明の属する技術分野】
本発明は、メモリ制御装置に関し、より特定的には、定期的な電力供給を必要とするメモリの消費電力を制御するメモリ制御装置に関する。
【0002】
【従来の技術】
従来から、パソコンに代表されるデータ処理装置においては、ソフトウェアであるアプリケーションによって処理されるデータを記憶するために、DRAM(Dynamic RAM)や、高速で動作するSDRAM(Synchronous DRAM)等のメモリが主に用いられる。これらのメモリは、データをコンデンサの電荷に変換し保持する構造であるので、データを保持するためにコンデンサの再充電処理、すなわち定期的な電力供給(リフレッシュ)が必須となる。そのため、これらのメモリの電力消費は、リフレッシュの必要がないSRAM(Static RAM)に比べて高くなってしまう。
【0003】
そこで、従来、ハードウェアの機構を通してメモリの消費電力を制御することが一般的に行われている。また、ソフトウェアによる制御によってメモリの消費電力を制御するメモリ制御装置が考えられている(例えば、特許文献1参照)。かかる装置は、メモリが持つ複数のメモリバンクのいくつかに対するリフレッシュを省略することによって、全てのメモリバンクをリフレッシュする場合に比べて電力消費を抑えるものである。より具体的には、メモリ制御装置は、プログラムに対するメモリ領域の割り当ておよび解放の状況を管理する。そして、未使用のメモリバンクについてはリフレッシュを省略することによって、消費電力が低減される。なお、上記のメモリ制御装置において、データを圧縮したり2次記憶に退避することによって、リフレッシュ不要な未使用のメモリバンクを作ることも考えられている。
【0004】
一方、近年では、パソコン等に限らず情報家電端末においても、プログラム実行環境であるOS(Operating System)が搭載されるようになっている。このような情報家電端末においては省電力対策が必須であり、上記のようなメモリの省電力化の要求が高い。
【0005】
【特許文献1】
特開平9−212416号公報
【0006】
【発明が解決しようとする課題】
上述したように、従来のメモリ制御装置は、メモリが使用されているか否かに応じてリフレッシュを行うか否かを制御するものである。つまり、メモリにおける使用領域の割合が高ければ、リフレッシュが省略される領域は少なくなる。そして、メモリのほとんどの領域が使用されている場合、リフレッシュが省略される領域はほとんどなくなってしまう。以上のように、従来のメモリ制御装置では、メモリが使用されている割合によっては、省電力の効果をほとんど得られない場合があった。そのため、従来のメモリ制御装置を用いたデータ処理装置においては、効果的に電力消費を低減することができない場合があった。
【0007】
一方、従来のメモリ制御装置において、メモリに記憶されているデータの記憶位置を移動させることによって、電力消費をさらに低減することが考えられる。すなわち、あるメモリバンクに記憶されているデータを、他のメモリバンクの空いているメモリ領域に移動することによって、移動元のメモリバンクを未使用にする。これによって、移動元のメモリバンクはリフレッシュが不要になるので、電力消費をさらに低減することができると考えられる。しかし、データを移動させた場合、当該データを使用するアプリケーションに対してデータが移動したことを知らせる必要がある。つまり、電力消費をさらに低減させるためにデータを移動させようとする場合、データ移動の度にアプリケーションに対して通知を行わなければならない。さらに、アプリケーションは、メモリにおけるデータの記憶位置を変更する処理を行わなければならない。従って、データを移動させることによって多くの処理が必要となるという理由で、データの移動を行うことは困難であった。
【0008】
それゆえ、本発明の目的は、効果的に電力消費を低減することができるメモリ制御装置を提供することである。
【0009】
【課題を解決するための手段および発明の効果】
上記の目的を達成するため、本発明は以下の特徴を有する。すなわち、第1の発明は、記憶領域が複数の単位領域に分割されたメモリに対するリフレッシュのための電力供給を当該単位領域毎に制御するメモリ制御装置であって、
メモリにデータを記憶するメモリ領域を確保するための確保要求をアプリケーションから受け付け、当該確保要求に基づいて、当該データがリフレッシュの必要があるか否かを判定する判定部と、
リフレッシュの必要があると判定されたデータに対しては第1の単位領域中のメモリ領域を割り当て、リフレッシュの必要がないと判定されたデータに対しては第1の単位領域とは異なる第2の単位領域中のメモリ領域を割り当てるメモリ割当部と、
第1の単位領域をリフレッシュを行うリフレッシュ領域に設定するとともに、第2の単位領域をリフレッシュを停止する非リフレッシュ領域に設定するメモリ制御部とを備える。
【0010】
上記発明によれば、メモリに記憶されるデータのうち、リフレッシュの必要があるデータのみがリフレッシュ領域に記憶される。そして、当該リフレッシュ領域についてリフレッシュのための電力が供給され、非リフレッシュ領域には当該電力が供給されない。このように、メモリに記憶されるべきデータは、データが記憶される用途に応じてリフレッシュ領域および非リフレッシュ領域のいずれかに割り振られる。従って、たとえメモリの全ての領域が使用されていたとしても、リフレッシュの必要がないデータが記憶されている領域については、リフレッシュのための電力を消費しなくてよい。すなわち、本発明によれば、メモリが使用されている割合によらず、効果的に電力消費を低減することができる。
【0011】
第2の発明は、メモリ割当部は、前回のリフレッシュの際にリフレッシュ領域であった単位領域を第1の単位領域とし、前回のリフレッシュにおいて非リフレッシュ領域であった単位領域を第2の単位領域とする。
【0012】
上記発明によれば、リフレッシュを行う度に、単位領域毎にリフレッシュ領域および非リフレッシュ領域のいずれかを設定し直す必要がない。
【0013】
第3の発明は、メモリに記憶されているデータの記憶位置を移動させるデータ移動部をさらに備え、
メモリ割当部は、リフレッシュの必要がないと判定されたデータに対してメモリ領域を割り当てる際において、非リフレッシュ領域に空きがない場合、リフレッシュ領域に含まれる単位領域を第2の単位領域とし、
データ移動部は、リフレッシュの必要がないと判定されたデータに対してリフレッシュ領域に含まれる単位領域中のメモリ領域が割り当てられる場合、当該単位領域中にすでに記憶されているデータを、リフレッシュ領域における他の単位領域に移動させる。
【0014】
上記発明によれば、非フレッシュ領域に空きがないことが原因で、リフレッシュの必要がないデータがリフレッシュ領域に記憶されている場合、当該データが記憶されている単位領域中の他のデータ(リフレッシュの必要があるデータ)は、他の単位領域に移動される。従って、当該単位領域には、リフレッシュの必要がないデータのみが記憶されることとなる。その結果、当該単位領域についてリフレッシュを行う必要がなくなる。以上より、本発明によれば、データの移動を行わない場合に比べて、リフレッシュによる電力消費をさらに低減することができる。
【0015】
第4の発明は、メモリに記憶されている各データについて、アプリケーションに対して当該データの記憶位置を示すための論理アドレスと、当該データのメモリにおける実際の記憶位置を示す物理アドレスとを対応付けたメモリ情報を記憶するメモリ情報記憶部をさらに備え、
データ移動部は、データを移動させた場合、メモリ情報の内容について、当該データの物理アドレス、および物理アドレスと論理アドレスとの対応関係を変更する。
【0016】
上記発明によれば、データの移動が行われても、当該データの論理アドレスは変更されない。従って、データの移動がアプリケーションに影響を与えないので、データの移動に伴ってアプリケーション側の設定を変更する必要がない。つまり、かかる変更を考慮したアプリケーションを用意する必要がないので、より多くのアプリケーションに対して適用できるメモリ制御装置を実現することができる。
【0017】
第5の発明は、データ移動部は、CPUが所定のプログラム動作を実行することによって実現され、当該CPUの単位時間あたりの処理量が予め定められた所定量よりも小さい場合に、データの記憶位置の移動を行う。
【0018】
上記発明によれば、メモリ制御装置の処理負荷を平均化することができるので、メモリ制御装置の消費電力を低減することができる。
【0019】
第6の発明は、確保要求を生成することが可能な複数のアプリケーションについて処理優先度が設定されており、
データ移動部は、確保要求を生成したアプリケーションの処理優先度が他のアプリケーションに比べて低い場合に、データの記憶位置の移動を行う。
【0020】
上記発明によれば、メモリ制御装置の処理負荷を平均化することができるので、メモリ制御装置の消費電力を低減することができる。
【0021】
第7の発明は、判定部は、確保要求と、当該確保要求によって確保されるメモリ領域に記憶されるデータがリフレッシュの必要があるか否かを示す情報との対応を示す情報を記憶しておき、当該対応を示す情報を参照することによって、当該データがリフレッシュの必要があるか否かを判定する。
【0022】
上記発明によれば、リフレッシュの必要があるデータか否かについての判定を容易に行うことができる。
【0023】
第8の発明は、判定部は、データの必要保持期間がメモリのリフレッシュ周期よりも長いか短いかに応じて、当該データがリフレッシュの必要があるか否かを判定する。
【0024】
上記発明によれば、リフレッシュの必要があるデータか否かについて正確に判定することができる。
【0025】
第9の発明は、記憶領域が複数の単位領域に分割されたメモリに対するリフレッシュのための電力供給を当該単位領域毎に制御するメモリ制御装置であって、メモリに記憶されている各データについて、アプリケーションに対して当該データの記憶位置を示すための論理アドレスと、当該データのメモリにおける実際の記憶位置を示す物理アドレスとを対応付けたメモリ情報を記憶するメモリ情報記憶部と、
メモリの少なくとも1つの単位領域について、当該単位領域に記憶されている全てのデータの記憶位置を、データが記憶されている他の単位領域に移動させるとともに、メモリ情報の内容について、移動させたデータの物理アドレス、および物理アドレスと論理アドレスとの対応関係を変更するデータ移動部と、
メモリ情報に基づいて、データが記憶されている単位領域を、リフレッシュを行うリフレッシュ領域に設定するとともに、データが記憶されていない単位領域を、リフレッシュを停止する非リフレッシュ領域に設定するメモリ制御部とを備える。
【0026】
上記発明によれば、ある単位領域に記憶されているデータを他の単位領域に移動させることによって、データの移動元の単位領域に対してリフレッシュのための給電を停止することができる。それゆえ、効果的に電力消費を低減することができる。さらに、上記発明によれば、データの移動が行われても、当該データの論理アドレスは変更されない。従って、データの移動がアプリケーションに影響を与えないので、データの移動に伴ってアプリケーション側の設定を変更する必要がない。従って、アプリケーション側の設定の変更等に関連する処理を行う必要がないので、データの移動処理を容易に行うことができる。また、かかる変更を考慮したアプリケーションを用意する必要がないので、より多くのアプリケーションに対して適用できるメモリ制御装置を実現することができる。
【0027】
第10の発明は、記憶領域が複数の単位領域に分割されたメモリに対するリフレッシュのための電力供給を当該単位領域毎に制御するメモリ制御方法であって、
メモリにデータを記憶するメモリ領域を確保するための確保要求をアプリケーションから受け付け、当該確保要求に基づいて、当該データがリフレッシュの必要があるか否かを判定する判定ステップと、
リフレッシュの必要があると判定されたデータに対しては第1の単位領域中のメモリ領域を割り当て、リフレッシュの必要がないと判定されたデータに対しては第1の単位領域とは異なる第2の単位領域中のメモリ領域を割り当てるメモリ割当ステップと、
第1の単位領域をリフレッシュを行うリフレッシュ領域に設定するとともに、第2の単位領域をリフレッシュを停止する非リフレッシュ領域に設定するメモリ制御ステップとを備える。
【0028】
第11の発明は、記憶領域が複数の単位領域に分割されたメモリに対するリフレッシュのための電力供給を当該単位領域毎に制御するメモリ制御方法であって、
メモリに記憶されている各データについて、アプリケーションに対して当該データの記憶位置を示すための論理アドレスと、当該データのメモリにおける実際の記憶位置を示す物理アドレスとを対応付けたメモリ情報を記憶するメモリ情報を予め記憶しておき、
メモリの少なくとも1つの単位領域について、当該単位領域に記憶されている全てのデータの記憶位置を、データが記憶されている他の単位領域に移動させるとともに、メモリ情報の内容について、移動させたデータの物理アドレス、および物理アドレスと論理アドレスとの対応関係を変更するデータ移動ステップと、
メモリ情報に基づいて、データが記憶されていない単位領域を、リフレッシュを行うリフレッシュ領域に設定するとともに、データが記憶されていない単位領域を、リフレッシュを停止する非リフレッシュ領域に設定するメモリ制御ステップとを備える。
【0029】
第12の発明は、メモリを有するコンピュータに、第10または第11の発明に係るメモリ制御方法を実行させる、コンピュータ読み取り可能なプログラムである。
【0030】
【発明の実施の形態】
(実施の形態1)
まず、実施の形態1に係るメモリ制御装置について説明する。図1は、実施の形態1に係るメモリ制御装置のハードウェア構成の一例を示す図である。図1に示すメモリ制御装置1においては、データを記憶する主メモリ11と、プログラムの実行処理を行うCPU12と、画面やキー等の入出力装置13とが、バスを介して接続されている。主メモリ11は、例えばSDRAMのような、所定の時間間隔でリフレッシュが必要なメモリであり、CPU12におけるプログラム(アプリケーション)の実行処理において扱われるデータを記憶するために用いられる。図1に示すように、主メモリ11には、電源制御部111と、複数のメモリバンク(それぞれ、メモリバンクB1〜B4と呼ぶ。なお、「B1」〜「B4」は、後述するバンク番号を示す。)112〜115とが含まれる。なお、以下における実施形態の説明においては、説明の簡単のため、メモリバンクの数を4つとして説明を行う。
【0031】
実施の形態1においては、主メモリ11は、リフレッシュのための電力供給をメモリバンク112〜115毎に制御することが可能なメモリである。具体的には、CPU12は、各メモリバンク112〜115についてリフレッシュを行うか否かを主メモリ11に指示する。電源制御部111は、CPU12からの指示に従って、各メモリバンク112〜115を単位としてリフレッシュを行う。なお、以下の説明においては、リフレッシュが行われる周期、すなわち、前回のリフレッシュが行われてから次のリフレッシュが行われるまでの時間をリフレッシュ周期と呼ぶ。また、主メモリ11のメモリ領域(メモリバンク112〜115)のうち、リフレッシュが行われる(電源制御部111によって電力が供給される)領域をリフレッシュ領域と呼び、リフレッシュが行われない(電源制御部111によって電力が供給されない)領域を非リフレッシュ領域と呼ぶ。
【0032】
なお、他の実施の形態においては、CPU12は、その内部に内部メモリ(例えばSRAMで構成される。)やキャッシュを搭載する構成であってもよい。このような構成である場合、CPU12で扱われるデータが記憶される記憶媒体は、高速に参照する度合いに応じて、キャッシュ、内部メモリ、主メモリ11の順番で選択される。
【0033】
図2は、実施の形態1に係るメモリ制御装置の機能的な構成を示すブロック図である。図2において、メモリ制御装置1は、図1に示す主メモリ11を制御するための構成として、アプリケーション実行部21と、判定部22と、メモリ割当部23と、メモリ情報記憶部24と、メモリ制御部25と、電力検知部26とを備えている。これらの構成要素は、CPU12が所定のプログラム動作を行うことによって実現される。さらに、典型的には、判定部22、メモリ割当部23、メモリ情報記憶部24およびメモリ制御部25は、メモリ制御装置1に搭載されるOSの機能の一部として実現される。
【0034】
アプリケーション実行部21は、メモリ制御装置1に格納されている種々のアプリケーションを実行する。このアプリケーションの実行中にデータが主メモリ11に書き込まれる。主メモリ11にデータを書き込む際、アプリケーション実行部21によって実行されるアプリケーションによって、データを主メモリ11に記憶するための確保要求が生成される。確保要求とは、主メモリ11上のメモリ領域を、データを記憶するために確保する要求である。なお、確保要求は、単にメモリ領域を確保することのみの要求に限らず、メモリ領域を確保することとともに、当該確保されたメモリ領域にデータを書き込むことを含む要求であってもよい。また、以下の説明では、確保要求によって確保される主メモリ11上のメモリ領域に書き込まれるデータを、対象データと呼ぶ。
【0035】
判定部22は、上記確保要求をアプリケーションから受け付ける。そして、受け付けられた確保要求に係る対象データが、リフレッシュを行う必要があるか否か判定する。実施の形態1においては、「リフレッシュを行う必要があるか否か」とは、「データの主メモリ11内での必要保持期間がリフレッシュ周期よりも長いか短いか」という意味である。ここで、必要保持期間とは、データの格納が終了した時点からデータの読み出しが終了する時点までの時間をいう。つまり、リフレッシュを行う必要のないデータとは、必要保持期間がリフレッシュ周期に比して短いデータである。このようなデータであれば、リフレッシュ周期を超えて保持する必要がないので、このようなデータのみを格納するメモリバンクは、リフレッシュを行う必要がない。実施の形態1に係るメモリ制御装置1は、リフレッシュが必要なデータと不要なデータとを判別し、それぞれ異なるメモリバンクに書き込む。そして、リフレッシュ不要なデータが書き込まれたメモリバンクについてはリフレッシュを行わないように制御することによって、リフレッシュによる電力消費を低減することを可能とするのである。
【0036】
なお、本実施の形態においては、「リフレッシュを行う必要のないデータ」の条件を、「必要保持期間がリフレッシュ周期に比して短いこと」とした。ここで、他の実施の形態においては、「リフレッシュを行う必要のないデータ」の条件を、「必要保持期間がリフレッシュ周期に比して短いこと」に加え、「データの読み出しが終了した後にはアプリケーションから参照されないこと」としてもよい。
【0037】
なお、判定部22におけるリフレッシュが必要であるか否かの判定は、上記確保要求に基づいて行われる。具体的には、アプリケーションからの種々の確保要求のそれぞれに対して、リフレッシュが必要であるか不要であるかを予め決定しておく。典型的には、確保要求とリフレッシュが必要であるか否かを示す情報とを対応付けたテーブルを判定部22において用意しておく。そして、判定部22がアプリケーションによる確保要求を受け付けた際には、当該テーブルを参照することによってリフレッシュが必要であるか否かを判定する。なお、リフレッシュ周期は一般的に10〜100μsecのオーダーである。また、CPU12の動作速度が数十MHzであるとすると数百サイクルの限られた処理の間の時間となる。従って、この時間以内にデータの格納からデータの読み出しまでの処理が終了すると考えられる確保要求については、リフレッシュが不要であると決定しておけばよい。
【0038】
例えば、アプリケーションからの確保要求の中に、対象データの出力先を示す情報が含まれている場合、当該情報によってリフレッシュが必要であるか否かを判定することができる。例えば、対象データをハードディスクに書き込むための確保要求である場合、ハードディスクへの書き込みには時間を要するので、主メモリ11に対象データを格納しておく時間も比較的長くなる。従って、かかる確保要求はリフレッシュが必要であると判定される。一方、LAN等の高速な通信回線に対象データを送出するための確保要求である場合、主メモリ11に対象データを格納しておく時間は短くてよい。従って、かかる確保要求はリフレッシュが不要であると判定される。以上のように、確保要求に含まれる一部の情報を用いて、リフレッシュが必要であるか否かを判定してもよい。なお、対象データの出力先のように、メモリを使用する用途を示す情報を用途情報と呼ぶ。
【0039】
なお、リフレッシュが不要な対象データの一例として、トランザクションの保証処理の際のデータがある。トランザクションの保証処理とは、装置の電力が急に切断された場合に、次に装置を起動した際におけるシステムの無矛盾性を保証するために、切断直前に行われていた処理のデータを例えば10μsec以内に緊急的に退避するというような処理である。また、リフレッシュが不要な対象データとしては、タイマ処理や割り込みハンドラといった、短時間で完了することが保証されている処理で用いられるデータも考えられる。
【0040】
さらに、リフレッシュが不要な対象データの他の例としては、CPU12がキャッシュおよび内部メモリを有する場合、当該キャッシュまたは内部メモリにデータを格納する際に、主メモリ11に一時的に退避されるデータもある。また、画像データを表示するために複数の部品データを全体の画像データに重ね合わせる処理を行う場合における各部品のデータも、リフレッシュが不要であるデータと考えられる。その他、動画像データの処理において、1つ前の画像に基づいて次の画像を生成する処理が行われる場合、当該1つ前の画像からの変更割合を示すデータも、リフレッシュが不要であるデータと考えられる。
【0041】
図2において、メモリ割当部23は、判定部22によってリフレッシュの必要があると判定された対象データに対してはリフレッシュ領域のメモリバンク中のメモリ領域を割り当てる。一方、リフレッシュの必要がないと判定された対象データに対しては非リフレッシュ領域のメモリバンク中のメモリ領域を割り当てる。つまり、メモリ割当部23は、判定部22の判定結果に応じて、リフレッシュ領域および非リフレッシュ領域のいずれかに属するメモリバンク中のメモリ領域を対象データのために確保する。なお、主メモリ11の各メモリバンク112〜115のうち、いずれの領域がリフレッシュ領域に設定され、いずれの領域が非リフレッシュ領域に設定されているのかについては、メモリ情報記憶部24に記憶されているメモリ情報によって示される。
【0042】
メモリ情報記憶部24は、主メモリ11の各メモリバンク112〜115について、リフレッシュ領域であるか、または非リフレッシュ領域であるか等を示すメモリ情報を記憶する。以下、メモリ情報の詳細を説明する。
【0043】
図3は、実施の形態1に係るメモリ情報の例を示す図である。図3に示すように、メモリ情報には、アプリケーションID(図3では、「ApID」と示す。)と、論理アドレスと、物理アドレスと、バンク番号と、リフレッシュ情報とが含まれる。アプリケーションIDは、アプリケーション実行部21によって実行される種々のアプリケーションを識別するための情報である。バンク番号は、4つのメモリバンクを識別するための情報である。リフレッシュ情報は、メモリバンクをリフレッシュするか否かを示す情報である。図3では、リフレッシュ情報は、リフレッシュが行われることを示す「1」またはリフレッシュが行われないことを示す「0」のいずれかで表現される。
【0044】
論理アドレスは、アプリケーションに対して主メモリ11におけるデータの記憶位置を示すための情報である。つまり、アプリケーションは、論理アドレスによってデータの記憶位置を管理する。論理アドレスは、例えば「P10」や「P11」といったページ番号として表現される。物理アドレスは、主メモリ11におけるデータの実際の記憶位置を示す情報である。実施の形態1では、メモリ情報には、論理アドレスは物理アドレスと対応付けられた構成で格納される。この構成によって、主メモリ11においてデータの記憶位置が移動された場合、すなわち、当該データの物理アドレスが変更された場合であっても、論理アドレスを変換する必要がない。すなわち、あるデータの物理アドレスが変更された場合であっても、物理アドレスと論理アドレスとの対応を変更すれば、当該データの論理アドレスを変更する必要がない。アプリケーションは論理アドレスによってデータの記憶位置を管理するので、論理アドレスと物理アドレスとを対応付ける構成によって、アプリケーションは、主メモリ11においてデータの記憶位置が変更されても当該変更の影響を受けない。
【0045】
メモリ制御部25は、リフレッシュを行うメモリバンクを電源制御部111に対して指示する。つまり、各メモリバンク112〜115に対してリフレッシュ領域および非リフレッシュ領域のいずれかを設定する。具体的には、リフレッシュの必要がある対象データに対して割り当てられたメモリ領域を含むメモリバンクをリフレッシュ領域に設定する。逆に、リフレッシュの必要がない対象データに対して割り当てられたメモリ領域を含むメモリバンクを非リフレッシュ領域に設定する。さらに、メモリ制御部25は、リフレッシュ領域から非リフレッシュ領域への変更または非リフレッシュ領域からリフレッシュ領域への変更に関して、主メモリ11をメモリバンク112〜115を単位として制御する。その他、メモリ制御部25は、アプリケーションから渡されたデータを主メモリ11に書き込む。
【0046】
電力検知部26は、メモリ制御装置1に供給される電力が、装置内部の電池によるものであるか、または、装置外部の電源によるもの(例えば、ACアダプタを使用する場合)であるかを検知する。
【0047】
次に、実施の形態1に係るメモリ制御装置1の動作を説明する。具体的には、主メモリ11にデータを記憶するための上記確保要求がアプリケーションによって生成された場合に、当該確保要求に基づいて、当該データを記憶するためのメモリ領域を割り当てる際の動作を説明する。
【0048】
図4は、実施の形態1に係るメモリ制御装置1の処理の流れを示すフローチャートである。まず、ステップS1において、判定部22は、上記確保要求をアプリケーションから受け付ける。続くステップS2において、電力検知部26は、メモリ制御装置1に現在供給されている電力が装置内部の電池によるものであるか、それとも、外部電源によるものであるかを判定する。ステップS2の判定の結果、メモリ制御装置1の電力が装置内部の電池によって供給されていると判定された場合、ステップS3の処理が行われる。具体的には、ステップS1の判定結果は電力検知部26から判定部22へ渡され、当該判定結果を受け取った判定部22がステップS3の処理を行う。一方、ステップS2の判定の結果、メモリ制御装置1の電力が外部電源によって供給されていると判定された場合、ステップS4の処理が行われる。具体的には、ステップS1の判定結果は電力検知部26からメモリ割当部23へ渡され、当該判定結果を受け取ったメモリ割当部23がステップS4の処理を行う。
【0049】
以上のように、実施の形態1においては、装置内部の電池が電源である場合にのみ、電力消費を抑えるためにステップS3の判定を行っている。換言すれば、外部電源から電力が供給される場合には電力消費を低減する必要性が低いので、電力消費を抑えるための処理を行わない。このように、実施の形態1においては、真に必要な場合にのみ電力消費を抑えるための処理を行っている。なお、上記においては、外部電源から電力が供給される場合にステップS4以降の処理を行っているが、他の実施形態においては、外部電源から電力が供給される場合には、任意のメモリ領域を対象データに割り当て、全てのメモリバンク112〜115をリフレッシュ領域に設定するようにしてもよい。
【0050】
ステップS3において、判定部22は、ステップS1で受け付けた確保要求に基づいて、対象データはリフレッシュを行う必要があるか否かを判定する。この判定は、具体的には、上述したように、確保要求とリフレッシュが必要であるか否かを示す情報とを対応付けたテーブルを参照することによって行われる。判定部22は、ステップS3の判定結果をメモリ割当部23に渡す。メモリ割当部23は、当該判定結果に応じてステップS4またはステップS6の処理を行う。すなわち、ステップS3において対象データはリフレッシュを行う必要があると判定された場合、ステップS4の処理が行われる。一方、ステップS3において対象データはリフレッシュを行う必要がないと判定された場合、ステップS6の処理が行われる。
【0051】
ステップS4において、メモリ割当部23は、リフレッシュ領域に空きがあるか否かを判定する。この判定の結果、リフレッシュ領域に空きがある場合、すなわち、リフレッシュ領域における空き領域が対象データを記憶するのに必要な領域よりも大きい場合、ステップS7の処理が行われる。一方、リフレッシュ領域に空きがない場合、すなわち、対象データを記憶するのに必要な領域がリフレッシュ領域において不足している場合、ステップS5の処理が行われる。なお、リフレッシュ領域に空きがあるか否かの判定は、メモリ情報記憶部24に記憶されているメモリ情報を参照することによって行うことができる。
【0052】
ステップS5において、メモリ割当部23は、非リフレッシュ領域に空きがあるか否かを判定する。この判定は、リフレッシュ領域であるか非リフレッシュ領域であるかという点で異なる以外は、ステップS4の判定と同様である。この判定の結果、非リフレッシュ領域に空きがある場合、ステップS8の処理が行われる。一方、ステップS5において非リフレッシュ領域に空きがない場合とは、リフレッシュ領域にも非リフレッシュ領域にも対象データを記憶するだけの空き領域がない場合である。従って、この場合、メモリ割り当てが失敗したとして処理を終了する。
【0053】
ステップS6において、メモリ割当部23は、非リフレッシュ領域に空きがあるか否かを判定する。この判定は、ステップS5の判定と同様である。この判定の結果、非リフレッシュ領域に空きがある場合、ステップS8の処理が行われる。一方、非リフレッシュ領域に空きがない場合、ステップS4の処理が行われる。
【0054】
ステップS7において、メモリ割当部23は、対象データに対してリフレッシュ領域のメモリを割り当てる。つまり、対象データを記憶するためのメモリ領域をリフレッシュ領域の中で確保する。ここで、対象データにリフレッシュ領域のメモリが割り当てられるのは、次の2つの場合である。すなわち、(1)対象データがリフレッシュが必要なデータであり(ステップS3で肯定)、かつ、リフレッシュ領域に空きがある(ステップS4で肯定)場合、および、(2)対象データがリフレッシュが不要なデータであり(ステップS3で否定)、かつ、(非リフレッシュ領域に空きがなく(ステップS6で否定))リフレッシュ領域のみに空きがある(ステップS4で肯定)場合である。なお、ステップS7の処理の終了によって、図4に示す処理が終了する。
【0055】
ステップS8において、メモリ割当部23は、対象データに対して非リフレッシュ領域のメモリを割り当てる。つまり、対象データを記憶するためのメモリ領域を非リフレッシュ領域の中で確保する。ここで、対象データに非リフレッシュ領域のメモリが割り当てられるのは、次の2つの場合である。すなわち、(3)対象データがリフレッシュが不要なデータであり(ステップS3で否定)、かつ、非リフレッシュ領域に空きがある(ステップS6で肯定)場合、および、(4)対象データがリフレッシュが必要なデータであり(ステップS3で肯定)、かつ、(リフレッシュ領域に空きがなく(ステップS4で否定))非リフレッシュ領域のみに空きがある(ステップS5で肯定)場合である。
【0056】
ステップS8の次に、ステップS9において、メモリ割当部23は、対象データがリフレッシュが必要なデータであるか否かを判定する。上述したように、ステップS8の処理が行われる場合としては、上記(3)の場合および(4)の場合が考えられる。ステップS9の判定では、上記(3)の場合および(4)の場合のいずれであるかを判定する。具体的には、ステップS3の判定結果が肯定であった場合(上記(3)の場合)、対象データがリフレッシュが必要なデータであると判定され、ステップS10の処理が行われる。逆に、ステップS3の判定結果が否定であった場合(上記(4)の場合)、対象データがリフレッシュが不要なデータであると判定される。これにより、図4に示す処理が終了する。
【0057】
ステップS10において、メモリ制御部25は、ステップS8において割り当てられたメモリ領域を含むメモリバンクをリフレッシュ領域に変更する。上記ステップS9から明らかなように、ステップS10の処理が行われる場合、対象データはリフレッシュが必要なデータである。従って、この場合、リフレッシュが必要なデータが非リフレッシュ領域に記憶されてしまう。そこで、ステップS10において、リフレッシュが必要なデータが記憶される非リフレッシュ領域をリフレッシュ領域に変更するのである。これによって、リフレッシュが必要なデータを確実に保持することができる。なお、ステップS10における非リフレッシュ領域からリフレッシュ領域の変更を反映させるように、メモリ制御部25はメモリ情報記憶部24に記憶されているメモリ情報を更新する。ステップS10の処理の終了によって、図4に示す処理が終了する。
【0058】
なお、上記ステップS9およびS10の処理は、メモリ領域の割り当て(ステップS8)を実行した直後に行う必要はない。当該処理は、例えば、割り当てられたメモリ領域に対象データが実際に書き込まれる直前に行われてもよい。
【0059】
以上のように、実施の形態1によれば、対象データは、リフレッシュが必要であるか否かに応じて、リフレッシュ領域に記憶される対象データと非リフレッシュ領域に記憶される対象データとに振り分けられる。従って、リフレッシュ領域として設定されているメモリバンクのみについてリフレッシュを行うことによって、必要なデータのみに対してリフレッシュを行うことができる。すなわち、リフレッシュに要する電力を効果的に低減することができる。
【0060】
また、実施の形態1によれば、リフレッシュが必要であるか否かは、確保要求の内容に基づいて判定される。つまり、主メモリ11へデータを書き込む用途に応じて、リフレッシュが必要であるか否かが判定されることとなる。従って、実施の形態1によれば、主メモリ11へデータを書き込む用途に応じて、一時的にのみ記憶しておけばよいデータと永続的に保持しておくべきデータとを判別することができると言える。そして、リフレッシュの必要がある、永続的に保持しておくべきデータのみに対してリフレッシュを行うことによって、消費電力を低減することができる。
【0061】
なお、実施の形態1において、判定部22、メモリ割当部23、メモリ情報記憶部24およびメモリ制御部25をOSの機能として実現することによって、アプリケーション自体について特別な設定を行わなくとも、本発明を適用することができる。つまり、アプリケーションの機能とは無関係に本発明を適用することができる。従って、消費電力の低減があまり重要とされない装置のアプリケーションを、消費電力の低減が必要とされる装置に移植して動作させる場合においても、本発明を容易に適用することができる。
【0062】
なお、以上の説明においては、確保要求に含まれる用途情報の例として、対象データの出力先を示す情報を挙げたが、用途情報はこれに限定されない。例えば、データをリフレッシュ領域に書き込むか、それとも非リフレッシュ領域に書き込むかを示す情報を用途情報として確保要求に含ませてもよい。これによれば、データをリフレッシュ領域に書き込むか、それとも非リフレッシュ領域に書き込むかをアプリケーションが指定することができる。
【0063】
また、判定部22におけるリフレッシュが必要か否かの判定は、上記用途情報に基づいて行われる方法の他、少なくとも2つの異なるAPI(Application Program Interface)を用いる方法であってもよい。具体的には、判定部22として、データをリフレッシュ領域に書き込むためのAPIと、データを非リフレッシュ領域に書き込むためのAPIとを用意する。そして、アプリケーションがいずれかのAPIを選択することによって、リフレッシュが必要か否かの判定が行われることとなる。この方法によれば、データをリフレッシュ領域に書き込むか、それとも非リフレッシュ領域に書き込むかをアプリケーションが指定することができる。なお、上記のように判定部22においてAPIが用いられる場合、データを非リフレッシュ領域に書き込むためのAPIとして、特殊メモリAPIが考えられる。特殊メモリAPIとは、例えば、アプリケーションにエラーなどの障害があった場合にのみデータ書込の処理を行うAPIをいう。
【0064】
なお、リフレッシュ領域または非リフレッシュ領域のいずれにデータを書き込むかについてアプリケーションが指定することが可能な場合において、さらに、アプリケーションが非リフレッシュ領域に記憶されたデータの欠損を検出することが可能であり、欠損があればそのデータを破棄して再構築することが可能である場合を考える。この場合には、アプリケーションは、より多くのデータを非リフレッシュ領域に書き込むように指定することが可能になる。これによって、電力消費をさらに低減させることができる。
【0065】
また、実施の形態1においては、メモリ領域の割り当て処理を行うタイミングは限定されなかったが、他の実施の形態においては、例えば次に示すタイミングで行うようにしてもよい。例えば、CPU12の負荷が低い場合に、メモリ領域の割り当て処理を行うようにしてもよい。また、確保要求を生成したアプリケーションの処理優先度が他のアプリケーションに比べて低い場合に、メモリ領域の割り当て処理を行うようにしてもよい。これらのようにCPU12の処理を分散することによって、メモリ制御装置1の処理負荷を平均化することができ、消費電力を低減することができる。
【0066】
(実施の形態2)
次に、実施の形態2に係るメモリ制御装置について説明する。図5は、本発明の実施の形態2に係るメモリ制御装置の機能的な構成を示すブロック図である。なお、実施の形態2に係るメモリ制御装置は、データ移動部27をさらに含む点以外は、実施の形態1に係るメモリ制御装置と同様である。
【0067】
データ移動部27は、メモリバンクに記憶されているデータを、他のメモリバンクに移動させる。特に、データ移動部27は、リフレッシュ領域のメモリバンクにおいてリフレッシュの必要がないデータが記憶されている場合、当該メモリバンク中にすでに書き込まれている他のデータ(リフレッシュの必要があるデータ)を、リフレッシュ領域の他のメモリバンクに移動させる。
【0068】
次に、実施の形態2に係るメモリ制御装置の動作を説明する。図6は、実施の形態2に係るメモリ制御装置の処理の流れを示すフローチャートである。ここで、図6において、図4と異なる点は、ステップS11〜S13の処理のみである。従って、以下ではステップS11〜S13の処理を主に説明する。
【0069】
実施の形態2においては、ステップS7の次に、ステップS11の処理が実行される。すなわち、ステップS11において、メモリ割当部23は、対象データがリフレッシュが必要なデータであるか否かを判定する。この判定は、ステップS3の判定結果に基づいて行われる。すなわち、ステップS3の判定結果が肯定であった場合、対象データがリフレッシュが必要なデータであると判定される。この場合、図6に示す処理が終了する。逆に、ステップS3の判定結果が否定であった場合、対象データがリフレッシュが不要なデータであると判定される。この場合、ステップS12の処理が実行される。
【0070】
ステップS12において、データ移動部27は、データの移動を行う。具体的には、ステップS7において割り当てられた領域を含むメモリバンク中にすでに書き込まれているデータを、リフレッシュ領域の他のメモリバンクに移動させる。これによって、ステップS7において割り当てられた領域を含むメモリバンクには、ステップS7において領域が割り当てられたデータ(リフレッシュが不要なデータ)のみが記憶されることとなる。
【0071】
ステップS12の次に、ステップS13において、メモリ制御部25は、ステップS7において割り当てられたメモリ領域を含むメモリバンクを非リフレッシュ領域に変更する。上述したように、ステップS12の処理によって、当該メモリバンクにはリフレッシュが不要なデータのみが記憶され、その他のデータは移動されることとなる。従って、当該メモリバンクを非リフレッシュ領域に変更しても問題はない。これによって、リフレッシュによる電力消費が小さくなる。なお、ステップS13におけるリフレッシュ領域から非リフレッシュ領域の変更およびデータの移動を反映させるように、メモリ制御部25はメモリ情報記憶部24に記憶されているメモリ情報を更新する。ステップS13の処理の終了によって、図6に示す処理が終了する。
【0072】
以上のように、実施の形態2によれば、リフレッシュの必要がないと判定されたデータに対して、リフレッシュ領域に含まれるメモリバンク中のメモリ領域が割り当てられる場合、当該メモリバンク中にすでに記憶されているデータは、リフレッシュ領域における他のメモリバンクに移動される。これによって、リフレッシュの必要がないと判定されたデータに割り当てられるメモリ領域を含むメモリバンクは、非リフレッシュ領域に変更することが可能となる。従って、非リフレッシュ領域となるメモリバンクを増加することができるので、リフレッシュによる電力消費をさらに低減することができる。
【0073】
次に、非フレッシュ領域に空きがないためにデータを移動させる場合の具体例を示す。図7は、データを移動させる前のメモリ情報の内容を示す図である。なお、図7においては、図面を見やすくするため、“Ap3”のアプリケーション以外のアプリケーションのデータについては、論理アドレスと物理アドレスとの対応を示す線を省略して記載している。また、図中の黒丸は、データが記憶されているメモリ領域を示し、白丸は、データが記憶されていないメモリ領域を示す。さらに、図7においては、非リフレッシュ領域である、バンク番号がB4であるメモリバンク115には空きがないものとする。以上のような状態において、Ap3のアプリケーションによって、リフレッシュの必要がない新たなデータ(論理アドレスがP34で示される。)が書き込まれる場合を説明する。
【0074】
図8は、データを移動させた後のメモリ情報の内容を示す図である。まず、図7の状態では、非リフレッシュ領域に空きがないので、新たなデータに対して、リフレッシュ領域のメモリ領域が割り当てられる(ステップS7)。ここでは、新たなデータは、バンク番号がB3であるメモリバンク114に割り当てられるものとする。
【0075】
新たなデータがバンク番号がB3であるメモリバンク114に割り当てられた結果、当該メモリバンク114には、リフレッシュの必要があるデータおよび必要がないデータの両方が記憶されることとなる(なお、実施の形態1では、この状態で保持される。)。実施の形態2では、ページ番号P32およびP33で示されるデータ(リフレッシュの必要があるデータ)は、リフレッシュ領域の他のメモリバンクに移動される(ステップS12)。ここでは、ページ番号P32で示されるデータは、バンク番号B1のメモリバンク112に移動され、ページ番号P33で示されるデータは、バンク番号B2のメモリバンク113に移動される。これによって、メモリバンク114には、リフレッシュの必要がない、ページ番号P34のデータのみが記憶されることとなる。そこで、メモリバンク114は、非リフレッシュ領域に設定される(ステップS13)。
【0076】
以上のように、上記実施の形態1および2によれば、主メモリ11に記憶されるデータのうち、リフレッシュの必要があるデータのみがリフレッシュ領域に記憶される。そして、当該リフレッシュ領域についてリフレッシュのための電力が供給され、非リフレッシュ領域には当該電力が供給されない。従って、たとえ主メモリ11の全ての領域が使用されていたとしても、リフレッシュの必要がないデータが記憶されている領域については、リフレッシュのための電力を消費しなくてよい。すなわち、主メモリ11が使用されている割合によらず、効果的に電力消費を低減することができる。
【0077】
(実施の形態3)
次に、実施の形態3に係るメモリ制御装置について説明する。実施の形態3においては、実施の形態1および2と異なり、主メモリ11に記憶される全てのデータに対してリフレッシュを行う。つまり、対象データについて、リフレッシュの必要があるか否かを判定しない。実施の形態3に係るメモリ制御装置は、主メモリ11に記憶されているデータを移動することによって、データを記憶しないメモリバンクを増やす処理を行う。この処理によって、メモリ制御装置は、リフレッシュを行うメモリバンクの数を減らし、リフレッシュによる電力消費を低減するのである。
【0078】
図9は、本発明の実施の形態3に係るメモリ制御装置の機能的な構成を示すブロック図である。なお、実施の形態3に係るメモリ制御装置の機能的な構成は、判定部22および電力検知部26を含まない点以外は、実施の形態2に係るメモリ制御装置と同様である。なお、以下では、図9に示す各部について、実施の形態1および2との相違点を主に説明し、実施の形態1および2と同様の部分については説明を省略する。
【0079】
実施の形態3においては、メモリ割当部23は、対象データに対してどのようなメモリ領域を割り当ててもよい。すなわち、実施の形態3においては、対象データの用途とは無関係に、主メモリ11中のいずれかのメモリ領域に対象データが書き込まれることとなる。なお、メモリ情報記憶部24は、実施の形態1および2と同様である。
【0080】
メモリ制御部25は、実施の形態1および2と同様、リフレッシュを行うメモリバンクを電源制御部111に対して指示する。ここで、実施の形態3においては、メモリ制御部25は、データが記憶されているメモリバンクをリフレッシュ領域に設定し、データが記憶されていないメモリバンクを非リフレッシュ領域に設定する。すなわち、実施の形態3においては、メモリバンクが記憶しているデータの用途に応じてリフレッシュのための電力を供給するか否かが決定されるのではなく、データを記憶している全てのメモリバンクに対して電力が供給される。なお、各メモリバンクにおけるデータの記憶状況は、メモリ情報記憶部24に記憶されているメモリ情報を参照することによって知ることができる。
【0081】
データ移動部27は、所定のメモリバンク(後述する「移動元のメモリバンク)に記憶されている全てのデータの記憶位置を、データが記憶されている他のメモリバンク(後述する「移動先のメモリバンク」)に移動させる。さらに、データ移動部27は、メモリ情報の内容について、移動させたデータの物理アドレス、および物理アドレスと論理アドレスとの対応関係を変更する。以下、実施の形態3におけるメモリ制御装置のデータ移動処理を説明する。
【0082】
図10は、実施の形態3におけるメモリ制御装置の処理の流れを示すフローチャートである。まず、ステップS21において、データ移動部27は、データの移動を行うか否かを判定する。つまり、データの移動を行うタイミングが来たか否かを判定する。具体的には、データ移動部27は、一定時間間隔の度にデータの移動を行うと判定してもよいし、主メモリ11に対してデータの書き込みまたは削除が行われた場合、データの移動を行うと判定してもよい。ステップS21の判定の結果、データの移動を行うと判定された場合、ステップS22の処理が行われる。一方、ステップS21の判定の結果、データの移動を行わないと判定された場合、ステップS21の処理が繰り返される。すなわち、データ移動部27は、データの移動を行うタイミングが来るまで待機する。
【0083】
ステップS22において、データ移動部27は、4つのメモリバンク112〜115の中から、移動元のメモリバンクを決定する。例えば、4つのメモリバンク112〜115のうち、記憶しているデータ量が最も少ない(データを記憶しているメモリ領域が最も小さい)メモリバンクが、移動元のメモリバンクに決定される。なお、複数のメモリバンクが、移動元のメモリバンクに決定されてもよい。
【0084】
ステップS22の次に、ステップS23において、データ移動部27は、移動先のメモリバンクを決定する。移動先のメモリバンクは、データを記憶しているメモリバンク(すなわち、リフレッシュ領域に含まれるメモリバンク)の中から選ばれる。例えば、上記移動元のメモリバンク以外のメモリバンクであって、記憶しているデータ量が最も少ないメモリバンクが、移動先のメモリバンクに決定される。なお、複数のメモリバンクが、移動先のメモリバンクに決定されてもよい。続くステップS24において、データ移動部27は、データの移動が可能であるか否かを判定する。具体的には、移動元のメモリバンクに記憶されているデータ量(移動元のメモリバンクが複数である場合は、各メモリバンクのデータの量の和)が、移動先のメモリバンクの空き容量(移動先のメモリバンクが複数である場合は、各メモリバンクの空き容量の和)よりも小さいか否かが判定される。ステップS24の判定の結果、データの移動が可能であると判定された場合、ステップS25の処理が行われる。一方、ステップS24の判定の結果、データの移動が不可能であると判定された場合、ステップS21の処理に戻る。
【0085】
ステップS25において、データ移動部27は、移動元のメモリバンクに記憶されている全てのデータの記憶位置を、移動先のメモリバンクに移動させる。さらに、データ移動部27は、ステップS25におけるデータの移動を反映させるように、メモリ情報記憶部24に記憶されているメモリ情報を更新する。続くステップS26において、メモリ制御部25は、移動元のメモリバンクを非リフレッシュ領域に変更する。ステップS26によって、1回のデータ移動処理が終了し、処理はステップS21に戻る。
【0086】
次に、実施の形態3におけるデータ移動処理を行う場合の具体例を示す。図11は、データを移動させる前のメモリ情報の内容を示す図である。なお、図11においては、図面を見やすくするため、データ移動処理の対象となるデータ(論理アドレスが“P15”であるデータ以外のデータについては、論理アドレスと物理アドレスとの対応を示す線を省略して記載している。また、バンク番号がB4であるメモリバンク115は非リフレッシュ領域に設定され、それ以外のメモリバンク112〜114はリフレッシュ領域に設定されている。以上のような状態において、データ移動処理を行う場合の具体例を説明する。
【0087】
まず、図11の状態において、データを移動させるタイミングがくると、データ移動部27は、移動元のメモリバンクを決定する(ステップS22)。ここでは、バンク番号がB3であるメモリバンク114が移動元のメモリバンクに決定されたものとする。さらに、データ移動部27は、移動先のメモリバンクを決定する(ステップS23)。ここでは、バンク番号がB1であるメモリバンク112が移動元のメモリバンクに決定されたものとする。その結果、論理アドレスが“P15”であるデータは、バンクB1であるメモリバンク112へ移動される。
【0088】
図12は、データを移動させた後のメモリ情報の内容を示す図である。図12に示すように、データが移動された結果、バンク番号がB3であるメモリバンク114にはデータが記憶されていないこととなる。従って、メモリ制御部25は、当該メモリバンク114を非リフレッシュ領域に変更する(ステップS26)。これによって、データの移動前後において、リフレッシュを行うメモリバンクが1つ減少するので、リフレッシュのための電力を低減することができる。
【0089】
以上のように、実施の形態3によれば、データを移動させることによってリフレッシュの必要なメモリバンクの数を減らすことができる。それによって、リフレッシュのための電力を低減することができる。さらに、実施の形態3によれば、論理アドレスと物理アドレスとの対応を示すメモリ情報を用いることによって、アプリケーション側にデータの移動を通知する必要がない。従って、データの移動がアプリケーションに影響を与えないので、データの移動に伴ってアプリケーション側の設定を変更する必要がない。そのため、アプリケーション側の設定の変更等に関連する処理を行う必要がないので、データの移動処理を容易に行うことができる。また、かかる変更を考慮したアプリケーションを用意する必要がないので、より多くのアプリケーションに対して適用できるメモリ制御装置を実現することができる。
【図面の簡単な説明】
【図1】実施の形態1に係るメモリ制御装置のハードウェア構成の一例を示す図である。
【図2】実施の形態1に係るメモリ制御装置の機能的な構成を示すブロック図である。
【図3】実施の形態1に係るメモリ情報の例を示す図である。
【図4】実施の形態1に係るメモリ制御装置の処理の流れを示すフローチャートである。
【図5】実施の形態2に係るメモリ制御装置の機能的な構成を示すブロック図である。
【図6】実施の形態2に係るメモリ制御装置の処理の流れを示すフローチャートである。
【図7】データを移動させる前のメモリ情報の内容を示す図である。
【図8】データを移動させた後のメモリ情報の内容を示す図である。
【図9】実施の形態3に係るメモリ制御装置の機能的な構成を示すブロック図である。
【図10】実施の形態3におけるメモリ制御装置の処理の流れを示すフローチャートである。
【図11】データを移動させる前のメモリ情報の内容を示す図である。
【図12】データを移動させた後のメモリ情報の内容を示す図である。
【符号の説明】
11 主メモリ
111 電源制御部
112〜115 メモリバンク
12 CPU
22 判定部
23 メモリ割当部
24 メモリ情報記憶部
25 メモリ制御部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a memory control device, and more particularly, to a memory control device that controls power consumption of a memory that requires periodic power supply.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in a data processing device represented by a personal computer, a memory such as a DRAM (Dynamic RAM) or a high-speed SDRAM (Synchronous DRAM) is mainly used to store data processed by an application which is software. Used for Since these memories have a structure in which data is converted into electric charge of a capacitor and held, a recharging process of the capacitor, that is, a periodic power supply (refresh) is required to hold the data. Therefore, the power consumption of these memories is higher than that of SRAMs (Static RAMs) that do not require refreshing.
[0003]
Therefore, conventionally, power consumption of a memory is generally controlled through a hardware mechanism. Further, a memory control device that controls power consumption of a memory by software control has been proposed (for example, see Patent Document 1). Such an apparatus suppresses power consumption by omitting refresh for some of a plurality of memory banks included in a memory as compared with a case where all memory banks are refreshed. More specifically, the memory control device manages the status of allocation and release of a memory area to a program. The power consumption is reduced by omitting refresh for unused memory banks. In the above-described memory control device, it is also considered to create an unused memory bank that does not require refreshing by compressing data or saving the data in secondary storage.
[0004]
On the other hand, in recent years, an OS (Operating System), which is a program execution environment, is installed not only in a personal computer and the like but also in an information home appliance terminal. In such an information home appliance terminal, a power saving measure is indispensable, and there is a high demand for power saving of the memory as described above.
[0005]
[Patent Document 1]
JP-A-9-212416
[0006]
[Problems to be solved by the invention]
As described above, the conventional memory control device controls whether or not to perform refresh depending on whether or not the memory is used. In other words, the higher the percentage of the used area in the memory, the smaller the area where the refresh is omitted. When most of the memory area is used, there is almost no area where refresh is omitted. As described above, in the conventional memory control device, there is a case where the power saving effect can hardly be obtained depending on the ratio of the memory used. Therefore, in a data processing device using a conventional memory control device, there has been a case where power consumption cannot be effectively reduced.
[0007]
On the other hand, in the conventional memory control device, it is conceivable to further reduce the power consumption by moving the storage position of the data stored in the memory. In other words, data stored in a certain memory bank is moved to an empty memory area of another memory bank, so that the source memory bank is made unused. This eliminates the need for refreshing the source memory bank, so that power consumption can be further reduced. However, when data is moved, it is necessary to notify an application using the data that the data has been moved. That is, when data is to be moved in order to further reduce power consumption, the application must be notified each time data is moved. Furthermore, the application must perform a process of changing the storage location of the data in the memory. Therefore, it has been difficult to move data because moving data requires a lot of processing.
[0008]
Therefore, an object of the present invention is to provide a memory control device capable of effectively reducing power consumption.
[0009]
Means for Solving the Problems and Effects of the Invention
In order to achieve the above object, the present invention has the following features. That is, a first invention is a memory control device that controls power supply for refresh to a memory whose storage area is divided into a plurality of unit areas for each of the unit areas,
A determination unit that receives a reservation request for reserving a memory area for storing data in a memory from an application, and determines whether the data needs to be refreshed based on the reservation request;
A memory area in the first unit area is allocated to data determined to need to be refreshed, and a second area different from the first unit area is allocated to data determined to not need to be refreshed. A memory allocating unit that allocates a memory area in the unit area of
A memory control unit that sets the first unit area as a refresh area for refreshing and sets the second unit area as a non-refresh area for stopping refresh.
[0010]
According to the invention, only data that needs to be refreshed among the data stored in the memory is stored in the refresh area. Then, power for refresh is supplied to the refresh area, and the power is not supplied to the non-refresh area. As described above, data to be stored in the memory is allocated to one of the refresh area and the non-refresh area according to an application in which the data is stored. Therefore, even if all areas of the memory are used, power for refreshing does not need to be consumed for an area storing data that does not need to be refreshed. That is, according to the present invention, power consumption can be effectively reduced irrespective of the rate at which the memory is used.
[0011]
In a second aspect, the memory allocating unit sets the unit area that was the refresh area at the time of the previous refresh as the first unit area, and sets the unit area that was the non-refresh area in the previous refresh as the second unit area. And
[0012]
According to the above invention, it is not necessary to reset either the refresh area or the non-refresh area for each unit area every time refresh is performed.
[0013]
The third invention further includes a data moving unit for moving a storage position of data stored in the memory,
When allocating a memory area to data determined not to need to be refreshed, the memory allocating unit sets a unit area included in the refresh area as a second unit area when there is no free space in the non-refresh area,
When the memory area in the unit area included in the refresh area is allocated to the data that is determined not to need to be refreshed, the data moving unit deletes the data already stored in the unit area in the refresh area. Move to another unit area.
[0014]
According to the above invention, when data that does not need to be refreshed is stored in the refresh area due to lack of free space in the non-fresh area, another data (refresh) in the unit area where the data is stored is stored. Is moved to another unit area. Therefore, only data that does not need to be refreshed is stored in the unit area. As a result, there is no need to refresh the unit area. As described above, according to the present invention, power consumption by refresh can be further reduced as compared with the case where data is not moved.
[0015]
According to a fourth aspect, for each data stored in the memory, a logical address for indicating the storage position of the data to the application is associated with a physical address indicating the actual storage position of the data in the memory. A memory information storage unit for storing the memory information,
When moving the data, the data moving unit changes the physical address of the data and the correspondence between the physical address and the logical address for the contents of the memory information.
[0016]
According to the above invention, even when data is moved, the logical address of the data is not changed. Therefore, since the data movement does not affect the application, there is no need to change the settings on the application side with the data movement. That is, since it is not necessary to prepare an application in consideration of such a change, it is possible to realize a memory control device applicable to more applications.
[0017]
In a fifth aspect, the data movement unit is realized by the CPU executing a predetermined program operation, and stores the data when the processing amount per unit time of the CPU is smaller than a predetermined amount. Move the position.
[0018]
According to the above invention, the processing load of the memory control device can be averaged, so that the power consumption of the memory control device can be reduced.
[0019]
According to a sixth aspect, processing priorities are set for a plurality of applications capable of generating a reservation request,
The data moving unit moves the storage location of the data when the processing priority of the application that generated the reservation request is lower than the other applications.
[0020]
According to the above invention, the processing load of the memory control device can be averaged, so that the power consumption of the memory control device can be reduced.
[0021]
In a seventh aspect, the determination unit stores information indicating a correspondence between the reservation request and information indicating whether or not the data stored in the memory area reserved by the reservation request needs to be refreshed. Then, by referring to information indicating the correspondence, it is determined whether or not the data needs to be refreshed.
[0022]
According to the invention, it is possible to easily determine whether or not the data needs to be refreshed.
[0023]
In an eighth aspect, the determination section determines whether or not the data needs to be refreshed, depending on whether the required retention period of the data is longer or shorter than the refresh cycle of the memory.
[0024]
According to the above invention, it can be accurately determined whether or not the data needs to be refreshed.
[0025]
A ninth invention is a memory control device that controls power supply for refreshing a memory in which a storage area is divided into a plurality of unit areas for each of the unit areas, and for each data stored in the memory, A memory information storage unit for storing memory information in which a logical address for indicating a storage position of the data to the application and a physical address indicating an actual storage position of the data in the memory are associated with each other;
For at least one unit area of the memory, the storage position of all data stored in the unit area is moved to another unit area in which the data is stored, and the content of the memory information is moved. A data moving unit that changes the physical address of the physical address and the correspondence between the physical address and the logical address;
A memory control unit that sets a unit area in which data is stored as a refresh area for refreshing based on the memory information, and sets a unit area in which no data is stored as a non-refresh area for stopping refreshing; Is provided.
[0026]
According to the present invention, by feeding data stored in a certain unit area to another unit area, it is possible to stop power supply for refresh to the unit area from which the data is moved. Therefore, power consumption can be effectively reduced. Further, according to the invention, even if data is moved, the logical address of the data is not changed. Therefore, since the data movement does not affect the application, there is no need to change the settings on the application side with the data movement. Therefore, since there is no need to perform a process related to a change in the setting of the application or the like, the data movement process can be easily performed. Further, since there is no need to prepare an application in consideration of such a change, a memory control device applicable to more applications can be realized.
[0027]
A tenth invention is a memory control method for controlling power supply for refreshing a memory in which a storage area is divided into a plurality of unit areas, for each of the unit areas,
A determination step of receiving, from an application, a reservation request for reserving a memory area for storing data in a memory, and determining whether the data needs to be refreshed based on the reservation request;
A memory area in the first unit area is allocated to data determined to need to be refreshed, and a second area different from the first unit area is allocated to data determined to not need to be refreshed. A memory allocation step of allocating a memory area in the unit area of
A memory control step of setting the first unit area as a refresh area for refreshing and setting the second unit area as a non-refresh area for stopping refresh.
[0028]
An eleventh invention is a memory control method for controlling power supply for refresh to a memory whose storage area is divided into a plurality of unit areas, for each unit area,
For each piece of data stored in the memory, memory information in which a logical address for indicating the storage location of the data to the application and a physical address indicating the actual storage location of the data in the memory are stored. Store memory information in advance,
For at least one unit area of the memory, the storage position of all data stored in the unit area is moved to another unit area in which the data is stored, and the content of the memory information is moved. A physical address, and a data movement step of changing the correspondence between the physical address and the logical address;
A memory control step of setting a unit area where no data is stored as a refresh area for performing a refresh based on the memory information, and setting a unit area where no data is stored as a non-refresh area where the refresh is stopped; Is provided.
[0029]
A twelfth invention is a computer-readable program that causes a computer having a memory to execute the memory control method according to the tenth or eleventh invention.
[0030]
BEST MODE FOR CARRYING OUT THE INVENTION
(Embodiment 1)
First, a memory control device according to the first embodiment will be described. FIG. 1 is a diagram illustrating an example of a hardware configuration of the memory control device according to the first embodiment. In the memory control device 1 shown in FIG. 1, a main memory 11 for storing data, a CPU 12 for executing a program, and an input / output device 13 such as a screen and keys are connected via a bus. The main memory 11 is a memory that needs to be refreshed at predetermined time intervals, such as an SDRAM, for example, and is used to store data handled in execution processing of a program (application) in the CPU 12. As shown in FIG. 1, the main memory 11 includes a power supply control unit 111 and a plurality of memory banks (each called a memory bank B1 to B4. Note that “B1” to “B4” are bank numbers described later). 112 to 115 are included. In the following description of the embodiment, for simplicity, the description will be made assuming that the number of memory banks is four.
[0031]
In the first embodiment, main memory 11 is a memory capable of controlling power supply for refresh for each of memory banks 112 to 115. Specifically, the CPU 12 instructs the main memory 11 whether or not to refresh each of the memory banks 112 to 115. The power supply control unit 111 performs refresh for each of the memory banks 112 to 115 in accordance with an instruction from the CPU 12. In the following description, a refresh cycle, that is, a time from the previous refresh to the next refresh is referred to as a refresh cycle. Further, of the memory areas (memory banks 112 to 115) of the main memory 11, an area where refresh is performed (power is supplied by the power control unit 111) is called a refresh area, and no refresh is performed (power control unit The area to which power is not supplied by 111) is called a non-refresh area.
[0032]
In another embodiment, the CPU 12 may have a configuration in which an internal memory (for example, an SRAM) or a cache is mounted. In such a configuration, a storage medium in which data handled by the CPU 12 is stored is selected in the order of the cache, the internal memory, and the main memory 11 according to the degree of high-speed reference.
[0033]
FIG. 2 is a block diagram illustrating a functional configuration of the memory control device according to the first embodiment. 2, a memory control device 1 includes an application execution unit 21, a determination unit 22, a memory allocation unit 23, a memory information storage unit 24, a memory A control unit 25 and a power detection unit 26 are provided. These components are realized by the CPU 12 performing a predetermined program operation. Furthermore, typically, the determination unit 22, the memory allocation unit 23, the memory information storage unit 24, and the memory control unit 25 are realized as a part of the function of the OS mounted on the memory control device 1.
[0034]
The application execution unit 21 executes various applications stored in the memory control device 1. Data is written to the main memory 11 during execution of this application. When writing data to the main memory 11, an application executed by the application executing unit 21 generates a reservation request for storing data in the main memory 11. The reservation request is a request for reserving a memory area on the main memory 11 for storing data. Note that the request for securing is not limited to a request for simply securing a memory area, and may be a request including securing a memory area and writing data to the secured memory area. In the following description, data written in the memory area on the main memory 11 secured by the securing request is referred to as target data.
[0035]
The determination unit 22 receives the above-mentioned securing request from the application. Then, it is determined whether the target data relating to the received securing request needs to be refreshed. In the first embodiment, “whether or not it is necessary to perform refresh” means “whether a required retention period of data in main memory 11 is longer or shorter than a refresh cycle”. Here, the required retention period refers to a time from the end of data storage to the end of data reading. That is, the data that does not need to be refreshed is data in which the required retention period is shorter than the refresh cycle. With such data, it is not necessary to hold the data beyond the refresh cycle, so that a memory bank storing only such data does not need to be refreshed. The memory control device 1 according to the first embodiment determines data that needs to be refreshed and data that does not need to be refreshed, and writes the data into different memory banks. Then, by controlling not to refresh the memory bank in which the data that does not need to be written is written, it is possible to reduce the power consumption due to the refresh.
[0036]
In the present embodiment, the condition of “data that does not need to be refreshed” is set as “the required holding period is shorter than the refresh cycle”. Here, in another embodiment, the condition of “data that does not need to be refreshed” is added to “the necessary holding period is shorter than the refresh cycle”, and “after the data reading is completed, Not referenced from application ".
[0037]
The determination of whether or not the refresh is necessary in the determination unit 22 is performed based on the above-mentioned securing request. Specifically, it is determined in advance whether refresh is necessary or not for each of various securing requests from the application. Typically, the determination unit 22 prepares a table in which a reservation request is associated with information indicating whether or not a refresh is necessary. Then, when the determination unit 22 receives a reservation request from the application, the determination unit 22 determines whether refresh is necessary by referring to the table. The refresh cycle is generally on the order of 10 to 100 μsec. Further, if the operation speed of the CPU 12 is several tens of MHz, it takes several hundred cycles to perform a limited period of processing. Therefore, it is sufficient to determine that refresh is not required for a secure request that is considered to end the processing from data storage to data reading within this time.
[0038]
For example, when information indicating the output destination of the target data is included in the reservation request from the application, it is possible to determine whether or not the refresh is necessary based on the information. For example, if the request is for securing the target data to the hard disk, the time required to store the target data in the main memory 11 is relatively long because writing to the hard disk takes time. Therefore, it is determined that such a reservation request needs refreshing. On the other hand, if the request is for securing the target data to be sent to a high-speed communication line such as a LAN, the time for storing the target data in the main memory 11 may be short. Therefore, it is determined that such a reservation request does not require refresh. As described above, it may be determined whether or not the refresh is necessary by using a part of the information included in the reservation request. Note that information indicating the use of the memory, such as the output destination of the target data, is referred to as use information.
[0039]
Note that an example of target data that does not require refresh is data at the time of transaction guarantee processing. The transaction guarantee processing means that, when the power of the apparatus is suddenly cut off, in order to guarantee the consistency of the system when the apparatus is started next, data of the processing performed immediately before the disconnection is performed for, for example, 10 μsec. It is a process of urgently evacuating within The target data that does not need to be refreshed may be data used in processing that is guaranteed to be completed in a short time, such as timer processing or an interrupt handler.
[0040]
Further, as another example of the target data that does not need to be refreshed, when the CPU 12 has a cache and an internal memory, the data temporarily saved in the main memory 11 when storing the data in the cache or the internal memory is also included. is there. The data of each component in the case of performing a process of superimposing a plurality of component data on the entire image data in order to display the image data is also considered to be data that does not require refreshing. In addition, when processing for generating the next image based on the previous image is performed in the processing of the moving image data, the data indicating the change ratio from the previous image is also data that does not require refreshing. it is conceivable that.
[0041]
In FIG. 2, the memory allocating unit 23 allocates a memory area in the memory bank of the refresh area to the target data for which the determining unit 22 determines that the data needs to be refreshed. On the other hand, a memory area in the memory bank of the non-refresh area is allocated to the target data for which it is determined that the refresh is unnecessary. That is, the memory allocating unit 23 reserves a memory area in the memory bank belonging to one of the refresh area and the non-refresh area for the target data according to the determination result of the determining unit 22. Note that which of the memory banks 112 to 115 of the main memory 11 is set as the refresh area and which area is set as the non-refresh area is stored in the memory information storage unit 24. Is indicated by the memory information.
[0042]
The memory information storage unit 24 stores, for each of the memory banks 112 to 115 of the main memory 11, memory information indicating whether the memory bank is a refresh area or a non-refresh area. Hereinafter, details of the memory information will be described.
[0043]
FIG. 3 is a diagram illustrating an example of memory information according to the first embodiment. As shown in FIG. 3, the memory information includes an application ID (in FIG. 3, indicated as “ApID”), a logical address, a physical address, a bank number, and refresh information. The application ID is information for identifying various applications executed by the application execution unit 21. The bank number is information for identifying four memory banks. The refresh information is information indicating whether to refresh the memory bank. In FIG. 3, the refresh information is represented by either “1” indicating that the refresh is performed or “0” indicating that the refresh is not performed.
[0044]
The logical address is information for indicating a storage position of data in the main memory 11 to an application. That is, the application manages the storage location of the data by the logical address. The logical address is expressed as a page number such as “P10” or “P11”. The physical address is information indicating an actual storage position of data in the main memory 11. In the first embodiment, the logical address is stored in the memory information in a configuration associated with the physical address. With this configuration, it is not necessary to translate the logical address even when the storage location of the data is moved in the main memory 11, that is, when the physical address of the data is changed. That is, even when the physical address of a certain data is changed, if the correspondence between the physical address and the logical address is changed, it is not necessary to change the logical address of the data. Since the application manages the data storage location by the logical address, the application is not affected by the change even if the data storage location is changed in the main memory 11 by the configuration that associates the logical address with the physical address.
[0045]
The memory control unit 25 instructs the power supply control unit 111 on a memory bank to be refreshed. That is, one of a refresh area and a non-refresh area is set for each of the memory banks 112 to 115. Specifically, a memory bank including a memory area allocated to target data that needs to be refreshed is set as a refresh area. Conversely, a memory bank including a memory area allocated to target data that does not need to be refreshed is set as a non-refresh area. Further, the memory control unit 25 controls the main memory 11 in units of the memory banks 112 to 115 regarding the change from the refresh area to the non-refresh area or the change from the non-refresh area to the refresh area. In addition, the memory control unit 25 writes the data passed from the application to the main memory 11.
[0046]
The power detection unit 26 detects whether the power supplied to the memory control device 1 is from a battery inside the device or from a power source outside the device (for example, when an AC adapter is used). I do.
[0047]
Next, the operation of the memory control device 1 according to the first embodiment will be described. Specifically, when the above-mentioned reservation request for storing data in the main memory 11 is generated by an application, an operation for allocating a memory area for storing the data based on the reservation request will be described. I do.
[0048]
FIG. 4 is a flowchart illustrating a flow of processing of the memory control device 1 according to the first embodiment. First, in step S1, the determination unit 22 receives the above securing request from the application. In the following step S2, the power detection unit 26 determines whether the power currently supplied to the memory control device 1 is from a battery inside the device or from an external power supply. If it is determined in step S2 that the power of the memory control device 1 is being supplied by the battery inside the device, the process of step S3 is performed. Specifically, the determination result of step S1 is passed from the power detection unit 26 to the determination unit 22, and the determination unit 22 that has received the determination result performs the process of step S3. On the other hand, if it is determined in step S2 that the power of the memory control device 1 is supplied from the external power supply, the process of step S4 is performed. Specifically, the determination result of step S1 is passed from the power detection unit 26 to the memory allocation unit 23, and the memory allocation unit 23 that has received the determination result performs the process of step S4.
[0049]
As described above, in the first embodiment, the determination in step S3 is made only when the battery inside the device is the power source to suppress power consumption. In other words, when power is supplied from an external power supply, there is little need to reduce power consumption, and therefore, processing for suppressing power consumption is not performed. As described above, in the first embodiment, processing for suppressing power consumption is performed only when it is really necessary. In the above description, the processing after step S4 is performed when power is supplied from the external power supply. However, in other embodiments, when power is supplied from the external power supply, an arbitrary memory area is used. May be assigned to the target data, and all the memory banks 112 to 115 may be set as the refresh area.
[0050]
In step S3, the determination unit 22 determines whether the target data needs to be refreshed based on the reservation request received in step S1. Specifically, this determination is made by referring to the table in which the reservation request and the information indicating whether the refresh is necessary are associated with each other, as described above. The determination unit 22 passes the determination result of Step S3 to the memory allocation unit 23. The memory allocating unit 23 performs the process of step S4 or step S6 according to the determination result. That is, when it is determined in step S3 that the target data needs to be refreshed, the process in step S4 is performed. On the other hand, when it is determined in step S3 that the target data does not need to be refreshed, the process in step S6 is performed.
[0051]
In step S4, the memory allocating unit 23 determines whether there is a free space in the refresh area. If the result of this determination is that there is free space in the refresh area, that is, if the free area in the refresh area is larger than the area required to store the target data, the process of step S7 is performed. On the other hand, if there is no free space in the refresh area, that is, if there is not enough space in the refresh area to store the target data, the process of step S5 is performed. The determination as to whether or not there is a free area in the refresh area can be performed by referring to the memory information stored in the memory information storage unit 24.
[0052]
In step S5, the memory allocating unit 23 determines whether there is a free space in the non-refresh area. This determination is the same as the determination in step S4 except that it is a refresh area or a non-refresh area. If the result of this determination is that there is free space in the non-refresh area, the process of step S8 is performed. On the other hand, the case where there is no free space in the non-refresh area in step S5 means the case where there is no free area for storing the target data in both the refresh area and the non-refresh area. Therefore, in this case, the process ends assuming that the memory allocation has failed.
[0053]
In step S6, the memory allocating unit 23 determines whether there is a free space in the non-refresh area. This determination is the same as the determination in step S5. If the result of this determination is that there is free space in the non-refresh area, the process of step S8 is performed. On the other hand, if there is no free space in the non-refresh area, the process of step S4 is performed.
[0054]
In step S7, the memory allocating unit 23 allocates a memory in the refresh area to the target data. That is, a memory area for storing the target data is secured in the refresh area. Here, the memory of the refresh area is allocated to the target data in the following two cases. That is, (1) the target data is data that needs to be refreshed (Yes in step S3) and there is a free space in the refresh area (Yes in step S4), and (2) the target data does not require refreshing. This is a case where the data is data (No in Step S3) and there is no space in the non-refresh area (No in Step S6) and there is a space only in the refresh area (Yes in Step S4). Note that the processing illustrated in FIG. 4 ends when the processing in step S7 ends.
[0055]
In step S8, the memory allocating unit 23 allocates a memory in the non-refresh area to the target data. That is, a memory area for storing the target data is secured in the non-refresh area. Here, the memory in the non-refresh area is allocated to the target data in the following two cases. That is, (3) the target data is data that does not need to be refreshed (negative in step S3), and there is a free space in the non-refresh area (affirmative in step S6), and (4) the target data requires refresh. This is the case when the data is appropriate (Yes in step S3) and (there is no empty area in the refresh area (No in step S4)) and there is empty area only in the non-refresh area (Yes in step S5).
[0056]
Subsequent to step S8, in step S9, the memory allocation unit 23 determines whether the target data is data that needs to be refreshed. As described above, the case of step S8 may be performed in the cases (3) and (4) described above. In the determination of step S9, it is determined which of the above cases (3) and (4). Specifically, when the result of the determination in step S3 is affirmative (in the case of (3) above), it is determined that the target data is data that needs to be refreshed, and the process of step S10 is performed. Conversely, if the result of the determination in step S3 is negative (case (4) above), it is determined that the target data is data that does not require refreshing. Thus, the process illustrated in FIG. 4 ends.
[0057]
In step S10, the memory control unit 25 changes the memory bank including the memory area allocated in step S8 to a refresh area. As is clear from step S9, when the processing in step S10 is performed, the target data is data that needs to be refreshed. Therefore, in this case, data that needs to be refreshed is stored in the non-refresh area. Therefore, in step S10, the non-refresh area storing the data that needs to be refreshed is changed to the refresh area. This makes it possible to reliably hold data that needs to be refreshed. In addition, the memory control unit 25 updates the memory information stored in the memory information storage unit 24 so as to reflect the change of the refresh region from the non-refresh region in step S10. The processing shown in FIG. 4 ends when the processing in step S10 ends.
[0058]
The processes in steps S9 and S10 need not be performed immediately after the memory area is allocated (step S8). This processing may be performed, for example, immediately before the target data is actually written in the allocated memory area.
[0059]
As described above, according to the first embodiment, target data is divided into target data stored in a refresh area and target data stored in a non-refresh area according to whether or not refresh is necessary. Can be Therefore, by refreshing only the memory banks set as the refresh areas, it is possible to refresh only the necessary data. That is, the power required for refresh can be effectively reduced.
[0060]
Further, according to the first embodiment, whether or not refresh is necessary is determined based on the content of the reservation request. That is, it is determined whether or not the refresh is necessary according to the purpose of writing data to the main memory 11. Therefore, according to the first embodiment, it is possible to discriminate between data that only needs to be stored temporarily and data that should be kept permanently according to the purpose of writing data to the main memory 11. It can be said. The power consumption can be reduced by refreshing only the data that needs to be refreshed and that should be kept permanently.
[0061]
In the first embodiment, the determination unit 22, the memory allocation unit 23, the memory information storage unit 24, and the memory control unit 25 are realized as the functions of the OS, so that the present invention can be performed without any special setting for the application itself. Can be applied. That is, the present invention can be applied regardless of the function of the application. Therefore, the present invention can be easily applied to a case where an application of a device whose reduction in power consumption is not so important is transplanted to a device requiring reduction of power consumption and operated.
[0062]
In the above description, the information indicating the output destination of the target data has been described as an example of the use information included in the reservation request, but the use information is not limited to this. For example, information indicating whether data is to be written to the refresh area or to the non-refresh area may be included in the reservation request as use information. According to this, the application can specify whether to write data in the refresh area or in the non-refresh area.
[0063]
The determination of whether or not refreshing is necessary in the determination unit 22 may be a method using at least two different APIs (Application Program Interface), in addition to the method performed based on the use information. Specifically, an API for writing data to the refresh area and an API for writing data to the non-refresh area are prepared as the determination unit 22. Then, when the application selects one of the APIs, it is determined whether or not the refresh is necessary. According to this method, the application can specify whether to write data in the refresh area or in the non-refresh area. When the API is used in the determination unit 22 as described above, a special memory API can be considered as an API for writing data to the non-refresh area. The special memory API is, for example, an API that performs a data write process only when a failure such as an error occurs in an application.
[0064]
In the case where the application can specify whether to write data in the refresh area or the non-refresh area, the application can further detect a loss of data stored in the non-refresh area, It is assumed that if there is a loss, it is possible to discard the data and reconstruct it. In this case, the application can specify to write more data to the non-refresh area. Thereby, power consumption can be further reduced.
[0065]
Further, in the first embodiment, the timing for performing the memory area allocation process is not limited. However, in another embodiment, the process may be performed at the following timing, for example. For example, when the load on the CPU 12 is low, the memory area allocation processing may be performed. Alternatively, when the processing priority of the application that has generated the reservation request is lower than that of the other applications, the memory area may be allocated. By dispersing the processing of the CPU 12 as described above, the processing load of the memory control device 1 can be averaged, and the power consumption can be reduced.
[0066]
(Embodiment 2)
Next, a memory control device according to the second embodiment will be described. FIG. 5 is a block diagram showing a functional configuration of the memory control device according to the second embodiment of the present invention. Note that the memory control device according to the second embodiment is the same as the memory control device according to the first embodiment except that the memory control device further includes a data moving unit 27.
[0067]
The data mover 27 moves data stored in a memory bank to another memory bank. In particular, when data that does not need to be refreshed is stored in the memory bank in the refresh area, the data moving unit 27 replaces other data (data that needs to be refreshed) already written in the memory bank with The refresh area is moved to another memory bank.
[0068]
Next, the operation of the memory control device according to the second embodiment will be described. FIG. 6 is a flowchart illustrating a flow of a process of the memory control device according to the second embodiment. Here, FIG. 6 differs from FIG. 4 only in the processing of steps S11 to S13. Therefore, the processing of steps S11 to S13 will be mainly described below.
[0069]
In the second embodiment, the process of step S11 is performed after step S7. That is, in step S11, the memory allocation unit 23 determines whether the target data is data that needs to be refreshed. This determination is made based on the determination result of step S3. That is, when the result of the determination in step S3 is affirmative, it is determined that the target data is data that needs to be refreshed. In this case, the process illustrated in FIG. 6 ends. Conversely, if the result of the determination in step S3 is negative, it is determined that the target data is data that does not need to be refreshed. In this case, the process of step S12 is performed.
[0070]
In step S12, the data moving unit 27 moves data. Specifically, the data already written in the memory bank including the area allocated in step S7 is moved to another memory bank in the refresh area. As a result, in the memory bank including the area allocated in step S7, only the data to which the area is allocated in step S7 (data that does not need to be refreshed) is stored.
[0071]
After step S12, in step S13, the memory control unit 25 changes the memory bank including the memory area allocated in step S7 to a non-refresh area. As described above, by the processing in step S12, only the data that does not need to be refreshed is stored in the memory bank, and the other data is moved. Therefore, there is no problem even if the memory bank is changed to the non-refresh area. This reduces power consumption due to refresh. The memory control unit 25 updates the memory information stored in the memory information storage unit 24 so as to reflect the change of the refresh area from the non-refresh area and the movement of data in step S13. When the processing in step S13 ends, the processing illustrated in FIG. 6 ends.
[0072]
As described above, according to the second embodiment, when the memory area in the memory bank included in the refresh area is allocated to the data determined not to need to be refreshed, the data is already stored in the memory bank. The data being moved is moved to another memory bank in the refresh area. As a result, the memory bank including the memory area allocated to the data determined not to need to be refreshed can be changed to the non-refreshed area. Therefore, since the number of memory banks serving as non-refresh regions can be increased, power consumption due to refresh can be further reduced.
[0073]
Next, a specific example in a case where data is moved because there is no free space in the non-fresh area will be described. FIG. 7 is a diagram showing the contents of memory information before data is moved. In FIG. 7, for the sake of clarity, data of applications other than the application of “Ap3” are not shown with lines indicating correspondence between logical addresses and physical addresses. Further, black circles in the drawing indicate memory areas where data is stored, and white circles indicate memory areas where no data is stored. Further, in FIG. 7, it is assumed that there is no free space in the memory bank 115 whose bank number is B4, which is a non-refresh area. A case where new data (the logical address is indicated by P34) that does not need to be refreshed is written by the Ap3 application in the above state will be described.
[0074]
FIG. 8 is a diagram showing the contents of the memory information after the data has been moved. First, in the state of FIG. 7, since there is no free space in the non-refresh area, a memory area of the refresh area is allocated to new data (step S7). Here, it is assumed that new data is assigned to the memory bank 114 whose bank number is B3.
[0075]
As a result of the new data being allocated to the memory bank 114 whose bank number is B3, both the data that needs to be refreshed and the data that does not need to be stored are stored in the memory bank 114. In the first embodiment, this state is maintained.) In the second embodiment, data indicated by page numbers P32 and P33 (data that needs to be refreshed) is moved to another memory bank in the refresh area (step S12). Here, the data indicated by the page number P32 is moved to the memory bank 112 of the bank number B1, and the data indicated by the page number P33 is moved to the memory bank 113 of the bank number B2. As a result, only the data of the page number P34 that does not need to be refreshed is stored in the memory bank 114. Therefore, the memory bank 114 is set as a non-refresh area (step S13).
[0076]
As described above, according to the first and second embodiments, only the data that needs to be refreshed among the data stored in main memory 11 is stored in the refresh area. Then, power for refresh is supplied to the refresh area, and the power is not supplied to the non-refresh area. Therefore, even if all areas of the main memory 11 are used, power for refreshing does not need to be consumed for an area storing data that does not need to be refreshed. That is, power consumption can be effectively reduced regardless of the rate at which the main memory 11 is used.
[0077]
(Embodiment 3)
Next, a memory control device according to the third embodiment will be described. In the third embodiment, unlike the first and second embodiments, all data stored in the main memory 11 is refreshed. That is, it is not determined whether the target data needs to be refreshed. The memory control device according to the third embodiment moves data stored in the main memory 11 to increase the number of memory banks that do not store data. By this processing, the memory control device reduces the number of memory banks to be refreshed, and reduces power consumption by the refresh.
[0078]
FIG. 9 is a block diagram showing a functional configuration of a memory control device according to Embodiment 3 of the present invention. The functional configuration of the memory control device according to the third embodiment is the same as that of the memory control device according to the second embodiment except that the memory control device according to the third embodiment does not include the determination unit 22 and the power detection unit 26. In the following, with respect to each unit shown in FIG. 9, differences from Embodiments 1 and 2 will be mainly described, and description of the same parts as those in Embodiments 1 and 2 will be omitted.
[0079]
In the third embodiment, the memory allocating unit 23 may allocate any memory area to the target data. That is, in the third embodiment, the target data is written to any one of the memory areas in the main memory 11 regardless of the purpose of the target data. Note that the memory information storage unit 24 is the same as in the first and second embodiments.
[0080]
Memory control unit 25 instructs power supply control unit 111 on a memory bank to be refreshed, as in the first and second embodiments. Here, in the third embodiment, memory control unit 25 sets a memory bank in which data is stored as a refresh area, and sets a memory bank in which no data is stored as a non-refresh area. That is, in the third embodiment, it is not determined whether or not to supply power for refreshing according to the use of the data stored in the memory bank. Power is supplied to the bank. The storage status of data in each memory bank can be known by referring to the memory information stored in the memory information storage unit 24.
[0081]
The data transfer unit 27 stores the storage locations of all data stored in a predetermined memory bank (a “source memory bank” described later) in another memory bank (“a destination memory bank” described later) in which data is stored. Memory bank "). Further, the data moving unit 27 changes the physical address of the moved data and the correspondence between the physical address and the logical address for the contents of the memory information. Hereinafter, a data movement process of the memory control device according to the third embodiment will be described.
[0082]
FIG. 10 is a flowchart illustrating a flow of processing of the memory control device according to the third embodiment. First, in step S21, the data moving unit 27 determines whether to move data. That is, it is determined whether it is time to move the data. Specifically, the data moving unit 27 may determine that data is to be moved at regular time intervals, or if data is written or deleted in the main memory 11, the data moving may be performed. May be determined to be performed. If it is determined in step S21 that the data is to be moved, the process in step S22 is performed. On the other hand, if it is determined in step S21 that the data is not to be moved, the process in step S21 is repeated. That is, the data moving unit 27 waits until the timing to move the data comes.
[0083]
In step S22, the data transfer unit 27 determines a transfer source memory bank from the four memory banks 112 to 115. For example, of the four memory banks 112 to 115, the memory bank having the smallest stored data amount (the smallest memory area storing data) is determined as the source memory bank. Note that a plurality of memory banks may be determined as the source memory bank.
[0084]
Subsequent to step S22, in step S23, the data transfer unit 27 determines a transfer destination memory bank. The destination memory bank is selected from memory banks storing data (that is, memory banks included in the refresh area). For example, a memory bank other than the source memory bank and having the smallest stored data amount is determined as the destination memory bank. Note that a plurality of memory banks may be determined as the destination memory bank. In the following step S24, the data moving unit 27 determines whether or not data movement is possible. Specifically, the amount of data stored in the source memory bank (or the sum of the amounts of data in each memory bank when the source memory bank is plural) is the free space of the destination memory bank. It is determined whether it is smaller than (the sum of the free space of each memory bank when there are a plurality of destination memory banks). When it is determined that the data can be moved as a result of the determination in step S24, the process of step S25 is performed. On the other hand, if it is determined in step S24 that the data cannot be moved, the process returns to step S21.
[0085]
In step S25, the data moving unit 27 moves the storage locations of all data stored in the source memory bank to the destination memory bank. Further, the data moving unit 27 updates the memory information stored in the memory information storage unit 24 so as to reflect the data movement in step S25. In the following step S26, the memory control unit 25 changes the source memory bank to a non-refresh area. One data movement process is completed by step S26, and the process returns to step S21.
[0086]
Next, a specific example in the case of performing the data movement processing in the third embodiment will be described. FIG. 11 is a diagram showing the contents of memory information before data is moved. Note that, in FIG. 11, in order to make the drawing easier to see, for the data other than the data to be subjected to the data movement processing (the data other than the data having the logical address “P15”, the line indicating the correspondence between the logical address and the physical address is omitted) In addition, the memory bank 115 whose bank number is B4 is set in the non-refresh area, and the other memory banks 112 to 114 are set in the refresh area. A specific example in the case of performing data movement processing will be described.
[0087]
First, in the state of FIG. 11, when the timing to move the data comes, the data moving unit 27 determines the memory bank to be moved (step S22). Here, it is assumed that the memory bank 114 whose bank number is B3 has been determined as the source memory bank. Further, the data transfer unit 27 determines a transfer destination memory bank (step S23). Here, it is assumed that the memory bank 112 whose bank number is B1 has been determined as the source memory bank. As a result, the data whose logical address is “P15” is moved to the memory bank 112 that is the bank B1.
[0088]
FIG. 12 is a diagram showing the contents of the memory information after the data has been moved. As shown in FIG. 12, as a result of the data movement, no data is stored in the memory bank 114 whose bank number is B3. Therefore, the memory control unit 25 changes the memory bank 114 to a non-refresh area (Step S26). As a result, the number of memory banks to be refreshed is reduced by one before and after the movement of data, so that the power for refresh can be reduced.
[0089]
As described above, according to the third embodiment, the number of memory banks that need to be refreshed can be reduced by moving data. Thereby, the power for refresh can be reduced. Further, according to the third embodiment, it is not necessary to notify the application of data movement by using the memory information indicating the correspondence between the logical address and the physical address. Therefore, since the data movement does not affect the application, there is no need to change the settings on the application side with the data movement. Therefore, there is no need to perform processing related to a change in settings on the application side, etc., so that data movement processing can be easily performed. Further, since there is no need to prepare an application in consideration of such a change, a memory control device applicable to more applications can be realized.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an example of a hardware configuration of a memory control device according to a first embodiment;
FIG. 2 is a block diagram illustrating a functional configuration of the memory control device according to the first embodiment;
FIG. 3 is a diagram showing an example of memory information according to the first embodiment.
FIG. 4 is a flowchart showing a processing flow of the memory control device according to the first embodiment;
FIG. 5 is a block diagram illustrating a functional configuration of a memory control device according to a second embodiment;
FIG. 6 is a flowchart showing a flow of processing of a memory control device according to a second embodiment.
FIG. 7 is a diagram showing contents of memory information before data is moved.
FIG. 8 is a diagram showing contents of memory information after data has been moved.
FIG. 9 is a block diagram illustrating a functional configuration of a memory control device according to a third embodiment;
FIG. 10 is a flowchart showing a processing flow of a memory control device according to the third embodiment.
FIG. 11 is a diagram showing contents of memory information before data is moved.
FIG. 12 is a diagram showing contents of memory information after data has been moved.
[Explanation of symbols]
11 Main memory
111 Power control unit
112-115 memory bank
12 CPU
22 Judgment unit
23 Memory allocation unit
24 Memory information storage unit
25 Memory control unit

Claims (12)

記憶領域が複数の単位領域に分割されたメモリに対するリフレッシュのための電力供給を当該単位領域毎に制御するメモリ制御装置であって、
前記メモリにデータを記憶するメモリ領域を確保するための確保要求をアプリケーションから受け付け、当該確保要求に基づいて、当該データがリフレッシュの必要があるか否かを判定する判定部と、
リフレッシュの必要があると判定されたデータに対しては第1の単位領域中のメモリ領域を割り当て、リフレッシュの必要がないと判定されたデータに対しては第1の単位領域とは異なる第2の単位領域中のメモリ領域を割り当てるメモリ割当部と、
第1の単位領域をリフレッシュを行うリフレッシュ領域に設定するとともに、第2の単位領域をリフレッシュを停止する非リフレッシュ領域に設定するメモリ制御部とを備える、メモリ制御装置。
A memory control device that controls power supply for refresh to a memory in which a storage area is divided into a plurality of unit areas, for each of the unit areas,
A determination unit that receives a reservation request for reserving a memory area for storing data in the memory from an application, and determines whether the data needs to be refreshed based on the reservation request;
A memory area in the first unit area is allocated to data determined to need to be refreshed, and a second area different from the first unit area is allocated to data determined to not need to be refreshed. A memory allocating unit that allocates a memory area in the unit area of
A memory control unit that sets a first unit area as a refresh area for refreshing and sets a second unit area as a non-refresh area for stopping refreshing.
前記メモリ割当部は、前回のリフレッシュの際にリフレッシュ領域であった単位領域を第1の単位領域とし、前回のリフレッシュにおいて非リフレッシュ領域であった単位領域を第2の単位領域とする、請求項1に記載のメモリ制御装置。The said memory allocation part makes the unit area which was the refresh area at the time of the last refresh the 1st unit area, and the unit area which was the non-refresh area in the last refresh is made into the 2nd unit area. 2. The memory control device according to 1. 前記メモリに記憶されているデータの記憶位置を移動させるデータ移動部をさらに備え、
前記メモリ割当部は、リフレッシュの必要がないと判定されたデータに対してメモリ領域を割り当てる際において、非リフレッシュ領域に空きがない場合、リフレッシュ領域に含まれる単位領域を第2の単位領域とし、
前記データ移動部は、リフレッシュの必要がないと判定されたデータに対してリフレッシュ領域に含まれる単位領域中のメモリ領域が割り当てられる場合、当該単位領域中にすでに記憶されているデータを、リフレッシュ領域における他の単位領域に移動させる、請求項2に記載のメモリ制御装置。
A data moving unit for moving a storage position of data stored in the memory,
The memory allocating unit, when allocating a memory area to data determined not to need to be refreshed, when there is no free space in the non-refresh area, sets a unit area included in the refresh area as a second unit area,
When a memory area in a unit area included in the refresh area is allocated to data determined to be unnecessary to refresh, the data moving unit replaces data already stored in the unit area with the refresh area. 3. The memory control device according to claim 2, wherein the memory control device is moved to another unit area.
前記メモリに記憶されている各データについて、前記アプリケーションに対して当該データの記憶位置を示すための論理アドレスと、当該データの前記メモリにおける実際の記憶位置を示す物理アドレスとを対応付けたメモリ情報を記憶するメモリ情報記憶部をさらに備え、
前記データ移動部は、データを移動させた場合、前記メモリ情報の内容について、当該データの物理アドレス、および物理アドレスと論理アドレスとの対応関係を変更する、請求項3に記載のメモリ制御装置。
For each data stored in the memory, memory information in which a logical address for indicating a storage position of the data to the application and a physical address indicating an actual storage position of the data in the memory are associated with each other. Further comprising a memory information storage unit for storing
4. The memory control device according to claim 3, wherein when moving the data, the data moving unit changes a physical address of the data and a correspondence relationship between the physical address and the logical address for the content of the memory information. 5.
前記データ移動部は、CPUが所定のプログラム動作を実行することによって実現され、当該CPUの単位時間あたりの処理量が予め定められた所定量よりも小さい場合に、データの記憶位置の移動を行う、請求項3に記載のメモリ制御装置。The data moving unit is realized by a CPU executing a predetermined program operation, and moves a data storage position when a processing amount per unit time of the CPU is smaller than a predetermined amount. The memory control device according to claim 3. 確保要求を生成することが可能な複数のアプリケーションについて処理優先度が設定されており、
前記データ移動部は、確保要求を生成したアプリケーションの処理優先度が他のアプリケーションに比べて低い場合に、データの記憶位置の移動を行う、請求項3に記載のメモリ制御装置。
Processing priorities are set for multiple applications that can generate reservation requests,
4. The memory control device according to claim 3, wherein the data moving unit moves the data storage position when the processing priority of the application that has generated the reservation request is lower than other applications. 5.
前記判定部は、確保要求と、当該確保要求によって確保されるメモリ領域に記憶されるデータがリフレッシュの必要があるか否かを示す情報との対応を示す情報を記憶しておき、当該対応を示す情報を参照することによって、当該データがリフレッシュの必要があるか否かを判定する、請求項1に記載のメモリ制御装置。The determination unit stores information indicating a correspondence between a reservation request and information indicating whether data stored in a memory area reserved by the reservation request needs to be refreshed. The memory control device according to claim 1, wherein it is determined whether or not the data needs to be refreshed by referring to the indicated information. 前記判定部は、データの必要保持期間が前記メモリのリフレッシュ周期よりも長いか短いかに応じて、当該データがリフレッシュの必要があるか否かを判定する、請求項1に記載のメモリ制御装置。2. The memory control device according to claim 1, wherein the determination unit determines whether or not the data needs to be refreshed according to whether a required data retention period is longer or shorter than a refresh cycle of the memory. 3. 記憶領域が複数の単位領域に分割されたメモリに対するリフレッシュのための電力供給を当該単位領域毎に制御するメモリ制御装置であって、
前記メモリに記憶されている各データについて、アプリケーションに対して当該データの記憶位置を示すための論理アドレスと、当該データの前記メモリにおける実際の記憶位置を示す物理アドレスとを対応付けたメモリ情報を記憶するメモリ情報記憶部と、
前記メモリの少なくとも1つの単位領域について、当該単位領域に記憶されている全てのデータの記憶位置を、データが記憶されている他の単位領域に移動させるとともに、前記メモリ情報の内容について、移動させたデータの物理アドレス、および物理アドレスと論理アドレスとの対応関係を変更するデータ移動部と、
前記メモリ情報に基づいて、データが記憶されている単位領域を、リフレッシュを行うリフレッシュ領域に設定するとともに、データが記憶されていない単位領域を、リフレッシュを停止する非リフレッシュ領域に設定するメモリ制御部とを備える、メモリ制御装置。
A memory control device that controls power supply for refresh to a memory in which a storage area is divided into a plurality of unit areas, for each of the unit areas,
For each data stored in the memory, memory information in which a logical address for indicating the storage position of the data to an application and a physical address indicating an actual storage position of the data in the memory are associated with each other. A memory information storage unit for storing;
For at least one unit area of the memory, the storage positions of all data stored in the unit area are moved to other unit areas where data is stored, and the contents of the memory information are moved. A data moving unit that changes a physical address of the data, and a correspondence between the physical address and the logical address;
A memory control unit that sets a unit area in which data is stored as a refresh area for refreshing based on the memory information and sets a unit area in which no data is stored as a non-refresh area for stopping refreshing. A memory control device comprising:
記憶領域が複数の単位領域に分割されたメモリに対するリフレッシュのための電力供給を当該単位領域毎に制御するメモリ制御方法であって、
前記メモリにデータを記憶するメモリ領域を確保するための確保要求をアプリケーションから受け付け、当該確保要求に基づいて、当該データがリフレッシュの必要があるか否かを判定する判定ステップと、
リフレッシュの必要があると判定されたデータに対しては第1の単位領域中のメモリ領域を割り当て、リフレッシュの必要がないと判定されたデータに対しては第1の単位領域とは異なる第2の単位領域中のメモリ領域を割り当てるメモリ割当ステップと、
第1の単位領域をリフレッシュを行うリフレッシュ領域に設定するとともに、第2の単位領域をリフレッシュを停止する非リフレッシュ領域に設定するメモリ制御ステップとを備える、メモリ制御方法。
A memory control method for controlling power supply for refresh to a memory in which a storage area is divided into a plurality of unit areas for each of the unit areas,
A determination step of receiving a reservation request for reserving a memory area for storing data in the memory from an application, and determining whether the data needs to be refreshed based on the reservation request;
A memory area in the first unit area is allocated to data determined to need to be refreshed, and a second area different from the first unit area is allocated to data determined to not need to be refreshed. A memory allocation step of allocating a memory area in the unit area of
A memory control step of setting the first unit area as a refresh area for refreshing and setting the second unit area as a non-refresh area for stopping refresh.
記憶領域が複数の単位領域に分割されたメモリに対するリフレッシュのための電力供給を当該単位領域毎に制御するメモリ制御方法であって、
前記メモリに記憶されている各データについて、前記アプリケーションに対して当該データの記憶位置を示すための論理アドレスと、当該データの前記メモリにおける実際の記憶位置を示す物理アドレスとを対応付けたメモリ情報を記憶するメモリ情報を予め記憶しておき、
前記メモリの少なくとも1つの単位領域について、当該単位領域に記憶されている全てのデータの記憶位置を、データが記憶されている他の単位領域に移動させるとともに、前記メモリ情報の内容について、移動させたデータの物理アドレス、および物理アドレスと論理アドレスとの対応関係を変更するデータ移動ステップと、
前記メモリ情報に基づいて、データが記憶されていない単位領域を、リフレッシュを行うリフレッシュ領域に設定するとともに、データが記憶されていない単位領域を、リフレッシュを停止する非リフレッシュ領域に設定するメモリ制御ステップとを備える、メモリ制御方法。
A memory control method for controlling power supply for refresh to a memory in which a storage area is divided into a plurality of unit areas for each of the unit areas,
For each data stored in the memory, memory information in which a logical address for indicating a storage position of the data to the application and a physical address indicating an actual storage position of the data in the memory are associated with each other. Memory information for storing
For at least one unit area of the memory, the storage positions of all data stored in the unit area are moved to other unit areas where data is stored, and the contents of the memory information are moved. Data moving step of changing the physical address of the data, and the correspondence between the physical address and the logical address;
A memory control step of setting a unit area where no data is stored as a refresh area to be refreshed and setting a unit area where no data is stored as a non-refresh area for stopping refresh based on the memory information A memory control method, comprising:
前記メモリを有するコンピュータに請求項10または11に係るメモリ制御方法を実行させる、コンピュータ読み取り可能なプログラム。A computer-readable program that causes a computer having the memory to execute the memory control method according to claim 10.
JP2003136362A 2002-05-17 2003-05-14 Memory control device and method and program Pending JP2004047051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003136362A JP2004047051A (en) 2002-05-17 2003-05-14 Memory control device and method and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2002142640 2002-05-17
JP2003136362A JP2004047051A (en) 2002-05-17 2003-05-14 Memory control device and method and program

Publications (1)

Publication Number Publication Date
JP2004047051A true JP2004047051A (en) 2004-02-12

Family

ID=31719457

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003136362A Pending JP2004047051A (en) 2002-05-17 2003-05-14 Memory control device and method and program

Country Status (1)

Country Link
JP (1) JP2004047051A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006048342A (en) * 2004-08-04 2006-02-16 Matsushita Electric Ind Co Ltd Power-saving memory access control device
JP2006059403A (en) * 2004-08-18 2006-03-02 Nec Micro Systems Ltd Semiconductor device and refresh processing method of the device
JP2010129123A (en) * 2008-11-27 2010-06-10 Naltec Inc Memory control method and apparatus
JP2010211644A (en) * 2009-03-11 2010-09-24 Nec Corp Memory power consumption reduction system, method and program
JP2010534897A (en) * 2007-07-26 2010-11-11 クゥアルコム・インコーポレイテッド System and method for reducing dynamic RAM power consumption through the use of valid data indicators
JP2012074084A (en) * 2011-12-28 2012-04-12 Hitachi Ltd Power control method, computer system, and program
JP2013250791A (en) * 2012-05-31 2013-12-12 Toshiba Corp Program, calculation processing device, memory management method, and calculator

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006048342A (en) * 2004-08-04 2006-02-16 Matsushita Electric Ind Co Ltd Power-saving memory access control device
JP2006059403A (en) * 2004-08-18 2006-03-02 Nec Micro Systems Ltd Semiconductor device and refresh processing method of the device
JP2010534897A (en) * 2007-07-26 2010-11-11 クゥアルコム・インコーポレイテッド System and method for reducing dynamic RAM power consumption through the use of valid data indicators
JP2010129123A (en) * 2008-11-27 2010-06-10 Naltec Inc Memory control method and apparatus
JP2010211644A (en) * 2009-03-11 2010-09-24 Nec Corp Memory power consumption reduction system, method and program
JP2012074084A (en) * 2011-12-28 2012-04-12 Hitachi Ltd Power control method, computer system, and program
JP2013250791A (en) * 2012-05-31 2013-12-12 Toshiba Corp Program, calculation processing device, memory management method, and calculator

Similar Documents

Publication Publication Date Title
EP1408510A2 (en) Memory control apparatus, method and program
KR100444093B1 (en) Method for operating system support for memory compression
US10552337B2 (en) Memory management and device
JP5624583B2 (en) PROGRAM, COMPUTER PROCESSING DEVICE, MEMORY MANAGEMENT METHOD, AND COMPUTER
US7613870B2 (en) Efficient memory usage in systems including volatile and high-density memories
JP2009525555A (en) Reduce power consumption by disabling refresh of unused portions of DRAM during periods of device inactivity
US8645612B2 (en) Information processing device and information processing method
JPH0659982A (en) Method and device for controlling virtual storage
CN103019955B (en) The EMS memory management process of PCR-based AM main memory application
JP2019159802A (en) Power control method of storage device and storage device
JP2009122733A (en) Power control method, computer system, and program
CN105938458A (en) Software-defined heterogeneous hybrid memory management method
JP2007026094A (en) Execution device and application program
CN102567225A (en) Method and device for managing system memory
JP2004047051A (en) Memory control device and method and program
US7196961B2 (en) Memory control device
CN109521949A (en) It is a kind of that frequency data distribution method is write based on the perception for mixing scratch ROM
US7650472B2 (en) Method for reducing memory power consumption
JP2009258925A (en) Computer system and memory management method of computer system
JP2012168871A (en) Calculator, power consumption reduction method and program
KR20160111643A (en) DRAM device with page residence in translation lookaside buffer and selective refresh method thereof
US11693782B2 (en) Cache management method using object-oriented manner and associated microcontroller
US7853771B2 (en) Page allocation management for virtual memory
CN107632790A (en) A kind of method that Disk bandwidth is controlled in distributed memory system
CN119847443A (en) Method, system and storage medium for improving utilization efficiency of Dynamic Random Access Memory (DRAM) in Solid State Drive (SSD)