FPGA configuration upgrade method and FPGA platform
Automatic loading and data erasure of the FLASH storage area are realized through the internal logic resources of the FPGA, which solves the problems of complex configuration upgrade methods and high hardware costs of the existing FPGA, and achieves a simple, stable and low-cost configuration upgrade effect.
Patent Information
- Application Number
- CN202010485275.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-01
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2040-06-01
AI Technical Summary
The existing FPGA configuration upgrade method is complicated, which increases the customer's threshold for use and requires additional control chips and circuits, resulting in high hardware costs, increased power consumption and signal interference. The operation is complex and can easily lead to failures.
Automatically load logical data loading and data erasing of FLASH storage area through FPGA internal logic resources, obtain and write new application configuration data, realize the update and upgrade of configuration data, avoid the use of additional control chips and circuits, and simplify Operational procedures.
It achieves simplicity and stability of FPGA configuration upgrade, reduces hardware cost and power consumption, simplifies circuit structure, reduces failure probability, and improves product reliability and user-friendliness.
Smart Images

Figure CN111813432B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a field programmable gate array (FPGA) configuration and upgrading method and an FPGA platform. Background Art
[0002] FPGA is widely used in various fields such as communication and aviation due to its strong data processing capability and dynamic function reconfiguration. In product design and development, product functions are often tested and debugged. In this process, the FPGA configuration file needs to be continuously configured. Even when entering the product stage, as the product evolves, the FPGA configuration file also needs to be updated and iterated. The configuration and upgrade of FPGA data files is a very important part in the development and application of FPGA. For customers, they are not professional FPGA development and design personnel, and do not understand professional FPGA download configuration tools, which increases the technical threshold for customers to use. For XILINX FPGA development tools VIVADOH or ISE, about 20Gb of disk space is required after installation. For some old equipment, the space occupied is large, which increases the cost of use. Even if it is a single-installed IMPACT burning tool, more professional operations are still required to successfully configure and upgrade the FPGA. In order to solve this problem, the present invention proposes a method for programming the configuration storage unit FLASH using the internal logic resources of the FPGA without substantially changing the hardware state of the product, thereby realizing the update and upgrade of the FPGA platform configuration data. Commonly used configuration methods for FPGA products are often complicated to operate, requiring the addition of additional control chips and corresponding configuration circuits, and the circuit structure is complex.
[0003] There are two main solutions in the prior art: one is to configure and upgrade the FPGA through XILINX's professional FPGA configuration software such as IMPACT. This solution requires the selection of FPGA chip models, configuration storage chip models, configuration methods, etc. The operation is complicated and causes difficulties for non-professional developers such as testers and customers. The second is to directly configure the FPGA through third-party control chips, DSP, CPLD, MCU, etc. or program the storage chip used to configure the FPGA to realize the configuration upgrade function of the FPGA. This method requires the addition of additional control chips and corresponding circuits to the original circuit design of the product, which increases the hardware circuit cost and the power consumption of the product. At the same time, when there are requirements for board-level space and routing, unnecessary interference will be added to the signal line of the product itself. Secondly, after adding MCU software and hardware operations, the probability of failure will also increase. Since the MCU not only needs to read and write the storage chip, but also needs to simulate the power-on loading process of the FPGA, if the loading is unsuccessful, not only the upgrade function of the product fails, but also the basic function of the product will fail.
[0004] It is very necessary to provide an easy-to-operate FPGA configuration upgrade solution through minor hardware modifications. Summary of the invention
[0005] In order to solve the above technical problems, the embodiments of the present invention provide an FPGA configuration upgrade method and an FPGA platform, which do not require additional control chips and corresponding supporting circuits, and realize the FPGA configuration upgrade function under the premise of slightly changing the functional state of the original product hardware circuit.
[0006] An embodiment of the present invention provides a method for upgrading a field programmable gate array (FPGA), comprising:
[0007] The FPGA loads the automatic loading logic data contained in the first storage area of the non-volatile memory FLASH;
[0008] The automatic loading logic data is executed, and after erasing the data in the second storage area of the FLASH, new application configuration data is acquired; and the new application configuration data is written into the second storage area of the FLASH.
[0009] The embodiment of the present invention further provides a field programmable gate array (FPGA) platform, characterized in that it comprises: an FPGA and a non-volatile memory FLASH for configuring the FPGA;
[0010] The FPGA is configured to load the automatic loading logic data contained in the first storage area of the FLASH;
[0011] The FPGA is also configured to execute the automatic loading of logic data, erase data in the second storage area of the FLASH, and then obtain new application configuration data; and write the new application configuration data into the second storage area of the FLASH.
[0012] It can be seen that in the solution provided by the embodiment of the present invention, all operations on the configuration chip (FLASH) are implemented by the internal logic of the FPGA, and the circuit structure is simple and stable with low cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A flowchart of an FPGA configuration upgrade method provided in Example 1;
[0014] Figure 2 It is a schematic diagram of the structure of the FPGA platform and related equipment in the second, third and eighth embodiments of the present invention;
[0015] Figure 3 A flowchart of an FPGA configuration upgrade method provided in Example 2;
[0016] Figure 4This is a schematic diagram of the FPGA platform structure in Example 2;
[0017] Figure 5 This is a schematic diagram of the FPGA platform structure in Example 3;
[0018] Figure 6 An interactive flow chart of an FPGA configuration upgrade method provided in Example 3;
[0019] Figure 7 Another flow chart of an FPGA configuration upgrade method provided in Example 3;
[0020] Figure 8 This is a schematic diagram of the FPGA platform structure in Example 4;
[0021] Fig. 9 This is a schematic diagram of the FPGA platform structure in Example 6. DETAILED DESCRIPTION
[0022] To make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.
[0023] Embodiment 1
[0024] The embodiment of the present invention provides a method for upgrading the configuration of a field programmable gate array (FPGA). Figure 1 As shown, including:
[0025] Step 101, FPGA loads the automatic loading logic data contained in the first storage area of the non-volatile memory FLASH;
[0026] Step 102, executing the automatic loading of logic data, erasing the data in the second storage area of the FLASH, and acquiring new application configuration data; and writing the new application configuration data into the second storage area of the FLASH.
[0027] Optionally, the FLASH includes the first storage area and the second storage area;
[0028] The first storage area is a storage area whose highest address in the FLASH is 0, and the second storage area is a storage area whose highest address in the FLASH is 1;
[0029] or,
[0030] The first storage area is a storage area whose highest address in the FLASH is 1, and the second storage area is a storage area whose highest address in the FLASH is 0.
[0031] Optionally, the FPGA loads the automatic loading logic data contained in the first storage area of the non-volatile memory FLASH, including:
[0032] When the first storage area is a storage area whose highest bit address of the FLASH is 0, then when the highest bit address of the FLASH is at a low level, the automatic loading logic data contained in the first storage area of the FLASH is loaded;
[0033] or,
[0034] When the first storage area is a storage area whose highest address of the FLASH is 1, the automatic loading logic data contained in the first storage area of the FLASH is loaded when the highest address of the FLASH is at a high level.
[0035] Optionally, in step 101, the FPGA loads the automatic loading logic data contained in the first storage area of the non-volatile memory FLASH, including:
[0036] When the first storage area is a storage area whose highest bit address of the FLASH is 0, when the highest bit address of the FLASH is at a low level, the automatic loading logic data contained in the first storage area of the FLASH is loaded, and the FLASH is set to not allow erasing and writing;
[0037] or,
[0038] When the first storage area is a storage area whose highest address of the FLASH is 1, when the highest address of the FLASH is at a high level, the automatic loading logic data contained in the first storage area of the FLASH is loaded, and the FLASH is set to not allow erasing or writing.
[0039] Optionally, the step of erasing data in the second storage area of the FLASH in step 102 includes:
[0040] When the first storage area is a storage area whose highest bit address of the FLASH is 0, and the highest bit address of the FLASH is at a high level and the FLASH is erasable, data is erased in the second storage area of the FLASH;
[0041] Alternatively, when the first storage area is a storage area whose highest address of the FLASH is 1, and the highest address of the FLASH is at a low level and the FLASH is erasable, data is erased in the second storage area of the FLASH.
[0042] Optionally, when the general purpose input and output GPIO port of the FPGA platform is at a low level, the FLASH is not allowed to be erased and written; when the GPIO port of the FPGA platform is at a high level, the FLASH is allowed to be erased and written;
[0043] or,
[0044] When the general purpose input and output GPIO port of the FPGA platform is at a high level, the FLASH is not allowed to be erased and written; when the GPIO port of the FPGA platform is at a low level, the FLASH is allowed to be erased and written.
[0045] Optionally, the obtaining of new application configuration data in step 102 includes:
[0046] Receive the new application configuration data from the host computer;
[0047] Alternatively, the new application configuration data is read from a preset external storage device.
[0048] Optionally, after writing the new application configuration data into the second storage area of the FLASH, the method further includes:
[0049] Step 103: The FPGA is reloaded according to the new application configuration data in the second storage area of the FLASH, thereby updating the application of the FPGA.
[0050] Optionally, the obtaining of new application configuration data in step 102 includes:
[0051] The encrypted new application configuration data is obtained, and the decryption instruction in the automatic loading logic data is executed to obtain the decrypted new application configuration data.
[0052] Optionally, when receiving the new application configuration data from the host computer, the receiving the new application configuration data includes:
[0053] Communicate with the host computer via any of the following interfaces to receive the new application configuration data: serial port, USB interface, SPI interface, IIC interface;
[0054] or,
[0055] The general purpose input and output (GPIO) port of the FPGA platform is utilized to communicate with the host computer to receive the new application configuration data after implementing any of the following interfaces through the communication logic in the automatic loading logic data: UART interface, IIC interface, SPI interface.
[0056] Embodiment 2
[0057] An embodiment of the present invention provides a method for upgrading FPGA configuration. The device environment in which the method is executed is as follows: Figure 2 As shown, it includes a host computer and a PFGA platform, and the host computer is connected to the FPGA platform through a serial communication interface. The block diagram marked with FPGA is the logic function realized by the FPGA chip, that is, the FPGA referred to in this application. The main control FPGA chip of the FPGA platform used for debugging of the present invention is the Kintex-7 series XC7K160T chip of XILINX company, the FLASH configuration chip model is PC28F00AP30TF, and the storage capacity is 1Gbit. The computer and the device are connected through RS-232, using asynchronous serial communication, the baud rate is 11520, 8bit data bit, no odd parity check, and 1bit stop bit.
[0058] The host computer mainly sends the FPGA configuration file to the FPGA through the serial port, and can also complete the data readback verification function. The FPGA driver logic mainly includes the serial port driver logic, the FLASH control programming control logic and the interface logic of these two parts. The serial port module exchanges data with the computer, receives the configuration data sent by the host computer, and feeds back the corresponding status information to the host computer. The FLASH read and write control module implements related operations such as FLASH erasing, programming and readback.
[0059] In this embodiment, the internal logic resources of the FPGA are used to program (write) the configuration storage unit FLASH, thereby updating and upgrading the configuration data of the FPGA platform. Figure 3 As shown in FIG. 2 , the FLASH storage space is physically partitioned by switching the FLASH highest address A
[26] between high and low. The FLASH address space can be divided into the lower half of 0000000-1FFFFFF and the upper half of 2000000-3FFFFFF. The lower half is used as the storage space for FPGA loading logic function data (referred to as the data storage space for the autoload function); the upper half is used as the product application configuration data storage space. Here, the lower half is the first storage area, and the upper half is the second storage area.
[0060] During normal product application, the DIP switch K1 connected to A
[26] remains in the disconnected state, and A
[26] remains in the high state. After the FPGA platform is powered on, the data in the upper half of the FLASH (product application data) is loaded for use in product applications.
[0061] When the FPGA product application data needs to be updated (upgraded), the process is as follows: Figure 3 As shown, the FPGA platform system is as follows Figure 4 As shown, including:
[0062] Step 301, close the DIP switch K1 connected to the FLASH address A
[26] , A
[26] is kept low, the FPGA platform is powered off, and after powering on again, the lower half data (autoload function logic data, i.e. automatic loading logic data) is loaded, and the platform enters the autoload function state.
[0063] Step 302, after loading is completed, the DIP switch K1 is turned off to execute the autoload logic function to erase the data in the upper half of the FLASH; that is, the FPGA operates the storage space in the upper half of the FLASH, that is, the application configuration data area.
[0064] Step 303, the host computer then sends new application configuration data through the serial port, the serial port logic part in the FPGA implements the reception of product application data, and writes the new application configuration data into the upper half of the FLASH through the FLASH operation logic.
[0065] After step 303, the application configuration upgrade is completed.
[0066] When you power off the FPGA platform and then power it on again, the updated application configuration data will be running.
[0067] Embodiment 3
[0068] An embodiment of the present invention provides a method for upgrading FPGA configuration. The device environment in which the method is executed is as follows: Figure 2 As shown, it includes a host computer and a PFGA platform, and the host computer is connected to the FPGA platform through a serial communication interface. The block diagram marked with FPGA is the logic function realized by the FPGA chip, that is, the FPGA referred to in this application. The main control FPGA chip of the FPGA platform used for debugging of the present invention is the Kintex-7 series XC7K160T chip of XILINX company, the FLASH configuration chip model is PC28F00AP30TF, and the storage capacity is 1Gbit. The computer and the device are connected through RS-232, using asynchronous serial communication, the baud rate is 11520, 8bit data bit, no odd parity check, and 1bit stop bit.
[0069] The FPGA platform used in this embodiment is based on the second embodiment, and a FLASH write protection function is added. When the write protection is turned on, it means that the FLASH is allowed to be erased and written, and when the write protection is turned off, it means that the FLASH is not allowed to be erased and written. Figure 5The P1 connection circuit is used to implement the function of preventing misoperation (write protection function), protecting the product application data from being updated to the upper half of the FLASH, and not overwriting the lower half of the FLASH, that is, the autoload logic configuration data area. The implementation principle is that K1 and K2 remain synchronized during operation, and the FLASH cannot be erased or written when P1 is low. Here, it is defined that when K1 and K2 are both disconnected, the state is 11, and when K1 and K2 are both closed, the state is 00. That is, K1K2 can only rewrite the data in the upper half of the FLASH when it is switched to the 11 state. When the user forgets to disconnect K1, although the operation address space corresponding to the FPGA is the storage space in the lower half of the FLASH, it will not be overwritten. The P1 is the write protection of the FLASH. When P1 is low, it means that the write protection is turned off and the FLASH cannot be erased or written. When P1 is high, it means that the write protection is turned on and the FLASH can be erased or written. Optionally, P1 is connected to the general input and output GPIO port of the FPGA.
[0070] Before performing the FPGA configuration upgrade method, the developer first writes the autoload function (completes the uart receiving and sending logic, FLASH programming control logic and other functions) logic data, that is, the automatic loading logic data, into the lower half of the FLASH area in advance. The writing can be completed through professional tools such as impact, and from then on, the FPGA configuration automatic upgrade function can be completed without the help of other tools.
[0071] This embodiment provides a method for upgrading FPGA configuration. Figure 6 As shown, the steps are as follows:
[0072] Step 601, Figure 5 The FPGA platform DIP switch K2K1 is turned to the closed state, that is, A
[26] and P1 are both low;
[0073] Step 602, power on the FPGA platform; at this time, the FPGA loads the data in the lower half of the FLASH, that is, loads the autoload function logic data. At this time, the platform is in the autoload function state, but K2K1 is in the 00 state, and the FLASH cannot be erased or written;
[0074] Step 603, turn the FPGA platform DIP switch K2K1 to the off state, that is, A
[26] and P1 are both high; at this time, K2K1 is in the 11 state, execute the autoload function, and start the erase operation on the upper half of the FLASH. After the erase is completed, it will be fed back to the host computer through the serial port. At this time, the FPGA is in the state of waiting to receive data from the host computer;
[0075] Step 604, the host computer sends new application configuration data to the FPGA platform;
[0076] After the host computer receives the erase completion information fed back by the FPGA platform, the host computer loads and sends the application configuration data to be updated through the serial port assistant or other host computer software, and waits for the data to be sent.
[0077] Optionally, the new application configuration data is product application configuration file data generated by the XILINX VIVADO tool; or new application configuration data is generated by other tools, not limited to the specific tools exemplified in this embodiment; optionally, if encryption is required, it can be encrypted using a selected encryption algorithm, and corresponding decryption logic can be added to the corresponding autoload function logic.
[0078] Step 605, after the host computer software prompts that the data transmission is completed, it waits for the autoload logic function to feedback that the programming operation is completed; accordingly, the FPGA platform executes the autoload logic function to write the received new application configuration data into the upper half of the FLASH;
[0079] Step 606: After receiving the feedback from the FPGA platform indicating that the writing operation is completed, the host computer powers off the FPGA platform.
[0080] Step 607, the FPGA platform is powered on, and the operation is completed. At this time, the FPGA loads the data in the upper half of the FLASH, that is, loads the updated application configuration data, and the FPGA platform is in the updated application function state.
[0081] The method for upgrading the FPGA configuration described in this embodiment can also refer to Figure 7 The process shown.
[0082] Embodiment 4
[0083] An embodiment of the present invention provides a method for upgrading FPGA configuration. The device environment in which the method is executed is as follows: Figure 8 As shown, it includes a host computer and a FPGA platform, and the host computer is connected to the FPGA platform through a serial communication interface. Figure 8 is Figure 2 On the basis of the above, an encryption and decryption logic part is added. It is necessary to encrypt and decrypt the FPGA application configuration file (data). The encryption and decryption logic part is added to the internal logic function of the FPGA, that is, the automatic loading logic data of the second or third embodiment also includes the encryption and decryption logic.
[0084] When the received new application configuration data is encrypted data, the FPGA first executes the decryption logic and then writes it into the upper half of the FLASH. Referring to the process of the second or third embodiment, those skilled in the art can determine that step 303 or step 605 can be modified accordingly.
[0085] Embodiment 5
[0086] The embodiment of the present invention provides a method for upgrading FPGA configuration. Compared with the second, third and fourth embodiments, when communicating with the host computer, any communication protocol and tool such as USB (Universal Serial Bus), SPI (Serial Peripheral Interface), IIC (Inter-Integrated Circuit) can be optionally used to communicate with the host computer to complete the FPGA configuration upgrade function. It is only necessary to change the serial port transceiver logic in autoload to the control logic of the corresponding communication protocol. If the FPGA platform used does not have a communication port, GPIO can be used to use the communication logic part in autoload to realize UART (Universal Asynchronous Receiver / Transmitter), IIC, SPI and other communication functions.
[0087] Embodiment 6
[0088] The embodiment of the present invention provides a method for upgrading FPGA configuration. Compared with the second, third and fourth embodiments, the host computer completes the interaction with the FPGA platform, and the host computer is only used to implement the function of issuing application configuration data. The present invention can also use any storage medium such as SD card, U disk, etc. with the autoload logic function to complete the FPGA configuration upgrade. Taking SD card as an example, Fig. 9 As shown, you only need to add SD Controller logic code to the autoload control logic to read the configuration data from the SD card and write it into the FLASH. Since the host computer does not need to observe and operate, the operation will become more concise. When using other storage media, you only need to add the corresponding read-write control drive logic to the autoload control logic code.
[0089] Embodiment 7
[0090] The embodiment of the present invention provides a method for upgrading FPGA configuration. Compared with the second, third and fourth embodiments, the first storage area and the second storage area are set oppositely, and the upper half of the FLASH is used as the first storage area and the lower half is used as the second storage area. Accordingly, the corresponding switch K1 can be adjusted by switching on or off.
[0091] Optionally, the FLASH is divided into more than two areas, for example, into three areas or four areas, including the first storage area and the second storage area, and the purpose of other areas is not limited. Accordingly, according to the difference in the highest bit of the address of the first storage area and the second storage area, the corresponding setting of the dial switch is performed. For example, the highest 2-bit address is 11 for the first storage area, and the highest 2-bit address is 10 for the second storage area. When the corresponding address dial switch X1X2=11, the automatic loading logic data is loaded; for another example, when the highest 2-bit address is 00 for the first storage area, and the highest 2-bit address is 01 for the second storage area, the corresponding address dial switch X1X2=00 is loaded. Other situations are similar, and those skilled in the art can know the implementation scheme.
[0092] Embodiment 8
[0093] This embodiment provides a field programmable gate array FPGA platform 10, such as Figure 2 As shown, it includes: FPGA101 and FLASH102;
[0094] The FPGA 101 is configured to load the automatic loading logic data contained in the first storage area of the FLASH 102;
[0095] The FPGA 101 is further configured to execute the automatic loading of logic data, obtain new application configuration data after erasing data in the second storage area of the FLASH 102 , and write the new application configuration data into the second storage area of the FLASH 102 .
[0096] Optionally, the FLASH 102 includes the first storage area and the second storage area;
[0097] The first storage area is a storage area whose highest address in the FLASH 102 is 0, and the second storage area is a storage area whose highest address in the FLASH 102 is 1;
[0098] or,
[0099] The first storage area is a storage area whose highest address in the FLASH 102 is 1, and the second storage area is a storage area whose highest address in the FLASH 102 is 0.
[0100] Optionally, the FPGA 101 loads the automatic loading logic data contained in the first storage area of the non-volatile memory FLASH 102, including:
[0101] When the first storage area is a storage area whose highest address of the FLASH 102 is 0, the automatic loading logic data contained in the first storage area of the FLASH 102 is loaded when the highest address of the FLASH 102 is at a low level;
[0102] or,
[0103] When the first storage area is a storage area whose highest address of the FLASH 102 is 1, and the highest address of the FLASH 102 is at a high level, the automatic loading logic data contained in the first storage area of the FLASH 102 is loaded.
[0104] Optionally, the FPGA 101 loads the automatic loading logic data contained in the first storage area of the non-volatile memory FLASH 102, including:
[0105] When the first storage area is a storage area whose highest address of the FLASH 102 is 0, and the highest address of the FLASH 102 is at a low level, the automatic loading logic data contained in the first storage area of the FLASH 102 is loaded, and the FLASH 102 is set to not allow erasing or writing;
[0106] or,
[0107] When the first storage area is a storage area whose highest address of FLASH102 is 1 and the highest address of FLASH102 is at a high level, the automatic loading logic data contained in the first storage area of FLASH102 is loaded and the FLASH102 is set to be erasable.
[0108] Optionally, the step of erasing data in the second storage area of the FLASH 102 includes:
[0109] When the first storage area is a storage area whose highest address of the FLASH 102 is 0, the highest address of the FLASH 102 is at a high level and the FLASH 102 is erasable, data is erased in the second storage area of the FLASH;
[0110] Alternatively, when the first storage area is a storage area whose highest address of the FLASH 102 is 1, the highest address of the FLASH 102 is at a low level and the FLASH 102 is erasable, data in the second storage area of the FLASH 102 is erased.
[0111] Optionally, when the general purpose input and output GPIO port of the FPGA platform 10 is at a low level, the FLASH 102 is not allowed to be erased and written; when the GPIO port of the FPGA platform 10 is at a high level, the FLASH 102 is allowed to be erased and written;
[0112] or,
[0113] When the general purpose input and output GPIO port of the FPGA platform 10 is at a high level, the FLASH 102 is not allowed to be erased or written; when the GPIO port of the FPGA platform 10 is at a low level, the FLASH 102 is allowed to be erased or written.
[0114] Optionally, the FPGA 101 acquires new application configuration data, including:
[0115] Receive the new application configuration data from the host computer;
[0116] Alternatively, the new application configuration data is read from a preset external storage device.
[0117] Optionally, the FPGA 101 is further configured to, after writing the new application configuration data into the second storage area of the FLASH 102 , reload according to the new application configuration data in the second storage area of the FLASH 102 , thereby updating the application of the FPGA.
[0118] Optionally, the FPGA 101 acquires new application configuration data, including:
[0119] The encrypted new application configuration data is obtained, and the decryption instruction in the automatic loading logic data is executed to obtain the decrypted new application configuration data.
[0120] Optionally, when receiving the new application configuration data from the host computer, the receiving the new application configuration data includes:
[0121] Communicate with the host computer via any of the following interfaces to receive the new application configuration data: serial port, USB interface, SPI interface, IIC interface;
[0122] or,
[0123] The general purpose input and output (GPIO) port of the FPGA platform is utilized to communicate with the host computer to receive the new application configuration data after implementing any of the following interfaces through the communication logic in the automatic loading logic data: UART interface, IIC interface, SPI interface.
[0124] Compared with the prior art, the circuit of the present invention is extremely simple. In the case of not using the FLASH erase protection function (not setting P1, such as Figure 3As shown in the figure, it will not occupy other port resources of FPGA. It only needs to connect a DIP switch circuit. If it does not exist in the original platform circuit, it can be completed by plugging in pins and flying wires. It basically does not change the hardware status of the product function circuit and will not affect the performance of the product application circuit. At the same time, it uses the dynamic reconfiguration characteristics of FPGA's own logic to replace MCU, DSP and other control chips and control circuits, which is low-cost. Since all operations on the configuration chip (FLASH) are implemented by the internal logic of FPGA (automatic loading logic in the first storage area), the circuit structure is simple and stable.
[0125] The host computer uses the serial port assistant as the operation interface, which avoids the complexity of the IMPACT professional tool operation, lowers the usage threshold, is customer-friendly, and is easy for customers to use. In addition, the solution can use any original communication interface of the platform. If there is no communication port, GPIO can be used to use the communication logic part in autoload to implement UART, IIC, SPI and other communication functions, which has good portability and scalability.
[0126] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
Claims
1. A method for upgrading a field programmable gate array (FPGA) configuration, comprising: The FPGA loads the automatic loading logic data contained in the first storage area of the non-volatile memory FLASH; Execute the automatic loading logic data, erase the data in the second storage area of the FLASH, and obtain new application configuration data; Writing the new application configuration data into the second storage area of the FLASH; The FPGA is reloaded according to the new application configuration data in the second storage area of the FLASH, thereby updating the application of the FPGA; Wherein, after the FPGA is powered on, the automatic loading logic data of the first storage area is loaded or the application configuration data of the second storage area is loaded; The FLASH includes the first storage area and the second storage area; The first storage area is a storage area whose highest address in the FLASH is 0, and the second storage area is a storage area whose highest address in the FLASH is 1; or, The first storage area is a storage area whose highest address in the FLASH is 1, and the second storage area is a storage area whose highest address in the FLASH is 0; The FPGA loads the automatic loading logic data contained in the first storage area of the non-volatile memory FLASH, including: When the first storage area is a storage area whose highest bit address of the FLASH is 0, when the highest bit address of the FLASH is at a low level, the automatic loading logic data contained in the first storage area of the FLASH is loaded, and the FLASH is set to not allow erasing and writing; or, When the first storage area is a storage area whose highest bit address of the FLASH is 1, when the highest bit address of the FLASH is at a high level, the automatic loading logic data contained in the first storage area of the FLASH is loaded, and the FLASH is set to not allow erasing and writing; Erasing data in the second storage area of the FLASH includes: When the first storage area is a storage area whose highest bit address of the FLASH is 0, and the highest bit address of the FLASH is at a high level and the FLASH is erasable, data is erased in the second storage area of the FLASH; Alternatively, when the first storage area is a storage area whose highest address of the FLASH is 1, and the highest address of the FLASH is at a low level and the FLASH is erasable, data is erased in the second storage area of the FLASH.
2. The method according to claim 1, wherein: When the general purpose input and output GPIO port of the FPGA platform is at a low level, the FLASH is not allowed to be erased and written; when the GPIO port of the FPGA platform is at a high level, the FLASH is allowed to be erased and written; or, When the general purpose input and output GPIO port of the FPGA platform is at a high level, the FLASH is not allowed to be erased and written; when the GPIO port of the FPGA platform is at a low level, the FLASH is allowed to be erased and written.
3. The method according to any one of claims 1 to 2, wherein: The obtaining of new application configuration data includes: Receive the new application configuration data from the host computer; Alternatively, the new application configuration data is read from a preset external storage device; Alternatively, the encrypted new application configuration data is obtained, and the decryption instruction in the automatic loading logic data is executed to obtain the decrypted new application configuration data.
4. The method according to claim 3, wherein: When receiving the new application configuration data from the host computer, the receiving the new application configuration data includes: Communicate with the host computer to receive the new application configuration data via any of the following interfaces: a serial port, a universal serial bus USB interface, a serial peripheral device SPI interface, an integrated circuit bus IIC interface; or, Utilize the general purpose input and output GPIO port of the FPGA platform, and communicate with the host computer to receive the new application configuration data after implementing any of the following interfaces through the communication logic in the automatic loading logic data: universal asynchronous receiver and transmitter UART interface, integrated circuit bus IIC interface, serial peripheral device SPI interface.
5. A field programmable gate array (FPGA) platform, characterized in that: It includes: FPGA and non-volatile memory FLASH for configuring FPGA; The FPGA is configured to load the automatic loading logic data contained in the first storage area of the FLASH; The FPGA is further configured to execute the automatic loading of logic data, erase data in the second storage area of the FLASH, and then obtain new application configuration data; write the new application configuration data into the second storage area of the FLASH; The FPGA is also configured to reload according to the new application configuration data in the second storage area of the FLASH, thereby updating the application of the FPGA; Wherein, after the FPGA is powered on, the automatic loading logic data of the first storage area is loaded or the application configuration data of the second storage area is loaded; The FLASH includes the first storage area and the second storage area; The first storage area is a storage area whose highest address in the FLASH is 0, and the second storage area is a storage area whose highest address in the FLASH is 1; or, The first storage area is a storage area whose highest address in the FLASH is 1, and the second storage area is a storage area whose highest address in the FLASH is 0; The FPGA loads the automatic loading logic data contained in the first storage area of the non-volatile memory FLASH, including: When the first storage area is a storage area whose highest bit address of the FLASH is 0, when the highest bit address of the FLASH is at a low level, the automatic loading logic data contained in the first storage area of the FLASH is loaded, and the FLASH is set to not allow erasing and writing; or, When the first storage area is a storage area whose highest bit address of the FLASH is 1, when the highest bit address of the FLASH is at a high level, the automatic loading logic data contained in the first storage area of the FLASH is loaded, and the FLASH is set to not allow erasing and writing; Erasing data in the second storage area of the FLASH includes: When the first storage area is a storage area whose highest bit address of the FLASH is 0, and the highest bit address of the FLASH is at a high level and the FLASH is erasable, data is erased in the second storage area of the FLASH; Alternatively, when the first storage area is a storage area whose highest address of the FLASH is 1, and the highest address of the FLASH is at a low level and the FLASH is erasable, data is erased in the second storage area of the FLASH.
