Optimize the firmware upgrade device, upgrade and startup loading method of frame-type equipment board

By selecting common boards in the frame equipment and using the SPI Switcher module to aggregate the SPI buses of the boards, the operational troubles and high hardware costs caused by independent upgrades of the boards are solved, and efficient board firmware upgrades and startup loading are achieved. .

CN118210529BActive Publication Date: 2024-08-30CHENGDU LINGMU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410613653.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2024-08-30
Estimated Expiration
2044-05-17

AI Technical Summary

Technical Problem

In the process of upgrading existing chassis-type equipment boards, each board needs to be upgraded independently, which results in cumbersome, time-consuming and high hardware costs. In addition, parallel upgrades cannot completely avoid upgrade failures of individual boards, requiring calibration and re-upgrading.

Method used

Select a public board as a shared board, equipped with a shared Flash, and aggregate the SPI buses of all boards into the public Flash through the SPI Switcher module, allowing multiple boards to independently access the same Flash through SPI, reducing hardware costs and Upgrade complexity.

Benefits of technology

It realizes that all boards can complete the firmware upgrade only once, reducing the upgrade complexity and failure probability, improving efficiency, and saving Flash resources and hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118210529B
    Figure CN118210529B
Patent Text Reader

Abstract

The invention discloses an optimized frame-type equipment board firmware upgrade device, upgrade and startup loading method, the board includes several boards to be upgraded and a common board; the host computer is only connected to the common board in communication; the DSP component of the common board includes a reset module, an SPI Boot module, a common FLASH and an upgrade module, the programmable logic component includes a reset control module and an SPI Switcher module, the common FLASH and the upgrade module are respectively connected to the SPI Switcher module; the SPI Boot modules of all boards are respectively connected to the SPI Switcher module through an SPI bus, and the reset control modules of all boards are respectively connected to the SPI Switcher module in communication. All boards share a Flash, and the curing program on the same Flash is multiplexed in time-sharing, which saves hardware costs and improves upgrade efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data signal processing, and in particular to an optimized frame-type equipment board firmware upgrade device, an upgrade method and a startup loading method. Background Art

[0002] Frame-type equipment usually refers to a large-scale equipment structure with modular design used in the fields of communications, IT hardware, data centers, etc. This equipment consists of a basic frame (also called a chassis or chassis) and multiple slots, each of which can be inserted with a single board with different functions (such as a processing board, interface board, power board, etc.). By flexibly configuring different single boards, frame-type equipment can meet the needs of different scales and functions, such as switches, routers, servers, storage devices, etc.

[0003] At present, in common frame-type devices, each board (in this article, it refers to the board using DSP as the core processor, and DSP and Flash are connected through the SPI interface) is generally equipped with a Flash for storing the system image. When upgrading, each board needs to be upgraded independently, that is, the Image is distributed to each board and written into the corresponding Flash.

[0004] There are two types of board upgrade solutions: serial and parallel. In serial upgrade, the boards that need to be upgraded are upgraded sequentially according to the board number (or other order); in parallel upgrade, multiple tasks are directly created to upgrade all the boards that need to be upgraded at the same time.

[0005] Compared with serial upgrade, parallel upgrade can improve the upgrade efficiency to a certain extent, but it still cannot avoid the failure of individual boards to upgrade. Therefore, it is necessary to check and re-upgrade the failed boards according to the upgrade results. Especially when all boards use the same image, since each board has its own Flash, the upgrade needs to distribute the image to each board and write it into its own Flash separately - the operation is troublesome and time-consuming (especially serial upgrade); and each board needs to be equipped with an independent Flash, which has high hardware costs. Summary of the invention

[0006] The purpose of the present invention is to provide an optimized frame-type equipment board firmware upgrade device, upgrade and boot loading method, select a slot board from all boards as a common board, equip the common board with a common Flash, and cancel the corresponding Flash of other boards. Through the SPI Switcher module of the common board, the SPI of all boards are gathered together and connected to the common Flash, so that the SPI buses of all boards can time-share the same Flash, and multiple boards can access the same Flash independently through SPI, so that only one upgrade is required during the upgrade, and all boards in the device can be upgraded, saving Flash resources and reducing hardware costs.

[0007] To achieve the above objectives, this application provides the following solutions:

[0008] On the one hand, the present application provides an apparatus for optimizing firmware upgrade of a frame-type device board, comprising a host computer and a frame including a plurality of slots for placing board cards, wherein the board cards include a plurality of boards to be upgraded and a common board card; the host computer is only connected to the common board card for communication;

[0009] All boards include a DSP component and a programmable logic component, the DSP component includes a reset module and an SPI Boot module, and the programmable logic component includes a reset control module; wherein the reset module is respectively communicated with the reset control module and the SPI Boot module;

[0010] The DSP components of the public board also include public FLASH and an upgrade module that communicates with the host computer;

[0011] The programmable logic component of the public board also includes an SPI Switcher module, and the public FLASH and the upgrade module are respectively connected to the SPI Switcher module; wherein,

[0012] The SPI Boot modules of all boards are connected to the SPI Switcher module through the SPI bus, and the reset control modules of all boards are communicated with the SPI Switcher module.

[0013] In some optional implementations, the programmable logic component of the public board also includes a first register and a second register, the first register is used to record the current working mode of the SPI Switcher module, and the second register is used to record the board number that the SPISwitcher module currently needs to switch.

[0014] In some specific implementations, the host computer is used to obtain the slot number of the public board in the current frame device, establish a communication connection with the DSP component of the public board, send a Sysupdate signal to the public board and send the Image file to the DSP component of the public board;

[0015] The upgrade module is used to respond to the Sysupdate signal of the host computer, receive the Image file sent by the host computer, generate a Write instruction and send it to the SPI Switcher module, and write the Image file into the public FLASH through the SPI bus according to the SPI Switcher module;

[0016] The SPI Switcher module is used to respond to the Write instruction of the upgrade module, query the working mode recorded in the first register, and if the current working mode is the upgrade mode, switch the access right of the public FLASH to the upgrade module;

[0017] The public FLASH is used to save the Image files of all boards.

[0018] In some specific implementations, the reset control module is used to send a reset / release control signal to the reset module, and generate a Reset Notice message to send to the SPI Switcher module;

[0019] The reset module is used to reset / reset according to the control signal and trigger the SPI Boot module to start;

[0020] The public FLASH is used to save the Image files of all boards;

[0021] The SPI Switcher module is used to respond to the Reset Notice information of all boards and cards, query the working mode recorded in the first register, and if the current working mode is the SPI Boot mode, switch the access right of the public FLASH to the SPI Boot module of each board and card in turn according to the board startup loading order recorded in the second register, so as to realize the time-sharing multiplexing of the SPI bus of boards in different slots and the public Flash;

[0022] The SPI Boot module is used to read the Image file from the public FLASH through the SPI bus switched by the SPI Switcher module and start loading.

[0023] In a second aspect, the present application provides a method for optimizing firmware upgrade of a frame-type device board, which is applied to an apparatus for optimizing firmware upgrade of a frame-type device board in the first aspect, and specifically comprises the following steps:

[0024] S1, responding to the user upgrade command, obtaining the slot number of the public board in the current frame-type device;

[0025] S2, establish a communication connection with the public board, send the Image file to the public board to upgrade the public board;

[0026] S3, receiving the upgrade result of the public board, and determining whether the public board is upgraded successfully. If not, repeating steps S2-S3 until the upgrade is successful.

[0027] In some specific implementations, the specific process of upgrading the common board in step S2 is:

[0028] S21, responding to the Sysupdate signal of the host computer, recording the current working mode in the first register as the upgrade mode, and receiving the Image file sent by the host computer;

[0029] S22, perform a validity check on the Image file. If the check passes, generate a Write instruction and send it to the SPISwitcher module, so that the SPI Switcher module executes the Write instruction to switch the access right of the public FLASH;

[0030] S23, obtain the access right to the public FLASH, and write the Image file into the public FLASH through the SPI bus;

[0031] S24, determine whether the read-back verification after writing into the public FLASH passes, write the read-back verification result into the upgrade result and send it to the upper computer.

[0032] In some specific implementations, the specific process of switching the SPI Switcher module in step S22 is:

[0033] S221, responding to the Write instruction, querying whether the working mode currently recorded in the first register is the upgrade mode;

[0034] S222: If yes, switch the access right of the public FLASH to the upgrade module of the public board, so that the SPI bus between the public FLASH and the upgrade module is connected.

[0035] In a third aspect, the present application provides a method for optimizing the boot loading of a frame-type device board firmware, which is applied to a device for optimizing the upgrade of a frame-type device board firmware in the first aspect, and the specific process is:

[0036] Step 1: Each board is powered on in sequence to start its own programmable logic component. After power-on, the reset control module of each board generates a Reset Notice message to notify the SPI Switcher module.

[0037] Step 2: In the SPI Switcher module, the public FLASH access right is switched to each board in turn according to the board startup loading order. The startup loading order of each board is the public board first and then the board to be upgraded.

[0038] Step 3: For each board, after the board obtains the public FLASH access right, the reset control module of the board generates a reset signal to the reset module of the board for reset;

[0039] After the reset module of the board is released from the reset state, it sends a startup signal to the SPI Boot module of the board. The SPI Boot module of the board is connected to the public Flash through the SPI Switcher module, and reads the Image data from the Flash for startup loading.

[0040] In some specific implementations, the specific process of step 2 is:

[0041] 2.1. The SPI Switcher module responds to the Reset Notice message, records the current working mode in the first register as the SPI Boot mode, and writes the board numbers corresponding to each board in the second register in the order in which each board is started and loaded.

[0042] 2.2. When the working mode recorded in the first register is the SPI Boot mode, the FLASH access right is switched to the SPI Boot module of each board in sequence according to the board number sequence recorded in the second register to start loading each board.

[0043] In some specific embodiments, the process of step 2.2 is:

[0044] Query the status of the first register and the second register. When the working mode recorded in the first register is the SPIBoot mode and the board number recorded in the second register is a public board, switch the FLASH access right to the SPI Boot module in the public board, read the Image file from the public FLASH to start loading, and complete the startup loading of the public board;

[0045] After the startup loading of the public board is completed, the board numbers in the second register are modified in sequence according to the startup loading order of the boards;

[0046] After each modification of the second register, the FLASH access right is switched to the board to be upgraded corresponding to the board number recorded in the modified second register, so that the SPI Boot module of the board to be upgraded is connected to the SPI bus of the public FLASH, and the Image file is read from the public FLASH to start loading, thereby completing the startup loading of the board to be upgraded.

[0047] The present invention has the beneficial effects:

[0048] This application is applied to frame-type equipment, using existing programmable logic devices (such as PLD), selecting a slot card from all the cards as a common card, equipped with a shared Flash, and canceling the corresponding Flash on other cards. At the same time, an SPI Switcher module is added to the PLD of the common card, which connects the Flash and the SPI bus of the DSP on all the cards, aggregates the SPIs of multiple cards together, and then uses the programmable characteristics of the programmable logic device to achieve a multi-channel SPI time-sharing multiplexing solution of the same Flash through a switching circuit, so that multiple cards can independently access the same Flash through SPI;

[0049] All boards share the same Flash. When upgrading the firmware version, only the SPISwitcher module of the public board needs to write the image file to the public Flash once. This means that the upgrade only needs to be done once (i.e., the image writing operation to Flash is performed once) to achieve program upgrades for all boards, which reduces the complexity of the upgrade, reduces the probability of upgrade operation errors, and improves the upgrade efficiency. It also saves Flash resources and reduces hardware costs.

[0050] During startup loading, the SPI Switcher module switches the access rights of the public FLASH to each board in sequence through the SPI bus, so that all boards can obtain the Image file from the public Flash and run it in their own RAM / DDR. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a schematic diagram of the existing upgrade and loading solution of the frame type equipment in the prior art;

[0052] Figure 2 It is a schematic diagram of the serial upgrade process in the prior art;

[0053] Figure 3 It is the SPI Boot flow chart in the prior art;

[0054] Figure 4 A schematic diagram of a frame-type device upgrade loading solution provided in an embodiment of the present invention;

[0055] Figure 5 A schematic diagram of an upgrade process provided by an embodiment of the present invention;

[0056] Figure 6 A schematic diagram of the DSP_0 SPI Boot process provided by an embodiment of the present invention;

[0057] Figure 7 A schematic diagram of the DSP_N SPI Boot process provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present invention and its application or use. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] The relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.

[0060] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0061] Additionally, descriptions of well-known structures, functions, and configurations may be omitted for clarity and conciseness.One of ordinary skill in the art will recognize that various changes and modifications may be made to the examples described herein without departing from the spirit and scope of the present disclosure.

[0062] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.

[0063] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0064] Before introducing the specific implementation methods of this application, the concepts involved are first explained:

[0065] Frame-type equipment: usually refers to a large-scale equipment structure with modular design used in the fields of communications, IT hardware, data centers, etc. This equipment consists of a basic frame (also called a chassis or chassis) and multiple slots, each of which can be inserted with a single board with different functions (such as a processing board, interface board, power board, etc.). By flexibly configuring different single boards, frame-type equipment can meet the needs of different scales and functions, such as switches, routers, servers, storage devices, etc.

[0066] DSP chip: Digital Signal Processing Chip, is a microprocessor specially designed to quickly execute digital signal processing algorithms. Common examples include TI's (Texas Instruments) TMS320C6000 series, Marvell's Armada series, Galaxy Feiteng's FT-M6678, etc.

[0067] SPI: Serial Peripheral Interface, a common synchronous serial communication protocol, is mainly used for short-distance, full-duplex, master-slave communication between DSP and other peripheral devices (such as memory). In this article, it is mainly used for data exchange between DSP and Flash.

[0068] RAM: Random Access Memory is a data storage area that the CPU interacts with directly. Its characteristics are that it can be accessed randomly on demand and at a fast speed;

[0069] DDR: This article refers to Double Data Rate Memory DDR SDRAM (Double Data Rate Synchronous Dynamic Random-Access Memory), which is a synchronous dynamic random access memory. Its notable feature is that it can transmit data on both the rising and falling edges of a clock cycle, so the data transmission rate is twice that of traditional SDRAM;

[0070] RBL: ROM Bootloader is a boot loader program stored in the DSP's internal ROM. It is the first stage loader after the DSP is powered on or reset.

[0071] SPI Boot: DSP's SPI boot mode is a common boot mode in DSP RBL. After the DSP is electrolytically reset, the system will select the corresponding boot mode for SPI Boot according to the chip configuration. In this mode, when the DSP starts, it will read the program image from the Flash through the SPI interface and install it in the internal RAM according to the preset address sequence for execution;

[0072] PLD: A programmable logic device (PLD) is an integrated circuit whose internal circuit can be programmed by the user to implement specific digital logic functions. PLD has extremely high design flexibility, allowing electronic engineers to customize specific logic circuits at the hardware level without having to design and manufacture new integrated circuits like traditional fixed-function chips. Common programmable logic devices also include: FPGA and CPLD;

[0073] FPGA: Field-Programmable Gate Array, is an advanced PLD, its biggest feature is its extremely high flexibility and powerful parallel processing capabilities. Compared with CPLD, it has more advantages in situations that require greater flexibility, higher performance and larger-scale logic implementation.

[0074] CPLD: Complex Programmable Logic Device, a common PLD that can be used to implement user-defined digital logic design. It has a relatively simple structure and fewer macro units than FPGA. It is suitable for processing medium and low-density logic designs and is more suitable for implementing combinational logic or small and medium-scale sequential logic circuits, such as bus interface control and state machine design.

[0075] Image: This article specifically refers to the DSP program image file, which is generally compiled through a series of compilation tool chains to generate a binary file that can be executed on the DSP chip.

[0076] At present, in common frame-type devices, each board (here specifically referring to the board using DSP as the core processor, the same below) is generally configured with a Flash for storing the system image (abbreviated as: Image, the same below). When upgrading, each board needs to be upgraded independently, that is, the Image is distributed to each board and written into the corresponding Flash.

[0077] Since there are many ways to connect DSP and Flash, this patent mainly involves Flash devices connected via SPI interface. Figure 1 As shown, each board generally has two core devices: PLD and DSP. Among them:

[0078] PLD: Each board generally has a programmable logic device (PLD is used as an example here, but it can be CPLD / FPGA in actual operation. CPLD is generally chosen in actual projects) for DSP. Its main function is to control the power-on timing of the core components inside the board. For example Figure 1 The Reset Controller (reset control module) in the PLD mainly controls the "Reset" pin of the DSP chip to realize the reset / release function of the DSP chip, thereby achieving the effect of controlling the startup of the DSP.

[0079] DSP: The core device of the board, the main modules include the following:

[0080] 1. Reset module: reset / release reset. Peripheral devices can reset / release the DSP chip through this pin to control the startup of the DSP.

[0081] 2. SPI Boot module: implements SPI Boot mode. In this mode, the image is read from the Flash through SPI, loaded into the memory and then run the program;

[0082] 3. Sysupdate upgrade module: The system upgrade module mainly implements the firmware upgrade of DSP, writes the external Image to Flash through a series of operations (the common one is the upgrade command of the corresponding host computer, and then obtains it from the PC or other host machine through the network), and realizes the update and upgrade function of the program;

[0083] According to Figure 1 For the system shown, there are two types of upgrade solutions: serial and parallel, as explained below:

[0084] a) Serial: upgrade the boards that need to be upgraded in sequence according to the board numbers;

[0085] b) Parallel: When upgrading, multiple tasks are directly created, and all boards that need to be upgraded are upgraded in parallel.

[0086] Compared with serial upgrade, parallel upgrade can improve the upgrade efficiency to a certain extent, but it still cannot avoid the failure of individual board upgrades. Therefore, it is necessary to check according to the upgrade results and re-upgrade the failed boards.

[0087] like Figure 2As shown in the figure, the process of serial upgrade is roughly as follows: after receiving the upgrade command from the user, the host computer first obtains the total number of boards N in the current device that need to perform this upgrade, numbers the DSP components of each board, and performs the same upgrade operation in a certain order (assuming that it starts from DSP_0 and upgrades to DSP_N in sequence), and then summarizes the upgrade results fed back by each DSP and presents them to the user. The user then decides whether to re-upgrade the failed board and other operations based on the summary results.

[0088] Another common parallel upgrade solution is relatively optimized, that is: based on the serial upgrade, multiple identical tasks are created at the same time, and the upgrade operation is performed on all the boards that need to be upgraded at the same time. It will not be described in detail here.

[0089] based on Figure 1 The current boot loading process (SPI Boot) is as follows Figure 3 As shown:

[0090] After the DSP chip is powered on and reset by PLD, it will enter the DSP's RBL loading process. In the DSP's RBL loading process, RBL first reads the GPIO loading mode, and then obtains the Image from the corresponding source according to the loading mode of the hardware GPIO configuration, and then loads it into RAM (partially involved, it will also be loaded into DDR, the effect is the same) and runs the program.

[0091] The loading mode of the board is SPI Boot. In this mode, the SPI interface is initialized first, and then the Image file is read from the corresponding Flash mounted on each board through the SPI interface and stored in RAM / DDR. Then the address of c_int00 is parsed from it, and finally jumps to c_int00 to start executing the DSP program, thus completing the entire Boot process.

[0092] However, the following problems may occur when using the above system connection and upgrade loading method:

[0093] 1) When all boards use the same image, since each board has its own Flash, the upgrade needs to distribute the image to each board and write it into its own Flash separately - the operation is troublesome and time-consuming (especially serial upgrade);

[0094] 2) Each board needs to be equipped with independent Flash, which results in high hardware cost;

[0095] Based on this, this application proposes the following solutions:

[0096] Example 1

[0097] like Figure 4 As shown, this embodiment provides a device for optimizing the firmware upgrade of a frame-type device board, including a host computer and a plurality of slots (SLOT_0, ..., SLOT_N) for placing boards, the boards including a plurality of boards to be upgraded and a common board; the host computer is only connected to the common board for communication;

[0098] All boards include a DSP component and a programmable logic component, the DSP component includes a reset module and an SPI Boot module, and the programmable logic component includes a reset control module; wherein the reset module is respectively communicated with the reset control module and the SPI Boot module;

[0099] The DSP components of the public board also include public FLASH and an upgrade module that communicates with the host computer;

[0100] The programmable logic component of the public board also includes an SPI Switcher module, and the public FLASH and the upgrade module are respectively connected to the SPI Switcher module; wherein,

[0101] The SPI Boot modules of all boards are connected to the SPI Switcher module through the SPI bus, and the reset control modules of all boards are communicated with the SPI Switcher module.

[0102] In some optional implementations, the programmable logic component of the public board also includes a first register and a second register, the first register is used to record the current working mode of the SPI Switcher module, and the second register is used to record the board number that the SPISwitcher module currently needs to switch.

[0103] The functions of each device are:

[0104] The host computer is used to obtain the slot number of the public board in the current frame-type device, establish a communication connection with the DSP component of the public board, send a Sysupdate signal to the public board and send the Image file to the DSP component of the public board;

[0105] The upgrade module is used to respond to the Sysupdate signal of the host computer, receive the Image file sent by the host computer, generate a Write instruction and send it to the SPI Switcher module, and write the Image file into the public FLASH through the SPI bus according to the SPI Switcher module;

[0106] The SPI Switcher module is used to respond to the Write instruction of the upgrade module, query the working mode recorded in the first register, and if the current working mode is the upgrade mode, switch the access right of the public FLASH to the upgrade module;

[0107] The public FLASH is used to save the Image files of all boards.

[0108] In some specific implementations, the reset control module is used to send a reset / release control signal to the reset module, and generate a Reset Notice message to send to the SPI Switcher module;

[0109] The reset module is used to reset / reset according to the control signal and trigger the SPI Boot module to start;

[0110] The public FLASH is used to save the Image files of all boards;

[0111] The SPI Switcher module is used to respond to the Reset Notice information of all boards and cards, query the working mode recorded in the first register, and if the current working mode is the SPI Boot mode, switch the access right of the public FLASH to the SPI Boot module of each board and card in turn according to the board startup loading order recorded in the second register, so as to realize the time-sharing multiplexing of the SPI bus of boards in different slots and the public Flash;

[0112] The SPI Boot module is used to read the Image file from the public FLASH through the SPI Switcher module to start loading.

[0113] It can be understood that the public board is to select one from all the boards as the public board, and send the slot number corresponding to the public board to the host computer. For example, in this embodiment, the SLOT_0 slot is selected as the slot where the public board is located, and the slot number is consistent with the board number. Then according to the aforementioned scheme, the DSP component number of the public board SLOT_0 is DSP_0, and the programmable logic component number is PLD_0. The components of the DSP component are:

[0114] 1. Reset module: used for reset / unreset input of DSP chip, controlled by external PLD to reset and start;

[0115] 2. SPI Boot module (DSP_0): SPI boot function of DSP_0, connected to the SPI Switcher module of PLD_0;

[0116] 3. Public Flash: saves the image files of all board SLOTs and connects to the SPI Switcher module of PLD_0;

[0117] 4. Upgrade module (Sysupdate), responsible for responding to the upgrade command of the host computer, receiving the Image file sent by the host computer, and writing it to the public Flash through the SPI Switcher module;

[0118] The components in PLD_0 of SLOT_0 are:

[0119] 1. Reset Controller reset control module: controls the reset / release of DSP;

[0120] 2. SPI Switcher module: interconnects the SPI buses of all DSPs in the chassis and connects to the public Flash at the same time. The main function is to realize the time-sharing multiplexing of the SPI buses of DSPs in different slots and the public Flash. The implementation is relatively simple: respond to the Reset Notice of all boards and the Write instruction of the public board, and switch the SPI bus to the corresponding DSP SPI bus in the corresponding mode.

[0121] Different working modes can be divided into:

[0122] a) Sysupdate mode: In upgrade mode, after responding to the Write message of the Sysupdate module of DSP_0, the SPI bus is switched to DSP_0, so that DSP_0 can be connected to the Flash through the SPI Switcher, thereby writing the Image to the Flash and completing the upgrade function;

[0123] b) SPI Boot mode: During the device power-on process, the PLD of each board will reset the corresponding DSP and notify the SPI Switcher of the reset message "Reset Notice". The SPI bus is switched to different DSPs in sequence according to a specific order (which can be the board slot number or other predetermined order). Then the DSP can connect to the Flash through the SPI Switcher in sequence and read the Image data from the Flash, thereby realizing the SPI Boot process and completing the loading and startup function.

[0124] Example 2

[0125] like Figure 5As shown, based on the device in Example 1, this embodiment provides a method for optimizing the firmware upgrade of the frame-type equipment board. Since all boards use the public flash in a time-sharing manner, it is no longer necessary to distribute the Image file to all boards and write it into the FLASH of each board. It is only necessary to write the Image file into the public FLASH of the board. For the DSP component and the PLD component in the host computer and each board, each component performs the following steps respectively:

[0126] 1. For the host computer, perform the following steps:

[0127] S1. Respond to the user upgrade command and obtain the slot number X of the public board in the current frame-type device. In this embodiment, SLOT_0 is taken as an example.

[0128] S2. Establish a communication connection with the public board X (SLOT_0), generate a Sysupdate signal and send it to the public component, and send the Image file to the public board to upgrade the public board;

[0129] S3, receiving the upgrade result of the public board, judging whether the public board is upgraded successfully, if successful, outputting the upgrade result, if unsuccessful, judging whether the number of retries is exceeded, if not exceeded, repeating steps S2-S3 until the upgrade is successful,

[0130] 2. For the DSP components of the public board, DSP_0 performs the following process during the upgrade:

[0131] S21, responding to the Sysupdate signal of the host computer, recording the current working mode in the first register as the upgrade mode, and receiving the Image file sent by the host computer;

[0132] S22, perform a validity check on the Image file. If the check passes, generate a Write instruction and send it to the SPISwitcher module, so that the SPI Switcher module executes the Write instruction to switch the access right of the public FLASH; if the check fails, write the file reception check failure into the upgrade result;

[0133] S23, obtain the access right to the public FLASH, and write the Image file into the public FLASH through the SPI bus;

[0134] S24. Determine whether the read-back check after writing into the public FLASH passes, write the read-back check result into the upgrade result and send it to the host computer. If it passes, the write check success is written into the upgrade result. If it fails, the write check failure is written into the upgrade result. All upgrade results are summarized and sent to the host computer.

[0135] 3. For the PLD component of the public board, the SPI Switcher module in PLD_0 performs the following process during the upgrade:

[0136] S221, responding to the Write instruction, querying whether the working mode currently recorded in the first register is the upgrade mode;

[0137] S222: If yes, switch the access right of the public FLASH to the upgrade module of the public board, so that the SPI bus between the public FLASH and the upgrade module is connected.

[0138] It can be seen that after receiving the user's upgrade command, the host computer will first obtain the public board slot number in the current device (taking SLOT_0 as an example here), then establish a network connection with DSP_0 in the public slot, and send the Image file to DSP_0 through the network.

[0139] After receiving the Image file, DSP_0 first verifies the legitimacy of the file. After the verification is passed, it notifies PLD_0 to switch the SPI bus of the SPISwitcher module to DSP_0. The notification here can be achieved by DSP writing a specific mark to a specific register of PLD. For example, a register (expressed by MODE_REG) that records the working mode is defined inside PLD. When the mode recorded by MODE_REG is Sysupdate (upgrade mode), the SPI bus is directly switched to the channel of DSP_0. Then DSP_0 writes the Image to Flash through the SPI bus, and finally reads the Image back and verifies it. If the verification is successful, the upgrade result is fed back to the host computer. If the verification fails, the result is fed back to the host computer, and the re-upgrade process can be automatically executed. A register (expressed by MODE_REG) that records the working mode is defined inside PLD. When the mode recorded by MODE_REG is Sysupdate (upgrade mode), the SPI bus is directly switched to the channel of DSP_0.

[0140] Example 3

[0141] This embodiment provides a method for optimizing the boot loading of frame-type equipment board firmware based on the device of embodiment 1. Since the device of this embodiment no longer configures an independent FLASH for each board, the boot loading of each board only needs to reuse the public Flash of the public board SLOT_0.

[0142] When each board starts loading, it will query the status of the first register and the second register. When the working mode recorded in the first register is the SPI Boot mode and the board number recorded in the second register is a public board, the FLASH access right will be switched to the SPI Boot module in the public board, and the Image file will be read from the public FLASH to start loading, completing the startup loading of the public board;

[0143] After the startup loading of the public board is completed, the board numbers in the second register are modified in sequence according to the startup loading order of the boards;

[0144] After each modification of the second register, the FLASH access right is switched to the board to be upgraded corresponding to the board number recorded in the modified second register, so that the SPI Boot module of the board to be upgraded is connected to the SPI bus of the public FLASH, and the Image file is read from the public FLASH to start loading, thereby completing the startup loading of the board to be upgraded.

[0145] Specifically, since the startup loading of the public board SLOT_0 does not require the participation of other board SLOTs, and the loading and startup of other boards SLOT_N to be upgraded needs to rely on the PLD and public Flash of SLOT_0 of the public board, for the convenience of explanation, the startup loading process of SLOT_0 and other slot boards will be explained separately below.

[0146] 1. Public board startup loading

[0147] For the boot loading process of the public board SLOT_0, such as Figure 6 As shown, for the loading of SLOT_0, PLD_0 is powered on first and other devices 1 on SLOT_0 are powered on according to the power-on sequence, and then the SPI bus is switched to DSP_0 through the SPI Switcher, and then DSP_0 is reset through the RESET pin of DSP_0.

[0148] After DSP_0 is released from reset, the subsequent loading process is the same as the existing solution, which will not be described here (see the SPI Boot process of the prior art).

[0149] The SPI Switcher bus switching process in PLD is as follows Figure 6 As shown, a first register for recording the working mode and a second register for recording the bus number to be switched by SPI are defined inside the PLD (the first register and the second register can be represented by MODE_REG and SPI_CHNL_REG respectively). When MODE_REG records the SPI Boot mode, the SPI bus is switched to the SPI bus channel recorded by SPI_CHNL_REG.

[0150] Specifically, for the PLD_0 component, the following process is performed:

[0151] Step 1: Power on and start each device in PLD_0 in sequence according to the power-on sequence. After powering on, the reset control module of the board SLOT_0 generates a Reset Notice message to notify the SPI Switcher module.

[0152] Step 2: The SPI Switcher module responds to the Reset Notice message, records the current working mode in the first register as the SPI Boot mode, and writes the board number corresponding to the public board in the second register (the board number in this application is the same as the slot number, which is SLOT_0).

[0153] Step 3: When the working mode recorded in the first register is the SPI Boot mode and the board number in the second register is SLOT_0, the SPI Switcher module switches the public FLASH access right to DSP_0;

[0154] Step 4: After SLOT_0 obtains the public FLASH access right, the reset control module of SLOT_0 generates a reset signal to the reset module of SLOT_0 for reset;

[0155] Step 5: After the reset module of SLOT_0 is released, it sends a startup signal to the SPI Boot module of SLOT_0. The SPI Boot module of SLOT_0 is connected to the public Flash through the SPI Switcher module, and reads the Image data from the Flash to start loading the public board. The startup loading process of DSP_0 is consistent with the prior art and will not be repeated.

[0156] 2. Boot and load process of other boards to be upgraded

[0157] The startup loading of other boards to be upgraded requires PLD_0 and public Flash in SLOT_0. For each board to be upgraded, PLD_N powers on other devices 1 of SLOT_N according to the power-on sequence. Then, before resetting DSP_N, switch the SPI bus to DSP_N in this slot through SPISwitcher, and then reset DSP_N.

[0158] Specifically, for the PLD_N component, if Figure 7 As shown, the bootloader performs the following process:

[0159] Step 1: Power on and start each device in PLD_N in sequence according to the power-on sequence. After powering on, the reset control module of the board SLOT_N generates a Reset Notice message to notify the SPI Switcher module.

[0160] Step 2, the SPI Switcher module responds to the Reset Notice message in sequence according to the boot loading order, and overwrites the board number SLOT_N corresponding to the current board to be upgraded in the second register. The boot loading order can be responded in order from the public board to the board numbers of other boards to be upgraded from low to high;

[0161] Step 3: Switch the public FLASH access right to DSP_N in the SPI Switcher module;

[0162] Step 4: After SLOT_N obtains the public FLASH access right, the reset control module of SLOT_N generates a reset signal to the reset module of SLOT_N for reset;

[0163] Step 5: After the reset module of SLOT_N is released, it sends a startup signal to the SPI Boot module of SLOT_N. The SPI Boot module of SLOT_N is connected to the public Flash through the SPI Switcher module, and reads the Image data from the Flash to start loading the public board. The startup loading process of DSP_N is consistent with the prior art and will not be repeated.

[0164] It is understandable that, in the existing architecture, the present application selects a slot card among all the cards as a common card, which is equipped with a shared Flash, and uses the shared Flash of the common card as the image storage location of all other slot cards, while other cards cancel the corresponding Flash. At the same time, a SPISwitcher module is added to the PLD of the common card, which connects the Flash and the SPI bus of the DSP on all the cards. It includes two processes: upgrade and boot loading, in which:

[0165] a) When upgrading (Sysupdate mode), you only need to switch the SPI Switcher module of the public board PLD_0 to the SPI bus of DSP_0, and then write the Image to the public Flash;

[0166] b) During SPI Boot (SPI Boot mode), the SPI Switcher module switches the SPI bus to DSP_0, DSP_1, DSP_2, ... DSP_N in sequence, so that the DSPs of all slots obtain the Image data from the public Flash and run it in their respective RAM / DDR.

[0167] In this way, all boards share the same Flash, so when upgrading the firmware version, you only need to write the image file to this Flash once to achieve the program upgrade of all boards, thereby reducing the complexity of the upgrade, reducing the probability of upgrade operation errors, and improving the upgrade efficiency;

[0168] And by using programmable logic devices (FPGA, CPLD, PLD, etc.), the SPI connection relationship between multiple boards and the same Flash is switched, so that multiple boards can time-share the solidified program on the same Flash, saving hardware costs.

[0169] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. According to the technical essence of the present invention, within the spirit and principles of the present invention, any simple modification, equivalent replacement and improvement made to the above embodiment still falls within the protection scope of the technical solution of the present invention.

Claims

1. A device for optimizing the firmware upgrade of a frame-type device board, characterized in that: It includes a host computer and a frame with a plurality of slots for placing boards, wherein the boards include a plurality of boards to be upgraded and a common board; the host computer is only connected to the common board for communication; All boards include a DSP component and a programmable logic component, the DSP component includes a reset module and an SPI Boot module, and the programmable logic component includes a reset control module; wherein the reset module is respectively communicated with the reset control module and the SPI Boot module; The DSP components of the public board also include public FLASH and an upgrade module that communicates with the host computer; The programmable logic component of the public board also includes an SPI Switcher module, a first register and a second register, wherein the first register is used to record the current working mode of the SPI Switcher module, and the second register is used to record the board number that the SPI Switcher module currently needs to switch. The public FLASH and the upgrade module are respectively connected to the SPI Switcher module; the SPI Boot modules of all boards are respectively connected to the SPI Switcher module through the SPI bus, and the reset control modules of all boards are respectively connected to the SPI Switcher module in communication, wherein, The host computer is used to obtain the slot number of the public board in the current frame-type device, establish a communication connection with the DSP component of the public board, send a Sysupdate signal to the public board and send the Image file to the DSP component of the public board; The upgrade module is used to respond to the Sysupdate signal of the host computer, receive the Image file sent by the host computer, generate a Write instruction and send it to the SPI Switcher module, and write the Image file into the public FLASH through the SPI bus according to the SPI Switcher module; The SPI Switcher module is used to respond to the Write instruction of the upgrade module, query the working mode recorded in the first register, and if the current working mode is the upgrade mode, switch the access right of the public FLASH to the upgrade module; Public FLASH, used to save the Image files of all boards; The reset control module is used to send a reset / release control signal to the reset module and generate a Reset Notice message to send to the SPI Switcher module; Reset module, used to reset / reset according to the control signal and trigger the SPI Boot module to start; The public FLASH is used to save the Image files of all boards; The SPI Switcher module is used to respond to the Reset Notice information of all boards and cards, query the working mode recorded in the first register, and if the current working mode is the SPI Boot mode, switch the access right of the public FLASH to the SPI Boot module of each board and card in turn according to the board startup loading order recorded in the second register, so as to realize the time-sharing multiplexing of the SPI bus of boards in different slots and the public Flash; The SPI Boot module is used to read the Image file from the public FLASH through the SPI Switcher module to start loading.

2. A method for optimizing the firmware upgrade of a frame-type device board, characterized in that: The device for optimizing the firmware upgrade of a frame-type device board as claimed in claim 1 specifically comprises the following steps: S1, responding to the user upgrade command, obtaining the slot number of the public board in the current frame-type device; S2, establish a communication connection with the public board, send the Image file to the public board to upgrade the public board; S3, receiving the upgrade result of the public board, and determining whether the public board is upgraded successfully. If not, repeating steps S2-S3 until the upgrade is successful.

3. A method for optimizing the firmware upgrade of a frame-type device board according to claim 2, characterized in that: The specific process of the public board upgrade in step S2 is: S21, responding to the Sysupdate signal of the host computer, recording the current working mode in the first register as the upgrade mode, and receiving the Image file sent by the host computer; S22, perform a validity check on the Image file, if the check passes, generate a Write instruction and send it to the SPI Switcher module, so that the SPI Switcher module executes the Write instruction to switch the access right of the public FLASH; S23, obtain the access right to the public FLASH, and write the Image file into the public FLASH through the SPI bus; S24, determine whether the read-back verification after writing into the public FLASH passes, write the read-back verification result into the upgrade result and send it to the upper computer.

4. A method for optimizing the firmware upgrade of a frame-type device board according to claim 3, characterized in that: The specific process of SPI Switcher module switching in step S22 is as follows: S221, responding to the Write instruction, querying whether the working mode currently recorded in the first register is the upgrade mode; S222: If yes, switch the access right of the public FLASH to the upgrade module of the public board, so that the SPI bus between the public FLASH and the upgrade module is connected.

5. A method for optimizing the boot loading of firmware for a frame-type device board, characterized in that: Applied to the device for optimizing the firmware upgrade of a frame-type device board as claimed in claim 1, the specific process is: Step 1: Each board is powered on in sequence to start its own programmable logic component. After power-on, the reset control module of each board generates a Reset Notice message to notify the SPI Switcher module. Step 2: In the SPI Switcher module, the public FLASH access right is switched to each board in turn according to the board startup loading order. The startup loading order of each board is the public board first and then the board to be upgraded. Step 3: For each board, after the board obtains the public FLASH access right, the reset control module of the board generates a reset signal to the reset module of the board for reset; After the reset module of the board is released from the reset state, it sends a startup signal to the SPI Boot module of the board. The SPI Boot module of the board is connected to the public Flash through the SPI Switcher module, and reads the Image data from the Flash for startup loading.

6. A method for optimizing the boot loading of firmware for a frame-type device board according to claim 5, characterized in that: The specific process of step 2 is: 2.

1. The SPI Switcher module responds to the Reset Notice message, records the current working mode in the first register as the SPI Boot mode, and writes the board numbers corresponding to each board in the second register in the order in which each board is started and loaded. 2.

2. When the working mode recorded in the first register is the SPI Boot mode, the FLASH access right is switched to the SPI Boot module of each board in sequence according to the board number sequence recorded in the second register to start loading each board.

7. A method for optimizing the boot loading of firmware for a frame-type device board according to claim 6, characterized in that: The process of step 2.2 is: Query the status of the first register and the second register. When the working mode recorded in the first register is the SPI Boot mode and the board number recorded in the second register is a public board, switch the FLASH access right to the SPIBoot module in the public board, read the Image file from the public FLASH to start loading, and complete the startup loading of the public board; After the startup loading of the public board is completed, the board numbers in the second register are modified in sequence according to the startup loading order of the boards; After each modification of the second register, the FLASH access right is switched to the board to be upgraded corresponding to the board number recorded in the modified second register, so that the SPI Boot module of the board to be upgraded is connected to the SPI bus of the public FLASH, and the Image file is read from the public FLASH to start loading, thereby completing the startup loading of the board to be upgraded.

Citation Information

Patent Citations

  • Flash-sharing device for multiprocessors and firmware program loading and upgrading method

    CN102722390A

  • Remote online upgrading method for embedded system containing CPU and FPGA

    CN111026427A