Patent ID: 7765367
Filing Date: 2010-07-27
Classification: G06F,Y02D

Abstract:
1. A control device of a memory, used for accelerating the execution of an iterant command in the memory, the memory comprising a plurality of blocks, the control device comprising: a micro-controller unit, used for issuing a command to operate the memory; a block information table, used for recording states of the blocks; a state machine for obtaining the state information of every block from the block information table and for analyzing the state of every block to repeatedly execute the command, and to update the state information in the block information table; and a controller, coupled between the memory and the micro-controller, wherein when the command is determined to be not executed repeatedly, the command is executed by the micro-controller unit through the control device, and when the command is determined to be executed repeatedly, the command is carried out by the state machine repeatedly, wherein the command comprises reading, writing, erasing or searching for N empty blocks, and N is a positive integer, wherein when the command is executed by the state machine to search for N empty blocks, the state machine further comprises: an idle state, which is the initial state of the state machine; a searching state, used to search for N empty blocks from the memory according to the state record of every block in the block information table; a determining state, used to determine which blocks are empty or erasable; an erasure state, used to erase the contents in the blocks; a verification state, used to verify if the erasure of blocks is successfully completed; and an ending state, used to stop executing the command repetitively, wherein, when the state machine receives a starting signal to execute repeatedly the command, the state machine enters the searching state from the idle state; during the searching state if N empty blocks are found in the memory, the state machine enters the ending state; if N empty blocks are not found in the memory, the state machine enters the determining state; when the determining state determines the present block is empty, the state machine returns to the determining state; when the determining state determines the present block is erasable, the state machine enters the erasure state; after the erasure state erases the contents of the block, the state machine enters the verification state; and when the verification verifies the erasure of the block successful, the state machine returns to the searching state.