TWI719880B - Apparatus and method for programming data of page groups into flash units - Google Patents
Apparatus and method for programming data of page groups into flash units Download PDFInfo
- Publication number
- TWI719880B TWI719880B TW109111754A TW109111754A TWI719880B TW I719880 B TWI719880 B TW I719880B TW 109111754 A TW109111754 A TW 109111754A TW 109111754 A TW109111754 A TW 109111754A TW I719880 B TWI719880 B TW I719880B
- Authority
- TW
- Taiwan
- Prior art keywords
- page group
- controller
- flash memory
- user data
- interface
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1076—Parity data used in redundant arrays of independent storages, e.g. in RAID systems
- G06F11/108—Parity data distribution in semiconductor storages, e.g. in SSD
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
- G06F12/0246—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1668—Details of memory controller
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
- G06F13/28—Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
Description
本發明涉及儲存裝置,尤指一種寫入頁面群組的資料到閃存模組的裝置及方法。 The invention relates to a storage device, in particular to a device and method for writing data of a page group to a flash memory module.
閃存通常分為NOR閃存與NAND閃存。NOR閃存為隨機存取裝置,中央處理器(Host)可於位址腳位上提供任何存取NOR閃存的位址,並及時地從NOR閃存的資料腳位上獲得儲存於該位址上的資料。相反地,NAND閃存並非隨機存取,而是序列存取。NAND閃存無法像NOR閃存一樣,可以存取任何隨機位址,中央處理器反而需要寫入序列的位元組(Bytes)的值到NAND閃存中,用於定義請求命令(Command)的類型(如,讀取、寫入、抹除等),以及用在此命令上的位址。位址可指向一個頁面(閃存中寫入作業的最小資料塊)或一個區塊(閃存中抹除作業的最小資料塊)。 Flash memory is generally divided into NOR flash memory and NAND flash memory. NOR flash memory is a random access device. The central processing unit (Host) can provide any address to access the NOR flash memory on the address pin, and obtain the data stored at that address from the data pin of the NOR flash memory in time data. On the contrary, NAND flash memory is not random access, but serial access. NAND flash memory cannot access any random address like NOR flash memory. Instead, the central processing unit needs to write the value of the sequence of bytes (Bytes) into the NAND flash memory to define the type of request command (Command) (such as , Read, write, erase, etc.), and the address used in this command. The address can point to a page (the smallest data block for a write operation in the flash memory) or a block (the smallest data block for an erase operation in the flash memory).
閃存控制器通常使用糾錯碼(Error Correcting Code,ECC)來修復使用者資料於通過通道或儲存時發生的錯誤。在資料寫入時,閃存控制器編碼使用者資料來產生糾錯碼的冗餘資訊。這些冗餘資訊讓閃存控制器在資料讀取時,可以修正發生在使用者資料中任意位置的有限數目的錯誤位元,而不需要重讀。為了防止讀取頁面的使用者資料含有超過糾錯碼所能夠修正回來的錯誤位元而發生的重大錯誤,閃存控制器可讓預設數目的頁面形成一個頁面群組(Page Group),並且依據頁面群組的使用者資料產生頁面群組的奇偶校驗碼。然而,由於頁面群組的奇偶校驗碼的計算是一種跨頁面的資 料計算操作,需要耗費大量的時間和運算資源。因此,本發明提出一種寫入頁面群組的資料到閃存模組的裝置及方法,用於減少產生頁面群組的奇偶校驗碼時所需的時間和運算資源。 Flash memory controllers usually use Error Correcting Code (ECC) to repair errors that occur when user data passes through the channel or is stored. When data is written, the flash memory controller encodes user data to generate redundant information of error correction codes. This redundant information allows the flash memory controller to correct a limited number of error bits that occur anywhere in the user data when reading data, without the need for rereading. In order to prevent the user data from reading the page from containing more than the error correction code can correct the error bits and the major error occurs, the flash memory controller can make a preset number of pages form a page group, and according to The user data of the page group generates the parity check code of the page group. However, because the calculation of the parity check code of the page group is a cross-page resource Material calculation operations require a lot of time and computing resources. Therefore, the present invention provides an apparatus and method for writing data of a page group to a flash memory module, which is used to reduce the time and computing resources required for generating the parity check code of the page group.
有鑑於此,如何減輕或消除上述相關領域的缺失,實為有待解決的問題。 In view of this, how to reduce or eliminate the deficiencies in the above-mentioned related fields is indeed a problem to be solved.
本說明書涉及一種寫入頁面群組的資料到閃存模組的方法,由閃存控制器執行,包含:主機介面控制器從主機端取得頁面群組的使用者資料,其中,頁面群組包含多個頁面;主機介面控制器通過匯流排架構儲存頁面的使用者資料到隨機存取記憶體,同時通過介面輸出頁面的使用者資料至引擎,使得引擎依據頁面的使用者資料計算頁面群組的奇偶校驗碼;直接記憶體存取控制器從引擎獲取頁面群組的奇偶校驗碼,並且通過匯流排架構儲存頁面群組的奇偶校驗碼到隨機存取記憶體;以及閃存介面控制器通過匯流排架構從隨機存取記憶體獲取頁面的使用者資料和頁面群組的奇偶校驗碼,並且寫入頁面的使用者資料和頁面群組的奇偶校驗碼至閃存模組。 This specification relates to a method for writing data of a page group to a flash memory module, which is executed by the flash memory controller, and includes: the host interface controller obtains user data of the page group from the host, wherein the page group includes multiple Page; the host interface controller stores the user data of the page to the random access memory through the bus architecture, and outputs the user data of the page to the engine through the interface, so that the engine calculates the parity of the page group based on the user data of the page Code verification; the direct memory access controller obtains the parity check code of the page group from the engine, and stores the parity check code of the page group to the random access memory through the bus architecture; and the flash memory interface controller uses the bus The row structure obtains the user data of the page and the parity check code of the page group from the random access memory, and writes the user data of the page and the parity check code of the page group to the flash memory module.
本說明書更另涉及一種寫入頁面群組的資料到閃存模組的裝置,包含:匯流排架構;引擎;和主機介面控制器。主機介面控制器包含第一介面,耦接匯流排架構;第二介面,耦接主機端;第三介面,耦接引擎;以及控制器。控制器驅動第二介面從主機端取得頁面群組的使用者資料,頁面群組包含多個頁面;驅動第一介面以通過匯流排架構儲存頁面的使用者資料到隨機存取記憶體,同時驅動第三介面輸出頁面的使用者資料至引擎,使得引擎依據頁面的使用者資料計算頁面群組的奇偶校驗碼。 This specification also relates to a device for writing data of a page group to a flash memory module, which includes: a bus architecture; an engine; and a host interface controller. The host interface controller includes a first interface coupled to the bus structure; a second interface coupled to the host terminal; a third interface coupled to the engine; and a controller. The controller drives the second interface to obtain the user data of the page group from the host. The page group contains multiple pages; drives the first interface to store the user data of the page to the random access memory through the bus architecture, and drives at the same time The third interface outputs the user data of the page to the engine, so that the engine calculates the parity check code of the page group based on the user data of the page.
上述實施例的優點之一,通過如上所述的使用主機介面控制器直接輸出頁面的使用者資料到引擎以進行奇偶校驗碼的計算,可節省引擎通過匯流排架構從隨機存取記憶體讀取頁面的使用者資料的時間。 One of the advantages of the above embodiment is that by using the host interface controller to directly output the user data of the page to the engine to calculate the parity code, it can save the engine from reading from the random access memory through the bus architecture. The time when the user data of the page was fetched.
本發明的其他優點將搭配以下的說明和圖式進行更詳細的解說。 Other advantages of the present invention will be explained in more detail with the following description and drawings.
10:電子裝置 10: Electronic device
110:主機端 110: host side
130:閃存控制器 130: flash memory controller
131:主機介面控制器 131: Host Interface Controller
132:匯流排架構 132: bus architecture
134:處理單元 134: Processing Unit
135:直接記憶體存取控制器 135: Direct Memory Access Controller
136:隨機存取記憶體 136: Random Access Memory
137:獨立磁碟冗餘陣列糾錯碼引擎 137: Redundant Array of Independent Disks Error Correction Code Engine
139:閃存介面控制器 139: flash memory interface controller
150:閃存模組 150: Flash memory module
530:閃存控制器 530: flash memory controller
531:主機介面控制器 531: Host Interface Controller
535:直接記憶體存取控制器 535: Direct Memory Access Controller
537:獨立磁碟冗餘陣列糾錯碼引擎 537: Redundant Array of Independent Disks Error Correction Code Engine
610,650,673,677:介面 610,650,673,677: interface
圖1顯示頁面、奇偶校驗碼頁面及其糾錯碼的邏輯資料組織示意圖。 Figure 1 shows the logical data organization diagram of the page, the parity check code page and its error correction code.
圖2為一些實施方式的電子裝置的系統架構圖。 FIG. 2 is a system architecture diagram of an electronic device according to some embodiments.
圖3為基於圖2的系統架構下的頁面群組的使用者資料及其奇偶校驗碼的產生及寫入的示意圖。 FIG. 3 is a schematic diagram of the generation and writing of user data and parity check codes of the page group based on the system architecture of FIG. 2.
圖4為基於圖3所示的執行步驟的操作順序圖。 Fig. 4 is an operation sequence diagram based on the execution steps shown in Fig. 3.
圖5為依據本發明實施例的電子裝置的系統架構圖。 FIG. 5 is a system architecture diagram of an electronic device according to an embodiment of the invention.
圖6為依據本發明實施例的閃存控制器中元件的介面連接示意圖。 FIG. 6 is a schematic diagram of interface connections of components in a flash memory controller according to an embodiment of the present invention.
圖7為依據本發明實施例的從主機介面控制器傳輸多個頁面的使用者資料到獨立磁碟冗餘陣列糾錯碼引擎的時序圖。 FIG. 7 is a timing diagram of transmitting multiple pages of user data from a host interface controller to a redundant array of independent disks error correction code engine according to an embodiment of the present invention.
圖8為依據本發明實施例的從獨立磁碟冗餘陣列糾錯碼引擎傳輸頁面群組的奇偶校驗碼到直接記憶體控制器的時序圖。 FIG. 8 is a timing diagram of transmitting the parity check code of the page group from the redundant array of independent disks error correction code engine to the direct memory controller according to an embodiment of the present invention.
圖9為基於圖5的系統架構下的頁面群組的使用者資料及其奇偶校驗碼的產生及寫入的示意圖。 FIG. 9 is a schematic diagram of the generation and writing of user data and parity check codes of the page group based on the system architecture of FIG. 5.
以下說明為完成發明的較佳實現方式,其目的在於描述本發明的基本精神,但並不用以限定本發明。實際的發明內容必須參考之後的權利要求範圍。 The following descriptions are preferred implementations for completing the invention, and their purpose is to describe the basic spirit of the invention, but not to limit the invention. The actual content of the invention must refer to the scope of the claims that follow.
必須了解的是,使用於本說明書中的“包含”、“包括”等詞,用以表示存在特定的技術特徵、數值、方法步驟、作業處理、元件以及/或組件,但並不排除可加上更多的技術特徵、數值、方法步驟、作業處理、元件、組件,或以上的任意組合。 It must be understood that the words "including" and "including" used in this specification are used to indicate the existence of specific technical features, values, method steps, operations, elements, and/or components, but they do not exclude the possibility of adding More technical features, values, method steps, job processing, components, components, or any combination of the above.
於權利要求中使用如“第一”、“第二”、“第三”等詞是用來修飾權利要求中的元件,並非用來表示之間具有優先順序,前置關係,或者是一個元件先於另一個元件,或者是執行方法步驟時的時間先後順序,僅用來區別具有相同名字的元件。 Words such as "first", "second", and "third" in the claims are used to modify the elements in the claims, not to indicate that there is a priority, prerequisite relationship, or an element Prior to another element, or the chronological order of execution of method steps, is only used to distinguish elements with the same name.
必須了解的是,當元件描述為“連接”或“耦接”至另一元件時,可以是直接連結、或耦接至其他元件,可能出現中間元件。相反地,當元件描述為“直接連接”或“直接耦接”至另一元件時,其中不存在任何中間元件。使用來描述元件之間關係的其他語詞也可類似方式解讀,例如“介於”相對於“直接介於”,或者是“鄰接”相對於“直接鄰接”等等。 It must be understood that when an element is described as being “connected” or “coupled” to another element, it can be directly connected or coupled to other elements, and intervening elements may appear. Conversely, when an element is described as being "directly connected" or "directly coupled" to another element, there are no intervening elements. Other terms used to describe the relationship between elements can also be interpreted in a similar manner, such as "between" versus "directly between", or "adjacent" versus "directly adjacent" and so on.
為了達到資料的容錯性,閃存控制器可依據每頁的使用者資料產生糾錯碼(Error Correcting Code,ECC),並將使用者資料連同糾錯碼一起寫入閃存模組,使得將來能夠修正從閃存模組讀出的含有錯誤位元的使用者資料。糾錯碼可以是低密度奇偶較驗碼(Low-Density Parity Check Code,LDPC)、BCH碼(Bose-Chaudhuri-Hocquenghem Code)或其他種類的編碼。以每1K位元組的使用者資料為例,BCH碼可提供最多72個錯誤位元的修正能力,而LDPC可提供最多128個錯誤位元的修正能力。然而,讀取頁面的使用者資料可能含有超過糾錯碼所能夠修正回來的錯誤位元。因此,閃存控制器可讓預設數目的頁面形成一個頁面群組(Page Group),並且依據頁面群組的使用者資料產生奇偶校驗碼頁面(Parity Page)。參考圖1所示範例的資料組織,七個頁面P#0至P#6形成一個頁面群組,每個頁面包含4096位元的使用者資料,並據以產生相應的ECC。例如,第0頁面P#0的糾錯碼為ECC#0,第1頁面P#1的糾錯碼為ECC#1,依此類推。在這裡需注意的是,圖1所示的範例是一種邏輯觀點,並不代表一個頁面群組的使用者資料及其糾錯碼、奇偶校驗碼頁面及其糾錯碼實際儲存於同一個實體塊中。為了最佳化系統效能,一個頁面群組的使用者資料頁面及其糾錯碼、奇偶校驗碼頁面及其糾錯碼可能以並行的方式儲存在不同通道中多個邏輯單元號(Logical Number Unit,LUN)的實體塊,本發明並不因此受限。奇偶校驗碼頁面的資料可使用公式(1)產生:
Pj=dp0,j⊕dp1,j⊕dp2,j⊕dp3,j⊕dp4,j⊕dp5,j⊕dp6,j,其中,j為從0到4095的任意整數,p0代表第0頁面,p1代表第1頁面,p2代表第2頁面,Pj代表奇偶校驗碼頁面中第j個位元的值,dp0,j代表第0頁面中第j個位元的值,dp1,j代表第1頁面中第j個位元的值,dp2,j代表第2頁面中第j個位元的值。當運用一個頁面的相應糾錯碼還無法修正其中的錯誤位元時,閃存控制器可捨棄此頁面,並依據頁面群組中的其他頁面和奇偶校驗碼頁面的內容使用互斥或運算來產生修復後的此頁面的使用者資料。假設第1頁面中的錯誤位元無法使用相應糾錯碼修正時,可使用公式(2)進行錯誤頁面的回復:dp1,j=dp0,j⊕dp2,j⊕dp3,j⊕dp4,j⊕dp5,j⊕dp6,j⊕Pj。頁面群組的奇偶校驗碼根據其作用又可稱為獨立磁碟冗餘陣列糾錯碼(Redundant Array of Independent Disks,RAID ECC)。
In order to achieve data fault tolerance, the flash memory controller can generate an Error Correcting Code (ECC) based on the user data of each page, and write the user data together with the error correction code into the flash memory module so that it can be corrected in the future User data with error bits read from the flash memory module. The error correction code can be a Low-Density Parity Check Code (LDPC), BCH code (Bose-Chaudhuri-Hocquenghem Code) or other types of codes. Taking user data per 1K byte as an example, the BCH code can provide correction capability of up to 72 error bits, while LDPC can provide correction capability of up to 128 error bits. However, the user data of the read page may contain more error bits than the error correction code can correct. Therefore, the flash memory controller allows a preset number of pages to form a page group, and generates a parity page according to the user data of the page group. Referring to the example data organization shown in FIG. 1, seven
為了完成以上所述的二維防護,圖2顯示一些實施方式的系統架構。電子裝置10包含主機端(Host Side)110、閃存控制器130及閃存模組150,並且閃存控制器130及閃存模組150可合稱為裝置端(Device Side)。電子裝置10可實施於個人電腦、筆記型電腦(Laptop PC)、平板電腦、手機、數位相機、數位攝影機等電子產品之中。主機端110與閃存控制器130的主機介面控制器(Host Interface Controller)131可以通用序列匯流排(Universal Serial Bus,USB)、先進技術附著(advanced technology attachment,ATA)、序列先進技術附著(serial advanced technology attachment,SATA)、快速周邊元件互聯(peripheral component interconnect express,PCI-E)、通用快閃記憶儲存(Universal Flash Storage,UFS)、快速非揮發記憶體(Non-Volatile Memory Express,NVMe)、嵌入式多媒體卡(Embedded Multi-Media Card,eMMC)等通訊協定彼此溝通。閃存控制器130的閃存介面控制器(Flash Interface Controller)139與閃存模組150可以雙倍資料率(Double Data Rate,DDR)通訊協定彼
此溝通,例如,開放NAND快閃(Open NAND Flash Interface,ONFI)、雙倍資料率開關(DDR Toggle)或其他通訊協定。閃存控制器130包含處理單元134,可使用多種方式實施,如使用通用硬體(例如,單一處理器、具平行處理能力的多處理器、圖形處理器或其他具運算能力的處理器),並且在執行軟體以及/或韌體指令時,提供之後描述的功能。處理單元134通過主機介面控制器131接收主機命令,例如讀取命令(Read Command)、寫入命令(Write Command)、抹除命令(Erase Command)等,排程並執行這些命令。閃存控制器130另包含隨機存取記憶體(Random Access Memory,RAM)136,可實施為動態隨機存取記憶體(Dynamic Random Access Memory,DRAM)、靜態隨機存取記憶體(Static Random Access Memory,SRAM)或上述兩者的結合,用於配置空間作為資料緩衝區,儲存從主機端110讀取並即將寫入閃存模組150的使用者資料(也可稱為主機資料)、奇偶校驗碼等,儲存從閃存模組150讀取並即將輸出給主機端110的使用者資料,以及儲存從閃存模組150讀取的用來進行資料修復的ECC、奇偶校驗碼等。隨機存取記憶體136另可儲存執行過程中需要的資料,例如,變數、資料表、主機-閃存對照表(Host-to-Flash,H2F Table)、閃存-主機對照表(Flash-to-Host,F2H Table)等。閃存介面控制器139包含NAND閃存控制器(NAND Flash Controller,NFC),提供存取閃存模組150時需要的功能,例如命令序列器(Command Sequencer)、ECC編碼器、ECC解碼器等。ECC編碼器用於依據一個使用者資料頁面或者RAID ECC頁面的內容產生相應的ECC。
In order to complete the two-dimensional protection described above, FIG. 2 shows the system architecture of some embodiments. The
閃存控制器130中可配置匯流排架構(Bus Architecture) 132,用於讓元件之間彼此耦接以傳遞資料、位址、控制訊號等,這些元件包含主機介面控制器131、處理單元134、RAM 136、直接記憶體存取(Direct Memory Access,DMA)控制器135、閃存介面控制器139
等。於一些實施例中,主機介面控制器131、處理單元134、RAM 136、DMA控制器135與閃存介面控制器139可通過單一匯流排彼此耦接。於另一些實施例中,閃存控制器130中可配置高速匯流排,用於讓處理單元134、DMA控制器135與RAM 136彼此耦接,並且配置低速匯流排,用於讓處理單元134、DMA控制器135、主機介面控制器131與閃存介面控制器139彼此耦接。匯流排包含並行的物理線,連接閃存控制器130中兩個以上的組件。匯流排是一種共享的傳輸媒體,在任意的時間上,只能有兩個裝置可以使用這些線來彼此溝通,用於傳遞資料。資料及控制訊號能夠在組件間分別沿資料和控制線進行雙向傳播,但另一方面,位址訊號只能沿位址線進行單向傳播。例如,當處理單元134想要讀取RAM 136的特定位址上的資料時,處理單元134在位址線上傳送此位址給RAM 136。接著,此位址的資料會在資料線上回覆給處理單元134。為了完成資料讀取操作,控制訊號會使用控制線進行傳遞。
The
閃存控制器130可包含RAID ECC引擎137,包含互斥或閘和寄存器,用於完成如上所述公式(1)、公式(2)或類似的運算。DMA控制器135可包含指令佇列(Instruction Queue)。處理單元134可通過匯流排架構132發出資料存取指令給DMA控制器135,DMA控制器135則將這些指令依據到達時間儲存於指令佇列。每個資料存取指令可包含來源元件、來源位址、目的地元件、目的地位址等資訊。DMA控制器135依據資料存取指令,通過匯流排架構132在元件間遷移指定的資料,例如,讀取RAM 136中特定位址及長度的資料並輸入RAID ECC引擎137,將RAID ECC引擎137產生的奇偶校驗碼儲存到RAM 136中的特定位址等。
The
閃存模組150提供大量的儲存空間,通常是數百個千兆位元組(Gigabytes,GB),甚至是數個兆兆位元組(Terabytes,TB),用於儲存大量的使用者資料,例如高解析度圖片、影片等。閃存模
組150中包含控制電路以及記憶體陣列,記憶體陣列中的記憶單元可包含單層式單元(Single Level Cells,SLCs)、多層式單元(Multiple Level Cells,MLCs)、三層式單元(Triple Level Cells,TLCs)、四層式單元(Quad-Level Cells,QLCs)或上述的任意組合。處理單元134通過閃存介面控制器139寫入使用者資料到閃存模組150中的指定位址(目的地位址),以及從閃存模組150中的指定位址(來源位址)讀取使用者資料。閃存介面控制器139使用數個電子訊號來協調閃存控制器130與閃存模組150間的資料與命令傳遞,包含資料線(Data Line)、時脈訊號(clock signal)與控制訊號(control signal)。資料線可用於傳遞命令、位址、讀出及寫入的資料;控制訊號線可用於傳遞晶片致能(Chip Enable,CE)、位址提取致能(Address Latch Enable,ALE)、命令提取致能(Command Latch Enable,CLE)、寫入致能(Write Enable,WE)等控制訊號。
The
然而,如上所示實施方式的架構會讓DMA控制器135必須等待主機介面控制器131將一頁的使用者資料儲存到RAM 136的指定位址後才能夠從RAM 136的指定位址讀取這頁的使用者資料並輸入到RAID ECC引擎137。詳細來說,參考圖3所示的步驟。
However, the architecture of the embodiment shown above requires the
步驟(1):主機介面控制器131從主機端110取得一個頁面的使用者資料,並儲存此頁面的使用者資料到RAM 136中的指定位址。
Step (1): The
步驟(2):DMA控制器135從RAM 136中的指定位址讀取一個頁面的使用者資料,並且輸入RAID ECC引擎137。步驟(1)和(2)會不斷地在閃存控制器130中循環執行,直到一個頁面群組的使用者資料都輸入到RAID ECC引擎137來進行運算。
Step (2): The
步驟(3):DMA控制器135從RAID ECC引擎137取得此頁面群組的奇偶校驗碼,並儲存到RAM 136的指定位址。
Step (3): The
步驟(4):閃存介面控制器139從RAM 136中的指定位址讀取這些
頁面的使用者資料和頁面群組的奇偶校驗碼,並且寫入閃存模組150。
Step (4): The flash
步驟(1)和步驟(2)的執行需要互相等待,拉長了資料寫入的時間。參考圖4,舉例來說,主機介面控制器131寫入第1頁面的使用者資料至RAM 136的操作P#1(W)需要等待DMA控制器135從RAM 136讀取第0頁面的使用者資料的讀取操作P#0(R),DMA控制器135從RAM 136讀取第1頁面的使用者資料的讀取操作P#1(R)需要等待主機介面控制器131寫入第1頁面的使用者資料至RAM 136的操作P#1(W),依此類推。另外,由於主機介面控制器131和DMA控制器135需要競爭匯流排架構132的控制權,步驟(1)和步驟(2)間可能會因為其他元件(例如,處理單元134、閃存介面控制器139等)佔據匯流排架構132的資源而更進一步拉長其前置時間(如圖4中所示的時間區間ts)。
The execution of step (1) and step (2) needs to wait for each other, which lengthens the time for data writing. Referring to FIG. 4, for example, the operation P#1(W) of the
為了解決如上所述實施方式的問題,本發明實施例提出一種新的閃存控制器,修改主機介面控制器131、DMA控制器135和RAID ECC引擎137間的介面設置,用於避免通過DMA控制器135佔據匯流排架構132的資源來從RAM 136讀取頁面群組的使用者資料並輸入到RAID ECC引擎137。參考圖5所示的電子裝置50,主機介面控制器531和RAID ECC引擎537增加互相連接的介面,用於讓主機介面控制器531從主機端110取得一個頁面的使用者資料後,通過匯流排架構132儲存此頁面的使用者資料到RAM 136中的指定位址,並同時通過新設置的介面傳送此頁面的使用者資料到RAID ECC引擎537。主機介面控制器531在傳送一個頁面群組的使用者資料給RAID ECC引擎537後,發出控制訊號給DMA控制器535,讓DMA控制器535從RAID ECC引擎537取得此頁面群組的奇偶校驗碼,並通過匯流排架構132儲存到RAM 136的指定位址。
In order to solve the problems of the above-mentioned embodiments, the embodiment of the present invention proposes a new flash memory controller, which modifies the interface settings among the
參考圖6的介面連接示意圖。RAID ECC引擎537設置介面673,連接
主機介面控制器531中的介面610,用於直接從主機介面控制器531獲取頁面群組中每一頁的使用者資料以進行頁面群組的奇偶校驗碼的編碼,而不通過任何DMA控制器從RAM 136獲取。在開始資料傳輸前,主機介面控制器531可進入初始化階段,通過介面610通知RAID ECC引擎537每個頁面群組包含多少個頁面、操作模式等資訊。搭配參考圖7的時序圖,詳細來說,針對一個頁面群組的頁面總數設定,RAID ECC引擎537可讓設定引擎就緒訊號(Set RAID Ready Signal,set_raid_rdy)生效(assert)一段時間t71,通知主機介面控制器531可以在這段期間設定頁面總數。在期間t71中,主機介面控制器531可將頁面總數放在群組容量資料線(Group Size Data Lines,grp_size[2:0])並在設定引擎脈衝訊號(Set Pulse Signal,set_raid_pls)上產生一個方波,用於讓RAID ECC引擎537在方波的上升緣於群組容量資料線上提取頁面群組的頁面總數,並儲存於其中的寄存器。針對操作模式設定,RAID ECC引擎537可讓設定模式就緒訊號(Set Mode Ready Signal,set_mode_rdy)生效一段時間t73,通知主機介面控制器531可以在這段期間設定操作模式。在期間t73中,主機介面控制器531可將操作模式(例如,編碼模式mode=0)放在操作模式資料線(Operation Mode Data Lines,op_mode[1:0])並在設定模式脈衝訊號(Set Mode Pulse Signal,set_mode_pls)上產生一個方波,用於讓RAID ECC引擎537在方波的上升緣於操作模式資料線上提取指示的操作模式,並儲存於其中的寄存器。
Refer to Figure 6 for the interface connection diagram.
完成初始化階段後,RAID ECC引擎537可讓編碼就緒訊號(Encode Ready Signal,enc_rdy)生效,直到接收完一個頁面群組的使用者資料(例如,期間t75),用於通知主機介面控制器531可以在生效期間傳送使用者資料。主機介面控制器531可讓編碼使能訊號(Encode Enabling Signal,enc_en)生效,直到傳送完最後一個頁面的使用者資料(例如,期間t77)。在期間t77中,主機介面控制
器531可搭配時鐘訊號(Clock Signal,未顯示在圖7)將每個頁面的使用者資料放在編碼資料線(Encode Data Lines,enc_dat[63:0]),讓RAID ECC引擎537提取。RAID ECC引擎537可使用公式(1)計算提取的使用者資料,產生頁面群組的奇偶校驗碼。主機介面控制器531可包含傳送計數器,初始為0,並且在傳送完一個頁面的使用者資料後加1。當傳送計數器的數值等於頁面群組的頁面總數後,主機介面控制器531可讓結束確認訊號(Termination Valid Signal,term_valid)生效一段時間,通知DMA控制器535可以開始從RAID ECC引擎537獲取頁面群組的奇偶校驗碼,並通過匯流排架構132儲存到RAM 136的指定位址。
After completing the initialization phase, the
在初始化階段,RAID ECC引擎537中的控制器(未顯示於圖5和圖6)可驅動介面673來讓設定引擎就緒訊號生效一段時間,並且讓設定模式就緒訊號生效一段時間。主機介面控制器531中的控制器(未顯示於圖5和圖6)可驅動介面610來偵測設定引擎就緒訊號,將頁面總數放在群組容量資料線,在設定引擎脈衝訊號上產生一個方波,偵測設定模式就緒訊號,將操作模式放在操作模式資料線,並且在設定模式脈衝訊號上產生一個方波。
In the initialization phase, the controller (not shown in FIG. 5 and FIG. 6) in the
在資料傳輸階段,RAID ECC引擎537中的控制器(未顯示於圖5和圖6)可驅動介面673來讓編碼就緒訊號生效一段時間。主機介面控制器531中的控制器(未顯示於圖5和圖6)可驅動介面610來讓編碼使能訊號生效一段時間,將每個頁面的使用者資料放在編碼資料線,並且讓結束確認訊號生效一段時間。
During the data transmission phase, the controller (not shown in FIGS. 5 and 6) in the
在這裡需要注意的是,主機介面控制器531另可設置連接至主機端110的第一介面(未顯示於圖5和圖6)和連接至匯流排架構132的第二介面(未顯示於圖5和圖6)。主機介面控制器531中的控制器(未顯示於圖5和圖6)可驅動第一介面以使用通訊協定從主機端110獲取每個頁面的使用者資料,並且驅動第二介面以使用進階可
擴充介面(Advanced eXtensible Interface,AXI)通訊協定來獲取匯流排架構132的控制權,並通過匯流排架構132儲存每個頁面的使用者資料到RAM 136中的指定位址。主機介面控制器531中的控制器、第一介面和第二介面的電路結構和功能是所屬技術領域技術人員的公知技術,為求簡明不再贅述。
It should be noted here that the
參考圖6的介面連接示意圖。RAID ECC引擎537設置介面677,連接DMA控制器535中的介面650,用於輸出頁面群組的奇偶校驗碼給DMA控制器535。搭配參考圖8的時序圖,詳細來說,當DMA控制器535接收到結束確認訊號後,DMA控制器535可讓結束輸出有效訊號(Termination Out Valid,term_out_valid)生效,直到接收完頁面群組的奇偶校驗碼(例如,期間t81),用於通知RAID ECC引擎537可以在生效期間傳送頁面群組的奇偶校驗碼。RAID ECC引擎537可讓結束輸出使能訊號(Termination Out Enabling Signal,term_out_en)生效,直到傳送完頁面群組的奇偶校驗碼(例如,期間t83)。在期間t83中,RAID ECC引擎537可搭配時鐘訊號(Clock Signal,未顯示在圖8)將頁面群組的奇偶校驗碼放在結束輸出奇偶校驗碼資料線(Termination Out Parity Data Lines,term_out_pty[63:0]),讓DMA控制器535提取。
Refer to Figure 6 for the interface connection diagram. The
在奇偶校驗碼的傳送階段,DMA控制器535中的控制器(未顯示於圖5和圖6)可驅動介面650來偵測結束確認訊號,以及讓結束輸出有效訊號生效一段期間。RAID ECC引擎537中的控制器(未顯示於圖5和圖6)可驅動介面677來讓結束輸出使能訊號生效一段時間,以及將頁面群組的奇偶校驗碼放在結束輸出奇偶校驗碼資料線。
During the transmission phase of the parity check code, the controller (not shown in FIGS. 5 and 6) in the
在這裡需要注意的是,DMA控制器535另可設置連接至匯流排架構132的介面(未顯示於圖5和圖6)。DMA控制器535中的控制器(未顯示於圖5和圖6)可驅動此介面使用進階可擴充介面通訊協定來獲取匯流排架構132的控制權,並通過匯流排架構132儲存頁面群組的
奇偶校驗碼到RAM 136中的指定位址。DMA控制器535中的控制器和介面的電路結構和功能是所屬技術領域技術人員的公知技術,為求簡明不再贅述。
It should be noted here that the
根據本發明實施例的架構,詳細來說,參考圖9所示的步驟。 According to the architecture of the embodiment of the present invention, in detail, refer to the steps shown in FIG. 9.
步驟(5):主機介面控制器531從主機端110取得一個頁面的使用者資料,並通過匯流排架構132儲存此頁面的使用者資料到RAM 136中的指定位址,同時通過介面610輸出此頁面的使用者資料到RAID ECC引擎537進行編碼。步驟(5)會不斷地在閃存控制器530中循環執行,直到一個頁面群組的使用者資料都輸入到RAID ECC引擎537來進行運算。
Step (5): The
步驟(6):主機介面控制器531通過介面610發送結束確認訊號給DMA控制器535,通知DMA控制器535可以開始從RAID ECC引擎537獲取頁面群組的奇偶校驗碼。
Step (6): The
步驟(7):DMA控制器535通過介面650從RAID ECC引擎537取得此頁面群組的奇偶校驗碼,並通過匯流排架構132儲存到RAM 136的指定位址。
Step (7): The
步驟(8):閃存介面控制器139從RAM 136中的指定位址讀取這些頁面的使用者資料和頁面群組的奇偶校驗碼,並且寫入閃存模組150。閃存介面控制器139更可依據每個頁面的使用者資料產生糾錯碼,依據頁面群組的奇偶校驗碼產生糾錯碼,並且將每個頁面的糾錯碼和奇偶校驗碼的糾錯碼寫入閃存模組150。
Step (8): The flash
相較於圖4所示相應於先前實施方式的時序圖,應用本發明實施例的新架構,可節省先前設計的DMA控制器135從RAM 136的多個頁面的讀取操作P#0(R)至P#6(R),此外,也可避免其他元件和DMA控制器135因爭奪匯流排架構132的控制權產生的碰撞,並避免其他元件因等待這些讀取操作P#0(R)至P#6(R)的完成所需要的前置時間。
Compared with the timing diagram shown in FIG. 4 corresponding to the previous embodiment, the application of the new architecture of the embodiment of the present invention can save the previously designed
雖然圖5~6和9中包含了以上描述的元件,但不排除在不違反發明 的精神下,使用更多其他的附加元件,已達成更佳的技術效果。此外,雖然圖9的步驟採用指定的順序來執行,但是在不違反發明精神的情況下,熟習此技藝人士可以在達到相同效果的前提下,修改這些步驟間的順序,所以,本發明並不侷限於僅使用如上所述的順序。此外,熟習此技藝人士亦可以將若干步驟整合為一個步驟,或者是除了這些步驟外,循序或平行地執行更多步驟,本發明亦不因此而侷限。 Although the above-described elements are included in Figures 5 to 6 and 9, it is not ruled out that they do not violate the invention. Under the spirit of using more other additional components, a better technical effect has been achieved. In addition, although the steps in FIG. 9 are executed in a specified order, those skilled in the art can modify the order of these steps on the premise of achieving the same effect without violating the spirit of the invention. Therefore, the present invention does not It is limited to using only the sequence described above. In addition, those skilled in the art can also integrate several steps into one step, or in addition to these steps, perform more steps sequentially or in parallel, and the present invention is not limited thereby.
雖然本發明使用以上實施例進行說明,但需要注意的是,這些描述並非用以限縮本發明。相反地,此發明涵蓋了熟習此技藝人士顯而易見的修改與相似設置。所以,申請權利要求範圍須以最寬廣的方式解釋來包含所有顯而易見的修改與相似設置。 Although the present invention is described using the above embodiments, it should be noted that these descriptions are not intended to limit the present invention. On the contrary, this invention covers modifications and similar arrangements that are obvious to those skilled in the art. Therefore, the scope of applied claims must be interpreted in the broadest way to include all obvious modifications and similar settings.
50:電子裝置 50: electronic device
110:主機端 110: host side
132:匯流排架構 132: bus architecture
134:處理單元 134: Processing Unit
136:隨機存取記憶體 136: Random Access Memory
139:閃存介面控制器 139: flash memory interface controller
150:閃存模組 150: Flash memory module
531:主機介面控制器 531: Host Interface Controller
535:直接記憶體存取控制器 535: Direct Memory Access Controller
537:獨立磁碟冗餘陣列糾錯碼引擎 537: Redundant Array of Independent Disks Error Correction Code Engine
Claims (10)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US201962948516P | 2019-12-16 | 2019-12-16 | |
US62/948,516 | 2019-12-16 |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI719880B true TWI719880B (en) | 2021-02-21 |
TW202125511A TW202125511A (en) | 2021-07-01 |
Family
ID=75745882
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109111754A TWI719880B (en) | 2019-12-16 | 2020-04-08 | Apparatus and method for programming data of page groups into flash units |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112988449B (en) |
TW (1) | TWI719880B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116701264B (en) * | 2023-08-02 | 2024-02-23 | 广东匠芯创科技有限公司 | Control method of DMA control system and DMA control system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI227395B (en) * | 2003-06-02 | 2005-02-01 | Genesys Logic Inc | Method for parallel processing of memory data and error correction code and related device thereof |
US9021343B1 (en) * | 2014-06-13 | 2015-04-28 | Sandisk Technologies Inc. | Parity scheme for a data storage device |
US20180091172A1 (en) * | 2016-03-04 | 2018-03-29 | Western Digital Technologies, Inc. | Ecc and raid-type decoding |
US20180129563A1 (en) * | 2016-11-07 | 2018-05-10 | Samsung Electronics Co., Ltd. | Memory system performing error correction of address mapping table |
TW201917582A (en) * | 2017-10-27 | 2019-05-01 | 韓商愛思開海力士有限公司 | Memory system and operating method thereof |
US20190173492A1 (en) * | 2016-04-27 | 2019-06-06 | Silicon Motion Inc. | Flash memory apparatus and storage management method for flash memory |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070022364A1 (en) * | 2001-06-14 | 2007-01-25 | Mcbryde Lee | Data management architecture |
US20090210620A1 (en) * | 2008-02-19 | 2009-08-20 | Jibbe Mahmoud K | Method to handle demand based dynamic cache allocation between SSD and RAID cache |
US8533564B2 (en) * | 2009-12-23 | 2013-09-10 | Sandisk Technologies Inc. | System and method of error correction of control data at a memory device |
US8583868B2 (en) * | 2011-08-29 | 2013-11-12 | International Business Machines | Storage system cache using flash memory with direct block access |
TWI523025B (en) * | 2013-12-27 | 2016-02-21 | 慧榮科技股份有限公司 | Data storage device and error correction method thereof |
TWI555028B (en) * | 2015-02-12 | 2016-10-21 | 慧榮科技股份有限公司 | Data storage device and error correction method |
-
2020
- 2020-04-08 TW TW109111754A patent/TWI719880B/en active
- 2020-04-08 CN CN202010267832.5A patent/CN112988449B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI227395B (en) * | 2003-06-02 | 2005-02-01 | Genesys Logic Inc | Method for parallel processing of memory data and error correction code and related device thereof |
US9021343B1 (en) * | 2014-06-13 | 2015-04-28 | Sandisk Technologies Inc. | Parity scheme for a data storage device |
US20180091172A1 (en) * | 2016-03-04 | 2018-03-29 | Western Digital Technologies, Inc. | Ecc and raid-type decoding |
US20190173492A1 (en) * | 2016-04-27 | 2019-06-06 | Silicon Motion Inc. | Flash memory apparatus and storage management method for flash memory |
US20180129563A1 (en) * | 2016-11-07 | 2018-05-10 | Samsung Electronics Co., Ltd. | Memory system performing error correction of address mapping table |
TW201917582A (en) * | 2017-10-27 | 2019-05-01 | 韓商愛思開海力士有限公司 | Memory system and operating method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN112988449B (en) | 2023-08-15 |
TW202125511A (en) | 2021-07-01 |
CN112988449A (en) | 2021-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11151027B2 (en) | Methods and apparatuses for requesting ready status information from a memory | |
US9015553B2 (en) | Data integrity in memory controllers and methods | |
US20140149706A1 (en) | Storage device and data transfering method thereof | |
US8869004B2 (en) | Memory storage device, memory controller thereof, and data transmission method thereof | |
TWI676991B (en) | Methods for testing a storage unit and apparatuses using the same | |
KR20200093362A (en) | Memory system and operating method thereof | |
TW201407349A (en) | Data management method, memory controller and memory storage device | |
US9135168B2 (en) | Apparatus and method for generating descriptors to reaccess a non-volatile semiconductor memory of a storage drive due to an error | |
TWI719880B (en) | Apparatus and method for programming data of page groups into flash units | |
TW201502977A (en) | Command executing method, connector and memory storage device | |
US11748025B2 (en) | Nonvolatile memory device, data storage device including the same and operating method thereof | |
US9804983B2 (en) | Controlling method, connector, and memory storage device | |
TWI797905B (en) | Apparatus and method for driving redundant array of independent disks (raid) engine | |
US20230205461A1 (en) | Apparatus and method for driving redundant array of independent disks (raid) engine | |
US20210241819A1 (en) | Dual SLC/QLC Programming and Resource Releasing | |
US11216207B2 (en) | Apparatus and method for programming user data on the pages and the parity of the page group into flash modules | |
US9152348B2 (en) | Data transmitting method, memory controller and data transmitting system | |
US20220334999A1 (en) | System including pipe5 to pipe4 converter and method thereof | |
TWI740454B (en) | Method and apparatus for accessing to data in response to a power-supply event | |
KR20150017601A (en) | Storage system and method for operating the same | |
TWI771707B (en) | Method and apparatus and computer program product for configuring reliable command | |
US11513980B2 (en) | Method and apparatus for performing access management of memory device with aid of universal asynchronous receiver-transmitter connection | |
TWI835027B (en) | Method and computer program product and apparatus for updating host-to-flash address mapping table | |
TW202321921A (en) | Method and computer program product and apparatus for updating host-to-flash address mapping table | |
JP2006119830A (en) | Storage device, data processing system and storage control method |