Remote FPGA firmware programming device and method based on Ethernet
By designing a remote FPGA firmware burning device and method based on Ethernet, and using the main control module to simulate JTAG programming, the problem of lack of burner update firmware on the spot of FPGA equipment is solved, and the remote burning of FPGA firmware is realized, improving the flexibility and convenience of burning.
Patent Information
- Application Number
- CN202411867302.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-18
AI Technical Summary
In the use of FPGA equipment, the lack of a dedicated writer connection program update environment makes it very difficult and affects work efficiency when there is a problem with the device or the FPGA firmware needs to be updated.
Design a remote FPGA firmware writing device and method based on Ethernet, use the upper computer, FPGA module, main control module and firmware storage FLASH, realize TCP network communication through the Ethernet chip, download and save the firmware, and use the main control module to simulate JTAG programming to complete the remote FPGA firmware writing.
It realizes Ethernet remote writing of FPGA firmware, improves the flexibility and convenience of FPGA firmware writing, and facilitates remote program updates and upgrades of FPGA devices. It is suitable for large-scale application and post-maintenance of FPGA devices.
Smart Images

Figure CN119847542A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of FPGA firmware burning and writing, and in particular to an Ethernet-based remote FPGA firmware burning and writing device and method. Background Art
[0002] FPGA chips have the advantages of reprogrammability, high flexibility, high speed and low cost, and are widely used in fields with high requirements for system real-time and reliability.
[0003] During the debugging and development of FPGA products, the JTAG interface is usually used to burn the FPGA firmware. FPGA manufacturers will provide a complete burning tool kit and guidance documents, and users will follow the guidance documents to design circuits related to program storage and external interconnection interfaces. When burning the firmware, connect the host computer burning tool and the hardware onboard FPGA through the USB-JTAG download cable to burn the firmware to the program memory. After the equipment is put into mass production, the equipment site usually does not have an environment for connecting to the dedicated burner to update the program. When there is a problem with the equipment or the FPGA firmware needs to be updated, it will be very difficult, affecting work efficiency.
[0004] Therefore, how to remotely upgrade and update the FPGA firmware via Ethernet in the condition of being far away from the industrial site is a problem that the technicians in this field need to solve urgently. To this end, we propose a remote FPGA firmware burning device and method based on Ethernet. Summary of the invention
[0005] Based on the technical problems existing in the background technology, the present invention proposes a remote FPGA firmware burning device and method based on Ethernet, which has the characteristics of realizing remote burning of FPGA firmware over Ethernet, and solves the problem that the equipment use site usually does not have an environment with a dedicated burner to connect the program update, which makes it very difficult when the equipment has problems or the FPGA firmware needs to be updated, affecting work efficiency.
[0006] The present invention provides the following technical solutions:
[0007] An Ethernet-based remote FPGA firmware burning device, comprising a host computer, an FPGA module, a main control module and a firmware storage FLASH;
[0008] The FPGA module is connected to the main control module via a serial port, and is connected to the firmware storage FLASH via an SPI interface;
[0009] The main control module controls the FPGA module through the serial port and is connected to the firmware storage FLASH through the SPI interface, and the main control module has its own flash inside;
[0010] The firmware storage FLASH is used for data storage and is connected to the main control module and the FPGA module through the SPI interface.
[0011] Preferably, the main control module includes an FPGA module for completing the system control function, a FLASH module and an SDRAM module for completing the storage function, and a physical layer chip for realizing the network communication function.
[0012] Preferably, the main control module adopts an MCU chip or a SOC chip.
[0013] A method for remotely programming FPGA firmware based on Ethernet includes the following steps:
[0014] S1. The host computer and the FPGA module complete TCP network communication through the Ethernet chip. The firmware to be burned is downloaded to the FPGA module through this network. After receiving the firmware, the FPGA module directly forwards it to the main control module through the UART serial port;
[0015] S2, the main control module saves all the firmware in the on-chip flash until all the firmware is received;
[0016] S3. After the main control module receives all the firmware, the main control module controls the FPGA module to stop running, releases the SPI communication interface between the FPGA module and the firmware storage FLASH, and hands it over to the main control module for processing;
[0017] S4, the main control module writes the received firmware into the firmware storage FLASH through the SPI communication interface, that is, the main control module simulates the process of JTAG programming the external FLASH of the FPGA module;
[0018] S5. After the firmware is completely written into the firmware storage FLASH, the FPGA module is rebooted to load the firmware from the firmware storage FLASH, completing the Ethernet-based FPGA firmware remote burning.
[0019] Preferably, the host computer is used to send FPGA firmware; the FPGA module is connected to the main control module via a serial port, and is connected to the firmware storage FLASH via an SPI interface.
[0020] Preferably, the main control module adopts an MCU chip or a SOC chip. The main control module controls the FPGA module through a serial port and is connected to the firmware storage FLASH through an SPI interface. The main control module has its own flash.
[0021] Preferably, the firmware storage FLASH is used for data storage and is connected to the main control module and the FPGA module via an SPI interface.
[0022] Preferably, the main control module is connected to Ethernet, and the main control module and multiple FPGA module devices are interconnected through JTAG pins to form a JTAG daisy chain.
[0023] Preferably, the main control module further includes an SDRAM module, and the SDRAM module is used to cooperate with the Ethernet physical layer chip to store high-speed network data to achieve transmission and storage of Ethernet data.
[0024] Preferably, the FLASH module is used to store the startup program and configuration file of the FPGA module.
[0025] The present invention provides an Ethernet-based remote FPGA firmware burning device and method, which can realize Ethernet remote burning of FPGA firmware, and can be effectively applied to application scenarios such as FPGA remote program update and upgrade, greatly improving the flexibility and convenience of FPGA firmware burning, which is conducive to large-scale application and later maintenance of FPGA equipment.
[0026] FPGA is a volatile chip when power is off. To overcome this problem, the FPGA startup program is pre-programmed into FLASH using a programming tool, and the configuration mode is set to BPI-UP mode. This allows the FPGA to start autonomously after the system is powered on, making up for the problem caused by volatility. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a schematic diagram of the Ethernet-based remote FPGA firmware burning device of the present invention.
[0028] Figure 2 This is a flow chart of the remote FPGA firmware burning based on Ethernet in the present invention. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] The present invention provides a technical solution:
[0031] like Figure 1As shown, a remote FPGA firmware burning device based on Ethernet includes a host computer, an FPGA module, a main control module and a firmware storage FLASH; the main control module adopts an MCU chip or a SOC chip. The main control module includes an FPGA module that completes the system control function, a FLASH module and an SDRAM module that complete the storage function, and a physical layer chip that realizes the network communication function.
[0032] The FPGA module is connected to the main control module through the serial port, and is connected to the firmware storage FLASH through the SPI interface; the main control module controls the FPGA module through the serial port, and is connected to the firmware storage FLASH through the SPI interface, and the main control module has its own flash; the firmware storage FLASH is used for data storage, and is connected to the main control module and the FPGA module through the SPI interface.
[0033] Embodiment 1:
[0034] like Figure 2 As shown, a method for remotely programming FPGA firmware based on Ethernet includes the following steps:
[0035] S1. The host computer and the FPGA module complete TCP network communication through the Ethernet chip. The firmware to be burned is downloaded to the FPGA module through this network. After receiving the firmware, the FPGA module directly forwards it to the main control module through the UART serial port; the host computer is used to send the FPGA firmware; the FPGA module is the main body of the device, connected to the main control module through the serial port, and connected to the firmware storage FLASH through the SPI interface.
[0036] S2. The main control module saves all the firmware in the on-chip flash until all the firmware is received. The main control module uses an MCU chip or a SOC chip. The main control module controls the FPGA module through the serial port and is connected to the firmware storage FLASH through the SPI interface. The main control module has its own flash.
[0037] S3. After the main control module receives all the firmware, the main control module controls the FPGA module to stop running, releases the SPI communication interface between the FPGA module and the firmware storage FLASH, and hands it over to the main control module for processing; the firmware storage FLASH is used for data storage and is connected to the main control module and the FPGA module through the SPI interface.
[0038] S4, the main control module writes the received firmware into the firmware storage FLASH through the SPI communication interface, that is, the main control module simulates the process of JTAG programming the external FLASH of the FPGA module;
[0039] S5. After the firmware is completely written into the firmware storage FLASH, the FPGA module is rebooted to load the firmware from the firmware storage FLASH, completing the Ethernet-based FPGA firmware remote burning.
[0040] The Ethernet-based remote FPGA firmware burning device and method of the present invention can realize Ethernet remote burning of FPGA firmware, which can be effectively applied to application scenarios such as FPGA remote program update and upgrade, greatly improving the flexibility and convenience of FPGA firmware burning, and is conducive to large-scale application and later maintenance of FPGA equipment.
[0041] Embodiment 2:
[0042] A method for remotely programming FPGA firmware based on Ethernet includes the following steps:
[0043] S1. The host computer and the FPGA module complete TCP network communication through the Ethernet chip. The firmware to be burned is downloaded to the FPGA module through this network. After receiving the firmware, the FPGA module directly forwards it to the main control module through the UART serial port; the host computer is used to send the FPGA firmware; the FPGA module is the main body of the device, connected to the main control module through the serial port, and connected to the firmware storage FLASH through the SPI interface.
[0044] S2. The main control module saves all the firmware in the on-chip flash until all the firmware is received. The main control module uses an MCU chip or a SOC chip. The main control module controls the FPGA module through the serial port and is connected to the firmware storage FLASH through the SPI interface. The main control module has its own flash.
[0045] S3. After the main control module receives all the firmware, the main control module controls the FPGA module to stop running, releases the SPI communication interface between the FPGA module and the firmware storage FLASH, and hands it over to the main control module for processing; the firmware storage FLASH is used for data storage and is connected to the main control module and the FPGA module through the SPI interface.
[0046] S4, the main control module writes the received firmware into the firmware storage FLASH through the SPI communication interface, that is, the main control module simulates the process of JTAG programming the external FLASH of the FPGA module;
[0047] S5. After the firmware is completely written into the firmware storage FLASH, the FPGA module is rebooted to load the firmware from the firmware storage FLASH, completing the Ethernet-based FPGA firmware remote burning.
[0048] This solution sets up a main control module, which has a network communication function and can communicate with any PC connected to the network through Ethernet. In this way, users can send and receive data on the main control module on any PC in the network. The main control module puts the received configuration data into the memory Flash, then simulates the JTAG timing to scan the JTAG chain connected to the main control module, and selectively passes the configuration data stored in the Flash to the FPGA device in the JTAG chain to complete the firmware update of the FPGA device. The storage chip Flash on the main control module stores the configuration information for starting Ethernet, and the BPI mode is used to enable the processor chip FPGA in the main control module to automatically load the configuration information in the Flash when it is powered on. In this way, in special environments, the Ethernet communication function can be automatically started without manual operation. In the application process, the remote configuration main control module is connected to the Ethernet, and the remote configuration main control module is interconnected with multiple FPGA devices through JTAG pins to form a JTAG daisy chain. Users can remotely update the firmware of the FPGA in the daisy chain through any PC connected to the Ethernet.
[0049] The FLASH and SDRAM in the main control module are storage modules. SDRAM cooperates with the Ethernet physical layer chip to store high-speed network data and realize the transmission and storage of Ethernet data. The FLASH module is used to store the FPGA startup program and configuration file. FPGA is a volatile chip that loses power. In order to overcome this problem, the FPGA startup program is pre-burned into the FLASH through the burning tool in the design, and the configuration mode is set to BPI-UP mode, so that the FPGA can start autonomously after the system is powered on, making up for the problem caused by volatility.
[0050] The workflow is that when the system is powered on, the main control module realizes the autonomous startup of FPGA through the BPI-UP configuration mode. After the FPGA is started, the Ethernet controller (EMAC) in the FPGA controls the external Ethernet physical layer chip and receives the configuration data using the TCP protocol. The SDRAM controller in the FPGA controls the external SDRAM chip and stores the received configuration data in the SDRAM chip. When all the configuration data are received, the external memory controller (EMC) in the processor writes the received configuration data into the FLASH. This part completes the system's data reception and storage functions. Then the FPGA reads the data through the EMC, and forms a JTAG chain with the chip of the configured module by simulating the timing of TCK, TMS, TDI, and TDO, and transmits the configuration data to the configured chip, thus completing the remote firmware update of the configured module.
[0051] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A remote FPGA firmware burning device based on Ethernet, characterized in that: Including host computer, FPGA module, main control module and firmware storage FLASH; The FPGA module is connected to the main control module via a serial port, and is connected to the firmware storage FLASH via an SPI interface; The main control module controls the FPGA module through the serial port and is connected to the firmware storage FLASH through the SPI interface, and the main control module has its own flash inside; The firmware storage FLASH is used for data storage and is connected to the main control module and the FPGA module through the SPI interface.
2. The Ethernet-based remote FPGA firmware burning device according to claim 1, characterized in that: The main control module includes an FPGA module for completing the system control function, a FLASH module and an SDRAM module for completing the storage function, and a physical layer chip for realizing the network communication function.
3. The device for remotely writing FPGA firmware based on Ethernet according to claim 1 or 2, characterized in that: The main control module adopts an MCU chip or a SOC chip.
4. A method for remote FPGA firmware programming based on Ethernet, characterized in that: The steps include: S1. The host computer and the FPGA module complete TCP network communication through the Ethernet chip. The firmware to be burned is downloaded to the FPGA module through this network. After receiving the firmware, the FPGA module directly forwards it to the main control module through the UART serial port; S2, the main control module saves all the firmware in the on-chip flash until all the firmware is received; S3. After the main control module receives all the firmware, the main control module controls the FPGA module to stop running, releases the SPI communication interface between the FPGA module and the firmware storage FLASH, and hands it over to the main control module for processing; S4, the main control module writes the received firmware into the firmware storage FLASH through the SPI communication interface, that is, the main control module simulates the process of JTAG programming the external FLASH of the FPGA module; S5. After the firmware is completely written into the firmware storage FLASH, the FPGA module is rebooted to load the firmware from the firmware storage FLASH, completing the Ethernet-based FPGA firmware remote burning.
5. The method for remotely programming FPGA firmware based on Ethernet according to claim 4, characterized in that: The host computer is used to send FPGA firmware; the FPGA module is connected to the main control module through a serial port, and is connected to the firmware storage FLASH through an SPI interface.
6. The method for remotely programming FPGA firmware based on Ethernet according to claim 4, characterized in that: The main control module adopts an MCU chip or a SOC chip. The main control module controls the FPGA module through a serial port and is connected to the firmware storage FLASH through an SPI interface. The main control module has its own flash.
7. The method for remotely programming FPGA firmware based on Ethernet according to claim 4, characterized in that: The firmware storage FLASH is used for data storage and is connected to the main control module and the FPGA module via the SPI interface.
8. The method for remotely programming FPGA firmware based on Ethernet according to claim 4, characterized in that: The main control module is connected to the Ethernet, and the main control module and multiple FPGA module devices are interconnected through JTAG pins to form a JTAG daisy chain.
9. The method for remotely programming FPGA firmware based on Ethernet according to claim 4, characterized in that: The main control module also includes an SDRAM module, which is used to cooperate with the Ethernet physical layer chip to store high-speed network data and realize the transmission and storage of Ethernet data.
10. The method for remotely programming FPGA firmware based on Ethernet according to claim 4, characterized in that: The FLASH module is used to store the startup program and configuration file of the FPGA module.