主权项 |
1. A method for accessing a storage unit of a flash memory, performed by a processing unit, comprising:
controlling a multiplexer to couple a DRAM (Dynamic Random Access Memory) to a buffer; directing a DMA (Direct Memory Access) controller to store a message of the DRAM to the buffer through the multiplexer and to output the message of the DRAM to a RAID-encoding (Redundant Array of Independent Disk-encoding) unit in a plurality of batches; and after a first condition is satisfied, controlling the multiplexer to couple the RAID-encoding unit to the buffer and directing the RAID-encoding unit to output a vertical ECC (Error Correction Code) to the buffer through the multiplexer in at least one batch, thereby enabling a storage-unit access interface to obtain the message and the vertical ECC from the buffer, generate a horizontal ECC according to every one of the message and the vertical ECC, and store the message, the vertical ECC, and the horizontal ECC associated with one of the message and the vertical ECC to a storage unit. |