TW202340939A - 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
TW202340939A
TW202340939A TW111112363A TW111112363A TW202340939A TW 202340939 A TW202340939 A TW 202340939A TW 111112363 A TW111112363 A TW 111112363A TW 111112363 A TW111112363 A TW 111112363A TW 202340939 A TW202340939 A TW 202340939A
Authority
TW
Taiwan
Prior art keywords
discard
host
extended
logical address
command
Prior art date
Application number
TW111112363A
Other languages
Chinese (zh)
Other versions
TWI810876B (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 methods and product computer programs and devices that respond to host discard commands

本發明涉及儲存裝置,尤指一種因應主機丟棄命令的資料存取方法、產品電腦程式及裝置。The present invention relates to storage devices, and in particular, to a data access method, product computer program and device in response to a host discard 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 processor (Host) can provide any address to access the NOR flash memory on the address pin, and obtain the data stored at the address from the data pin of the NOR flash memory in a timely manner. material. On the contrary, NAND flash memory does not have random access, but sequential access. NAND flash memory cannot access any random address like NOR flash memory. Instead, the central processor needs to write a sequence of Bytes values to 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 a host discard command.

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

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

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

本說明書更另涉及一種因應主機丟棄命令的資料存取裝置,包含:隨機存取記憶體;性能引擎;和處理單元。隨機存取記憶體用於配置空間給擴展式丟棄表,其包含多個項目,而每個所述項目記載已經丟棄的使用者資料的邏輯位址。性能引擎包含開始位址寄存器和結束位址寄存器,用於定義所述隨機存取記憶體中儲存所述擴展式丟棄表的位址範圍。處理單元用於從主機端接收主機丟棄命令,其指出不再使用的使用者資料的第一邏輯位址;新增包含所述第一邏輯位址的新項目至所述擴展式丟棄表;以及設定所述性能引擎中的所述開始位址寄存器和所述結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍,使得所述性能引擎藉由在所述隨機存取記憶體中的所述位址範圍搜索所述擴展式丟棄表以判斷特定邏輯位址的使用者資料是否已經不再使用。This specification further relates to a data access device that responds to a host discard 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 contains a plurality of entries, and each entry records a logical address of 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 where the extended discard table is stored. The processing unit is configured to receive a host discard command from the host, which indicates a first logical address of user data that is no longer used; add 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 are used to redefine the address range of the extended discard table stored in the random access memory, so that the performance The engine determines whether the user data at a specific logical address is no longer in use by searching the extended discard table in the address range in the random access memory.

上述實施例的優點之一,通過性能引擎的設置和擴展式丟棄表的使用,避免處理單元耗費過多的運算資源來判斷主機寫入命令所要寫入的使用者資料的邏輯位址或者主機讀取命令所要讀取的使用者資料的邏輯位址是否落入之前已經丟棄的邏輯位址區間。One of the advantages of the above embodiment is that through the setting of the performance engine and the use of the extended discard table, the processing unit is prevented from consuming too much computing resources to determine the logical address of the user data to be written by the host write command or the host read. 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 in conjunction with the following description and drawings.

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

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

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

必須了解的是,當元件描述為“連接”或“耦接”至另一元件時,可以是直接連結、或耦接至其他元件,可能出現中間元件。相反地,當元件描述為“直接連接”或“直接耦接”至另一元件時,其中不存在任何中間元件。使用來描述元件之間關係的其他語詞也可類似方式解讀,例如“介於”相對於“直接介於”,或者是“鄰接”相對於“直接鄰接”等等。It must be understood that when an element is described as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, and 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 could be interpreted in a similar fashion, such as "between" versus "directly between," "adjacent" versus "directly adjacent," etc.

參考圖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 can be collectively referred to as a device side (Device Side). The electronic device 10 can be implemented in electronic products such as personal computers, laptop computers (Laptop PC), tablet computers, mobile phones, digital cameras, and digital video cameras. The host interface (Host Interface) 137 between the host 110 and the flash memory controller 130 can be a Universal Serial Bus (USB), an advanced technology attachment (ATA), or a serial advanced technology attachment (ATA). Communication protocols such as SATA), peripheral component interconnect express (PCI-E), Universal Flash Storage (UFS), and embedded multi-media card (eMMC) communicate with each other. The flash 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) communication protocol, such as 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 a variety of ways, such as using general-purpose hardware (eg, a single processor, multiple processors with parallel processing capabilities, a graphics processor, or other processors with computing capabilities), and When executing software and/or firmware instructions, the functions described later are provided. The processing unit 134 receives host commands through the host interface 131, such as read command (Read Command), write command (Write Command), discard command (Discard Command), erase command (Erase Command), etc., schedules and executes these commands. . The flash memory controller 130 also 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) or a static random access memory (Static Random Access Memory, SRAM) or a combination of the above two, is used to configure the space as a data buffer to store user data (also called host data) read from the host 110 and about to be written to the flash memory module 150, and from the flash memory module. The group 150 reads and outputs the 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 addresses. Comparison table (Flash-to-Host Address Mapping Table, referred to as F2H table), etc. The flash memory interface 139 includes a NAND Flash Controller (NFC), which provides functions required for accessing the flash memory module 150, such as a command sequencer (Command Sequencer) and a 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 may comply with the specifications of eMMC, 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 Receive a discard command (Discard Command) from the host side 110. In other embodiments, the processing unit 134 may comply with the UFS specification, such as Section 11.3.26 of UNIVERSAL FLASH STORAGE (UFS), Version 3.1 published in January 2020, and receive the release from the host 110 through the host interface 131 Mapping command (UNMAP Command). If the parameter "bProvisioningType" of the Unit Descriptor in the unmapping command is set to "02h", it means that this is a discard command. The host 110 can send the host discard command as described above to the flash memory controller 130 to indicate the logical address of the user data that is no longer used, such as a host page number (Host Page Number), a logical block address ( Logical Block Address (LBA) and other methods. Different from the host erase command, when executing the host discard command, the flash memory controller 130 does not need to physically erase the memory unit used to store the data at the specified logical address. It only needs to mark that the data at this logical address is no longer available. exist. When appropriate, the flash memory controller 130 executes a garbage collection process to collect physical memory cells corresponding to the marked logical addresses and erase them.

閃存控制器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中的特定資料緩存器等。The flash memory controller 130 can be configured with a bus architecture (Bus Architecture) 132 for coupling components to each other to transmit data, addresses, control signals, etc. These components include a host interface 131, a processing unit 134, a RAM 136, Performance Engine 137, Direct Memory Access (DMA) controller 138, Flash memory interface 139, etc. 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, the flash memory controller 130 may be configured with a high-speed bus 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 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 architecture 132 according to the instructions of the processing unit 134, for example, move the data from a specific data buffer (Data Buffer) in the host interface 131 or the flash memory interface 139 to the RAM 136. At a specific address, the data at a specific address in the RAM 136 is moved to a specific data register in the host interface 131 or the flash memory interface 139, etc.

匯流排包含並行的物理線,連接閃存控制器130中兩個以上的組件。匯流排是一種共享的傳輸媒體,在任意的時間上,只能有兩個裝置可以使用這些線來彼此溝通,用於傳遞資料。資料及控制訊號能夠在組件間分別沿資料和控制線進行雙向傳播,但另一方面,位址訊號只能沿位址線進行單向傳播。例如,當處理單元134想要讀取RAM 136的特定位址上的資料時,處理單元134在位址線上傳送此位址給RAM 136。接著,此位址的資料會在資料線上回覆給處理單元134。為了完成資料讀取操作,控制訊號會使用控制線進行傳遞。The bus includes parallel physical lines that connect two or more components in the flash memory controller 130 . The bus is a shared transmission medium. At any time, only two devices can use these lines to communicate with each other and transfer data. Data and control signals can propagate in both directions between components along data and control lines respectively, but on the other hand, address signals can only propagate in one direction along 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, control signals are transmitted using control lines.

閃存模組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 (GB) or even several Terabytes (TB), for storing large amounts of user data. For example, 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 may include Single Level Cells (SLCs), Multiple Level Cells (MLCs), or Triple Level Cells (Triple Level Cells). Level Cells (TLCs), Quad-Level Cells (QLCs), or any combination of the above. The processing unit 134 writes user data to a specified address (destination address) in the flash memory module 150 through the flash memory interface 139, and reads user data from a specified address (source address) in the flash memory module 150. The flash memory interface 139 uses several electronic signals to coordinate the transmission of data and commands between the flash memory controller 130 and the flash memory module 150, including data lines (Data Line), clock signals (Clock Signal) and control signals (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 Figure 2, the interface 151 in the flash memory module 150 may include four input/output channels (I/O channels, hereinafter referred to as channels) CH#0 to CH#3, each channel is connected to four NAND flash memory units, for example, channel CH#0 is connected to NAND flash memory cells 153#0, 153#4, 153#8 and 153#12. Each NAND flash memory cell 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, and 153#8 to 153#11. , or 153#12 to 153#15, and then read user data from the enabled NAND flash memory unit in a parallel manner, 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 implementations, the flash memory controller 130 may configure space in the RAM 136 for a discard queue (Discard Queue). The drop queue contains multiple nodes, and each node is used to store information about the logical address range for discarding user data as instructed by the host drop command. Table 1 shows an example drop 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 a starting master page number and length indicated by a discard command. As mentioned above, the 0th to 3rd example nodes contain the following information. The four previously received discard commands respectively indicate that the main pages P#100~P#131, P#200~P#203, and P#300~ The user data of P#363 and P#500~P#507 are discarded. However, each time the processing unit 134 receives a host read command from the host 110 through the host interface 131, it needs to consume 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 returns an error message or a dummy value to the host 110 through the host interface 131 . When the processing unit 134 receives a host write command from the host 110 through the host interface 131 each time, it also needs to consume 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 the logical address range that has been discarded before.

為了降低處理單元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 load on the processing unit 134 and improve the overall performance of the flash controller 130, the flash controller 130 can allocate space in the RAM 136 for the expanded discard table (Expanded Discard Table), and use a dedicated performance engine 137 to search for the expanded discard table. Discard table. The extended discard table can contain 1024 items, each item records the logical address of discarded user data, or a 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 system requirements. The present invention is not limited to the extended discard table containing only 1024 items. Table 2 shows an example extended drop table: Table 2 Project 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 to the 0th to 31st items in Table 2, recording the main page numbers P#100 to P#131 respectively; Table 1 The information of the first item in Table 2 can be expanded to the 32nd to 35th items in Table 2, and the main page numbers P#200 to P#203 are respectively recorded, and so on. The processing unit 134 can perform sorting when adding items to the extended discard table based on the information carried in the host discard command, so that the logical addresses can be arranged in ascending or descending order to facilitate search by the dedicated performance engine 137 .

參考圖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 allowing the processing unit 134 to define the address range of the extended discard table in the RAM 136 . Since the number of items stored in the extended discard table is variable, whenever the contents of the extended discard table are updated, the processing unit 134 will reset the start address register 322 and the end address register 324 for searching. Circuit 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, which are used for the processing unit 134 to instruct the search circuit 310 to search up to eight main page numbers in the extended discard table. The performance engine 137 may include eight result registers 350#0~350#7, allowing the search circuit 310 to store search results corresponding to the target registers 330#0~330#7 respectively. For example, the result register 350#0 stores the search results for the main page number indicated by the target register 330#0, the result register 350#1 stores the search results for 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, in which the 15th bit stores the information of whether there is a hit. If there is a hit, the 14th to 0th bits store the hit item number 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 of whether the main page number in the corresponding target register appears in the extended discard table, and, if it is hit, this main page The item in the extended discard table where the number exists. 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. The present invention is not limited to only eight pairs of target registers in the performance engine 137. registers and result registers. Those skilled in the art can use conventional circuits to implement the search circuit 310 to allow the search circuit 310 to complete linear search (Linear Search), binary search (Binary Search), and 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, dedicated wires may be used to connect the processing unit 134 and the performance engine 137, allowing the processing unit 134 to set the start address register 322, the end address register 324, and the target registers 330#0~330 through the dedicated wires. #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 other embodiments, the processing unit 134 may set the start address register 322, the end address register 324, and the target registers 330#0~330#7 in the performance engine 137 through the shared bus architecture 132, and obtain the data from the performance engine 137. 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 may be used to connect the performance engine 137 and the RAM 136 to allow the performance engine 137 to 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 may 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 to process the host discard command received from the host end 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 terminal 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 contents of the extended discard table stored in the RAM 136 according to the logical address of discarded user data indicated by the host discard command. The items in the updated extended discard table will be sorted in ascending or descending order according to the logical address.

步驟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 step S420 in a loop is executed, the extended discard table is as shown in Table 2: When the processing unit 134 receives the user information 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 Project 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 solutions of the extended discard table and the performance engine 137, embodiments of the present invention propose 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 discard table after each host write command. Referring to Figure 5, the detailed steps are as follows:

步驟S510:執行第一個(下一個)主機寫入命令,用於將指定邏輯位址的使用者資料通過閃存介面139寫入閃存模組150。Step S510: Execute the first (next) host write command to write the user data at 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 to which the user data is written appears in the extended discard table. If yes, the process continues to the process of step S530; otherwise, the process continues to the process of step S510. The processing unit 134 may 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 the driver performance engine 137, it can continue 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 logical addresses have been judged, the processing unit 134 continues the processing of the next step.

步驟S530:刪除出現在擴展式丟棄表中的邏輯位址的相應項目。Step S530: Delete the corresponding entry 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 step S510 in a loop is executed, the extended discard table is as shown in Table 2: when the processing unit 134 completes 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 Appears in the extended discard table (step S520). When it is found that the logical addresses P#200~P#203 all appear in the extended discard table ("Yes" path in step S520), the processing unit 134 may update the extended discard table as shown in Table 4 below (step S530) : Table 4 Project 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 solutions of the extended discard table and performance engine 137, embodiments of the present invention propose a method for executing host read commands, which is implemented when the processing unit 134 loads and executes relevant firmware or software instructions. This method is executed repeatedly and is used to selectively reply false data or real user data to the host 110 according to the contents 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: Extract the first (next) host write command to instruct 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 table. If yes, the process continues to the process of step S630; otherwise, the process continues to the process of step S640. The processing unit 134 may 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 the driver performance engine 137, it can continue 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 logical addresses have been judged, the processing unit 134 continues the processing of the next step.

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

步驟S634:驅動閃存介面139從閃存模組150讀取其他沒有出現在擴展式丟棄表中的邏輯位址的使用者資料,並且驅動主機介面131回覆讀出的使用者資料給主機端110。Step S634: The driver flash memory interface 139 reads user data of other logical addresses that do not appear in the extended discard table from the flash memory module 150, and drives 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 at 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 configure space in RAM 136 for the extended discard table and discard queue. If the length of the logical address for discarding user data indicated by a host discard command exceeds or is equal to a specified number (for example, exceeds or is equal to 32 hours), store the information carried in the host 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 the specified number, the information carried in the host discard command is stored in one or more consecutive entries in the extended discard table. For example, when the four previously received discard commands respectively indicate that 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 four 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 Project 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, 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 to process the host discard command received from the host end 110 . Referring to Figure 7, the difference from Figure 4 is that Figure 7 inserts the judgment of step S710 after step S410, and adds the processing of step S720 after the judgment is established. The detailed description is as follows:

步驟S710:判斷主機丟棄命令所指示丟棄的使用者資料的邏輯位址長度是否超過或者等於指定數目(例如,32)。如果是,則流程繼續進行步驟S720的處理;否則,流程繼續進行步驟S420的處理。Step S710: Determine whether the logical address length of the user data discarded as instructed by the host discard command exceeds or is equal to a specified number (for example, 32). If yes, the process continues to the process of step S720; otherwise, the process continues to the process of 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 Figure 7 , reference can be made to the corresponding description in Figure 4 , and will not be described again for the sake of 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 Implemented when executing relevant firmware or software instructions. This method is executed iteratively to adaptively update the discard queue and extended discard table after each host write command is executed. Referring to Figure 8, the difference from Figure 5 is that Figure 8 adds a new judgment of step S810 after step S510, and adds the processing of step S820 after the judgment is established. The details are as follows:

步驟S810:判斷寫入使用者資料的邏輯位址是否出現在丟棄佇列中。如果是,則流程繼續進行步驟S820的處理;否則,流程繼續進行步驟S510的處理。Step S810: Determine whether the logical address to which the user data is written appears in the discard queue. If yes, the process continues to the process of step S820; otherwise, the process continues to the process 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 step S510 in a loop is executed, the discard queue is as shown in Table 5: when the processing unit 134 completes executing the host write command of the user data of the main pages P#100~P#131 (step S510) , the processing unit 134 can delete the 0th node in the discard queue to 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 Figure 8, please refer to the corresponding description in Figure 5, and will not be described again for the sake of simplicity. It should be noted here that, with the assistance of the performance engine 137, the operations of steps S520 to S540 may 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 host read command execution method, which is implemented when the processing unit 134 loads and executes relevant firmware or software instructions. This method is executed repeatedly and is used to selectively reply false data or real user data to the host 110 according to the contents of the discard queue and the extended discard table when each host read command is executed. Referring to Figure 9, the difference between it and Figure 6 is that steps S620, S632, and S634 of Figure 6 are replaced by steps S910, S922, and S924 respectively. The detailed description is 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 discard table and the discard queue. If yes, the flow continues to the processing of step S922; otherwise, the flow continues to the processing of step S640. The processing unit 134 may 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 the driver 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 logical addresses have been judged, the processing unit 134 continues the processing of the next step.

步驟S922:對於出現在擴展式丟棄表或者丟棄佇列中的每個邏輯位址,驅動主機介面131回覆虛假值給主機端110。Step S922: For each logical address appearing in the extended discard table or discard queue, the driver 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 other user data of logical addresses that do not appear in the extended discard table and discard queue from the flash memory module 150, and drive the host interface 131 to reply the read user data to the host. End 110.

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

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

雖然本發明使用以上實施例進行說明,但需要注意的是,這些描述並非用以限縮本發明。相反地,此發明涵蓋了熟習此技藝人士顯而易見的修改與相似設置。所以,申請權利要求範圍須以最寬廣的方式解釋來包含所有顯而易見的修改與相似設置。Although the present invention is described using the above embodiments, it should be noted that these descriptions are not intended to limit the present invention. On the contrary, this invention covers modifications and similar arrangements which will be obvious to one skilled in the art. Therefore, the scope of 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 devices 110: Host side 130:Flash controller 131:Host interface 132:Bus 134: Processing unit 136: Random access memory 137:Performance engine 138: Direct Memory Access Controller 139:Flash memory 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 present invention.

圖2為依據本發明實施例的閃存模組的示意圖。FIG. 2 is a schematic diagram of a flash memory module according to an embodiment of the present 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為依據本發明實施例的執行主機丟棄命令的方法流程圖。Figure 4 is a flow chart of a method for executing a host discard command according to an embodiment of the present invention.

圖5為依據本發明實施例的主機寫入命令執行後的擴展式丟棄表的更新方法的流程圖。FIG. 5 is a flow chart of a method for updating the extended discard table after the 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 present invention.

圖7為依據本發明實施例的執行主機丟棄命令的方法流程圖。Figure 7 is a flow chart 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 discard command and an update method of an extended discard table after the host write command is executed according to an embodiment of the present invention.

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

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

Claims (15)

一種因應主機丟棄命令的資料存取方法,由處理單元執行,包含: 在隨機存取記憶體中配置空間給擴展式丟棄表,其中,所述擴展式丟棄表包含多個項目,每個所述項目記載已經丟棄的使用者資料的邏輯位址; 從主機端接收主機丟棄命令,其中,所述主機丟棄命令指出不再使用的使用者資料的第一邏輯位址; 新增包含所述第一邏輯位址的新項目至所述擴展式丟棄表;以及 設定性能引擎中的開始位址寄存器和結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍,使得所述性能引擎藉由在所述隨機存取記憶體中的所述位址範圍搜索所述擴展式丟棄表以判斷特定邏輯位址的使用者資料是否已經不再使用。 A data access method in response to a host discard command, executed by a processing unit, including: Configuring space in the random access memory for an extended discard table, wherein the extended discard table includes a plurality of entries, each of which records a logical address of discarded user data; Receive a host discard command from the host, wherein the host discard command indicates the first logical address of the user data that is no longer used; Add 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 are used to redefine the address range of the extended discard table stored in the random access memory, so that the performance engine uses the The address range in the random access memory searches the extended discard table to determine whether user data at a specific logical address is no longer in use. 如請求項1所述的因應主機丟棄命令的資料存取方法,其中,所述擴展式丟棄表的多個所述項目依據所述邏輯位址以升冪或降冪的方式排列。The data access method in response to a host discard command as described in claim 1, wherein the plurality of items in the extended discard table are arranged in ascending or descending order according to the logical address. 如請求項1所述的因應主機丟棄命令的資料存取方法,包含: 執行主機寫入命令以寫入第二邏輯位址的使用者資料至閃存模組;以及 當所述第二邏輯位址出現在所述擴展式丟棄表之中時,從所述擴展式丟棄表刪除包含所述第二邏輯位址的項目,並且依據更新後的所述擴展式丟棄表的內容設定所述性能引擎中的所述結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍。 The data access method in response to the host discard command as described in request 1 includes: Execute 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 discard table, delete the entry containing the second logical address from the extended discard table, and based on the updated extended discard table The content sets the end address register in the performance engine for redefining the address range of the extended discard table stored in the random access memory. 如請求項1所述的因應主機丟棄命令的資料存取方法,包含: 從主機端接收主機讀取命令,其中,所述主機讀取命令指示讀取第三邏輯位址的使用者資料;以及 當所述第三邏輯位址出現在所述擴展式丟棄表之中時,回覆虛假資料給所述主機端。 The data access method in response to the host discard command as described in request 1 includes: Receive a host read command from the host end, wherein the host read command instructs to read the user data of the third logical address; and When the third logical address appears in the extended discard table, false data is returned to the host. 如請求項1所述的因應主機丟棄命令的資料存取方法,包含: 在隨機存取記憶體中配置空間給丟棄佇列,其中,所述丟棄佇列包含多個節點,每個所述節點用來儲存已經丟棄的使用者資料的邏輯位址區間; 判斷所述主機丟棄命令所指出的不再使用的使用者資料的所述第一邏輯位址的數量是否超過或者等於指定數目; 當所述第一邏輯位址的所述數量超過或者等於所述指定數目時,新增包含所述第一邏輯位址的新項目至所述擴展式丟棄表,以及設定所述性能引擎中的所述開始位址寄存器和所述結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍;以及 當所述第一邏輯位址的所述數量低於所述指定數目時,新增包含所述第一邏輯位址的新節點至所述丟棄佇列。 The data access method in response to the host discard command as described in request 1 includes: Allocating space in the random access memory to a discard queue, wherein the discard queue includes a plurality of nodes, each of which is used to store a logical address range of discarded user data; Determine whether the number of the first logical addresses of the user data that is no longer used as indicated by the host discard command exceeds or is equal to a specified number; When the number of the first logical addresses exceeds or is equal to the specified number, a new entry including the first logical address is added to the extended discard table, and a parameter in the performance engine is set. 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 addresses is lower than the specified number, a new node including the first logical address is added to the discard queue. 如請求項5所述的因應主機丟棄命令的資料存取方法,包含: 執行所述主機端發送的主機寫入命令,其中,所述主機寫入命令指示寫入第四邏輯位址的使用者資料到閃存模組; 當所述第四邏輯位址出現在所述擴展式丟棄表中時,從所述擴展式丟棄表刪除所述第四邏輯位址的相應項目,並且依據更新後的擴展式丟棄表的內容設定所述性能引擎中的所述結束位址寄存器,用於定義所述隨機存取記憶體中的新位址範圍;以及 當所述第四邏輯位址出現在所述丟棄佇列中時,更新所述丟棄佇列中的內容以反映所述主機寫入命令的執行結果。 The data access method in response to the host discard command as described in request 5 includes: Execute the host write command sent by the host end, wherein the host write command instructs to write the user data at the fourth logical address to the flash memory module; When the fourth logical address appears in the extended discard table, delete the corresponding entry of the fourth logical address from the extended discard table, and set it according to the content of the updated extended discard table. The end address register in the performance engine is used to define a new address range in the random access memory; and When the fourth logical address appears in the discard queue, the content in the discard queue is updated to reflect the execution result of the host write command. 如請求項5所述的因應主機丟棄命令的資料存取方法,包含: 從主機端接收主機讀取命令,其中,所述主機讀取命令指示讀取第五邏輯位址的使用者資料;以及 當所述第五邏輯位址出現在所述擴展式丟棄表或者所述丟棄佇列之中時,回覆虛假資料給所述主機端。 The data access method in response to the host discard command as described in request 5 includes: Receive a host read command from the host end, wherein the host read command instructs to read the user data of the fifth logical address; and When the fifth logical address appears in the extended discard table or the discard queue, false data is returned to the host. 一種電腦程式產品,包含程式碼,其中,當處理單元執行所述程式碼時,實施如請求項1至7中任一項所述的因應主機丟棄命令的資料存取方法。A computer program product includes program code, wherein when a processing unit executes the program code, the data access method in response to a host discard command as described in any one of claims 1 to 7 is implemented. 一種因應主機丟棄命令的資料存取裝置,包含: 隨機存取記憶體,用於配置空間給擴展式丟棄表,其中,所述擴展式丟棄表包含多個項目,每個所述項目記載已經丟棄的使用者資料的邏輯位址; 性能引擎,包含開始位址寄存器和結束位址寄存器,用於定義所述隨機存取記憶體中儲存所述擴展式丟棄表的位址範圍;以及 處理單元,耦接所述隨機存取記憶體和所述性能引擎,用於從主機端接收主機丟棄命令,其中,所述主機丟棄命令指出不再使用的使用者資料的第一邏輯位址;新增包含所述第一邏輯位址的新項目至所述擴展式丟棄表;以及設定所述性能引擎中的所述開始位址寄存器和所述結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍,使得所述性能引擎藉由在所述隨機存取記憶體中的所述位址範圍搜索所述擴展式丟棄表以判斷特定邏輯位址的使用者資料是否已經不再使用。 A data access device that responds to host discard commands, including: A random access memory for configuring space for an extended discard table, wherein the extended discard table includes a plurality of items, each of which records the logical address of discarded user data; A performance engine, including a start address register and an end address register, used to define the address range in the random access memory where the extended discard table is stored; and a processing unit coupled to the random access memory and the performance engine for receiving a host discard command from the host, wherein the host discard command indicates the first logical address of the user data that is no longer used; Add a new entry including the first logical address to the extended discard table; and set the start address register and the end address register in the performance engine to redefine the random Accessing an address range of the extended discard table stored in memory causes the performance engine to determine a specific Whether the user data of the logical address is no longer in use. 如請求項9所述的因應主機丟棄命令的資料存取裝置,其中,所述擴展式丟棄表的多個所述項目依據所述邏輯位址以升冪或降冪的方式排列。The data access device for responding to a host discard command as described in claim 9, wherein a plurality of the entries in the extended discard table are arranged in ascending or descending order according to the logical address. 如請求項9所述的因應主機丟棄命令的資料存取裝置,其中,所述處理單元執行主機寫入命令以寫入第二邏輯位址的使用者資料至閃存模組;以及當所述第二邏輯位址出現在所述擴展式丟棄表之中時,從所述擴展式丟棄表刪除包含所述第二邏輯位址的項目,並且依據更新後的所述擴展式丟棄表的內容設定所述性能引擎中的所述結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍。The data access device responding to a host discard command as described in claim 9, wherein the processing unit executes a host write command to write user data at the second logical address to the flash memory module; and when the third When a 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 item based on the updated contents of the 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 a host discard command as described in claim 9, wherein the processing unit receives a host read command from the host, wherein the host read command indicates the use of reading the third logical address information; and when the third logical address appears in the extended discard table, reply false information to the host. 如請求項9所述的因應主機丟棄命令的資料存取裝置, 其中,所述隨機存取記憶體配置空間給丟棄佇列,其中,所述丟棄佇列包含多個節點,每個所述節點用來儲存已經丟棄的使用者資料的邏輯位址區間, 其中,所述處理單元判斷所述主機丟棄命令所指出的不再使用的使用者資料的所述第一邏輯位址的數量是否超過或者等於指定數目;當所述第一邏輯位址的所述數量超過或者等於所述指定數目時,新增包含所述第一邏輯位址的新項目至所述擴展式丟棄表,以及設定所述性能引擎中的所述開始位址寄存器和所述結束位址寄存器,用於重新定義所述隨機存取記憶體中儲存的所述擴展式丟棄表的位址範圍;以及當所述第一邏輯位址的所述數量低於所述指定數目時,新增包含所述第一邏輯位址的新節點至所述丟棄佇列。 A data access device responding to a host discard command as described in request 9, Wherein, the random access memory configures space for a discard queue, wherein the discard queue includes a plurality of nodes, and each node is used to store a logical address range of discarded user data, Wherein, the processing unit determines whether the number of the first logical addresses of the user data that is no longer used as indicated by the host discard command exceeds or is equal to a specified number; when the number of the first logical addresses of the When the number 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 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 addresses is lower than the specified number, a new Add a new node including the first logical address to the drop queue. 如請求項13所述的因應主機丟棄命令的資料存取裝置,其中,所述處理單元執行所述主機端發送的主機寫入命令,其中,所述主機寫入命令指示寫入第四邏輯位址的使用者資料到閃存模組;當所述第四邏輯位址出現在所述擴展式丟棄表中時,從所述擴展式丟棄表刪除所述第四邏輯位址的相應項目,並且依據更新後的擴展式丟棄表的內容設定所述性能引擎中的所述結束位址寄存器,用於定義所述隨機存取記憶體中的新位址範圍;以及當所述第四邏輯位址出現在所述丟棄佇列中時,更新所述丟棄佇列中的內容以反映所述主機寫入命令的執行結果。The data access device responding to a host discard command as described in claim 13, wherein the processing unit executes a host write command sent by the host, wherein the host write command indicates writing a fourth logical bit user data of the address to the flash memory module; when the fourth logical address appears in the extended discard table, delete the corresponding entry of the fourth logical address from the extended discard table, and based on 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 the discard queue is now in the discard queue, the content in the discard queue is updated to reflect the execution result of the host write command. 如請求項13所述的因應主機丟棄命令的資料存取裝置,其中,所述處理單元從主機端接收主機讀取命令,其中,所述主機讀取命令指示讀取第五邏輯位址的使用者資料;以及當所述第五邏輯位址出現在所述擴展式丟棄表或者所述丟棄佇列之中時,回覆虛假資料給所述主機端。The data access device responding to a host discard command as described in claim 13, wherein the processing unit receives a host read command from the host, wherein the host read command indicates the use of reading the fifth logical address and when the fifth logical address appears in the extended discard table or the discard queue, reply false information 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 TWI810876B (en) 2023-08-01
TW202340939A true 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)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI235915B (en) * 2003-03-13 2005-07-11 Ritek Corp Device and method for recording the status of block of a nonvolatile memory
WO2008057557A2 (en) * 2006-11-06 2008-05-15 Rambus Inc. Memory system supporting nonvolatile physical memory
JP5405513B2 (en) * 2011-03-22 2014-02-05 株式会社東芝 MEMORY SYSTEM, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY DEVICE CONTROL METHOD, AND PROGRAM
US9323667B2 (en) * 2012-04-12 2016-04-26 Violin Memory Inc. System and method for managing trim operations in a flash memory system using mapping tables and block status tables
TWI639920B (en) * 2017-11-17 2018-11-01 財團法人工業技術研究院 Memory controller, control method for the memory controller, memory and control method for the memory
TWI692690B (en) * 2017-12-05 2020-05-01 慧榮科技股份有限公司 Method for accessing flash memory module and associated flash memory controller and electronic device

Also Published As

Publication number Publication date
TWI810876B (en) 2023-08-01

Similar Documents

Publication Publication Date Title
WO2021004231A1 (en) Data storage method for flash memory device and flash memory device
TWI660346B (en) Memory management method and storage controller
US20170357462A1 (en) Method and apparatus for improving performance of sequential logging in a storage device
KR20200025184A (en) Nonvolatile memory device, data storage apparatus including the same and operating method thereof
TWI737031B (en) Method and computer program product for reading data fragments of a page on multiple planes
CN110554833B (en) Parallel processing IO commands in a memory device
CN115113799A (en) Host command execution method and device
TWI810876B (en) Method and computer program product and apparatus for data access in response to host discard commands
CN113495850B (en) Method, apparatus and computer readable storage medium for managing garbage collection program
WO2023056687A1 (en) Solid state disk and data manipulation method and apparatus therefor, and electronic device
CN114625307A (en) Computer readable storage medium, and data reading method and device of flash memory chip
TWI835027B (en) Method and computer program product and apparatus for updating host-to-flash address mapping table
TWI670599B (en) Memory management method and storage controller
KR20220076803A (en) Data storage device and operating method thereof
CN113778317A (en) Computer readable storage medium, method and device for scheduling host commands
TWI749490B (en) Computer program product and method and apparatus for programming flash administration tables
TWI758745B (en) Computer program product and method and apparatus for scheduling executions of host commands
CN116931812A (en) Data access method and storage medium and apparatus for responding to host discard command
TWI822516B (en) Method and computer program product and apparatus for executing host write commands
TW202321921A (en) Method and computer program product and apparatus for updating host-to-flash address mapping table
TWI740446B (en) Computer program product and method and apparatus for managing garbage collection (gc) processes
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
KR102583244B1 (en) Storage device and operating method of storage device
TWI822517B (en) Method and computer program product and apparatus for executing host write commands