The present invention relates to an apparatus for writing data into a storage medium, and more particularly, to an apparatus having a verification unit that selectively verifies the data that have been written into the storage medium.
During a process in which data blocks are encoded and written into a storage medium such as an optical disc, when it is at a specific time or at a time when one data block is written into the storage medium, verification is used to check an accuracy of the data that have been written into the storage medium. When the verification is performed, the encoding processing is stopped. Because all the data written into the storage medium needs to be verified no matter what the quality of the data have been written into the storage medium, therefore, time is wasted when the accurate data are verified.
It is therefore an objective of the present invention to provide an apparatus having a verification unit that selectively verifies the data that have been written into the storage medium and related method, to solve the above-mentioned problems.
According to one embodiment of the present invention, an apparatus for writing encoded data into a storage medium includes a quality-check signal generator, a defect judgment unit and a verification unit. The quality-check signal generator is utilized for generating a quality-check signal; the defect judgment unit is coupled to the quality-check signal generator and is utilized for generating a defect judgment result according to the quality-check signal; and the verification unit is coupled to the defect judgment unit and is utilized for referring to the defect judgment result to selectively verify the encoded data that have been written into the storage medium.
According to another embodiment of the present invention, a method for writing encoded data into a storage medium includes: generating a quality-check signal; generating a defect judgment result according to the quality-check signal; and referring to the defect judgment result to selectively verify the encoded data that have been written into the storage medium.
According to the apparatus and the method of the present invention, a verification unit is utilized for referring to the defect judgment result to selectively verify the encoded data that have been written into the storage medium. Therefore, not all the data that have been written into the storage medium need to be verified, and encoding and writing process are more efficient.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Certain terms are used throughout the following description and claims to refer to particular system components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following discussion and in the claims, the terms “including” and “comprising” are used in an open-ended fashion, and thus should be interpreted to mean “including, but not limited to . . . ” The terms “couple” and “couples” are intended to mean either an indirect or a direct electrical connection. Thus, if a first device couples to a second device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.
Please refer to
Moreover, in some other embodiments, the defect judgment result can be used to decide whether the data written into the storage medium should be stopped. When the defect judgment result indicates that there are too many errors in the data, data writing process will stop. The related description is known by the persons skilled in the art, and is omitted for simplicity.
Taking an optical disc as an example of the storage medium, the quality-check signal generated from the quality-check signal generator 110 provides information indicating which area of the optical disc is possibly a decoding error occurs. The information of the quality-check signal can be generated according to an intensity of light reflected from the optical disc, a reflection ratio of the optical disc, or other information about the quality of the optical disc. In addition, the information of the quality-check signal can also be generated according to a focus error signal, a tracking error signal or other servo control signals.
Please refer to
When writing an original data block into the blu-ray disc, the original data block has an interleaving operation performed and becomes an interleaved data block first. Then, the interleaved data block is encoded and written into the blu-ray disc. The definitions of a size of the original data block and the interleaved data block and the interleaving operations are described in a specification of the blu-ray disc, and as a person skilled in this art should understand this interleaving operation, further descriptions are therefore omitted here.
When the data that have been written on the blu-ray disc need to be read out and decoded, the interleaved data block needs to have a de-interleaving operation performed and becomes a de-interleaved data block (i.e., the original data block). Please refer to
The even and odd codeword remapper 210 is utilized for remapping the quality-check signal to generate information of the even and odd codeword groups. The information of each codeword group includes an amount of data of any codeword in a corresponding codeword group that may induce decoding errors. Then, the counters 222 and 224 respectively records amounts of data of any codeword in the even or odd codeword groups that may induce decoding errors. In this embodiment, the counter 222 records a counter value “2” (because each even codeword has two defect data) and the counter 224 records a counter value “1” (because each odd codeword has one defect data).
Then, the comparing module 232 respectively compares the counter values stored in the counters 222 and 224 with a predetermined value to generate a defect judgment result, where the predetermined value can be a maximum defect data that is allowed in a codeword. If one of the counter values stored in the counters 222 and 224 is greater than the predetermined value, the defect judgment result generated from the comparing module 232 is at a first state, and the apparatus 100 stops encoding the interleaved data block, stops generating the encoded data and stops writing the encoded data into the blu-ray disc, therefore the verification unit 130 starts verifying the encoded data that have been written into the blu-ray disc. If both the counter values stored in the counters 222 and 224 are not greater than the predetermined value, the defect judgment result generated from the comparing module 232 is at a second state, the apparatus 100 continues encoding the interleaved data block and writing the encoded data into the blu-ray disc.
It is noted that the predetermined value can be set before the data writing procedure, and the predetermined value is fixed during the data writing procedure. However, the predetermined value also can be set to be adjustable during the writing procedure. For example, the predetermined value can be adjusted according to the writing speed, or according to types of disk indicated by the information stored in lead-in area of the disc.
In addition, the check point controller 234 is utilized for controlling a timing of the comparing module 232 comparing the counter values with the predetermined value, the timing can be set when encounters a boundary of a data block, every end point or start point of a fixed time. In addition, the timing can also be set when encounters a defect falling edge such as a timing after the data E(0,303) and the data E(216,302) shown in
Please refer to
The codeword remapper 510 is utilized for remapping the quality-check signal to generate information of each codeword. The information of each codeword includes an amount of data of the codeword that may induce decoding errors. For example, the codeword remapper 510 remaps the data block in
Then, the comparing module 532 compares the counter values stored in the counters with a predetermined value to generate a defect judgment result; in some embodiments, the predetermined value can be a maximum defect data that is allowed in a codeword. If one of the counter values stored in the counters is greater than the predetermined value, the defect judgment result generated from the comparing module 532 is at a first state, and the apparatus 100 stops encoding the interleaved data block, stops generating the encoded data and stops writing the encoded data into the blu-ray disc, therefore the verification unit 130 starts verifying the encoded data that have been written into the blu-ray disc. If all the counter values stored in the counter module are not greater than the predetermined value, the defectjudgment result generated from the comparing module 532 is at a second state, and the apparatus 100 continues encoding the interleaved data block and writing the encoded data into the blu-ray disc.
It is noted that the predetermined value can be set before the data writing procedure, and the predetermined value is fixed during the data writing procedure. However, the predetermined value also can be set to be adjustable during the writing procedure. For example, the predetermined value can be adjusted according to the writing speed, or according to types of disk indicated by the information stored in lead-in area of the disc.
In addition, the check point controller 534 is utilized for controlling a timing of the comparing module comparing the counter values with the predetermined value, and the timing can be set when encounters a boundary of a data block, every end point or start point of a fixed time, or a defect falling edge such as the timing after the data E(0,303) and the data E(216, 302) shown in
Please refer to
The direct defect mapper 610 is utilized for directly mapping the quality-check signal to generate information about a number of lines of data that may induce the decoding errors, it means that there is no remapping procedure (such as the grouping procedure shown in
Then, the comparing module 632 compares the counter value stored in the counter 620 with a predetermined value to generate a defect judgment result, where the predetermined value can be a maximum defect data that is allowed in a codeword. If the counter value stored in the counter 620 is greater than the predetermined value, the defect judgment result generated from the comparing module 632 is at a first state, and the apparatus 100 stops encoding the interleaved data block, stops generating the encoded data and stops writing the encoded data into the blu-ray disc, therefore the verification unit 130 starts verifying the encoded data that have been written into the blu-ray disc; if the counter value stored in the counter 620 is not greater than the predetermined value, the defect judgment result generated from the comparing module 632 is at a second state, and the apparatus 100 continues encoding the interleaved data block and writing the encoded data into the blu-ray disc.
It is noted that the predetermined value can be set before the data writing procedure, and the predetermined value is fixed during the data writing procedure. However, the predetermined value also can be set to be adjustable during the writing procedure. For example, the predetermined value can be adjusted according to the writing speed, or according to types of disk indicated by the information stored in lead-in area of the disc.
In addition, the check point controller 634 is utilized for controlling a timing of the comparing module comparing the counter value with the predetermined value, and the timing can be set when encounters a boundary of a data block, every end point or start point of a fixed time, or a defect falling edge such as the timing after the data E(0,303) and the data E(216, 302) shown in
In addition, in another embodiment of the present invention, the check point controller 634 can be removed from the defect judgment unit 120 shown in
Please refer to
Step 700: start.
Step 702: generate a quality-check signal.
Step 704: generate a defect judgment result according to the quality-check signal.
Step 706: refer to the defect judgment result to selectively verify the encoded data that have been written into the storage medium.
It is noted that, in the present invention, the verification unit refers to the defect judgment result to selectively verify the encoded data that have been written into the storage medium. However, if the storage medium has a bad quality, applying the present invention to encode and write data into the storage medium may be inefficient. Therefore, before data are encoded and written into the storage medium, the storage medium is checked according to one of the following methods to determine a write status of the storage medium. Then, it is determined if the method for encoding and writing data into the storage medium of the present invention is applied or not.
Taking an optical disc as the storage medium, a first method to determine the write status of the optical disc includes: writing test data onto several area of the optical disc, and checking a focus condition, reflection, or servo controllability to determine the write status of the optical disc. A second method includes: recording a number of re-written times of the optical disc on a reserved area, and the write status can be determined by obtaining the information from this reserved area. In addition, when it is a recordable disc (only support write once), the write status of the optical disc is naturally suitable for applying the present invention to encode and write data into the optical disc.
If the write status of the optical disc is unsuitable for applying the method of the present invention to encode and write data into the optical disc, a related method that each data block that has been written into the optical disc needs to be verified can be applied.
Briefly summarizing the present invention, an apparatus for writing encoded data into a storage medium includes a quality-check signal generator, a defect judgment unit and a verification unit. The quality-check signal generator is utilized for generating a quality-check signal; the defect judgment unit is utilized for generating a defectjudgment result according to the quality-check signal; and the verification unit is utilized for referring to the defect judgment result to selectively verify the encoded data that have been written into the storage medium. Therefore, not all the data written into the storage disc need to be verified, and the efficiency of writing the encoded data into the storage medium is increased.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
This application claims the priority of U.S. Provisional Application No. 61/073,786, filed Jun. 19, 2008, which is included herein by reference.
Number | Date | Country | |
---|---|---|---|
61073786 | Jun 2008 | US |