System for realizing PCIE and RapidIO protocol interconnection based on FPGA
By performing the conversion between PCIe and RapidIO protocols within the FPGA, the problems of excessive hardware resource consumption and CPU resource usage are solved, achieving hardware simplification and cost reduction, and broadening the application scenarios.
Patent Information
- Application Number
- CN202420248991.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-01
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2034-02-01
AI Technical Summary
Existing technologies for interconnecting PCIe and RapidIO protocols consume a lot of hardware resources, excessive CPU resources, limit application scenarios, and place high demands on CPU performance and operating system.
The interconnection between PCIe and RapidIO protocols is implemented using FPGA. The main conversion work is completed in the FPGA. By utilizing the data flow controller, bram, multiple RapidIO and PCIe interfaces, the dependence on the CPU is reduced. The internal bram is used as a cache to avoid large-capacity caches such as DDR3.
It reduces hardware resource consumption, simplifies CPU requirements, broadens application scenarios, reduces device costs, and increases the number of CPUs that can be used.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of high-speed communication interconnection, and in particular to a system for realizing PCIE and RapidIO protocol interconnection based on FPGA. Background Art
[0002] RapidIO technology is mainly aimed at the interconnection and communication of high-performance embedded systems. It uses high-performance LVDS technology to achieve high-speed transmission on 4 pairs of differential lines. Due to its comprehensive considerations in routing, switching, fault tolerance and error correction, and ease of use, it can achieve high-performance and reliable data transmission based on hardware, so it is widely used in embedded systems, mobile communications, and high-performance digital signal processing systems.
[0003] PCIE is a high-speed dual-channel serial bus technology used to replace the old PCI bus. The connected system is allocated exclusive channel bandwidth and does not share bus bandwidth. It mainly supports active power management, error reporting, end-to-end reliable transmission, hot plugging, and quality of service. There are many improvements over previous standards, including higher maximum system bus throughput, lower number of I / O pins and smaller physical size, better bus system performance scaling, error monitoring and reporting mechanisms.
[0004] In many high-performance digital signal processing systems, there are both PCIE interconnection buses and RapidIO interconnection buses. How to achieve high-speed mutual transmission of two protocol data in the system is a problem that must be solved. For example, the TSI721 dedicated chip designed and produced by IDT Corporation of the United States realizes hardware-based PCIE 2.0 to RapidIO 2 protocol interconnection, but the existing methods have the following two problems: 1) A large number of large-capacity data caches such as DDR3 are used, which consumes more hardware resources; 2) The main transmission conversion work is performed in the CPU, which occupies too many CPU resources, and also has high requirements on CPU performance, operating system and architecture, and the usage scenarios are very limited. Utility Model Content
[0005] The technical problem to be solved by the utility model is: when using FPGA to interconnect CPU and RapidIO at high speed, simplify the requirements for CPU, broaden the use scenarios, and reduce the consumption of hardware resources, thereby reducing costs.
[0006] In view of the above technical problems, a method is proposed; which is achieved through the following technical solutions:
[0007] A system for interconnecting PCIE and RapidIO protocols based on FPGA, the system comprising a RapidIO switch, an FPGA and a CPU connected in sequence, the RapidIO switch being connected to the FPGA via a RapidIO X4 slot, the CPU being connected to the FPGA via a PCIEX4 slot, the FPGA comprising a data flow controller, a bram, a plurality of RapidIO interfaces and a plurality of PCIE interfaces;
[0008] Among them, the data flow controller is connected to the bram, the multiple RapidIO interfaces include the RapidIO enumeration interface, the Nread interface and the Nwrite interface, and the multiple PCIE interfaces include the IO low-speed read and write interface, the interrupt interface and the memory high-speed read and write interface; the data flow controller is connected to the RapidIO X4 slot through the RapidIO enumeration interface, and the data flow controller is also connected to the PCIE X4 slot through the parallel IO low-speed read and write interface and the interrupt interface; the bram is connected to the RapidIO X4 slot through the parallel Nread interface and the Nwrite interface, and the bram is also connected to the PCIE X4 slot through the memory high-speed read and write interface.
[0009] The utility model completes the main protocol conversion work in FPGA, occupies less CPU resources, and has very low requirements on CPU specifications and architecture. The CPU uses a PCIE X4 slot and only needs to support PCIE standard protocol IO reading and writing. The structural requirements are also relatively simple, which effectively broadens the usage scenarios. In addition, the utility model does not need to use large-capacity data cache such as DDR3, but only uses internal bram to realize the cache function, which simplifies the hardware architecture and effectively reduces the device cost.
[0010] Preferably, a doorbell trigger is also provided in the FPGA, the first end of the doorbell trigger is connected to the bram, and the second end of the doorbell trigger is connected to the RapidIO switch through the RapidIO X4 slot. The doorbell trigger can effectively monitor the transmission process in real time and manage the use of various resources in the transmission conversion process.
[0011] Preferably, the data flow controller includes a data processing module, an interrupt control module, a data transceiver status module and a RapidIO routing table module; the interrupt control module is equipped with a unidirectional control channel, and the data processing module, the data transceiver status module and the RapidIO routing table module are connected in parallel using the unidirectional control channel. The data flow controller is the main processor used by the FPGA for transmission conversion. The interrupt control module can effectively control the transmission status, especially when an error occurs in the transmission, the corresponding transmission can be interrupted in time to ensure the accuracy and effectiveness of the transmission.
[0012] Preferably, the IO low-speed read-write interface is connected in parallel to the data processing module, the data transceiver status module and the RapidIO routing table module through a first bidirectional transmission channel; the interrupt interface is connected in parallel to the data processing module, the data transceiver status module and the RapidIO routing table module through a second bidirectional transmission channel. The IO low-speed read-write interface and the data flow controller use a bidirectional transmission channel to meet the requirements of transmitting and receiving data, and the interrupt interface and the data flow controller also use a bidirectional transmission channel, so that interrupts can be made in time according to the bidirectional data; in addition, the IO low-speed read-write interface has high compatibility and low cost, which also broadens the applicable scenarios.
[0013] Preferably, a polling controller is installed in the RapidIO routing table module. The polling controller can map any RapidIO data to any PCIE data, and can also meet customized requirements, customize the mapping relationship according to actual needs, so that more applicable usage scenarios are available.
[0014] Preferably, a CRC check module is installed in the bram. The CRC check module can be used to check the transmission process in the bram to ensure the accuracy of the transmission.
[0015] Preferably, bram adopts a hierarchical structure, and bram includes a primary storage layer, a secondary storage layer, and a backup storage layer. The utility model does not use a large-capacity cache such as DDR3, but only uses the internal bram as a cache. It is necessary to effectively divide the structure of bram to ensure that bram can support various data storage and conversions during the transmission process.
[0016] Compared with the prior art, the utility model has the following beneficial effects:
[0017] The utility model completes the main transmission conversion work in the FPGA, occupies less CPU resources, and has low requirements on CPU specifications and architecture, so that the number of CPUs that can meet the requirements is greatly increased. In addition, the polling controller that can customize data mapping greatly broadens the usage scenarios. In addition, the utility model does not need to use large-capacity data caches such as DDR3, but only uses internal bram to implement the cache function, which simplifies the hardware architecture and effectively reduces the device cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 The figure is a schematic diagram of the structure of a system that realizes the interconnection of PCIE and RapidIO protocols based on FPGA. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the utility model to describe the technical solutions in the embodiments of the utility model in detail. Obviously, the described embodiments are only part of the embodiments of the utility model, not all of the embodiments. Based on the embodiments of the utility model, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the utility model. Example
[0020] like Figure 1 As shown, it is a structural diagram of a system for interconnecting PCIE and RapidIO protocols based on FPGA. In this system, a RapidIO switch, FPGA and CPU are connected in sequence, and the interconnection of PCIE and RapidIO protocols is completed in FPGA.
[0021] Combination Figure 1 As shown, the RapidIO switch and CPU in the system can both adopt domestic devices. For example, the RapidIO switch adopts NRS1800JIAO switch and the CPU adopts Feiteng's FT2000. This system can be fully domestically produced. In addition, non-domestic devices can also be used, such as the commonly used x86 architecture Intel CPU, etc. The specific selection can be made according to actual needs.
[0022] The RapidIO switch is connected to the FPGA through the RapidIO X4 slot, and the CPU is connected to the FPGA through the PCIE X4 slot. The two X4s here represent four physical channels, which can transmit four independent data streams at the same time. They have high bandwidth and fault tolerance, can meet the simultaneous transmission of high-speed and large amounts of data, ensure transmission efficiency, and when less data needs to be transmitted, one of the four physical channels can be selected as a backup or monitoring channel to ensure transmission reliability. For the CPU, when using the PCIE X4 slot, the slot supports the PCIE standard protocol and can be converted to the RapidIO protocol of the RapidIO X4 slot. As for what operating system and architecture the CPU needs to use, there are no special restrictions, which greatly increases the number of applicable CPUs and the applicable scenarios.
[0023] In FPGA, there are data flow controller, bram, multiple RapidIO interfaces and multiple PCIE interfaces. The data flow controller is connected to the bram through a bidirectional physical channel, so that data can be transmitted to each other. Multiple RapidIO interfaces include RapidIO enumeration interface, Nread interface and Nwrite interface, and multiple PCIE interfaces include IO low-speed read and write interface, interrupt interface and memory high-speed read and write interface. Each interface occupies 4 physical channels, which is consistent with the specifications of CPU slot and RapidIO switch slot. The data flow controller includes data processing module, interrupt control module, data transceiver status module and RapidIO routing table module. The data processing module is specifically divided into data sending command processing unit and data receiving command processing unit. These two units will control the data processing module to process the sending command or the receiving command according to the data or instructions in the data transceiver status control module, RapidIO routing table module and IO low-speed read and write interface; they can also timely interrupt the currently executed task according to the data or instructions in the interrupt control module and the interrupt interface. bram is connected to the RapidIO X4 slot through the parallel Nread interface and Nwrite interface. bram is also connected to the PCIE X4 slot through the memory high-speed read and write interface. bram will store data and send data, so each device connected to bram is connected through a bidirectional physical channel and the transmission direction can be switched at any time as needed.
[0024] It should be noted that the RapidIO enumeration interface is used to enumerate the data of the entire network. Enumeration is a process used to discover and configure the network. When the RapidIO switch is started, it often needs to obtain information about other devices in the network, such as ID, address range, function, requirements, etc. This information needs to be achieved through the enumeration process, so the RapidIO enumeration interface is indispensable. Through the enumeration process, the RapidIO switch can establish an understanding of the CPU and allocate the necessary resources and configurations, so as to ensure that the two devices can communicate correctly, work together, and achieve the required data transmission and conversion operations.
[0025] The RapidIO enumeration interface can implement static enumeration. The process is as follows: the CPU writes the RapidIO routing table information required by the RapidIO switch into the RapidIO routing table module through the IO low-speed read and write interface, and parses it in the RapidIO routing table module. The parsed routing table information is sent to the RapidIO switch through the RapidIO enumeration interface, realizing the enumeration of the entire network from the CPU to the RapidIO switch.
[0026] In this embodiment, the data receiving process of FPGA is as follows: RapidIO switch sends data to Nwrite interface, writes data into bram for storage, converts data into corresponding PCIE address space according to information such as destination address of data in bram, and after conversion, sends PCIE address space and data as a data packet to CPU through memory high-speed read-write interface.
[0027] In this embodiment, since only bram is used without adding large-capacity cache such as DDR3, it is necessary to divide bram in more detail. bram adopts a hierarchical structure. The first layer is the primary storage layer, which is the highest layer of bram and is used to store frequently accessed or currently operated data packages. It has the fastest data access speed. The second layer is the secondary storage layer, which is located below the primary storage layer and is used to store infrequently accessed but still required to be retained data packages. It has a slower data access speed. The third layer is the backup storage layer, which is also the bottom layer of bram. It is used to store infrequently accessed and unimportant data packages. It has the slowest data access speed but can provide sufficient storage space.
[0028] In this embodiment, a doorbell trigger is also provided in the FPGA, the first end of the doorbell trigger is connected to the bram, and the second end of the doorbell trigger is connected to the RapidIO switch through the RapidIO X4 slot, which can effectively monitor the transmission process in real time and manage the use of various resources in the transmission conversion process. The process of receiving the doorbell is as follows: the RapidIO switch acts as the transmission source, and sends the destination address, destination ID and other information in the data to be transmitted or converted as the doorbell information to the doorbell trigger, and then transmits it to the data flow controller through the bram. The data flow controller converts the doorbell information and the ID of the transmission source into PCIE interrupt information and sends it to the CPU through the interrupt interface. The process of sending the doorbell is: the destination address, destination ID and other information instructions in the CPU input data are transmitted to the data flow controller through the IO low-speed read and write interface, and the data flow controller parses the information instructions to complete a doorbell sending operation, and sends the PCIE interrupt information back to the CPU through the interrupt interface to notify the CPU that the doorbell sending operation has been completed.
[0029] In this embodiment, the IO low-speed read-write interface connects the data processing module, the data transceiver status module and the RapidIO routing table module in parallel through the first bidirectional transmission channel; the interrupt interface connects the data processing module, the data transceiver status module and the RapidIO routing table module in parallel through the second bidirectional transmission channel. The IO low-speed read-write interface and the data flow controller use a bidirectional transmission channel to meet the requirements of transmitting and receiving data, and the interrupt interface and the data flow controller also use a bidirectional transmission channel, so that interrupts can be made in time according to the bidirectional data; in addition, the IO low-speed read-write interface has high compatibility and low cost, which also broadens the applicable scenarios.
[0030] In this embodiment, a polling table is added to the RapidIO routing table, and a polling controller is also installed in the corresponding RapidIO routing table module. One end of the polling controller is connected to the RapidIO enumeration interface to receive data from the RapidIO switch or transmit data to the RapidIO switch; the other end of the polling controller is connected to the IO low-speed read / write interface and the interrupt interface to receive data from the CPU or transmit data to the CPU. The polling controller can be used to map any RapidIO data to any PCIE data, and can also meet customized requirements. For example, when P has multiple PCIE data and multiple RapidIO data, the polling controller can be used to map multiple PCIE data to one RapidIO data, or one PCIE data to multiple RapidIO data, etc. In this way, the data correspondence relationship during protocol conversion can be customized, which greatly increases practicality and effectively broadens the actual usage scenarios.
[0031] In this embodiment, in order to ensure the accuracy of the data, a small part of the space in the bram can be used to install a CRC check module to check the data transferred by the bram; in addition, a CRC controller can be added to the CRC check module to control the switch of the CRC check. For example, when the bram is transferring data normally, the CRC check is turned off to speed up the processing speed, and when a part of very important data is stored in the bram, the CRC check is turned on to ensure the accuracy of the important data.
[0032] Specific application examples:
[0033] When a RapidIO switch is interconnected through FPGA and Longteng FT2000 (CPU), each interface of FPGA used to connect to the RapidIO switch is of RapidIO Gen2 X4 specification, which is the second-generation standard specification of RapidIO. Each interface of FPGA used to connect to the CPU is of PCIE Gen3 X4 specification, which is the third-generation standard specification of PCIE. Both specifications require that each interface use 4 physical channels.
[0034] FPGA is divided into RapidIO end, internal end and PCIE end. RapidIO end is equipped with RapidIO enumeration interface, Nread interface, Nwrite interface and doorbell trigger. Internal end is equipped with bram and data flow controller. Data flow controller is equipped with data processing module, interrupt control module, data transceiver status module and RapidIO routing table module. PCIE end is equipped with IO low-level read and write interface, interrupt interface and memory high-speed read and write interface. Each interface occupies 4 physical channels, and doorbell trigger also occupies 4 physical channels.
[0035] When the CPU sends data through the PCIE end, the data length, PCIE source address, RapidIO destination address, destination ID and other information instructions are written to the data flow controller through the IO low-speed read and write interface; the RapidIO routing table module uses the polling controller inside the module to parse the routing table information from the information, and sends it to the RapidIO switch through the RapidIO enumeration interface for data enumeration and mapping; the data processing module parses it into a PCIE DMA descriptor and uses it to form a chained PCIE memory read TLP data packet. Bram is divided into a primary storage layer, a secondary storage layer and a backup storage layer, and the above data packet is first stored in the primary storage layer, and CRC verification is enabled in the primary storage layer, and the data packet is verified and detected, and the verified data is used as indication information, and the indication information is sent to the RapdiIO switch through the bram and Nwrite interfaces, indicating the data that needs to be sent by the RapdiIO switch. After sending the indication information, Bram changes the PCIE memory read TLP data packet and its indication information after CRC verification into the backup storage layer, leaving a space in the primary storage layer, and turning off CRC verification.
[0036] After receiving the instruction, the RapdiIO switch writes the data required by the CPU into the internal bram through the Nread interface, and sorts and rearranges the data in the bram; then, the RapdiIO switch destination ID node, destination address and other information specified in the above data packet are sent to the CPU using the memory high-speed read-write interface; after the data is sent, the RapidIO switch sends the doorbell information of the PCIE_MSI interrupt to the CPU through the doorbell trigger-bram-memory high-speed read-write interface, notifying the CPU that the data interconnection has been completed.
[0037] When the CPU reads data through the PCIE end, the destination address and destination ID of the RapidIO switch to be read, and the PCIE address space where the data is stored after being read back are written to the data flow controller through the IO low-speed read and write interface; the routing table is parsed in the RapidIO routing table module, and the routing table information is sent to the RapidIO switch through the RapidIO enumeration interface using the polling controller to determine the data mapping relationship between the two devices; the indication information is parsed in the data processing module, stored in the main storage layer of the bram, and the CRC check is turned on for detection and error correction; then, the same operation is sampled on the RapidIO switch and the RapdiIO end, the difference is that the interface used by the RapdiIO end is the Nread interface, and after the data is read back to the bram, it is converted into the PCIEmemory write The TLP data packet is written into the specified address space inside the bram according to the instruction information sent by the CPU above, and is read by the memory high-speed read-write interface and sent back to the CPU; finally, the RapdiIO switch sends the PCIE_MSI interrupt doorbell information to the CPU via the doorbell trigger-bram-memory high-speed read-write interface to notify the CPU that the data interconnection has been completed.
[0038] In summary, the utility model completes the main transmission conversion work in FPGA, occupies less CPU resources, and has low requirements on CPU specifications and architecture, so that the number of CPUs that can meet the requirements is greatly increased. In addition, the polling controller that can customize data mapping greatly broadens the usage scenarios. In addition, the utility model does not need to use large-capacity data cache such as DDR3, but only uses internal bram to realize the cache function, which simplifies the hardware architecture, effectively reduces the device cost, and is significantly progressive.
[0039] The above embodiments are only for illustrating the technical idea of the present utility model, and cannot be used to limit the protection scope of the present utility model. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present utility model shall fall within the protection scope of the present utility model.
Claims
1. A system for interconnecting PCIE and RapidIO protocols based on FPGA, characterized in that: It includes a RapidIO switch, an FPGA and a CPU connected in sequence, the RapidIO switch is connected to the FPGA through a RapidIO X4 slot, the CPU is connected to the FPGA through a PCIEX4 slot, and the FPGA includes a data flow controller, a bram, multiple RapidIO interfaces and multiple PCIE interfaces; Among them, the data flow controller is connected to the bram, the multiple RapidIO interfaces include the RapidIO enumeration interface, the Nread interface and the Nwrite interface, and the multiple PCIE interfaces include the IO low-speed read and write interface, the interrupt interface and the memory high-speed read and write interface; the data flow controller is connected to the RapidIO X4 slot through the RapidIO enumeration interface, and the data flow controller is also connected to the PCIE X4 slot through the parallel IO low-speed read and write interface and the interrupt interface; the bram is connected to the RapidIO X4 slot through the parallel Nread interface and the Nwrite interface, and the bram is also connected to the PCIE X4 slot through the memory high-speed read and write interface.
2. The system for interconnecting PCIE and RapidIO protocols based on FPGA according to claim 1, characterized in that: A doorbell trigger is provided in the FPGA, a first end of the doorbell trigger is connected to the bram, and a second end of the doorbell trigger is connected to the RapidIO switch through a RapidIO X4 slot.
3. The system for interconnecting PCIE and RapidIO protocols based on FPGA according to claim 1, characterized in that: The data flow controller includes a data processing module, an interrupt control module, a data transceiver status module and a RapidIO routing table module; the interrupt control module is equipped with a unidirectional control channel, and the data processing module, the data transceiver status module and the RapidIO routing table module are connected in parallel using the unidirectional control channel.
4. The system for interconnecting PCIE and RapidIO protocols based on FPGA according to claim 1, characterized in that: The IO low-speed read / write interface is connected in parallel to the data processing module, the data transceiver status module and the RapidIO routing table module through a first bidirectional transmission channel; the interrupt interface is connected in parallel to the data processing module, the data transceiver status module and the RapidIO routing table module through a second bidirectional transmission channel.
5. The system for interconnecting PCIE and RapidIO protocols based on FPGA according to claim 1, characterized in that: A polling controller is installed in the RapidIO routing table module.
6. The system for interconnecting PCIE and RapidIO protocols based on FPGA according to claim 1, characterized in that: A CRC check module is installed in bram.
7. The system for interconnecting PCIE and RapidIO protocols based on FPGA according to claim 1, characterized in that: BRAM adopts a hierarchical structure, which includes the primary storage layer, the secondary storage layer and the backup storage layer.
