[go: up one dir, main page]

JP2019020989A - Recording device - Google Patents

Recording device Download PDF

Info

Publication number
JP2019020989A
JP2019020989A JP2017138342A JP2017138342A JP2019020989A JP 2019020989 A JP2019020989 A JP 2019020989A JP 2017138342 A JP2017138342 A JP 2017138342A JP 2017138342 A JP2017138342 A JP 2017138342A JP 2019020989 A JP2019020989 A JP 2019020989A
Authority
JP
Japan
Prior art keywords
write
size
recording medium
unit
recording
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2017138342A
Other languages
Japanese (ja)
Other versions
JP6995520B2 (en
Inventor
泰裕 白石
Yasuhiro Shiraishi
泰裕 白石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2017138342A priority Critical patent/JP6995520B2/en
Publication of JP2019020989A publication Critical patent/JP2019020989A/en
Application granted granted Critical
Publication of JP6995520B2 publication Critical patent/JP6995520B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

To provide a recording apparatus capable of issuing a write command for each memory data and writing data on a recording medium without impairing the transfer rate of the recording medium and also provide a control method thereof.SOLUTION: A recording apparatus (100) for recording data on a recording medium (115), which includes acquisition means for acquiring a unit size from the recording medium (S401), notification means for notifying the recording medium of a total write size that is an integral multiple of the unit size of the recording medium acquired by the acquisition means (S403), and issuing means for issuing a plurality of write commands to the recording medium after notification of the total write size by the notification means, in which the issuing means issues the plurality of write commands so that the sum of write sizes of the plurality of write commands becomes the total write size notified by total write size notification means (S404 to S408).SELECTED DRAWING: Figure 4

Description

本発明は記録装置およびその制御方法に関する。   The present invention relates to a recording apparatus and a control method thereof.

近年、デジタルカメラおよびデジタルビデオカメラの記録媒体として、NAND型フラッシュメモリ(登録商標)が主流となっている。NAND型フラッシュメモリであるメモリデバイスは、書き込み最小サイズは1セクタ(512バイト)であり、メモリデバイスへの一回の書き込みサイズが大きい場合は転送レートが早く、小さい場合は転送レートが遅くなる特徴がある。   In recent years, NAND flash memory (registered trademark) has become mainstream as a recording medium for digital cameras and digital video cameras. A memory device that is a NAND flash memory has a minimum writing size of one sector (512 bytes), and the transfer rate is fast when the write size to the memory device is large, and the transfer rate is slow when the write size is small. There is.

PCI Expressを通じてメモリデバイスをホストと接続するための論理デバイスインターフェースの規格としてNVMe(Non−Volatile Memory Express)規格が公開されており、メモリデバイスであるSSDで広く使用されている。書き込み速度保証の枠組みとして、NVMe規格のVersion1.3ではDirectives仕様が追加された。   The NVMe (Non-Volatile Memory Express) standard is disclosed as a standard of a logical device interface for connecting a memory device to a host through PCI Express, and is widely used in SSDs as memory devices. As a framework for guaranteeing the writing speed, Directives specification is added in Version 1.3 of the NVMe standard.

Directives仕様では、ホストはメモリデバイスから書き込みサイズ(SGS(Stream Granularity Size)等)を取得し、当該サイズでメモリデバイスにライトすることにより、最適なライト性能を出す枠組みが提示されている。   In the Directives specification, a framework is proposed in which a host obtains a write size (SGS (Stream Granularity Size), etc.) from a memory device, and writes to the memory device with the size, thereby producing optimum write performance.

ここで、図8を用いてDirectives仕様の運用シーケンスを説明する。   Here, the operation sequence of the Directives specification will be described with reference to FIG.

ステップS2011では、ホスト2000はDirective Receiveコマンドを発行して、メモリデバイス2001からリターンパラメータを取得する。リターンパラメータには、Stream Write Size(SWS)、Stream Granularity Size(SGS)等があり、メモリデバイスが期待するライトサイズが格納されている。SWSは最小のライトサイズであり、SGSは、複数のSWSを1つのユニットとしてライトするためのサイズある。   In step S2011, the host 2000 issues a Direct Receive command and acquires a return parameter from the memory device 2001. Return parameters include Stream Write Size (SWS), Stream Granularity Size (SGS), and the like, which store the write size expected by the memory device. SWS is the minimum write size, and SGS is a size for writing a plurality of SWSs as one unit.

ステップS2012では、ホスト2000はEnable Directiveコマンドを発行して、メモリデバイス2001のDirective機能を有効にする。   In step S2012, the host 2000 issues an Enable Direct command to enable the Direct function of the memory device 2001.

ステップS2013では、ホスト2000はメモリデバイス2001にライトコマンドを発行して書き込みをする。この時、ホスト2000はステップS2011で取得したSGSのN倍となるライトサイズでライトをする。また、ライトコマンドのDirective Specific(DSPEC)のフィールドにStreamデータを示す01hのフラグを追加する。   In step S2013, the host 2000 issues a write command to the memory device 2001 to perform writing. At this time, the host 2000 writes with a write size that is N times the SGS acquired in step S2011. In addition, a 01h flag indicating the stream data is added to the Direct Specific (DSPEC) field of the write command.

ステップS2014では、メモリデバイス2001は前述したDSPECのフィールドからStreamデータであることを識別し、ステップS2013で指定されたライトサイズを最適なライト性能で内部のNANDに書き込めるように制御する。   In step S2014, the memory device 2001 identifies the stream data from the DSPEC field described above, and performs control so that the write size specified in step S2013 can be written to the internal NAND with the optimum write performance.

一般的に、NAND型フラッシュメモリを用いたメモリデバイスで転送レートを出すためには書き込みサイズを数メガバイトと大きくする必要が有り、Directives仕様でメモリデバイスから取得するSGSも同様に大きなサイズになる。   In general, in order to obtain a transfer rate in a memory device using a NAND flash memory, it is necessary to increase the write size to several megabytes, and the SGS acquired from the memory device in the Directives specification is similarly large.

NVM Express revision 1.3 specification April 26,2017NVM Express revision 1.3 specification April 26, 2017

しかしながら、大きなサイズでメモリデバイスにライトするためには、ホスト側は連続したメモリ領域を配置する必要があるため、巨大なバッファを確保する必要がある。一般的に、ホストはメモリを効率よく使用するために、ある単位で断片化された領域を使用するため、SGS単位でメモリデバイスにライトすることが出来ない。   However, in order to write to a memory device with a large size, it is necessary to allocate a continuous memory area on the host side, so it is necessary to secure a huge buffer. In general, in order to use the memory efficiently, the host uses an area fragmented in a certain unit, and therefore cannot write to the memory device in SGS units.

一方、NVMe規格では、断片化したホストのデータをメモリデバイスがリードして集める仕様としてSGL(Scatter Gather List)が提供されているが、Optionalのため一般的なメモリデバイスには搭載されていない。また、ホスト側でメモリデバイスにライトする前に、断片化したメモリデータを別の連続したメモリ領域にコピーし、配置し直すことは可能であるが、ホスト側のメモリバス帯域のオーバヘッド、コピー処理時間のオーバヘッド等が生じ、システムの負担となる。   On the other hand, in the NVMe standard, SGL (Scatter Gather List) is provided as a specification in which a memory device reads and collects fragmented host data, but it is optional and is not installed in a general memory device. It is also possible to copy the fragmented memory data to another continuous memory area and re-arrange it before writing to the memory device on the host side, but the overhead of the memory bus bandwidth on the host side, copy processing Time overhead and the like occur and become a burden on the system.

本発明は以上の点を鑑みてなされたものであり、記録媒体の転送レートを損なうことなく、メモリデータ毎にライトコマンドを発行して、記録媒体にデータを書き込むことができる記録装置およびその制御方法の提供を目的とする。   The present invention has been made in view of the above points, and a recording apparatus capable of issuing a write command for each memory data and writing the data on the recording medium without impairing the transfer rate of the recording medium, and its control The purpose is to provide a method.

上記課題を解決するため本発明の記録装置は、
フラッシュメモリを有する記録媒体に対してデータを記録する記録装置であって、記録媒体からユニットサイズを取得する取得手段と、取得手段により取得した記録媒体のユニットサイズの整数倍のサイズとなる総ライトサイズを記録媒体に通知する通知手段と、通知手段により総ライトサイズを通知した後に、複数のライトコマンドを記録媒体に対して発行する発行手段であって、複数のライトコマンドのライトサイズの合計が、通知手段により通知した総ライトサイズとなるように、複数のライトコマンドを発行する発行手段と、を有することを特徴とする。
In order to solve the above problems, the recording apparatus of the present invention provides:
A recording apparatus for recording data on a recording medium having a flash memory, an acquisition unit for acquiring a unit size from the recording medium, and a total write having a size that is an integral multiple of the unit size of the recording medium acquired by the acquisition unit A notifying unit for notifying the recording medium of the size, and an issuing unit for issuing a plurality of write commands to the recording medium after notifying the total write size by the notifying unit, wherein a total of the write sizes of the plurality of write commands is And issuing means for issuing a plurality of write commands so as to achieve the total write size notified by the notification means.

本発明によれば、ホストは断片化されたメモリデータ毎にライトコマンドを発行するが、記録媒体の転送レートを損なうことなく記録媒体に書き込むことができる。   According to the present invention, the host issues a write command for each fragmented memory data, but can write to the recording medium without impairing the transfer rate of the recording medium.

記録装置の構成を示すブロック図Block diagram showing the configuration of the recording apparatus 第1の実施形態に係る記録装置のメモリ配置イメージを示す図FIG. 3 is a diagram illustrating a memory arrangement image of the recording apparatus according to the first embodiment. 第1の実施形態に係る記録装置の記録動作を示すフローチャート6 is a flowchart showing a recording operation of the recording apparatus according to the first embodiment. 第1の実施形態に係る記録装置の制御シーケンスを示す図FIG. 3 is a diagram illustrating a control sequence of the recording apparatus according to the first embodiment. 第2の実施形態に係る記録装置のライトコマンドのフィールド情報を示す図The figure which shows the field information of the write command of the recording device concerning 2nd Embodiment 第3の実施形態に係る記録装置の制御シーケンスを示す図The figure which shows the control sequence of the recording device which concerns on 3rd Embodiment. 第3の実施形態に係る記録装置のライトコマンドのフィールド情報を示す図The figure which shows the field information of the write command of the recording device which concerns on 3rd Embodiment. 従来の記録装置でのメモリデバイスへのライトの運用シーケンスを示す図The figure which shows the operation | movement sequence of the write to the memory device in the conventional recording device

(実施例1)
図1は、第1の実施形態に係る記録装置100の構成を示すブロック図である。
Example 1
FIG. 1 is a block diagram illustrating a configuration of a recording apparatus 100 according to the first embodiment.

以下の説明では主に本発明に特有の部分について説明する。なお、NVMeに関する一般的な詳細動作については、各規格書を参照することにより理解されるであろう。   In the following description, parts specific to the present invention will be mainly described. Note that general detailed operations related to NVMe will be understood by referring to the respective standards.

<記録装置>
システム制御部101は、マイクロコンピュータを有し、不揮発性メモリ102に記録されたプログラムを実行することで、記録装置100の動作を制御する。なお、記録装置100の制御は1つのハードウェアが行ってもよいし、複数のハードウェアが処理を分担することで、記録装置全体の制御を行ってもよい。
<Recording device>
The system control unit 101 includes a microcomputer, and controls the operation of the recording apparatus 100 by executing a program recorded in the nonvolatile memory 102. The recording apparatus 100 may be controlled by a single piece of hardware, or the entire recording apparatus may be controlled by a plurality of pieces of hardware sharing the processing.

不揮発性メモリ102は、システム制御部101を動作させるためのプログラムを記憶する。RAM103は、システム制御部101の処理に必要な各種のデータを記憶する。SDRAM107は、入力された画像データ、或いは管理情報などの各種情報を保持する。   The nonvolatile memory 102 stores a program for operating the system control unit 101. The RAM 103 stores various data necessary for the processing of the system control unit 101. The SDRAM 107 holds various information such as input image data or management information.

撮像処理部104は、光学レンズ、CMOSなどの撮像センサ、シャッタ、絞りなどを含む。撮像処理部104は被写体を撮像し、キズ補正等の処理を行い、メモリバス120を経由してSDRAM107に画像データを保持する。現像処理部105は、メモリバス120を経由してSDRAM107に記録されている撮像処理後の画像データを読み出す。そして、画素補間やフィルタ処理、縮小といったリサイズ処理や色変換処理、圧縮画像データに保存するのに最適なフォーマットであるY、Cb、Cr形式のフォーマットに変換する処理などの現像処理を行う。現像処理部105で処理後の画像をメモリバス120経由でSDRAM107に保持する。符号化部106は、メモリバス120を経由し、SDRAM107より現像処理部105で処理後の画像を読み出し、JPEGやH.264方式等の符号化処理を施して情報量を圧縮する。符号化処理後の画像データはSDRAM107、ホストコントローラ114を経由して、記録媒体115に記録される。表示制御部108は、SDRAM107からメモリバス120を経由して、現像処理部105で処理後の画像データを読み出し、表示デバイスに合わせて拡大ないし縮小し、表示部109に出力するように制御する。また、表示部109はタッチパネルであり、ユーザは表示部109のタッチパネルを操作することにより、記録装置100に対する動作を指示することも可能である。また、不図示の操作部へのユーザ操作により、ユーザは記録装置100に対する動作を指示することも可能である。   The imaging processing unit 104 includes an optical lens, an imaging sensor such as a CMOS, a shutter, a diaphragm, and the like. The imaging processing unit 104 images a subject, performs processing such as defect correction, and holds image data in the SDRAM 107 via the memory bus 120. The development processing unit 105 reads the image data after the imaging process recorded in the SDRAM 107 via the memory bus 120. Then, development processing such as resizing processing such as pixel interpolation, filter processing, and reduction, color conversion processing, and processing for conversion to a format of Y, Cb, Cr format, which is an optimal format for saving in compressed image data, is performed. The image processed by the development processing unit 105 is held in the SDRAM 107 via the memory bus 120. The encoding unit 106 reads the image processed by the development processing unit 105 from the SDRAM 107 via the memory bus 120, and performs JPEG or H.264 encoding. The amount of information is compressed by performing encoding processing such as H.264. The encoded image data is recorded on the recording medium 115 via the SDRAM 107 and the host controller 114. The display control unit 108 controls to read the image data processed by the development processing unit 105 from the SDRAM 107 via the memory bus 120, scale up or down according to the display device, and output the image data to the display unit 109. In addition, the display unit 109 is a touch panel, and the user can instruct the recording apparatus 100 to operate by operating the touch panel of the display unit 109. In addition, the user can instruct the recording apparatus 100 to operate by a user operation on an operation unit (not shown).

ホストコントローラ114は、記録媒体115に対してデータの記録、読み出しを行うために、不図示のコネクタを介して記録媒体115と通信を行い、記録媒体115に対して各種のコマンドやデータを送信する。   The host controller 114 communicates with the recording medium 115 via a connector (not shown) and transmits various commands and data to the recording medium 115 in order to record and read data on the recording medium 115. .

情報取得部110は記録媒体115からNVMe規格のDirective Receiveコマンドを使用して、記録媒体115からStream Directive情報を取得する。具体的には、ホストコントローラ114により、Directive Receiveコマンドを記録媒体115に発行する。そして、そのレスポンスとして記録媒体115から送信されるレスポンスパラメータ含まれるStream Granularity Size(SGS)により、ユニットサイズを取得する。   The information acquisition unit 110 uses the NVMe standard Direct Receive command from the recording medium 115 to acquire the Stream Direct information from the recording medium 115. Specifically, the host controller 114 issues a Direct Receive command to the recording medium 115. Then, the unit size is obtained by the Stream Granularity Size (SGS) included in the response parameter transmitted from the recording medium 115 as the response.

総ライトサイズ通知部111は、Directiveコマンドを使用して、記録媒体115に対し、これから発行する複数ライトコマンドの総ライトサイズとライトコマンドの総発行回数の通知を行うようにホストコントローラ114を動作させる。   The total write size notifying unit 111 operates the host controller 114 to notify the recording medium 115 of the total write size of a plurality of write commands to be issued and the total number of write commands to be issued to the recording medium 115 using a Direct command. .

ライトコマンド発行部112は、ホストコントローラ114により、記録媒体115に対してライトコマンドを発行するように制御する。また、総ライトサイズの通知後に複数のライトコマンドを発行する際には、各ライトコマンドが何回目のライトコマンドかを示す回数情報を追加してライトコマンドを発行する。これは総ライトサイズ通知部111で通知した総ライトサイズに対して、記録媒体115に現在のライトコマンドが何回目のライトコマンドであるかを通知するためである。   The write command issuing unit 112 controls the host controller 114 to issue a write command to the recording medium 115. Further, when issuing a plurality of write commands after notification of the total write size, the write command is issued by adding the number of times information indicating how many write commands each write command is. This is to notify the recording medium 115 of how many times the current write command is for the total write size notified by the total write size notification unit 111.

ライトサイズ制御部113はSDRAM107に蓄積された画像データを記録媒体115にライトする際のライトサイズの制御を行う。   The write size control unit 113 controls the write size when the image data stored in the SDRAM 107 is written to the recording medium 115.

記録媒体115は、内部にNAND型フラッシュメモリを有し、記録装置100に対して着脱可能に構成された記録媒体である。   The recording medium 115 is a recording medium that has a NAND flash memory therein and is detachable from the recording apparatus 100.

<記録装置100のメモリ配置イメージ>
図2は本実施例における記録装置100のメモリ配置イメージを説明する図である。
動画記録において、SDRAM107はVideo Data1領域201、Video Data2領域202、Video Data3領域203、Audio Data1領域204、Audio Data2領域205に分ける。そして、各領域でリングバッファとして使用する。各領域は符号化部106のデータ出力先のバッファである。
<Image of Memory Arrangement of Recording Apparatus 100>
FIG. 2 is a diagram for explaining an image of memory arrangement of the recording apparatus 100 according to the present embodiment.
In moving image recording, the SDRAM 107 is divided into a Video Data 1 area 201, a Video Data 2 area 202, a Video Data 3 area 203, an Audio Data 1 area 204, and an Audio Data 2 area 205. And it uses as a ring buffer in each area | region. Each region is a data output destination buffer of the encoding unit 106.

なお、図2は本実施例の一例を示すものであり、メモリ配置、用途を限定するものではない。また、図2では、Video Data領域が3つ、Audio Data領域が2つの合計5つの領域を設定しているが、記録装置100のシステム構成によっては断片化された領域数は5カ所以上に設定してもよい。   FIG. 2 shows an example of this embodiment, and does not limit the memory arrangement and usage. In FIG. 2, a total of five areas are set, with three Video Data areas and two Audio Data areas. Depending on the system configuration of the recording apparatus 100, the number of fragmented areas is set to five or more. May be.

<記録時のフローチャート>
次に、記録装置100において動画データを記録媒体115に記録する際の処理を説明する。図3は本実施例における記録処理を説明する図である。
<Flow chart during recording>
Next, processing when recording moving image data on the recording medium 115 in the recording apparatus 100 will be described. FIG. 3 is a diagram for explaining the recording process in this embodiment.

記録待機状態において、ユーザが表示部109のタッチパネル、または不図示の操作部を操作して、動画データの記録開始を指示すると、以下の記録処理が開始される。   In a recording standby state, when the user operates the touch panel of the display unit 109 or an operation unit (not shown) to instruct to start recording moving image data, the following recording process is started.

ステップS301では、システム制御部101は、撮像処理部104、現像処理部105を制御して、画像データの撮影処理、現像処理を行い、更に符号化部106を制御して動画データと音声データを符号化処理する。符号化処理後のデータは、SDRAM107のバッファ領域であるVideo Data1領域201、Video Data2領域202、Video Data3領域203、Audio Data1領域204、Audio Data2領域205にそれぞれ蓄積する。   In step S301, the system control unit 101 controls the imaging processing unit 104 and the development processing unit 105 to perform image data shooting processing and development processing, and further controls the encoding unit 106 to generate moving image data and audio data. Perform the encoding process. The encoded data is stored in the Video Data1 area 201, the Video Data2 area 202, the Video Data3 area 203, the Audio Data1 area 204, and the Audio Data2 area 205, which are buffer areas of the SDRAM 107, respectively.

ステップS302では、システム制御部101は、SDRAM107のバッファ領域に蓄積された、記録媒体115に未記録である動画データと音声データのデータ量の合計を算出し、データ量の合計が閾値Tに達したか否かを判別する。閾値Tに達した場合、ステップS303に進む。閾値Tに達していない場合はステップS306に進む。   In step S302, the system control unit 101 calculates the total amount of moving image data and audio data unrecorded on the recording medium 115 accumulated in the buffer area of the SDRAM 107, and the total data amount reaches the threshold value T. It is determined whether or not. When the threshold value T is reached, the process proceeds to step S303. If the threshold value T has not been reached, the process proceeds to step S306.

ステップS303では、システム制御部101は、ライトサイズ制御部113を制御して、後のステップS305で領域201〜領域205それぞれでライトコマンドを発行する際の各ライトコマンドのライトサイズを決定する。ライトサイズ制御部113は、ステップS305で発行する複数のライトコマンドのライトサイズの合計が、取得したStream Directive情報のユニットサイズ(SGS等)のN倍になるように各ライトコマンドのライトサイズを決定する。なお、ユニットサイズは後述する図4のステップS401で記録媒体115から情報取得部110にて取得する。   In step S303, the system control unit 101 controls the write size control unit 113 to determine the write size of each write command when issuing a write command in each of the areas 201 to 205 in the subsequent step S305. The write size control unit 113 determines the write size of each write command so that the sum of the write sizes of the plurality of write commands issued in step S305 is N times the unit size (SGS, etc.) of the acquired Stream Directive information. To do. The unit size is acquired from the recording medium 115 by the information acquisition unit 110 in step S401 in FIG.

ステップS304では、システム制御部101は、総ライトサイズ通知部111を制御して、記録媒体115に、これからステップS305において複数のライトコマンドを発行することによりライトする、総ライトサイズとライトコマンドの総発行回数を通知する。ここで、記録媒体115に通知する総ライトサイズは、ステップS303で算出した複数のライトコマンドのライトサイズの合計となる。また、ライトコマンドの総発行回数は、ステップS303でライトサイズを決定したライトコマンドの数に対応する。   In step S304, the system control unit 101 controls the total write size notifying unit 111 to write to the recording medium 115 by issuing a plurality of write commands in step S305. Notify the number of issues. Here, the total write size notified to the recording medium 115 is the sum of the write sizes of the plurality of write commands calculated in step S303. The total number of write commands issued corresponds to the number of write commands whose write size has been determined in step S303.

ステップS305では、ステップS304で通知した総ライト回数分のライトコマンドが発行され、各ライトコマンドのライトサイズは、ステップS303で決定されたライトサイズに設定される。従って、ステップS305で発行される複数のライトコマンドのライトサイズの合計は、ステップS304で通知した総ライトサイズとなる。また、システム制御部101は、ライトコマンド発行部112を制御して、現在のライトコマンドの回数情報を付加して、各ライトコマンドを発行する。つまり、総ライトサイズ通知部111で通知したライトコマンドの総発行回数に対して、何回目のライトコマンドかを示す回数情報を、後述するライトコマンドのフィールドに追記し、ライトコマンドを発行する。また、ライトコマンドには、ライト対象となるデータが格納されている物理メモリSRAM107のアドレスを所定のフィールドに記載しておく。そのため、記録媒体115は、指定された物理メモリのアドレスから、指定されたサイズのデータを取得して、内部のNANDに書き込むことができる。なお、システム制御部101は、記録媒体115に対するファイルシステムの更新は適時行う。ステップS303からステップS305の処理をまとめたものを、ステップS310とする。   In step S305, a write command for the total number of writes notified in step S304 is issued, and the write size of each write command is set to the write size determined in step S303. Accordingly, the total write size of the plurality of write commands issued in step S305 is the total write size notified in step S304. In addition, the system control unit 101 controls the write command issuing unit 112 to add the current write command count information and issue each write command. That is, the number information indicating the number of write commands is added to the write command field, which will be described later, with respect to the total number of write commands issued by the total write size notification unit 111, and a write command is issued. In the write command, the address of the physical memory SRAM 107 in which data to be written is stored is described in a predetermined field. Therefore, the recording medium 115 can acquire data of a specified size from the address of the specified physical memory and write it to the internal NAND. The system control unit 101 updates the file system for the recording medium 115 in a timely manner. The process from step S303 to step S305 is summarized as step S310.

ステップS306にて、システム制御部101は、記録停止の有無を判別し、記録停止の指示が無い場合はステップS301に戻る。   In step S306, the system control unit 101 determines whether or not recording is stopped. If there is no instruction to stop recording, the system control unit 101 returns to step S301.

ユーザから表示部109のタッチパネル、または不図示の操作部への操作により、記録停止が指示された場合、ステップS307にて、システム制御部101はそれを検出する。そして、符号化部106による動画、音声データの符号化を停止するとともに、SDRAM107のバッファ領域に対する符号化データの蓄積を停止する。   When a recording stop instruction is given by a user operating the touch panel of the display unit 109 or an operation unit (not shown), the system control unit 101 detects it in step S307. Then, encoding of moving image and audio data by the encoding unit 106 is stopped, and accumulation of encoded data in the buffer area of the SDRAM 107 is stopped.

ステップS308にて、システム制御部101はホストコントローラ114を制御して、SDRAM107のバッファ領域であるVideo Data1領域201、Video Data2領域202、Video Data3領域203、Audio Data1領域204、Audio Data2領域205に残っている、記録媒体115に未記録の動画、音声データを記録媒体115に書き込む。そして、ファイルシステムの更新を行った後、記録処理を終了する。   In step S308, the system control unit 101 controls the host controller 114 to remain in the Video Data1 area 201, the Video Data2 area 202, the Video Data3 area 203, the Audio Data1 area 204, and the Audio Data2 area 205, which are buffer areas of the SDRAM 107. The unrecorded moving image and audio data are written in the recording medium 115. Then, after updating the file system, the recording process is terminated.

なお、ステップS308における書き込みでは、ライトコマンドにより書き込まれるデータの総サイズがユニットサイズと一致しないので、書き込み速度が低下することが考えられる。しかし、記録停止の指示の後の書き込み動作となるため、書き込み性能が低下しても問題はない。   Note that in the writing in step S308, the total size of data written by the write command does not match the unit size, so the writing speed may be reduced. However, since the writing operation is performed after the instruction to stop recording, there is no problem even if the writing performance is lowered.

次にDirectiveコマンドを使用して複数ライトコマンドを発行する際の処理を詳細に説明する。図4は本実施例におけるDirectiveコマンドの制御シーケンスを説明する図である。   Next, processing when issuing a plurality of write commands using the Direct command will be described in detail. FIG. 4 is a diagram for explaining the control sequence of the Direct command in this embodiment.

ステップS401にて、システム制御部101は情報取得部110を制御して、ホストコントローラ114からDirective Receiveコマンドを発行し、記録媒体115からリターンパラメータを取得する。リターンパラメータには、Stream Write Size(SWS)、Stream Granularity Size(SGS)がある。SWS、SGSは、記録媒体115が最適なライト性能で内部のNANDに書き込みが可能となるライトサイズの単位を示している。SWSは最小のサイズであり、SGSは、複数のSWSを1つのユニットとして取り扱うことにより、高速なライト性能を保証するライトサイズである。   In step S 401, the system control unit 101 controls the information acquisition unit 110 to issue a Direct Receive command from the host controller 114 and acquire a return parameter from the recording medium 115. Return parameters include Stream Write Size (SWS) and Stream Granularity Size (SGS). SWS and SGS indicate units of a write size at which the recording medium 115 can write to the internal NAND with the optimum write performance. The SWS is the minimum size, and the SGS is a write size that guarantees high-speed write performance by handling a plurality of SWSs as one unit.

次に、ステップS402にて、システム制御部101はホストコントローラ114を制御して、記録媒体115にEnable Directiveコマンドを発行し、記録媒体115のDirective機能を有効にする。   Next, in step S <b> 402, the system control unit 101 controls the host controller 114 to issue an Enable Direct command to the recording medium 115 and validate the Direct function of the recording medium 115.

ステップS401、ステップS402は起動時一回のみ実施すればよく、例えば記録装置の電源投入時に行えばよい。ただし、ステップS402については、Directive機能をDisenableにした後に再びDirective機能を使用する際には、再びEnable Directiveコマンドを発行し、Directive機能を有効にする必要がある。   Steps S401 and S402 need only be performed once at the time of startup, and may be performed, for example, when the recording apparatus is turned on. However, in step S402, when the Direct function is used again after the Direct function is disabled, it is necessary to issue the Enable Direct command again to enable the Direct function.

ステップS403にて、システム制御部101は総ライトサイズ通知部111を制御して、これからライトする総ライトサイズとライトコマンドの総発行回数を記録媒体115に通知する。ここで使用するコマンドは、本実施例ではDirective SendコマンドのDirective Operations Valueに総サイズ送信を示すパラメータを新たに追加(例えば02h)する。   In step S403, the system control unit 101 controls the total write size notification unit 111 to notify the recording medium 115 of the total write size to be written and the total number of write commands issued. In this embodiment, the command used here adds a new parameter (for example, 02h) indicating the total size transmission to the Direct Operations Value of the Direct Send command.

記録媒体115は総ライトサイズ、総発行回数の通知を受けることにより、これからライトすべきデータサイズとライトコマンド回数をあらかじめ知ることが出来る。   The recording medium 115 receives the notification of the total write size and the total number of issuances, so that the data size to be written and the number of write commands can be known in advance.

ステップS404にて、システム制御部101はライトコマンド発行部112を制御して、ライトコマンドを記録媒体115に発行する。回数情報についてはNVMe規格では定義されていないため、Directive SpecificのフィールドのDirective Type Valueを拡張して使用する。Directive Specific(DSPEC) FieldのDirective Type Value のStreamフラグ(01h)の設定と何回目のライトコマンドかを示す回数情報を追記する。すなわち、ステップS404では、ライトコマンド発行回数は1を設定する。また、NVMe規格上、各ライトコマンドのライトサイズはセクタサイズ(例えば512バイト)のn倍とする。そのため、ライトするデータはSDRAM107のVideo Data1領域201からセクタサイズ(512バイト)の整数倍で指定して記録媒体115にライトコマンドを発行する。   In step S404, the system control unit 101 controls the write command issuing unit 112 to issue a write command to the recording medium 115. Since the number information is not defined in the NVMe standard, the Direct Type Value in the Direct Specific field is extended and used. Direct Specific (DSPEC) The setting of the Stream flag (01h) of the Direct Type Value of the Field and the number of times information indicating the number of write commands are added. That is, in step S404, the write command issuance count is set to 1. Further, according to the NVMe standard, the write size of each write command is set to n times the sector size (for example, 512 bytes). Therefore, the write data is designated by an integer multiple of the sector size (512 bytes) from the Video Data1 area 201 of the SDRAM 107, and a write command is issued to the recording medium 115.

ステップS405にて、システム制御部101はライトコマンド発行部112を制御して、ライトコマンドを記録媒体115に発行する。発行するライトコマンドにおいては、Directive Specific FieldのDirective Type Value のStreamフラグ(01h)の設定とライトコマンド発行回数を2と指定する。なお、ライトするデータはSDRAM107のVideo Data2領域202からセクタサイズの整数倍で指定して記録媒体115にライトコマンドを発行する。   In step S405, the system control unit 101 controls the write command issuing unit 112 to issue a write command to the recording medium 115. In the write command to be issued, the setting of the Stream flag (01h) of the Direct Type Value of the Direct Specific Field and the number of write command issuance are specified as 2. The data to be written is designated by an integer multiple of the sector size from the Video Data2 area 202 of the SDRAM 107, and a write command is issued to the recording medium 115.

ステップS406にて、システム制御部101はライトコマンド発行部112を制御して、ライトコマンドを記録媒体115に発行する。発行するライトコマンドにおいては、Directive Specific FieldのDirective Type Value のStreamフラグ(01h)の設定とライトコマンド発行回数を3と指定する。また、ライトするデータはSDRAM107のVideo Data3領域203からセクタサイズの整数倍で指定して記録媒体115にライトコマンドを発行する。   In step S406, the system control unit 101 controls the write command issuing unit 112 to issue the write command to the recording medium 115. In the write command to be issued, the setting of the Stream flag (01h) of the Direct Type Value in the Direct Specific Field and the number of write command is specified as 3. The write data is designated from the Video Data 3 area 203 of the SDRAM 107 by an integral multiple of the sector size and a write command is issued to the recording medium 115.

ステップS407にて、システム制御部101はライトコマンド発行部112を制御して、ライトコマンドを記録媒体115に発行する。発行するライトコマンドにおいては、Directive Specific FieldのDirective Type Value のStreamフラグ(01h)の設定とライトコマンド発行回数を4と指定する。また、ライトするデータはSDRAM107のAudio Data1領域204からセクタサイズの整数倍で指定して記録媒体115にライトコマンドを発行する。   In step S407, the system control unit 101 controls the write command issuing unit 112 to issue a write command to the recording medium 115. In the write command to be issued, the setting of the Stream flag (01h) of the Direct Type Value in the Direct Specific Field and the number of write command issuance are specified as 4. The write data is designated from the Audio Data 1 area 204 of the SDRAM 107 by an integral multiple of the sector size and a write command is issued to the recording medium 115.

ステップS408にて、システム制御部101はライトコマンド発行部112を制御して、ライトコマンドを記録媒体115に発行する。発行するライトコマンドにおいては、Directive Specific FieldのDirective Type Value のStreamフラグ(01h)の設定とライトコマンド発行回数を5と指定する。また、ライトするデータはSDRAM107のAudio Data2領域205からセクタサイズの整数倍で指定して記録媒体115にライトコマンドを発行する。   In step S408, the system control unit 101 controls the write command issuing unit 112 to issue a write command to the recording medium 115. In the write command to be issued, the setting of the Stream flag (01h) of the Direct Type Value of the Direct Specific Field and the number of write command issuance are specified as 5. The write data is designated from the Audio Data2 area 205 of the SDRAM 107 by an integral multiple of the sector size and a write command is issued to the recording medium 115.

なお、システム制御部101は、ステップS404からステップS408のライトコマンドで指定するライト先のメモリデバイスの論理アドレスは連続してリニアに増加するように指定する。   The system control unit 101 specifies that the logical address of the write destination memory device specified by the write command from step S404 to step S408 is continuously increased linearly.

ステップS403〜ステップS408が図3で示すステップS310に相当する。   Steps S403 to S408 correspond to step S310 shown in FIG.

よって、システム制御部101はステップS302で、断片化された各バッファで蓄積されたデータの合計を監視し、合計サイズが閾値Tに達する毎に、ステップS310を繰り返す。   Therefore, the system control unit 101 monitors the total amount of data accumulated in each fragmented buffer in step S302, and repeats step S310 each time the total size reaches the threshold value T.

以上のように、実施例1によれば、記録装置100はSDRAM107に断片化された領域毎にライトコマンドを発行する場合に、予め記録媒体115に総ライトサイズとライトコマンド総発行回数を通知する。そして、総ライトサイズを記録媒体115から取得した最適なユニットサイズのN倍でライトするように制御する。以上の制御により、記録媒体115はライトコマンド受信前にライト準備が出来るため、最適なライト性能で内部のNANDに書き込みが可能となる。   As described above, according to the first embodiment, when the recording apparatus 100 issues a write command for each area fragmented in the SDRAM 107, it notifies the recording medium 115 of the total write size and the total number of write commands issued in advance. . Then, control is performed so that the total write size is written with N times the optimum unit size acquired from the recording medium 115. With the above control, the recording medium 115 can be prepared for writing before receiving the write command, so that it is possible to write to the internal NAND with optimum write performance.

なお、実施例1では一例として記録装置100の記録モードを動画記録としたが、記録モードを限定するものではなく、静止画記録や他の記録モードでも実施可能である。   In the first embodiment, the recording mode of the recording apparatus 100 is set as moving image recording as an example. However, the recording mode is not limited and can be performed in still image recording or other recording modes.

また、ステップS403にて、記録媒体115への総ライトサイズと総ライトコマンド発行回数の通知は、Directive SendコマンドのDirective Operations Valueに総サイズ送信を示すパラメータを追加するとした。しかし、コマンドの種類やパラメータを限定するものではない。また、他の通知方法でも実施可能である。   In step S403, the notification of the total write size and the total number of write commands issued to the recording medium 115 is made by adding a parameter indicating the total size transmission to the Direct Operations Value of the Direct Send command. However, the types of commands and parameters are not limited. Also, other notification methods can be implemented.

また、ステップS404〜S408にて、記録媒体115へのライトコマンドの回数情報の通知は、ライトコマンドのDirective Specific FieldのDirective Type Valueを拡張するとした。しかし、コマンドの種類やパラメータを限定するものではない。また、他の通知方法でも実施可能である。   Further, in steps S404 to S408, the notification of the write command count information to the recording medium 115 is to extend the Direct Type Value of the Direct Specific Field of the write command. However, the types of commands and parameters are not limited. Also, other notification methods can be implemented.

また、本実施例では総ライトサイズの算出は、図2で示した領域201から領域205の5つのメモリ領域に蓄積されたデータの総サイズとしたが、断片化したメモリ領域の数を5つに限定するものではない。   In this embodiment, the total write size is calculated based on the total size of data stored in the five memory areas from the area 201 to the area 205 shown in FIG. 2, but the number of fragmented memory areas is five. It is not limited to.

(実施例2)
次に、本発明の第2の実施形態について説明する。実施例1では、各ライトコマンドで指定するライトサイズはセクタサイズの整数倍にする構成とした。実施例2では各ライトコマンドのライトサイズをバイトサイズにする構成について説明する。
(Example 2)
Next, a second embodiment of the present invention will be described. In the first embodiment, the write size specified by each write command is set to an integral multiple of the sector size. In the second embodiment, a configuration in which the write size of each write command is changed to a byte size will be described.

実施例2の記録装置の構成例は実施例1の図1で説明した構成および動作と同様であるため説明を省略する。   The configuration example of the recording apparatus according to the second embodiment is the same as the configuration and operation described with reference to FIG.

また、記録装置100のメモリ配置イメージ(図2)、動画記録シーケンス(図3)、Directiveコマンドの制御シーケンス(図4)も実施例1と同様であるため説明を省略する。   The memory arrangement image of the recording apparatus 100 (FIG. 2), the moving image recording sequence (FIG. 3), and the control sequence of the Direct command (FIG. 4) are also the same as those in the first embodiment, and thus description thereof is omitted.

実施例2では、図4のDirectiveコマンドの制御シーケンスにおける、ステップS404からステップS405のライトコマンドの運用方法が異なる。   In the second embodiment, the operation method of the write command from step S404 to step S405 in the control sequence of the Direct command in FIG. 4 is different.

NVMe規格ではライトコマンドに指定するライトサイズはセクタサイズのn倍と定義されているため、バイトサイズの指定は出来ない。よって、バイトサイズを指定するために、既存のNVMe規格で定義されているSGL(Scatter Gather List)のフォーマットを利用する。   In the NVMe standard, the write size specified in the write command is defined as n times the sector size, so the byte size cannot be specified. Therefore, in order to specify the byte size, the SGL (Scatter Gather List) format defined in the existing NVMe standard is used.

図5は本実施例におけるライトコマンド拡張を説明する図である。   FIG. 5 is a diagram for explaining the write command extension in this embodiment.

500はNVMe規格で定義されたライトコマンドの形式である。501がライトサイズを指定するフィールドであり、セクタサイズの整数倍で指定する。   500 is a write command format defined in the NVMe standard. A field 501 designates the write size, which is designated by an integral multiple of the sector size.

503のPSDTはPRP or SGL for Data Transferを示すフィールドであり、00hはPRPモード、01h、02hはSGLモードで動作すること指定する。本実施例ではPSDT503にバイトアクセスモードを示す値を追加する。(例えば現在Reservedの11b)   PSDT 503 is a field indicating PRP or SGL for Data Transfer, and 00h specifies that the PRP mode is operated, and 01h and 02h specify that the SGL mode is operated. In this embodiment, a value indicating the byte access mode is added to the PSDT 503. (For example, currently reserved 11b)

504はSGL Segmentの形式である。NVMe規格ではSGL Segment Pointer502で指定されたSDRAM107のメモリアドレスにSGL Segment504を配置するよう定義されている。505はライトサイズを指定するフィールドであり、任意の整数倍で設定が可能である。   Reference numeral 504 denotes an SGL Segment format. The NVMe standard defines that the SGL Segment 504 is arranged at the memory address of the SDRAM 107 specified by the SGL Segment Pointer 502. Reference numeral 505 denotes a field for designating a write size, which can be set by an arbitrary integer multiple.

上記の説明を図4のDirectiveコマンドの制御シーケンスに当てはめて説明する。   The above description is applied to the control sequence of the Direct command in FIG.

ステップS403にて、システム制御部101は総ライトサイズ通知部111を制御して、これからライトする総サイズとライトコマンドの総発行回数を通知する。使用するコマンドは本実施例ではDirective SendコマンドのDirective Operations Valueに総サイズ送信を示すパラメータを新たに追加(例えば02h)することにする。   In step S403, the system control unit 101 controls the total write size notification unit 111 to notify the total size to be written and the total number of write commands issued. In this embodiment, a command to be used is newly added (for example, 02h) a parameter indicating total size transmission to the Direct Operations Value of the Direct Send command.

記録媒体115はライト総サイズの通知を受けることにより、これからライトされるデータサイズとライトコマンド回数をあらかじめ知ることが出来る。   When the recording medium 115 receives the notification of the total write size, the data size to be written and the number of write commands can be known in advance.

ステップS404にて、システム制御部101はライトコマンド発行部112を制御して、ライトコマンドを発行する。発行するライトコマンドでは、Directive Specific FieldのDirective Type Value のStreamフラグ(01h)の設定と何回目のライトコマンドかを示す回数情報を追記する。すなわち、ステップS404では、ライトコマンド発行回数は1を指定する。また、ライトするデータはSDRAM107のVideo Data1領域201から、セクタサイズの整数倍で丸めた値をNumber of Logical Blocks501に指定する。同時に、実際のライトサイズをSGL Segment Pointer502で指定したSDRAM107のメモリアドレス先のSGL Segment504のLength505にバイトサイズの指定をする。また、PSDT503にバイトアクセスモードを示す値を設定し、ライトコマンドを発行する。   In step S404, the system control unit 101 controls the write command issuing unit 112 to issue a write command. In the write command to be issued, the setting of the Stream flag (01h) of the Direct Type Value in the Direct Specific Field and the number of times information indicating the number of write commands are added. That is, in step S404, 1 is designated as the number of write command issuances. In addition, the data to be written is designated from the Video Data1 area 201 of the SDRAM 107 to Number of Logical Blocks 501 by rounding it to an integer multiple of the sector size. At the same time, the byte size is designated in the Length 505 of the SGL Segment 504 that is the memory address destination of the SDRAM 107 in which the actual write size is designated by the SGL Segment Pointer 502. Also, a value indicating the byte access mode is set in PSDT 503 and a write command is issued.

ステップS405にて、システム制御部101はライトコマンド発行部112を制御して、Directive Specific FieldのDirective Type Value のStreamフラグ(01h)の設定とライトコマンド発行回数を2と指定する。また、ライトするデータはSDRAM107のVideo Data2領域202から、セクタサイズの整数倍で丸めた値をNumber of Logical Blocks501に設定する。同時に、実際のライトサイズをSGL Segment Pointer502で指定したメモリアドレス先のSGL Segment504のLength505にバイトサイズの指定をする。また、PSDT503にバイトアクセスモードを示す値を設定し、ライトコマンドを発行する。   In step S405, the system control unit 101 controls the write command issuing unit 112 to specify 2 for the setting of the Stream flag (01h) of the Direct Type Value of the Direct Specific Field and the number of write command issuance. Also, the data to be written is set in Number of Logical Blocks 501 by rounding the data from the Video Data2 area 202 of the SDRAM 107 by an integral multiple of the sector size. At the same time, the byte size is specified in the Length 505 of the SGL Segment 504 that is the memory address specified by the SGL Segment Pointer 502 with the actual write size. Also, a value indicating the byte access mode is set in PSDT 503 and a write command is issued.

ステップS406にて、システム制御部101はライトコマンド発行部112を制御して、ライトコマンドを発行する。発行するライトコマンドでは、Directive Specific FieldのDirective Type Value のStreamフラグ(01h)の設定とライトコマンド発行回数を3と設定する。また、ライトするデータはSDRAM107のVideo Data3領域203から、セクタサイズの整数倍で丸めた値をNumber of Logical Blocks501に設定する。同時に、実際のライトサイズはSGL Segment Pointer502で指定したメモリアドレス先のSGL Segment504のLength505にバイトサイズの指定をする。また、PSDT503にバイトアクセスモードを示す値を設定し、ライトコマンドを発行する。   In step S406, the system control unit 101 controls the write command issuing unit 112 to issue a write command. In the write command to be issued, the setting of the Stream flag (01h) of the Direct Type Value in the Direct Specific Field and the number of write command is set to 3. The data to be written is set in Number of Logical Blocks 501 by rounding the data from the Video Data3 area 203 of the SDRAM 107 by an integral multiple of the sector size. At the same time, as the actual write size, the byte size is designated in the Length 505 of the SGL Segment 504 that is the memory address designated by the SGL Segment Pointer 502. Also, a value indicating the byte access mode is set in PSDT 503 and a write command is issued.

ステップS407にて、システム制御部101はライトコマンド発行部112を制御して、ライトコマンドを発行する。発行するライトコマンドでは、Directive Specific FieldのDirective Type Value のStreamフラグ(01h)の設定とライトコマンド発行回数を4と設定する。また、ライトするデータはSDRAM107のAudio Data1領域204から、セクタサイズの整数倍で丸めた値をNumber of Logical Blocks501に設定する。同時に、実際のライトサイズはSGL Segment Pointer502で指定したメモリアドレス先のSGL Segment504のLength505にバイトサイズの指定をする。また、PSDT503にバイトアクセスモードを示す値を設定し、ライトコマンドを発行する。   In step S407, the system control unit 101 controls the write command issuing unit 112 to issue a write command. In the write command to be issued, the setting of the Stream flag (01h) of the Direct Type Value of the Direct Specific Field and the number of write command is set to 4. In addition, the data to be written is set in the Number of Logical Blocks 501 by rounding the data from the Audio Data1 area 204 of the SDRAM 107 by an integral multiple of the sector size. At the same time, as the actual write size, the byte size is designated in the Length 505 of the SGL Segment 504 that is the memory address designated by the SGL Segment Pointer 502. Also, a value indicating the byte access mode is set in PSDT 503 and a write command is issued.

ステップS408にて、システム制御部101はライトコマンド発行部112を制御して、ライトコマンドを発行する。発行するライトコマンドでは、Directive Specific FieldのDirective Type Value のStreamフラグ(01h)の設定とライトコマンド発行回数を5と設定する。また、ライトするデータはSDRAM107のAudio Data2領域205から、セクタサイズの整数倍で丸めた値をNumber of Logical Blocks501に設定する。同時に、実際のライトサイズはSGL Segment Pointer502で指定したメモリアドレス先のSGL Segment504のLength505にバイトサイズの指定をする。また、PSDT503にバイトアクセスモードを示す値を設定し、ライトコマンドを発行する。   In step S408, the system control unit 101 controls the write command issuing unit 112 to issue a write command. In the write command to be issued, the setting of the Stream flag (01h) of the Direct Type Value of the Direct Specific Field and the number of write command is set to 5. The data to be written is set in Number of Logical Blocks 501 by rounding the data from the Audio Data2 area 205 of the SDRAM 107 by an integral multiple of the sector size. At the same time, as the actual write size, the byte size is designated in the Length 505 of the SGL Segment 504 that is the memory address designated by the SGL Segment Pointer 502. Also, a value indicating the byte access mode is set in PSDT 503 and a write command is issued.

ステップS403〜ステップS408が図3で示すステップS310に相当する。   Steps S403 to S408 correspond to step S310 shown in FIG.

よって、システム制御部101はステップS302で、断片化された各バッファで蓄積されたデータの合計を監視し、合計サイズが閾値Tに達する毎に、ステップS310を繰り返す。   Therefore, the system control unit 101 monitors the total amount of data accumulated in each fragmented buffer in step S302, and repeats step S310 each time the total size reaches the threshold value T.

以上のように、実施例2によれば、記録装置100はSDRAM107に断片化された領域毎にライトコマンドを発行する。そして、予め記録媒体115に総ライトサイズとライトコマンド発行回数を通知し、かつ総ライトサイズを記録媒体115から取得した最適なユニットサイズのN倍でライトするように制御する。また、SGL Segmentを利用して、各ライトコマンドのライトサイズをバイトサイズで指定できる。   As described above, according to the second embodiment, the recording apparatus 100 issues a write command for each area fragmented in the SDRAM 107. The total write size and the number of write commands issued are notified to the recording medium 115 in advance, and the total write size is controlled to be written at N times the optimum unit size acquired from the recording medium 115. In addition, the write size of each write command can be specified in byte size using SGL Segment.

以上の制御により、記録装置100は断片化された各メモリ領域をバイトサイズでバッファ管理可能になるため、セクタサイズの整数倍の制約よりシステム上の運用が容易になる。また、記録媒体115はライトコマンド受信前にライト準備が出来るため、最適なライト性能で内部のNANDに書き込みが可能となる。   With the control described above, the recording apparatus 100 can manage each fragmented memory area with a byte size buffer, so that the system operation is facilitated by the restriction of an integral multiple of the sector size. In addition, since the recording medium 115 can be prepared for writing before receiving the write command, it is possible to write to the internal NAND with optimum write performance.

なお、実施例2では一例として記録装置100の記録モードを動画記録としたが、記録モードを限定するものではなく、静止画記録や他の記録モードでも実施可能である。   In the second embodiment, the recording mode of the recording apparatus 100 is set as moving image recording as an example. However, the recording mode is not limited and can be performed in still image recording or other recording modes.

また、ステップS403にて、記録媒体115への総ライトサイズと総ライトコマンド発行回数の通知は、Directive SendコマンドのDirective Operations Valueに総サイズ送信を示すパラメータを追加するとした。しかし、コマンドの種類やパラメータを限定するものではない。また、他の通知方法でも実施可能である。   In step S403, the notification of the total write size and the total number of write commands issued to the recording medium 115 is made by adding a parameter indicating the total size transmission to the Direct Operations Value of the Direct Send command. However, the types of commands and parameters are not limited. Also, other notification methods can be implemented.

また、ステップS404〜S408にて、記録媒体115へのライトコマンドの回数情報の通知は、ライトコマンドのDirective Specific FieldのDirective Type Valueを拡張するとした。しかし、コマンドの種類やパラメータを限定するものではない。また、他の通知方法でも実施可能である。   Further, in steps S404 to S408, the notification of the write command count information to the recording medium 115 is to extend the Direct Type Value of the Direct Specific Field of the write command. However, the types of commands and parameters are not limited. Also, other notification methods can be implemented.

また、本実施例では総ライトサイズの算出は、図2で示した領域201から領域205の5つのメモリ領域に蓄積されたデータの総サイズとしたが、断片化したメモリ領域の数を5つに限定するものではない。   In this embodiment, the total write size is calculated based on the total size of data stored in the five memory areas from the area 201 to the area 205 shown in FIG. 2, but the number of fragmented memory areas is five. It is not limited to.

また、本実施例ではバイトアドレスはSGL Segmentで通知するとしたが、通知方法を限定するものではなく、他の通知手段でも実施可能である。   In this embodiment, the byte address is notified by SGL Segment. However, the notification method is not limited, and other notification means can be used.

(実施例3)
次に、本発明の第3の実施形態について説明する。実施例1、2では、複数のライトコマンドの合計ライトサイズがユニットサイズのN倍になるように制御する構成とした。実施例3ではライトコマンド一回で連結したディスクリプタの合計ライトサイズがユニットサイズのN倍になるように制御する構成について説明する。
(Example 3)
Next, a third embodiment of the present invention will be described. In the first and second embodiments, the total write size of a plurality of write commands is controlled to be N times the unit size. In the third embodiment, a configuration is described in which control is performed so that the total write size of descriptors connected in one write command is N times the unit size.

実施例2の記録装置の構成例は実施例1の図1で説明した構成および動作と基本的には同じであるが、本実施例では、さらに、ディスクリプタ生成部を有している。   The configuration example of the recording apparatus according to the second embodiment is basically the same as the configuration and operation described with reference to FIG. 1 according to the first embodiment, but the present embodiment further includes a descriptor generation unit.

また、記録装置100のメモリ配置イメージ(図2)、動画記録シーケンス(図3)も実施例1と同様であるため説明を省略する。   Further, the memory arrangement image (FIG. 2) and the moving image recording sequence (FIG. 3) of the recording apparatus 100 are also the same as those in the first embodiment, and the description thereof is omitted.

図6は本実施例におけるディスクリプタを使用した制御シーケンスを説明する図である。   FIG. 6 is a diagram for explaining a control sequence using a descriptor in this embodiment.

なお、本シーケンスの前提となる動画記録動作は図3のフローチャートと同様であり、ステップS610は図3で説明したS310の動作に当てはまる。   Note that the moving image recording operation that is the premise of this sequence is the same as that in the flowchart of FIG. 3, and step S610 applies to the operation of S310 described in FIG.

ステップS601はステップS401、ステップS602はステップS402と同様の処理であるため、ここでの説明は省略する。   Since step S601 is the same as step S401 and step S602 is the same as step S402, description thereof is omitted here.

ステップS603のディスクリプタ生成を説明する前に、ライトコマンドとディスクリプタ構成について説明する。図7はライトコマンドとディスクリプタの構成を説明する図である。   Before describing descriptor generation in step S603, a write command and descriptor configuration will be described. FIG. 7 is a diagram for explaining the configuration of the write command and the descriptor.

本実施例では、ディスクリプタ生成部が、ディスクリプタはNVMe規格で定義されているSGL(Scatter Gather List)のフォーマットを利用して以下のようなディスクリプタを生成する。なお、SGLフォーマットの詳細はNVMe規格に記載されているので、ここでは本発明に関する点のみ説明する。   In the present embodiment, the descriptor generation unit generates the following descriptor using the SGL (Scatter Gather List) format defined in the NVMe standard. Since details of the SGL format are described in the NVMe standard, only the points relating to the present invention will be described here.

700はNVMe規格で定義されたライトコマンドの形式である。701がライトサイズを指定するフィールドであり、セクタサイズの整数倍で指定する。   700 is a write command format defined by the NVMe standard. A field 701 designates a write size, which is designated by an integral multiple of the sector size.

703のPSDTはPRP or SGL for Data Transferを示すフィールドであり、00hはPRPモード、01h、02hはSGLモードで動作すること指定する。本実施例ではSGLモードを指定する。   A PSDT 703 is a field indicating PRP or SGL for Data Transfer, and 00h specifies operation in the PRP mode, and 01h and 02h specify operation in the SGL mode. In this embodiment, the SGL mode is designated.

710はSGL Segmentの形式である。NVMe規格ではSGL Segment Pointer702で指定されたSDRAM107のメモリアドレスにSGL Segment710を配置するよう定義されている。711はSDRAM107の断片化されたメモリ領域、例えば、Video Data1領域201のアドレス、ライトサイズを指定する。712は次のディスクリプタが配置されるメモリアドレスを指定する。713は断片化された次のメモリ領域、例えばVideo Data2領域202のアドレス、ライトサイズを指定する。704は次のディスクリプタが配置されるメモリアドレスを指定する。711〜714の構成を断片化されたメモリ領域分生成し、710+nに最後のメモリ領域のアドレス、サイズを指定する。なお、NVMeの規格上、ディスクリプタで指定するライトサイズはバイトサイズで指定可能である。当該ライトコマンドで使用するディスクリプタの合計数を703のReserved領域を拡張して指定する。   710 is a format of SGL Segment. The NVMe standard defines that the SGL Segment 710 is arranged at the memory address of the SDRAM 107 specified by the SGL Segment Pointer 702. Reference numeral 711 designates the address and write size of the fragmented memory area of the SDRAM 107, for example, the Video Data1 area 201. Reference numeral 712 designates a memory address at which the next descriptor is arranged. Reference numeral 713 designates the address and write size of the next fragmented memory area, for example, the Video Data2 area 202. Reference numeral 704 designates a memory address where the next descriptor is arranged. The configuration of 711 to 714 is generated for the fragmented memory area, and the address and size of the last memory area are designated as 710 + n. According to the NVMe standard, the write size specified by the descriptor can be specified by the byte size. The total number of descriptors used in the write command is specified by extending the Reserved area of 703.

ステップS603にて、システム制御部101はディスクリプタ生成部を制御して、SDRAM107上で断片化されたメモリ領域の個数分ライト用のディスクリプタを生成する。なお、ディスクリプタで指定する総ライトサイズが、ステップS601で取得したStream Directive情報のユニットサイズ(SGS等)のN倍になるように各ディスクリプタのライトサイズを決定する。   In step S603, the system control unit 101 controls the descriptor generation unit to generate write descriptors for the number of memory areas fragmented on the SDRAM 107. Note that the write size of each descriptor is determined so that the total write size specified by the descriptor is N times the unit size (such as SGS) of the Stream Directive information acquired in step S601.

ステップS604にて、システム制御部101はライトコマンド発行部112を制御して、Directive Specific FieldのDirective Type Value のStreamフラグ(01h)の設定をする。ライトコマンドのライトサイズはステップS603で決定した、ユニットサイズのN倍となる、ディスクリプタで指定する総ライトサイズの値を指定してライトコマンドを発行する。   In step S604, the system control unit 101 controls the write command issuance unit 112 to set the Stream Type flag (01h) of the Direct Specific Value of the Direct Specific Field. The write size of the write command is N times the unit size determined in step S603, and the value of the total write size specified by the descriptor is specified and the write command is issued.

ライトコマンドの発行後に、ステップS604(a)にて、記録媒体115はライトコマンドのSGL Segment Pointerで指定したディスクリプタから、Video Data1領域201のデータを指定したサイズ分リードする。   After the write command is issued, in step S604 (a), the recording medium 115 reads the data in the Video Data1 area 201 by the specified size from the descriptor specified by the SGL Segment Pointer of the write command.

ステップS604(b)にて、記録媒体115は次のディスクリプタから、Video Data2領域202のデータを指定したサイズ分リードする。   In step S604 (b), the recording medium 115 reads the data in the Video Data2 area 202 for the specified size from the next descriptor.

ステップS604(c)にて、記録媒体115は次のディスクリプタから、Video Data3領域203のデータを指定したサイズ分リードする。   In step S604 (c), the recording medium 115 reads the data in the Video Data3 area 203 for the specified size from the next descriptor.

ステップS604(d)にて、記録媒体115は次のディスクリプタから、Audio Data1領域204のデータを指定したサイズ分リードする。   In step S604 (d), the recording medium 115 reads data in the Audio Data1 area 204 for the specified size from the next descriptor.

ステップS604(e)にて、記録媒体115は次のディスクリプタから、Audio Data2領域205のデータを指定したサイズ分リードする。   In step S604 (e), the recording medium 115 reads the data in the Audio Data2 area 205 by the designated size from the next descriptor.

以上のように、実施例3によれば、記録装置100はSDRAM107に断片化された領域分ディスクリプタを生成し、ディスクリプタの合計数を記録媒体115に通知する。更に、総ライトサイズを記録媒体115から取得した最適なユニットサイズのN倍でライトするように制御する。   As described above, according to the third embodiment, the recording apparatus 100 generates descriptors for the areas fragmented in the SDRAM 107 and notifies the recording medium 115 of the total number of descriptors. Further, control is performed so that the total write size is written with N times the optimum unit size acquired from the recording medium 115.

以上の制御により、記録装置100は断片化された各メモリ領域のライトをライトコマンド一回で実現できるため、コマンド発行のオーバヘッドを削減できる。また、記録媒体115はライトコマンド受信時にライト準備が出来るため、最適なライト性能で内部のNANDに書き込みが可能となる。   With the above control, the recording apparatus 100 can write each fragmented memory area with a single write command, thereby reducing the command issuing overhead. Further, since the recording medium 115 can be prepared for writing when a write command is received, it is possible to write to the internal NAND with optimum write performance.

なお、実施例3では一例として記録装置100の記録モードを動画記録としたが、記録モードを限定するものではなく、静止画記録や他の記録モードでも実施可能である。   In the third embodiment, the recording mode of the recording apparatus 100 is set as moving image recording as an example. However, the recording mode is not limited and can be performed in still image recording or other recording modes.

また、ステップS603にて、記録媒体115へのディスクリプタの総個数の通知は、ライトコマンドのReserved領域を拡張するとしたが、これに限定するものではなく、他の通知方法でも実施可能である。   Further, in step S603, the notification of the total number of descriptors to the recording medium 115 is to extend the reserved area of the write command, but the present invention is not limited to this, and other notification methods can be used.

また、本実施例では総ライトサイズの算出は、図2で示した領域201から領域205の5つのメモリ領域に蓄積されたデータの総サイズとしたが、断片化したメモリ領域の数を5つに限定するものではない。   In this embodiment, the total write size is calculated based on the total size of data stored in the five memory areas from the area 201 to the area 205 shown in FIG. 2, but the number of fragmented memory areas is five. It is not limited to.

Claims (12)

フラッシュメモリを有する記録媒体に対してデータを記録する記録装置であって、
前記記録媒体からユニットサイズを取得する取得手段と、
前記取得手段により取得した前記記録媒体のユニットサイズの整数倍のサイズとなる総ライトサイズを前記記録媒体に通知する通知手段と、
前記通知手段により前記総ライトサイズを通知した後に、複数のライトコマンドを前記記録媒体に対して発行する発行手段であって、前記複数のライトコマンドのライトサイズの合計が、前記通知手段により通知した前記総ライトサイズとなるように、前記複数のライトコマンドを発行する発行手段と、を有することを特徴とする記録装置。
A recording device for recording data on a recording medium having a flash memory,
Obtaining means for obtaining a unit size from the recording medium;
Notification means for notifying the recording medium of a total write size that is an integral multiple of the unit size of the recording medium acquired by the acquiring means;
Issuing means for issuing a plurality of write commands to the recording medium after notifying the total write size by the notifying means, wherein the sum of the write sizes of the plurality of write commands is notified by the notifying means. And a issuing unit that issues the plurality of write commands so as to achieve the total write size.
前記発行手段は、前記複数のライトコマンドのライト先のアドレスが連続するように、前記複数のライトコマンドを発行することを特徴とする請求項1に記載の記録装置。   The recording apparatus according to claim 1, wherein the issuing unit issues the plurality of write commands such that write destination addresses of the plurality of write commands are continuous. 前記発行手段は、各ライトコマンドのライトサイズが、所定のサイズの整数倍となるように前記複数のライトコマンドを発行することを特徴とする請求項1に記載の記録装置。   The recording apparatus according to claim 1, wherein the issuing unit issues the plurality of write commands so that a write size of each write command is an integral multiple of a predetermined size. 前記所定のサイズは、前記記録媒体のセクタサイズであることを特徴とする請求項3に記載の記録装置。   The recording apparatus according to claim 3, wherein the predetermined size is a sector size of the recording medium. 前記通知手段は、前記総ライトサイズと共に、総ライト回数を通知し、
前記発行手段は、前記通知手段により通知した前記総ライト回数に対応する数の複数のライトコマンドを発行することを特徴とする請求項1に記載の記録装置。
The notification means notifies the total number of writes together with the total light size,
The recording apparatus according to claim 1, wherein the issuing unit issues a plurality of write commands corresponding to the total number of writes notified by the notification unit.
前記発行手段は、各ライトコマンドに、前記通知手段により通知した総ライト回数に対するライトコマンド発行回数に関する情報を付加してライトコマンドを発行することを特徴とする請求項5に記載の記録装置。   6. The recording apparatus according to claim 5, wherein the issuing unit issues a write command by adding, to each write command, information related to the number of write commands issued with respect to the total number of writes notified by the notification unit. 前記発行手段は、NVMe規格で定義されたDirective Specific (DSPEC)のフィールドを拡張することにより、前記ライトコマンド発行回数に関する情報を付加することを特徴とする請求項6に記載の記録装置。   The recording apparatus according to claim 6, wherein the issuing unit adds information regarding the number of times the write command is issued by expanding a field of a Direct Specific (DSPEC) defined in the NVMe standard. 前記通知手段は、NVMe規格で定義されたDirective SendコマンドのOperation Valueを拡張して、前記総ライトサイズを通知することを特徴とする請求項1に記載の記録装置。   The recording apparatus according to claim 1, wherein the notification unit extends the Operation Value of a Direct Send command defined in the NVMe standard and notifies the total write size. 前記取得手段は、NVMe規格のDirective Receiveコマンドを使用して、前記記録媒体からユニットサイズを取得することを特徴とする請求項1に記載の記録装置。   The recording apparatus according to claim 1, wherein the acquisition unit acquires a unit size from the recording medium using an NVMe standard Direct Receive command. 前記発行手段は、前記複数のライトコマンドの各ライトコマンドのライトサイズを、NVMe規格で定義されたディスクリプタを使用して、バイトサイズで指定することを特徴とする請求項1に記載の記録装置。   The recording apparatus according to claim 1, wherein the issuing unit specifies a write size of each write command of the plurality of write commands by using a byte size using a descriptor defined in the NVMe standard. フラッシュメモリを有する記録媒体に対してデータを記録する記録装置であって、
前記記録媒体からユニットサイズを取得する取得手段と、
指定したライトサイズのデータを前記記録媒体に記録するための指示が記載されるディスクリプタを生成する生成手段であって、複数のディスクリプタを生成する生成手段と、
ライトコマンドを前記記録媒体に発行する発行手段であって、前記複数のディスクリプタで指定されるライトサイズの合計サイズを前記ライトコマンドのライトサイズとしてライトコマンドを発行する発行手段と、を有し、
前記複数のディスクリプタで指定されるライトサイズの合計サイズが、前記取得手段により取得したユニットサイズの整数倍となるようすることを特徴とする記録装置。
A recording device for recording data on a recording medium having a flash memory,
Obtaining means for obtaining a unit size from the recording medium;
Generating means for generating a descriptor in which an instruction for recording data of a specified write size on the recording medium is described, and generating means for generating a plurality of descriptors;
Issuing means for issuing a write command to the recording medium, and issuing means for issuing a write command using a total size of write sizes specified by the plurality of descriptors as a write size of the write command,
A recording apparatus, wherein a total size of write sizes specified by the plurality of descriptors is an integral multiple of a unit size acquired by the acquisition unit.
前記生成手段は、NVMe規格で定義されたSGL Segmentフォーマットで、前記ディスクリプタを生成することを特徴とする請求項11に記載の記録装置。   12. The recording apparatus according to claim 11, wherein the generation unit generates the descriptor in an SGL Segment format defined by the NVMe standard.
JP2017138342A 2017-07-14 2017-07-14 Recording device Active JP6995520B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017138342A JP6995520B2 (en) 2017-07-14 2017-07-14 Recording device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017138342A JP6995520B2 (en) 2017-07-14 2017-07-14 Recording device

Publications (2)

Publication Number Publication Date
JP2019020989A true JP2019020989A (en) 2019-02-07
JP6995520B2 JP6995520B2 (en) 2022-02-04

Family

ID=65354121

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017138342A Active JP6995520B2 (en) 2017-07-14 2017-07-14 Recording device

Country Status (1)

Country Link
JP (1) JP6995520B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210147047A (en) * 2019-04-17 2021-12-06 캐논 가부시끼가이샤 Recording device, recording method, program, and memory card
JPWO2024043087A1 (en) * 2022-08-26 2024-02-29

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09198336A (en) * 1996-01-22 1997-07-31 Nec Corp Remote access method for secondary storage device
JP2006514386A (en) * 2003-10-29 2006-04-27 松下電器産業株式会社 Drive device, program
JP2012234495A (en) * 2011-05-09 2012-11-29 Sony Corp Flash memory device, memory control device, memory control method and storage system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09198336A (en) * 1996-01-22 1997-07-31 Nec Corp Remote access method for secondary storage device
JP2006514386A (en) * 2003-10-29 2006-04-27 松下電器産業株式会社 Drive device, program
JP2012234495A (en) * 2011-05-09 2012-11-29 Sony Corp Flash memory device, memory control device, memory control method and storage system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
NVM EXPRESS REVISION 1.3, JPN6021009203, May 2017 (2017-05-01), pages 6 - 9, ISSN: 0004465833 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210147047A (en) * 2019-04-17 2021-12-06 캐논 가부시끼가이샤 Recording device, recording method, program, and memory card
CN113785308A (en) * 2019-04-17 2021-12-10 佳能株式会社 Recording apparatus, recording method, program, and memory card
KR102796045B1 (en) * 2019-04-17 2025-04-16 캐논 가부시끼가이샤 Recording device, recording method, program, and memory card
CN113785308B (en) * 2019-04-17 2025-06-06 佳能株式会社 Recording device, recording method, storage medium and storage card
US12333184B2 (en) 2019-04-17 2025-06-17 Canon Kabushiki Kaisha Recording apparatus, recording method, storage medium, and memory card
JPWO2024043087A1 (en) * 2022-08-26 2024-02-29
WO2024043087A1 (en) * 2022-08-26 2024-02-29 パナソニックIpマネジメント株式会社 Host device, non-volatile storage device and memory system

Also Published As

Publication number Publication date
JP6995520B2 (en) 2022-02-04

Similar Documents

Publication Publication Date Title
JPWO2005096220A1 (en) Memory card and memory card system
CN109168021A (en) A kind of method and device of plug-flow
CN114998087B (en) Rendering method and device
JP6995520B2 (en) Recording device
US8625968B2 (en) Recording apparatus and control method thereof
JP2016009280A (en) Recording device
JP5523128B2 (en) Recording apparatus and control method thereof
JP7212477B2 (en) Recording device, recording method, and program
US20110187894A1 (en) Recording apparatus and method
JP2019180054A (en) Image recording device and control method thereof
US8929723B2 (en) Recording apparatus, imaging and recording apparatus, recording method, and program
US9195595B2 (en) Portable apparatus using multi-core storage mechanism and data access method therefor
JP2010015251A (en) Recording device
CN204331254U (en) Projector
JP7171298B2 (en) Recording device, recording method, and program
JP7214400B2 (en) Recording control device and its control method
JP7263017B2 (en) Recording control device and its control method
JP6494275B2 (en) Recording apparatus and recording apparatus control method
JP7149809B2 (en) IMAGE RECORDING DEVICE, CONTROL METHOD AND PROGRAM THEREOF
US20150253996A1 (en) Access control method and data storage device
JP5647318B2 (en) Information processing apparatus, information processing apparatus control method, and program
JP5489818B2 (en) Recording / reproducing apparatus and control method thereof
JP5390991B2 (en) DATA TRANSFER SYSTEM, DATA TRANSFER DEVICE, DATA TRANSFER DEVICE CONTROL METHOD, AND PROGRAM
JP6112972B2 (en) Imaging device
JP2016009411A (en) Recording device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200605

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210310

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210316

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210514

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210928

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211108

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20211116

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211215

R151 Written notification of patent or utility model registration

Ref document number: 6995520

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151