Field-programmable gate array program remote upgrading method and device based on common public radio interface protocol and computer equipment
By encapsulating FPGA program upgrade data packets in a format based on the general public radio interface protocol and implementing a packet-by-packet confirmation mechanism, the problem of low accuracy in remote FPGA program upgrades is solved, achieving remote upgrades with high reliability and high success rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTHERN POWER GRID SENSING TECHNOLOGY (GUANGDONG) CO LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-17
AI Technical Summary
The accuracy of remote FPGA program upgrades in the current technology is low and errors are prone to occur, mainly due to subjective factors caused by manual configuration and manual triggering methods.
The upgrade data packets are formatted and encapsulated using a general public radio interface protocol, and data is transmitted through a packet-by-packet acknowledgment mechanism to ensure that each data packet is correctly received by the remote device and to avoid error accumulation.
It improves the accuracy and success rate of remote program upgrades, avoids errors caused by human intervention, and ensures the reliability of long-distance transmission.
Smart Images

Figure CN121879803A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for remotely upgrading a field-programmable gate array (FPGA) based on a common public radio interface protocol. Background Technology
[0002] Currently, in order to meet the needs of large-scale deployment and operation and maintenance of remote FPGA (Field-Programmable Gate Array) devices in fields such as power system automation and industrial control, it is crucial to reliably perform remote program upgrades for FPGAs.
[0003] In traditional technology, remote program upgrades are typically performed using manual configuration and triggering; however, this method is subject to subjective factors and prone to errors, resulting in low accuracy of remote program upgrades. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for remote program upgrades of a field-programmable gate array (FPGA) based on a common public radio interface protocol, which can improve the accuracy of remote program upgrades and address the aforementioned technical problems.
[0005] In a first aspect, this application provides a method for remotely upgrading a field-programmable gate array (FPGA) program based on a common public radio interface protocol, applicable to local devices, including:
[0006] In response to a program upgrade request for a target program on a remote device sent by a host computer, the system receives a current upgrade data packet for the target program sent by the host computer; the distance between the remote device and the local device is greater than a preset distance; the target program refers to a field-programmable gate array (FPGA) program.
[0007] Based on a preset protocol, the current upgrade data packet is encapsulated to obtain a processed upgrade data packet; the preset protocol refers to the General Public Radio Interface Protocol.
[0008] The processed upgrade data packet is sent to the remote device;
[0009] Upon receiving the response data corresponding to the processed upgrade data packet returned by the remote device, the response data is sent to the host computer; the host computer is used to return the next upgrade data packet corresponding to the current upgrade data packet based on the response data;
[0010] The next upgrade data packet is used as the new current upgrade data packet, and the process jumps to the step of encapsulating the current upgrade data packet according to a preset protocol to obtain a processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device is used to perform program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program.
[0011] In one embodiment, the step of encapsulating the current upgrade data packet according to a preset protocol to obtain a processed upgrade data packet includes:
[0012] Identify the initial data frame that matches the preset protocol;
[0013] According to the frame format corresponding to the preset protocol, the current upgrade data packet is mapped to the preset time slot in the initial data frame to obtain the updated data frame;
[0014] Obtain the frame header corresponding to the updated data frame, and combine the frame header with the updated data frame to obtain the processed upgrade data packet.
[0015] In one embodiment, before receiving the current upgrade data packet of the target program sent by the host computer in response to a program upgrade request for the target program on the remote device sent by the host computer, the method further includes:
[0016] The system receives a program version query request for a target program on a remote device from the host computer, and sends the program version query request to the remote device, so that the remote device returns the program version information of the target program based on the program version query request.
[0017] The program version information is sent to the host computer; the host computer is also used to return a program upgrade request for the target program of the remote device when it detects that the program version information is inconsistent with the preset program version information.
[0018] In one embodiment, the method further includes:
[0019] If no response data corresponding to the processed upgrade data packet is received from the remote device, the processed upgrade data packet is resent to the remote device.
[0020] In one embodiment, the method further includes:
[0021] Obtain the number of retransmissions corresponding to the processed upgrade data packet;
[0022] If the number of resends exceeds the preset number of resends, a program upgrade failure message corresponding to the target program is generated;
[0023] The program upgrade failure information is sent to the host computer.
[0024] In one embodiment, the local device has a built-in first high-speed serial transceiver interface, and the remote device has a built-in second high-speed serial transceiver interface; the first high-speed serial transceiver interface and the second high-speed serial transceiver interface are connected via optical fiber.
[0025] Sending the processed upgrade data packet to the remote device includes:
[0026] The processed upgrade data packet is sent to the remote device through the first high-speed serial transceiver interface and the second high-speed serial transceiver interface.
[0027] Secondly, this application also provides a remote programmable gate array (FPGA) upgrade device based on a common public radio interface protocol, applied to local equipment, including:
[0028] The data packet receiving module is used to respond to a program upgrade request sent by a host computer for a target program on a remote device, and to receive the current upgrade data packet of the target program sent by the host computer; the distance between the remote device and the local device is greater than a preset distance; the target program refers to a field-programmable gate array program;
[0029] The data packet encapsulation module is used to encapsulate the current upgrade data packet according to a preset protocol to obtain a processed upgrade data packet; the preset protocol refers to the General Public Radio Interface Protocol.
[0030] A data packet sending module is used to send the processed upgrade data packet to the remote device;
[0031] The response data sending module is used to send the response data to the host computer when it receives the response data corresponding to the processed upgrade data packet returned by the remote device; the host computer is used to return the next upgrade data packet corresponding to the current upgrade data packet based on the response data;
[0032] The data packet processing module is used to take the next upgrade data packet as the new current upgrade data packet and jump to the step of encapsulating the current upgrade data packet according to a preset protocol to obtain a processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device is used to perform program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program.
[0033] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0034] In response to a program upgrade request for a target program on a remote device sent by a host computer, the system receives a current upgrade data packet for the target program sent by the host computer; the distance between the remote device and the local device is greater than a preset distance; the target program refers to a field-programmable gate array (FPGA) program.
[0035] Based on a preset protocol, the current upgrade data packet is encapsulated to obtain a processed upgrade data packet; the preset protocol refers to the General Public Radio Interface Protocol.
[0036] The processed upgrade data packet is sent to the remote device;
[0037] Upon receiving the response data corresponding to the processed upgrade data packet returned by the remote device, the response data is sent to the host computer; the host computer is used to return the next upgrade data packet corresponding to the current upgrade data packet based on the response data;
[0038] The next upgrade data packet is used as the new current upgrade data packet, and the process jumps to the step of encapsulating the current upgrade data packet according to a preset protocol to obtain a processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device is used to perform program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program.
[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0040] In response to a program upgrade request for a target program on a remote device sent by a host computer, the system receives a current upgrade data packet for the target program sent by the host computer; the distance between the remote device and the local device is greater than a preset distance; the target program refers to a field-programmable gate array (FPGA) program.
[0041] Based on a preset protocol, the current upgrade data packet is encapsulated to obtain a processed upgrade data packet; the preset protocol refers to the General Public Radio Interface Protocol.
[0042] The processed upgrade data packet is sent to the remote device;
[0043] Upon receiving the response data corresponding to the processed upgrade data packet returned by the remote device, the response data is sent to the host computer; the host computer is used to return the next upgrade data packet corresponding to the current upgrade data packet based on the response data;
[0044] The next upgrade data packet is used as the new current upgrade data packet, and the process jumps to the step of encapsulating the current upgrade data packet according to a preset protocol to obtain a processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device is used to perform program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program.
[0045] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0046] In response to a program upgrade request for a target program on a remote device sent by a host computer, the system receives a current upgrade data packet for the target program sent by the host computer; the distance between the remote device and the local device is greater than a preset distance; the target program refers to a field-programmable gate array (FPGA) program.
[0047] Based on a preset protocol, the current upgrade data packet is encapsulated to obtain a processed upgrade data packet; the preset protocol refers to the General Public Radio Interface Protocol.
[0048] The processed upgrade data packet is sent to the remote device;
[0049] Upon receiving the response data corresponding to the processed upgrade data packet returned by the remote device, the response data is sent to the host computer; the host computer is used to return the next upgrade data packet corresponding to the current upgrade data packet based on the response data;
[0050] The next upgrade data packet is used as the new current upgrade data packet, and the process jumps to the step of encapsulating the current upgrade data packet according to a preset protocol to obtain a processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device is used to perform program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program.
[0051] The aforementioned remote upgrade method, apparatus, computer equipment, storage medium, and computer program product for a field-programmable gate array (FPGA) program based on the Universal Public Radio Interface (UPRI) protocol first responds to a program upgrade request for a target program on a remote device sent by a host computer, receiving the current upgrade data packet of the target program sent by the host computer; the distance between the remote device and the local device is greater than a preset distance; the target program refers to an FPGA program; then, based on a preset protocol, the current upgrade data packet is format-encapsulated to obtain a processed upgrade data packet; the preset protocol refers to the UPR protocol; next, the processed upgrade data packet is sent to the remote device; then, upon receiving response data corresponding to the processed upgrade data packet returned by the remote device, the response data is sent to the host computer; the host computer is used to return the next upgrade data packet corresponding to the current upgrade data packet based on the response data; finally, the next upgrade data packet is used as the new current upgrade data packet, and the process jumps to the step of format-encapsulating the current upgrade data packet based on the preset protocol to obtain a processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device is used to perform program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program. In this way, during remote program upgrades, for long-distance transmission scenarios, the upgrade data packets sent by the host computer are encapsulated in a standardized format according to the common public radio interface protocol. Leveraging the protocol's standardized characteristics in long-distance, high-reliability wireless transmission, this avoids issues such as format corruption, data loss, or parsing errors during data packet transmission. A packet-by-packet confirmation mechanism is employed; after each encapsulated upgrade data packet is sent, the remote device must return the corresponding acknowledgment data before the next data packet transmission process is triggered. This mechanism accurately verifies whether each data packet is correctly received by the remote device. If a data packet transmission is abnormal, subsequent data packet transmission is suspended due to the lack of acknowledgment, preventing error accumulation and ensuring that all data packets are accurately received by the remote device and used for program upgrades. This improves the reliability and success rate of remote program upgrades. Furthermore, the entire process requires no manual intervention, avoiding the subjective factors and errors inherent in manual configuration and triggering methods that can lead to lower accuracy in remote program upgrades, further enhancing the accuracy of remote program upgrades. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 This is an application environment diagram of a field-programmable gate array (FPGA) remote upgrade method based on a common public radio interface protocol in one embodiment.
[0054] Figure 2 This is a flowchart illustrating a remote upgrade method for a field-programmable gate array (FPGA) based on a common public radio interface protocol, as shown in one embodiment.
[0055] Figure 3 This is a flowchart illustrating a remote upgrade method for a field-programmable gate array (FPGA) based on a common public radio interface protocol, as described in another embodiment.
[0056] Figure 4 This is a schematic diagram of an FPGA remote upgrade system connection based on the CPRI (Common Public Radio Interface) protocol in one embodiment;
[0057] Figure 5 This is a schematic diagram illustrating the functionality of an FPGA remote upgrade system based on the CPRI protocol in one embodiment.
[0058] Figure 6 This is a flowchart illustrating an FPGA remote upgrade method based on the CPRI protocol in one embodiment.
[0059] Figure 7 This is a schematic diagram of the CPRI transmission frame format of the FPGAs at both ends in one embodiment;
[0060] Figure 8 This is a schematic diagram of the CPRI receive frame format at both ends of the FPGA in one embodiment;
[0061] Figure 9 This is a structural block diagram of a field-programmable gate array (FPGA) remote program upgrade device based on a common public radio interface protocol in one embodiment.
[0062] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0063] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0064] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0065] The remote programmable gate array (FPGA) program upgrade method based on the Common Public Radio Interface (CRI) protocol provided in this application can be applied to, for example... Figure 1 In the application environment shown, local device 102 communicates with host computer 101 via a network (network cable), and local device 102 also communicates with remote device 103 via fiber optic cable (fiber optic remote connection). For details, refer to... Figure 1 In response to a program upgrade request for the target program of the remote device 103 sent by the host computer 101, the system receives the current upgrade data packet of the target program sent by the host computer 101; the distance between the remote device 103 and the local device 102 is greater than a preset distance; the target program refers to a field-programmable gate array program; based on a preset protocol, the system performs format encapsulation processing on the current upgrade data packet to obtain a processed upgrade data packet; the preset protocol refers to the General Public Radio Interface Protocol; the system sends the processed upgrade data packet to the remote device 103; upon receiving the response data corresponding to the processed upgrade data packet returned by the remote device 103, the system sends the response data to the host computer 101; the host computer 101 returns the next upgrade data packet corresponding to the current upgrade data packet based on the response data; the system uses the next upgrade data packet as the new current upgrade data packet and jumps to the step of performing format encapsulation processing on the current upgrade data packet based on the preset protocol to obtain a processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device 103 performs program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program. Among them, host computer 101 can refer to a server that controls remote devices to perform remote program upgrades; local device 102 can refer to an embedded hardware device used for protocol conversion and data transmission of upgrade data packets; remote device 103 can refer to an embedded hardware device that performs remote program upgrades; the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0066] In one exemplary embodiment, such as Figure 2 As shown, a method for remotely upgrading a field-programmable gate array (FPGA) based on a common public radio interface protocol is provided, which can be applied to... Figure 1 Taking a local device as an example, this embodiment of the method includes the following steps:
[0067] Step S201: In response to the program upgrade request for the target program of the remote device sent by the host computer, receive the current upgrade data packet of the target program sent by the host computer; the distance between the remote device and the local device is greater than a preset distance.
[0068] The target program, also known as the FPGA program, refers to the Field Programmable Gate Array program.
[0069] Among them, the program upgrade request refers to the request used to trigger the FPGA program upgrade process on the remote device.
[0070] The current upgrade data packet refers to a single transmission data packet segment sent by the host computer to the target program in batches. Because the target program (bitstream file) is large in size and cannot be sent in a single transmission, the host computer will split the complete target program into multiple data packets. The current upgrade data packet is the single packet data being processed in a certain transmission stage. It contains key information such as the packet sequence number, upgrade data body, and CRC (Cyclic Redundancy Check) check code. This information is used by the remote device to verify the integrity of the received data, reassemble the complete upgrade program in sequence, and finally realize the remote upgrade of the target program.
[0071] Here, distance refers to the actual communication link distance between the remote device and the local device.
[0072] The preset distance refers to a pre-set distance threshold, such as 1 kilometer.
[0073] For example, the local device monitors the communication link with the host computer in real time. When it detects a program upgrade request sent by the host computer for a target program on a remote device that is more than a preset distance away from the local device, it parses the key information carried in the program upgrade request, including the remote device identifier. Then, the local device matches the parsed remote device identifier with a pre-stored list of target remote devices. If the matching result indicates that the remote device identifier belongs to the list of target remote devices, the local device receives the current upgrade data packet of the target program sent by the host computer.
[0074] Step S202: Based on a preset protocol, the current upgrade data packet is format-encapsulated to obtain a processed upgrade data packet.
[0075] The default protocol, also known as the CPRI protocol, refers to the Common Public Radio Interface Protocol.
[0076] Among them, the processed upgrade data packet refers to the current upgrade data packet after format encapsulation processing.
[0077] For example, the local device queries the correspondence between the protocol and the encapsulation format based on the preset protocol to obtain the encapsulation format corresponding to the preset protocol, which is used as the encapsulation format corresponding to the current upgrade data packet; then, according to the encapsulation format corresponding to the current upgrade data packet, the current upgrade data packet is encapsulated to obtain the processed upgrade data packet.
[0078] Step S203: Send the processed upgrade data packet to the remote device.
[0079] For example, the local device performs status detection on the optical fiber link with the remote device to obtain optical power attenuation information, signal strength, and real-time bit error rate of the optical fiber link. Then, feature extraction processing is performed on the optical power attenuation information, signal strength, and real-time bit error rate to obtain a first feature vector of optical power attenuation information, a second feature vector of signal strength, and a third feature vector of real-time bit error rate. Then, the first feature vector, the second feature vector, and the third feature vector are concatenated to obtain a concatenated feature vector. Next, the concatenated feature vector is input into an optical fiber link status prediction model trained based on the random forest algorithm to obtain the predicted optical fiber link status. Then, if the predicted optical fiber link status is a preset optical fiber link status (such as a stable transmission status), the processed upgrade data packet is sent to the remote device through the optical fiber link.
[0080] Step S204: Upon receiving the response data corresponding to the processed upgrade data packet returned by the remote device, the response data is sent to the host computer; the host computer is used to return the next upgrade data packet corresponding to the current upgrade data packet based on the response data.
[0081] The response data represents the status feedback data returned by the remote device to the local device after receiving the processed upgrade data packet sent by the local device. It includes core fields such as the remote device identifier, the packet sequence number corresponding to the processed upgrade data packet, the CRC check result (success / failure) corresponding to the processed upgrade data packet, and the link status.
[0082] The next upgrade packet indicates the next data packet segment in the target program in response to the current upgrade packet. It should be noted that the target program (bitstream file) is split into multiple sequentially arranged upgrade packets. The sequence number of the next upgrade packet is the sequence number of the current upgrade packet plus 1, and its data body is the subsequent segment of the target program, which, together with the current upgrade packet, constitutes a complete target program data sequence.
[0083] For example, when the local device receives the response data corresponding to the processed upgrade data packet returned by the remote device, it parses the response data to obtain information such as the remote device identifier, the packet sequence number of the current processed upgrade data packet, and the CRC check result. The local device first matches the remote device identifier in the response data with the pre-stored target remote device list. If the matching result indicates that the remote device identifier belongs to the target remote device list, and the CRC check result indicates that the processed upgrade data packet has passed the check, the local device sends the response data to the host computer through the communication link with the host computer. The host computer retrieves the pre-stored target program (bit stream file) segment list based on the response data, extracts and returns the next upgrade data packet with the packet sequence number of the current packet sequence number plus 1.
[0084] Step S205: The next upgrade data packet is taken as the new current upgrade data packet, and the process jumps to the step of encapsulating the current upgrade data packet according to the preset protocol to obtain the processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device is used to perform program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program.
[0085] The program upgrade result refers to the final status feedback information output by the remote device after it has reassembled all the processed upgrade data packets received into a complete target program in sequence, and completed the program burning, verification and operation verification. This includes program upgrade success and program upgrade failure.
[0086] For example, the local device takes the next upgrade data packet as the new current upgrade data packet and jumps to the step of encapsulating the current upgrade data packet according to a preset protocol to obtain a processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device performs packet-by-packet verification on each received processed upgrade data packet, for example, comparing the packet sequence number of each processed upgrade data packet with a pre-stored list of data packet sequence numbers. If it is confirmed that the processed upgrade data packet is a valid segment in the sequence and there is no duplicate reception or sequence number gap, it splices the processed upgrade data packets in order according to their packet sequence numbers to obtain a spliced upgrade data packet, which serves as the complete target program; then, the target program is written into the configuration storage unit of the FPGA for programming. After programming is completed, the remote device performs program initialization operations, restarts the FPGA configuration logic, loads the newly programmed target program, and performs a self-test on the core functional modules of the target program to obtain the self-test result of the target program, which serves as the program upgrade result of the target program.
[0087] In the aforementioned remote upgrade method for a field-programmable gate array (FPGA) program based on the Universal Public Radio Interface (UPRI) protocol, the system first responds to a program upgrade request sent by a host computer for the target program on a remote device by receiving the current upgrade data packet of the target program sent by the host computer. The distance between the remote device and the local device is greater than a preset distance. The target program refers to an FPGA program. Then, based on a preset protocol, the current upgrade data packet is format-encapsulated to obtain a processed upgrade data packet. The preset protocol refers to the UPR protocol. Next, the processed upgrade data packet is sent to the remote device. Then, upon receiving the response data corresponding to the processed upgrade data packet returned by the remote device, the response data is sent to the host computer. The host computer returns the next upgrade data packet corresponding to the current upgrade data packet based on the response data. Finally, the next upgrade data packet is used as the new current upgrade data packet, and the system jumps to the step of format-encapsulating the current upgrade data packet based on the preset protocol to obtain a processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program. The remote device performs program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program. In this way, during remote program upgrades, for long-distance transmission scenarios, the upgrade data packets sent by the host computer are encapsulated in a standardized format according to the common public radio interface protocol. Leveraging the protocol's standardized characteristics in long-distance, high-reliability wireless transmission, this avoids issues such as format corruption, data loss, or parsing errors during data packet transmission. A packet-by-packet confirmation mechanism is employed; after each encapsulated upgrade data packet is sent, the remote device must return the corresponding acknowledgment data before the next data packet transmission process is triggered. This mechanism accurately verifies whether each data packet is correctly received by the remote device. If a data packet transmission is abnormal, subsequent data packet transmission is suspended due to the lack of acknowledgment, preventing error accumulation and ensuring that all data packets are accurately received by the remote device and used for program upgrades. This improves the reliability and success rate of remote program upgrades. Furthermore, the entire process requires no manual intervention, avoiding the subjective factors and errors inherent in manual configuration and triggering methods that can lead to lower accuracy in remote program upgrades, further enhancing the accuracy of remote program upgrades.
[0088] In an exemplary embodiment, step S202 above, based on a preset protocol, performs format encapsulation processing on the current upgrade data packet to obtain a processed upgrade data packet. Specifically, it includes the following: determining an initial data frame that matches the preset protocol; mapping the current upgrade data packet to a preset time slot in the initial data frame according to the frame format corresponding to the preset protocol to obtain an updated data frame; obtaining the frame header corresponding to the updated data frame, and combining the frame header with the updated data frame to obtain a processed upgrade data packet.
[0089] The initial data frame refers to a blank data frame structure that perfectly matches the preset protocol format requirements and serves as the carrier for the current upgrade data packet.
[0090] Among them, frame format refers to the unified specification of the initial data frame structure, field length, time slot division, synchronization identifier, etc. by the preset protocol.
[0091] Among them, the preset time slot refers to the dedicated time slot that is pre-specified in all time slots of the initial data frame to carry the current upgrade data packet.
[0092] The updated data frame refers to the complete data frame that carries the current upgrade data packet after mapping the current upgrade data packet to the preset time slot of the initial data frame.
[0093] The frame header refers to the control information segment attached to the header of the updated data frame based on a preset protocol. It includes key control fields such as frame synchronization identifier, frame sequence number, protocol version number, and time slot occupancy identifier.
[0094] For example, the local device queries the correspondence between the protocol and frame structure configuration parameters based on a preset protocol to obtain the frame structure configuration parameters corresponding to the preset protocol (including frame length, total number of time slots, time slot bandwidth, synchronization code position, etc.); then, according to the frame structure configuration parameters corresponding to the preset protocol, it generates an initial data frame that matches the preset protocol; then, it extracts the configuration information of the preset time slot (such as time slot number, time slot start position, time slot capacity) from the frame format corresponding to the preset protocol, and extracts the time slot capacity of the preset time slot from the configuration information of the preset time slot; then, it performs length adaptation processing on the current upgrade data packet to obtain the adapted current upgrade data packet; for example, if the data packet length of the current upgrade data packet is greater than the time slot capacity of the preset time slot, it is segmented according to the time slot bandwidth of the preset time slot to obtain the adapted current upgrade data packet; if the data packet length is less than... If the time slot capacity is within the preset time slot limit, then the end of the current upgrade data packet is padded with padding codes specified by the preset protocol to ensure that the data length is consistent with the preset time slot capacity, resulting in the adapted current upgrade data packet. If the data packet length is equal to the preset time slot capacity, the current upgrade data packet is used as the adapted current upgrade data packet. Then, according to the frame format corresponding to the preset protocol, the adapted current upgrade data packet is mapped to the preset time slot in the initial data frame, while the remaining non-preset time slots are kept in an idle code padded state, resulting in the updated data frame carrying upgrade data. Next, based on the frame header format requirements of the preset protocol, a frame header corresponding to the updated data frame is generated, and the frame header and the updated data frame are combined according to the frame structure order specified by the preset protocol (for example, the generated protocol-compliant frame header is appended to the header of the updated data frame) to obtain the processed upgrade data packet.
[0095] In this embodiment, by constructing a standardized data transmission carrier based on a preset protocol, the upgrade data packets are mapped to a dedicated time slot and combined with a protocol-compliant frame header, ensuring the compatibility of the upgrade data transmission with the preset protocol, avoiding conflicts with other service data in the link, significantly reducing the risk of data unpacking misalignment, and realizing efficient and orderly transmission of upgrade data packets in long-distance optical fiber links.
[0096] In an exemplary embodiment, step S201, before receiving the current upgrade data packet of the target program sent by the host computer in response to the program upgrade request for the target program of the remote device, specifically includes the following: receiving the program version query request for the target program of the remote device sent by the host computer, and sending the program version query request to the remote device, so that the remote device returns the program version information of the target program of the remote device according to the program version query request; sending the program version information to the host computer; the host computer is also used to return the program upgrade request for the target program of the remote device when it detects that the program version information is inconsistent with the preset program version information.
[0097] Among them, the program version query request refers to the request used to obtain the version status of the target program currently loaded on the remote device.
[0098] Among them, program version information refers to the version attribute data of the target program currently running on the remote device, such as the program version number of the target program on the remote device.
[0099] Among them, the preset program version information refers to the latest version attribute data of the target program pre-stored by the host computer, such as the latest program version number of the target program.
[0100] For example, the local device receives a program version query request for the target program of the remote device from the host computer via a communication link. If the remote device identifier in the program version query request is detected to exist in the pre-stored list of target remote devices, the local device sends the program version query request to the remote device via the fiber optic link. The remote device retrieves the program version information of the target program of the remote device stored in the local configuration unit according to the program version query request and returns the program version information to the local device. Then, the local device sends the program version information to the host computer. If the host computer detects that the program version information is inconsistent with the preset program version information, it returns a program upgrade request for the target program of the remote device. If the host computer detects that the program version information is consistent with the preset program version information, it determines that the current program of the remote device is the latest version and does not need to be upgraded. The host computer records the version comparison result and terminates the process.
[0101] In this embodiment, the pre-processed program version query and comparison mechanism enables accurate verification of the target program version status of remote devices, avoiding repeated upgrade processes for remote devices that have already loaded the latest version of the program. This significantly reduces the occupation of fiber optic link bandwidth and consumption of equipment resources by invalid data transmission, and improves the targeting and overall efficiency of program upgrades.
[0102] In an exemplary embodiment, the method further includes: if no response data corresponding to the processed upgrade data packet is received from the remote device, resending the processed upgrade data packet to the remote device.
[0103] For example, if the local device does not receive the response data corresponding to the processed upgrade data packet returned by the remote device, or if the CRC check result in the response data indicates that the processed upgrade data packet verification fails, the local device will retrieve the processed upgrade data packet that has not received a valid response data stored in the cache, and resend the processed upgrade data packet to the remote device according to the same link transmission rules and protocol format as the previous transmission.
[0104] In this embodiment, the retransmission mechanism of the upgraded data packets after processing can effectively cope with abnormal situations such as data packet loss and transmission timeout that may occur during long-distance fiber optic link transmission, avoid interruption of the upgrade process due to a single transmission failure, ensure the continuity and reliability of the target program's batch upgrade process, and improve the success rate of remote device program upgrades.
[0105] In an exemplary embodiment, the method further includes: obtaining the number of retransmissions corresponding to the processed upgrade data packet; generating program upgrade failure information corresponding to the target program if the number of retransmissions exceeds the preset number of retransmissions; and sending the program upgrade failure information to the host computer.
[0106] The number of retransmissions refers to the cumulative number of times the local device performs repeated retransmission operations for the processed upgrade data packet.
[0107] The preset resend count refers to the number of resends set in advance. It should be noted that the preset resend count depends on the situation.
[0108] Among them, the program upgrade failure information refers to the abnormal status feedback data generated by the local device for the target program, which includes the device identifier of the remote device, the packet sequence number of the processed upgrade data packet, the number of resends, and other information.
[0109] For example, the local device extracts the retransmission count corresponding to the processed upgrade data packet from the retransmission count statistics cache table; then, it judges the retransmission count based on the preset retransmission count; if the retransmission count is greater than the preset retransmission count, it combines the device identifier of the remote device, the packet sequence number of the processed upgrade data packet, and the retransmission count to obtain the program upgrade failure information corresponding to the target program; then, it sends the program upgrade failure information to the host computer through the communication link with the host computer.
[0110] It should be noted that the preset number of retransmissions can be determined as follows: obtain the historical packet loss rate and transmission delay time of the fiber optic link with the remote device, extract the feature vectors of the historical packet loss rate and the transmission delay time, and concatenate the feature vectors of the historical packet loss rate and the transmission delay time to obtain the concatenated feature vector; then, input the concatenated feature vector into the trained retransmission number prediction model to obtain the predicted number of retransmissions for the fiber optic link, which is used as the preset number of retransmissions.
[0111] In this embodiment, by setting a threshold for the number of retransmissions and determining if the limit is exceeded, the unlimited retransmission of the same processed upgrade data packet can be avoided, reducing invalid link occupation and device computing resource consumption. This provides an accurate basis for subsequent fault diagnosis, link optimization, or upgrade process retry, ensuring the controllability of the upgrade process and operational efficiency.
[0112] In one exemplary embodiment, the local device has a built-in first high-speed serial transceiver interface, and the remote device has a built-in second high-speed serial transceiver interface; the first high-speed serial transceiver interface and the second high-speed serial transceiver interface are connected by optical fiber.
[0113] Therefore, step S203 above, which involves sending the processed upgrade data packet to the remote device, specifically includes the following: sending the processed upgrade data packet to the remote device through the first high-speed serial transceiver interface and the second high-speed serial transceiver interface.
[0114] The first high-speed serial transceiver interface refers to the high-speed serial transceiver interface built into the local device.
[0115] The high-speed serial transceiver interface is also known as the GT (Gigabit Transceiver) interface.
[0116] The second high-speed serial transceiver interface refers to the high-speed serial transceiver interface built into the remote device.
[0117] For example, the local device transmits the processed upgrade data packet to the serial-to-parallel conversion module of the first high-speed serial transceiver interface. The serial-to-parallel conversion module converts the processed upgrade data packet into a high-speed serial data stream according to a preset serialization clock frequency. Then, the high-speed serial data stream is encoded by the encoding module of the first high-speed serial transceiver interface, and the encoded electrical signal serial data stream is converted into an optical signal. It is injected into the optical fiber link according to a preset optical power threshold (such as -3dBm~0dBm), so that the optical signal is transmitted over a long distance through the optical fiber to the remote device. The optical signal transmitted through the optical fiber is restored to an electrical signal serial data stream by the photoelectric conversion module of the second high-speed serial transceiver interface of the remote device. Then, the electrical signal serial data stream is decoded by the decoding module to obtain a serial data frame. Finally, the serial data is converted into a parallel format processed upgrade data packet by the parallel-to-serial conversion module.
[0118] In this embodiment, a direct fiber optic connection architecture between the first high-speed serial transceiver interface and the second high-speed serial transceiver interface enables high-speed, low-latency, and interference-resistant transmission of the processed upgrade data packets. This avoids the bandwidth contention problem of traditional Ethernet and other shared links, ensuring the timeliness and stability of upgrade data transmission.
[0119] In one exemplary embodiment, such as Figure 3 As shown, another method for remotely upgrading field-programmable gate arrays (FPGAs) based on the Common Public Radio Interface (CPI) protocol is provided, which can be applied to... Figure 1 Taking a local device as an example, the specific steps include:
[0120] Step S301: Receive the program version query request for the target program of the remote device sent by the host computer, and send the program version query request to the remote device so that the remote device returns the program version information of the target program of the remote device according to the program version query request.
[0121] Step S302: Send the program version information to the host computer; the host computer is also used to return a program upgrade request for the target program on the remote device when it detects that the program version information is inconsistent with the preset program version information.
[0122] Step S303: In response to the program upgrade request for the target program of the remote device sent by the host computer, receive the current upgrade data packet of the target program sent by the host computer; the distance between the remote device and the local device is greater than a preset distance; the target program refers to a field-programmable gate array program.
[0123] Step S304: Determine the initial data frame that matches the preset protocol; the preset protocol refers to the General Public Radio Interface Protocol.
[0124] Step S305: According to the frame format corresponding to the preset protocol, the current upgrade data packet is mapped to the preset time slot in the initial data frame to obtain the updated data frame.
[0125] Step S306: Obtain the frame header corresponding to the updated data frame, and combine the frame header with the updated data frame to obtain the processed upgrade data packet.
[0126] Step S307: Send the processed upgrade data packet to the remote device.
[0127] Step S308: Upon receiving the response data corresponding to the processed upgrade data packet returned by the remote device, the response data is sent to the host computer; the host computer is used to return the next upgrade data packet corresponding to the current upgrade data packet based on the response data.
[0128] Step S309: The next upgrade data packet is taken as the new current upgrade data packet, and the process jumps to the step of encapsulating the current upgrade data packet according to the preset protocol to obtain the processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device is used to perform program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program.
[0129] In the aforementioned remote programmable gate array (FPGA) program upgrade method based on the Common Public Radio Interface (CRI) protocol, during remote program upgrades, for long-distance transmission scenarios, the upgrade data packets sent by the host computer are encapsulated in a standardized format according to the CRI protocol. Leveraging the protocol's standardized characteristics in long-distance, high-reliability wireless transmission, this method avoids issues such as format corruption, data loss, or parsing errors during data packet transmission. A packet-by-packet confirmation mechanism is employed; after each encapsulated upgrade data packet is sent, the system waits for the remote device to return the corresponding acknowledgment data before triggering the transmission of the next data packet. This mechanism accurately verifies whether each data packet is correctly received by the remote device. If a data packet transmission is abnormal, subsequent data packet transmission is suspended due to the lack of acknowledgment, preventing error accumulation and ensuring that all data packets are accurately received by the remote device for program upgrades. This improves the reliability and success rate of remote program upgrades. Furthermore, the entire process requires no manual intervention, avoiding the subjective factors and errors inherent in manual configuration and triggering methods that can lead to lower accuracy in remote program upgrades. This further enhances the accuracy of remote program upgrades.
[0130] In an exemplary embodiment, to more clearly illustrate the remote upgrade method for field-programmable gate arrays (FPGAs) based on the Common Public Radio Interface (CPRI) protocol provided in this application, the following specific embodiment will be used to describe this method in detail. In one embodiment, this application also provides a remote FPGA upgrade method based on the CPRI protocol. Specifically, it includes the following:
[0131] The entire remote upgrade system comprises three main components: a host computer, a local server rack, and remote network-connected equipment. The host computer is connected to the FPGA board in the local server rack via a network cable, and the FPGA board in the local server rack is connected to the FPGA board to be upgraded in the remote network-connected equipment via fiber optic cable. The specific connection relationships are as follows: Figure 4 As shown, both the local FPGA and the remote FPGA need to be chips with GT interfaces. Each FPGA at both ends contains 4 GT interfaces, which can be used for fiber optic remote connections.
[0132] First step: Arrange the above three main entities according to... Figure 4 Once the connection is established, all devices are powered on.
[0133] The host computer runs the console software, which is responsible for querying and obtaining the working status of the local cabinet and remote devices, judging the format of the FPGA target file to be upgraded, splitting and reassembling packets, adding CRC checks, and sending and receiving data packets.
[0134] The FPGA board in the local cabinet acts as a bidirectional gateway, requiring it to handle data flows in both directions simultaneously.
[0135] For the host computer, it needs to parse various commands from the host computer, including query and upgrade commands. At the same time, after receiving the relevant commands, it should respond to the host computer immediately and ensure smooth communication through a handshake mechanism. In addition, the local FPGA needs to frame the received upgrade data packets according to the CPRI protocol and send them to the remote device.
[0136] For remote devices, it needs to feed back information such as the working status and version of the remote device to the host computer, as well as transparently transmit normal business data of the remote device.
[0137] The remote device's FPGA performs the following functions: extracts upgrade data from CPRI frames and stores it in the receive buffer. After receiving and verifying a data packet, it initiates the Flash write process. Using MultiBoot technology, the upgrade file is written to the specified address of the Flash (the storage address of the updated image) via the SPI (Serial Peripheral Interface) interface.
[0138] Specific functions are as follows Figure 5 As shown.
[0139] Step 2: Connect to the local FPGA via the host computer console. Once successful, proceed to the upgrade steps.
[0140] Step 3: Check the remote FPGA version to confirm the correctness of the target file to be upgraded;
[0141] Step 4: Select the target file to be upgraded, click Upgrade, and the flowchart of the host computer upgrade control is as follows. Figure 6 As shown;
[0142] After sending the upgrade command, the host computer confirms that the remote FPGA is ready and then begins sending data packets in segments. Each time a data packet is sent, a corresponding acknowledgment is received before sending the next packet, continuing until all packets are sent. If no acknowledgment is received midway, retransmission is initiated. If no acknowledgment is received after a certain number of retransmissions, the upgrade fails.
[0143] At this time, after receiving the data packet, the local FPGA maps the data packet buffered in the FIFO (First In First Out) to the third time slot according to the frame format of the CPRI protocol and sends it to the remote FPGA. At the same time, it receives the status data fed back by the remote FPGA in the fourth time slot.
[0144] After receiving the upgrade command, the remote FPGA first erases the fixed address segment of the Flash memory. Upon completion, it sends an ACK (Acknowledgement) signal prepared by the host computer. Corresponding to the local FPGA's CPRI protocol frame, the remote FPGA receives and buffers data in the third time slot of the CPRI protocol frame. After receiving a complete data packet, it performs a CRC check. If the CRC check passes, it buffers the next received data into another FIFO using a ping-pong method. Simultaneously, it sends a CRC check success acknowledgment signal in the fourth time slot of the CPRI protocol frame. Furthermore, the FPGA writes the correctly verified data to the fixed address 0x10000000 in the Flash memory via SPI.
[0145] The CPRI protocol transmit and receive frame formats for the two FPGAs are as follows: Figure 7 , Figure 8 As shown;
[0146] Step 5: After the upgrade is complete, power on the remote device again and check the upgraded FPGA version information on the host computer to confirm whether the upgrade was successful.
[0147] This solution, based on the CPRI protocol, sends upgrade data packets to remote network-connected devices via fiber optic cable. Simultaneously, it upgrades FPGAs using the Multiboot method, enabling secure and reliable FPGA upgrades at the kilometer level. This reduces FPGA failures caused by transmission failures and eliminates the hassle of on-site FPGA upgrades.
[0148] In the above embodiments, during remote program upgrades, for long-distance transmission scenarios, the upgrade data packets sent by the host computer are encapsulated in a standardized format according to the Common Public Radio Interface Protocol (CPR). Leveraging the protocol's standardized characteristics in long-distance, high-reliability wireless transmission, this avoids issues such as format corruption, data loss, or parsing errors during data packet transmission. A packet-by-packet confirmation mechanism is employed; after each encapsulated upgrade data packet is sent, the remote device must return the corresponding acknowledgment data before the next data packet transmission process is triggered. This mechanism accurately verifies whether each data packet is correctly received by the remote device. If a data packet transmission is abnormal, subsequent data packet transmission is suspended due to the lack of acknowledgment, preventing error accumulation and ensuring that all data packets are accurately received by the remote device for program upgrades. This improves the reliability and success rate of remote program upgrades. Furthermore, the entire process requires no manual intervention, avoiding the subjective factors and errors inherent in manual configuration and triggering methods, which can lead to lower accuracy in remote program upgrades. This further enhances the accuracy of remote program upgrades. Meanwhile, the remote network-connected equipment and the local equipment are connected via optical fiber, and the FPGAs communicate with each other via a high-speed serial interface based on the CPRI protocol. Under the premise of establishing an optical fiber link, upgrade data packets are sent in the user's time slot, which ensures the success rate of long-distance transmission of upgrade data packets. In the case of the remote FPGA adopting the Multiboot upgrade method, the risk of FPGA long-distance upgrade failure is ultimately avoided.
[0149] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0150] Based on the same inventive concept, this application also provides a remote upgrade device for a field-programmable gate array (FPGA) program based on the Universal Public Radio Interface (UPRI) protocol, for implementing the aforementioned remote upgrade method for FPGA programs based on the UPR protocol. The solution provided by this device is similar to the implementation described in the above method. Therefore, the specific limitations of the one or more remote upgrade device embodiments for FPGA programs based on the UPR protocol provided below can be found in the limitations of the remote upgrade method for FPGA programs based on the UPR protocol described above, and will not be repeated here.
[0151] In one exemplary embodiment, such as Figure 9 As shown, a field-programmable gate array (FPGA) remote upgrade device based on a common public radio interface protocol is provided, comprising: a data packet receiving module 901, a data packet encapsulation module 902, a data packet sending module 903, an acknowledgment data sending module 904, and a data packet processing module 905, wherein:
[0152] The data packet receiving module 901 is used to respond to a program upgrade request sent by the host computer for the target program of the remote device, and to receive the current upgrade data packet of the target program sent by the host computer; the distance between the remote device and the local device is greater than a preset distance; the target program refers to a field-programmable gate array program.
[0153] The data packet encapsulation module 902 is used to encapsulate the current upgrade data packet according to a preset protocol to obtain the processed upgrade data packet; the preset protocol refers to the General Public Radio Interface Protocol.
[0154] The data packet sending module 903 is used to send the processed upgrade data packet to the remote device.
[0155] The response data sending module 904 is used to send the response data to the host computer when it receives the response data corresponding to the processed upgrade data packet returned by the remote device; the host computer is used to return the next upgrade data packet corresponding to the current upgrade data packet based on the response data.
[0156] The data packet processing module 905 is used to take the next upgrade data packet as the new current upgrade data packet and jump to the step of encapsulating the current upgrade data packet according to the preset protocol to obtain the processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device is used to perform program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program.
[0157] In an exemplary embodiment, the data packet encapsulation module 902 is further configured to determine an initial data frame that matches a preset protocol; map the current upgrade data packet to a preset time slot in the initial data frame according to the frame format corresponding to the preset protocol to obtain an updated data frame; obtain the frame header corresponding to the updated data frame, and combine the frame header with the updated data frame to obtain a processed upgrade data packet.
[0158] In an exemplary embodiment, the field-programmable gate array (FPGA) remote upgrade device based on the Common Public Radio Interface (CPI) further includes a version information sending module, which is used to receive a program version query request for a target program of a remote device sent by a host computer, and send the program version query request to the remote device, so that the remote device returns the program version information of the target program of the remote device according to the program version query request; and sends the program version information to the host computer; the host computer is also used to return a program upgrade request for the target program of the remote device when it detects that the program version information is inconsistent with the preset program version information.
[0159] In one exemplary embodiment, the field-programmable gate array (FPGA) remote upgrade device based on the Common Public Radio Interface (CPI) further includes a data packet retransmission module, which is used to retransmit the processed upgrade data packet to the remote device if no response data corresponding to the processed upgrade data packet is received from the remote device.
[0160] In an exemplary embodiment, the field-programmable gate array (FPGA) remote upgrade device based on the Common Public Radio Interface (CRI) protocol further includes a failure information transmission module, which is used to obtain the number of retransmissions corresponding to the processed upgrade data packet; if the number of retransmissions is greater than the preset number of retransmissions, generate program upgrade failure information corresponding to the target program; and send the program upgrade failure information to the host computer.
[0161] In one exemplary embodiment, the data packet sending module 903 is further configured to send the processed upgrade data packet to a remote device via a first high-speed serial transceiver interface and a second high-speed serial transceiver interface.
[0162] The modules in the aforementioned field-programmable gate array (FPGA) remote upgrade device based on the General Public Radio Interface (GPRS) protocol can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0163] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores current upgrade data packets, response data, etc. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a remote upgrade method based on a field-programmable gate array (FPGA) protocol.
[0164] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0165] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0166] In one exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above-described method embodiments.
[0167] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0168] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this 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), magnetic 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0169] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0170] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for remotely upgrading a field-programmable gate array (FPGA) program based on a common public radio interface protocol, characterized in that, Applied to a local device, the method includes: In response to a program upgrade request for a target program on a remote device sent by a host computer, the system receives a current upgrade data packet for the target program sent by the host computer; the distance between the remote device and the local device is greater than a preset distance; the target program refers to a field-programmable gate array (FPGA) program. Based on a preset protocol, the current upgrade data packet is encapsulated to obtain a processed upgrade data packet; the preset protocol refers to the General Public Radio Interface Protocol. The processed upgrade data packet is sent to the remote device; Upon receiving the response data corresponding to the processed upgrade data packet returned by the remote device, the response data is sent to the host computer; the host computer is used to return the next upgrade data packet corresponding to the current upgrade data packet based on the response data; The next upgrade data packet is used as the new current upgrade data packet, and the process jumps to the step of encapsulating the current upgrade data packet according to a preset protocol to obtain a processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device is used to perform program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program.
2. The method according to claim 1, characterized in that, The process of encapsulating the current upgrade data packet based on a preset protocol to obtain a processed upgrade data packet includes: Identify the initial data frame that matches the preset protocol; According to the frame format corresponding to the preset protocol, the current upgrade data packet is mapped to the preset time slot in the initial data frame to obtain the updated data frame; Obtain the frame header corresponding to the updated data frame, and combine the frame header with the updated data frame to obtain the processed upgrade data packet.
3. The method according to claim 1, characterized in that, Before receiving the current upgrade data packet of the target program sent by the host computer in response to a program upgrade request for the target program on the remote device, the method further includes: The system receives a program version query request for a target program on a remote device from the host computer, and sends the program version query request to the remote device, so that the remote device returns the program version information of the target program based on the program version query request. The program version information is sent to the host computer; the host computer is also used to return a program upgrade request for the target program of the remote device when it detects that the program version information is inconsistent with the preset program version information.
4. The method according to claim 1, characterized in that, The method further includes: If no response data corresponding to the processed upgrade data packet is received from the remote device, the processed upgrade data packet is resent to the remote device.
5. The method according to claim 4, characterized in that, The method further includes: Obtain the number of retransmissions corresponding to the processed upgrade data packet; If the number of resends exceeds the preset number of resends, a program upgrade failure message corresponding to the target program is generated; The program upgrade failure information is sent to the host computer.
6. The method according to any one of claims 1 to 5, characterized in that, The local device has a built-in first high-speed serial transceiver interface, and the remote device has a built-in second high-speed serial transceiver interface; the first high-speed serial transceiver interface and the second high-speed serial transceiver interface are connected by optical fiber. Sending the processed upgrade data packet to the remote device includes: The processed upgrade data packet is sent to the remote device through the first high-speed serial transceiver interface and the second high-speed serial transceiver interface.
7. A remote programmable gate array (FPGA) upgrade device based on a common public radio interface protocol, characterized in that, Applied to a local device, the device includes: The data packet receiving module is used to respond to a program upgrade request sent by a host computer for a target program on a remote device, and to receive the current upgrade data packet of the target program sent by the host computer; the distance between the remote device and the local device is greater than a preset distance; the target program refers to a field-programmable gate array program; The data packet encapsulation module is used to encapsulate the current upgrade data packet according to a preset protocol to obtain a processed upgrade data packet; the preset protocol refers to the General Public Radio Interface Protocol. A data packet sending module is used to send the processed upgrade data packet to the remote device; The response data sending module is used to send the response data to the host computer when it receives the response data corresponding to the processed upgrade data packet returned by the remote device; the host computer is used to return the next upgrade data packet corresponding to the current upgrade data packet based on the response data; The data packet processing module is used to take the next upgrade data packet as the new current upgrade data packet and jump to the step of encapsulating the current upgrade data packet according to a preset protocol to obtain a processed upgrade data packet, until the next upgrade data packet is the last upgrade data packet of the target program; the remote device is used to perform program upgrade processing on the target program according to each received processed upgrade data packet to obtain the program upgrade result of the target program.
8. 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, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.