TWI810876B - Method and computer program product and apparatus for data access in response to host discard commands - Google Patents

Method and computer program product and apparatus for data access in response to host discard commands Download PDF

Info

Publication number
TWI810876B
TWI810876B TW111112363A TW111112363A TWI810876B TW I810876 B TWI810876 B TW I810876B TW 111112363 A TW111112363 A TW 111112363A TW 111112363 A TW111112363 A TW 111112363A TW I810876 B TWI810876 B TW I810876B
Authority
TW
Taiwan
Prior art keywords
host
discard
extended
logical address
command
Prior art date
Application number
TW111112363A
Other languages
Chinese (zh)
Other versions
TW202340939A (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 慧榮科技股份有限公司
Priority to TW111112363A priority Critical patent/TWI810876B/en
Application granted granted Critical
Publication of TWI810876B publication Critical patent/TWI810876B/en
Publication of TW202340939A publication Critical patent/TW202340939A/en

Links

Images

Abstract

The invention is related to a method, a computer program product, and an apparatus for executing host discard commands. The method includes: allocating space in a random access memory (RAM) to store an extended discard table including multiple entries each records a logical address of user data that has been discarded; receiving a host discard command, which indicates a first logical address of user data that is discarded, from a host side; appending a new entry including the first logical address to the extended discard table; and setting a start-address register and an end-address register in a performance engine to redefine an address arrange that holds the extended discard table in the RAM. By using the installation of the performance engine with the usage of the extended discard table, it avoids the processing unit to consume excessive computation resource to determine if a logical address of user data that is to be written, which is advised by a host write command, or a logical address of user data that is to be read, which is advised by a host read command, falls within logical address ranges that have been discarded.

Description

因應主機丟棄命令的資料存取方法及產品電腦程式及裝置Data access method and product computer program and device in response to host discard command

本發明涉及儲存裝置,尤指一種因應主機丟棄命令的資料存取方法、產品電腦程式及裝置。The invention relates to a storage device, in particular to a data access method, a product computer program and a device in response to a host discarding command.

閃存通常分為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 at 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, discard, erase, etc.), and the address used on this command. The address can point to a page (the smallest block of data for a write operation in flash memory) or a block (the smallest block of data for an erase operation in flash memory). In order to improve the execution performance of the flash memory controller, the present invention proposes a data access method, product computer program and device in response to host discarding commands.

有鑑於此,如何減輕或消除上述相關領域的缺失,實為有待解決的問題。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 data access method in response to a host discarding command, executed by a processing unit, including: configuring space in a random access memory for an extended discarding table, including a plurality of items, and each item records that it has been discarded The logical address of the user data; receive the host discard command from the host end, point out the first logical address of the user data that is no longer used; add a new item including the first logical address to the extended formula discarding table; and setting a start address register and an end address register in the performance engine for redefining the address range of the extended discard table stored in the random access memory, so that the performance engine borrows The extended discard table is searched from the address range in the random access memory to determine whether the user data of a specific logical address is no longer used.

本說明書另涉及一種電腦程式產品,包含程式碼。當處理單元執行所述程式碼時,實施如上所述的因應主機丟棄命令的資料存取方法。This manual also relates to a computer program product, including program codes. When the processing unit executes the program code, the above-mentioned data access method in response to the host discarding command is implemented.

本說明書更另涉及一種因應主機丟棄命令的資料存取裝置,包含:隨機存取記憶體;性能引擎;和處理單元。隨機存取記憶體用於配置空間給擴展式丟棄表,其包含多個項目,而每個所述項目記載已經丟棄的使用者資料的邏輯位址。性能引擎包含開始位址寄存器和結束位址寄存器,用於定義所述隨機存取記憶體中儲存所述擴展式丟棄表的位址範圍。處理單元用於從主機端接收主機丟棄命令,其指出不再使用的使用者資料的第一邏輯位址;新增包含所述第一邏輯位址的新項目至所述擴展式丟棄表;以及設定所述性能引擎中的所述開始位址寄存器和所述結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍,使得所述性能引擎藉由在所述隨機存取記憶體中的所述位址範圍搜索所述擴展式丟棄表以判斷特定邏輯位址的使用者資料是否已經不再使用。The specification further relates to a data access device for responding to a host discarding a command, including: a random access memory; a performance engine; and a processing unit. The random access memory is used to allocate space for the extended discard table, which includes a plurality of entries, and each of the entries records the logical address of the discarded user data. The performance engine includes a start address register and an end address register, which are used to define an address range in the random access memory for storing the extended discard table. The processing unit is used for receiving a host discarding command from the host end, which indicates a first logical address of the user data that is no longer used; adding a new item including the first logical address to the extended discarding table; and Setting the start address register and the end address register in the performance engine is used to redefine the address range of the extended discard table stored in the random access memory, so that the performance The engine searches the extended discard table in the address range of the random access memory to determine whether the user data of a specific logical address is no longer used.

上述實施例的優點之一,通過性能引擎的設置和擴展式丟棄表的使用,避免處理單元耗費過多的運算資源來判斷主機寫入命令所要寫入的使用者資料的邏輯位址或者主機讀取命令所要讀取的使用者資料的邏輯位址是否落入之前已經丟棄的邏輯位址區間。One of the advantages of the above-mentioned embodiment is that through the setting of the performance engine and the use of the extended discard table, it is avoided that the processing unit consumes too much computing resources to judge the logical address of the user data to be written by the host write command or the host reads the data. Whether the logical address of the user data to be read by the command falls within the previously discarded logical address range.

本發明的其他優點將搭配以下的說明和圖式進行更詳細的解說。Other advantages of the present invention will be explained in more detail with the following description and drawings.

以下說明為完成發明的較佳實現方式,其目的在於描述本發明的基本精神,但並不用以限定本發明。實際的發明內容必須參考之後的權利要求範圍。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包含主機端(Host Side)110、閃存控制器130及閃存模組150,並且閃存控制器130及閃存模組150可合稱為裝置端(Device Side)。電子裝置10可實施於個人電腦、筆記型電腦(Laptop PC)、平板電腦、手機、數位相機、數位攝影機等電子產品之中。主機端110與閃存控制器130的主機介面(Host Interface)137可以通用序列匯流排(Universal Serial Bus,USB)、先進技術附著(advanced technology attachment,ATA)、序列先進技術附著(serial advanced technology attachment,SATA)、快速周邊元件互聯(peripheral component interconnect express,PCI-E)、通用快閃記憶儲存(Universal Flash Storage,UFS)、嵌入式多媒體卡(Embedded Multi-Media Card,eMMC)等通訊協定彼此溝通。閃存控制器130的閃存介面(Flash Interface)139與閃存模組150可以雙倍資料率(Double Data Rate,DDR)通訊協定彼此溝通,例如,開放NAND快閃(Open NAND Flash Interface,ONFI)、雙倍資料率開關(DDR Toggle)或其他通訊協定。閃存控制器130包含處理單元134,可使用多種方式實施,如使用通用硬體(例如,單一處理器、具平行處理能力的多處理器、圖形處理器或其他具運算能力的處理器),並且在執行軟體以及/或韌體指令時,提供之後描述的功能。處理單元134通過主機介面131接收主機命令,例如讀取命令(Read Command)、寫入命令(Write Command)、丟棄命令(Discard Command)、抹除命令(Erase Command)等,排程並執行這些命令。閃存控制器130另包含隨機存取記憶體(Random Access Memory, RAM)136,可實施為動態隨機存取記憶體(Dynamic Random Access Memory,DRAM)、靜態隨機存取記憶體(Static Random Access Memory,SRAM)或上述兩者的結合,用於配置空間作為資料緩衝區,儲存從主機端110讀取並即將寫入閃存模組150的使用者資料(也可稱為主機資料),以及從閃存模組150讀取並即將輸出給主機端110的使用者資料。隨機存取記憶體136另可儲存執行過程中需要的資料,例如,變數、資料表、主機與閃存位址對照表(Host-to-Flash Address Mapping Table,簡稱H2F表)、閃存與主機位址對照表(Flash-to-Host Address Mapping Table,簡稱F2H表)等。閃存介面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 side (Host Side) 110 , a flash memory controller 130 and a flash memory module 150 , and the flash memory controller 130 and the flash memory module 150 may be collectively referred to as a device side (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 interface (Host Interface) 137 of the host terminal 110 and the flash memory controller 130 can be Universal Serial Bus (Universal Serial Bus, USB), advanced technology attachment (advanced technology attachment, ATA), serial advanced technology attachment (serial advanced technology attachment, SATA), peripheral component interconnect express (PCI-E), universal flash memory storage (Universal Flash Storage, UFS), embedded multimedia card (Embedded Multi-Media Card, eMMC) and other communication protocols communicate with each other. The flash memory interface (Flash Interface) 139 of the flash memory controller 130 and the flash memory module 150 can communicate with each other through a double data rate (Double Data Rate, DDR) protocol, for example, open NAND flash (Open NAND Flash Interface, ONFI), dual 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 single processor, multiple processors with parallel processing capabilities, graphics processing units, or other processors with computing capabilities), and The functions described later are provided when the software and/or firmware instructions are executed. The processing unit 134 receives host commands through the host interface 131, such as read commands (Read Command), write commands (Write Command), discard commands (Discard Command), erase commands (Erase Command), etc., schedule and execute these commands . The flash controller 130 further 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, store user data (also called host data) that is read from the host end 110 and will be written into the flash memory module 150, and read from the flash memory module 150. The group 150 reads and outputs user data to the host 110 . The random access memory 136 can also store data needed during execution, such as variables, data tables, host-to-flash address mapping table (H2F table for short), flash memory and host address Comparison table (Flash-to-Host Address Mapping Table, F2H table for short), etc. The flash memory interface 139 includes a NAND flash memory controller (NAND Flash Controller, NFC), which provides functions required for accessing the flash memory module 150, such as command sequencer (Command Sequencer), low density parity check (Low Density Parity Check, LDPC) wait.

在一些實施例中,處理單元134可服從eMMC的規範,例如於2019年1月發表的 EMBEDDED MULTI-MEDIA CARD (e•MMC), ELECTRICAL STANDARD (5.1)的第6.6.12節,通過主機介面131從主機端110接收丟棄命令(Discard Command)。在另一些實施例中,處理單元134可服從UFS的規範,例如於2020年1月發表的UNIVERSAL FLASH STORAGE (UFS), Version 3.1的第11.3.26節,通過主機介面131從主機端110接收解除映射命令(UNMAP Command)。如果解除映射命令中的單元描述符(Unit Descriptor)的參數”bProvisioningType”設為”02h”時,代表這是一個丟棄命令。主機端110可發送如上所述的主機丟棄命令給閃存控制器130,用以指出不再使用的使用者資料的邏輯位址,例如以主頁面編號(Host Page Number)、邏輯區塊位址(Logical Block Address,LBA)等方式表示。不同於主機抹除命令,閃存控制器130於執行主機丟棄命令時,不需要將用以儲存指定邏輯位址的資料的記憶單元進行實體的抹除,只需要標記此邏輯位址的資料已經不存在。在合適的時候,閃存控制器130執行垃圾回收程序來搜集相應於標記的邏輯位址的實體記憶單元並進行抹除。 In some embodiments, the processing unit 134 can comply with eMMC specifications, such as Section 6.6.12 of EMBEDDED MULTI-MEDIA CARD (e MMC), ELECTRICAL STANDARD (5.1) published in January 2019, through the host interface 131 A discard command (Discard Command) is received from the host 110 . In some other embodiments, the processing unit 134 can comply with the UFS specification, such as section 11.3.26 of UNIVERSAL FLASH STORAGE (UFS), Version 3.1 published in January 2020, and receives the release from the host terminal 110 through the host interface 131. Mapping command (UNMAP Command). If the parameter "bProvisioningType" of the unit descriptor (Unit Descriptor) in the unmap command is set to "02h", it means that this is a discard command. The host end 110 can send the above-mentioned host discarding command to the flash memory controller 130, in order to point out the logical address of the user data that is no longer used, such as the main page number (Host Page Number), logical block address ( Logical Block Address, LBA) and other means. Different from the host erase command, when the flash memory controller 130 executes the host discard command, it does not need to physically erase the memory unit used to store the data at the specified logical address, but only needs to mark the data at the logical address no longer exist. When appropriate, the flash memory controller 130 executes a garbage collection program to collect and erase the physical memory unit corresponding to the marked logical address.

閃存控制器130中可配置匯流排架構(Bus Architecture)132,用於讓元件之間彼此耦接以傳遞資料、位址、控制訊號等,這些元件包含主機介面131、處理單元134、RAM 136、性能引擎(Performance Engine)137、直接記憶體存取(Direct Memory Access,DMA)控制器138、閃存介面139等。於一些實施例中,主機介面131、處理單元134、RAM 136、性能引擎137、DMA控制器138與閃存介面139可通過單一匯流排彼此耦接。於另一些實施例中,閃存控制器130中可配置高速匯流排,用於讓處理單元134、性能引擎137、DMA控制器138與RAM 136彼此耦接,並且配置低速匯流排,用於讓處理單元134、DMA控制器138、主機介面131與閃存介面139彼此耦接。DMA控制器138可依據處理單元134的指令,通過匯流排架構132在元件間搬移資料,例如,將主機介面131或閃存介面139中特定資料緩存器(Data Buffer)的資料搬到RAM 136中的特定位址,將RAM 136中特定位址的資料搬到將主機介面131或閃存介面139中的特定資料緩存器等。A bus architecture (Bus Architecture) 132 can be configured in the flash memory controller 130 for coupling components to transmit data, addresses, control signals, etc. These components include a host interface 131, a processing unit 134, a RAM 136, A performance engine (Performance Engine) 137, a direct memory access (Direct Memory Access, DMA) controller 138, a flash memory interface 139, and the like. In some embodiments, the host interface 131 , the processing unit 134 , the RAM 136 , the performance engine 137 , the DMA controller 138 and the flash memory interface 139 may be coupled to each other through a single bus. In other embodiments, a high-speed bus can be configured in the flash memory controller 130 for coupling the processing unit 134, the performance engine 137, the DMA controller 138, and the RAM 136 to each other, and a low-speed bus can be configured for processing The unit 134 , the DMA controller 138 , the host interface 131 and the flash memory interface 139 are coupled to each other. The DMA controller 138 can move data between components through the bus structure 132 according to the instructions of the processing unit 134, for example, move the data of a specific data buffer (Data Buffer) in the host interface 131 or the flash memory interface 139 to the RAM 136 specific address, move the data of the specific address in the RAM 136 to the specific data register in the host interface 131 or the flash memory interface 139 .

匯流排包含並行的物理線,連接閃存控制器130中兩個以上的組件。匯流排是一種共享的傳輸媒體,在任意的時間上,只能有兩個裝置可以使用這些線來彼此溝通,用於傳遞資料。資料及控制訊號能夠在組件間分別沿資料和控制線進行雙向傳播,但另一方面,位址訊號只能沿位址線進行單向傳播。例如,當處理單元134想要讀取RAM 136的特定位址上的資料時,處理單元134在位址線上傳送此位址給RAM 136。接著,此位址的資料會在資料線上回覆給處理單元134。為了完成資料讀取操作,控制訊號會使用控制線進行傳遞。A bus comprises parallel physical wires connecting two or more components in flash memory controller 130 . A bus is a shared transmission medium. At any one time, only two devices can use these lines to communicate with each other and transfer data. Data and control signals can travel bidirectionally along the data and control lines respectively between components, but on the other hand, address signals can only travel unidirectionally along the address lines. For example, when the processing unit 134 wants to read data at a specific address of the RAM 136 , the processing unit 134 transmits the address to the RAM 136 on the address line. Then, the data at this address will be returned to the processing unit 134 on the data line. In order to complete the data reading operation, the control signal will be transmitted using the control line.

閃存模組150提供大量的儲存空間,通常是數百個千兆位元組(Gigabytes,GB),甚至是數個兆兆位元組(Terabytes,TB),用於儲存大量的使用者資料,例如高解析度圖片、影片等。閃存模組150中包含控制電路以及記憶體陣列,記憶體陣列中的記憶單元可包含單層式單元(Single Level Cells,SLCs)、多層式單元(Multiple Level Cells,MLCs)三層式單元(Triple Level Cells,TLCs)、四層式單元(Quad-Level Cells,QLCs)或上述的任意組合。處理單元134通過閃存介面139寫入使用者資料到閃存模組150中的指定位址(目的位址),以及從閃存模組150中的指定位址(來源位址)讀取使用者資料。閃存介面139使用數個電子訊號來協調閃存控制器130與閃存模組150間的資料與命令傳遞,包含資料線(Data Line)、時脈訊號(Clock Signal)與控制訊號(Control Signal)。資料線可用於傳遞命令、位址、讀出及寫入的資料;控制訊號線可用於傳遞晶片致能(Chip Enable,CE)、位址提取致能(Address Latch Enable,ALE)、命令提取致能(Command Latch Enable,CLE)、寫入致能(Write Enable,WE)等控制訊號。The flash memory module 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, etc. The flash memory module 150 includes a control circuit and a memory array. The memory cells in the memory array can include single-level cells (Single Level Cells, SLCs), multi-level cells (Multiple Level Cells, MLCs) and triple-level cells (Triple Level Cells). Level Cells, TLCs), four-level cells (Quad-Level Cells, QLCs), or any combination of the above. The processing unit 134 writes user data to a designated address (destination address) in the flash memory module 150 through the flash memory interface 139 , and reads user data from a designated address (source address) in the flash memory module 150 . 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 module 150 , including a data line (Data Line), a clock signal (Clock Signal) and a 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 module 150 may include four input and output channels (I/O channels, hereinafter referred to as channels) CH#0 to CH#3, each of which 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 unit can be packaged as an independent chip (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.

在先前的一些實施方式中,閃存控制器130可在RAM 136中配置空間給丟棄佇列(Discard Queue)。丟棄佇列包含多個節點,而每個節點用來儲存一個主機丟棄命令所指示的丟棄使用者資料的邏輯位址區間的資訊。表1顯示範例的丟棄佇列: 表1 節點編號 開始位址 長度 0 P#100 32 1 P#200 4 2 P#300 64 3 P#500 8 例如,每個節點儲存一個丟棄命令所指示的開始主頁面編號及長度。如上所述的第0至第3個範例節點包含如下的資訊,先前接收到的4個丟棄命令分別指示將主頁面P#100~P#131、P#200~P#203、P#300~P#363和P#500~P#507的使用者資料丟棄。然而,當處理單元134每次通過主機介面131從主機端110接收到主機讀取命令時,都需要耗費運算資源搜索丟棄佇列以判斷主機讀取命令所要讀取的使用者資料是否已經丟棄。如果讀取的使用者資料已經丟棄,則處理單元134通過主機介面131回覆主機端110錯誤訊息,或者是虛假值(Dummy Value)。當處理單元134每次通過主機介面131從主機端110接收到主機寫入命令時,也需要耗費運算資源搜索丟棄佇列以判斷主機寫入命令所要寫入的使用者資料的邏輯位址是否落入之前已經丟棄的邏輯位址區間。 In some previous embodiments, the flash memory controller 130 may allocate space in the RAM 136 for a discard queue (Discard Queue). The discard queue includes a plurality of nodes, and each node is used to store information of a logical address range for discarding user data indicated by a host discard command. Table 1 shows a sample discard queue: Table 1 node number start address length 0 P#100 32 1 P#200 4 2 P#300 64 3 P#500 8 For example, each node stores the starting main page number and length indicated by a discard command. The 0th to 3rd example nodes mentioned above contain the following information. The previously received 4 discard commands respectively instruct the main page P#100~P#131, P#200~P#203, P#300~ The user data of P#363 and P#500~P#507 are discarded. However, each time the processing unit 134 receives the host read command from the host terminal 110 through the host interface 131 , it needs to spend computing resources to search the discard queue to determine whether the user data to be read by the host read command has been discarded. If the read user data has been discarded, the processing unit 134 replies to the host 110 with an error message or a dummy value (Dummy Value) through the host interface 131 . When the processing unit 134 receives the host write command from the host terminal 110 through the host interface 131 each time, it also needs to spend computing resources to search the discard queue to determine whether the logical address of the user data to be written by the host write command falls. Enter a previously discarded logical address range.

為了降低處理單元134的負擔以提升閃存控制器130的整體效能,閃存控制器130可在RAM 136中配置空間給擴展式丟棄表(Expanded Discard Table),並使用專用的性能引擎137來搜索擴展式丟棄表。擴展式丟棄表可包含1024個項目,每個項目記載已經丟棄的使用者資料的邏輯位址,或者空值(NULL value)。需要注意的是,本領域技術人員可依據系統的需要在RAM 136中配置更多或更少的空間來儲存擴展式丟棄表,本發明並不限於在擴展式丟棄表只能包含1024個項目。表2顯示範例的擴展式丟棄表: 表2 項目標號 邏輯位址 0 P#100 1 P#101 : : 31 P#131 32 P#200 33 P#201 34 P#202 35 P#203 36 P#300 37 P#301 : : 99 P#363 100 P#500 101 P#501 : : 107 P#507 對比於表1,概念上來說,表1中的第0個項目的資訊可擴展成為表2中的第0個到第31個項目,分別紀錄主頁面編號P#100到P#131;表1中的第1個項目的資訊可擴展成為表2中的第32個到第35個項目,分別紀錄主頁面編號P#200到P#203,依此類推。處理單元134在依據主機放棄命令中攜帶的資訊新增項目到擴展式丟棄表時可進行排序,讓邏輯位址能夠以升冪或降冪的方式排列,以利專用的性能引擎137進行搜尋。 In order to reduce the burden on the processing unit 134 to improve the overall performance of the flash memory controller 130, the flash memory controller 130 can allocate space in the RAM 136 for an expanded discard table (Expanded Discard Table), and use a dedicated performance engine 137 to search the expanded discard table. Drop table. The extended discard list can contain 1024 items, and each item records the logical address of discarded user data, or a null value (NULL value). It should be noted that those skilled in the art can configure more or less space in the RAM 136 to store the extended discard table according to the needs of the system, and the present invention is not limited to only containing 1024 items in the extended discard table. Table 2 shows an example extended drop table: Table 2 item number logical address 0 P#100 1 P#101 : : 31 P#131 32 P#200 33 P#201 34 P#202 35 P#203 36 P#300 37 P#301 : : 99 P#363 100 P#500 101 P#501 : : 107 P#507 Compared with Table 1, conceptually, the information of the 0th item in Table 1 can be expanded into the 0th to 31st items in Table 2, respectively recording the main page numbers P#100 to P#131; Table 1 The information of the first item in Table 2 can be expanded into the 32nd to 35th items in Table 2, recording the main page numbers P#200 to P#203 respectively, and so on. The processing unit 134 can perform sorting when adding items to the extended discard table according to the information carried in the host discard command, so that the logical addresses can be arranged in ascending or descending exponents, so as to facilitate the dedicated performance engine 137 to search.

參考圖3。性能引擎137可包含開始位址寄存器322和結束位址寄存器324,用於讓處理單元134定義擴展式丟棄表在RAM 136中的位址區間。由於擴展式丟棄表所儲存的項目數量是可變動的,因此每當更新完擴展式丟棄表的內容,處理單元134就要重新設定開始位址寄存器322和結束位址寄存器324,用於讓搜索電路310能夠在開始位址寄存器322和結束位址寄存器324所規範的RAM 136的位址區間進行搜索。例如,因應表2的內容,開始位址寄存器322儲存記憶體位址“ExpDiscardTable_start”, 結束位址寄存器324儲存ExpDiscardTable_star+107。性能引擎137可包含八個目標寄存器330#0~330#7,用於讓處理單元134指示搜索電路310在擴展式丟棄表中搜索最多八個主頁面編號。性能引擎137可包含八個結果寄存器350#0~350#7,用於讓搜索電路310可分別儲存對應於目標寄存器330#0~330#7的搜索結果。例如,結果寄存器350#0儲存目標寄存器330#0所指示的主頁面編號的搜索結果,結果寄存器350#1儲存目標寄存器330#1所指示的主頁面編號的搜索結果,依此類推。舉例來說,結果寄存器可為16位元的寄存器,其中的第15位元儲存是否命中的資訊,如果命中時,第14至第0位元儲存擴展式丟棄表中命中的項目編號。處理單元134可讀取結果寄存器350#0~350#7中任意一個的值來獲取相應目標寄存器中的主頁面編號是否出現在擴展式丟棄表中的資訊,以及,如果命中的話,此主頁面編號存在擴展式丟棄表中的哪個項目。需要注意的是,本領域技術人員可依據系統的需要在性能引擎137中配置更多或更少對的目標寄存器和結果寄存器,本發明並不限於在性能引擎137中只能包含八對的目標寄存器和結果寄存器。所屬技術領域人員可使用習知的電路來實作搜索電路310,用於讓搜索電路310在擴展式丟棄表中完成線性搜索(Linear Search)、二元搜索(Binary Search)、指數搜索(Exponential Search)、費波南西搜索(Fibonacci Search)等。Refer to Figure 3. The performance engine 137 may include a start address register 322 and an end address register 324 for enabling the processing unit 134 to define an address range of the extended discard table in the RAM 136 . Since the number of items stored in the extended discard list is variable, whenever the content of the extended discard table is updated, the processing unit 134 will reset the start address register 322 and the end address register 324 for searching Circuitry 310 is capable of searching within the address range of RAM 136 specified by start address register 322 and end address register 324 . For example, corresponding to the contents of Table 2, the start address register 322 stores the memory address “ExpDiscardTable_start”, and the end address register 324 stores ExpDiscardTable_star+107. The performance engine 137 may include eight target registers 330#0˜330#7 for instructing the processing unit 134 to instruct the search circuit 310 to search up to eight main page numbers in the extended drop list. The performance engine 137 may include eight result registers 350#0~350#7 for allowing the search circuit 310 to respectively store search results corresponding to the target registers 330#0~330#7. For example, the result register 350#0 stores the search result of the main page number indicated by the target register 330#0, the result register 350#1 stores the search result of the main page number indicated by the target register 330#1, and so on. For example, the result register can be a 16-bit register, wherein the 15th bit stores the information of whether it is a hit, and if it is a hit, the 14th to 0th bits store the number of the hit item in the extended discard table. The processing unit 134 can read the value of any one of the result registers 350#0~350#7 to obtain the information whether the main page number in the corresponding target register appears in the extended discard table, and, if it is hit, the main page number Which item in the extended discard table the number exists in. It should be noted that those skilled in the art can configure more or fewer pairs of target registers and result registers in the performance engine 137 according to the needs of the system, and the present invention is not limited to only containing eight pairs of target registers in the performance engine 137. register and result register. Those skilled in the art can use known circuits to implement the search circuit 310, which is used to allow the search circuit 310 to complete linear search (Linear Search), binary search (Binary Search), exponential search (Exponential Search) in the extended discard table. ), Fibonacci Search, etc.

在一些實施例中,處理單元134和性能引擎137之間可使用專用導線連接,用於讓處理單元134通過專用導線設定開始位址寄存器322、結束位址寄存器324和目標寄存器330#0~330#7,並且從結果寄存器350#0~350#7讀取搜索結果。In some embodiments, a dedicated wire connection can be used between the processing unit 134 and the performance engine 137, so that the processing unit 134 can set the start address register 322, the end address register 324 and the target register 330#0~330 through the dedicated wire #7, and read the search results from the result registers 350#0~350#7.

在另一些實施例中,處理單元134可通過共享的匯流排架構132設定性能引擎137中的開始位址寄存器322、結束位址寄存器324和目標寄存器330#0~330#7,並且從性能引擎137中的結果寄存器350#0~350#7讀取搜索結果。In some other embodiments, the processing unit 134 can set the start address register 322, the end address register 324 and the target register 330#0~330#7 in the performance engine 137 through the shared bus architecture 132, and from the performance engine The result registers 350#0~350#7 in 137 read the search results.

在一些實施例中,性能引擎137和RAM 136之間可使用專用導線連接,用於讓性能引擎137通過專用導線讀取RAM 136中特定位址的值。In some embodiments, a dedicated wire connection can be used between the performance engine 137 and the RAM 136, so that the performance engine 137 can read the value of a specific address in the RAM 136 through the dedicated wire.

在另一些實施例中,性能引擎137可通過共享的匯流排架構132和DAM控制器138讀取RAM 136中特定位址的值。In other embodiments, the performance engine 137 can read the value of a specific address in the RAM 136 through the shared bus architecture 132 and the DAM controller 138 .

因應擴展式丟棄表和性能引擎137的技術方案,本發明實施例提出一種主機丟棄命令的執行方法,由處理單元134載入和執行相關韌體或軟體指令時實施。此方法反覆執行,用於處理從主機端110接收到的主機丟棄命令。參考圖4,詳細步驟說明如下:In response to the technical solution of the extended discard table and the performance engine 137, an embodiment of the present invention proposes a method for executing a host discard command, which is implemented when the processing unit 134 loads and executes relevant firmware or software instructions. This method is executed repeatedly for processing the host drop command received from the host side 110 . Referring to Figure 4, the detailed steps are as follows:

步驟S410:通過主機介面131從主機端110接收第一個(下一個)主機丟棄命令,主機丟棄命令用以指出不再使用的使用者資料的邏輯位址。Step S410 : Receive the first (next) host discard command from the host 110 through the host interface 131 , the host discard command is used to indicate the logical address of the user data that is no longer used.

步驟S420:根據主機丟棄命令所指示的丟棄使用者資料的邏輯位址更新RAM 136中儲存的擴展式丟棄表的內容。更新後的擴展式丟棄表的項目會依據邏輯位址做升冪或降冪的排序。Step S420: Update the content of the extended discard table stored in the RAM 136 according to the logical address of the discarded user data indicated by the host discard command. Items in the updated extended discard table are sorted in ascending or descending order according to logical addresses.

步驟S430:根據更新後的擴展式丟棄表設定性能引擎137中的開始位址寄存器322和結束位址寄存器324。Step S430: Set the start address register 322 and the end address register 324 in the performance engine 137 according to the updated extended discard table.

假設在一個迴圈中的步驟S420執行前,擴展式丟棄表如表2所示:在處理單元134接收到指示丟棄主頁面P#400~P#403的使用者資料時(步驟S410),表2的擴展式丟棄表可更新成為下表3所示(步驟S420): 表3 項目標號 邏輯位址 0 P#100 1 P#101 : : 31 P#131 32 P#200 33 P#201 34 P#202 35 P#203 36 P#300 37 P#301 : : 99 P#363 100 P#400 101 P#401 102 P#402 103 P#403 104 P#500 105 P#501 : : 111 P#507 接著,處理單元134將結束位址寄存器324設定為ExpDiscardTable_star+111(步驟S430)。 Assume that before the execution of step S420 in a loop, the extended discard table is as shown in Table 2: when the processing unit 134 receives the user data indicating to discard the main pages P#400~P#403 (step S410), the table The extended discard table of 2 can be updated as shown in Table 3 below (step S420): Table 3 item number logical address 0 P#100 1 P#101 : : 31 P#131 32 P#200 33 P#201 34 P#202 35 P#203 36 P#300 37 P#301 : : 99 P#363 100 P#400 101 P#401 102 P#402 103 P#403 104 P#500 105 P#501 : : 111 P#507 Next, the processing unit 134 sets the end address register 324 to ExpDiscardTable_star+111 (step S430 ).

因應擴展式丟棄表和性能引擎137的技術方案,本發明實施例提出一種主機寫入命令執行後的擴展式丟棄表的更新方法,由處理單元134載入和執行相關韌體或軟體指令時實施。此方法反覆執行,用於在每個主機寫入命令執行後適應性地更新擴展式丟棄表。參考圖5,詳細步驟說明如下:In response to the technical solution of the extended discard table and the performance engine 137, the embodiment of the present invention proposes a method for updating the extended discard table after the host write command is executed, which is implemented when the processing unit 134 loads and executes relevant firmware or software instructions . This method is executed iteratively to adaptively update the extended drop table after each host write command is executed. Referring to Figure 5, the detailed steps are as follows:

步驟S510:執行第一個(下一個)主機寫入命令,用於將指定邏輯位址的使用者資料通過閃存介面139寫入閃存模組150。Step S510 : Execute the first (next) host write command for writing the user data of the specified logical address into the flash memory module 150 through the flash memory interface 139 .

步驟S520:判斷寫入使用者資料的邏輯位址是否出現在擴展式丟棄表中。如果是,則流程繼續進行步驟S530的處理;否則,流程繼續進行步驟S510的處理。處理單元134可將邏輯位址設定到性能引擎137中的目標寄存器330#0~330#7,並且驅動性能引擎137搜索擴展式丟棄表以判斷這些邏輯位址是否出現在擴展式丟棄表中。需要注意的是,處理單元134設定目標寄存器330#0~330#7和驅動性能引擎137後,就可以接著處理其他的任務。一段預設的時間後,處理單元134檢查性能引擎137中的結果寄存器350#0~350#7以判斷這些邏輯位址是否出現在擴展式丟棄表中。當所有的邏輯位址都判斷完成後,處理單元134才繼續進行下個步驟的處理。Step S520: Determine whether the logical address written in the user data appears in the extended discard list. If yes, the flow continues to the processing of step S530; otherwise, the flow continues to the processing of step S510. The processing unit 134 can set the logical addresses to the target registers 330#0~330#7 in the performance engine 137, and drive the performance engine 137 to search the extended discard table to determine whether these logical addresses appear in the extended discard table. It should be noted that after the processing unit 134 sets the target registers 330#0~330#7 and drives the performance engine 137, it can proceed to process other tasks. After a preset period of time, the processing unit 134 checks the result registers 350#0~350#7 in the performance engine 137 to determine whether these logical addresses appear in the extended discard list. After all the logical addresses are judged, the processing unit 134 proceeds to the next step.

步驟S530:刪除出現在擴展式丟棄表中的邏輯位址的相應項目。Step S530: Delete the corresponding item of the logical address appearing in the extended discard table.

步驟S540:根據更新後的擴展式丟棄表設定性能引擎137中的結束位址寄存器324。Step S540: Set the end address register 324 in the performance engine 137 according to the updated extended discard table.

假設在一個迴圈中的步驟S510執行前,擴展式丟棄表如表2所示:在處理單元134執行完主頁面P#200~P#203的使用者資料的主機寫入命令時(步驟S510),處理單元134將邏輯位址P#200~P#203設定到性能引擎137中的目標寄存器330#0~330#3,並且驅動性能引擎137搜索擴展式丟棄表以判斷這些邏輯位址是否出現在擴展式丟棄表中(步驟S520)。當發現邏輯位址P#200~P#203都出現在擴展式丟棄表時(步驟S520中“是”的路徑),處理單元134可更新擴展式丟棄表成為下表4所示(步驟S530): 表4 項目標號 邏輯位址 0 P#100 1 P#101 : : 31 P#131 32 P#300 33 P#301 : : 95 P#363 96 P#500 97 P#501 : : 103 P#507 接著,處理單元134將結束位址寄存器324設定為ExpDiscardTable_star+103(步驟S540)。 Assume that before the execution of step S510 in a loop, the extended discard table is as shown in Table 2: when the processing unit 134 finishes executing the host write command of the user data of the main pages P#200~P#203 (step S510 ), the processing unit 134 sets the logical addresses P#200~P#203 to the target registers 330#0~330#3 in the performance engine 137, and drives the performance engine 137 to search the extended discard table to determine whether these logical addresses appear in the extended drop list (step S520). When it is found that the logical addresses P#200~P#203 all appear in the extended discard table (the path of "Yes" in step S520), the processing unit 134 can update the extended discard table as shown in Table 4 below (step S530) : Table 4 item number logical address 0 P#100 1 P#101 : : 31 P#131 32 P#300 33 P#301 : : 95 P#363 96 P#500 97 P#501 : : 103 P#507 Next, the processing unit 134 sets the end address register 324 to ExpDiscardTable_star+103 (step S540 ).

因應擴展式丟棄表和性能引擎137的技術方案,本發明實施例提出一種主機讀取命令的執行方法,由處理單元134載入和執行相關韌體或軟體指令時實施。此方法反覆執行,用於在每個主機讀取命令執行時根據擴展式丟棄表的內容選擇性地回覆虛假資料或者真實的使用者資料給主機端110。參考圖6,詳細步驟說明如下:In response to the technical solution of the extended discard table and the performance engine 137, an embodiment of the present invention proposes a method for executing a host read command, which is implemented when the processing unit 134 loads and executes related firmware or software instructions. This method is executed repeatedly, and is used to selectively reply false data or real user data to the host end 110 according to the content of the extended discard table when each host read command is executed. Referring to Figure 6, the detailed steps are as follows:

步驟S610:提取第一個(下一個)主機寫入命令,指示閃存控制器130讀取指定邏輯位址的使用者資料。Step S610: extracting the first (next) host write command, instructing the flash memory controller 130 to read the user data at the specified logical address.

步驟S620:判斷欲讀取的使用者資料的任何邏輯位址是否出現在擴展式丟棄表中。如果是,則流程繼續進行步驟S630的處理;否則,流程繼續進行步驟S640的處理。處理單元134可將邏輯位址設定到性能引擎137中的目標寄存器330#0~330#7,並且驅動性能引擎137搜索擴展式丟棄表以判斷這些邏輯位址是否出現在擴展式丟棄表中。需要注意的是,處理單元134設定目標寄存器330#0~330#7和驅動性能引擎137後,就可以接著處理其他的任務。一段預設的時間後,處理單元134檢查性能引擎137中的結果寄存器350#0~350#7以判斷這些邏輯位址是否出現在擴展式丟棄表中。當所有的邏輯位址都判斷完成後,處理單元134才繼續進行下個步驟的處理。Step S620: Determine whether any logical address of the user data to be read appears in the extended discard list. If yes, the process continues to step S630; otherwise, the process continues to step S640. The processing unit 134 can set the logical addresses to the target registers 330#0~330#7 in the performance engine 137, and drive the performance engine 137 to search the extended discard table to determine whether these logical addresses appear in the extended discard table. It should be noted that after the processing unit 134 sets the target registers 330#0~330#7 and drives the performance engine 137, it can proceed to process other tasks. After a preset period of time, the processing unit 134 checks the result registers 350#0~350#7 in the performance engine 137 to determine whether these logical addresses appear in the extended discard table. After all the logical addresses are judged, the processing unit 134 proceeds to the next step.

步驟S632:對於出現在擴展式丟棄表中的邏輯位址,驅動主機介面131回覆虛假值給主機端110。Step S632 : For the logical addresses appearing in the extended drop list, the drive host interface 131 returns a false value to the host 110 .

步驟S634:驅動閃存介面139從閃存模組150讀取其他沒有出現在擴展式丟棄表中的邏輯位址的使用者資料,並且驅動主機介面131回覆讀出的使用者資料給主機端110。Step S634 : drive the flash memory interface 139 to read user data of other logical addresses that do not appear in the extended discard list from the flash memory module 150 , and drive the host interface 131 to reply the read user data to the host 110 .

步驟S640:驅動閃存介面139從閃存模組150讀取指定邏輯位址的使用者資料,並且驅動主機介面131回覆讀出的使用者資料給主機端110。Step S640 : drive the flash memory interface 139 to read the user data of the specified logical address from the flash memory module 150 , and drive the host interface 131 to reply the read user data to the host 110 .

在一些實施例中,閃存控制器130可在RAM 136中配置空間給擴展式丟棄表和丟棄佇列。如果一個主機丟棄命令所指示的丟棄使用者資料的邏輯位址長度超過或者等於指定數目時(例如,超過或者等於32時),將主機丟棄命令中攜帶的資訊儲存在丟棄佇列中的一個節點。如果一個主機丟棄命令所指示的丟棄使用者資料的邏輯位址長度低於指定數目時,將主機丟棄命令中攜帶的資訊儲存在擴展式丟棄表中的一個或者多個連續項目。例如,當先前接收到的4個丟棄命令分別指示將主頁面P#100~P#131、P#200~P#203、P#300~P#363和P#500~P#507的使用者資料丟棄時,這4個丟棄命令所指示的資訊會記錄在如下表5所示的丟棄佇列和如下表6所示的擴展式丟棄表: 表5 節點編號 開始位址 長度 0 P#100 32 1 P#300 64 表6 項目標號 邏輯位址 0 P#200 1 P#201 2 P#202 3 P#203 4 P#500 5 P#501 : : 11 P#507 In some embodiments, flash controller 130 may allocate space in RAM 136 for an extended drop table and drop queue. If the logical address length of the discarded user data indicated by a master discard command exceeds or is equal to the specified number (for example, when it exceeds or is equal to 32), store the information carried in the master discard command in a node in the discard queue . If the logical address length of discarded user data indicated by a host discard command is less than a specified number, the information carried in the host discard command is stored in one or more consecutive items in the extended discard table. For example, when the previously received 4 discard commands respectively instruct the users of the main pages P#100~P#131, P#200~P#203, P#300~P#363 and P#500~P#507 When data is discarded, the information indicated by these 4 discard commands will be recorded in the discard queue shown in Table 5 below and the extended discard table shown in Table 6 below: Table 5 node number start address length 0 P#100 32 1 P#300 64 Table 6 item number logical address 0 P#200 1 P#201 2 P#202 3 P#203 4 P#500 5 P#501 : : 11 P#507

因應丟棄佇列、擴展式丟棄表和性能引擎137的技術方案,本發明實施例提出一種主機丟棄命令的執行方法,由處理單元134載入和執行相關韌體或軟體指令時實施。此方法反覆執行,用於處理從主機端110接收到的主機丟棄命令。參考圖7,其和圖4的不同在於圖7在步驟S410之後插入步驟S710的判斷,並且在判斷成立後加上步驟S720的處理,詳細說明如下:In response to the technical solutions of the discard queue, the extended discard table, and the performance engine 137, the embodiment of the present invention proposes a method for executing a host discard command, which is implemented when the processing unit 134 loads and executes relevant firmware or software instructions. This method is executed repeatedly for processing the host drop command received from the host side 110 . With reference to Fig. 7, its difference with Fig. 4 is that Fig. 7 inserts the judgment of step S710 after step S410, and adds the processing of step S720 after the judgment is established, detailed description is as follows:

步驟S710:判斷主機丟棄命令所指示丟棄的使用者資料的邏輯位址長度是否超過或者等於指定數目(例如,32)。如果是,則流程繼續進行步驟S720的處理;否則,流程繼續進行步驟S420的處理。Step S710: Determine whether the logical address length of the discarded user data indicated by the host discard command exceeds or equals a specified number (for example, 32). If yes, the process continues to step S720; otherwise, the process continues to step S420.

步驟S720:根據主機丟棄命令所指示的丟棄使用者資料的邏輯位址更新RAM 136中儲存的丟棄佇列的內容。Step S720: Update the content of the discard queue stored in the RAM 136 according to the logical address of the discarded user data indicated by the host discard command.

圖7中的步驟S410至S430的技術細節可參考圖4的相應說明,為求簡明不再贅述。For technical details of steps S410 to S430 in FIG. 7 , reference may be made to the corresponding description in FIG. 4 , and details are not repeated for simplicity.

因應丟棄佇列、擴展式丟棄表和性能引擎137的技術方案,本發明實施例提出一種主機寫入命令執行後的丟棄佇列和擴展式丟棄表的更新方法,由處理單元134載入和執行相關韌體或軟體指令時實施。此方法反覆執行,用於在每個主機寫入命令執行後適應性地更新丟棄佇列和擴展式丟棄表。參考圖8,其和圖5的不同在於,圖8在步驟S510之後新增了步驟S810的判斷,並且在判斷成立後加上步驟S820的處理。詳細說明如下:In response to the technical solutions of the discard queue, the extended discard table, and the performance engine 137, the embodiment of the present invention proposes a method for updating the discard queue and the extended discard table after the host write command is executed, which is loaded and executed by the processing unit 134 It is implemented when related firmware or software commands are used. This method is iteratively used to adaptively update the discard queue and the extended discard table after each host write command is executed. Referring to FIG. 8 , the difference between it and FIG. 5 is that in FIG. 8 , the judgment of step S810 is added after step S510 , and the processing of step S820 is added after the judgment is established. The details are as follows:

步驟S810:判斷寫入使用者資料的邏輯位址是否出現在丟棄佇列中。如果是,則流程繼續進行步驟S820的處理;否則,流程繼續進行步驟S510的處理。Step S810: Determine whether the logical address for writing the user data appears in the discarding queue. If yes, the flow continues to the processing of step S820; otherwise, the flow continues to the processing of step S510.

步驟S820:更新丟棄佇列中的內容已反映主機寫入命令執行結果。假設在一個迴圈中的步驟S510執行前,丟棄佇列如表5所示:在處理單元134執行完主頁面P#100~P#131的使用者資料的主機寫入命令時(步驟S510),處理單元134可刪除丟棄佇列中的第0個節點而成為下表7所示(步驟S820): 表7 節點編號 開始位址 長度 0 P#300 64 Step S820: Update the content in the discard queue to reflect the execution result of the host write command. Assume that before the execution of step S510 in a loop, the discard queue is as shown in Table 5: when the processing unit 134 finishes executing the host write command of the user data of the main page P#100~P#131 (step S510) , the processing unit 134 can delete the 0th node in the discard queue and become as shown in Table 7 below (step S820): Table 7 node number start address length 0 P#300 64

圖8中的步驟S510、S530至S430的技術細節可參考圖5的相應說明,為求簡明不再贅述。在這裡需要注意的是,在性能引擎137的協助下,步驟S520至S540的操作可與步驟S810至S820的操作並行執行。For the technical details of steps S510, S530 to S430 in FIG. 8, reference may be made to the corresponding description in FIG. 5, which will not be repeated for simplicity. It should be noted here that, with the assistance of the performance engine 137 , the operations of steps S520 to S540 can be performed in parallel with the operations of steps S810 to S820 .

因應丟棄佇列、擴展式丟棄表和性能引擎137的技術方案,本發明實施例提出一種主機讀取命令的執行方法,由處理單元134載入和執行相關韌體或軟體指令時實施。此方法反覆執行,用於在每個主機讀取命令執行時根據丟棄佇列和擴展式丟棄表的內容選擇性地回覆虛假資料或者真實的使用者資料給主機端110。參考圖9,其和圖6的不同在於其分別以步驟S910、S922、S924取代圖6的步驟S620、S632、S634,詳細說明如下:In response to the technical solutions of the discard queue, the extended discard table, and the performance engine 137, an embodiment of the present invention proposes a method for executing a host read command, which is implemented when the processing unit 134 loads and executes related firmware or software instructions. This method is executed repeatedly, and is used to selectively reply false data or real user data to the host end 110 according to the content of the discard queue and the extended discard table when each host read command is executed. Referring to FIG. 9, the difference between it and FIG. 6 is that it replaces steps S620, S632, and S634 in FIG. 6 with steps S910, S922, and S924 respectively, and the details are as follows:

步驟S910:判斷欲讀取的使用者資料的邏輯位址是否出現在擴展式丟棄表和丟棄佇列的至少一者之中。如果是,則流程繼續進行步驟S922的處理;否則,流程繼續進行步驟S640的處理。處理單元134可將邏輯位址設定到性能引擎137中的目標寄存器330#0~330#7,並且驅動性能引擎137搜索擴展式丟棄表以判斷這些邏輯位址是否出現在擴展式丟棄表中。需要注意的是,處理單元134設定目標寄存器330#0~330#7和驅動性能引擎137後,就可以接著搜索丟棄佇列,用於判斷這些邏輯位址是否出現在丟棄佇列中。一段預設的時間後,處理單元134檢查性能引擎137中的結果寄存器350#0~350#7以判斷這些邏輯位址是否出現在擴展式丟棄表中。當所有的邏輯位址都判斷完成後,處理單元134才繼續進行下個步驟的處理。Step S910: Determine whether the logical address of the user data to be read appears in at least one of the extended drop list and the drop queue. If yes, the process continues to step S922; otherwise, the process continues to step S640. The processing unit 134 can set the logical addresses to the target registers 330#0~330#7 in the performance engine 137, and drive the performance engine 137 to search the extended discard table to determine whether these logical addresses appear in the extended discard table. It should be noted that after the processing unit 134 sets the target registers 330#0~330#7 and drives the performance engine 137, it can then search the discard queue to determine whether these logical addresses appear in the discard queue. After a preset period of time, the processing unit 134 checks the result registers 350#0~350#7 in the performance engine 137 to determine whether these logical addresses appear in the extended discard table. After all the logical addresses are judged, the processing unit 134 proceeds to the next step.

步驟S922:對於出現在擴展式丟棄表或者丟棄佇列中的每個邏輯位址,驅動主機介面131回覆虛假值給主機端110。Step S922 : For each logical address appearing in the extended discard list or the discard queue, the driving host interface 131 returns a false value to the host 110 .

步驟S924:驅動閃存介面139從閃存模組150讀取其他沒有出現在擴展式丟棄表和丟棄佇列中的邏輯位址的使用者資料,並且驅動主機介面131回覆讀出的使用者資料給主機端110。Step S924: drive the flash memory interface 139 to read user data of other logical addresses that do not appear in the extended discard list and discard queue from the flash memory module 150, and drive the host interface 131 to reply the read user data to the host terminal 110.

本發明所述的方法中的全部或部分步驟可以計算機指令實現,例如儲存裝置中的韌體轉換層(Firmware Translation Layer,FTL)、特定硬體的驅動程式等。此外,也可實現於其他類型程式。所屬技術領域具有通常知識者可將本發明實施例的方法撰寫成計算機指令,為求簡潔不再加以描述。依據本發明實施例方法實施的計算機指令可儲存於適當的電腦可讀取媒體,例如DVD、CD-ROM、USB碟、硬碟,亦可置於可通過網路(例如,網際網路,或其他適當載具)存取的網路伺服器。All or part of the steps in the method of the present invention can be implemented by computer instructions, such as a firmware translation layer (Firmware Translation Layer, FTL) in a storage device, a driver program for specific hardware, 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 an appropriate 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 a web server.

雖然圖1至圖3中包含了以上描述的元件,但不排除在不違反發明的精神下,使用更多其他的附加元件,已達成更佳的技術效果。此外,雖然圖4至圖9的流程圖採用指定的順序來執行,但是在不違反發明精神的情況下,熟習此技藝人士可以在達到相同效果的前提下,修改這些步驟間的順序,所以,本發明並不侷限於僅使用如上所述的順序。此外,熟習此技藝人士亦可以將若干步驟整合為一個步驟,或者是除了這些步驟外,循序或平行地執行更多步驟,本發明亦不因此而侷限。Although the elements described above are included in FIGS. 1 to 3 , 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. 4 to FIG. 9 are executed in a specified order, those skilled in the art can modify the order of these steps under the premise of 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.

雖然本發明使用以上實施例進行說明,但需要注意的是,這些描述並非用以限縮本發明。相反地,此發明涵蓋了熟習此技藝人士顯而易見的修改與相似設置。所以,申請權利要求範圍須以最寬廣的方式解釋來包含所有顯而易見的修改與相似設置。Although the present invention is described using the above examples, it should be noted that these descriptions are not intended to limit the present 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.

10:電子裝置 110:主機端 130:閃存控制器 131:主機介面 132:匯流排 134:處理單元 136:隨機存取記憶體 137:性能引擎 138:直接記憶體存取控制器 139:閃存介面 150:閃存模組 151:介面 153#0~153#15:NAND閃存單元 CH#0~CH#3:通道 CE#0~CE#3:致能訊號 310:搜索電路 322:開始位址寄存器 324:結束位址寄存器 330#0~330#7:目標寄存器 350#0~350#7:結果寄存器 S410~S430:方法步驟 S510~S540:方法步驟 S610~S640:方法步驟 S710~S720:方法步驟 S810~S820:方法步驟 S910~S924:方法步驟10: Electronic device 110: Host side 130: Flash memory controller 131: host interface 132: busbar 134: processing unit 136: random access memory 137: Performance engine 138: Direct memory access controller 139: Flash interface 150: Flash memory module 151: interface 153#0~153#15: NAND flash memory unit CH#0~CH#3: channel CE#0~CE#3: enable signal 310: search circuit 322: start address register 324: End address register 330#0~330#7: target register 350#0~350#7: result register S410~S430: method steps S510~S540: method steps S610~S640: method steps S710~S720: method steps S810~S820: method steps S910~S924: 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 module according to an embodiment of the invention.

圖3為依據本發明實施例的性能引擎和隨機存取記憶體的方塊圖。FIG. 3 is a block diagram of a performance engine and a random access memory according to an embodiment of the present invention.

圖4為依據本發明實施例的執行主機丟棄命令的方法流程圖。Fig. 4 is a flowchart of a method for executing a host discard command according to an embodiment of the present invention.

圖5為依據本發明實施例的主機寫入命令執行後的擴展式丟棄表的更新方法的流程圖。FIG. 5 is a flowchart of a method for updating an extended discard table after a host write command is executed according to an embodiment of the present invention.

圖6為依據本發明實施例的執行主機讀取命令的方法流程圖。FIG. 6 is a flow chart of a method for executing a host read command according to an embodiment of the invention.

圖7為依據本發明實施例的執行主機丟棄命令的方法流程圖。Fig. 7 is a flowchart of a method for executing a host discard command according to an embodiment of the present invention.

圖8為依據本發明實施例的主機寫入命令執行後的丟棄命令和擴展式丟棄表的更新方法的流程圖。FIG. 8 is a flow chart of a method for updating a discard command and an extended discard table after a host write command is executed according to an embodiment of the present invention.

圖9為依據本發明實施例的執行主機讀取命令的方法流程圖。FIG. 9 is a flowchart of a method for executing a host read command according to an embodiment of the invention.

S410~S430:方法步驟 S410~S430: method steps

Claims (15)

一種因應主機丟棄命令的資料存取方法,由處理單元執行,包含: 在隨機存取記憶體中配置空間給擴展式丟棄表,其中,所述擴展式丟棄表包含多個項目,每個所述項目記載已經丟棄的使用者資料的邏輯位址; 從主機端接收主機丟棄命令,其中,所述主機丟棄命令指出不再使用的使用者資料的第一邏輯位址; 新增包含所述第一邏輯位址的新項目至所述擴展式丟棄表;以及 設定性能引擎中的開始位址寄存器和結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍,使得所述性能引擎藉由在所述隨機存取記憶體中的所述位址範圍搜索所述擴展式丟棄表以判斷特定邏輯位址的使用者資料是否已經不再使用。 A data access method in response to a host discarding command, executed by a processing unit, comprising: Allocate space in the random access memory for an extended discard table, wherein the extended discard table includes a plurality of items, and each of the items records the logical address of the user data that has been discarded; receiving a host discard command from the host end, wherein the host discard command indicates a first logical address of user data that is no longer used; adding a new entry including the first logical address to the extended discard table; and Setting the start address register and the end address register in the performance engine is used to redefine the address range of the extended discard table stored in the random access memory, so that the performance engine can The address range in the random access memory searches the extended discard table to determine whether the user data of a specific logical address is no longer used. 如請求項1所述的因應主機丟棄命令的資料存取方法,其中,所述擴展式丟棄表的多個所述項目依據所述邏輯位址以升冪或降冪的方式排列。The data access method in response to the discard command of the host as claimed in claim 1, wherein the plurality of entries in the extended discard table are arranged in ascending or descending exponentiation according to the logical address. 如請求項1所述的因應主機丟棄命令的資料存取方法,包含: 執行主機寫入命令以寫入第二邏輯位址的使用者資料至閃存模組;以及 當所述第二邏輯位址出現在所述擴展式丟棄表之中時,從所述擴展式丟棄表刪除包含所述第二邏輯位址的項目,並且依據更新後的所述擴展式丟棄表的內容設定所述性能引擎中的所述結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍。 The data access method in response to the host discarding command as described in claim 1, comprising: Executing a host write command to write user data at the second logical address to the flash memory module; and When the second logical address appears in the extended drop table, delete the item containing the second logical address from the extended drop table, and according to the updated extended drop table Set the end address register in the performance engine to redefine the address range of the extended discard table stored in the random access memory. 如請求項1所述的因應主機丟棄命令的資料存取方法,包含: 從主機端接收主機讀取命令,其中,所述主機讀取命令指示讀取第三邏輯位址的使用者資料;以及 當所述第三邏輯位址出現在所述擴展式丟棄表之中時,回覆虛假資料給所述主機端。 The data access method in response to the host discarding command as described in claim 1, comprising: receiving a host read command from the host end, wherein the host read command indicates to read user data at the third logical address; and When the third logical address appears in the extended discard list, reply false data to the host. 如請求項1所述的因應主機丟棄命令的資料存取方法,包含: 在隨機存取記憶體中配置空間給丟棄佇列,其中,所述丟棄佇列包含多個節點,每個所述節點用來儲存已經丟棄的使用者資料的邏輯位址區間; 判斷所述主機丟棄命令所指出的不再使用的使用者資料的所述第一邏輯位址的數量是否超過或者等於指定數目; 當所述第一邏輯位址的所述數量超過或者等於所述指定數目時,新增包含所述第一邏輯位址的新項目至所述擴展式丟棄表,以及設定所述性能引擎中的所述開始位址寄存器和所述結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍;以及 當所述第一邏輯位址的所述數量低於所述指定數目時,新增包含所述第一邏輯位址的新節點至所述丟棄佇列。 The data access method in response to the host discarding command as described in claim 1, comprising: Allocating space in the random access memory for the discarding queue, wherein the discarding queue includes a plurality of nodes, and each of the nodes is used to store a logical address range of discarded user data; judging whether the number of the first logical addresses of the unused user data indicated by the host discard command exceeds or equals a specified number; When the number of the first logical address exceeds or is equal to the specified number, add a new item including the first logical address to the extended discard table, and set the performance engine in The start address register and the end address register are used to redefine the address range of the extended discard table stored in the random access memory; and When the number of the first logical address is lower than the specified number, adding a new node including the first logical address to the discard queue. 如請求項5所述的因應主機丟棄命令的資料存取方法,包含: 執行所述主機端發送的主機寫入命令,其中,所述主機寫入命令指示寫入第四邏輯位址的使用者資料到閃存模組; 當所述第四邏輯位址出現在所述擴展式丟棄表中時,從所述擴展式丟棄表刪除所述第四邏輯位址的相應項目,並且依據更新後的擴展式丟棄表的內容設定所述性能引擎中的所述結束位址寄存器,用於定義所述隨機存取記憶體中的新位址範圍;以及 當所述第四邏輯位址出現在所述丟棄佇列中時,更新所述丟棄佇列中的內容以反映所述主機寫入命令的執行結果。 The data access method in response to the host discarding command as described in claim 5, comprising: Executing the host write command sent by the host end, wherein the host write command indicates to write the user data of the fourth logical address to the flash memory module; When the fourth logical address appears in the extended discard table, delete the corresponding item of the fourth logical address from the extended discard table, and set according to the contents of the updated extended discard table the end address register in the performance engine for defining a new address range in the random access memory; and When the fourth logical address appears in the discard queue, update the content in the discard queue to reflect the execution result of the host write command. 如請求項5所述的因應主機丟棄命令的資料存取方法,包含: 從主機端接收主機讀取命令,其中,所述主機讀取命令指示讀取第五邏輯位址的使用者資料;以及 當所述第五邏輯位址出現在所述擴展式丟棄表或者所述丟棄佇列之中時,回覆虛假資料給所述主機端。 The data access method in response to the host discarding command as described in claim 5, comprising: receiving a host read command from the host end, wherein the host read command indicates to read user data at the fifth logical address; and When the fifth logical address appears in the extended drop list or the drop queue, reply false data to the host. 一種電腦程式產品,包含程式碼,其中,當處理單元執行所述程式碼時,實施如請求項1至7中任一項所述的因應主機丟棄命令的資料存取方法。A computer program product, including program code, wherein, when the processing unit executes the program code, implement the data access method in response to the host discard command as described in any one of claims 1 to 7. 一種因應主機丟棄命令的資料存取裝置,包含: 隨機存取記憶體,用於配置空間給擴展式丟棄表,其中,所述擴展式丟棄表包含多個項目,每個所述項目記載已經丟棄的使用者資料的邏輯位址; 性能引擎,包含開始位址寄存器和結束位址寄存器,用於定義所述隨機存取記憶體中儲存所述擴展式丟棄表的位址範圍;以及 處理單元,耦接所述隨機存取記憶體和所述性能引擎,用於從主機端接收主機丟棄命令,其中,所述主機丟棄命令指出不再使用的使用者資料的第一邏輯位址;新增包含所述第一邏輯位址的新項目至所述擴展式丟棄表;以及設定所述性能引擎中的所述開始位址寄存器和所述結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍,使得所述性能引擎藉由在所述隨機存取記憶體中的所述位址範圍搜索所述擴展式丟棄表以判斷特定邏輯位址的使用者資料是否已經不再使用。 A data access device responding to a host discarding command, comprising: The random access memory is used to allocate space to the extended discard table, wherein the extended discard table includes a plurality of items, and each of the items records the logical address of the user data that has been discarded; A performance engine, including a start address register and an end address register, used to define an address range for storing the extended discard table in the random access memory; and A processing unit, coupled to the random access memory and the performance engine, configured to receive a host discard command from a host, wherein the host discard command indicates a first logical address of user data that is no longer used; adding a new item including the first logical address to the extended discard table; and setting the start address register and the end address register in the performance engine to redefine the random an address range of the extended drop table stored in the random access memory, so that the performance engine searches the extended drop table in the address range in the random access memory to determine a specific Whether the user data of the logical address is no longer used. 如請求項9所述的因應主機丟棄命令的資料存取裝置,其中,所述擴展式丟棄表的多個所述項目依據所述邏輯位址以升冪或降冪的方式排列。According to claim 9, in the data access device responding to the discard command of the host, the plurality of entries in the extended discard table are arranged in ascending or descending exponentiation according to the logical address. 如請求項9所述的因應主機丟棄命令的資料存取裝置,其中,所述處理單元執行主機寫入命令以寫入第二邏輯位址的使用者資料至閃存模組;以及當所述第二邏輯位址出現在所述擴展式丟棄表之中時,從所述擴展式丟棄表刪除包含所述第二邏輯位址的項目,並且依據更新後的所述擴展式丟棄表的內容設定所述性能引擎中的所述結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍。The data access device responding to the host discard command as described in claim 9, wherein the processing unit executes the host write command to write the user data of the second logical address to the flash memory module; and when the second logical address is written into the flash memory module; When the second logical address appears in the extended discard table, delete the item containing the second logical address from the extended discard table, and set the set value according to the content of the updated extended discard table. The end address register in the performance engine is used to redefine the address range of the extended discard table stored in the random access memory. 如請求項9所述的因應主機丟棄命令的資料存取裝置,其中,所述處理單元從主機端接收主機讀取命令,其中,所述主機讀取命令指示讀取第三邏輯位址的使用者資料;以及當所述第三邏輯位址出現在所述擴展式丟棄表之中時,回覆虛假資料給所述主機端。The data access device responding to host discarding commands as described in claim 9, wherein the processing unit receives a host read command from the host side, wherein the host read command indicates the use of the third logical address for reading or information; and when the third logical address appears in the extended discard list, reply false information to the host. 如請求項9所述的因應主機丟棄命令的資料存取裝置, 其中,所述隨機存取記憶體配置空間給丟棄佇列,其中,所述丟棄佇列包含多個節點,每個所述節點用來儲存已經丟棄的使用者資料的邏輯位址區間, 其中,所述處理單元判斷所述主機丟棄命令所指出的不再使用的使用者資料的所述第一邏輯位址的數量是否超過或者等於指定數目;當所述第一邏輯位址的所述數量超過或者等於所述指定數目時,新增包含所述第一邏輯位址的新項目至所述擴展式丟棄表,以及設定所述性能引擎中的所述開始位址寄存器和所述結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍;以及當所述第一邏輯位址的所述數量低於所述指定數目時,新增包含所述第一邏輯位址的新節點至所述丟棄佇列。 The data access device in response to a host discarding command as described in Claim 9, Wherein, the random access memory allocates space for the discarding queue, wherein the discarding queue includes a plurality of nodes, and each of the nodes is used to store a logical address range of discarded user data, Wherein, the processing unit judges whether the number of the first logical addresses of the unused user data indicated by the host discard command exceeds or equals to a specified number; when the number of the first logical addresses When the number exceeds or is equal to the specified number, add a new item containing the first logical address to the extended discard table, and set the start address register and the end bit in the performance engine an address register for redefining the address range of the extended discard table stored in the random access memory; and when the number of the first logical address is lower than the specified number, a new Adding a new node including the first logical address to the discard queue. 如請求項13所述的因應主機丟棄命令的資料存取裝置,其中,所述處理單元執行所述主機端發送的主機寫入命令,其中,所述主機寫入命令指示寫入第四邏輯位址的使用者資料到閃存模組;當所述第四邏輯位址出現在所述擴展式丟棄表中時,從所述擴展式丟棄表刪除所述第四邏輯位址的相應項目,並且依據更新後的擴展式丟棄表的內容設定所述性能引擎中的所述結束位址寄存器,用於定義所述隨機存取記憶體中的新位址範圍;以及當所述第四邏輯位址出現在所述丟棄佇列中時,更新所述丟棄佇列中的內容以反映所述主機寫入命令的執行結果。The data access device responding to the host discarding command according to claim 13, wherein the processing unit executes the host write command sent by the host end, wherein the host write command indicates to write the fourth logic bit address user data to the flash memory module; when the fourth logical address appears in the extended discard table, delete the corresponding item of the fourth logical address from the extended discard table, and according to The content of the updated extended discard table sets the end address register in the performance engine to define a new address range in the random access memory; and when the fourth logical address is out When currently in the discard queue, update the content in the discard queue to reflect the execution result of the host write command. 如請求項13所述的因應主機丟棄命令的資料存取裝置,其中,所述處理單元從主機端接收主機讀取命令,其中,所述主機讀取命令指示讀取第五邏輯位址的使用者資料;以及當所述第五邏輯位址出現在所述擴展式丟棄表或者所述丟棄佇列之中時,回覆虛假資料給所述主機端。The data access device responding to host discarding commands as described in claim 13, wherein the processing unit receives a host read command from the host side, wherein the host read command indicates the use of the fifth logical address for reading or data; and when the fifth logical address appears in the extended discard list or the discard queue, reply false data to the host.
TW111112363A 2022-03-31 2022-03-31 Method and computer program product and apparatus for data access in response to host discard commands TWI810876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111112363A TWI810876B (en) 2022-03-31 2022-03-31 Method and computer program product and apparatus for data access in response to host discard commands

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111112363A TWI810876B (en) 2022-03-31 2022-03-31 Method and computer program product and apparatus for data access in response to host discard commands

Publications (2)

Publication Number Publication Date
TWI810876B true TWI810876B (en) 2023-08-01
TW202340939A TW202340939A (en) 2023-10-16

Family

ID=88585488

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111112363A TWI810876B (en) 2022-03-31 2022-03-31 Method and computer program product and apparatus for data access in response to host discard commands

Country Status (1)

Country Link
TW (1) TWI810876B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200417855A (en) * 2003-03-13 2004-09-16 Ritek Corp Device and method for recording the status of block of a nonvolatile memory
US20120246388A1 (en) * 2011-03-22 2012-09-27 Daisuke Hashimoto Memory system, nonvolatile storage device, control method, and medium
US20130275660A1 (en) * 2012-04-12 2013-10-17 Violin Memory Inc. Managing trim operations in a flash memory system
US20140258601A1 (en) * 2006-11-06 2014-09-11 Rambus Inc. Memory Controller Supporting Nonvolatile Physical Memory
US20190171559A1 (en) * 2017-12-05 2019-06-06 Silicon Motion Inc. Method for accessing flash module, associated flash controller and electronic device
TW201923601A (en) * 2017-11-17 2019-06-16 財團法人工業技術研究院 Memory controller, control method for the memory controller, memory and control method for the memory

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200417855A (en) * 2003-03-13 2004-09-16 Ritek Corp Device and method for recording the status of block of a nonvolatile memory
US20140258601A1 (en) * 2006-11-06 2014-09-11 Rambus Inc. Memory Controller Supporting Nonvolatile Physical Memory
US20120246388A1 (en) * 2011-03-22 2012-09-27 Daisuke Hashimoto Memory system, nonvolatile storage device, control method, and medium
US20130275660A1 (en) * 2012-04-12 2013-10-17 Violin Memory Inc. Managing trim operations in a flash memory system
TW201923601A (en) * 2017-11-17 2019-06-16 財團法人工業技術研究院 Memory controller, control method for the memory controller, memory and control method for the memory
US20190171559A1 (en) * 2017-12-05 2019-06-06 Silicon Motion Inc. Method for accessing flash module, associated flash controller and electronic device

Also Published As

Publication number Publication date
TW202340939A (en) 2023-10-16

Similar Documents

Publication Publication Date Title
TWI660346B (en) Memory management method and storage controller
TW202101227A (en) Apparatus and method and computer program product for handling flash physical-resource sets
CN114328303A (en) Storage device, operation method thereof, and operation method of computing device including the same
US11537328B2 (en) Method and apparatus for executing host commands
CN111897485A (en) Data storage method and device, electronic equipment and storage medium
TWI756854B (en) Method and apparatus and computer program product for managing data storage
TWI810876B (en) Method and computer program product and apparatus for data access in response to host discard commands
US11494113B2 (en) Computer program product and method and apparatus for scheduling execution of host commands
US11397676B2 (en) Computer program product and method and apparatus for managing garbage collection process
CN114625307A (en) Computer readable storage medium, and data reading method and device of flash memory chip
TWI670599B (en) Memory management method and storage controller
TWI758745B (en) Computer program product and method and apparatus for scheduling executions of host commands
TWI835027B (en) Method and computer program product and apparatus for updating host-to-flash address mapping table
TWI749490B (en) Computer program product and method and apparatus for programming flash administration tables
US20230315622A1 (en) Method and non-transitory computer-readable storage medium and apparatus for data access in response to host discard commands
TWI740446B (en) Computer program product and method and apparatus for managing garbage collection (gc) processes
TWI814647B (en) Method and computer program product and apparatus for executing host commands
TW202321921A (en) Method and computer program product and apparatus for updating host-to-flash address mapping table
TWI822516B (en) Method and computer program product and apparatus for executing host write commands
TWI774277B (en) Method and apparatus for executing host commands
TWI805505B (en) Method and computer program product and apparatus for scheduling and executing host data-update commands
US11307766B2 (en) Apparatus and method and computer program product for programming flash administration tables
TWI822517B (en) Method and computer program product and apparatus for executing host write commands
TWI795680B (en) Method and apparatus for data reads in host performance acceleration mode
KR102583244B1 (en) Storage device and operating method of storage device