Test machine resource board card reconfiguration and configuration failure rollback method and system

By dividing the firmware storage area and firmware upgrade area in Flash memory, and providing support by the firmware storage area after the update interruption, the problem of the motherboard being unable to start due to the interruption of resource board update is solved, and the system reliability and fault tolerance are improved. Extends the service life of Flash memory.

CN118981390AInactive Publication Date: 2024-11-19HANGZHOU GAOKUN ELECTRONIC TECHNOLOGY CO LTD

Patent Information

Application Number
CN202411475883.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2024-11-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In automatic testing equipment, the firmware update process of the resource board is prone to interruption due to power failure or network failure, which causes the motherboard to fail to start normally and cannot continue Flash update.

Method used

The storage space of Flash memory is divided into a firmware storage area and a firmware upgrade area. The firmware storage area stores the basic firmware that supports the normal operation of the motherboard, and the firmware upgrade area stores new firmware data. During the update process, the new firmware is written to the firmware upgrade area. If an update interrupt is detected, the firmware support will be provided by the firmware storage area after the motherboard is restarted, and the firmware upgrade area will be reupdated. After the update is completed, the new firmware data is checked through the FPGA to determine whether it is consistent with the original data to determine whether the update is successful.

Benefits of technology

Ensure that even if the update is interrupted, the motherboard can start normally and continue to complete the interrupted update process, which improves the system's reliability and fault tolerance, extends the service life of the Flash memory, and improves the update efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981390A_ABST
    Figure CN118981390A_ABST
Patent Text Reader

Abstract

The invention provides a test machine resource board card reconfiguration and configuration failure rollback method and system, and relates to the field of firmware updation.The method comprises the steps that the storage space of a Flash memory is divided into a firmware storage area and a firmware upgrading area; in the process of updating the Flash memory, writing new firmware data used for Flash updating into the firmware upgrading area; if it is detected that updating of the firmware upgrading area is interrupted, updating the firmware upgrading area again after the mainboard is restarted; after updating is completed, the new firmware data written into the Flash memory are verified through the FPGA; if it is detected that the new firmware data written into the Flash memory is the same as the new firmware data before the new firmware data is written into the Flash memory in the verification process, it is judged that configuration of the test machine resource board card is completed. By implementing the method, the mainboard can be normally started even if the update is interrupted, and the interrupted update process can be continuously completed, so that the reliability and the fault-tolerant capability of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of firmware update, and in particular to a method and system for reconfiguring resource boards of a test machine and for falling back upon configuration failure. Background Art

[0002] Reconfiguration of the tester resource board usually refers to reconfiguring or upgrading the resource board on the tester in the automatic test equipment (ATE) according to the changes in test requirements. The firmware on the resource board is generally stored in the Flash memory of the motherboard. During the reconfiguration or upgrade process, the Flash memory needs to be updated.

[0003] In the related art, the update process of the Flash memory is mainly to first erase the data in the Flash memory, then write the new firmware data used for reconfiguration or upgrading of the resource board into the Flash memory, and then read the new firmware data back to the host computer (PC) to compare it with the new firmware data before writing into the Flash, so as to determine whether the upgrade is successful.

[0004] However, in the process of updating the flash memory by the related technology, power failure or network failure may occur, resulting in update interruption, causing the firmware to be partially updated or damaged, thereby causing the mainboard to malfunction or fail to start normally. Summary of the invention

[0005] The present application provides a method and system for reconfiguring resource boards of a testing machine and for configuration failure fallback, which are used to solve the problem that the mainboard cannot start normally after an update is interrupted, resulting in the inability to continue the flash update.

[0006] In a first aspect, the present application provides a test machine resource board reconfiguration and configuration failure fallback method, which is applied to a resource board reconfiguration system, and the method includes: The storage space of the Flash memory is divided into a firmware storage area and a firmware upgrade area. The firmware storage area stores basic firmware data for supporting the normal operation of the mainboard, and the firmware upgrade area stores new firmware data for Flash update. In the process of updating the Flash memory, new firmware data for Flash update is written into the firmware upgrade area, and the firmware upgrade area is used to provide firmware support for the operation of the updated mainboard; If it is detected that the update of the firmware upgrade area is interrupted, the firmware upgrade area is updated again after the mainboard is restarted, and the firmware storage area provides firmware support for the mainboard during the restart process; After the update is completed, the new firmware data written into the Flash memory is verified through the FPGA; During the verification process, if it is detected that the new firmware data written into the Flash memory is the same as the new firmware data before being written into the Flash memory, it is determined that the configuration of the resource board of the test machine is completed.

[0007] Through the above-mentioned embodiments, the resource board reconfiguration system divides the storage space of the Flash memory into two parts: a firmware storage area and a firmware upgrade area. The firmware storage area stores the basic firmware that supports the normal operation of the mainboard, and the firmware upgrade area stores the new firmware for updating. During the update process, the new firmware is written to the firmware upgrade area. If the update is interrupted, the firmware storage area provides firmware support after the mainboard is restarted, and the firmware upgrade area is updated again. After the update is completed, the new firmware data written to the Flash is verified by the FPGA to determine whether it is consistent with the firmware before the update, thereby determining whether the update is successful. This method ensures that even if the update is interrupted, the mainboard can start normally and can continue to complete the interrupted update process, thereby improving the system reliability and fault tolerance.

[0008] In some embodiments, in the process of updating the Flash memory, before the step of writing the new firmware data for Flash update into the firmware upgrade area, the method further includes: Determining a suitable storage area in the firmware upgrade area according to the size of the new firmware data; Erase the data in the storage area.

[0009] Through the above embodiment, before writing the new firmware, the resource board reconfiguration system first determines the appropriate storage area in the upgrade area according to the size of the new firmware, and erases the original data in the area. This can avoid unnecessary erasing operations, reduce the number of erasing and writing times of the Flash memory, and extend the life of the Flash. At the same time, selectively erasing part of the data in the firmware upgrade instead of erasing all the data improves the update efficiency of the Flash memory.

[0010] In some embodiments, the step of determining a suitable storage area in the firmware upgrade area according to the size of the new firmware data specifically includes: Determine the required number of blocks according to the size of the new firmware data; Get the number of read and write times for each block in the storage area; A preset number of blocks with the least number of read and write times are determined as the appropriate storage area.

[0011] Through the above embodiment, the resource board reconfiguration system first determines the required number of blocks, and then selects the block with the least number of read and write times in the upgrade area as the actual storage area. This approach balances the number of erase and write times and the degree of aging of each storage block, avoids the imbalance of the use intensity between blocks, and prolongs the service life of the Flash memory as a whole.

[0012] In some embodiments, the step of verifying the new firmware data written into the Flash memory by the FPGA after the update is completed specifically includes: Read back the new firmware data written into the Flash memory; Determine whether the new firmware data written into the Flash memory is the same as the new firmware data temporarily stored in the FPGA; If so, it is determined that the test machine resource board has completed configuration; If not, it is determined that the test machine resource board configuration has failed.

[0013] Through the above-mentioned embodiment, the resource board reconfiguration system compares the new firmware data written into the Flash storage area with the new firmware data before writing, and judges whether the Flash update of the test machine resource board is completed based on whether the two are consistent. This step fully utilizes the parallel computing capability of FPGA by introducing FPGA to assist Flash reading, writing and verification, speeds up the data transmission and comparison, and makes the verification process no longer need to be performed in the host computer, thereby improving the verification efficiency. At the same time, because FPGA has hardware-level real-time performance and reliability, the verification results it completes are more accurate and reliable, which is conducive to quickly diagnosing problems that may arise during the update process.

[0014] In some embodiments, before the step of reading back the new firmware data written into the Flash memory, the method further includes: Read back the new firmware data sent to the FPGA, where the new firmware data is used to update the Flash memory; Determine whether the new firmware data sent to the FPGA is the same as the new firmware data stored in the host computer; If yes, then execute the step of reading back the new firmware data written into the Flash memory; If not, it is determined that the test machine resource board configuration has failed.

[0015] Through the above embodiment, the resource board reconfiguration system compares the new firmware data sent to the FPGA with the original new firmware data in the host computer, and determines whether there is a problem in the sending process based on whether the two are consistent, and then determines whether the Flash update of the test machine resource board is completed. This verification step further improves the fault tolerance of the system, and can promptly detect and correct transmission errors of update instructions, avoiding erroneous firmware being written into Flash and causing greater problems.

[0016] In some embodiments, after the step of determining that the configuration of the tester resource board is completed if it is detected during the verification process that the new firmware data written into the Flash memory is the same as the new firmware data before being written into the Flash memory, the method further includes: Use this firmware upgrade area to provide firmware support for the motherboard operation; When it is detected that the Flash memory is updated again, the firmware upgrade area is updated again, and the firmware data in the firmware storage area remains unchanged.

[0017] Through the above embodiment, after the update is completed, the resource board reconfiguration system directly uses the new firmware in the upgrade area to support the mainboard. During the next Flash update, the firmware upgrade area is still updated, while the firmware storage area remains unchanged. A stable firmware storage area is always maintained as a safety backup to ensure that even if the subsequent incremental update fails, it will not affect the basic operation of the mainboard.

[0018] In some embodiments, after the step of determining that the configuration of the tester resource board is completed if it is detected during the verification process that the new firmware data written into the Flash memory is the same as the new firmware data before being written into the Flash memory, the method further includes: Erasing the firmware data in the firmware storage area; Writing new firmware data in the firmware upgrade area into the firmware storage area; The new firmware data in the firmware upgrade area is then erased for the next update of the Flash memory.

[0019] Through the above embodiment, after the update is successful, the resource board reconfiguration system erases the old firmware in the firmware storage area, copies the new firmware in the upgrade area to the storage area, and then erases the new firmware in the upgrade area. In this way, the upgrade area is clean and can be written directly during the next update. This method saves Flash storage space and avoids the long-term residence of redundant data. The erasing action is concentrated after the update is confirmed, which will not affect the security and fallback capability during the firmware update process.

[0020] In a second aspect, the present application provides a resource board reconfiguration system, the resource board reconfiguration system comprising: one or more processors and a memory; The memory is coupled to the one or more processors, and the memory is used to store computer program code, which includes computer instructions. The one or more processors call the computer instructions so that the resource board reconfiguration system can implement a test machine resource board reconfiguration and configuration failure fallback method provided in the above embodiment, which will not be repeated here.

[0021] In a third aspect, the present application provides a computer-readable storage medium, including instructions. When the instructions are executed on a resource board reconfiguration system, the resource board reconfiguration system can implement a test machine resource board reconfiguration and configuration failure fallback method provided in the above embodiment, which will not be repeated here.

[0022] In a fourth aspect, the present application provides a computer program product. When the computer program product runs on a resource board reconfiguration system, the resource board reconfiguration system can implement a test machine resource board reconfiguration and configuration failure fallback method provided in the above embodiment, which will not be repeated here.

[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. The dual-zone design of firmware storage area and firmware upgrade area is adopted. Both the firmware storage area and the firmware upgrade area can provide firmware support for the operation of the motherboard, and the firmware upgrade area mainly provides firmware support when the motherboard is running normally. The firmware upgrade area is used for updating. When the update is interrupted unexpectedly, the motherboard can still rely on the firmware storage area to start normally and continue to complete the upgrade, which greatly improves the fault tolerance and reliability of the system.

[0024] 2. Utilizing the hardware parallel capability of FPGA, the readback and comparison of Flash written data is accelerated, and the firmware consistency check is transferred from the host computer to the local test board. The real-time and reliability of FPGA hardware level ensures the accuracy of the verification results and can quickly diagnose potential problems in the update process.

[0025] 3. When writing new firmware, the required storage area is dynamically determined according to the firmware size, and the area is selectively erased, avoiding unnecessary erase operations and reducing the number of Flash erases and writes and the writing time. When selecting the area, the blocks with the least number of reads and writes are used first, balancing the erase and write intensity of each block and extending the overall service life. After the update, it also supports flexible storage strategies, such as only operating the upgrade area and the reserved storage area during incremental updates, while improving the Flash utilization rate, taking into account security and fallback capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flow chart of a method for reconfiguring a resource board of a test machine and for falling back on configuration failure in an embodiment of the present application; Figure 2 It is another flowchart diagram of a method for reconfiguring a test machine resource board and for configuration failure rollback in an embodiment of the present application; Figure 3 It is a structural schematic diagram of the resource board reconfiguration system in the embodiment of the present application dividing the storage space of the Flash memory; Figure 4 It is a schematic diagram of the structure of a physical device of the resource board reconfiguration system in the embodiment of the present application. DETAILED DESCRIPTION

[0027] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more listed items.

[0028] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0029] For ease of understanding, the following is a flow chart of the method provided by this embodiment. Figure 1 The figure is a flow chart of a method for reconfiguring a test machine resource board and a configuration failure fallback in an embodiment of the present application.

[0030] S101, dividing the storage space of the Flash memory into two parts: a firmware storage area and a firmware upgrade area.

[0031] In the resource board reconfiguration system, the Flash memory is a key component for storing the firmware required for the mainboard operation. In order to provide security and fallback mechanism during the Flash firmware update process, this step divides the storage space of the Flash memory into two independent areas: the firmware storage area and the firmware upgrade area.

[0032] Specific as Figure 3 As shown, a structural diagram of the resource board reconfiguration system in an embodiment of the present application dividing the storage space of the Flash memory, wherein the firmware storage area is used to store the basic firmware that currently supports the normal operation of the mainboard. This part of the firmware is relatively stable and is generally not modified after the initial writing and testing. Even if an unexpected interruption occurs during the upgrade of the new firmware, the integrity of the firmware storage area will not be affected, and the normal operation of the basic functions of the mainboard can be guaranteed; the firmware upgrade area is specifically used to store new firmware data updated by Flash. Each time the Flash is upgraded, the new firmware will be written to this area. Since the upgrade area is independent of the firmware storage area, the upgrade process will not interfere with the normal operation of the mainboard.

[0033] S102: In the process of updating the Flash memory, new firmware data for Flash update is written into the firmware upgrade area.

[0034] When the mainboard needs to be upgraded to a new version of the firmware, the resource board reconfiguration system sends the new firmware data to the FPGA, and then the FPGA writes the new firmware data to the Flash memory for updating.

[0035] Specifically, when the Flash memory is updated, the firmware data in the firmware storage area is not changed. After the FPGA erases the data in the firmware upgrade area (to make room for the new firmware data), the new firmware data sent by the host computer is written into the firmware upgrade area, and the entire update process is terminated after the verification is completed. The verification process is the process of comparing the new firmware data written into the firmware upgrade area with the new firmware data before writing. The specific verification process refers to step S104, which will not be described here.

[0036] S103: If it is detected that the update of the firmware upgrade area is interrupted, the firmware upgrade area is updated again after the mainboard is restarted.

[0037] Since the update process of Flash memory takes a long time, for example, 128MB of data may take tens of seconds or even longer, the update process is easily disturbed by external factors, such as sudden power outages, network interruptions, etc. If the new firmware data has not been completely written into the upgrade area at this time, the sudden interruption may cause the firmware to be partially updated or damaged, making the motherboard unable to start again.

[0038] In this regard, in an embodiment of the present application, since the update process of the Flash memory is only limited to the firmware upgrade area, and the firmware storage area still stores the basic firmware data that supports the normal startup and operation of the mainboard, therefore, when it is detected that the update of the firmware upgrade area is interrupted, the resource board reconfiguration system calls the firmware data in the firmware storage area to restart the mainboard, and then re-writes the new firmware data of the Flash update into the firmware upgrade area to continue the upgrade operation of the Flash memory.

[0039] In addition, the resource board reconfiguration system can also record the current upgrade progress in real time during the process of updating the Flash memory, and regularly synchronize the progress to the non-volatile memory (such as EEPROM). Once the upgrade is unexpectedly interrupted, the resource board reconfiguration system determines whether the firmware data in the firmware upgrade area is complete based on the saved progress information.

[0040] Furthermore, if the firmware in the upgrade area is detected to be incomplete and the last upgrade process is determined to be abnormally terminated, the system will automatically switch to the code in the firmware storage area to start the motherboard. Since the firmware in the storage area is complete and reliable, the motherboard can be restored to the normal working state before the upgrade, and then the firmware upgrade area can be updated again.

[0041] S104: After the update is completed, the new firmware data written into the Flash memory is verified by the FPGA.

[0042] After the new firmware is completely written into the firmware upgrade area, a verification is required to ensure that the new firmware data written into the Flash is consistent with the original firmware data without errors or omissions.

[0043] Specifically, in the embodiment of the present application, after the update is completed, the resource board reconfiguration system assigns the task of reading the upgrade area data from the Flash to the FPGA. The FPGA reads the Flash data in parallel at a very high speed through a dedicated hardware interface, and then uses a predefined verification algorithm (such as CRC, MD5, etc.) to calculate the data verification value. Then, the FPGA compares the verification value with the original firmware verification value that was previously burned, and determines whether the firmware is consistent based on the comparison result.

[0044] For example, when all 128MB of new firmware data is written into the mutual inspection upgrade area, the resource board reconfiguration system will immediately trigger the FPGA verification action. The FPGA reads the data of the entire firmware upgrade area in parallel, and the hardware calculates the CRC32 check value as A, and then compares A with the new firmware CRC32 value B stored in the FPGA in advance to determine whether A and B are completely consistent. If they are consistent, the upgrade is successful, otherwise it needs to be upgraded again.

[0045] It should be noted that FPGA, or field programmable gate array, is a programmable hardware circuit that can perform a large number of simple operations in parallel. Transferring Flash data verification from CPU to FPGA can give full play to the parallel computing advantages of FPGA and greatly improve verification speed and efficiency.

[0046] S105. During the verification process, if it is detected that the new firmware data written into the Flash memory is the same as the new firmware data before being written into the Flash memory, it is determined that the configuration of the resource board of the test machine is completed.

[0047] When the FPGA verification circuit confirms that the new firmware data written into the Flash is completely consistent with the original firmware data, the resource board reconfiguration system determines that the update of the Flash memory is completed, that is, the configuration of the test machine resource board is completed. Before the next update, the normal startup and operation of the mainboard will give priority to using the updated firmware upgrade area to provide firmware support. Of course, if the mainboard cannot start normally according to the firmware support provided by the firmware upgrade area during this process, the firmware data in the firmware storage area can still be temporarily called for firmware support.

[0048] In the above embodiment, the resource board reconfiguration system divides the storage space of the Flash memory into a firmware storage area and a firmware upgrade area. The firmware storage area stores the basic firmware that supports the normal operation of the mainboard, and the firmware upgrade area stores the new firmware for updating. During the update process, the new firmware is written to the firmware upgrade area. If the update is interrupted, the firmware storage area provides firmware support after the mainboard is restarted, and the firmware upgrade area is updated again. After the update is completed, the new firmware data written to the Flash is verified by the FPGA to determine whether it is consistent with the firmware before the update, thereby determining whether the update is successful. This method ensures that even if the update is interrupted, the mainboard can start normally and can continue to complete the interrupted update process, thereby improving system reliability and fault tolerance.

[0049] The following is a more detailed description of the process of the method provided by this embodiment. Figure 2 As shown, it is another flow chart of a method for reconfiguring a test machine resource board and configuration failure fallback in an embodiment of the present application.

[0050] S201. Determine the required number of blocks according to the size of the new firmware data.

[0051] When updating the Flash memory, the resource board reconfiguration system first calculates how many blocks (Blocks) in the Flash memory need to be occupied according to the size of the new firmware data to be written.

[0052] It should be noted that the Flash memory is usually composed of several blocks of equal size, each block contains a certain number of pages. The size of the new firmware data is divided by the capacity of each block to obtain the required number of blocks.

[0053] S202: Obtain the number of read and write times of each block in the storage area.

[0054] After determining the number of blocks required for the new firmware data, the resource board reconfiguration system will next select the appropriate blocks from the firmware upgrade area of ​​the Flash memory.

[0055] Specifically, the resource board reconfiguration system can directly track the number of erase and program times of each block through a built-in counter or status register in the Flash.

[0056] S203: Determine a preset number of blocks with the least number of read and write times as appropriate storage areas.

[0057] Based on the read and write times information of each block, the resource board reconfiguration system selects several blocks with the least read and write times from the Flash firmware upgrade area as the actual storage area for the new firmware data.

[0058] In the above embodiment, the resource board reconfiguration system first determines the required number of blocks, and then selects the block with the least number of read and write times in the upgrade area as the actual storage area. This approach balances the number of erase and write times and the degree of aging of each storage block, avoids the imbalance of the use intensity between blocks, and prolongs the service life of the Flash memory as a whole.

[0059] S204: Erase the data in the storage area.

[0060] After determining the actual storage area of ​​the new firmware data, to make room for the new data, the resource board reconfiguration system executes a block erase command for the several Flash blocks selected in step S203.

[0061] In the above embodiment, before writing the new firmware, the resource board reconfiguration system first determines the appropriate storage area in the upgrade area according to the size of the new firmware, and erases the original data in the area. This can avoid unnecessary erasing operations, reduce the number of erasing and writing times of the Flash memory, and extend the life of the Flash. At the same time, selectively erasing part of the data in the firmware upgrade instead of erasing all the data improves the update efficiency of the Flash memory.

[0062] S205: Write new firmware data for Flash update into the storage area.

[0063] After completing the erasure of the target storage area, the resource board reconfiguration system immediately starts the Flash writing process to write the new firmware data to be updated into the erased blocks one by one.

[0064] In addition, during the writing process, the resource board reconfiguration system can monitor the busy and idle status of the Flash in real time. Since it takes a certain amount of time to write each page, the system must wait for the current page to be written before continuing to write the next page. In order to improve data throughput, some Flash also supports continuous page programming mode, which allows multiple pages of data to be sent continuously without waiting, and the data is cached and written in sequence by the Flash internally, thereby improving writing efficiency.

[0065] S206 , reading back the new firmware data sent to the FPGA.

[0066] In the embodiment of the present application, the resource board reconfiguration system uses FPGA as the master device of the Flash memory to operate the Flash. The resource board reconfiguration system controls the host computer (such as a terminal device such as a computer) to send control commands to the FPGA through a high-speed interface (SerDes), and the FPGA decodes and executes the control commands to implement operations such as erasing, writing, and reading back of the Flash.

[0067] To ensure the normal update of the Flash memory, after the host computer sends the new firmware data used to update the Flash to the FPGA, it will read the new firmware data from the storage area of ​​the FPGA again to compare it with the original new firmware data in the host computer. See step S207 for details, which will not be repeated here.

[0068] S207: Check whether the new firmware data before and after issuance are the same.

[0069] After completing the reading back of the new firmware data from the FPGA, the resource board reconfiguration system needs to determine whether the new firmware data obtained by reading back is completely consistent with the new firmware data initially sent to the FPGA.

[0070] Specifically, the resource board reconfiguration system uses a data comparison algorithm, such as byte-by-byte comparison or CRC check, to compare the readback data with the source data in the host computer. If the two copies of data are exactly the same, it means that there was no transmission error or loss in the process of sending the new firmware to the FPGA, and the firmware received by the FPGA is complete and correct. The system can then execute the next step (i.e., S208 and other subsequent steps), write the new firmware data to the Flash memory, and implement the update operation on the Flash memory. On the contrary, if any difference is detected, it is determined that there is a problem in the sending process, which may cause the subsequent update of the Flash memory to fail.

[0071] In the above embodiment, the resource board reconfiguration system compares the new firmware data written into the Flash storage area with the new firmware data before writing, and determines whether the Flash update of the test machine resource board is completed based on whether the two are consistent. This step fully utilizes the parallel computing capability of the FPGA by introducing FPGA to assist Flash reading, writing and verification, speeds up data transmission and comparison, and makes the verification process no longer need to be performed in the host computer, thereby improving the verification efficiency. At the same time, because the FPGA has hardware-level real-time performance and reliability, the verification results it completes are more accurate and reliable, which is conducive to rapid diagnosis of problems that may arise during the update process.

[0072] S208: Read back the new firmware data written into the Flash memory.

[0073] After confirming that the new firmware data before and after issuance are consistent in step S207, the resource board reconfiguration system starts to burn the new firmware into the firmware upgrade area of ​​the Flash memory. After the burning is completed, the system immediately reads the newly written new firmware data from the Flash memory to obtain a copy of the new firmware data actually stored in the Flash.

[0074] S209: Check whether the new firmware data before and after writing are the same.

[0075] After obtaining the read-back new firmware data in step S208, the resource board reconfiguration system compares it with the new firmware data before burning to determine whether the two are completely consistent. The data before burning is the new firmware data sent to the FPGA by the host computer and confirmed to be correct.

[0076] Furthermore, the data comparison method is similar to step S207. The resource board reconfiguration system can use byte-by-byte comparison, CRC check and other algorithms to check whether each byte of the two new firmware data is equal. Once any difference is found, it means that an error occurred in the process of burning the new firmware data into Flash, and the actual stored firmware is inconsistent with the expected one. At this time, step S213 is entered to determine that the configuration of the test machine resource board has failed. At this time, exception handling is required, such as re-burning, marking bad blocks, etc., which are not limited here. If the comparison results are exactly the same, it means that the new firmware has been successfully burned into Flash, and it is determined that the test machine resource board has completed the configuration. In the above embodiment, the resource board reconfiguration system compares the new firmware data sent to the FPGA with the original new firmware data in the host computer, and determines whether there is a problem in the sending process based on whether the two are consistent, and then determines whether the Flash update of the test machine resource board is completed. This verification step further improves the fault tolerance of the system, and can promptly detect and correct transmission errors of update instructions, avoiding erroneous firmware being written into Flash and causing greater problems.

[0077] S210, determining whether the test machine resource board has completed configuration.

[0078] When the new firmware data before and after Flash burning is consistent, the resource board reconfiguration system determines that the entire firmware update and reconfiguration process for the test machine resource board has been completed, and the resource board has successfully loaded the latest firmware and is ready.

[0079] At this point, the resource board reconfiguration system will output a result code or message, indicating that the resource board reconfiguration is successful. This result can be fed back to the host computer or the operator's terminal device to indicate the completion status of the firmware update task. At the same time, the system will also update the configuration identifier of the resource board, such as the version number, configuration timestamp, etc., to record the latest firmware configuration. This information can be used for subsequent status query and version management.

[0080] S211. Use the firmware upgrade area to provide firmware support for the motherboard operation.

[0081] After the resource board reconfiguration system successfully completes the firmware update of the Flash memory, it starts to use the firmware upgrade area in the Flash to provide necessary firmware support for the operation of the mainboard.

[0082] S212: When it is detected that the Flash memory is updated again, the firmware upgrade area is updated again.

[0083] After completing a firmware upgrade, the resource board reconfiguration system begins to continuously monitor the status of the Flash memory to determine whether to perform a new firmware update again. Once a new firmware update request is detected, the system will update the data in the firmware upgrade area again, and overwrite the original firmware content in the upgrade area with the new firmware data. During the entire process, the original firmware storage area is not affected in any way, and the original firmware version is still maintained, continuing to provide support for the motherboard operation in the event of abnormal startup.

[0084] In the above embodiment, after the update is completed, the resource board reconfiguration system directly uses the new firmware in the upgrade area to support the mainboard. During the next Flash update, the firmware upgrade area is still updated, while the firmware storage area remains unchanged. A stable firmware storage area is always maintained as a safety backup to ensure that even if the subsequent incremental update fails, it will not affect the basic operation of the mainboard.

[0085] In other embodiments, after the Flash memory is successfully updated, the resource board reconfiguration system can erase the old firmware data in the firmware storage area, write the new firmware data in the upgrade area to the firmware storage area, and then erase the new firmware data in the firmware upgrade area. In this way, the upgrade area is clean and can be written directly during the next update. Flash storage space is saved and long-term residence of redundant data is avoided. The erasing action is concentrated after the update is confirmed, and will not affect the security and rollback capability during the firmware update process.

[0086] S213: Determine that the test machine resource board configuration fails.

[0087] During the update and upgrade process of the Flash memory, the resource board reconfiguration system in the host computer controls the resource board reconfiguration system to control the host computer to send the upgrade package (new firmware data) to the FPGA in multiple times. After the FPGA receives the complete new firmware data, the resource board reconfiguration system executes the read-back verification process of steps S206 and S207 to determine whether the new firmware data before and after the issuance is the same. If not, it is directly determined that the configuration of the test machine resource board has failed, and it is necessary to re-execute steps S204 and other steps to re-write the new firmware data. On the contrary, if the new firmware data before and after the issuance is the same, the read-back verification process of steps S208 and S209 is executed to determine whether the new firmware data before and after writing the Flash is the same. If not, it is directly determined that the configuration of the test machine resource board has failed, and it is necessary to re-execute steps S204 and other steps to re-write the new firmware data. On the contrary, if the new firmware data before and after writing the Flash is the same, it is determined that the configuration of the test machine resource board has been completed.

[0088] In addition, during the process of updating and upgrading the Flash memory, the specific reason for the failure of the update and upgrade can be determined based on the reason for the failure of the configuration of the test machine resource board, for example, an abnormality in the data sent by the host computer, an abnormality in writing the firmware upgrade area of ​​the FPGA, etc.

[0089] The resource board reconfiguration system of the embodiment of the present invention is applied to electronic equipment. Figure 4 A schematic diagram of the architecture of an electronic device suitable for implementing an embodiment of the present invention is shown.

[0090] It should be noted that Figure 4 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 invention.

[0091] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructions (computer programs), or by controlling related hardware through instructions (computer programs), and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. The electronic device of this embodiment includes a storage medium and a processor, wherein a plurality of instructions are stored in the storage medium, and the instructions can be loaded by the processor to execute any step of the method provided in the embodiment of the present invention.

[0092] Specifically, the storage medium and the processor are electrically connected directly or indirectly to realize data transmission or interaction. For example, these elements can be electrically connected to each other through one or more signal lines. The storage medium stores computer execution instructions for implementing the data access control method, including at least one software function module that can be stored in the storage medium in the form of software or firmware. The processor executes various functional applications and data processing by running the software program and module stored in the storage medium. The storage medium can be, but is not limited to, random access storage medium (Random Access Memory, referred to as: RAM), read-only storage medium (Read Only Memory, referred to as: ROM), programmable read-only storage medium (Programmable Read-Only Memory, referred to as: PROM), erasable read-only storage medium (Erasable Programmable Read-Only Memory, referred to as: EPROM), electrically erasable read-only storage medium (Electric Erasable Programmable Read-Only Memory, referred to as: EEPROM), etc. Among them, the storage medium is used to store programs, and the processor executes the program after receiving the execution instruction.

[0093] Furthermore, the software programs and modules in the above-mentioned storage medium may also include an operating system, which may include various software components and / or drivers for managing system tasks (such as memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components. The processor may be an integrated circuit chip having signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., which may implement or execute the various methods, steps, and logic flow diagrams disclosed in this embodiment. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0094] Since the instructions stored in the storage medium can execute the steps in any method provided in the embodiments of the present invention, the beneficial effects of any method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0095] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A test machine resource board reconfiguration and configuration failure fallback method, applied to a resource board reconfiguration system, It is characterized in that The method comprises: The storage space of the Flash memory is divided into a firmware storage area and a firmware upgrade area. The firmware storage area stores basic firmware data for supporting the normal operation of the mainboard, and the firmware upgrade area stores new firmware data for Flash update. In the process of updating the Flash memory, new firmware data for Flash update is written into the firmware upgrade area, and the firmware upgrade area is used to provide firmware support for the operation of the updated mainboard; If it is detected that the update of the firmware upgrade area is interrupted, the firmware upgrade area is updated again after the mainboard is restarted, and the firmware storage area provides firmware support for the mainboard during the restart process; After the update is completed, the new firmware data written into the Flash memory is verified through the FPGA; During the verification process, if it is detected that the new firmware data written into the Flash memory is the same as the new firmware data before being written into the Flash memory, it is determined that the configuration of the resource board of the test machine is completed.

2. The method according to claim 1, It is characterized in that In the process of updating the Flash memory, before the step of writing new firmware data for Flash update into the firmware upgrade area, the method further includes: Determining a suitable storage area in the firmware upgrade area according to the size of the new firmware data; The data in the storage area is erased.

3. The method according to claim 2, It is characterized in that The step of determining the appropriate storage area in the firmware upgrade area according to the size of the new firmware data specifically includes: Determining the required number of blocks according to the size of the new firmware data; Obtaining the number of read and write times of each block in the storage area; A preset number of blocks with the least number of read and write times are determined as the appropriate storage area.

4. The method according to claim 1, It is characterized in that The step of verifying the new firmware data written into the Flash memory by the FPGA after the update is completed specifically includes: Read back the new firmware data written into the Flash memory; Determine whether the new firmware data written into the Flash memory is the same as the new firmware data temporarily stored in the FPGA; If so, it is determined that the test machine resource board has completed configuration; If not, it is determined that the test machine resource board configuration has failed.

5. The method according to claim 4, It is characterized in that Before the step of reading back the new firmware data written into the Flash memory, the method further includes: Read back the new firmware data sent to the FPGA, where the new firmware data is used to update the Flash memory; Determine whether the new firmware data sent to the FPGA is the same as the new firmware data stored in the host computer; If yes, then executing the step of reading back the new firmware data written into the Flash memory; If not, it is determined that the test machine resource board configuration has failed.

6. The method according to claim 1, It is characterized in that After the step of determining that the configuration of the test machine resource board is completed if it is detected during the verification process that the new firmware data written into the Flash memory is the same as the new firmware data before being written into the Flash memory, the method further includes: Using the firmware upgrade area to provide firmware support for the operation of the mainboard; When it is detected that the Flash memory is updated again, the firmware upgrade area is updated again, and the firmware data in the firmware storage area remains unchanged.

7. The method according to claim 1, It is characterized in that After the step of determining that the configuration of the test machine resource board is completed if it is detected during the verification process that the new firmware data written into the Flash memory is the same as the new firmware data before being written into the Flash memory, the method further includes: Erasing firmware data in the firmware storage area; Writing new firmware data in the firmware upgrade area into the firmware storage area; The new firmware data in the firmware upgrade area is then erased for the next update of the Flash memory.

8. A resource board reconfiguration system, It is characterized in that The resource board reconfiguration system includes: one or more processors and memory; The memory is coupled to the one or more processors, and the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and the one or more processors call the computer instructions to enable the resource board reconfiguration system to execute the method as described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, It is characterized in that When the instruction is executed on a resource board reconfiguration system, the resource board reconfiguration system is caused to execute the method according to any one of claims 1 to 7.

10. A computer program product, It is characterized in that When the computer program product is executed on a resource board reconfiguration system, the resource board reconfiguration system is enabled to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Balanced loss achievement method for NAND FLASH

    CN103092766A

  • Firmware loading method for flat panel detectors

    CN107515799A

  • A method for firmware upgrade

    CN109002310A

  • Upgrading method and system for improving online upgrading efficiency of FPGA (Field Programmable Gate Array) in ATE (Automatic Train Equipment)

    CN114489742A

  • Firmware upgrading equipment and firmware upgrading method and system thereof

    CN115981700A

Cited By

  • Firmware upgrading system and method and medium

    CN120122974A