Non-volatile memory accessing method using data protection with aid of look-ahead processing, and associated apparatus
11169878 · 2021-11-09
Assignee
Inventors
Cpc classification
G06F3/0659
PHYSICS
H03M13/1102
ELECTRICITY
G11C29/52
PHYSICS
G06F11/1048
PHYSICS
G06F2212/1032
PHYSICS
G06F3/0679
PHYSICS
G06F2212/7208
PHYSICS
H03M13/611
ELECTRICITY
H03M13/6502
ELECTRICITY
International classification
G06F11/10
PHYSICS
G11C29/52
PHYSICS
H03M13/29
ELECTRICITY
Abstract
A non-volatile (NV) memory accessing method using data protection with aid of look-ahead processing, and associated apparatus such as memory device, controller and encoding circuit thereof are provided. The NV memory accessing method may include: receiving a write command and data from a host device; obtaining at least one portion of data to be a plurality of messages, to generate a plurality of parity codes through look-ahead type encoding, wherein regarding a message: starting encoding a first partial message to generate a first encoded result; applying predetermined input response information to a second partial message to generate a second encoded result, and combining the first and the second encoded results to generate a first partial parity code; and starting encoding the message to generate a second partial parity code, and outputting the first and the second partial parity codes to generate a parity code; and writing into the NV memory.
Claims
1. A non-volatile (NV) memory accessing method using data protection with aid of look-ahead processing, the NV memory accessing method being applicable to a memory controller of a memory device, the memory device comprising the memory controller and an NV memory, the NV memory comprising at least one NV memory element, the NV memory accessing method comprising: utilizing the memory controller to receive a write command and data corresponding to the write command from a host device, wherein the data comprises a plurality of messages; regarding the look-ahead processing in an encoding circuit of the memory controller, after a first partial message of a message among the plurality of messages is sent into the encoding circuit, starting encoding the first partial message to generate a first encoded result; after a second partial message of the message is sent into the encoding circuit, applying predetermined input response information to the second partial message to generate a second encoded result, and combining the first encoded result and the second encoded result to generate a first partial parity code of a parity code among a plurality of parity codes respectively corresponding to the plurality of messages; after the message is fully sent into the encoding circuit, starting encoding the message to generate a second partial parity code of the parity code, and outputting the first partial parity code and the second partial parity code to generate the parity code; and utilizing the memory controller to write an error correction code (ECC) chunk comprising the plurality of messages and the plurality of parity codes into the NV memory.
2. The NV memory accessing method of claim 1, wherein the message comprises a set of message bits; and the first partial message comprises a plurality of beginning bits within the set of message bits, and the second partial message comprises a plurality of remaining bits within the set of message bits.
3. The NV memory accessing method of claim 2, wherein the predetermined input response information comprises a plurality of basis parity codes respectively corresponding to a plurality of bases, and each basis of the plurality of bases comprises a plurality of basis bits; and a bit count of the plurality of remaining bits within the set of message bits and a bit count of the plurality of basis bits are equal to each other.
4. The NV memory accessing method of claim 1, wherein the parity code comprises a set of parity bits; and the first partial parity code comprises a plurality of beginning bits within the set of parity bits, and the second partial parity code comprises a plurality of remaining bits within the set of parity bits.
5. The NV memory accessing method of claim 4, wherein the predetermined input response information comprises a plurality of basis parity codes respectively corresponding to a plurality of bases, and each basis parity code of the plurality of basis parity codes comprises a plurality of basis parity bits; and a bit count of the plurality of beginning bits within the set of parity bits and a bit count of the plurality of basis parity bits are equal to each other.
6. The NV memory accessing method of claim 5, wherein both of a bit count of the first encoded result and a bit count of the second encoded result are equal to the bit count of the plurality of beginning bits within the set of parity bits.
7. The NV memory accessing method of claim 4, wherein both of a bit count of the first encoded result and a bit count of the second encoded result are equal to a bit count of the plurality of beginning bits within the set of parity bits.
8. The NV memory accessing method of claim 1, wherein the predetermined input response information comprises a plurality of basis parity codes respectively corresponding to a plurality of bases; and applying the predetermined input response information to the second partial message to generate the second encoded result comprises: multiplying the plurality of basis parity codes by a plurality of bits of the second partial message to generate a plurality of multiplying results, respectively; and combining the plurality of multiplying results to generate the second encoded result.
9. The NV memory accessing method of claim 8, wherein: multiplying the plurality of basis parity codes by the plurality of bits of the second partial message to generate the plurality of multiplying results respectively comprises: performing a plurality of AND operations on the plurality of basis parity codes and the plurality of bits of the second partial message to generate the plurality of multiplying results, respectively; and combining the plurality of multiplying results to generate the second encoded result comprises: performing a plurality of exclusive-OR (XOR) operations on the plurality of multiplying results to generate the second encoded result; wherein through the plurality of AND operations and the plurality of XOR operations, applying the predetermined input response information to the second partial message to generate the second encoded result is completed within a predetermined time after the second partial message is sent into the encoding circuit.
10. The NV memory accessing method of claim 9, wherein: combining the first encoded result and the second encoded result to generate the first partial parity code of the parity code corresponding to the message comprises: performing an XOR operation on the first encoded result and the second encoded result to generate the first partial parity code of the parity code; wherein through the plurality of AND operations, the plurality of XOR operations and the XOR operation, applying the predetermined input response information to the second partial message to generate the second encoded result and combining the first encoded result and the second encoded result to generate the first partial parity code of the parity code corresponding to the message are completed within the predetermined time after the second partial message is sent into the encoding circuit.
11. The NV memory accessing method of claim 10, wherein through the plurality of AND operations, the plurality of XOR operations and the XOR operation, a time of preparing any bit of the first partial parity code is within one clock cycle.
12. The NV memory accessing method of claim 10, wherein through at least one portion of the plurality of AND operations, the plurality of XOR operations and the XOR operation, a time of preparing a first bit of the first partial parity code is within one clock cycle after the second partial message is sent into the encoding circuit.
13. The NV memory accessing method of claim 9, wherein through the plurality of AND operations and the plurality of XOR operations, a time of preparing any bit of the second encoded result is within one clock cycle.
14. The NV memory accessing method of claim 9, wherein through at least one portion of the plurality of AND operations and the plurality of XOR operations, a time of preparing a first bit of the second encoded result is within one clock cycle after the second partial message is sent into the encoding circuit.
15. A memory device, comprising: a non-volatile (NV) memory, arranged to store information, wherein the NV memory comprises at least one NV memory element; and a memory controller, coupled to the NV memory, arranged to control operations of the memory device, wherein the memory controller comprises: a processing circuit, arranged to control the memory controller according to a plurality of host commands from a host device, to allow the host device to access the NV memory through the memory controller; and a control logic circuit, coupled to the processing circuit, arranged to control the NV memory, wherein the control logic circuit comprises: an encoding circuit, arranged to perform encoding with aid of look-ahead processing for data protection during accessing the NV memory; wherein: the memory controller receives a write command and data corresponding to the write command from the host device, wherein the data comprises a plurality of messages; regarding the look-ahead processing in the encoding circuit, after a first partial message of a message among the plurality of messages is sent into the encoding circuit, the encoding circuit starts encoding the first partial message to generate a first encoded result; after a second partial message of the message is sent into the encoding circuit, the encoding circuit applies predetermined input response information to the second partial message to generate a second encoded result, and combines the first encoded result and the second encoded result to generate a first partial parity code of a parity code among a plurality of parity codes respectively corresponding to the plurality of messages; after the message is fully sent into the encoding circuit, the encoding circuit starts encoding the message to generate a second partial parity code of the parity code, and outputs the first partial parity code and the second partial parity code to generate the parity code; and the memory controller writes an error correction code (ECC) chunk comprising the plurality of messages and the plurality of parity codes into the NV memory.
16. The memory device of claim 15, wherein the message comprises a set of message bits; and the first partial message comprises a plurality of beginning bits within the set of message bits, and the second partial message comprises a plurality of remaining bits within the set of message bits.
17. The memory device of claim 15, wherein the parity code comprises a set of parity bits; and the first partial parity code comprises a plurality of beginning bits within the set of parity bits, and the second partial parity code comprises a plurality of remaining bits within the set of parity bits.
18. The memory device of claim 15, wherein the predetermined input response information comprises a plurality of basis parity codes respectively corresponding to a plurality of bases; and regarding the encoding circuit applying the predetermined input response information to the second partial message to generate the second encoded result, the encoding circuit multiplies the plurality of basis parity codes by a plurality of bits of the second partial message of the message to generate a plurality of multiplying results, respectively, and combines the plurality of multiplying results to generate the second encoded result.
19. A memory controller of a memory device, the memory device comprising the memory controller and a non-volatile (NV) memory, the NV memory comprising at least one NV memory element, the memory controller comprising: a processing circuit, arranged to control the memory controller according to a plurality of host commands from a host device, to allow the host device to access the NV memory through the memory controller; and a control logic circuit, coupled to the processing circuit, arranged to control the NV memory, wherein the control logic circuit comprises: an encoding circuit, arranged to perform encoding with aid of look-ahead processing for data protection during accessing the NV memory; wherein: the memory controller receives a write command and data corresponding to the write command from the host device, wherein the data comprises a plurality of messages; regarding the look-ahead processing in the encoding circuit, after a first partial message of a message among the plurality of messages is sent into the encoding circuit, the encoding circuit starts encoding the first partial message to generate a first encoded result; after a second partial message of the message is sent into the encoding circuit, the encoding circuit applies predetermined input response information to the second partial message to generate a second encoded result, and combines the first encoded result and the second encoded result to generate a first partial parity code of a parity code among a plurality of parity codes respectively corresponding to the plurality of messages; after the message is fully sent into the encoding circuit, the encoding circuit starts encoding the message to generate a second partial parity code of the parity code, and outputs the first partial parity code and the second partial parity code to generate the parity code; and the memory controller writes an error correction code (ECC) chunk comprising the plurality of messages and the plurality of parity codes into the NV memory.
20. An encoding circuit of a memory controller of a memory device, the memory device comprising the memory controller and a non-volatile (NV) memory, the memory controller comprising the encoding circuit, the NV memory comprising at least one NV memory element, the encoding circuit comprising: a control circuit, arranged to control the encoding circuit to perform encoding with aid of look-ahead processing for data protection during accessing the NV memory, wherein the memory controller receives a write command and data corresponding to the write command from a host device, and the data comprises a plurality of messages; a message input terminal, arranged to receive a message among the plurality of messages; a switching circuit, coupled to the message input terminal and the control circuit, arranged to perform switching under control of the control circuit, to divide the message into a first partial message and a second partial message; a first encoder, coupled to the switching circuit, wherein after the first partial message of the message is sent into the encoding circuit, the first encoder starts encoding the first partial message to generate a first encoded result; a look-ahead circuit, coupled to the switching circuit, wherein after the second partial message of the message is sent into the encoding circuit, the look-ahead circuit applies predetermined input response information to the second partial message to generate a second encoded result; a combining circuit, coupled to the first encoder and the look-ahead circuit, arranged to combine the first encoded result and the second encoded result to generate a first partial parity code of a parity code among a plurality of parity codes respectively corresponding to the plurality of messages; a second encoder, coupled to the message input terminal, wherein after the message is fully sent into the encoding circuit, the second encoder starts encoding the message to generate a second partial parity code of the parity code; and an output circuit, coupled to the combining circuit and the second encoder, wherein under control of the control circuit, the output circuit outputs the first partial parity code and the second partial parity code to generate the parity code; wherein the memory controller writes an error correction code (ECC) chunk comprising the plurality of messages and the plurality of parity codes into the NV memory.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
DETAILED DESCRIPTION
(9)
(10) As shown in
(11) In this embodiment, the host device 50 may transmit host commands and corresponding logical addresses to the memory controller 110 to access the memory device 100. The memory controller 110 receives 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 NV memory 120 with the operating commands to perform reading, writing/programing, etc. on memory units (e.g. data pages) having physical addresses within the NV memory 120, where the physical addresses may be associated with the logical addresses. When the memory controller 110 perform an erase operation on any NV memory element 122-n of the plurality of NV memory elements 122-1, 122-2, . . . , and 122-N (in which “n” may represent any integer in the interval [1, N]), at least one block of multiple blocks of the NV memory element 122-n may be erased, where each block of the blocks may comprise multiple pages (e.g. data pages), and an access operation (e.g. reading or writing) may be performed on one or more pages.
(12) According to some embodiments, the memory device 100 may be implemented to be a memory card conforming to the SD/MMC, CF, MS, XD or UFS specifications, where the memory device 100 may be coupled to the host device 50 through an intermediate device such as a memory card reader, but the present invention is not limited thereto.
(13)
(14) Based on the architecture shown in
(15)
(16) For better comprehension, a typical behavior of a conventional encoding architecture may be illustrated as shown in the upper half of
(17)
(18)
(19) According to this embodiment, the predetermined input response information may comprise a plurality of basis parity codes {p.sub.a,u(0), p.sub.a,u(1), p.sub.a,u(2), . . . , p.sub.a,u(k-2), p.sub.a,u(k-1)} respectively corresponding to the plurality of bases {u.sub.0, u.sub.1, u.sub.2, . . . , u.sub.k-2, u.sub.k-1} (e.g. the k rows of bits {100 . . . 000, 010 . . . 000, 001 . . . 000, . . . , 000 . . . 010, 000 . . . 001}). As shown in the right half of
(20) According to some embodiments, implementation of preparing the plurality of basis parity codes {p.sub.a,u(0), p.sub.a,u(1), p.sub.a,u(2), . . . , p.sub.a,u(k-2), p.sub.a,u(k-1)} may vary. For example, in the production phase, under control of the production tool, the memory controller 110 may store the plurality of basis parity codes {p.sub.a,u(0), p.sub.a,u(1), p.sub.a,u(2), . . . , p.sub.a,u(k-2), p.sub.a,u(k-1)} in a certain storage unit in the memory controller 110, for being loaded into the encoding circuit 200 during boot up of the memory device 100 for use of the user. For another example, according to default settings or user settings, the memory controller 110 may control the encoding circuit 200 (e.g. the LDPC encoder therein) to encode the plurality of bases {u.sub.0, u.sub.1, u.sub.2, . . . , u.sub.k-2, u.sub.k-1} (e.g. the k rows of bits {100 . . . 000, 010 . . . 000, 001 . . . 000, . . . , 000 . . . 010, 000 . . . 001}) to generate the plurality of basis parity codes {p.sub.a,u(0), p.sub.a,u(1), p.sub.a,u(2), . . . , p.sub.a,u(k-2), p.sub.a,u(k-1)}, respectively. For yet another example, the plurality of basis parity codes {p.sub.a,u(0), p.sub.a,u(1), p.sub.a,u(2), . . . , p.sub.a,u(k-2), p.sub.a,u(k-1)} may be implemented as a portion of hardware circuits within the encoding circuit 200.
(21)
(22) According to this embodiment, the control circuit 210 may be arranged to control the encoding circuit 200 to perform encoding with aid of the look-ahead processing for data protection during accessing the NV memory 120. The message input terminal m_in is arranged to receive the message m within the plurality of messages {m}, and the switching circuit 220 is arranged to perform switching under control of the control circuit 210, to divide the message m into the first partial message m.sub.1 and the second partial message m.sub.2. For example, when the encoding circuit 200 starts receiving the message m according to the clock signal CLK received through the clock input terminal CLK_in, the control circuit 210 may enable a first partial message path (e.g. the upper output path of the switching circuit 220) and disable a second partial message path (e.g. the lower output path of the switching circuit 220), and the counter 212 may start counting the number of bits that have been received as the first partial message m.sub.1 to generate a first counter value, in order to determine whether the operation of receiving the first partial message m.sub.1 has been completed according to a first predetermined value (e.g. a predetermined number of bits of the first partial message m.sub.1, such as k0), where the first counter value reaching the first predetermined value may indicate that the operation of receiving the first partial message m.sub.1 has been completed. After the first partial message m.sub.1 completely sent into the encoding circuit 200, and more particularly, the encoder 230a, the encoder 230a starts encoding the first partial message m.sub.1 to generate the first encoded result p.sub.1a.
(23) When the encoding circuit 200 starts receiving the second partial message m.sub.2, the control circuit 210 may disable the first partial message path (e.g. the upper output path of the switching circuit 220) and enable the second partial message path (e.g. the lower output path of the switching circuit 220), and the counter 212 may start counting the number of bits that have been received as the second partial message m.sub.2 to generate a second counter value, in order to determine whether the operation of receiving the second partial message m.sub.2 has been completed according to a second predetermined value (e.g. a predetermined number of bits of the second partial message m, such as k), where the second counter value reaching the second predetermined value may indicate that the operation of receiving the second partial message m.sub.2 has been completed. The first predetermined value and the second predetermined value may be stored in the register circuit 214, for example, may be loaded into the register circuit 214 during boot up of the memory device 100, but the present invention is not limited thereto. In addition, the storage unit 242 may comprise a plurality of registers for storing the bits m.sub.2,0, m.sub.2,1, . . . , and m.sub.2,k-1 of the second partial message m.sub.2. After the second partial message m.sub.2 is completely sent into the encoding circuit 200, and more particularly, the storage unit 242 of the look-ahead circuit 240, each bit of the second partial message m.sub.2 is available for the look-ahead processing, and the look-ahead circuit 240 and the combining circuit 248 may operate at the same time to generate the first partial parity code p.sub.a. For example, the look-ahead circuit 240 applies the predetermined input response information such as the plurality of basis parity codes {p.sub.a,u(0), p.sub.a,u(1), . . . , p.sub.a,u(k-1)} to the second partial message m.sub.2 to generate the second encoded result p.sub.2a, and the combining circuit 248 combines the first encoded result p.sub.1a and the second encoded result p.sub.2a to generate the first partial parity code p.sub.a.
(24) Regarding these operations of the look-ahead circuit 240, the multiplication circuit 244 may multiply the plurality of basis parity codes {p.sub.a,u(0), p.sub.a,u(1), . . . , p.sub.a,u(k-1)} by the bits m.sub.2,0, m.sub.2,1, . . . , and m.sub.2,k-1 of the second partial message m.sub.2 to generate a plurality of multiplying results such as a plurality of products {(m.sub.2,0.Math.p.sub.a,u(0)), (m.sub.2,1.Math.p.sub.a,u(1)), . . . , (m.sub.2,k-1.Math.p.sub.a,u(k-1))}, respectively, and the addition circuit 246 may combine the plurality of multiplying results such as the plurality of products {(m.sub.2,0.Math.p.sub.a,u(0)), (m.sub.2,1.Math.p.sub.a,u(1)), . . . , (m.sub.2,k-1.Math.p.sub.a,u(k-1))} generate the second encoded result p.sub.2a. Please note that the parity code p may comprise a set of parity bits, where the first partial parity code p.sub.a may comprise a plurality of beginning bits within the set of parity bits, and the second partial parity code p.sub.b may comprise a plurality of remaining bits within the set of parity bits. According to this embodiment, each basis parity code of the plurality of basis parity codes {p.sub.a,u(0), p.sub.a,u(1), . . . , p.sub.a,u(k-1)} may comprise a plurality of basis parity bits, and the bit count of the plurality of beginning bits within the set of parity bits (e.g. the length of the first partial parity code p.sub.a) and the bit count of the plurality of basis parity bits (e.g. the length of each of the plurality of basis parity codes {p.sub.a,u(0), p.sub.a,u(1), . . . , p.sub.a,u(k-1)}) are equal to each other. In addition, both of the bit count of the first encoded result p.sub.1a and the bit count of the second encoded result p.sub.2a are equal to the bit count of the plurality of beginning bits within the set of parity bits (e.g. the length of the first partial parity code p.sub.a). Regarding the operations of combining the first encoded result p.sub.1a and the second encoded result p.sub.2a, the combining circuit 248 may add the respective bits of the first encoded result p.sub.1a and the second encoded result p.sub.2a in a bit by bit manner to generate the first partial parity code p.sub.a. For example, these operations of the combining circuit 248 may comprise: adding the first bit of the first encoded result p.sub.1a and the first bit of the second encoded result p.sub.2a to generate the first bit of the first partial parity code p.sub.a; adding the second bit of the first encoded result p.sub.1a and the second bit of the second encoded result p.sub.2a to generate the second bit of the first partial parity code p.sub.a; and so on. After adding the last bit of the first encoded result p.sub.1a and the last bit of the second encoded result p.sub.2a to generate the last bit of the first partial parity code p.sub.a, the combining circuit 248 may completely output the first partial parity code p.sub.a.
(25) Additionally, the encoder 230b may utilize the time period between the time point of completely receiving the message m and the time point of completely outputting the first partial parity code p.sub.a as the calculation time for the second partial parity code p.sub.b. After the message m is fully sent into the encoding circuit 200 (more particularly, the encoder 230b), the encoder 230b starts encoding the message m (e.g. the message m including the first partial message m.sub.1 and the second partial message m.sub.2) to generate the second partial parity code p.sub.b. Under control of the control circuit 210, the output circuit 250 outputs the first partial parity code p.sub.a and the second partial parity code p.sub.b to generate the parity code p, for being outputted through the parity output terminal p_out. The operations of partial parity path selection regarding the first partial parity code p.sub.a and the second partial parity code p.sub.b may correspond to the time of generating the first partial parity code p.sub.a and the second partial parity code p.sub.b, respectively. As the encoding circuit 200 (e.g. the encoder 230a, the look-ahead circuit 240, and the combining circuit 248 therein) is capable of generating the first bit of the first partial parity code p.sub.a at the moment that is just after completely receiving the message m (e.g. the next clock cycle of the clock cycle in which the last bit of the message m is received), the time difference between this moment and the time of the encoding circuit 200 completely outputting the first partial parity code p.sub.a (e.g. a number of clock cycles for outputting the first partial parity code p.sub.a) may correspond to the bit count of the first partial parity code p.sub.a (e.g. the length of the first partial parity code p.sub.a). For example, when the output circuit 250 starts receiving the parity code p including the first partial parity code p.sub.a, the control circuit 210 may enable a first partial parity path (e.g. the upper input path of output circuit 250) and disable a second partial parity path (e.g. the lower input path of the output circuit 250), to make the output circuit 250 output the first partial parity code p.sub.a through the parity output terminal p_out. At the end of the time difference, the output circuit 250 has completed the operations of receiving and outputting the first partial parity code p.sub.a, and the first bit of the second partial parity code p.sub.b is available. When the output circuit 250 starts receiving the second partial parity code p.sub.b, the control circuit 210 may disable the first partial parity path (e.g. the upper input path of output circuit 250) and enable the second partial parity path (e.g. the lower input path of the output circuit 250), to make the output circuit 250 output the second partial parity code p.sub.b through the parity output terminal p_out. The operations of controlling the time of outputting the first partial parity code p.sub.a and the time of outputting the second partial parity code p.sub.b may be implemented with counting operations similar to that of the counter 212. For example, the control circuit 210 may comprise another counter that is coupled to the register circuit 214, and utilize the other counter to control the partial parity path selection of the output circuit 250.
(26) Based on the NV memory accessing method and the associated architecture such as the encoding circuit 200 shown in
(27)
(28) According to some embodiments, in the operations of multiplying the plurality of basis parity codes {p.sub.a,u(0), p.sub.a,u(1), . . . , p.sub.a,u(k-1)} by the bits m.sub.2,0, m.sub.2,1, . . . , and m.sub.2,k-1 of the second partial message m.sub.2 to generate the plurality of multiplying results such as the plurality of products {(m.sub.2,0.Math.p.sub.a,u(0)), (m.sub.2,1.Math.p.sub.a,u(1)), . . . , (m.sub.2,k-1.Math.p.sub.a,u(k-1))}, the plurality of AND gates (e.g. the AND gates shown in
(29) According to some embodiments, in the operations of combining the first encoded result p.sub.1a and the second encoded result p.sub.2a to generate the first partial parity code p.sub.a of the parity code p corresponding to the message m, the XOR gate of the combining circuit 248 (e.g. the rightmost XOR gate shown in
(30)
(31) In Step S10, the memory controller 110 may receive the write command and start receiving the data corresponding to the write command (e.g. the aforementioned data to be written into the NV memory 120) from the host device 50.
(32) In Step S20, the encoding circuit 200 may obtain the aforementioned at least one portion of data (e.g. the plurality of sets of data, such as the set of data mentioned above) to be the plurality of messages {m} of the ECC chunk, to generate the plurality of parity codes {p} of the ECC chunk according to the plurality of messages {m} through the look-ahead type encoding of the encoding circuit 200.
(33) In Step S21, when the encoding circuit 200 starts receiving the message m, the control circuit 210 may enable the first partial message path (e.g. the upper output path of the switching circuit 220) and disable the second partial message path (e.g. the lower output path of the switching circuit 220).
(34) In Step S22, the encoding circuit 200 may start receiving the message m including the first partial message m.sub.1. For example, under control of the control circuit 210, the encoder 230a may start receiving the first partial message m.sub.1. For another example, the encoder 230b may start receiving the message m including the first partial message m.sub.1.
(35) In Step S23, after the first partial message m.sub.1 completely sent into the encoding circuit 200 (more particularly, the encoder 230a), the encoder 230a may start encoding the first partial message m.sub.1 to generate the first encoded result p.sub.1a.
(36) In Step S24, when the encoding circuit 200 starts receiving the second partial message m.sub.2, the control circuit 210 may disable the first partial message path (e.g. the upper output path of the switching circuit 220) and enable the second partial message path (e.g. the lower output path of the switching circuit 220).
(37) In Step S25, the encoding circuit 200 may start receiving the second partial message m.sub.2. For example, under control of the control circuit 210, the look-ahead circuit 240 may start receiving the second partial message m.sub.2. For another example, the encoder 230b may start receiving the second partial message m.sub.2.
(38) In Step S26, the encoding circuit 200 may trigger parallel processing.
(39) In Step S26a, after the second partial message m.sub.2 is completely sent into the encoding circuit 200 (more particularly, the storage unit 242 of the look-ahead circuit 240), the look-ahead circuit 240 may apply the predetermined input response information such as the plurality of basis parity codes {p.sub.a,u(0), p.sub.a,u(1), . . . , p.sub.a,u(k-1)} to the second partial message m.sub.2 to generate the second encoded result p.sub.2a, and the combining circuit 248 may combine the first encoded result p.sub.1a and the second encoded result p.sub.2a to generate the first partial parity code p.sub.a.
(40) In Step S26b, after the message m is fully sent into the encoding circuit 200 (more particularly, the encoder 230b), the encoder 230b may start encoding the message m (e.g. the message m including the first partial message m.sub.1 and the second partial message m.sub.2) to generate the second partial parity code p.sub.b.
(41) In Step S27, at the moment that is just after completely receiving the message m (e.g. the next clock cycle of the clock cycle in which the last bit of the message m is received), the encoding circuit 200 (e.g. the encoder 230a, the look-ahead circuit 240, and the combining circuit 248 therein) may start outputting the first partial parity code p.sub.a and the second partial parity code p.sub.b to generate the parity code p.
(42) In Step S28, the encoding circuit 200 (e.g. the control circuit 210) may check whether processing a next message is required. When processing the next message is required, Step S21 is entered; otherwise, Step S30 is entered.
(43) In Step S30, the memory controller 110 may write the ECC chunk comprising the plurality of messages {m} and the plurality of parity codes {p} into the NV memory 120. For brevity, similar descriptions for this embodiment are not repeated in detail here.
(44) For better comprehension, the NV memory accessing method may be illustrated with the working flow shown in
(45) In addition, S28 may be illustrated in Step S20 shown in
(46) 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.