Patent ID: 9021184
Filing Date: 2015-04-28
Classification: G06F

Abstract:
1. A flash memory device, comprising: a flash memory provided with a plurality of blocks including first and second blocks, wherein each of the blocks includes a data region, which stores data, and a block management area, which stores a block management value indicating whether a corresponding block is in a used state, the block management value includes a plurality of N-adic numbers (N>2) arranged as a plurality of digits, and each of the N-adic numbers is formed by a plurality of bits, the block management area includes a plurality of cells that store the block management value, each of the cells stores a single bit of “0” when an accumulated charge is greater than or equal to a threshold and stores a single bit of “1” when the accumulated charge is less than the threshold, when the block management value indicates that the corresponding block is in an unused state, the digits of the N-adic numbers are each set to an initial value formed by the plurality of bits, wherein each bit is “1”, when the block management value indicates that the corresponding block is in the used state, a specific one of the digits of the N-adic numbers is set to a specific value formed by the plurality of bits including two bits of “00”, and the digits of the N-adic numbers other than the specific one of the digits of the N-adic numbers are maintained at the initial value; and a memory controller that controls the flash memory, wherein when there is a request for writing the data to the flash memory, the memory controller reads the block management value from the cells in the block management area of each of the blocks and determines whether each of the blocks, including the first and second blocks, is in the used state based on the block management value, when the memory controller determines that the blocks are in the unused state, the memory controller writes the data to the data area of the first block and writes a first block management value to the cells in the block management area indicating that the first block is in the used state, when the data is entirely written to the data area of the first block, the memory controller copies part of the data in the first block to the data area of the second block that is in the unused state, writes a second block management value to the cells of the block management area in the second block indicating that the second block is in the used state, writes the block management value to the block management area of the first block indicating that the block is in the unused state, and erases the data from the data area of the first block, the memory controller sets the second block management value so that the specific value of the second block management value is located at a position that differs from a position of the first block management value, when the first and second blocks are in the used state, the memory controller determines that updated data is written to the second block based on positions of each of the specific values in the first and second block management values and reads the updated data from the data area of the second block, and when the block management value of the second block includes the initial value, and a value of the N-adic numbers other than both the initial value and the specific value, the memory controller restricts the reading of the data from the second block.