Service FPGA (Field Programmable Gate Array) loading method and device and related equipment

The CPU uses PCIe mem read and write operations and DMA technology to read the FPGA version from the memory and send it through localbus, which solves the problem of slow and inflexible FPGA loading, achieves a fast and flexible loading process, and improves the system startup speed.

CN118567738APending Publication Date: 2024-08-30WELL CORE MICROELECTRONICS TECH (TIANJIN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410530891.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing FPGA loading methods have problems such as slow loading and inflexibility. Especially as the scale of FPGA increases, the demand for Flash storage increases, the update process is complex and the working frequency of CPLD is slow, which affects the system startup time.

Method used

The central processing unit CPU uses the PCIe mem read and write operation mode to receive the DMA startup instruction, reads the FPGA version from the memory based on the DMA operation, and sends the version file to the FPGA through localbus for loading, monitors the loading status and stores it, achieving fast and flexible loading process.

Benefits of technology

This method alleviates the problem of slow and inflexible loading of FPGA, improves loading efficiency, reduces the time occupied by the CPU, and realizes parallel loading when multiple FPGA versions are consistent, improving the system startup speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567738A
    Figure CN118567738A
Patent Text Reader

Abstract

The invention discloses a business FPGA (Field Programmable Gate Array) loading method and device and related equipment. The method is applied to the technical field of FPGA loading, and when the method is applied to FPGA management, the method comprises the following steps: receiving a starting instruction of direct memory access (DMA) operation through a CPU (Central Processing Unit) in a PCIe mem read-write operation mode of a bus and an interface standard PCIe; a DMA operation is initiated according to the starting instruction, and a corresponding service FPGA version is read from a memory based on the initial address and length of the DMA operation; and the read version file of the service FPGA version is sent to the corresponding service FPGA in the one or more service FPGAs through the localbus for loading. According to the scheme, the current situations of slow loading and inflexible loading of the FPGA can be relieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of FPGA (Field Programmable Gate Array) loading technology, and in particular to a business FPGA loading method, device and related equipment. Background Art

[0002] There are two main methods for loading FPGA in the prior art:

[0003] 1. Actively load the FPGA by mounting SPI (Serial Peripheral Interface) Flash. The disadvantage is that as the FPGA becomes larger, the required Flash also becomes larger, and each FPGA needs to mount a Flash. The more FPGAs are used, the more Flash needs to be mounted. If the FPGA version needs to be updated later, the Flash also needs to be updated, but the process of updating the Flash is very troublesome.

[0004] 2. Load multiple FPGAs through CPLD (Complex Programmable Logic Device). Compared with mounting Flash, it is more flexible and convenient. It does not require Flash. The FPGA can be loaded by reading the FPGA version from the memory through the CPU (Central Processing Unit) and passing it to the CPLD. The FPGA can also be accessed through the CPLD. The disadvantage is that the working frequency of the CPLD is slow, the FPGA loading time is long, and the CPU process is always occupied during the loading process, which affects the system startup time.

[0005] Therefore, a business FPGA loading method is urgently needed to alleviate the current situation of slow and inflexible FPGA loading. Summary of the invention

[0006] Based on this, it is necessary to provide a business FPGA loading method, device and related equipment that can alleviate the current situation of slow and inflexible FPGA loading in response to the above technical problems.

[0007] In a first aspect, the present application provides a service FPGA loading method, which is applied to an FPGA, and the method includes:

[0008] A direct memory access (DMA) operation start instruction is received by a central processing unit (CPU) in a PCIe mem read / write operation mode of a PCIe (Peripheral Component Interface Express, bus and interface standard);

[0009] Initiate a DMA operation according to the start instruction, and read the corresponding business FPGA version from the memory based on the starting address and length of the DMA operation;

[0010] The read version file of the business FPGA version is sent to the corresponding business FPGA in one or more business FPGAs through localbus for loading.

[0011] In one embodiment, the read version file of the service FPGA version is sent to a corresponding service FPGA in one or more service FPGAs through a localbus for loading, including:

[0012] Send a loading notification to PROG_B of the business FPGA;

[0013] Receive the INIT_B response returned by the service FPGA and monitor the changes of the received INIT_B;

[0014] If the received INIT_B changes from low to high, the loading process is started.

[0015] In one embodiment, the method further comprises:

[0016] Monitor the loading status of one or more service FPGAs and store the loading status in a loading status register for reading by preset software;

[0017] When the preset software reads the loading status of the previous FPGA loading success, it continues to read the next business FPGA version.

[0018] In one embodiment, before receiving a start instruction of a direct memory access (DMA) operation in a PCIe mem read / write operation mode of PCIe by a central processing unit (CPU), the method further includes:

[0019] Load the FPGA version from Flash via the serial peripheral interface SPI;

[0020] The CPU is used to scan the PCIe of the management FPGA to establish a connection with the management FPGA.

[0021] In one embodiment, the method further comprises:

[0022] When the version files of multiple service FPGA versions are completely consistent, the version files of the multiple service FPGA versions are simultaneously sent to the corresponding service FPGA through localbus for loading.

[0023] In a second aspect, the present application also provides a service FPGA loading device, which is applied to the FPGA side, and the device includes:

[0024] The receiving module is used to receive the start instruction of the DMA operation through the CPU in the PCIe mem read and write operation mode of PCIe;

[0025] A reading module is used to initiate a DMA operation according to a start instruction, and read the corresponding service FPGA version from the memory based on the start address and length of the DMA operation;

[0026] The first loading module is used to send the read version file of the service FPGA version to the corresponding service FPGA in one or more service FPGAs through localbus for loading.

[0027] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned business FPGA loading method when executing the computer program.

[0028] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned business FPGA loading method are implemented.

[0029] In a fifth aspect, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned business FPGA loading method are implemented.

[0030] The above-mentioned business FPGA loading method first receives the start instruction of the DMA operation through the CPU in the PCIe mem read and write operation mode of PCIe when applied to FPGA, then initiates the DMA operation according to the start instruction, and reads the corresponding business FPGA version from the memory based on the starting address and length of the DMA operation, and finally sends the version file of the read business FPGA version to the corresponding business FPGA in one or more business FPGAs through localbus for loading. The business FPGA loading method of the present application can alleviate the current situation of slow and inflexible FPGA loading. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A schematic diagram of a flow chart of a service FPGA loading method in one embodiment;

[0032] Figure 2 A schematic diagram of a process of loading a service FPGA in an embodiment;

[0033] Figure 3It is a structural block diagram of a service FPGA loading device in an embodiment;

[0034] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0036] There are two main methods for loading FPGA in the prior art: 1. Actively loading FPGA by mounting SPI Flash. The disadvantage is that as the FPGA becomes larger and larger, the required Flash also becomes larger and larger, and each FPGA needs to mount a Flash. The more FPGAs are used, the more Flash needs to be mounted. If the FPGA version needs to be updated later, the Flash also needs to be updated, but the process of updating Flash is very troublesome. 2. Loading multiple FPGAs through CPLD. Compared with mounting Flash, it is more flexible and convenient. No Flash is required. FPGA loading can be realized by reading the FPGA version from the memory by the CPU and passing it to the CPLD. Access to the FPGA can also be realized through the CPLD. The disadvantage is that the operating frequency of the CPLD is slow, the FPGA loading time is long, and the CPU process needs to be occupied during the loading process, which affects the system startup time. Based on this, the embodiment of the present application provides a business FPGA loading method to improve the above technical problems.

[0037] In one embodiment, Figure 1 A service FPGA loading method is provided according to an embodiment of the present application, and the method is applied to manage FPGA as an example for explanation. The method includes the following steps:

[0038] S101, receiving a direct memory access (DMA) operation start instruction via a central processing unit (CPU) in a PCIe mem read / write operation mode of a bus and interface standard PCIe.

[0039] It should be noted that, before step S101, the management FPGA also needs to load the FPGA version from the Flash via the serial peripheral interface SPI, and use the CPU to scan the PCIe of the management FPGA to establish a connection with the management FPGA.

[0040] S102, initiating a DMA operation according to the start instruction, and reading the corresponding service FPGA version from the memory based on the start address and length of the DMA operation.

[0041] Optionally, the memory stores the correspondence between the starting address and length of the DMA operation and the business FPGA version. Therefore, after obtaining the starting address and length of the DMA operation, the corresponding business FPGA version can be obtained from the memory.

[0042] It should be noted that the bit order of the Bitstream file is related to the FPGAD type. The bit order of AMD and INTEL FPGA loading is different, and attention should be paid to the big and small ends of the CPU during the loading process to avoid bit order errors.

[0043] S103, sending the read version file of the service FPGA version to a corresponding service FPGA in one or more service FPGAs through localbus for loading.

[0044] Optionally, the loading process is to first send a low pulse to PROG_B to notify the loading, and the business FPGA returns the INIT_B response to the management FPGA. When the management FPGA detects that INIT_B changes from low to high, the business FPGA can be loaded. The management FPGA sends the rising edge of the clock of the business FPGA loading bitstream to the corresponding business FPGA through the DIN port through the high-speed localbus. After the business FPGA version is transmitted and verified, the business FPGA pulls the completion signal high. When the management FPGA detects that the completion signal changes from low to high, it is considered that the business FPGA has been loaded successfully.

[0045] The above-mentioned business FPGA loading method first receives the start instruction of the DMA operation through the CPU in the PCIe mem read and write operation mode of PCIe when applied to FPGA, then initiates the DMA operation according to the start instruction, and reads the corresponding business FPGA version from the memory based on the starting address and length of the DMA operation, and finally sends the read version file of the business FPGA version to the corresponding business FPGA in one or more business FPGAs through localbus for loading. The business FPGA loading method of the present application can alleviate the current situation of slow and inflexible FPGA loading.

[0046] Based on the above embodiments, Figure 2 The steps for loading the business FPGA are broken down and refined. Figure 2 As shown, the implementation process includes the following:

[0047] S201, sending a loading notification to PROG_B of the service FPGA.

[0048] S202, receiving an INIT_B response returned by the service FPGA, and monitoring changes in the received INIT_B.

[0049] Optionally, the management FPGA exchanges information with the corresponding service FPGA and monitors changes in the received INIT_B.

[0050] S203, if the received INIT_B changes from low to high, the loading process is started.

[0051] Optionally, after starting the loading process, continue to monitor the loading status of one or more business FPGAs, and store the loading status in a loading status register for reading by the preset software; when the preset software reads the loading status of the previous FPGA loading successfully, continue to read the next business FPGA version.

[0052] It should be noted that, when the version files of multiple business FPGA versions are completely consistent, the version files of multiple business FPGA versions are simultaneously sent to the corresponding business FPGA through localbus for loading, which can greatly improve the loading efficiency.

[0053] In addition, if a certain service FPGA does not pull up INIT_B and DONE, it is considered that the service FPGA is faulty. Other service FPGAs can be loaded first, and the upper-layer software can be notified to determine whether to reload the service FPGA. After the service FPGA is loaded successfully, the management FPGA can be accessed uniformly through PCIe mem read and write operations to configure and manage the service FPGA. The direct connection between the service FPGA and the CPU can be isolated. When the service FPGA is abnormal or needs to be restarted, it can be directly restarted or reloaded without affecting the CPU.

[0054] It can be understood that this embodiment provides a possible implementation method for loading the service FPGA, which is simple and easy to operate, and can alleviate the current situation of slow and inflexible loading of the FPGA.

[0055] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0056] Based on the same inventive concept, the embodiment of the present application also provides a service FPGA loading device for implementing the service FPGA loading method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more service FPGA loading device embodiments provided below can refer to the limitations on the service FPGA loading method above, and will not be repeated here.

[0057] In one embodiment, by Figure 3 FIG. 1 shows a structural block diagram of a service FPGA loading device in an embodiment. Figure 3 As shown, a service FPGA loading device 3 is provided, wherein the device 3 includes a receiving module 30, a reading module 31 and a first loading module 32, wherein:

[0058] The receiving module 30 is used to receive a start instruction of a DMA operation through the CPU in a PCIe mem read and write operation mode of PCIe;

[0059] A reading module 31 is used to initiate a DMA operation according to a start instruction, and read the corresponding service FPGA version from the memory based on the start address and length of the DMA operation;

[0060] The first loading module 32 is used to send the read version file of the service FPGA version to the corresponding service FPGA in one or more service FPGAs through the local bus for loading.

[0061] The above-mentioned business FPGA loading device first receives the start instruction of the DMA operation through the CPU in the PCIe mem read and write operation mode of PCIe when applied to FPGA, then initiates the DMA operation according to the start instruction, and reads the corresponding business FPGA version from the memory based on the starting address and length of the DMA operation, and finally sends the version file of the read business FPGA version to the corresponding business FPGA in one or more business FPGAs through localbus for loading. The business FPGA loading device of the present application can alleviate the current situation of slow and inflexible loading of FPGA.

[0062] In one embodiment, the first loading module 32 is specifically used for:

[0063] Send a loading notification to PROG_B of the business FPGA; receive the INIT_B response returned by the business FPGA, and monitor the changes of the received INIT_B; if the received INIT_B changes from low to high, start the loading process.

[0064] In one embodiment, the device 30 further specifically includes:

[0065] A monitoring module, used to monitor the loading status of one or more service FPGAs, and store the loading status in a loading status register for reading by preset software;

[0066] The continue reading module is used to continue reading the next business FPGA version when the preset software reads the loading status of the previous FPGA loading successfully.

[0067] In one embodiment, before receiving a start instruction of a direct memory access (DMA) operation by a central processing unit (CPU) in a PCIe mem read / write operation mode of a bus and interface standard PCIe, the device 30 further specifically includes:

[0068] The second loading module is used to load the FPGA version from the Flash via the serial peripheral interface SPI;

[0069] The connection establishment module is used to use the CPU to scan the PCIe of the management FPGA to establish a connection with the management FPGA.

[0070] In one embodiment, the device 30 further specifically includes:

[0071] The sending module is used to send the version files of multiple business FPGA versions to the corresponding business FPGA through localbus for loading when the version files of multiple business FPGA versions are completely consistent.

[0072] Each module in the above-mentioned business FPGA loading device can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0073] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, a memory, a network interface and a transceiver connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The transceiver of the computer device is used to perform operations of receiving data or sending data under the control of the processor. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as sample data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a business FPGA loading method is implemented.

[0074] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. Specifically, the computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0075] In one of the embodiments, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory. The principles and specific processes of implementing the embodiments by the processor can be found in the description of the business FPGA loading method embodiment in the aforementioned embodiment, which will not be repeated here.

[0076] In one of the embodiments, a computer-readable storage medium is provided on which a computer program is stored. When the computer program is executed by a processor, the principles and specific processes in each embodiment are implemented. Please refer to the description in the business FPGA loading method embodiment in the aforementioned embodiment, which will not be repeated here.

[0077] In one of the embodiments, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the principles and specific processes in each embodiment are implemented. Please refer to the description in the business FPGA loading method embodiment in the aforementioned embodiment, which will not be repeated here.

[0078] It should be noted that the information involved in this application (including but not limited to the information involved in the business FPGA loading process in this application, etc.) are all information or data fully authorized by all parties.

[0079] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0080] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0081] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A business FPGA loading method, characterized in that: Applied to managing a field programmable gate array FPGA, the method comprises: Receiving a start instruction of a direct memory access DMA operation by a central processing unit CPU in a PCIe mem read and write operation mode of a bus and an interface standard PCIe; Initiate a DMA operation according to the start instruction, and read the corresponding service FPGA version from the memory based on the starting address and length of the DMA operation; The read version file of the business FPGA version is sent to the corresponding business FPGA in one or more business FPGAs through localbus for loading.

2. The method according to claim 1, characterized in that The step of sending the read version file of the service FPGA version to the corresponding service FPGA in one or more service FPGAs through the localbus for loading includes: Send a loading notification to PROG_B of the business FPGA; Receive the INIT_B response returned by the service FPGA and monitor the changes of the received INIT_B; If the received INIT_B changes from low to high, the loading process is started.

3. The method according to claim 1, characterized in that: The method further comprises: Monitor the loading status of the one or more service FPGAs, and store the loading status in a loading status register for reading by preset software; When the preset software reads the loading status of the previous FPGA loading success, it continues to read the next business FPGA version.

4. The method according to claim 1, characterized in that: Before receiving a start instruction of a direct memory access (DMA) operation by a central processing unit (CPU) in a PCIe mem read / write operation mode of a bus and interface standard PCIe, the method further comprises: Load the FPGA version from Flash via the serial peripheral interface SPI; The CPU is used to scan the PCIe of the management FPGA to establish a connection with the management FPGA.

5. The method according to claim 1, characterized in that: The method further comprises: When the version files of multiple service FPGA versions are completely consistent, the version files of the multiple service FPGA versions are simultaneously sent to the corresponding service FPGA through localbus for loading.

6. A business FPGA loading device, characterized in that: Applicable to managing the field programmable gate array FPGA side, the device comprises: The receiving module is used to receive the start instruction of the DMA operation through the CPU in the PCIe mem read and write operation mode of PCIe; A reading module, used to initiate a DMA operation according to the start instruction, and read the corresponding service FPGA version from the memory based on the starting address and length of the DMA operation; The first loading module is used to send the read version file of the service FPGA version to the corresponding service FPGA in one or more service FPGAs through localbus for loading.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.