High-reliability determinacy Ethernet switch firmware
By designing a high-reliability deterministic Ethernet switch firmware using microprocessors and embedded software, the problem of insufficient security and reliability of switch firmware in the prior art is solved, and automatic detection and self-selecting in flight mode is realized Repair, improving system reliability and security.
Patent Information
- Application Number
- CN202411189402.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-02-11
AI Technical Summary
Existing switch firmware has shortcomings in terms of safety and reliability, especially in the aircraft's flight mode, where automatic detection and self-repair of network configuration parameters cannot be achieved.
A high-reliability deterministic Ethernet switch firmware is designed, using microprocessor, PCI controller, FLASH, SRAM, E2PROM and other components to realize the initial register management, network configuration and continuous status monitoring of the switch through embedded software, supporting automatic Detection and self-healing.
It improves the security and reliability of the switch firmware, supports rapid configuration switching without power loss in flight mode, enhances the reliability and security of the system, and meets the application needs of deterministic network equipment in complex environments.
Smart Images

Figure CN119420718A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of switches, and in particular relates to a high-reliability deterministic Ethernet switch firmware. Background Art
[0002] Time deterministic network technology is a new type of network transmission technology based on ordinary Ethernet. Based on the global clock, it multiplexes services with different QoS requirements to the same network medium for transmission through time division multiple access technology. It is recognized as the next generation of in-device backbone network transmission technology. The switch firmware runs on the management CPU of the switch to implement the initialization register management, network configuration and continuous status monitoring of the deterministic network switch.
[0003] To meet the application requirements of deterministic Ethernet devices, the switch firmware should have high security and high reliability. In the flight mode of the aircraft, the switch should be able to automatically detect network configuration parameters, as well as check and self-repair when configuration information errors occur. Traditional Ethernet switches and AFDX switch firmware cannot meet the above requirements.
[0004] Based on this, the present invention proposes a deterministic Ethernet switch firmware. Summary of the invention
[0005] In order to solve the above problems in the prior art, that is, to solve the problem of low security and reliability of the existing switch firmware, the present invention proposes a highly reliable deterministic Ethernet switch firmware, wherein the processing function unit of the firmware includes a microprocessor, an AHB bus, a PCI controller, an AHB-APB transfer bridge, and an external memory / interface controller;
[0006] The microprocessor is interconnected with the AHB bus;
[0007] The AHB bus is interconnected with the AHB-APB transfer bridge, the PCI controller, and the external memory / interface controller respectively;
[0008] The AHB-APB transfer bridge is interconnected with the I2C bus controller and the UART respectively; the I2C bus controller is interconnected with the E2PROM;
[0009] The external memory / interface controller is interconnected with FLASH and SRAM respectively;
[0010] The PCI controller is interconnected with the switching logic;
[0011] The FLASH is used to store firmware program files; the SRAM is used to run programs; the E2PROM is used to store binary network configuration files; the UART is used for switch management, configuration file download and update in ground mode.
[0012] In some preferred implementations, the working status of the switch includes reset, download, check, configure, operate, update, and stop;
[0013] The state transition process of the switch through the firmware is as follows:
[0014] After the switch is powered on or restarted, the firmware is first subjected to a CRC32 check, and after the check succeeds, the switch enters a reset state; the reset state is: initializing the hardware and interfaces, and clearing all logic registers;
[0015] After the reset is completed, the switch enters the download state, that is, the configuration file is downloaded to the buffer in the SRAM through the UART, or the configuration file in the E2PROM is downloaded to the buffer in the SRAM;
[0016] After the download is complete, the configuration file is checked by CRC32.
[0017] After the verification is successful, the configuration state is entered, and the configuration data is loaded into the switching logic register through the PCI controller through the PCI interface according to the configuration file. After the loading is completed, the configuration data is read from the switching logic register and compared with the configuration file in the buffer;
[0018] If the comparison is correct, the switch enters the operational state.
[0019] In some preferred implementations, if the following situations occur during the operation of the switch: CRC32 check fails in the check state; configuration register readback error occurs in the configuration state; the user chooses to reconfigure in the operation state; a configuration register detection error occurs in the operation state; other fatal errors occur in the operation state, and the other fatal errors include a large number of packet losses caused by switching buffer overflow and multiple network port interruptions caused by certain reasons; then the switch enters the stop state, clears all logic registers and shuts down; if the user needs to restart, it re-enters the reset state.
[0020] In some preferred embodiments, the working modes of the firmware include: ground mode and flight mode;
[0021] When in the ground mode, the user can download the configuration file to the E2PROM through the UART after the switch is powered on or in operation, or directly configure the switch parameters through the UART;
[0022] When in the ground mode, the firmware elf file can also be downloaded to the FLASH, and then a CRC32 check is performed. After the check is correct, the firmware is updated;
[0023] When in the airplane mode, the firmware only downloads configuration files from the E2PROM.
[0024] In some preferred embodiments, when the switch enters the operating state, the user can input operating commands to the switch through the UART, including port monitoring and reading health information; when the switch enters the operating state, if the user does not perform any operation, the firmware automatically performs periodic port status monitoring and configuration checks.
[0025] In some preferred implementations, the firmware automatically and periodically performs port status monitoring and configuration checking, and the process is as follows:
[0026] When the switch enters the operating state, the switch automatically starts timing. If the set time is reached and the switch is in an idle state, the configuration data is automatically detected. If the detection result is correct, the timing is restarted, otherwise the switch jumps to the stop state.
[0027] Beneficial effects of the present invention:
[0028] The present invention improves the security and reliability of switch firmware.
[0029] The present invention is based on a microprocessor and configures the exchange logic register through the PCI bus, does not require an external management CPU, and simplifies the system design; supports fast configuration switching without power failure in an offline state (flight mode); has error detection and correction capabilities in each operating state, improves the reliability and security of the system, and meets the application requirements of deterministic network equipment in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings.
[0031] Figure 1 It is a schematic diagram of the structure of a high-reliability deterministic Ethernet switch firmware according to an embodiment of the present invention;
[0032] Figure 2 is a schematic diagram of a firmware state jump process according to an embodiment of the present invention;
[0033] Figure 3 It is a schematic diagram of state transition in an operating state of an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. 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.
[0035] To meet the application requirements of deterministic Ethernet devices, the switch firmware should have high security and high reliability. When the aircraft is in flight, the switch should be able to automatically detect network configuration parameters, and check and self-repair when configuration information errors occur. Traditional Ethernet switches and AFDX switch firmware cannot meet the above requirements.
[0036] The present invention proposes a highly reliable deterministic Ethernet switch firmware, whose processing function unit mainly includes a microprocessor, a PCI controller, FLASH, SRAM, E2PROM, a debugging serial port, etc., and implements the initialization register management, network configuration and continuous status monitoring of the deterministic network switch through embedded software, without the need for an external management CPU, thus simplifying the system design. This firmware adds self-checking measures in multiple links such as software loading, configuration file downloading, loading, and running, and contains a backup of the configuration file that can be loaded offline in the external memory, thus ensuring the reliability of the system. The details are as follows:
[0037] High reliability deterministic Ethernet switch firmware handles functional units such as Figure 1 As shown, it includes a microprocessor, an AHB bus, a PCI controller, an AHB-APB transfer bridge, and an external memory / interface controller;
[0038] In the present invention, C language is preferably used to develop deterministic Ethernet switch firmware, and the microprocessor is preferably a SPARC V8 processor. A series of peripherals are managed through the AHB bus, wherein the PCI controller controls the PCI interface to configure and manage the switch logic.
[0039] The microprocessor is interconnected with the AHB bus; the AHB bus is respectively connected to the AHB-APB transfer bridge (i.e. Figure 1 The AHB-APB transfer bridge is interconnected with the I2C bus controller and UART respectively; the I2C bus controller is interconnected with the E2PROM; the external memory / interface controller is interconnected with the FLASH and SRAM respectively; the PCI controller is interconnected with the switching logic (i.e., the switching logic register).
[0040] FLASH, used to store firmware program files; SRAM, used to run programs; E2PROM, used to store network configuration files, which can store multiple different configuration files for different switching tasks, or store multiple identical configuration files for backup; UART, used for switch management, configuration file download and update in ground mode;
[0041] The working modes of the firmware include ground mode and flight mode. When in the ground mode, the user can download the configuration file to the E2PROM through the UART after the switch is powered on or in operation, or directly configure the switch parameters through the UART; the user can also download the software elf file to the FLASH, perform a CRC32 check, and update the software after the check is correct;
[0042] When in the airplane mode, the firmware only downloads the configuration files from the E2PROM.
[0043] The operation and management of the switch is implemented in a state machine manner. The switch working states are divided into reset, download, check, configuration, operation, update, and stop. Figure 2 As shown. That is, the state transition process of the switch through the firmware is:
[0044] 1) After the switch is powered on or restarted, the firmware is first checked by CRC32. After the check succeeds, it enters the reset state. The reset state is: initializing the hardware interface and driver, and clearing all switch logic registers;
[0045] 2) After the reset is completed, the switch enters the configuration download state, that is, downloads the binary configuration file from the UART or E2PROM to the configuration file buffer in the SRAM. E2PROM can store multiple configuration files. Users can choose to download different configuration files to perform different switching tasks, or download different backups of a configuration file when a configuration file is damaged;
[0046] 3) After the download is complete, the switch enters the verification state, and performs a CRC32 check on the downloaded configuration file;
[0047] 4) If the verification is correct, enter the configuration state, first load the configuration data into the exchange logic register through the PCI controller, and after the loading is completed, read the configuration data from the logic register and compare it with the configuration file in the buffer;
[0048] 5) If the configuration is correct, that is, the comparison is correct, it will enter the operational state. At this time, the switch can operate normally and perform regular configuration self-test and manual software / configuration verification. Figure 3As shown. The switch will automatically count down. If the set time is reached and the switch is in idle state, it will automatically detect the configuration data. If the detection result is correct, the timing will be restarted, otherwise the switch will jump to the stop state. In addition, users can input commands to the switch on the serial terminal to perform operations such as port monitoring and reading health information;
[0049] 6) If the following situations occur: 1. Configuration file verification fails in the verification state; 2. Configuration register readback error occurs in the configuration state; 3. The user chooses to reconfigure in the operation state; 4. Configuration register detection error occurs in the operation state; 5. Other fatal errors occur in the operation state, such as a large number of packet losses caused by a switching buffer overflow, or multiple network ports are interrupted due to some reasons, the switch enters the stop state, clears all logical registers and shuts down. If the user needs to restart, re-enter the reset state;
[0050] 7) In ground mode, the user can choose to update the configuration file after power-on or in operation mode, that is, enter the update state, download the configuration file to the E2PROM through the debug serial port (i.e. UART), or update the software in the FLASH. After the update is completed, the switch enters the reset-download process.
[0051] In order to meet the application requirements of deterministic Ethernet devices, the switch firmware should have the characteristics of high security and high reliability. The reliability of the switch firmware involved in the present invention is reflected in the following two aspects:
[0052] Reliable software: The switch can download / update software at the factory and in ground mode, that is, download the elf file to the FLASH memory, and perform CRC verification on the file after downloading to ensure the correctness of the download. The switch will verify the software when it is powered on, and can also be manually verified during operation. If the verification fails, the switch will immediately stop the sending and receiving tasks and shut down. In ground mode, the operator can update the software and re-verify; in flight mode, the switch will remain in the shutdown state.
[0053] Reliable configuration: The firmware ensures the reliability of the configuration file through the following measures: the switch enters the verification state after downloading the configuration file, and verifies the configuration file downloaded to the SRAM; in the configuration state, after the configuration data is loaded, the configuration data in the logic register is checked for correctness; in the operating state, the configuration data can be checked manually or automatically at a scheduled time; the configuration file backup can be stored in the E2PROM. If the configuration file verification in the above links fails, it can be downloaded again from the E2PROM.
[0054] It should be noted that the high-reliability deterministic Ethernet switch firmware provided in the above embodiment is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be decomposed or combined. For example, the modules in the above embodiment can be combined into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps, and are not regarded as improper limitations of the present invention.
[0055] Those skilled in the art should be able to appreciate that the modules and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two, and the programs corresponding to the software modules and method steps can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the technical field. In order to clearly illustrate the interchangeability of electronic hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0056] The terms "first", "second", etc. are used to distinguish similar objects rather than to describe or indicate a particular order or sequence.
[0057] The term "comprise" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that includes a list of elements includes not only those elements but also other elements not expressly listed, or also includes elements inherent to such process, method, article, or apparatus / device.
[0058] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. A high-reliability deterministic Ethernet switch firmware, characterized in that: The processing function units of the firmware include: a microprocessor, an AHB bus, a PCI controller, an AHB-APB transfer bridge, and an external memory / interface controller; The microprocessor is interconnected with the AHB bus; The AHB bus is interconnected with the AHB-APB transfer bridge, the PCI controller, and the external memory / interface controller respectively; The AHB-APB transfer bridge is interconnected with the I2C bus controller and the UART respectively; the I2C bus controller is interconnected with the E2PROM; The external memory / interface controller is interconnected with FLASH and SRAM respectively; The PCI controller is interconnected with the switching logic; The FLASH is used to store firmware program files; the SRAM is used to run programs; the E2PROM is used to store binary network configuration files; the UART is used for switch management, configuration file download and update in ground mode.
2. A highly reliable deterministic Ethernet switch firmware according to claim 1, characterized in that: The working status of the switch includes reset, download, check, configure, operate, update, and stop; The state transition process of the switch through the firmware is as follows: After the switch is powered on or restarted, the firmware is first subjected to a CRC32 check, and after the check succeeds, the switch enters a reset state; the reset state is: initializing the hardware and interfaces, and clearing all logic registers; After the reset is completed, the switch enters the download state, that is, the configuration file is downloaded to the buffer in the SRAM through the UART, or the configuration file in the E2PROM is downloaded to the buffer in the SRAM; After the download is complete, the configuration file is checked by CRC32. After the verification is successful, the configuration state is entered, and the configuration data is loaded into the switching logic register through the PCI controller through the PCI interface according to the configuration file. After the loading is completed, the configuration data is read from the switching logic register and compared with the configuration file in the buffer; If the comparison is correct, the switch enters the operational state.
3. A highly reliable deterministic Ethernet switch firmware according to claim 2, characterized in that: If the following situations occur during the operation of the switch: CRC32 check fails in the verification state; configuration register readback error occurs in the configuration state; the user chooses to reconfigure in the operation state; a configuration register detection error occurs in the operation state; other fatal errors occur in the operation state, including a large number of packet losses caused by switching buffer overflow, and multiple network ports are interrupted due to certain reasons, the switch enters the stop state, clears all logic registers and shuts down; if the user needs to restart, it re-enters the reset state.
4. A highly reliable deterministic Ethernet switch firmware according to claim 3, characterized in that: The working modes of the firmware include: ground mode and flight mode; When in the ground mode, the user can download the configuration file to the E2PROM through the UART after the switch is powered on or in operation, or directly configure the switch parameters through the UART; When in the ground mode, the firmware elf file can also be downloaded to the FLASH, and then a CRC32 check is performed. After the check is correct, the firmware is updated; When in the airplane mode, the firmware only downloads configuration files from the E2PROM.
5. The high-reliability deterministic Ethernet switch firmware according to claim 4, characterized in that: When the switch enters the operating state, the user can input operating commands to the switch through the UART, including port monitoring and reading health information; when the switch enters the operating state, if the user does not perform any operation, the firmware automatically performs periodic port status monitoring and configuration checks.
6. A highly reliable deterministic Ethernet switch firmware according to claim 5, characterized in that: The firmware automatically and periodically performs port status monitoring and configuration checking, and the process is as follows: When the switch enters the operating state, the switch automatically starts timing. If the set time is reached and the switch is in an idle state, the configuration data is automatically detected. If the detection result is correct, the timing is restarted, otherwise the switch jumps to the stop state.