Abstract:
A pattern detecting device includes a length comparison unit suitable for comparing lengths of compressed input data and compressed reference data; and a data comparison unit suitable for comparing the compressed input data and the compressed reference data.

Description:
[0001]    The present application claims priority under 35 U.S.C. §119(a) to Korean application number 10-2014-0120794, filed on Sep. 12, 2014, in the Korean Intellectual Property Office, which is incorporated herein by reference in its entirety as set forth in full. 
       BACKGROUND 
       [0002]    1. Technical Field 
         [0003]    The present invention relates to a data pattern detecting device capable of detecting a specific pattern of data, a semiconductor device including the same, and an operating method thereof. 
         [0004]    2. Related Art 
         [0005]    A data storage device, such as an SSD (Solid State Drive), which includes a nonvolatile semiconductor memory device such as a NAND flash memory device, substitutes for an existing data storage device such as a hard disk. 
         [0006]    Efficient use of data storage space is required in data storage devices such as SSDs. For example, when data of a specific pattern (a “patterned data”) is frequently used, only information representing the patterned data is stored instead of storing the patterned data itself. Therefore, the data storage device saves storage space. 
         [0007]    The NAND flash memory device may perform read and write operations by units of pages and may perform erase operations in units of blocks. The size of pages is normally 4096 bytes (4 KB), but since the information representing the patterned data is very small, it is possible to save storage space. 
         [0008]    Conventionally, an excessive amount of resources is used for detecting patterned data, resulting in degradation of overall data storage device performance. Therefore, a device and a method of detecting patterned data more efficiently are desirable. 
       SUMMARY 
       [0009]    A data pattern detecting device capable of easily detecting patterned data, a semiconductor device including the same, and an operating method thereof are described herein. 
         [0010]    In one embodiment of the present invention, a data pattern detecting device may include: a length comparison unit suitable for comparing lengths of compressed input data and compressed reference data; and a data comparison unit suitable for comparing the compressed input data and the compressed reference data. 
         [0011]    In another embodiment of the present invention, a semiconductor device may include: a memory cell array; and a control device suitable for controlling the memory cell array for input and output of data requested from a host, wherein the control device comprises: a pattern detecting device suitable for determining whether the data requested from the host has a specific data pattern; an address mapping table suitable for storing a logical address and a physical address corresponding to the logical address for the data of the memory cell array; and a control unit suitable for allocating a specific physical address for the data, which is to be written into the memory cell array in response to a request from the host and has the specific data pattern. 
         [0012]    In another embodiment of the present invention, a method for operating a semiconductor device may include: compressing data requested to be written; determining whether the data requested to be written has a specific data pattern; and allocating a specific physical address for the data requested to be written and having the specific data pattern, wherein the determining comprises: comparing lengths of a compressed input data and a compressed reference data; and comparing the compressed input data and the compressed reference data, and wherein the compressed input data is obtained by compressing the data requested to be written, and wherein the compressed reference data is obtained by compressing the specific data pattern. 
         [0013]    The present invention provides a data pattern detecting device capable of easily determining whether inputted data has a specific pattern, a semiconductor device including the same, and an operating method thereof. Consequently, as the specific pattern occupies a large space before it is compressed, it is possible to reduce the data storage space that is consumed. Instead of reading data of the specific pattern from a memory cell array and outputting the data, the data of the specific pattern can be directly generated and outputted, so that reading performance can be improved. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0014]    Features, aspects, and embodiments are described in conjunction with the attached drawings, in which: 
           [0015]      FIG. 1  is a block diagram illustrating a data pattern detecting device according to an embodiment of the present invention; 
           [0016]      FIG. 2  is a block diagram illustrating a semiconductor device according to an embodiment of the present invention; 
           [0017]      FIG. 3  is a data structure diagram illustrating an address mapping table shown in  FIG. 2 ; 
           [0018]      FIG. 4  is a data structure diagram illustrating a physical page shown in  FIG. 2 ; 
           [0019]      FIG. 5  is a data structure diagram illustrating a write buffer shown in  FIG. 2 ; 
           [0020]      FIG. 6  is a flowchart illustrating a write operation of a semiconductor device according to an embodiment of the present invention; 
           [0021]      FIG. 7  is a flowchart illustrating a read operation of a semiconductor device according to an embodiment of the present invention; and 
           [0022]      FIG. 8  and  FIG. 9  are graphs illustrating the effects of the present invention. 
       
    
    
     DETAILED DESCRIPTION 
       [0023]    Hereinafter, a data pattern detecting device, a semiconductor device including the same, and an operating method thereof according to the present invention will be described in detail with reference to the accompanying drawings through an exemplary embodiment. 
         [0024]      FIG. 1  is a block diagram Illustrating a data pattern detecting device  100  according to an embodiment of the present invention. 
         [0025]    The data pattern detecting device  100  may detect patterned data, and output a detection flag signal. 
         [0026]    The data pattern detecting device  100  may include a compression unit  110 , a length comparison unit  120 , a data comparison unit  130 , a flag generation unit  140 , and a storage unit  150 . 
         [0027]    The compression unit  110  may compress inputted data to be stored, and may output compressed data. 
         [0028]    The length comparison unit  120  may compare the lengths of the compressed data and compressed reference data stored in the storage unit  150 , which is a compressed representation of a specific data pattern. When the lengths of the compressed data and compressed reference data are equal, the length comparison unit  120  enables a length comparison signal SL. 
         [0029]    When the length of the compressed data is different from the length of the compressed reference data, the inputted data before the compression is not equal to the specific data pattern, which is represented by the compressed reference data. Accordingly, the data comparison unit  130  may not be activated. 
         [0030]    When the length of the compressed data is equal to the length of the compressed reference data, the inputted data before the compression may have a chance to be the same as the specific data pattern, but it is not possible to conclude that the inputted data is the same as the specific data pattern. For example, in the case in which the size of a page is 4 KB and a compression algorithm is the LZF (Lempel-Ziv-Free), when all data in the page is 0 and 1, the lengths after compression are the same as 54 bytes in the two cases. 
         [0031]    When the length comparison unit  120  determines that the length of the compressed data is equal to the length of the compressed reference data, the data comparison unit  130  may compare the compressed reference data with the compressed data. When the compressed reference data is equal to the compressed data, the data comparison unit  130  may enable a data comparison signal SD. 
         [0032]    The flag generation unit  140  may enable a detection flag when both of the length comparison signal SL and the data comparison signal SD are enabled. 
         [0033]    The specific data pattern represented by the compressed reference data may vary according to design, and the following description will be provided for an example of zero data, that is, when the specific data pattern is all “0”. 
         [0034]    For example, the page size stored in a NAND flash memory device is 4096 bytes (4 KB). It is quite burdensome in view of occupying area and operation time for the data comparison unit  130  to compare each bits of inputted page data and reference page data of 4096 bytes (4 KB) in order to determine whether the inputted page data is the zero page data, thereby degrading the performance of the data pattern detecting device. 
         [0035]    However, according to an embodiment of the present invention, the data pattern detecting device  100  may compress the inputted page data thereby reducing the size of the inputted page data. As described above, when compressed by the LZF algorithm, 4096 bytes (4 KB) of the inputted page data may be reduced to 54 bytes. 
         [0036]    Consequently, the occupying area and the operation time of the data comparison unit  130  can be considerably reduced. The data comparison unit  130  may be realized using logic gates. 
         [0037]      FIG. 2  is a block diagram illustrating a semiconductor device  1000  according to an embodiment of the present invention. 
         [0038]    The semiconductor device  1000  may perform read and write operations in response to requests from a host  10 . The semiconductor device  1000  may be a NAND flash memory device. The host  10  may operate under the control of an operating system therein. 
         [0039]    The semiconductor device  1000  may include a memory cell array  300 , which is divided in units of physical pages  310 , and a control device  200 , which controls the memory cell array  300  and inputs/outputs data to/from the memory cell array  300 . 
         [0040]    The memory cell array  300  may store data in the physical pages  310 . The data may be compressed or non-compressed. 
         [0041]    The size of the physical page  310  may be different from the size of a logical page. For example, the size of the logical page provided from the host may be 4 KB and the size of the physical page  310  may be 8 KB. In this case, a single physical page may include two non-compressed logical pages. 
         [0042]    The control device  200  may include a control unit  210 , an address mapping table  220 , the pattern detecting device  100 , a decompression unit  230 , a write buffer  240 , and a read buffer  250 . 
         [0043]    The control unit  210  may generally control various operations of the NAND flash memory device with the FTL (Flash Translation Layer) such as read, write, garbage collection, and ware leveling. Since the general operation of the FTL is well-known, a detailed description thereof will be omitted. 
         [0044]    The address mapping table  220  may manage logical addresses requested from the host  10  and physical addresses corresponding to the logical addresses. The relationship between the logical and physical addresses may be updated during the garbage collection, the ware leveling and the like. 
         [0045]    The pattern detecting device  100  may include the compression unit  110  that compresses the inputted data as described above. The pattern detecting device  100  may determine whether the Inputted data to be written is the same as the specific data pattern represented by the compressed reference data. 
         [0046]    The decompression unit  230  may decompress and output the compressed data from the memory cell array  300  in response to a read request from the host  10 . 
         [0047]    The write buffer  240  may temporarily store the inputted data in the physical pages  310  of the memory cell array  300 . 
         [0048]    The read buffer  250  may temporarily store data read from the physical pages  310 . 
         [0049]      FIG. 3  illustrates a data structure illustrating the address mapping table  220  shown in  FIG. 2 . 
         [0050]    The address mapping table may include a logical address field LPA, a bypass flag field BPF, an index field INDEX, and a physical address field PPA. 
         [0051]    The logical address field LPA may store the logical address of data in the memory cell array  300 . When the index of the address mapping table  220  can be identified by the logical address transmitted from the host  10 , the logical address field LPA may not be separately stored. 
         [0052]    The bypass flag field BPF may store 1 when data stored in the physical pages  310  is not compressed, and may store 0 when the data stored in the physical pages  310  is compressed. The compression performance may depend on the type of data, and the size of a compressed data may be greater than the original data, and in this case the data is stored non-compressed. 
         [0053]    For example, when original data is compressed and the length of the compressed data is more than 95% of the length of the original data, the original data may be stored non-compressed and the bypass flag and its corresponding logical address is set to 1. 
         [0054]      FIG. 3  illustrates that the stored data of the logical addresses  80  to  82  is compressed and the stored data of the logical addresses  83  and  84  is non-compressed. 
         [0055]    The physical address field PPA may indicate the addresses of the physical pages  310  corresponding to the logical addresses. 
         [0056]    As described above, the sizes of the physical pages  310  may be larger than those of the logical pages. Accordingly, a single physical page  310  may store a plurality of logical pages. Thus, index information may be used in order to identify a plurality of logical pages stored in the single physical page  310 . The index field INDEX may store such index information. 
         [0057]    For example, in  FIG. 3 , since the index of the logical address  80  is “0”, data of the index “0” may be the first one of the compressed data stored in the physical address  100 . Furthermore, since the index of the logical address  84  is “1”, data of the index “1” may be the second one of the non-compressed data stored in the physical address  200 . 
         [0058]      FIG. 4  illustrates a data structure illustrating the physical page  310  shown in  FIG. 2 . 
         [0059]    (a) and (b) of  FIG. 4  illustrate the structures of the uncompressed and compressed logical pages stored in the physical page  310 , respectively. 
         [0060]    In the present embodiment, since the size of the logical page is 4 KB and the size of the physical page is 8 KB, the single physical page  310  may store two logical addresses  311  and  312  and sequentially correspond to indexes 0 and 1, as shown in (a) of  FIG. 4 . 
         [0061]    In the case of non-compressed data, no further data other than the logical page data may be required. 
         [0062]    However, in the case of compressed data, the size of compressed data may be different, and separate meta data for identifying the compressed data may be required. 
         [0063]    (b) of  FIG. 4  shows three (3) of the compressed logical pages  317  to  319  (page “#0” to “#2”), the lengths  314  to  316  (“2030”, “2045”, and “3028” bytes) of the compressed logical pages  317  to  319 , and the number  313  (“3”) of the compressed logical pages  317  to  319  in the physical page  310 . 
         [0064]    The length data  314  indicates the length of the 0 th  compressed logical page  317 , the length data  315  indicates the length of the first compressed logical page  318 , and the length data  314  indicates the length of the second compressed logical page  319 . 
         [0065]    As such, it is possible to identify the compressed logical page data through the physical addresses and the meta data. 
         [0066]      FIG. 5  is a block diagram illustrating the write buffer  240  shown in  FIG. 2 . 
         [0067]    The write buffer  240  may include a first write buffer  241  and a second write buffer  242 . 
         [0068]    The first write buffer  241  may temporarily store the non-compressed logical page, and may have the same structure as the uncompressed logical pages stored in the physical page  310  illustrated in (a) of  FIG. 4 . The first write buffer  241  may store two non-compressed logical pages  241 - 1  and  241 - 2 . 
         [0069]    The second write buffer  242  may temporarily store the compressed logical page, and may have the same structure as the compressed logical pages stored in the physical page  310  illustrated in (b) of  FIG. 4 . The second write buffer  242  may store compressed logical pages  242 - 5  to  242 - 7  and meta data  242 - 1  to  242 - 4  corresponding to the compressed logical pages  242 - 5  to  242 - 7 . The meta data may include the number  242 - 1  of the compressed logical pages, and the lengths  242 - 1  to  242 - 4  of the compressed logical pages. 
         [0070]      FIG. 6  is a flowchart illustrating the writing operation of the semiconductor device  1000  according to an embodiment of the present invention. 
         [0071]    The writing operation of the semiconductor device  1000  may be generally controlled by the control unit  210 . 
         [0072]    When a writing request is provided from the host  10  as well as input data to be written in the memory cell array  300  and the logical address for the input data, the compression unit  110  of the pattern detecting device  100  may compress the input data (S 110 ). 
         [0073]    Next, the pattern detecting device  100  may compare the compressed input data and the compressed reference data, which is a compressed representation of the specific data pattern, as described above with reference to  FIG. 1  (S 120 ). 
         [0074]    Then, the pattern detecting device  100  may determine whether the input data has the same pattern as the specific data pattern of the compressed reference data ( 5130 ). 
         [0075]    When the input data has the same pattern as the specific data pattern of the compressed reference data, the pattern detecting device  100  may allocate a physical address for the compressed input data (S 140 ). In this case, a specific value, for example, “0”, may be allocated as the physical address for the compressed input data. Furthermore, it is not necessary to store the compressed input data in the physical page  310 . 
         [0076]    When the input data does not have the same pattern as the specific data pattern of the compressed reference data, the pattern detecting device  100  may determine whether the size of the compressed input data is smaller than a threshold value ( 5150 ). For example, the pattern detecting device  100  may determine whether the size of the compressed input data is less than 95% of the size before compression. 
         [0077]    When the size of the compressed input data is larger than the threshold value, the pattern detecting device  100  may select the original input data as the data to be written in the memory cell array  300  (S 151 ), and when the size of the compressed input data is not larger than the threshold, the pattern detecting device  100  may select the compressed input data as the data to be written in the memory cell array  300  (S 152 ). 
         [0078]    Then, the pattern detecting device  100  may determine whether there is space for the data to be written in the write buffer  240  (S 160 ). For example, when the original input data is selected as the data to be written, the pattern detecting device  100  may determine whether there is space for the original input data in the first write buffer  241 , and when the compressed input data is selected as the data to be written, the pattern detecting device  100  may determine whether there is a space for the compressed input data in the second write buffer  242 . 
         [0079]    When there is no spare space in the write buffer  240 , the pattern detecting device  100  may move data stored in the write buffer  240  to the memory cell array  300  ( 5170 ), and may store the data to be written into the write buffer  240  (S 180 ). 
         [0080]    When there is space for data to be written in the write buffer  240 , the pattern detecting device  100  may store the data to be written into the write buffer  240  (S 180 ). 
         [0081]    When the data to be written is the original input data, the pattern detecting device  100  may store the data to be written into the first write buffer  241 , and when the data to be written is compressed input data, the pattern detecting device  100  may store the data to be written in the second write buffer  242 . 
         [0082]      FIG. 7  is a flowchart illustrating a reading operation of the semiconductor device  1000  according to an embodiment of the present invention. 
         [0083]    The reading operation of the semiconductor device  1000  may be generally controlled by the control unit  210 . 
         [0084]    When a reading request is provided from the host  10  as well as the logical address for the stored data to be read from the memory cell array  300 , the control unit  210  may find the physical address corresponding to the requested logical address by referring to the address mapping table  220  (S 210 ). 
         [0085]    Next, the control unit  210  may determine whether or not the data to be read has the specific data pattern based on the physical address. The compressed reference data representing the specific data pattern may be stored in the memory cell array  300  with a specific physical address, namely the physical address having the specific value “0” as described above. 
         [0086]    When the requested data has the specific data pattern, the control unit  210  generates the specific data pattern instead of reading data from the memory cell array  300 , and may transfer the generated specific data pattern to the host  10  ( 230 ) in response to the read request. 
         [0087]    When the requested data does not have the specific data pattern, the control unit  210  may read the requested data, which may be compressed or non-compressed, from the physical page  310  of the memory cell array  300  based on the physical address corresponding to the requested logical address (S 240 ). 
         [0088]    The read data may be temporarily stored in the read buffer  250 . 
         [0089]    Then, the control unit  210  may decompress the read data, and may transfer the decompressed data to the host (S 250 ) in response to the read request. 
         [0090]      FIG. 8  is a graph illustrating the effects of the present invention. 
         [0091]    In the graph of  FIG. 8 , the performance when specific data pattern detection is applied is compared to the performance without pattern detection in a NAND flash memory device employing a scheme of compressing and storing page data. 
         [0092]    In the graph, the horizontal axis denotes the type of benchmark and the vertical axis denotes the write amplification factor (WAF). The write amplification factor indicates the ratio of data that has been actually written in the memory cell array  300  by the control unit  210  with respect to the size of data requested to be written by the host  10 . 
         [0093]    As illustrated in  FIG. 8 , when the specific data pattern detecting operation is performed, since the specific data pattern is not stored, the write amplification factor is further reduced. For example, in the case of a Linux benchmark, when the specific data pattern detecting operation is performed, the write amplification factor is reduced by about 14%, compared with the case in which the zero page detecting operation is not performed. 
         [0094]      FIG. 9  is another graph Illustrating the effects of the present invention. 
         [0095]    In the graph of  FIG. 9 , the number of read, write, and compress release operations when detecting the specific data pattern is compared with the number of read, write, and compress releases without pattern detection in the NAND flash memory device employing a scheme of compressing and storing page data. 
         [0096]    Since the reading of the specific data pattern is not generated directly after writing is generated, actual user workload of about 12 hours after the installation of Window  7  has been extracted in order to measure actual performance. Through the extracted workload, the number read, write, and compress release operations have been measured with and without specific data pattern detection. 
         [0097]    As illustrated in  FIG. 9 , when detecting specific data patterns, the number read operations is reduced by about 2% and the number of write and compress releases is reduced by about 4%, compared to when specific data pattern detection is not employed. 
         [0098]    In the reading operation, when detecting the specific data pattern, the data of the specific data pattern is generated and outputted instead of actually reading data. In the writing operation, when detecting the specific data pattern, since data is not actually written, such results are obtained. 
         [0099]    When reading and writing data in which the specific data pattern occupies a large part, as compared with data used in experiments, the reduction of required storage space is expected to be higher. 
         [0100]    While certain embodiments have been described above, it will be understood to those skilled in the art that the embodiments described are examples only. Accordingly, the data pattern detecting device, the semiconductor device including the same, and the operating method thereof described herein should not be limited based on the described embodiments. Rather, the data pattern detecting device, the semiconductor device including the same, and the operating method thereof described herein should only be limited in light of the claims that follow when taken in conjunction with the above description and accompanying drawings.