TWI453747B

Method for managing a plurality of blocks of a flash memory, and associated memory device and controller thereof

Abstract

The present invention provides a method for managing a plurality of blocks of a flash memory. The method includes: dynamically determining a link type for a logical block address according to at least one determination criterion, wherein the chain The link type is selected from a plurality of predetermined link types; and the link type and link information corresponding to the link type are recorded/updated for the logical block address. The present invention also provides a related memory device and a controller thereof, and the controller includes: a read-only memory for storing a program code; and a microprocessor for executing the program code to control the flash Access to memory and manage the plurality of blocks.

TWI453747B, drawing sheet 1
Sheet 1 of 7

Term

No projected expiry on record.

  1. Priority and filed
  2. Granted
  3. Today

21 claims: 21 independent, 0 dependent

  1. 1
    A method for managing a plurality of blocks of a flash memory (Flash Memory), wherein each block includes a plurality of pages, and the method includes:dynamically determining the target according to at least one criterion (Criterion) A link type of a logical block address, wherein the link type is selected from a plurality of predetermined link types;and the link type and corresponding to the link type are recorded/updated for the logical block address When the criterion indicates that the link between the logical page and the physical page is necessary, the link type involves the link between the logical page and the physical page;otherwise, the link type is only It involves the link between the logical block and the physical block, but does not involve the link between the logical page and the physical page. 一種用來管理一快閃記憶體(Flash Memory)的複數個區塊之方法,其中每一個區塊包含複數個頁,且該方法包含有:依據至少一判定標準(Criterion)來動態地決定針對一邏輯區塊位址之一鏈結種類,其中該鏈結種類係選自於複數個預定鏈結種類;以及針對該邏輯區塊位址記錄/更新該鏈結種類以及對應於該鏈結種類之鏈結資訊;其中當該判定標準指出邏輯頁與實體頁之間的鏈結係有必要時,則該鏈結種類涉及邏輯頁與實體頁之間的鏈結;否則,該鏈結種類僅涉及邏輯區塊與實體區塊之間的鏈結,而不會涉及邏輯頁與實體頁之間的鏈結。
  2. 2
    The method described in item 1 of the scope of patent application, wherein the plurality of predetermined link types include a first link type;and when the link type is the first link type, the link information includes a Physical block address. 如申請專利範圍第1項所述之方法,其中該複數個預定鏈結種類包含一第一鏈結種類;以及當該鏈結種類係為該第一鏈結種類時,該鏈結資訊包含一實體區塊位址。
  3. 3
    The method described in item 1 of the scope of patent application, wherein the plurality of predetermined link types include a second link type;and when the link type is the second link type, the link information includes a The physical block address and the current physical page location information, and the current physical page location information is used to indicate the location of the physical page newly written to the logical block address. 如申請專利範圍第1項所述之方法,其中該複數個預定鏈結種類包含一第二鏈結種類;以及當該鏈結種類係為該第二鏈結種類時,該鏈結資訊包含一實體區塊位址與目前實體頁位置資訊,而該目前實體頁位置資訊係用來指出針對該邏輯區塊位址最新寫入之實體頁的位置。
  4. 4
    The method described in item 1 of the scope of patent application, wherein the plurality of predetermined link types include a third link type;and when the link type is the third link type, the link information includes a page Link information. 如申請專利範圍第1項所述之方法,其中該複數個預定鏈結種類包含一第三鏈結種類;以及當該鏈結種類係為該第三鏈結種類時,該鏈結資訊包含頁鏈結資訊。
  5. 5
    The method described in item 4 of the scope of patent application, wherein the page link information includes a logical entity page link table; and the link type and the link type corresponding to the logical block address are recorded/updated The step of linking information further includes:recording/updating a physical block address for the logical block address;and in the logical physical page link table, for a logical page that belongs to the logical block address Address record/update the corresponding physical page address. 如申請專利範圍第4項所述之方法,其中該頁鏈結資訊包含一邏輯實體頁鏈結表;以及針對該邏輯區塊位址記錄/更新該鏈結種類以及對應於該鏈結種類之鏈結資訊之步驟另包含有:針對該邏輯區塊位址記錄/更新一實體區塊位址;以及於該邏輯實體頁鏈結表中,針對屬於該邏輯區塊位址之一邏輯頁位址記錄/更新相對應之一實體頁位址。
  6. 6
    The method described in item 4 of the scope of patent application, wherein the page link information includes a logical entity page link table; and the link type and the link type corresponding to the logical block address are recorded/updated The step of linking information further includes:in the logical physical page link table, record/update a corresponding physical block address and a physical page address for a logical page address belonging to the logical block address site. 如申請專利範圍第4項所述之方法,其中該頁鏈結資訊包含一邏輯實體頁鏈結表;以及針對該邏輯區塊位址記錄/更新該鏈結種類以及對應於該鏈結種類之鏈結資訊之步驟另包含有:於該邏輯實體頁鏈結表中,針對屬於該邏輯區塊位址之一邏輯頁位址記錄/更新相對應之一實體區塊位址與一實體頁位址。
  7. 7
    For example, the method described in item 1 of the scope of patent application further includes:accessing data for the logical block address according to the link type and the link information corresponding to the link type. 如申請專利範圍第1項所述之方法,其另包含有:依據該鏈結種類以及對應於該鏈結種類之鏈結資訊,針對該邏輯區塊位址存取(Access)資料。
  8. 8
    A memory device, which includes:A flash memory (Flash Memory), the flash memory includes a plurality of blocks, where each block includes a plurality of pages;and a controller for accessing and managing the flash memory The plurality of blocks, wherein the controller dynamically determines a link type for a logical block address according to at least one criterion (Criterion), and the link type is selected from a plurality of predetermined link types ;The controller records/updates the link type and the link information corresponding to the link type for the logical block address;when the criterion indicates that the link between the logical page and the physical page is necessary , Under the control of the controller, the link type involves the link between the logical page and the physical page;otherwise, the link type only involves the link between the logical block and the physical block, not the link between the logical block and the physical block. Involve the link between the logical page and the physical page. 一種記憶裝置,其包含有: 一快閃記憶體(Flash Memory),該快閃記憶體包含複數個區塊,其中每一個區塊包含複數個頁;以及一控制器,用來存取(Access)該快閃記憶體以及管理該複數個區塊,其中該控制器依據至少一判定標準(Criterion)來動態地決定針對一邏輯區塊位址之一鏈結種類,而該鏈結種類係選自於複數個預定鏈結種類;其中該控制器針對該邏輯區塊位址記錄/更新該鏈結種類以及對應於該鏈結種類之鏈結資訊;當該判定標準指出邏輯頁與實體頁之間的鏈結係有必要時,則在該控制器之控制下,該鏈結種類涉及邏輯頁與實體頁之間的鏈結;否則,該鏈結種類僅涉及邏輯區塊與實體區塊之間的鏈結,而不會涉及邏輯頁與實體頁之間的鏈結。
  9. 9
    For the memory device described in item 8 of the scope of patent application, wherein the plurality of predetermined link types include a first link type;and when the link type is the first link type, the link information includes A physical block address. 如申請專利範圍第8項所述之記憶裝置,其中該複數個預定鏈結種類包含一第一鏈結種類;以及當該鏈結種類係為該第一鏈結種類時,該鏈結資訊包含一實體區塊位址。
  10. 10
    For the memory device described in item 8 of the scope of patent application, wherein the plurality of predetermined link types include a second link type;and when the link type is the second link type, the link information includes A physical block address and current physical page location information, and the current physical page location information is used to indicate the location of the physical page newly written to the logical block address. 如申請專利範圍第8項所述之記憶裝置,其中該複數個預定鏈結種類包含一第二鏈結種類;以及當該鏈結種類係為該第二鏈結種類時,該鏈結資訊包含一實體區塊位址與目前實體頁位置資訊,而該目前實體頁位置資訊係用來指出針對該邏輯區塊位址最新寫入之實體頁的位置。
  11. 11
    For the memory device described in item 8 of the scope of patent application, wherein the plurality of predetermined link types include a third link type;and when the link type is the third link type, the link information includes Page link information. 如申請專利範圍第8項所述之記憶裝置,其中該複數個預定鏈結種類包含一第三鏈結種類;以及當該鏈結種類係為該第三鏈結種類時,該鏈結資訊包含頁鏈結資訊。
  12. 12
    For the memory device described in claim 11, the page link information includes a logical physical page link table;the controller records/updates a physical block address for the logical block address;and In the logical physical page link table, the controller records/updates a corresponding physical page address for a logical page address belonging to the logical block address. 如申請專利範圍第11項所述之記憶裝置,其中該頁鏈結資訊包含一邏輯實體頁鏈結表;該控制器針對該邏輯區塊位址記錄/更新一實體區塊位址;以及於該邏輯實體頁鏈結表中,該控制器針對屬於該邏輯區塊位址之一邏輯頁位址記錄/更新相對應之一實體頁位址。
  13. 13
    For example, the memory device described in item 11 of the scope of patent application, wherein the page link information includes a logical physical page link table;and in the logical physical page link table, the controller refers to the logical block address A logical page address record/update corresponds to a physical block address and a physical page address. 如申請專利範圍第11項所述之記憶裝置,其中該頁鏈結資訊包含一邏輯實體頁鏈結表;以及於該邏輯實體頁鏈結表中,該控制器針對屬於該邏輯區塊位址之一邏輯頁位址記錄/更新相對應之一實體區塊位址與一實體頁位址。
  14. 14
    For the memory device described in item 8 of the scope of patent application, the controller accesses data for the logical block address according to the link type and the link information corresponding to the link type. 如申請專利範圍第8項所述之記憶裝置,其中該控制器依據該鏈結種類以及對應於該鏈結種類之鏈結資訊,針對該邏輯區塊位址存取資料。
  15. 15
    A controller of a memory device, the controller is used to access a flash memory (Flash Memory), the flash memory includes a plurality of blocks, each block includes a plurality of pages, and the The controller includes:a Read Only Memory (ROM) for storing a program code;and A microprocessor is used to execute the program code to control access to the flash memory and manage the plurality of blocks;wherein the controller that executes the program code through the microprocessor is based on at least one determination criterion ( Criterion) to dynamically determine a link type for a logical block address, and the link type is selected from a plurality of predetermined link types;and the controller that executes the code through the microprocessor is directed to The logical block address records/updates the link type and the link information corresponding to the link type;among them, when the criterion indicates that the link between the logical page and the physical page is necessary, then the control Under the control of the device, the link type involves the link between the logical page and the physical page;otherwise, the link type involves the link between the logical block and the physical block, but does not involve the logical page and the physical page. The link between. 一種記憶裝置之控制器,該控制器係用來存取(Access)一快閃記憶體(Flash Memory),該快閃記憶體包含複數個區塊,每一個區塊包含複數個頁,且該控制器包含有:一唯讀記憶體(Read Only Memory,ROM),用來儲存一程式碼;以及 一微處理器,用來執行該程式碼以控制對該快閃記憶體之存取以及管理該複數個區塊;其中透過該微處理器執行該程式碼之該控制器依據至少一判定標準(Criterion)來動態地決定針對一邏輯區塊位址之一鏈結種類,而該鏈結種類係選自於複數個預定鏈結種類;以及透過該微處理器執行該程式碼之該控制器針對該邏輯區塊位址記錄/更新該鏈結種類以及對應於該鏈結種類之鏈結資訊;其中當該判定標準指出邏輯頁與實體頁之間的鏈結係有必要時,則在該控制器之控制下,該鏈結種類涉及邏輯頁與實體頁之間的鏈結;否則,該鏈結種類涉及邏輯區塊與實體區塊之間的鏈結,而不會涉及邏輯頁與實體頁之間的鏈結。
  16. 16
    The controller described in item 15 of the scope of patent application, wherein the plurality of predetermined link types include a first link type;and when the link type is the first link type, the link information includes A physical block address. 如申請專利範圍第15項所述之控制器,其中該複數個預定鏈結種類包含一第一鏈結種類;以及當該鏈結種類係為該第一鏈結種類時,該鏈結資訊包含一實體區塊位址。
  17. 17
    The controller described in item 15 of the scope of patent application, wherein the plurality of predetermined link types include a second link type;and when the link type is the second link type, the link information includes A physical block address and current physical page location information, and the current physical page location information is used to indicate the location of the physical page newly written to the logical block address. 如申請專利範圍第15項所述之控制器,其中該複數個預定鏈結種類包含一第二鏈結種類;以及當該鏈結種類係為該第二鏈結種類時,該鏈結資訊包含一實體區塊位址與目前實體頁位置資訊,而該目前實體頁位置資訊係用來指出針對該邏輯區塊位址最新寫入之實體頁的位置。
  18. 18
    Such as the controller described in item 15 of the scope of patent application, wherein the plurality of predetermined chains The link type includes a third link type;and when the link type is the third link type, the link information includes page link information. 如申請專利範圍第15項所述之控制器,其中該複數個預定鏈 結種類包含一第三鏈結種類;以及當該鏈結種類係為該第三鏈結種類時,該鏈結資訊包含頁鏈結資訊。
  19. 19
    Such as the controller described in item 18 of the scope of patent application, wherein the page link information includes a logical physical page link table;the controller that executes the code through the microprocessor records the address of the logical block/ Update a physical block address;and in the logical physical page link table, the controller that executes the code through the microprocessor records/updates the phase of a logical page address belonging to the logical block address Corresponds to a physical page address. 如申請專利範圍第18項所述之控制器,其中該頁鏈結資訊包含一邏輯實體頁鏈結表;透過該微處理器執行該程式碼之該控制器針對該邏輯區塊位址記錄/更新一實體區塊位址;以及於該邏輯實體頁鏈結表中,透過該微處理器執行該程式碼之該控制器針對屬於該邏輯區塊位址之一邏輯頁位址記錄/更新相對應之一實體頁位址。
  20. 20
    For example, the controller described in item 18 of the scope of patent application, wherein the page link information includes a logical physical page link table;and in the logical physical page link table, the microprocessor executes the code The controller records/updates a physical block address and a physical page address corresponding to a logical page address belonging to the logical block address. 如申請專利範圍第18項所述之控制器,其中該頁鏈結資訊包含一邏輯實體頁鏈結表;以及於該邏輯實體頁鏈結表中,透過該微處理器執行該程式碼之該控制器針對屬於該邏輯區塊位址之一邏輯頁位址記錄/更新相對應之一實體區塊位址與一實體頁位址。
  21. 21
    For example, the controller described in item 15 of the scope of patent application, in which the controller that executes the program code through the microprocessor, according to the link type and the link information corresponding to the link type, is directed to the logical block position Address to access data. 如申請專利範圍第15項所述之控制器,其中透過該微處理器執行該程式碼之該控制器依據該鏈結種類以及對應於該鏈結種類之鏈結資訊,針對該邏輯區塊位址存取資料。
Independent claims21