Software upgrading method, device and equipment of FPGA (Field Programmable Gate Array) device, vehicle and medium

By using a preloader program in the FPGA device to write the upgrade program into the FLASH memory, and using the upgrade identification and verification information to ensure a successful software upgrade, the problem of hardware circuit damage during the software upgrade process is solved, and the upgrade efficiency and reliability are improved.

CN118733092APending Publication Date: 2024-10-01BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310341956.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

During the software upgrade process of existing FPGA devices, hardware circuits are easily damaged by static electricity, resulting in low maintenance and upgrade efficiency.

Method used

Receive and write the upgrade program to the FLASH memory through the preloader program, and use the upgrade identification and verification information to ensure the success of the software upgrade, reduce the hardware circuit failure rate, and improve the efficiency of the software upgrade.

Benefits of technology

It realizes safe and efficient software upgrade of FPGA devices, reduces hardware circuit failure rate, and improves the efficiency and reliability of software upgrade.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733092A_ABST
    Figure CN118733092A_ABST
Patent Text Reader

Abstract

The invention relates to a software upgrading method and device for an FPGA device, equipment, a vehicle and a storage medium, and the method comprises the steps: starting a preloading program after receiving an upgrading program; sending the upgrading program to a FLASH memory by utilizing the started preloading program, so that the FLASH memory writes the upgrading program into an upgrading area; and loading the upgrading program in an upgrading area in the FLASH memory, wherein the upgrading program is a program after the software in the FPGA device is upgraded. According to the technical scheme provided by the invention, the upgrading program is sent to the FLASH memory through the FPGA memory, so that the upgrading program is written into the FLASH memory, software upgrading of an FPGA device is realized, the fault rate of a hardware circuit in the FPGA is reduced, and the software upgrading efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vehicle intelligence technology, and in particular to a software upgrade method, device, equipment, vehicle and storage medium for an FPGA device. Background Art

[0002] In the prior art, Field Programmable Gate Array (FPGA) devices are important components of vehicle management systems. After the vehicle is delivered, the software in the FPGA needs to be upgraded and maintained in order to improve the system management and maintenance capabilities of the vehicle. At present, the common way to upgrade and maintain the software in the FPGA device is: the owner drives the vehicle to a 4S store, and a professional opens the device shell and uses a dedicated JTAG downloader to download the upgrade package, and directly upgrades the FPGA device on the PC.

[0003] In the above process, static electricity is very likely to be generated and damage the hardware circuits in the FPGA, resulting in inefficient maintenance and upgrade processes. Summary of the invention

[0004] The present invention provides a method, apparatus, device and storage medium for software upgrading of an FPGA device, so as to realize software upgrading of the FPGA device, reduce the failure rate of the hardware circuit in the FPGA, and improve the efficiency of software upgrading.

[0005] In a first aspect, an embodiment of the present disclosure provides a software upgrade method, which is applied to a field programmable gate array (FPGA) device, and includes:

[0006] After receiving the upgrade program, start the pre-loading program;

[0007] Sending the upgrade program to the FLASH memory by using the pre-loaded program after startup, so that the FLASH memory writes the upgrade program into the upgrade area;

[0008] The upgrade program in the upgrade section in the FLASH memory is loaded, wherein the upgrade program is a program after the software in the FPGA device is upgraded.

[0009] In one embodiment of the present disclosure, after sending the upgrade program to the FLASH memory using the pre-loaded program after startup, the method further includes:

[0010] The status information corresponding to the upgrade identifier is set to a first status, wherein the upgrade identifier is used to indicate whether there is an upgrade program in the upgrade area in the FLASH memory, and the first status of the upgrade identifier is used to indicate that there is an upgrade program in the upgrade area in the FLASH memory.

[0011] In one embodiment of the present disclosure, the step of loading the upgrade program in the upgrade area in the FLASH memory includes:

[0012] Reading pre-stored first upgrade verification information from an EEPROM memory, wherein the EEPROM memory refers to an electrically erasable programmable read-only memory in the vehicle-mounted terminal;

[0013] Reading second upgrade verification information of the upgrade program from the FLASH memory, wherein the upgrade verification information includes: status information corresponding to the upgrade identifier, version information of the upgrade program, and an area identifier of the upgrade area;

[0014] When the first upgrade verification information and the second upgrade verification information are the same, the upgrade program in the upgrade area in the FLASH memory is loaded, and the loading identifier is set to a first state, the loading identifier is used to indicate whether the software in the FPGA device has been successfully upgraded, and the loading identifier is in the first state to indicate that the software in the FPGA device has been successfully upgraded.

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

[0016] When the first upgrade verification information and the second upgrade verification information are different, the initial program stored in the initial area in the FLASH memory is loaded, and the loading identifier is set to the second state, wherein the initial program refers to the program written into the FLASH memory when the vehicle corresponding to the upgrade program leaves the factory, and the loading identifier is the second state for indicating that the software upgrade in the FPGA device has failed.

[0017] In one embodiment of the present disclosure, before reading the pre-stored first upgrade verification information from the EEPROM memory, the method further includes:

[0018] Obtain the status information corresponding to the upgrade identifier, the version information of the upgrade program, and the zone identifier of the upgrade zone;

[0019] The status information corresponding to the upgrade identifier, the version information of the upgrade program, and the area identifier of the upgrade area are written into the EEPROM memory through the IIC interface.

[0020] In one embodiment of the present disclosure, the method further comprises:

[0021] After detecting a power-on signal of the FPGA device, starting a preloading program;

[0022] Reading the status information corresponding to the upgrade identifier;

[0023] When the state information corresponding to the upgrade identifier is in the first state, the upgrade program in the upgrade area in the FLASH memory is loaded.

[0024] In one embodiment of the present disclosure, after receiving the upgrade program and before starting the preloading program, the method further includes:

[0025] An upgrade program sent by an ARM processor is received, the ARM processor is connected to the FPGA device, and the upgrade program in the ARM processor is downloaded from a cloud server.

[0026] In a second aspect, an embodiment of the present disclosure provides a software upgrade device, wherein the upgrade device is configured in a field programmable gate array (FPGA) device, and comprises:

[0027] A preloading module, used to start the preloading program after receiving the upgrade program;

[0028] An upgrade program writing module, used to send the upgrade program to the FLASH memory by using the pre-loaded program after startup, so that the FLASH memory writes the upgrade program into the upgrade area;

[0029] The upgrade program loading module is used to load the upgrade program in the upgrade area in the FLASH memory, and the upgrade program is the program after the software in the FPGA device is upgraded.

[0030] In one embodiment of the present disclosure, an upgrade identifier setting module is used to set the status information corresponding to the upgrade identifier to a first state after the upgrade program is sent to the FLASH memory using a preloaded program after startup, wherein the upgrade identifier is used to indicate whether there is an upgrade program in the upgrade area in the FLASH memory, and the first state of the upgrade identifier is used to indicate that there is an upgrade program in the upgrade area in the FLASH memory.

[0031] In one embodiment of the present disclosure, the upgrade program loading module includes: a first upgrade verification information reading unit, used to read pre-stored first upgrade verification information from an EEPROM memory, wherein the EEPROM memory refers to an electrically erasable programmable read-only memory in a vehicle-mounted terminal; a second upgrade verification information reading unit, used to read second upgrade verification information of the upgrade program from the FLASH memory, wherein the upgrade verification information includes: status information corresponding to the upgrade identifier, version information of the upgrade program, and an area identifier of the upgrade area; an upgrade program loading unit, used to load the upgrade program in the upgrade area in the FLASH memory when the first upgrade verification information and the second upgrade verification information are the same, and set the loading identifier to a first state, the loading identifier is used to indicate whether the software in the FPGA device has been successfully upgraded, and the loading identifier is in the first state to indicate that the software in the FPGA device has been successfully upgraded.

[0032] In one embodiment of the present disclosure, the device also includes: an initial program loading unit, which is used to load the initial program stored in the initial area in the FLASH memory when the first upgrade verification information and the second upgrade verification information are different, and set the loading identifier to a second state, wherein the initial program refers to a program written into the FLASH memory when the vehicle corresponding to the upgrade program leaves the factory, and the loading identifier is the second state for indicating that the software upgrade in the FPGA device has failed.

[0033] In one embodiment of the present disclosure, the device also includes: a verification information acquisition module, which is used to obtain the status information corresponding to the upgrade identifier, the version information of the upgrade program, and the area identification of the upgrade area before reading the pre-stored first upgrade verification information from the EEPROM memory; a verification information writing module, which is used to write the status information corresponding to the upgrade identifier, the version information of the upgrade program, and the area identification of the upgrade area into the EEPROM memory through the IIC interface.

[0034] In one embodiment of the present disclosure, the device also includes: a power-on detection module, which is used to start the pre-loading program after detecting the power-on signal of the FPGA device; an upgrade identifier reading module, which is used to read the status information corresponding to the upgrade identifier; and an upgrade program loading module, which is specifically used to load the upgrade program in the upgrade area in the FLASH memory when the status information corresponding to the upgrade identifier is in the first state.

[0035] In one embodiment of the present disclosure, the upgrade program receiving module is used to receive the upgrade program sent by the ARM processor, the ARM processor is connected to the FPGA device, and the upgrade program in the ARM processor is downloaded from the cloud server.

[0036] In a third aspect, an embodiment of the present disclosure provides an FPGA device, including:

[0037] Memory;

[0038] Processor; and

[0039] Computer programs;

[0040] The computer program is stored in the memory and is configured to be executed by the processor to implement the software upgrade method as described in the first aspect.

[0041] In a fourth aspect, an embodiment of the present disclosure provides a vehicle, comprising the FPGA device as described in the third aspect.

[0042] In a fifth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the software upgrade method as described in the first aspect.

[0043] The software upgrade method, device, FPGA device, vehicle and storage medium provided by the embodiment of the present disclosure include: after receiving the upgrade program, start the pre-loading program; use the pre-loading program after startup to send the upgrade program to the FLASH memory, so that the FLASH memory writes the upgrade program to the upgrade area; load the upgrade program in the upgrade area in the FLASH memory, and the upgrade program is the upgraded program in the FPGA device. The technical solution provided by the present disclosure sends the upgrade program to the FLASH memory through the FPGA memory, so that the FLASH writes the upgrade program, realizes the software upgrade of the FPGA device, reduces the failure rate of the hardware circuit in the FPGA, and improves the efficiency of software upgrade. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0046] Figure 1 A flowchart of a software upgrade method provided by an embodiment of the present disclosure;

[0047] Figure 2 A schematic diagram of a flag position setting provided in an embodiment of the present disclosure;

[0048] Figure 3 A schematic diagram of the framework structure of a software upgrade method provided in an embodiment of the present disclosure;

[0049] Figure 4 A flowchart of a software download method provided by an embodiment of the present disclosure;

[0050] Figure 5 A flowchart of a software loading method provided by an embodiment of the present disclosure;

[0051] Figure 6 A schematic diagram of the hardware structure of a software upgrade method provided in an embodiment of the present disclosure;

[0052] Figure 7 A schematic diagram of the structure of a software upgrade device provided in an embodiment of the present disclosure;

[0053] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0054] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0055] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0056] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0057] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0058] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0059] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0060] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0061] The following is a brief introduction to the professional terms involved in the embodiments of the present disclosure.

[0062] FPGA technology is mainly derived from three editors, namely PAL, GAL and CPLD. Among application-specific integrated circuits, it is a semi-customized circuit that has a certain protective effect on customized circuits. When the gate circuit in the editing device fails, FPGA can effectively ensure the stable operation of the system. In automotive electronic systems, the use of intuitive graphical FPGA programming can help staff better develop new products and save system operating costs.

[0063] FOTA (Firmware Over-The-Air) is an over-the-air software upgrade for mobile terminals. It refers to the use of cloud upgrade technology to provide firmware upgrade services for devices with networking functions, such as mobile phones, tablets, portable media players, mobile Internet devices, etc. Users use the Internet to obtain smart terminal system upgrade packages in an on-demand and easily scalable manner, and perform cloud upgrades through FOTA to complete system repair and optimization.

[0064] FLASH memory is a non-volatile memory, also known as FLASH memory, which can be erased and reprogrammed in blocks of memory cells called blocks. Any write operation to FLASH memory can only be performed in empty or erased cells, so in most cases, an erase operation must be performed before a write operation.

[0065] EEPROM (Electrically Erasable Programmable Read-Only Memory) is a user-modifiable read-only memory (ROM) that can be erased and reprogrammed (overwritten) by the application of higher than normal voltages. EEPROMs can be modified without being removed from the computer. In an EEPROM, the memory can be reprogrammed frequently while the computer is in use. EEPROM is a special form of flash memory that is erased and reprogrammed using voltages typically found in personal computers.

[0066] SPI is the abbreviation of Serial Peripheral Interface, which is a synchronous serial interface technology and a high-speed, full-duplex, synchronous communication bus. It only occupies four wires on the chip pins, saving the chip pins and saving space on the PCB layout, providing convenience. It is precisely because of this simple and easy-to-use feature that more and more chips integrate this communication protocol.

[0067] IIC (Inter-Integrated Circuit) is actually the abbreviation of IICBus, so it should be called integrated circuit bus in Chinese, also known as I2C. It is a serial communication bus. For example, the SPD information in the memory is connected to the BX chipset through IIC. IIC exists in the PIIX4 structure system.

[0068] Figure 1 This is a flowchart of a software upgrade method in an embodiment of the present disclosure. This embodiment is applicable to the case of upgrading the software in a vehicle-mounted FPGA device. The method can be executed by a software upgrade device. The software upgrade device can be implemented in software and / or hardware. The software upgrade device can be configured in an FPGA device and / or other electronic devices. The FPGA device and other electronic devices are arranged in a vehicle.

[0069] In order to implement the software upgrade method provided by the present disclosure, four identification bits are pre-set in the embodiment of the present disclosure. Specifically, Figure 2 As shown, cfg_CBSEL is the internal reconfiguration multi-image selection signal, that is, the slice identifier described in the embodiment of the present disclosure, through which the program data stored in the slice corresponding to the slice identifier is selected to be loaded from the FLASH memory. cfg_CONFIG is a reload identifier, which can be used as an upgrade identifier, which is mainly used to indicate whether there is an upgrade program in the upgrade slice in the FLASH memory. cfg_ENA is an enable signal, which is valid in a high state, and cfg_ERROR is a load identifier, which is mainly used to indicate whether the upgrade program in the upgrade slice in the FLASH memory is loaded successfully.

[0070] In the embodiment of the present disclosure, a system framework for executing the software upgrade method provided by the embodiment of the present disclosure is briefly introduced. Figure 3 As described above, the development and testing personnel upload the upgrade program to the cloud server, the cloud server and the ARM processor communicate via WIFI or mobile network, and the ARM processor and the FPGA device transmit data via Ethernet. The FPGA device transmits data with the FLASH memory via the SPI interface, and the FPGA device transmits data with the EEPROM memory via the IIC interface.

[0071] Specifically, Figure 1 As shown, the software upgrade method provided by the embodiment of the present disclosure mainly includes steps S101-S103.

[0072] S101. After receiving the upgrade program, start the preloading program.

[0073] In the embodiment of the present disclosure, the upgrade program refers to the program after the software to be upgraded is updated. The preload program can be understood as a program stored in the preload area of ​​the FLASH memory.

[0074] In the embodiment of the present disclosure, starting the preloaded program can be loading the program in the preloaded area of ​​the FPGA device. It should be noted that the FPGA device needs to load the preloaded program before it can load other functional applications on this basis, such as the upgrade program and the initial program described in the embodiment of the present disclosure.

[0075] In one embodiment of the present disclosure, an upgrade program sent by an ARM processor is received, the ARM processor is connected to the FPGA device, and the upgrade program in the ARM processor is downloaded from a cloud server.

[0076] In one embodiment of the present disclosure, after receiving the software upgrade instruction, the ARM processor downloads the upgrade program from the cloud server to the ARM processor.

[0077] In the disclosed embodiment, the software upgrade instruction can be understood as an instruction to upgrade the software program in the FPGA device. The upgrade program refers to data used for software upgrade, which is stored in a cloud server. Further, the ARM processor refers to the ARM processor in the vehicle central processing unit (CPU). Among them, the cloud server refers to a server that can communicate with the ARM processor and store relevant data in the ARM processor.

[0078] The cloud server and the ARM processor are connected via a network, which may include but is not limited to a local area network, a wide area network, a public network, a private network, etc., or a combination of several thereof. The network 120 may be a computer network such as the Internet and / or various telecommunication networks (e.g., 3G / 4G / 5G mobile communication networks, WIFI, Bluetooth, ZigBee, etc.), which is not limited in the embodiments of the present disclosure.

[0079] In one embodiment of the present disclosure, the ARM processor is connected to the FPGA via Ethernet, and the upgrade program in the ARM processor is sent to the FPGA device via the Ethernet after verification.

[0080] In one embodiment of the present disclosure, the upgrade program required for the FPGA upgrade is uploaded to the cloud server. After uploading the upgrade program required for the FPGA upgrade to the cloud server, the cloud server sends a software upgrade prompt message to the ARM processor, wherein the software upgrade prompt message is used to prompt the car owner that the cloud server has updated the upgrade program, prompting the car owner to perform a software upgrade.

[0081] In one embodiment of the present disclosure, after the ARM processor receives the software upgrade prompt information, if the vehicle owner sets the software automatic upgrade flag in the vehicle terminal, the ARM processor automatically generates and receives the software upgrade instruction.

[0082] In one embodiment of the present disclosure, if the car owner has not set the software automatic upgrade flag in the vehicle terminal, the vehicle terminal will display the software upgrade prompt information to prompt the car owner that there is new software to be updated. After the vehicle terminal receives the confirmation upgrade operation input by the car owner, the ARM processor generates and receives the software upgrade instruction. Among them, the software upgrade prompt information can be displayed on the display screen of the vehicle terminal, or it can be displayed in a third-party smart terminal that is connected to the vehicle terminal for communication. The confirmation upgrade operation can be performed by the car owner in the vehicle terminal, or it can be performed in a third-party smart terminal connected to the vehicle terminal. After the third-party smart terminal receives the confirmation upgrade operation input by the car owner, it generates a software upgrade instruction and sends it to the vehicle terminal. The third-party smart terminal includes a smart phone, a computer, a tablet computer, etc. The communication connection can be any one or a combination of multiple of Bluetooth, WIFI, and a mobile cellular network.

[0083] In one embodiment of the present disclosure, after the upgrade program is downloaded to the ARM processor, the upgrade program downloaded to the ARM processor is verified. After the verification is successful, step S102 is executed. After the verification fails, the step of downloading the upgrade program to the ARM processor is re-executed, and then the upgrade program is verified again until the upgrade program verification is successful, or a command to stop the software upgrade is received. The command to stop the software upgrade is input by the car owner through the vehicle terminal or a third-party smart terminal. The above-mentioned verification method includes: cyclic redundancy check code CRC verification, flag bit verification and other verification methods.

[0084] In the disclosed embodiment, the upgrade program of the ARM processor terminal is verified and then sent to the FPGA device after successful verification, so as to avoid errors in the data transmission process and improve the accuracy of data transmission.

[0085] S102: Send the upgrade program to the FLASH memory by using the pre-loaded program after startup, so that the FLASH memory writes the upgrade program into the upgrade area.

[0086] In the embodiments of the present disclosure, the storage interface of the FLASH memory is briefly introduced first. In the FLASH memory, multiple memory units are formed in available areas, such as Figure 6 As shown, in the embodiment of the present disclosure, the FLASH memory includes a preload area, an initial area, an upgrade area 1 and an upgrade area 2, wherein one area is a memory unit in the form of an available area, and each area is a memory unit. Among them, the preload area stores a preload program, and the initial area stores an initial program. The initial program refers to a program written into the FLASH memory when the vehicle corresponding to the upgrade program leaves the factory, and the upgrade area 1 and the upgrade area 2 are respectively used to store the updated upgrade program corresponding to the initial program. Optionally, the FLASH memory in the embodiment of the present disclosure includes 2 upgrade areas, which can store two different versions of upgrade programs to save storage space of the FLASH memory, thereby saving costs.

[0087] In one embodiment of the present disclosure, the upgrade program in upgrade area 1 or upgrade area 2 is erased, and the newly acquired upgrade program is written into the upgrade area after the data is erased. The upgrade area to be erased can be selected according to actual conditions, which is not specifically limited in the embodiment of the present disclosure.

[0088] In the disclosed embodiment, each area in the FLASH memory has a corresponding area identifier. In other words, each memory unit corresponds to a area identifier. Figure 6As shown, the zone identifier corresponding to the preload zone is cfg_CBSEL=2'b00, the zone identifier corresponding to the initial zone is cfg_CBSEL=2'b01, the zone identifier corresponding to the upgrade zone 1 is cfg_CBSEL=2'b10, and the zone identifier corresponding to the upgrade zone 2 is cfg_CBSEL=2'b11.

[0089] In one embodiment of the present disclosure, the upgrade program is sent to the FLASH memory using the pre-loaded program after startup, including: through the SPI interface between the FPGA device and the FLASH memory, the upgrade program is sent to the FLASH memory using the pre-loaded program after startup, and the FLASH memory writes the upgrade program to the upgrade area in the FLASH memory.

[0090] In the embodiment of the present disclosure, after receiving the upgrade program, the FPGA device starts the preloading program, wherein the preloading program is stored in the preloading area corresponding to the area identifier cfg_CBSEL=2'b00. Then the FPGA device sends the upgrade program to the FLASH memory through the SPI interface using the preloading program after startup, and the FLASH memory writes the upgrade program into the upgrade area 1 corresponding to the area identifier cfg_CBSEL=2'b10. It should be noted that the upgrade program can be written into the upgrade area 1 or into the upgrade area 2, and no specific limitation is made in the embodiment of the present disclosure. Furthermore, the FPGA device can indicate the upgrade area to which the upgrade program is written, or the FLASH memory can select the upgrade area 1 or the upgrade area 2 to write the upgrade program, and then the FLASH memory returns the area identifier for writing the upgrade program to the FPGA device.

[0091] In the disclosed embodiment, writing the upgrade program into FLASH through FPGA can reduce the design complexity of the external circuit and reduce the hardware failure rate.

[0092] In one embodiment of the present disclosure, after the upgrade program is sent to the FLASH memory using the pre-loaded program after startup, the method further includes: setting the status information corresponding to the upgrade identifier to a first state, wherein the upgrade identifier is used to indicate whether there is an upgrade program in the upgrade area in the FLASH memory, and the first state of the upgrade identifier is used to indicate that there is an upgrade program in the upgrade area in the FLASH memory.

[0093] In the disclosed embodiment, the upgrade flag may be represented by cfg_CONFIG, wherein the state information corresponding to the upgrade flag is set to the first state which can be understood as cfg_CONFIG=1, and the state information corresponding to the upgrade flag is set to the second state which can be understood as cfg_CONFIG=0.

[0094] In the disclosed embodiment, the first state of the upgrade flag is used to indicate that there is an upgrade program in the upgrade area in the FLASH memory, and the second state of the upgrade flag is used to indicate that there is no upgrade program in the upgrade area in the FLASH memory.

[0095] In the disclosed embodiment, an upgrade flag is used to indicate whether the FLASH memory has an upgrade program, so that the FPGA device can determine whether to load the upgrade program based on the upgrade flag.

[0096] In one embodiment of the present disclosure, before reading the pre-stored first upgrade verification information from the EEPROM memory, the method also includes: obtaining status information corresponding to the upgrade identifier, version information of the upgrade program, and the area identifier of the upgrade area; and writing the status information corresponding to the upgrade identifier, the version information of the upgrade program, and the area identifier of the upgrade area into the EEPROM memory through the IIC interface.

[0097] In the embodiment of the present disclosure, the state information corresponding to the upgrade mark can be understood as whether the upgrade mark is in the first state or the second state. Optionally, in the embodiment of the present disclosure, since the upgrade program has been sent to the FLASH memory, at this time, the state information corresponding to the upgrade mark read is the first state.

[0098] In the disclosed embodiment, the version information of the upgrade program can be understood as the model number corresponding to the upgrade program. After the version information of the upgrade program is downloaded from the cloud server to the ARM processor together with the upgrade program, it is sent to the FPGA device by the ARM processor.

[0099] In the embodiment of the present disclosure, the zone identifier of the upgrade zone can be understood as the zone identifier corresponding to the zone that enters the current upgrade program. Optionally, in the embodiment of the present disclosure, the zone identifier of the upgrade zone is cfg_CBSEL=2'b10 for example.

[0100] In the disclosed embodiment, the EEPROM memory is connected to the FPGA device via an IIC interface. Specifically, the FPGA device writes the status information corresponding to the upgrade identifier, the version information of the upgrade program, and the zone identifier of the upgrade zone into the EEPROM memory via the IIC interface as the upgrade verification information in the EEPROM memory.

[0101] In one embodiment of the present disclosure, the upgrade program is sent to the FLASH memory using the pre-loaded program after startup, and the status information corresponding to the upgrade identifier, the version information of the upgrade program, and the area identifier of the upgrade area are written into the EEPROM memory, and the download process of the upgrade program is completed.

[0102] In one embodiment of the present disclosure, the upgrade program is sent to the FLASH memory, and after the status information corresponding to the upgrade identifier, the version information of the upgrade program, and the zone identifier of the upgrade zone are written into the EEPROM memory as the upgrade verification information in the EEPROM memory, the upgrade verification information in the EEPROM memory is read out to determine whether it is consistent with the upgrade verification information in the FLASH memory. If it is consistent, it indicates that the upgrade program is downloaded. If it is inconsistent, it indicates that an error occurs during the download of the upgrade program, and the step of "using the pre-loaded program after startup to send the upgrade program to the FLASH memory" is re-executed until the upgrade verification information in the EEPROM memory is consistent with the upgrade verification information in the FPGA device, and it is determined that the download of the upgrade program is completed.

[0103] In one embodiment of the present disclosure, Figure 4 As shown, the software downloading method provided in the embodiment of the present disclosure mainly includes steps S201-S206.

[0104] Specifically, S201, upload the upgrade program required for FPGA upgrade to the cloud server; S202, download the upgrade program from the cloud server to the ARM processor; S203, verify the upgrade program in the ARM processor with the upgrade program in the cloud server, and if the verification is successful, execute step S204, and if the verification fails, return to execute step S202. S204, the FPGA device loads the preload program. S205, send the upgrade program to the FLASH memory. S206, the FPGA device writes the upgrade verification information to the EEPROM memory, S207, re-reads the upgrade verification information from the EEPROM memory, and compares the upgrade verification information in the FLASH memory with the upgrade verification information in the EEPROM. If they are consistent, the download is successful. If they are inconsistent, return to execute step S204.

[0105] S103, loading the upgrade program in the upgrade area in the FLASH memory, wherein the upgrade program is a program after the software in the FPGA device is upgraded.

[0106] In the embodiment of the present disclosure, after the upgrade program is written into the upgrade area, the FPGA device directly loads the upgrade program in the upgrade area, runs the upgrade program, and completes the software upgrade.

[0107] In one embodiment of the present disclosure, the FPGA device stores a zone identifier for storing the upgrade program this time, and loads the upgrade program in the upgrade zone corresponding to the zone identifier.

[0108] In one embodiment of the present disclosure, before the FPGA device loads the upgrade program in the upgrade area, it can also verify the upgrade program stored in the upgrade area to avoid errors in the program writing process.

[0109] In one embodiment of the present disclosure, Figure 5 As shown, the loading of the upgrade program in the upgrade area in the FLASH memory includes: S301, reading pre-stored first upgrade verification information from the EEPROM memory, wherein the EEPROM memory refers to an electrically erasable programmable read-only memory in the vehicle-mounted terminal; S302, reading second upgrade verification information of the upgrade program from the FLASH memory, wherein the upgrade verification information includes: status information corresponding to the upgrade identifier, version information of the upgrade program, and area identifier of the upgrade area; S303, judging whether the first upgrade verification information and the second upgrade verification information are the same, S304, when the first upgrade verification information and the second upgrade verification information are the same, loading the upgrade program in the upgrade area in the FLASH memory, and setting the loading identifier to the first state, the loading identifier is used to indicate whether the software in the FPGA device has been successfully upgraded, and the loading identifier is the first state to indicate that the software in the FPGA device has been successfully upgraded. When the first upgrade verification information and the second upgrade verification information are different, the initial program stored in the initial area in the FLASH memory is loaded, and the loading identifier is set to the second state, wherein the initial program refers to the program written into the FLASH memory when the vehicle corresponding to the upgrade program leaves the factory, and the loading identifier is the second state for indicating that the software upgrade in the FPGA device has failed.

[0110] In the embodiments of the present disclosure, the status information corresponding to the upgrade identifier included in the upgrade verification program, the version information of the upgrade program, and the area identifier of the upgrade area can refer to the description in the above embodiments and will not be repeated in the embodiments of the present disclosure.

[0111] In the disclosed embodiment, the upgrade verification information read from the EEPROM memory is used as the first upgrade verification information, and the upgrade verification information read from the EEPROM memory is used as the second upgrade verification information. The consistency of the first upgrade verification information and the second upgrade verification information means that the status information corresponding to the upgrade identifier, the version information of the upgrade program, and the zone identifier of the upgrade zone included in the two upgrade verification information are completely consistent. If any one of the above three information is inconsistent, the first upgrade verification message and the second upgrade verification message are inconsistent.

[0112] In one embodiment of the present disclosure, if the first upgrade verification information is consistent with the second upgrade verification information, the upgrade program in the upgrade area in the FLASH memory is loaded to complete the upgrade of the application program.

[0113] Specifically, if the first upgrade verification information and the second upgrade verification information are inconsistent, it indicates that there may be an error in the upgrade program in the upgrade area in the FLASH memory. At this time, the FPGA device is used to load the initial program in the initial area included in the FLASH memory. For example, the FPGA device loads the initial program in the initial area corresponding to the area identifier cfg_CBSEL=2'b01.

[0114] In the disclosed embodiment, the initial program is retained in the FLASH memory, and the FPGA can be guaranteed to load the initial program when an upgrade failure occurs in the upgrade program.

[0115] In one embodiment of the present disclosure, the loading flag refers to a flag used to indicate whether the upgrade program has been loaded successfully. If the loading flag is in the first state, it indicates that the loading of the upgrade program is successful. If the loading flag is in the second state, it indicates that the loading of the upgrade program has failed.

[0116] In one embodiment of the present disclosure, if the upgrade program is loaded successfully, the loading flag is set to a first state, and the first state is used to indicate that the upgrade program is loaded successfully, for example, the loading flag is set to 0. If the upgrade program is not loaded successfully, it indicates that the software upgrade has failed, and the loading flag is set to a second state, and the second state is used to indicate that the upgrade program has failed to load, for example, the loading flag is set to 1.

[0117] In the disclosed embodiment, the upgrade program is verified by the upgrade verification information, and the upgrade program is loaded if the verification is successful. Errors in the program writing process are avoided by comparing the EEPROM and FLASH.

[0118] In one embodiment of the present disclosure, the use of the FPGA device to load the upgrade program in the upgrade area includes: after detecting a power-on signal of the FPGA device, starting a pre-loading program; reading status information corresponding to the upgrade identifier; and when the status information corresponding to the upgrade identifier is in a first state, loading the upgrade program in the upgrade area in the FLASH memory.

[0119] The power-on signal refers to the signal for the FPGA device to be powered on again after power failure. The FPGA device loads the preload program, and then reads the status information corresponding to the upgrade identifier. If the status information corresponding to the upgrade identifier is the first state, it indicates that there is an upgrade program in the upgrade area in the FLASH memory. At this time, the step of "loading the upgrade program in the upgrade area in the FLASH memory" is executed.

[0120] In one embodiment of the present disclosure, a hardware structure diagram for executing a software loading method is provided, such as Figure 6 As shown, after the ARM chip sends the upgrade program to the FPGA device, the FPGA device loads the preloaded program in the preloaded area corresponding to cfg_CBSEL=2'b00, and then the FPGA device writes the upgrade program and upgrade verification information into the upgrade area 1 corresponding to the area identifier cfg_CBSEL=2'b10 of the FLASH memory. Then the upgrade verification information is written into the EEPROM memory, and then the upgrade verification information is read from the EEPROM memory and the FLASH memory respectively. If the two upgrade verification information are consistent, the verification is successful, and the upgrade program download process is completed. In the upgrade program loading process, the FPGA device loads the preloaded program in the preloaded area corresponding to cfg_CBSEL=2'b00, and reads the upgrade verification information from the EEPROM memory and the FLASH memory respectively. If the two upgrade verification information are consistent, the verification is successful, and the upgrade program in the upgrade area 1 corresponding to the area identifier cfg_CBSEL=2'b10 is loaded.

[0121] Figure 7 This is a schematic diagram of the structure of a software upgrade device in an embodiment of the present disclosure. This embodiment can be applied to the situation of remotely upgrading the software in a vehicle-mounted FPGA device. The software upgrade device can be implemented in software and / or hardware, and the software upgrade device can be configured in an electronic device. The electronic device is arranged in a vehicle.

[0122] Specifically, Figure 7 As shown, the software upgrade device 70 provided in the embodiment of the present disclosure mainly includes: a preloading module 71, an upgrade program sending module 72 and an upgrade program loading module 73.

[0123] Among them, the preloading module 71 is used to start the preloading program after receiving the upgrade program; the upgrade program writing module 72 is used to use the started preloading program to send the upgrade program to the FLASH memory, so that the FLASH memory writes the upgrade program to the upgrade area; the upgrade program loading module 73 is used to load the upgrade program in the upgrade area in the FLASH memory, and the upgrade program is the program after the software in the FPGA device is upgraded.

[0124] In one embodiment of the present disclosure, an upgrade identifier setting module is used to set the status information corresponding to the upgrade identifier to a first state after the upgrade program is sent to the FLASH memory using a preloaded program after startup, wherein the upgrade identifier is used to indicate whether there is an upgrade program in the upgrade area in the FLASH memory, and the first state of the upgrade identifier is used to indicate that there is an upgrade program in the upgrade area in the FLASH memory.

[0125] In one embodiment of the present disclosure, the upgrade program loading module includes: a first upgrade verification information reading unit, used to read pre-stored first upgrade verification information from an EEPROM memory, wherein the EEPROM memory refers to an electrically erasable programmable read-only memory in a vehicle-mounted terminal; a second upgrade verification information reading unit, used to read second upgrade verification information of the upgrade program from the FLASH memory, wherein the upgrade verification information includes: status information corresponding to the upgrade identifier, version information of the upgrade program, and an area identifier of the upgrade area; an upgrade program loading unit, used to load the upgrade program in the upgrade area in the FLASH memory when the first upgrade verification information and the second upgrade verification information are the same, and set the loading identifier to a first state, the loading identifier is used to indicate whether the software in the FPGA device has been successfully upgraded, and the loading identifier is in the first state to indicate that the software in the FPGA device has been successfully upgraded.

[0126] In one embodiment of the present disclosure, the device also includes: an initial program loading unit, which is used to load the initial program stored in the initial area in the FLASH memory when the first upgrade verification information and the second upgrade verification information are different, and set the loading identifier to a second state, wherein the initial program refers to a program written into the FLASH memory when the vehicle corresponding to the upgrade program leaves the factory, and the loading identifier is the second state for indicating that the software upgrade in the FPGA device has failed.

[0127] In one embodiment of the present disclosure, the device also includes: a verification information acquisition module, which is used to obtain the status information corresponding to the upgrade identifier, the version information of the upgrade program, and the area identification of the upgrade area before reading the pre-stored first upgrade verification information from the EEPROM memory; a verification information writing module, which is used to write the status information corresponding to the upgrade identifier, the version information of the upgrade program, and the area identification of the upgrade area into the EEPROM memory through the IIC interface.

[0128] In one embodiment of the present disclosure, the device also includes: a power-on detection module, which is used to start the pre-loading program after detecting the power-on signal of the FPGA device; an upgrade identifier reading module, which is used to read the status information corresponding to the upgrade identifier; and an upgrade program loading module, which is specifically used to load the upgrade program in the upgrade area in the FLASH memory when the status information corresponding to the upgrade identifier is in the first state.

[0129] In one embodiment of the present disclosure, the upgrade program receiving module is used to receive the upgrade program sent by the ARM processor, the ARM processor is connected to the FPGA device, and the upgrade program in the ARM processor is downloaded from the cloud server.

[0130] Figure 7 The software upgrade device of the illustrated embodiment can be used to execute the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.

[0131] In one embodiment of the present disclosure, a vehicle is provided. The vehicle adopts a software upgrade method as described in any of the above embodiments. The implementation principle and technical effect are similar and will not be repeated here.

[0132] Figure 8 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 8 , which shows a schematic diagram of the structure of an electronic device 800 suitable for implementing the embodiment of the present disclosure. The electronic device 800 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), wearable terminal devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure. Optionally, the electronic device in the embodiments of the present disclosure is an FPGA device.

[0133] like Figure 8As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803 to implement the software upgrade method of the embodiment described in the present disclosure. In the RAM 803, various programs and data required for the operation of the terminal device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0134] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication devices 809 may allow the terminal device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The terminal device 800 is shown to have various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0135] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart, thereby implementing the software upgrade method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 804, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0136] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0137] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0138] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0139] The computer-readable medium carries one or more programs. When the one or more programs are executed by the terminal device, the terminal device implements the method described in any one of the embodiments.

[0140] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0141] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0142] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0143] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0144] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0145] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0146] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0147] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for upgrading software of a field programmable gate array (FPGA) device. It is characterized in that include: After receiving the upgrade program, start the pre-loading program; Sending the upgrade program to the FLASH memory by using the pre-loaded program after startup, so that the FLASH memory writes the upgrade program into the upgrade area; The upgrade program in the upgrade section in the FLASH memory is loaded, wherein the upgrade program is a program after the software in the FPGA device is upgraded.

2. The method according to claim 1, It is characterized in that After sending the upgrade program to the FLASH memory by using the pre-loaded program after startup, the method further includes: The status information corresponding to the upgrade identifier is set to a first status, wherein the upgrade identifier is used to indicate whether there is an upgrade program in the upgrade area in the FLASH memory, and the first status of the upgrade identifier is used to indicate that there is an upgrade program in the upgrade area in the FLASH memory.

3. The method according to claim 2, It is characterized in that The step of loading the upgrade program in the upgrade area in the FLASH memory comprises: Reading pre-stored first upgrade verification information from an EEPROM memory, wherein the EEPROM memory refers to an electrically erasable programmable read-only memory in the vehicle-mounted terminal; Reading second upgrade verification information of the upgrade program from the FLASH memory, wherein the upgrade verification information includes: status information corresponding to the upgrade identifier, version information of the upgrade program, and an area identifier of the upgrade area; When the first upgrade verification information and the second upgrade verification information are the same, the upgrade program in the upgrade area in the FLASH memory is loaded, and the loading identifier is set to a first state, the loading identifier is used to indicate whether the software in the FPGA device has been successfully upgraded, and the loading identifier is in the first state to indicate that the software in the FPGA device has been successfully upgraded.

4. The method according to claim 3, It is characterized in that The method further comprises: When the first upgrade verification information and the second upgrade verification information are different, the initial program stored in the initial area in the FLASH memory is loaded, and the loading identifier is set to the second state, wherein the initial program refers to the program written into the FLASH memory when the vehicle corresponding to the upgrade program leaves the factory, and the loading identifier is the second state for indicating that the software upgrade in the FPGA device has failed.

5. The method according to claim 3, It is characterized in that Before reading the pre-stored first upgrade verification information from the EEPROM memory, the method further includes: Obtain the status information corresponding to the upgrade identifier, the version information of the upgrade program, and the zone identifier of the upgrade zone; The status information corresponding to the upgrade identifier, the version information of the upgrade program, and the area identifier of the upgrade area are written into the EEPROM memory through the IIC interface.

6. The method according to claim 2, It is characterized in that The method further comprises: After detecting a power-on signal of the FPGA device, starting a preloading program; Reading the status information corresponding to the upgrade identifier; When the state information corresponding to the upgrade identifier is in the first state, the upgrade program in the upgrade area in the FLASH memory is loaded.

7. The method according to claim 1, It is characterized in that After receiving the upgrade program and before starting the preloading program, the method further includes: An upgrade program sent by an ARM processor is received, wherein the ARM processor is connected to the FPGA device, and the upgrade program in the ARM processor is downloaded from a cloud server.

8. A software upgrade device for a field programmable gate array FPGA device, It is characterized in that include: A preloading module, used to start the preloading program after receiving the upgrade program; An upgrade program writing module, used to send the upgrade program to the FLASH memory by using the pre-loaded program after startup, so that the FLASH memory writes the upgrade program into the upgrade area; The upgrade program loading module loads the upgrade program in the upgrade area in the FLASH memory, wherein the upgrade program is a program after the software in the FPGA device is upgraded.

9. An electronic device, It is characterized in that include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 7.

10. A vehicle, It is characterized in that The vehicle comprises the FPGA device of claim 8.

11. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by a processor.