WO2020155542A1 - 一种ssd主控中的raid主动加速装置和加速方法 - Google Patents

一种ssd主控中的raid主动加速装置和加速方法 Download PDF

Info

Publication number
WO2020155542A1
WO2020155542A1 PCT/CN2019/093450 CN2019093450W WO2020155542A1 WO 2020155542 A1 WO2020155542 A1 WO 2020155542A1 CN 2019093450 W CN2019093450 W CN 2019093450W WO 2020155542 A1 WO2020155542 A1 WO 2020155542A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
bus
address
xor
sram
Prior art date
Application number
PCT/CN2019/093450
Other languages
English (en)
French (fr)
Inventor
王运哲
刘大铕
刘奇浩
刘尚
朱苏雁
孙中琳
Original Assignee
山东华芯半导体有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 山东华芯半导体有限公司 filed Critical 山东华芯半导体有限公司
Publication of WO2020155542A1 publication Critical patent/WO2020155542A1/zh

Links

Images

Classifications

    • 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
    • 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

Definitions

  • the invention relates to a RAID acceleration device and an acceleration method, in particular to a RAID active acceleration device and acceleration method in an SSD master control, which uses hardware to help a CPU accelerate the realization of RAID in the SSD storage.
  • the existing RAID technology is generally aimed at HDD disks, using an operating system or a RAID card to implement RAID.
  • the technical problem to be solved by the present invention is to provide a RAID active acceleration device and acceleration method in the SSD master control, realize RAID in the SSD master control, increase the speed of the RAID, and improve the system efficiency.
  • a RAID active acceleration device in the SSD master control is an active acceleration device directly hung on the bus and includes the following modules: a bus configuration interface for Receives the configuration information from the CPU, and is also used as the CPU to read the status information and interrupt information of the RAID acceleration module; the bus Master interface initiates data transmission to the bus according to the instructions of the control module, including reading source data from the bus and writing to the bus XOR result data; the control module generates a state process for fetching calculation and writing results according to the information obtained from the bus configuration interface, and deploys the Master interface and the XOR calculation module to realize the entire process, and then feedbacks the status to the bus configuration interface; XOR The calculation module is responsible for reading the intermediate XOR result from the SRAM and performing the XOR with the newly read data from the Master port and writing the new result into the SRAM; SRAM is responsible for temporarily storing the intermediate result of the XOR operation.
  • a bus configuration interface for Receives the configuration information from the CPU, and is also used as the CPU to read the status information
  • the configuration information received by the bus configuration interface includes working mode, address information, and page data length.
  • the state process generated by the control module includes four parallel operations, which are: enable the bus Master interface to read data from the bus; enable SRAM and read the data corresponding to the current bus from the SRAM; enable exceptions Or the calculation module XOR the data from the bus and the data from the SRAM to obtain the corresponding result; replace the result of the calculation with the corresponding data in the SRAM and save it for reading in the next round of the big cycle.
  • the working modes in the configuration information include command queue mode and register mode. If the source data involved in the XOR operation is not more than 5 groups, use the command queue mode; if the source data of the parameter XOR operation is greater than 5 groups, use Register mode.
  • the present invention also discloses a method for the acceleration device to perform RAID active acceleration, which includes the following steps: S01), the bus configuration interface receives configuration information from the CPU, the configuration information includes working mode, address information and page data length; S02) , The control module enters the data storage state according to the above configuration information, and starts the bus Master interface to read data from the bus until the data of the data length specified in the configuration information is fetched.
  • the control module enables SRAM and stores the data Enter the SRAM buffer; S03), the control module enters the calculation state, starts the internal large cycle counter and small cycle counter, the large cycle counter is responsible for counting each page of the entire strip, and the small cycle is responsible for counting each page of a certain page on the bus Cycle, this step includes four parallel operations: enable the Master interface to read data from the bus; enable SRAM and read the data corresponding to the current bus from the SRAM; enable the exclusive OR calculation module to sum the data from the bus The data from SRAM is subjected to exclusive OR operation to obtain the corresponding result; the operation result is replaced with the corresponding data in SRAM and reserved for reading in the next round of large loop; the above parallel operation is stopped when both the large and small loops are over; S04), the control module enters In this state, all the XOR results of the last round of the big cycle are sent to the bus Master interface, and the Master interface sends the data to the address specified by the bus configuration interface; S05), the control module enters the idle state,
  • the working modes in the configuration information include command queue mode and register mode. If the source data involved in the XOR operation is not more than 5 groups, use the command queue mode; if the source data of the parameter XOR operation is greater than 5 groups, use Register mode.
  • each source address index that needs to be XORed and the destination address index of the storage result are stored in the command queue in the form of FIFO entries in sequence, and the RAID acceleration module performs a check on each item in the command queue.
  • the command operation is as follows: According to the source address, obtain data from DRAM or NFC, and cyclically replace the intermediate check data obtained by the XOR into the internal SRAM. When the XOR ends, automatically move the data in the SRAM to the FIFO entry The destination address specified in.
  • the operation process of the register mode is: after configuring the source data address index and the destination address index, the CPU starts the RAID acceleration module to read data, performs an exclusive OR operation, and moves the exclusive OR result.
  • the storage format of the source address index and the destination address index in the command queue is:
  • SEL is the selection code.
  • SRC4 ⁇ SRC0 are 5-bit wide source address indexes to refer to 32 specific addresses. These 32 addresses are determined by the CPU configuration SRC_ADDR0 ⁇ SRC_ADDR31.
  • DES is a 4-bit wide destination address index. Refers to 16 specific addresses, which are determined by the CPU configuration DES_ADDR0 ⁇ DES_ADDR15;
  • the exclusive-OR operation module feedbacks an error on the read data line of the bus configuration interface, prompting the CPU microcode configuration error.
  • the CPU can change the configuration of the source address and destination address.
  • the CPU obtains the empty/full status of the command queue by reading the status register, and customizes the depth of the command queue according to requirements. Depth refers to the amount of data for exclusive OR operation determined by the value of SEL.
  • the RAID active acceleration device of the present invention is a hardware module integrated in the SSD main control, and realizes RAID by combining with the CPU configuration command queue, that is to say, the present invention realizes RAID through the combination of software and hardware. Strong. Hang the raid acceleration module on the bus as a Master, which can actively access all address spaces on the bus to facilitate software operations.
  • the internal data flow is designed as a pipeline to maximize the use of bus bandwidth. Command queue mode saves CPU cycles and improves system efficiency.
  • FIG. 1 is a functional block diagram of the RAID active acceleration module described in Embodiment 1.
  • This embodiment discloses a RAID active acceleration device in the SSD master control.
  • This device is an active acceleration device directly hung on the bus. It realizes the exclusive OR operation of each page of data in the strips divided by the software. The obtained check digit data is written into the destination address specified by the software. As shown in Figure 1, it includes:
  • Bus configuration interface AXI_RGF used to receive configuration information from the CPU, and also used as the CPU to read the status information and interrupt information of the RAID acceleration module;
  • the bus Master interface AXI_MST initiates data transmission to the bus according to the instructions of the control module, including reading source data from the bus and writing XOR result data to the bus;
  • the control module RAID_CTRL generates the status process of fetching calculation and writing results according to the information obtained from the bus configuration interface, and deploys the Master interface and the exclusive OR calculation module to realize the entire process, and then feedbacks the status to the bus configuration interface;
  • the exclusive OR calculation module RAID_CAL is responsible for reading the intermediate exclusive OR result from the SRAM and performing the exclusive OR with the newly read data from the Master port and writing the new result into the SRAM;
  • SRAM is responsible for temporarily storing the intermediate result of the exclusive OR operation.
  • the configuration information received by the bus configuration interface includes working mode, address information, and page data length.
  • the working modes include command queue mode and register mode. If the source data involved in the XOR operation is not more than 5 groups, the command queue mode is used; if the source data of the parameter XOR operation is greater than 5 groups, the register mode is used.
  • the state flow generated by the control module includes four parallel operations, which are: enable the bus Master interface to read data from the bus; enable SRAM and read data corresponding to the current bus from the SRAM;
  • the exclusive-OR calculation module performs an exclusive-OR operation on the data from the bus and the data from the SRAM to obtain the corresponding result; replaces the operation result with the corresponding data in the SRAM and saves it for use in the next round of the big cycle.
  • dual-port SRAM is used, the data corresponding to the current bus cycle is read, and the XOR calculation result corresponding to the previous bus cycle is written. This iterative process continues until both the large and small loops are over.
  • This embodiment discloses a method for performing RAID active acceleration based on the acceleration device described in the embodiment, which includes the following steps:
  • the bus configuration interface receives configuration information from the CPU, the configuration information includes working mode, address information and page data length;
  • the control module enters the data storage state according to the above configuration information, and starts the bus Master interface to read data from the bus until the data of the data length specified in the configuration information is fetched. At the same time, the control module enables SRAM, The data is stored in the SRAM cache;
  • the control module enters the calculation state and starts the internal large loop counter and small loop counter.
  • the large loop counter is responsible for counting each page of the entire strip, and the small loop is responsible for counting each cycle of a page on the bus.
  • This step includes Parallel four-part operation: enable the Master interface to read data from the bus; enable SRAM and read the data corresponding to the current bus from SRAM; enable the exclusive OR calculation module to perform data from the bus and data from the SRAM
  • the XOR operation obtains the corresponding result; the operation result replaces the corresponding data in the SRAM and saves it for reading in the next round of the large loop; the above parallel operation is stopped when both the large and small loops are finished;
  • the data read from the SRAM is the initial value or the result of the previous XOR, which is different from the data from the bus.
  • the corresponding data read from the SRAM and the corresponding data on the current bus refers to the data of the same strip. Because there are a lot of data on the bus, including different data in flash units such as multiple channels, multiple luns, and multiple planes, but for RAID, only the data of the same strip is used for XOR, and how much is stored in SRAM The intermediate XOR result of each strip, so the data in the SRAM and the data on the bus have a corresponding relationship based on the same strip.
  • the Master port is connected to the bus, and the intermediate XOR result is stored in the SRAM, so the intermediate XOR result is the corresponding data read from the SRAM, and the newly read data from the Master port is the corresponding data on the bus.
  • the data from the bus and the data from the SRAM are data on the same strip.
  • control module enters the data sending state, in this state, all the XOR results of the last round of the big cycle are sent to the bus Master interface, and the Master interface sends the data to the address specified by the bus configuration interface;
  • the control module enters the idle state and updates the status register in the configuration interface.
  • the working modes in the configuration information include command queue mode and register mode. If the source data involved in the XOR operation is not more than 5 groups, the command queue mode is used. If the source data of the parameter XOR operation is greater than 5 groups, Use register mode.
  • the operation process of the command queue mode is: each source address index that needs to be XORed and the destination address index of the storage result are stored in the command queue in the form of FIFO entries in turn, and the RAID acceleration module treats each item in the command queue.
  • the command operation is as follows: According to the source address, obtain data from DRAM or NFC, and cyclically replace the intermediate check data obtained by the XOR into the internal SRAM. When the XOR ends, automatically move the data in the SRAM to the FIFO entry The destination address specified in.
  • the storage format of the source address index and destination address index in the command queue is:
  • SRC4 ⁇ SRC0 are 5-bit wide source address indexes to refer to 32 specific addresses. These 32 addresses are determined by the CPU configuration SRC_ADDR0 ⁇ SRC_ADDR31.
  • DES is a 4-bit wide destination address index, which can refer to 16 A specific address, these 16 addresses are determined by the CPU configuration DES_ADDR0 ⁇ DES_ADDR15;
  • the exclusive-OR operation module feedbacks an error on the read data line of the bus configuration interface, prompting the CPU microcode configuration error.
  • the CPU Only when the command queue is empty, the CPU can change the configuration of the source address and destination address.
  • the CPU obtains the empty/full status of the command queue by reading the status register, and customizes the depth of the command queue according to requirements.
  • the depth of the command queue refers to the pass
  • the value of SEL determines the amount of data for XOR operation, and DAID accelerated batch processing is realized through the depth of the command queue.
  • the operation process of the register mode is: After configuring the source data address index and the destination address index, the CPU starts the RAID acceleration module to read data, performs an exclusive OR operation, and moves the exclusive OR result. Taking 15+1 as an example, the address corresponding to the source data is SRC_ADDR0 ⁇ SRC_ADDR14, and the destination address corresponds to DES_ADDR0.
  • the CPU can start the RAID acceleration module to read data after configuring these address registers in sequence, perform XOR operations, and move XOR results.
  • the RAID active acceleration device of the present invention is a hardware module integrated in the SSD main control, and realizes RAID by combining with the CPU configuration command queue, that is to say, the present invention realizes RAID through the combination of software and hardware with strong flexibility.
  • Hang the raid acceleration module on the bus as a Master which can actively access all address spaces on the bus to facilitate software operations.
  • the internal data flow is designed as a pipeline to maximize the use of bus bandwidth. Command queue mode saves CPU cycles and improves system efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System (AREA)
  • Advance Control (AREA)

Abstract

一种SSD主控中的RAID主动加速装置和加速方法,所述加速装置包括总线配置接口、总线Master接口、控制模块、异或计算模块和SRAM,控制模块根据从总线配置接口得到的信息生成取数计算写结果的状态流程,并且调配Master接口、异或计算模块实现整个流程,然后将状态反馈给总线配置接口;在状态流程中,使能异或计算模块将来自总线的数据和来自SRAM的数据进行异或运算得到相应结果,将运算结果替换SRAM中对应数据。通过使用硬件帮助CPU加速SSD存储中的RAID实现,提高RAID的速度,提高系统效率。

Description

一种SSD主控中的RAID主动加速装置和加速方法 技术领域
本发明涉及一种RAID加速装置和加速方法,具体的说,是一种SSD主控中的RAID主动加速装置和加速方法,使用硬件帮助CPU加速SSD存储中的RAID实现。
背景技术
在对SSD的读写当中,从Flash颗粒读出数据时,若ECC纠错失败,且read re-try等操作也无法读出正确数据,此时就需考虑如何进行数据恢复。RAID技术可以充分发挥出存储芯片的阵列优势,提供容错功能来确保数据安全性,在某个存储单元出现问题的情况下仍可以继续工作。
现有的RAID技术一般是针对HDD盘,使用操作系统或者RAID卡两种方式实现RAID。在SSD控制器中实现RAID的方法很少,并且现有的方法大都是单纯通过软件实现,降低了正常使用时的写效率,恢复数据时的读效率。
发明内容
本发明要解决的技术问题是提供一种SSD主控中的RAID主动加速装置和加速方法,在SSD主控中实现RAID,并且提高RAID的速度,提高系统效率。
为了解决所述技术问题,本发明采用的技术方案是:一种SSD主控中的RAID主动加速装置,本装置为直接挂在总线上的主动加速装置,包括以下模块:总线配置接口,用于接收来自CPU的配置信息,也用作CPU读取RAID加速模块的状态信息、中断信息;总线Master接口,根据控制模块的指令向总线发起数据传输,包括从总线读取源数据、向总线写出异或结果数据;控制模块,根据从总线配置接口得到的信息生成取数计算写结果的状态流程,并且调配Master接口、异或计算模块实现整个流程,然后将状态反馈给总线配置接口;异或计算模块,负责从SRAM中读取中间异或结果与从Master口新读入的数据进行异或并将新结果写入SRAM;SRAM,负责暂存异或运算的中间结果。
进一步的,总线配置接口接收的配置信息包括工作模式、地址信息、页数据长度。
进一步的,控制模块生成的状态流程包括并行的四部分操作,分别为:使能总线Master接口向总线读取数据;使能SRAM并从SRAM中读出与当前总线上对应的数据;使能异或计算模块将来自总线的数据和来自SRAM的数据进行异或运算得到相应结果;将运算结果替换SRAM中对应数据留待下一轮大循环时读出使用。
进一步的,配置信息中的工作模式包括命令队列模式和寄存器模式,若参与异或运 算的源数据不大于5组时,使用命令队列模式,若参数异或运算的源数据大于5组,则使用寄存器模式。
本发明还公开了一种上述加速装置进行RAID主动加速的方法,包括以下步骤:S01)、总线配置接口接收来自CPU的配置信息,该配置信息包括工作模式、地址信息和页数据长度;S02)、控制模块根据上述配置信息进入储数状态,启动总线Master接口向总线读取数据,直至取到配置信息中所指定数据长度的数据,与此同时,控制模块使能SRAM,将该笔数据存入SRAM当中缓存;S03)、控制模块进入计算状态,启动内部大循环计数器和小循环计数器,大循环计数器负责计数整个条带的每一页,小循环负责计数某一页在总线上的每个周期,此步骤包括并行的四部分操作:使能Master接口向总线读取数据;使能SRAM并从SRAM中读出与当前总线上对应的数据;使能异或计算模块将来自总线的数据和来自SRAM的数据进行异或运算得到相应结果;将运算结果替换SRAM中对应数据留待下一轮大循环时读出使用;大、小循环都结束时停止上述并行操作;S04)、控制模块进入发数状态,该状态下将最后一轮大循环的所有异或结果发送给总线Master接口,Master接口将数据发送到总线配置接口所指定的地址当中;S05)、控制模块进入空闲状态,更新配置接口中的状态寄存器。
进一步的,配置信息中的工作模式包括命令队列模式和寄存器模式,若参与异或运算的源数据不大于5组时,使用命令队列模式,若参数异或运算的源数据大于5组,则使用寄存器模式。
进一步的,命令队列模式的操作过程为:把需要做异或的各源地址索引和存放结果的目的地址索引,以FIFO条目的形式依次存入命令队列,RAID加速模块对命令队列中的每条命令操作如下:根据源地址,从DRAM或NFC获得数据,并将异或得出的中间校验数据循环替换到内部的SRAM内,当异或结束后,自动将SRAM内的数据搬到FIFO条目中指定的目的地址中。
进一步的,寄存器模式的操作过程为:CPU在配置完源数据地址索引和目的地址索引后启动RAID加速模块读取数据,进行异或操作,搬移异或结果。
进一步的,源地址索引和目的地址索引在命令队列中的存放格式为:
Figure PCTCN2019093450-appb-000001
SEL为选择码,SRC4~SRC0均是5位宽的源地址索引,以指代32个具体地址,这32个地址由CPU配置SRC_ADDR0~SRC_ADDR31来决定,DES是4位宽的目的地址索引,可以 指代16个具体地址,这16个地址由CPU配置DES_ADDR0~DES_ADDR15来决定;
SEL取不同数值时,异或操作不同,具体为:
0或者1:无操作;
2:将SRC0所指代的地址中的数据与SRC11所指代的地址中的数据进行异或操作,并将结果搬运到DES所指代的地址当中;
3:将SRC0所指代的地址中的数据先与SRC1所指代的地址中的数据进行异或操作,然后将所得结果与SRC2所指代的地址中的数据进行异或操作,完成后将最终异或结果搬运到DES所指代的地址当中;
4:将SRC0所指代的地址中的数据先与SRC1所指代的地址中的数据进行异或操作,然后将所得结果与SRC2所指代的地址中的数据进行异或操作,然后再将所得结果与SRC3所指代的地址中的数据进行异或操作,完成后将最终异或结果搬运到DES所指代的地址当中;
5:将SRC0所指代的地址中的数据先与SRC1所指代的地址中的数据进行异或操作,然后将所得结果与SRC2所指代的地址中的数据进行异或操作,然后再将所得结果与SRC3所指代的地址中的数据进行异或操作,然后再将所得结果与SRC4所指代的地址中的数据进行异或操作,完成后将最终异或结果搬运到DES所指代的地址当中;
6或者7:异或运算模块在总线配置接口的读数据线上反馈错误提示CPU微码配置错误。
进一步的,只有在命令队列为空时,CPU才可以更改源地址和目的地址的配置,CPU通过读取状态寄存器获得命令队列的空/满状态,根据需求自定义命令队列的深度,命令队列的深度指通过SEL的取值决定异或操作的数据量。
本发明的有益效果:本发明所述RAID主动加速装置是集成在SSD主控制内的一个硬件模块,通过与CPU配置命令队列结合实现RAID,也就是说本发明通过软硬件结合实现RAID,灵活性强。将raid加速模块挂在总线上作为一个Master,可以主动访问总线上的所有地址空间,方便软件操作。内部数据流向设计成流水线最大限度利用总线带宽。命令队列模式节省CPU周期,提高系统效率。
附图说明
图1为实施例1所述RAID主动加速模块的原理框图。
具体实施方式
下面结合附图和具体实施例对本发明作进一步的说明。
实施例1
本实施例公开一种SSD主控中的RAID主动加速装置,本装置为直接挂在总线上的主动加 速装置,实现的是将软件划分好的条带内各页数据进行异或操作后再将得到的校验位数据写入软件指定的目的地址。如图1所示,包括:
总线配置接口AXI_RGF,用于接收来自CPU的配置信息,也用作CPU读取RAID加速模块的状态信息、中断信息;
总线Master接口AXI_MST,根据控制模块的指令向总线发起数据传输,包括从总线读取源数据、向总线写出异或结果数据;
控制模块RAID_CTRL,根据从总线配置接口得到的信息生成取数计算写结果的状态流程,并且调配Master接口、异或计算模块实现整个流程,然后将状态反馈给总线配置接口;
异或计算模块RAID_CAL,负责从SRAM中读取中间异或结果与从Master口新读入的数据进行异或并将新结果写入SRAM;
SRAM,负责暂存异或运算的中间结果。
本实施例中,总线配置接口接收的配置信息包括工作模式、地址信息、页数据长度。其中所述工作模式包括命令队列模式和寄存器模式,若参与异或运算的源数据不大于5组时,使用命令队列模式,若参数异或运算的源数据大于5组,则使用寄存器模式。
本实施例中,控制模块生成的状态流程包括并行的四部分操作,分别为:使能总线Master接口向总线读取数据;使能SRAM并从SRAM中读出与当前总线上对应的数据;使能异或计算模块将来自总线的数据和来自SRAM的数据进行异或运算得到相应结果;将运算结果替换SRAM中对应数据留待下一轮大循环时读出使用。本过程中使用双口SRAM,读出的是当前总线周期所对应的数据,写入的是上一个总线周期所对应的异或计算结果。该迭代过程持续至大小循环都结束。
实施例2
本实施例公开一种基于实施例所述加速装置进行RAID主动加速的方法,包括以下步骤:
S01)、总线配置接口接收来自CPU的配置信息,该配置信息包括工作模式、地址信息和页数据长度;
S02)、控制模块根据上述配置信息进入储数状态,启动总线Master接口向总线读取数据,直至取到配置信息中所指定数据长度的数据,与此同时,控制模块使能SRAM,将该笔数据存入SRAM当中缓存;
S03)、控制模块进入计算状态,启动内部大循环计数器和小循环计数器,大循环计数器负责计数整个条带的每一页,小循环负责计数某一页在总线上的每个周期,此步骤包括并行的四部分操作:使能Master接口向总线读取数据;使能SRAM并从SRAM中读出与当前总线上 对应的数据;使能异或计算模块将来自总线的数据和来自SRAM的数据进行异或运算得到相应结果;将运算结果替换SRAM中对应数据留待下一轮大循环时读出使用;大、小循环都结束时停止上述并行操作;
本实施例中,从SRAM中读出的数据是初始值或者之前异或的结果,与来自总线的数据不同。从SRAM中读出与当前总线上对应的数据中的对应是指同一条带的数据。因为总线上有很多数据,包括多channel、多lun、多plane等Flash单元里的不同数据,但就做RAID来讲就是只有同一条带的数据才拿来做异或,并且SRAM中存有多个条带的中间异或结果,所以SRAM中的数据与总线上的数据存在基于同一条带的对应关系。Master口是与总线相连接的,中间异或结果存在SRAM中,所以中间异或结果即是从SRAM中读出的对应数据,Master口新读入数据即是总线上的对应数据。来自总线的数据和来自SRAM的数据是同一条带上的数据。
S04)、控制模块进入发数状态,该状态下将最后一轮大循环的所有异或结果发送给总线Master接口,Master接口将数据发送到总线配置接口所指定的地址当中;
S05)、控制模块进入空闲状态,更新配置接口中的状态寄存器。
本实施例中,配置信息中的工作模式包括命令队列模式和寄存器模式,若参与异或运算的源数据不大于5组时,使用命令队列模式,若参数异或运算的源数据大于5组,则使用寄存器模式。
具体的,命令队列模式的操作过程为:把需要做异或的各源地址索引和存放结果的目的地址索引,以FIFO条目的形式依次存入命令队列,RAID加速模块对命令队列中的每条命令操作如下:根据源地址,从DRAM或NFC获得数据,并将异或得出的中间校验数据循环替换到内部的SRAM内,当异或结束后,自动将SRAM内的数据搬到FIFO条目中指定的目的地址中。
源地址索引和目的地址索引在命令队列中的存放格式为:
Figure PCTCN2019093450-appb-000002
码,SRC4~SRC0均是5位宽的源地址索引,以指代32个具体地址,这32个地址由CPU配置SRC_ADDR0~SRC_ADDR31来决定,DES是4位宽的目的地址索引,可以指代16个具体地址,这16个地址由CPU配置DES_ADDR0~DES_ADDR15来决定;
SEL取不同数值时,异或操作不同,具体为:
0或者1:无操作;
2:将SRC0所指代的地址中的数据与SRC11所指代的地址中的数据进行异或操作,并将结果搬运到DES所指代的地址当中;
3:将SRC0所指代的地址中的数据先与SRC1所指代的地址中的数据进行异或操作,然后将所得结果与SRC2所指代的地址中的数据进行异或操作,完成后将最终异或结果搬运到DES所指代的地址当中;
4:将SRC0所指代的地址中的数据先与SRC1所指代的地址中的数据进行异或操作,然后将所得结果与SRC2所指代的地址中的数据进行异或操作,然后再将所得结果与SRC3所指代的地址中的数据进行异或操作,完成后将最终异或结果搬运到DES所指代的地址当中;
5:将SRC0所指代的地址中的数据先与SRC1所指代的地址中的数据进行异或操作,然后将所得结果与SRC2所指代的地址中的数据进行异或操作,然后再将所得结果与SRC3所指代的地址中的数据进行异或操作,然后再将所得结果与SRC4所指代的地址中的数据进行异或操作,完成后将最终异或结果搬运到DES所指代的地址当中;
6或者7:异或运算模块在总线配置接口的读数据线上反馈错误提示CPU微码配置错误。
只有在命令队列为空时,CPU才可以更改源地址和目的地址的配置,CPU通过读取状态寄存器获得命令队列的空/满状态,根据需求自定义命令队列的深度,命令队列的深度指通过SEL的取值决定异或操作的数据量,通过命令队列的深度实现DAID加速的批量处理。
寄存器模式的操作过程为:CPU在配置完源数据地址索引和目的地址索引后启动RAID加速模块读取数据,进行异或操作,搬移异或结果。以15+1为例,源数据对应的地址为SRC_ADDR0~SRC_ADDR14,目的地址对应DES_ADDR0。CPU可在依次配置这些地址寄存器之后启动RAID加速模块读取数据,进行异或操作,搬移异或结果。
本发明所述RAID主动加速装置是集成在SSD主控制内的一个硬件模块,通过与CPU配置命令队列结合实现RAID,也就是说本发明通过软硬件结合实现RAID,灵活性强。将raid加速模块挂在总线上作为一个Master,可以主动访问总线上的所有地址空间,方便软件操作。内部数据流向设计成流水线最大限度利用总线带宽。命令队列模式节省CPU周期,提高系统效率。
以上描述的仅是本发明的基本原理和优选实施例,本领域技术人员根据本发明做出的改进和替换,属于本发明的保护范围。

Claims (10)

  1. 一种SSD主控中的RAID主动加速装置,其特征在于:本装置为直接挂在总线上的主动加速装置,包括以下模块:总线配置接口,用于接收来自CPU的配置信息,也用作CPU读取RAID加速模块的状态信息、中断信息;总线Master接口,根据控制模块的指令向总线发起数据传输,包括从总线读取源数据、向总线写出异或结果数据;控制模块,根据从总线配置接口得到的信息生成取数计算写结果的状态流程,并且调配Master接口、异或计算模块实现整个流程,然后将状态反馈给总线配置接口;异或计算模块,负责从SRAM中读取中间异或结果与从Master口新读入的数据进行异或并将新结果写入SRAM;SRAM,负责暂存异或运算的中间结果。
  2. 根据权利要求1所述的SSD主控中的RAID主动加速装置,其特征在于:总线配置接口接收的配置信息包括工作模式、地址信息、页数据长度。
  3. 根据权利要求1所述的SSD主控中的RAID主动加速装置,其特征在于:控制模块生成的状态流程包括并行的四部分操作,分别为:使能总线Master接口向总线读取数据;使能SRAM并从SRAM中读出与当前总线上对应的数据;使能异或计算模块将来自总线的数据和来自SRAM的数据进行异或运算得到相应结果;将运算结果替换SRAM中对应数据留待下一轮大循环时读出使用。
  4. 根据权利要求2所述的SSD主控中的RAID主动加速装置,其特征在于:配置信息中的工作模式包括命令队列模式和寄存器模式,若参与异或运算的源数据不大于5组时,使用命令队列模式,若参数异或运算的源数据大于5组,则使用寄存器模式。
  5. 一种基于权利要求1所述加速装置进行RAID主动加速的方法,其特征在于:包括以下步骤:S01)、总线配置接口接收来自CPU的配置信息,该配置信息包括工作模式、地址信息和页数据长度;S02)、控制模块根据上述配置信息进入储数状态,启动总线Master接口向总线读取数据,直至取到配置信息中所指定数据长度的数据,与此同时,控制模块使能SRAM,将该笔数据存入SRAM当中缓存;S03)、控制模块进入计算状态,启动内部大循环计数器和小循环计数器,大循环计数器负责计数整个条带的每一页,小循环负责计数某一页在总线上的每个周期,此步骤包括并行的四部分操作:使能Master接口向总线读取数据;使能SRAM并从SRAM中读出与当前总线上对应的数据;使能异或计算模块将来自总线的数据和来自SRAM的数据进行异或运算得到相应结果;将运算结果替换SRAM中对应数据留待下一轮大循环时读出使用;大、小循环都结束时停止上述并行操作;S04)、控制模块进入发数状态,该状态下将最后一轮大循环的所有异或结果发送给总线Master接口,Master接口将数据发送到总线配置接口所指定的地址当中;S05)、控制模块进入空闲状态, 更新配置接口中的状态寄存器。
  6. 根据权利要求5所述的RAID主动加速的方法,其特征在于:配置信息中的工作模式包括命令队列模式和寄存器模式,若参与异或运算的源数据不大于5组时,使用命令队列模式,若参数异或运算的源数据大于5组,则使用寄存器模式。
  7. 根据权利要求6所述的RAID主动加速的方法,其特征在于:命令队列模式的操作过程为:把需要做异或的各源地址索引和存放结果的目的地址索引,以FIFO条目的形式依次存入命令队列,RAID加速模块对命令队列中的每条命令操作如下:根据源地址,从DRAM或NFC获得数据,并将异或得出的中间校验数据循环替换到内部的SRAM内,当异或结束后,自动将SRAM内的数据搬到FIFO条目中指定的目的地址中。
  8. 根据权利要求6所述的RAID主动加速的方法,其特征在于:寄存器模式的操作过程为:CPU在配置完源数据地址索引和目的地址索引后启动RAID加速模块读取数据,进行异或操作,搬移异或结果。
  9. 根据权利要求7所述的RAID主动加速的方法,其特征在于:源地址索引和目的地址索引在命令队列中的存放格式为:
    Figure PCTCN2019093450-appb-100001
    SEL为选择码,SRC4~SRC0均是5位宽的源地址索引,以指代32个具体地址,这32个地址由CPU配置SRC_ADDR0~SRC_ADDR31来决定,DES是4位宽的目的地址索引,可以指代16个具体地址,这16个地址由CPU配置DES_ADDR0~DES_ADDR15来决定;
    SEL取不同数值时,异或操作不同,具体为:
    0或者1:无操作;
    2:将SRC0所指代的地址中的数据与SRC11所指代的地址中的数据进行异或操作,并将结果搬运到DES所指代的地址当中;
    3:将SRC0所指代的地址中的数据先与SRC1所指代的地址中的数据进行异或操作,然后将所得结果与SRC2所指代的地址中的数据进行异或操作,完成后将最终异或结果搬运到DES所指代的地址当中;
    4:将SRC0所指代的地址中的数据先与SRC1所指代的地址中的数据进行异或操作,然后将所得结果与SRC2所指代的地址中的数据进行异或操作,然后再将所得结果与SRC3所指代的地址中的数据进行异或操作,完成后将最终异或结果搬运到DES所指代的地址当中;
    5:将SRC0所指代的地址中的数据先与SRC1所指代的地址中的数据进行异或操作,然后 将所得结果与SRC2所指代的地址中的数据进行异或操作,然后再将所得结果与SRC3所指代的地址中的数据进行异或操作,然后再将所得结果与SRC4所指代的地址中的数据进行异或操作,完成后将最终异或结果搬运到DES所指代的地址当中;
    6或者7:异或运算模块在总线配置接口的读数据线上反馈错误提示CPU微码配置错误。
  10. 根据权利要求9所述的RAID主动加速的方法,其特征在于:只有在命令队列为空时,CPU才可以更改源地址和目的地址的配置,CPU通过读取状态寄存器获得命令队列的空/满状态,根据需求自定义命令队列的深度。
PCT/CN2019/093450 2019-01-29 2019-06-28 一种ssd主控中的raid主动加速装置和加速方法 WO2020155542A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910083926.4A CN109933546B (zh) 2019-01-29 2019-01-29 一种ssd主控中的raid主动加速装置和加速方法
CN201910083926.4 2019-01-29

Publications (1)

Publication Number Publication Date
WO2020155542A1 true WO2020155542A1 (zh) 2020-08-06

Family

ID=66985290

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/093450 WO2020155542A1 (zh) 2019-01-29 2019-06-28 一种ssd主控中的raid主动加速装置和加速方法

Country Status (2)

Country Link
CN (1) CN109933546B (zh)
WO (1) WO2020155542A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849867A (zh) * 2021-08-31 2021-12-28 浪潮电子信息产业股份有限公司 一种加密芯片

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109933546B (zh) * 2019-01-29 2023-03-10 山东华芯半导体有限公司 一种ssd主控中的raid主动加速装置和加速方法
CN110837484B (zh) * 2019-10-31 2023-03-24 山东华芯半导体有限公司 Ssd主控中的raid多路处理装置及数据恢复方法
CN111444123B (zh) * 2020-03-28 2021-01-15 珠海市一微半导体有限公司 基于硬件加速的spi接口的自动读取控制系统及方法
CN113721135B (zh) * 2021-07-22 2022-05-13 南京航空航天大学 一种sram型fpga故障在线容错方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070055905A1 (en) * 2005-09-02 2007-03-08 Teh-Chern Chou Parity engine for use in storage virtualization controller and method of generating data by parity engine
CN102609221A (zh) * 2012-02-07 2012-07-25 无锡众志和达存储技术有限公司 一种硬件raid5/6存储系统的架构及数据处理方法
CN206696482U (zh) * 2017-03-24 2017-12-01 深圳市飞博康光通讯技术有限公司 1u接续机箱和1u机柜
CN109933546A (zh) * 2019-01-29 2019-06-25 山东华芯半导体有限公司 一种ssd主控中的raid主动加速装置和加速方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101833424B (zh) * 2010-03-26 2013-07-10 中国科学院光电技术研究所 基于fpga的高速存储与传输装置
US8799523B2 (en) * 2011-09-21 2014-08-05 Kevin Mark Klughart Data storage architecture extension system and method
CN103995785B (zh) * 2014-05-07 2017-01-11 马鞍山百助网络科技有限公司 信息处理方法和系统
CN104156174A (zh) * 2014-07-31 2014-11-19 记忆科技(深圳)有限公司 基于条带的固态硬盘raid实现方法及装置
CN104267912A (zh) * 2014-09-19 2015-01-07 北京联创信安科技有限公司 一种nas加速方法及系统
CN107870732B (zh) * 2016-09-23 2020-12-25 伊姆西Ip控股有限责任公司 从固态存储设备冲刷页面的方法和设备
CN206696842U (zh) * 2017-05-10 2017-12-01 山东鸿秦微电子科技有限公司 一种raid校验生成装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070055905A1 (en) * 2005-09-02 2007-03-08 Teh-Chern Chou Parity engine for use in storage virtualization controller and method of generating data by parity engine
CN102609221A (zh) * 2012-02-07 2012-07-25 无锡众志和达存储技术有限公司 一种硬件raid5/6存储系统的架构及数据处理方法
CN206696482U (zh) * 2017-03-24 2017-12-01 深圳市飞博康光通讯技术有限公司 1u接续机箱和1u机柜
CN109933546A (zh) * 2019-01-29 2019-06-25 山东华芯半导体有限公司 一种ssd主控中的raid主动加速装置和加速方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849867A (zh) * 2021-08-31 2021-12-28 浪潮电子信息产业股份有限公司 一种加密芯片
CN113849867B (zh) * 2021-08-31 2024-02-23 浪潮电子信息产业股份有限公司 一种加密芯片

Also Published As

Publication number Publication date
CN109933546A (zh) 2019-06-25
CN109933546B (zh) 2023-03-10

Similar Documents

Publication Publication Date Title
WO2020155542A1 (zh) 一种ssd主控中的raid主动加速装置和加速方法
US20190243558A1 (en) Two-level system main memory
US10732893B2 (en) Non-volatile memory over fabric controller with memory bypass
KR101863406B1 (ko) 검증된 데이터 세트의 비휘발성 매체 저널링 기법
CN115269259A (zh) 运行中的独立磁盘冗余阵列奇偶校验计算
US11507298B2 (en) Computational storage systems and methods
US9858146B2 (en) Reducing latency for raid destage operations
WO2022142544A1 (zh) 防止闪存数据丢失的方法、固态硬盘控制器、固态硬盘
CN105556480A (zh) 在基于闪存的存储系统中构建raid的方法及系统
CN114051611A (zh) 用于非连续存储器的dma分散和聚集操作
US9244762B1 (en) Method and apparatus for flexible buffers in an XOR engine
US20110219206A1 (en) Disposition instructions for extended access commands
JP2017504920A (ja) 不揮発性メモリ・アレイを含むデータ・ストレージ・システムを動作させるための方法、システム及びコンピュータ・プログラム
EP3496356A1 (en) Atomic cross-media writes on storage devices
WO2020155544A1 (zh) 一种ssd主控中的raid被动加速装置和加速方法
US10740189B2 (en) Distributed storage system
TW202316259A (zh) 用於控制資料處理系統中的共享記憶體的設備和方法
US20200319819A1 (en) Method and Apparatus for Improving Parity Redundant Array of Independent Drives Write Latency in NVMe Devices
JP2016189187A (ja) 記録装置、および情報処理装置
EP4227790A1 (en) Systems, methods, and apparatus for copy destination atomicity in devices
US20240111623A1 (en) Extended protection storage system put operation
WO2023027787A1 (en) Access request management using sub-commands
CN116627856A (zh) 一种实现内存地址映射的方法、装置及设备
Galbraith et al. Highly automated hardware and firmware RAID SoC design optimized for memory class storage devices

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19913205

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19913205

Country of ref document: EP

Kind code of ref document: A1