WO2005022393A1 - 不揮発性記憶装置及びその書込み方法 - Google Patents

不揮発性記憶装置及びその書込み方法 Download PDF

Info

Publication number
WO2005022393A1
WO2005022393A1 PCT/JP2004/012714 JP2004012714W WO2005022393A1 WO 2005022393 A1 WO2005022393 A1 WO 2005022393A1 JP 2004012714 W JP2004012714 W JP 2004012714W WO 2005022393 A1 WO2005022393 A1 WO 2005022393A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
logical
block
physical block
data
Prior art date
Application number
PCT/JP2004/012714
Other languages
English (en)
French (fr)
Inventor
Toshiyuki Honda
Original Assignee
Matsushita Electric Industrial Co., Ltd.
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 Matsushita Electric Industrial Co., Ltd. filed Critical Matsushita Electric Industrial Co., Ltd.
Priority to JP2005513535A priority Critical patent/JP4667243B2/ja
Priority to US10/569,880 priority patent/US7987314B2/en
Priority to EP04772668A priority patent/EP1659497A4/en
Publication of WO2005022393A1 publication Critical patent/WO2005022393A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

Definitions

  • the present invention relates to a nonvolatile storage device having a rewritable nonvolatile memory and a writing method thereof.
  • NAND flash memory which is a non-volatile memory mainly used for such memory cards, uses 16 KB as an erase unit. For this reason, external host devices that use memory cards use a size of 16 KB as a unit for writing.
  • FIG. 1 is a diagram showing a conventional memory card 100, in which a controller 101 and flash memories FM0 to FM3, which are nonvolatile memories, are provided.
  • Each of the flash memories FM0 to FM3 has a capacity of, for example, 128 MB, and constitutes a 500 MB memory card as an effective data area.
  • the controller 1101 has a CPU 111, a temporary memory with a capacity of 2 KB.
  • the flash memories FM0 to FM3 each have a capacity of 128 MB.
  • each of the flash memories FM0 to FM3 is composed of 102 physical blocks (PB0 to PB1023) each having a capacity of 128 KB.
  • the total capacity of the nonvolatile memory of the memory card 100 becomes 512 MB.
  • the capacity that the host device 102 can use as a data area is 500 MB.
  • the physical block is composed of 64 physical pages P P0 to P P 63. As shown in Fig. 3, each physical page consists of a data area with a capacity of 2 KB and a management area with a capacity of 64 B.
  • the memory card 100 has a memory capacity of 500 MB when viewed from the external host device 102, and a logical address is allocated by a logical map as shown in FIG. That is, the data area of 500 MB is divided into 40000 logical blocks (LB) from the logical block LB0 to the logical block LB3999, and each logical block has a capacity of 128 KB. This logical block address corresponds to the address specified by the host device.
  • LB logical blocks
  • the address conversion table 114 shown in FIG. 1 specifies a flash memory and a physical block in the flash memory when a logical address indicating a logical group is given.
  • the first two bits are bits that indicate one of the flash memories FM0 to FM3, and the following 10 bits are bits that indicate which physical block in the flash memory.
  • the entry table 115 is a table composed of 1-pit configuration flags corresponding to 4096 physical blocks. The This flag is set to 1 if it has been erased, and 0 if it has been written.
  • LBA logical block address
  • LPA logical page address
  • the physical block PB is specified from the address conversion table 114 based on the logical block address, and this is set as the read source physical block. Then, the data of the logical address of the read source physical block is read and transferred to the host device 102 via the data transfer buffer 113. Then, it is checked whether or not the reading has been completed, and if not, it is checked whether or not the logical page address is the last in the block.
  • the logical page address is incremented and the same processing is repeated. If the logical page address is the last in the block, the logical page address is set to 0, the logical block address is incremented, and the same processing is repeated. In this way, data can be read from the specified logical address.
  • step S301 of the logical address LA from the host device 102, the address in units of 128 KB is set as a logical block address (LAB), and the address Divide the sub-unit addresses into logical page addresses (LPAs).
  • step S302 the entry table is searched, and an erased physical block is obtained as a write destination physical block (PB). Then, the corresponding bit of the entry table 1 15 is updated to “0” which has been written.
  • step S303 to check whether or not the logical page address LPA is 0. If the logical page address LPA is not 0, the former half wrapping process to be described later is performed (step S304).
  • step S305 the write data from the host device 102 is transferred to the flash memory via the page buffer. And writes to the logical page address of the write destination physical block. At this time, management information for writing to the management area is also written at the same time.
  • step S306 it is checked whether the writing has been completed. If not, in step S307, it is checked whether the logical page address (LPA) is the last in the block. If not, the logical page address LPA is incremented in step S308, and the process returns to step S305.
  • LPA logical page address
  • step S309 If the logical base address is the last block, erasure and table update are performed in step S309, the logical page address LPA is incremented to 0 in step S310, and the logical block address LBA is incremented. Return to 0 2.
  • step S311 it is checked in step S311 whether the logical base address is the last in the block. If it is not the last, the latter half of the wrapping process is performed in step S312, and if it is the last in the block, the process proceeds to step S313 without performing this process, and the erasure and table update are performed. Finish.
  • the present invention has been made in view of such a conventional problem, and enables writing at a high speed by reducing the unit of writing, and consolidates the written data.
  • the purpose of this is to secure an erased block and make it easy to perform the next write in the secured erased area. Disclosure of the invention
  • the present invention provides a nonvolatile memory, comprising: a nonvolatile memory; a controller; and writing and reading data to and from the nonvolatile memory based on a logical address given from the outside.
  • the nonvolatile memory is composed of a plurality of physical blocks, each of the physical blocks is composed of a plurality of partial physical blocks, and a series of logical group addresses and each logical group is externally provided.
  • a logical address including a series of logical block addresses belonging to the logical group address is assigned to the logical block address of the logical block to which the logical block to which the logical group belongs is recorded.
  • an address conversion table that has a duplicate address registration area that indicates the physical block address that is recorded in duplicate, and indicates whether each physical block has been written or erased
  • the data is written in an unwritten area in units of partial physical blocks, and Register the write destination physical block address for the logical group to which the logical block belongs in the address conversion area of the address conversion table, and If another physical block address has already been registered in the dress conversion area, the physical block address is registered in the duplicate address registration area.
  • the writing unit at the time of data writing is the same as the data writing unit used in the host device, and the erasing unit of the non-volatile memory in the memory card has a large capacity. Therefore, even when the data is expanded by the integration, data writing from the external host device can be performed in a short time. Further, even when a part of the write area is used, an effect is obtained that a writable area can be formed by performing the process of securing the erased block.
  • FIG. 1 is a diagram showing a configuration of a conventional nonvolatile memory.
  • FIG. 2 is a diagram showing the configuration of a conventional flash memory and its physical block.
  • FIG. 3 is a diagram showing a configuration of a logical page written in a conventional physical block.
  • FIG. 4 is a diagram showing a configuration of a conventional logic block.
  • FIG. 5 is a schematic diagram showing an operation at the time of reading data from a conventional nonvolatile memory.
  • FIG. 6 is a flowchart showing a data writing process of a conventional nonvolatile memory device.
  • FIG. 7 is a schematic diagram showing an operation at the time of conventional data writing.
  • FIG. 8 is a block diagram showing an entire configuration of the nonvolatile memory device according to Embodiment 1 of the present invention.
  • FIG. 9 is a diagram showing a configuration of a flash memory and a physical block thereof according to the first embodiment.
  • FIG. 10 is a diagram showing a configuration of a logical group according to the first embodiment.
  • FIG. 11 is a diagram showing a configuration of an address conversion table according to the first embodiment.
  • FIG. 12 is a diagram showing a configuration of a logical page in a physical page according to the first embodiment.
  • FIG. 13 is a flowchart showing a table initialization process according to the first embodiment.
  • FIG. 14 is a flowchart showing a process of registering an address conversion table according to the first embodiment.
  • FIG. 15 is a flow chart showing a process of correcting the address conversion table according to the first embodiment.
  • FIG. 16 is a flowchart showing a data reading process according to the first embodiment.
  • FIG. 17 is a schematic diagram showing an operation of a data read process according to the first embodiment.
  • FIG. 18 is a flowchart showing a data write process (part 1) according to the first embodiment.
  • FIG. 19 is a flowchart showing a data write process (part 2) according to the first embodiment.
  • FIG. 20 is a flowchart showing a duplicate address registration process according to the first embodiment.
  • FIG. 21 is a flowchart showing an erase block securing process according to the first embodiment.
  • FIG. 22 is a diagram showing a first example before performing an erase block securing process according to the first embodiment.
  • FIG. 23 is a diagram showing a state after an erase block securing process of the first example according to the first embodiment.
  • FIG. 24 shows a second example before performing the erase block securing process according to the first embodiment.
  • FIG. 25 is a diagram showing a state after an erase block securing process of a second example according to the first embodiment.
  • FIG. 26 is a flowchart showing the first half wrapping process according to the first embodiment.
  • FIG. 27 is a flowchart showing the latter half wrapping process according to the first embodiment.
  • FIG. 28 is a flowchart showing erasure and table update processing according to the first embodiment.
  • FIG. 29 is a schematic diagram showing the operation of the data write processing according to the first embodiment.
  • FIG. 30 is a diagram showing a configuration of a logical group according to the second embodiment of the present invention.
  • FIG. 8 is a block diagram showing a configuration of a memory card according to Embodiment 1 of the present invention.
  • the memory card 1 includes a controller 2 and a nonvolatile memory, for example, flash memories FM0 to FM3 having a capacity of 128 MB.
  • the controller 2 has a CPU 11 and a temporary save buffer 12 with a capacity of 2 KB, a data transfer buffer 13 with a capacity of 512 bytes, and a 15-bit 4-KWord configuration, that is, a capacity of 7.5 KB.
  • an entry table 15 having a capacity of 5 12 B, ie, a configuration of 4 K words in one pit.
  • the flash memories FM0 to FM3 each have a capacity of 128 MB.
  • each flash memory FM0-FM3 has 1,024 physical blocks (128 KB each).
  • the total data capacity of the non-volatile memory of the memory card 1 is 512 MB, of which 500 MB can be used from outside as a temporary storage area.
  • the physical block is composed of 64 physical pages PP0 to PP63.
  • P P0 to P P7 be partial physical blocks P P B 0. That is, each physical block P Bi consists of eight partial physical blocks.
  • the partial physical block PPB has the same size as a logical block described later, and is an area in which data of the logical block is written.
  • the physical page is the unit of data writing.
  • the memory card 1 has a memory capacity of 500 MB as viewed from the external host device 3, and a logical address is allocated by a logical map as shown in FIG. That is, the 500 MB data area is divided into 4000 logical groups (LG) from logical group LG 0 to logical group LG 3999, and each logical group has a data capacity of 128 KB. Each logical group is divided into eight logical blocks (LBs) of 16 KB data capacity units. The logical blocks LB are assigned a series of numbers from LG 0 to LG 3 1999 as shown. This logical address corresponds to the address specified by the host device. Data of different logical groups are always arranged in partial physical blocks included in physically different erase units (physical blocks). Each logical block is allocated to one partial physical block.
  • LG logical groups
  • LBs logical blocks
  • FIG. 11 is a block diagram showing the address conversion table 14. As shown in FIG. As shown in this figure, when a logical address indicating a logical group is given, the address conversion table 14 is a 15-bit address conversion area AC that specifies a flash memory, a physical block therein, and a partial physical block therein. R 14a is provided.
  • the first two bits indicate which of the flash memories FM0 to FM3, the next 10 bits indicate which physical block PB in the flash memory, and the next three bits indicate which physical block PB in the flash memory.
  • Partial physical block This bit indicates whether it is a PPB.
  • a duplicate address registration area O ARR 14b is provided in a part of the free area other than the address conversion area 14a of the address conversion table 14. Since the data of a certain logical group may be recorded across multiple physical blocks, it is registered in the duplicate address registration area 14b at that time.
  • the overlapping address registration area 14> has 16 areas, and each area is made up of an overlapping partial physical block address OPPBA 15 bits and an overlapping logical group address OLGA 12 bits.
  • the invalid value of the duplicate physical block address is set to 0. Since the partial physical block P PB 0 included in the first physical block PB 0 of the flash memory FM0 is scheduled as an area for writing fixed data, valid values that can be taken as overlapping partial physical block addresses are 8 to 32767. is there. The invalid value of the duplicate logical address is 4095. Possible values for the duplicate logical address are logical groups 0 to 3999 that can be specified by the external host device 3. After the processing of the address conversion table correction flow described later is completed, the lower 3 bits of the overlapping physical block address of the overlapping address registration area 14b are all set to 1.
  • FIG. 12 shows the configuration of a logical page written to each physical page.
  • the logical page consists of 24 bytes of the block management area BMR, followed by the sector data area SDR 5 12 bytes and the sector management area SMR 8 bytes, which are alternately continuous. Area PMR 8 bytes are provided.
  • Section data area There are four SDRs, making up a data area of 2 Kbytes in total.
  • a logical block address LBA a logical block address LBA
  • an address table AT indicates the addresses of the partial physical blocks in which the eight logical blocks included in the logical group to which this logical block belongs are written. This content is the same for each logical page belonging to the same logical block. Since the address table is represented by 15 bits each, for example, the 16th bit can be used to determine whether or not this logical page has been erased.
  • the ring counter is a counter for determining whether the address table is new or old, and is incremented each time the address table is updated.
  • the entry table 15 shown in FIG. 8 is a table composed of 1-bit flags corresponding to the physical blocks of 4096. This flag is set to 1 if it has been erased, and 0 if it has been written.
  • the CPU 11 of the controller 2 refers to the overlapping address registration area 14 b of the address conversion table 14 when there is no available space for registration in the overlapping address conversion area, and is recorded in multiple physical blocks in an overlapping manner. It has a function of an erasure block securing unit that secures an erasure block by aggregating the data of the logical group into the physical block for any of the physical blocks.
  • the erase block securing means may secure an erase block when there is no physical block in which all the partial physical blocks have been erased. Good.
  • the initialization process is a process for creating the address conversion table 14 and the entry template 15 according to the state of the nonvolatile memory after the power is turned on.
  • all data in the entry table 15 is set to 0 in step S11.
  • all data in the address conversion table 14 is set as an invalid address.
  • the invalid address is 0.
  • Valid addresses are 8 to 3 2 7 6 7.
  • the pointer of the flash memory FM is set to 0 (step S13), and the pointer of the physical block PB is set to 0 in step S14.
  • step S15 the logical block address is read from the management area of page 0 of the physical block specified, and whether or not the block has been erased is checked.
  • step S19 it is checked whether or not the block is the last physical block. If the block is not the last physical block, the pointer of the physical block is incremented in step S20, and the process returns to step S15. If it is the last physical block in step S19, the flow advances to step S21 to check whether the block is the last flash memory. If it is not the last flash memory, the pointer of the flash memory is incremented in step S22, and the process returns to step S14. If it is the last flash memory in step S21, the process proceeds to step S23 to correct the address conversion table described later and finish the process.
  • step S18 registration in the address translation table 14 in step S18 will be described with reference to the flowchart in FIG.
  • the table offset page TOP
  • step S32 the logical block address of the management area of the table offset page of the physical block is read. You. Then, in step S33, it is checked whether or not this page has been erased. If the page has been erased, the table offset page TOP is set to 18 (step S34), and the process returns to step S32. If the data has not been erased, the flow advances to step S35 to read the value of the address conversion table corresponding to the logical group address read from the table offset page of the physical block.
  • step S36 it is determined whether the data of the address conversion table corresponding to the logical address read in step S36 is registered or unregistered. If this is an invalid address 0, it is determined that no registration has been made. Then, in step S37, the address of the partial physical block to be read is registered at a position corresponding to the logical group address belonging to the logical block address read from the conversion area 14a of the address conversion table 14. I do. If a valid address has been registered in step S36, the process proceeds from step S36 to S38. Then, the address of the partial physical block to be read and the value of the logical address LGA read from the physical block management area are registered in the overlapping address registration area 14 b of the address conversion table 14.
  • Correction processing of the address conversion table means that when data of a logical block belonging to the same logical group is discretely arranged in a plurality of physical blocks, the address of the newly written partial physical block is converted to the address conversion area 1.
  • the old write partial physical block is modified to be registered in the duplicate address registration area 14b.
  • step S41 the value of i is set to 0, and in step S42, the i-th logical group address LGA and the partial physical block address PPBA of the overlapping address registration area 14b of the address conversion table 14 are obtained. . Then, in step S43, it is determined whether or not this is a valid value.
  • step S44 If it is a valid value, the flow advances to step S44 to read the management area of an arbitrary page of the i-th partial physical block and obtain a ring counter value. Then, in step S45, i Address conversion area of address conversion table 1 4 based on logical address
  • step S46 Get the address of the corresponding partial physical block from a. Further, in step S46, the management area of the partial physical block address corresponding to the i-th logical address is read to obtain a ring counter value. Then, in step S47, it is determined based on the ring counter value whether the table of the duplicate address registration area is newer. If this is new, the i-th partial physical block is replaced with the partial physical block address corresponding to the i-th logical address in step S48. On the other hand, if the table is not new in step S47, the process proceeds to step S49 without checking this, and checks whether or not the pointer i is 15; otherwise, i is incremented (step S47).
  • step S51 of the logical addresses from the host device 3, the 128 KB unit address is the logical group address LGA, the 16 KB unit address is the logical block address LBA, and the address less than 16 KB is logical. Page address LPA.
  • step S52 the partial physical block obtained from the address translation table 14 based on the logical group address is set as a table partial physical block TPPB.
  • step S53 the address table of an arbitrary page of the table partial physical block is read, and the partial physical block in which the data of the logical block address is written is set as the read source partial physical block.
  • step S54 the data of the logical page address of the read source partial physical block is read and transferred to the host device 3 via the data transfer buffer 13. Then, it is checked whether or not the reading has been completed in step S55, and if not, it is checked in step S56 whether or not the logical page address is the last in the block. If not the last —The address LPA is incremented (step S57), and the process returns to step S54 to repeat the same processing.
  • step S58 If the logical page address is the last in the block, it is checked in step S58 whether the logical block address is the last in the logical group. If not, the logical page address is set to 0, and the logical block address is incremented (step S59). Then, returning to step S54, the same processing is repeated. If the logical block address is the last in the logical group, the process proceeds to step S60, where the logical page address is set to 0, the logical block address and the logical group address are incremented, and the process returns to step S52. In this way, data can be read from the specified logical page address.
  • step S61 of the logical addresses from the host device 3, the address in units of 128 KB is converted to the logical double address LGA, and the address in units of 16 KB is converted to the logical block address LBA. Addresses smaller than 16 KB are logical page addresses LPA.
  • step S62 a partial physical block obtained from the address conversion table based on the logical group address is set as a table partial physical block TPPB. Then, the process proceeds to step S63 to read and hold the address table of an arbitrary page of the table partial physical block. Then, the process proceeds to step S64 to check whether the address of the table partial physical block is the last partial physical block in the physical block PB. If not the last partial physical block, step
  • step S65 the partial physical block next to the address of the table partial physical block is set as the write destination partial physical block PPB.
  • a duplicate address registration process described later is performed in step S66.
  • step S67 the entry table 15 is searched to obtain an erased physical block, and the first partial physical block is set as a write destination partial physical block PPB.
  • the entry table This bit of the physical block is updated to “0”.
  • step S68 the address corresponding to the logical block address of the address table is held as the read source partial physical block.
  • step S69 it is checked whether or not the address table has a partial physical block belonging to the same physical block as the partial physical block to be read. This detects whether or not the partial physical block is the last partial physical block. If this does not exist, the partial physical block belonging to the same physical block as the partial physical block to be read may be erased in step S70, and this is retained as the physical block to be erased. If there is no corresponding partial physical block in step S69, the process proceeds to step S71 without performing step S70, and the controller corresponds to the logical block address in the address table inside the controller. Replace the address to be used with the write destination partial physical block.
  • step S73 it is checked whether or not the logical base address LPA is 0, and if it is not 0, the first half winding process is performed as described later (step S73). If the logical page address is 0, the process proceeds to step S74 without performing this processing, and the write data from the host device 3 is transferred to the flash memory via the data transfer buffer 13. Then, the data is written to the logical page address of the write destination partial physical block. At this time, the management information to be written to the management area is also written at the same time. Then, it is checked in step S75 whether or not the writing has been completed, and if not, it is checked in step S76 whether or not the logical page address is the last page in the logical block.
  • step S77 If not, the logical page address is incremented in step S77, and the flow returns to step S74. If it is the last page in the logical block, erasure and table updating are performed in step S78. Next, in step S79, it is checked whether the logical block address is the last in the logical group. If not, the logical page address is set to 0 in step S80, and the logical Increment the address. Next, in step S81, the address of the write destination partial physical block is entered in the table partial physical block. Then, the flow returns to step S64 in FIG. 18 to repeat the same processing.
  • step S79 If the logical block address is the last in the logical group in step S79, the logical page address is incremented to 0, the logical block address and the logical duplication address are incremented in step S82, and the process proceeds to step S62. Return. Then, when the write processing is completed in step S75, it is checked in step S83 whether the logical address is the last in the logical block. If not final, the latter half wrapping process is performed in step S84. If the logical page address is the last in the block, erasure and table updating are performed in step S85, and the processing is terminated.
  • step S66 the duplicate address registration processing in step S66 will be described with reference to FIG.
  • the registration status of the duplicate address registration area is checked in step S91. Then, it is determined whether or not there is a free area. If there is no free area, a process of securing an erase block, which will be described later, is performed (step S93). If there is an empty area, in step S94, the table partial physical block is written to the overlapping partial physical block address of the empty registration area of the overlapping address registration area, and the logical group address is written to the overlapping logical group address.
  • step S101 the effective address of the duplicated address registration area 14b is searched to obtain a set of duplicated physical block addresses and duplicated logical duplicate addresses. Then, these are set as a resolved partial physical block address and a resolved logical group address.
  • step S102 a corresponding partial physical block address is obtained from the address conversion area of the address conversion table based on the resolution logical drop address, and is set as a resolution table partial physical block (resolution TPPB).
  • step S103 the address tape is read from any page of the physical table block in the resolution table. Read the file.
  • step S104 it is checked whether all the partial physical blocks that have already been written among the physical blocks belonging to the resolution table partial physical block have been written in the address table. This process determines whether all valid data can be collected in the physical block to which the partial physical block in the resolution table belongs. If this is YES, in step S105, the partial physical block next to the partial physical block of the resolution table is set as the partial physical block of the resolution write destination. If “NO” in the step S 104, the process proceeds to a step S 106 to write all data to a new physical block. That is, the entry table is searched to obtain an erased physical block. Then, the leading partial physical block is set as the resolution write destination partial physical block.
  • step S107 data not in the physical block to which the physical block to be resolved belongs in the address table is sequentially copied to the physical block to be resolved and written. You. At that time, the address table and the address conversion area of the address conversion table are also updated sequentially.
  • step S108 the process proceeds to step S108, in which the data of the physical block to which the duplicated physical block belonging to the set having the duplicated group address that matches the resolution logical drop address in the duplicated address registration area belongs is deleted, and the duplicated address is deleted. Invalidate the partial physical block address OPPB and the duplicate group address 0 GA. This is to eliminate duplication, since duplication may occur over three or more physical blocks.
  • step S109 the data corresponding to the overlapping partial physical block address of the entry table is updated to the erased state in response to the erasure, and the process ends.
  • FIG. FIG. 22 shows an example of physical blocks PB100 and PB101 before an erase block is secured.
  • the physical block PB 100 has PPB 800 to 807 as a partial physical block
  • the physical block PB101 has partial physical blocks PBB808 to 815.
  • the data of the logical blocks LB 0 to 7 of the logical group LG 0 is written to the physical block PB 100 once, and then the logical blocks LB 0 to 6 of the logical group LG 0 are updated and the physical blocks PB 101 Written in the partial physical block PPB 808 to 814.
  • FIG. 22 also shows the state of the address conversion table 14 and the entry table 15 before securing the erase block.
  • the most recently stored partial physical block PPB 814 of the logical group LG 0 is registered.
  • the duplicate address registration area 14b a duplicate physical block PPB 807 and a duplicate logical group LG0 are registered. This indicates that the partial logical block PPB 807 in the physical block PB 100 records valid logical group LG0 and logical block LB7 data.
  • step S104 by writing the data of the logical group LG0 and the logical block LB7 to the partial physical block PPB 815, all data is collected in the physical block PB101 as shown in step S104. be able to.
  • step S104 by making the resolution table partial physical block the next partial physical block of the resolution table partial physical block (step S104), that is, in this example, by making it the partial physical block 815, as shown in FIG. Then, the data of the logical drop LG0 and the data of the logical block LB7 can be written to the partial physical block PB815, and all the data of the logical group LGO can be collected in the physical block PB101. In this case, all the physical blocks PB100 are erased and unwritten, and new data can be written. Entry table 15 indicates that physical block PB100 is set to “1” and can be written. are doing.
  • FIG. 24 Another example of securing an erase block will be described with reference to FIGS. 24 and 25.
  • the logical blocks LB0 to LB7 of the logical group LG0 are written in the physical block PB100, and thereafter, the physical blocks PPB808 to 811, which are part of the physical block PB101. 3, the logical blocks LB0 to LB5 of the logical group LG0 are written.
  • the partial physical blocks PB800 to 805 of the physical block PB100 are invalid.
  • the logical block LB0 of the logical group LGO is written to the partial physical block PPB814 of the physical block PB101, indicating that the data of the partial physical block PPB808 is invalidated.
  • step S104 valid data cannot be collected in the physical block PB101 belonging to the partial physical block in the resolution table. That is, in step S104 of FIG. 21, there is shown a case where, among the physical blocks to which the partial physical blocks of the resolution table belong, all of the partial physical blocks which have already been written are not written in the address table. Therefore, in step S106, the entry table 15 is searched to obtain an erased physical block. In this case, the physical block PB102 is obtained, and all data is written in this physical block.
  • FIG. 25 shows a state in which all data has been written in this way. In this case, the physical blocks PB100, 101 are erased, and the flag of the entry table 15 becomes 1, indicating a state in which new data can be written.
  • step S111 the entangled page address is set to 0.
  • step S 1 1 2 Reads the data of the involved page address of the read source partial physical block into the temporary save buffer 12.
  • step S 1 1 2 Reads the data of the involved page address of the read source partial physical block into the temporary save buffer 12.
  • the data is transferred to the flash memory, and written in the winding page address of the writing destination physical block.
  • the management information to be written to the management area is also written at the same time.
  • step S113 the wrapped page address is incremented.
  • step S114 it is checked whether the wrapped page address matches the logical page address. If they do not match, return to step S112 and repeat the same process. If they match, the first half winding process ends.
  • step S1221 the logical page address + 1 is set as the wrapping page address.
  • step S 122 the data of the wraparound gate address of the read source physical block is read out to the temporary save buffer 12. Then, the data is transferred to the flash memory, and written to the winding page address of the physical block to be written. At this time, the management information to be written into the management area is also written at the same time. Then, the process proceeds to step S123 to check whether the winding page address is the last page address.
  • step S124 the wrapped page address is incremented and the process returns to step S122. If the wrap page address is the last page, the latter half wrap process is completed. In this way, unlike the conventional example, the wrapping process is performed in units of pages, and the write management unit of the flash memory is set to 16 KB, thereby shortening the wrapping process time.
  • step S131 it is checked whether or not there is a valid value in the block to be deleted. If there is a valid value, the physical block to be erased is erased in step S132.
  • step S133 the weight of the address conversion table is determined. Invalidate the overlapping part physical block address and the overlapping logical group address corresponding to the physical block erased by this writing in the multiple address registration area.
  • step S134 the data corresponding to the physical block to be deleted in the entry table is updated to "deleted".
  • step S135 the data of the logical group address in the address conversion table is rewritten to the write destination partial physical block. If there is no valid value in the physical block to be erased in step S131, the process ends in step S135 without performing the process up to step S134.
  • FIG. 29 shows an example in which 16 KB data provided from the host device is written to the write destination physical block via the data transfer buffer 13 by performing such processing.
  • the host device 3 gives 16 KB data as a write unit, the data is written to any of the partial physical blocks in the write destination physical block.
  • the other partial physical blocks of this write destination physical block are maintained in their original state, that is, they remain erased.
  • 16 KB data is newly given as write data from the host device, new data is written to another partial physical block. Other areas of the physical block are kept as is.
  • the logical blocks are given a series of logical block numbers from 0 to 319999 as in the first embodiment.
  • the logical group that is expected to be biased in access is 128 KB larger in the size of the allocated physical block than the logical group size of 16 KB. The speed can be prevented from dropping.
  • the present invention relates to a nonvolatile memory device having a rewritable nonvolatile memory and a writing method thereof, and can increase the writing speed as compared with the conventional example even when the capacity is increased. Therefore, it can be used for various applications of nonvolatile memories that require large-capacity, high-speed writing.

Abstract

半導体メモリカードの大容量化に伴い、外部のデータ管理サイズと半導体メモリカードの内部のデータ管理サイズとが異なることによって書き込みに長時間がかかるという欠点を解消する。不揮発性記憶装置内の物理ブロックサイズにかかわらず、外部で管理されているサイズに応じた部分物理ブロックを用いる。部分物理ブロック単位でデータを書き込み、物理ブロック単位で消去ブロックを確保することにより書き込みの高速化を図ることができる。

Description

明細書 不揮発性記憶装置及びその書込み方法 技術分野
本発明は書き換え可能な不揮発性メモリを有する不揮発性記憶装置及びそ の書込み方法に関するものである。 背景技術
書き換え可能な不揮発性メモリを有する半導体メモリは、 メモリカードと して需要が広まっている。 そのメモリカードに主に使用されている不揮発性 メモリである NAND型フラッシュメモリは、 1 6 KBを消去単位としてき た。 そのためにメモリカードを使用する外部ホスト機器は 1 6 KBというサ ィズを書き込みの管理単位として使用している。
しかし、 近年メモリカードの容量の増加のために、 内蔵する NAND型フ ラッシュメモリ容量も増加し、 それに伴い消去単位を 1 2 8 KBとした NA ND型フラッシュメモリが提案されている。 しかし、 メモリカードを使用す る外部ホスト機器からの 1 6 KB単位での書き込みに対して、 メモリカード 内部のコントロ一ラでは NAND型フラッシュメモリの消去単位である 1 2 8 KB単位として扱うために、 ホスト機器からみて相対的に 1 6 KB単位の 書き込みに要する時間がかかるという欠点があった。
次に従来の半導体メモリカードについてより具体的に説明する。 第 1図は 従来のメモリカード 1 0 0を示す図であり、 コントローラ 1 0 1と不揮発性 メモリであるフラッシュメモリ FM 0〜FM 3が設けられている。 各フラッ シュメモリ FM0〜FM3は夫々例えば 1 2 8MBの容量を有しており、 有 効データ領域として 5 0 0 MBのメモリカードを構成している。 又コント口 —ラ 1 0 1は第 1図に示すように、 CPU 1 1 1、 2 KBの容量を持つ一時 退避バッファ 1 1 2、 5 1 2 Bの容量を持つデータ転送バッファ 1 1 3、 1 2ビットで 4 KWo r d構成、 即ち 6 KBの容量を持つァドレス変換テープ ル 1 14、 及び 1ビットで 4KWo r d構成、 即ち全 5 1 2 Bの容量を持つ エントリテーブル 1 1 5によって構成されている。
さてフラッシュメモリ FM0〜FM3は第 1図に示すように、 夫々 1 2 8 MBの容量を持っている。 各フラッシュメモリ FM0〜FM3は第 2図 (a ) に示すように、 夫々が 1 2 8 KBの容量を持つ 1 0 24の物理プロック ( P B 0〜PB 1 0 2 3 ) によって構成される。 これによつてメモリカード 1 0 0の不揮発性メモリの全容量は 5 1 2 MBとなる。 このうちホスト機器 1 0 2がデータ領域として使用できる容量は 5 0 0 MBである。
第 2図 (b) はフラッシュメモリ内の 1つの物理ブロック PB i ( i = 0 〜 1 02 3 ) の構成を示している。 物理プロックは物理ページ P P 0〜PP 6 3までの 64の物理ページから成り立つている。 各物理ページは第 3図に 示すように、 2 KBの容量を持つデータ領域と、 64 Bの容量を持つ管理領 域から成り立つている。
さてこのメモリカード 1 0 0は外部のホスト機器 1 0 2から見て 500M Bのメモリ容量があり、 第 4図に示すような論理マップによって論理ァドレ スが割り付けられる。 即ち 5 0 0 MBのデータ領域は論理ブロック L B 0か ら論理ブロック L B 3 9 9 9まで 40 0 0の論理ブロック (LB) に分割さ れ、 各論理ブロックが 1 2 8 KBの容量を持つ。 この論理ブロックアドレス はホスト機器が指定するアドレスと対応している。
第 1図に示すアドレス変換テーブル 1 14は論理グループを示す論理アド レスが与えられたときに、 フラッシュメモリとその中の物理プロックを指定 するものである。 このうち最初の 2ビットはフラッシュメモリ FM0から F M 3のどれかを示すビット、 続く 1 0ビットはそのフラッシュメモリ内のど の物理ブロックかを示すビットである。 又エントリテーブル 1 1 5は、 40 9 6の物理プロックに対応した 1ピット構成のフラグから成るテーブルであ る。 このフラグは消去済みであれば 1、 書込み済みの場合は 0とする。
次にデータの読み出し処理について、 第 5図のデータ読み出しの概略図を 用いて説明する。 ホスト機器 1 0 2からの論理アドレス (L A) のうち、 1 2 8 K B単位のアドレスを論理ブロックアドレス (L B A) 、 1 2 8 K B未 満のアドレスを論理ページアドレス (L P A) とする。 論理ブロックァドレ スを元にァドレス変換テーブル 1 1 4から物理プロック P Bを指定し、 これ を読み出し元物理ブロックとする。 そして読み出し元物理ブロックの論理べ ージァドレスのデータを読み出してデータ転送バッファ 1 1 3を介してホス ト機器 1 0 2に転送する。 そして読み出しが終了したかどうかをチェックし 、 終了していなければ論理ページアドレスがブロック内で最終となったかど うかをチェックする。 最終でなければ論理ページァドレスをインクリメント し、 同様の処理を繰り返す。 論理ページアドレスがブロック内で最終となれ ば、 論理ページアドレスを 0とし、 論理ブロックアドレスをインクリメント して同様の処理を繰り返す。 こうすれば指定された論理ァドレスからデータ を読み出すことができる。
次に書込みの処理について第 6図のフローチャートを用いて説明する。 デ —夕を書込む際には、 まずステップ S 3 0 1においてホスト機器 1 0 2から の論理ァドレス L Aのうち、 1 2 8 K B単位のァドレスを論理ブロックァド レス (L A B ) とし、 1 2 8 K B単位未満のアドレスを論理ページアドレス ( L P A) に分ける。 次いでステップ S 3 0 2においてエントリテーブルを 検索し、 消去済みの物理ブロックを得て書込み先物理ブロック (P B ) とす る。 そしてエントリテ一ブル 1 1 5の該当ビットを書込み済み 「0」 に更新 する。 次いでステップ S 3 0 3に進んで論理ページァドレス L P Aが 0かど うかをチェックし、 0でなければ後述する前半巻き込み処理を行う (ステツ プ S 3 0 4 ) 。 論理ページアドレスが 0であれば、 この処理を行うことなく ステップ S 3 0 5に進む。 そしてステップ S 3 0 5において、 ホスト機器 1 0 2からの書込みデ一夕をページバッファを介してフラッシュメモリに転送 し、 書込み先物理ブロックの論理ページアドレスに書込む。 このとき管理領 域に書込むための管理情報を同時に書込んでおく。 そしてステップ S 3 0 6 において書込みを終了したかどうかをチェックし、 終了していなければステ ップ S 3 0 7において論理ページアドレス (L P A) がブロック内の最終か どうかをチェックする。 最終でなければステップ S 3 0 8において論理べ一 ジアドレス L P Aをインクリメントし、 ステップ S 3 0 5に戻る。 論理べ一 ジァドレスが最終ブロックであれば、 ステップ S 3 0 9において消去とテー ブル更新を行い、 ステップ S 3 1 0において論理ページァドレス L P Aを 0 、 論理ブロックアドレス L B Aをインクリメントして、 ステップ S 3 0 2に 戻る。 又ステップ S 3 0 6において書込みが終了すれば、 ステップ S 3 1 1 において論理べ一ジァドレスがブロック内最終かどうかをチェックする。 最 終でなければステップ S 3 1 2において後半の巻き込み処理を行い、 ブロッ ク内で最終であれば、 この処理を行うことなくステップ S 3 1 3に進んで消 去とテーブル更新を行って処理を終える。
このように従来の不揮発性記憶装置のデータ書き込み方法によれば、 第 7 図に示すように読出し元物理ブロック 1 2 0が 1 2 8 K Bあり、 そのうちの ホスト機器が管理する 1 6 K Bの新しいデータ 1 2 2を書込む場合であって も、 書込み先物理ブロック 1 2 1は 1 2 8 K B単位で書き込みを行う。 読出 し元物理ブロック 1 2 0のうち物理ブロックに書込まない前半の領域 1 2 0 一 1については、 前半巻き込み処理によってフラッシュメモリの書込み先物 理プロック 1 2 1— 1にコピーする。 同様に後半の領域 1 2 0— 2について も、 後半の巻き込み処理によって書込みページァドレス以降の論理ページァ ドレスについて書込み先物理ブロック 1 2 1— 2にコピーする。 従って従来 のデータ書き込み処理によれば、 第 7図に示すように外部のホス卜機器で管 理されているデータ処理単位が 1 6 K Bであっても、 書き込み先の物理ブロ ック単位で書き込まれることとなる。
このように従来の不揮発性記憶装置のデータ書き込み方法によれば、 フラ ッシュメモリの消去サイズより小さなデータを書込むときに、 メモリカード 内部においてはフラッシュメモリの消去サイズと同等のデータを書き込むた め、 書き込み速度が低下するという欠点があった。
本発明はこのような従来の問題点に鑑みてなされたものであって、 書き込 みの単位を小さくして高速で書き込みを行うことができるようにすると共に 、 書込まれたデータを集約することによって消去済みのブロックを確保し、 確保した消去済みの領域を次の書込みを容易に行えるようにすることを目的 とする。 発明の開示
この課題を解決するために、 本発明は、 不揮発性メモリと、 コントローラ と、 を有し、 外部から与えられる論理アドレスに基づいて前記不揮発性メモ リにデ一夕を書き込み、 及び読み出す不揮発性記憶装置であって、 前記不揮 発性メモリは、 複数の物理ブロックから成り、 前記各物理ブロックは複数の 部分物理プロックから成るものであり、 外部からは、 一連の論理グループア ドレスと各論理グループに属する一連の論理プロックアドレスを含む論理ァ ドレスが与えられるものであり、 前記コントローラは、 外部から与えられる 論理ァドレスのうち論理グループアドレスをその論理グループが属する論理 ブロックが記録される物理ブロックアドレスに変換するアドレス変換領域、 及びある論理グループのデータが複数の物理ブロックに重複して記録された 場合に、 重複して記録されている物理ブロックアドレスを示す重複ァドレス 登録領域を有するアドレス変換テーブルと、 各物理ブロックについて書き込 み済み及び消去済みのいずれかを示すエントリテーブルと、 を有し、 書き込 みのためのデ一夕とその論理ァドレスとが外部から与えられたときに、 未書 き込みの領域に部分物理ブロックの単位で当該データを書き込むと共に、 前 記ァドレス変換テ一ブルのァドレス変換領域にその論理ブロックが属する論 理グループに対してその書き込み先物理ブロックアドレスを登録し、 そのァ ドレス変換領域に他の物理ブロックアドレスが既に登録されていれば重複ァ ドレス登録領域にその物理ブロックアドレスを登録することを特徴とする。 このような特徴を有する本発明によれば、 データ書き込みの際の書き込み 単位をホスト機器で用いられているデ一夕書き込み単位と同一とし、 しかも メモリカード内の不揮発性メモリの消去単位が大容量化により拡大した場合 であっても外部ホスト機器からみたデータの書き込みを短時間で行うことが できる。 又書き込み領域のうちの一部が使用されている場合であっても、 消 去済みのブロックの確保処理を行うことによつて書き込み可能な領域を形成 することができるという効果が得られる。 図面の簡単な説明
第 1図は従来の不揮発性メモリの構成を示す図である。
第 2図は従来のフラッシュメモリ、 及びその物理プロックの構成を示す図 である。
第 3図は従来の物理プロックに書き込まれる論理ページの構成を示す図で ある。
第 4図は従来の論理プロックの構成を示す図である。
第 5図は従来の不揮発性メモリのデータ読み出し時の動作を示す概略図で ある。
第 6図は従来の不揮発性記憶装置のデータ書き込み処理を示すフローチヤ —卜である。
第 7図は従来のデータ書き込み時の動作を示す概略図である。
第 8図は本発明の実施の形態 1による不揮発性記憶装置の全体構成を示す ブロック図である。
第 9図は実施の形態 1によるフラッシュメモリとその物理ブロックの構成 を示す図である。
第 1 0図は実施の形態 1による論理グループの構成を示す図である。 第 1 1図は実施の形態 1によるアドレス変換テーブルの構成を示す図であ る。
第 1 2図は実施の形態 1による物理ページ内の論理ページの構成を示す図 である。
第 1 3図は実施の形態 1によるテーブル初期化処理を示すフローチャート である。
第 1 4図は実施の形態 1によるアドレス変換テーブルの登録処理を示すフ 口—チヤ—卜である。 第 1 5図は実施の形態 1によるアドレス変換テーブルの修正処理を示すフ 口一チャートである。
第 1 6図は実施の形態 1によるデータ読み出し処理を示すフローチヤ一卜 である。
第 1 7図は実施の形態 1によるデータ読み出し処理の動作を示す概略図で ある。
第 1 8図は実施の形態 1によるデータ書き込み処理 (その 1 ) を示すフロ —チヤ一卜である。
第 1 9図は実施の形態 1によるデータ書き込み処理 (その 2 ) を示すフロ —チヤ一卜である。
第 2 0図は実施の形態 1による重複ァドレス登録処理を示すフローチヤ一 卜である。
第 2 1図は実施の形態 1による消去ブロック確保処理を示すフロ一チヤ一 トである。
第 2 2図は実施の形態 1による消去ブロック確保処理をする前の第 1の例 を示す図である。
第 2 3図は実施の形態 1による第 1の例の消去ブロック確保処理後の状態 を示す図である。
第 2 4図は実施の形態 1による消去ブロック確保処理をする前の第 2の例 を示す図である。
第 25図は実施の形態 1による第 2の例の消去ブロック確保処理後の状態 を示す図である。
第 26図は実施の形態 1による前半巻き込み処理を示すフローチャートで ある。
第 27図は実施の形態 1による後半巻き込み処理を示すフローチャートで ある。
第 28図は実施の形態 1による消去とテーブル更新の処理を示すフローチ ャ一トである。
第 29図は実施の形態 1によるデータ書き込み処理の動作を示す概略図で ある。
第 30図は本発明の実施の形態 2による論理グループの構成を示す図であ る。 発明を実施するための最良の形態
(実施の形態 1 )
第 8図は本発明の実施の形態 1によるメモリカードの構成を示すブロック ' 図である。 本図に示すように、 メモリカード 1はコントローラ 2及び不揮発 性メモリ、 例えば 1 28 MBの容量を持つフラッシュメモリ FM0〜FM3 によって構成されている。 コントローラ 2は CPU 1 1、 2KBの容量を持 つ一時退避バッファ 1 2、 5 1 2 Bの容量を持つデータ転送バッファ 1 3、 1 5ビッ 卜で 4KWo r dの構成、 即ち 7. 5 K Bの容量を持つアドレス変 換テーブル 14と、 1ピットで 4KWo r dの構成、 即ち 5 1 2 Bの容量を 持つエントリテーブル 1 5によって構成されている。
さてフラッシュメモリ FM0〜FM3は第 8図に示すように、 夫々 1 28 MBの容量を持っている。 各フラッシュメモリ FM0〜FM3は第 9図 (a ) に示すように、 夫々が 1 28 KBの容量を持つ 1 024の物理ブロック ( PB 0〜PB 1 023 ) によって構成される。 これによつてメモリカード 1 の不揮発性メモリの全データ容量は 5 1 2MBとなり、 このうち外部からデ 一夕領域として使用できる容量は 500 MBである。
第 9図 (b) はフラッシュメモリ内の 1つの物理ブロック PB i ( i = 0 〜 1 02 3 ) を示している。 ここで物理ブロックは 64の物理ページ P P 0 〜P P 63から成り立つている。 そしてその中の各 8ページ、 即ちホスト機 器での管理サイズに等しい 1 6 KB分を、 部分物理ブロック P P Bとする。 例えば P P 0〜P P 7までを部分物理プロック P P B 0とする。 即ち物理ブ ロック P B iは夫々 8つの部分物理ブロックから成り立つている。 ここで部 分物理ブロック P PBは後述する論理ブロックと同一のサイズであり、 論理 ブロックのデータを書込む領域である。 又物理ページがデータの書込み単位 となっている。
さてこのメモリカード 1は外部のホスト機器 3から見て 500 MBのメモ リ容量があり、 第 1 0図に示すような論理マップによって論理ァドレスが割 り付けられる。 即ち 500 MBのデータ領域は論理グループ L G 0から論理 グループ L G39 9 9まで 4000の論理グループ (L G) に分割され、 各 論理グループが 1 28 KBのデータ容量を持つ。 そして各論理グループは 1 6 KBのデータ容量単位の 8つの論理ブロック (LB) に分割される。 論理 プロック L Bは図示のように L G 0〜LG 3 1 999までの一連の番号が割 り当てられている。 この論理アドレスはホスト機器が指定するアドレスと対 応している。 そして異なる論理グループのデータは必ず物理的に異なる消去 単位 (物理ブロック) に含まれる部分物理ブロックに配置される。 又各論理 ブロックは夫々 1つの部分物理ブロックに配置される。 部分物理ブロックの 8つの物理べ一ジは夫々 8つの論理べ一ジに対応し、 各物理ページは 2 KB の容量を持つデータ領域と、 64 Bの容量を持つ管理領域から成り立つてい る。 物理ページのデータの構成は後ほど第 12図で示すが、 データ領域と管 理領域ともに連続した領域を占有せず、 複数の領域に離散して構成される。 第 1 1図はァドレス変換テーブル 14を示すブロック図である。 本図に示 すように、 アドレス変換テーブル 14は論理グループを示す論理ァドレスが 与えられたときに、 フラッシュメモリとその中の物理ブロック及びその部分 物理ブロックを指定する 1 5ビットのァドレス変換領域 AC R 14 aが設け られる。 このうち最初の 2ビッ トはフラッシュメモリ FM0から FM3のど れかを示すビット、 続く 1 0ビットはそのフラッシュメモリ内のどの物理ブ ロック PBかを示すビット、 続く 3ビットはその物理プロック内のどの部分 物理ブロック PPBかを示すビットである。 アドレス変換テ一ブル 14のァ ドレス変換領域 14 aを除く空き領域の一部には、 重複アドレス登録領域 O ARR 14 bが設けられる。 ある論理グループのデータが複数の物理ブロッ クにまたがって記録されることがあるので、 そのときに重複ァドレス登録領 域 14 bに登録される。 重複アドレス登録領域 14 >は1 6の領域を持ち、 各領域は重複部分物理ブロックアドレス OPPBA 1 5ビット、 重複論理グ ループアドレス OLGA 1 2ビッ卜から成り立つている。 重複ァドレス登録 領域 14 bにおいて、 重複部分物理ブロックアドレスの無効値を 0とする。 フラッシュメモリ FM0の先頭の物理ブロック PB 0に含まれる部分物理ブ ロック P PB 0は固定したデータを書き込む領域として予定されているので 、 重複部分物理ブロックァドレスとしてとり得る有効な値は 8〜 32767 である。 又、 重複論理アドレスの無効値は 4095としている。 重複論理ァ ドレスとしてとり得る値は外部のホスト機器 3が指定できる論理グループの 0〜3999である。 後述するァドレス変換テーブル修正フローの処理を終 えた後は、 重複ァドレス登録領域 14 bの重複部分物理プロックアドレスの 下位 3ビットは全て 1となる。 尚、 ここではアドレス変換領域に論理グルー プアドレス毎に部分物理ブロックアドレスを登録しているが、 部分物理プロ ックァドレスに代えて物理ブロックァドレスを登録するようにしてもよい。 又重複アドレス登録領域には、 単に重複している物理ブロックを示す物理ブ ロックアドレスを登録するだけでもよい。 物理ブロックアドレスがわかれば 、 その物理ブロック内の部分物理プロックを検索することにより最新の部分 物理ブロックァドレスを得ることができ、 その物理ブロックアドレスの管理 領域を読み出すことにより論理グループアドレスを得ることができる。 次に各物理ページに書き込まれる論理ページの構成を第 1 2図に示す。 論 理ページはブロック管理領域 B M Rの 2 4バイ トに続いて、 セクタデータ領 域 S D R 5 1 2バイト、 セクタ管理領域 S M R 8パイ卜が交互に連続する構 成となっており、 最後にページ管理領域 P M R 8バイトが設けられる。 セク 夕データ領域 S D Rは 4つで、 計 2 Kバイ卜のデータ領域を構成している。 又ブロック管理領域には、 論理ブロックアドレス L B A、 アドレステーブル A T、 リングカウン夕、 アドレス管理領域が設けられている。 ここでァドレ ステーブル A Tは、 この論理ブロックが属する論理グループに含まれる 8つ の論理プロックが書き込まれた部分物理ブロックのァドレスを示している。 この内容は同一の論理プロックに属する各論理ページ毎に同一である。 ァド レステーブルは各 1 5ビッ卜で表現されるので、 例えばその 1 6ビット目を 用いてこの論理ページが消去済みかどうかを知ることができるようにしてい る。 またリングカウンタはァドレステーブルの新旧を判別するためのカウン タであり、 ァドレステーブルの更新毎にィンクリメントされる。
又第 8図に示すエントリテーブル 1 5は 4 0 9 6の物理ブロックに対応し た 1ビット構成のフラグから成るテーブルである。 このフラグは消去済みで あれば 1、 書込み済みの場合は 0とする。
ここでコントローラ 2の C P U 1 1は、 重複アドレス変換領域に登録可能 な空きがないときにァドレス変換テーブル 1 4の重複ァドレス登録領域 1 4 bを参照し、 複数の物理ブロックに重複して記録されている論理グループの データについていずれかの物理ブロックに当該論理グループのデータを集約 することによつて消去プロックを確保する消去ブロック確保手段の機能を有 している。 消去ブロック確保手段は、 全ての部分物理ブロックが消去済みと なっている物理ブロックがない場合に消去ブロックを確保することとしても よい。
次にテーブルの初期化処理について第 1 3図のフローチャートを参照しつ つ説明する。 初期化処理は、 電源投入後に不揮発性メモリの状態に応じてァ ドレス変換テーブル 1 4、 エントリテ一プル 1 5を作成する処理である。 ま ずステップ S 1 1においてエントリテーブル 1 5の全データを 0とする。 そ してアドレス変換テーブル 1 4の全データを無効アドレスとする。 ここで無 効アドレスは 0とする。 有効アドレスは 8〜 3 2 7 6 7である。 次いでフラ ッシュメモリ F Mのポインタを 0とし (ステップ S 1 3 ) 、 ステップ S 1 4 において物理ブロック P Bのポインタを 0とする。 次いでステップ S 1 5に おいて指定されている物理ブロックのページ 0の管理領域から論理ブロック アドレスを読み出し、 そのブロックが消去済みかどうかをチェックする。 消 去済みであればエントリテーブル 1 5に消去済みであるように登録し (ステ ップ S 1 7 ) 、 消去済みでなければステップ S 1 8においてアドレス変換テ 一ブル 1 4に登録する。 この処理については後述する。 次いでステップ S 1 9において最終物理ブロックかどうかをチェックし、 最終物理ブロックでな ければステップ S 2 0において物理プロックのボインタをインクリメントし 、 ステップ S 1 5に戻る。 又ステップ S 1 9において最終物理ブロックであ れば、 ステップ S 2 1に進んで最終フラッシュメモリかどうかをチェックす る。 最終フラッシュメモリでなければ、 ステップ S 2 2においてフラッシュ メモリのポインタをインクリメントし、 ステップ S 1 4に戻る。 ステップ S 2 1において最終フラッシュメモリであれば、 ステップ S 2 3に進んで後述 するアドレス変換テーブルの修正処理を行って処理を終える。
次にステップ S 1 8のアドレス変換テーブル 1 4への登録について第 1 4 図のフローチャートを用いて説明する。 第 1 4図においてアドレス変換テー ブルの登録を開始すると、 まずステップ S 3 1においてテーブルオフセット ページ (T O P ) を 5 6とする。 次いでステップ S 3 2において物理ブロッ クのテーブルオフセットページの管理領域の論理ブロックァドレスを読み出 す。 そしてステップ S 3 3において、 このページが消去済みかどうかをチェ ックし、 消去済みであればテーブルオフセットページ T O Pを一 8とし (ス テツプ S 3 4 ) 、 ステップ S 3 2に戻る。 又消去済みでなければ、 ステップ S 3 5に進んで物理プロックのテーブルオフセッ卜ページから読み出した論 理グループアドレスに対応するアドレス変換テーブルの値を読み出す。 そし てステップ S 3 6において読み出した論理ァドレスに対応するアドレス変換 テーブルのデータが登録済みか未登録かを判定する。 これが無効ァドレス 0 であれば未登録と判定する。 そしてステップ S 3 7において、 アドレス変換 テーブル 1 4の変換領域 1 4 aより読み出した論理ブロックアドレスに属す る論理ダル一プアドレスに対応する位置に、 読み出し対象である部分物理ブ ロックのァドレスを登録する。 ステップ S 3 6において有効ァドレスが登録 済であれば、 ステップ S 3 6から S 3 8に進む。 そしてアドレス変換テープ ル 1 4の重複ァドレス登録領域 1 4 bに、 読み出し対象である部分物理プロ ックのァドレスと物理ブロック管理領域から読み出した論理ダル一プアドレ ス L G Aの値を登録する。
次にステップ S 2 3のァドレス変換テーブル修正処理について第 1 5図の フローチャートについて説明する。 ァドレス変換テーブルの修正処理とは、 同一の論理グループに属する論理ブロックのデータが複数の物理ブロックに 離散して配置されている場合に、 新しい書き込みのあった部分物理ブロック のアドレスをアドレス変換領域 1 4 aに、 古い書き込みの部分物理ブロック を重複ァドレス登録領域 1 4 bに登録するように修正する処理である。 まず ステップ S 4 1においてボイン夕 i を 0とし、 ステップ S 4 2においてアド レス変換テーブル 1 4の重複アドレス登録領域 1 4 bの i番目の論理グルー プアドレス L G Aと部分物理ブロックァドレス P P B Aとを得る。 次いでス テツプ S 4 3においてこれが有効値かどうかを判別する。 有効値であればス テツプ S 4 4に進んで i番目の部分物理プロックの任意のページの管理領域 を読み出し、 リングカウンタ値を得る。 次いでステップ S 4 5において、 i 番目の論理ァドレスを元にァドレス変換テーブル 1 4のァドレス変換領域 1
4 aから対応する部分物理ブロックのァドレスを得る。 さらにステップ S 4 6において i番目の論理ァドレスに対応する部分物理ブロックアドレスの管 理領域を読み出し、 リングカウンタ値を得る。 そしてステップ S 4 7におい て、 リングカウンタ値によって重複アドレス登録領域のテーブルの方が新し いかどうかを判定する。 これが新しければ、 ステップ S 4 8において i番目 の部分物理ブロックと i番目の論理ァドレスに対応する部分物理ブロックァ ドレスとを入れ替える。 一方ステップ S 4 7においてテーブルが新しくなけ れば、 この処理を行うことなく、 ステップ S 4 9に進んでポインタ iが 1 5 かどうかをチェックし、 1 5でなければ iをインクリメントし (ステップ S
5 0 ) 、 ステップ S 4 2に戻る。 ポインタ iが 1 5となっていれば処理を終 了する。 こうすればァドレス変換テ一ブル 1 4の修正を行うことができる。 次にデータの読み出し処理について、 第 1 6図のフローチャート、 及び第 1 7図のデ一夕読み出しの概略図を用いて説明する。 ステップ S 5 1におい てホスト機器 3からの論理アドレスのうち、 1 2 8 K B単位のアドレスを論 理グループアドレス L G A、 1 6 K B単位のァドレスを論理ブロックァドレ ス L B A、 1 6 K B未満のアドレスを論理ページアドレス L P Aとする。 次 いでステップ S 5 2に進んで、 論理グループアドレスを元にアドレス変換テ 一ブル 1 4から得られた部分物理プロックをテーブル部分物理ブロック T P P Bとする。 次いでステップ S 5 3において、 テーブル部分物理ブロックの 任意のページのァドレステーブルを読み出し、 論理ブロックァドレスのデー 夕が書込まれている部分物理ブロックを読み出し元部分物理ブロックとする 。 ステップ S 5 4において読み出し元部分物理ブロックの論理ページアドレ スのデ一夕を読み出してデータ転送バッファ 1 3を介してホスト機器 3に転 送する。 そしてステップ S 5 5において読み出しが終了したかどうかをチェ ックし、 終了していなければステップ S 5 6において論理ページァドレスが ブロック内で最終となったかどうかをチェックする。 最終でなければ論理べ —ジアドレス L P Aをインクリメントし (ステップ S 5 7 ) 、 ステップ S 5 4に戻って同様の処理を繰り返す。 論理ページァドレスがブロック内で最終 となれば、 ステップ S 5 8において論理ブロックアドレスが論理グループ内 で最終かどうかをチェックする。 最終でなければ論理ページァドレスを 0と し、 論理ブロックアドレスをィンクリメントする (ステップ S 5 9 ) 。 そし てステップ S 5 4に戻って同様の処理を繰り返す。 論理ブロックアドレスが 論理グループ内で最終であれば、 ステップ S 6 0に進んで論理ページァドレ スを 0、 論理プロックアドレス及び論理グループアドレスをインクリメント してステップ S 5 2に戻る。 こうすれば指定された論理ページァドレスから データを読み出すことができる。
次いで第 1 8図、 第 1 9図を用いてデータ書き込み処理について説明する 。 データ書き込み処理を開始すると、 まずステップ S 6 1においてホスト機 器 3からの論理ァドレスのうち 1 2 8 K B単位のァドレスを論理ダル一プア ドレス L G A、 1 6 K B単位のアドレスを論理ブロックアドレス L B A、 1 6 K B未満のアドレスを論理ページアドレス L P Aとする。 次いでステップ S 6 2に進んで、 論理グループアドレスを元にァドレス変換テーブルから得 られる部分物理プロックをテーブル部分物理プロック T P P Bとする。 次い でステップ S 6 3に進んで、 テーブル部分物理ブロックの任意のページのァ ドレステーブルを読み出して保持する。 そしてステップ S 6 4に進んでテ一 ブル部分物理プロックのアドレスが物理プロック P B内の最終部分物理プロ ックかどうかをチェックする。 最終部分物理ブロックでなければ、 ステップ
S 6 5に進んで、 テーブル部分物理プロックのァドレスの次の部分物理プロ ックを書き込み先部分物理プロック P P Bとする。 一方ステップ S 6 4にお いて最終部分物理ブロックであれば、 ステップ S 6 6において後述する重複 アドレス登録処理をする。 そしてステップ S 6 7においてエントリテーブル 1 5を検索し、 消去済みの物理ブロックを得て、 ぞの先頭の部分物理プロッ クを書き込み先部分物理プロック P P Bとする。 更にェン卜リテーブルのそ の物理ブロックの当ビットを書き込み済み 「0」 に更新する。 こうして書き 込み先部分物理ブロックを決めた後、 ステップ S 6 8において、 アドレステ —ブルのうち論理ブロックァドレスに対応するァドレスを読み込み元部分物 理ブロックとして保持する。 そしてステップ S 6 9において、 アドレステー ブルに読み込み元部分物理ブロックと同じ物理ブロックに属する部分物理ブ ロックがあるかどうかをチェックする。 これはその部分物理ブロックが最後 の部分物理ブロックか否かを検出するものである。 これがなければステツプ S 7 0において読み込み元部分物理ブロックと同じ物理ブロックに属する部 分物理ブロックは消去してもよいので、 これを消去予定物理ブロックとして 保持する。 ステップ S 6 9においてこれに相当する部分物理ブロックがなけ れば、 ステップ S 7 0の処理を行うことなくステップ S 7 1に進んで、 コン トローラの内部においてァドレステーブルのうち論理ブロックアドレスに対 応するァドレスを書き込み先部分物理プロックに差し替える。
次いで第 1 9図において論理べ一ジァドレス L P Aが 0かどうかをチエツ クし、 0でなければ後述するように、 前半巻き込み処理を行う (ステップ S 7 3 ) 。 論理ページアドレスが 0であれば、 この処理を行うことなくステツ プ S 7 4に進んで、 ホス卜機器 3からの書き込みデータをデータ転送パッフ ァ 1 3を介してフラッシュメモリに転送する。 そして書き込み先部分物理ブ ロックの論理ページァドレスに書込む。 このとき管理領域に書込む管理情報 も同時に書込む。 そしてステップ S 7 5において書込みを終了したかどうか をチェックし、 終了していなければステップ S 7 6において論理ページァド レスが論理ブロック内の最終ページかどうかをチェックする。 最終でなけれ ばステップ S 7 7において論理ページアドレスをインクリメントし、 ステツ プ S 7 4に戻る。 論理ブロック内の最終ページであれば、 ステップ S 7 8に おいて消去とテーブルの更新処理を行う。 次いでステップ S 7 9において論 理ブロックァドレスが論理グループ内の最終かどうかをチェックし、 最終で なければステップ S 8 0において論理ページァドレスを 0とし、 論理プロッ クアドレスをインクリメントする。 次いでステップ S 8 1においてテーブル 部分物理プロックに書き込み先部分物理プロックのアドレスを入れる。 そし て第 1 8図のステップ S 6 4に戻って同様の処理を繰り返す。 又ステップ S 7 9において論理ブロックアドレスが論理グループ内の最終であれば、 ステ ップ S 8 2において論理ページアドレスを 0、 論理ブロックアドレスと論理 ダル一プアドレスをィンクリメントし、 ステップ S 6 2に戻る。 そしてステ ップ S 7 5において書き込み処理が終了すれば、 ステップ S 8 3において論 理ぺ一ジァドレスが論理ブロック内の最終かどうかをチェックする。 最終で なければステップ S 8 4において後半巻き込み処理を行う。 論理ページァド レスがブロック内で最終であれば、 ステップ S 8 5において消去とテーブル 更新を行って処理を終える。
次いでステップ S 6 6の重複ァドレス登録処理について第 2 0図を用いて 説明する。 重複アドレス登録処理では、 ステップ S 9 1において重複アドレ ス登録領域の登録状況を確認する。 そして空き領域があるかどうかを判別し 、 空き領域がなければ後述する消去ブロック確保の処理を行う (ステップ S 9 3 ) 。 空き領域があればステップ S 9 4において、 重複アドレス登録領域 の空き登録領域の重複部分物理ブロックアドレスにテーブル部分物理ブ口ッ クを、 重複論理グループアドレスに論理グループアドレスを書込む。
次にステップ S 9 3の消去プロックの確保処理について、 第 2 1図のフロ —チャートを用いて説明する。 まずステップ S 1 0 1において、 重複アドレ ス登録領域 1 4 bの有効ァドレスを検索し、 1組の重複部分物理ブロックァ ドレスと重複論理ダル一プアドレスとを得る。 そしてそれらを解消部分物理 ブロックアドレス、 及び解消論理グループアドレスとする。 次いでステップ S 1 0 2において、 解消論理ダル一プアドレスを元にァドレス変換テーブル のァドレス変換領域から対応する部分物理ブロックアドレスを得て解消テー ブル部分物理ブロック (解消 T P P B ) とする。 そしてステップ S 1 0 3に おいて、 解消テーブル部分物理ブロックの任意のページよりアドレステープ ルを読み出す。 ステップ S 1 0 4において、 解消テーブル部分物理ブロック に属する物理ブロックのうち、 既に書き込まれている部分物理ブロックは全 てァドレステ一ブルに書き込まれているかどうかをチェックする。 この処理 は解消テーブル部分物理ブロックの属する物理ブロックに有効なデータを全 て集めることができるかどうかを判定している。 これが Y E Sであれば、 ス テツプ S 1 0 5において、 解消テーブル部分物理ブロックの次の部分物理ブ ロックを解消書き込み先部分物理ブロックとする。 ステップ S 1 0 4におい て N Oであれば、 ステップ S 1 0 6に進んで、 新たな物理ブロックに全ての データを書き込む。 即ちェントリテーブルを検索して消去済の物理ブロック を得る。 そしてその先頭の部分物理ブロックを解消書き込み先部分物理プロ ックとする。 そしてエントリテーブルの該当ビットを書き込み済み 「0」 に 更新する。 次いでこれらのいずれかの処理を行った後、 ステップ S 1 0 7に 進んで、 ァドレステ一ブルのうち解消書き込み先部分物理ブロックの属する 物理プロックにないデータを、 順に解消書き込み先物理プロックにコピーす る。 その際アドレステーブルとアドレス変換テーブルのアドレス変換領域に ついても順次アップデートする。 次いでステップ S 1 0 8に進んで、 重複ァ ドレス登録領域のうち解消論理ダル一プアドレスと一致する重複グループア ドレスを持つ組の重複部分物理ブロックの属する物理ブロックのデータを消 去し、 重複部分物理ブロックアドレス O P P Bと重複グループアドレス 0 G Aとを無効化する。 これは 3以上の物理ブロックに渡って重複が生じている こともあるので、 これを解消するためである。 次いでステップ S 1 0 9にお いて、 消去に対応してェントリテーブルの重複部分物理プロックアドレスに 該当するデータを消去済みに更新して処理を終える。
次にこの消去ブロック確保の処理の例について、 第 2 2図, 第 2 3図に沿 つて説明する。 第 2 2図は消去ブロックを確保する前の物理ブロック P B 1 0 0と P B 1 0 1との例を示している。 この図に示すように、 物理ブロック P B 1 0 0は部分物理ブロックとして P P B 8 0 0〜 8 0 7を有しており、 物理ブロック P B 1 0 1は部分物理ブロック P PB 808〜8 1 5を有して いる。 そして論理グループ L G 0の論理ブロック L B 0〜 7のデータが一旦 物理プロック P B 1 00に書き込まれ、 その後論理グループ L G 0の論理ブ ロック LB 0〜6は更新されて、 物理プロック P B 1 0 1の部分物理プロッ ク P P B 808〜 8 14に書き込まれている。 このため物理ブロック P B 1 00のうち、 部分物理ブロック P PB 800〜806のデータは無効化され ている。 第 22図ではこれをハッチングで示している。 この場合には物理ブ ロック P B 1 0 1の部分物理プロック PPB 8 1 5は未書き込みの領域であ る。 この消去ブロック確保前のアドレス変換テーブル 14とエントリテ一ブ ル 1 5の状態も第 22図に同時に示している。 アドレス変換テーブル 14の 論理グループ L G 0の位置には、 論理グループ L G 0のうち最も新しく記憶 された部分物理ブロック P P B 8 14が登録されている。 又重複アドレス登 録領域 14 bには重複部分物理ブロック P PB 807、 重複論理グループ L G 0が登録される。 これは物理プロック P B 1 00内の部分物理プロック P P B 807に有効な論理グループ L G 0、 論理ブロック LB 7のデ一夕が記 録されていることを示している。 この場合には部分物理プロック P P B 8 1 5に論理グループ LG0、 論理ブロック LB 7のデータを書き込むことによ つて、 ステップ S 1 04に示すように物理ブロック P B 1 0 1に全てのデー タを集めることができる。
従って解消テーブル部分物理プロックを解消テーブル部分物理プロックの 次の部分物理ブロックとすること (ステップ S 1 04) 、 即ちこの例では部 分物理ブロック 8 1 5とすることによって、 第 23図に示すように論理ダル ープ LG0、 論理ブロック LB 7のデータを部分物理ブロック P PB 8 1 5 に書き込み、 論理グループ L GOの全てのデータを物理ブロック PB 1 0 1 に集めることができる。 こうすれば物理ブロック PB 100は全て消去済み で未書き込みとなり、 新たなデータを書込むことができる。 エントリテープ ル 1 5は物理ブロック PB 1 00が 「1」 となって書込みができることを示 している。
消去ブロックの確保の他の例について第 2 4図, 第 2 5図を用いて説明す る。 第 2 4図は物理ブロック P B 1 0 0にまず論理グループ L G 0の論理ブ ロック L B 0〜 7が書き込まれ、 更にその後に物理ブロック P B 1 0 1の部 分物理ブロック P P B 8 0 8〜8 1 3に論理グループ L G 0の論理ブロック L B 0〜 5が書き込まれている。 そしてハッチングで示すように、 このとき 物理プロック P B 1 0 0の部分物理プロック P P B 8 0 0〜8 0 5が無効と なっている。 更に論理グループ L G Oの論理ブロック L B 0が物理ブロック P B 1 0 1の部分物理ブロック P P B 8 1 4に書き込まれ、 部分物理ブロッ ク P P B 8 0 8のデータが無効化された状態を示している。 このときァドレ ス変換テーブル 1 4については論理グループ L G 0に対し部分物理ブロック P P B 8 1 4が書き込まれており、 重複アドレス登録領域 1 4 bに重複部分 物理ブロック 8 0 7とその重複論理グループ 0が書き込まれている。 この場 合にはステップ S 1 0 4において、 解消テーブル部分物理ブロックに属する 物理ブロック P B 1 0 1に有効なデータを集めることができない。 即ち第 2 1図のステップ S 1 0 4において、 解消テーブル部分物理ブロックの属する 物理ブロックのうち、 既書き込みである部分物理ブロックは全てァドレステ 一ブルに書き込まれていない場合を示している。 そのためステップ S 1 0 6 においてエントリテ一ブル 1 5を検索し、 消去済みの物理ブロックを得る。 この場合には物理ブロック P B 1 0 2を得てこの物理ブロックに全てのデ一 タを書込む。 第 2 5図はこうして全てのデータが書込まれた状態を示してい る。 この場合、 物理ブロック P B 1 0 0、 1 0 1は消去済みとなり、 ェント リテーブル 1 5のフラグが 1となって新たなデータを書込むことができる状 態を示している。
次にステップ S 7 3の前半巻き込み処理について、 第 2 6図のフローチヤ —トを用いて説明する。 まず動作を開始すると、 ステップ S 1 1 1において 、 巻き込みページァドレスを 0とする。 次いでステップ S 1 1 2において、 読み出し元部分物理ブロックの巻き込みページァドレスのデータを一時退避 バッファ 1 2に読み出す。 次いでそのデ一夕をフラッシュメモリに転送し、 書き込み先物理ブロックの卷き込みページァドレスに書込む。 このとき管理 領域に書込む管理情報も同時に書込む。 次いでステップ S 1 1 3に進んで巻 き込みページァドレスをィンクリメントし、 ステップ S 1 1 4において巻き 込みべ一ジァドレスが論理ページァドレスと一致しているかどうかをチエツ クする。 これが一致していなければステップ S 1 1 2に戻って同様の処理を 繰り返す。 一致している場合には前半巻き込み処理を終える。
次にステップ S 8 4の後半巻き込み処理について、 第 2 7図のフローチヤ —トを用いて説明する。 後半巻き込み処理は動作を開始すると、 まずステツ プ S 1 2 1において論理べ一ジァドレス + 1を巻き込みページァドレスとす る。 次いでステップ S 1 2 2において読み出し元物理ブロックの巻き込みべ —ジァドレスのデータを一時退避バッファ 1 2に読み出す。 そしてそのデー 夕をフラッシュメモリに転送し、 書き込み先物理ブロックの巻き込みページ アドレスに書込む。 このとき管理領域に書込む管理情報も同時に書込む。 次 いでステップ S 1 2 3に進んで、 巻き込みページアドレスが最終ページアド レスかどうかをチェックする。 最終ページでなければ、 ステップ S 1 2 4に おいて巻き込みページァドレスをインクリメントしてステップ S 1 2 2に戻 る。 巻き込みページァドレスが最終ページであれば後半巻き込み処理を終え る。 このように巻き込み処理は従来例と異なり、 ページ単位で行うことによ つてフラッシュメモリの書き込み管理単位を 1 6 K Bとして巻き込み処理の 時間を短くなるようにしている。
次にステップ S 7 6, S 8 5の消去とテーブル更新処理について、 第 2 8 図のフローチャートを用いて説明する。 この処理を開始すると、 まずステツ プ S 1 3 1において、 消去予定プロックに有効な値があるかどうかをチエツ クする。 有効な値があれば、 ステップ S 1 3 2において消去予定物理ブロッ クを消去する。 次いでステップ S 1 3 3においてァドレス変換テーブルの重 複ァドレス登録領域にあり、 今回の書き込みで消去した物理プロックに対応 する重複部分物理プロックアドレスと重複論理グループアドレスとを無効化 する。 次いでステップ S 1 3 4においてェン卜リテーブルの消去予定物理ブ 口ックに該当するデータを消去済みに更新する。 そしてステップ S 1 3 5に おいてァドレス変換テーブルの論理グループアドレスのデータを書き込み先 部分物理ブロックに書き換える。 又ステップ S 1 3 1において消去予定物理 ブロックに有効な値がなければ、 ステップ S 1 3 4までの処理を行うことな くステップ S 1 3 5の処理をした後このフロ一を終える。
第 2 9図はこうした処理を行ってホスト機器から与えられた 1 6 K B単位 のデータをデータ転送バッファ 1 3を介して書き込み先の物理ブロックに書 き込む例を示している。 ホス卜機器 3より書き込み単位として 1 6 K Bのデ —夕が与えられると、 書き込み先の物理プロックの中のいずれかの部分物理 ブロックにこのデ一夕が書き込まれる状態を示している。 この場合には従来 のものと異なり、 この書き込み先物理プロックの他の部分物理プロックにつ いては元の状態、 即ち消去済みのままでそのまま維持される。 次にホス卜機 器より新たに 1 6 K Bのデータが書き込みデータとして与えられた場合には 、 他の部分物理ブロックに新たなデータが書き込まれる。 その物理ブロック の他の領域はそのまま保持される。 このようにホス卜機器 3から 1 6 K B単 位のデータが書き込みデータとして与えられたときに、 フラッシュメモリに 1 6 K Bの領域にのみ書き込みを行い、 物理ブロックの 1 2 8 K Bの全ての 領域にデ一夕を書込む必要はなく、 書き込み時間を短縮することができる。
(実施の形態 2 )
次に本発明の実施の形態 2について説明する。 この実施の形態はほぼ実施 の形態 1と同様である。 論理グループ 0に属する論理ブロックには外部ホス 卜機器は F A Tと呼ばれるファイル管理のためのデータを配置するために、 頻繁に書き込み処理が発生し易く、 これに伴って消去ブロックの確保処理が 頻繁に入ることとなる。 このため論理的にアクセスが偏ることが予想される 論理ァドレスの領域については第 30図に示すように、 論理グループのサイ ズを小さくする。 即ち論理グループ 0、 1については、 論理グループ L GO ー 0〜; LG0— 7、 論理グループ L G l— 0〜LG l— 7のように 1 6 KB 単位に分割する。 この部分では論理グループと論理ブロックとは同一のサイ ズの 16 KBとなる。 論理ブロックは実施の形態 1と同様に 0から 3 1 99 9まで一連の論理プロック番号が付けられる。 こうすればアクセスが偏るこ とが予想される論理グループは論理グループのサイズの 1 6 KBに比べて割 り当てられる物理プロックのサイズの 1 28 KBが大きいために消去プロッ ク確保処理の頻度が低下し、 速度の低下を防ぐことができる。
尚ここで説明した各実施の形態でのデータ容量などの数値は一例であり、 他の数値としても良いことはいうまでもない。 産業上の利用の可能性
本発明は書き換え可能な不揮発性メモリを有する不揮発性記憶装置及びそ の書込み方法であって、 大容量化した場合にも従来例に比べて書き込み速度 を高速化することができる。 そのため大容量化で高速で書き込みが必要な不 揮発性メモリの種々の用途に使用することができる。

Claims

請 求 の 範 囲
1 . 不揮発性メモリと、
コントローラと、 を有し、
外部から与えられる論理ァドレスに基づいて前記不揮発性メモリにデータ を書き込み、 及び読み出す不揮発性記憶装置であって、
前記不揮発性メモリは、 複数の物理ブロックから成り、 前記各物理ブロッ クは 1又は複数の物理ページで構成される部分物理ブロックから成るもので あり、
外部からは、 一連の論理グループアドレスを含む論理ァドレスが与えられ るものであり、
前記コントローラは、
外部から与えられる論理ァドレスのうち論理グループアドレスをその論理 グループが属する論理プロックが記録される物理ブロックアドレスに変換す るアドレス変換領域、 及びある論理グループのデ一夕が複数の物理ブロック に重複して記録された場合に、 重複して記録されている物理ブロックァドレ スを示す重複ァドレス登録領域を有するアドレス変換テーブルと、
各物理ブロックについて書き込み済み及び消去済みのいずれかを示すェン 卜リテーブルと、 を有し、
書き込みのためのデータとその論理ァドレスとが外部から与えられたとき に、 未書き込みの領域に部分物理ブロックの単位で当該データを書き込むと 共に、 前記ァドレス変換テーブルのァドレス変換領域又は重複ァドレス登録 領域を更新することを特徴とする不揮発性記憶装置。
2 . 前記コントローラは、 前記アドレス変換領域の前記重複アドレス登録 領域に登録可能な空きがないとき、 前記アドレス変換領域の前記重複アドレ ス登録領域を参照し、'複数の物理ブロックに重複して記録されている論理グ ループのデータについていずれかの物理ブロックに当該論理グループのデ一 夕を集約することによって消去ブロックを確保する消去プロック確保手段を 有することを特徴とする請求項 1記載の不揮発性記憶装置。
3 . 前記消去ブロック確保手段は、 ある物理ブロックについて書き込み済 み領域及び未書き込み領域があり、 且つその物理ブロックに記録されている 論理グループに属する論理プロックのデータが他の物理プロックから移動で きる場合に、 その物理ブロックに集約することによって、 消去ブロックを確 保することを特徴とする請求項 2記載の不揮発性記憶装置。
4 . 前記消去ブロック確保手段は、 ある物理ブロックについて同一論理グ ループに属する一部の論理ブロックが記録され、 その物理プロックの未書き 込み領域に当該論理グループに属する他の論理ブロックのデータを書き込む ことができない場合に、 前記ェントリテ一ブルを参照して新たな未書き込み の物理ブロックを検索し、 検索した物理プロックに同一論理グループに属す る全ての論理ブロックのデ一夕を書き込むことによって、 消去ブロックを確 保することを特徴とする請求項 2記載の不揮発性記憶装置。
5 . 前記不揮発性メモリの物理プロックを構成する部分物理プロックのデ —夕容量は、 前記不揮発性記憶装置の外部のデータ管理単位と等しくしたこ とを特徴とする請求項 1記載の不揮発性記憶装置。
6 . 前記論理グループは、 アクセス数の多い上位グループについて、 他の 論理グループよりもデ一タ容量を少なくした論理グループから成ることを特 徵とする請求項 1記載の不揮発性記憶装置。
7 . 不揮発性メモリと、
コン卜ローラと、 を有し、 外部から与えられる論理ァドレスに基づいて前記不揮発性メモリにデータ を書き込み、 及び読み出す不揮発性記憶装置のデータ書き込み方法であって 前記不揮発性メモリは、 複数の物理ブロックから成り、 前記各物理ブロッ クは 1又は複数の物理ページで構成される部分物理ブロックから成るもので あり、
外部からは、 一連の論理グループアドレスを含む論理ァドレスが与えられ るものであり、
前記コントローラは、
外部から与えられる論理ァドレスのうち論理グループアドレスをその論理 グループが属する論理プロックが記録される物理プロックアドレスに変換す るアドレス変換領域、 及びある論理グループのデータが複数の物理ブロック に重複して記録された場合に、 重複して記録されている物理ブロックァドレ スを示す重複ァドレス登録領域を有するアドレス変換テーブルと、
各物理プロックについて書き込み済み及び消去済みのいずれかを示すェン 卜リテーブルと、 を有し、
書き込みのためのデータとその論理ァドレスとが外部から与えられたとき に、 未書き込みの領域に部分物理ブロックの単位で当該データを書き込むと 共に、
前記ァドレス変換テーブルのァドレス変換領域又は重複ァドレス登録領域 を更新することを特徴とする不揮発性記憶装置のデータ書き込み方法。
8 . 前記ァドレス変換領域の前記重複ァドレス登録領域に登録可能な空き がないとき、 前記ァドレス変換領域の前記重複ァドレス登録領域を参照し、 複数の物理プロックに重複して記録されている論理グループのデータについ ていずれかの物理プロックに当該論理グループのデータを集約することによ つて消去プロックを確保する処理を更に有することを特徴とする請求項 7記 載の不揮発性記憶装置のデータ書き込み方法。
9 . 前記消去ブロック確保処理は、 ある物理ブロックについて書き込み済 み領域及び未書き込み領域があり、 且つその物理ブロックに記録されている 論理グループに属する論理ブロックのデ一夕が他の物理ブロックから移動で きる場合に、 その物理ブロックに集約することによって、 消去ブロックを確 保するものであることを特徴とする請求項 7記載の不揮発性記憶装置。
1 0 . 前記消去ブロック確保処理は、 ある物理ブロックについて同一論理 グループに属する一部の論理ブロックが記録され、 その物理ブロックの未書 き込み領域に当該論理グループに属する他の論理ブロックのデータを書き込 むことができない場合に、 前記ェントリテーブルを参照して新たな未書き込 みの物理ブロックを検索し、 検索した物理ブロックに同一論理グループに属 する全ての論理ブロックのデータを書き込むことによって、 消去ブロックを 確保するものであることを特徴とする請求項 7記載の不揮発性記憶装置のデ —夕書き込み方法。
1 1 . 前記不揮発性メモリの物理ブロックを構成する部分物理ブロックの データ容量は、 前記不揮発性記憶装置の外部のデータ管理単位と等しくした ことを特徴とする請求項 7記載の不揮発性記憶装置のデータ書き込み方法。
1 2 . 前記論理グループは、 アクセス数の多い上位グループについて他の 論理グループよりもデータ容量を少なくした論理グループから成ることを特 徴とする請求項 7記載の不揮発性記憶装置のデ一夕書き込み方法。
PCT/JP2004/012714 2003-08-29 2004-08-26 不揮発性記憶装置及びその書込み方法 WO2005022393A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2005513535A JP4667243B2 (ja) 2003-08-29 2004-08-26 不揮発性記憶装置及びその書込み方法
US10/569,880 US7987314B2 (en) 2003-08-29 2004-08-26 Non-volatile memory device and write method thereof
EP04772668A EP1659497A4 (en) 2003-08-29 2004-08-26 NON-VOLATILE MEMORY BLOCK AND WRITING PROCESS THEREFOR

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003-306160 2003-08-29
JP2003306160 2003-08-29

Publications (1)

Publication Number Publication Date
WO2005022393A1 true WO2005022393A1 (ja) 2005-03-10

Family

ID=34269378

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/012714 WO2005022393A1 (ja) 2003-08-29 2004-08-26 不揮発性記憶装置及びその書込み方法

Country Status (6)

Country Link
US (1) US7987314B2 (ja)
EP (1) EP1659497A4 (ja)
JP (1) JP4667243B2 (ja)
CN (1) CN100511181C (ja)
TW (1) TW200511012A (ja)
WO (1) WO2005022393A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007233838A (ja) * 2006-03-02 2007-09-13 Toshiba Corp メモリシステムの制御方法
EP1895418A4 (en) * 2005-12-09 2008-08-27 Matsushita Electric Ind Co Ltd NON-VOLATILE MEMORY DEVICE AND METHOD FOR WRITEING AND READING DATA
CN101484882A (zh) * 2005-12-09 2009-07-15 晟碟以色列有限公司 闪存管理方法
KR101247574B1 (ko) 2007-12-24 2013-03-26 노키아 코포레이션 메모리 기기 상의 데이터 저장 방법, 기기 및 데이터 구조

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1729218A4 (en) * 2004-04-20 2007-07-18 Matsushita Electric Ind Co Ltd NON-VOLATILE STORAGE SYSTEM
JP4991320B2 (ja) * 2007-01-12 2012-08-01 株式会社東芝 ホスト装置およびメモリシステム
JP5026213B2 (ja) * 2007-09-28 2012-09-12 株式会社日立製作所 ストレージ装置及びデータ重複排除方法
CN101727292B (zh) * 2008-10-16 2013-04-17 深圳市朗科科技股份有限公司 存储设备的访问系统、方法及存储设备
CN101650690B (zh) * 2009-09-21 2011-03-02 中兴通讯股份有限公司 大容量存储卡的应用方法及移动终端
TWI494948B (zh) * 2011-01-31 2015-08-01 Phison Electronics Corp 用於非揮發性記憶體的資料寫入方法、控制器與儲存裝置
US9645739B2 (en) * 2014-09-26 2017-05-09 Intel Corporation Host-managed non-volatile memory
JP7213712B2 (ja) * 2019-02-14 2023-01-27 キオクシア株式会社 不揮発性半導体記憶装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5898868A (en) 1992-01-29 1999-04-27 Microsoft Corporation Method and system for file system management using a flash-erasable, programmable, read-only memory
JPH11512544A (ja) * 1995-09-13 1999-10-26 レクサー・マイクロシステムズ・インコーポレーテッド 半導体不揮発性大容量記憶メモリ内の自動摩耗レベリングによるシステム・データ制御の方法およびアーキテクチャ
JP2001154909A (ja) * 1999-11-25 2001-06-08 Casio Comput Co Ltd フラッシュメモリ管理装置及び記録媒体
JP2001521220A (ja) * 1997-10-16 2001-11-06 エム システムズ フラッシュ ディスク パイオニアズ リミテッド 改善されたフラッシュファイルシステム
JP2002508862A (ja) * 1997-03-31 2002-03-19 レクサー メディア,インコーポレイテッド フラッシュメモリ内のブロックにおける移動セクタ
JP2002366423A (ja) * 2001-06-04 2002-12-20 Samsung Electronics Co Ltd フラッシュメモリの管理方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7617352B2 (en) * 2000-12-27 2009-11-10 Tdk Corporation Memory controller, flash memory system having memory controller and method for controlling flash memory device
US7039788B1 (en) * 2002-10-28 2006-05-02 Sandisk Corporation Method and apparatus for splitting a logical block

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5898868A (en) 1992-01-29 1999-04-27 Microsoft Corporation Method and system for file system management using a flash-erasable, programmable, read-only memory
JPH11512544A (ja) * 1995-09-13 1999-10-26 レクサー・マイクロシステムズ・インコーポレーテッド 半導体不揮発性大容量記憶メモリ内の自動摩耗レベリングによるシステム・データ制御の方法およびアーキテクチャ
JP2002508862A (ja) * 1997-03-31 2002-03-19 レクサー メディア,インコーポレイテッド フラッシュメモリ内のブロックにおける移動セクタ
JP2001521220A (ja) * 1997-10-16 2001-11-06 エム システムズ フラッシュ ディスク パイオニアズ リミテッド 改善されたフラッシュファイルシステム
JP2001154909A (ja) * 1999-11-25 2001-06-08 Casio Comput Co Ltd フラッシュメモリ管理装置及び記録媒体
JP2002366423A (ja) * 2001-06-04 2002-12-20 Samsung Electronics Co Ltd フラッシュメモリの管理方法

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KIM J ET AL.: "A SPACE-EFFICIENT FLASH TRANSLATION LAYER FOR COMPACTFLASH SYSTEMS", IEEE TRANSACTIONS ON CONSUMER ELECTRONICS, IEEE SERVICE CENTER, NEW YORK, NY, US, vol. 48, no. 2, May 2002 (2002-05-01), pages 366 - 375
See also references of EP1659497A4 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1895418A4 (en) * 2005-12-09 2008-08-27 Matsushita Electric Ind Co Ltd NON-VOLATILE MEMORY DEVICE AND METHOD FOR WRITEING AND READING DATA
CN101484882A (zh) * 2005-12-09 2009-07-15 晟碟以色列有限公司 闪存管理方法
US8307149B2 (en) 2005-12-09 2012-11-06 Panasonic Corporation Nonvolatile memory device including a logical-to-physical logig-to-physical address conversion table, a temporary block and a temporary table
US9116791B2 (en) * 2005-12-09 2015-08-25 Sandisk Il Ltd. Method for flash-memory management
JP2007233838A (ja) * 2006-03-02 2007-09-13 Toshiba Corp メモリシステムの制御方法
KR101247574B1 (ko) 2007-12-24 2013-03-26 노키아 코포레이션 메모리 기기 상의 데이터 저장 방법, 기기 및 데이터 구조

Also Published As

Publication number Publication date
CN100511181C (zh) 2009-07-08
TWI354893B (ja) 2011-12-21
CN1846199A (zh) 2006-10-11
JPWO2005022393A1 (ja) 2006-10-26
EP1659497A4 (en) 2008-01-23
US20070276986A1 (en) 2007-11-29
TW200511012A (en) 2005-03-16
US7987314B2 (en) 2011-07-26
JP4667243B2 (ja) 2011-04-06
EP1659497A1 (en) 2006-05-24

Similar Documents

Publication Publication Date Title
USRE45222E1 (en) Method of writing of writing to a flash memory including data blocks and log blocks, using a logical address having a block address portion and page identifying portion, a block address table and a page table
CN100485641C (zh) 编程和读取更新数据的非易失性存储器系统和方法
US8112573B2 (en) Non-volatile memory with erase block state indication in a subset of sectors of erase block
US6865658B2 (en) Nonvolatile data management system using data segments and link information
JP3692313B2 (ja) 不揮発性メモリの制御方法
US8291155B2 (en) Data access method, memory controller and memory storage system
JP5130646B2 (ja) 記憶装置
US20080120488A1 (en) Apparatus and method of managing nonvolatile memory
US20100142275A1 (en) Continuous address space in non-volatile-memories (nvm) using efficient management methods for array deficiencies
US6839798B1 (en) Flash memory capable of storing frequently rewritten data
WO2007058617A1 (en) A controller for non-volatile memories, and methods of operating the memory controller
JP2002508862A (ja) フラッシュメモリ内のブロックにおける移動セクタ
WO2005022393A1 (ja) 不揮発性記憶装置及びその書込み方法
JP4661497B2 (ja) メモリコントローラ、フラッシュメモリシステム及びフラッシュメモリの制御方法
JP4366420B2 (ja) メモリコントローラ、メモリコントローラを備えるフラッシュメモリシステム、並びにフラッシュメモリの制御方法
JP4254930B2 (ja) メモリコントローラ、フラッシュメモリシステム及びフラッシュメモリの制御方法
JP4235595B2 (ja) メモリコントローラ、メモリコントローラを備えるフラッシュメモリシステム及びフラッシュメモリの制御方法
JP4539621B2 (ja) メモリコントローラ、フラッシュメモリシステム及びフラッシュメモリの制御方法
JP4569554B2 (ja) メモリコントローラ及びメモリコントローラを備えるフラッシュメモリシステム、並びにフラッシュメモリの制御方法
CN117555478A (zh) 一种基于闪存的模拟eeprom读写方法
JP2006099594A (ja) メモリコントローラ、フラッシュメモリシステム及びフラッシュメモリの制御方法
KR20090107309A (ko) 플래시 메모리 데이터 기록방법 및 플래시 메모리

Legal Events

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

Ref document number: 200480024833.6

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 KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL 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): 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 IT 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

DPEN Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed from 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2005513535

Country of ref document: JP

REEP Request for entry into the european phase

Ref document number: 2004772668

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2004772668

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 2004772668

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 10569880

Country of ref document: US

WWP Wipo information: published in national office

Ref document number: 10569880

Country of ref document: US