CN114443175B - Startup configuration method for missile-borne FPGA (field programmable Gate array) online upgrading - Google Patents

Startup configuration method for missile-borne FPGA (field programmable Gate array) online upgrading Download PDF

Info

Publication number
CN114443175B
CN114443175B CN202210370998.9A CN202210370998A CN114443175B CN 114443175 B CN114443175 B CN 114443175B CN 202210370998 A CN202210370998 A CN 202210370998A CN 114443175 B CN114443175 B CN 114443175B
Authority
CN
China
Prior art keywords
upgrade
image file
file
bit stream
fpga
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210370998.9A
Other languages
Chinese (zh)
Other versions
CN114443175A (en
Inventor
吴江波
张春泽
王仁智
李辰飞
刘建梁
展鹏飞
孔雅
韩杰
杨继超
王轩
奉辉
王凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Xunlian Technology Co ltd
Original Assignee
Tianjin Xunlian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Xunlian Technology Co ltd filed Critical Tianjin Xunlian Technology Co ltd
Priority to CN202210370998.9A priority Critical patent/CN114443175B/en
Publication of CN114443175A publication Critical patent/CN114443175A/en
Application granted granted Critical
Publication of CN114443175B publication Critical patent/CN114443175B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories

Abstract

The invention provides a starting configuration method for missile-borne FPGA (field programmable gate array) online upgrading, which comprises the following steps of: the upper computer downloading module sends the FPGA configuration file to the FPGA module; the FPGA module writes the FPGA configuration file into a Flash memory; finishing the rapid start configuration of the FPGA configuration file based on a Flash programming algorithm to obtain an upgrade image file and a G image bit stream file; checking the integrity of the upgrade image file based on a CRC32 algorithm; and restarting the missile-borne product to complete configuration. According to the starting configuration method for the missile-borne FPGA online upgrading, the FPGA program can be upgraded online by utilizing the interface of the missile-borne product under the condition that an external interface is not increased, so that the product volume and the cost are greatly reduced; the method is completed without a special downloader, professional software and professionals, is simple to use and maintain and easy to operate, and reduces the risk of test failure; the starting time is short, and the missile-borne data acquisition is not easy to lose.

Description

Startup configuration method for missile-borne FPGA online upgrade
Technical Field
The invention belongs to the technical field of missile-borne product FPGA starting configuration, and particularly relates to a starting configuration method for online upgrading of a missile-borne FPGA.
Background
With the rapid development of national defense industry, target range test items of missile-borne products are gradually increased, and FPGA programs of the products are frequently upgraded on site. The traditional upgrading of the FPGA program needs to use a downloader to connect with the FPGA through a JTAG interface, and has the following main disadvantages:
the JTAG interface needs TMS, TCK, TDI, TDO, GND and VCC connection points, and when the missile-borne product needs miniaturization, the product cost and the product volume can be increased by leading out the JTAG interface;
a special downloader and professional software are required to be used, and are upgraded by professional personnel, so that the use conditions are harsh, the research and development cost and the maintenance work are increased, and the popularization and the use are not facilitated;
JTAG interfaces are often designed inside products, the products need to be uncovered for processing, reliability cannot be guaranteed when the products are disassembled and assembled, and the risk of test failure is increased.
The remote upgrading of the FPGA can be realized by utilizing the MultiBoot and Fallback characteristics of the FPGA, but the method is relatively complex, the G mirror image cannot be updated, the configuration starting time is more than twice of the standard configuration time, and the loss of key data can be caused by the fact that the missile parameter acquisition time is too long.
Disclosure of Invention
In view of the above, the present invention aims to provide a start configuration method for on-line upgrade of a missile-borne FPGA, so as to solve the problems that the use of JTAG interface contacts for program upgrade of a missile-borne product is too many, the use conditions are harsh, and a fault is easily caused, and also solve the problems that the method using MultiBoot and Fallback features is complex and the configuration time is long.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a startup configuration method for missile-borne FPGA online upgrade comprises the following steps:
s1, the upper computer downloading module calls the bit stream file to be upgraded;
s2, starting a PROMGEN tool to generate a bit stream upgrade file based on the bit stream file in the step S1;
s3, executing Perl script to generate a quick start mirror image based on the bit stream upgrading file in the step S2, and generating a mirror image file needing upgrading;
s4, sending the image file to be upgraded to an FPGA module of the missile-borne product through a transmission channel;
s5, the FPGA module writes the image file to be upgraded to a Flash memory of the missile-borne product;
s6, finishing the rapid start configuration of the image file to be upgraded based on the Flash programming algorithm to obtain an upgraded image file and a G image bit stream file;
s7, checking the integrity of the upgrade image file based on a CRC32 algorithm;
and S8, restarting the missile-borne product, and completing the configuration of the FPGA module.
Further, the FPGA module and the upper computer downloading module in step S5 are connected by an interface cable, and the FPGA module and the Flash memory are communicatively connected to each other.
Further, the transmission channel in step S4 is one of a serial port, a network port, a USB disk, and an SD card.
Further, the image file fast boot configuration requiring upgrading in step S6 includes the following steps:
a1, dividing a Flash memory into three areas, namely a quick start frame header area, a G bit stream mirror image storage area and an upgrade bit stream mirror image storage area, wherein the quick start frame header area comprises a key switch word and a start skip sequence list;
a2, reading from the Flash memory address A0, obtaining the key switch word of the quick start frame header area, and executing the step A3 or the step A4 according to the value of the key switch word;
a3, if the keyword is 'ON', it indicates that the configuration of the upgrade bit stream mirror image is executed, according to the start jump sequence table of the quick start frame header region, jump to the address A1 of the upgrade bit stream mirror image storage region, and then load the bit stream file, to obtain the upgrade mirror image file;
a4, if the key switch word is OFF, indicating to execute the configuration of the G image file, ignoring the start jump sequence table of the quick start frame header region, continuously reading the address data of the Flash memory, and loading the bit stream file from the G bit stream image storage region to obtain the G image bit stream file.
Further, the generation of the upgrade image file in step a3 includes the following steps:
b1, generating a bit stream file of the FPGA module, and distributing the bit stream file in an upgrading area in the Flash memory;
b2, filling the rest part of the upgrading area with null characters;
b3, calculating the complement of CRC32 according to step B1 and step B2, and putting the complement of CRC32 into the last 32 bits of the upgrade area to generate an upgrade image file.
Further, the Flash programming algorithm in step S6 includes the following steps:
c1, erasing the sector containing key switch words in the quick start frame header region;
c2, erasing the area of the image file which needs to be upgraded in the quick start frame header area;
c3, programming the image file to be upgraded to the area of the Flash memory to be upgraded;
c4, confirming that the image file needing to be upgraded is correctly written through a CRC32 algorithm;
and C5, confirming whether the check code of the CRC32 algorithm is correct, if so, programming the key switch word to enable the key switch word to be in an 'ON' state, and if not, failing to program, and exiting.
Further, the checking of the integrity of the upgrade image file based on the CRC32 algorithm in step S7 includes the steps of:
d1, starting a programming logic in the FPGA module to read data in an upgrading area, wherein the data in the upgrading area comprises a CRC32 complement code;
d2, performing CRC32 calculation on the data of the upgrade area and the CRC32 complement code in the upgrade area to obtain a CRC32 calculated value;
d3, judging whether the CRC32 calculated value is matched with a known constant stored in the FPGA module; if yes, confirming that the upgrade image file has integrity; and if not, confirming that the upgrade image file does not have integrity.
Compared with the prior art, the startup configuration method for the missile-borne FPGA online upgrade has the following advantages:
(1) according to the starting configuration method for the missile-borne FPGA online upgrading, the FPGA program can be upgraded online by utilizing the interface of the missile-borne product under the condition that an external interface is not increased, so that the product volume and the cost are greatly reduced; the method is completed without a special downloader, professional software and professionals, is simple to use and maintain and easy to operate, and reduces the risk of test failure; the starting time is short, and the missile-borne data acquisition is not easy to lose.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic diagram illustrating connection of modules in a configuration starting method according to an embodiment of the present invention;
fig. 2 is a schematic block diagram of an implementation of a boot configuration method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating the generation of an FPGA configuration file according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a configuration for fast starting an image file to be updated according to an embodiment of the present invention;
FIG. 5 is a flow chart of an FPGA of a Flash programming algorithm according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a method for implementing fast start-up online upgrade based on a UART interface according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a state flow of the SpiFlashPro sub-module according to the embodiment of the present invention.
Description of reference numerals:
1. the upper computer downloads the module; 2. a product is missile-borne; 21. an FPGA module; 22. and a Flash memory.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention. Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first," "second," etc. may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless otherwise specified.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art through specific situations.
The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
The noun explains:
FPGA: fpga (field Programmable Gate array) is a product of further development on the basis of Programmable devices such as PAL (Programmable array logic) and GAL (general array logic). The circuit is a semi-custom circuit in the field of Application Specific Integrated Circuits (ASIC), not only overcomes the defects of the custom circuit, but also overcomes the defect that the number of gate circuits of the original programmable device is limited.
A Flash memory: the Flash memory is a Non-Volatile (Non-Volatile) memory, which belongs to a memory device.
PROMGen tool: prommen is a convenient prometheus profile generation tool that can help us generate and manage prometheus profiles, while allowing for the configuration of case alert rules and notification options. Developed based on python.
CRC 32: in the field of data storage and data communication, a crc (cyclic Redundancy check) check utility library has to adopt means for detecting errors in order to ensure the correctness of data. Among many error detection measures, CRC is the most well-known one. The CRC is collectively referred to as a cyclic redundancy check.
Perl: perl, a functionally rich computer programming language, which runs on over 100 computer platforms, is widely used, originally developed for text processing, and is now used for a variety of tasks including system management, Web development, Web programming, GUI development, and the like.
As shown in fig. 1 to 7, a start configuration method for missile-borne FPGA online upgrade includes the following steps:
s1, the upper computer downloading module 1 calls a bit stream file needing to be upgraded;
s2, starting a PROMGEN tool to generate a bit stream upgrade file based on the bit stream file, and proceeding to the step S3;
s3, executing a Perl script to generate a quick start mirror image based on the bit stream upgrading file;
s4, generating an image file to be upgraded after the quick start image is completed;
s5, sending the image file to be upgraded to the FPGA module 21 in the missile-borne product 2 through a transmission channel;
s6, the FPGA module 21 writes the image file to be upgraded to the Flash memory 22;
s7, finishing the rapid start configuration of the image file to be upgraded based on the Flash programming algorithm of the FPGA module 21 to obtain an upgraded image file and a G image bit stream file;
s8, checking the integrity of the upgrade image file based on the CRC32 algorithm;
and S9, restarting the missile-borne product 2, and completing the configuration of the FPGA module 21.
The starting configuration method has the following advantages:
can complete the on-line upgrade of the FPGA program by utilizing the interface of the missile-borne product under the condition of not increasing an external interface, thereby greatly reducing the volume and the cost of the product,
the method is completed without a special downloader, professional software and professionals, is simple to use and maintain and easy to operate, and reduces the risk of failure of the test.
The starting time is short, and the missile-borne data acquisition is not easy to lose.
The method puts the burden of programming error and interrupt recovery on the adjustment of a programming algorithm, and completes the whole solution based on a special configuration header. The method is powerful, compatible with many configuration setting variants and highly reliable.
In this embodiment, this patent mainly comprises host computer download module 1, missile-borne product 2 two parts. The upper computer downloading module 1 is connected with the missile-borne product 2 through an interface cable. As shown in fig. 1.
The generation of the new FPGA configuration file is mainly performed by a developer on site or remotely, and a specific operation flow is shown in fig. 3.
The method comprises the steps of preparing a bit stream file to be upgraded, starting a PROMGen tool, generating a bit stream upgrade file (in a mcs format) to be a normal FPGA module 21 programming operation step, generating a quick start mirror image by a Perl script, generating an initial mcs storage mirror image file and an upgrade mcs mirror image file after the execution is finished, and selecting one of the mirror image files according to the requirement of the initial state of a system or whether the upgrade is required.
The initial mcs storage image file is mainly a complete initial image and mainly comprises the following three parts:
quickly starting a frame header;
a G bitstream file;
upgrading the bitstream file, a copy of the given bitstream file;
the initial mcs memory image file is mainly used for initial programming of the Flash memory 22.
The upgrade mcs image file mainly contains a given bitstream file, and the integrity of this bitstream file is mainly completed by the CRC32 check code.
The FPGA module 21 is connected with the upper computer downloading module 1 through an interface cable, and the FPGA module 21 is in communication connection with the Flash memory 22.
The transmission channel in step S5 is one of a serial port, a network port, a USB disk, and an SD card. In the present embodiment, the kind of the transmission channel is not limited to the above channel.
The image file quick boot configuration requiring the upgrade in step S8 includes the steps of:
a1, dividing a Flash memory into three areas, namely a quick start frame header area, a G bit stream mirror image storage area and an upgrade bit stream mirror image storage area, wherein the quick start frame header area comprises a key switch word and a start skip sequence list;
a2, reading from address A0 of Flash memory 22, obtaining the key switch word of the fast start frame header region, and executing step A3 or step A4 according to the value of the key switch word;
a3, if the keyword is "ON", it indicates that the configuration of the upgrade bit stream mirror image is executed, according to the start jump sequence table of the quick start frame header region, it jumps to the address A1 of the upgrade bit stream mirror image storage region, and then loads the bit stream file to obtain the upgrade mirror image file;
a4, if the key switch word is OFF, indicating to execute the configuration of the G image file, ignoring the start jump sequence table of the quick start frame header region, continuously reading the address data of the Flash memory 22, and loading the bit stream file from the G bit stream image storage region to obtain the G image bit stream file.
The generation of the upgrade image file in step a3 includes the steps of:
b1, generating a bit stream file of the FPGA module 21, and distributing the bit stream file in an upgrading area in the Flash memory 22;
b2, filling the rest part of the upgrading area with null characters;
b3, calculating the complement of CRC32 according to step B1 and step B2, and putting the complement of CRC32 into the last 32 bits of the upgrade area to generate an upgrade image file.
In this embodiment, fig. 4 illustrates a configuration method for performing upgrade quick start of an mcs file (an image file that needs to be upgraded). The configuration method for fast start is to divide the Flash memory 22 into three areas, namely a fast start frame header area, a G bit stream mirror image storage area and an upgrade bit stream mirror image storage area. Wherein, the frame head region of the quick start frame comprises an important switch word and a start jump sequence table.
The key switch word is a key for rapidly starting the configuration method, the key switch word is always in an "ON" or "OFF" state, when the key switch word is in the "ON" state, the FPGA module 21 loads the upgrade image file, and when the key switch word is in the "OFF" state, the FPGA module 21 loads the G image file. The key is a set of specific values and is determined to be in the "ON" state only if the key contains a set of accurate, predetermined values, and the presence or absence of the key determines whether the FPGA module 21 configuration logic is to execute the boot jump sequence.
Value of key switch word
Configuration modes BPI Flash starting mode SPI Flash start mode
Value of key switch word 0x000000BB 0XAA995566
The fast reading starting configuration method comprises the following steps:
step 1, reading from a Flash memory address A0 to obtain a key switch word for quickly starting a frame header. Executing step 2 or step 3 according to the value of the key switch word;
and 2, if the key switch word is 'on', the configuration of upgrading the bit stream image is executed. According to the starting jump sequence of the quick starting frame header, jumping to an address A1 of an upgrading bit stream mirror image storage area, and then loading a bit stream file;
and 3, if the key switch word is OFF, indicating that the configuration of the G image file is executed. And ignoring the starting jump sequence of the quick starting frame header, continuously reading the address data of the Flash memory 21, and loading the bit stream file from the G bit stream mirror image storage area.
The reliability of the method for quickly starting the programming of the Flash memory 21 is mainly determined by the programming process of the upgrading bit stream. The reliability of the Flash memory 21 programming process mainly needs the following conditional measures:
the key must be in the "OFF" state before attempting to edit the updated bitstream file, leaving the key at any value other than "ON".
When the update bit stream is verified to be free of problems, the key switch word can be turned ON and is in an 'ON' state.
To ensure integrity under all conditions, the G-image file and the second part of the fast-start header are not edited under burn-in conditions.
Thus, upgrading the bitstream file of the image file region is performed only when the key switch word is in the "ON" state. The above conditions 1 and 2 ensure that the start skip sequence may not be performed if the upgrade image file region does not contain the correct bitstream file, and the condition 3 ensures that the G image bitstream file can be safely loaded when the key switch word is "OFF".
The Flash programming algorithm in step S7 includes the steps of:
c1, erasing the sector containing key switch words in the quick start frame header region;
c2, erasing the area of the image file which needs to be upgraded in the quick start frame header area;
c3, programming the image file to be upgraded to the area of the Flash memory 22 to be upgraded;
c4, confirming that the image file needing to be upgraded is correctly written through a CRC32 algorithm;
and C5, confirming whether the check code of the CRC32 algorithm is correct, if so, programming the key switch word to enable the key switch word to be in an 'ON' state, and if not, failing to program, and exiting.
Checking the integrity of the upgrade image file based on the CRC32 algorithm in step S8 includes the steps of:
d1, starting a programming logic in the FPGA module 21 to read data in an upgrading area, wherein the data in the upgrading area comprises a CRC32 complement code;
d2, performing CRC32 calculation on the data of the upgrading area and the CRC32 complement code in the data to obtain a CRC32 calculated value;
d3, judging whether the CRC32 calculated value is matched with a known constant stored in the FPGA module 21; if yes, confirming that the upgrade image file has integrity; and if not, confirming that the upgrade image file does not have integrity.
In this embodiment, the algorithm for rapidly starting the Flash programming is mainly completed by the FPGA logic, and the flow of the Flash programming algorithm is as shown in fig. 5.
Programming of the Flash memory 22 requires two operations, first an erase operation to reset the memory data bits to the 1 state, and then a programming operation to change the data bits from the 1 state to the 0 state. Since the modification of the Flash memory 22 requires an erase operation and the erase operation affects the partitioning of the entire Flash memory 22, the partitioning architecture of the Flash memory 22 determines the location of the fast read boot portions in the Flash memory 22. The specific positions are as follows:
firstly, quickly starting a frame header;
the first part of the quick start frame header, namely the key switch word, is positioned in an erasable area, such as a first sector;
a second part of the fast start frame header, which is located after the first part but is not in the same partition as the first part, such as in a second sector;
g image file is positioned behind the frame head of the fast reading starting frame in the memory;
the upgrade image file is located in an erasable area of itself, but does not share an erasable partition with the G-image to avoid destroying the integrity of the G-image file during upgrade operations.
The robustness and reliability of the fast boot configuration scheme depends on whether the fast boot programming reliably detects the authenticity of the upgrade image file. To confirm the correctness of the upgrade image file in Flash memory 22, the integrity of the upgrade image file is confirmed using a CRC32 check. The specific method comprises the following steps:
generating a bit stream file of the FPGA by adopting an FPGA special tool (the prior art);
padding the remainder of the upgrade area with a null character of 0 xFFFFFFFF;
the complement of CRC32 is calculated according to step 1 and step 2.
The upgraded image file is distributed in a fixed area in the Flash memory 22, and according to the partition architecture of the Flash memory 22, for the convenience of erasing and programming, the starting end and the ending end of the boundary of the update area are erasable ends of the distribution area, specifically based on a Flash memory chip manual. When the upgrade image file generates an mcs-formatted file, a CRC32 check calculates the entire upgrade image file except for the last 32 bits, and the calculated CRC32 complement is placed on the last 32 bits of the upgrade region, such that the integrity of the entire upgrade file is protected by the CRC32 check code. To validate the image file programmed into Flash memory 22, the FPGA internal fast boot programming logic reads the data of the entire upgrade area, including the complement of CRC32, and performs a CRC32 calculation. When the CRC32 calculated value matches a known constant, the integrity of the upgrade image file is confirmed to be good.
In this embodiment, the upper computer downloading module 1, the FPGA module 21, and the Flash memory 22 are all the prior art.
Example 1
In practical applications, UART is the most used and most convenient interface protocol. The method can be quickly upgraded and applied on the missile-borne product on line, so that the number of interface contacts can be greatly reduced, and the use and maintenance are convenient. FIG. 6 is a method for implementing rapid start of online upgrade based on UART.
The upper computer sending software module (i.e. the upper computer downloading module 1) mainly sends the upgrade image file to the FPGA module 21 through a serial port, each frame of data is 515 bytes, the first three bytes are frame headers, and the last 512 bytes are upgrade image valid data. After the software starts to load, click the start programming button, and send a start command 0xEB9000 first, until receiving 0xAABB sent by the FPGA module 21, start sending the upgrade image file. After each frame of data is sent, the next frame of data can be sent after the 0 xABB command is received, and the header of each frame of data is 0xEB9001, and the header of the last frame of data is 0xEB 9002.
In this embodiment, mainly include the UART submodule piece, FIFO submodule piece, SpiFlashIn interface submodule piece, SpiFlashPro submodule piece in the FPGA module 21, the UART submodule piece, FIFO submodule piece, SpiFlashIn interface submodule piece, SpiFlashPro submodule piece are prior art, and the UART submodule piece realizes serial ports transmit-receive protocol by the FPGA logic, receives the data that host computer software sent, exports next-level FIFO buffer. After the data of one frame is received, a0 xABB command is sent to indicate that the data is received completely and ready to receive the next frame.
The FIFO submodule mainly realizes the functions of data buffering and bit width conversion of the upgrade image file.
The SpiFlashin interface submodule mainly realizes the function of data interaction between the FPGA module 21 and the Spi Flash memory 22 according to the SPI interface time sequence.
The SpiFlashPro sub-module is mainly used for programming state conversion, realizes quick start of a programming algorithm, and sends instructions and data to the Flash memory 22 and receives data and the like by using the SpiFlashIn sub-module. FIG. 7 is a SpiFlashPro sub-module state flow diagram.
The CRC32 check polynomial is:
G(x) = x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1
the constant value is 0xC704DD 7B. Pl tools can be used to generate verilog implementation code for CRC 32.
Based on the principle description and the operation method, the programming of the upgrade image file is quickly started, the FPGA is electrified again, and the G image file or the upgrade image file can be loaded and started according to the state of the key switch word.
The method can be applied according to actual conditions, saves the number of the core wires of the programming interface, can be operated by common personnel, is convenient to maintain and use, reduces the fault risk caused by disassembly, and has high reliability.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (3)

1. A startup configuration method for missile-borne FPGA online upgrade is characterized by comprising the following steps: the method comprises the following steps:
s1, the upper computer downloading module (1) calls a bit stream file needing to be upgraded;
s2, starting a PROMGEN tool to generate a bit stream upgrade file based on the bit stream file in the step S1;
s3, executing a Perl script to generate a quick start mirror image based on the bit stream upgrading file in the step S2, and generating a mirror image file needing to be upgraded;
s4, sending the image file to be upgraded to the FPGA module (21) of the missile-borne product (2) through a transmission channel;
s5, the FPGA module (21) writes the image file to be upgraded to the Flash memory (22) of the missile-borne product (2);
s6, finishing the rapid start configuration of the image file to be upgraded based on the Flash programming algorithm to obtain an upgraded image file and a G image bit stream file;
the image file fast boot configuration requiring upgrade in step S6 includes the following steps:
a1, dividing a Flash memory (22) into three areas, namely a quick start frame header area, a G bit stream mirror image storage area and an upgrade bit stream mirror image storage area, wherein the quick start frame header area comprises a key switch word and a start skip sequence table;
a2, reading from address A0 of Flash memory (22), obtaining the key switch word of the fast start frame header region, and executing step A3 or step A4 according to the value of the key switch word;
a3, if the keyword is "ON", it indicates that the configuration of the upgrade bit stream mirror image is executed, according to the start jump sequence table of the quick start frame header region, it jumps to the address A1 of the upgrade bit stream mirror image storage region, and then loads the bit stream file to obtain the upgrade mirror image file;
a4, if the key switch word is OFF, the configuration of the G image file is executed, the starting jump sequence table of the fast starting frame head area is ignored, the address data of the Flash memory (22) is continuously read, and the bit stream file is loaded from the G bit stream image storage area to obtain the G image bit stream file;
the generation of the upgrade image file in step a3 includes the steps of:
b1, generating a bit stream file of the FPGA module (21), and distributing the bit stream file in an upgrading area in the Flash memory (22);
b2, filling the rest part of the upgrading area with null characters;
b3, calculating the complement of CRC32 according to the step B1 and the step B2, and putting the complement of CRC32 into the last 32 bits of the upgrading area to generate an upgrading image file;
the Flash programming algorithm in step S6 includes the steps of:
c1, erasing the sector containing key switch words in the quick start frame header region;
c2, erasing the area of the image file which needs to be upgraded in the quick start frame header area;
c3, programming the image file to be upgraded to the area of the Flash memory (22) to be upgraded;
c4, confirming that the image file needing to be upgraded is correctly written through a CRC32 algorithm;
c5, confirming whether the check code of the CRC32 algorithm is correct, if so, programming the key switch word to enable the key switch word to be in an ON state, otherwise, not programming successfully, and exiting;
s7, checking the integrity of the upgrade image file based on a CRC32 algorithm;
checking the integrity of the upgrade image file based on the CRC32 algorithm in step S7 includes the steps of:
d1, the FPGA module (21) internally starts the programming logic to read the data of the upgrading area, and the data of the upgrading area comprises CRC32 complement codes;
d2, performing CRC32 calculation on the data of the upgrading area and the CRC32 complement code in the data to obtain a CRC32 calculated value;
d3, judging whether the CRC32 calculated value is matched with a known constant stored in the FPGA module (21) or not; if yes, confirming that the upgrade image file has integrity; if not, confirming that the upgrade image file does not have integrity;
and S8, restarting the missile-borne product (2) and completing the configuration of the FPGA module (21).
2. The startup configuration method for the on-line upgrade of the missile-borne FPGA according to claim 1, characterized in that: in the step S5, the FPGA module (21) is connected to the upper computer download module (1) through an interface cable, and the FPGA module (21) and the Flash memory (22) are in communication connection with each other.
3. The startup configuration method for the on-line upgrade of the missile-borne FPGA according to claim 1, characterized in that: the transmission channel in step S4 is one of a serial port, a network port, a USB disk, and an SD card.
CN202210370998.9A 2022-04-11 2022-04-11 Startup configuration method for missile-borne FPGA (field programmable Gate array) online upgrading Active CN114443175B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210370998.9A CN114443175B (en) 2022-04-11 2022-04-11 Startup configuration method for missile-borne FPGA (field programmable Gate array) online upgrading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210370998.9A CN114443175B (en) 2022-04-11 2022-04-11 Startup configuration method for missile-borne FPGA (field programmable Gate array) online upgrading

Publications (2)

Publication Number Publication Date
CN114443175A CN114443175A (en) 2022-05-06
CN114443175B true CN114443175B (en) 2022-06-24

Family

ID=81359532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210370998.9A Active CN114443175B (en) 2022-04-11 2022-04-11 Startup configuration method for missile-borne FPGA (field programmable Gate array) online upgrading

Country Status (1)

Country Link
CN (1) CN114443175B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117171097A (en) * 2023-08-31 2023-12-05 中科驭数(北京)科技有限公司 Remote loading method and system for field programmable gate array
CN116893858B (en) * 2023-09-11 2023-12-12 西安智多晶微电子有限公司 Configuration method for fast starting PCIe (peripheral component interconnect express) by FPGA (field programmable gate array)

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103595802B (en) * 2013-11-19 2016-09-07 烽火通信科技股份有限公司 The method that home gateway remote software is upgraded automatically
CN105786573B (en) * 2016-03-16 2019-04-26 烽火通信科技股份有限公司 Quickly upgrade the method and system of ZigBee controller in smart home
CN106598650A (en) * 2016-11-25 2017-04-26 积成电子股份有限公司 Device and method for online upgrade of FPGA program based on fiber communication
CN106598654B (en) * 2016-11-30 2020-09-04 中国兵器装备集团自动化研究所 Method for updating PowerPC mainboard boot chip on line
CN108182078B (en) * 2016-12-08 2021-03-12 北京机电工程研究所 Optimized missile-borne device non-dismantling software online upgrading method
CN107193567A (en) * 2017-05-25 2017-09-22 湖北航天技术研究院总体设计所 Missile-borne dsp software clean boot generation patterns and its realize system, system preparation method
CN107391143B (en) * 2017-07-27 2020-05-19 中通客车控股股份有限公司 T-Box remote upgrading method
CN109634642A (en) * 2018-11-15 2019-04-16 中国航空工业集团公司洛阳电光设备研究所 A kind of method of FPGA configuration file remote upgrade
CN110231949A (en) * 2019-06-25 2019-09-13 广东小天才科技有限公司 Method for upgrading system, device, electronic equipment and storage medium
CN111371610A (en) * 2020-02-29 2020-07-03 苏州浪潮智能科技有限公司 Network card firmware batch refreshing method, system, terminal and storage medium
CN112148341B (en) * 2020-10-29 2023-11-21 合肥埃科光电科技股份有限公司 FPGA online upgrading method based on NiosII soft core
CN112685068B (en) * 2021-01-11 2023-07-14 浪潮软件科技有限公司 Method for remotely upgrading BOOT image file and computer readable medium
CN113377408B (en) * 2021-06-08 2023-07-14 北京计算机技术及应用研究所 High-reliability SRAM type FPGA online upgrading method and system
CN113434168A (en) * 2021-06-18 2021-09-24 追目智能科技(上海)有限公司 Vehicle-mounted network architecture self-adaptive upgrading method based on intelligent hardware computing power

Also Published As

Publication number Publication date
CN114443175A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
CN114443175B (en) Startup configuration method for missile-borne FPGA (field programmable Gate array) online upgrading
US6622246B1 (en) Method and apparatus for booting and upgrading firmware
US20090187703A1 (en) Memory card and its initial setting method
CN110618903A (en) Electronic equipment testing method and device
US8601464B2 (en) Memory online update system and method
US7418589B2 (en) System and method for updating a basic input/output system
CN112379932B (en) Boot method and device of electronic equipment and electronic equipment
CN108182078B (en) Optimized missile-borne device non-dismantling software online upgrading method
US20050207232A1 (en) Access method for a NAND flash memory chip, and corresponding NAND flash memory chip
US9721665B2 (en) Data writing method and system
CN113946361A (en) Chip FPGA static global upgrade reconstruction method, system, equipment and medium thereof
CN100363893C (en) Loading system and method
US7490321B2 (en) Method for updating firmware via determining program code
CN116755735A (en) Online upgrading method and device for embedded software, peritoneal dialysis instrument and storage medium
CN114356365A (en) Remote updating method based on PSoC chip
US7076643B2 (en) Method and apparatus for providing revision identification numbers
US11586504B2 (en) Electronic apparatus and boot method thereof
CN114281390A (en) Zynq 7000-based online upgrading system and method
CN111352764A (en) Chip repairing method, device, equipment and storage medium
US6961869B2 (en) Electronic apparatus and correction method
CN111813597A (en) Air conditioner
US6990610B2 (en) Combining commands to form a test command
KR100624723B1 (en) Mobile communication terminal managing hardware version and its operating method
CN117171097A (en) Remote loading method and system for field programmable gate array
CN117193833B (en) Industrial control application firmware online upgrading method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant