Patent Publication Number: US-9904609-B2

Title: Memory controller and memory device

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application claims the benefit of U.S. Provisional Application No. 62/250,802, filed Nov. 4, 2015, the entire contents of which are incorporated herein by reference. 
    
    
     FIELD 
     Embodiments described herein relate generally to a memory controller and a memory device. 
     BACKGROUND 
     In a storage system including a nonvolatile memory and a memory controller that controls the memory, data is read from the nonvolatile memory in, for example, garbage collection and refresh. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is a diagram illustrating a storage system according to an embodiment; 
         FIG. 2  is a diagram illustrating an example of a list of a plurality of read commands; 
         FIG. 3  to  FIG. 6  are diagrams illustrating examples of command transfer between three controllers (CPU) WC, CD, and FLH; 
         FIG. 7  is a diagram illustrating an operation example of the storage system of  FIG. 1 ; 
         FIG. 8  is a diagram illustrating a flowchart of the operation example of  FIG. 7 ; 
         FIG. 9  is a diagram illustrating an application example in which a memory device is an SSD; and 
         FIG. 10  is a diagram illustrating an example of a NAND flash memory. 
     
    
    
     DETAILED DESCRIPTION 
     In general, according to one embodiment, a memory controller comprises: a first controller issuing one command which includes read commands for reading data from a nonvolatile memory; a second controller sequentially issuing the read commands and a dummy command which continues the read commands when the one command is received; and a third controller sequentially executing the read commands and the dummy command and reporting a read error to the second controller when one occurs, the second controller reporting a completion of the one command to the first controller when the command which corresponds to the read error is the dummy command. 
     EMBODIMENT 
       FIG. 1  illustrates a storage system according to an embodiment. 
     A memory device  10  is a device that is connectable to a host  11 . For example, the memory device  10  may be a solid-state drive (SSD) or a USB flash drive. The host  11  is an electronic apparatus such as a personal computer or a portable device. The host  11  may be an imaging device such as a digital still camera or a video camera or may be a tablet computer, a smartphone, a game console, a car navigation system, a printer, a scanner device, a server system or the like. 
     The memory device  10  includes a nonvolatile memory  12 , and a memory controller  13  that controls the nonvolatile memory  12 . The nonvolatile memory  12  is a memory that is capable of storing data in a nonvolatile manner, such as a NAND flash memory. The nonvolatile memory may include memory cells having a two-dimensional structure, or memory cells having a three-dimensional structure. The nonvolatile memory  12  may be a nonvolatile RAM such as a magnetic random access memory (MRAM), a resistive random access memory (ReRAM), and a ferroelectric random access memory (FeRAM). 
     The nonvolatile memory  12  includes a plurality of channels (four channels in the present example) CH 0 , CH 1 , CH 2 , and CH 3 , and a plurality of banks (two banks in the present example) BANK 0  and BANK 1 . 
     Channels CH 0 , CH 1 , CH 2 , and CH 3  are elements that are operable in parallel. For example, in parallel with read/write in one channel CH 0 , read/write can be executed in the other three channels CH 1 , CH 2 , and CH 3 . As described above, channels CH 0 , CH 1 , CH 2 , and CH 3  achieve high-speed read/write. 
     Banks BANK 0  and BANK 1  are elements to execute an interleave operation. For example, each of the channels includes two chips. In this case, when read/write is busy (being executed) in chips CP 00 , CP 10 , CP 20 , and CP 30  in bank BANK 0 , data transfer is executed between the memory controller  13  and chips CP 01 , CP 11 , CP 21 , and CP 31  in bank BANK 1 . This operation enables efficient data transfer between the nonvolatile memory  12  and the memory controller  13 . 
     The memory controller  13  controls read/write on the nonvolatile memory  12 . The memory controller  13  controls read/write on the nonvolatile memory  12  in, for example, garbage collection and refresh, as well as the case of receiving a read/write command from the host  11 . The garbage collection is rewriting distributed pieces of data together, and executed to increase free blocks (free space to which data can be written). The refresh is rewriting data in a physical block with increased read error occurrence rate to another physical block, and executed to reduce the read error occurrence rate. The free block is a block on which no valid data is recorded. For example, after valid data in a used block on which the valid data is recorded is moved by garbage collection or the like, all the data (valid/invalid data) in the used block is erased, and thereby the used block can be changed into a free block. The valid data is data associated with a logical address, and invalid data is data that is not associated with a logical address. 
     The memory controller  13  includes a front end FE ( 14 ), a back end BE ( 24 ), and a bus  21  that connects the elements. The front end FE ( 14 ) is a section that receives a read/write command from the host  11  and reports completion of the read/write command to the host  11 . The front end FE ( 14 ) includes a host interface  14 . The back end BE ( 24 ) is a section that controls read/write on the nonvolatile memory  12 . 
     The back end BE ( 24 ) includes a write controller (WC)  15 , a command dispatcher (CD)  16 , a memory interface (FLH)  17 , a data buffer  18 , a look-up table (LUT)  19 , and an LUT controller  20 . 
     The write controller (first controller)  15  includes an error correction portion  22 . 
     For example, when the front end FE ( 14 ) receives a write command from the host  11 , the write controller  15  encodes user data from the host using the error correction portion  22 , and transfers the encoded data as write data to the data buffer  18 . When data is read from the nonvolatile memory  12 , the write controller  15  decodes the read data using the error correction portion  22 . The error correction portion  22  has a function of correcting an error, when any error exists in part of the read data, that is, when a read error occurs. 
     The error correction portion  22  may use any method as an encoding/decoding method. For example, the error correction portion  22  may use Reed Solomon (RS) coding, Bose Chaudhuri Hocquenghem (BCH) coding, or low-density parity check (LDPC) coding. The error correction portion  22  is disposed in the write controller  15 , but is not limited thereto. The error correction portion  22  may be disposed separately from the write controller  15 . 
     The write controller  15  issues a read/write command in an operation of, for example, garbage collection or refresh. In these operations, the write controller  15  reads valid data from a plurality of physical blocks in the nonvolatile memory  12 , and rewrites the valid data to a new physical block. 
     For this reason, first, the write controller  15  issues a plurality of read commands to read valid data from a plurality of physical blocks serving as targets. One of characteristic points in the present example is that the write controller  15  is capable of consolidating a plurality of read commands into a batch command. 
     To achieve this, the write controller  15  constructs a list of read commands as a read unit from the nonvolatile memory  12 . 
       FIG. 2  illustrates an example of a list of read commands. 
     The example is an example in which a plurality of read commands r 00 , r 10 , r 20 , r 30 , . . . , rij are consolidated into a batch command R 0 . Each of address items MCA 00 , MCA 10 , MCA 20 , MCA 30 , . . . , MCAij includes all vectors necessary for accessing the memory cells, such as the bank, the channel, the block address, and the memory cell address of the nonvolatile memory  12 . 
     As described above, processing a plurality of read commands consolidated into a batch command enables high-speed processing, because the processing reduces the overhead of data transfer per read command in comparison with the case of processing the read commands individually. 
     The command dispatcher (second controller)  16  functions as a command buffer. For example, as illustrated in  FIG. 3 , when the command dispatcher (CD)  16  receives a batch command R 0  from the write controller (WC)  15 , the command dispatcher (CD)  16  transfers read commands r 00 , r 10 , r 20 , r 30 , . . . included in the batch command R 0  to the memory interface (FLH)  17 . 
     The memory interface (third controller)  17  controls read/write on the memory cells in the nonvolatile memory  12 . For example, the memory interface  17  stores a plurality of read commands from the command dispatcher  16 , and sequentially executes the commands. 
     The memory interface  17  includes an error check portion  23 . The error check portion  23  checks whether an error exists in part of the read data, that is, whether any read error occurs. 
     For example, as illustrated in  FIG. 3 , when a read error occurs in read command rij, the memory interface (FLH)  17  reports occurrence of a read error in read command rij to the command dispatcher (CD)  16 . The command dispatcher (CD)  16  reports occurrence of the read error in read command rij to the write controller (WC)  15 , to perform error correction by the write controller (WC)  15 . The write controller (WC)  15  reports the result of error correction to the command dispatcher (CD)  16 . 
     In the processing, as illustrated in  FIG. 4 , when the write controller (WC)  15  issues read commands in a read unit (cluster unit) of the nonvolatile memory  12 , the overhead of data transfer per read command increases, because data transfer must be performed between the three controllers (WC, CD, FLH) for each of the read commands. 
     By contrast, as illustrated in  FIG. 3 , when the write controller (WC)  15  issues a batch command with a number N times (N is a natural number of 2 or more) as large as the read unit (cluster unit) of the nonvolatile memory  12 , high-speed processing is enabled because the processing reduces the overhead of data transfer per read command. 
     In addition, as illustrated in  FIG. 5 , in the case of adopting an algorithm performing inquiry and acknowledgement as to whether a read command has been completed between the command dispatcher (CD)  16  and the memory interface (FLH)  17 , the algorithm complicates the control in the memory controller  13 , and easily causes a malfunction. In addition, the command dispatcher (CD)  16  must wait until it has received the acknowledgement before reporting completion of the batch command R 0 . For this reason, the inquiry and the acknowledgement cause loss of time, and delay reporting completion of the batch command R 0 . 
     For this reason, in the example illustrated in  FIG. 3 , the command dispatcher  16  determines that the read commands have been completed when the command dispatcher  16  finishes transferring read commands r 00 , r 10 , r 20 , r 30 , . . . , and immediately reports completion of the batch command R 0  to the write controller  15 . Even if the command dispatcher  16  reports completion of the batch command R 0  to the write controller  15  after the command dispatcher  16  finishes transferring read commands r 00 , r 10 , r 20 , r 30 , . . . , no problem occurs because the read data should be stored in the data buffer when no read error occurs in read commands r 00 , r 10 , r 20 , r 30 , . . . . 
     However, if a read error occurs in, for example, the last read command rij in read commands r 00 , r 10 , r 20 , r 30 , . . . in the batch command R 0 , the command dispatcher (CD)  16  reports completion of the batch command R 0  to the write controller (WC)  15  before correction of the read error has been completed. 
     Specifically, as illustrated in  FIG. 3 , the command dispatcher (CD)  16  transfers the last read command rij, and thereafter reports completion of the batch command R 0  to the write controller (WC)  15 . However, if a read error occurs in the last read command rij, the write controller (WC)  15  receives an error code from the memory interface (FLH)  17  through the command dispatcher (CD)  16 . The write controller (WC)  15  performs error correction using the error correction portion  22 , and reports the result of error correction (successful/unsuccessful) to the command dispatcher (CD)  16 . 
     Originally, the command dispatcher (CD)  16  should report completion of the batch command R 0  to the write controller  15  after receiving the result of error correction. However, as described above, the command dispatcher (CD)  16  reports completion of the batch command R 0  to the write controller  15  when the command dispatcher  16  finishes transferring read commands r 00 , r 10 , r 20 , r 30 , . . . . 
     Accordingly, the command dispatcher (CD)  16  reports completion of the batch command R 0  to the write controller  15  before receiving the result of error correction of the last read command rij. This means that the command dispatcher (CD)  16  is not capable of accurately reporting completion of the batch command R 0  to the write controller  15 . 
     For this reason, the command dispatcher (CD)  16  issues a command independently. The command is a dummy command that intentionally causes a read error by the memory interface  17 . For example, as illustrated in  FIG. 6 , when the command dispatcher (CD)  16  receives a batch command R 0  from the write controller (WC)  15 , the command dispatcher (CD)  16  sequentially transfers read commands r 00 , r 10 , r 20 , r 30 , . . . included in the batch command R 0  and dummy commands D 0 , D 1 , D 2 , and D 3  following the read commands to the memory interface  17 . 
     As described above, adding dummy commands D 0 , D 1 , D 2 , and D 3  to the last of read commands r 00 , r 10 , r 20 , r 30 , . . . enables accurate reporting of completion of the batch command R 0 , even if a read error occurs in one of read commands r 00 , r 10 , r 20 , r 30 , . . . in the batch command R 0 . 
     For example, suppose that a read error occurs in execution of the last read command rij in read commands r 00 , r 10 , r 20 , r 30 , . . . in the batch command R 0 . In this case, the error correction portion  22  in the write controller (WC)  15  performs error correction on the data related to read command rij. 
     However, dummy commands D 0 , D 1 , D 2 , and D 3  are executed after read commands r 00 , r 10 , r 20 , r 30 , . . . in the batch command R 0 . For this reason, the timing at which the command dispatcher (CD)  16  receives error codes related to dummy commands D 0 , D 1 , D 2 , and D 3  from the memory interface (FLH)  17  is later than the timing at which the command dispatcher (CD)  16  receives the result of error correction of the read data related to read command rij from the write controller (WC)  15 . 
     This structure enables the command dispatcher (CD)  16  to check whether all read commands r 00 , r 10 , r 20 , r 30 , . . . in the batch command R 0  have been completed, by checking whether the commands related to the read error are dummy commands D 0 , D 1 , D 2 , and D 3 . 
     The data buffer  18  temporarily stores read data and write data. The data buffer  18  is, for example, a static random access memory (SRAM), or a dynamic random access memory (DRAM). The data buffer  18  may be a nonvolatile RAM such as an MRAM, a ReRAM, and a FeRAM. The data buffer  18  may be provided outside the memory controller  13 . 
     The LUT  19  includes an address conversion table to convert a logical address designated from the host into a physical address of the nonvolatile memory  12 . The LUT controller  20  performs address conversion using the LUT  19 , and updates the LUT  19 . The bus  21  mutually connects the host interface  14 , the write controller  15 , the command dispatcher  16 , the memory interface  17 , the data buffer  18 , the LUT  19 , and the LUT controller  20 . 
     The write controller  15 , the command dispatcher  16 , and the memory interface  17  may be materialized as hardware, by execution of software with a built-in CPU, or as a combination thereof. It depends on the specific embodiment or design restrictions placed on the whole system whether the processing with the three controllers is achieved by hardware, software, or a combination thereof. For example, one skilled in the art can achieve processing of the three controllers with software or hardware by various methods according to respective specific embodiments, and all of them are included in the range of the present invention. 
     OPERATION EXAMPLE 
     The following is explanation of an operation example using the storage system of  FIG. 1 . 
       FIG. 7  illustrates command or status transfer between the three controllers (WC, CD, and FLH) when data is read from the nonvolatile memory with a plurality of read commands such as garbage collection and refresh, in the storage system of  FIG. 1 .  FIG. 8  illustrates a flowchart in the operation example of  FIG. 7  as viewed from the command dispatcher (CD)  16 . Steps S 1  to S 7  correspond to each other in  FIG. 7  and  FIG. 8 . 
     First, the write controller (WC)  15  constructs a command list of, for example, the batch command R 0  as illustrated in  FIG. 2 , and transfers the batch command R 0  to the command dispatcher (CD)  16 . The write controller (WC)  15  also stores the batch command R 0  in a read queue. The command dispatcher (CD)  16  refers to the batch command R 0  in the read queue, and thereafter transfers a plurality of read commands r 00 , r 10 , r 20 , r 30 , . . . , rij (i=0 to 3, j=0 to 5, in the present example) in the batch command R 0  to the memory interface (FLH)  17 , in accordance with the order indicated in the command list of the batch command R 0  (Step ST 1  to ST 2  [ST 21 ]). 
     In the present example, the nonvolatile memory serving as a read target includes two banks BANK 0  and BANK 1  and four channels CH 0 , CH 1 , CH 2 , and CH 3 , as illustrated in  FIG. 1 . In this case, read commands r 00 , r 10 , r 20 , r 30 , . . . , rij are sequentially accumulated in command queues in the memory interface (FLH)  17  that are provided in the respective banks or channels of the nonvolatile memory. The memory interface (FLH)  17  sequentially executes read commands r 00 , r 10 , r 20 , r 30 , . . . , rij accumulated in the command queues. 
     When the command dispatcher (CD)  16  verifies that the last read command rij in read commands r 00 , r 10 , r 20 , r 30 , . . . , rij is transferred, that is, all read commands r 00 , r 10 , r 20 , r 30 , . . . , rij are transferred, the command dispatcher (CD)  16  thereafter transfers dummy commands D 0 , D 1 , D 2 , and D 3  to the memory interface (FLH)  17  (ST 2  [ST 22 ] to ST 3 ). 
     In the processing, the command dispatcher (CD)  16  issues dummy commands D 0 , D 1 , D 2 , and D 3  to the respective banks or channels of the nonvolatile memory. In the present example, the command dispatcher (CD)  16  issues four dummy commands D 0 , D 1 , D 2 , and D 3  corresponding to the four channels CH 0 , CH 1 , CH 2 , and CH 3 , respectively, in bank BANK 0 . 
     Next, when the memory interface (FLH)  17  checks that a read error occurs in execution of read commands r 00 , r 10 , r 20 , r 30 , . . . , rij, the memory interface (FLH)  17  transfers an error code (a read command related to the read error) to the command dispatcher (CD)  16 . Specifically, the memory interface (FLH)  17  stores the error code in an error generation queue (Step ST 4  [ST 41 ]). 
     The command dispatcher (CD)  16  also checks whether the command related to the read error is a dummy command (Step ST 4  [ST 42 ]). 
     If the command related to the read error is not a dummy command, the command dispatcher (CD)  16  transfers the error code to the write controller (WC)  15 . Specifically, the command dispatcher (CD)  16  stores the error code in an error correction queue (Step ST 5 ). For example, if the read command related to the read error is r 05 , r 05  is stored in the error correction queue. 
     The write controller (WC)  15  refers to the error correction queue, and thereafter performs error correction (for example, error correction using RS coding). When the error correction has been completed, the write controller (WC)  15  deletes the read command related to the read error from the error correction queue, and reports the result of error correction to the command dispatcher (CD)  16 . Specifically, the write controller (CD)  15  stores the result of error correction of read command r 05  in an error correction completion queue (Step ST 6 ). 
     The command dispatcher (CD)  16  verifies with the error correction completion queue that the error correction related to read command r 05  has been completed, and thereafter checks whether any other error code is stored in the error generation queue (Step ST 6  to ST 4  [ST 41 ]). 
     The above steps ST 4  (ST 42 ), ST 5 , and ST 6  are performed again in this order, if another error code is stored in the error generation queue and the command related to the read error is not a dummy command. 
     By contrast, if another error code is stored in the error generation queue and the command related to the read error is a dummy command, the command dispatcher (CD)  16  reports completion of all read commands r 00 , r 10 , r 20 , r 30 , . . . , rij in the batch command R 0  to the write controller (WC)  15 , under the condition that all error codes related to dummy commands are stored in the error generation queue (Step ST 4  [ST 42 ], ST 4  [ST 43 ], and ST 7 ). 
     Checking the error correction completion queue in the command dispatcher (CD)  16  shows whether all the error correction results are received from the write controller (WC)  15 . 
     In the present example, a plurality of read commands in the batch command R 0  are distributed to the four channels CH 0 , CH 1 , CH 2 , and CH 3  in bank BANK 0 . For this reason, the four dummy commands D 0 , D 1 , D 2 , and D 3  are provided to correspond to the four channels. 
     Accordingly, the command dispatcher (CD)  16  reports command completion to the write controller (WC)  15  when the command dispatcher (CD)  16  receives all error codes related to the four dummy commands D 0 , D 1 , D 2 , and D 3 . Specifically, the command dispatcher (CD)  16  stores the command completion report in a read completion queue. 
     The operation example described above enables reduction in overhead per read command, because a plurality of read commands r 00 , r 10 , r 20 , r 30 , . . . , rij are issued as one batch command R 0 . This structure enables improvement in performance of the storage system, and facilitates control in the storage system. 
     In addition, even when a read error occurs, issuing dummy commands D 0 , D 1 , D 2 , and D 3  enables secure recognition of completion of all read commands r 00 , r 10 , r 20 , r 30 , . . . , rij in one batch command R 0 . 
     For example, if it is determined that all read commands r 00 , r 01 , r 02 , r 03 , r 04 , and r 05  in bank BANK 0  and in channel CH 0  have been completed when transfer of read command r 05  to the memory interface (FLH)  15  has been completed, command completion may be reported even though read command r 05  has not been completed, in the case where a read error occurs in read command r 05 . 
     However, dummy command D 0  is executed later than read commands r 00 , r 01 , r 02 , r 03 , r 04 , and r 05  in bank BANK 0  and in channel CH 0 . For this reason, the timing at which an error code related to dummy command D 0  is reported to the command dispatcher (CD)  16  is later than the timing at which the result of error correction of the read data related to read command r 05  is reported to the command dispatcher (CD)  16 . 
     Accordingly, the command dispatcher (CD)  16  can verify completion of all read commands r 00 , r 01 , r 02 , r 03 , r 04 , and r 05  in bank BANK 0  and in channel CH 0 , by checking whether the command related to the read error is a dummy command D 0 . 
     APPLICATION EXAMPLE 
       FIG. 9  illustrates an application example in which the memory device  10  is an SSD. In  FIG. 9 , constituent elements that are the same as those in  FIG. 1  are denoted by the same reference numerals. 
     The memory device (SSD)  10  includes a nonvolatile memory (NAND flash memory)  12 , a memory controller (NAND controller)  13  that controls the nonvolatile memory, and a data buffer (DRAM)  18 . 
     A plurality of commands transferred from the host  11  are registered in a queuing part in the memory controller  13  via a command decoder. Data related to the commands are temporarily stored in the data buffer  18 . The commands registered in the queuing part in the memory controller  13  are sequentially processed based on tag numbers thereof. 
       FIG. 10  illustrates an example of the NAND flash memory. 
     The NAND flash memory includes a physical block BK. 
     The physical block BK includes a plurality of cell units CU that are arranged in the first direction. Each cell unit CU includes a memory cell string extending in the second direction crossing the first direction, a transistor (FET) S 1  that is connected at one end of a current path of the memory cell string, and a transistor (FET) S 2  that is connected at the other end of the current path of the memory cell string. The memory cell string includes eight memory cells MC 0  to MC 7  having current paths that are connected in series. 
     Each memory cell MCk (k=0-7) includes a charge storage layer (for example, a floating gate electrode) FG, and a control gate electrode CG. 
     Each cell unit CU includes eight memory cells MC 0  to MC 7  in the present example, but is not limited thereto. For example, each cell unit CU may include two or more memory cells, such as 32 memory cells and 56 memory cells. In addition, each of the memory cells may be of a type capable of storing one bit, or a type capable of storing two or more bits. 
     A source line SL is connected to one end of the current path of each memory cell string via a select transistor S 1 . A bit line BLm- 1  is connected to the other end of the current path of the memory cell string via a select transistor S 2 . 
     Word lines WL 0  to WL 7  are connected in common with control gate electrodes CG of a plurality of memory cells MC 0  to MC 7  arranged in the first direction. In the same manner, a select gate line SGS is connected in common with gate electrodes of a plurality of select transistors S 1  arranged in the first direction, and a select gate line SGD is connected in common with gate electrodes of a plurality of select transistors S 2  arranged in the first direction. 
     Each physical page PP includes m memory cells that are connected to a word line WLi (i=0-7). Read/write of the nonvolatile memory is performed in the unit of physical page pp (corresponding to cluster), and erase is performed in the unit of physical block BK. 
     CONCLUSION 
     The embodiment described above enables reduction in overhead of command transfer per read command in transfer of read commands between a plurality of controllers (CPU). This enables improvement in performance of the storage system, and facilitates control in the storage system. 
     While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.