Astronavigation SPARC multi-core processor high-reliability parallel operation method
By adopting the SPARC multi-core processor architecture in aerospace software, deploying and running multiple processor cores independently, and using shared data areas and inter-core interrupts to achieve data sharing and synchronization, the software complexity and real-time limitations of single-core processors are solved. problems, improving processing efficiency and product reliability.
Patent Information
- Application Number
- CN202410557649.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-05-08
AI Technical Summary
Traditional aerospace single-core processor software has complex internal modules, difficult integration and debugging, slow processing speed, and poor real-time performance. It cannot meet the needs of software such as intelligent processing of large-scale spaceborne satellite remote sensing images.
Adopting the SPARC multi-core processor architecture, multiple software modules are independently deployed on multiple processor cores, using the shared data area for data sharing, and realizing notification synchronization through inter-core interrupts, reducing coupling and communication delays between modules, and improving the processor Software operating efficiency and reliability.
It improves software processing efficiency, reduces communication delays, improves the quality and reliability of aerospace products, simplifies the development and debugging process, and adapts to the high real-time and high reliability requirements of large-scale software.
Smart Images

Figure CN118550867A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic digital data processing, and in particular to a high-reliability parallel operation method for an aerospace SPARC multi-core processor. Background Art
[0002] The traditional aerospace software architecture is to design a multi-module multi-task mode on a single-core processor and formulate its communication interaction mechanism. As the scale of embedded software increases, the number of software modules increases, and the functions become more complex, the internal interface of the software under the single-core architecture is complex, the difficulty of integrated debugging increases significantly, the software processing speed slows down, the development and debugging efficiency decreases, and the communication delay increases.
[0003] At present, the operating speed of the CPU single-core processor running the operating system software of large-scale satellite remote sensing image intelligent processing software, inter-satellite router software, control management software, data storage software, etc. is difficult to meet the requirements, and multi-core parallel computing methods are urgently needed to improve processing efficiency; secondly, with the increase in module division, the integration development and joint debugging between multiple modules and multiple tasks in single-core software are significantly more difficult, and the development efficiency is low; the communication mechanism of multiple tasks is more complicated, resulting in insufficient real-time performance, and it is necessary to reduce the communication delay between modules. At present, the traditional single-core processor software architecture is difficult to meet the processing speed and real-time requirements.
[0004] Therefore, a highly reliable and fast operation method for aerospace is needed. Summary of the invention
[0005] The present invention aims to solve the problems of complex internal modules and interfaces, difficult integrated debugging, slow software processing speed and poor real-time performance of aerospace single-core processor software. The present invention provides a high-reliability parallel operation method for aerospace SPARC multi-core processors. By adopting a multi-core processing software architecture, multiple aerospace software modules are independently deployed to multiple processor cores, and multiple software are independently compiled and run, thereby reducing the software development workload of multi-module scheduling, reducing coupling between modules, reducing the consumption of data stream transmission, using shared data areas to share data between multiple cores, and using inter-core interrupts to achieve notification synchronization, thereby improving the overall operation capability of multi-core processor software, and ultimately improving software processing efficiency, reducing communication delays, improving aerospace product quality, and improving aerospace product reliability.
[0006] The present invention provides a high-reliability parallel operation method of an aerospace SPARC multi-core processor. The hardware platform uses a multi-core processor chip with a SPARC architecture. The multi-core processor chip includes at least two processor cores: CPU0 and CPU1, and also includes a FLASH storage space, a multi-processor status register and a running program. The multi-processor status register monitors the running state of the processor core and activates the processor cores other than CPU0 in the multi-core processor chip. The running program includes at least a CPU0 application program and a CPU1 application program, and also includes a BOOT boot program. The running program is burned into the FLASH storage space when assembled on the ground.
[0007] All processor cores of a multi-core processor chip run independently and perform inter-core notification and synchronization;
[0008] After power-on, the multi-core processor chip defaults to CPU0 in working state. First, the BOOT program is booted to initialize the CPU interrupt vector table, configure the multi-core operating environment, initialize the stack pointer of each CPU core, move the running program from the FLASH storage space to the DDR operating space, and point the PC current program running pointer to the program entry address Main function of CPU0. Then the BOOT program configures the multi-processor status register to start the multi-core running state; once CPU1 is turned on, the PC pointer of CPU1 points to the Main function entry of CPU1, and multiple cores start running at the same time.
[0009] The high-reliability parallel operation method of an aerospace SPARC multi-core processor described in the present invention is, as a preferred method, to read bit [3:0] of the multi-processor status register to know whether the processor core is in the running state; when the number of bits read is 1, the corresponding processor core is suspended and is in the power-down mode; when the number of bits read is 0, the corresponding processor core has been activated and is in the normal working mode;
[0010] Writing 1 to the corresponding position of bit [3:0] of the multiprocessor status register can activate the corresponding processor core;
[0011] After the system is reset, except for CPU0, all other CPU cores are in power-down mode. CPU0 can activate some or all of the other processor cores by operating bit [3:0] of the multiprocessor status register.
[0012] The high-reliability parallel operation method of an aerospace SPARC multi-core processor described in the present invention is, as a preferred method, to set a shared memory space for data interaction between cores;
[0013] The address of the BOOT boot program's running space is 0x6000000~0x60100000, the address of CPU0's running space + stack space is 0x61000000~0x67fffffc, the address of CPU1's running space + stack space is 0x68000000~0x6efffffc, and the address of the CPU1 and CPU0 shared memory space used for inter-core data interaction is 0x6f000000~0x6ffffffc.
[0014] The high-reliability parallel operation method of an aerospace SPARC multi-core processor described in the present invention is, as a preferred mode, that each CPU core of the multi-core processor core independently uses its own peripherals, and the peripherals include timers, serial ports and external interrupts.
[0015] The high-reliability parallel operation method of aerospace SPARC multi-core processor described in the present invention is, as a preferred method, a method of inter-core notification and synchronization is: reading and writing DDR specified data sharing area address;
[0016] Inter-core notification and synchronization are protected by a mutex mechanism, and shared peripheral operations are written between the LOCK and UNLOCK operations to protect multiple cores from using shared peripherals at the same time to avoid conflicts.
[0017] The invention discloses a method for high-reliability parallel operation of aerospace SPARC multi-core processors. As a preferred method, the specific method of the mutual exclusion lock mechanism is as follows: the CPU of the multi-core processor core provides two interface functions, SMP_LOCK and SMP_UNLOCK, for the application layer to use the mutual exclusion lock function; a fixed address is used as a lock flag, and the protection code is locked using the functions SMP_LOCK and SMP_UNLOCK. If the lock flag is locked during SMP_LOCK, the software will block and wait until it is unlocked.
[0018] The high-reliability parallel operation method of aerospace SPARC multi-core processor described in the present invention is, as a preferred method, that inter-core notification and synchronization are realized by forced triggering of interrupts provided by the multi-core processor chip;
[0019] Each CPU in a multi-core processor chip corresponds to a separate interrupt mask register and interrupt force register. The interrupt mask register sets whether the corresponding CPU enables a specified interrupt, and the interrupt force register forcibly triggers a specified interrupt. A CPU in a multi-core processor chip can receive an interrupt force trigger initiated by another CPU in real time, and the interrupt service program of the CPU receiving the interrupt force trigger responds correctly and executes the interrupt.
[0020] The high-reliability parallel operation method of an aerospace SPARC multi-core processor described in the present invention is, as a preferred method, that the CPU0 application executes bus control and data parsing functions, and the CPU1 application executes floating-point data high-speed calculation functions; at the same time, the CPU1 application compares the DDR program area with the FLASH storage data, and completes the abnormality monitoring and health management functions.
[0021] The high-reliability parallel operation method of an aerospace SPARC multi-core processor described in the present invention is, as a preferred embodiment, the CPU0 application program runs in CPU0, and the CPU1 application program runs in CPU1;
[0022] The CPU0 application executes the embedded real-time operating system program and performs overall scheduling and bus control, while the CPU1 application executes the bare metal program and performs dynamic monitoring and health management on the CPU0 application at the same time;
[0023] CPU0 reads the multi-core program data stored in the FLASH storage space; CPU1 uses the CAN bus to respond to CAN interrupts and receive CAN data sent by the PC; after configuring interrupt and GPIO related registers, the multi-core responds to their respective external GPIO interrupts.
[0024] The high-reliability parallel operation method of an aerospace SPARC multi-core processor described in the present invention is, as a preferred embodiment, each processor core in the multi-core processor chip includes a 32-bit RISC integer processing unit, a double-precision floating-point processing unit, a high-speed first-level cache and a memory management unit;
[0025] The multi-core processor chip also includes GPIO, UART, timer, interrupt controller, debug support unit, memory controller, 1553B bus controller, CAN bus controller, Ethernet controller and SpaceWire bus node controller.
[0026] The present invention has the following advantages:
[0027] The present invention independently deploys multiple software modules to multiple processor cores for parallel computing, breaking through the traditional aerospace single-core processor software design mode, so that the software can adapt to the requirements of large-scale software, multi-module integration, high real-time performance, and high reliability. At the same time, the present invention expands the supporting technologies related to aerospace multi-core processors, including multi-core loading and starting, inter-core interrupts, peripheral management, data sharing areas, and inter-core dynamic monitoring, which has great value for the development of comprehensive electronic, comprehensive control software, and health management aerospace software in the field of satellite payload software.
[0028] (1) The present invention solves the problems of difficulty in decoupling, slow operation and difficulty in joint debugging in developing large-scale highly integrated software on traditional aerospace single-core processors. Each core software can be debugged separately, and the development efficiency is significantly improved.
[0029] (2) The present invention utilizes a shared data area to share data among multiple cores and utilizes inter-core interrupts to achieve notification synchronization, thereby reducing storage space and processing time consumption and improving the overall operating capability of multi-core processor software.
[0030] (3) The present invention can realize dynamic monitoring between multiple cores without affecting the real-time performance of the software's business functions. At the same time, it realizes the health management function and significantly improves the reliability of the software product. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a dual-core software storage and operation space allocation diagram for a high-reliability parallel operation method of an aerospace SPARC multi-core processor;
[0032] Figure 2 A dual-core processor software startup flow chart for a high-reliability parallel operation method for aerospace SPARC multi-core processors;
[0033] Figure 3 A CPU chip structure block diagram of an embodiment of a high-reliability parallel operation method of an aerospace SPARC multi-core processor;
[0034] Figure 4 A hardware connection relationship diagram for testing an embodiment of a high-reliability parallel operation method for an aerospace SPARC multi-core processor;
[0035] Figure 5 A schematic diagram of dual-core CPU loading for an embodiment of a high-reliability parallel operation method for an aerospace SPARC multi-core processor;
[0036] Figure 6 The present invention is a schematic diagram of a method for high-reliability parallel operation of aerospace SPARC multi-core processors using mutual exclusion locks to protect shared peripherals. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings 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.
[0038] Example 1
[0039] A high-reliability parallel operation method for aerospace SPARC multi-core processors. Figure 1It is a storage and operation space allocation diagram of the dual-core software of the present invention, which describes the storage distribution of BOOT loader, CPU0 program, and CPU1 program in Flash, as well as the space allocation in the DDR operation space of the CPU;
[0040] Figure 2 The function of the BOOT program is to move the CPU0 and CPU1 programs from the Flash to the DDR running space, and configure the multi-core register to start the dual-core operation.
[0041] (1) First, it is necessary to build the hardware platform and software test environment, and verify the multi-core deployment and startup methods. The chip uses the S698PM processor chip based on the SPARC architecture. It is a radiation-resistant, high-performance, high-reliability, high-integration, low-power multi-core parallel processor SOC chip. It uses the LEON4 core and symmetric multi-processing architecture (SMP) and complies with the SPARC V8 standard. The S698PM chip integrates 4 high-performance processors, each of which consists of a 32-bit RISC integer processing unit (IU), a double-precision floating-point processing unit (FPU), a high-speed first-level cache (L1 Cache) and a memory management unit (MMU), such as Figure 3 shown.
[0042] (2) At the same time, the hardware platform integrates a rich set of on-chip peripherals, including GPIO, UART, timer, interrupt controller, debug support unit, memory controller, 1553B bus controller, CAN bus controller, Ethernet controller, SpaceWire bus node controller, etc., and deploys FLASH storage chip as the boot storage medium.
[0043] The hardware connection relationship and physical diagram of the development and verification platform are as follows: Figure 4 shown.
[0044] (3) The S698PM chip can monitor the status of each processor core through the multiprocessor status register MSR (Multiprocessor Status Register). By reading bit [3:0] of the MSR register, you can know whether the processor core is in operation. If a bit is 1, it means that the corresponding processor core is halted and in power-down mode. If a bit is 0, it means that the corresponding processor core has been activated and is in normal working mode. Writing 1 to a bit [3:0] of the MSR register can activate the corresponding processor core. After the system is reset, except for CPU0, the other three CPUs are in power-down mode. CPU0 can activate some or all of CPU1 to CPU3 by operating bit [3:0] of the multiprocessor status register MSR.
[0045] (4) After power-on, the chip defaults to CPU0 in working state. In dual-core mode, the software includes BOOT boot program, CPU0 application program, and CPU1 application program. Figure 5 As shown. All three programs are burned into the boot storage medium FLASH. After the product is powered on, the first program to be booted is the BOOT program, which is used to initialize the CPU interrupt vector table, configure the multi-core operating environment, initialize the stack pointer of each CPU core, move the program from the peripheral memory to the DDR operating space, and point the PC current program running pointer to the program entry address Main function of CPU0. Finally, configure the "multi-processor status register MSR" to start the multi-core operating state. Once CPU1 is turned on, the PC pointer of CPU1 points to its Main function entry, and the multi-cores start running at the same time.
[0046] (5) Taking the dual-core mode as an example, the dual-core software runs independently in each core. CPU0 executes the embedded real-time operating system program to perform overall scheduling and bus control. CPU1 executes the bare metal program with simple control logic and high timeliness requirements. At the same time, the program area of CPU0 software is dynamically monitored and health managed. The dual-core running space allocation is shown in Table 1:
[0047] Table 1
[0048]
[0049] (6) The dual cores independently manage their own peripherals, such as CPU0 uses chip timer 1, serial port 1, and external interrupt 12, and CPU1 uses chip timer 2, serial port 2, and external interrupt 13. Each peripheral function is independent and there is no usage conflict, which ensures the relative independence of the dual-core software and reduces interaction consumption. The practical results show that: CPU0 can correctly read the dual-core program data stored in FLASH; CPU1 can use the CAN bus to respond to CAN interrupts and receive CAN data sent by the PC, indicating that the dual cores can use their own peripherals independently; after configuring interrupts and GPIO related registers, the dual cores can correctly respond to their own external GPIO interrupts; CPU0 can respond to general timer 1 interrupts, CPU2 can respond to general timer 2 interrupts, and the two timers work independently without affecting each other; the dual-core test results are shown in Table 2.
[0050] Table 2
[0051]
[0052]
[0053] (7) The dual-core software completes data interaction by reading and writing the address of the specified data sharing area in DDR. In order to avoid conflicts, protection can be achieved by using a mutex lock mechanism. The CPU provides a mutex lock function and provides two interface functions, SMP_LOCK and SMP_UNLOCK, for use by the application layer. A fixed address is used as the lock flag, and the two functions SMP_LOCK and SMP_UNLOCK are used to lock the protection code. If the lock flag is locked during SMP_LOCK, the software will block and wait until it is unlocked. The software flow is as follows: Figure 6 As shown, the shared peripheral operation is written between the lock LOCK and unlock UNLOCK operations, so that the two cores can be protected from using the shared peripherals at the same time to avoid conflicts.
[0054] (8) High real-time notification and synchronization between the two cores can also be achieved through the interrupt force trigger provided by the multi-core processor. The two cores set the interrupt force register to trigger the inter-core interrupt 14 to complete the inter-core synchronization and notification.
[0055] Each processor core of the CPU corresponds to a separate interrupt mask register IMR (Interrupt Mask Register) and an interrupt force register IFR (Interrupt Force Register). The interrupt mask register is used to set whether the corresponding CPU enables a certain interrupt. The interrupt force register is used to force an interrupt. The CPU0 program sets the position corresponding to interrupt No. 14 in the CPU1 interrupt force register to 1, and CPU1 enables interrupt No. 14. The experimental results show that CPU1 can receive the interrupt force trigger initiated by CPU0 in real time, and CPU1's interrupt service program No. 14 can respond and execute correctly. At the same time, the communication time is measured using the timer query method, and the communication delay is less than 200us, less than 1ms. This proves the effectiveness of using forced interrupts for high real-time interaction between cores.
[0056] (9) The CPU0 program executes bus control and data analysis functions, while the CPU1 program executes floating-point data high-speed calculation functions. At the same time, CPU1 compares the DDR program area with the Flash storage data to complete abnormality monitoring and health management functions. The two core functions cooperate with each other to complete the efficient and reliable operation of large-scale, multi-module, multi-core software.
[0057] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A high-reliability parallel operation method for an aerospace SPARC multi-core processor, characterized in that: The hardware platform uses a multi-core processor chip of SPARC architecture, the multi-core processor chip includes at least two processor cores: CPU0 and CPU1, and also includes FLASH storage space, multi-processor status register and running program, the multi-processor status register monitors the running status of the processor core and activates the processor cores other than CPU0 in the multi-core processor chip, the running program includes at least CPU0 application program and CPU1 application program, and also includes BOOT boot program, the running program is burned into the FLASH storage space during ground assembly; All processor cores of the multi-core processor chip operate independently and perform inter-core notification and synchronization; After power-on, the multi-core processor chip defaults to CPU0 being in working state. First, the BOOT program is booted to initialize the CPU interrupt vector table, configure the multi-core operating environment, initialize the stack pointer of each CPU core, move the running program from the FLASH storage space to the DDR operating space, and point the PC current program running pointer to the program entry address Main function of CPU0. Then the BOOT program configures the multi-processor status register to start the multi-core operating state. Once CPU1 is turned on, the PC pointer of CPU1 points to the Main function entry of CPU1, and multiple cores start running simultaneously.
2. The high-reliability parallel operation method of an aerospace SPARC multi-core processor according to claim 1, characterized in that: By reading bit [3:0] of the multiprocessor status register, it is possible to know whether the processor core is in the running state; when the number of bits read is 1, the corresponding processor core is suspended and is in the power-down mode; when the number of bits read is 0, the corresponding processor core has been activated and is in the normal working mode; Writing 1 to the corresponding position of bit [3:0] of the multiprocessor status register can activate the corresponding processor core; After the system is reset, except for CPU0, the CPUs of other cores are in power-down mode. CPU0 can activate some or all of the other processor cores by operating bit [3:0] of the multi-processor status register.
3. The high-reliability parallel operation method of an aerospace SPARC multi-core processor according to claim 1, characterized in that: Set up shared memory space for data interaction between cores; The address of the BOOT boot program's running space is 0x6000000~0x60100000, the address of CPU0's running space + stack space is 0x61000000~0x67fffffc, the address of CPU1's running space + stack space is 0x68000000~0x6efffffc, and the address of the CPU1 and CPU0 shared memory space used for inter-core data interaction is 0x6f000000~0x6ffffffc.
4. The high-reliability parallel operation method of an aerospace SPARC multi-core processor according to claim 1, characterized in that: Each CPU core of the multi-core processor core independently uses its own peripherals, which include timers, serial ports and external interrupts.
5. The high-reliability parallel operation method of aerospace SPARC multi-core processor according to claim 1, characterized in that: The method of inter-core notification and synchronization is: read and write DDR to specify the address of the data sharing area; Inter-core notification and synchronization are protected by a mutex mechanism, and shared peripheral operations are written between the LOCK and UNLOCK operations to protect multiple cores from using shared peripherals at the same time to avoid conflicts.
6. The high-reliability parallel operation method of aerospace SPARC multi-core processor according to claim 5, characterized in that: The specific method of the mutual exclusion lock mechanism is: the CPU of the multi-core processor core provides two interface functions SMP_LOCK and SMP_UNLOCK for the application layer to use the mutual exclusion lock function; a fixed address is used as the lock flag, and the protection code is locked using the functions SMP_LOCK and SMP_UNLOCK. If the lock flag is locked during SMP_LOCK, the software will block and wait until it is unlocked.
7. The high-reliability parallel operation method of aerospace SPARC multi-core processor according to claim 1, characterized in that: Inter-core notification and synchronization are achieved through forced triggering of interrupts provided by the multi-core processor chip; Each CPU in the multi-core processor chip corresponds to a separate interrupt mask register and an interrupt force register. The interrupt mask register sets whether the corresponding CPU enables a specified interrupt, and the interrupt force register forcibly triggers a specified interrupt. A CPU in the multi-core processor chip can receive an interrupt force trigger initiated by another CPU in real time, and the interrupt service program of the CPU receiving the interrupt force trigger responds correctly and executes the interrupt.
8. The high-reliability parallel operation method of aerospace SPARC multi-core processor according to claim 1, characterized in that: The CPU0 application performs bus control and data analysis functions, and the CPU1 application performs floating-point data high-speed calculation functions; at the same time, the CPU1 application compares the DDR program area with the FLASH storage data, and completes abnormal monitoring and health management functions.
9. The high-reliability parallel operation method of aerospace SPARC multi-core processor according to claim 1, characterized in that: CPU0 applications run in CPU0, and CPU1 applications run in CPU1; The CPU0 application executes the embedded real-time operating system program and performs overall scheduling and bus control, while the CPU1 application executes the bare metal program and performs dynamic monitoring and health management on the CPU0 application at the same time; CPU0 reads the multi-core program data stored in the FLASH storage space; CPU1 uses the CAN bus to respond to CAN interrupts and receive CAN data sent by the PC; after configuring interrupt and GPIO related registers, the multi-core responds to their respective external GPIO interrupts.
10. The high-reliability parallel operation method of aerospace SPARC multi-core processor according to claim 1, characterized in that: Each processor core in the multi-core processor chip includes a 32-bit RISC integer processing unit, a double-precision floating-point processing unit, a high-speed first-level cache and a memory management unit; The multi-core processor chip also includes GPIO, UART, timer, interrupt controller, debugging support unit, memory controller, 1553B bus controller, CAN bus controller, Ethernet controller and SpaceWire bus node controller.
Citation Information
Patent Citations
Reconfigurable system structure of multi-core processor of comprehensive communication system
CN107943744A
Spacecraft software dynamic refreshing reliability protection method
CN117453436A
Multi-task parallel processing method based on multi-core embedded processor
CN117472561A
Cited By
Start deployment and cooperative processing method for multi-core heterogeneous system
CN119415161A
Starting method and device, electronic equipment and storage medium
CN119806659A
Starting method and device, electronic equipment and storage medium
CN119806659B
Multi-processor core communication method and device, electronic equipment and storage medium
CN120162177A
Multi-processor core communication method, device, electronic device and storage medium
CN120162177B
