JP4285404B2 - Data control apparatus and buffer data remaining amount detection method - Google Patents

Data control apparatus and buffer data remaining amount detection method Download PDF

Info

Publication number
JP4285404B2
JP4285404B2 JP2004364676A JP2004364676A JP4285404B2 JP 4285404 B2 JP4285404 B2 JP 4285404B2 JP 2004364676 A JP2004364676 A JP 2004364676A JP 2004364676 A JP2004364676 A JP 2004364676A JP 4285404 B2 JP4285404 B2 JP 4285404B2
Authority
JP
Japan
Prior art keywords
data
areas
buffer
command
detected
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.)
Expired - Fee Related
Application number
JP2004364676A
Other languages
Japanese (ja)
Other versions
JP2006172625A (en
Inventor
雄司 梶川
健一 高宮
憲一 瀬戸
裕之 田上
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 JP2004364676A priority Critical patent/JP4285404B2/en
Publication of JP2006172625A publication Critical patent/JP2006172625A/en
Application granted granted Critical
Publication of JP4285404B2 publication Critical patent/JP4285404B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Description

本発明は、バッファデータの残量検出を行うデータ制御装置及びバッファデータの残量検出方法に関するものである。   The present invention relates to a data control device for detecting the remaining amount of buffer data and a method for detecting the remaining amount of buffer data.

従来から、DVDなどの記録媒体に、データ発生源であるコンピュータから送信されるデータを書き込むデータ記録処理装置が知られている。   2. Description of the Related Art Conventionally, a data recording processing apparatus that writes data transmitted from a computer that is a data generation source on a recording medium such as a DVD is known.

このようなデータ記録処理装置は、コンピュータ装置から送信されるデータ速度と記録媒体にデータを記録する速度との相違を調整するために、その内部に、コンピュータ装置から送信されるデータを一時的に蓄積する記憶用バッファを設けている。   In order to adjust the difference between the data rate transmitted from the computer device and the rate at which data is recorded on the recording medium, such a data recording processing device temporarily stores the data transmitted from the computer device. A storage buffer for accumulation is provided.

ところで、データ記録処理装置が記録媒体に書き込む速度よりもコンピュータ装置から送信されるデータの速度が遅くなったような場合には、記憶用バッファに蓄積されるデータの残量が不足するバッファアンダーランという現象が生じる。   By the way, when the speed of data transmitted from the computer apparatus becomes slower than the speed at which the data recording processing apparatus writes to the recording medium, the buffer underrun where the remaining amount of data accumulated in the storage buffer is insufficient. The phenomenon that occurs.

データ記録処理装置のバッファ管理手段は、このような現象が生じると記録媒体への書込を中断して待機し、記憶用バッファにデータが所定量以上蓄積されたときに中断を解除して再度書込みを行なう、いわゆるバーンプルーフ機能が動作する(たとえば、特許文献1参照。)が、このパーンプルーフ機能が動作することによって、データ記録装置のファームウェアのパフォーマンスが低下していた。
特開2003−77131号公報
When such a phenomenon occurs, the buffer management means of the data recording processing device interrupts the writing to the recording medium and stands by, cancels the interruption when a predetermined amount or more of data is accumulated in the storage buffer, and again Although a so-called burn-proof function for performing writing is operated (see, for example, Patent Document 1), the performance of the firmware of the data recording apparatus has been lowered by the operation of the proof-proof function.
JP 2003-77131 A

上述のようなデータ記録処理装置においては、記録媒体に記録するデータがコンピュータ装置から送信されるデータだけではなく、サブコードデータやポーズデータなどデータ記録処理装置内で生成されるデータも別の記憶用バッファに蓄積された後に記録媒体に書き込まれる。   In the data recording processing apparatus as described above, not only the data to be recorded on the recording medium is transmitted from the computer apparatus, but also the data generated in the data recording processing apparatus such as subcode data and pause data is stored separately. After being stored in the buffer, it is written to the recording medium.

しかしながら、データ記録処理装置が、バッファに蓄積されるデータの残量を算出するにあたっては、コンピュータ装置から送信されるデータのバッファ残量のみに基づいて行っているため、データ処理記録処理装置で生成されるデータが考慮されていなかった。   However, since the data recording processing device calculates the remaining amount of data accumulated in the buffer based on only the remaining buffer amount of data transmitted from the computer device, it is generated by the data processing recording processing device. Data was not taken into account.

したがって、記録媒体に書き込まれるべきデータの残量を正確に検出することができず、バッファアンダーラン誤検出の問題が生じていた。   Therefore, the remaining amount of data to be written on the recording medium cannot be accurately detected, and a problem of erroneous detection of buffer underrun has occurred.

そして、この誤検出によって、必要のないパーンプルーフ機能が動作して、データ記録処理装置のファームウェアのパフォーマンスの低下を生じていた。   This erroneous detection causes an unnecessary perm proof function to operate, resulting in a decrease in the performance of the firmware of the data recording processing apparatus.

そこで、本発明は、正確なデータ残量を検出することによって、バッファアンダーラン誤検出のないデータ制御装置及びバッファデータの残量検出方法を提供することを目的とする。   SUMMARY OF THE INVENTION An object of the present invention is to provide a data control apparatus and a buffer data remaining amount detection method that are free from erroneous detection of buffer underrun by detecting an accurate remaining amount of data.

そこで、請求項1に係る本発明では、コンピュータ装置から送信されるデータをエリア単位で順次蓄積する第1のバッファと、記録媒体への記録処理内容に応じて生成されるデータをエリア単位で順次蓄積する第2のバッファとを有し、記録処理内容に応じて生成される複数のデータ処理コマンドに基づいて、この第1又は第2のバッファからエリア単位でデータを取り出し、記録媒体へ出力するデータ制御装置であって、第1のバッファに蓄積されているデータのエリア数を検出する第1の検出手段と、第2のバッファに蓄積されているデータのエリア数のうち、第1の検出手段で検出されたエリア数に基づいたエリア数を検出する第2の検出手段と、第1の検出手段で検出したエリア数と第2の検出手段で検出したエリア数とから、データの残量を検出する第3の検出手段とを有することとした。   Therefore, according to the first aspect of the present invention, the first buffer for sequentially storing data transmitted from the computer apparatus in units of areas, and the data generated in accordance with the recording processing contents to the recording medium are sequentially stored in units of areas. A second buffer for accumulating, taking out data from the first or second buffer in units of areas based on a plurality of data processing commands generated according to the contents of recording processing, and outputting the data to a recording medium A first control means for detecting the number of areas of data stored in the first buffer, and a first detection of the number of areas of data stored in the second buffer. From the second detection means for detecting the number of areas based on the number of areas detected by the means, the number of areas detected by the first detection means and the number of areas detected by the second detection means, the data It was to have a third detecting means for detecting the remaining amount.

また、請求項2に係る本発明では、請求項1に記載のデータ制御装置において、第2の検出手段におけるエリア数の検出は、第1の検出手段で検出されたエリア数のデータと共に連続して記録媒体へ出力できるデータのエリア数を検出するものであることとした。   According to a second aspect of the present invention, in the data control device according to the first aspect, the detection of the number of areas in the second detection means is continuously performed together with the data of the number of areas detected by the first detection means. Thus, the number of data areas that can be output to the recording medium is detected.

また、請求項3に係る本発明では、請求項1に記載のデータ制御装置において、第2の検出手段におけるエリア数の検出は、前記第2のバッファに対するデータ処理コマンドのうち、第1の検出手段で検出されたエリア数のデータをすべて記録手段へ出力するために必要なデータ処理コマンドを検出し、この検出したデータ処理コマンドで処理するデータのエリア数を検出するものであることとした。 According to a third aspect of the present invention, in the data control device according to the first aspect, the detection of the number of areas in the second detection means is a first detection among the data processing commands for the second buffer. it detects data processing commands required, and detects the number of area data to be processed by the detected data processing command for outputting the data number of the detected area by means to all the recording means It was.

また、請求項4に係る本発明では、請求項3に記載のデータ制御装置において、前記記録処理内容に応じて生成される複数のデータ処理コマンドは、それぞれ第1のバッファに対するものか第2のバッファに対するものかを識別する識別子フィールドと、処理すべきデータのエリア数を示す繰り返し数フィールドとを有し、前記第2の検出手段は、前記複数のデータ処理コマンドのうち前記識別子フィールドの情報により第2のバッファに対するデータ処理コマンドを検出し、この検出した第2のバッファに対するデータ処理コマンドのうち、前記第1の検出手段で検出されたエリア数のデータをすべて前記記録手段へ出力するために必要なデータ処理コマンドを検出し、この検出したデータ処理コマンドの繰り返し数フィールドに基づいて前記エリアの数の検出を行うこととした。 According to a fourth aspect of the present invention, in the data control device according to the third aspect, the plurality of data processing commands generated according to the recording processing contents are for the first buffer or the second buffer, respectively . an identifier field identifying whether those for the buffer, and a repetition number field indicating a number of area data to be processed, said second detection means, the information of the identifier field of the plurality of data processing commands In order to detect a data processing command for the second buffer and to output all the data of the number of areas detected by the first detecting means among the detected data processing commands for the second buffer to the recording means Detect the required data processing command and based on the number of repetitions field of the detected data processing command It was decided to carry out a number of detection of the serial area.

また、請求項5に係る本発明では、コンピュータ装置から送信されるデータをエリア単位で順次蓄積する第1のバッファと、記録媒体への記録処理内容に応じて生成されるデータをエリア単位で順次蓄積する第2のバッファとを有し、記録処理内容に応じて生成される複数のデータ処理コマンドに基づいて、この第1又は第2のバッファからエリア単位でデータを取り出し、記録媒体へ出力する装置のバッファデータの残量検出方法であって、第1のバッファに蓄積されているデータのエリア数を検出する第1の工程と、第2のバッファに蓄積されているデータのエリア数のうち、第1の工程で検出されたエリア数に基づいたエリア数を検出する第2の工程と、第1の工程で検出したエリア数と前記第2の工程で検出したエリア数とから、データの残量を検出する第3の工程とを有することとした。   Further, in the present invention according to claim 5, the first buffer for sequentially storing data transmitted from the computer apparatus in units of areas, and the data generated in accordance with the recording processing contents on the recording medium are sequentially stored in units of areas. A second buffer for accumulating, taking out data from the first or second buffer in units of areas based on a plurality of data processing commands generated according to the contents of recording processing, and outputting the data to a recording medium A method for detecting a remaining amount of buffer data in a device, wherein a first step of detecting the number of areas of data stored in a first buffer and a number of areas of data stored in a second buffer From the second step of detecting the number of areas based on the number of areas detected in the first step, the number of areas detected in the first step, and the number of areas detected in the second step, It was to have a third step of detecting the remaining amount of data.

請求項1に係る本発明では、コンピュータ装置から送信されるデータをエリア単位で順次蓄積する第1のバッファと、記録媒体への記録処理内容に応じて生成されるデータをエリア単位で順次蓄積する第2のバッファとを有し、記録処理内容に応じて生成される複数のデータ処理コマンドに基づいて、この第1又は第2のバッファからエリア単位でデータを取り出し、記録媒体へ出力するデータ制御装置であって、第1のバッファに蓄積されているデータのエリア数を検出する第1の検出手段と、第2のバッファに蓄積されているデータのエリア数のうち、第1の検出手段で検出されたエリア数に基づいたエリア数を検出する第2の検出手段と、第1の検出手段で検出したエリア数と第2の検出手段で検出したエリア数とから、データの残量を検出する第3の検出手段とを有することとしたので、現に実行できるデータ制御装置のバッファの未処理データのエリア数を正確に検出することができるから、バッファアンダーランの誤検出によるパフォーマンスの悪化を防ぐことができる。   According to the first aspect of the present invention, the first buffer for sequentially storing data transmitted from the computer apparatus in units of areas, and the data generated in accordance with the contents of recording processing on the recording medium are sequentially stored in units of areas. A data control unit that has a second buffer, extracts data in units of areas from the first or second buffer based on a plurality of data processing commands generated according to the recording processing content, and outputs the data to a recording medium The first detection means for detecting the number of areas of data stored in the first buffer and the first detection means among the number of areas of data stored in the second buffer. The remaining amount of data from the second detection means for detecting the number of areas based on the detected number of areas, the number of areas detected by the first detection means and the number of areas detected by the second detection means Since the number of areas of unprocessed data in the buffer of the data control apparatus that can be actually executed can be accurately detected, performance deterioration due to erroneous detection of buffer underrun can be achieved. Can be prevented.

また、請求項2に係る本発明では、第2の検出手段におけるエリア数の検出は、第1の検出手段で検出されたエリア数のデータと共に連続して記録媒体へ出力できるデータのエリア数を検出することとしたので、容易にデータ残量を検出することができる。   In the present invention according to claim 2, the number of areas detected by the second detecting means is the number of areas of data that can be continuously output to the recording medium together with the number of areas detected by the first detecting means. Since it is detected, the remaining amount of data can be easily detected.

また、請求項3に係る本発明では、第2の検出手段におけるエリア数の検出は、第2のバッファに対するデータ処理コマンドのうち、第1の検出手段で検出されたエリア数のデータをすべて記録手段へ出力するために必要なデータ処理コマンドを検出し、この検出したデータ処理コマンドで処理するデータのエリア数を検出するものとしたので、データ処理コマンドに基づいて容易にデータ残量を検出することができる。 According to the third aspect of the present invention, the detection of the number of areas in the second detection means records all the data of the number of areas detected by the first detection means among the data processing commands for the second buffer. It detects data processing commands required to output to the unit, since it is assumed to detect the number of area data to be processed by the detected data processing command, easily remaining data amount based on the data processing command Can be detected.

また、請求項4に係る本発明では、前記記録処理内容に応じて生成される複数のデータ処理コマンドは、それぞれ第1のバッファに対するものか第2のバッファに対するものかを識別する識別子フィールドと、処理すべきデータのエリア数を示す繰り返し数フィールドとを有し、前記第2の検出手段は、前記複数のデータ処理コマンドのうち前記識別子フィールドの情報により第2のバッファに対するデータ処理コマンドを検出し、この検出した第2のバッファに対するデータ処理コマンドのうち、前記第1の検出手段で検出されたエリア数のデータをすべて前記記録手段へ出力するために必要なデータ処理コマンドを検出し、この検出したデータ処理コマンドの繰り返し数フィールドに基づいて前記エリアの数の検出を行うこととしたので、データ処理コマンドに繰り返し数フィールドを設けたため、同じ制御コマンドを複数回実行する場合であっても、データ処理コマンドをデータ処理コマンド用のメモリに複数回書き込む必要がなくなり、書き込み処理のパフォーマンスの向上を図ることができると共に、データ処理コマンド用のメモリ容量も削減することができる。 Further, in the present invention according to claim 4, an identifier field for identifying whether the plurality of data processing commands generated according to the recording processing contents are for the first buffer or the second buffer, A repetition number field indicating the number of areas of data to be processed, wherein the second detection means detects a data processing command for the second buffer based on information in the identifier field among the plurality of data processing commands. Among the detected data processing commands for the second buffer, a data processing command necessary for outputting all the data of the number of areas detected by the first detecting means to the recording means is detected, and this detection is performed. since it was possible to detect the number of the areas based on the repetition number field of the data processing command Because the data processing command has a repeat count field, even if the same control command is executed multiple times, it is no longer necessary to write the data processing command to the memory for the data processing command multiple times, improving the performance of the write processing. In addition, the memory capacity for data processing commands can be reduced.

しかも、データ処理コマンドに識別子フィールドを設けたため、データ処理コマンドが第1のバッファのデータを処理するものか、第2のバッファのデータを処理するのかを識別するのが容易となる。   In addition, since the identifier field is provided in the data processing command, it becomes easy to identify whether the data processing command processes the data in the first buffer or the data in the second buffer.

また、請求項5に係る本発明では、コンピュータ装置から送信されるデータをエリア単位で順次蓄積する第1のバッファと、記録媒体への記録処理内容に応じて生成されるデータをエリア単位で順次蓄積する第2のバッファとを有し、記録処理内容に応じて生成される複数のデータ処理コマンドに基づいて、この第1又は第2のバッファからエリア単位でデータを取り出し、記録媒体へ出力する装置のバッファデータの残量検出方法であって、第1のバッファに蓄積されているデータのエリア数を検出する第1の工程と、第2のバッファに蓄積されているデータのエリア数のうち、第1の工程で検出されたエリア数に基づいたエリア数を検出する第2の工程と、第1の工程で検出したエリア数と前記第2の工程で検出したエリア数とから、データの残量を検出する第3の工程とを有することとしたので、現に実行できるバッファの未処理データのエリア数を正確に検出することができるから、バッファアンダーランの誤検出によるパフォーマンスの悪化を防ぐことができる。   Further, in the present invention according to claim 5, the first buffer for sequentially storing data transmitted from the computer apparatus in units of areas, and the data generated in accordance with the recording processing contents on the recording medium are sequentially stored in units of areas. A second buffer for accumulating, taking out data from the first or second buffer in units of areas based on a plurality of data processing commands generated according to the contents of recording processing, and outputting the data to a recording medium A method for detecting a remaining amount of buffer data in a device, wherein a first step of detecting the number of areas of data stored in a first buffer and a number of areas of data stored in a second buffer From the second step of detecting the number of areas based on the number of areas detected in the first step, the number of areas detected in the first step, and the number of areas detected in the second step, And the third step of detecting the remaining amount of data, it is possible to accurately detect the number of unprocessed data areas of the buffer that can be actually executed. Can be prevented.

以下に、本発明の実施の形態におけるデータ制御装置について図面を参照しながら具体的に説明する。   Hereinafter, a data control apparatus according to an embodiment of the present invention will be specifically described with reference to the drawings.

図1は、本発明の実施の形態におけるデータ制御装置を示す図である。   FIG. 1 is a diagram showing a data control apparatus according to an embodiment of the present invention.

なお、このデータ制御装置は、外部コンピュータ装置(以下、「ホスト」とする。)とCDやDVDなどの光ディスクなどの記録媒体との間に接続されるものであり、ホストからのデータ及び記録媒体への記録内容に従って生成したデータを一時的にバッファに蓄積した後、記録媒体への記録内容に従って、バッファからデータを取り出して、エンコーダを介し、記録媒体へ送信する装置である。   This data control device is connected between an external computer device (hereinafter referred to as “host”) and a recording medium such as an optical disk such as a CD or a DVD. After temporarily generating data generated according to the recording content in the buffer, the data is extracted from the buffer according to the recording content on the recording medium and transmitted to the recording medium via the encoder.

図1において、データ制御装置1は、データ記憶装置10、コマンド記憶装置20、データアクセス装置30、コマンドアクセス装置40、制御装置50、CPU60を有している。   In FIG. 1, the data control device 1 includes a data storage device 10, a command storage device 20, a data access device 30, a command access device 40, a control device 50, and a CPU 60.

データ記憶装置10は、ホストから送信されるデータをエリア単位で順次蓄積するための第1のバッファであるメインリングバッファ(以下、「WMRB」とする。)と、記録媒体への記録処理内容に従って後述のCPU60で生成されるデータをエリア単位で順次蓄積するための第2のバッファであるサブリングバッファ(以下、「WSRB」とする。)及びリニアバッファ(以下、「WLB」とする。)とを有している。ここで、WSRBやWLBなどの第2のバッファをWMRB外バッファと称す。   The data storage device 10 is in accordance with a main ring buffer (hereinafter referred to as “WMRB”) that is a first buffer for sequentially storing data transmitted from the host in area units, and according to the content of recording processing on the recording medium. A sub-ring buffer (hereinafter referred to as “WSRB”) and a linear buffer (hereinafter referred to as “WLB”), which are second buffers for sequentially storing data generated by a CPU 60 to be described later in area units. have. Here, the second buffer such as WSRB or WLB is referred to as a WMRB outside buffer.

なお、記録媒体への記録処理内容に従って生成されるデータとして、サブコードデータやポーズデータなどがある。   Note that data generated according to the content of recording processing on a recording medium includes subcode data and pause data.

また、第2のバッファは、2つに限られず、又一つであってもよい。   Further, the number of second buffers is not limited to two and may be one.

また、データ記憶装置10としてSDRAMが使用されるが、これに限られない。   Further, although SDRAM is used as the data storage device 10, it is not limited to this.

また、各エリアには、それぞれ一定容量のデータが蓄積可能である。   Each area can store a certain amount of data.

コマンド記憶装置20は、データ記憶装置10の各バッファにエリア単位で記憶されているデータを処理するために用いられるデータ処理コマンドと、そのデータ処理コマンドを利用してデータ残量を算出するコマンド制御装置21とを有している。   The command storage device 20 includes a data processing command used for processing data stored in each buffer in each buffer of the data storage device 10 and command control for calculating the remaining data using the data processing command. Device 21.

なお、コマンド記憶装置20は、システム要求、コスト、処理の複雑さに応じて、フリップフロップ、SRAM、SDRAMなどの記憶素子を使用することができる。   Note that the command storage device 20 can use storage elements such as flip-flops, SRAMs, and SDRAMs in accordance with system requirements, costs, and processing complexity.

また、データ処理コマンドは、図2に示すように、WMRB識別フィールド、繰り返し数フィールド、ポインタ制御フィールド、データ制御フィールドから構成される。   Further, as shown in FIG. 2, the data processing command includes a WMRB identification field, a repetition number field, a pointer control field, and a data control field.

WMRB識別子フィールドには、そのデータ処理コマンドが、WMRBに対するものである場合には「1」の値が、WMRB以外バッファに対するものである場合には「0」の値が設定される。   In the WMRB identifier field, a value of “1” is set when the data processing command is for WMRB, and a value of “0” is set when the command is for a buffer other than WMRB.

繰り返し数フィールドには、そのデータ処理コマンドによって同一バッファ上のデータに対する処理を繰り返す回数が設定される。このフィールドが設けられることによって、CPU60は、同一のデータ処理内容のコマンドをコマンド記憶装置20へ書き込む必要がなくなり、CPU負荷の低減と共にコマンド記憶装置20のメモリエリアの低減が可能となる。   In the repeat number field, the number of times the process for data on the same buffer is repeated by the data processing command is set. The provision of this field eliminates the need for the CPU 60 to write commands having the same data processing contents to the command storage device 20, thereby reducing the CPU load and the memory area of the command storage device 20.

なお、データ処理コマンドの繰り返し数フィールドに0が指定されている場合、書き込み終了を意味する。   If 0 is specified in the number of repetitions field of the data processing command, this means the end of writing.

ポインタ制御フィールドは、各バッファの次に読み出すべきデータの位置を示すリードポインタ(以下、「PFMTポインタ」とする。)を制御するコマンドである。   The pointer control field is a command for controlling a read pointer (hereinafter referred to as “PFMT pointer”) indicating the position of data to be read next in each buffer.

すなわち、ポインタ制御フィールドは、そのデータ処理コマンドにおける後述のデータ制御コマンドによってバッファのデータが処理された後、PFMTポインタをどのように制御するかが設定されている。そして、その設定内容に従って、PFMTポインタをインクリメントし、又PFMTポインタを指定エリアに移動させる等の制御が行われる。   That is, in the pointer control field, how to control the PFMT pointer after the buffer data is processed by a data control command described later in the data processing command is set. Then, control such as incrementing the PFMT pointer and moving the PFMT pointer to the designated area is performed in accordance with the set contents.

また、繰り返しフィールドにて、繰り返し回数が2以上設定されている場合、最後の繰り返し前までは、PFMTポインタのインクリメントし、最後の繰り返しのときにPFMTポインタを指定エリアに移動させるようにポインタ制御フィールドを設定できる。   If the number of repetitions is set to 2 or more in the repeat field, the pointer control field increments the PFMT pointer until the last repetition and moves the PFMT pointer to the designated area at the last repetition. Can be set.

さらに、データ処理コマンドでWMRB以外のバッファの処理を行うときに、バッファの一つのエリアを繰り返し処理するために、PFMTポインタを移動させないようにポインタ制御フィールドを設定できる。   Further, when processing a buffer other than WMRB with a data processing command, a pointer control field can be set so as not to move the PFMT pointer in order to repeatedly process one area of the buffer.

なお、WMRBには、未使用位置の先頭位置を示すライトポインタ(以下、「PHSTポインタ」とする。)があり、PFMTポインタと共に後述のバッファ制御装置52で管理される。参考として、WMRBのエリア4〜6にデータが蓄積されている場合のPHSTポインタとPFMTポインタの例を図3に示す。このPHSTポインタとPFMTポインタの差分がWMRBに蓄積されているデータのエリア数となり、図3の場合は、エリア数3となる。   The WMRB has a write pointer (hereinafter referred to as “PHST pointer”) indicating the head position of the unused position, and is managed by the buffer controller 52 described later together with the PFMT pointer. As a reference, FIG. 3 shows an example of a PHST pointer and a PFMT pointer when data is accumulated in areas 4 to 6 of the WMRB. The difference between the PHST pointer and the PFMT pointer is the number of areas of data stored in the WMRB, and in the case of FIG.

データ制御フィールドには、データ記憶装置10に蓄積されているエリア単位の各データをどのようにフォーマット処理するかが設定される。   In the data control field, it is set how to format each piece of data stored in the data storage device 10 in units of areas.

このフォーマット処理内容は、記録媒体のフォーマットに従ったデータ生成に関するものである。たとえば、CD(Compact disc)の場合、記録時にSYNC(同期信号)を生成する、HEADERを生成するなどである。   The contents of the format processing relate to data generation according to the format of the recording medium. For example, in the case of a CD (Compact Disc), SYNC (synchronization signal) is generated at the time of recording, HEADER is generated, and the like.

ここで、コマンド記憶装置20は、コマンド制御装置21を有している。このコマンド制御装置21は、コマンド記憶装置20に書き込まれたデータ処理コマンドのWMRB識別子フィールド、繰り返し回数フィールドとから、図7のようなデータ残量表を生成する。   Here, the command storage device 20 has a command control device 21. The command control device 21 generates a data remaining amount table as shown in FIG. 7 from the WMRB identifier field and the repetition count field of the data processing command written in the command storage device 20.

なお、データ残量表は、図7のように、1行ごとに、WMRBに関する一つのデータ処理コマンドが処理するWMRBのエリア数(以下、「WMRBデータ残量」とする。)と、WMRB外バッファに関する一つのデータ処理コマンドが処理するWMRB外バッファのエリア数(以下、「WMRB外データ残量」とする。)とが実行される順に配列される。   In the data remaining amount table, as shown in FIG. 7, the number of WMRB areas (hereinafter referred to as “WMRB data remaining amount”) processed by one data processing command related to WMRB for each row and outside the WMRB. The number of areas outside the WMRB buffer to be processed by one data processing command relating to the buffer (hereinafter referred to as “outside WMRB data remaining amount”) is arranged in the order of execution.

なお、コマンド制御装置21は、データ処理コマンドがWMRBに対するものなのか、WMRB外バッファに対するものなのかを、そのデータ処理コマンドのWMRB識別フィールドの値から検出すると共に、一つのデータ処理コマンドが処理するバッファのエリア数は、そのデータ処理コマンドの繰り返し数フィールドの値から検出する。   The command control device 21 detects whether the data processing command is for the WMRB or the buffer outside the WMRB from the value of the WMRB identification field of the data processing command, and one data processing command processes it. The number of buffer areas is detected from the value of the repetition number field of the data processing command.

データアクセス装置30は、制御装置50やCPU60からの命令により、データ記憶装置10へアクセスして、データ記憶装置10の各データの書き込みや読み出しを行う。   The data access device 30 accesses the data storage device 10 according to an instruction from the control device 50 or the CPU 60 and writes or reads each data in the data storage device 10.

データ記憶装置10へのアクセスは、WMRB、WMRB外のいずれかを示すバッファ種別と、バッファのエリア番号と、バッファへの書き込み(以下、「ライトアクセス」とする。)か、バッファからの読み込み(以下、「リードアクセス」とする。)かを示す判別信号とによって行う。   Access to the data storage device 10 may be either a buffer type indicating either WMRB or outside the WMRB, a buffer area number, writing to the buffer (hereinafter referred to as “write access”), or reading from the buffer ( Hereinafter, it is referred to as “read access”).

なお、各エリアのデータにフィールドを設ける場合には、データ記憶装置10へのアクセスする信号に、フィールド識別信号を追加することによって行う。   In addition, when providing a field in the data of each area, it carries out by adding a field identification signal to the signal which accesses the data storage device 10. FIG.

コマンドアクセス装置40は、制御装置50やCPUからの命令により、コマンド記憶装置20に蓄積されているコマンドの読み出し、コマンド記憶装置20へのコマンドの書き込み、WMRB残量、WMRB外残量などのデータの読み出しを行う。   The command access device 40 reads data stored in the command storage device 20, writes commands to the command storage device 20, remaining WMRB, remaining outside WMRB, etc., according to instructions from the control device 50 or CPU. Is read out.

コマンド記憶装置20からのコマンド読み出しは、制御装置50によって、読み出したいコマンドのエリア番号が指定されることによって行われる。すなわち、制御装置50からコマンドのエリア番号が指定されると、コマンドアクセス装置40は、コマンド記憶装置20に蓄積されているコマンドから指定されたエリア番号のコマンドを読み出し、読み出したコマンドを制御装置50へ転送する。   Command reading from the command storage device 20 is performed by the control device 50 specifying the area number of the command to be read. That is, when an area number of a command is specified from the control device 50, the command access device 40 reads out the command of the specified area number from the commands stored in the command storage device 20, and reads the read command to the control device 50. Forward to.

さらに、フィールドを指定することによって、コマンド記憶装置20からコマンドの一部のフィールドのみを取り出すことも可能である。すなわち、制御装置50からエリア番号とフィールドが指定されると、コマンドアクセス装置40は、指定されたエリア番号のコマンドから指定されたフィールドの値をコマンド記憶装置20から取り出し、制御装置50へ転送する。   Furthermore, it is possible to extract only a part of the command field from the command storage device 20 by designating the field. That is, when an area number and a field are specified from the control device 50, the command access device 40 retrieves the value of the specified field from the command of the specified area number from the command storage device 20 and transfers it to the control device 50. .

また、コマンドアクセス装置40は、制御装置50からWMRB残量、WMRB外残量の読み出し命令を受信すると、後述のPCMDポインタ位置のWMRB残量とWMRB外残量をコマンド記憶装置20から読み出し、制御装置50へ転送する。   When the command access device 40 receives a command for reading the remaining WMRB and the remaining amount outside the WMRB from the control device 50, the command access device 40 reads the remaining WMRB and the remaining amount outside the WMRB at the PCMD pointer position described later from the command storage device 20, and performs control. Transfer to device 50.

一方、コマンド記憶装置20へのコマンドの書き込みは、記録媒体へ記録内容に従ってCPU60が生成した複数のデータ処理コマンドを、CPU60がそれぞれエリア番号を指定し、その指定を受けて、コマンドアクセス装置40が、コマンド記憶装置20へ書き込むことによって行う。   On the other hand, the command is written to the command storage device 20 by the CPU 60 designating a plurality of data processing commands generated by the CPU 60 in accordance with the recording contents on the recording medium. , By writing to the command storage device 20.

このデータ処理コマンドの書き込みが終了すると、コマンド記憶装置20内のコマンド制御装置21は、WMRB残量とWMRB外残量を算出する。   When the writing of the data processing command is completed, the command control device 21 in the command storage device 20 calculates the WMRB remaining amount and the WMRB remaining amount.

制御装置50は、その内部に、データ処理装置51、バッファ制御装置52、バッファアンダーラン管理装置53を有している。   The control device 50 includes therein a data processing device 51, a buffer control device 52, and a buffer underrun management device 53.

データ処理装置51は、データ記憶装置10から取り出されたエリア単位のデータを、データ処理コマンドのデータ制御フィールドの情報に従ってフォーマット処理する機能を有する。   The data processing device 51 has a function of processing the area unit data retrieved from the data storage device 10 according to the information in the data control field of the data processing command.

バッファ制御装置52は、ポインタの管理、コマンドの管理、データ残量の管理など機能を有しており、その詳細は後述する。   The buffer control device 52 has functions such as management of pointers, management of commands, and management of remaining data, details of which will be described later.

たとえば、バッファ制御装置52は、コマンド制御装置21からWMRBデータ残量及びWMRB外データ残量を読み出すことができ、さらにデータ残量表のどの行までデータ残量を参照したかを示すPCMDポインタを管理する。   For example, the buffer control device 52 can read the remaining WMRB data and the remaining WMRB data from the command control device 21, and further displays a PCMD pointer indicating to which line in the remaining data table the remaining data has been referenced. to manage.

バッファアンダーラン管理装置53は、バッファ制御装置52からデータ残量を受信し、そのデータ残量がCPU60によって予め設定された値以下になったとき、バッファアンダーラン処理動作を行う。   The buffer underrun management device 53 receives the remaining data amount from the buffer control device 52, and performs a buffer underrun processing operation when the remaining data amount becomes equal to or less than a value preset by the CPU 60.

なお、バッファアンダーラン処理動作としては、バーンプルーフ機能動作などがある。   The buffer underrun processing operation includes a burn-proof function operation.

CPU60は、その内部のプログラム(以下、「ファームウェア」とする。)にしたがって、各装置の初期設定や起動を行ったり、バッファアンダーラン処理動作などの割り込みに応じた処理を行う。さらに、CPU60は、データアクセス装置30を介してデータ記憶装置10へアクセスしたり、コマンドアクセス装置40を介してコマンド記憶装置20へアクセスしたりする。   The CPU 60 performs initial setting and activation of each device according to its internal program (hereinafter referred to as “firmware”), and processing according to an interrupt such as a buffer underrun processing operation. Further, the CPU 60 accesses the data storage device 10 via the data access device 30 or accesses the command storage device 20 via the command access device 40.

以上のように構成されたデータ制御装置1の動作につき、図4、5のフローチャートを参照しながら説明する。   The operation of the data control apparatus 1 configured as described above will be described with reference to the flowcharts of FIGS.

なお、S1〜S4及びS9は、データ制御装置1のファームウェアでの処理とし、S5〜8及びS10〜S23は、データ制御装置1のハードウェアでの処理としている。   Note that S1 to S4 and S9 are processes in the firmware of the data control apparatus 1, and S5 to 8 and S10 to S23 are processes in the hardware of the data control apparatus 1.

まず、CPU60はデータ制御装置1全体の初期化を行う。すなわち、データ記憶装置10、コマンド記憶装置20、データアクセス装置30、コマンドアクセス装置40、制御装置50へリセット信号を出力することによって、これらの各装置を初期化する。   First, the CPU 60 initializes the entire data control device 1. That is, by outputting a reset signal to the data storage device 10, the command storage device 20, the data access device 30, the command access device 40, and the control device 50, each of these devices is initialized.

さらに、CPU60は、PFMT、PHST、PCMDなどのポインタや、REMARA、HSTCNT、TMPA、TMPBなどのレジスタを初期値、すなわち、「0」に設定する(S1)。   Further, the CPU 60 sets pointers such as PFMT, PHST, and PCMD and registers such as REMARA, HSTCNT, TMPA, and TMPB to initial values, that is, “0” (S1).

ここで、PCMDポインタとは、制御装置50の、データ残量表のうち、未参照のWMRB残量及びWMRB外残量位置を示すポインタである。   Here, the PCMD pointer is a pointer indicating the unreferenced WMRB remaining amount and the WMRB remaining amount position in the data remaining amount table of the control device 50.

また、REMARAは、データ記憶装置10に蓄積され、現に処理可能なデータのエリア数を示すレジスタである。すなわち、ホストからWMRBへのデータ転送がなくても、記録媒体への出力が可能なデータのエリア数である。   REMARA is a register indicating the number of areas of data that can be stored in the data storage device 10 and can be processed. That is, the number of data areas that can be output to a recording medium without data transfer from the host to the WMRB.

また、TMPAは、WMRBに関し次に処理するデータ処理コマンドのWMRBのデータエリアの処理回数を示すレジスタであり、TMPBは、WMRB外バッファに関し、次に処理するデータ処理コマンドのWMRB外バッファのデータエリアの処理回数を示すレジスタである。   TMPA is a register indicating the number of times of processing of the WMRB data area of the data processing command to be processed next with respect to WMRB, and TMPB is a data area of the WMRB external buffer of the data processing command to be processed next with respect to the WMRB external buffer. It is a register indicating the number of times of processing.

また、HSTCNTは、ホストから転送されたデータをWMRBにエリア単位で蓄積したそのエリア数を示すレジスタである。   HSTCNT is a register indicating the number of areas in which data transferred from the host is accumulated in the WMRB in units of areas.

次に、CPU60は、記録媒体へ記録内容に従って複数のデータ処理コマンドを生成し、コマンドアクセス装置40を介して、これらのデータ処理コマンドをコマンド記憶装置20へ書き込む。   Next, the CPU 60 generates a plurality of data processing commands according to the contents recorded on the recording medium, and writes these data processing commands to the command storage device 20 via the command access device 40.

コマンド制御装置21は、このデータ処理コマンドに基づいて、コマンド記憶装置20に書き込まれたデータ処理コマンドのWMRB識別子フィールド、繰り返し回数フィールドとから、図7のようなデータ残量表を生成する。   Based on the data processing command, the command control device 21 generates a data remaining amount table as shown in FIG. 7 from the WMRB identifier field and the repetition count field of the data processing command written in the command storage device 20.

また、CPU60は、記録媒体へ記録する内容に応じたWSRB及びWLBのデータを生成し、データアクセス装置30を介して、生成したデータをデータ記憶装置10のWSRBやWLBへ蓄積する(S2)。   Further, the CPU 60 generates WSRB and WLB data corresponding to the content to be recorded on the recording medium, and accumulates the generated data in the WSRB and WLB of the data storage device 10 via the data access device 30 (S2).

次に、CPU60は、データ記憶装置10の各バッファに対して、PHSTポインタ及びPFMTポインタを設定する(S3)。この時点では、各バッファに蓄積されるデータの処理がまったく行われていないため、PHSTポインタとPFMTポインタは同じ値になる。   Next, the CPU 60 sets a PHST pointer and a PFMT pointer for each buffer of the data storage device 10 (S3). At this time, since the data stored in each buffer is not processed at all, the PHST pointer and the PFMT pointer have the same value.

S3までの処理が終わった時点で、CPU60は、INIT命令を実行する(S4)。ここで、INIT命令とは、WMRB残量、WMRB外残量の読み込みと、REMARAの初期値の設定を行うコマンドである。   When the processing up to S3 is completed, the CPU 60 executes the INIT command (S4). Here, the INIT command is a command for reading the remaining WMRB and the remaining WMRB and setting the initial value of REMARA.

次に、S5〜8では、INIT命令に応じたデータ制御装置のハードウェアの動作が行われる。   Next, in S5-8, the hardware operation of the data control device is performed in accordance with the INIT command.

すなわち、バッファ制御装置52は、コマンドアクセス装置40を介して、PCMDポインタ位置にあるWMRB残量とWMRB外残量の読み込みを行うと共に、PCMDポインタのインクリメントし(S5)、読み込んだWMRB残量とWMRB外残量とをそれぞれTMPAとTMPBに設定する(S6)。   That is, the buffer control device 52 reads the remaining WMRB and the remaining WMRB remaining at the PCMD pointer position via the command access device 40, and increments the PCMD pointer (S5). The remaining amount outside WMRB is set to TMPA and TMPB, respectively (S6).

次に、バッファ制御装置52は、TMPAの値が0であるかどうかを判定する(S7)。すなわち、バッファ制御装置52は、S5で読み込まれたWMRB残量が0であるかどうかを判定する。そして、WMRB残量が0であると判定すると、REMARAにTMPBの値を加算した後(S8)、バッファ制御装置52は、再度S4からの動作を繰り返し、一方、WMRB残量が0でないと判定すると、初期設定を完了し、CPU60は、各装置を動作させて、ホストからのデータ転送やフォーマット処理をスタートさせる(S9)。なお、ホストからのデータ転送やフォーマット処理の起動は、必ずしも同時に起動する必要はない。   Next, the buffer control device 52 determines whether or not the value of TMPA is 0 (S7). That is, the buffer control device 52 determines whether or not the remaining amount of WMRB read in S5 is zero. If it is determined that the remaining WMRB is 0, after adding the value of TMPB to REMARA (S8), the buffer control device 52 repeats the operation from S4 again, while determining that the remaining WMRB is not 0. Then, initialization is completed, and the CPU 60 operates each device to start data transfer from the host and format processing (S9). Note that the data transfer from the host and the start of the format process do not necessarily have to be started at the same time.

以後、ホストからのデータ転送やフォーマット処理状況に合わせて、データ残量やポインタが更新される(S10〜S23)。   Thereafter, the remaining amount of data and the pointer are updated in accordance with the data transfer from the host and the format processing status (S10 to S23).

まず、制御装置50は、処理すべき内容がホストからのデータ転送であるか否かを判定する(S10)。   First, the control device 50 determines whether or not the content to be processed is data transfer from the host (S10).

そして、制御装置50が、処理すべき内容がホストからのデータ転送であると判定すると、バッファ制御装置52は、データアクセス装置30を介して、ホストから受信した1エリア分のデータを、データ記憶装置10のWMRBへ蓄積してPHSTポインタを1エリア分更新する(S11)。   When the control device 50 determines that the content to be processed is data transfer from the host, the buffer control device 52 stores the data for one area received from the host via the data access device 30 as data storage. The PHST pointer is updated for one area by accumulating in the WMRB of the apparatus 10 (S11).

次に、バッファ制御装置52は、HSTCNTをインクリメントし(S12)、HSTCNTがTMPAと同じ値になっているかどうかを判定する(S13)。HSTCNTがTMPAと同じ値になっていると判定すると、次に処理されるべきWMRB外のデータ処理コマンドの実行が確定する。すなわち、WMRBに蓄積されているデータと共に連続して記録媒体へ出力可能なデータとなるため、バッファ制御装置52は、REMARAの値に、TMPBの値を加算した上で、インクリメントする(S14)。   Next, the buffer control device 52 increments HSTCNT (S12), and determines whether HSTCNT has the same value as TMPA (S13). If it is determined that HSTCNT has the same value as TMPA, execution of a data processing command outside the WMRB to be processed next is determined. That is, since it becomes data that can be continuously output to the recording medium together with the data accumulated in the WMRB, the buffer control device 52 adds the value of TMPB to the value of REMARA and increments it (S14).

次に、バッファ制御装置52は、PCMDポインタの位置のWMRBデータ残量とWMRB外データ残量とを読み込むと共に、PCMDポインタをインクリメントする(S15)。   Next, the buffer control device 52 reads the WMRB data remaining amount and the WMRB remaining data amount at the position of the PCMD pointer, and increments the PCMD pointer (S15).

そして、バッファ制御装置52は、読み込んだWMRBデータ残量とWMRB外データ残量とをそれぞれTMPA及びTMPBに設定する(S16)。   Then, the buffer control device 52 sets the read WMRB data remaining amount and the WMRB remaining data remaining amount to TMPA and TMPB, respectively (S16).

さらに、バッファ制御装置52は、HSTNCTを0に設定して、S10からの動作を繰り返す(S17)。   Further, the buffer control device 52 sets HSTNCT to 0 and repeats the operation from S10 (S17).

一方、S13で、バッファ制御装置52は、HSTCNTがTMPAと同じ値になっていないと判定すると、REMARAをインクリメントして、S10からの動作を繰り返す(S18)。   On the other hand, if the buffer controller 52 determines in step S13 that HSTCNT is not the same value as TMPA, REMARA is incremented and the operation from step S10 is repeated (step S18).

また、制御装置50は、処理すべき内容がデータ記憶装置10に記録されたデータのフォーマット処理であるか否かを判定する(S19)。   Further, the control device 50 determines whether or not the content to be processed is the format processing of the data recorded in the data storage device 10 (S19).

そして、処理すべき内容がフォーマット処理であると判定すると、バッファ制御装置52は、データアクセス装置30を介して、PFMT位置にある1エリア分のデータを、データ記憶装置10から取り出し、PFMTを更新する。そして、取り出されたデータは、データ処理コマンドのデータ制御フィールドの内容に従って、データ処理装置51でフォーマット処理され、エンコーダ経由で記録媒体へ送信される(S20)。   When it is determined that the content to be processed is format processing, the buffer control device 52 retrieves data for one area at the PFMT position from the data storage device 10 via the data access device 30, and updates the PFMT. To do. The extracted data is formatted by the data processing device 51 according to the contents of the data control field of the data processing command, and transmitted to the recording medium via the encoder (S20).

次に、バッファ制御装置52は、REMARAをデクリメントし(S21)、次のデータ処理コマンドが終了コマンドか否かを判定する(S22)。   Next, the buffer control device 52 decrements REMARA (S21), and determines whether or not the next data processing command is an end command (S22).

S22で、次のコマンドが終了コマンドであると判定すると、制御装置50は、バッファ制御動作を終了し(S23)、終了コマンドでないと判定すると、S10からの動作を繰り返す。   If it is determined in S22 that the next command is an end command, the control device 50 ends the buffer control operation (S23). If it is determined not to be an end command, the control device 50 repeats the operation from S10.

以下に、上記図4、5のフローについて、CDのパケットライト動作を具体例にとり、図6〜図8も参照しながら説明する。ここで、図6は生成されたデータ処理コマンドの例を示す図、図7はデータ残量表の例を示す図、図8はデータ残量計算装置を示す図である。   In the following, the flow of FIGS. 4 and 5 will be described with reference to FIGS. Here, FIG. 6 is a diagram showing an example of the generated data processing command, FIG. 7 is a diagram showing an example of the remaining data table, and FIG. 8 is a diagram showing the remaining data calculation device.

ここで、データ残量計算装置は、主にコマンド記録装置20とバッファ制御装置52から構成される。   Here, the remaining data calculation device mainly includes a command recording device 20 and a buffer control device 52.

なお、CDのパケットライトとは、ホストから送信されるデータをパケット単位に分けて、パケット単位ごとにリンク用データを生成して付加する記録方法である。   Note that CD packet write is a recording method in which data transmitted from a host is divided into packet units, and link data is generated and added for each packet unit.

また、パケット単位データを16エリア分のWMRBデータと、リンク用データを7エリア分のWSRBデータとする。   The packet unit data is WMRB data for 16 areas, and the link data is WSRB data for 7 areas.

まず、S1にて初期リセットが終了すると、S2において、図6のようにデータ処理コマンドが生成され、コマンド記憶装置20に記憶される。なお、コマンドの処理は、データ処理コマンド0から順に行われる。また、バッファ制御装置52は、このデータ処理コマンドのWMRB識別子フィールド及び繰り返し数フィールドから、図7のようなデータ残量表を作成する。そして、S5〜S8において、WMRB残量が0でないPCMDポインタ位置のWMRB残量及びWMRB外残量、すなわちデータ残量表の下から2行目の位置のWMRB残量16(データ処理コマンド0の繰り返し数16)及びWMRB外残量7(データ処理コマンド1の繰り返し数7)とが読み出され、各々TMPAは16と、TMPBは7と設定されると共に、PCMDポインタは下から3行目の位置へインクリメントされる。   First, when the initial reset is completed in S1, a data processing command is generated and stored in the command storage device 20 in S2 as shown in FIG. Note that the command processing is performed in order from the data processing command 0. Further, the buffer control device 52 creates a data remaining amount table as shown in FIG. 7 from the WMRB identifier field and the repetition number field of this data processing command. In S5 to S8, the WMRB remaining amount at the PCMD pointer position where the WMRB remaining amount is not 0 and the remaining amount outside the WMRB, that is, the WMRB remaining amount 16 at the second row position from the bottom of the data remaining amount table (data processing command 0) The number of repetitions 16) and the remaining amount 7 outside the WMRB (the number of repetitions 7 of the data processing command 1) are read, TMPA is set to 16, TMPB is set to 7, and the PCMD pointer is set to the third line from the bottom. Incremented to position.

その後、ホストからのデータ転送を処理、すなわちWMRBバッファへ蓄積するとREMARAをインクリメントし(S18)、一方、データ記憶装置10の1エリア分のデータが記録媒体への記録のために取り出された後のフォーマット処理が終了するとREMARAをデクリメント(S21)して、WMRBのデータ残量をREMARAで検出する。   Thereafter, when the data transfer from the host is processed, that is, accumulated in the WMRB buffer, REMARA is incremented (S18). On the other hand, after one area of data in the data storage device 10 has been taken out for recording on the recording medium. When the formatting process ends, REMARA is decremented (S21), and the remaining WMRB data is detected by REMARA.

S13でホストからのデータ転送をTMPAと同数分処理すると、データ処理コマンド0で処理するWMRBの16エリア分のデータを受信したことになり、一方で、データ処理コマンド1で処理するWMRB外の7エリア分のデータはS2ですでに準備されているため、データ処理コマンド1までの処理が実行可能となる。したがって、S14でREMARAに次のデータ処理コマンド1で処理するWMRB外のデータエリア数7を加算する。   If the same number of data transfers from the host as TMPA are processed in S13, it means that data for 16 areas of WMRB to be processed by data processing command 0 has been received, while 7 outside the WMRB to be processed by data processing command 1 is received. Since data for the area has already been prepared in S2, processing up to the data processing command 1 can be executed. Therefore, the number of data areas outside the WMRB to be processed by the next data processing command 1 is added to REMARA in S14.

次に、PCMDポインタ位置のWMRB残量及びWMRB外残量、すなわちデータ残量表の下から3行目の位置のWMRB残量16(データ処理コマンド2の繰り返し数16)及びWMRB外残量7(データ処理コマンド3の繰り返し数7)とが読み出され、PCMDポインタは下から4行目の位置へインクリメントされると共に、S15で各々TMPAは16と、TMPBは7と設定される。   Next, the WMRB remaining amount and the WMRB remaining amount at the PCMD pointer position, that is, the WMRB remaining amount 16 (the number 16 of repetitions of the data processing command 2) and the remaining WMRB remaining amount 7 at the third row from the bottom of the data remaining amount table. (Repetition number 7 of data processing command 3) is read out, the PCMD pointer is incremented to the position of the fourth row from the bottom, and TMPA is set to 16 and TMPB is set to 7 in S15.

以降同様に、データ処理コマンド2で処理するデータエリア数のデータがホストから転送され、データ処理コマンド2の処理する16エリア分のデータがWMRBに蓄積されると、データ処理コマンド3の処理が確定し、実行可能となるため、REMARAへ7エリアを加算する。   Similarly, when data for the number of data areas to be processed by the data processing command 2 is transferred from the host and data for 16 areas to be processed by the data processing command 2 is accumulated in the WMRB, the processing of the data processing command 3 is confirmed. 7 areas are added to REMARA to enable execution.

このように、データ記憶装置10へのデータ蓄積を開始後、バッファ制御装置52は、WMRBに蓄積されているデータのエリア数を検出し、そのエリア数のデータを処理することができるデータ処理コマンドを検出する。そして、バッファ制御装置52は、WMRB外に蓄積されているデータのうち、WMRBに蓄積されているデータと共に連続して記録媒体へ出力できるデータのエリア数を検出する。より具体的には、WMBR外バッファに対するデータ処理コマンドのうち、WMRBに蓄積されているデータをすべて記録手段へ出力するために必要なデータ処理コマンドを検出し、このデータ処理コマンドで処理するデータのエリア数を検出する。そして、この検出したエリア数とWMRBに蓄積されているデータのエリア数と加算することによって、データ残量を算出する。 As described above, after starting data accumulation in the data storage device 10, the buffer control device 52 detects the number of areas of data accumulated in the WMRB and can process the data of the number of areas. Is detected. Then, the buffer control device 52 detects the number of data areas that can be continuously output to the recording medium together with the data stored in the WMRB out of the data stored outside the WMRB. More specifically, among the data processing command for WMBR out buffer, to detect the data processing commands required to output to all the recording means Lud over data accumulated in the WMRB, processing by the data processing command Detect the number of data areas. Then, the remaining data amount is calculated by adding the detected number of areas and the number of data areas accumulated in the WMRB.

すなわち、バッファ制御装置52は、第1のバッファに蓄積されているデータのエリア数を検出する手段と、第2のバッファに対するデータ処理コマンドのうち、第1の検出手段で検出されたエリア数のデータをすべて記録手段へ出力するために必要なデータ処理コマンドを検出し、この検出したデータ処理コマンドで処理するデータのエリア数を検出する手段と、これらの手段で検出したエリア数とから、データの残量を検出する第3の検出手段とを有しており、データ記憶装置10に蓄積されているデータのうち、ホストからWMRBへのデータ転送がなくても連続して処理できるデータ残量を算出することができる。 That is, the buffer controller 52 detects the number of areas detected by the first detection means among the means for detecting the number of areas of data stored in the first buffer and the data processing command for the second buffer. detects data processing commands required to output data to all the recording means, means for detecting a number of areas of the data to be processed by the detected data processing command, the number of areas detected by these means To the third detecting means for detecting the remaining amount of data, and the data stored in the data storage device 10 can be continuously processed without data transfer from the host to the WMRB. The remaining amount of data can be calculated.

次に、本発明の実施の形態におけるデータ制御装置のバッファアンダーラン処理の動作について、図9を参照しながら説明する。なお、初期動作(S30)、各装置起動(S31)の動作については、図4のS1〜S8及びS9の動作と同じであるため、説明を省略する。   Next, the operation of the buffer underrun process of the data control apparatus according to the embodiment of the present invention will be described with reference to FIG. Note that the operations of the initial operation (S30) and the activation of each device (S31) are the same as the operations of S1 to S8 and S9 in FIG.

初期動作及び各装置の起動が終了すると、記録内容に応じた処理が全て終了するまで(S32)、処理できるデータのバッファ残量が所定以下、すなわちバッファアンダーランの状態であるかをREMARAのレジスタから判定する(S33)。   When the initial operation and the activation of each device are completed, until the processing corresponding to the recorded contents is completed (S32), the REMARA register indicates whether or not the remaining buffer capacity of data that can be processed is less than a predetermined value, that is, the buffer underrun state. (S33).

そして、バッファアンダーランであると判定すると、バッファアンダーランに対応する処理を行う(S34)。   If it is determined that the buffer underrun has occurred, processing corresponding to the buffer underrun is performed (S34).

以上のように、本実施の形態におけるデータ処理装置によれば、現に実行できるデータ記憶装置の未処理データのエリア数を正確に検出することができるから、バッファアンダーランの誤検出を回避することができる。   As described above, according to the data processing device of the present embodiment, the number of areas of unprocessed data in the data storage device that can be actually executed can be accurately detected, so that erroneous detection of buffer underrun can be avoided. Can do.

したがって、不要なバッファアンダーラン対応処理を行うことによって、不要な処理によるパフォーマンスの悪化を防ぐことができる。   Therefore, by performing unnecessary buffer underrun handling processing, it is possible to prevent performance degradation due to unnecessary processing.

しかも、データ処理コマンドに繰り返し数フィールドを設けたため、同じ制御コマンドを複数回実行する場合であっても、データ処理コマンドをコマンド記憶装置に複数回書き込む必要がなくなり、書き込み処理のパフォーマンス向上を図ることができると共に、コマンド記憶装置のメモリ容量も削減することができる。   In addition, since the data processing command has a repetition number field, even when the same control command is executed multiple times, it is not necessary to write the data processing command to the command storage device multiple times, thereby improving the performance of the write processing. And the memory capacity of the command storage device can be reduced.

さらに、コマンド記憶部に記憶したデータ制御コマンドを修正する必要が生じた場合であっても、繰り返し数フィールドを使用して、連続した同一の制御コマンドはまとめて一つのデータ処理コマンドとしてコマンド記憶装置へ書き込みができるため、コマンド記憶装置へのアクセス量を削減することができる。特に、コマンド記憶装置がSDRAMである場合には、処理パフォーマンスを向上させることができる。   Further, even when it is necessary to modify the data control command stored in the command storage unit, the command storage device uses the repetition number field to collectively store the same control command as one data processing command. Thus, the amount of access to the command storage device can be reduced. In particular, when the command storage device is an SDRAM, the processing performance can be improved.

さらに、一つ一つのデータ処理コマンドのポインタ制御コマンドを読み込んで、WSRBやWLBの実行可能なデータ残量を算出する方法ではリアルタイムでの処理が困難であるのに対し、本発明の実施の形態におけるデータ制御装置では、ポインタ制御コマンドを使用せずに、WMRBの未処理データのエリア数から、WSRBやWLBで現に処理可能な未処理データのエリア数を演算して加算することができるから、リアルタイムの処理が可能となる。   Further, the method of reading the pointer control command of each data processing command and calculating the remaining amount of data that can be executed by WSRB or WLB is difficult to process in real time. In the data control device in FIG. 3, the number of areas of unprocessed data that can be processed in WSRB or WLB can be calculated and added from the number of areas of unprocessed data in WMRB without using a pointer control command. Real-time processing is possible.

なお、データ処理コマンドの一部のフィールド、たとえば、繰り返し数フィールドを削減してもよい。この場合、CPUにて生成されるデータ処理コマンド群は、データ制御コマンド各々が、繰り返し数分のデータ処理コマンドとなってコマンド記憶装置に蓄積され、かつデータ残量表が生成されることになるが、繰り返し回数を除いては、上述の動作と同じ動作となる。   Note that some fields of the data processing command, for example, the repetition number field may be reduced. In this case, in the data processing command group generated by the CPU, each data control command is accumulated in the command storage device as a data processing command for the number of repetitions, and a data remaining amount table is generated. However, the operation is the same as that described above except for the number of repetitions.

本発明の実施の形態におけるデータ制御装置の構成図Configuration diagram of a data control apparatus according to an embodiment of the present invention 本発明の実施の形態におけるデータ処理コマンドの構成図Configuration diagram of data processing command in the embodiment of the present invention 本発明の実施の形態におけるPHST・PFMTポインタの例を示す図The figure which shows the example of the PHST * PFMT pointer in embodiment of this invention 本発明の実施の形態におけるデータ残量検出動作を示すフローチャートThe flowchart which shows data remaining amount detection operation in embodiment of this invention 本発明の実施の形態におけるデータ残量検出動作を示すフローチャートThe flowchart which shows data remaining amount detection operation in embodiment of this invention 本発明の実施の形態における生成されたデータ処理コマンドの例を示す図The figure which shows the example of the data processing command produced | generated in embodiment of this invention 本発明の実施の形態におけるデータ残量表の例を示す図The figure which shows the example of the data remaining amount table | surface in embodiment of this invention 本発明の実施の形態におけるデータ残量計算装置を示す図The figure which shows the data remaining amount calculation apparatus in embodiment of this invention 本発明の実施の形態におけるバッファアンダーラン検出動作を示すフローチャートThe flowchart which shows the buffer underrun detection operation in embodiment of this invention

符号の説明Explanation of symbols

1 データ制御装置
10 データ記憶装置
20 コマンド記憶装置
21 コマンド制御装置
30 データアクセス装置
40 コマンドアクセス装置
50 制御装置
51 データ処理装置
52 バッファ制御装置
53 バッファアンダーラン処理装置
60 CPU
1 Data Controller 10 Data Storage Device 20 Command Storage Device 21 Command Control Device 30 Data Access Device 40 Command Access Device 50 Control Device 51 Data Processing Device 52 Buffer Control Device 53 Buffer Underrun Processing Device 60 CPU

Claims (5)

コンピュータ装置から送信されるデータをエリア単位で順次蓄積する第1のバッファと、記録媒体への記録処理内容に応じて生成されるデータをエリア単位で順次蓄積する第2のバッファとを有し、前記記録処理内容に応じて生成される複数のデータ処理コマンドに基づいて、この第1又は第2のバッファからエリア単位でデータを取り出し、前記記録媒体へ出力するデータ制御装置であって、
前記第1のバッファに蓄積されているデータのエリア数を検出する第1の検出手段と、
前記第2のバッファに蓄積されているデータのエリア数のうち、前記第1の検出手段で検出されたエリア数に基づいたエリア数を検出する第2の検出手段と、
前記第1の検出手段で検出したエリア数と前記第2の検出手段で検出したエリア数とから、データの残量を検出する第3の検出手段とを有するデータ制御装置。
A first buffer that sequentially stores data transmitted from the computer device in units of areas, and a second buffer that sequentially stores data generated in accordance with the recording processing content to the recording medium in units of areas; A data control device that extracts data in units of areas from the first or second buffer based on a plurality of data processing commands generated according to the content of the recording processing, and outputs the data to the recording medium,
First detection means for detecting the number of areas of data stored in the first buffer;
Second detection means for detecting the number of areas based on the number of areas detected by the first detection means among the number of areas of data stored in the second buffer;
A data control apparatus comprising: third detection means for detecting a remaining amount of data from the number of areas detected by the first detection means and the number of areas detected by the second detection means.
前記第2の検出手段におけるエリア数の検出は、前記第1の検出手段で検出されたエリア数のデータと共に連続して記録媒体へ出力できるデータのエリア数を検出するものであることを特徴とする請求項1に記載のデータ制御装置。   The detection of the number of areas in the second detection means is to detect the number of areas of data that can be continuously output to a recording medium together with the data of the number of areas detected by the first detection means. The data control device according to claim 1. 前記第2の検出手段におけるエリア数の検出は、前記第2のバッファに対するデータ処理コマンドのうち、前記第1の検出手段で検出されたエリア数のデータをすべて前記記録手段へ出力するために必要なデータ処理コマンドを検出し、この検出したータ処理コマンドで処理するデータのエリア数を検出するものであることを特徴とする請求項1に記載のデータ制御装置。 The detection of the number of areas in the second detection means is necessary for outputting all data of the number of areas detected by the first detection means to the recording means among the data processing commands for the second buffer. data processing detects the command, the data controller according to claim 1, characterized in that detects the number of areas of the data to be processed by the detected data processing commands. 前記記録処理内容に応じて生成される複数のデータ処理コマンドは、それぞれ第1のバッファに対するものか第2のバッファに対するものかを識別する識別子フィールドと、処理すべきデータのエリア数を示す繰り返し数フィールドとを有し、
前記第2の検出手段は、前記複数のデータ処理コマンドのうち前記識別子フィールドの情報により第2のバッファに対するデータ処理コマンドを検出し、この検出した第2のバッファに対するデータ処理コマンドのうち、前記第1の検出手段で検出されたエリア数のデータをすべて前記記録手段へ出力するために必要なデータ処理コマンドを検出し、この検出したデータ処理コマンドの繰り返し数フィールドに基づいて前記エリアの数の検出を行うことを特徴とする請求項3に記載のデータ制御装置。
Wherein the plurality of data processing command generated according to the recording processing content, repetition number indicating the identifier field identifying whether those for the second buffer or not to the first buffer, respectively, the number of area data to be processed Field and
The second detection means detects a data processing command for the second buffer based on information in the identifier field among the plurality of data processing commands, and among the detected data processing commands for the second buffer, the second A data processing command required to output all the data of the number of areas detected by one detecting means to the recording means is detected, and the number of areas is detected based on the repetition number field of the detected data processing command. data control device according to claim 3, characterized in that to perform.
コンピュータ装置から送信されるデータをエリア単位で順次蓄積する第1のバッファと、記録媒体への記録処理内容に応じて生成されるデータをエリア単位で順次蓄積する第2のバッファとを有し、前記記録処理内容に応じて生成される複数のデータ処理コマンドに基づいて、この第1又は第2のバッファからエリア単位でデータを取り出し、前記記録媒体へ出力する装置のバッファデータの残量検出方法であって、
前記第1のバッファに蓄積されているデータのエリア数を検出する第1の工程と、
前記第2のバッファに蓄積されているデータのエリア数のうち、前記第1の工程で検出されたエリア数に基づいたエリア数を検出する第2の工程と、
前記第1の工程で検出したエリア数と前記第2の工程で検出したエリア数とから、データの残量を検出する第3の工程とを有するバッファデータの残量検出方法。
A first buffer that sequentially stores data transmitted from the computer device in units of areas, and a second buffer that sequentially stores data generated in accordance with the recording processing content to the recording medium in units of areas; Based on a plurality of data processing commands generated according to the contents of the recording process, a method for detecting the remaining amount of buffer data in the apparatus that extracts data from the first or second buffer in units of areas and outputs the data to the recording medium Because
A first step of detecting the number of areas of data stored in the first buffer;
A second step of detecting the number of areas based on the number of areas detected in the first step among the number of areas of data stored in the second buffer;
A buffer data remaining amount detecting method comprising: a third step of detecting a remaining amount of data from the number of areas detected in the first step and the number of areas detected in the second step.
JP2004364676A 2004-12-16 2004-12-16 Data control apparatus and buffer data remaining amount detection method Expired - Fee Related JP4285404B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004364676A JP4285404B2 (en) 2004-12-16 2004-12-16 Data control apparatus and buffer data remaining amount detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004364676A JP4285404B2 (en) 2004-12-16 2004-12-16 Data control apparatus and buffer data remaining amount detection method

Publications (2)

Publication Number Publication Date
JP2006172625A JP2006172625A (en) 2006-06-29
JP4285404B2 true JP4285404B2 (en) 2009-06-24

Family

ID=36673197

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004364676A Expired - Fee Related JP4285404B2 (en) 2004-12-16 2004-12-16 Data control apparatus and buffer data remaining amount detection method

Country Status (1)

Country Link
JP (1) JP4285404B2 (en)

Also Published As

Publication number Publication date
JP2006172625A (en) 2006-06-29

Similar Documents

Publication Publication Date Title
US7995303B2 (en) Overhead calculation in writing synchronized data to magnetic tape
JP5954751B2 (en) Method and file system for rolling back data on tape
JP5385992B2 (en) Apparatus and method for controlling running of tape medium
CN1963950A (en) Semiconductor storage device equipped with ecc function
JP2006065999A (en) Magnetic tape control apparatus, and method and program therefor
JP2006221695A (en) Apparatus for controlling tape drive, method, and program
JP4285404B2 (en) Data control apparatus and buffer data remaining amount detection method
US6873584B2 (en) Disk reproducing apparatus and disk reproducing method
JP4706029B2 (en) Storage device, data writing method, and data writing program
KR100530549B1 (en) Data relay control apparatus
JP2010033396A (en) Information processor, information processing method, and program
US6943974B2 (en) Storage device, program for controlling storage device, method for controlling storage device and recording medium
JPWO2020031435A1 (en) Memory control device, storage device and memory control method
JP2008146697A (en) Data processor and method for detecting residual data amount of buffer
JP4305262B2 (en) Ring buffer control method, ring buffer device, and data recording / reproducing device
JP5207374B2 (en) Data processing device
JPH0528651A (en) Information recorder and reproducer
JPH11120690A (en) Disk device and buffer control method
JP2005222626A (en) Recording and reproducing apparatus
JP3973443B2 (en) Recording / reproducing apparatus and recording / reproducing method
JPH054693B2 (en)
JP2012146167A (en) Memory error pattern recording system, memory module and memory error pattern recording method
JP2000259358A (en) Magnetic tape controller and magnetic tape library device
JP4715493B2 (en) Memory control device and memory control method
JP2010135034A (en) Information recording/reproducing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070531

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081023

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081028

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081226

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090316

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

Free format text: PAYMENT UNTIL: 20120403

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120403

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120403

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130403

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees