TWI795680B - Method and apparatus for data reads in host performance acceleration mode - Google Patents

Method and apparatus for data reads in host performance acceleration mode Download PDF

Info

Publication number
TWI795680B
TWI795680B TW109135109A TW109135109A TWI795680B TW I795680 B TWI795680 B TW I795680B TW 109135109 A TW109135109 A TW 109135109A TW 109135109 A TW109135109 A TW 109135109A TW I795680 B TWI795680 B TW I795680B
Authority
TW
Taiwan
Prior art keywords
mentioned
host
flash memory
data
command
Prior art date
Application number
TW109135109A
Other languages
Chinese (zh)
Other versions
TW202205099A (en
Inventor
施伯宜
Original Assignee
慧榮科技股份有限公司
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 慧榮科技股份有限公司 filed Critical 慧榮科技股份有限公司
Publication of TW202205099A publication Critical patent/TW202205099A/en
Application granted granted Critical
Publication of TWI795680B publication Critical patent/TWI795680B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements
    • 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/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0688Non-volatile semiconductor memory arrays

Abstract

The invention relates to a method, and an apparatus for data reads in host performance acceleration (HPA) mode. The method is performed by a host side to include: issuing a switch command to a flash controller for requesting the flash controller to activate an HPA function and an L2P-mapping-table acquisition function; issuing a write-multiple-block command to the flash controller for writing a data block to the flash controller, which includes a region number and a sub-region number; issuing a read-multiple-block command to the flash controller for obtaining L2P mapping records corresponding to the region number and the sub-region number from the flash controller; and storing the L2P mapping records in an HPA buffer of a system memory.

Description

主機效能加速模式的資料讀取方法及裝置 Data reading method and device in host performance acceleration mode

本發明涉及儲存裝置,尤指一種主機效能加速模式的資料讀取方法及裝置。 The invention relates to a storage device, in particular to a method and device for reading data in a host performance acceleration mode.

閃存通常分為NOR閃存與NAND閃存。NOR閃存為隨機存取裝置,中央處理器(Host)可於位址腳位上提供任何存取NOR閃存的位址,並及時地從NOR閃存的資料腳位上獲得儲存於該位址上的資料。相反地,NAND閃存並非隨機存取,而是序列存取。NAND閃存無法像NOR閃存一樣,可以存取任何隨機位址,中央處理器反而需要寫入序列的位元組(Bytes)的值到NAND閃存中,用於定義請求命令(Command)的類型(如,讀取、寫入、抹除等),以及用在此命令上的位址。位址可指向一個頁面(閃存中寫入作業的最小資料塊)或一個區塊(閃存中抹除作業的最小資料塊)。 Flash memory is usually 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 for accessing NOR flash memory on the address pin, and obtain the data stored on the address from the data pin of NOR flash memory in time. material. In contrast, NAND flash memory is not random access, but sequential access. NAND flash memory cannot access any random address like NOR flash memory. Instead, the CPU 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 on this command. The address can point to a page (the smallest data block for writing operations in flash memory) or a block (the smallest data block for erasing operations in flash memory).

為了提昇閃存模組的資料寫入及讀取效能,裝置端會以多個通道並行地執行資料寫入及讀取。為了達成並行處理的目的,一段連續性的資料會分散地儲存到多個通道所連接的閃存單元,並使用邏輯實體對照表(Logical-block-address to Physical-block-address,L2P Mapping Table)紀錄使用者資料的邏輯位址(由主機端管理)與實體位址(由閃存控制器管理)間的對應關係。然而,在嵌入式多媒體卡(embedded Multi-Media Controller,e‧MMC)的儲存裝置中,隨著裝置容量的快速增加,使得邏輯實體對照表的長度也倍數成長,造成裝置端執行的傳統管理方法難以負擔。就算使用階層式子區來 管理邏輯實體對照表能夠提升邏輯實體對照轉換的效能,但是花費在邏輯實體對照轉換的時間還是大幅高於從閃存模組的快閃陣列傳輸資料到閃存控制器的資料暫存器的時間(tR)。因此,本發明提出一種主機效能加速模式的資料讀取方法及裝置,用於提昇嵌入式多媒體卡的儲存裝置的資料讀取效能。 In order to improve the data writing and reading performance of the flash memory module, the device side will execute data writing and reading in parallel through multiple channels. In order to achieve the purpose of parallel processing, a piece of continuous data will be distributed and stored in flash memory units connected to multiple channels, and recorded using the Logical-block-address to Physical-block-address (L2P Mapping Table) The corresponding relationship between the logical address (managed by the host) and the physical address (managed by the flash memory controller) of the user data. However, in the embedded Multi-Media Card (embedded Multi-Media Controller, e‧MMC) storage device, with the rapid increase of device capacity, the length of the logical entity comparison table also doubles, resulting in the traditional management method executed on the device side. unaffordable. Even using hierarchical subsections to Managing the logical entity comparison table can improve the efficiency of logical entity conversion, but the time spent on logical entity conversion is still significantly higher than the time for transferring data from the flash array of the flash memory module to the data register of the flash memory controller (tR ). Therefore, the present invention proposes a data reading method and device in a performance acceleration mode of a host for improving the data reading performance of a storage device of an embedded multimedia card.

有鑑於此,如何減輕或消除上述相關領域的缺失,實為有待解決的問題。 In view of this, how to alleviate or eliminate the deficiencies in the above-mentioned related fields is a problem to be solved.

本說明書涉及一種主機效能加速模式的資料讀取方法,由主機端執行,包含:發出切換命令給閃存控制器,用於請求閃存控制器啟動主機效能加速功能和邏輯實體對照表的獲取功能;發出寫入多塊命令給閃存控制器,用於寫入資料塊到閃存控制器,資料塊中包含區域編號和子區編號;發出讀取多塊命令給閃存控制器,用於從閃存控制器獲取相應於區域編號和子區編號的多個邏輯實體對照紀錄;以及儲存邏輯實體對照紀錄至系統記憶體中的主機效能加速緩衝區。 This specification relates to a method for reading data in the host performance acceleration mode, which is executed by the host side, including: sending a switching command to the flash memory controller, which is used to request the flash memory controller to start the host performance acceleration function and the acquisition function of the logical entity comparison table; Write multi-block commands to the flash memory controller, used to write data blocks to the flash memory controller, the data blocks contain area numbers and sub-area numbers; issue read multi-block commands to the flash memory controller, used to obtain corresponding data from the flash memory controller A plurality of logical entity comparison records in the area number and sub-area number; and storing the logical entity comparison records in the host performance acceleration buffer in the system memory.

本說明書另涉及一種主機效能加速模式的資料讀取方法,由閃存控制器執行,包含:從主機端接收切換命令,用於請求閃存控制器啟動主機效能加速功能和邏輯實體對照表的獲取功能;因應切換命令而進入預設狀態;在進入預設狀態期間從主機端收到寫入多塊命令;因應寫入多塊命令從主機端收到的資料塊中獲取區域編號和子區編號,以及從閃存裝置讀取相應於區域編號和子區編號的多個邏輯實體對照紀錄;在進入預設狀態期間從主機端收到讀取多塊命令;以及因應讀取多塊命令傳送邏輯實體對照紀錄給主機端。 This specification also relates to a method for reading data in the host performance acceleration mode, which is executed by the flash memory controller, including: receiving a switching command from the host end, which is used to request the flash memory controller to start the host performance acceleration function and the acquisition function of the logical entity comparison table; Enter the default state in response to the switching command; receive a write multi-block command from the host during entering the default state; obtain the area number and sub-area number from the data block received by the host in response to the write multi-block command, and from The flash memory device reads a plurality of logical entity comparison records corresponding to the area number and the sub-area number; receives a read multi-block command from the host during entering the default state; and transmits the logical entity comparison record to the host in response to the read multi-block command end.

本說明書另涉及一種主機效能加速模式的裝置,包含:主機介面;閃存介面;和處理單元。處理單元通過主機介面從主機端接收切換命令,用於請求裝置啟動主機效能加速功能和邏輯實體對照表的獲取功能;因應切換命令而進入預設狀態;在進入預設狀態期間通過 主機介面從主機端收到寫入多塊命令;因應寫入多塊命令從主機端通過主機介面收到的資料塊中獲取區域編號和子區編號,以及通過閃存介面從閃存裝置讀取相應於區域編號和子區編號的多個邏輯實體對照紀錄;在進入預設狀態期間通過主機介面從主機端收到讀取多塊命令;以及因應讀取多塊命令通過主機介面傳送邏輯實體對照紀錄給主機端。 This specification also relates to a host performance acceleration mode device, including: a host interface; a flash memory interface; and a processing unit. The processing unit receives a switching command from the host side through the host interface, and is used to request the device to start the host performance acceleration function and the acquisition function of the logical entity comparison table; enter the default state in response to the switching command; pass through during entering the default state The host interface receives the write multi-block command from the host side; in response to the write multi-block command, obtains the area number and sub-area number from the data block received by the host side through the host interface, and reads the corresponding area from the flash memory device through the flash memory interface Multiple logical entity comparison records of numbers and sub-area numbers; during the period of entering the default state, a read multi-block command is received from the host side through the host interface; and in response to the read multi-block command, the logical entity comparison record is sent to the host side through the host interface .

主機端和閃存控制器間使用嵌入式多媒體卡通訊協定彼此溝通,並且每個邏輯實體對照紀錄儲存邏輯位址的資料實際儲存在實體位址的資訊。 The host and the flash memory controller communicate with each other using the embedded multimedia card communication protocol, and each logical entity compares and records the information stored in the logical address and actually stored in the physical address.

上述實施例的優點之一,通過如上所述主機效能加速緩衝區的設置能夠讓主機端發送帶有邏輯實體對照紀錄的讀取命令給閃存控制器,用於減少閃存控制器花費時間和運算資源進行邏輯實體對照轉換。 One of the advantages of the above-mentioned embodiment is that by setting the host performance acceleration buffer as described above, the host can send a read command with a logical entity comparison record to the flash memory controller, which is used to reduce the time and computing resources spent by the flash memory controller Perform logical entity comparison conversion.

本發明的其他優點將搭配以下的說明和圖式進行更詳細的解說。 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

132:匯流排 132: busbar

134:處理單元 134: processing unit

135:唯讀記憶體 135: ROM

136:隨機存取記憶體 136: random access memory

137:暫存器 137: Temporary register

139:閃存介面 139: Flash interface

150:閃存裝置 150: Flash memory device

151:介面 151: interface

153#0~153#15:NAND閃存單元 153#0~153#15: NAND flash memory unit

CH#0~CH#3:通道 CH#0~CH#3: channel

CE#0~CE#3:致能訊號 CE#0~CE#3: enable signal

310:高階對照表 310: Advanced Comparison Table

330#0~330#15:L2P對照子表 330#0~330#15: L2P comparison table

400:L2P對照紀錄 400: L2P Control Record

410:邏輯區塊位址的資訊 410: Logical block address information

430:實體區塊位址的資訊 430:Information of physical block address

430-0:邏輯單元號和實體塊編號 430-0: logical unit number and physical block number

430-1:實體頁面編號 430-1: Entity page number

440:實體塊 440: Solid block

450:實體頁面 450: entity page

450#2:實體區段 450#2: Entity section

500:HPA快取 500: HPA cache

611~655,711~755,835~839,915,931,955:操作 611~655,711~755,835~839,915,931,955: Operation

S1010~S1060,S1110~S1147:方法步驟 S1010~S1060, S1110~S1147: method steps

圖1為依據本發明實施例的電子裝置的系統架構圖。 FIG. 1 is a system architecture diagram of an electronic device according to an embodiment of the invention.

圖2為依據本發明實施例的閃存裝置的示意圖。 FIG. 2 is a schematic diagram of a flash memory device according to an embodiment of the invention.

圖3為依據本發明實施例的高階對照表和邏輯實體對照子表之間的關聯示意圖。 Fig. 3 is a schematic diagram of the association between the high-level comparison table and the logical entity comparison sub-table according to an embodiment of the present invention.

圖4為依據本發明實施例的邏輯實體對照子表和實體頁面之間的關聯示意圖。 Fig. 4 is a schematic diagram of the association between the logical entity comparison sub-table and the entity page according to an embodiment of the present invention.

圖5為依據本發明實施例的主機效能加速(Host Performance Acceleration,HPA)快取的建立與運用示意圖。 FIG. 5 is a schematic diagram of establishment and operation of a Host Performance Acceleration (HPA) cache according to an embodiment of the present invention.

圖6為依據本發明實施例的HPA緩衝區初始化的操作順序圖。 FIG. 6 is an operation sequence diagram of HPA buffer initialization according to an embodiment of the present invention.

圖7和圖8為依據本發明實施例的HPA讀取的操作順序圖。 7 and 8 are operation sequence diagrams of HPA reading according to an embodiment of the present invention.

圖9為依據本發明實施例的HPA緩衝區更新的操作順序圖。 FIG. 9 is an operation sequence diagram of HPA buffer update according to an embodiment of the present invention.

圖10為依據本發明實施例的切換命令的執行方法流程圖。 FIG. 10 is a flowchart of a method for executing a switch command according to an embodiment of the present invention.

圖11為依據本發明實施例的寫入多塊命令的執行方法流程圖。 FIG. 11 is a flowchart of a method for executing a write multi-block command according to an embodiment of the present invention.

以下說明為完成發明的較佳實現方式,其目的在於描述本發明的基本精神,但並不用以限定本發明。實際的發明內容必須參考之後的權利要求範圍。 The following description is a preferred implementation mode of the invention, and its purpose is to describe the basic spirit of the invention, but not to limit the invention. For the actual content of the invention, reference must be made to the scope of the claims that follow.

必須了解的是,使用於本說明書中的“包含”、“包括”等詞,用以表示存在特定的技術特徵、數值、方法步驟、作業處理、元件以及/或組件,但並不排除可加上更多的技術特徵、數值、方法步驟、作業處理、元件、組件,或以上的任意組合。 It must be understood that words such as "comprising" and "including" used in this specification are used to indicate the existence of specific technical features, values, method steps, operations, components and/or components, but do not exclude the possibility of adding More technical characteristics, numerical values, method steps, operation processes, components, components, or any combination of the above.

於權利要求中使用如“第一”、“第二”、“第三”等詞是用來修飾權利要求中的元件,並非用來表示之間具有優先順序,前置關係,或者是一個元件先於另一個元件,或者是執行方法步驟時的時間先後順序,僅用來區別具有相同名字的元件。 Words such as "first", "second", and "third" used in the claims are used to modify the elements in the claims, and are not used to indicate that there is a priority order, a pre-relationship, or an element An element preceding another element, or a chronological order in performing method steps, is only used to distinguish elements with the same name.

必須了解的是,當元件描述為“連接”或“耦接”至另一元件時,可以是直接連結、或耦接至其他元件,可能出現中間元件。相反地,當元件描述為“直接連接”或“直接耦接”至另一元件時,其中不存在任何中間元件。使用來描述元件之間關係的其他語詞也可類似方式解讀,例如“介於”相對於“直接介於”,或者是“鄰接”相對於“直接鄰接”等等。 It must be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, intervening elements may be present. In contrast, when an element is described as being "directly connected" or "directly coupled" to another element, there are no intervening elements present. Other words used to describe the relationship between elements may be interpreted in a similar fashion, eg, "between" versus "directly between," or "adjacent" versus "directly adjacent," and so forth.

參考圖1。電子裝置10包含主機裝置(又可稱主機端)110、閃存控制器130及閃存裝置150,並且閃存控制器130及閃存裝置150可合稱為裝置端(Device Side)。電子裝置10可實施於個人電腦、筆記型電腦(Laptop PC)、平板電腦、手機、數位相機、數位攝影機等電子產品之中。主機裝置110與閃存控制器130的主機介面(Host Interface)131可以嵌入式多媒體卡(embedded Multi-Media Controller,e‧MMC/eMMC)通訊協定彼此溝通。閃存控制器130的閃存介面139與閃存裝置150可以雙倍資料率(Double Data Rate,DDR)通訊協定彼此溝通,例如,開放NAND快閃介面(Open NAND Flash Interface,ONFI)、雙倍資料率開關(DDR Toggle)或其他通訊協定。閃存控制器130包含處理單元134,可使用多種方式實施,如使用通用硬體(例如,微控制單元、中央處理器、具平行處理能力的多處理器、圖形處理器或其他具運算能力的處理器),並且在執行軟體以及/或韌體指令時,提供之後描述的功能。處理單元134通過主機介面131接收eMMC命令,並執行這些命令。閃存控制器130包含隨機存取記憶體(Random Access Memory,RAM)136,可實施為動態隨機存取記憶體(Dynamic Random Access Memory,DRAM)、靜態隨機存取記憶體(Static Random Access Memory,SRAM)或上述兩者的結合,用於配置空間作為資料緩衝區。隨機存取記憶體136另可儲存執行過程中需要的資料,例如,變數、資料表等。閃存控制器130包含唯讀記憶體(Read Only Memory,ROM)135,用於儲存開機時需要執行的程式碼。閃存介面139包含NAND閃存控制器(NAND Flash Controller,NFC),提供存取閃存裝置150時需要的功能,例如命令序列器(Command Sequencer)、低密度奇偶校驗(Low Density Parity Check,LDPC)等。 Refer to Figure 1. The electronic device 10 includes a host device (also called a host side) 110 , a flash memory controller 130 and a flash memory device 150 , and the flash memory controller 130 and the flash memory device 150 are collectively called a device side. The electronic device 10 can be implemented in electronic products such as personal computers, notebook computers (Laptop PC), tablet computers, mobile phones, digital cameras, and digital video cameras. The host device 110 and the host interface (Host Interface) 131 of the flash controller 130 can communicate with each other through the embedded Multi-Media Controller (e.MMC/eMMC) communication protocol. The flash memory interface 139 of the flash memory controller 130 and the flash memory device 150 can communicate with each other with a double data rate (Double Data Rate, DDR) communication protocol, for example, an open NAND flash interface (Open NAND Flash Interface, ONFI), Double Data Rate Switch (DDR Toggle) or other communication protocols. The flash memory controller 130 includes a processing unit 134, which can be implemented in various ways, such as using general-purpose hardware (for example, a microcontroller unit, a central processing unit, a multi-processor with parallel processing capabilities, a graphics processing unit, or other processing units with computing capabilities. device) and, when executing software and/or firmware instructions, provide the functionality described hereinafter. The processing unit 134 receives eMMC commands through the host interface 131 and executes these commands. The flash memory controller 130 includes a random access memory (Random Access Memory, RAM) 136, which can be implemented as a dynamic random access memory (Dynamic Random Access Memory, DRAM), a static random access memory (Static Random Access Memory, SRAM) ) or a combination of the above two, used to configure the space as a data buffer. The random access memory 136 can also store data required during execution, such as variables, data tables, and the like. The flash memory controller 130 includes a read only memory (Read Only Memory, ROM) 135 for storing program codes that need to be executed when booting. The flash memory interface 139 includes a NAND flash memory controller (NAND Flash Controller, NFC), which provides functions needed when accessing the flash memory device 150, such as a command sequencer (Command Sequencer), a low density parity check (Low Density Parity Check, LDPC), etc. .

閃存控制器130包含暫存器137,用於儲存各式各樣的參數值。在eMMC規範(例如發表在2014年七月的eMMC電器標準5.1)中,暫存器137包含32位元的操作狀態暫存器(Operation Condition Register,OCR)、128位元的裝置識別暫存器(Device IDentification,CID Register)、128位元的裝置特用資料暫存器(Device-Specific Data,CSD Register)、512位元組的擴充裝置特用資料暫存器(Extended CSD Register,可簡稱Ext_CSD暫存器)等。Ext_CSD暫存器定義裝置屬性(Device Properties)和選定模式(Selected Modes),其中的最高有效320位元組是屬性段(Properties Segment),用於定義裝置的能力,並且不能夠被主機端110修改,另外的較低有效192位元 組是模式段(Modes Segment),定義裝置目前正運行的設置。主機端110可通過切換命令(SWITCH command,CMD6)改變這些模式。eMMC規範在Ext_CSD暫存器中保留了若干區域可以讓裝置端的製造商自由運用,用於完成主機效能加速模式(Host Performance Acceleration,HPA Mode)的功能。 The flash memory controller 130 includes a register 137 for storing various parameter values. In the eMMC specification (such as the eMMC electrical standard 5.1 published in July 2014), the register 137 includes a 32-bit operation condition register (Operation Condition Register, OCR), a 128-bit device identification register (Device IDentification, CID Register), 128-bit device-specific data register (Device-Specific Data, CSD Register), 512-byte extended device-specific data register (Extended CSD Register, may be referred to as Ext_CSD register), etc. The Ext_CSD register defines the device properties (Device Properties) and the selected mode (Selected Modes), and the most significant 320 bytes are the properties segment (Properties Segment), which is used to define the capabilities of the device and cannot be modified by the host 110 , additionally the less significant 192-bit The group is the Modes Segment, which defines the settings in which the device is currently operating. The host 110 can change these modes through a switch command (SWITCH command, CMD6). The eMMC specification reserves several areas in the Ext_CSD register that can be freely used by device manufacturers to implement the Host Performance Acceleration (HPA Mode) function.

閃存控制器130中可配置匯流排架構(Bus Architecture)132,用於讓元件之間彼此耦接以傳遞資料、位址、控制訊號等,這些元件包含主機介面131、處理單元134、ROM 135、RAM 136、暫存器137、閃存介面139等。在一些實施例中,主機介面131、處理單元134、ROM 135、RAM 136、暫存器137與閃存介面139可通過單一匯流排彼此耦接。在另一些實施例中,閃存控制器130中可配置高速匯流排,用於讓處理單元134、ROM 135、RAM 136與暫存器137彼此耦接,並且配置低速匯流排,用於讓處理單元134、主機介面131與閃存介面139彼此耦接。匯流排包含並行的物理線,連接閃存控制器130中兩個以上的組件。 A bus architecture (Bus Architecture) 132 can be configured in the flash memory controller 130, which is used to couple components to each other to transmit data, addresses, control signals, etc. These components include a host interface 131, a processing unit 134, a ROM 135, RAM 136, register 137, flash memory interface 139, etc. In some embodiments, the host interface 131 , the processing unit 134 , the ROM 135 , the RAM 136 , the register 137 and the flash memory interface 139 may be coupled to each other through a single bus. In other embodiments, the flash memory controller 130 may be configured with a high-speed bus for coupling the processing unit 134, ROM 135, RAM 136, and register 137 to each other, and a low-speed bus for allowing the processing unit 134. The host interface 131 and the flash memory interface 139 are coupled to each other. A bus comprises parallel physical wires connecting two or more components in flash memory controller 130 .

閃存裝置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中的指定位址(來源位址)讀取使用者資料和L2P對照表中的指定部分。閃存介面139使用數個電子訊號來協調閃存控制器130與閃存裝置150間的資料與命令傳遞,包含資料線(Data Line)、時脈訊號(Clock Signal)與控制訊號(Control Signal)。資料線可用於傳遞命令、位址、讀出及寫入的資料;控制訊號線可用於傳遞晶片致能(Chip Enable,CE)、位址提取致能(Address Latch Enable,ALE)、命令提取致能(Command Latch Enable,CLE)、寫入致能(Write Enable,WE)等控制訊號。 The flash memory device 150 provides a large amount of storage space, usually hundreds of gigabytes (Gigabytes, GB), or even several terabytes (Terabytes, TB), for storing a large amount of user data, such as High-resolution pictures, videos, and more. The flash memory device 150 includes a control circuit and a memory array, and memory cells in the memory array can be configured as single-level cells (Single Level Cells, SLCs) and multi-level cells (Multiple Level Cells, MLCs) after erasing. Layer cells (Triple Level Cells, TLCs), quadruple level cells (Quad-Level Cells, QLCs), or any combination of the above. The processing unit 134 writes the user data to the specified address (destination address) in the flash memory device 150 through the flash memory interface 139, and reads the user data and L2P comparison from the specified address (source address) in the flash memory device 150 specified part of the table. The flash memory interface 139 uses several electronic signals to coordinate data and command transmission between the flash memory controller 130 and the flash memory device 150, including a data line (Data Line), a clock signal (Clock Signal) and control signal (Control Signal). Data lines can be used to transmit commands, addresses, read and write data; control signal lines can be used to transmit chip enable (Chip Enable, CE), address extraction enable (Address Latch Enable, ALE), command extraction enable Control signals such as Command Latch Enable (CLE) and Write Enable (WE).

參考圖2,閃存裝置150中的介面151可包含四個輸出入通道(I/O channels,以下簡稱通道)CH#0至CH#3,每一個通道連接四個NAND閃存單元,例如,通道CH#0連接NAND閃存單元153#0、153#4、153#8及153#12。每個NAND閃存單元可封裝為獨立的芯片(die)。閃存介面139可通過介面151發出致能訊號CE#0至CE#3中的一個來致能NAND閃存單元153#0至153#3、153#4至153#7、153#8至153#11、或153#12至153#15,接著以並行的方式從致能的NAND閃存單元讀取使用者資料,或者寫入使用者資料至致能的NAND閃存單元。 Referring to FIG. 2, the interface 151 in the flash memory device 150 may include four input/output channels (I/O channels, hereinafter referred to as channels) CH#0 to CH#3, and each channel is connected to four NAND flash memory units, for example, the channel CH #0 is connected to NAND flash memory units 153#0, 153#4, 153#8 and 153#12. Each NAND flash memory cell can be packaged as an independent die. The flash memory interface 139 can send one of the enable signals CE#0 to CE#3 through the interface 151 to enable the NAND flash memory units 153#0 to 153#3, 153#4 to 153#7, 153#8 to 153#11 , or 153#12 to 153#15, and then read user data from the enabled NAND flash memory unit in parallel, or write user data to the enabled NAND flash memory unit.

由於一段連續性(也就是一段連續的邏輯區塊位址,Logical Block Addresses,LBAs)的資料被分散地儲存到多個通道所連接的NAND閃存單元,閃存控制器130使用邏輯實體對照表(Logical-block-address to Physical-block-address,L2P Mapping Table)紀錄使用者資料的邏輯位址(由主機裝置110管理)與實體位址(由閃存控制器130管理)間的對應關係。L2P對照表包含多筆紀錄,依邏輯位址的順序儲存每個邏輯位址的使用者資料實際儲存在哪個實體位址的資訊。一段連續LBA的資料可切分為數個區域(Regions),以區域編號識別,而每個區域可更切分出數個子區(Sub-regions),以子區編號識別。例如,使用LBA定址的128GB的資料可分為16個8GB的區域,而每個8GB的區域可更分出256個32MB的子區。在eMMC規範中,每個LBA關聯於(或指向)512位元組(Bytes)的資料。然而,由於RAM 136無法提供足夠空間儲存整個L2P對照表 以供處理單元134將來於資料讀取操作時快速查找,整個L2P對照表可依據區域和子區的劃分來切出多個子表,並分別儲存在非揮發性的閃存裝置150的不同實體位址,使得將來於資料讀取操作時只要從閃存裝置150讀取相應的子表至RAM 136即可。參考圖3,整個L2P對照表可切成子表330#0~330#15。處理單元134更維護高階對照表(High-level Mapping Table)310,包含多個紀錄,依邏輯位址的順序儲存每個LBA區段關聯的子表的實體位址資訊。例如,第0個至第4095個LBA的關聯子表330#0儲存在特定邏輯單元號(Logical Unit Number,LUN)的特定實體塊中(字母”Z”可代表LUN和實體塊的編號)的第0個實體頁面,第4096個至第8191個LBA的關聯子表330#1儲存在特定LUN的特定實體塊中的第1個實體頁面,依此類推。雖然圖3中只包含16個子表,但是所屬技術領域的技術人員可因應閃存裝置150的容量,設置更多的子表,本發明並不因此侷限。 Because the data of a section of continuity (that is, a section of continuous Logical Block Addresses, Logical Block Addresses, LBAs) is dispersedly stored in the NAND flash memory cells connected to multiple channels, the flash memory controller 130 uses a logical entity look-up table (Logical Block Addresses, LBAs) -block-address to Physical-block-address, L2P Mapping Table) records the correspondence between the logical address (managed by the host device 110 ) and the physical address (managed by the flash memory controller 130 ) of user data. The L2P comparison table includes a plurality of records, and stores the information of which physical address the user data of each logical address is actually stored in the order of logical addresses. A piece of continuous LBA data can be divided into several regions (Regions), which are identified by region numbers, and each region can be further divided into several sub-regions (Sub-regions), which are identified by sub-region numbers. For example, 128GB of data addressed by LBA can be divided into 16 8GB areas, and each 8GB area can be further divided into 256 32MB sub-areas. In the eMMC specification, each LBA is associated with (or points to) 512 bytes (Bytes) of data. However, since RAM 136 cannot provide enough space to store the entire L2P lookup table In order for the processing unit 134 to quickly search for future data reading operations, the entire L2P comparison table can be divided into multiple sub-tables according to the division of regions and sub-regions, and stored in different physical addresses of the non-volatile flash memory device 150, Therefore, only the corresponding sub-table is read from the flash memory device 150 to the RAM 136 during the data reading operation in the future. Referring to FIG. 3, the entire L2P comparison table can be divided into sub-tables 330#0~330#15. The processing unit 134 further maintains a high-level mapping table (High-level Mapping Table) 310, which includes a plurality of records, and stores physical address information of sub-tables associated with each LBA segment in the order of logical addresses. For example, the associated subtable 330#0 of the 0th to 4095th LBA is stored in a specific physical block of a specific logical unit number (Logical Unit Number, LUN) (the letter "Z" can represent the number of the LUN and the physical block) The 0th physical page, the associated subtable 330#1 of the 4096th to 8191st LBAs are stored in the 1st physical page in the specific physical block of the specific LUN, and so on. Although only 16 sub-tables are included in FIG. 3 , those skilled in the art can set more sub-tables according to the capacity of the flash memory device 150 , and the present invention is not limited thereto.

為了配合閃存裝置150的實體配置,閃存控制器130可讓一個實體區塊位址(Physical Block Address,PBA)關聯於(或指向)4KB、8KB或16KB的資料,此長度大於eMMC規範的一個LBA所關聯的資料的長度(512B)。因為LBA與PBA所關聯的資料長度不一致,每個子表中的每個紀錄包含邏輯位址和實體位址的資訊,用於精確指出閃存裝置150中的位址。參考圖4,子表330#0依序儲存從LBA#0至LBA#4095的定址資訊(Addressing Information)。定址資訊可以八個位元組表示:四個位元組代表LBA;其他四個位元組代表PBA。舉例來說,子表330#0中關聯於LBA#2的紀錄400儲存LBA 410和PBA 430的資訊。PBA 430中的二個位元組430-0紀錄邏輯單元號和實體塊編號(Physical Block Number);其他二個位元組430-1紀錄實體頁面編號(Physical Page Number)。所以,相應於LBA#2的實體位址資訊400可指向實體塊440的實體頁面450中的特定區段(Sector)450#2。 In order to cooperate with the physical configuration of the flash memory device 150, the flash memory controller 130 can associate (or point to) a physical block address (Physical Block Address, PBA) with 4KB, 8KB or 16KB of data, which is longer than one LBA of the eMMC specification The length of the associated data (512B). Since the data lengths associated with the LBA and the PBA are inconsistent, each record in each sub-table includes logical address and physical address information, which is used to accurately point out the address in the flash memory device 150 . Referring to FIG. 4, the sub-table 330#0 sequentially stores addressing information from LBA#0 to LBA#4095. Addressing information can be represented by eight bytes: four bytes represent LBA; the other four bytes represent PBA. For example, the record 400 associated with LBA #2 in the sub-table 330 #0 stores the information of the LBA 410 and the PBA 430 . The two bytes 430-0 in the PBA 430 record the logical unit number and the physical block number (Physical Block Number); the other two bytes 430-1 record the physical page number (Physical Page Number). Therefore, the physical address information 400 corresponding to LBA #2 can point to a specific sector (Sector) 450 #2 in the physical page 450 of the physical block 440 .

為了解決閃存控制器130花費過多時間在邏輯實體對照轉換上的問題,本發明實施例在現行eMMC規範的主機裝置通訊架構(Host-Device Communications Architecture)的基礎上加上HPA的新功能。HPA讓原先由閃存控制器130實施的需要耗費大量時間的邏輯實體對照轉換的工作負荷,轉換到主機端110,可提升短長度資料的隨機讀取效能,短長度資料可指長度從512B到32KB的資料。參考圖5,主機端110在其系統記憶體(System Memory)中配置空間作為HPA快取500,用於暫存由裝置端維護與管理的L2P對照表的資訊。HPA快取500儲存多個從裝置端接收的L2P對照紀錄(L2P Mapping Records),每個L2P對照紀錄紀錄相應於一個LBA的定址資訊。接著,主機端110可發出攜帶L2P對照紀錄的命令給裝置端,用於取得指定LBA的使用者資料。閃存控制器130可直接根據L2P對照紀錄中的資訊來驅動閃存介面139從閃存裝置150讀取指定LBA的使用者資料,而不需要像以前一樣得花費時間和運算資源從閃存裝置150讀取相應子表並進行邏輯實體位址轉換後才能從閃存裝置150讀取指定LBA的使用者資料。針對HPA快取500的建立和運用,可分為三個階段: In order to solve the problem that the flash memory controller 130 spends too much time on logical entity conversion, the embodiment of the present invention adds a new function of HPA on the basis of the host-device communications architecture (Host-Device Communications Architecture) of the current eMMC specification. HPA converts the workload of logical entity comparison transformation that was originally implemented by the flash memory controller 130, which takes a lot of time, to the host side 110, which can improve the random read performance of short-length data. Short-length data can refer to lengths from 512B to 32KB. data of. Referring to FIG. 5 , the host 110 configures space in its system memory (System Memory) as an HPA cache 500 for temporarily storing information of the L2P comparison table maintained and managed by the device. The HPA cache 500 stores a plurality of L2P mapping records (L2P Mapping Records) received from the device, and each L2P mapping record corresponds to the addressing information of one LBA. Next, the host 110 can issue a command carrying the L2P comparison record to the device to obtain user information of the specified LBA. The flash memory controller 130 can directly drive the flash memory interface 139 to read the user data of the specified LBA from the flash memory device 150 according to the information in the L2P comparison record, without spending time and computing resources to read the corresponding LBA from the flash memory device 150 as before. The user data of the specified LBA can be read from the flash memory device 150 only after logical physical address translation is performed on the sub-table. The establishment and use of HPA cache 500 can be divided into three stages:

階段I(HPA初始化):主機端110讀取閃存控制器130中暫存器137的值,檢查eMMC儲存裝置(或稱裝置端,至少包含閃存控制器130和閃存裝置150)是否支援HPA功能。如果是,主機端110在系統記憶體中配置空間,作為HPA L2P對照表區。 Stage I (HPA initialization): The host 110 reads the value of the temporary register 137 in the flash controller 130, and checks whether the eMMC storage device (or device side, including at least the flash controller 130 and the flash device 150) supports the HPA function. If yes, the host terminal 110 configures space in the system memory as the HPA L2P comparison table area.

階段II(HPA對照表管理):如果eMMC儲存裝置支援HPA功能,主機端110發出一系列命令,用於向閃存控制器130請求讀取L2P對照表。為反應這一系列命令,閃存控制器130傳送全部或一部份的L2P對照表給主機端110,讓主機端110把獲得的對照表儲存在HPA L2P對照表區(這可稱為鏡像L2P對照表,Mirrored L2P Mapping Table)。當對應於鏡像L2P對照表的實際L2P對照表因資料寫入、 資料修剪(Data Trimming)、垃圾回收(Garbage Collection,GC)、磨耗平均(Wear Leveling)等程序而改變後,閃存控制器130通知主機端110,主機端110的系統記憶體中的全部或者相應部分的L2P對照表需要更新。 Phase II (HPA comparison table management): If the eMMC storage device supports the HPA function, the host 110 sends a series of commands to request the flash memory controller 130 to read the L2P comparison table. In response to this series of commands, the flash memory controller 130 transmits all or part of the L2P comparison table to the host 110, allowing the host 110 to store the obtained comparison table in the HPA L2P comparison table area (this can be called a mirrored L2P comparison table). Table, Mirrored L2P Mapping Table). When the actual L2P comparison table corresponding to the mirror image L2P comparison table is written due to data, After programs such as data trimming (Data Trimming), garbage collection (Garbage Collection, GC), and wear leveling (Wear Leveling) are changed, the flash memory controller 130 notifies the host end 110 of all or a corresponding part of the system memory of the host end 110 The L2P comparison table needs to be updated.

階段III(HPA讀取):主機端110發出帶有L2P對照紀錄的一系列命令給eMMC儲存裝置以請求獲取特定LBA的資料(特別是小塊長度的不連續資料,如512B到32KB的不連續資料),其中的L2P對照紀錄是從鏡像L2P對照表中搜索而得。接著,閃存控制器130依據L2P對照紀錄的內容從閃存裝置150的PBA讀取指定LBA的資料,並且回覆讀取的資料給主機端110,使得eMMC儲存裝置能夠節省為進行邏輯實體對照轉換而讀取並搜索L2P對照表的時間。 Phase III (HPA read): The host 110 sends a series of commands with L2P comparison records to the eMMC storage device to request to obtain specific LBA data (especially small block length discontinuous data, such as 512B to 32KB discontinuous data), where the L2P comparison record is searched from the mirrored L2P comparison table. Then, the flash memory controller 130 reads the data of the specified LBA from the PBA of the flash memory device 150 according to the content of the L2P comparison record, and replies the read data to the host end 110, so that the eMMC storage device can save the read time for logical entity comparison conversion. Time to fetch and search the L2P comparison table.

在eMMC規範中,Ext_CSD[160](也稱為PARTITIONING_SUPPORT[160])定義支援區段特性(Supported Partition Features),其中的Bits[7:3]保留給eMMC儲存裝置的製造商自由使用。Ext_CSD暫存器的第160個位元組的第3個位元(Ext_CSD[160],Bit[3])可用來定義eMMC儲存裝置是否支援HPA功能,若支援則設為“1”,若關閉則設為“0”。在eMMC儲存裝置初始化的過程中,處理單元134可將暫存器137中的Ext_CSD[160],Bit[3]設為“1”。雖然本發明實施例描述了以Ext_CSD[160],Bit[3]定義eMMC儲存裝置是否支援HPA功能的技術方案,所屬技術領域人員可改變設計來使用Ext_CSD暫存器中的其他保留位元,例如Ext_CSD[511:506]、Ext_CSD[485:309]、Ext_CSD[306]、Ext_CSD[233]、Ext_CSD[227]、Ext_CSD[204]、Ext_CSD[195]、Ext_CSD[193]、Ext_CSD[190]、Ext_CSD[188]、Ext_CSD[186]、Ext_CSD[184]、Ext_CSD[182]、Ext_CSD[180]、Ext_CSD[176]、Ext_CSD[172]、Ext_CSD[170]、Ext_CSD[135]、Ext_CSD[129:128]、Ext_CSD[127:64]、Ext_CSD[28:27]、Ext_CSD[14:0]等,本發明並不 因此侷限。 In the eMMC specification, Ext_CSD[160] (also called PARTITIONING_SUPPORT[160]) defines Supported Partition Features, and Bits[7:3] are reserved for free use by manufacturers of eMMC storage devices. The third bit of the 160th byte of the Ext_CSD register (Ext_CSD[160], Bit[3]) can be used to define whether the eMMC storage device supports the HPA function, if it supports it, set it to "1", if it is disabled is set to "0". During the initialization process of the eMMC storage device, the processing unit 134 can set Ext_CSD[160], Bit[3] in the register 137 to “1”. Although the embodiment of the present invention describes the technical solution of using Ext_CSD[160], Bit[3] to define whether the eMMC storage device supports the HPA function, those skilled in the art can change the design to use other reserved bits in the Ext_CSD register, for example Ext_CSD[511:506], Ext_CSD[485:309], Ext_CSD[306], Ext_CSD[233], Ext_CSD[227], Ext_CSD[204], Ext_CSD[195], Ext_CSD[193], Ext_CSD[190], Ext_CSD [188], Ext_CSD[186], Ext_CSD[184], Ext_CSD[182], Ext_CSD[180], Ext_CSD[176], Ext_CSD[172], Ext_CSD[170], Ext_CSD[135], Ext_CSD[129:128] , Ext_CSD[127:64], Ext_CSD[28:27], Ext_CSD[14:0], etc., the present invention does not So limited.

此外,閃存控制器130可使用成對的Ext_CSD暫存器來記錄主機端110緩存的L2P對照表中需要更新的指定區域和子區的資訊。例如,Ext_CSD暫存器的第64個位元組(Ext_CSD[64])和第66個位元組(Ext_CSD[66])為一對,用於分別指出第0個區域(Region#0)和第160個子區(SubRegion#160)。Ext_CSD暫存器的第65個位元組(Ext_CSD[65])和第67個位元組(Ext_CSD[67])為另一對,用於分別指出第0個區域(Region#0)和第18個子區(SubRegion#18)。 In addition, the flash memory controller 130 can use the pair of Ext_CSD registers to record the information of the specified area and sub-area that needs to be updated in the L2P lookup table cached by the host 110 . For example, the 64th byte (Ext_CSD[64]) and the 66th byte (Ext_CSD[66]) of the Ext_CSD scratchpad are a pair, which are used to indicate the 0th region (Region#0) and The 160th subregion (SubRegion#160). The 65th byte (Ext_CSD[65]) and the 67th byte (Ext_CSD[67]) of the Ext_CSD scratchpad are another pair, which are used to indicate the 0th region (Region#0) and the 0th region respectively 18 subregions (SubRegion#18).

在eMMC規範中,切換命令(CMD6)是由主機端110發出,用於切換選定裝置的操作模式或者修改Ext_CSD暫存器的值,而參數的第26到31位元(Bits[31:26])是保留位元。主機端110可設定CMD6的第26個位元(CMD6,Bit[26])來表示是否啟動HPA功能,若啟動則設為“1”,若關閉則設為“0”。雖然本發明實施例描述了以CMD6,Bit[26]定義是否啟動HPA功能的技術方案,所屬技術領域人員可改變設計來使用CMD6的參數中的其他保留位元,本發明並不因此受限。主機端110可設定CMD6的第27個位元(CMD6,Bit[27])來表示是否啟動L2P對照表的獲取功能,若啟動則設為“1”,若關閉則設為“0”。雖然本發明實施例描述了以CMD6,Bit[27]定義是否啟動L2P對照表的獲取功能的技術方案,所屬技術領域人員可改變設計來使用CMD6的參數中的其他保留位元,本發明並不因此受限。 In the eMMC specification, the switching command (CMD6) is issued by the host terminal 110 to switch the operating mode of the selected device or modify the value of the Ext_CSD register, and the 26th to 31st bits of the parameter (Bits[31:26] ) are reserved bits. The host terminal 110 can set the 26th bit (CMD6, Bit[26]) of CMD6 to indicate whether to enable the HPA function, if enabled, set it to "1", and if disabled, set it to "0". Although the embodiment of the present invention describes the technical solution of using CMD6, Bit[26] to define whether to start the HPA function, those skilled in the art can change the design to use other reserved bits in the parameters of CMD6, and the present invention is not limited thereby. The host terminal 110 can set the 27th bit of CMD6 (CMD6, Bit[27]) to indicate whether to activate the L2P comparison table acquisition function, if enabled, set to "1", if disabled, set to "0". Although the embodiment of the present invention describes the technical solution of using CMD6, Bit[27] to define whether to start the acquisition function of the L2P comparison table, those skilled in the art can change the design to use other reserved bits in the parameters of CMD6, and the present invention does not So limited.

在eMMC規範中,設定塊數命令(CMD23)是由主機端110發出,用於表示之後的打包寫入命令的塊數目,或之後的打包讀取命令的標題(Header)的塊數目。當CMD23關聯於之後的打包寫入命令時,參數中的第30個位元(Bit[30])設為“0b1”,並且CMD23的參數中的第0到第15個位元(Bits[15:0])用來表示塊數目。當CMD23關聯於之後的打包寫入命令或打包讀取命令時,參數中的第30個位元(Bit[30])設為“0b1”。CMD23的參數中的第0到第15個位元 (Bits[15:0])用來表示塊數目。 In the eMMC specification, the set block number command (CMD23) is issued by the host 110 to indicate the block number of the subsequent packaged write command, or the number of blocks of the header (Header) of the subsequent packaged read command. When CMD23 is associated with the following package write command, the 30th bit (Bit[30]) in the parameter is set to "0b1", and the 0th to 15th bits (Bits[15]) in the parameter of CMD23 :0]) is used to indicate the number of blocks. When CMD23 is associated with the subsequent package write command or package read command, the 30th bit (Bit[30]) in the parameter is set to "0b1". The 0th to 15th bits in the parameters of CMD23 (Bits[15:0]) is used to indicate the number of blocks.

在eMMC規範中,寫入多塊命令(CMD25)是由主機端110發出,用於不斷寫入資料塊到eMMC儲存裝置,直到發出停止傳輸命令(STOP_TRANSMISSION Command,CMD12),或者請求數目的資料塊已經寫入完畢。主機端110可通過CMD23及CMD25傳送L2P對照表中的指定區域和子區的資訊,請求閃存控制器130準備指定區域和子區的L2P對照紀錄。此外,主機端110可通過CMD23及CMD25傳送L2P對照紀錄,請求閃存控制器130據以準備資料以供將來的讀取。CMD25的參數中的第0到第31個位元(Bits[31:0])表示資料位址。 In the eMMC specification, the write multi-block command (CMD25) is issued by the host 110 to continuously write data blocks to the eMMC storage device until a stop transmission command (STOP_TRANSMISSION Command, CMD12) is issued, or the requested number of data blocks has been written. The host 110 can transmit the information of the specified area and sub-area in the L2P comparison table through CMD23 and CMD25, and request the flash memory controller 130 to prepare the L2P comparison record of the designated area and sub-area. In addition, the host 110 can transmit the L2P comparison record through CMD23 and CMD25, requesting the flash memory controller 130 to prepare data for future reading. The 0th to 31st bits (Bits[31:0]) in the parameters of CMD25 indicate the data address.

在eMMC規範中,讀取多塊命令(CMD18)是由主機端110發出,用於不斷從eMMC儲存裝置讀取資料塊,直到請求數目的資料塊已經讀取完畢,或者被停止命令(Stop Command)打斷。也就是說,CMD18請求eMMC儲存裝置傳送先前指出數目的資料塊給主機端110。CMD18的參數中的第0到第31個位元(Bits[31:0])表示資料位址。主機端110可通過CMD23及CMD18請求閃存控制器130傳送指定區域和子區(在先前的CMD25中定義)的L2P對照紀錄。參考如圖4所示的範例,每個L2P對照紀錄的長度是8B,使得每個資料塊可攜帶最多32個L2P對照紀錄。此外,主機端110可通過CMD23及CMD18請求閃存控制器130傳送相應於L2P對照紀錄(在先前的CMD25中定義)的資料。 In the eMMC specification, the read multi-block command (CMD18) is issued by the host terminal 110 to continuously read data blocks from the eMMC storage device until the requested number of data blocks have been read, or the stop command (Stop Command )interrupt. That is to say, the CMD 18 requests the eMMC storage device to send the previously indicated number of data blocks to the host 110 . The 0th to 31st bits (Bits[31:0]) in the parameter of CMD18 represent the data address. The host 110 can request the flash memory controller 130 to transmit the L2P comparison record of the specified area and sub-area (defined in the previous CMD25) through CMD23 and CMD18. Referring to the example shown in FIG. 4 , the length of each L2P collation record is 8B, so that each data block can carry a maximum of 32 L2P collation records. In addition, the host 110 can request the flash memory controller 130 to transmit data corresponding to the L2P comparison record (defined in the previous CMD25) through CMD23 and CMD18.

在eMMC規範中,正常回覆命令(Normal Response Command,R1)是由閃存控制器130發出,用於告訴主機端110特定訊息。R1的長度是48位元,其中的第40到第45位元(Bits[45:40])紀錄要回覆命令的索引,並且第8到第39位元(Bits[39:8])紀錄裝置狀態(Device Status)。當R1的第31個位元(Bit[31])設為“0b1”時,代表位址超過範圍(ADDRESS_OUT_OF_RANGE)。當R1的第30個位元 (Bit[30])設為“0b1”時,代表位址不適配(ADDRESS_MISALIGN)。當HPA功能啟動但L2P對照表的獲取功能未啟動時,如果CMD25中攜帶的L2P對照紀錄中有部分的PBA失效了,閃存控制器130可把用於回覆之後CMD18的R1的第31個位元(Bit[31])和第30個位元(Bit[30])都設為“0b1”,用於指出主機端110中緩存的L2P對照紀錄需要更新。 In the eMMC specification, a normal response command (Normal Response Command, R1) is issued by the flash memory controller 130 to inform the host 110 of a specific message. The length of R1 is 48 bits, of which the 40th to 45th bits (Bits[45:40]) record the index of the command to be replied, and the 8th to 39th bits (Bits[39:8]) record the device Status (Device Status). When the 31st bit (Bit[31]) of R1 is set to "0b1", it means the address exceeds the range (ADDRESS_OUT_OF_RANGE). When the 30th bit of R1 When (Bit[30]) is set to "0b1", it means the address is not matched (ADDRESS_MISALIGN). When the HPA function is started but the acquisition function of the L2P comparison table is not started, if some PBAs in the L2P comparison record carried in the CMD25 are invalid, the flash memory controller 130 can use the 31st bit of the R1 of the CMD18 after the reply (Bit[31]) and the 30th bit (Bit[30]) are both set to "0b1", which is used to indicate that the L2P comparison record cached in the host 110 needs to be updated.

針對階段I和階段II中關於HPA L2P對照表區(又可稱為HPA緩衝區)的建立,在eMMC儲存裝置初始化後,主機端110首次從裝置端讀取L2P對照表,並且儲存到HPA緩衝區。表1描述範例的命令順序細節,用於初始化HPA緩衝區:

Figure 109135109-A0305-02-0015-1
Figure 109135109-A0305-02-0016-2
For the establishment of the HPA L2P comparison table area (also called the HPA buffer) in Phase I and Phase II, after the eMMC storage device is initialized, the host terminal 110 reads the L2P comparison table from the device side for the first time and stores it in the HPA buffer district. Table 1 describes the example command sequence details for initializing the HPA buffer:
Figure 109135109-A0305-02-0015-1
Figure 109135109-A0305-02-0016-2

參考如圖6所示的HPA緩衝區初始化的操作順序圖,詳細說明如下: Referring to the operation sequence diagram of HPA buffer initialization shown in Figure 6, the details are as follows:

操作611:主機端110發出命令給閃存控制器130,用於向閃存控制器130請求獲取Ext_CSD暫存器的值。 Operation 611: the host 110 sends a command to the flash memory controller 130 for requesting the flash memory controller 130 to obtain the value of the Ext_CSD register.

操作613:為反應通過主機介面131所接收的暫存器讀取命令,處理單元134獲取暫存器137中Ext_CSD暫存器的值,並通過主機介面131回覆給主機端110。 Operation 613 : In response to the register read command received through the host interface 131 , the processing unit 134 obtains the value of the Ext_CSD register in the register 137 , and replies to the host end 110 through the host interface 131 .

操作615:主機端110可檢查Ext_CSD暫存器的值(例如,Ext_CSD[160],Bit[3])來判斷此eMMC儲存裝置是否支援HPA功能。如果是,則繼續進行操作617的處理。如果不是,則不啟動HPA功能。 Operation 615: the host 110 can check the value of the Ext_CSD register (for example, Ext_CSD[160], Bit[3]) to determine whether the eMMC storage device supports the HPA function. If yes, proceed to operation 617. If not, the HPA function is not started.

操作617:主機端110發出切換命令(CMD6)給閃存控制器130來啟動HPA功能和L2P對照表的獲取功能。例如,參考表1的第二橫行,主機端110可將CMD6的參數設為“0x0C000000”,也就是包含Bit[26]=”0b1”及Bit[27]=”0b1”,用於指示閃存控制器130啟動這兩個功能。 Operation 617: the host 110 sends a switching command (CMD6) to the flash memory controller 130 to start the HPA function and the acquisition function of the L2P comparison table. For example, referring to the second row of Table 1, the host 110 can set the parameter of CMD6 to "0x0C000000", which includes Bit[26]="0b1" and Bit[27]="0b1", which are used to indicate flash memory control The controller 130 enables these two functions.

操作619:當閃存控制器130收到如上所示的切換命令後,進入HPA對照表讀取狀態(HPA_Mapping_READ state),用於準備傳送一部分的L2P對照表給主機端110。 Operation 619: After the flash memory controller 130 receives the switching command shown above, it enters the HPA mapping table read state (HPA_Mapping_READ state), which is used to prepare to send a part of the L2P mapping table to the host 110 .

操作631:主機端110在系統記憶體中配置空間給HPA緩衝區,並依據作業系統、驅動程式、應用程式等的需要決定欲向eMMC儲存裝 置獲取的區域和子區的L2P對照紀錄。 Operation 631: The host end 110 allocates space in the system memory for the HPA buffer, and decides to store the eMMC memory according to the requirements of the operating system, driver program, and application program. Set the L2P comparison records of the acquired area and sub-area.

操作633:主機端110發出設定塊數命令(CMD23)給閃存控制器130,用於通知閃存控制器130將傳送多少個資料塊。例如,參考表1的第三橫行,主機端110可將CMD23的參數設為“0x40000001”,也就是包含Bit[30]=”0b1”及Bits[15:0]=”0x0001”,表示之後將寫入一個資料塊到閃存控制器130。接著,主機端110發出寫入多塊命令(CMD25)給閃存控制器130,用於不斷寫入資料塊到閃存控制器130,直到請求數目的資料塊已經寫入完畢。例如,參考表1的第四橫行,主機端110可將CMD25的參數設為“0x01E2A3E0”,代表特定資料位址。每個資料塊可分為32包(Packets),而每一包的長度為16B。每包中的2個位元組可指出特定區域的編號,而其餘的14個位元組可指出數個特定子區的編號。例如,當一包中包含{Region#0,SubRegion#0,SubRegion#1,SubRegion#2,SubRegion#3}的資訊時,代表L2P對照表的指定部分關聯到第0個區域中的第0到第3個子區。接著,主機端110發出設定塊數命令(CMD23)給閃存控制器130,用於通知閃存控制器130將接收多少個資料塊。例如,參考表1的第五橫行,主機端110可將CMD23的參數設為“0x40000020”,也就是包含Bit[30]=”0b1”及Bits[15:0]=”0x0020”,表示之後將從閃存控制器130讀取32個資料塊,也就是最多1024個L2P對照紀錄。接著,主機端110發出讀取多塊命令(CMD18)給閃存控制器130,用於不斷從閃存控制器130讀取資料塊,直到請求數目的資料塊已經讀取完畢。例如,參考表1的第六橫行,主機端110可將CMD18的參數設為“0x01E2A3E0”,代表特定資料位址。 Operation 633: the host 110 sends a set block number command (CMD23) to the flash memory controller 130 for notifying the flash memory controller 130 how many data blocks will be transferred. For example, referring to the third horizontal row of Table 1, the host terminal 110 can set the parameter of CMD23 to "0x40000001", which includes Bit[30]="0b1" and Bits[15:0]="0x0001", indicating that the Write a block of data to the flash memory controller 130. Next, the host 110 sends a write multi-block command (CMD25) to the flash memory controller 130 for continuously writing data blocks to the flash memory controller 130 until the requested number of data blocks have been written. For example, referring to the fourth row of Table 1, the host 110 can set the parameter of CMD25 as “0x01E2A3E0”, representing a specific data address. Each data block can be divided into 32 packets (Packets), and the length of each packet is 16B. The 2 bytes in each packet can indicate the number of a specific area, while the remaining 14 bytes can indicate the number of several specific sub-areas. For example, when a packet contains {Region#0,SubRegion#0,SubRegion#1,SubRegion#2,SubRegion#3} information, it means that the specified part of the L2P comparison table is associated with the 0th to 0th region in the 0th region The 3rd sub-district. Next, the host 110 sends a set block number command (CMD23) to the flash memory controller 130 to inform the flash memory controller 130 how many data blocks it will receive. For example, referring to the fifth row in Table 1, the host 110 can set the parameter of CMD23 to "0x40000020", which includes Bit[30]="0b1" and Bits[15:0]="0x0020", indicating that the Read 32 data blocks from the flash memory controller 130, that is, at most 1024 L2P comparison records. Next, the host 110 sends a read multiple block command (CMD18) to the flash memory controller 130 for continuously reading data blocks from the flash memory controller 130 until the requested number of data blocks have been read. For example, referring to the sixth row of Table 1, the host 110 can set the parameter of CMD18 as “0x01E2A3E0”, representing a specific data address.

操作635:由於已經進入HPA對照表讀取狀態,當閃存控制器130從主機端110接收到相應於CMD25的資料塊時,知道其中的每一包攜帶了L2P對照表的指定部分的資訊,並且可據以從閃存裝置150讀取請求的L2P對照紀錄。此外,當閃存控制器130從主機端110接收到 CMD18時,知道可以開始傳送指定部分的L2P對照紀錄給主機端110。由於CMD18的參數被設定為與CMD25的參數相同,使得閃存控制器130傳送的資料是依據先前CMD25寫入的資料塊中的內容從閃存裝置150讀取的指定部分的L2P對照紀錄。 Operation 635: Since the read state of the HPA comparison table has been entered, when the flash memory controller 130 receives the data block corresponding to the CMD25 from the host terminal 110, it knows that each packet carries the information of the specified part of the L2P comparison table, and The requested L2P collation record can be read from the flash memory device 150 accordingly. In addition, when the flash controller 130 receives from the host 110 When CMD18, it is known that the specified part of the L2P comparison record can be sent to the host end 110. Since the parameters of CMD18 are set to be the same as the parameters of CMD25, the data transmitted by the flash memory controller 130 is the L2P comparison record of the specified part read from the flash memory device 150 according to the content in the data block written by the previous CMD25.

操作651:閃存控制器130將請求的L2P對照紀錄組織成指定數目的資料塊中的多個包。 Operation 651: The flash memory controller 130 organizes the requested L2P collation record into multiple packets in a specified number of data blocks.

操作653:閃存控制器130持續傳送組織好的資料塊給主機端110,直到指定數目的資料塊傳送完畢。接著,當從主機端110接收到打包讀取完成的訊息時,離開HPA對照表讀取狀態並進入eMMC規範的傳送狀態(Transfer State)。 Operation 653: The flash memory controller 130 continues to transmit the organized data blocks to the host 110 until the specified number of data blocks are completely transmitted. Next, when receiving the packet reading completion message from the host 110, it leaves the read state of the HPA comparison table and enters the transfer state (Transfer State) of the eMMC specification.

操作655:主機端110接收每包中攜帶的L2P對照紀錄,並且儲存在HPA緩衝區。當儲存完最後一包中攜帶的L2P對照紀錄後,主機端110發出傳送狀態命令(SEND_STATUS command,CMD13)給閃存控制器130,其中包含打包讀取完成的訊息。 Operation 655: The host 110 receives the L2P comparison record carried in each packet, and stores it in the HPA buffer. After storing the L2P comparison record carried in the last packet, the host 110 sends a send status command (SEND_STATUS command, CMD13) to the flash memory controller 130, which includes a message that the packet reading is completed.

針對階段III的資料讀取,表2描述範例的命令順序細節,用於使用HPA功能讀取資料:

Figure 109135109-A0305-02-0018-3
Figure 109135109-A0305-02-0019-4
For phase III data reading, Table 2 describes the command sequence details of the example for reading data using the HPA function:
Figure 109135109-A0305-02-0018-3
Figure 109135109-A0305-02-0019-4

參考如圖7所示的HPA讀取的操作順序圖,詳細說明如下: Referring to the operation sequence diagram of HPA reading shown in Figure 7, the details are as follows:

操作711:主機端110發現即將進行短長度資料的隨機讀取。 Operation 711: The host 110 finds that random reading of short-length data is about to be performed.

操作713:主機端110發出切換命令(CMD6)給閃存控制器130來啟動HPA功能。例如,參考表2的第二橫行,主機端110可將CMD6的參數設為“0x04000000”,也就是包含Bit[26]=”0b1”及Bit[27]=”0b0”,用於指示閃存控制器130只啟動HPA功能。 Operation 713: the host 110 sends a switching command (CMD6) to the flash memory controller 130 to activate the HPA function. For example, referring to the second row of Table 2, the host 110 can set the parameter of CMD6 to "0x04000000", which includes Bit[26]="0b1" and Bit[27]="0b0", which are used to indicate flash memory control The controller 130 only activates the HPA function.

操作715:當閃存控制器130收到如上所示的切換命令後,進入HPA讀取狀態(HPA_READ state)。 Operation 715: After the flash memory controller 130 receives the switching command shown above, it enters the HPA read state (HPA_READ state).

操作731:主機端110搜索HPA緩衝區中的鏡像L2P對照表以獲取相應於多個LBA的L2P對照紀錄。 Operation 731: The host 110 searches the mirrored L2P lookup table in the HPA buffer to obtain L2P lookup records corresponding to multiple LBAs.

操作733:主機端110發出設定塊數命令(CMD23)給閃存控制器130,用於通知閃存控制器130將傳送多少個資料塊。例如,參考表2的第三橫行,主機端110可將CMD23的參數設為“0x40000001”,也就是包含Bit[30]=”0b1”及Bits[15:0]=”0x0001”,表示之後將寫入一個 資料塊到閃存控制器130。接著,主機端110發出寫入多塊命令(CMD25)給閃存控制器130,用於不斷寫入資料塊到閃存控制器130,直到請求數目的資料塊已經寫入完畢。例如,參考表2的第四橫行,主機端110可將CMD25的參數設為“0x01521182”,代表特定資料位址。每個資料塊可分為32包(Packets),而每一包的長度為16B。每包關聯於一對LBA和PBA資訊,其中的8個位元組可指出特定LBA,而其餘的8個位元組可指出特定PBA。接著,主機端110發出設定塊數命令(CMD23)給閃存控制器130,用於通知閃存控制器130將接收多少個資料塊。例如,參考表2的第五橫行,主機端110可將CMD23的參數設為“0x40000020”,也就是包含Bit[30]=”0b1”及Bits[15:0]=”0x0020”,表示之後將從閃存控制器130讀取32個資料塊,也就是最多1024個LBA的資料。接著,主機端110發出讀取多塊命令(CMD18)給閃存控制器130,用於不斷從閃存控制器130讀取資料塊,直到請求數目的資料塊已經讀取完畢。例如,參考表2的第六橫行,主機端110可將CMD18的參數設為“0x01521182”,代表特定資料位址。 Operation 733: the host 110 sends a set block number command (CMD23) to the flash memory controller 130 to inform the flash memory controller 130 how many data blocks will be transferred. For example, referring to the third horizontal row of Table 2, the host terminal 110 can set the parameter of CMD23 to "0x40000001", which includes Bit[30]="0b1" and Bits[15:0]="0x0001", indicating that the write a Data blocks to flash memory controller 130. Next, the host 110 sends a write multi-block command (CMD25) to the flash memory controller 130 for continuously writing data blocks to the flash memory controller 130 until the requested number of data blocks have been written. For example, referring to the fourth row of Table 2, the host 110 can set the parameter of CMD25 as “0x01521182”, representing a specific data address. Each data block can be divided into 32 packets (Packets), and the length of each packet is 16B. Each packet is associated with a pair of LBA and PBA information, 8 bytes of which can point to a specific LBA, and the remaining 8 bytes can point to a specific PBA. Next, the host 110 sends a set block number command (CMD23) to the flash memory controller 130 to inform the flash memory controller 130 how many data blocks it will receive. For example, referring to the fifth row in Table 2, the host 110 can set the parameter of CMD23 to "0x40000020", which includes Bit[30]="0b1" and Bits[15:0]="0x0020", indicating that the Read 32 data blocks from the flash memory controller 130 , that is, the data of a maximum of 1024 LBAs. Next, the host 110 sends a read multiple block command (CMD18) to the flash memory controller 130 for continuously reading data blocks from the flash memory controller 130 until the requested number of data blocks have been read. For example, referring to the sixth row of Table 2, the host 110 can set the parameter of CMD18 as “0x01521182”, representing a specific data address.

操作735:由於已經進入HPA讀取狀態,當閃存控制器130從主機端110接收到相應於CMD25的資料塊時,知道其中的每一包攜帶了為一個資料讀取的成對LBA和PBA的資訊,並且可據以從閃存裝置150讀取請求的資料。此外,當閃存控制器130從主機端110接收到CMD18時,知道可以開始傳送指定的資料給主機端110。由於CMD18的參數被設定為與CMD25的參數相同,使得閃存控制器130傳送的資料是依據先前CMD25寫入的資料塊中的內容從閃存裝置150讀取的指定LBA的資料。 Operation 735: Since the HPA read state has been entered, when the flash memory controller 130 receives the data block corresponding to CMD25 from the host terminal 110, it knows that each packet carries the paired LBA and PBA for a data read. information, and the requested data can be read from the flash memory device 150 accordingly. In addition, when the flash memory controller 130 receives the CMD 18 from the host 110 , it knows that it can start sending the designated data to the host 110 . Since the parameters of CMD18 are set to be the same as those of CMD25, the data transmitted by the flash memory controller 130 is the data of the specified LBA read from the flash memory device 150 according to the contents of the data block written by the previous CMD25.

操作751:閃存控制器130將請求的資料組織成指定數目的資料塊中的多個包。 Operation 751: The flash memory controller 130 organizes the requested data into packets in a specified number of data blocks.

操作753:閃存控制器130持續傳送組織好的資料塊給主機端110, 直到指定數目的資料塊傳送完畢。接著,當從主機端110接收到打包讀取完成的訊息時,離開HPA讀取狀態並進入eMMC規範的傳送狀態。 Operation 753: the flash memory controller 130 continuously transmits the organized data blocks to the host 110, Until the specified number of data blocks are transmitted. Then, when receiving the packet reading completion message from the host 110 , it leaves the HPA reading state and enters the eMMC standard transmission state.

操作755:主機端110接收每包中攜帶的資料,並且儲存在系統記憶體的資料緩衝區。當儲存完最後一包中攜帶的資料後,主機端110發出傳送狀態命令(CMD13)給閃存控制器130,其中包含打包讀取完成的訊息。 Operation 755: The host 110 receives the data carried in each packet, and stores the data in the data buffer of the system memory. After storing the data carried in the last packet, the host 110 sends a transfer status command (CMD13) to the flash memory controller 130, which includes a message that the packet reading is completed.

針對階段II中關於HPA緩衝區的更新,在裝置端運行的過程中,主機端110可請求閃存控制器130執行資料寫入、資料剪除(Data Trims)、塊抹除(Block Erases)等操作,而閃存控制器130可主動執行垃圾回收(Garbage Collection,GC)、磨耗平均(Wear Leveling,WL)等程序,造成L2P對照表的部分內容被改變。所以,HPA緩衝區中的內容(也就是鏡像L2P對照表)需要因應L2P對照表的變更內容而更新。參考如圖8所示的HPA讀取的操作順序圖,其中的操作711到733和操作751到753的技術方案相同於圖7,其餘的操作詳細說明如下: Regarding the updating of the HPA buffer in Phase II, during the operation of the device, the host 110 can request the flash memory controller 130 to perform operations such as data writing, data trimming (Data Trims), and block erasing (Block Erases). The flash memory controller 130 can actively execute programs such as garbage collection (Garbage Collection, GC) and wear leveling (Wear Leveling, WL), causing some contents of the L2P comparison table to be changed. Therefore, the content in the HPA buffer (that is, the mirrored L2P comparison table) needs to be updated according to the changed content of the L2P comparison table. Referring to the operation sequence diagram of HPA reading as shown in Figure 8, the technical solutions of operations 711 to 733 and operations 751 to 753 are the same as those in Figure 7, and the rest of the operations are described in detail as follows:

操作835:由於已經進入HPA讀取狀態,當閃存控制器130從主機端110接收到相應於CMD25的資料塊時,知道其中的每一包攜帶了為一個資料讀取的成對LBA和PBA的資訊,並且檢查欲讀取LBA資料的LBA對照紀錄是否被改變(也就是是否無效)。如果是,則閃存控制器130忽略資料塊中攜帶的資訊,改為依據變更後的相應LBA對照紀錄從閃存裝置150讀取資料。當閃存控制器130從主機端110接收到CMD18時,知道可以開始傳送指定的資料給主機端110。由於CMD18的參數被設定為與CMD25的參數相同,使得閃存控制器130傳送的資料是依據先前CMD25寫入的資料塊中的內容或者依據變更後的相應LBA對照紀錄中的內容從閃存裝置150讀取的指定LBA的資料。此外,當欲讀取LBA資料的L2P對照紀錄無效時,閃 存控制器130設定相關的Ext_CSD暫存器來儲存主機端110的HPA緩衝區中需要更新的區域和子區的資訊。 Operation 835: Since the HPA read state has been entered, when the flash memory controller 130 receives the data block corresponding to CMD25 from the host terminal 110, it is known that each packet carries the paired LBA and PBA for a data read. Information, and check whether the LBA comparison record to read LBA data has been changed (that is, whether it is invalid). If so, the flash memory controller 130 ignores the information carried in the data block, and instead reads data from the flash memory device 150 according to the changed corresponding LBA comparison record. When the flash memory controller 130 receives the CMD 18 from the host 110 , it knows that it can start sending the designated data to the host 110 . Because the parameter of CMD18 is set to be identical with the parameter of CMD25, the data that makes flash memory controller 130 transmit is to read from flash memory device 150 according to the content in the data block that previous CMD25 writes or according to the content in the corresponding LBA comparison record after changing. Get the specified LBA information. In addition, when the L2P comparison record to read LBA data is invalid, the flashing The memory controller 130 sets the relevant Ext_CSD register to store the information of the area and sub-area in the HPA buffer of the host 110 that needs to be updated.

操作837:閃存控制器130發出用於回覆CMD18的R1,其中的第31個位元(Bit[31])和第30個位元(Bit[30])都設為“0b1”,用於指出主機端110中的鏡像L2P對照表需要更新。 Operation 837: the flash memory controller 130 sends R1 for replying to CMD18, wherein both the 31st bit (Bit[31]) and the 30th bit (Bit[30]) are set to "0b1", which is used to indicate The mirroring L2P comparison table in the host terminal 110 needs to be updated.

在主機端110從裝置端接收到鏡像L2P對照表需要更新的訊息後,主機端110從裝置端獲取需要更新的區域和子區的資訊,並據以從裝置端讀取L2P對照表中指定部分的L2P對照紀錄,並且更新HPA緩衝區中的相應內容。表3描述範例的命令順序細節,用於更新HPA緩衝區:

Figure 109135109-A0305-02-0022-5
Figure 109135109-A0305-02-0023-6
After the host terminal 110 receives the message from the device that the L2P comparison table of the image needs to be updated, the host terminal 110 obtains the information of the area and sub-area that needs to be updated from the device side, and reads the specified part of the L2P comparison table from the device side accordingly. L2P compares the record and updates the corresponding content in the HPA buffer. Table 3 describes example command sequence details for updating the HPA buffer:
Figure 109135109-A0305-02-0022-5
Figure 109135109-A0305-02-0023-6

參考如圖9所示的HPA緩衝區更新的操作順序圖,其中的操作611、613、617、619、633、635、651和653的技術方案相同於圖6,其餘的操作詳細說明如下: Referring to the operation sequence diagram of HPA buffer update as shown in Figure 9, the technical solutions of operations 611, 613, 617, 619, 633, 635, 651 and 653 are the same as those in Figure 6, and the rest of the operations are described in detail as follows:

操作915:主機端110從Ext_CSD暫存器(例如,Ext_CSD[67:64])的值獲取需要更新的區域和子區的資訊。 Operation 915: The host 110 obtains the information of the area and the sub-area to be updated from the value of the Ext_CSD register (eg, Ext_CSD[67:64]).

操作931:主機端110依據從閃存控制器130獲取的資訊決定欲向eMMC儲存裝置獲取的區域和子區的L2P對照紀錄。 Operation 931: The host 110 determines the L2P comparison record of the area and the sub-area to be acquired from the eMMC storage device according to the information obtained from the flash memory controller 130 .

操作955:主機端110接收每包中攜帶的L2P對照紀錄,並且更新HPA緩衝區中的相應部分內容。當更新完最後一包中攜帶的L2P對照紀錄後,主機端110發出CMD13給閃存控制器130,其中包含打包讀取完成的訊息。 Operation 955: the host 110 receives the L2P comparison record carried in each packet, and updates the corresponding part of the HPA buffer. After updating the L2P comparison record carried in the last packet, the host 110 sends a CMD13 to the flash memory controller 130, which includes a message of completion of packet reading.

命令處理操作619、715中關於CMD6的執行細節可參考如圖10所示的方法流程圖,此方法由處理單元134在載入並執行相關軟體或韌體程式碼時實施,進一步說明如下: For details about the execution of CMD6 in command processing operations 619 and 715, reference can be made to the method flow chart shown in FIG.

步驟S1010:通過主機介面131從主機端110接收到切換命令(CMD6)。 Step S1010: Receive a switching command (CMD6) from the host 110 through the host interface 131 .

步驟S1020:判斷CMD6的保留位元中是否包含啟動HPA功能和L2P對照表的獲取功能的資訊。如果是,流程繼續步驟S1030的處理。否則,流程繼續步驟S1040的處理。 Step S1020: Determine whether the reserved bits of CMD6 include the information of activating the HPA function and the acquisition function of the L2P comparison table. If yes, the process continues to step S1030. Otherwise, the flow continues to step S1040.

步驟S1030:在RAM 136儲存進入HPA對照表讀取狀態的資訊,用 於讓之後接收到CMD25時可以作為判斷目前裝置狀態的依據。 Step S1030: store in RAM 136 the information of entering the state of reading the HPA comparison table, use When CMD25 is received later, it can be used as the basis for judging the current device status.

步驟S1040:判斷CMD6的保留位元中是否包含啟動HPA功能的資訊。如果是,流程繼續步驟S1050的處理。否則,流程繼續步驟S1060的處理。 Step S1040: Determine whether the reserved bits of CMD6 contain the information of activating the HPA function. If yes, the process continues to step S1050. Otherwise, the flow continues to step S1060.

步驟S1050:在RAM 136儲存進入HPA讀取狀態的資訊,用於讓之後接收到CMD25時可以作為判斷目前裝置狀態的依據。 Step S1050: Store the information of entering the HPA reading state in the RAM 136, which can be used as a basis for judging the current device state when receiving the CMD25 later.

步驟S1060:執行傳統的切換程序。例如,切換裝置端的操作模式、修改Ext_CSD暫存器的值等等。 Step S1060: Execute a traditional switching procedure. For example, switch the operation mode of the device side, modify the value of the Ext_CSD register, and so on.

命令處理操作635、735和835中關於CMD25的執行細節可參考如圖11所示的方法流程圖,此方法由處理單元134在載入並執行相關軟體或韌體程式碼時實施,進一步說明如下: For details about the execution of CMD25 in command processing operations 635, 735 and 835, reference can be made to the method flow chart shown in FIG. :

步驟S1110:通過主機介面131從主機端110接收到寫入多塊命令(CMD25)及跟隨的資料塊。 Step S1110 : Receive a write multi-block command ( CMD25 ) and the following data blocks from the host 110 through the host interface 131 .

步驟S1121:依據RAM 136中儲存的資訊判斷是否進入HPA對照表讀取狀態或HPA讀取狀態。如果是,流程繼續進行步驟S1131的進一步判斷。否則,流程繼續進行步驟S1123的處理。 Step S1121: According to the information stored in the RAM 136, it is judged whether to enter the HPA comparison table reading state or the HPA reading state. If yes, the process proceeds to step S1131 for further judgment. Otherwise, the flow proceeds to step S1123.

步驟S1123:執行傳統的打包寫入程序(Packed Write Procedure),用於驅動閃存介面139寫入多包的資料至閃存裝置150。 Step S1123 : Execute a traditional Packed Write Procedure for driving the flash memory interface 139 to write multiple packets of data to the flash memory device 150 .

步驟S1131:依據RAM 136中儲存的資訊判斷是否進入HPA對照表讀取狀態。如果是,流程繼續進行步驟S1133的處理。否則(也就是進入HPA讀取狀態),流程繼續進行步驟S1141的判斷。 Step S1131: According to the information stored in the RAM 136, it is judged whether to enter the state of reading the HPA comparison table. If yes, the flow proceeds to step S1133. Otherwise (that is, entering the HPA reading state), the flow continues to the judgment of step S1141.

步驟S1133:驅動閃存介面139依據資料塊中攜帶的資訊(也就是特定區域和特定子區的資訊)從閃存裝置150讀取L2P對照表中指定部分的L2P對照紀錄。 Step S1133: Drive the flash memory interface 139 to read the L2P comparison record of the specified part in the L2P comparison table from the flash memory device 150 according to the information carried in the data block (that is, the information of the specific area and the specific sub-area).

步驟S1135:以如上所述多包的格式儲存L2P對照紀錄到RAM 136,使得將來在收到CMD18後能夠以多包的格式傳送L2P對照紀錄給主機端110。 Step S1135: Store the L2P comparison record in the above-mentioned multi-packet format to the RAM 136, so that the L2P comparison record can be sent to the host 110 in the multi-packet format after receiving the CMD 18 in the future.

步驟S1141:判斷欲讀取LBA資料所關聯的LBA對照紀錄是否已經被改變。如果是,則流程繼續進行步驟S1145的處理。否則,流程繼續進行步驟S1143的處理。 Step S1141: Determine whether the LBA comparison record associated with the LBA data to be read has been changed. If yes, the flow continues to step S1145. Otherwise, the flow continues to step S1143.

步驟S1143:驅動閃存介面139依據資料塊中攜帶的資訊(也就是L2P對照紀錄的資訊)從閃存裝置150讀取指定LBA的資料。 Step S1143: Drive the flash memory interface 139 to read the data of the specified LBA from the flash memory device 150 according to the information carried in the data block (that is, the information of the L2P comparison record).

步驟S1145:驅動閃存介面139依據變更後的相應LBA對照紀錄從閃存裝置150讀取指定LBA的資料。 Step S1145 : drive the flash memory interface 139 to read the data of the specified LBA from the flash memory device 150 according to the changed corresponding LBA comparison record.

步驟S1147:以如上所述多包的格式儲存指定LBA的資料到RAM 136,使得將來在收到CMD18後能夠以多包的格式傳送指定LBA的資料給主機端110。 Step S1147: Store the specified LBA data in the RAM 136 in the multi-packet format as described above, so that the specified LBA data can be sent to the host 110 in the multi-packet format after receiving the CMD 18 in the future.

本發明所述的方法中的全部或部分步驟可以計算機指令實現,例如儲存裝置中的韌體轉換層(Firmware Translation Layer,FTL)、特定硬體的驅動程式等。此外,也可實現於其他類型程式。所屬技術領域具有通常知識者可將本發明實施例的方法撰寫成計算機指令,為求簡潔不再加以描述。依據本發明實施例方法實施的計算機指令可儲存於適當的電腦可讀取媒體,例如DVD、CD-ROM、USB碟、硬碟,亦可置於可通過網路(例如,網際網路,或其他適當載具)存取的網路伺服器。 All or part of the steps in the method of the present invention can be realized by computer instructions, such as a firmware translation layer (Firmware Translation Layer, FTL) in a storage device, a specific hardware driver, and the like. In addition, it can also be implemented in other types of programs. Those skilled in the art can write the methods of the embodiments of the present invention into computer instructions, which will not be described again for the sake of brevity. The computer instructions implemented according to the method of the embodiment of the present invention can be stored in a suitable computer-readable medium, such as DVD, CD-ROM, USB disk, hard disk, and can also be placed through a network (for example, the Internet, or other appropriate means of accessing the web server.

雖然圖1至圖2中包含了以上描述的元件,但不排除在不違反發明的精神下,使用更多其他的附加元件,已達成更佳的技術效果。此外,雖然圖10、圖11的流程圖採用指定的順序來執行,但是在不違反發明精神的情況下,熟習此技藝人士可以在達到相同效果的前提下,修改這些步驟間的順序,所以,本發明並不侷限於僅使用如上所述的順序。此外,熟習此技藝人士亦可以將若干步驟整合為一個步驟,或者是除了這些步驟外,循序或平行地執行更多步驟,本發明亦不因此而侷限。 Although the elements described above are included in FIGS. 1 to 2 , it is not excluded that more additional elements may be used to achieve better technical effects without violating the spirit of the invention. In addition, although the flow charts in FIG. 10 and FIG. 11 are executed in a specified order, those skilled in the art can modify the order of these steps while achieving the same effect without violating the spirit of the invention. Therefore, The invention is not limited to using only the sequence described above. In addition, those skilled in the art may also integrate several steps into one step, or perform more steps sequentially or in parallel in addition to these steps, and the present invention is not limited thereby.

雖然本發明使用以上實施例進行說明,但需要注意的是,這些描述 並非用以限縮本發明。相反地,此發明涵蓋了熟習此技藝人士顯而易見的修改與相似設置。所以,申請權利要求範圍須以最寬廣的方式解釋來包含所有顯而易見的修改與相似設置。 While the invention has been described using the above examples, it should be noted that these descriptions It is not intended to limit the invention. On the contrary, the invention covers modifications and similar arrangements obvious to those skilled in the art. Therefore, the claims of the application must be interpreted in the broadest manner to include all obvious modifications and similar arrangements.

611~655:操作 611~655: Operation

Claims (18)

一種主機效能加速模式的資料讀取方法,由一主機端執行,包含:發出一第一切換命令給一閃存控制器,用於請求上述閃存控制器啟動一主機效能加速功能和一邏輯實體對照表的獲取功能,其中,上述主機端和上述閃存控制器通過嵌入式多媒體卡通訊協定彼此溝通;在發出上述第一切換命令之後,發出一第一寫入多塊命令給上述閃存控制器,用於寫入一第一資料塊到一閃存控制器,上述第一資料塊包含一區域編號和一子區編號;在發出上述第一寫入多塊命令之後,發出一第一讀取多塊命令給上述閃存控制器,用於從上述閃存控制器獲取相應於上述區域編號和上述子區編號的多個第一邏輯實體對照紀錄,其中,每個上述第一邏輯實體對照紀錄儲存一邏輯位址對應到一實體位址的資訊;儲存上述第一邏輯實體對照紀錄至一系統記憶體中的一主機效能加速緩衝區;以及提供至少一個上述第一邏輯實體對照紀錄給上述閃存控制器,用於讓上述閃存控制器依據提供的上述第一邏輯實體對照紀錄獲取相應邏輯位址的資料,並且回覆所述相應邏輯位址的資料給所述主機端。 A method for reading data in a host performance acceleration mode, executed by a host end, comprising: sending a first switching command to a flash memory controller for requesting the flash memory controller to start a host performance acceleration function and a logical entity comparison table The acquiring function, wherein, the above-mentioned host terminal and the above-mentioned flash memory controller communicate with each other through the embedded multimedia card communication protocol; after sending the above-mentioned first switching command, send a first write multi-block command to the above-mentioned flash memory controller for Write a first data block to a flash memory controller, and the above-mentioned first data block includes a region number and a sub-area number; after sending the above-mentioned first write multi-block command, send a first read multi-block command to The above-mentioned flash memory controller is used to obtain a plurality of first logical entity comparison records corresponding to the above-mentioned area number and the above-mentioned sub-area number from the above-mentioned flash memory controller, wherein each of the above-mentioned first logical entity comparison records stores a logical address corresponding to information to a physical address; storing the first logical entity comparison record to a host performance acceleration buffer in a system memory; and providing at least one of the first logical entity comparison records to the flash memory controller for allowing The flash memory controller obtains the data of the corresponding logical address according to the provided first logical entity comparison record, and replies the data of the corresponding logical address to the host. 如請求項1所述的主機效能加速模式的資料讀取方法,其中,每個上述第一邏輯實體對照紀錄包含一邏輯區塊位址和一實體區塊位址,上述邏輯區塊位址關聯於一第一長度的資料,上述實體區塊位址關聯於一第二長度的資料,上述第二長度大於上述第一長度。 The data reading method of the host performance acceleration mode as described in claim item 1, wherein each of the above-mentioned first logical entity comparison records includes a logical block address and a physical block address, and the logical block address is associated with For data of a first length, the physical block address is associated with data of a second length, and the second length is greater than the first length. 如請求項2所述的主機效能加速模式的資料讀取方法,其中,上述第一長度為512位元組。 The method for reading data in the host performance acceleration mode according to claim 2, wherein the first length is 512 bytes. 如請求項1所述的主機效能加速模式的資料讀取方法,包含:搜索上述主機效能加速緩衝區以獲取關聯於一邏輯區塊位址的一第二邏輯實體對照紀錄;發出一第二切換命令給上述閃存控制器,用於請求上述閃存控制器啟動上述主機效能加速功能,但不啟動上述邏輯實體對照表的獲取功能;在發出上述第二切換命令之後,發出一第二寫入多塊命令給上述閃存控制器,用於寫入一第二資料塊到上述閃存控制器,上述第二資料塊包含上述第二邏輯實體對照紀錄;以及在發出上述第二寫入多塊命令之後,發出一第二讀取多塊命令給上述閃存控制器,用於從上述閃存控制器獲取相應於上述第二邏輯實體對照紀錄的資料。 The data reading method of the host performance acceleration mode as described in claim item 1, comprising: searching the above-mentioned host performance acceleration buffer to obtain a second logical entity comparison record associated with a logical block address; sending a second switch Command to the above-mentioned flash memory controller to request the above-mentioned flash memory controller to start the above-mentioned host performance acceleration function, but not to start the acquisition function of the above-mentioned logical entity comparison table; after sending the above-mentioned second switch command, send a second write to multiple blocks Command to the above-mentioned flash memory controller for writing a second data block to the above-mentioned flash memory controller, the above-mentioned second data block includes the above-mentioned second logical entity comparison record; and after issuing the above-mentioned second write multiple block command, A second read multi-block command is given to the flash memory controller for acquiring data corresponding to the second logical entity collation record from the flash memory controller. 一種主機效能加速模式的資料讀取方法,由一閃存控制器執行,包含:從一主機端接收一第一切換命令,用於請求上述閃存控制器啟動一主機效能加速功能和一邏輯實體對照表的獲取功能,其中,上述主機端和上述閃存控制器通過嵌入式多媒體卡通訊協定彼此溝通;因應上述第一切換命令而進入一第一狀態;在進入上述第一狀態期間從上述主機端收到一第一寫入多塊命令;因應上述第一寫入多塊命令從上述主機端收到的一第一資料塊中獲取一區域編號和一子區編號,以及從一閃存裝置讀取相應於上述區域編號和上述子區編號的多個第一邏輯實體對照紀錄; 在進入上述第一狀態期間從上述主機端收到一第一讀取多塊命令;以及因應上述第一讀取多塊命令傳送上述第一邏輯實體對照紀錄給主機端,其中,每個上述第一邏輯實體對照紀錄儲存一邏輯位址對應到一實體位址的資訊,用於讓上述主機端提供至少一個上述第一邏輯實體對照紀錄給上述閃存控制器,使得上述閃存控制器依據提供的上述第一邏輯實體對照紀錄獲取相應邏輯位址的資料,並且回覆所述相應邏輯位址的資料給所述主機端。 A method for reading data in a host performance acceleration mode, executed by a flash memory controller, comprising: receiving a first switching command from a host end for requesting the flash memory controller to start a host performance acceleration function and a logical entity comparison table The acquiring function, wherein, the above-mentioned host terminal and the above-mentioned flash memory controller communicate with each other through the embedded multimedia card communication protocol; enter a first state in response to the above-mentioned first switching command; receive from the above-mentioned host terminal during entering the above-mentioned first state A first write multi-block command; in response to the above-mentioned first write multi-block command, obtain an area number and a sub-area number from a first data block received from the above-mentioned host end, and read from a flash memory device corresponding to Multiple first logical entity comparison records of the above-mentioned area number and the above-mentioned sub-area number; Receive a first read multi-block command from the host during entering the first state; and transmit the first logical entity comparison record to the host in response to the first read multi-block command, wherein each of the first read multi-block commands A logical entity comparison record stores information corresponding to a logical address to a physical address, and is used to allow the host to provide at least one of the first logical entity comparison records to the flash memory controller, so that the flash memory controller according to the provided The first logical entity obtains the data of the corresponding logical address according to the record, and replies the data of the corresponding logical address to the host. 如請求項5所述的主機效能加速模式的資料讀取方法,其中,上述第一切換命令中的一第一保留位元包含啟動上述主機效能加速功能的資訊,以及上述第一切換命令中的一第二保留位元包含啟動上述邏輯實體對照表的獲取功能的資訊。 The data reading method of the host performance acceleration mode as described in claim item 5, wherein, a first reserved bit in the above-mentioned first switching command includes the information of activating the above-mentioned host performance acceleration function, and the information in the above-mentioned first switching command A second reserved bit contains information to activate the acquisition function of the logical entity comparison table. 如請求項5所述的主機效能加速模式的資料讀取方法,包含:從上述主機端接收一第二切換命令,用於請求上述閃存控制器啟動上述主機效能加速功能,但不啟動上述邏輯實體對照表的獲取功能;因應上述第二切換命令而進入一第二狀態;在進入上述第二狀態期間從上述主機端收到一第二寫入多塊命令;因應上述第二寫入多塊命令從上述主機端收到的一第二資料塊中獲取一第二邏輯實體對照紀錄,以及從上述閃存裝置讀取相應於上述第二邏輯實體對照紀錄的資料;在進入上述第二狀態期間從上述主機端收到一第二讀取多塊命令;以及因應上述第二讀取多塊命令傳送相應於上述第二邏輯實體對照紀錄的資料給主機端。 The data reading method of the host performance acceleration mode as described in claim item 5, comprising: receiving a second switching command from the host end, for requesting the flash memory controller to activate the host performance acceleration function, but not to activate the logic entity The acquisition function of the comparison table; enter a second state in response to the second switching command; receive a second write multi-block command from the host during entering the second state; respond to the second write multi-block command Obtain a second logical entity comparison record from a second data block received by the host end, and read data corresponding to the second logical entity comparison record from the flash memory device; during entering the second state, from the above-mentioned The host end receives a second read multi-block command; and transmits data corresponding to the above-mentioned second logical entity collation record to the host end in response to the second read multi-block command. 如請求項7所述的主機效能加速模式的資料讀取方法,其中,上述第二切換命令中的一第一保留位元包含啟動上述主機效能加速功能的資訊,以及上述第二切換命令中的一第二保留位元包含不啟動上述邏輯實體對照表的獲取功能的資訊。 The data reading method of the host performance acceleration mode as described in claim item 7, wherein, a first reserved bit in the above-mentioned second switching command includes the information for activating the above-mentioned host performance acceleration function, and the information in the above-mentioned second switching command A second reserved bit contains information that does not activate the acquisition function of the logical entity comparison table. 如請求項7所述的主機效能加速模式的資料讀取方法,其中,上述第一寫入多塊命令和上述第二寫入多塊命令中的任一者用於讓上述主機端不斷寫入資料塊到上述閃存控制器,直到預設數目的資料塊已經寫入完畢。 The method for reading data in the host performance acceleration mode according to claim 7, wherein any one of the first write multi-block command and the second write multi-block command is used to allow the host to continuously write data blocks to the above-mentioned flash memory controller until a predetermined number of data blocks have been written. 如請求項7所述的主機效能加速模式的資料讀取方法,其中,上述第一讀取多塊命令和上述第二讀取多塊命令中的任一者用於讓上述主機端不斷從上述閃存控制器讀取資料塊,直到預設數目的資料塊已經讀取完畢。 The data reading method in the host performance acceleration mode as described in claim item 7, wherein any one of the above-mentioned first read multi-block command and the above-mentioned second read multi-block command is used to allow the above-mentioned host to continuously read from the above-mentioned The flash memory controller reads data blocks until a predetermined number of data blocks have been read. 一種主機效能加速模式的資料讀取的裝置,設置在一閃存控制器中,包含:一主機介面,耦接一主機端;一閃存介面,耦接一閃存裝置;以及一處理單元,耦接上述主機介面和上述閃存介面,通過上述主機介面從上述主機端接收一第一切換命令,用於請求上述裝置啟動一主機效能加速功能和一邏輯實體對照表的獲取功能;因應上述第一切換命令而進入一第一狀態;在進入上述第一狀態期間通過上述主機介面從上述主機端收到一第一寫入多塊命令;因應上述第一寫入多塊命令從上述主機端通過上述主機介面收到的一第一資料塊中獲取一區域編號和一子區編號,以及通過上 述閃存介面從上述閃存裝置讀取相應於上述區域編號和上述子區編號的多個第一邏輯實體對照紀錄;在進入上述第一狀態期間通過上述主機介面從上述主機端收到一第一讀取多塊命令;以及因應上述第一讀取多塊命令通過上述主機介面傳送上述第一邏輯實體對照紀錄給主機端,其中,每個上述第一邏輯實體對照紀錄儲存一邏輯位址對應到一實體位址的資訊,用於讓上述主機端提供至少一個上述第一邏輯實體對照紀錄給上述裝置,使得上述裝置依據提供的上述第一邏輯實體對照紀錄獲取相應邏輯位址的資料,並且回覆所述相應邏輯位址的資料給所述主機端,其中,上述主機端和上述裝置通過嵌入式多媒體卡通訊協定彼此溝通。 A device for reading data in a host performance acceleration mode, set in a flash memory controller, including: a host interface, coupled to a host end; a flash interface, coupled to a flash memory device; and a processing unit, coupled to the above-mentioned The host interface and the above-mentioned flash memory interface receive a first switch command from the above-mentioned host end through the above-mentioned host interface, and are used to request the above-mentioned device to start a host performance acceleration function and an acquisition function of a logical entity comparison table; in response to the above-mentioned first switch command. Entering a first state; receiving a first write multi-block command from the host side through the host interface during entering the first state; receiving the first write multi-block command from the host side through the host interface in response to the first write multi-block command Obtain an area number and a sub-area number from a first data block received, and pass the above The flash memory interface reads a plurality of first logical entity comparison records corresponding to the above-mentioned area number and the above-mentioned sub-area number from the above-mentioned flash memory device; during entering the above-mentioned first state, a first read is received from the above-mentioned host terminal through the above-mentioned host interface fetch multiple blocks command; and transmit the above-mentioned first logical entity collation record to the host through the above-mentioned host interface in response to the above-mentioned first read multiple-block command, wherein each of the above-mentioned first logical entity collation records stores a logical address corresponding to a The physical address information is used to allow the host to provide at least one first logical entity comparison record to the above-mentioned device, so that the above-mentioned device obtains the data of the corresponding logical address according to the provided first logical entity comparison record, and replies to the The data of the corresponding logical address is sent to the host, wherein the host and the device communicate with each other through the embedded multimedia card communication protocol. 如請求項11所述的主機效能加速模式的資料讀取的裝置,其中,上述第一邏輯實體對照紀錄包含一邏輯區塊位址和一實體區塊位址,上述邏輯區塊位址關聯於一第一長度的資料,上述實體區塊位址關聯於一第二長度的資料,上述第二長度大於上述第一長度。 The device for reading data in the host performance acceleration mode as described in claim item 11, wherein the first logical entity comparison record includes a logical block address and a physical block address, and the logical block address is associated with A data of a first length, the physical block address is associated with a data of a second length, and the second length is greater than the first length. 如請求項12所述的主機效能加速模式的資料讀取的裝置,其中,上述第一長度為512位元組。 The device for reading data in the host performance acceleration mode according to claim 12, wherein the first length is 512 bytes. 如請求項11所述的主機效能加速模式的資料讀取的裝置,其中,上述第一切換命令中的一第一保留位元包含啟動上述主機效能加速功能的資訊,以及上述第一切換命令中的一第二保留位元包含啟動上述邏輯實體對照表的獲取功能的資訊。 The device for reading data in the host performance acceleration mode as described in claim item 11, wherein a first reserved bit in the above-mentioned first switching command includes information for activating the above-mentioned host performance acceleration function, and in the above-mentioned first switching command A second reserved bit includes information for activating the acquisition function of the logical entity comparison table. 如請求項11所述的主機效能加速模式的資料讀取的裝置,其中, 上述處理單元通過上述主機介面從上述主機端接收一第二切換命令,用於請求上述裝置啟動上述主機效能加速功能,但不啟動上述邏輯實體對照表的獲取功能;因應上述第二切換命令而進入一第二狀態;在進入上述第二狀態期間通過上述主機介面從上述主機端收到一第二寫入多塊命令;因應上述第二寫入多塊命令通過上述主機介面從上述主機端收到的一第二資料塊中獲取一第二邏輯實體對照紀錄,以及通過上述閃存介面從上述閃存裝置讀取相應於上述第二邏輯實體對照紀錄的資料;在進入上述第二狀態期間通過上述主機介面從上述主機端收到一第二讀取多塊命令;以及因應上述第二讀取多塊命令通過上述主機介面傳送相應於上述第二邏輯實體對照紀錄的資料給主機端。 The device for reading data in the host performance acceleration mode as described in claim 11, wherein, The above-mentioned processing unit receives a second switching command from the above-mentioned host side through the above-mentioned host interface, and is used to request the above-mentioned device to start the above-mentioned host performance acceleration function, but does not start the above-mentioned acquisition function of the logical entity comparison table; A second state; during entering the second state, a second write multi-block command is received from the host side through the host interface; in response to the second write multi-block command received from the host side through the host interface Obtain a second logical entity comparison record in a second data block of the above-mentioned flash memory device, and read the data corresponding to the above-mentioned second logical entity comparison record from the above-mentioned flash memory device through the above-mentioned flash memory interface; receiving a second read multi-block command from the host; and sending data corresponding to the second logical entity collation record to the host through the host interface in response to the second read multi-block command. 如請求項15所述的主機效能加速模式的資料讀取的裝置,其中,上述第二切換命令中的一第一保留位元包含啟動上述主機效能加速功能的資訊,以及上述第二切換命令中的一第二保留位元包含不啟動上述邏輯實體對照表的獲取功能的資訊。 The device for reading data in the host performance acceleration mode as described in claim item 15, wherein a first reserved bit in the above-mentioned second switching command includes information for activating the above-mentioned host performance acceleration function, and in the above-mentioned second switching command A second reserved bit includes information that does not activate the acquisition function of the logical entity comparison table. 如請求項15所述的主機效能加速模式的資料讀取的裝置,其中,上述第一寫入多塊命令和上述第二寫入多塊命令中的任一者用於不斷寫入資料塊到上述裝置,直到預設數目的資料塊已經寫入完畢。 The device for reading data in the host performance acceleration mode as described in claim 15, wherein any one of the above-mentioned first write multi-block command and the above-mentioned second write multi-block command is used to continuously write data blocks to The above means until the preset number of data blocks have been written. 如請求項15所述的主機效能加速模式的資料讀取的裝置,其中,上述第一讀取多塊命令和上述第二讀取多塊命令中的任一者用於讓上述主機端不斷從上述裝置讀取資料塊,直到預設數目的資料塊已經讀取完畢。 The device for reading data in the host performance acceleration mode according to claim 15, wherein any one of the first read multi-block command and the second read multi-block command is used to make the host end continuously read from The above-mentioned device reads data blocks until a predetermined number of data blocks have been read.
TW109135109A 2020-07-16 2020-10-12 Method and apparatus for data reads in host performance acceleration mode TWI795680B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US202063052717P 2020-07-16 2020-07-16
US63/052,717 2020-07-16

Publications (2)

Publication Number Publication Date
TW202205099A TW202205099A (en) 2022-02-01
TWI795680B true TWI795680B (en) 2023-03-11

Family

ID=79327242

Family Applications (4)

Application Number Title Priority Date Filing Date
TW109135089A TWI761983B (en) 2020-07-16 2020-10-12 Method and apparatus for data reads in host performance acceleration mode
TW109135126A TWI760884B (en) 2020-07-16 2020-10-12 Method and apparatus for data reads in host performance acceleration mode
TW109135109A TWI795680B (en) 2020-07-16 2020-10-12 Method and apparatus for data reads in host performance acceleration mode
TW111109302A TW202225979A (en) 2020-07-16 2020-10-12 Method and computer program product and apparatus for executing embedded multi-media controller command

Family Applications Before (2)

Application Number Title Priority Date Filing Date
TW109135089A TWI761983B (en) 2020-07-16 2020-10-12 Method and apparatus for data reads in host performance acceleration mode
TW109135126A TWI760884B (en) 2020-07-16 2020-10-12 Method and apparatus for data reads in host performance acceleration mode

Family Applications After (1)

Application Number Title Priority Date Filing Date
TW111109302A TW202225979A (en) 2020-07-16 2020-10-12 Method and computer program product and apparatus for executing embedded multi-media controller command

Country Status (2)

Country Link
CN (3) CN113946278A (en)
TW (4) TWI761983B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678145A (en) * 2012-09-06 2014-03-26 慧荣科技股份有限公司 Data storage device and flash memory control method
US20190235762A1 (en) * 2018-01-29 2019-08-01 Toshiba Memory Corporation Memory system controlling nonvolatile memory
TW202009936A (en) * 2018-08-30 2020-03-01 大陸商合肥沛睿微電子股份有限公司 Flash memory controller and associated accessing method and electronic device
TWI698874B (en) * 2018-08-31 2020-07-11 大陸商合肥沛睿微電子股份有限公司 Flash memory controller and associated accessing method and electronic device

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070061597A1 (en) * 2005-09-14 2007-03-15 Micky Holtzman Secure yet flexible system architecture for secure devices with flash mass storage memory
KR101736337B1 (en) * 2011-02-28 2017-05-30 삼성전자주식회사 Nonvolatile memory device, controller for controlling the same, and operation method thereor
TWI521343B (en) * 2011-08-01 2016-02-11 Toshiba Kk An information processing device, a semiconductor memory device, and a semiconductor memory device
US9348783B2 (en) * 2012-04-19 2016-05-24 Lockheed Martin Corporation Apparatus and method emulating a parallel interface to effect parallel data transfer from serial flash memory
US9395924B2 (en) * 2013-01-22 2016-07-19 Seagate Technology Llc Management of and region selection for writes to non-volatile memory
US9547447B2 (en) * 2014-01-03 2017-01-17 Advanced Micro Devices, Inc. Dedicated interface for coupling flash memory and dynamic random access memory
US10126950B2 (en) * 2014-12-22 2018-11-13 Intel Corporation Allocating and configuring persistent memory
CN104809075B (en) * 2015-04-20 2017-09-12 电子科技大学 A kind of solid state record device and method for accessing real-time parallel processing
US9940028B2 (en) * 2015-11-13 2018-04-10 Samsung Electronics Co., Ltd Multimode storage device
KR20200133817A (en) * 2018-04-23 2020-11-30 마이크론 테크놀로지, 인크. Refresh host logical-to-physical information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678145A (en) * 2012-09-06 2014-03-26 慧荣科技股份有限公司 Data storage device and flash memory control method
US20190235762A1 (en) * 2018-01-29 2019-08-01 Toshiba Memory Corporation Memory system controlling nonvolatile memory
TW202009936A (en) * 2018-08-30 2020-03-01 大陸商合肥沛睿微電子股份有限公司 Flash memory controller and associated accessing method and electronic device
TWI698874B (en) * 2018-08-31 2020-07-11 大陸商合肥沛睿微電子股份有限公司 Flash memory controller and associated accessing method and electronic device

Also Published As

Publication number Publication date
CN113946278A (en) 2022-01-18
CN113946277A (en) 2022-01-18
CN113946279A (en) 2022-01-18
TWI761983B (en) 2022-04-21
TW202205099A (en) 2022-02-01
TWI760884B (en) 2022-04-11
TW202205097A (en) 2022-02-01
TW202205098A (en) 2022-02-01
TW202225979A (en) 2022-07-01

Similar Documents

Publication Publication Date Title
US11636032B2 (en) Memory system, data storage device, user device and data management method thereof
US11429545B2 (en) Method and apparatus for data reads in host performance acceleration mode
KR102649131B1 (en) Apparatus and method for checking valid data in block capable of large volume data in memory system
US20220253388A1 (en) Method of data caching and device caching data
US20130103893A1 (en) System comprising storage device and related methods of operation
US20160124639A1 (en) Dynamic storage channel
TW202101227A (en) Apparatus and method and computer program product for handling flash physical-resource sets
KR20120045422A (en) Memory system and user device, and data management method thereof
CN107943710B (en) Memory management method and memory controller using the same
US11544186B2 (en) Method and apparatus for data reads in host performance acceleration mode
WO2021035555A1 (en) Data storage method and apparatus for solid state disk and solid state disk (ssd)
TWI756854B (en) Method and apparatus and computer program product for managing data storage
US20230273878A1 (en) Storage device for classifying data based on stream class number, storage system, and operating method thereof
CN115079957B (en) Request processing method, device, controller, equipment and storage medium
TWI795680B (en) Method and apparatus for data reads in host performance acceleration mode
US11544185B2 (en) Method and apparatus for data reads in host performance acceleration mode
CN110968527A (en) FTL provided caching
TWI835027B (en) Method and computer program product and apparatus for updating host-to-flash address mapping table
KR102653373B1 (en) Controller and operation method thereof
US20230359550A1 (en) File system integration into data mining model
TW202321921A (en) Method and computer program product and apparatus for updating host-to-flash address mapping table
KR20220159268A (en) Host device, storage device and electronic device
KR20230034194A (en) Dual mode storage device