[go: up one dir, main page]

JP2013050880A - Memory control device and method therefor, data management device and method therefor, and program - Google Patents

Memory control device and method therefor, data management device and method therefor, and program Download PDF

Info

Publication number
JP2013050880A
JP2013050880A JP2011189077A JP2011189077A JP2013050880A JP 2013050880 A JP2013050880 A JP 2013050880A JP 2011189077 A JP2011189077 A JP 2011189077A JP 2011189077 A JP2011189077 A JP 2011189077A JP 2013050880 A JP2013050880 A JP 2013050880A
Authority
JP
Japan
Prior art keywords
write
data
size
control unit
write data
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.)
Withdrawn
Application number
JP2011189077A
Other languages
Japanese (ja)
Inventor
Nobuhiro Kaneko
暢宏 金子
Shusuke Saeki
修祐 佐伯
Hiroaki Ishizawa
宏明 石澤
Takashi Kida
嵩 木田
Tomohiro Katori
知浩 香取
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2011189077A priority Critical patent/JP2013050880A/en
Publication of JP2013050880A publication Critical patent/JP2013050880A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To enable suppression of a frequency of occurrence of write-back processing.SOLUTION: A memory control unit, from a file system control unit as an upper layer having write data to be written in a non-volatile memory, acquires the size of the write data through write-size notification. The memory control unit searches for a free area having the acquired size of the write data, and on the basis of a search result, notifies the upper layer of a logical address of a write destination of the write data. The present technique can be applied to, for example, a memory control device for controlling a non-volatile memory.

Description

本技術は、メモリ制御装置およびその方法、データ管理装置およびその方法、並びに、プログラムに関し、特に、ライトバック処理の発生頻度を抑制することができるようにするメモリ制御装置およびその方法、データ管理装置およびその方法、並びに、プログラムに関する。   The present technology relates to a memory control device and method, a data management device and method, and a program, and in particular, a memory control device and method and a data management device that can suppress the occurrence frequency of write-back processing. And a method thereof, and a program.

フラッシュメモリなどの不揮発性メモリは、パーソナルコンピュータ、デジタルスチルカメラ、オーディオレコーダ等の多くの電子機器で記憶媒体として利用されている。   Nonvolatile memories such as flash memories are used as storage media in many electronic devices such as personal computers, digital still cameras, and audio recorders.

不揮発性メモリでは、データの書き換え回数が有限であるため、ライトバック処理の発生頻度を抑えることが重要であり、そのための手法が本出願人により提案されている(例えば、特許文献1参照)。ここで、ライトバック処理とは、簡単に言うと、書き込み先の論理ブロックに対応するキャッシュ領域の物理ブロック(キャッシュブロック)に空きがない場合に、キャッシュブロック内の残すべきデータを他のブロックにコピーし、コピー後にキャッシュブロックのデータを消去する処理である。ライトバック処理ではデータの書き換えが必要となるため、できるだけライトバック処理の発生頻度を抑制させる必要がある。   In a nonvolatile memory, since the number of data rewrites is finite, it is important to suppress the frequency of occurrence of write-back processing, and a technique for this has been proposed by the present applicant (see, for example, Patent Document 1). Here, in simple terms, the write back processing means that when there is no free space in the physical block (cache block) of the cache area corresponding to the logical block of the write destination, the remaining data in the cache block is transferred to another block. This is a process of copying and erasing cache block data after copying. Since write-back processing requires data rewriting, it is necessary to suppress the frequency of write-back processing as much as possible.

特許第4356782号公報Japanese Patent No.4356782

しかしながら、特許文献1の手法では、上位層から、書き込み先の論理アドレスが指定され、デバイス側は上位層から指定された論理アドレスに書き込んでいた。このとき、上位層は、デバイス側の書き込み状態に関係なく、書き込み先の論理アドレスを指定するので、ライトバック処理の発生頻度を抑制する点においては不効率となる場合があった。   However, in the method of Patent Document 1, the logical address of the write destination is specified from the upper layer, and the device side writes to the logical address specified from the upper layer. At this time, since the upper layer designates the logical address of the write destination regardless of the write state on the device side, it may be inefficient in suppressing the occurrence frequency of the write back process.

本技術は、このような状況に鑑みてなされたものであり、ライトバック処理の発生頻度を抑制することができるようにするものである。   The present technology has been made in view of such a situation, and is capable of suppressing the occurrence frequency of write-back processing.

本技術の第1の側面のメモリ制御装置は、不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得する取得部と、取得された前記書き込みデータのサイズの空き領域を検索する検索部と、検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する通知部とを備える。   The memory control device according to the first aspect of the present technology includes an acquisition unit that acquires the size of the write data from an upper layer having the write data to be written to the nonvolatile memory, and an empty area of the acquired size of the write data. A search unit for searching; and a notification unit for notifying the upper layer of a logical address of a write destination of the write data based on a search result.

本技術の第1の側面のメモリ制御方法は、不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得し、取得された前記書き込みデータのサイズの空き領域を検索し、検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知するステップを含む。   The memory control method according to the first aspect of the present technology obtains the size of the write data from an upper layer having the write data to be written to the nonvolatile memory, searches for a free area of the obtained size of the write data, Based on the search result, a step of notifying the upper layer of the logical address of the write destination of the write data.

本技術の第1の側面のプログラムは、コンピュータに、不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得し、取得された前記書き込みデータのサイズの空き領域を検索し、検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する処理を実行させるためのものである。   The program according to the first aspect of the present technology acquires a size of the write data from an upper layer having write data to be written to a nonvolatile memory in a computer, and searches for an empty area of the acquired size of the write data. Based on the search result, a process for notifying the upper layer of the logical address of the write destination of the write data is executed.

本技術の第1の側面においては、不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズが取得され、取得された前記書き込みデータのサイズの空き領域が検索され、検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスが前記上位層に通知される。   In the first aspect of the present technology, the size of the write data is acquired from the upper layer having the write data to be written to the nonvolatile memory, and an empty area of the acquired size of the write data is searched, and the search result is Based on this, the logical address of the write destination of the write data is notified to the upper layer.

本技術の第2の側面のデータ管理装置は、不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知する通知部と、前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得する取得部とを備え、前記通知部は、取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する。   A data management device according to a second aspect of the present technology responds to a notification of a size of write data to be written to the nonvolatile memory and a notification of the size of the write data to a memory control device that controls the nonvolatile memory. And an acquisition unit that acquires a logical address of a write destination of the write data supplied from the memory control device, and the notification unit uses the acquired logical address as a write destination of the write data. A write command is notified to the memory control device.

本技術の第2の側面のデータ管理方法は、不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知し、前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得し、取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知するステップを含む。   In the data management method according to the second aspect of the present technology, the memory control device that controls the nonvolatile memory is notified of the size of the write data to be written to the nonvolatile memory, and in response to the notification of the size of the write data, Obtaining a logical address of a write destination of the write data supplied from the memory control device, and notifying the memory control device of a write command for the write data by using the acquired logical address as a write destination. .

本技術の第2の側面のプログラムは、コンピュータに、不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知し、前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得し、取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する処理を実行させるためのものである。   A program according to a second aspect of the present technology notifies a computer of a size of write data to be written to the nonvolatile memory to a memory control device that controls the nonvolatile memory, and responds to the notification of the size of the write data. A process of acquiring a logical address of a write destination of the write data supplied from the memory control device, and notifying the memory control device of a write command for the write data, using the acquired logical address as a write destination. It is for execution.

本技術の第2の側面においては、不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズが通知され、前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスが取得され、取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令が前記メモリ制御装置に通知される。   In the second aspect of the present technology, the memory control device that controls the nonvolatile memory is notified of the size of the write data to be written to the nonvolatile memory, and the memory control is performed in response to the notification of the size of the write data. A logical address of a write destination of the write data supplied from the device is acquired, and a write command for the write data is notified to the memory control device by using the acquired logical address as a write destination.

なお、プログラムは、伝送媒体を介して伝送することにより、又は、記録媒体に記録して、提供することができる。   The program can be provided by being transmitted through a transmission medium or by being recorded on a recording medium.

メモリ制御装置およびデータ管理装置は、独立した装置であっても良いし、1つの装置を構成している内部ブロックであっても良い。   The memory control device and the data management device may be independent devices, or may be internal blocks constituting one device.

本技術の第1及び第2の側面によれば、ライトバック処理の発生頻度を抑制することができる。   According to the first and second aspects of the present technology, the occurrence frequency of the write-back process can be suppressed.

本技術が適用された電子機器の一実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of one Embodiment of the electronic device to which this technique was applied. 記録データ制御に関する機能ブロック図である。It is a functional block diagram regarding recording data control. 不揮発性メモリの構造について説明する図である。It is a figure explaining the structure of a non-volatile memory. 起動シーケンスを説明するフローチャートである。It is a flowchart explaining a starting sequence. 従来の書き込み制御を説明する図である。It is a figure explaining the conventional writing control. 従来の書き込み制御を説明する図である。It is a figure explaining the conventional writing control. 従来の書き込み制御を説明する図である。It is a figure explaining the conventional writing control. 従来の書き込み制御を説明する図である。It is a figure explaining the conventional writing control. 従来の書き込み制御を説明する図である。It is a figure explaining the conventional writing control. 従来の書き込み制御を説明する図である。It is a figure explaining the conventional writing control. 従来の書き込み制御を説明するフローチャートである。It is a flowchart explaining the conventional writing control. 書き込みデータサイズがブロックサイズ未満である場合の書き込み制御を説明する図である。It is a figure explaining write control in case write data size is less than block size. 書き込みデータサイズがブロックサイズ未満である場合の書き込み制御を説明する図である。It is a figure explaining write control in case write data size is less than block size. 書き込みデータサイズがブロックサイズ未満である場合の書き込み制御を説明する図である。It is a figure explaining write control in case write data size is less than block size. 従来の書き込み制御について説明する図である。It is a figure explaining the conventional writing control. 従来の書き込み制御について説明する図である。It is a figure explaining the conventional writing control. 書き込みデータサイズがブロックサイズである場合の書き込み制御を説明する図である。It is a figure explaining write control in case write data size is a block size. 図17の書き込み制御を説明するフローチャートである。18 is a flowchart for explaining write control in FIG. 17. 1回の書き込みサイズ通知に対して2回の書き込みを行う例を示したフローチャートである。It is the flowchart which showed the example which performs twice writing with respect to one writing size notification. 1回の書き込みサイズ通知に対して2回の書き込みを行う例を示す図である。It is a figure which shows the example which performs two writing with respect to one writing size notification. 消去命令を行う処理のフローチャートである。It is a flowchart of the process which performs an erasure | elimination command. ファイルシステム制御部とメモリ制御部の詳細機能ブロック図である。It is a detailed functional block diagram of a file system control part and a memory control part.

以下、本技術を実施するための形態(以下、実施の形態という)について説明する。なお、説明は以下の順序で行う。
1. 電子機器の構成例
2. 書き込みデータ制御に関する機能ブロック図
3. 不揮発性メモリの動作の前提条件
4. 起動シーケンス
5. 従来手法による書き込み制御の説明
6. 書き込みデータサイズがブロックサイズ未満である場合の書き込み制御の説明
7. 書き込みデータサイズがブロックサイズである場合の書き込み制御の説明
8. 書き込み回数が複数回の例
9. データの消去命令
10. ファイルシステム制御部とメモリ制御部の詳細機能ブロック図
Hereinafter, modes for carrying out the present technology (hereinafter referred to as embodiments) will be described. The description will be given in the following order.
1. 1. Configuration example of electronic device Functional block diagram related to write data control FIG. 3. Precondition of operation of nonvolatile memory 4. Startup sequence 5. Description of conventional write control 6. Description of write control when write data size is less than block size 7. Description of write control when write data size is block size Example of writing multiple times 9. 10. Data erasure instruction Detailed functional block diagram of file system controller and memory controller

[電子機器の構成例]
図1は、本技術が適用された電子機器の一実施の形態の構成例を示すブロック図である。
[Configuration example of electronic equipment]
FIG. 1 is a block diagram illustrating a configuration example of an embodiment of an electronic device to which the present technology is applied.

図1に示される電子機器1は、例えば、パーソナルコンピュータ、デジタルスチルカメラ、デジタルビデオカメラ、オーディオレコーダ等の、画像データや音声データなどの所定のデータを記録する機器である。   An electronic device 1 shown in FIG. 1 is a device that records predetermined data such as image data and audio data, such as a personal computer, a digital still camera, a digital video camera, and an audio recorder.

電子機器1は、例えば、MPU11、ROM12、RAM13、不揮発性メモリ14、入出力インタフェース15、操作入力デバイス16、表示デバイス17、及び、通信インタフェース18を備える。また、電子機器1は、データの伝送路としてのバス19で各構成要素間を接続する。   The electronic device 1 includes, for example, an MPU 11, a ROM 12, a RAM 13, a nonvolatile memory 14, an input / output interface 15, an operation input device 16, a display device 17, and a communication interface 18. In addition, the electronic device 1 connects each component with a bus 19 as a data transmission path.

MPU11は、MPU(Micro Processing Unit)や、制御機能を実現するための複数の回路が集積された集積回路などで構成され、電子機器1全体を制御する制御部として機能する。   The MPU 11 includes an MPU (Micro Processing Unit), an integrated circuit in which a plurality of circuits for realizing a control function are integrated, and the like, and functions as a control unit that controls the entire electronic device 1.

MPU11は、電子機器1の電源投入とともに、オペレーティングシステム(OS)を起動実行し、FAT(File Allocation Tables)やUDF(Universal Disk Format)などのファイルシステムによって、不揮発性メモリ13に記録されている画像や音声のデータをファイルとして管理する。   The MPU 11 starts up and executes an operating system (OS) when the electronic device 1 is turned on, and an image recorded in the nonvolatile memory 13 by a file system such as FAT (File Allocation Tables) or UDF (Universal Disk Format). And audio data are managed as files.

ROM(Read Only Memory)12は、起動プログラムや演算パラメータなどの制御用データを記憶する。RAM(Random Access Memory)13は、例えば、MPU11により実行されるアプリケーションプログラムなどを一時記憶する。   A ROM (Read Only Memory) 12 stores control data such as a startup program and calculation parameters. A RAM (Random Access Memory) 13 temporarily stores, for example, an application program executed by the MPU 11.

不揮発性メモリ14は、NAND型のフラッシュメモリであり、画像データや音声データなど、様々なデータを記憶する記録媒体である。不揮発性メモリ14はまた、MPU11により実行される、オペレーティングシステム、デバイスドライバ、およびアプリケーションプログラムも記憶する。   The nonvolatile memory 14 is a NAND flash memory, and is a recording medium that stores various data such as image data and audio data. The nonvolatile memory 14 also stores an operating system, device drivers, and application programs that are executed by the MPU 11.

入出力インタフェース15は、操作入力デバイス16および表示デバイス17を接続する。入出力インタフェース15としては、例えば、USB(Universal Serial Bus)端子や、DVI(Digital Visual Interface)端子、HDMI(High-Definition Multimedia Interface)端子、各種処理回路などが挙げられるが、上記に限られない。   The input / output interface 15 connects the operation input device 16 and the display device 17. Examples of the input / output interface 15 include a USB (Universal Serial Bus) terminal, a DVI (Digital Visual Interface) terminal, an HDMI (High-Definition Multimedia Interface) terminal, and various processing circuits, but are not limited thereto. .

操作入力デバイス16は、操作部として機能し、また、表示デバイス17は、表示部として機能する。操作入力デバイス16としては、例えば、ボタン、方向キー、ジョグダイヤルなどの回転型セレクター、あるいは、これらの組み合わせなどが挙げられるが、上記に限られない。また、表示デバイス17としては、例えば、液晶ディスプレイ(Liquid Crystal Display;LCD)や有機ELディスプレイ(organic ElectroLuminescence display。または、OLEDディスプレイ(Organic Light Emitting Diode display)ともよばれる。)などが挙げられるが、上記に限られない。   The operation input device 16 functions as an operation unit, and the display device 17 functions as a display unit. Examples of the operation input device 16 include a rotary selector such as a button, a direction key, a jog dial, or a combination thereof, but is not limited thereto. Examples of the display device 17 include a liquid crystal display (LCD), an organic EL display (also referred to as an organic light emitting diode display), and the like. Not limited to.

なお、入出力インタフェース15は、電子機器1の外部装置としての操作入力デバイス(例えば、キーボードやマウスなど)や、表示デバイス(例えば、外部ディスプレイなど)と接続することもできる。また、表示デバイス17は、例えばタッチスクリーンなど、表示とユーザ操作とが可能なデバイスであってもよい。   The input / output interface 15 can also be connected to an operation input device (for example, a keyboard or a mouse) as an external device of the electronic apparatus 1 or a display device (for example, an external display). The display device 17 may be a device capable of display and user operation, such as a touch screen.

通信インタフェース18は、ネットワークを介して(あるいは、直接的に)、サーバなどの外部装置と無線または有線で通信を行うための通信部として機能する。ここで、通信インタフェース18としては、例えば、通信アンテナおよびRF回路(無線通信)や、IEEE802.15.1ポートおよび送受信回路(無線通信)、IEEE802.11bポートおよび送受信回路(無線通信)、あるいはLAN端子および送受信回路(有線通信)などが挙げられる。   The communication interface 18 functions as a communication unit for performing wireless or wired communication with an external device such as a server via a network (or directly). Here, examples of the communication interface 18 include a communication antenna and an RF circuit (wireless communication), an IEEE 802.15.1 port and a transmission / reception circuit (wireless communication), an IEEE 802.11b port and a transmission / reception circuit (wireless communication), or a LAN. Examples include terminals and transmission / reception circuits (wired communication).

ここで、本実施の形態に係るネットワークとしては、例えば、LAN(Local Area Network)やWAN(Wide Area Network)などの有線ネットワーク、基地局を介した無線WAN(WWAN;Wireless Wide Area Network)や無線MAN(WMAN;Wireless Metropolitan Area Network)などの無線ネットワーク、あるいは、TCP/IP(Transmission Control Protocol/Internet Protocol)などの通信プロトコルを用いたインターネットなどが挙げられる。   Here, as the network according to the present embodiment, for example, a wired network such as a LAN (Local Area Network) or a WAN (Wide Area Network), a wireless WAN (WWAN; Wireless Wide Area Network) via a base station, or a wireless Examples include a wireless network such as MAN (WMAN; Wireless Metropolitan Area Network) or the Internet using a communication protocol such as TCP / IP (Transmission Control Protocol / Internet Protocol).

電子機器1は、以上のように構成される。なお、本実施の形態に係る電子機器1のハードウェア構成は、図1に示す構成に限られない。   The electronic device 1 is configured as described above. Note that the hardware configuration of the electronic apparatus 1 according to the present embodiment is not limited to the configuration shown in FIG.

[書き込みデータ制御に関する機能ブロック図]
上述した電子機器1において、例えば、撮影された画像データや、受信した放送信号に基づく画像データが、不揮発性メモリ14に記録される場合、MPU11は、それらの画像データをファイルとして、不揮発性メモリ14に記録させる。
[Functional block diagram related to write data control]
In the electronic device 1 described above, for example, when captured image data or image data based on a received broadcast signal is recorded in the nonvolatile memory 14, the MPU 11 uses the image data as a file as a nonvolatile memory. 14 to record.

図2は、不揮発性メモリ14にデータを書き込む場合の制御に関する機能ブロック図を示している。   FIG. 2 is a functional block diagram relating to control when data is written to the nonvolatile memory 14.

不揮発性メモリ14へのデータの書き込みは、MPU11により実行されるオペレーティングシステム42により制御・管理される。オペレーティングシステム42は、いわゆる基本プログラムであり、例えば、電子機器1のハードウェアなどのリソースの取り扱いを制御する。オペレーティングシステム42には、ファイルシステム制御部61とメモリ制御部62が少なくとも含まれる。   Writing data to the nonvolatile memory 14 is controlled and managed by the operating system 42 executed by the MPU 11. The operating system 42 is a so-called basic program, and controls the handling of resources such as hardware of the electronic device 1, for example. The operating system 42 includes at least a file system control unit 61 and a memory control unit 62.

オペレーティングシステム42上で実行されるアプリケーションプログラム41は、各種の処理を実行して、ファイルの書き込みおよび読み出しをオペレーティングシステム42に要求する。アプリケーションプログラム41は、オペレーティングシステム42のファイルシステム制御部61に対して、ファイル単位(レベル)でのアクセス(読み出しまたは書き込み)を要求(指示)する。   The application program 41 executed on the operating system 42 executes various processes and requests the operating system 42 to write and read files. The application program 41 requests (instructs) access (reading or writing) in file units (levels) to the file system control unit 61 of the operating system 42.

ファイルシステム制御部61は、例えば、FATファイルシステムであり、不揮発性メモリ14に記録されているデータの書き込みおよび読み出しをTU(Translation Unit)単位で管理する。ここで、TU単位とは、不揮発性メモリ14のデータの書き込みおよび読み出し単位をページ、消去単位をブロックとすると、ページサイズ以上、ブロックサイズ未満で構成されるサイズである。従って、ファイルシステム制御部61は、データの書き込みおよび読み出しについては、TU単位でランダムにメモリ制御部62に指示し、データの消去については、ブロック単位でランダムにメモリ制御部62に指示することができる。   The file system control unit 61 is, for example, a FAT file system, and manages writing and reading of data recorded in the nonvolatile memory 14 in units of TU (Translation Unit). Here, the TU unit is a size configured to be equal to or larger than the page size and smaller than the block size when the data writing and reading unit of the nonvolatile memory 14 is a page and the erasing unit is a block. Therefore, the file system control unit 61 may instruct the memory control unit 62 at random for writing and reading data in units of TUs, and may instruct the memory control unit 62 at random for deletion of data in units of blocks. it can.

ファイルシステム制御部61は、アプリケーションプログラム41から一つのファイルのデータの書き込みが要求された場合、メモリ制御部62に対して一度の書き込み命令で行うのではなく、複数回の書き込み命令をTU単位で行う。なお、ファイルシステム制御部61は、メモリ制御部62に、複数TUを指定して、まとめて書き込むことは可能である。   When the file system control unit 61 requests the application program 41 to write data of one file, the file system control unit 61 does not perform a single write command to the memory control unit 62, but performs multiple write commands in units of TUs. Do. Note that the file system control unit 61 can specify a plurality of TUs and write them together in the memory control unit 62.

メモリ制御部62は、例えば、デバイスドライバで構成され、不揮発性メモリ14の動作に必要な情報を上位層であるファイルシステム制御部61に供給し、ファイルシステム制御部61の制御に基づいて、不揮発性メモリ14に対するデータの書き込みまたは読み出しなど、不揮発性メモリ14の動作を制御する。   The memory control unit 62 includes, for example, a device driver, and supplies information necessary for the operation of the nonvolatile memory 14 to the file system control unit 61 that is an upper layer. Based on the control of the file system control unit 61, the memory control unit 62 The operation of the nonvolatile memory 14 such as writing or reading of data with respect to the nonvolatile memory 14 is controlled.

メモリ制御部62は、ファイルシステム制御部61からのTU単位(レベル)でのアクセス(読み出しまたは書き込み)の要求(指示)に対して、ページ単位で不揮発性メモリ14にアクセスする。また、メモリ制御部62は、データを消去する場合には、上述したように、ブロック単位で消去する。   In response to a request (instruction) for access (reading or writing) in units of TUs (levels) from the file system control unit 61, the memory control unit 62 accesses the nonvolatile memory 14 in units of pages. In addition, when erasing data, the memory control unit 62 erases data in units of blocks as described above.

不揮発性メモリ14は、主記憶領域81とキャッシュ領域82とで構成される。主記憶領域81は、データが最終的に記憶されるデータ領域であり、主記憶領域81のサイズ(記憶容量)が、ユーザ側(ファイルシステム制御部61側)で認識される不揮発性メモリ14のメモリサイズとなる。キャッシュ領域82は、データを一時的に保存する領域である。   The nonvolatile memory 14 includes a main storage area 81 and a cache area 82. The main storage area 81 is a data area in which data is finally stored, and the size (storage capacity) of the main storage area 81 is recognized by the user side (file system control unit 61 side). Memory size. The cache area 82 is an area for temporarily storing data.

[不揮発性メモリの動作の前提条件]
図3を参照して、不揮発性メモリ14を制御するための前提となる不揮発性メモリ14の制御構造について説明する。
[Prerequisites for nonvolatile memory operation]
With reference to FIG. 3, a control structure of the nonvolatile memory 14 which is a premise for controlling the nonvolatile memory 14 will be described.

不揮発性メモリ14の記憶領域(物理領域)は、複数の物理ブロックで構成される。主記憶領域81は、複数の物理ブロックで構成され、主記憶領域81を構成する各物理ブロックをユーザブロックと呼ぶ。   The storage area (physical area) of the nonvolatile memory 14 is composed of a plurality of physical blocks. The main storage area 81 is composed of a plurality of physical blocks, and each physical block constituting the main storage area 81 is called a user block.

一方、キャッシュ領域82は、複数の物理ブロックで構成され、キャッシュ領域82を構成する各物理ブロックをキャッシュブロックと呼ぶ。ユーザブロックとキャッシュブロックは、同一のブロックサイズである。   On the other hand, the cache area 82 is composed of a plurality of physical blocks, and each physical block constituting the cache area 82 is called a cache block. The user block and the cache block have the same block size.

また、ファイルシステム制御部61は、LBA(Logical Block Address)空間でデータの書き込み等を、メモリ制御部62に指示するため、主記憶領域81を構成する各ユーザブロックと1対1に、論理ブロックが割り当てられている。   Further, the file system control unit 61 instructs the memory control unit 62 to write data in an LBA (Logical Block Address) space, so that each user block constituting the main storage area 81 has a one-to-one logical block. Is assigned.

論理ブロックは、複数の論理TU(以下、LTUという。)で構成され、論理TUに対応する物理領域の単位が、上述したTUである。従って、主記憶領域81の各ユーザブロックは、複数のTUで構成される。ファイルシステム制御部61は、不揮発性メモリ14に対するデータの書き込みおよび読み出しの制御をLTU単位で行い、データの消去の制御を、論理ブロック単位で行う。なお、本実施の形態では、図3に示されるように、1つの論理ブロックは、4つのLTUで構成されている。   The logical block is composed of a plurality of logical TUs (hereinafter referred to as LTU), and the unit of the physical area corresponding to the logical TU is the TU described above. Accordingly, each user block in the main storage area 81 is composed of a plurality of TUs. The file system control unit 61 controls data writing and reading with respect to the nonvolatile memory 14 in units of LTUs, and controls data erasing in units of logical blocks. In the present embodiment, as shown in FIG. 3, one logical block is composed of four LTUs.

また、メモリ制御部62では、1つの論理ブロックに対して割り当て可能なキャッシュブロックの個数、および、キャッシュブロックを割り当てられる論理ブロックの個数が制限条件として決められている。メモリ制御部62は、その制限条件の下、データが記憶されていない(消去済み)物理ブロックである消去済みブロックを、所定の論理ブロックに対応するキャッシュブロックとして割り当てることができる。本実施の形態では、1つの論理ブロックに対して割り当て可能なキャッシュブロックの個数と、キャッシュブロックを割り当てられる論理ブロックの個数は、いずれも3個であるとする。従って、本実施の形態の不揮発性メモリ14は、物理的な記憶領域として、少なくとも12個の物理ブロックを有していることになる。   In the memory control unit 62, the number of cache blocks that can be allocated to one logical block and the number of logical blocks that can be allocated a cache block are determined as limiting conditions. Under the restriction condition, the memory control unit 62 can allocate an erased block that is a physical block in which data is not stored (erased) as a cache block corresponding to a predetermined logical block. In the present embodiment, the number of cache blocks that can be allocated to one logical block and the number of logical blocks that can be allocated a cache block are both three. Therefore, the nonvolatile memory 14 according to the present embodiment has at least 12 physical blocks as physical storage areas.

ユーザブロックおよびキャッシュブロックは、そこに記録されていたデータが消去され、消去済みブロックとされると、その後、再び、ユーザブロックまたはキャッシュブロックとして利用することができる。   The user block and the cache block can be used again as a user block or a cache block when the data recorded in the user block and the cache block are erased to be an erased block.

メモリ制御部62は、LBA(Logical Block Address)空間で表される論理領域と、不揮発性メモリ14の物理領域との対応関係を管理し、ファイルシステム制御部61からの論理アドレスに対応する不揮発性メモリ14の物理領域にアクセスする。   The memory control unit 62 manages a correspondence relationship between a logical area represented by an LBA (Logical Block Address) space and a physical area of the nonvolatile memory 14, and is a non-volatile corresponding to the logical address from the file system control unit 61. The physical area of the memory 14 is accessed.

図3で示される不揮発性メモリ14の主記憶領域81は、3個の論理ブロック0乃至3に対応するユーザブロック0乃至3で構成されている。そして、論理ブロック1に対して、3個のキャッシュブロック1−1乃至1−3が割り当てられ、それ以外の論理ブロック0および2には、キャッシュブロックが割り当てられていない状態を示している。   The main memory area 81 of the nonvolatile memory 14 shown in FIG. 3 includes user blocks 0 to 3 corresponding to the three logical blocks 0 to 3. Then, three cache blocks 1-1 to 1-3 are assigned to the logical block 1, and no cache block is assigned to the other logical blocks 0 and 2.

図3において、物理ブロックを構成する各TUに付された符号は、物理領域の各TUの絶対番地(絶対アドレス)を表すものとする。図3においては、理解を容易にするため、ユーザブロック0乃至2と、キャッシュブロック1−1乃至1−3に対して、絶対番地の小さい方から順に割り当てた例を示しているが、どの物理ブロックがユーザブロックまたはキャッシュブロックとして割り当てられるかはメモリ制御部62の制御によって異なる。即ち、物理ブロックは、メモリ制御部62の制御によって、ユーザブロックともなり得るし、キャッシュブロックともなり得る。   In FIG. 3, the reference numerals attached to the TUs constituting the physical block represent the absolute addresses (absolute addresses) of the TUs in the physical area. FIG. 3 shows an example in which the user blocks 0 to 2 and the cache blocks 1-1 to 1-3 are assigned in order from the smallest absolute address for easy understanding. Whether a block is allocated as a user block or a cache block depends on the control of the memory control unit 62. That is, the physical block can be a user block or a cache block under the control of the memory control unit 62.

また、図3において、グレー色で塗りつぶされたTUは、データが記録済みのTUであることを示し、以降の図においても同様に表す。   Further, in FIG. 3, a TU filled in gray indicates that the data has been recorded, and is similarly expressed in the following drawings.

不揮発性メモリ14の制御および構成についてまとめると、次のように言うことができる。主記憶領域81は、複数のユーザブロックで構成され、キャッシュ領域82は、複数のキャッシュブロックで構成される。主記憶領域81は、不揮発性メモリ14としてのメモリ容量と同一の容量を有し、キャッシュ領域82は、不揮発性メモリ14としてのメモリ容量と同一の容量を有する必要が無い。主記憶領域81とキャッシュ領域82は、異なるデバイスである必要が無く、同じデバイス内の物理ブロックごとに主記憶領域81またはキャッシュ領域82を割り当てることが可能である。   The control and configuration of the nonvolatile memory 14 can be summarized as follows. The main storage area 81 is composed of a plurality of user blocks, and the cache area 82 is composed of a plurality of cache blocks. The main storage area 81 has the same capacity as the memory capacity of the nonvolatile memory 14, and the cache area 82 does not have to have the same capacity as the memory capacity of the nonvolatile memory 14. The main storage area 81 and the cache area 82 do not need to be different devices, and the main storage area 81 or the cache area 82 can be assigned to each physical block in the same device.

本実施の形態の主記憶領域81とキャッシュ領域82は、上述したように、一つのデバイス(記憶領域)を、主記憶領域81またはキャッシュ領域82として適宜使い分けるようにして構成されるが、主記憶領域81とキャッシュ領域82は、それぞれ異なるデバイスとして予め区別して設けられてもよい。   As described above, the main storage area 81 and the cache area 82 of the present embodiment are configured so that one device (storage area) is properly used as the main storage area 81 or the cache area 82. The area 81 and the cache area 82 may be provided separately as different devices.

[起動シーケンス]
図4は、電子機器1の電源が投入され、オペレーティングシステム42が起動したときに、ファイルシステム制御部61とメモリ制御部62との間で行われる処理を説明するフローチャートである。
[Startup sequence]
FIG. 4 is a flowchart illustrating a process performed between the file system control unit 61 and the memory control unit 62 when the electronic device 1 is turned on and the operating system 42 is activated.

オペレーティングシステム42が起動されると、ステップS1において、ファイルシステム制御部61は、メモリ制御部62にLTUのサイズ(LTUサイズ)と論理ブロックのサイズ(論理ブロックサイズ)を要求する。   When the operating system 42 is activated, in step S1, the file system control unit 61 requests the LTU size (LTU size) and the logical block size (logical block size) from the memory control unit 62.

ステップS2において、メモリ制御部62は、ファイルシステム制御部61からの要求に応じて、LTUのサイズと論理ブロックのサイズをファイルシステム制御部61に返答(出力)する。   In step S 2, the memory control unit 62 returns (outputs) the LTU size and the logical block size to the file system control unit 61 in response to a request from the file system control unit 61.

以上の処理により、ファイルシステム制御部61はLTUのサイズと論理ブロックのサイズを認識し、LTU単位による制御が可能となる。   Through the above processing, the file system control unit 61 recognizes the size of the LTU and the size of the logical block, and enables control in units of LTU.

[従来手法による書き込み制御の説明]
次に、図5乃至図11を参照して、従来行われていた不揮発性メモリ14に対する書き込み制御について説明する。なお、図5乃至図11の説明において、便宜上、ファイルシステム制御部61とメモリ制御部62が行うものとして説明する。
[Description of conventional write control]
Next, referring to FIG. 5 to FIG. 11, the conventional writing control for the nonvolatile memory 14 will be described. In the description of FIGS. 5 to 11, for the sake of convenience, the description will be made assuming that the file system control unit 61 and the memory control unit 62 perform.

図5は、データを書き込み前の不揮発性メモリ14の状態を示している。   FIG. 5 shows a state of the nonvolatile memory 14 before data is written.

データ書き込み前の不揮発性メモリ14の状態は、図3に示した状態と同様に、論理ブロック1と、それに割り当てられた3個のキャッシュブロック1−1乃至1−3の全てのTUがデータ書き込み済みの状態である。なお、書き込み済みの各TUのうち、有効なデータは、ユーザブロック1のTU4と、キャッシュブロック1−1のTU13、キャッシュブロック1−2のTU18、及び、キャッシュブロック1−3のTU23であるとする。   The state of the nonvolatile memory 14 before data writing is the same as the state shown in FIG. 3, in which all TUs of the logical block 1 and the three cache blocks 1-1 to 1-3 assigned thereto are written. It is a completed state. Of the written TUs, valid data are TU4 of user block 1, TU13 of cache block 1-1, TU18 of cache block 1-2, and TU23 of cache block 1-3. To do.

不揮発性メモリ14の状態が、図5に示す状態であるとき、ファイルシステム制御部61から、開始LTUアドレスとして「5(LTU5)」、書き込みTU数として「2」の書き込み命令が供給された場合の従来手法による制御を、以下で説明する。   When the state of the nonvolatile memory 14 is the state shown in FIG. 5, when a write command of “5 (LTU5)” as the start LTU address and “2” as the number of write TUs is supplied from the file system control unit 61 The control by the conventional method will be described below.

初めに、メモリ制御部62は、書き込み対象のLTU5およびLTU6が含まれる論理ブロック1に対応するユーザブロック1に割り当てられたキャッシュブロック1−1乃至1−3の各TUがいずれも書き込み済みであるので、図6に示されるように、他の消去済みブロックを確保する。図6の例では、TU32乃至TU35で構成される物理ブロックが消去済みブロックとして確保されている。   First, the memory control unit 62 has already written each TU of the cache blocks 1-1 to 1-3 assigned to the user block 1 corresponding to the logical block 1 including the write target LTU 5 and LTU 6. Therefore, as shown in FIG. 6, another erased block is secured. In the example of FIG. 6, a physical block composed of TU32 to TU35 is secured as an erased block.

そして、メモリ制御部62は、確保した消去済みブロックに、論理ブロック1の有効なデータをコピーする。具体的には、図6に示すように、ユーザブロック1のTU4、キャッシュブロック1−1のTU13、キャッシュブロック1−2のTU18、及び、キャッシュブロック1−3のTU23のデータを、確保した消去済みブロックのTU32乃至TU35にコピーする。   Then, the memory control unit 62 copies valid data of the logical block 1 to the secured erased block. Specifically, as shown in FIG. 6, erasure in which the data of TU4 of user block 1, TU13 of cache block 1-1, TU18 of cache block 1-2, and TU23 of cache block 1-3 are secured. Copy to TU32 to TU35 of the completed block.

次に、メモリ制御部62は、図7に示されるように、コピー完了により不要になった、TU4乃至TU7で構成されるユーザブロック1と、TU12乃至TU23で構成されるキャッシュブロック1−1乃至1−3のデータを消去する。   Next, as shown in FIG. 7, the memory control unit 62 makes the user block 1 composed of TU4 to TU7 and the cache blocks 1-1 to 1-1 composed of TU12 to TU23, which are no longer necessary upon completion of copying. 1-3 data is erased.

そして、メモリ制御部62は、図8に示されるように、先ほど有効なデータをコピーした元消去済みブロックを、論理ブロック1に対応する新たなユーザブロック1として割り当てる。換言すれば、論理ブロック1に対応するユーザブロック1が、TU4乃至TU7で構成される物理ブロックから、TU32乃至TU35で構成される物理ブロックに変更される。   Then, as shown in FIG. 8, the memory control unit 62 assigns the original erased block obtained by copying valid data as a new user block 1 corresponding to the logical block 1. In other words, the user block 1 corresponding to the logical block 1 is changed from a physical block composed of TU4 to TU7 to a physical block composed of TU32 to TU35.

以上のように、書き込み先の論理ブロックに対応するキャッシュブロックに空きがない場合に、ユーザブロック及びキャッシュブロック内の有効なデータを新たな物理ブロックにコピーし、コピー後に現在のキャッシュブロックのデータを消去する処理がライトバック処理と呼ばれる。   As described above, when there is no free space in the cache block corresponding to the logical block of the write destination, valid data in the user block and the cache block is copied to a new physical block, and the data of the current cache block is copied after the copy. The process of erasing is called a write back process.

ライトバック処理の後、メモリ制御部62は、図9に示されるように、1つの消去済みブロックをさらに確保し、論理ブロック1に対応する1個目のキャッシュブロック1−1として割り当て、書き込み命令とともに供給されたデータを、そこに書き込む。図9では、TU20乃至TU23で構成される物理ブロックが、キャッシュブロック1−1として割り当てられ、そのうちのTU20とTU21に、ファイルシステム制御部61から供給されたデータが書き込まれている。このとき、メモリ制御部62では、論理ブロック1のLTU5に対して新キャッシュブロック1−1のTU20が、論理ブロック1のLTU6に対して新キャッシュブロック1−1のTU21が参照されるようなアドレス変換が設定される。   After the write-back process, the memory control unit 62 further secures one erased block as shown in FIG. 9, assigns it as the first cache block 1-1 corresponding to the logical block 1, and writes the write command. The data supplied with it is written there. In FIG. 9, a physical block composed of TU20 to TU23 is allocated as a cache block 1-1, and data supplied from the file system control unit 61 is written in TU20 and TU21. At this time, the memory control unit 62 refers to an address such that the TU 20 of the new cache block 1-1 is referred to the LTU 5 of the logical block 1 and the TU 21 of the new cache block 1-1 is referred to the LTU 6 of the logical block 1. Conversion is set.

図10は、開始LTUアドレス:5、書き込みTU数:2の書き込み命令による書き込み処理完了後の不揮発性メモリ14の最終的な状態を示している。   FIG. 10 shows the final state of the non-volatile memory 14 after the completion of the write process by the write command with the start LTU address: 5 and the write TU number: 2.

図11は、図5乃至図10を参照して説明した従来の書き込み制御を説明するフローチャートである。   FIG. 11 is a flowchart for explaining the conventional write control described with reference to FIGS.

ファイルシステム制御部61は、上位のアプリケーションプログラム41からのデータ書き込み命令を受けて、ステップS11において、開始LTUアドレス:5(LTU5)、書き込みTU数:2の書き込み命令をメモリ制御部62に出力する。   The file system control unit 61 receives a data write command from the upper application program 41 and outputs a write command with a start LTU address: 5 (LTU 5) and a write TU number: 2 to the memory control unit 62 in step S11. .

メモリ制御部62は、ステップS12において、書き込み対象のLTU5およびLTU6が含まれる論理ブロック1に対応するユーザブロック1に割り当てられたキャッシュブロック1−1乃至1−3の各TUがいずれも書き込み済みであるので、ライトバック処理を行う。即ち、メモリ制御部62は、ユーザブロック及びキャッシュブロック内の有効なデータを、(新ユーザブロックとなる)新たな物理ブロックにコピーし、コピー後に現在のユーザブロック及びキャッシュブロックのデータを消去する処理を行う。   In step S12, the memory control unit 62 has written all the TUs of the cache blocks 1-1 to 1-3 assigned to the user block 1 corresponding to the logical block 1 including the write target LTU5 and LTU6. Since there is, write back processing is performed. That is, the memory control unit 62 copies valid data in the user block and cache block to a new physical block (to be a new user block), and erases the current user block and cache block data after copying. I do.

ステップS13において、メモリ制御部62は、新キャッシュブロックとなる消去済みブロックを確保し、書き込み命令とともにファイルシステム制御部61から供給されたデータを、確保した新キャッシュブロックに書き込む。   In step S13, the memory control unit 62 secures an erased block to be a new cache block, and writes the data supplied from the file system control unit 61 together with the write command to the secured new cache block.

そして、ステップS14において、メモリ制御部62は、書き込み完了後、書き込み命令に対する終了応答を、ファイルシステム制御部61に返信して、終了する。   In step S14, after the writing is completed, the memory control unit 62 returns an end response to the write command to the file system control unit 61 and ends.

以上のように、従来の手法では、デバイス側の書き込み状態に関係なく、上位層であるファイルシステム制御部61が独自にデータの書き込み先(開始LTUアドレス)を指定していた。従って、上述した例で言えば、論理ブロック0または論理ブロック2をデータの書き込み先に指定すれば、ライトバック処理を回避できた場合までも、ライトバック処理が行われることとなっていた。   As described above, in the conventional method, the file system control unit 61, which is the upper layer, independently specifies the data write destination (start LTU address) regardless of the write state on the device side. Therefore, in the above-described example, if the logical block 0 or the logical block 2 is designated as the data write destination, the write back processing is performed even when the write back processing can be avoided.

[書き込みデータサイズがブロックサイズ未満である場合の書き込み制御の説明]
そこで、図12および図13を参照して、ファイルシステム制御部61とメモリ制御部62とで行われる、本技術を適用した書き込み制御を説明する。なお、図12および図13を参照して説明する書き込み制御方法は、書き込むデータのデータサイズがブロックサイズ未満、即ち、TU数が4個未満である場合の方法である。書き込むデータのデータサイズがブロックサイズであるときの書き込み制御方法については後述する。
[Description of write control when write data size is less than block size]
Therefore, with reference to FIG. 12 and FIG. 13, write control to which the present technology is applied performed by the file system control unit 61 and the memory control unit 62 will be described. The write control method described with reference to FIGS. 12 and 13 is a method in the case where the data size of the data to be written is less than the block size, that is, the TU number is less than 4. A write control method when the data size of the write data is the block size will be described later.

図12は、ファイルシステム制御部61とメモリ制御部62とで行われる本技術を適用した書き込み制御のフローチャートである。   FIG. 12 is a flowchart of write control to which the present technology is applied that is performed by the file system control unit 61 and the memory control unit 62.

ファイルシステム制御部61は、上位のアプリケーションプログラム41からのデータ書き込み命令を受けると、ステップS31において、書き込みサイズを通知する書き込みサイズ通知を、メモリ制御部62に出力する。上述した例でいうと、TU数:2を書き込みサイズとして指定した書き込みサイズ通知が、ファイルシステム制御部61からメモリ制御部62に供給される。   When receiving a data write command from the upper application program 41, the file system control unit 61 outputs a write size notification for notifying the write size to the memory control unit 62 in step S31. In the above-described example, the write size notification specifying the TU number: 2 as the write size is supplied from the file system control unit 61 to the memory control unit 62.

ステップS32において、メモリ制御部62は、キャッシュブロックのデータの書き込み状態に基づいて、ライトバック処理を発生させず、指定された書き込みサイズのデータを書き込み可能な書き込み先を検索する。検索結果として、例えば、LTUアドレス8と9が検索されたとする。   In step S <b> 32, the memory control unit 62 searches for a write destination where data of a specified write size can be written without generating a write-back process based on the data write state of the cache block. As a search result, for example, LTU addresses 8 and 9 are searched.

そして、ステップS33において、メモリ制御部62は、検索結果に基づいて、開始LTUアドレスとして、先頭のLTUアドレス(8)を通知する開始LTUアドレス通知を、ファイルシステム制御部61に出力する。   In step S33, the memory control unit 62 outputs a start LTU address notification for notifying the head LTU address (8) as the start LTU address to the file system control unit 61 based on the search result.

ステップS34において、ファイルシステム制御部61は、ステップS31で先に通知した書き込みサイズと、開始LTUアドレス通知で指定された開始LTUアドレスを指定した書き込み命令をメモリ制御部62に出力する。即ち、ファイルシステム制御部61は、開始LTUアドレス:8(LTU8)、書き込みTU数:2の書き込み命令をメモリ制御部62に出力する。   In step S34, the file system control unit 61 outputs to the memory control unit 62 a write command specifying the write size notified in step S31 and the start LTU address specified in the start LTU address notification. That is, the file system control unit 61 outputs a write command having a start LTU address: 8 (LTU 8) and a write TU number: 2 to the memory control unit 62.

ステップS35において、メモリ制御部62は、書き込み命令とともにファイルシステム制御部61から供給されたデータを、指定された開始LTUアドレスから書き込む。指定された開始LTUアドレスが含まれる論理ブロックに対応するキャッシュブロックは、必要に応じて割り当てられる。   In step S35, the memory control unit 62 writes the data supplied from the file system control unit 61 together with the write command from the designated start LTU address. A cache block corresponding to a logical block including the designated start LTU address is allocated as necessary.

そして、ステップS35において、メモリ制御部62は、書き込み完了後、書き込み命令に対する終了応答を、ファイルシステム制御部61に返信して、終了する。   In step S35, after the writing is completed, the memory control unit 62 returns an end response to the write command to the file system control unit 61 and ends.

図13は、図12で説明した処理を図示したものである。なお、図13において、データを書き込む前の不揮発性メモリ14の状態は、図5に示した従来例と同様である。   FIG. 13 illustrates the processing described in FIG. In FIG. 13, the state of the nonvolatile memory 14 before the data is written is the same as that of the conventional example shown in FIG.

図13に示されるように、メモリ制御部62は、TU数:2の書き込みサイズが通知されたとき、上限値の3個のキャッシュブロックが割り当てられ、かつ、その全てでデータが書き込み済みである論理ブロック1を除外したなかから、例えば、論理ブロック2のLTUアドレス8と9を書き込み先として検索し、決定する。そして、メモリ制御部62は、LTUアドレス:8を開始LTUアドレスとして通知する。   As shown in FIG. 13, when the write size of TU number: 2 is notified, the memory control unit 62 is allocated three cache blocks of the upper limit value, and data has been written in all of them. Since the logical block 1 is excluded, for example, the LTU addresses 8 and 9 of the logical block 2 are searched as the write destination and determined. Then, the memory control unit 62 notifies the LTU address: 8 as the start LTU address.

ファイルシステム制御部61は、開始LTUアドレス通知で指定された開始LTUアドレス(LTUアドレス:8)を指定して、書き込み命令をメモリ制御部62に出力する。   The file system control unit 61 designates the start LTU address (LTU address: 8) designated by the start LTU address notification, and outputs a write command to the memory control unit 62.

書き込み前の状態では、論理ブロック2に対しては1個のキャッシュブロックも割り当てられておらず、また、キャッシュブロックが割り当てられている論理ブロックも論理ブロック1の1個だけである。従って、論理ブロック2に対してキャッシュブロックを割り当てることができる。そこで、メモリ制御部62は、論理ブロック2に対して1個目のキャッシュブロック2−1として、TU28乃至TU31で構成される1個の消去済みブロックを確保し、先頭の2つのTUにデータを書き込む。   In the state before writing, one cache block is not assigned to the logical block 2, and only one logical block 1 is assigned to the logical block 1. Accordingly, a cache block can be allocated to the logical block 2. Therefore, the memory control unit 62 secures one erased block composed of TU28 to TU31 as the first cache block 2-1 for the logical block 2, and stores data in the first two TUs. Write.

以上のように、ファイルシステム制御部61は、データの書き込み命令を出力する前に、最適な書き込み先、即ち、ライトバック処理が発生しない書き込み先をメモリ制御部62から取得する。そして、ファイルシステム制御部61は、取得した書き込み先を開始LTUアドレスで指定して、書き込み命令をメモリ制御部62に出力する。   As described above, the file system control unit 61 acquires the optimal write destination, that is, the write destination where the write-back processing does not occur, from the memory control unit 62 before outputting the data write command. Then, the file system control unit 61 designates the acquired write destination with the start LTU address, and outputs a write command to the memory control unit 62.

このように、メモリ制御部62が最適な書き込み先を予め指定することで、ライトバック処理を行うことなく、データを書き込むことができる。即ち、本技術を適用した書き込み制御方法によれば、ライトバック処理の発生頻度を抑制することができる。   As described above, the memory control unit 62 designates the optimum write destination in advance, so that data can be written without performing the write-back process. That is, according to the write control method to which the present technology is applied, the occurrence frequency of the write back process can be suppressed.

なお、上述した例のように、選択可能な論理ブロック0と論理ブロック2に対応するキャッシュブロックの書き込み状態が同一条件である場合には、メモリ制御部62は、論理ブロック0と論理ブロック2のどちらを書き込み先として選択してもよい。   As in the example described above, when the write states of the cache blocks corresponding to the selectable logical block 0 and logical block 2 are the same condition, the memory control unit 62 determines whether the logical block 0 and logical block 2 Either may be selected as the write destination.

一方、例えば、図14に示されるように、選択可能な論理ブロック0と論理ブロック2に対応するキャッシュブロックの書き込み状態が同一でない場合には、メモリ制御部62は、書き込みサイズと同一のキャッシュブロックの空きTU数を有する論理ブロックを書き込み先として指定する。   On the other hand, for example, as shown in FIG. 14, when the write states of the cache blocks corresponding to the selectable logical block 0 and logical block 2 are not the same, the memory control unit 62 uses the same cache block as the write size. A logical block having the number of empty TUs is designated as a write destination.

図14の例では、論理ブロック0に対応するキャッシュブロック0−2の空きTU数は3であり、論理ブロック2に対応するキャッシュブロック2−1の空きTU数は2である。従って、メモリ制御部62は、論理ブロック2のLTUアドレス10を、書き込み先として指定する。これにより、キャッシュブロックを効率よく使用することができ、不揮発性メモリ14全体としての書き換え回数を抑制することができる。   In the example of FIG. 14, the number of empty TUs in the cache block 0-2 corresponding to the logical block 0 is 3, and the number of empty TUs in the cache block 2-1 corresponding to the logical block 2 is 2. Therefore, the memory control unit 62 designates the LTU address 10 of the logical block 2 as a write destination. Thereby, the cache block can be used efficiently, and the number of rewrites as the entire nonvolatile memory 14 can be suppressed.

[書き込みデータサイズがブロックサイズである場合の書き込み制御の説明]
次に、書き込むデータのデータサイズがブロックサイズであるときの書き込み制御について説明する。
[Description of write control when write data size is block size]
Next, write control when the data size of data to be written is a block size will be described.

初めに、図15および図16を参照して、従来行われていた書き込み制御について説明する。   First, referring to FIGS. 15 and 16, the conventional write control will be described.

従来の手法では、上述したように、デバイス側の書き込み状態に関係なく、上位層であるファイルシステム制御部61が独自にデータの書き込み先(開始LTUアドレス)を指定する。   In the conventional method, as described above, regardless of the writing state on the device side, the file system control unit 61 as the upper layer uniquely specifies the data writing destination (starting LTU address).

例えば、図15に示されるように、論理ブロック0および論理ブロック1のそれぞれに対して、上限数のキャッシュブロックが割り当てられ、かつ、全てのTUにデータが書き込み済みであるような状態において、LTU3乃至LTU6に対応する4個のTUにデータを書き込む場合について説明する。   For example, as shown in FIG. 15, in a state where an upper limit number of cache blocks are allocated to each of logical block 0 and logical block 1 and data has been written to all TUs, LTU 3 A case where data is written to four TUs corresponding to LTU6 will be described.

この場合、LTU3とLTU4乃至LTU6とは異なる論理ブロックであるため、ファイルシステム制御部61は、論理ブロックの境界を跨って連続するLTUを1回の書き込み命令で書き込むことはできない。   In this case, since LTU3 and LTU4 to LTU6 are different logical blocks, the file system control unit 61 cannot write a continuous LTU across the boundary of the logical block with a single write command.

そこで、従来では、図16に示すような制御が行われる。   Therefore, conventionally, control as shown in FIG. 16 is performed.

図16は、書き込みデータサイズがブロックサイズである場合の従来の書き込み制御を説明するフローチャートである。なお、図16においても、上述した例と同様、ファイルシステム制御部61とメモリ制御部62が制御を行うものとして説明する。   FIG. 16 is a flowchart for explaining conventional write control when the write data size is a block size. In FIG. 16, similarly to the example described above, the file system control unit 61 and the memory control unit 62 are assumed to perform control.

ファイルシステム制御部61は、上位のアプリケーションプログラム41からのデータ書き込み命令を受けると、初めに、LTUアドレスが小さい方の論理ブロック0に対する書き込みを行う。即ち、ステップS51において、開始LTUアドレス:3(LTU3)、書き込みTU数:1の書き込み命令をメモリ制御部62に出力する。   When the file system control unit 61 receives a data write command from the upper application program 41, the file system control unit 61 first writes to the logical block 0 having the smaller LTU address. That is, in step S51, a write command with a start LTU address: 3 (LTU 3) and a write TU number: 1 is output to the memory control unit 62.

メモリ制御部62は、ステップS52において、書き込み対象のLTU3に対応するユーザブロック0に割り当てられたキャッシュブロック0−1乃至0−3の各TUがいずれも書き込み済みであるので、ライトバック処理を行う。即ち、メモリ制御部62は、ユーザブロック及びキャッシュブロック内の有効なデータを、(新ユーザブロックとなる)新たな物理ブロックにコピーし、コピー後に現在のキャッシュブロックのデータを消去する処理を行う。   In step S52, the memory control unit 62 performs the write-back process because all the TUs of the cache blocks 0-1 to 0-3 assigned to the user block 0 corresponding to the write target LTU 3 have been written. . That is, the memory control unit 62 performs a process of copying valid data in the user block and the cache block to a new physical block (to be a new user block) and erasing the data in the current cache block after the copy.

そして、ステップS53において、メモリ制御部62は、新キャッシュブロックとなる新たな消去済みブロックを確保し、書き込み命令とともにファイルシステム制御部61から供給されたデータを、確保した新キャッシュブロックに書き込む。   In step S53, the memory control unit 62 secures a new erased block to be a new cache block, and writes the data supplied from the file system control unit 61 together with the write command to the secured new cache block.

そして、ステップS54において、メモリ制御部62は、書き込み完了後、書き込み命令に対する終了応答をファイルシステム制御部61に返信する。   In step S 54, the memory control unit 62 returns an end response to the write command to the file system control unit 61 after the writing is completed.

次に、残りの論理ブロック1に対する書き込みを行う。即ち、ステップS55において、開始LTUアドレス:4(LTU4)、書き込みTU数:3の書き込み命令をメモリ制御部62に出力する。   Next, the remaining logical block 1 is written. That is, in step S55, a write command having a start LTU address: 4 (LTU 4) and a write TU number: 3 is output to the memory control unit 62.

メモリ制御部62は、ステップS56において、書き込み対象のLTU4乃至LTU6に対応するユーザブロック1に割り当てられたキャッシュブロック1−1乃至1−3の各TUがいずれも書き込み済みであるので、ライトバック処理を行う。即ち、メモリ制御部62は、ユーザブロック及びキャッシュブロック内の有効なデータを、(新ユーザブロックとなる)新たな物理ブロックにコピーし、コピー後に現在のキャッシュブロックのデータを消去する処理を行う。   In step S56, the memory control unit 62 has written all the TUs of the cache blocks 1-1 to 1-3 assigned to the user block 1 corresponding to the write target LTU4 to LTU6. I do. That is, the memory control unit 62 performs a process of copying valid data in the user block and the cache block to a new physical block (to be a new user block) and erasing the data in the current cache block after the copy.

そして、ステップS57において、メモリ制御部62は、新キャッシュブロックとなる新たな消去済みブロックを確保し、書き込み命令とともにファイルシステム制御部61から供給されたデータを、確保した新キャッシュブロックに書き込む。   In step S57, the memory control unit 62 secures a new erased block to be a new cache block, and writes the data supplied from the file system control unit 61 together with the write command to the secured new cache block.

そして、ステップS58において、メモリ制御部62は、書き込み完了後、書き込み命令に対する終了応答をファイルシステム制御部61に返信し、終了する。   In step S58, after completing the writing, the memory control unit 62 returns an end response to the write command to the file system control unit 61, and ends.

以上のように、従来の書き込み制御によれば、論理ブロック0および論理ブロック1のそれぞれについてライトバック処理が行われる。   As described above, according to the conventional write control, the write back process is performed for each of the logical block 0 and the logical block 1.

次に、図17を参照して、ファイルシステム制御部61とメモリ制御部62とで行われる本技術を適用した書き込み制御について説明する。   Next, with reference to FIG. 17, write control to which the present technology is applied performed by the file system control unit 61 and the memory control unit 62 will be described.

本技術を適用した書き込み制御方法では、上述したように、最初に、メモリ制御部62が、ファイルシステム制御部61から通知された書き込みサイズに応じて、開始LTUアドレスを決定し、ファイルシステム制御部61に通知する。図15に示した書き込み前の状態においては、メモリ制御部62は、図17に示すように、データが記録済みではないユーザブロックに対応する論理ブロックで、かつ、ライトバック処理が発生しない論理ブロック2の先頭のLTUアドレス:8を、開始LTUアドレスとして、ファイルシステム制御部61に通知する。   In the write control method to which the present technology is applied, as described above, first, the memory control unit 62 determines the start LTU address according to the write size notified from the file system control unit 61, and the file system control unit 61 is notified. In the state before writing shown in FIG. 15, the memory control unit 62 is a logical block corresponding to a user block for which data has not been recorded and a logical block in which no write-back processing occurs as shown in FIG. 2 is notified to the file system control unit 61 as the start LTU address.

そして、開始LTUアドレス通知に応じて、ファイルシステム制御部61から、開始LTUアドレス:8(LTU8)、書き込みTU数:4の書き込み命令が供給された場合、メモリ制御部62は、キャッシュブロックではなく、ユーザブロックに直接書き込む。即ち、メモリ制御部62は、ブロックサイズ分のデータがくることが分かっている場合には、キャッシュブロックではなく、ユーザブロックに直接書き込む。これにより、キャッシュ領域82(キャッシュブロック)に保存する時間と、ライトバック処理を行った場合のキャッシュ領域82のデータを消去する時間を削減でき、かつ、キャッシュ領域82の書き換え回数を減らすことができる。   Then, in response to the notification of the start LTU address, when a write command of start LTU address: 8 (LTU 8) and write TU number: 4 is supplied from the file system control unit 61, the memory control unit 62 is not a cache block. Write directly to the user block. That is, when it is known that the data for the block size is coming, the memory control unit 62 writes directly to the user block instead of the cache block. As a result, the time for saving in the cache area 82 (cache block) and the time for erasing the data in the cache area 82 when the write-back processing is performed can be reduced, and the number of rewrites of the cache area 82 can be reduced. .

図18は、図17を参照して説明した書き込み制御のフローチャートである。   FIG. 18 is a flowchart of the write control described with reference to FIG.

ファイルシステム制御部61は、上位のアプリケーションプログラム41からのデータ書き込み命令を受けると、ステップS71において、書き込みサイズを通知する書き込みサイズ通知を、メモリ制御部62に出力する。ここで通知される書き込みサイズは、ブロックサイズであるTU数:4である。   When receiving a data write command from the upper application program 41, the file system control unit 61 outputs a write size notification for notifying the write size to the memory control unit 62 in step S71. The writing size notified here is the block size TU number: 4.

ステップS72において、メモリ制御部62は、キャッシュブロックへのデータの書き込み状態に基づいて、ライトバック処理を発生させず、指定された書き込みサイズのデータを書き込み可能な書き込み先を検索する。図17の例では、LTUアドレス8乃至11の論理ブロック2が検索される。   In step S <b> 72, the memory control unit 62 searches for a write destination where data of a specified write size can be written, without generating a write-back process, based on the data write state to the cache block. In the example of FIG. 17, the logical block 2 having the LTU addresses 8 to 11 is searched.

そして、ステップS73において、メモリ制御部62は、検索結果に基づいて、開始LTUアドレスとして、論理ブロック2の先頭のLTUアドレス:8を通知する開始LTUアドレス通知を、ファイルシステム制御部61に出力する。   In step S73, the memory control unit 62 outputs a start LTU address notification that notifies the top LTU address: 8 of the logical block 2 to the file system control unit 61 as a start LTU address based on the search result. .

ステップS74において、ファイルシステム制御部61は、ステップS71で先に通知した書き込みサイズと、開始LTUアドレス通知で指定された開始LTUアドレスを指定して、書き込み命令をメモリ制御部62に出力する。即ち、ファイルシステム制御部61は、開始LTUアドレス:8(LTU8)、書き込みTU数:4の書き込み命令をメモリ制御部62に出力する。   In step S 74, the file system control unit 61 specifies the write size notified in step S 71 and the start LTU address specified in the start LTU address notification, and outputs a write command to the memory control unit 62. That is, the file system control unit 61 outputs a write command having a start LTU address: 8 (LTU 8) and a write TU number: 4 to the memory control unit 62.

ステップS75において、メモリ制御部62は、論理ブロック2に対応するユーザブロック2に、直接、ファイルシステム制御部61から供給されたデータを書き込む。   In step S <b> 75, the memory control unit 62 writes the data supplied from the file system control unit 61 directly to the user block 2 corresponding to the logical block 2.

そして、ステップS75において、メモリ制御部62は、書き込み完了後、書き込み命令に対する終了応答をファイルシステム制御部61に返信して、終了する。   In step S75, after the writing is completed, the memory control unit 62 returns an end response to the write command to the file system control unit 61 and ends.

以上のように、メモリ制御部62が最適な書き込み先を予め指定することで、ライトバック処理を行うことなく、データを書き込むことができる。また、書き込むデータのデータサイズがブロックサイズである場合には、データが、キャッシュ領域82(キャッシュブロック)ではなく、主記憶領域81(ユーザブロック)に直接書き込まれる。これにより、キャッシュ領域82に保存する時間とキャッシュ領域82のデータを消去する時間を削減でき、かつ、キャッシュ領域82の書き換え回数を減らすことができる。   As described above, data can be written without performing write-back processing by the memory control unit 62 specifying an optimum write destination in advance. If the data size of the data to be written is a block size, the data is directly written not to the cache area 82 (cache block) but to the main storage area 81 (user block). As a result, the time for saving in the cache area 82 and the time for erasing the data in the cache area 82 can be reduced, and the number of rewrites of the cache area 82 can be reduced.

なお、ブロックサイズの書き込み先として指定可能な複数の論理ブロックがある場合、対応するユーザブロックのこれまでの書き換え回数の少ない方の論理ブロックを指定することができる。これにより、不揮発性メモリ14の各物理ブロックの書き換え回数を平均化することができる。   When there are a plurality of logical blocks that can be designated as the write destination of the block size, the logical block with the smaller number of rewrites of the corresponding user block can be designated. Thereby, the rewrite frequency of each physical block of the nonvolatile memory 14 can be averaged.

また、上述した実施の形態では、ファイルシステム制御部61がメモリ制御部62に通知する書き込みサイズ通知において、書き込む予定のサイズ(書き込みサイズ)のみを通知するようにしたが、書き込む予定の開始LTUアドレスも通知するようにしてもよい。   In the embodiment described above, only the size to be written (write size) is notified in the write size notification that the file system control unit 61 notifies the memory control unit 62. However, the start LTU address to be written May also be notified.

従って、本技術を適用した書き込み制御方法によれば、不揮発性メモリ14の書き換えの頻度を減らすことで、メモリシステムとしての寿命を延ばすことができる。また、ライトバック処理の発生頻度が減ることで、書き込み速度も高速化することができる。   Therefore, according to the write control method to which the present technology is applied, the lifetime of the memory system can be extended by reducing the frequency of rewriting of the nonvolatile memory 14. Further, the writing speed can be increased by reducing the frequency of occurrence of the write-back process.

[書き込み回数が複数回の例]
上述した例は、いずれも、フィルシステム制御部61からの1回の書き込みサイズ通知に対して、フィルシステム制御部61から、書き込み命令が1回のみ通知される場合の例であった。しかし、ファイルシステム制御部61は、書き込みサイズ通知により予め通知した書き込みサイズの領域を、何回の書き込み命令によって使用するか(書き込むか)は任意である。
[Example of writing multiple times]
Each of the above-described examples is an example in which a write command is notified only once from the fill system control unit 61 in response to a single write size notification from the fill system control unit 61. However, the file system control unit 61 can arbitrarily use (write) how many times the write size area notified in advance by the write size notification is used.

図19は、1回の書き込みサイズ通知に対して、2回の書き込みを行う例を示したフローチャートである。   FIG. 19 is a flowchart illustrating an example in which writing is performed twice for one writing size notification.

即ち、図19の処理では、ステップS91乃至S93の処理により、ファイルシステム制御部61が書き込みサイズを通知して、それに応じてメモリ制御部62が最適な開始LTUアドレスを通知する。   That is, in the process of FIG. 19, the file system control unit 61 notifies the write size by the processes of steps S91 to S93, and the memory control unit 62 notifies the optimal start LTU address accordingly.

そして、ファイルシステム制御部61は、ステップS94乃至S96の処理からなる1回目の書き込み処理と、ステップS97乃至S99の処理からなる2回目の書き込み処理により、指定した書き込みサイズの領域にデータを書き込んでいる。   Then, the file system control unit 61 writes the data in the designated write size area by the first writing process including the processes of steps S94 to S96 and the second writing process including the processes of steps S97 to S99. Yes.

ステップS91乃至S93の処理は、上述した図18のステップS71乃至S73の処理と、開始LTUアドレスとTU数が異なるだけで、基本的に同様の処理であるので、詳細な説明は省略する。また、ステップS94乃至S96の処理及びステップS97乃至S99の処理も同様に、上述した図18のステップS74乃至S76の処理と、基本的に同様の処理であるので、詳細な説明は省略する。   The processing of steps S91 to S93 is basically the same as the processing of steps S71 to S73 of FIG. 18 described above except that the start LTU address and the TU number are different, and thus detailed description thereof is omitted. Similarly, the processes in steps S94 to S96 and the processes in steps S97 to S99 are basically the same as the processes in steps S74 to S76 in FIG.

図19で説明した書き込み処理を図示すると、図20Aに示すようになる。図20Aでは、確保されたLTUアドレス4乃至7に対して、1TUを書き込む1回目の書き込みと、3TUを書き込む2回目の書き込みの計2回の書き込みが行われている。   The write process described with reference to FIG. 19 is illustrated in FIG. 20A. In FIG. 20A, a total of two writes are performed on the reserved LTU addresses 4 to 7, that is, a first write for writing 1TU and a second write for writing 3TU.

その他、図20Bに示されるように、確保されたLTUアドレス4乃至7に対して、4回の書き込みにより、最終的に4TUの書き込みを行ってもよいし、図20Cに示されるように2TUの2回の書き込みにより、最終的に4TUの書き込みを行ってもよい。   In addition, as shown in FIG. 20B, 4 TUs may be finally written to the reserved LTU addresses 4 to 7 by four writes, or 2 TUs as shown in FIG. 20C. You may write 4TU finally by writing twice.

[データの消去命令]
本技術を適用した書き込み制御によれば、上述したように、メモリ制御部62は、書き込みサイズ通知により指定されたサイズの空き領域を検索して書き込み先を返答するが、処理が進むにつれて、空き領域が少なくなる。デバイス側のメモリ制御部62は、不要なデータと必要なデータの違いがわからないため、書き込まれたデータをすべて残そうとする。その結果、最終的には空き領域がなくなり、書き込み先を指定できないという事態が想定される。
[Data erase instruction]
According to the write control to which the present technology is applied, as described above, the memory control unit 62 searches for a free area having a size specified by the write size notification and returns a write destination. Less space. The memory control unit 62 on the device side does not know the difference between unnecessary data and necessary data, and therefore tries to leave all written data. As a result, it is assumed that there will eventually be no free space and the write destination cannot be specified.

そのため、ファイルシステム制御部61には、消去命令のコマンドが用意されており、不要となり、消去可能なデータを、メモリ制御部62に通知することができる。なお、消去単位はブロックサイズであるため、消去命令は論理ブロック単位で指定される。   For this reason, the file system control unit 61 is provided with a command for an erasure command, which is unnecessary and can notify the memory control unit 62 of erasable data. Since the erase unit is the block size, the erase command is specified in logical block units.

図21は、消去命令を行う処理のフローチャートである。   FIG. 21 is a flowchart of a process for issuing an erase command.

初めに、ステップS121において、ファイルシステム制御部61は、消去可能な論理ブロックの先頭のLTUアドレスを開始LTUアドレスとし、TU数をブロックサイズの4とする消去命令をメモリ制御部62に通知する。   First, in step S121, the file system control unit 61 notifies the memory control unit 62 of an erasure command that sets the start LTU address of the erasable logical block as the start LTU address and sets the TU number to the block size of 4.

ステップS122において、メモリ制御部62は、消去命令により指定された論理ブロックを消去する消去処理を実行し、ステップS123において、終了応答を返信して、処理を終了する。   In step S122, the memory control unit 62 executes an erasing process for erasing the logical block specified by the erasing instruction, and returns an end response in step S123 to end the process.

以上のように、ファイルシステム制御部61が消去命令を通知し、メモリ制御部62が消去処理を実行することにより、空き領域を増やすことができ、書き込み先を指定できないという事態を防止することができる。ファイルシステム制御部61は、例えば、主記憶領域81の全容量における空き領域の比率が所定の比率以下となったときや、自身がアイドル状態となったときに、消去命令を通知することができる。   As described above, the file system control unit 61 notifies the erasure command, and the memory control unit 62 executes the erasure process, thereby preventing a situation in which a free area can be increased and a write destination cannot be specified. it can. For example, the file system control unit 61 can notify an erasure command when the ratio of the free area in the total capacity of the main storage area 81 is equal to or less than a predetermined ratio, or when the file system control section 61 is in an idle state. .

なお、消去命令の代わりに、その論理ブロック内のデータが無効なもの(不要なもの)であることを示す無効化命令を送信してもよい。即ち、指定された論理ブロックを実際に消去するものでなく、消去可能であることを通知するだけでもよい。   Instead of the erase command, an invalidation command indicating that the data in the logical block is invalid (unnecessary) may be transmitted. In other words, the designated logical block may not be actually erased, but may be simply notified that it can be erased.

[ファイルシステム制御部61とメモリ制御部62の詳細機能ブロック図]
図22は、上述したファイルシステム制御部61とメモリ制御部62の機能をまとめた、ファイルシステム制御部61とメモリ制御部62の詳細な機能ブロック図を示している。
[Detailed Functional Block Diagram of File System Control Unit 61 and Memory Control Unit 62]
FIG. 22 is a detailed functional block diagram of the file system control unit 61 and the memory control unit 62, which summarizes the functions of the file system control unit 61 and the memory control unit 62 described above.

ファイルシステム制御部61は、通知部101と取得部02を少なくとも有し、メモリ制御部62は、取得部111、検索部112、通知部113、及び書き込み部114を少なくとも有する。   The file system control unit 61 includes at least a notification unit 101 and an acquisition unit 02, and the memory control unit 62 includes at least an acquisition unit 111, a search unit 112, a notification unit 113, and a writing unit 114.

ファイルシステム制御部61の通知部101は、メモリ制御部62の取得部111に、不揮発性メモリ14に書き込む書き込みデータのサイズを通知する。また、通知部101は、取得部102から取得された書き込み先の開始LTUアドレス(論理アドレス)を書き込み先として、書き込みデータの書き込み命令を、メモリ制御部62の取得部111に通知する。   The notification unit 101 of the file system control unit 61 notifies the acquisition unit 111 of the memory control unit 62 of the size of write data to be written to the nonvolatile memory 14. Also, the notification unit 101 notifies the acquisition unit 111 of the memory control unit 62 of a write data write command using the write destination start LTU address (logical address) acquired from the acquisition unit 102 as a write destination.

ファイルシステム制御部61の取得部102は、メモリ制御部62の通知部113から供給される、書き込みデータの書き込み先の開始LTUアドレスを取得し、通知部101に供給する。   The acquisition unit 102 of the file system control unit 61 acquires the start LTU address of the write destination of the write data supplied from the notification unit 113 of the memory control unit 62 and supplies it to the notification unit 101.

メモリ制御部62の取得部111は、上位層としてのファイルシステム制御部61から、書き込みデータのサイズを取得する。メモリ制御部62の検索部112は、取得部111で取得された書き込みデータのサイズを少なくとも有する空き領域を検索する。   The acquisition unit 111 of the memory control unit 62 acquires the size of write data from the file system control unit 61 as an upper layer. The search unit 112 of the memory control unit 62 searches for a free area having at least the size of the write data acquired by the acquisition unit 111.

メモリ制御部62の通知部113は、検索部112の検索結果に基づき、書き込みデータの書き込み先の開始LTUアドレスを、ファイルシステム制御部61に通知する。   The notification unit 113 of the memory control unit 62 notifies the file system control unit 61 of the start LTU address of the write data write destination based on the search result of the search unit 112.

メモリ制御部62の書き込み部114は、取得部111で取得された書き込み命令に基づいて、不揮発性メモリ14の主記憶領域81またはキャッシュ領域82に書き込みデータを書き込む。また、書き込み部114は、取得部111で取得された消去命令に基づいて、主記憶領域81またはキャッシュ領域82に書き込み済みのデータを消去する。   The writing unit 114 of the memory control unit 62 writes the write data to the main storage area 81 or the cache area 82 of the nonvolatile memory 14 based on the write command acquired by the acquisition unit 111. Further, the writing unit 114 erases the data that has been written in the main storage area 81 or the cache area 82 based on the erasure command acquired by the acquisition unit 111.

ファイルシステム制御部61とメモリ制御部62は、以上のように構成される。   The file system control unit 61 and the memory control unit 62 are configured as described above.

本明細書において、フローチャートに記述されたステップは、記載された順序に沿って時系列的に行われる場合はもちろん、必ずしも時系列的に処理されなくとも、並列に、あるいは呼び出しが行われたとき等の必要なタイミングで実行されてもよい。   In this specification, the steps described in the flowchart are not necessarily processed in chronological order, but are performed in parallel or when they are called in chronological order according to the described order. It may be executed at a necessary timing.

本技術の実施の形態は、上述した実施の形態に限定されるものではなく、本技術の要旨を逸脱しない範囲において種々の変更が可能である。   Embodiments of the present technology are not limited to the above-described embodiments, and various modifications can be made without departing from the gist of the present technology.

なお、本技術は以下のような構成も取ることができる。
(1)
不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得する取得部と、
取得された前記書き込みデータのサイズの空き領域を検索する検索部と、
検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する通知部と
を備えるメモリ制御装置。
(2)
前記不揮発性メモリに前記書き込みデータを書き込む制御を行う書き込み制御部をさらに備え、
前記取得部は、さらに、前記上位層から、前記通知部が通知した前記論理アドレスを書き込み先とする書き込み命令を取得し、
前記書き込み制御部は、前記書き込み命令に基づいて、前記書き込みデータを書き込む
前記(1)に記載のメモリ制御装置。
(3)
前記検索部は、検索された前記書き込みデータのサイズ以上の空き領域のなかから、前記書き込みデータと同一サイズの空き領域を、前記検索結果とする
前記(1)または(2)に記載のメモリ制御装置。
(4)
前記検索部は、検索された前記空き領域のなかから、これまでの書き換え回数が少ない空き領域を、前記検索結果とする
前記(1)乃至(3)のいずれかに記載のメモリ制御装置。
(5)
不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得し、
取得された前記書き込みデータのサイズの空き領域を検索し、
検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する
ステップを含むメモリ制御方法。
(6)
コンピュータに、
不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得し、
取得された前記書き込みデータのサイズの空き領域を検索し、
検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する
処理を実行させるためのプログラム。
(7)
不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知する通知部と、
前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得する取得部と
を備え、
前記通知部は、取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する
データ管理装置。
(8)
前記通知部は、前記メモリ制御装置に書き込まれたデータのうち、消去可能なデータが記録された論理アドレスも通知する
前記(7)に記載のデータ管理装置。
(9)
不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知し、
前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得し、
取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する
ステップを含むデータ管理方法。
(10)
コンピュータに、
不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知し、
前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得し、
取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する
処理を実行させるためのプログラム。
In addition, this technique can also take the following structures.
(1)
An acquisition unit that acquires the size of the write data from an upper layer having write data to be written to the nonvolatile memory;
A search unit for searching for a free area of the size of the acquired write data;
A memory control device comprising: a notification unit that notifies the upper layer of a logical address of a write destination of the write data based on a search result.
(2)
A write control unit for controlling writing of the write data in the nonvolatile memory;
The acquisition unit further acquires, from the upper layer, a write command with the logical address notified by the notification unit as a write destination,
The memory control device according to (1), wherein the write control unit writes the write data based on the write command.
(3)
The memory control according to (1) or (2), wherein the search unit uses, as a search result, an empty area having the same size as the write data from among the empty areas that are equal to or larger than the searched write data size. apparatus.
(4)
The memory control device according to any one of (1) to (3), wherein the search unit uses, as the search result, an empty area with a small number of rewrites so far from the searched empty areas.
(5)
From the upper layer having write data to be written to the nonvolatile memory, obtain the size of the write data,
Search for free space of the size of the acquired write data,
A memory control method including a step of notifying the upper layer of a logical address of a write destination of the write data based on a search result.
(6)
On the computer,
From the upper layer having write data to be written to the nonvolatile memory, obtain the size of the write data,
Search for free space of the size of the acquired write data,
A program for executing a process of notifying the upper layer of a logical address of a write destination of the write data based on a search result.
(7)
A notification unit for notifying the size of write data to be written to the nonvolatile memory to a memory control device that controls the nonvolatile memory;
In response to the notification of the size of the write data, an acquisition unit that is supplied from the memory control device and acquires a logical address of a write destination of the write data,
The notification unit is a data management device that notifies the memory control device of a write command for the write data, using the acquired logical address as a write destination.
(8)
The data management device according to (7), wherein the notification unit also notifies a logical address in which erasable data is recorded among data written in the memory control device.
(9)
Notifying the memory control device that controls the nonvolatile memory of the size of the write data to be written to the nonvolatile memory,
In response to the notification of the size of the write data, obtain a logical address of the write destination of the write data supplied from the memory control device,
A data management method comprising: notifying the memory control device of a write command for the write data, using the acquired logical address as a write destination.
(10)
On the computer,
Notifying the memory control device that controls the nonvolatile memory of the size of the write data to be written to the nonvolatile memory,
In response to the notification of the size of the write data, obtain a logical address of the write destination of the write data supplied from the memory control device,
A program for executing a process of notifying the memory control device of a write command for the write data, using the acquired logical address as a write destination.

1 電子機器, 11 MPU, 14 不揮発性メモリ, 42 オペレーティングシステム, 61 ファイルシステム制御部, 62 メモリ制御部, 81 主記憶領域, 82 キャッシュ領域   1 electronic device, 11 MPU, 14 non-volatile memory, 42 operating system, 61 file system control unit, 62 memory control unit, 81 main storage area, 82 cache area

Claims (10)

不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得する取得部と、
取得された前記書き込みデータのサイズの空き領域を検索する検索部と、
検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する通知部と
を備えるメモリ制御装置。
An acquisition unit that acquires the size of the write data from an upper layer having write data to be written to the nonvolatile memory;
A search unit for searching for a free area of the size of the acquired write data;
A memory control device comprising: a notification unit that notifies the upper layer of a logical address of a write destination of the write data based on a search result.
前記不揮発性メモリに前記書き込みデータを書き込む制御を行う書き込み制御部をさらに備え、
前記取得部は、さらに、前記上位層から、前記通知部が通知した前記論理アドレスを書き込み先とする書き込み命令を取得し、
前記書き込み制御部は、前記書き込み命令に基づいて、前記書き込みデータを書き込む
請求項1に記載のメモリ制御装置。
A write control unit for controlling writing of the write data in the nonvolatile memory;
The acquisition unit further acquires, from the upper layer, a write command with the logical address notified by the notification unit as a write destination,
The memory control device according to claim 1, wherein the write control unit writes the write data based on the write command.
前記検索部は、検索された前記書き込みデータのサイズ以上の空き領域のなかから、前記書き込みデータと同一サイズの空き領域を、前記検索結果とする
請求項1に記載のメモリ制御装置。
The memory control device according to claim 1, wherein the search unit uses, as the search result, an empty area having the same size as the write data, from among the empty areas that are equal to or larger than the size of the searched write data.
前記検索部は、検索された前記空き領域のなかから、これまでの書き換え回数が少ない空き領域を、前記検索結果とする
請求項1に記載のメモリ制御装置。
The memory control device according to claim 1, wherein the search unit uses, as the search result, an empty area with a small number of rewrites so far from among the searched empty areas.
不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得し、
取得された前記書き込みデータのサイズの空き領域を検索し、
検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する
ステップを含むメモリ制御方法。
From the upper layer having write data to be written to the nonvolatile memory, obtain the size of the write data,
Search for free space of the size of the acquired write data,
A memory control method including a step of notifying the upper layer of a logical address of a write destination of the write data based on a search result.
コンピュータに、
不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得し、
取得された前記書き込みデータのサイズの空き領域を検索し、
検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する
処理を実行させるためのプログラム。
On the computer,
From the upper layer having write data to be written to the nonvolatile memory, obtain the size of the write data,
Search for free space of the size of the acquired write data,
A program for executing a process of notifying the upper layer of a logical address of a write destination of the write data based on a search result.
不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知する通知部と、
前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得する取得部と
を備え、
前記通知部は、取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する
データ管理装置。
A notification unit for notifying the size of write data to be written to the nonvolatile memory to a memory control device that controls the nonvolatile memory;
In response to the notification of the size of the write data, an acquisition unit that is supplied from the memory control device and acquires a logical address of a write destination of the write data,
The notification unit is a data management device that notifies the memory control device of a write command for the write data, using the acquired logical address as a write destination.
前記通知部は、前記メモリ制御装置に書き込まれたデータのうち、消去可能なデータが記録された論理アドレスも通知する
請求項7に記載のデータ管理装置。
The data management device according to claim 7, wherein the notification unit also notifies a logical address in which erasable data is recorded among data written in the memory control device.
不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知し、
前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得し、
取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する
ステップを含むデータ管理方法。
Notifying the memory control device that controls the nonvolatile memory of the size of the write data to be written to the nonvolatile memory,
In response to the notification of the size of the write data, obtain a logical address of the write destination of the write data supplied from the memory control device,
A data management method comprising: notifying the memory control device of a write command for the write data, using the acquired logical address as a write destination.
コンピュータに、
不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知し、
前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得し、
取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する
処理を実行させるためのプログラム。
On the computer,
Notifying the memory control device that controls the nonvolatile memory of the size of the write data to be written to the nonvolatile memory,
In response to the notification of the size of the write data, obtain a logical address of the write destination of the write data supplied from the memory control device,
A program for executing a process of notifying the memory control device of a write command for the write data, using the acquired logical address as a write destination.
JP2011189077A 2011-08-31 2011-08-31 Memory control device and method therefor, data management device and method therefor, and program Withdrawn JP2013050880A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011189077A JP2013050880A (en) 2011-08-31 2011-08-31 Memory control device and method therefor, data management device and method therefor, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011189077A JP2013050880A (en) 2011-08-31 2011-08-31 Memory control device and method therefor, data management device and method therefor, and program

Publications (1)

Publication Number Publication Date
JP2013050880A true JP2013050880A (en) 2013-03-14

Family

ID=48012867

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011189077A Withdrawn JP2013050880A (en) 2011-08-31 2011-08-31 Memory control device and method therefor, data management device and method therefor, and program

Country Status (1)

Country Link
JP (1) JP2013050880A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022058898A (en) * 2017-08-30 2022-04-12 マイクロン テクノロジー,インク. Managed NVM conformance cache management
JP2022135146A (en) * 2021-03-04 2022-09-15 Necプラットフォームズ株式会社 Storage device, cache memory writing program, and writing method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022058898A (en) * 2017-08-30 2022-04-12 マイクロン テクノロジー,インク. Managed NVM conformance cache management
JP2022135146A (en) * 2021-03-04 2022-09-15 Necプラットフォームズ株式会社 Storage device, cache memory writing program, and writing method
JP7663192B2 (en) 2021-03-04 2025-04-16 Necプラットフォームズ株式会社 STORAGE DEVICE, CACHE MEMORY WRITE PROGRAM, AND WRITE METHOD

Similar Documents

Publication Publication Date Title
JP5400875B2 (en) MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, ACCESS DEVICE, NONVOLATILE STORAGE SYSTEM, DATA WRITE METHOD, AND PROGRAM
JP3825465B2 (en) Memory card and memory card system
CN103677666B (en) The apparatus and method for handling continuously shot images data
EP1729218A1 (en) Nonvolatile storage system
US20130138871A1 (en) Flash Memory Device and Data Access Method for Same
CN112051970B (en) Dirty data management for hybrid drives
JPWO2009096180A1 (en) MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, AND NONVOLATILE STORAGE SYSTEM
US20120215964A1 (en) Management device and management method
US8380920B2 (en) Flash storage device and data access method of flash memory
TWI454922B (en) Memory storage device and memory controller and data writing method thereof
TWI540435B (en) Memory system capable of prohibiting access to application software and system software
JP4988054B2 (en) Memory system
JP2010237907A (en) Storage device and recording method
JP2013050880A (en) Memory control device and method therefor, data management device and method therefor, and program
JP6579324B2 (en) Image forming apparatus and data processing program
US12511050B2 (en) Data storage method and system, and processor
US20120166713A1 (en) Administration device, administration method, and program
JP6410055B2 (en) Image forming apparatus and data processing program
JP4645043B2 (en) MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, AND NONVOLATILE MEMORY SYSTEM
JP2010015251A (en) Recording device
JP5350077B2 (en) Information processing apparatus and image forming apparatus having the same
JP2008181381A (en) Semiconductor memory card, semiconductor memory card data management method, database engine, and semiconductor memory system
JP2015138272A (en) information processing apparatus, information processing method, and information processing program
WO2020039927A1 (en) Non-volatile storage device, host device, and data storage system
JP6494275B2 (en) Recording apparatus and recording apparatus control method

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20141104