WO2006030566A1 - フラッシュメモリの情報記録読出装置 - Google Patents

フラッシュメモリの情報記録読出装置 Download PDF

Info

Publication number
WO2006030566A1
WO2006030566A1 PCT/JP2005/010608 JP2005010608W WO2006030566A1 WO 2006030566 A1 WO2006030566 A1 WO 2006030566A1 JP 2005010608 W JP2005010608 W JP 2005010608W WO 2006030566 A1 WO2006030566 A1 WO 2006030566A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
recording
sector
recorded
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/JP2005/010608
Other languages
English (en)
French (fr)
Inventor
Keiichi Maeda
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to US10/576,077 priority Critical patent/US20090019244A1/en
Publication of WO2006030566A1 publication Critical patent/WO2006030566A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • G11C16/102External programming circuits, e.g. EPROM programmers; In-circuit programming or reprogramming; EPROM emulators
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • G11C16/102External programming circuits, e.g. EPROM programmers; In-circuit programming or reprogramming; EPROM emulators
    • G11C16/105Circuits or methods for updating contents of nonvolatile memory, especially with 'security' features to ensure reliable replacement, i.e. preventing that old data is lost before new data is reliably written
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7211Wear leveling

Definitions

  • the present invention relates to an information recording / reading apparatus for recording, reading and erasing data to / from a nonvolatile memory represented by a flash memory or the like.
  • Non-volatile memories represented by flash memory and the like have a feature that they can retain a recording inner valley even after the power is turned off. Using this feature, the setting state immediately before the power is turned off is recorded and the power is turned off. The recorded contents can be retained afterwards, and when power is turned on again, the setting state at power-off can be obtained and set, and in recent years DVD (Digital Versatile) has been considered.
  • DVD Digital Versatile
  • This flash memory has a plurality of sectors that form a part of a data recording area and serve as a unit for erasing data.
  • setting a bit set to 1 to 0 is done in units of bits, whereas setting a bit set to 0 to 1 is done in units of sectors. (Referred to as sector erase).
  • each of the plurality of memory blocks has a data write area (area) and a management status write area, and this management status write area has a write data specific data ID and Write data with the same data ID as the erase counter indicating the number of erases in the data write memory block.
  • the write status indicates that write is possible and the erase counter erases the minimum memory block. Then, new data and management status are written, and the management status including the same data ID in another memory block is updated (for example, refer to Patent Document 1).
  • Patent Document 1 JP 2001-312891 A
  • the conventional information recording / reading apparatus is configured as described above, and the power is cut off during the data recording process in order to update the write status at the end of a series of data recording (writing) processes.
  • the power is cut off during the data recording process in order to update the write status at the end of a series of data recording (writing) processes.
  • sector data erasure takes much longer than data recording, and the conventional method including the conventional example in which data is erased at the time of data rewriting performs data recording by detecting a voltage drop due to power supply interruption. Due to the configuration, it becomes difficult to maintain power during the period of data erasing and data recording of the sector, which causes a problem that data rewriting is not performed normally.
  • non-volatile memories such as flash memory have an upper limit on the number of times data can be erased per sector, and there is a limit (lifetime) in use. Therefore, an information recording / reading apparatus using a non-volatile memory having a limit of use as described above must be provided with means for enabling a long life.
  • the present invention has been made to solve the above-described problems, and an object of the present invention is to obtain an information recording / reading apparatus having means for improving the accuracy of data recording and enabling a long life. To do.
  • An information recording / reading apparatus includes a data recording area and a block state management area indicating whether data is not recorded, being recorded, or recorded in the data recording area.
  • a non-volatile memory having a data recording state management area indicating a data recording state of the entire plurality of sectors, and recording data or block state of the data recording state management area Controlling area and data Based on the recording data in the recording state management area, the data is recorded in a cyclic order on the data recording area of a plurality of blocks over the entire sector, the recording data is read out, and the recording data is erased collectively for each sector.
  • a control unit for controlling the nonvolatile memory so as to update the recording data of the block state management area and the data recording state management area.
  • the nonvolatile memory formed by a plurality of sectors is obtained by dividing each of the plurality of sectors, and data is not recorded in the data recording area and the data recording area.
  • a plurality of blocks having a block state management area indicating whether recording has been performed and a data recording state management area indicating the data recording state of the entire plurality of sectors are provided, and the control unit records in the data recording state management area Data is recorded in a cyclic order on the data recording area of a plurality of blocks over the entire sector based on the data or the recording data in the block status management area and the data recording status management area, and the recording Reads data, erases recorded data for each sector in batch, and additionally, the block status management area and data recording status management area Since the nonvolatile memory is controlled so as to update the recording data, the data recording is interrupted without reaching the “recorded” indicated by the block state management area or this “recorded”. By “recording”, which is determined to be incomplete data, the control unit
  • control unit restores the recording data of the block indicating "recording" using the "recorded” recording data of the previous block, and restores the data of the state close to the latest. As a result, the accuracy of data recording can be improved.
  • each sector is divided into a plurality of blocks, and data is recorded in a cyclic order in the data recording areas of the plurality of blocks over the entire sector, and the recorded data is erased collectively for each sector.
  • N blocks the number of data rewrites per sector is increased by N times compared to the conventional one, while the number of erases is (1ZN) compared to the conventional one.
  • the lifetime of flash memory which has a limit (lifetime) on the number of times data can be erased, can be extended.
  • the data recording area of multiple blocks Since data is recorded in a cyclic order with respect to the area, erasure of the recorded data is equalized without concentrating on a specific sector as in the past, thereby contributing to an increase in the lifetime of the flash memory. , Reliability can be improved.
  • ⁇ 1 It is a block diagram of an information recording / reading apparatus according to Embodiment 1 of the present invention.
  • FIG. 2 is an explanatory diagram of data recorded in the block state management area of FIG. 1 and a state indicated by the data.
  • ⁇ 3 A flowchart showing a data recording control process in the information recording / reading apparatus according to the first embodiment of the present invention.
  • ⁇ 4] is a flowchart showing a data reading control process in the information recording / reading apparatus according to the first embodiment of the present invention.
  • V5 A flowchart showing a data erasure control process in the information recording / reading apparatus according to the first embodiment of the present invention.
  • FIG. 6 is a flowchart showing S-RD calculation processing in FIG.
  • FIG. 8 is a block diagram of an information recording / reading apparatus according to Embodiment 2 of the present invention.
  • FIG. 9 is an explanatory diagram of data recorded in the previous sector erase state management area of FIG. 8 and a state indicated by the data.
  • FIG. 11 is a flowchart showing processing for searching for an S-ER in FIG.
  • FIG. 13 is a flowchart showing a calculation process of B-OLD in FIG.
  • FIG. 1 is a block diagram of an information recording / reading apparatus according to Embodiment 1 of the present invention.
  • this information recording / reading apparatus uses a flash memory 1 as a nonvolatile memory, and this flash memory 1 is controlled by a control unit 2 via an interface 3.
  • the flash memory 1 has a plurality of sectors la that form a part of the data recording area and serve as a data erasing unit.
  • FIG. 1 shows that the sector la is divided from the sector la (l).
  • four sector forces of Kuta la (4) are also formed.
  • each sector la from sector la (1) to sector la (4) is divided into a plurality of blocks lb having smaller data units (capacity).
  • Figure 1 shows an example in which each sector la is divided into four blocks, and the block lb (1) force is composed of 16 blocks of block lb (16) from sector la (l) to sector la (4).
  • Each block of the block lb (1) force block lb (16) has a data recording area lc and a block state management area Id, and information data is recorded (stored) in the data recording area lc.
  • data recording in the data recording area lc of each block lb is recorded in a cyclic order with respect to the block lb (1) force block lb (16).
  • the block state management area Id is an area for recording data indicating the data recording state in the block lb to which the block state management area Id belongs, and no data is recorded in the data recording area lc of the block lb. Data indicating whether it is medium or recorded is recorded.
  • FIG. 2 is an explanatory diagram of data recorded in the block state management area Id and a state indicated by the data.
  • 11 is the recording data (contents) of the block state management area Id
  • 12 is the state of the block lb indicated by the recording data.
  • the recorded data When the recorded data is “111”, it is in an “unrecorded” state, indicating that data has not been recorded in the data recording area lc of the block lb.
  • the recorded data When the recorded data is “011”, the state is “recording”, indicating that data is being recorded in the data recording area lc.
  • this “recording” state indicates that the data recorded in the data recording area lc is incomplete data.
  • the recorded data When the recorded data is “001”, it is in a “recorded” state, indicating that data recording has been completed in the data recording area lc, and that the recorded data is normal.
  • a recording / erasing position management area le is provided independently of the four sectors la, and the data of the block lb number (B-WR) in which data is recorded and the latest data are recorded.
  • the data of the block lb number (B—RD) and the data of the sector la number (S—ER) that has been used and is subject to data erasure are recorded. Note that when recording data with these numbers, consideration should be given so that the number of times of recording and erasing bits corresponding to specific cells in the memory does not increase. Record the value corresponding to 0 as the initial value of B-RD and S-ER.
  • the recording erasure position management area le forms a data recording state management area for recording data indicating the recording state of data in the entire four sectors la from sector 1 to sector 4.
  • control unit 2 Based on the recording data in the recording erasure position management area le of the flash memory 1, the control unit 2 specifies the position at which data is recorded and read from the flash memory 1, and the data at the specified position is recorded. In addition to recording and reading control, specifying the data erasure target sector la, data erasure and erasure interruption control of the specified sector 1a, etc., the block status management area Id and the recording erasure position management area le Update etc.
  • the flash memory 1 is controlled so that data is recorded in a cyclic order with respect to the data recording area of the block lb (1) force block lb (16) over the entire sector la.
  • the control unit 2 described above is a CPU (central processing unit) and a memory, or a microcomputer. It consists of a computer.
  • the interface 3 connects the flash memory 1 and the control unit 2 in a controllable manner.
  • FIG. 3 is a flowchart showing a data recording control process for the flash memory 1 by the control unit 2.
  • step ST1 the control unit 2 obtains the number B-WR of the block lb for data recording from the recording erasure position management area le of the flash memory 1.
  • step ST2 the control unit 2 sets the recording data in the block state management area Id provided in the B-WRth block lb of the flash memory 1 to “recording”.
  • step ST3 the control unit 2 records the data in the data recording area lc of the B—WRth block lb.
  • control unit 2 Since the control unit 2 sets the recording data to the set circuit (not shown) according to the setting input from the setting input means (not shown), the recorded data must be held by the control unit 2. It becomes.
  • step ST4 when the data recording is completed, the control unit 2 sets the recording data in the block state management area Id of the B—WRth block 1b to “recorded”.
  • the data recording process is completed through the above steps, whereas the data recording process is terminated without setting the “recorded” process in step ST4 after setting “recording” in step ST2, for example, by turning off the power.
  • the control unit 2 holds the recording data in the block status management area Id of the B—WR-th block lb as “recording”. This indicates that the data recorded in the B-WRth block lb is incomplete data.
  • the handling of the control unit 2 when the data recording process is terminated during this “recording” will be described later in the data reading process.
  • FIG. 4 is a flowchart showing a data read control process for the flash memory 1 by the control unit 2. The processing when data is read from the B-RD-th block lb in which the latest data is recorded in the blocks lb (l) to lb (16) of the flash memory 1 shown in FIG. 1 will be described below.
  • step ST11 the control unit 2 acquires the number B-RD of the block lb from which data is read from the recording erasure position management area le of the flash memory 1.
  • Step ST13 the control unit 2 reads the initial value and ends the data reading process.
  • step ST14 the control unit 2 reads data from the B—RD-th block lb force and ends the data reading process.
  • step ST14 if the recorded data in the block status management area Id of the B—RD block lb read by the control unit 2 is “recorded”, the data in the B—RD block lb is normal data. is there. On the other hand, when the recording data in the block state management area Id is “recording” indicating that the data is incomplete, the control unit 2 determines that one or more of the B-RD-th block lb is above. The recorded data in the previous block lb is read, and based on this data, repair control is performed so that the incomplete data in the B-RD block lb is restored to the latest V ⁇ state data. Well ...
  • FIG. 5 is a flowchart showing data erasure control processing for the flash memory 1 by the control unit 2.
  • step ST21 the control unit 2 acquires the number S-ER of the sector la to be erased from the recording erasure position management area le of the flash memory 1.
  • step ST22 the control unit 2 calculates the number S-RD of the sector la in which the latest data is recorded. This calculation process follows a separately provided process flow (subroutine) (see Figure 6 below).
  • step ST23 the control unit 2 completes reading of the latest data and records data. If there is no request for data recording that requires processing (step ST23—No), the process returns to step ST23 because data erasure of sector la cannot be started yet. If there is no request (step ST23—Yes), the process proceeds to step ST24.
  • step ST25 the control unit 2 erases the recorded data of the S-ER-th sector la from the flash memory 1 at once.
  • step ST26 the control unit 2 sets the S—ER number data of the recording erasure position management area le to the S—ERth + 1 in order to advance the number S—ER of the sector la to be erased next time by one.
  • Update (S—ER S—ERth + 1).
  • step ST27—Yes If “+ 1" exceeds the total number of sectors la (4 sectors in this example)! /, It is determined that it exceeds the total number of sectors la (step ST27—Yes), step ST28 If the total number of sectors 1a is not exceeded (step ST27—No), the process returns to step ST22 and repeats the above process.
  • step ST22 the calculation process in step ST22 will be described with reference to FIG.
  • FIG. 6 is a flowchart (subroutine) showing the calculation process of the number S-RD of sector la in which the latest data is recorded.
  • the precondition of this flowchart is that the number of blocks in one sector la is fixed (in this example, four), and the same number for all sectors la.
  • step ST31 the control unit 2 divides the number B-RD of the block lb in which the latest data is recorded by the number of blocks in one sector (for example, 4) according to the above preconditions, so that the latest data is obtained.
  • the number S—RD of the recorded sector la can be obtained.
  • the numbers after the decimal point are rounded up. For example, in Fig. 1, if the latest data is recorded and the number B—RD of the block lb is “block lb (5)”, “5” of this block lb (5) is changed to “4” Dividing by 4 and rounding up to the nearest decimal point results in “2” and “sector la (2)” is obtained.
  • step ST31 above means that the number S-ER of the sector la to be erased can be specified after the latest data has been recorded in one block lb in the sector la.
  • the sector S number S-ER can be identified at an early stage, and as described above, data is read and recorded, and if the data in the sector la is erased in advance using the free time, the processing is further improved. It will be easy.
  • Figure 7 shows the function that interrupts data erasure processing for flash memory 1 by control unit 2. It is a flowchart which shows the control processing of the data recording provided with.
  • step ST41 when data recording is requested, the control unit 2 determines whether data erasure processing of sector la described in FIG. 5 is in progress, and data erasure processing is in progress. If so (step ST41—Yes), the process proceeds to step ST42. If data erasure is not in progress (step ST41—No), the process proceeds to step ST43.
  • step ST42 the control unit 2 performs a process of interrupting the data erasure process of sector la on the flash memory 1, and proceeds to step ST43.
  • step ST43 the control unit 2 performs the data recording process described with reference to FIG. 3, and ends the process.
  • the data erasure process is interrupted rather than starting the update data recording process after data erasure for sector la is completed. Since the update data recording process is executed immediately, the update data can be recorded quickly and reliably.
  • each of the plurality of sectors la forming the flash memory 1 is divided into a plurality of blocks lb, and each of the plurality of blocks lb includes a data recording area lc and the data.
  • a block status management area Id that records data indicating whether data has not been recorded, is being recorded, or has been recorded is provided in the recording area lc, and the block number B—WR data and the latest data are recorded.
  • the recording erasure position management area le in which the block number B-RD data to be read data and the sector la number S-ER data to be erased is recorded is the plurality of sectors la.
  • the control unit 2 circulates in a circular order with respect to the data recording areas lc of a plurality of blocks lb over the entire sector la based on the recording data of the recording erasure position management area le. It is configured to control the flash memory 1 to record data, read the recorded data, erase the recorded data for each sector, and update the recorded data in the block status management area Id and the data recording status management area le Therefore, “recorded” indicated by the block state management area Id, or data recording is interrupted without reaching “recorded”, and as a result, “recording” is judged as incomplete data. Therefore, the control unit 2 can easily determine whether the data recorded in the block lb is reliable, and Accuracy can be improved.
  • control unit 2 restores the recorded data of the block lb indicating "recording" using the "recorded” recorded data of the previous block lb, and restores the data in the latest state. As a result, the accuracy of data recording can be improved.
  • each sector la is divided into a plurality of blocks lb, and data is recorded in a cyclic order in the data recording areas of the plurality of blocks lb over the entire sector la.
  • N the number of data rewrites per sector 1a
  • 1ZN which can extend the life of the flash memory 1 that has a limit (life) on the number of data erases per sector la.
  • data is recorded in a cyclic order in the data recording areas of a plurality of blocks lb, the erasure of the recorded data is equalized without concentrating on a specific sector as in the prior art. This contributes to prolonging the lifetime of the memory 1 and improves reliability.
  • data erasure of sector la is performed after data is recorded in at least one block lb of sector la excluding sector la to be erased, so that the latest data can always be left.
  • update data can be recorded at high speed and reliably.
  • Embodiment 2 the latest data, the block status management area Id, and the record erasure position management area le have a one-to-one relationship and are rewritten at the same time. it can. [0031] Embodiment 2.
  • FIG. 8 is a block diagram of an information recording / reading apparatus according to Embodiment 2 of the present invention.
  • the same components as those in FIG. 1 are given the same reference numerals, and the configuration of the information recording / reading apparatus according to the second embodiment is different from the configuration in FIG.
  • the point is that the previous sector erase state management area If is provided in the area of each sector la in place of the area le, and the control unit 21 instead of the control unit 1 is provided.
  • the description of the same reference numerals as in FIG. 1 is omitted.
  • This previous sector erase state management area If is an area for recording data indicating the data erase state of the previous sector la. For example, data indicating the data erase state of the previous sector la (1) is recorded in the previous sector erase state management area If of the sector la (2).
  • FIG. 8 shows an example in which the data of sector la (1) is erased. Note that the data erasure status of the previous sector la is indicated when the power is turned off during the data erasure of the sector la, for example, when the data erasure status of the same sector la is indicated. This is because the data erase state of sector la becomes incomplete and is avoided.
  • FIG. 9 is an explanatory diagram of data recorded in the previous sector erase state management area If and the state indicated by the data.
  • 31 is the recording data (contents) of the previous sector erase state management area If, and 32 is the state of the previous sector la indicated by the recording data.
  • the recording data is “111”, the data in the initial state is “unerased”.
  • the recorded data is “011”, it indicates “erasing” indicating that data erasure of the previous sector la has started.
  • the previous sector erase state management area If forms a data recording state management area for recording data indicating data recording states in the four sectors la from sector la (1) to sector la (4).
  • the control unit 21 is the same as the control unit 2 as the basic function, except that the control processing method for the flash memory 1 is partially different from the control unit 2 of FIG. Also this control It is the same as the control unit 2 in that the unit 21 includes a CPU and a memory, or a microcomputer.
  • FIG. 10 is a flowchart showing a data erasure control process for the flash memory 1 by the control unit 21.
  • the control unit 21 obtains the number S-ER of the sector la to be erased by searching the previous sector erase state management area If of the flash memory 1. This search process will be described later (Fig. 11).
  • Step ST52, step ST53, and step ST54 are the same processing as step ST22 to step ST24 in FIG.
  • B — RD number of block lb where the latest data is recorded
  • S—RD number of block lb where the latest data is recorded
  • step ST56 the control unit 21 determines whether the variable N in the process of step ST55 exceeds the total number of sectors la (4 sectors in this example), and if it exceeds the total number of sectors la ( Step ST56—Yes) proceeds to step ST57, and if the total number of sectors la has not been exceeded (step ST56—No), proceeds to step ST58.
  • step ST58 the control unit 21 sets the data in the previous sector erase state management area 1f of the Nth sector la to “erasing”.
  • step ST59 the control unit 21 erases the recorded data of the S-ERth sector la from the flash memory 1.
  • step ST60 when the recording data erasure of the sector la in step ST59 is completed, the control unit 21 sets the data in the previous sector erasure state management area If of the Nth sector la to “erased”.
  • step ST61 the control unit 21 sets the data erased sector la in step ST55.
  • FIG. 11 is a flowchart showing a process for checking the state of the previous sector erase state management area If and searching for the S-ER.
  • step ST72 the control unit 21 determines whether or not the data in the previous sector erase state management area If of the (N + 1) th sector la is “erasing”. (ST72—No) proceeds to step ST73, and if “Erasing” (step ST72—Yes), proceeds to step ST79.
  • step ST73 the control unit 21 determines whether or not the previous sector erased state management area If force S of the Nth sector la is "erased”, and if not “erased” (step ST73—No), If it is “erased” (step ST73—Yes), the process proceeds to step ST79.
  • step ST75 the control unit 21 determines whether N matches the total number of sectors la. If they do not match (step ST75—No), the control unit 21 returns to step ST72 and continues the search. If there is a match (step ST75—Yes), this indicates that the sector la is the sector la to be processed last, and in this case, the process proceeds to step ST76.
  • step ST76 the control unit 21 determines whether or not the previous sector erase state management area 1f of the first sector la is "being erased", and if it is not "being erased” (step ST76—No) The process proceeds to step ST77, and in the case of “erasing” (step ST76—Yes), the process proceeds to step ST79.
  • step ST77 the control unit 21 controls the previous sector erase state management area 1 of the Nth sector la. It is determined whether f is “erased”. If it is not “erased” (step ST77—No), the process proceeds to step ST78. If it is “erased” (step ST77—Yes), step S is performed. Proceed to T79.
  • step ST79 is performed in the case of step ST72—Yes, step ST73—Yes, step ST76—Yes, and step ST77—Yes.
  • step ST72 If the determination in step ST72 is “Yes”, it is determined that the erase process has been interrupted in the past in the Nth sector la, but has been interrupted, and the Nth sector la is considered to be the sector la to be erased. — Set ER to N.
  • step ST73 If the determination in step ST73 is “Yes”, the immediately preceding sector la is erased last time and the Nth sector la becomes the sector la to be erased, so S ⁇ ER is set to N.
  • step ST76 and ST77 are “Yes”, the Nth sector la becomes the sector la to be erased, and S-ER is set to N.
  • FIG. 12 is a flowchart showing the calculation process of the data recording target block number (B—WR) and the data reading target block number (B—RD).
  • step ST81 the control unit 21 is the number of the block lb previously recorded at the oldest time necessary for the calculation processing of B—WR and B—RD. Is calculated.
  • This B_OLD is calculated by a separate processing flow (subroutine). This calculation will be described later (Fig. 13).
  • step ST83 the control unit 21 determines whether or not the recording data in the block state management area Id of the Nth block lb is "recorded”, “recording” or “unrecorded”. If “recorded”, since the readable data is recorded in the Nth block lb, the process proceeds to step ST84. If “recording”, the recorded data is not normal data, so the process proceeds to step ST85. If “not recorded”, data can be recorded in the Nth block lb, and the process proceeds to step ST89.
  • step ST86 the control unit 21 determines whether or not N set in step ST85 exceeds the total number of all blocks (16 blocks in this example) and exceeds (step ST8 6 -Yes ) Goes to step ST87, and if not (step ST86—No), goes to step ST88.
  • N stores the number of the block lb to be recorded.
  • step ST90 the control unit 21 outputs an error and ends this calculation process.
  • step ST81 B-OLD calculation process
  • FIG. 13 is a flowchart (subroutine) showing a calculation process of B-OLD that is the number of the block lb recorded at the oldest time based on the state of the previous segment erase state management area If.
  • step ST102 the control unit 21 determines whether the previous sector erase state management area If of the (N + 1) th sector la is “erasing”, and if it is “erasing” (step ST102 —Yes), The process proceeds to step ST103, and if not “erasing” (step ST102—No), the process proceeds to step ST104.
  • the reason for this processing is that the data in this sector la is determined to have been interrupted during erasure.
  • step ST104 the control unit 21 determines whether or not the previous sector erased state management area 1f of the Nth sector la is “erased”. If not “erased” (step ST104—No), the process goes to step ST105. If it is “erased” (step ST104—Yes), the process proceeds to step ST110.
  • step ST106 the control unit 21 determines whether N matches the total number of sectors la. If they do not match (step ST106—No), the control unit 21 returns to step ST102 to continue the confirmation, and if they match (step ST106 — Yes) proceeds to step ST107 assuming that the Nth sector la is the last sector la to be processed.
  • step ST107 the control unit 21 determines whether or not the previous sector erase state management area If of the first sector la is "erasing", and if it is not “erasing” (step ST107—No ) Proceeds to step ST108, and in the case of “deleting” (step ST107—Yes), proceeds to step ST109.
  • step ST108 the control unit 21 determines whether or not the previous sector erase state management area If of the Nth sector la is “erased”, and if it is not “erased” (step ST108—No), The process proceeds to step ST109, and if it is “erased” (step ST108—Yes), the process proceeds to step ST110.
  • control unit 21 sets S-OLD as N, and proceeds to step ST111.
  • step ST104 and step ST108 are “erased” (step ST104, 108—Yes), the data in this sector la is the oldest. by.
  • step ST111 the control unit 21 determines S-OLD until this step ST111. Therefore, from this S-OLD, the number B_OLD of the block lb recorded at the oldest time is calculated by the following formula, and this calculation process is performed. finish.
  • B_OLD (S— OLD— 1) * Number of blocks in sector la + 1
  • FIG. 14 is a flowchart showing a data recording control process having a function of interrupting the data erasure process for the flash memory 1 by the control unit 21.
  • step ST121 when data recording is requested, the control unit 21 determines whether data erasure processing of sector la described in FIG. 10 is being performed, and data erasure processing is in progress. If so (step ST121—Yes), the process proceeds to step ST122. If data erasure is not in progress (step ST121—No), the process proceeds to step ST123.
  • step ST122 the control unit 21 performs a process of interrupting the data erasure process of sector la on the flash memory 1! /, And proceeds to step ST123.
  • step ST123 the control unit 21 confirms that the B-WR-th block state management area Id that performs data recording is “unrecorded”. If “not recorded” (step ST123—Yes), step 21 If it is not “unrecorded” (step ST123—No), the process proceeds to step ST125.
  • step ST124 the sector la has already been erased, and data can be recorded in the B—WR-th block lb. Therefore, the control unit 21 performs the data recording process described in FIG. The process is terminated.
  • step ST125 since the contents of the block state management area Id and the state of the block lb do not match, the control unit 21 outputs an error and terminates this data recording process.
  • the flash memory 1 includes the previous sector erase state management area If instead of the recording erase position management area le of the first embodiment (FIG. 1) in each sector la. In this previous sector erase state management area If, data indicating the data erase state of the previous sector la is recorded, and the control unit 21 performs data based on the previous sector erase state management area If. Search for sector la number S—ER to be erased, or record block data based on block state management area Id and previous sector erase state management area If.
  • the flash memory is used to record data in a circular sequence, read the recorded data, erase the recorded data for each sector, and update the recorded data in the block status management area Id and the previous sector erase status management area If. 1 is controlled so that the recording erasure position management area le of the first embodiment in which the data of the above S-ER, B-WR and B-RD are recorded is provided, for example, when the power is turned off. Even so, S-ER, B-WR and B-RD can be determined.
  • the block state management area Id, and the previous sector erase state management area If have a one-to-one relationship and are rewritten at the same time, the problem that the number of rewrites only in a specific area of the flash memory 1 increases can be avoided. it can.
  • the number of erasures becomes (1Z block number N) compared to the conventional one, and the erasure is equalized without concentrating on a specific sector la as in the conventional case, so that the life of the flash memory 1 can be extended.
  • Data erasure of sector la is empty where data is not read or recorded Performed in advance using time, the data recording process can be performed in a short time.
  • Data erasure of sector la is performed after data is recorded in one block lb of the next sector la, and the latest data can always be left.
  • the information recording / reading device is suitable for recording, reading, and erasing data in the nonvolatile memory.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)
  • Memory System (AREA)

Abstract

 フラッシュメモリ1を形成する複数のセクタ1a各々を複数のブロック1bに分割し、これら複数のブロック1b各々にはデータ記録領域1cとこのデータ記録領域1cにデータを未記録、記録中または記録済かを示すデータを記録したブロック状態管理領域1dを設ける。これら「記録済」または「記録中」により、記録されているデータが信頼できるかどうかを容易に判断でき、データ記録の精度を向上する。また、複数のブロック1bに分割することにより、セクタ1a当たりのデータ書換回数は従来に比しN倍に増へ、消去回数は1/Nとなり、フラッシュメモリ1の寿命を延ばす。

Description

明 細 書
フラッシュメモリの情報記録読出装置 技術分野
[0001] この発明はフラッシュメモリ等に代表される不揮発性メモリに対するデータの記録、 読出しおよび消去を行う情報記録読出装置に関するものである。
背景技術
[0002] フラッシュメモリ等に代表される不揮発性メモリは電源切断後も記録内谷を保持でき るという特徴を有し、この特徴を利用して電源切断直前の設定状態を記録するととも に電源切断後もこの記録内容を保持し、電源再投入時には電源切断時の設定状態 を入手し設定するという使用方法が考えられ、近年では、 DVD (Digital Versatile
Disc)プレーヤ等の様々な電子情報機器においてこのような使用方法が採用され ている。このフラッシュメモリは、データ記録領域の一部を形成しデータ消去の単位と なるセクタを複数有している。また、このフラッシュメモリの場合、 1が設定されているビ ットを 0にする場合はビット単位で行なうのに対し、 0が設定されているビットを 1に設 定するにはセクタ単位で行なう(セクタ消去という)必要がある。
従来、あるセクタに記録されているデータを更新する場合には、そのセクタに記録さ れているデータを消去した後、この同一のセクタに更新されたデータを記録するとい う方法がとられてきた。しかし、この方法ではセクタのデータ消去中またはデータ書き 込み中に電源が切断された場合、データが完全に失われてしまうという問題点があつ た。
この問題に対処した従来の情報記録読出装置として、例えば以下のものがある。
[0003] 上記従来例はデータ書込みが特定のメモリブロックに偏ることなぐ且つ、データ書 込み中に処理が中断した際のデータ消失の防止を目的としたブロック消去形フラッシ ュメモリを使用した情報記録読出装置に関し、このブロック消去形フラッシュメモリに おいて、複数のメモリブロック各々はデータ書込み領域 (エリア)と管理ステータス書 込み領域とを有し、この管理ステータス書込み領域には書込データ特定データ IDと データ書込メモリブロックの消去回数を示す消去カウンタと同一データ IDで書込デー タの時系列的順番を示す書込みステータスとが書込まれ、プロセッサで新たなデータ を書込む際には、書込みステータスが書込み可能を示し、且つ、消去カウンタが最小 を示すメモリブロックを消去した後に、新たなデータおよび管理ステータスを書込み、 他のメモリブロック内の同一データ IDを含む管理ステータスを更新するようにする(例 えば、特許文献 1参照)。
[0004] 特許文献 1:特開 2001— 312891号公報
[0005] 従来の情報記録読出装置は以上のように構成されており、書込みステータスの更 新を一連のデータ記録 (書込み)処理の最後に行なうため、データ記録処理の途中 で電源が切断された場合、データは残っているがそのデータが電源切断時のものか 、または 1回前に記録したデータであるか判別できな 、と 、う問題があった。
また、セクタのデータ消去はデータ記録と比較して非常に時間がかかり、データ書 換時に消去を行なう前記従来例を含む従来の方法では、電力供給停止による電圧 降下を検知してデータ記録を行なう構成のためにセクタのデータ消去とデータ記録と を行なう期間電力を維持することが困難となり、これにより、データ書換えが正常に行 われな 、という問題があった。
一方、フラッシュメモリ等に代表される不揮発性メモリはセクタ当たりのデータ消去 回数に上限値が存在し、使用に限度 (寿命)がある。従って、このように使用限度のあ る不揮発性メモリを使用した情報記録読出装置としては長期寿命を可能にする手段 を備えて ヽることが必要となる。
[0006] この発明は上記のような課題を解決するためになされたもので、データ記録の精度 を向上するとともに、長期寿命を可能にする手段を備えた情報記録読出装置を得る ことを目的とする。
発明の開示
[0007] この発明に係る情報記録読出装置は、複数のセクタ各々を分割したものであって データ記録領域とこのデータ記録領域にデータを未記録、記録中または記録済かを 示すブロック状態管理領域とを有する複数のブロックと、前記複数のセクタ全体のデ ータ記録状態を示すデータ記録状態管理領域とを有する不揮発性メモリと、前記デ ータ記録状態管理領域の記録データ、または、ブロック状態管理領域およびデータ 記録状態管理領域の記録データを基に前記セクタ全体に亘る複数のブロックのデー タ記録領域に対し循環状の順序にてデータを記録するとともに、記録データを読出し 、記録データをセクタごとに一括消去、さらに、前記ブロック状態管理領域およびデ ータ記録状態管理領域それぞれの記録データを更新するように前記不揮発性メモリ を制御する制御部とを備えたものである。
[0008] この発明によれば、複数のセクタにより形成される不揮発性メモリには、これら複数 のセクタ各々を分割したものであってデータ記録領域とこのデータ記録領域にデータ を未記録、記録中または記録済かを示すブロック状態管理領域とを有する複数のブ ロックと、前記複数のセクタ全体のデータ記録状態を示すデータ記録状態管理領域 とを設け、制御部は前記データ記録状態管理領域の記録データ、または、前記プロ ック状態管理領域およびデータ記録状態管理領域の記録データを基に前記セクタ 全体に亘る複数のブロックのデータ記録領域に対し循環状の順序にてデータを記録 するとともに、記録データを読出し、記録データをセクタごとに一括消去、さらに、前 記ブロック状態管理領域およびデータ記録状態管理領域それぞれの記録データを 更新するように前記不揮発性メモリを制御するように構成したので、前記ブロック状態 管理領域が示す「記録済」、またはこの「記録済」に至ることなくデータ記録が中断し、 結果として不完全なデータであると判断される「記録中」により、制御部はそのブロッ クに記録されているデータが信頼できるかどうかを容易に判断することができ、データ 記録の精度を向上することができる
[0009] また、制御部は「記録中」を示すブロックの記録データをそれ以前のブロックの「記 録済」の記録データを利用して修復し、最新に近 、状態のデータを復帰することによ り、データ記録の精度を向上することができる。
また、各セクタを複数のブロックに分割し、セクタ全体に亘るこれら複数のブロックの データ記録領域に対し循環状の順序にてデータを記録するとともに、記録データの 消去はセクタごとに一括消去する構成により、例えば各セクタをブロック数 Nに分割し た場合、セクタ当たりのデータ書換回数を従来に比して N倍に増やす一方、消去回 数は従来に比して(1ZN)となり、セクタ当たりのデータ消去回数に限度 (寿命)のあ るフラッシュメモリの寿命を延ばすことができる。また、複数のブロックのデータ記録領 域に対し循環状の順序にてデータを記録するので、この記録データの消去が従来の ように特定のセクタに集中することなく均等化され、これにより、フラッシュメモリの寿命 の長期化に寄与し、信頼性を向上することができる。
図面の簡単な説明
圆 1]この発明の実施の形態 1による情報記録読出装置の構成図である。
圆 2]図 1のブロック状態管理領域に記録されるデータとそのデータが示す状態の説 明図である。
圆 3]この発明の実施の形態 1による情報記録読出装置におけるデータ記録の制御 処理を示すフローチャートである。
圆 4]この発明の実施の形態 1による情報記録読出装置におけるデータ読出しの制 御処理を示すフローチャートである。
圆 5]この発明の実施の形態 1による情報記録読出装置におけるデータ消去の制御 処理を示すフローチャートである。
[図 6]図 5中の S—RD算出処理を示すフローチャートである。
圆 7]この発明の実施の形態 1による情報記録読出装置におけるデータ消去の処理 を中断する機能を備えたデータ記録の制御処理を示すフローチャートである。
圆 8]この発明の実施の形態 2による情報記録読出装置の構成図である。
圆 9]図 8の前セクタ消去状態管理領域に記録されるデータとそのデータが示す状態 の説明図である。
圆 10]この発明の実施の形態 2による情報記録読出装置におけるデータ消去の制御 処理を示すフローチャートである。
[図 11]図 10中の S—ERを検索する処理を示すフローチャートである。
圆 12]この発明の実施の形態 2による情報記録読出装置におけるデータ記録対象ブ ロック番号 (B— WR)およびデータ読出対象ブロック番号 (B— RD)の算出処理を示 すフローチャートである。
[図 13]図 12中の B— OLDの算出処理を示すフローチャートである。
圆 14]この発明の実施の形態 2による情報記録読出装置におけるデータ消去の処理 を中断する機能を備えたデータ記録の制御処理を示すフローチャートである。 発明を実施するための最良の形態
[0011] 以下、この発明をより詳細に説明するために、この発明を実施するための最良の形 態について、添付の図面に従って説明する。
実施の形態 1.
図 1はこの発明の実施の形態 1による情報記録読出装置の構成図である。 図 1において、この情報記録読出装置は不揮発性メモリとしてフラッシュメモリ 1を使 用し、このフラッシュメモリ 1を制御部 2がインタフェース 3を介し制御する構成としてい る。
[0012] 上記構成において、フラッシュメモリ 1はデータ記録領域の一部を形成しデータ消 去の単位となるセクタ laを複数有しており、図 1はこのセクタ laをセクタ la (l)からセ クタ la (4)の 4つのセクタ力も成るとした例である。また、これらセクタ la (1)からセクタ la (4)の各セクタ laは更に小さなデータ単位 (容量)にした複数のブロック lbに分割 される。図 1は各セクタ laを 4つのブロックに分割し、セクタ la (l)からセクタ la (4)に 亘りブロック lb (1)力もブロック lb (16)の 16ブロックから成るとした例である。これら ブロック lb (1)力 ブロック lb (16)の各ブロックはデータ記録領域 lcとブロック状態 管理領域 Idとを有し、データ記録領域 lcには情報データが記録 (格納)される。この 場合、各ブロック lbのデータ記録領域 lcへのデータ記録はブロック lb (1)力 ブロッ ク lb (16)に対し循環状の順序にて記録される。
また、ブロック状態管理領域 Idはそのブロック状態管理領域 Idが属するブロック lb へのデータ記録の状態を示すデータを記録する領域であり、そのブロック lbのデー タ記録領域 lcにデータが未記録、記録中または記録済かを示すデータが記録され る。
[0013] 図 2は上記ブロック状態管理領域 Idに記録されるデータとそのデータが示す状態 の説明図である。
図 2において、 11はブロック状態管理領域 Idの記録データ(内容)、 12はその記録 データが示すブロック lbの状態である。
記録データが「111」の場合は「未記録」の状態であり、そのブロック lbのデータ記 録領域 lcにデータが記録されて 、な 、ことを示す。 記録データが「011」の場合は「記録中」の状態であり、データ記録領域 lcにデータ が記録中であることを示す。また、この「記録中」の状態はそのデータ記録領域 lcに 記録されているデータが不完全なデータであることを示す。
記録データが「001」の場合は「記録済」の状態であり、データ記録領域 lcにデータ 記録が完了したことを示し、また、記録データが正常であることを示す。
[0014] このとき、 1を 0にする場合はビット単位で行なえるので、「未記録」を「記録中」また は「記録済」に変更でき、「記録中」は「記録済」に変更することが可能である。
一方、「記録中」または「記録済」を「未記録」にするためにはセクタ消去を行なう。 また、 4つのセクタ laと独立して記録消去位置管理領域 leが設けられ、データを記 録するブロック lbの番号 (B—WR)のデータ、最新データが記録されており、データ 読出しの対象となるブロック lbの番号 (B—RD)のデータおよび使用済みとなりデー タ消去の対象となったセクタ laの番号(S—ER)のデータが記録される。なお,これら 番号のデータを記録する際、メモリ上の特定のセルに対応するビットの記録消去回数 が増加しないように考慮しておく。また、 B— RD、 S—ERの初期値としていずれも 0に 対応する値を記録しておく。
上記記録消去位置管理領域 leは、セクタ 1からセクタ 4の 4つのセクタ la全体にお けるデータの記録状態を示すデータを記録するデータ記録状態管理領域を形成す る。
[0015] 制御部 2はフラッシュメモリ 1の前記記録消去位置管理領域 leの記録データを基に 、フラッシュメモリ 1に対してデータの記録と読出しを行なう位置の特定、特定した位 置へのデータの記録と読出制御、データ消去対象セクタ laの特定、特定したセクタ 1 aのデータ消去および消去中断制御等を行なう他に、ブロック状態管理領域 Idおよ び記録消去位置管理領域 le各々の記録データの更新等を行なう。
また、データ記録はセクタ la全体に亘るブロック lb (1)力 ブロック lb (16)のデー タ記録領域に対し循環状の順序にてデータ記録するようにフラッシュメモリ 1を制御 する。
また、上記制御に関する各種判断および演算等の処理を行う。
以上説明の制御部 2は CPU (中央処理装置)およびメモリ等、または、マイクロコン ピュータ等で構成される。
インタフェース 3はフラッシュメモリ 1と制御部 2とを制御可能に接続する。
[0016] 次に、データ記録の処理について図 3をもとに説明する。
図 3は制御部 2によるフラッシュメモリ 1に対するデータ記録の制御処理を示すフロ 一チャートである。
以下、図 1に示すフラッシュメモリ 1のブロック lb (l)からブロック lb (16)中の B— W R番目のブロック lbのデータ記録領域 lcにデータを記録するときの処理について説 明する。
図 3において、ステップ ST1では、制御部 2はデータ記録を行なうブロック lbの番号 B—WRをフラッシュメモリ 1の記録消去位置管理領域 leより取得する。
ステップ ST2では、制御部 2はフラッシュメモリ 1の B—WR番目のブロック lbに設け られているブロック状態管理領域 Idの記録データを「記録中」に設定する。
ステップ ST3では、制御部 2はデータを B— WR番目のブロック lbのデータ記録領 域 lcに記録する。
なお、記録データは制御部 2が設定入力手段等(図示せず)からの設定入力に従 い被設定回路(図示せず)に対し設定することから、この制御部 2が保有していること となる。
[0017] ステップ ST4では、制御部 2はデータ記録が完了した場合、 B— WR番目ブロック 1 bのブロック状態管理領域 Idの記録データを「記録済」に設定する。
ステップ ST5では、制御部 2は B— WR番目のブロック lbに最新のデータが記録さ れたので、記録消去位置管理領域 leのデータ読出し対象となるブロック番号 (B— R D)のデータを B— WR番目ブロックの番号データへ更新する(B— RD = B— WR番 目)。
ステップ ST6では、制御部 2は次回のデータ記録位置を 1つ進めるために記録消 去位置管理領域 leの B— WRの番号データを B— WR番目 + 1に更新する(B— WR =B— WR番目 + 1)。
ステップ ST7では、制御部 2はステップ ST6で更新した「B— WR=B— WR番目 + 1」がブロック lbの総数(本例では 16ブロック)を超えているかについて判断し、ブロッ ク lbの総数を超えている場合 (ステップ ST7— Yes)は、ステップ ST8へ進み、ブロッ ク lbの総数を超えていない場合 (ステップ ST7— No)は、データ記録処理を終了す る。
[0018] ステップ ST8では、制御部 2は循環状に 1番目セクタ (セクタ 1)のブロック lbを指定 するようにするため、ステップ ST6で更新した「B— WR=B— WR番目 + 1」を修正し て「B— WR= 1」に更新し、データ記録処理を終了する。
上記各ステップを経てデータ記録処理を終了するのに対し、ステップ ST2において 「記録中」に設定後、例えば電源切断等によりステップ ST4の「記録済」の処理に至ら ないでデータ記録処理を終了した場合、制御部 2は B— WR番目ブロック lbのブロッ ク状態管理領域 Idの記録データを「記録中」で保持する。これにより、 B— WR番目 ブロック lbに記録されているデータは不完全なデータであることを示すこととなる。こ の「記録中」でデータ記録処理を終了した場合の制御部 2の対処については後述の データ読出しの処理にお!、て説明する。
[0019] 以上の説明のように、記録するブロック lbの位置を循環状の順序でずらしながらデ ータ記録を行なうことにより 1つのセクタ laには分割ブロック数 N (複数)の回数につ いてデータを記録することができので、セクタ la当たりのデータ書換回数を N倍に増 やすことができる。また、ブロック lbのデータ記録状態をブロック状態管理領域 lcに 書き込むので、そのブロック lbに記録されているデータが信頼できるかどうかを容易 に知ることができる。
以上がデータ記録の処理である。
[0020] 次に、データ読出しの処理について図 4をもとに説明する。
図 4は制御部 2によるフラッシュメモリ 1に対するデータ読出しの制御処理を示すフ ローチャートである。 以下、図 1に示すフラッシュメモリ 1のブロック lb (l)からブロック lb (16)中で最新 のデータが記録されている B—RD番目のブロック lbからデータを読み出す場合の 処理について説明する。
図 4において、ステップ ST11では、制御部 2はデータを読み出すブロック lbの番号 B—RDをフラッシュメモリ 1の記録消去位置管理領域 leより取得する。 ステップ ST12では、制御部 2はステップ ST11で取得したブロック番号 B— RDが 0 (B— RD = 0)か否かを判断し、「B—RD = 0」であれば (ステップ ST12— Yes)、ステ ップ ST13へ進み、「: B—RD = 0」でなければ (ステップ ST12— No)、ステップ ST14 へ進む。
[0021] ステップ ST13では、制御部 2は初期値を読み出してデータ読出しの処理を終了す る。
「B— RD=0」であれば、まだフラッシュメモリ 1に読み出し可能なデータが記録され ていないので初期値を読み出すものである。なお、この初期値はフラッシュメモリ 1の 記録消去位置管理領域 leに予め記録しておく。
ステップ ST14では、制御部 2は B— RD番目のブロック lb力もデータを読み出して データ読出しの処理を終了する。
このステップ ST14において、制御部 2が読み出した B— RD番目ブロック lbのブロ ック状態管理領域 Idの記録データが「記録済」であれば上記 B— RD番目ブロック lb のデータは正常なデータである。これに対し、このブロック状態管理領域 Idの記録デ ータが不完全なデータであることを示す「記録中」である場合、制御部 2は上記 B—R D番目ブロック lbの 1つまたはそれ以上前のブロック lbにおける記録データを読み 出し、このデータをもとに、上記 B—RD番目ブロック lbの不完全なデータを最新に近 Vヽ状態のデータに復帰させるように修復制御するようにしてもょ 、。
以上がデータ読出しの処理である。
[0022] 次に、データ消去の処理について図 5をもとに説明する。
図 5は制御部 2によるフラッシュメモリ 1に対するデータ消去の制御処理を示すフロ 一チャートである。
図 5において、ステップ ST21では、制御部 2はデータ消去の対象となるセクタ laの 番号 S—ERをフラッシュメモリ 1の記録消去位置管理領域 leより取得する。
ステップ ST22では、制御部 2は最新データが記録されているセクタ laの番号 S— RDを算出処理する。この算出処理については別途備えている処理フロー(サブルー チン)に従う (後述図 6)。
ステップ ST23では、制御部 2は最新データの読出しが完了し、且つ、データ記録 処理を要するデータ記録の要求が無 、かにつ 、て判断し、この要求が有る場合 (ス テツプ ST23— No)は、まだセクタ laのデータ消去を開始できない状態なのでステツ プ ST23に戻り、上記要求が無い場合 (ステップ ST23— Yes)は、ステップ ST24へ 進む。
[0023] ステップ ST24では、制御部 2はデータ消去するセクタ laの番号 S—ERと最新デー タが記録されているセクタ laの番号 S— RDとが一致(S— ER=S— RD)するかにつ いて判断し、両者が一致する場合 (ステップ ST24— Yes)は、 S_ER番目のセクタ 1 aのデータを消去すると最新データが消失することを意味し、この最新データの消失 を防止するためにこのデータ消去の処理を終了する。これに対し、両者が一致しない 場合 (ステップ ST24— No)は、 S— ER番目セクタ laの全てのブロック lbがデータ記 録済みであり、消去可能なセクタと判断してステップ ST25へ進む。
ステップ ST25では、制御部 2はフラッシュメモリ 1に対し S—ER番目のセクタ laの 記録データを一括消去する。
ステップ ST26では、制御部 2は次回のデータ消去の対象となるセクタ laの番号 S — ERを 1つ進めるために記録消去位置管理領域 leの S— ERの番号データを S— E R番目 + 1に更新する(S— ER= S— ER番目 + 1)。
[0024] ステップ ST27では、制御部 2はステップ ST26で更新した「S— ER= S— ER番目
+ 1」がセクタ laの総数 (本例では 4セクタ)を超えて!/、るかにつ!、て判断し、セクタ la の総数を超えている場合 (ステップ ST27— Yes)は、ステップ ST28へ進み、セクタ 1 aの総数を超えていない場合 (ステップ ST27— No)は、ステップ ST22へ戻り、前記 処理を繰り返す。
ステップ ST28では、制御部 2は循環状に 1番目セクタ (セクタ la (1) )を指定するよ うにするため、ステップ ST26で更新した「S— ER=S— ER番目 + 1」を修正して「S _ER= 1」に更新し、ステップ ST22へ戻る。
[0025] 以上の説明のように、データの読出しおよび記録が行なわれていない空き時間を 使ってあら力じめセクタ laのデータ消去を行なうので、従来のようにデータ記録の際 にデータ消去する必要がなぐこれによりデータ記録処理を短時間で実施することが できることとなる。従って、電源切断時にはデータ消去の処理は不用であり、更新デ ータの記録だけを実施すればょ 、ので、短 、時間でデータ更新処理を実施すること が可能となる。
また、 1つのセクタ laの分割ブロック数を Nとしたとき、 1つのセクタ laの全ブロック 1 bが記録済みになった後にセクタ laの記録データを一括消去することにより、消去回 数は従来に比し、(1ZN)となり、セクタ la当たりのデータ消去回数に限度 (寿命)の あるフラッシュメモリ 1の寿命を延ばすことができる。さらに、この一括消去は消去対象 となるセクタを除くセクタ laの少なくとも 1つのブロック lbにデータが記録された後に 実施されるので、必ず最新データを残すことができることとなる。
[0026] 次に、前記ステップ ST22の算出処理について図 6をもとに説明する。
図 6は最新データが記録されているセクタ laの番号 S—RDの算出処理を示すフロ 一チャート(サブルーチン)である。ただし、このフローチャートの前提条件として、 1つ のセクタ laにあるブロックの数は固定 (本例では 4つ)であり、且つ、全てのセクタ la につ 、て同数であるものとする。
図 6において、ステップ ST31では、制御部 2は上記前提条件に従い、最新データ が記録されているブロック lbの番号 B—RDを 1セクタ内のブロック数(例えば 4)で除 算すれば最新データが記録されているセクタ laの番号 S—RDを求めることができる 。この除算においては、少数点以下は切り上げることとする。例えば図 1において、最 新データが記録されて 、るブロック lbの番号 B— RDが「ブロック lb (5)」であれば、こ のブロック lb (5)の「5」をブロック数 4の「4」で除算し、少数点以下を切り上げることに より「2」となり、「セクタ la (2)」が得られる。
上記ステップ ST31の算出処理は、セクタ la中の一つのブロック lbに最新データが 記録された後であれば消去対象のセクタ laの番号 S—ERを特定できることを意味し 、これにより、消去対象となるセクタ laの番号 S—ERを早期に特定でき、前述のよう に、データの読出しおよび記録が行なわれて 、な 、空き時間を使って前もってセクタ laのデータ消去を行なうと 、う処理を一層容易にすることとなる。
[0027] 次に、データ消去の処理を中断する機能を備えたデータ記録の処理について図 7 をもとに説明する。
図 7は制御部 2によるフラッシュメモリ 1に対するデータ消去の処理を中断する機能 を備えたデータ記録の制御処理を示すフローチャートである。
図 7において、ステップ ST41では、制御部 2はデータ記録の要求がされた場合、前 記図 5で説明したセクタ laのデータ消去の処理中であるかについて判断し、データ 消去の処理中である場合 (ステップ ST41— Yes)は、ステップ ST42へ進み、データ 消去の処理中でない場合 (ステップ ST41— No)は、ステップ ST43へ進む。
ステップ ST42では、制御部 2はフラッシュメモリ 1に対してセクタ laのデータ消去の 処理を中断する処理を行ない、ステップ ST43へ進む。
ステップ ST43では、制御部 2は前記図 3で説明したデータ記録の処理を行い、処 理を終了する。
以上の説明のように、セクタ laのデータ消去の処理中にデータ記録の要求がされ た場合、セクタ laのデータ消去完了後に更新データの記録処理を開始するのでは なぐデータ消去の処理を中断して即座に更新データの記録処理を実行するので、 更新データの記録を高速かつ確実に行なうことが可能となる。
以上のように、この実施の形態 1によれば、フラッシュメモリ 1を形成する複数のセク タ la各々を複数のブロック lbに分割し、これら複数のブロック lbそれぞれにはデータ 記録領域 lcとこのデータ記録領域 lcにデータを未記録、記録中または記録済かを 示すデータを記録したブロック状態管理領域 Idを設け、さらに、データを記録するブ ロックの番号 B— WRのデータ、最新データが記録されており、データ読出しの対象と なるブロックの番号 B—RDのデータ、およびデータ消去の対象となるセクタ laの番 号 S—ERのデータを記録した記録消去位置管理領域 leを前記複数のセクタ la各 々と独立に設け、制御部 2は記録消去位置管理領域 leの記録データを基に前記セ クタ la全体に亘る複数のブロック lbのデータ記録領域 lcに対し循環状の順序にて データを記録するとともに、記録データを読出し、記録データをセクタごとに一括消去 、ブロック状態管理領域 Idおよびデータ記録状態管理領域 leの記録データを更新 するようにフラッシュメモリ 1を制御するように構成したので、前記ブロック状態管理領 域 Idが示す「記録済」、またはこの「記録済」に至ることなくデータ記録が中断し、結 果として不完全なデータであると判断される「記録中」により、制御部 2はそのブロック lbに記録されているデータが信頼できるかどうかを容易に判断でき、データ記録の 精度を向上することができる。
[0029] また、制御部 2は「記録中」を示すブロック lbの記録データをそれ以前のブロック lb の「記録済」の記録データを利用して修復し、最新に近 、状態のデータを復帰するこ とにより、データ記録の精度を向上することができる。
また、各セクタ laを複数のブロック lbに分割し、セクタ la全体に亘るこれら複数の ブロック lbのデータ記録領域に対し循環状の順序にてデータを記録するとともに、記 録データの消去はセクタ laごとに一括消去する構成により、例えば各セクタ laをプロ ック数 Nに分割した場合、セクタ 1 a当たりのデータ書換回数を従来に比して N倍に増 やす一方、消去回数は従来に比して(1ZN)となり、セクタ la当たりのデータ消去回 数に限度 (寿命)のあるフラッシュメモリ 1の寿命を延ばすことができる。また、複数の ブロック lbのデータ記録領域に対し循環状の順序にてデータを記録するので、この 記録データの消去が従来のように特定のセクタに集中することなく均等化され、これ により、フラッシュメモリ 1の寿命の長期化に寄与し、信頼性を向上することができる。
[0030] また、セクタ laのデーター括消去はデータの読出しおよび記録が行なわれていな い空き時間を使って前もって実施するので、従来のようにデータ記録の際にデータ 消去する必要がなぐこれによりデータ記録処理を短時間で実施することができること となる。従って、電源切断時にはデータ消去の処理は不用となり、更新データの記録 だけを実施すればよぐ短い時間でデータ更新処理を実施することができる。
また、セクタ laのデーター括消去は消去対象となるセクタ laを除くセクタ laの少な くとも 1つのブロック lbにデータが記録された後に実施されるので、必ず最新データ を残すことができる。
また、セクタ laのデータ消去の処理中にデータ記録の要求がされた場合、セクタ la のデータ消去完了後に更新データの記録処理を開始するのではなぐデータ消去の 処理を中断して即座に更新データの記録処理を実行するので、更新データの記録 を高速かつ確実に行なうことができる。
また、最新データとブロック状態管理領域 Idおよび記録消去位置管理領域 leとは 1対 1の関係となり同時に書き換えるため、フラッシュメモリ 1の特定領域のみ書き換え 回数があがると!、う問題を回避することができる。 [0031] 実施の形態 2.
図 8はこの発明の実施の形態 2による情報記録読出装置の構成図である。 図 8において、図 1と同一のものについては同一符合を付してあり、この実施の形態 2による情報記録読出装置の構成が図 1の構成に対し異なる点は、図 1の記録消去 位置管理領域 leに代えて前セクタ消去状態管理領域 Ifを各セクタ laの領域内に設 けた点および制御部 1代る制御部 21を設けた点である。なお、図 1と同一符合のもの についての説明は省略する。
この前セクタ消去状態管理領域 Ifは、一つ前のセクタ laのデータ消去の状態を示 すデータを記録する領域である。例えば、セクタ la (2)の前セクタ消去状態管理領域 Ifには一つ前のセクタ la (1)のデータ消去の状態を示すデータが記録される。図 8 はこのセクタ la (1)のデータが消去されている例を示している。なお、一つ前のセクタ laのデータ消去の状態を示すようにしたのは、同じセクタ laのデータ消去の状態を 示すようにしたときには、例えばそのセクタ laのデータ消去中に電源が切れた場合 にセクタ laのデータ消去の状態が不完全となり、これを回避することによる。
[0032] 図 9は上記前セクタ消去状態管理領域 Ifに記録されるデータとそのデータが示す 状態の説明図である。
図 9において、 31は前セクタ消去状態管理領域 Ifの記録データ(内容)、 32はその 記録データが示す一つ前のセクタ laの状態である。
記録データが「111」の場合は初期状態であるデータが「未消去」の状態を示す。 記録データが「011」の場合は 1つ前のセクタ laのデータ消去を開始したことを示す 「消去中」の状態を示す。
記録データが「001」の場合は 1つ前のセクタ laのデータ消去が完了したことを示 す「消去済」の状態を示す。
上記前セクタ消去状態管理領域 Ifは、セクタ la (1)からセクタ la (4)の 4つのセクタ la全体におけるデータの記録状態を示すデータを記録するデータ記録状態管理領 域を形成する。
[0033] 制御部 21は図 1の制御部 2に対し、フラッシュメモリ 1に対する制御処理の方法が 一部において異なる点を除き基本機能として制御部 2と同様である。また、この制御 部 21が CPUおよびメモリ等、または、マイクロコンピュータ等で構成される点につい ても制御部 2と同様である。
[0034] 次に、セクタ laのデータ消去の処理について図 10をもとに説明する。
図 10は制御部 21によるフラッシュメモリ 1に対するデータ消去の制御処理を示すフ ローチャートである。 図 10において、ステップ ST51では、制御部 21はデータ消去の対象となるセクタ la の番号 S—ERをフラッシュメモリ 1の前セクタ消去状態管理領域 Ifを検索処理するこ とにより取得する。この検索処理にっ 、ては後述する(図 11)。
ステップ ST52、ステップ ST53およびステップ ST54は図 5のステップ ST22〜ステ ップ ST24と同様の処理であり、説明は省略する。ただし、ステップ ST52において、 最新データが記録されているセクタ laの番号 S—RDの算出処理(図 6)に必要な B — RD (最新データが記録されて 、るブロック lbの番号)は前セクタ消去状態管理領 域 Ifをもとに算出処理して取得する。
[0035] ステップ ST55では、制御部 21はフラグ設定対象のセクタ laの番号を示す変数 N を「S— ER+ 1Jとおく(N = S— ER+ 1)。
ステップ ST56では、制御部 21はステップ ST55の処理における変数 Nがセクタ la の総数 (本例では 4セクタ)を越えて 、るかにっ 、て判断し、セクタ laの総数を超えて いる場合 (ステップ ST56— Yes)は、ステップ ST57へ進み、セクタ laの総数を超え ていない場合 (ステップ ST56— No)は、ステップ ST58へ進む。
ステップ ST57では、制御部 21は前記 Nを 1とおく(N= l)。
ステップ ST58では、制御部 21は N番目のセクタ laの前セクタ消去状態管理領域 1 fのデータを「消去中」に設定する。
ステップ ST59では、制御部 21はフラッシュメモリ 1に対し S—ER番目のセクタ laの 記録データを消去する。
[0036] ステップ ST60では、制御部 21はステップ ST59のセクタ laの記録データ消去が完 了したときには、 N番目のセクタ laの前セクタ消去状態管理領域 Ifのデータを「消去 済」に設定する。
ステップ ST61では、制御部 21はデータ消去したセクタ laがステップ ST55でフラ グ設定したセクタ laであるので、 S— ERを N (S— ER=N)とおきステップ ST52へ戻 る。
以上がセクタ laのデータ消去の処理である。
[0037] 次に、データ消去の対象となるセクタ laの番号 S—ERを検索する処理について図 11をもとに説明する。
図 11は前セクタ消去状態管理領域 Ifの状態を確認して S—ERを検索する処理を 示すフローチャートである。
図 11において、ステップ ST71では、制御部 21は前セクタ消去状態管理領域 Ifを 確認するセクタ laの番号を格納する(表す)変数 Nを 1とおく(N= l)。
ステップ ST72では、制御部 21は N+ 1番目のセクタ laの前セクタ消去状態管理領 域 Ifのデータが「消去中」であるかどうかを判断し、「消去中」でな!/、場合 (ステップ S T72— No)は、ステップ ST73へ進み、「消去中」である場合 (ステップ ST72— Yes) は、ステップ ST79へ進む。
[0038] ステップ ST73では、制御部 21は N番目セクタ laの前セクタ消去状態管理領域 If 力 S「消去済」かどうかを判断し、「消去済」でない場合 (ステップ ST73— No)は、ステツ プ ST74へ進み、「消去済」である場合 (ステップ ST73— Yes)は、ステップ ST79へ 進む。
ステップ ST74では、制御部 21はこのセクタ laについては消去対象ではないので Nを N+ 1とおく(N = N+ 1)。
ステップ ST75では、制御部 21は Nがセクタ laの総数と一致するかについて判断し 、一致しない場合 (ステップ ST75— No)は、ステップ ST72へ戻って検索を継続する 。これに対し一致する場合 (ステップ ST75— Yes)、このセクタ laは最後に処理され るセクタ laであることを示し、この場合はステップ ST76へ進む。
[0039] ステップ ST76では、制御部 21は 1番目のセクタ laの前セクタ消去状態管理領域 1 fが「消去中」であるかどうかを判断し、「消去中」でない場合 (ステップ ST76— No)は 、ステップ ST77へ進み、「消去中」である場合 (ステップ ST76— Yes)は、ステップ S T79へ進む。
ステップ ST77では、制御部 21は N番目のセクタ laの前セクタ消去状態管理領域 1 fが「消去済」であるかどうかを判断し、「消去済」でない場合 (ステップ ST77— No)は 、ステップ ST78へ進み、「消去済」である場合 (ステップ ST77— Yes)は、ステップ S T79へ進む。
ステップ ST78では、制御部 21はデータ消去の対象となるセクタ laの番号 S—ER を 1とおき(S— ER= 1)、この検索処理を終了する。このように処理するのは、ステツ プ ST77において、 N番目のセクタ laの前セクタ消去状態管理領域 Ifが「消去済」で な 、場合は全てのセクタ laにお 、てまだ一度も消去が行なわれて ヽな 、ことを示し、 従って、データ消去の対象となるセクタ laは 1番目のセクタであるので S— ERを 1と おくことによる。
[0040] ステップ ST79では、制御部 21はデータ消去の対象となるセクタ laの番号 S—ER を Nとおき(S— ER=N)、この検索処理を終了する。
このステップ ST79の上記処理は、ステップ ST72— Yes、ステップ ST73— Yes、ス テツプ ST76— Yesおよびステップ ST77— Yesの場合に行われる。
ステップ ST72の判断が「Yes」の場合、過去に N番目のセクタ laにて消去処理が 行なわれたが中断されたと判断し、 N番目のセクタ laが消去対象のセクタ laとあると して S— ERを Nとおく。
ステップ ST73の判断が「Yes」の場合、直前のセクタ laが前回消去され、 N番目の セクタ laが消去対象のセクタ laとなるので S—ERを Nとおく。
また、ステップ ST76およびステップ ST77それぞれの判断が「Yes」の場合、 N番目 のセクタ laが消去対象のセクタ laとなるので S—ERを Nとおく。
以上がデータ消去の対象となるセクタ laの番号 S—ERの検索処理であり、この検 索処理を終了したときには図 10のフローへ戻る。
[0041] 次に、データ記録の対象となるブロック番号 (B— WR)およびデータ読出しの対象 となるブロック番号 (B—RD)を算出する処理について図 12をもとに説明する。
図 12はデータ記録対象ブロック番号 (B—WR)およびデータ読出対象ブロック番 号 (B—RD)の算出処理を示すフローチャートである。
図 12において、ステップ ST81では、制御部 21は上記 B— WRおよび B— RDの算 出処理に必要な、先に最も古い時期に記録されたブロック lbの番号である B OLD を算出する。この B_OLDは別途の処理フロー(サブルーチン)により算出する。この 算出については後述する(図 13)。
ステップ ST82では、制御部 21はブロック状態管理領域 Idを確認するブロック lbの 番号を格納する変数 Nを B— OLDとおき(N = B— OLD)、また、 B_RDを 0とおく( B— RD = 0)。
[0042] ステップ ST83では、制御部 21は N番目ブロック lbのブロック状態管理領域 Idの 記録データが「記録済」、「記録中」または「未記録」の 、ずれの状態であるかを判断 し、「記録済」であれば、 N番目のブロック lbは読出し可能なデータが記録されている のでステップ ST84進み、「記録中」であれば、記録データは正常なデータではない のでステップ ST85進み、また、「未記録」であれば、 N番目のブロック lbにデータを 記録することが可能なのでステップ ST89進む。
ステップ ST84では、制御部 21は B— RDを N (B— RD = N)とおき、ステップ ST85 へ進む。ただし、後記のステップ ST88からステップ ST83へ戻る処理が発生している 場合、この B—RDには最後に確認した「記録済」のブロック lbの番号が設定される。
[0043] ステップ ST85では、制御部 21は次のブロック lbのブロック状態管理領域 Idを確 認するため、 Nを N+ 1とおく(N = N+ 1)。
ステップ ST86では、制御部 21はステップ ST85で設定した Nが全ブロックの総数( 本例では 16ブロック)を超えて 、るかにっ 、て判断し、超えて 、る場合 (ステップ ST8 6 -Yes)は、ステップ ST87へ進み、超えていない場合 (ステップ ST86— No)は、ス テツプ ST88へ進む。
ステップ ST87では、制御部 21は Nを 1とおく(N= l)。
ステップ ST88では、制御部 21は、 Nと B_OLDとが一致 (N = B— OLD)するか 否かについて判断する一方、全てのブロック lbに対しステップ ST83以降ステップ S T87までの処理につ!、て検索を完了したかにつ 、て判断し、 Nと B— OLDとが不一 致 (N≠B— OLD)であり、且つ、全てのブロック lbに対する検索が完了していない のであればステップ ST83へ戻って処理を継続し、 Nと B— OLDとが不一致(N≠B —OLD)であり、且つ、全てのブロック lbに対する検索が完了したのであればステツ プ ST89へ進み、また、 Nと B OLDとが一致 (N = B OLD)する場合には全ての ブロック lbに対する検索が未完または完了に関係無くステップ ST90へ進む。
[0044] ステップ ST89では、制御部 21は B— WRを Nとおき(B— WR = N)、この算出処理 を終了する。このように処理するのは、ステップ ST83またはステップ ST88よりこのス テツプ ST89へ到達した時点で、 Nには記録対象となるブロック lbの番号が格納され て 、ることによる。
ステップ ST90では、制御部 21はエラー出力してこの算出処理を終了する。このよ うに処理するのは、 Nと B— OLDとが一致(N = B_OLD)して!/、れば全てのブロック lbにデータが記録されていることを示し、この場合には記録対象ブロックが存在しな いのでエラー出力し、この算出処理を終了する。
[0045] 以上がデータ記録対象ブロック番号 (B— WR)およびデータ読出対象ブロック番号
(B— RD)の算出処理である。この算出処理により得た B—WRをもとにデータ記録処 理が行われ、 B—RDをもとにデータ読出処理が行われる。このデータ読出処理につ いては既述の図 4のフローチャートに従う。また、データ記録処理については後述す る(図 14)。
[0046] 次に、前記図 12のフローチャート中におけるステップ ST81の処理(B— OLDの算 出処理)について図 13をもとに説明する。
図 13は前セグタ消去状態管理領域 Ifの状態をもとに、最も古い時期に記録された ブロック lbの番号である B— OLDの算出処理を示すフローチャート(サブルーチン) である。
この B— OLDを求めるためには最も古 、データが記録されて 、るセクタ laの番号 S —OLDを先に求め、次いで、 B— OLDを算出する。
図 13において、ステップ ST101では、制御部 21は前セクタ消去状態管理領域 If を確認するセクタ laの番号を格納する変数 Nを 1とおく(N= l)。
ステップ ST102では、制御部 21は N+ 1番目のセクタ laの前セクタ消去状態管理 領域 Ifが「消去中」であるかどうかを判断し、「消去中」である場合 (ステップ ST102 —Yes)は、ステップ ST103へ進み、「消去中」でない場合 (ステップ ST102—No) は、ステップ ST104へ進む。
[0047] ステップ ST103では、制御部 21は S OLDを N+ 1とおき(S OLD=N+ l)、ス テツプ ST111へ進む。このように処理するのは、このセクタ la内のデータは消去中に 中断されたと判断したことによる。
ステップ ST104では、制御部 21は N番目セクタ laの前セクタ消去状態管理領域 1 fが「消去済」かどうかを判断し、「消去済」でない場合 (ステップ ST104— No)は、ス テツプ ST105へ進み、「消去済」である場合 (ステップ ST104— Yes)は、ステップ S T110へ進む。
ステップ ST105では、制御部 21は次のセクタ laについて確認するため Nを N+ 1 とおく(N = N+ 1)。
ステップ ST106では、制御部 21は Nがセクタ laの総数と一致するかについて判断 し、一致しない場合 (ステップ ST106— No)は、ステップ ST102へ戻って確認を継 続し、一致する場合 (ステップ ST106— Yes)は、 N番目のセクタ laが最後に処理さ れるセクタ laであるとしてステップ ST107へ進む。
[0048] ステップ ST107では、制御部 21は 1番目のセクタ laの前セクタ消去状態管理領域 Ifが「消去中」であるかどうかを判断し、「消去中」でな 、場合 (ステップ ST107— No )は、ステップ ST108へ進み、「消去中」である場合 (ステップ ST107— Yes)は、ステ ップ ST109へ進む。
ステップ ST108では、制御部 21は N番目のセクタ laの前セクタ消去状態管理領域 Ifが「消去済」であるかどうかを判断し、「消去済」でな 、場合 (ステップ ST108— No )は、ステップ ST109へ進み、「消去済」である場合 (ステップ ST108— Yes)は、ステ ップ ST110へ進む。
ステップ ST109では、制御部 21は S— OLDを 1とおき(S— OLD= l)、ステップ S Ti l lへ進む。このように処理するのは、ステップ ST107において「消去中」と判断さ れたこと(ステップ ST107— Yes)、およびステップ ST108において「消去済」でない 場合 (ステップ ST108— No)は、どのセクタも消去されていないことを示すので、最も 古 ヽセクタは 1であること〖こよる。
[0049] ステップ ST110では、制御部 21は S— OLDを Nとおき、ステップ ST111へ進む。
このように処理するのは、ステップ ST104およびステップ ST108の各判断が「消去済 」である場合 (ステップ ST104, 108— Yes)は、このセクタ laのデータが最も古いこと による。
ステップ ST111では、制御部 21はこのステップ ST111までで S— OLDが確定する ので、この S— OLDから下記式により最も古い時期に記録されたブロック lbの番号 B _OLDを算出し、この算出処理を終了する。
B_OLD= (S— OLD— 1) *セクタ la内ブロック数 + 1
以上で B— WRと B— RDの算出に必要な B— OLDが確定するので、図 12のフロー へ戻る。
[0050] 次に、データ消去の処理を中断する機能を備えたデータ記録の処理について図 1 4をもとに説明する。
図 14は制御部 21によるフラッシュメモリ 1に対するデータ消去の処理を中断する機 能を備えたデータ記録の制御処理を示すフローチャートである。
図 14において、ステップ ST121では、制御部 21はデータ記録の要求がされた場 合、前記図 10で説明したセクタ laのデータ消去の処理中であるかについて判断し、 データ消去の処理中である場合 (ステップ ST121— Yes)は、ステップ ST122へ進 み、データ消去の処理中でない場合 (ステップ ST121— No)は、ステップ ST123へ 進む。
[0051] ステップ ST122では、制御部 21はフラッシュメモリ 1に対してセクタ laのデータ消 去の処理を中断する処理を行な!/、、ステップ ST123へ進む。
ステップ ST123では、制御部 21はデータ記録を行なう B—WR番目のブロック状態 管理領域 Idが「未記録」であることを確認し、「未記録」の場合 (ステップ ST123— Ye s)は、ステップ ST124へ進み、「未記録」でない場合 (ステップ ST123— No)は、ス テツプ ST125へ進む。
ステップ ST124では、既にセクタ laの消去が行なわれ、 B— WR番目のブロック lb にデータ記録を行なえるようになっているので、制御部 21は前記図 3で説明したデー タ記録の処理を行ない、処理を終了する。
ステップ ST125では、ブロック状態管理領域 Idの内容とブロック lbの状態とがー 致していないため、制御部 21はエラーを出力し、このデータ記録の処理を終了する [0052] 以上のように、この実施の形態 2によれば、フラッシュメモリ 1には実施の形態 1 (図 1 )の記録消去位置管理領域 leに代わる前セクタ消去状態管理領域 Ifを各セクタ la の領域内に設け、この前セクタ消去状態管理領域 Ifには一つ前のセクタ laのデータ 消去の状態を示すデータを記録し、制御部 21はこの前セクタ消去状態管理領域 If を基にデータ消去の対象となるセクタ laの番号 S—ERを検索し、または、ブロック状 態管理領域 Idおよび前セクタ消去状態管理領域 Ifとを基にデータを記録するブロッ ク lbの番号 B— WR、最新データが記録されており、データ読出しの対象となるプロ ック lbの番号 B— RDを算出し、これら検索または算出した S— ER、 B— WRおよび B —RDを基に前記セクタ la全体に亘る複数のブロック lbのデータ記録領域 lcに対し 循環状の順序にてデータを記録するとともに、記録データを読出し、記録データをセ クタごとに一括消去、ブロック状態管理領域 Idおよび前セクタ消去状態管理領域 If の記録データを更新するようにフラッシュメモリ 1を制御するように構成したので、上記 S— ER、 B— WRおよび B— RDのデータを記録した実施の形態 1の記録消去位置 管理領域 leを設けることなぐ例えば電源が切断された場合であっても S—ER、 B— WRおよび B— RDを確定することができる。
[0053] また、セクタ laのデータ消去が中断された場合であっても必ず S—ERが特定でき( 図 11)、また記録が途中で中断された場合であっても不完全なデータを読み出すこ となぐ最新の正常なデータを読み出すことができる(図 12)。
また、最新データとブロック状態管理領域 Idおよび前セクタ消去状態管理領域 Ifと は 1対 1の関係となり同時に書き換えるため、フラッシュメモリ 1の特定領域のみ書き換 え回数があがるという問題を回避することができる。
[0054] この他、実施の形態 1と同様の以下の効果が得られる。
ブロック状態管理領域 Idが示す「記録済」および「記録中」のデータ力 記録デー タが信頼できるかどうかを容易に判断でき、データ記録の精度を向上できる。
消去回数が従来に比して(1Zブロック数 N)となるとともに消去が従来のように特定 のセクタ laに集中することなく均等化され、フラッシュメモリ 1の寿命を延ばすことがで きる。
セクタ laのデーター括消去がデータの読出しおよび記録が行なわれていない空き 時間を使って前もって実施され、データ記録処理を短時間で実施できる。
セクタ laのデーター括消去は次のセクタ laの 1つのブロック lbにデータが記録され た後に実施され、必ず最新データを残すことができる。
セクタ laのデータ消去中にデータ記録の要求がされた場合、データ消去の処理を 中断して即座に更新データの記録処理を実行し、更新データの記録を高速かつ確 実に行なうことができる。
産業上の利用可能性
以上のように、この発明に係る情報記録読出装置は、不揮発性メモリに対するデー タの記録、読出しおよび消去を行うのに適している。

Claims

請求の範囲
[1] データ記録領域の一部を形成するとともに、データ消去の単位となるセクタを複数 有し、これら複数のセクタ各々を分割したものであってデータ記録領域とこのデータ 記録領域にデータを未記録、記録中または記録済かを示すデータを記録するブロッ ク状態管理領域とを有する複数のブロックと、前記複数のセクタ全体におけるデータ の記録状態を示すデータを記録するデータ記録状態管理領域とを有してなる不揮発 性メモリと、前記不揮発性メモリのデータ記録状態管理領域の記録データ、または、 ブロック状態管理領域およびデータ記録状態管理領域の記録データを基に前記セ クタ全体に亘る複数のブロックのデータ記録領域に対し循環状の順序にてデータを 記録するとともに、記録データを読出し、記録データをセクタごとに一括消去、および これらデータの記録、読出し、消去を基に前記ブロック状態管理領域およびデータ記 録状態管理領域各々の記録データを更新するように前記不揮発性メモリを制御する 制御部とを備えた情報記録読出装置。
[2] データ記録状態管理領域は複数のセクタ各々と独立に設け、データを記録するブ ロックの番号のデータ、最新データが記録されているブロックの番号のデータ、およ びデータ消去の対象となるセクタの番号のデータを記録し、制御部はこのデータ記 録状態管理領域よりデータを記録するブロックの番号のデータ、最新データが記録さ れて 、るブロックの番号のデータ、またはデータ消去の対象となるセクタの番号のデ ータを取得し、この取得データを基にデータを記録、読出しおよび消去することを特 徴とする請求項 1記載の情報記録読出装置。
[3] データ記録状態管理領域は複数のセクタ各々の領域内に設け、一つ手前のセクタ のデータ消去状態を示すデータを記録し、制御部はこのデータ記録状態管理領域 およびブロック状態管理領域とよりデータを記録するブロックの番号のデータおよび 最新データが記録されて 、るブロックの番号のデータを算出し、またはデータ記録状 態管理領域よりデータ消去の対象となるセクタの番号のデータを検索し、前記算出ま たは検索したデータを基にデータを記録、読出しおよび消去することを特徴とする請 求項 1記載の情報記録読出装置。
[4] 制御部は、データの読出し力も記録までの間に記録データを消去するように不揮 発性メモリを制御することを特徴とする請求項 1記載の情報記録読出装置。
[5] 制御部は、消去対象となるセクタを除くセクタの少なくとも 1つのブロックにデータが 記録された後に前記消去対象セクタのブロック各々に記録されたデータを一括消去 するように不揮発性メモリを制御することを特徴とする請求項 1記載の情報記録読出 装置。
[6] 制御部は、消去対象セクタの記録データを一括消去中にデータ記録を行なうときに はこの一括消去を中断してデータ記録処理を優先実行するように不揮発性メモリを 制御することを特徴とする請求項 5記載の情報記録読出装置。
PCT/JP2005/010608 2004-09-17 2005-06-09 フラッシュメモリの情報記録読出装置 Ceased WO2006030566A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US10/576,077 US20090019244A1 (en) 2004-09-17 2005-06-09 Information Record/Read Apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004271918A JP2006085596A (ja) 2004-09-17 2004-09-17 情報記録読出装置
JP2004-271918 2004-09-17

Publications (1)

Publication Number Publication Date
WO2006030566A1 true WO2006030566A1 (ja) 2006-03-23

Family

ID=36059827

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2005/010608 Ceased WO2006030566A1 (ja) 2004-09-17 2005-06-09 フラッシュメモリの情報記録読出装置

Country Status (4)

Country Link
US (1) US20090019244A1 (ja)
JP (1) JP2006085596A (ja)
CN (1) CN1842776A (ja)
WO (1) WO2006030566A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011129192A (ja) * 2009-12-16 2011-06-30 Samsung Electronics Co Ltd 半導体記憶装置
JP2014115959A (ja) * 2012-12-12 2014-06-26 Dainippon Printing Co Ltd Icカード、データ消去処理方法、及びデータ消去処理プログラム
TWI455135B (zh) * 2010-06-10 2014-10-01 Apacer Technology Inc 以快閃記憶體為基礎的儲存裝置及其資料寫入方法

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI400707B (zh) * 2009-07-09 2013-07-01 Phison Electronics Corp 快閃記憶體邏輯區塊管理方法及其控制電路與儲存系統
CN103092766B (zh) * 2012-12-28 2015-09-30 北京时代民芯科技有限公司 一种用于nand flash的均衡损耗实现方法
US11175851B2 (en) 2019-11-15 2021-11-16 Cignet Technology, Inc. Method and system for fast, secure, and complete certification of memory status
CN115756331B (zh) * 2022-11-23 2023-08-04 东土科技(宜昌)有限公司 充电数据的高效存储方法、装置、存储介质以及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002032256A (ja) * 2000-07-19 2002-01-31 Matsushita Electric Ind Co Ltd 端末装置
JP2002278850A (ja) * 2001-03-14 2002-09-27 Nec Corp 半導体装置
JP2002318733A (ja) * 2001-04-20 2002-10-31 Matsushita Electric Works Ltd ブロック消去型記憶媒体の管理装置
JP2004071033A (ja) * 2002-08-05 2004-03-04 Mitsubishi Electric Corp フラッシュメモリのデータ記録法
JP2004259093A (ja) * 2003-02-27 2004-09-16 Casio Comput Co Ltd データ処理装置およびデータ処理のプログラム

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6948026B2 (en) * 2001-08-24 2005-09-20 Micron Technology, Inc. Erase block management
GB0123415D0 (en) * 2001-09-28 2001-11-21 Memquest Ltd Method of writing data to non-volatile memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002032256A (ja) * 2000-07-19 2002-01-31 Matsushita Electric Ind Co Ltd 端末装置
JP2002278850A (ja) * 2001-03-14 2002-09-27 Nec Corp 半導体装置
JP2002318733A (ja) * 2001-04-20 2002-10-31 Matsushita Electric Works Ltd ブロック消去型記憶媒体の管理装置
JP2004071033A (ja) * 2002-08-05 2004-03-04 Mitsubishi Electric Corp フラッシュメモリのデータ記録法
JP2004259093A (ja) * 2003-02-27 2004-09-16 Casio Comput Co Ltd データ処理装置およびデータ処理のプログラム

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011129192A (ja) * 2009-12-16 2011-06-30 Samsung Electronics Co Ltd 半導体記憶装置
TWI455135B (zh) * 2010-06-10 2014-10-01 Apacer Technology Inc 以快閃記憶體為基礎的儲存裝置及其資料寫入方法
JP2014115959A (ja) * 2012-12-12 2014-06-26 Dainippon Printing Co Ltd Icカード、データ消去処理方法、及びデータ消去処理プログラム

Also Published As

Publication number Publication date
CN1842776A (zh) 2006-10-04
JP2006085596A (ja) 2006-03-30
US20090019244A1 (en) 2009-01-15

Similar Documents

Publication Publication Date Title
US6154808A (en) Method and apparatus for controlling data erase operations of a non-volatile memory device
TWI440042B (zh) 半導體儲存裝置及儲存控制方法
JP3692313B2 (ja) 不揮発性メモリの制御方法
US8239612B2 (en) Memory controller, flash memory system with memory controller, and control method of flash memory
US20060143365A1 (en) Memory device, memory managing method and program
JP2007058840A (ja) 記憶装置、コンピュータシステム、および記憶システム
EP2977907B1 (en) Data storage device, method for storing data, and onboard control device
JP2010020586A (ja) データ処理装置
KR20140133427A (ko) 플래시 메모리에 저장된 데이터를 관리하는 방법 및 관련 메모리 장치 및 제어기
CN116185563B (zh) 一种基于车规级微控制器数据闪存的软件模拟算法
JPWO2007000862A1 (ja) メモリコントローラ、不揮発性記憶装置、不揮発性記憶システム、及びデータ書き込み方法
WO2006030566A1 (ja) フラッシュメモリの情報記録読出装置
EP1347458B1 (en) Information storage apparatus
JP2006003966A (ja) フラッシュメモリの書込方法
JP4594944B2 (ja) メモリ制御装置
KR102142675B1 (ko) Eeprom 제어장치 및 이를 이용한 eeprom의 데이터 기록 방법
JP4501881B2 (ja) メモリコントローラ及びフラッシュメモリシステム
JP5491201B2 (ja) 半導体記録装置及び半導体記録システム
JP4743185B2 (ja) メモリコントローラ、メモリコントローラを備えるフラッシュメモリシステム、並びにフラッシュメモリの制御方法
JP2004296014A (ja) 不揮発性メモリの消去回数平準化方法
JP2010097386A (ja) データ管理方法
JP4153535B2 (ja) メモリコントローラ及びメモリコントローラを備えるフラッシュメモリシステム、並びに、フラッシュメモリの制御方法
JP4235646B2 (ja) メモリコントローラおよびフラッシュメモリシステム
JP4760826B2 (ja) メモリコントローラ、メモリコントローラを備えるフラッシュメモリシステム、並びにフラッシュメモリの制御方法
CN113918485A (zh) 一种闪存资料防丢失方法、装置、设备及存储介质

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200580000875.0

Country of ref document: CN

AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KM KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NG NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SM SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

WWE Wipo information: entry into national phase

Ref document number: 10576077

Country of ref document: US

121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase
NENP Non-entry into the national phase

Ref country code: JP