[go: up one dir, main page]

CN109815157B - Programming command processing method and device - Google Patents

Programming command processing method and device Download PDF

Info

Publication number
CN109815157B
CN109815157B CN201711174050.1A CN201711174050A CN109815157B CN 109815157 B CN109815157 B CN 109815157B CN 201711174050 A CN201711174050 A CN 201711174050A CN 109815157 B CN109815157 B CN 109815157B
Authority
CN
China
Prior art keywords
data
nvm chip
programming
command
address
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201711174050.1A
Other languages
Chinese (zh)
Other versions
CN109815157A (en
Inventor
王祎磊
伍德斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Starblaze Technology Co ltd
Original Assignee
Beijing Starblaze Technology Co ltd
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 Beijing Starblaze Technology Co ltd filed Critical Beijing Starblaze Technology Co ltd
Priority to CN201711174050.1A priority Critical patent/CN109815157B/en
Priority to CN202210139001.9A priority patent/CN114510435A/en
Publication of CN109815157A publication Critical patent/CN109815157A/en
Application granted granted Critical
Publication of CN109815157B publication Critical patent/CN109815157B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0871Allocation or management of cache space
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Memory System (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The application provides a programming command processing method and device. A method of processing a programming command is provided, comprising: sending the address to the NVM chip, and moving the data in the memory to the NVM chip; releasing the data in the memory before the NVM chip indicates that the data is successfully recorded in the address; and querying the state of the NVM chip to obtain a processing result of the programming command.

Description

编程命令处理方法与装置Programming command processing method and device

技术领域technical field

本申请涉及存储技术,具体地,涉及处理NVM芯片的编程命令。The present application relates to storage technology, in particular, to processing programming commands of NVM chips.

背景技术Background technique

图1展示了固态存储设备的框图。固态存储设备102同主机相耦合,用于为主机提供存储能力。主机同固态存储设备102之间可通过多种方式相耦合,耦合方式包括但不限于通过例如SATA(Serial Advanced Technology Attachment,串行高级技术附件)、SCSI(Small Computer System Interface,小型计算机系统接口)、SAS(Serial AttachedSCSI,串行连接SCSI)、IDE(Integrated Drive Electronics,集成驱动器电子)、USB(Universal Serial Bus,通用串行总线)、PCIE(Peripheral Component InterconnectExpress,PCIe,高速外围组件互联)、NVMe(NVM Express,高速非易失存储)、以太网、光纤通道、无线通信网络等连接主机与固态存储设备102。主机可以是能够通过上述方式同存储设备相通信的信息处理设备,例如,个人计算机、平板电脑、服务器、便携式计算机、网络交换机、路由器、蜂窝电话、个人数字助理等。存储设备102包括接口103、控制部件104、一个或多个NVM芯片105以及DRAM(Dynamic Random Access Memory,动态随机访问存储器)110。Figure 1 shows a block diagram of a solid-state storage device. The solid state storage device 102 is coupled to the host for providing storage capabilities for the host. The host and the solid-state storage device 102 can be coupled in various ways, including but not limited to, for example, SATA (Serial Advanced Technology Attachment), SCSI (Small Computer System Interface, small computer system interface) , SAS (Serial Attached SCSI, Serial Attached SCSI), IDE (Integrated Drive Electronics, Integrated Drive Electronics), USB (Universal Serial Bus, Universal Serial Bus), PCIE (Peripheral Component Interconnect Express, PCIe, high-speed peripheral component interconnection), NVMe (NVM Express, high-speed non-volatile storage), Ethernet, Fibre Channel, wireless communication networks, etc. connect the host and the solid-state storage device 102 . The host may be an information processing device, such as a personal computer, tablet computer, server, portable computer, network switch, router, cellular phone, personal digital assistant, etc., capable of communicating with the storage device in the manner described above. The storage device 102 includes an interface 103 , a control unit 104 , one or more NVM chips 105 and a DRAM (Dynamic Random Access Memory, dynamic random access memory) 110 .

NAND闪存、相变存储器、FeRAM(Ferroelectric RAM,铁电存储器)、MRAM(MagneticRandom Access Memory,磁阻存储器)、RRAM(Resistive Random Access Memory,阻变存储器)等是常见的NVM。NAND flash memory, phase change memory, FeRAM (Ferroelectric RAM, ferroelectric memory), MRAM (Magnetic Random Access Memory, magnetoresistive memory), RRAM (Resistive Random Access Memory, resistive memory), etc. are common NVMs.

接口103可适配于通过例如SATA、IDE、USB、PCIE、NVMe、SAS、以太网、光纤通道等方式与主机交换数据。The interface 103 may be adapted to exchange data with the host via, for example, SATA, IDE, USB, PCIE, NVMe, SAS, Ethernet, Fibre Channel, and the like.

控制部件104用于控制在接口103、NVM芯片105以及DRAM 110之间的数据传输,还用于存储管理、主机逻辑地址到闪存物理地址映射、擦除均衡、坏块管理等。控制部件104可通过软件、硬件、固件或其组合的多种方式实现,例如,控制部件104可以是FPGA(Field-programmable gate array,现场可编程门阵列)、ASIC(Application SpecificIntegrated Circuit,应用专用集成电路)或者其组合的形式。控制部件104也可以包括处理器或者控制器,在处理器或控制器中执行软件来操纵控制部件104的硬件来处理IO(Input/Output)命令。控制部件104还可以耦合到DRAM 110,并可访问DRAM 110的数据。在DRAM可存储FTL表和/或缓存的IO命令的数据。The control unit 104 is used for controlling data transfer between the interface 103, the NVM chip 105 and the DRAM 110, and also for storage management, host logical address to flash physical address mapping, erase leveling, bad block management, and the like. The control unit 104 can be implemented in various ways of software, hardware, firmware or a combination thereof. For example, the control unit 104 can be an FPGA (Field-programmable gate array, field programmable gate array), an ASIC (Application Specific Integrated Circuit, application specific integrated circuit) circuit) or a combination thereof. The control unit 104 may also include a processor or controller in which software is executed to manipulate the hardware of the control unit 104 to process IO (Input/Output) commands. Control unit 104 may also be coupled to DRAM 110 and may access data of DRAM 110 . The FTL table and/or cached IO command data may be stored in DRAM.

控制部件104包括闪存接口控制器(或称为介质接口控制器、闪存通道控制器),闪存接口控制器耦合到NVM芯片105,并以遵循NVM芯片105的接口协议的方式向NVM芯片105发出命令,以操作NVM芯片105,并接收从NVM芯片105输出的命令执行结果。已知的NVM芯片接口协议包括“Toggle”、“ONFI”等。The control unit 104 includes a flash interface controller (or referred to as a media interface controller, a flash channel controller), which is coupled to the NVM chip 105 and issues commands to the NVM chip 105 in a manner that follows the interface protocol of the NVM chip 105 , to operate the NVM chip 105 and receive the command execution result output from the NVM chip 105 . Known NVM chip interface protocols include "Toggle", "ONFI" and the like.

存储器目标(Target)是NAND闪存封装内的共享CE(,Chip Enable,芯片使能)信号的一个或多个逻辑单元(LUN,Logic UNit)。NAND闪存封装内可包括一个或多个管芯(Die)。典型地,逻辑单元对应于单一的管芯。逻辑单元可包括多个平面(Plane)。逻辑单元内的多个平面可以并行存取,而NAND闪存芯片内的多个逻辑单元可以彼此独立地执行命令和报告状态。A memory target (Target) is one or more logic units (LUN, Logic UNit) in a NAND flash memory package that share a CE (, Chip Enable, chip enable) signal. One or more dies (Dies) may be included within a NAND flash memory package. Typically, a logic unit corresponds to a single die. A logic unit may include multiple planes. Multiple planes within a logic cell can be accessed in parallel, while multiple logic cells within a NAND flash chip can execute commands and report status independently of each other.

存储介质上通常按页来存储和读取数据。而按块来擦除数据。块(也称物理块)包含多个页。块包含多个页。存储介质上的页(称为物理页)具有固定的尺寸,例如17664字节。物理页也可以具有其他的尺寸。Data is usually stored and read in pages on a storage medium. Instead, data is erased in blocks. A block (also called a physical block) contains multiple pages. A block contains multiple pages. A page (called a physical page) on a storage medium has a fixed size, eg 17664 bytes. Physical pages can also have other sizes.

在固态存储设备中,利用FTL(Flash Translation Layer,闪存转换层)来维护从逻辑地址到物理地址的映射信息。逻辑地址构成了操作系统等上层软件所感知到的固态存储设备的存储空间。物理地址是用于访问固态存储设备的物理存储单元的地址。在相关技术中还可利用中间地址形态实施地址映射。例如将逻辑地址映射为中间地址,进而将中间地址进一步映射为物理地址。In a solid-state storage device, FTL (Flash Translation Layer, flash memory translation layer) is used to maintain mapping information from logical addresses to physical addresses. The logical address constitutes the storage space of the solid-state storage device perceived by upper-layer software such as the operating system. The physical address is the address of the physical storage unit used to access the solid state storage device. In the related art, the address mapping can also be implemented using an intermediate address form. For example, a logical address is mapped to an intermediate address, and the intermediate address is further mapped to a physical address.

存储了从逻辑地址到物理地址的映射信息的表结构被称为FTL表。FTL表是固态存储设备中的重要元数据。通常FTL表的数据项记录了固态存储设备中以数据页为单位的地址映射关系。A table structure that stores mapping information from logical addresses to physical addresses is called an FTL table. FTL tables are important metadata in solid-state storage devices. Usually, the data item of the FTL table records the address mapping relationship in the unit of data page in the solid-state storage device.

FTL表包括多个FTL表条目(或称表项)。在一种情况下,每个FTL表条目中记录了一个逻辑页地址与一个物理页的对应关系。在另一种情况下,每个FTL表条目中记录了连续的多个逻辑页地址与连续的多个物理页的对应关系。在又一种情况下,每个FTL表条目中记录了逻辑块地址与物理块地址的对应关系。在依然又一种情况下,FTL表中记录逻辑块地址与物理块地址的映射关系,和/或逻辑页地址与物理页地址的映射关系。The FTL table includes a plurality of FTL table entries (or entries). In one case, the correspondence between a logical page address and a physical page is recorded in each FTL table entry. In another case, each FTL table entry records the correspondence between a plurality of consecutive logical page addresses and a plurality of consecutive physical pages. In yet another case, each FTL table entry records the correspondence between the logical block address and the physical block address. In still another case, the FTL table records the mapping relationship between logical block addresses and physical block addresses, and/or the mapping relationship between logical page addresses and physical page addresses.

大块包括来自多个逻辑单元(LUN),也称为逻辑单元组的每个的物理块。每个逻辑单元可以为大块提供一个物理块。例如,在图2所示出的大块的示意图中,在每16个逻辑单元(LUN)上构造大块。每个大块包括16个分别来自16个逻辑单元(LUN)的物理块。在图2的例子中,大块0包括来自16个逻辑单元(LUN)中的每个逻辑单元的物理块0,而大块1包括来自每个逻辑单元(LUN)的物理块1。也可以以多种其他方式来构造大块。Large blocks include physical blocks from each of multiple logical units (LUNs), also known as logical unit groups. Each logical unit can provide one physical block for a large block. For example, in the diagram of a large block shown in Figure 2, a large block is constructed on every 16 logical units (LUNs). Each chunk consists of 16 physical blocks each from 16 logical units (LUNs). In the example of FIG. 2, chunk 0 includes physical block 0 from each of the 16 logical units (LUNs), and chunk 1 includes physical block 1 from each logical unit (LUN). Chunks can also be constructed in a variety of other ways.

例如,在大块中构造页条带,每个逻辑单元(LUN)内相同物理地址的物理页构成了“页条带”。图2中,物理页P0-0、物理页P0-1……与物理页P0-x构成了页条带0,其中,物理页P0-0、物理页P0-1……物理页P0-14用于存储用户数据,而物理页P0-x用于存储根据条带内的所有用户数据计算得到的校验数据。类似地,图2中,物理页P2-0、物理页P2-1……与物理页P2-x构成了页条带2。用于存储校验数据的物理页可以位于页条带中的任意位置。作为又一个例子,在申请号为201710752321.0的中国专利申请的图3A及其说明书中对图3A的相关描述中,提供了大块的又一种构造方式。For example, page stripes are constructed in large blocks, and physical pages of the same physical address within each logical unit (LUN) constitute a "page stripe". In FIG. 2 , physical pages P0-0, physical pages P0-1, . It is used to store user data, and the physical pages P0-x are used to store checksum data calculated from all user data in the stripe. Similarly, in FIG. 2 , the physical page P2-0, the physical page P2-1 . . . and the physical page P2-x constitute a page stripe 2. The physical pages used to store parity data can be located anywhere in the page stripe. As yet another example, in FIG. 3A of the Chinese patent application with the application number of 201710752321.0 and the related description of FIG. 3A in the specification, there is provided yet another construction manner of a large block.

图3A是现有技术的NVM芯片的编程命令的示意图。控制部件(例如,图1的控制部件104)通过引脚向NVM芯片发出包括命令、地址与数据的编程命令,将数据写入NVM芯片。图3中,展示了包括多个时钟周期的编程命令。图3位于左边的周期时间在前,位于右边的周期时间在后。每个周期内通过DQ引脚向NVM芯片传输一组信号,图3中“周期类型”行,展示了每周期传输的信号的类型(或含义),“DQ”行展示了每周期传输的信号的值。FIG. 3A is a schematic diagram of programming commands of a prior art NVM chip. The control unit (eg, the control unit 104 of FIG. 1 ) issues a programming command including commands, addresses and data to the NVM chip through pins, and writes data into the NVM chip. In Figure 3, a programming command that includes multiple clock cycles is shown. The cycle time on the left in Figure 3 is first, and the cycle time on the right is last. A set of signals is transmitted to the NVM chip through the DQ pin in each cycle. The "cycle type" row in Figure 3 shows the type (or meaning) of the signal transmitted per cycle, and the "DQ" row shows the signal transmitted per cycle. value of .

以编程命令为例,编程命令包括地址、数据与状态三部分。在编程命令的地址部分,由DQ引脚的“80h”作为指示,随后是多个(例如5个)周期的地址(由C1、C2、R1、R2与R3)指示,这些地址指示编程命令要写入的NVM芯片的地址。接下来,向NVM芯片传输要写入的数据(由D0、D1、……Dn表示),以及由信号“10h”指示数据传输的结束。NVM芯片收到“10h”命令后,开始执行编程操作。控制部件104接下来通过向NVM芯片发出“70h”命令来查询NVM芯片的状态,NVM芯片向控制部件给出状态。状态指示编程命令是否执行完成。Taking the programming command as an example, the programming command includes three parts: address, data and status. In the address portion of the program command, indicated by "80h" on the DQ pin, followed by multiple (eg, 5) cycles of addresses (indicated by C1, C2, R1, R2, and R3) that indicate that the program command will The address of the NVM chip to write to. Next, the data to be written (represented by D0, D1, ... Dn) is transferred to the NVM chip, and the end of the data transfer is indicated by the signal "10h". After the NVM chip receives the "10h" command, it starts to execute the programming operation. The control unit 104 next queries the status of the NVM chip by issuing a "70h" command to the NVM chip, which gives the status to the control unit. The status indicates whether the execution of the programming command is complete.

图3B展示了控制部件执行编程命令的示意图。控制部件通过闪存通道耦合到一颗或多个NVM芯片。NVM芯片包括页缓存,用于缓存向NVM芯片提供的待编程数据或待从NVM芯片读出的数据。控制部件还包括存储器(以SRAM为例)。存储器中存储了待写入NVM芯片的数据(图3B中,以SRAM中的虚线框中的数据所指示)。为执行编程操作,控制部件根据要写入NVM芯片的物理地址,向NVM芯片发送编程命令的地址部分。接下来,控制部件将存储器中的数据传送给NVM芯片,作为编程命令的数据部分。响应于数据传输完成,数据被存储在NVM芯片的页缓存中。控制部件还向NVM芯片发出命令以查询NVM芯片的编程操作是否完成。若NVM芯片提供的状态指示编程操作尚未完成,控制部件稍后再查询NVM芯片的状态,直到确认编程操作完成,并释放存储器中的数据。若状态指示编程操作失败,控制部件利用存储器中的数据重新向NVM芯片发出编程命令。一般地,NVM芯片收到指示数据传输完成,开始编程操作的命令(“10h”)后,到编程操作被处理完成,需要一段时间(记为“t”)。FIG. 3B shows a schematic diagram of the control unit executing programming commands. The control unit is coupled to one or more NVM chips through flash memory channels. The NVM chip includes a page cache for buffering data to be programmed provided to the NVM chip or data to be read out from the NVM chip. The control unit also includes memory (for example, SRAM). The memory stores data to be written to the NVM chip (in FIG. 3B, indicated by the data in the dashed box in the SRAM). To perform the programming operation, the control unit sends the address portion of the programming command to the NVM chip according to the physical address to be written to the NVM chip. Next, the control unit transfers the data in the memory to the NVM chip as the data part of the programming command. In response to the completion of the data transfer, the data is stored in the page cache of the NVM chip. The control part also issues a command to the NVM chip to inquire whether the programming operation of the NVM chip is completed. If the status provided by the NVM chip indicates that the programming operation has not been completed, the control unit will later query the status of the NVM chip until the completion of the programming operation is confirmed, and the data in the memory is released. If the status indicates that the programming operation has failed, the control unit re-issues the programming command to the NVM chip using the data in the memory. Generally, after the NVM chip receives a command (“10h”) indicating that the data transmission is completed and the programming operation is started, it takes a period of time (denoted as “t”) until the programming operation is processed.

可选地,控制部件耦合到多个NVM芯片,NVM芯片的每个LUN可并行处理编程命令。从而控制部件可同时向多个LUN的每个发出编程命令。Optionally, the control unit is coupled to multiple NVM chips, and each LUN of the NVM chips can process programming commands in parallel. The control unit can thus issue programming commands to each of the plurality of LUNs simultaneously.

发明内容SUMMARY OF THE INVENTION

为提高固态存储设备的性能,控制部件同时处理多个编程命令。每个编程命令要写入NVM芯片的数据都被存储在存储器(例如,图3B的SRAM)中。而编程命令从开始到查询到编程操作完成的状态需要经历较长的时间(例如,1ms),这段时间中,要写入NVM芯片的数据被存储在存储器中。需要存储器的容量足够大以容纳多个同时发生的编程命令,并且存储器的利用率不高,在编程操作被处理完成之后,对应的存储空间才被释放。To improve the performance of the solid state storage device, the control unit processes multiple programming commands simultaneously. The data to be written to the NVM chip for each programming command is stored in memory (eg, the SRAM of Figure 3B). However, it takes a long time (for example, 1 ms) from the start of the programming command to the status of the query to the completion of the programming operation. During this time, the data to be written into the NVM chip is stored in the memory. The capacity of the memory needs to be large enough to accommodate multiple simultaneous programming commands, and the utilization rate of the memory is not high, and the corresponding storage space is released after the programming operation is processed.

根据本申请的第一方面,提供了根据本申请第一方面的第一处理编程命令的方法,包括:将地址发送给NVM芯片,将存储器中的数据搬移到NVM芯片;在NVM芯片指示数据被成功记录在所述地址前,释放存储器中的所述数据;以及查询NVM芯片的状态,以得到编程命令的处理结果。According to a first aspect of the present application, there is provided a first method for processing a programming command according to the first aspect of the present application, comprising: sending an address to an NVM chip, and moving data in the memory to the NVM chip; instructing the NVM chip to instruct the data to be Before successfully recording the address, release the data in the memory; and query the state of the NVM chip to obtain the processing result of the programming command.

根据本申请第一方面的第一处理编程命令的方法,提供了根据本申请第一方面的第二处理编程命令的方法,还包括:响应于将存储器中的数据搬移到NVM芯片,在第二存储器中备份所述数据;以及响应于NVM芯片的状态指示编程命令处理失败,生成第二地址,将第二地址发送给NVM芯片,以及将备份的所述数据发送给所述NVM芯片。According to the first method for processing a programming command according to the first aspect of the present application, there is provided a second method for processing a programming command according to the first aspect of the present application, further comprising: in response to moving the data in the memory to the NVM chip, at the second backing up the data in the memory; and generating a second address in response to the status of the NVM chip indicating a program command processing failure, sending the second address to the NVM chip, and sending the backed up data to the NVM chip.

根据本申请第一方面的第一处理编程命令的方法,提供了根据本申请第一方面的第三处理编程命令的方法,还包括:响应于NVM芯片的状态指示编程命令处理失败,将部分编程命令发送给NVM芯片,以指示NVM芯片对页缓存中数据进行编程。According to the first method for processing a programming command according to the first aspect of the present application, there is provided a third method for processing a programming command according to the first aspect of the present application, further comprising: in response to the state of the NVM chip indicating that the processing of the programming command fails, part programming Commands are sent to the NVM chip to instruct the NVM chip to program the data in the page cache.

根据本申请第一方面的第三处理编程命令的方法,提供了根据本申请第一方面的第四处理编程命令的方法,其中部分编程命令包括第二地址,而不包括待编程的数据。According to the third method of processing a programming command according to the first aspect of the present application, there is provided a fourth method of processing a programming command according to the first aspect of the present application, wherein part of the programming command includes the second address and does not include the data to be programmed.

根据本申请第一方面的第三处理编程命令的方法,提供了根据本申请第一方面的第五处理编程命令的方法,其中部分编程命令指示NVM芯片根据所述地址生成第二地址。According to the third method of processing a programming command according to the first aspect of the present application, there is provided the fifth method of processing a programming command according to the first aspect of the present application, wherein the partial programming command instructs the NVM chip to generate the second address according to the address.

根据本申请第一方面的第三到第五处理编程命令的方法之一,提供了根据本申请第一方面的第六处理编程命令的方法,其中部分编程命令还指示待编程的数据在页缓存中的地址。According to one of the third to fifth methods for processing a programming command according to the first aspect of the present application, there is provided a sixth method for processing a programming command according to the first aspect of the present application, wherein part of the programming command further indicates that data to be programmed is stored in a page cache address in .

根据本申请第一方面的第一处理编程命令的方法,提供了根据本申请第一方面的第七处理编程命令的方法,还包括:响应于NVM芯片的状态指示编程命令处理失败,从NVM芯片的页缓存读取所述数据;将第二地址发送给NVM芯片,将读取的所述数据发送给NVM芯片;以及再次查询NVM芯片的状态,以得到将所述数据记录在第二地址的编程操作的处理结果。According to the first method for processing a programming command according to the first aspect of the present application, there is provided a seventh method for processing a programming command according to the first aspect of the present application, further comprising: responding to the status of the NVM chip indicating that the processing of the programming command fails, from the NVM chip The page cache reads the data; sends the second address to the NVM chip, and sends the read data to the NVM chip; and query the state of the NVM chip again to obtain the data that records the data at the second address. The processing result of the programming operation.

根据本申请第一方面的第二处理编程命令的方法,提供了根据本申请第一方面的第八处理编程命令的方法,还包括:响应于NVM芯片的状态指示编程命令处理失败,还将备份的数据搬移到所述存储器,以及将备份的数据从所述存储器搬移到所述NVM芯片。According to the second method for processing a programming command according to the first aspect of the present application, there is provided an eighth method for processing a programming command according to the first aspect of the present application, further comprising: in response to the status of the NVM chip indicating that the processing of the programming command fails, also backup the The data is moved to the memory, and the backup data is moved from the memory to the NVM chip.

根据本申请第一方面的第二处理编程命令的方法,提供了根据本申请第一方面的第九处理编程命令的方法,其中将备份的所述数据从所述第二存储器搬移到所述NVM芯片。According to the second method of processing a programming command according to the first aspect of the present application, there is provided a ninth method of processing a programming command according to the first aspect of the present application, wherein the backed up data is moved from the second memory to the NVM chip.

根据本申请第一方面的第三、第八或第九处理编程命令的方法,提供了根据本申请第一方面的第十处理编程命令的方法,还包括:再次查询NVM芯片的状态,以得到将所述数据记录在第二地址的编程操作的处理结果。According to the third, eighth or ninth method for processing a programming command according to the first aspect of the present application, there is provided a tenth method for processing a programming command according to the first aspect of the present application, further comprising: querying the state of the NVM chip again to obtain A processing result of a programming operation to record the data at the second address.

根据本申请第一方面的第一、第七或第十处理编程命令的方法,提供了根据本申请第一方面的第十一处理编程命令的方法,还包括:响应于NVM芯片的状态指示编程命令处理失败,从处理失败的编程命令所编程地址所属的页条带读出冗余数据,恢复所述数据;将第二地址发送给NVM芯片,将恢复的所述数据发送给NVM芯片。According to the first, seventh or tenth method for processing a programming command according to the first aspect of the present application, there is provided an eleventh method for processing a programming command according to the first aspect of the present application, further comprising: instructing programming in response to the state of the NVM chip If the command processing fails, redundant data is read from the page strip to which the address programmed by the failed programming command belongs, and the data is restored; the second address is sent to the NVM chip, and the restored data is sent to the NVM chip.

根据本申请第一方面的第十一处理编程命令的方法,提供了根据本申请第一方面的第十二处理编程命令的方法,还包括:再次查询NVM芯片的状态,以得到将所述数据记录在第二地址的编程操作的处理结果。According to the eleventh method for processing a programming command according to the first aspect of the present application, there is provided the twelfth method for processing a programming command according to the first aspect of the present application, further comprising: querying the state of the NVM chip again to obtain the data The processing result of the programming operation at the second address is recorded.

根据本申请的第二方面,提供根据本申请第二方面的第一处理编程命令的方法,包括:将地址发送给NVM芯片,将存储器中的数据搬移到NVM芯片;在NVM芯片指示数据被成功记录在所述地址前,存储所述数据的存储器空间可被写入其他数据;以及查询NVM芯片的状态,以得到编程命令的处理结果。According to a second aspect of the present application, there is provided a first method for processing a programming command according to the second aspect of the present application, comprising: sending an address to an NVM chip, and moving data in the memory to the NVM chip; indicating that the data has been successfully executed on the NVM chip Before recording the address, the memory space storing the data can be written with other data; and the state of the NVM chip is queried to obtain the processing result of the programming command.

根据本申请的第三方面,提供根据本申请第三方面的固态存储设备,包括控制部件与NVM芯片,所述控制部件执行根据本申请第一方面与第二方面中的任一方法。According to a third aspect of the present application, there is provided a solid-state storage device according to the third aspect of the present application, comprising a control unit and an NVM chip, the control unit performing any one of the methods according to the first and second aspects of the present application.

根据本申请的第四方面,提供根据本申请第四方面的控制部件,用于执行本申请第一方面与第二方面中的任一方法。According to a fourth aspect of the present application, there is provided a control component according to the fourth aspect of the present application for performing any one of the methods of the first and second aspects of the present application.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments described in this application. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings.

图1是相关技术中固态存储设备的框图;1 is a block diagram of a solid-state storage device in the related art;

图2是相关技术中大块的示意图;2 is a schematic diagram of a large block in the related art;

图3A是现有技术的NVM芯片的编程命令的示意图;3A is a schematic diagram of a programming command of a prior art NVM chip;

图3B展示了控制部件执行编程命令的示意图;Figure 3B shows a schematic diagram of the control component executing programming commands;

图4A展示了根据本申请实施例处理编程命令的示意图;4A shows a schematic diagram of processing programming commands according to an embodiment of the present application;

图4B展示了图4A的实施例中,处理编程命令的流程图;FIG. 4B shows a flowchart of processing programming commands in the embodiment of FIG. 4A;

图5A是根据本申请又一实施例的编程命令的示意图;5A is a schematic diagram of a programming command according to yet another embodiment of the present application;

图5B是根据本申请又一实施例的处理编程命令的流程图;5B is a flowchart of processing programming commands according to yet another embodiment of the present application;

图6A是根据本申请另一实施例的控制部件执行编程命令的示意图;6A is a schematic diagram of a control component executing a programming command according to another embodiment of the present application;

图6B展示了图6A的实施例中,处理编程命令的流程图;以及FIG. 6B shows a flowchart of processing programming commands in the embodiment of FIG. 6A; and

图7展示了根据本申请的又一实施例的处理编程命令的流程图。FIG. 7 shows a flowchart of processing programming commands according to yet another embodiment of the present application.

具体实施方式Detailed ways

下面结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of this application.

图4A展示了根据本申请实施例处理编程命令的示意图。FIG. 4A shows a schematic diagram of processing programming commands according to an embodiment of the present application.

控制部件耦合到多个NVM芯片。控制部件还包括存储器(例如SRAM)。存储器中存储了待被编程到NVM芯片的数据。控制部件向NVM芯片发出编程命令,并将存储器中的数据传输到NVM芯片。NVM芯片收到数据并存储在页缓存中。响应于识别出数据传输完成并被指示开始编程操作(例如,收到“10h”命令),NVM芯片将页缓存中的数据写入控制部件提供的物理地址。The control unit is coupled to the plurality of NVM chips. The control unit also includes memory (eg, SRAM). The memory stores data to be programmed into the NVM chip. The control unit issues programming commands to the NVM chip and transmits the data in the memory to the NVM chip. The NVM chip receives the data and stores it in the page cache. In response to recognizing that the data transfer is complete and being instructed to begin a programming operation (eg, receiving a "10h" command), the NVM chip writes the data in the page cache to the physical address provided by the control unit.

根据本申请图4A的实施例,控制部件在编程命令中,随着将待被编程的数据传输给NVM芯片,即释放存储器中已被传输的数据占据的存储空间,从而该存储空间可被分配用于存储其他编程命令的数据,或其他数据。从而,存储器的利用率得到提升,每个编程命令的数据占用存储器的时间被大大缩短。According to the embodiment of FIG. 4A of the present application, in the programming command, the control unit releases the storage space occupied by the transferred data in the memory as the data to be programmed is transferred to the NVM chip, so that the storage space can be allocated Used to store data for other programming commands, or other data. Therefore, the utilization rate of the memory is improved, and the time that the data of each programming command occupies the memory is greatly shortened.

若控制部件查询到NVM芯片执行编程操作成功,可向NVM芯片发出其他操作命令。若控制部件查询到NVM芯片执行编程操作失败,重新在存储器中分配存储空间。并向NVM芯片发出读页缓存的命令或读命令,将NVM芯片的页缓存中的数据读出并存储在分配的存储空间中。以及再次发出编程命令,向NVM芯片指示编程命令要写入的新物理地址,将新分配的存储空间中的数据搬移到NVM芯片的页缓存,并指示NVM芯片开始执行编程操作(例如,通过“10h”命令)。控制部件还查询NVM芯片的编程操作的执行状态,直到确认编程操作成功执行完成。If the control unit finds that the NVM chip performs the programming operation successfully, it can issue other operation commands to the NVM chip. If the control unit finds that the NVM chip fails to perform the programming operation, it re-allocates the storage space in the memory. A command or read command to read the page cache is issued to the NVM chip, and the data in the page cache of the NVM chip is read out and stored in the allocated storage space. and issue the program command again, instruct the NVM chip to the new physical address to which the program command is to be written, move the data in the newly allocated memory space to the page cache of the NVM chip, and instruct the NVM chip to start the program operation (for example, by " 10h" command). The control unit also queries the execution status of the programming operation of the NVM chip until it is confirmed that the programming operation is successfully executed.

图4B展示了图4A的实施例中,处理编程命令的流程图。FIG. 4B shows a flowchart for processing a programming command in the embodiment of FIG. 4A.

为执行编程命令,控制部件向NVM芯片发出编程命令。控制部件为要编程的数据生成物理地址,在编程命令中将物理地址发送给NVM芯片。控制部件还将存储器(例如,图4A的SRAM)中的待编程的数据,作为编程命令的部分,搬移到NVM芯片(410)。响应于待编程的数据被搬移到NVM芯片,控制部件释放这些数据占用的存储器空间(420),从而这些存储器空间可被分配给其他编程命令数据。控制部件查询NVM芯片指示的对应于编程命令的编程操作的执行结果(430)。To execute programming commands, the control unit issues programming commands to the NVM chip. The control unit generates a physical address for the data to be programmed, and sends the physical address to the NVM chip in a programming command. The control unit also moves the data to be programmed in the memory (eg, the SRAM of Figure 4A) to the NVM chip (410) as part of the programming command. In response to the data to be programmed being moved to the NVM chip, the control unit releases the memory space occupied by the data (420) so that the memory space can be allocated to other program command data. The control part queries the execution result of the program operation corresponding to the program command indicated by the NVM chip (430).

若编程操作执行成功,当前编程命令的处理完成,控制部件可继续处理其他编程命令(返回步骤410)。若查询到当前编程命令处理失败,控制部件重新在存储器中分配存储空间(450),并向NVM芯片发出读命令或读页缓存的命令,以从NVM芯片的页缓存中读取待编程的数据,将读出的数据存储到存储器中新分配的存储空间(460)。以及返回步骤410,控制部件重新生成编程命令,将存储器中新分配的存储空间的数据,通过新的编程命令发送给NVM芯片。控制部件还在新的编程命令中向NVM芯片提供新的物理地址,以指示NVM芯片将待编程数据写入新的物理地址。依然可选地,若新的编程命令对应的编程操作依然失败,还继续重复步骤450与步骤460,并通过步骤410开启又一新的编程命令。If the programming operation is performed successfully, the processing of the current programming command is completed, and the control unit may continue to process other programming commands (returning to step 410). If it is found that the processing of the current programming command fails, the control unit re-allocates the storage space in the memory (450), and issues a read command or a command to read the page cache to the NVM chip, so as to read the data to be programmed from the page cache of the NVM chip , and store the read data in the newly allocated storage space in the memory (460). And returning to step 410, the control component regenerates the programming command, and sends the data of the newly allocated storage space in the memory to the NVM chip through the new programming command. The control unit also provides the NVM chip with a new physical address in a new programming command to instruct the NVM chip to write the data to be programmed into the new physical address. Still optionally, if the programming operation corresponding to the new programming command still fails, steps 450 and 460 are continued to be repeated, and a new programming command is started through step 410 .

可选地,存储器位于控制部件外部,并耦合到控制部件。例如,存储器是DRAM,并具有比图4A中的SRAM更大的容量。Optionally, the memory is external to the control unit and coupled to the control unit. For example, the memory is DRAM and has a larger capacity than SRAM in FIG. 4A.

图5A是根据本申请又一实施例的编程命令的示意图。FIG. 5A is a schematic diagram of a programming command according to yet another embodiment of the present application.

根据图5A的实施例的编程命令(为了清楚的目的,将其称为部分编程命令),同图3B的编程命令相比,移除了数据部分。部分编程命令包括地址部分,由信号“80h”以及后续的地址(由C1、C2、R1、R2与R3)所指示。地址部分指示NVM芯片的物理地址,待编程的数据要被写入该物理地址。响应于收到编程命令的地址部分,NVM芯片记录物理地址。The program command according to the embodiment of FIG. 5A (referred to as a partial program command for the sake of clarity) is compared to the program command of FIG. 3B with the data portion removed. A partial program command includes an address portion, indicated by signal "80h" followed by addresses (by C1, C2, R1, R2, and R3). The address part indicates the physical address of the NVM chip to which the data to be programmed is to be written. In response to receiving the address portion of the program command, the NVM chip records the physical address.

接下来,控制部件向NVM芯片传输编程命令的命令“10h”,而无须传输待编程的数据。命令“10h”指示NVM芯片可开始执行编程操作,以及待编程的数据是NVM芯片的页缓存中的数据。可以理解,命令“10h”仅为举例,可使用具有其他值的命令向NVM芯片指示可开始执行编程命令,并且待编程的数据位于页缓存中。响应于收到命令“10h”,NVM芯片开始编程操作,将页缓存中的数据写入之前记录的编程命令的物理地址。NVM芯片还维护编程操作的执行状态,以指示编程操作正在执行中、编程操作执行成功或者编程操作执行失败。Next, the control section transmits the command "10h" of the programming command to the NVM chip without transmitting the data to be programmed. The command "10h" indicates that the NVM chip can begin to perform a programming operation, and that the data to be programmed is the data in the page cache of the NVM chip. It will be understood that the command "10h" is for example only, and commands with other values may be used to indicate to the NVM chip that execution of the programming command can begin and that the data to be programmed is located in the page cache. In response to receiving the command "10h", the NVM chip starts a programming operation, writing the data in the page cache to the physical address of the previously recorded programming command. The NVM chip also maintains the execution status of the programming operation to indicate that the programming operation is being executed, that the programming operation has been executed successfully, or that the programming operation has failed to execute.

控制部件在向NVM芯片发出“10h”命令的一段时间后,向NVM芯片发出命令(由“70h”所指示)以查询NVM芯片的状态,并从得到的状态中获知编程操作的执行状态。The control unit issues a command (indicated by "70h") to the NVM chip to query the state of the NVM chip after a period of time after issuing the "10h" command to the NVM chip, and learns the execution state of the programming operation from the obtained state.

可选地,部分编程命令的“10h”命令之前,还包括对使用页缓存的数据作为待编程数据的指示。例如,使用连续的命令“11h”与“10h”来指示使用页缓存的数据作为待编程数据。又例如,使用不同于编程命令的单独命令“12h”来指示使用页缓存的数据作为待编程数据。Optionally, before the "10h" command of the partial programming command, an instruction to use the data in the page cache as the data to be programmed is further included. For example, consecutive commands "11h" and "10h" are used to instruct to use the data of the page cache as the data to be programmed. For another example, a separate command "12h" different from the program command is used to instruct to use the data of the page cache as the data to be programmed.

在可选的实施方式中,NVM芯片还提供页缓存释放命令。控制部件向NVM芯片发出页缓存释放命令,以向NVM芯片指示其页缓存的数据可被丢弃(例如,进入低功耗的休眠模式)。以及在NVM芯片收到页缓存数据之前,将保持对页缓存中的数据的存储。In an optional implementation manner, the NVM chip also provides a page cache release command. The control unit issues a page cache release command to the NVM chip to indicate to the NVM chip that data in its page cache may be discarded (eg, enter a low-power sleep mode). And until the page cache data is received by the NVM chip, the storage of the data in the page cache will be maintained.

在依然可选的实施方式中,编程命令的地址部分被简化。图5A的李子中,地址部分包括5个周期(例如,40比特)的物理地址。在可选的实施方式中,编程命令指示NVM芯片依据前一命令的物理地址生成新的物理地址。例如,新的物理地址的页地址由前一命令的页地址递增(例如加1)得到。从而减少传输编程命令所需的时钟周期,降低编程命令的处理延迟。In a still optional embodiment, the address portion of the programming command is simplified. In the plume of FIG. 5A, the address portion includes a physical address of 5 cycles (eg, 40 bits). In an alternative embodiment, the programming command instructs the NVM chip to generate a new physical address based on the physical address of the previous command. For example, the page address of the new physical address is incremented (eg, incremented by 1) from the page address of the previous command. Thereby, the clock cycle required for transmitting the programming command is reduced, and the processing delay of the programming command is reduced.

在依然又一个可选实施方式中,NVM芯片的页缓存具有较大的尺寸,例如可容纳多个物理页。部分编程命令中,指示待编程的数据在页缓存中的存储地址,使得NVM芯片将页缓存中的部分数据通过编程操作记录在物理地址中。在编程命令中,可选地,还向NVM芯片指示用于存储待编程数据的页缓存的地址。In yet another alternative embodiment, the page cache of the NVM chip has a larger size, eg, can accommodate multiple physical pages. In the partial programming command, the storage address of the data to be programmed in the page cache is indicated, so that the NVM chip records part of the data in the page cache in the physical address through the programming operation. In the program command, optionally, the address of the page cache for storing the data to be programmed is also indicated to the NVM chip.

图5B是根据本申请又一实施例的处理编程命令的流程图。5B is a flowchart of processing programming commands according to yet another embodiment of the present application.

为执行编程命令,控制部件向NVM芯片发出编程命令。控制部件为要编程的数据生成物理地址,在编程命令中将物理地址发送给NVM芯片。控制部件还将存储器中的待编程的数据,作为编程命令的部分,搬移到NVM芯片(510)。响应于待编程的数据被搬移到NVM芯片,控制部件释放这些数据占用的存储器空间(520),从而这些存储器空间可被分配给其他编程命令数据。控制部件查询NVM芯片指示的对应于编程命令的编程操作的执行结果(530)。To execute programming commands, the control unit issues programming commands to the NVM chip. The control unit generates a physical address for the data to be programmed, and sends the physical address to the NVM chip in a programming command. The control unit also moves the data to be programmed in the memory to the NVM chip as part of the programming command (510). In response to the data to be programmed being moved to the NVM chip, the control unit releases the memory space occupied by the data (520) so that the memory space can be allocated to other program command data. The control unit queries the execution result of the program operation corresponding to the program command indicated by the NVM chip (530).

若编程操作执行成功,当前编程命令的处理完成,控制部件可继续处理其他编程命令(返回步骤510)。若查询到当前编程命令处理失败,控制部件向NVM芯片发出根据图5A所示的部分编程命令(550)。部分编程命令指示NVM芯片对页缓存中的数据进行编程操作,将页缓存中的数据记录到部分编程命令所指示的NVM芯片的新物理地址中。可选地,控制部件为部分编程命令生成新的物理地址,并发送给NVM芯片。依然可选地,部分编程命令指示由NVM芯片根据之前的编程命令的物理地址生成新的物理地址,例如,新的物理地址的页地址由前一命令的页地址递增(例如加1)得到。If the programming operation is performed successfully, the processing of the current programming command is completed, and the control unit may continue to process other programming commands (returning to step 510). If it is found that the processing of the current programming command fails, the control unit sends the partial programming command shown in FIG. 5A to the NVM chip (550). The partial programming command instructs the NVM chip to perform a programming operation on the data in the page cache, and records the data in the page cache to the new physical address of the NVM chip indicated by the partial programming command. Optionally, the control unit generates a new physical address for the partial programming command and sends it to the NVM chip. Still optionally, the partial programming command instructs the NVM chip to generate a new physical address based on the physical address of the previous programming command, eg, the page address of the new physical address is incremented (eg, incremented by 1) from the page address of the previous command.

响应于收到部分编程命令,NVM芯片对页缓存中的数据发起编程操作,以写入由部分编程命令所指示的新物理地址。响应于发出了部分编程命令,控制部件向NVM芯片查询编程命令的执行结果。若部分编程命令再次执行失败,控制部件可再次向NVM芯片发出部分编程命令,直到NVM芯片指示部分编程命令执行成功。In response to receiving the partial program command, the NVM chip initiates a program operation on the data in the page cache to write the new physical address indicated by the partial program command. In response to issuing the partial programming command, the control unit queries the NVM chip for the execution result of the programming command. If the partial programming command fails to be executed again, the control unit may issue the partial programming command to the NVM chip again until the NVM chip indicates that the partial programming command is successfully executed.

图6A是根据本申请另一实施例的控制部件执行编程命令的示意图。FIG. 6A is a schematic diagram of a control component executing a programming command according to another embodiment of the present application.

控制部件耦合到多个NVM芯片。控制部件包括存储器(例如SRAM)。控制部件还耦合到外部的DRAM。外部的DRAM可具有比SRAM存储器更大的容量或更高的存储密度。The control unit is coupled to the plurality of NVM chips. The control unit includes memory (eg, SRAM). The control unit is also coupled to the external DRAM. External DRAM can have larger capacity or higher storage density than SRAM memory.

存储器中存储了待被编程到NVM芯片的数据。控制部件向NVM芯片发出编程命令,并将存储器中的数据传输到NVM芯片。响应于识别出数据传输完成并被指示开始编程操作(例如,收到“10h”命令),NVM芯片将页缓存中的数据写入控制部件提供的物理地址。The memory stores data to be programmed into the NVM chip. The control unit issues programming commands to the NVM chip and transmits the data in the memory to the NVM chip. In response to recognizing that the data transfer is complete and being instructed to begin a programming operation (eg, receiving a "10h" command), the NVM chip writes the data in the page cache to the physical address provided by the control unit.

根据本申请图6A的实施例,随着将待被编程的数据传输给NVM芯片,控制部件还将待已被传输的数据传输给DRAM,并释放存储器中已被传输的数据占据的存储空间,从而该存储空间可被分配用于存储其他编程命令的数据,或其他数据。DRAM中的数据作为备份数据,用于在NVM芯片执行失败时使用。从而,存储器的利用率得到提升,每个编程命令的数据占用存储器的时间被大大缩短。According to the embodiment of FIG. 6A of the present application, along with transmitting the data to be programmed to the NVM chip, the control unit also transmits the data to be transmitted to the DRAM, and releases the storage space occupied by the transmitted data in the memory, The memory space can thus be allocated to store data for other programming commands, or other data. The data in DRAM is used as backup data to be used when the NVM chip fails to execute. Therefore, the utilization rate of the memory is improved, and the time that the data of each programming command occupies the memory is greatly shortened.

若控制部件查询到NVM芯片执行编程操作成功,可向NVM芯片发出其他操作命令。若控制部件查询到NVM芯片执行编程操作失败,重新在存储器中分配存储空间。并从DRAM将待被编程的数据搬移到存储器的被分配的存储空间中。以及再次发出编程命令,向NVM芯片指示编程命令要写入的新物理地址,将新分配的存储空间中的数据搬移到NVM芯片,并指示NVM芯片开始执行编程操作(例如,通过“10h”命令)。控制部件还查询NVM芯片的编程操作的执行状态,直到确认编程操作成功执行完成。If the control unit finds that the NVM chip performs the programming operation successfully, it can issue other operation commands to the NVM chip. If the control unit finds that the NVM chip fails to perform the programming operation, it re-allocates the storage space in the memory. And move the data to be programmed from the DRAM to the allocated storage space of the memory. and issue the programming command again, instructing the NVM chip to the new physical address to which the programming command is to be written, moving the data in the newly allocated storage space to the NVM chip, and instructing the NVM chip to start executing the programming operation (for example, via the "10h" command ). The control unit also queries the execution status of the programming operation of the NVM chip until it is confirmed that the programming operation is successfully executed.

可选地,若控制部件查询到NVM芯片执行编程操作失败,无须重新在存储器中分配存储空间,而是向NVM芯片再次发出编程命令过程中,将DRAM中存储的待编程数据搬移到NVM芯片。从而省去从DRAM向SRAM存储器搬移数据的过程。Optionally, if the control unit finds that the NVM chip fails to perform the programming operation, there is no need to re-allocate storage space in the memory, but the to-be-programmed data stored in the DRAM is moved to the NVM chip during the process of issuing a programming command to the NVM chip again. Thus, the process of transferring data from DRAM to SRAM memory is omitted.

图6B展示了图6A的实施例中,处理编程命令的流程图。FIG. 6B shows a flowchart for processing a programming command in the embodiment of FIG. 6A.

为执行编程命令,控制部件向NVM芯片发出编程命令。控制部件为要编程的数据生成物理地址,在编程命令中将物理地址发送给NVM芯片。控制部件还将存储器(例如,图6A的SRAM)中的待编程的数据,作为编程命令的部分,搬移到NVM芯片,以及控制部件还待编程的数据搬移到控制部件外部的存储器(例如,图6A的DRAM)(610),作为备份数据。响应于待编程的数据被搬移到NVM芯片,控制部件释放这些数据占用的存储器空间(620),从而这些存储器空间可被分配给其他编程命令数据。控制部件查询NVM芯片指示的对应于编程命令的编程操作的执行结果(630)。To execute programming commands, the control unit issues programming commands to the NVM chip. The control unit generates a physical address for the data to be programmed, and sends the physical address to the NVM chip in a programming command. The control unit also moves the data to be programmed in the memory (eg, the SRAM of FIG. 6A ) to the NVM chip as part of the programming command, and the data to be programmed by the control unit to the memory (eg, FIG. 6A ) external to the control unit. 6A DRAM) (610) as backup data. In response to the data to be programmed being moved to the NVM chip, the control unit releases the memory space occupied by the data (620) so that the memory space can be allocated to other program command data. The control unit queries the execution result of the program operation corresponding to the program command indicated by the NVM chip (630).

若编程操作执行成功,当前编程命令的处理完成,控制部件可继续处理其他编程命令(返回步骤610)。若查询到当前编程命令处理失败,控制部件向NVM芯片再次发出编程命令,并将外部的存储器中的备份数据作为待编程数据传输到NVM芯片(650)。可选地,外部存储器中的备份数据被直接传送给NVM芯片。而作为另一种实施方式,外部存储器中的备份数据先被控制部件搬移到存储器(SRAM),再从存储器(SRAM)搬移到NVM芯片。以及返回步骤630,查询编程操作的执行结果。若编程操作依然失败,还继续重复步骤650与步骤630。If the programming operation is performed successfully, the processing of the current programming command is completed, and the control unit may continue to process other programming commands (returning to step 610). If it is found that the processing of the current programming command fails, the control component sends the programming command to the NVM chip again, and transmits the backup data in the external memory to the NVM chip as the data to be programmed (650). Optionally, the backup data in the external memory is transferred directly to the NVM chip. As another implementation manner, the backup data in the external memory is first moved to the memory (SRAM) by the control component, and then moved from the memory (SRAM) to the NVM chip. And return to step 630 to query the execution result of the programming operation. If the programming operation still fails, steps 650 and 630 continue to be repeated.

图7展示了根据本申请的又一实施例的处理编程命令的流程图。以进一步降低处理编程命令中对存储器的占用。FIG. 7 shows a flowchart of processing programming commands according to yet another embodiment of the present application. In order to further reduce the occupation of memory in processing programming commands.

为执行编程命令,控制部件向NVM芯片发出编程命令。控制部件为要编程的数据生成物理地址,在编程命令中将物理地址发送给NVM芯片。控制部件还将存储器(例如,图6A的SRAM)中的待编程的数据,作为编程命令的部分,搬移到NVM芯片(710)。响应于待编程的数据被搬移到NVM芯片,控制部件释放这些数据占用的存储器空间(720),从而这些存储器空间可被分配给其他编程命令数据。根据图7的实施例中,待编程到NVM芯片的数据被传输到NVM芯片后,控制部件释放数据占据的存储空间,并且不包括备份数据。To execute programming commands, the control unit issues programming commands to the NVM chip. The control unit generates a physical address for the data to be programmed, and sends the physical address to the NVM chip in a programming command. The control unit also moves the data to be programmed in the memory (eg, the SRAM of Figure 6A) to the NVM chip (710) as part of the programming command. In response to the data to be programmed being moved to the NVM chip, the control unit releases the memory space occupied by the data (720) so that the memory space can be allocated to other program command data. In the embodiment according to FIG. 7 , after the data to be programmed into the NVM chip is transmitted to the NVM chip, the control unit releases the storage space occupied by the data, and does not include backup data.

控制部件查询NVM芯片指示的对应于编程命令的编程操作的执行结果(730)。The control unit queries the execution result of the program operation corresponding to the program command indicated by the NVM chip (730).

若编程操作执行成功,当前编程命令的处理完成,控制部件可继续处理其他编程命令(返回步骤710)。若查询到当前编程命令处理失败,控制部件从编程命令的物理地址所属的页条带(也参看图2)中读取数据,以恢复当前编程命令要写入的数据。控制部件还将页条带恢复的数据在新生成的编程命令中搬移到NVM芯片(750)。以及返回步骤730,查询编程操作的执行结果。若编程操作依然失败,还继续重复步骤750与步骤730。If the programming operation is performed successfully, the processing of the current programming command is completed, and the control unit may continue to process other programming commands (returning to step 710). If it is found that the processing of the current programming command fails, the control unit reads data from the page strip (see also FIG. 2 ) to which the physical address of the programming command belongs, so as to restore the data to be written by the current programming command. The control unit also moves the page stripe restored data to the NVM chip in the newly generated programming command (750). And return to step 730 to query the execution result of the programming operation. If the programming operation still fails, step 750 and step 730 are continued to be repeated.

根据本申请的实施例还提供了一种存储在可读介质上的程序,当被固态存储设备的控制器运行时,使得固态存储设备执行根据本申请实施例提供的任意一种处理方法。Embodiments according to the present application also provide a program stored on a readable medium, which, when executed by a controller of a solid-state storage device, causes the solid-state storage device to execute any one of the processing methods provided by the embodiments of the present application.

尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Although the preferred embodiments of the present application have been described, additional changes and modifications to these embodiments may occur to those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be construed to include the preferred embodiment and all changes and modifications that fall within the scope of this application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims (4)

1. A method of processing a programming command, comprising:
sending the address to the NVM chip, and moving the data in the memory to the NVM chip;
releasing the data in the memory before the NVM chip indicates that the data is successfully recorded in the address; and
inquiring the state of the NVM chip to obtain a processing result of the programming command; wherein,
reading redundant data from a page strip to which a programmed address of a program command which fails to process belongs in response to the state of the NVM chip indicating that the program command fails to process, and recovering the data; generating a second address, sending the second address to the NVM chip, and sending the recovered data to the NVM chip.
2. The method of claim 1, further comprising:
and querying the state of the NVM chip again to obtain a processing result of the programming operation of recording the data at the second address.
3. A method of processing a programming command, comprising:
sending the address to the NVM chip, and moving the data in the memory to the NVM chip;
before the NVM chip indicates that the data is successfully recorded at the address, the memory space storing the data can be written with other data; and
querying the state of the NVM chip to obtain the processing result of the program command, wherein,
reading redundant data from a page strip to which a programmed address of a program command which fails to process belongs in response to the state of the NVM chip indicating that the program command fails to process, and recovering the data; and sending the second address to the NVM chip, and sending the recovered data to the NVM chip.
4. A control means for performing the method according to any one of claims 1-3.
CN201711174050.1A 2017-11-22 2017-11-22 Programming command processing method and device Active CN109815157B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711174050.1A CN109815157B (en) 2017-11-22 2017-11-22 Programming command processing method and device
CN202210139001.9A CN114510435A (en) 2017-11-22 2017-11-22 Programming command processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711174050.1A CN109815157B (en) 2017-11-22 2017-11-22 Programming command processing method and device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202210139001.9A Division CN114510435A (en) 2017-11-22 2017-11-22 Programming command processing method and device

Publications (2)

Publication Number Publication Date
CN109815157A CN109815157A (en) 2019-05-28
CN109815157B true CN109815157B (en) 2022-06-17

Family

ID=66601436

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201711174050.1A Active CN109815157B (en) 2017-11-22 2017-11-22 Programming command processing method and device
CN202210139001.9A Pending CN114510435A (en) 2017-11-22 2017-11-22 Programming command processing method and device

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN202210139001.9A Pending CN114510435A (en) 2017-11-22 2017-11-22 Programming command processing method and device

Country Status (1)

Country Link
CN (2) CN109815157B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815157B (en) * 2017-11-22 2022-06-17 北京忆芯科技有限公司 Programming command processing method and device
CN112115066A (en) * 2019-06-20 2020-12-22 北京忆芯科技有限公司 Media interface controller for scheduling storage commands based on storage command processing time prediction and method thereof
CN112579328A (en) * 2019-09-27 2021-03-30 北京忆恒创源科技有限公司 Method for processing programming error and storage device
CN114968849B (en) * 2021-12-24 2023-10-13 苏州启恒融智信息科技有限公司 Method and equipment for improving utilization rate of programming cache
CN118355371A (en) * 2022-11-15 2024-07-16 长江存储科技有限责任公司 Interface protocol between memory controller and NAND flash memory for cache programming

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090730A (en) * 2014-07-08 2014-10-08 飞天诚信科技股份有限公司 Method and device for conducting data reading and writing on storage device
US8954664B1 (en) * 2010-10-01 2015-02-10 Western Digital Technologies, Inc. Writing metadata files on a disk

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020044907A (en) * 2000-12-07 2002-06-19 윤종용 Method for programming in multi-flash memory system
US8046527B2 (en) * 2007-02-22 2011-10-25 Mosaid Technologies Incorporated Apparatus and method for using a page buffer of a memory device as a temporary cache
KR101030146B1 (en) * 2008-08-29 2011-04-18 서울대학교산학협력단 Flash-based storage using page buffer as write cache and method of use
US9569320B2 (en) * 2010-12-01 2017-02-14 Seagate Technology Llc Non-volatile memory program failure recovery via redundant arrays
CN102591748A (en) * 2011-12-29 2012-07-18 记忆科技(深圳)有限公司 Solid state disc and power failure protection method and system thereof
US9032271B2 (en) * 2012-12-07 2015-05-12 Western Digital Technologies, Inc. System and method for lower page data recovery in a solid state drive
CN103279402B (en) * 2013-05-13 2016-08-10 记忆科技(深圳)有限公司 Data reconstruction method based on multilevel-cell solid state hard disc and solid state hard disc
CN106201902A (en) * 2016-06-24 2016-12-07 中电海康集团有限公司 The composite array module of a kind of SRAM bit and non-volatile memories bit composition and read/writing control method thereof
CN108153482B (en) * 2016-12-05 2021-09-07 厦门旌存半导体技术有限公司 IO command processing method and medium interface controller
CN109815157B (en) * 2017-11-22 2022-06-17 北京忆芯科技有限公司 Programming command processing method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8954664B1 (en) * 2010-10-01 2015-02-10 Western Digital Technologies, Inc. Writing metadata files on a disk
CN104090730A (en) * 2014-07-08 2014-10-08 飞天诚信科技股份有限公司 Method and device for conducting data reading and writing on storage device

Also Published As

Publication number Publication date
CN109815157A (en) 2019-05-28
CN114510435A (en) 2022-05-17

Similar Documents

Publication Publication Date Title
KR102703983B1 (en) Storage device storing data in raid manner
CN109815157B (en) Programming command processing method and device
TWI569139B (en) Valid data merging method, memory controller and memory storage apparatus
KR20190004400A (en) Operation method of memory controller and operation method of user device
WO2020248798A1 (en) Method and device for intelligently identifying unreliable block in non-volatile storage medium
CN110554833B (en) Parallel processing IO commands in a memory device
CN114746834A (en) Partition append command scheduling based on partition status
US11656984B2 (en) Keeping zones open with intermediate padding
TWI892718B (en) Memory controller for defragment and system and method using the same
US11853554B2 (en) Aligned and unaligned data deallocation
CN106649144A (en) Data storage device and operating method thereof
US11775222B2 (en) Adaptive context metadata message for optimized two-chip performance
KR20130040486A (en) Storage device and user device using the same
CN119512984A (en) Method for efficiently utilizing a cache unit for caching PRP in a storage device
CN113867615A (en) Intelligent cache allocation method and control component
CN112148626A (en) Storage method and storage device for compressed data
WO2015085414A1 (en) System and method of operation for high capacity solid-state drive
CN110865945B (en) Extended address space for memory devices
US12353744B2 (en) Cold storage partition management in proof of space blockchain systems
CN114968849B (en) Method and equipment for improving utilization rate of programming cache
CN119718727A (en) Cache unit management method and storage device
CN111258491A (en) Method and apparatus for reducing read command processing delay
CN112148645A (en) De-allocation command processing method and storage device thereof
US20230325110A1 (en) Operation method of host device and operation method of storage device
CN110928482A (en) Partial page striping and storage device using partial page striping and method therefor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant