CN113608784B - NVMe control device and method - Google Patents

NVMe control device and method Download PDF

Info

Publication number
CN113608784B
CN113608784B CN202110952939.8A CN202110952939A CN113608784B CN 113608784 B CN113608784 B CN 113608784B CN 202110952939 A CN202110952939 A CN 202110952939A CN 113608784 B CN113608784 B CN 113608784B
Authority
CN
China
Prior art keywords
component
control component
control
nvme
queue
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
CN202110952939.8A
Other languages
Chinese (zh)
Other versions
CN113608784A (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.)
Hunan Goke Microelectronics Co Ltd
Original Assignee
Hunan Goke Microelectronics 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 Hunan Goke Microelectronics Co Ltd filed Critical Hunan Goke Microelectronics Co Ltd
Priority to CN202110952939.8A priority Critical patent/CN113608784B/en
Publication of CN113608784A publication Critical patent/CN113608784A/en
Application granted granted Critical
Publication of CN113608784B publication Critical patent/CN113608784B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30076Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4027Coupling between buses using bus bridges
    • G06F13/4031Coupling between buses using bus bridges with arbitration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30094Condition code generation, e.g. Carry, Zero flag
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C11/00Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor
    • G11C11/21Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements
    • G11C11/34Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices
    • G11C11/40Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors
    • G11C11/41Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors forming static cells with positive feedback, i.e. cells not needing refreshing or charge regeneration, e.g. bistable multivibrator or Schmitt trigger
    • G11C11/413Auxiliary circuits, e.g. for addressing, decoding, driving, writing, sensing, timing or power reduction
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C8/00Arrangements for selecting an address in a digital store
    • G11C8/10Decoders
    • 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)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Quality & Reliability (AREA)
  • Retry When Errors Occur (AREA)

Abstract

The embodiment of the invention discloses an NVMe control device and method, wherein the device comprises an arbitration component, a storage component, a plurality of control components and a main control component; the main control component is in communication connection with the plurality of control components; the arbitration component is in communication connection with the plurality of control components; the main control component is used for sending instructions to the plurality of control components, so that the plurality of control components can sequentially execute backup operation or recovery operation on data in one or more units in the storage component under the action of the arbitration component; the main control component sends instructions to the plurality of control components; the plurality of control components sequentially perform backup operations or restore operations on data in one or more units in the storage component under the influence of the arbitration component. The method realizes the automatic backup and recovery of the related data of the NVMe, reduces the complexity of an interface and an internal connecting wire of the NVMe controller, and reduces the low-power-consumption entering and exiting time delay.

Description

NVMe control device and method
Technical Field
The invention relates to the field of data storage, in particular to an NVMe control device and method.
Background
With the high-speed development of cloud computing, artificial intelligence, the Internet of things and the like, the storage requirements of terminal products and servers are increasing, and in the process, NVMe (Non-Volatile Memory express) Solid state disk (Solid STATE DISK, SSD) obtains more and more attention on storage by virtue of low delay, low power consumption, high bandwidth and the like, and also becomes a new wind direction for the development of storage equipment.
NVMe is a host control interface using a register interface as an interaction interface, and stores operation commands of a host to an SSD through a commit queue SQ (Submission Queue), and SQ is divided into two types according to functions: the commit queue ASQ (Admin Submission Queue) and the input-output commit queue IO SQ are managed (Input Output Submission Queue). The management submission queue is used for realizing management of the SSD, such as creating IO SQ, deleting IO SQ, creating IO CQ, deleting IO CQ, setting characteristics, formatting disks and the like; the IO SQ is mainly used for transmitting read-write commands, data comparison commands, end-to-end data protection commands and the like of data.
In the deep sleep scenario, the power of NVMe needs to be disconnected, so the NVMe protocol registers, ASQ/ACQ, IO SQ/CQ related registers, MSIX table and PBA table need to be stored in the non-powered-down memory before power-down and restored after the next power-up.
There are two types of prior art treatments: firstly, a protocol register MSIX of NVMe is put in a non-drop area such as PCIe, ASQ/ACQ and IO SQ/CQ registers are put in an NVMe controller, and before power failure, a CPU performs read-write backup on the related registers of the ASQ/ACQ and the IO SQ/CQ and recovers through CPU read-write after power is again applied; and secondly, the NVMe protocol register, MSIX table, PBA table, ASQ/ACQ and IO SQ/CQ related registers of the physical function and the virtual function are all placed in an NVMe controller, and are backed up in a CPU read-write mode before power failure, and are restored in a CPU read-write mode after power is on again.
The disadvantage of the above scheme is that more wires are added to the interface of the NVMe controller, especially in the NVMe controller supporting multiple virtual physical machines, which is very unfavorable for the design migration and maintenance; meanwhile, the CPU performs backup and recovery through reading and writing, and causes large delay of low-power-consumption entry and exit, and the CPU has complicated operation.
Disclosure of Invention
The embodiment of the disclosure aims to solve the problem that when the number of IO SQs is large or virtual functions are supported in the design of an NVMe controller, the CPU backs up or restores the NVMe related registers or MSIX tables for a long time in an NVMe low-power consumption scene.
In order to solve the above technical problems, embodiments of the present disclosure provide an NVMe control device and method, and the specific scheme is as follows:
In a first aspect, embodiments of the present disclosure provide an NVMe control apparatus, the apparatus including an arbitration component, a storage component, a plurality of control components, and a main control component;
The main control component is in communication connection with the plurality of control components;
the arbitration component is in communication connection with the plurality of control components;
the main control component is used for sending instructions to the plurality of control components, so that the plurality of control components can sequentially execute backup operation or recovery operation on data in one or more units in the storage component under the action of the arbitration component.
According to one embodiment of the present disclosure, the main control assembly includes a detection unit therein;
the detection unit is used for detecting a command mode of the NVMe control device.
According to a specific embodiment of the present disclosure, the plurality of control components includes an NVMe protocol register control component, MSIX control component, commit queue, or completion queue control component;
The storage component comprises an NVMe protocol register unit, a MSIX unit, a commit queue or completion queue register unit and a static random access memory unit;
The NVMe protocol register control component is used for executing backup operation or recovery operation of data in the NVMe protocol register unit;
The MSIX control component is used for executing a backup operation or a recovery operation of the data in the MSIX unit;
The commit queue or completion queue control component is used for executing backup operation or recovery operation of data in a commit queue or completion queue register unit;
The static random access memory unit is used for storing data in the NVMe protocol register unit, the MSIX unit and the commit queue or completion queue register unit.
According to one embodiment of the present disclosure, the apparatus further comprises a decoder component;
the decoder component is in communication with the arbitration component;
the decoder component is used for decoding according to the read-write address and mapping the decoded read-write address to a corresponding unit in the storage component.
According to one embodiment of the present disclosure, the apparatus further comprises a state control component;
The state control component is in communication connection with the main control component;
the state control component is used for configuring and sending a signal to the main control component so that when the main control component detects that the signal is at a high level, corresponding backup operation or recovery operation is executed.
According to one embodiment of the present disclosure, the master control component includes a master control state machine;
the main control state machine is used for sending a backup instruction or a recovery instruction to the NVMe protocol register control component, the MSIX control component, the submit queue or the finish queue control component and receiving a backup completion signal or a recovery completion signal returned by the NVMe protocol register control component, the MSIX control component, the submit queue or the finish queue control component.
In a second aspect, an embodiment of the present disclosure further provides an NVMe control method applied to the NVMe control device according to any one of the first aspect, where the method includes:
the main control component sends instructions to the plurality of control components;
the plurality of control components sequentially perform backup operations or restore operations on data in one or more units in the storage component under the influence of the arbitration component.
According to a specific embodiment of the present disclosure, the plurality of control components includes an NVMe protocol register control component, MSIX control component, commit queue, or completion queue control component;
The storage component comprises an NVMe protocol register unit, a MSIX unit, a commit queue or completion queue register unit and a static random access memory unit;
The method further comprises the steps of:
The NVMe protocol register control component executes backup operation or recovery operation of data in an NVMe protocol register unit;
the MSIX control component performs a backup operation or a restore operation of the data in the MSIX unit;
The commit queue or completion queue control component executes backup operation or recovery operation of data in a commit queue or completion queue register unit;
The static random access memory unit stores data in an NVMe protocol register unit, MSIX unit, and a commit queue or completion queue register unit.
According to one embodiment of the present disclosure, the method further comprises:
the state control component configures and sends a signal to the main control component so that when the main control component detects that the signal is at a high level, a corresponding backup operation or a restore operation is performed.
According to one embodiment of the present disclosure, the master control component includes a master control state machine;
The method further comprises the steps of:
the main control state machine sends a backup instruction or a recovery instruction to the NVMe protocol register control component, the MSIX control component, the submit queue or the finish queue control component, and receives a backup finish signal or a recovery finish signal returned by the NVMe protocol register control component, the MSIX control component, the submit queue or the finish queue control component.
According to the NVMe control device and method, the main control component sends the instruction to the control component, and the control component sequentially executes backup operation or recovery operation on data in the storage component under the action of the arbitration component. The existing scheme is that when low power consumption is in, the CPU sequentially reads the NVMe related registers, the values of the registers are written into the SRAM through the CPU, and when the low power consumption is out, the low power consumption is opposite. The scheme omits the operations of the CPU, and the hardware circuit automatically reads out the registers to be written into the SRAM instead, and the opposite is performed when the operation is exited. Compared with the CPU, the hardware circuit has a much faster execution speed of reading the register and writing the SRAM, so the scheme can reduce the entry and exit delay of low power consumption, realize automatic backup and recovery of related data in an NVMe low power consumption mode, reduce the complexity of an NVMe controller interface and an internal connecting line, and is convenient for transplanting and expansion.
Drawings
In order to more clearly illustrate the technical solutions of the present invention, the drawings that are required for the embodiments will be briefly described, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope of the present invention. Like elements are numbered alike in the various figures.
Fig. 1 shows a schematic structural diagram of an NVMe control device provided by an embodiment of the disclosure;
FIG. 2 shows a schematic diagram of a master control state machine of an NVMe control apparatus provided by an embodiment of the present disclosure;
FIG. 3 shows a MSIX control state machine schematic diagram of an NVMe control apparatus provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a control state machine for a commit queue or a completion queue of an NVMe control device according to an embodiment of the present disclosure;
fig. 5 shows a flow chart of an NVMe control method provided in an embodiment of the disclosure.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments.
The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present invention.
The terms "comprises," "comprising," "including," or any other variation thereof, are intended to cover a specific feature, number, step, operation, element, component, or combination of the foregoing, which may be used in various embodiments of the present invention, and are not intended to first exclude the presence of or increase the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the invention belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is the same as the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments of the invention.
Example 1
Fig. 1 is a schematic diagram of a connection relationship of an NVMe control device 100 according to an embodiment of the disclosure. As shown in FIG. 1, the NVMe control apparatus 100 comprises an arbitration component 105, a storage component 106, a plurality of control components and a main control component 101;
Specifically, the embodiment of the disclosure realizes automatic backup and recovery of the NVMe protocol register, MSIX table, PBA table, ASQ/ACQ and IO SQ/CQ of physical functions and virtual functions in a deep sleep scene through a hardware circuit.
The main control component 101 is in communication connection with the plurality of control components;
The arbitration component 105 is communicatively coupled to each of the plurality of control components;
In specific implementation, the main control component 101 is in communication connection with the CPU, and the main control component 101 directly receives instructions of the CPU and transmits the instructions to other components.
The main control component 101 is configured to send an instruction to the plurality of control components, so that the plurality of control components sequentially perform a backup operation or a restore operation on data in one or more units in the storage component 106 under the action of the arbitration component 105.
In specific implementation, the arbitration component 105 includes an interface of a PMU register configuration bus and a CPU register configuration bus, where the interfaces are the same, and arbitration of access rights of the register interfaces is implemented by the arbitration component 105. The arbitration component 105 is used to implement access arbitration for the PMU register configuration bus and the CPU register configuration bus. In a specific embodiment, round robin arbitration is used, however, other arbitration modes may be selected according to actual needs, which is not limited herein.
The main control component 101 is configured to control the sequence of backup and restoration of NVMe protocol registers, MSIX tables, ASQ/SQ/ACQ/CQ registers, and send backup or restore instructions to the plurality of control components.
According to one embodiment of the present disclosure, the main control assembly 101 includes a detection unit therein;
the detection unit is used for detecting a command mode of the NVMe control device.
In particular implementations, the detection unit includes a save_en register and a restore_en register. Writing 1 to a save_en register or a restore_en register in the main control component 101 by the CPU, and starting the main control component 101 to enter a backup mode or a restore mode; the values written by the save_en register and the restore_en register cannot be 1 at the same time. Reading a CC.EN register of a certain physical function or virtual function, and if the bit value of the read CC.EN register is 1, indicating that the CC.EN register is enabled, starting the backup operation or the recovery operation of the related register of the physical function or virtual function; if the value of the bit of the read cc.en register is 0, this indicates that this cc.en register is not enabled, without backing up or restoring the relevant registers of the function.
According to one embodiment of the present disclosure, as shown in FIG. 1, the plurality of control components includes an NVMe protocol register control component 102, MSIX control component 103, a commit queue, or completion queue control component 104;
Specifically, the NVMe protocol register control component 102, MSIX control component 103 and the commit queue or completion queue control component 104 are communicatively coupled to the master control component 101, respectively. After receiving the backup instruction or the restore instruction of the CPU, the main control component 101 sequentially sends the instructions to the NVMe protocol register control component 102, MSIX control component 103 and the commit queue or completion queue control component 104.
The NVMe protocol register control component 102, MSIX control component 103 and the commit queue or completion queue control component 104 transmit specific instructions during backup or restore to other components through the arbitration component 105. The NVMe protocol register control component 102 is configured to control a specific backup and restore process of the NVMe protocol register; MSIX the control component 103 is used for controlling the specific backup and recovery processes of MSIX table, PBA table and MSIX aggregation register; the commit queue or completion queue control component 104 is used to control specific backup and restore processes of Admin/IO SQ/CQ for physical and virtual functions.
The storage component 106 includes an NVMe protocol register unit, MSIX units, a commit queue or completion queue register unit, and a static random access memory unit;
Specifically, the NVMe protocol register unit provides a PCIe read-write interface and a CPU register read-write interface, where the PCIe read-write interface is used for reading and writing the NVMe protocol register by the host in an active power consumption state (Active Power State); the CPU register read-write interface is used for reading and writing the NVMe protocol register by the CPU in the active power consumption state and is also used for backing up and recovering data in the NVMe protocol register in the low power consumption mode. Each physical or virtual function has an NVMe protocol register unit.
The NVMe protocol register control component 102 is configured to perform a backup operation or a restore operation of data in the NVMe protocol register unit;
specifically, the NVMe protocol register control component 102 starts the backup operation or the restore operation of the NVMe protocol register after receiving the backup signal or the restore signal transmitted by the main control component 101.
The MSIX control component 103 is configured to perform a backup operation or a restore operation of data in the MSIX unit;
In particular, the backup operation or the restore operation of the MSIX table, the PBA table, and the MSIX aggregation register have no sequence requirement. In a specific embodiment, the backup operation or the restore operation is sequentially performed according to the sequence of MSIX tables, PBA tables and MSIX aggregation registers; of course, the backup or restore sequence may be flexibly set according to actual needs, which is not limited herein. MSIX unit is used to receive and store host configuration MSIX vector values. When MSIX is enabled by the host, after the NVMe controller replies a CQ entry (CQ entry) to the host, the NVMe controller sends MSIX an interrupt message to the host side to inform the host that the SQ command has been executed. The MSIX unit also provides a PCIe read-write interface for host read-write configuration MSIX vector, while providing a CPU register read-write interface for backing up and recovering MSIX and PBA (Pending Bit Array) tables through the CPU register configuration interface in low power mode. There is one MSIX units per physical or virtual function.
The commit queue or completion queue control component 104 is configured to perform a backup operation or a restore operation of data in a commit queue or completion queue register unit;
Specifically, the commit queue or completion queue register unit includes an Admin/IO SQ related register and an Admin/IO CQ related register; providing a PCIe read-write interface for updating an ASQ/SQ tail doorbell register and an ACQ/CQ head doorbell register; the CPU register read-write interface is used for realizing the configuration of the CPU to the SQ/CQ, and realizing the backup and recovery of the data in the ASQ/SQ/ACQ/CQ registers through the CPU read-write register in a low power consumption mode. Each physical or virtual function has a pair of Admin SQ/CQ and each has a number of IO SQ/CQ. The SQ_CQ register specifically comprises an ASQ register, an ACQ register, an IO SQ register and an IO CQ register, wherein backup operation or recovery operation of the ASQ register, the ACQ register, the IO SQ register and the IO CQ register has no sequence requirement.
SQ (commit Queue) is used to store operation commands of a host to an SSD (Solid STATE DISK), and is divided into two types according to functions: ASQ (Admin Submission Queue, manage commit queues) and IO SQ. The ASQ is used to manage the SSD, such as creating an IO SQ, deleting an IO SQ, creating an IO CQ, deleting an IO CQ, setting characteristics, formatting a disk, and so on; IO SQ, which is primarily related to IO, includes read-write commands for transferring data, data compare commands, end-to-end data protection commands, and so forth.
The static random access memory unit is used for storing data in the NVMe protocol register unit, the MSIX unit and the commit queue or completion queue register unit.
In particular, the sram is mainly used for storing NVMe commands in an active power consumption state or for flexible use by firmware, and in a low power consumption sleep state, since the sram is not powered down, the sram is used for storing NVMe protocol registers, MSIX tables, ASQ/SQ/ACQ/CQ registers and other registers required to be backed up by modules or data required to be backed up by firmware.
According to one embodiment of the present disclosure, the apparatus further comprises a decoder component;
the decoder component is communicatively coupled to the arbitration component 105;
in particular implementations, the decoder component is communicatively coupled to the arbitration component 105. The decoder component decodes the CPU read-write address transmitted by the arbitration component 105.
The decoder component is used for decoding according to the read-write address and mapping the decoded read-write address to a corresponding unit in the storage component.
Specifically, the NVMe protocol register unit, MSIX unit, commit queue or completion queue register unit, and sram unit are configured to receive the address decoded by the decoder element. The decoder component is used for decoding according to the CPU read-write address and correctly mapping the decoded CPU read-write bus to each component needing CPU read-write access.
According to one embodiment of the present disclosure, the apparatus further comprises a state control component;
The state control component is in communication connection with the main control component;
the state control component is used for configuring and sending a signal to the main control component so that when the main control component detects that the signal is at a high level, corresponding backup operation or recovery operation is executed.
According to one embodiment of the present disclosure, the master control component includes a master control state machine;
The main control state machine is configured to send a backup instruction or a restore instruction to the NVMe protocol register control component 102, MSIX control component 103, the commit queue or the completion queue control component 104, and receive a backup completion signal or a restore completion signal returned by the NVMe protocol register control component 102, MSIX control component 103, the commit queue or the completion queue control component 104.
In particular, as shown in FIG. 2, the master control state machine includes a save_en register and a restore_en register. The save_en register and the restore_en register are written by the CPU to 1, with save_en being 1 indicating that the current is the backup mode and restore_en being 1 indicating that the current is the restore mode. Wherein, sram_base_addr is the base address of the SRAM, which is written in by the CPU through the configuration register. When save_en is 1 or restore_en is 1, the state machine jumps to the cc_en state where the cc.en register of PF0 is read, if the value of the read cc_en bit is 1, jumps to PROTC to start backing up the NVMe protocol register of the PF, if the value of the read cc_en bit is 0, indicating that this function is not enabled, and no backup operation or restoration operation of the NVMe protocol register, MSIX table, ASQ/SQ/ACQ/CQ register, etc. of this function is required to be performed. fc_count is incremented by 1 and the cc_en register of the next physical function is continuously read. It should be noted that both save_en and restore_en cannot be 1 at the same time.
In a specific embodiment, the backup operation or the recovery operation of the NVMe protocol register, MSIX table, ASQ/SQ/ACQ/CQ related register, etc. of all physical functions is sequentially performed, and then the backup operation or the recovery operation of the NVMe protocol register, MSIX table, ASQ/SQ/ACQ/CQ related register, etc. of all virtual functions is sequentially performed; the virtual function may be a physical function or a virtual function corresponding to the physical function, and the design is flexible, and the present invention is not limited thereto.
If the reading is that the CC.EN is always 0, the operation continues until all the functions are traversed once and then return to the IDLE state, which indicates that the backup or the restoration is completed. At PROTC the state outputs protc _sr_strt signal to the NVMe protocol register control component 102, starts backup or restores NVMe protocol registers, after the NVMe protocol register backup is completed, the protc _sr_done signal from the NVMe protocol register control component 102 is set to 1, the protc _sr_strt signal is set to 0, and the state machine jumps to MSIX state. The protc _sr_done signal is set to 0 in MSIX state, the msix _sr_strt signal input by the MSIX control component 103 is set to 1, and backup or restoration of MSIX table, PBA table, MSIX aggregation related registers is started.
Wherein, the backup or restore of MSIX table, PBA table, MSIX aggregation related registers has no sequence requirement, and in a specific embodiment, the backup or restore is sequentially performed according to the sequence of MSIX table, PBA table, MSIX aggregation related registers.
After the backup or restore is completed, the msix _sr_done signal from MSIX control component 103 is set to 1, the msix _sr_strt signal is set to 0, and the state machine jumps to the sq_cq state; in this state, the msix _sr_done signal is set to 0, the sqcq _sr_strt signal is input to the commit queue or completion queue control component 104, and the backup or restore process of the data in the ASQ/SQ/ACQ/CQ-related registers is started.
Wherein the backup or restoration of data in the ASQ/SQ/ACQ/CQ registers is out of order, and in one specific embodiment, the backup or restoration is performed in the order ASQ/ACQ/SQ/CQ. When the backup or restore of these registers is completed, the sqcq _sr_done signal from the commit queue or completion queue control component 104 is set to 1 and it is determined whether the current function is the last function, and if so, the process jumps to the IDLE state and the backup or restore process is completed. If not the last function, jump to CC_EN state, read the CC_EN register of the next function.
Specifically, as shown in fig. 3, when msix _sr_strt is 1, MSIX controls the state machine to jump from the IDLE state to the MSIX _t state, and starts backup or restoration of MSIX tables. It should be noted that the number of MSIX vectors supported by each physical function and virtual function may be different, and the end address of the register to be read in this state needs to be determined according to the number of MSIX vectors supported by the actual function, so as to ensure that each MSIX vector can be backed up or restored.
When MSIX tables are backed up or restored, msixt _sr_done signal is set to 1, and MSIX control state machine detects msixt _sr_done is 1 to jump to PBA_T state. And setting msixt _sr_done signal to 0, starting backup or recovery of the PBA table, setting PBA _sr_done signal to 1 after the backup or recovery of the PBA table is finished, and detecting PBA _sr_done to be 1 by the MSIX control state machine to jump to MSIX _ COAL. And setting pba _sr_done signal to 0, starting MSIX to aggregate the backup or recovery of the data in the related registers, setting msix _sr_done signal to 1 after the backup or recovery of the data in the registers is completed, transmitting the data to the main control component 101, and controlling the state machine to jump to the IDLE state MSIX after the backup or recovery of the data in the MSIX aggregation registers is completed.
In particular, as shown in fig. 4, when sqcq _sr_strt is 1, the sq_cq control state machine jumps from the IDLE state to the ASQ state, and starts to perform backup or restoration of data in the relevant registers that need backup or restoration of ASQ. After ASQ backup or recovery is completed, ASQ _sr_done signal is set to 1, SQ_CQ control state machine detects ASQ _sr_done is 1 to jump to ACQ state, acq_sr_done signal is set to 0, and backup operation or recovery operation of ACQ related register is started. After the backup or recovery of the ACQ related register is finished, the acq_sr_done signal is set to 1, the sq_cq control state machine detects that the acq_sr_done is 1 to jump to the SQ state, the acq_sr_done signal is set to 0, and the backup or recovery operation of the SQ related register is started, wherein in the state, the backup or recovery of all the supported IO SQ related registers is required to be finished. When the backup or recovery of the registers is completed, the sq_sr_done signal is set to 1, the sq_cq control state machine detects that the sq_sr_done signal is 1, the sq_cq control state machine jumps to the CQ state, the sq_sr_done signal is set to 0, the backup or recovery of the IO CQ related registers is started, the data of all the IO CQ related registers needs to be backed up or recovered in the state, the sqcq _sr_done signal is set to 1 after the backup or recovery is completed, and the data is transmitted to the main control component 101, and the sq_cq control state machine jumps to the IDLE state.
According to the NVMe control device provided by the embodiment of the disclosure, the main control component sends the instruction to the control component, and the control component sequentially executes backup operation or recovery operation on the data in the storage component under the action of the arbitration component. The existing scheme is that when low power consumption is in, the CPU sequentially reads the NVMe related registers, the values of the registers are written into the SRAM through the CPU, and when the low power consumption is out, the low power consumption is opposite. The scheme omits the operations of the CPU, and the hardware circuit automatically reads out the registers to be written into the SRAM instead, and the opposite is performed when the operation is exited. Compared with the CPU, the hardware circuit has a much faster execution speed of reading the register and writing the SRAM, so the scheme can reduce the entry and exit delay of low power consumption, realize automatic backup and recovery of related data in an NVMe low power consumption mode, reduce the complexity of an NVMe controller interface and an internal connecting line, and is convenient for transplanting and expansion.
Example 2
Fig. 5 is a schematic flow chart of an NVMe control method according to an embodiment of the disclosure. As shown in fig. 5, the NVMe control method is applied to the NVMe control apparatus described in embodiment 1, and the method includes:
s501, a main control component sends instructions to the plurality of control components;
s502, the plurality of control components sequentially execute backup operation or recovery operation on data in one or more units in the storage component under the action of the arbitration component.
According to a specific embodiment of the present disclosure, the plurality of control components includes an NVMe protocol register control component, MSIX control component, commit queue, or completion queue control component;
The storage component comprises an NVMe protocol register unit, a MSIX unit, a commit queue or completion queue register unit and a static random access memory unit;
The method further comprises the steps of:
The NVMe protocol register control component executes backup operation or recovery operation of data in an NVMe protocol register unit;
the MSIX control component performs a backup operation or a restore operation of the data in the MSIX unit;
The commit queue or completion queue control component executes backup operation or recovery operation of data in a commit queue or completion queue register unit;
The static random access memory unit stores data in an NVMe protocol register unit, MSIX unit, and a commit queue or completion queue register unit.
According to one embodiment of the present disclosure, the method further comprises:
the state control component configures and sends a signal to the main control component so that when the main control component detects that the signal is at a high level, a corresponding backup operation or a restore operation is performed.
According to one embodiment of the present disclosure, the master control component includes a master control state machine;
The method further comprises the steps of:
the main control state machine sends a backup instruction or a recovery instruction to the NVMe protocol register control component, the MSIX control component, the submit queue or the finish queue control component, and receives a backup finish signal or a recovery finish signal returned by the NVMe protocol register control component, the MSIX control component, the submit queue or the finish queue control component.
In summary, according to the NVMe control method provided by the embodiment of the present disclosure, the main control component sends the instruction to the control component, and the control component sequentially performs the backup operation or the recovery operation on the data in the storage component under the effect of the arbitration component. The existing scheme is that when low power consumption is in, the CPU sequentially reads the NVMe related registers, the values of the registers are written into the SRAM through the CPU, and when the low power consumption is out, the low power consumption is opposite. The scheme omits the operations of the CPU, and the hardware circuit automatically reads out the registers to be written into the SRAM instead, and the opposite is performed when the operation is exited. Compared with the CPU, the hardware circuit has a much faster execution speed of reading the register and writing the SRAM, so the scheme can reduce the entry and exit delay of low power consumption, realize automatic backup and recovery of related data in an NVMe low power consumption mode, reduce the complexity of an NVMe controller interface and an internal connecting line, and is convenient for transplanting and expansion. The specific implementation process of the provided NVMe control method may refer to the specific implementation process of the NVMe control device provided in the embodiments shown in fig. 1 to fig. 4, and will not be described herein.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flow diagrams and block diagrams in the figures, which illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in various embodiments of the invention may be integrated together to form a single part, or the modules may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention.

Claims (9)

1. An NVMe control device is characterized by comprising an arbitration component, a storage component, a plurality of control components and a main control component;
The main control component is in communication connection with the plurality of control components;
the arbitration component is in communication connection with the plurality of control components;
The main control component is used for sending instructions to the plurality of control components, so that the plurality of control components can sequentially execute backup operation or recovery operation on data in one or more units in the storage component under the action of the arbitration component;
The plurality of control components comprise an NVMe protocol register control component, a MSIX control component, a commit queue or a completion queue control component;
The storage component comprises an NVMe protocol register unit, a MSIX unit, a commit queue or completion queue register unit and a static random access memory unit;
The NVMe protocol register control component is used for executing backup operation or recovery operation of data in the NVMe protocol register unit;
The MSIX control component is used for executing a backup operation or a recovery operation of the data in the MSIX unit;
The commit queue or completion queue control component is used for executing backup operation or recovery operation of data in a commit queue or completion queue register unit;
The static random access memory unit is used for storing data in the NVMe protocol register unit, the MSIX unit and the commit queue or completion queue register unit.
2. The NVMe control device of claim 1, wherein the main control assembly includes a detection unit therein;
the detection unit is used for detecting a command mode of the NVMe control device.
3. The NVMe control device of claim 1, further comprising a decoder component;
the decoder component is in communication with the arbitration component;
the decoder component is used for decoding according to the read-write address and mapping the decoded read-write address to a corresponding unit in the storage component.
4. The NVMe control device of claim 1, further comprising a status control component;
The state control component is in communication connection with the main control component;
the state control component is used for configuring and sending a signal to the main control component so that when the main control component detects that the signal is at a high level, corresponding backup operation or recovery operation is executed.
5. The NVMe control device of claim 1, wherein the master control component comprises a master control state machine;
the main control state machine is used for sending a backup instruction or a recovery instruction to the NVMe protocol register control component, the MSIX control component, the submit queue or the finish queue control component and receiving a backup completion signal or a recovery completion signal returned by the NVMe protocol register control component, the MSIX control component, the submit queue or the finish queue control component.
6. An NVMe control method, characterized by being applied to the NVMe control device according to any one of claims 1 to 5, comprising:
the main control component sends instructions to the plurality of control components;
the plurality of control components sequentially perform backup operations or restore operations on data in one or more units in the storage component under the influence of the arbitration component.
7. The NVMe control method of claim 6, wherein the plurality of control components comprises an NVMe protocol register control component, MSIX control component, commit queue, or completion queue control component;
The storage component comprises an NVMe protocol register unit, a MSIX unit, a commit queue or completion queue register unit and a static random access memory unit;
The method further comprises the steps of:
The NVMe protocol register control component executes backup operation or recovery operation of data in an NVMe protocol register unit;
the MSIX control component performs a backup operation or a restore operation of the data in the MSIX unit;
The commit queue or completion queue control component executes backup operation or recovery operation of data in a commit queue or completion queue register unit;
The static random access memory unit stores data in an NVMe protocol register unit, MSIX unit, and a commit queue or completion queue register unit.
8. The NVMe control method of claim 6, further comprising:
the state control component configures and sends a signal to the main control component so that when the main control component detects that the signal is at a high level, a corresponding backup operation or a restore operation is performed.
9. The NVMe control method of claim 7, wherein the master control component comprises a master control state machine;
The method further comprises the steps of:
the main control state machine sends a backup instruction or a recovery instruction to the NVMe protocol register control component, the MSIX control component, the submit queue or the finish queue control component, and receives a backup finish signal or a recovery finish signal returned by the NVMe protocol register control component, the MSIX control component, the submit queue or the finish queue control component.
CN202110952939.8A 2021-08-19 2021-08-19 NVMe control device and method Active CN113608784B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110952939.8A CN113608784B (en) 2021-08-19 2021-08-19 NVMe control device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110952939.8A CN113608784B (en) 2021-08-19 2021-08-19 NVMe control device and method

Publications (2)

Publication Number Publication Date
CN113608784A CN113608784A (en) 2021-11-05
CN113608784B true CN113608784B (en) 2024-05-03

Family

ID=78341235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110952939.8A Active CN113608784B (en) 2021-08-19 2021-08-19 NVMe control device and method

Country Status (1)

Country Link
CN (1) CN113608784B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017056220A1 (en) * 2015-09-30 2017-04-06 株式会社日立製作所 Computer system, command transfer method, and transfer device
CN110362274A (en) * 2019-06-28 2019-10-22 苏州浪潮智能科技有限公司 A kind of NVMe controller, networked storage devices and system
CN111427808A (en) * 2019-01-10 2020-07-17 三星电子株式会社 System and method for managing communication between a storage device and a host unit
CN112634978A (en) * 2020-12-23 2021-04-09 江苏国科微电子有限公司 NVMe solid state disk exception handling method and device and integrated chip
US11079968B1 (en) * 2020-02-21 2021-08-03 International Business Machines Corporation Queue management in multi-site storage systems

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11037625B2 (en) * 2012-11-20 2021-06-15 Thstyme Bermuda Limited Solid state drive architectures
JP6677806B2 (en) * 2016-05-12 2020-04-08 株式会社日立製作所 Storage device
JP2021002108A (en) * 2019-06-20 2021-01-07 株式会社日立製作所 Storage system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017056220A1 (en) * 2015-09-30 2017-04-06 株式会社日立製作所 Computer system, command transfer method, and transfer device
CN111427808A (en) * 2019-01-10 2020-07-17 三星电子株式会社 System and method for managing communication between a storage device and a host unit
CN110362274A (en) * 2019-06-28 2019-10-22 苏州浪潮智能科技有限公司 A kind of NVMe controller, networked storage devices and system
US11079968B1 (en) * 2020-02-21 2021-08-03 International Business Machines Corporation Queue management in multi-site storage systems
CN112634978A (en) * 2020-12-23 2021-04-09 江苏国科微电子有限公司 NVMe solid state disk exception handling method and device and integrated chip

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向存储网络的融合I/O模拟器设计与实现;魏征;《高技术通讯》;20201031;第30卷(第10期);第1-5页 *

Also Published As

Publication number Publication date
CN113608784A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
KR101209915B1 (en) Raid-based storage control board and driving method thereof
CN104407933A (en) Data backup method and device
CN107122316B (en) SOC power supply method and SOC
CN101796495A (en) Memory device and file system
CN108958643B (en) Data storage device and operation method thereof
JP2002189637A (en) Computer system, method of managing memory therefor, recording medium recorded with memory managing program
CN108874312B (en) Data storage method and storage device
KR101196878B1 (en) Hybrid raid controller
KR20120089215A (en) Raid-rased storage control board having fibre channel interface controller
CN111459527A (en) Memory system and operating method thereof
CN113608784B (en) NVMe control device and method
CN112947869A (en) Solid state disk and write operation method
CN103049218B (en) Date storage method and controller
CN111221681A (en) Memory repairing method and device
CN102402447A (en) Equipment booting method and equipment
CN115562593A (en) Abnormal RAID member disk processing method, device and medium
WO2022242665A1 (en) Data storage method and related device
CN103064762B (en) Heavily delete restoration methods and the device of Backup Data
WO2019077379A1 (en) Method for backing up and restoring digital data stored on a solid-state storage device, and a highly secure solid-state storage device
CN112527719B (en) PCIe link-based JBOF (just-in-File) connection method, device and system
CN114546899A (en) USB device connection method, system and computer readable storage medium
KR20160062683A (en) COMPUTING SYSTEM WITH heterogeneous storage AND METHOD OF OPERATION THEREOF
CN102508738B (en) Backup method of service information of multi-core processor, inner core and backup inner core
WO2016006108A1 (en) Storage and control method therefor
US20240134547A1 (en) Host independent formatting of storage devices

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