Background
The read-write and storage of a single disk has the risks or defects of limited capacity, low input/output performance and data loss. The redundant array of independent disks (Redundant Array of INDEPENDENT DISKS, RAID) is a storage technology that is designed to overcome the above drawbacks.
The basic idea of a RAID disk array is to form a large disk system with multiple independent disks together, thereby achieving better storage performance and higher reliability than a single disk, but for a computer, the RAID disk array resembles a single hard disk or logical storage unit. The user may decide in what way the device processes the data by configuring the RAID mode of the device.
Typical RAID modes are mainly RAID-0, RAID-1, RAID-5 and RAID-10.RAID-0 mainly realizes striped storage of data and improves the performance of a disk array. RAID-1 mainly realizes mirror image storage and realizes data backup of the disk. RAID-5 realizes data recovery of the disk and enhances the data recovery capacity of the disk. RAID-10 has both RAID-0 and RAID-1 characteristics.
According to the different modes selected, RAID disk arrays may enhance data transfer performance, enhance data recovery, and increase data backup capabilities as compared to monolithic disks.
RAID implementations may be divided into two implementations, soft and hard. Soft RAID in soft implementation refers to the use of a central processing unit (Central Processing Unit, CPU) of a host to perform data computation and processing of the RAID, and hard RAID refers to the use of a specialized processor, i.e., a RAID processor, and a cache to process the RAID data. It is apparent that soft RAID relies heavily on the computational power of the CPU of the host and the data computing and processing algorithms of the RAID.
When the number of disks mounted downstream of the host device is large, more CPU resources and power consumption are required. In contrast, hard RAID does not consume CPU resources, and is more flexible for tasks such as disk monitoring, capacity expansion, backup, replacement and the like.
The RAID bridge chip can realize data transmission between the host device and the disk, and the RAID engine is the core of the RAID bridge chip. In addition to the special processor, the RAID engine in the prior art also needs to implement data buffering and handling by using an off-chip double rate synchronous dynamic random access memory (Dual Data Rate Synchronous Dynamic Random Access Memory, DDR SDRAM). In order for a RAID processor and DDR SDRAM to achieve more efficient interaction, the RAID processor designer has to consider adding additional control logic and interfaces, which complicates the data flow interaction, integration, and design development work of the RAID processor.
How to reduce the chip design and integration difficulty in the bridge chip and avoid the cost of the off-chip memory becomes a technical problem to be solved in the field.
Disclosure of Invention
In order to alleviate or partially alleviate the above technical problem, the solution of the present invention is as follows:
A RAID engine comprises an on-chip memory, wherein data is transmitted between a RAID processor and the on-chip memory through a first data interface, and data is transmitted between a SATA core and the on-chip memory through a second data interface.
Further, the RAID engine is a circuit module in a RAID bridge chip.
Further, a DMA module in the SATA core is configured to transfer data from within a physical storage device to within the on-chip memory, or/and transfer data from within an on-chip memory to within a physical storage device.
Further, the RAID engine also includes a control register module for receiving control signals from the RAID processor.
Further, the control signal includes information indicating a RAID mode and a number of physical storage devices.
Further, the first data interface and the second data interface are AMBA data interfaces.
Further, the RAID engine further comprises a RAID state machine, and the RAID state machine is used for jumping to a corresponding RAID data processing mode according to the RAID mode and the information of the number of the physical storage devices, which are acquired from the control register module.
Further, the RAID processor transmits a control signal to the control register module through a first control interface, the RAID engine further comprises a data processing module, the data processing module processes the control signal to obtain a processed control signal, and the data processing module transmits the processed control signal to the SATA core through a second control interface.
Further, the first control interface and the second control interface are both AMBA control interfaces, and the RAID state machine is further configured to, when determining a corresponding RAID data processing mode, further according to information indicated by the data processing module.
A RAID bridge chip comprising a RAID processor, a SATA core, and a RAID engine as claimed in any preceding claim.
The technical scheme of the invention has one or more of the following beneficial technical effects:
(1) The internal self-on-chip storage DRAM of the RAID engine can realize data caching and transmission, and the cost of the off-chip memory is eliminated.
(2) Because no extra DDR SDRAM is required to be added outside the chip, corresponding relevant control logic and interfaces are not required to exist, the integration and design difficulty of the chip are reduced, and the chip area and the number of chip interfaces are reduced.
(3) A RAID engine supporting multiple modes can realize data storage of multiple RAID modes.
Furthermore, other advantageous effects that the present invention has will be mentioned in the specific embodiments.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to clearly describe the technical solution of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
The invention discloses a RAID engine supporting multiple modes, which can realize the storage of multiple RAID mode data, and a self-driven random access memory (Dynamic Random Access Memory, DRAM) in the RAID engine is used for realizing data caching and transmission, and does not need extra off-chip DDR SDRAM, thereby simplifying chip design and integration steps. Specifically, the RAID engine is realized through the following technical scheme.
FIG. 1 illustrates a schematic diagram of the operation of a RAID bridge chip incorporating the RAID engine of the present invention. A RAID processor is a special purpose processor for implementing RAID functions. The RAID bridge chip comprises a RAID processor, a RAID engine and a SATA core.
Typically, in a RAID bridge chip, a RAID engine is directly connected between a RAID processor and a serial advanced technology attachment (SERIAL ADVANCED Technology Attachment, SATA) core of a physical storage device through a first-in-first-Out (FIRST IN FIRST Out, FIFO) interface or an advanced microcontroller bus architecture (Advanced Microcontroller Bus Architecture, AMBA) interface, so as to achieve the technical purpose of the present invention.
Unlike software that can program data processing, the RAID engine of the present invention is a hardware implemented circuit module for implementing data processing between the RAID processor and the SATA core. Obviously, the RAID engine of the present invention may be multiplexed as an intellectual property core in the integrated circuit arts.
The RAID engine comprises an on-chip memory, and further comprises a first data interface, a second data interface, a first control interface and a second control interface.
Data is transferred between the RAID processor and the on-chip memory through a first data interface, and data is transferred between the SATA core and the on-chip memory through a second data interface.
Preferably, the RAID engine further comprises at least a first AMBA control interface, a second AMBA control interface, a first AMBA data interface, and a second AMBA data interface. The first AMBA data interface and the second AMBA data interface are used for realizing data access or/and transmission between the RAID processor and the physical storage device, which includes reading data from the physical storage device to the RAID processor and the host device, and writing data from the host device or/and the RAID processor to the physical storage device.
That is, in the above-described embodiment, the first data interface is a first AMBA data interface and the second data interface is a second AMBA data interface, in other words, in this embodiment, both the first data interface and the second data interface are AMBA data interfaces. The first control interface is a first AMBA control interface and the second control interface is a second AMBA control interface, in other words, in this particular embodiment, both the first control interface and the second control interface are AMBA control interfaces.
Preferably, the physical storage device is a magnetic disk. Taking n disks as an example, disk 1, disk 2, disk n are mounted under a host device, which are connected to the SATA core through SATA interface 1, SATA interface 2, SATA interface n, respectively, where n is a positive integer, such as n is 4.
The RAID engine includes on-chip memory, which may be memory located within the RAID engine. The on-chip memory is illustratively a dynamic random access memory (Dynamic Random Access Memory, DRAM) or a static random access memory (Static Random Access Memory, SRAM).
Based on the RAID bridge chip comprising the on-chip memory, the outside of the RAID bridge chip is not required to be additionally provided with an off-chip DDR SDRAM, so that on one hand, the cost can be reduced, and on the other hand, the design and the integration complexity of the RAID bridge chip can be reduced.
Also included in the SATA core is a direct memory access (Direct Memory Access, DMA) module. The DMA module is used for transferring data from the physical storage device to the on-chip memory or/and transferring data from the on-chip memory to the physical storage device.
In addition, the RAID engine also comprises a control register module, a RAID state machine and a data processing module.
For the write process, the RAID engine workflow is such that, for example, a user configures the RAID mode and the number of disks or designates a number of disks as desired.
The RAID processor transmits a control signal to the control register module through a first control interface. Specifically, the RAID processor transmits control signals to a control register module in the RAID engine through a first AMBA control interface.
The RAID processor stores the data to be written into the on-chip memory through the first AMBA data interface. The control signals include information indicating a RAID mode and a number of physical storage devices.
Illustratively, the control register module implements configuration of disk count and RAID mode based on the control signals. Optionally, the user may also change the number of disks and RAID mode as desired.
And the RAID state machine is combined with the information indicated by the data processing module, and jumps to the corresponding RAID data processing mode according to the RAID mode and the number of disks configured by the user. By way of example, the RAID data processing mode may be one of RAID-0, RAID-1, RAID-5, and RAID-10.
The data processing module processes the control signal to obtain a processed control signal. The data processing module transmits the processed control signal to the SATA core through a second control interface. Specifically, the processed control signal is transmitted to the SATA core through the second AMBA control interface. And the DMA module in the SATA core transmits the data to be written in the on-chip memory to the disk through the second AMBA data interface according to the processed control signal.
For example, if the user selects RAID-0 mode, the data to be written in the on-chip memory is striped among the corresponding plurality of disks.
Similarly, for the read process, the RAID engine workflow is such that the user decides on the RAID mode and the number of disks enabled as needed. The RAID processor transmits control signals to a control register module in the RAID engine through a first AMBA control interface.
The control register module realizes the configuration of the number of disks and RAID modes according to the control signals. And the RAID state machine is combined with the data processing module, and jumps to the corresponding RAID data processing mode according to the RAID mode and the number of disks configured by the user. By way of example, the RAID data processing mode may be one of RAID-0, RAID-1, RAID-5, and RAID-10.
The data processing module processes the control signal to obtain a processed control signal. The processed control signal is transmitted to the SATA core through a second AMBA control interface.
According to a RAID mode configured by a user, a DMA module in the SATA core transfers data to be transferred from the disk to the on-chip memory into the on-chip memory. After the data transmission is finished, the RAID processor receives a notice of reading the data from the on-chip memory, and then the data is read back to the RAID processor. Further, the RAID processor communicates the data back to the host device.
In conclusion, the invention realizes the data reading and writing of multiple RAID modes through the RAID engine. Compared with the prior art, the invention can avoid adding extra DDR SDRAM outside the RAID bridging chip, reduce the chip area, cost and the number of chip interfaces, and reduce the chip design and integration complexity.
Numerous specific details are set forth in the above description in order to provide a better illustration of the invention. It will be understood by those skilled in the art that the present invention may be practiced without some of these specific details. In some instances, well known methods, procedures, components, and circuits have not been described in detail so as not to obscure the present invention.
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. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.