Patent ID: 12260121

DETAILED DESCRIPTION

The invention aims at providing a technical solution, storage device, and method capable of storing and recording the actual transmission history information (excluding accessed data of storage unit(s) of a flash memory device) of a specific communication interface between a flash memory controller and the flash memory device externally coupled to the flash memory controller through the specific communication interface. That is, the provided method can store and record the actual behavior of the flash memory controller, and the behavior information can be recorded and stored by the flash memory device or by the flash memory controller itself. For example, this provided method can be used to record the actual values and actual sequence of the command/address data sent from the flash memory controller into the flash memory device.

FIG.1is a diagram of an example of a storage device100comprising a flash memory controller105and a flash memory device110such as an NAND-type flash memory device including multiples chips/dies according to an embodiment of the invention.

The flash memory controller105at least comprises a processor1051and an input/output (I/O) circuit1052. The processor1051is coupled to the I/O circuit1052and is arranged to control the I/O circuit1052sending access (e.g. read, write/program, cache program, or erase) command signals/sequences through a specific communication interface to the flash memory device110to control and access the flash memory device110.

The flash memory device110comprises an I/O control circuit1101, a logic control circuit1102, a control circuit1103, a voltage generator1104such as a high-voltage generator (but not limited), an address register1105, a command register1106, a memory cell array1107, a row address decoder1108, a column address decoder1109, a specific buffer1110disposed in and controlled by the control circuit1103, a data register1112disposed between the column address decoder1109and memory cell array1107, and a status register1113.

The flash memory controller105is coupled to the flash memory device110through the specific communication interface and controls or accesses the flash memory device110by sending one or more commands into the flash memory device110. The specific communication interface for example comprises at least signal ports/pins such as data pins DQ0-DQ7or other data pins (not shown inFIG.1), and logic control pins such as CLE (Command Latch Enable), ALE (Address Latch Enable), RE (Read Enable), and other logical control pins. The data pins DQ0-DQ7are coupled to the I/O control circuit1101, and the logic control pins are coupled to the logic control circuit1102. The memory cell array1107has two or more planes (not shown inFIG.1).

In practice, when the flash memory controller105sends command data of a command signal, the flash memory controller105controls the signal of the pin ALE at a low level and controls the signal of the pin CLE at a high level so that the flash memory device110can know that the data received via the pins DQ0-DQ7is command data and then can store the received command data into the command register1106through the I/O control circuit1101. Similarly, when the flash memory controller105sends address data of the command signal, the flash memory controller105controls the signal of the pin ALE at the high level and controls the signal of the pin CLE at the low level so that the flash memory device110can know that the data received via the pins DQ0-DQ7is address data and then can store the received address data into the address register1105through the I/O control circuit1101. The operations associated with the pin RE and/or other pins (not shown inFIG.1) are not detailed for brevity. Further, when the flash memory controller105sends storage data (e.g. sector/page/block/plane data) of the command signal such as a write command signal, the flash memory controller105may control the signal of the pin ALE at the low level and control the signal of the pin CLE at the low level so that the flash memory device110can know that the data received via the pins DQ0-DQ7is the storage data and is stored by the I/O control circuit1101and then transferred into the data register1112so that the transferred storage data then can be moved from the data register1112into one or more sectors/pages/blocks/planes. Similarly, if the command signal is a read command signal, then the corresponding storage data (e.g. sector/page/block/plane data) is transmitted from the corresponding one or more sectors/pages/blocks/planes into the data register1112and then transmitted into the I/O control circuit1101so that the transmitted storage data then can be transmitted into the flash memory controller105.

In addition, the control circuit1103can control the voltage generator1104to output different voltage levels to the row address decoder1108and the column address decoder1109so that the row address decoder1108and the column address decoder1109can control the memory cell array1107performing a program operation, a cache program operation, or an erase operation according to the voltage levels, the received address(es) buffered by the address register1105, and the received command(s) buffered by the command register1106. In addition, in the embodiment, control circuit1103can control the voltage generator1104outputting different voltage levels in response to a backup operation triggered by a backup command signal received from the flash memory controller105.

The control circuit1103is arranged to control the buffer1110storing and buffering the behavior history information of the flash memory controller105, e.g. the command/address data of one or more command signal and/or the corresponding operations actually executed by the flash memory device110. For example, the buffer1110stores the information (i.e. the actual transmission history information excluding data of storage units) each time when the flash memory device110currently and actually receives the information from the flash memory controller105. In this example, the address data buffered in the address register1105can be moved and stored into the buffer1110, and similarly the command data buffered in the command register1106can be also moved and stored into the buffer1110. Once the flash memory controller105requests the data content stored in the buffer1110, a copy of the whole data content stored in the buffer1110can be transferred to the I/O control circuit1101and then transmitted to the flash memory controller105through the communication interface.

In practice, the buffer1110for example (but not limited) includes the storage space of 4 KB (the tailing ‘KB’ indicates the size of one thousand data bytes), and the control circuit1103controls the buffer1110using a specific storage format to record the actual content value of each behavior information and to record the type of the each behavior information. The specific storage format for example is a data word having two data bytes, i.e. 2B (the tailing ‘B’ indicates the size of a data byte). The data bytes initially are configured as 00h wherein the tailing ‘h’ means that the value is a hexadecimal value. The data word has a first byte and a second byte in which the first byte is used to record the actual content value and the second byte is used to record the type. For example, the second byte of the data word can be used to store or indicate the type of the currently occurred behavior information, and it may be (or comprises) a command type (i.e. CLE), an address type (i.e. ALE), a data-in type (from a host device to the flash memory device110), or a data-out type (from the flash memory device110to the host device). For example (but not limited), the second byte is configured as 01h if the type is the command type CLE, is configured as 02h if the type is the address type ALE, is configured as 03h if the type is the data-in type, and it configured as 04h if the type is the data-out type. In addition, the first byte of the data word can be used to store/indicate the actual content value of a currently received command signal if the type indicates CLE, store/indicate the actual content value of a currently received address if the type indicates ALE, store/indicate an initial value such as 00h if the type of currently received information indicates data-in, and store/indicate an initial value such as 00h if the type of currently received information indicates data-out. The following table shows the example of the format of a data word in the buffer1110:

Second byte (Byte1)First byte (Byte0)01hCLE value02hALE value03h00h (initial value)04h00h (initial value)

The initial value of the first byte Byte0can be configured as 00h, and the value of the first byte Byte0is 00h if the second byte indicates the data-in type such as 03h or the data-out type such as 04h. The value of the first byte Byte0can be set as the command value if the second byte Byte1indicates the command type such as 01h, and the value of the first byte Byte0can be set as the address value if the second byte Byte1indicates the address type such as 02h.

To request the data stored in the buffer1110, the flash memory controller105may issue and send a specific read record command signal.FIG.2is a diagram of an example of the flash memory controller105sending a specific read record command signal into the flash memory device110through the specific communication interface according to one embodiment of the invention. InFIG.2, the specific read record command signal for example sequentially comprises a read parameter command such as ECh (but not limited) and a read record address such as F0h (but not limited). When receiving the read parameter command ECh and the read record address F0h, the flash memory device110can know that the specific read record command signal is currently received and it is used to trigger or make the flash memory device110return and transmit the data information stored in the specific buffer1110to the flash memory controller105through the specific communication interface, i.e. transmitting the data contents of one or more data words in the buffer1110.

The time tR means the time period of the control circuit1103transferring the data information of the specific buffer1110into the I/O control circuit1101. Thus, after tR, the flash memory device110can transmit the data information of the specific buffer1110from the I/O control circuit1101into the flash memory controller105through the communication interface such as pins DQ0-DQ7. In this embodiment, the flash memory device110can transmit one copy or more copies of the data information of the specific buffer1110into the flash memory controller105and/or it can transmit one copy or more copies of an inverted version of the data information of the specific buffer1110into the flash memory controller105. For example (but not limited), the flash memory device110can transmit at least one set of one copy of the data information of the specific buffer1110and one copy of the corresponding inverted version. For example, the size of the specific buffer1110is equal to 4 KB, and the flash memory device110sequentially transmits the specific buffer's1110original data content 4 KB, inverted data content 4 KB, original data content 4 KB, and inverted data content 4 KB to the flash memory controller105; the operations will be explained later.

FIG.3is a diagram of an example of the flash memory controller105sending different command sequences/signals according to one embodiment of the invention. InFIG.3, the flash memory controller105for example sequentially and respectively sends four command sequences/signals. A first command signal sequentially comprises a data output command such as a read command 00h (not limited), an address information, and a corresponding confirm command such as a read confirm command 30h (not limited), wherein the address information for example includes a row address and a column address to be accessed, and it for example sequentially comprises the values of 00h, 00h, 0Ah, 01h, and 00h. A second command signal comprises a read status command such as 70h, and in this example the read status operation of the flash memory device110, involves of outputting the status of the flash memory device110to the flash memory controller105, is instantly performed after the second command signal is received. A third command signal sequentially comprises another read command such as change read command 06h, an address information, and another corresponding confirm command such as a change read confirm command E0h (not limited), wherein the address information includes a row address and a column address to be accessed, and it for example sequentially comprises the values of 00h, 20h, 0Ah, 01h, and 00h. In this example, the data output operation of the flash memory device110, involves of the third command signal sent by the flash memory controller105, is instantly performed after the third command signal is received. A fourth command signal sequentially comprises a read parameter command such as ECh (but not limited) and a read record address such as F0h (but not limited), and a data output operation of the flash memory device110, involves of outputting the record information of the flash memory device110to the flash memory controller105, is instantly performed after the fourth command signal is received.

Correspondingly, in response to that each command signal mentioned above is received and the operations are performed, the control circuit1103of the flash memory device110is arranged to make a record of the each received command signal and the performed operation in the specific buffer1110so as to store the transmission behavior occurring in the specific communication interface.

FIG.4is a diagram of an example of data information stored in the specific buffer1110of the flash memory device110according to the embodiment shown inFIG.3. The information of the four command signals inFIG.3are sequentially and respectively stored in the buffer1110step by step. For example, after receiving the first command signal, the control circuit1103makes a record of the first command signal in the specific buffer1110, so that the specific buffer1110may sequentially store seven data words (i.e. the data words in the first row of the record information inFIG.4) in which a first data word (00h, 01h) includes a first byte 00h to store the value of the received read command 00h and a second byte 01h to store and indicate that the received value/information is associated with the command type, a second data word (00h, 02h) following the first data word (00h, 01h) includes a first byte 00h to store the value of first address byte of the received address information and a second byte 02h to store and indicate that the received value/information is associated with the address type, a third data word (00h, 02h) following the second data word (00h, 02h) includes a first byte 00h to store the value of second address byte of the received address information and a second byte 02h to store and indicate that the received value/information is associated with the address type, a fourth data word (0Ah, 02h) following the third data word (00h, 02h) includes a first byte 0Ah to store the value of third address byte of the received address information and a second byte 02h to indicate that the received value/information is associated with the address type, a fifth data word (01h, 02h) following the fourth data word (Ah, 02h) includes a first byte 01h to store the value of fourth address byte of the received address information and a second byte 02h to store and indicate that the received value/information is associated with the address type, a sixth data word (00h, 02h) following the fifth data word (01h, 02h) includes a first byte 00h to store the value of fifth address byte of the received address information and a second byte 02h to store and indicate that the received value/information is associated with the address type, and a seventh data word (30h, 01h) following the sixth data word (00h, 02h) includes a first byte 30h to store the value of the received read confirm command and a second byte 01h to store and indicate that the received value/information is associated with the command type.

Similarly, after receiving the second command signal and the corresponding read status operation is performed, the control circuit1103makes a record in the specific buffer1110and the record follows the record of the first command signal, so that the specific buffer1110may sequentially store two data words (i.e. the data words in the second row of the record information inFIG.4) in which a first data word (70h, 01h) includes a first byte 70h to store the value of the received read status command 70h and a second byte 01h to store and indicate that the received value/information is associated with the command type and a second data word (00h, 04h) includes a first byte 00h (i.e. the initial value) and a second byte 04h to store and indicate that the executed operation (i.e. the flash memory device's read status operation following the received read status command 70h) is associated with the data-out type (the transmission from the flash memory device110to the flash memory controller105).

Similarly, after receiving the third command signal and the corresponding data output operation is performed, the control circuit1103makes a record in the specific buffer1110and the record follows the data word (00h, 04h) of the execute read status operation, so that the specific buffer1110may sequentially store eight data words (i.e. the data words in the third row of the record information inFIG.4) in which a first data word (06h, 01h) includes a first byte 06h to store the value of the received command 06h and a second byte 01h to store and indicate that the received value/information is associated with the command type, a second data word (00h, 02h) following the first data word (06h, 01h) includes a first byte 00h to store the value of first address byte of the received address information and a second byte 02h to store and indicate that the received value/information is associated with the address type, a third data word (20h, 02h) following the second data word (00h, 02h) includes a first byte 20h to store the value of second address byte of the received address information and a second byte 02h to store and indicate that the received value/information is associated with the address type, a fourth data word (0Ah, 02h) following the third data word (20h, 02h) includes a first byte 0Ah to store the value of third address byte of the received address information and a second byte 02h to store and indicate that the received value/information is associated with the address type, a fifth data word (01h, 02h) following the fourth data word (0Ah, 02h) includes a first byte 01h to store the value of fourth address byte of the received address information and a second byte 02h to store and indicate that the received value/information is associated with the address type, a sixth data word (00h, 02h) following the fifth data word (01h, 02h) includes a first byte 00h to store the value of fifth address byte of the received address information and a second byte 02h to store and indicate that the received value/information is associated with the address type, a seventh data word (E0h, 01h) following the sixth data word (00h, 02h) includes a first byte E0h to store the value of the received confirm command E0h and a second byte 01h to store and indicate that the received value/information is associated with the command type, and an eighth data word (00h, 04h) following the seventh data word (E0h, 01h) includes a first byte 00h (i.e. the initial value) and a second byte 04h to indicate that the executed operation (i.e. the flash memory device's change read operation following the command E0h) is associated with the data-out type.

Similarly, after receiving the fourth command signal, the control circuit1103makes a record in the specific buffer1110and the record follows the data word (00h, 04h) of the execute data output operation, so that the specific buffer1110may sequentially store three data words (i.e. the data words in the fourth row of the record information inFIG.4) in which a first data word (ECh, 01h) includes a first byte ECh to store the value of the received command ECh and a second byte 01h to store and indicate that the received value/information is associated with the command type, a second data word (F0h, 02h) includes a first byte F0h to store the value of the specific address F0h and a second byte 02h to store and indicate that the received value/information is associated with the address type, and a third data word (00h, 04h) includes a first byte 00h (i.e. the initial value) and a second byte 04h to store and indicate that the to be executed operation (i.e. the flash memory device's report record operation following the received command ECh) is associated with the data-out type.

It should be noted that, in this example (but not limited), the current pointer position/index of the specific buffer1110, which initially is equal to zero, is used to indicate the index position corresponding to the last one recorded data word stored by the control circuit1103, will be updated and incremented by one once a data word is stored by the control circuit1103, and will be reset as zero if the current pointer position reaches the bottom of the specific buffer1110and a next data word is recorded into the specific buffer1110, is at the beginning index position such as 0. That is, the current pointer position/index is updated in a rounded/circular manner. Thus, the record information is stored into the specific buffer1110at the top/beginning of the 4 KB data of the specific buffer1110, and the information of the other remaining data words following the record information may be configured as the initial data word (00h, 00h). In another example, the current pointer position/index of the specific buffer1110may be different and for example may be close to the bottom of the 4 KB data of the specific buffer1110, and thus a first portion of the record information may be stored at the bottom/end of 4 KB data of the specific buffer1110and a second portion (following the first portion) of the record information may be stored at the top/beginning of 4 KB data of the specific buffer1110. That is, initially the specific buffer1110may store the 4 KB data formed by a sequence of 00h (initial values), and the specific buffer1110is arranged to store the above-mentioned data words from the top of the specific buffer1110to replace the corresponding words/bytes of 00h. The values of the other remaining bytes are 00h.

Further, it should be noted that the record information shown inFIG.4is merely illustrative purposes and in practice the record information is merely a sequence of data words which are not arranged in four rows.

When the record information inFIG.4has been completely stored in the specific buffer1110, in response to the reception of the command ECh with the address F0h, the control circuit1103controls the specific buffer1110outputting and transmitting one copy of the totally buffered information (i.e. all the data stored in the buffer1110) into the I/O control circuit1101and then the one copy of the totally buffered information can be transferred from the I/O control circuit1101into the flash memory controller105through the communication interface. In the embodiment, for example (but not limited), the control circuit1103controls the specific buffer1110sequentially outputting a sequence of data words totally buffered in the buffer1110one data word by one data word from the buffer's1110next pointer position (i.e. the position next to the current pointer position) to the bottom position and then from the top position to the current pointer position. That is, the control circuit1103controls the specific buffer1110outputting the other remaining information having initial values and then outputting the record information.

FIG.5is a diagram of an example of the actually reported buffer data information transmitted from the flash memory device110into the flash memory controller105according to the embodiment shown inFIG.4. InFIG.5, the actually reported buffer data information 4 KB sequentially comprises the reported other information having initial values (00h, 00h) and the reported record information as shown inFIG.5. The actually reported buffer data information 4 KB is similarly formed by a sequence of data words in which equivalently a first portion comprises the initial values (00h, 00h) and a second portion comprises the reported record information as shown inFIG.5. In other embodiment, the control circuit1103may control the specific buffer1110directly outputting the data information stored in the buffer1110from the top to the bottom. This modification also falls within the scope of the invention.

Further, in one embodiment, to avoid errors generated during the data transmission through the communication interface, the control circuit1103may further generate an inverted data version of one copy of the data information 4 KB shown inFIG.5based on the data stored in the buffer1110by inverting each data word included by the copy of the data information 4 KB.FIG.6is a diagram of an example of an inverted data version of the reported buffer data information transmitted from the flash memory device110into the flash memory controller105according to the embodiment shown inFIG.5. InFIG.6, the additionally reported buffer data information 4 KB is an inverted data version of the 4 KB buffer data ofFIG.5and it sequentially comprises the inverted values (FFh, FFh) of the initial values (00h, 00h) and the inverted data of the reported record information ofFIG.5. The additionally reported inverted 4 KB data is also similarly formed by a sequence of data words in which equivalently a first portion comprises the values (FFh, FFh) and a second portion comprises the inverted version of the reported record information inFIG.5. In other embodiment, the control circuit1103may control the specific buffer1110directly generating and outputting an inverted data version of the data information stored in the buffer1110from the top to the bottom. This modification also falls within the scope of the invention.

FIG.7is a diagram showing different examples of the reported data transmitted from the flash memory device110into the flash memory controller105according to the different embodiments. In the example (a), in response to the reception of a specific read record command signal, which for example sequentially comprises a read parameter command such as ECh (but not limited) and a read record address such as F0h (but not limited), after waiting for the time period tR to transfer the data information of the specific buffer1110into the I/O control circuit1101, the flash memory device110transmits only one copy of the reported 4 KB buffer data Buff (e.g. the reported buffer data inFIG.5) into the flash memory controller105without sending a corresponding inverted data version of the 4 KB buffer data Buff. In another example (b), in response to the reception of a specific read record command signal, which for example sequentially comprises a read parameter command such as ECh (but not limited) and a read record address such as F0h (but not limited), after waiting for the time period tR to transfer the data information of the specific buffer1110into the I/O control circuit1101, the flash memory device110transmits two copies of the reported 4 KB buffer data Buff (e.g. the reported buffer data inFIG.5) into the flash memory controller105without sending a corresponding inverted data version of the 4 KB buffer data Buff. In another example (c), in response to the reception of a specific read record command signal, which for example sequentially comprises a read parameter command such as ECh (but not limited) and a read record address such as F0h (but not limited), after waiting for the time period tR to transfer the data information of the specific buffer1110into the I/O control circuit1101, the flash memory device110transmits one copy of the reported 4 KB buffer data Buff (e.g. the reported buffer data in FIG.5) into the flash memory controller105and then further transmits an corresponding inverted 4 KB dataBuffof the 4 KB buffer data Buff. In another example (d), in response to the reception of a specific read record command signal, which for example sequentially comprises a read parameter command such as ECh (but not limited) and a read record address such as F0h (but not limited), after waiting for the time period tR to transfer the data information of the specific buffer1110into the I/O control circuit1101, the flash memory device110transmits one set of the reported 4 KB buffer data Buff and corresponding inverted 4 KB dataBuffand then further send the same data set of reported 4 KB buffer data Buff and corresponding inverted 4 KB dataBuffagain.

By further sending the inverted 4 KB dataBuffor sending the 4 KB buffer data Buff with the inverted 4 KB data Bufffor multiple times, the flash memory controller105(or processor1051) after receiving the data can compare and check whether the 4 KB buffer data Buff is correct or not. For example (but not limited), the processor1051can invert the data words of the inverted 4 KB data Buffto obtain a third 4 KB data and then compare the obtained third 4 KB data is equal to or match to the received 4 KB buffer data Buff so as to determine whether an error occurs in the received 4 KB buffer data Buff during the transmission of the specific communication interface.

In one embodiment, the data information stored in the specific buffer1110can be additionally backed up and stored into one or more storage units such as sectors, pages, blocks, or planes in the memory cell array1107, and thus the backed up data information will not disappear after the flash memory device110is powered off.FIG.8is a diagram of another example of the storage device100comprising the flash memory controller105and the flash memory device110such as an NAND-type flash memory device including multiples chips/dies according to another embodiment of the invention. InFIG.8, the specific buffer110is further coupled to the data register1112, and the control circuit1103can output and transmit the whole buffer data such as 4 KB in the specific buffer1110into the data register1112and control the voltage generator1104outputs voltage levels to control the column address decoder1109and row address decoder1108to write the whole buffer data 4 KB from the data register1112into corresponding one or more storage unit in the memory cell array1107. In other embodiment, the control circuit1103may output and transmit partial buffer data (e.g. smaller than 4 KB) in the specific buffer1110into the data register1112and control the voltage generator1104outputs voltage levels to control the column address decoder1109and row address decoder1108to write the partial buffer data from the data register1112into corresponding one or more storage unit in the memory cell array1107. The modification also obeys the spirits of the invention.

FIG.9is a diagram of an example of the flash memory controller105triggering or controlling the flash memory device110writing/programming the buffer data of the specific buffer1110into the memory cell array1107according to an embodiment of the invention. InFIG.9, the flash memory controller105for example may send a specific write record command signal into the flash memory device110through the specific communication interface, wherein the specific write record command signal may sequentially comprise a write command such as 80h, the address information such as five address bytes respectively indicated by Addr, and a write record confirm command such as 13h that is different from a normal write confirm command. After receiving such specific write record command signal, the control circuit1103of flash memory device110can write/program or back up the buffer data of the buffer1110into one or more storage units of the memory cell array1107. In addition, the control circuit1103may write/program or back up a corresponding inverted data version of the buffer data of the buffer1110into one or more storage units of the memory cell array1107. In addition, the control circuit1103may write/program or back up the data information of the current pointer position of the buffer data of the buffer1110into one or more storage units of the memory cell array1107. In the bottom example ofFIG.9, the flash memory device110for example (but not limited) program and write the data set of reported 4 KB buffer data Buff and corresponding inverted 4 KB dataBufffor two times into the memory cell array1107and then program and write the data set Ptr (e.g. 2B) of a current pointer position with a corresponding inverted data versionPtr(e.g. 2B) of the current pointer position for two times into the memory cell array1107. The number of the transmission between the flash memory controller105and flash memory device110is intended to be a limitation.

In other embodiment, the operation of writing and programming the buffer data into the memory cell array1107can employ a multi-plane program method.FIG.10is a diagram of an example of the flash memory controller105triggering or controlling the flash memory device110writing/programming the buffer data of the specific buffer1110into more storage units disposed in multiple different planes of the memory cell array1107according to an embodiment of the invention. InFIG.10, the flash memory controller105for example may send a specific multi-plane write record command signal into the flash memory device110through the specific communication interface, wherein the specific multi-plane write record command signal may sequentially comprise a write command such as 80h, the address information such as five address bytes respectively indicated by Addr, and a multi-plane write record confirm command such as 16h that is different from a normal write confirm command and the single plane write record confirm command 13h. After receiving such specific multi-plane write record command signal, the control circuit1103of flash memory device110can write/program or back up the buffer data of the buffer1110into more storage units disposed in multiple different planes of the memory cell array1107. Similarly, the control circuit1103may write/program or back up a corresponding inverted data version of the buffer data of the buffer1110into more storage units disposed in multiple different planes of the memory cell array1107. Similarly, the control circuit1103may write/program or back up the data information (and/or corresponding inverted data version) of the current pointer position of the buffer data of the buffer1110into more storage units disposed in multiple different planes of the memory cell array1107.

Since the buffer data may be not encoded or not protected, in one embodiment, in order to more correctly write/program the buffer data into one or more storage units in the memory cell array1107, the control circuit1103may control the voltage generator1104to output different voltage levels to control the row address decoder1108and column address decoder1109so as to reduce or minimize the data error probability.FIG.11is a diagram of a comparison between the threshold voltage distribution of the disclosed SLC program method and the threshold voltage distribution of a conventional SLC program operation. In the bottom ofFIG.11, the erase state and the program state (i.e. SLC program state) of the conventional SLC program operation can be ideally separated by a first threshold voltage Vth1, i.e. the lower voltage level. However, actually, since the buffer data may be not encoded or not protected, the data error probability will become abnormally higher once the voltage distribution of the program state varies, becomes wider, and crosses the lower voltage level Vth1. In order to significantly increase the reliability, in the disclosed SLC program method, the control circuit1103controls the voltage generator1104outputting different voltage levels to control the row address decoder1108and column address decoder1109to make the voltage distribution of the SLC program state become narrower (e.g. the shapes of the voltage distributions of the SLC program state and erase state may be similar or identical) as well as to make the higher voltage level (i.e. a second threshold voltage Vth2) clearly separate the voltage distributions of the SLC program state and erase state. Thus, even though the buffer data may be not encoded and the voltage distribution of the SLC program state may become wider, the wider voltage distribution of the SLC program state does not easily cross the threshold voltage Vth1. This can significantly reduce the error probability.

In other embodiments, the buffer data of the specific buffer1110may be copied into another different backup buffer to protect the specific buffer1110.FIG.12is a diagram of another example of the storage device100according to another embodiment of the invention. Compared to the embodiment ofFIG.8, the control circuit1103further comprises a specific counter and a backup buffer1111; in another embodiment, the backup buffer1111can be disposed in the flash memory device110and externally coupled to the control circuit1103and memory cell array1107. The control circuit1103can copy and transmit the buffer data from the specific buffer1110into the backup buffer1111in response to the request (e.g. a specific backup record command signal) sent from the flash memory controller105. The specific counter has a counting value which is initially equal to zero and is incremented by one each time when the flash memory device110receives a specific backup record command signal sent from the flash memory controller105. When the flash memory device110receives a specific backup record command signal, the control circuit1103is arranged to copy and transmit the whole buffer data (e.g. including record information and other remaining initial values) of the specific buffer1110into the backup buffer1111, to use the current pointer position of the specific buffer1110as a current pointer position of the backup buffer1111, to make a record of the backup record command signal into and at data word(s) of the backup buffer1111from a start position indicated by the current pointer position, and then to record the counting value of the specific counter into a next data word following the recorded data words corresponding to the backup record command signal in the backup buffer1111. That is, the control circuit1103is arranged to store and record a received latest backup record command signal and the corresponding latest version information into the backup buffer1111. Thus, the control circuit1103can correctly and appropriately find the record information of the latest backup record command signal to correctly generate and obtain a sequence of data words from the data of the backup buffer1111even though more backup record command signals are stored in the backup buffer1111.

FIG.13is a diagram of the different examples of the flash memory controller105respectively sending a specific backup record command signal and sending a read backup record command signal into the flash memory device110through the specific communication interface according to different embodiments of the invention. In the top example ofFIG.13, the flash memory controller105sends a backup record command signal (e.g. a write backup data command signal) into the flash memory device110through the specific communication interface, and the backup record command signal sequentially comprises a buffer backup command such as D8h (but not limited) and a backup confirm command. When the flash memory device110receives such backup record command signal, the control circuit1103can copy and transmit the buffer data from the specific buffer1110into the backup buffer1111; the operations are detailed in the previous paragraph. Further, in the bottom example ofFIG.13, the flash memory controller105may send a specific read backup record command signal into the flash memory device110through the specific communication interface, and the specific read backup record command signal for example sequentially comprises a read parameter command such as ECh (but not limited) and a read backup record address such as F1h (but not limited) that is different from the read record address F0h. When receiving the read parameter command ECh and the read backup record address F1h, the flash memory device110(or control circuit1103) can know that the specific read backup record command signal is currently received and it is used to trigger or make the flash memory device110return and transmit the data information stored in the backup buffer1111to the flash memory controller105through the specific communication interface, i.e. transmitting the data contents of one or more data words in the backup buffer1111. Similarly, the time tR means the time period of the control circuit1103transferring the data information (i.e. backup record information) of the backup buffer1111into the I/O control circuit1101. Thus, after tR, the flash memory device110can transmit the data information of the backup buffer1111from the I/O control circuit1101into the flash memory controller105through the communication interface such as pins DQ0-DQ7. In this embodiment, the flash memory device110can transmit one copy or more copies of the data information of the backup buffer1111into the flash memory controller105and/or it can transmit one copy or more copies of an inverted version of the data information of the backup buffer1111into the flash memory controller105. For example (but not limited), the flash memory device110can transmit at least one set of one copy of the data information of the backup buffer1111and one copy of the corresponding inverted version. For example, the size of the backup buffer1111is equal to 4 KB (but not limited), and the flash memory device110sequentially transmits the backup buffer's1111original data content 4 KB, inverted data content 4 KB, original data content 4 KB, and inverted data content 4 KB to the flash memory controller105; the operations will be explained later.

In addition, the operation of writing/programming the buffer data of a buffer into one or more storage units of the memory cell array1107can be applied into the backup buffer1111; that is, the operations mentioned in the embodiments ofFIGS.9-11can be similarly applied into the operation of the backup buffer1111.FIG.14is a diagram of the examples of the flash memory controller105triggering or controlling the flash memory device110respectively writing/programming the buffer data of the specific buffer1110and writing/programming the buffer data of the backup buffer1111into the memory cell array1107by using different prefix commands such as prefix commands 01h and 02h according to different embodiments of the invention. In the top example ofFIG.14, the flash memory controller105for example may send a first write record command signal into the flash memory device110through the specific communication interface, wherein the first write record command signal may sequentially comprise a first prefix command such as 01h, a write command such as 80h, the address information such as five address bytes respectively indicated by Addr, and a write record confirm command such as 13h that is different from a normal write confirm command. After receiving such first write record command signal, the control circuit1103of flash memory device110can write/program or back up the buffer data of the specific buffer1110into one or more storage units of the memory cell array1107based on the prefix command 01h which indicates the specific buffer1110. In the bottom example ofFIG.14, the flash memory controller105for example may send a second write record command signal (i.e. a write backup record command signal) into the flash memory device110through the specific communication interface, wherein the second write record command signal may sequentially comprise a second prefix command such as 02h, a write command such as 80h, the address information such as five address bytes respectively indicated by Addr, and a write record confirm command such as 13h that is different from a normal write confirm command. After receiving such second write record command signal, the control circuit1103of flash memory device110can write/program or back up the buffer data of the backup buffer1111into one or more storage units of the memory cell array1107based on the prefix command 02h which indicates the backup buffer1111.

Similarly, in other embodiment, the operation of writing and programming the buffer data of the backup buffer1111into the memory cell array1107can employ a multi-plane program method. The corresponding operations are not detailed for brevity.

Further, it should be noted that in other embodiments the above-mentioned at least one command may be implemented by using other different command(s) which can be configured to be different from a standard command (or a vendor specific command) and may be implemented by using reserved command(s) such as 0Bh, 12h, 14h, 18h, 1Bh-1Ch, 62h-64h, AAh, 76h, 82h-83h, 86h, and 8Eh wherein ‘h’ means hexadecimal. The following table shows the different examples of the reserved commands which can be used to implement the command(s):

TypeOpcodeStandard00h, 05h - 06h, 10h - 11h, 15h, 30h - 32h, 35h, 3Fh, 60h,Command70h, 78h, 80h - 81h, 85h, 90h, D0h - D1h, D4h - D5h, D9h,SetE0h - E2h, ECh - EFh, F1h - F2h, F9h, FAh, FCh, FFhVendor01h - 04h, 07h - 0Ah, 0Ch - 0Fh, 13h, 16h - 17h,Specific19h - 1Ah, 1Dh - 2Fh, 33h - 34h, 36h - 3Eh, 40h - 5Fh,61h, 65h - 6Fh, 71h - 75h, 77h, 79h - 7Fh, 84h,87h - 8Dh, 8Fh, 91h - CFh, D2h - D3h, D6h - D8h,DAh - DFh, E3h - EBh, F0h, F3h - F8h, FBh, FD - FEhReserved0Bh, 12h, 14h, 18h, 1Bh - 1Ch, 62h - 64h, 76h,82h - 83h, 86h, 8Eh

Additionally, in other embodiments, the above-mentioned operations of the flash memory device's110storing and recording the actual transmission history information (excluding accessed data of storage unit(s) of the flash memory device110) of the specific communication interface can be implemented in a flash memory controller. That is, the flash memory controller can store and record its actual behavior of the flash memory controller, and it can be used to record the actual values and actual sequence of the command/address data sent from the flash memory controller by itself.

Refer toFIG.15in conjunction ofFIG.16.FIG.15is a diagram of an example of a storage device5300comprising a flash memory controller5310and a flash memory device5320such as an NAND-type flash memory device including multiples chips/dies according to embodiments of the invention.FIG.16is a diagram of an example of a channel controller including an I/O circuit in the embodiment ofFIG.15. InFIG.15, the storage device5300for example is a memory device and is externally coupled to the host device5350, and it may be arranged for providing the host device5350with storage space, and obtaining one or more driving voltages from the host device5350as power source of the storage device5300. Examples of the host device5350may include, but are not limited to: a multifunctional mobile phone, a wearable device, a tablet computer, and a personal computer such as a desktop computer and a laptop computer. Examples of the storage device5300may include, but are not limited to: a solid state drive (SSD), and various types of embedded memory devices such as that conforming to Peripheral Component Interconnect Express (PCIe) specification, etc. According to this embodiment, the storage device5300may comprise a flash memory controller5310, and may further comprise a flash memory device5320, where the flash memory controller5310is arranged to control operations of the storage device5300and access the flash memory device/module5320, and the flash memory device5320is arranged to store information. The flash memory device5320may comprise at least one flash memory chip. The operations and functions of the flash memory controller5310are similar to those of flash memory controller105ofFIG.1, and the operations and functions of the flash memory device5320are similar to those of flash memory device110.

In practice, as shown inFIG.15, the flash memory controller5310may comprise the processor5312(including the operations and functions similar to those of processor1051ofFIG.1) such as a microprocessor, a control logic circuit5314, a buffer5316such as a static random access memory (SRAM), a backup buffer5316′ such as SRAM, and a transmission interface circuit5318, where the above components may be coupled to one another via a bus. The buffer5316provides the flash memory controller5310with internal storage space. The control logic circuit5314controls the flash memory device5320, and it may comprise an encoder5331, a decoder5332, a randomizer5333, a de-randomizer5334, a comparison circuit5324, and an I/O control circuit5326which includes the operations and functions similar to those of the I/O circuit1052ofFIG.1.

The transmission interface circuit5318may conform to the communication specification such as Serial Advanced Technology Attachment (Serial ATA, or SATA) specification, Peripheral Component Interconnect (PCI) specification, Peripheral Component Interconnect Express (PCIe) specification, UFS specification, etc., and it performs communications according to such communication specification, for example, performs communication with the host device5350for the storage device5300. The host device5350may comprise the transmission corresponding interface circuit conforming to the above-mentioned communication specification, for performing communications with the storage device5300for the host device5350.

The host device5350may transmit host commands and corresponding logical addresses to the flash memory controller5310to access the storage device5300. The flash memory controller5310receives the host commands and the logical addresses, and translates the host commands into memory operating commands (which may be simply referred to as operating commands), and further controls the flash memory device5320by sending at least one command signal which may be write/program, read, erase, trim, or other command signal(s) to perform reading, writing/programing, erasing, trimming, or other operations upon one or more storage units having physical addresses within the flash memory device5320. The physical addresses correspond to the logical addresses.

The encoder5331is arranged to correspondingly generate error correction code (ECC) data in response to input data which may be sent from the host device5350and to be stored into one or more storage units of the flash memory device5320. The transmission of the input data with the generated ECC data will follow a write command signal sent from the flash memory controller5310into the flash memory device5320through the specific communication interface so as to avoid data errors. Correspondingly, the decoder5332is arranged to calculate the number of errors in data read from the flash memory device5320and to correct the errors in the read data by using ECC data. The randomizer5333is arranged to adjust the input data (or the input data with ECC data), which may be sent from the host device5350and to be stored into one or more storage units of the flash memory device5320, in order by using a seed value to generate encoded data so as to provide the protection. The de-randomizer5334is arranged to an inverse operation of that of the randomizer5333to generate decoded data.

The above command signal(s) and/or the encoded/decoded data are transferred the control logic circuit5314and the flash memory device5320through the specific communication interface by using the I/O circuit5326. As shown inFIG.15, the I/O circuit5326comprises a plurality of channel controllers5322which respectively are coupled to and correspond to the different channels of the memory cell array1107included by the flash memory device5320, and each channel controller5322operate independently and individually. As shown inFIG.16, a channel controller5322comprises an arbitrator5328and a plurality of queues5330which are respectively coupled to the arbitrator5328. The different queues5330of the same channel are respectively coupled to and correspond to different chips/dies of the same channel in the flash memory device5320.

When the processor5312issues and sends different command signals through the bus into the I/O circuit5326, the different command signals corresponding to the same channel may be respectively buffered in the different queues5330of the same channel, and then the arbitrator5328appropriately selects, outputs, and transmits the selected command signals into the flash memory device5320through the specific communication interface according to the different conditions/statuses of the different chips/dies of the same channel. That is, the arbitrator5328can appropriately determine the order of the command signals buffered in the queues5330and to be passed into the flash memory device5320.

In the embodiments, when a command signal is selected, outputted, and transmitted from the queue5330into the flash memory device5320through the specific communication interface, based on the same operations and functions, the command/address information of the command signal can be stored and recorded into the buffer5316by using the specific format such as the above-mentioned data word in which a first byte stores the actual value of the recorded information and a second byte is used to store and indicate the type. In addition, a behavior operation such as a data-output operation executed by the flash memory device5320can be also stored and recorded into the buffer5316based on the format of the data word.

For example (but not limited), the I/O circuit5326may be configured to have the operations and functions similar to those of the control circuit1103in the embodiments ofFIG.1,FIG.8and/orFIG.12. For instance, the I/O circuit5326may store the behavior history information of the flash memory controller5310, e.g. the command/address data of one or more command signal and/or the corresponding operations actually executed by the flash memory device5320into the buffer5316. For example, the buffer5316stores the information (i.e. the actual transmission history information excluding data of storage units) each time when the flash memory controller5310currently and actually outputs the information into the flash memory device5320.

In practice, the buffer5316for example (but not limited) includes the storage space of 4 KB (the tailing ‘KB’ indicates the size of one thousand data bytes), and the I/O circuit5326controls the buffer5316using a specific storage format to record the actual content value of each behavior information and to record the type of the each behavior information. The specific storage format for example is a data word mentioned above in the previous paragraphs and is not detailed for brevity. For example, in the examples of command signals ofFIG.3, the buffer5316can similarly store and record the 4 KB data as shown inFIG.4. The other operations are similar and not detailed again.

In other embodiments, the buffer data of the specific buffer5316may be copied into another different backup buffer to protect the specific buffer5316. The I/O circuit5326(or processor5312) can copy and transmit the buffer data from the specific buffer5316into the backup buffer5316′ in response to the request of the flash memory controller5310. In practice, the I/O circuit5326may has an operation of a specific counter to output a counting value which is initially equal to zero and is incremented by one each time when the flash memory controller5310copies the data content from the buffer5316into the backup buffer5316′. For example, the I/O circuit5326is arranged to copy and transmit the whole buffer data (e.g. including record information and other remaining initial values) of the specific buffer5316into the backup buffer5316′, to use the current pointer position of the specific buffer5316as a current pointer position of the backup buffer5316′ and then to record the counting value of the specific counter into a next data word following the latest recorded data word in the backup buffer5316′. Thus, the I/O circuit5326can correctly and appropriately find the actual values of the latest recorded information in the backup buffer5316′ to correctly generate and obtain a sequence of data words from the data of the backup buffer5316′.

Further, in one embodiment, the comparison circuit5324can be used to fetch and obtain the buffer data from the specific buffer5316(or from the backup buffer5316′), to receive and obtain the buffer data of the buffer1110(or the backup buffer1111) sent from the flash memory device5320through the specific communication interface, and then to compare the fetched buffer data originally stored by the flash memory controller5310with the received buffer data originally stored by the flash memory device5320to determine whether data error occur or not. This can significantly improve the reliability of data protection for buffering and recording the actual transmission history information of the specific communication interface between the flash memory device5320and the flash memory controller5310. In addition, the record information before stored into the buffer5316can be further encoded and protected by an encoding engine such as the encoder5331or by the comparison circuit5324to provide a better data protection, and the encoded record information can be correspondingly decoded by the decoder5332or by the comparison circuit5324. By doing so, the comparison circuit5324for example may decode the encoded buffer data stored in the buffer5316to generate the decoded buffer data and then compare the decoded buffer data with the received buffer data originally stored by the flash memory device5320to determine whether data error occur or not.

Further, the processor5312equivalently may issue and generate a command signal into the control logic circuit5314though the bus, and the command signal is buffered in a specific queue of a specific channel controller of the I/O circuit5322. The arbitrator5328, may control the specific buffer5316storing a first transmission history information of the specific communication interface. The first transmission history information of the specific communication interface comprises at least one of: a data content and a data type of command information of the command signal when the command signal is selected by the arbitrator5328to output the command signal into the flash memory device5320, a data content and a data type of address information of the command signal when the command signal is selected by the arbitrator5328to output the command signal into the flash memory device5320, and a data type of a data input/output operation executed by the flash memory device5320. The flash memory controller5310is arranged to control the flash memory device5320storing and recording a second transmission history information of the specific communication interface in a specific buffer (e.g.1110inFIG.1) of the flash memory device5320/110, to transmit the second transmission history information from the specific buffer (e.g.1110inFIG.1) into a data register (e.g.1112inFIG.1) of the flash memory device5320/110, and then to write the second transmission history information from the data register (e.g.1112inFIG.1) into at least one storage unit of a memory cell array (e.g.1107inFIG.1) of the flash memory device5320/110. The comparison circuit5324is arranged to compare the second transmission history information, sent from the flash memory device5320/110, with the first transmission history information stored in the specific buffer5316of the flash memory controller5310to determine whether an error occurs or not. It should be noted that the flash memory controllers5310/105may have the same or similar operations, functions, and circuit components, and the flash memory devices5320/110may also have the same or similar operations, functions, and circuit components; this is not detailed again for brevity.

Further, it should be noted that the examples of command signals shown inFIG.3are merely used for illustrative purposes and not intended to be a limitation. In other embodiment, the address/command data of any type command signal can be recorded and stored into the specific buffer1110ofFIG.1.

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.