Method and system for quickly starting multi-core heterogeneous system
By allowing small cores to initialize peripheral modules in parallel when large cores start up in multi-core heterogeneous systems, the problem of low efficiency in the existing technology of large cores completing chip startup work alone is solved, and more efficient chip startup and peripheral initialization are achieved. .
Patent Information
- Application Number
- CN202410816127.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-10-11
AI Technical Summary
During the chip startup phase of existing multi-core heterogeneous systems, the large core is required to load the kernel system, decompress and initialize peripherals, making it difficult for the small core to actively undertake work tasks, and peripheral initialization relies on the completion of the large core before files can be transferred. Low efficiency.
When the big core runs the chip startup work, the small core initializes peripheral modules in parallel, including camera modules and storage modules, completes kernel loading and decompression through the I2C interface, GPIO peripheral interface and peripheral modules, optimizing the parallelism of the chip startup process. .
It improves the chip startup efficiency and the utilization rate of small cores in the startup phase, improves the efficiency of camera module initialization and kernel system operation, and reduces the complexity of the large core's work.
Smart Images

Figure CN118760482A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of system startup, and in particular to a method and system for quickly starting a multi-core heterogeneous system. Background Art
[0002] With the improvement of chip technology, multi-core systems are increasingly widely used in smart products. The current multi-core heterogeneous system generally includes multiple processing cores such as large cores and small cores. Among them, the large core includes external DDR memory, SRAM memory, etc., and the small core is generally a general MCU-level processing core, and the memory resources include RAM memory, etc. Based on the multi-core heterogeneous executable file loading system disclosed in the Chinese patent (patent application number: 202210452806.9), the system includes a slave core and a master core. The technical solution for multi-core heterogeneity has the defect that the running file comes from the master core and the master core needs to transmit the file to be run to the slave core. It is difficult for the slave core to take the initiative to undertake work tasks for the master core. For example, in the chip startup stage, the master core is required to load and decompress the kernel system and initialize the peripherals. If the slave core needs to execute the operation of the peripherals, the master core needs to complete the initialization of the peripherals and transfer the peripheral-related files to the slave core to achieve it. Summary of the invention
[0003] The present application provides a method for quickly starting a multi-core heterogeneous system, and the specific technical solution is as follows: when the large core runs the chip startup work and enters the SPL stage, the large core starts the small core, so that the small core completes the initialization of the peripheral module when the large core runs the chip startup work.
[0004] Furthermore, the big core and the small core support common access to the I2C interface, GPIO peripheral interface and peripheral modules.
[0005] Furthermore, the peripheral module is a camera module. When the large core runs the chip startup work and enters the U-BOOT stage, the small core controls the power supply module to supply power to the camera module to complete the power-on process of the camera module; the small core transmits the camera module working clock to the camera module through the clock control module; the small core controls the high level or low level switching of the reset pin to control the reset operation of the camera module; the small core transmits the camera module configuration parameters pre-stored in the internal memory of the small core to the camera module through the I2C interface to complete the parameter initialization of the camera module; the small core controls the camera module to start and collect image data after the parameter initialization.
[0006] Furthermore, the multi-core heterogeneous system fast startup method also includes: after the large core completes the chip startup work, based on the initialization work of the camera module completed by the small core, the large core controls the camera module to collect image data, and the large core receives the image data transmitted by the camera module.
[0007] Furthermore, the multi-core heterogeneous system fast startup method also includes: when the large core runs the chip startup work and enters the SPL stage, the large core starts the small core, so that when the large core runs the chip startup work, the small core completes the loading and decompression of the kernel through the peripheral module, so that the large core can run the kernel after completing the chip startup work.
[0008] Furthermore, the peripheral module is a storage module; wherein the storage module stores a kernel image sub-file inside.
[0009] Furthermore, the storage module is a non-volatile flash memory chip with an SPI interface.
[0010] Furthermore, when the large core runs the chip startup work, the small core completes the loading and decompression of the kernel through the peripheral module, specifically including: when the large core runs the chip startup work and enters the U-BOOT stage, the small core accesses the storage module through the GPIO peripheral interface, and reads the kernel image subfile stored inside the storage module to the first designated storage address of the storage medium inside the large core; the small core performs a kernel decompression operation based on the kernel image subfile stored inside the storage module, and stores the decompressed kernel image subfile obtained by the kernel decompression operation to the second designated storage address of the storage medium inside the large core; wherein, the first designated storage address is used to store the kernel image subfile; and the second designated storage address is used to store the decompressed kernel image subfile.
[0011] Furthermore, the multi-core heterogeneous system fast startup method also includes: the large core reads the startup device tree file and the decompressed kernel image subfile from the internal storage medium; the large core completes the operation startup of the kernel operating system based on the startup device tree file and the decompressed kernel image subfile.
[0012] Furthermore, the peripheral modules are a storage module and a camera module. When the large core runs the chip startup work, the small core completes the initialization work of the peripheral modules, specifically including: when the large core runs the chip startup work and enters the U-BOOT stage, The small core accesses the storage module through the GPIO peripheral interface, and reads the kernel image subfile stored in the storage module to the first designated storage address of the storage medium inside the large core; the small core performs a kernel decompression operation based on the kernel image subfile stored in the storage module, and stores the decompressed kernel image subfile obtained by the kernel decompression operation to the second designated storage address of the storage medium inside the large core; the small core controls the power supply module to supply power to the camera module to complete the power-on process of the camera module; the small core transmits the camera module working clock to the camera module through the clock control module; the small core controls the camera module to perform a reset operation by controlling the high or low level switching of the reset pin; the small core transmits the camera module configuration parameters pre-stored in the small core internal memory to the camera module through the I2C interface to complete the parameter initialization of the camera module; after the small core completes the parameter initialization of the camera module, it controls the camera module to start and collect image data; wherein, the storage module stores a kernel image subfile; the first designated storage address is used to store the kernel image subfile; the second designated storage address is used to store the decompressed kernel image subfile.
[0013] The present application also discloses a multi-core heterogeneous system, which adopts the multi-core heterogeneous system fast startup method as described in any of the previous items; wherein the multi-core heterogeneous system includes a large core and a small core, the large core adopts an A7 core, and the small core adopts an M3 core.
[0014] The multi-core heterogeneous system fast startup method and system described in the present application optimizes the parallelism of the loading work of the kernel system, the decompression work of the kernel system, and the initialization work of other peripheral modules with the chip startup process during the chip startup phase by controlling the small core to run the initialization work of the peripheral modules in parallel when the large core runs the chip startup work, thereby improving the chip startup efficiency and the utilization rate of the small core during the chip startup phase. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 The figure is a flow chart of a system startup method in the prior art.
[0016] Figure 2 A flowchart of a method for quickly starting a multi-core heterogeneous system according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0017] The following will describe the embodiments of the present application in detail in conjunction with the accompanying drawings. It should be understood that the specific embodiments described below are only used to explain the present application and are not used to limit the present application.
[0018] In view of the technical defect that in the chip startup phase, a large core is required to load, decompress and initialize the kernel system and peripherals in the prior art, and if the small core needs to execute the peripheral operation, the large core needs to complete the initialization of the peripherals and then transfer the peripheral related files to the small core to achieve the technical defect. The present application provides a multi-core heterogeneous system fast startup method, which specifically includes: when the large core runs the chip startup work and enters the SPL phase, the large core starts the small core so that the small core completes the initialization of the peripheral module when the large core runs the chip startup work. Among them, the SPL phase refers to the Secondary Program Loader phase, which belongs to the second startup phase in the chip startup phase, and is usually used to initialize the peripheral module and read the required operation code in the U-BOOT phase from the peripheral module. This embodiment controls the small core to run the initialization of the peripheral module in parallel when the large core runs the chip startup work, so as to optimize the parallelism of the loading work of the kernel system, the decompression work of the kernel system and the initialization work of other peripheral modules and the chip startup process in the chip startup phase, improve the chip startup efficiency, and improve the utilization rate of the small core in the chip startup phase.
[0019] As a preferred implementation method of the present application, the large core and the small core support common access to the I2C interface, GPIO peripheral interface and peripheral modules. Since the multi-core heterogeneous system in the current prior art refers to a plurality of processing cores including a large core and a small core, the plurality of processing cores are of different architectures, and the corresponding operating systems are different, and resource parameters are usually not shared between cores running different operating systems, in order to realize that the small core assists the large core in completing the initialization of the peripheral module, the present application limits the large core and the small core to support common access to the I2C interface, GPIO peripheral interface and peripheral modules, and indirectly realizes the resource parameter sharing between the large core and the small core.
[0020] As a preferred implementation of the present application, the peripheral module is a camera module, and the small core completes the initialization of the peripheral module while the large core runs the chip startup work, specifically including: when the large core runs the chip startup work and enters the U-BOOT stage, the small core controls the power supply module to supply power to the camera module to complete the power-on process of the camera module; the small core transmits the camera module working clock to the camera module through the clock control module to implement the configuration process of the camera module working clock; the small core controls the high level or low level switching of the reset pin to control the camera module to perform a reset operation; The small core transmits the camera module configuration parameters pre-stored in the small core internal memory to the camera module through the I2C interface to complete the parameter initialization of the camera module; the small core controls the camera module after parameter initialization to start and collect image data. Specifically, the U-BOOT stage refers to the third startup stage entered after the SPL stage in the chip startup stage, and is usually loaded based on the running code required for the U-BOOT stage read in the SPL stage. The camera module refers to a module with an image data acquisition function. In this embodiment, the peripheral module is configured as a camera module, so that the multi-core heterogeneous system is a system for realizing camera module control. The initialization work required to start the camera module in the system includes but is not limited to: power-on process, clock configuration process, parameter configuration process, etc.
[0021] As a preferred implementation of the present application, the multi-core heterogeneous system fast startup method further includes: after the large core completes the chip startup work, based on the initialization work of the camera module completed by the small core, the large core receives the image data transmitted by the camera module. This implementation enables the large core to receive the image data collected after the camera module is started based on the initialization work of the camera module implemented by the small core while completing the chip startup work. Compared with the technical solution in the prior art that requires the large core to complete the chip startup work before executing the initialization work and startup operation of the camera module, the system's execution efficiency of the initialization work and startup operation of the camera module is more efficient, effectively improving the user experience.
[0022] As a preferred implementation of the present application, the multi-core heterogeneous system fast startup method also includes: when the large core runs the chip startup work and enters the SPL stage, the large core starts the small core, so that when the large core runs the chip startup work, the small core completes the loading and decompression of the kernel through the peripheral module, so that the large core can run the kernel after completing the chip startup work. In this implementation, the large core controls the startup of the small core, so that the small core is triggered by the large core to execute the loading and decompression of the kernel, reducing the complexity of the steps that the large core needs to perform in the chip startup work. In the end, the large core only needs to use the decompressed kernel completed by the small core to run the kernel system, and can still use the high-speed computing efficiency of the large core to complete the operation of the kernel system, ensuring the smoothness of the kernel system operation while improving the system startup efficiency.
[0023] As a preferred implementation of the present application, the peripheral module is a storage module; wherein the storage module stores a kernel image subfile. This implementation solves the limitation of limited memory resources of large cores and small cores in a multi-core heterogeneous system by storing the kernel image subfile used for the multi-core heterogeneous system to complete chip startup in the peripheral storage module.
[0024] As a preferred implementation of the present application, the storage module is configured as a non-volatile flash memory chip with an SPI interface, and a kernel image sub-file is stored inside the non-volatile flash memory chip with an SPI interface. This implementation adopts a non-volatile flash memory chip with an SPI interface to store the kernel image sub-file required in the chip startup phase in a multi-core heterogeneous system, and configures the storage module to support common access by large cores and small cores, so that the small core can complete the reading and calling of the kernel image sub-file from the non-volatile flash memory chip with an SPI interface for the large core to complete the kernel loading operation.
[0025] As a preferred implementation of the present application, when the large core runs the chip startup work, the small core completes the loading and decompression of the kernel through the peripheral module, specifically including: when the large core runs the chip startup work and enters the U-BOOT stage, the small core accesses the storage module through the GPIO peripheral interface, and reads the kernel image sub-file stored in the storage module to the first designated storage address of the storage medium inside the large core; the small core performs a kernel decompression operation based on the kernel image sub-file stored in the storage module, and stores the decompressed kernel image sub-file obtained by the kernel decompression operation to the second designated storage address of the storage medium inside the large core; wherein, the first designated storage address is used to store the kernel image sub-file; the second designated storage address is used to store the decompressed kernel image sub-file. Among them, the storage medium inside the large core can be, but is not limited to, a storage medium such as a double rate synchronous dynamic random access memory (DDR). Specifically, the image sub-file can belong to an operating system image file type or a file system image file type, etc., and the functions implemented can be, but are not limited to, applications such as memory management, peripheral drivers, system scheduling, and file systems. Since image sub-files usually occupy a large memory space and the system's peripheral interface read speed is prioritized, image sub-files are usually compressed and then stored in the peripheral storage module to save the time required to transfer the image sub-files between the peripheral storage module and the system.
[0026] As a preferred implementation of the present application, the multi-core heterogeneous system fast startup method also includes: the large core reads the startup device tree file and the decompressed kernel image subfile from the internal storage medium; the large core completes the operation startup of the kernel operating system based on the startup device tree file and the decompressed kernel image subfile. Wherein, the startup device tree file refers to the hardware resource information required for the chip startup work, including but not limited to: the number and type of CPUs, the memory base address and size, the bus and bridge, the peripheral connection, the interrupt controller and the terminal usage, the GPIO peripheral interface usage, the clock interface usage, etc. The decompressed kernel image subfile refers to the kernel image subfile that the small core reads from the storage module of the peripheral and stores to the second specified storage address of the storage medium inside the large core after performing the kernel decompression operation. This implementation method realizes that the large core performs the operation startup of the kernel operating system based on the kernel image subfile decompressed by the small core, so that the small core can provide initialization work processing for the large core to run the kernel operating system, and improve the operation startup efficiency of the kernel operating system.
[0027] As a preferred implementation of the present application, the peripheral modules are a storage module and a camera module, and the small core completes the initialization of the peripheral modules while the large core runs the chip startup work. Figure 2 As shown, specifically including: When the big core runs the chip startup work and enters the U-BOOT stage: Kernel loading operation steps: the small core accesses the storage module through the GPIO peripheral interface, and reads the kernel image sub-file stored in the storage module to the first designated storage address of the storage medium inside the large core; Kernel decompression operation steps: the small core performs a kernel decompression operation based on the kernel image subfile stored in the storage module, and stores the decompressed kernel image subfile obtained by the kernel decompression operation to a second designated storage address of the storage medium in the large core; The camera module initialization work steps are as follows: the small core controls the power module to supply power to the camera module to complete the power-on process of the camera module; the small core transmits the camera module working clock to the camera module through the clock control module; the small core controls the high or low level switching of the reset pin to control the camera module to perform the reset operation; the small core transmits the camera module configuration parameters pre-stored in the small core internal memory to the camera module through the I2C interface to complete the parameter initialization of the camera module; Camera module startup working steps: after the small core completes the parameter initialization of the camera module, it controls the camera module to start and collect image data; wherein, the storage module internally stores a kernel image subfile; the first designated storage address is used to store the kernel image subfile; the second designated storage address is used to store the decompressed kernel image subfile.
[0028] Figure 1 The present invention shows the startup process of the peripherals configured as storage modules and camera modules when the system is started in the prior art. Compared with the multi-core heterogeneous system fast startup method provided by this embodiment, the prior art requires the large core to independently complete the loading and decompression operations of the kernel image subfile and the initialization of the camera module. Figure 2 Compared with the multi-core heterogeneous system fast startup process of the present application shown, the present application is based on the small core executing kernel loading operation steps, kernel decompression operation steps, camera module initialization work steps, camera module startup work steps, etc. during the chip startup work stage of the large core, which effectively solves the problem of unbalanced resource processing configuration of the small core when the large core is running the chip startup stage, makes full use of the computing resources of the small core, assists the large core in processing the initialization work of the peripheral module, and helps the large core improve the chip startup work efficiency.
[0029] A preferred embodiment of the present application provides a multi-core heterogeneous system, which executes the multi-core heterogeneous system fast startup method as described in any of the above embodiments, so as to enable the small core to complete the initialization of the peripheral modules when the large core runs the chip startup work; wherein the multi-core heterogeneous system includes a large core and a small core, the large core adopts the A7 core, and the small core adopts the M3 core. Specifically, the A7 core refers to the ARM Cortex-A7 processor; the M3 core refers to the ARM Cortex-M3 processor. The multi-core heterogeneous system provided by this embodiment implements the chip startup work based on the A7 core, and at the same time, based on the M3 core, assists the A7 core in completing the initialization of the peripheral modules while the A7 core implements the chip startup work, effectively improving the chip startup and peripheral startup efficiency of the multi-core heterogeneous system.
[0030] Obviously, the above-mentioned embodiments are only a part of the embodiments of the present invention, rather than all the embodiments, and the technical solutions between the various embodiments can be combined with each other. Although the embodiments of the present invention have been shown and described, it can be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is limited by the attached claims and their equivalents. The above is only the preferred embodiment of the present invention and is not intended to limit the present invention. For those of ordinary skill in the art, the present invention can have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A multi-core heterogeneous system fast startup method, characterized in that: The multi-core heterogeneous system fast startup method specifically includes: when the big core runs the chip startup work and enters the SPL stage, the big core starts the small core, so that the small core completes the initialization work of the peripheral module when the big core runs the chip startup work.
2. The multi-core heterogeneous system fast startup method according to claim 1, characterized in that: The big core and the small core support common access to the I2C interface, GPIO peripheral interface and peripheral modules.
3. The multi-core heterogeneous system fast startup method according to claim 2, characterized in that: The peripheral module is a camera module. When the large core runs the chip startup work, the small core completes the initialization work of the peripheral module, which specifically includes: When the large core runs the chip startup work and enters the U-BOOT stage, the small core controls the power module to supply power to the camera module to complete the power-on process of the camera module; The small core transmits the camera module working clock to the camera module through the clock control module; The small core controls the camera module to reset by switching the reset pin high or low. The small core transmits the camera module configuration parameters pre-stored in the small core internal memory to the camera module through the I2C interface to complete the parameter initialization of the camera module; After the small core control parameters are initialized, the camera module starts and collects image data.
4. The multi-core heterogeneous system fast startup method according to claim 3, characterized in that: The multi-core heterogeneous system fast startup method also includes: after the large core completes the chip startup work, based on the initialization work of the camera module completed by the small core, the large core receives the image data transmitted by the camera module.
5. The multi-core heterogeneous system fast startup method according to claim 1, characterized in that: The multi-core heterogeneous system fast startup method also includes: when the large core runs the chip startup work and enters the SPL stage, the large core starts the small core, so that when the large core runs the chip startup work, the small core completes the loading and decompression of the kernel through the peripheral module, so that the large core can run the kernel after completing the chip startup work.
6. The multi-core heterogeneous system fast startup method according to claim 5, characterized in that: The peripheral module is a storage module; wherein the storage module stores a kernel image sub-file inside.
7. The multi-core heterogeneous system fast startup method according to claim 6, characterized in that: When the large core runs the chip and starts working, the small core completes the loading and decompression of the kernel through the peripheral module, specifically including: When the chip startup work of the big core enters the U-BOOT stage, the small core accesses the storage module through the GPIO peripheral interface, and reads the kernel image subfile stored in the storage module to the first designated storage address of the storage medium inside the big core; The small core performs a kernel decompression operation based on the kernel image subfile stored in the storage module, and stores the decompressed kernel image subfile obtained by the kernel decompression operation to a second designated storage address of the storage medium in the large core; The first designated storage address is used to store the kernel image sub-file; and the second designated storage address is used to store the decompressed kernel image sub-file.
8. The multi-core heterogeneous system fast startup method according to claim 7, characterized in that: The multi-core heterogeneous system fast startup method further includes: The big core reads the boot device tree file and the decompressed kernel image subfile from the internal storage medium; The big core completes the operation and startup of the kernel operating system based on the boot device tree file and the decompressed kernel image sub-file.
9. The multi-core heterogeneous system fast startup method according to claim 2, characterized in that: The peripheral modules are a storage module and a camera module. While the large core is running the chip startup work, the small core completes the initialization work of the peripheral modules, which specifically includes: When the big core chip starts working, it enters the U-BOOT stage. The small core accesses the storage module through the GPIO peripheral interface, and reads the kernel image subfile stored in the storage module to the first designated storage address of the storage medium in the large core; The small core performs a kernel decompression operation based on the kernel image subfile stored in the storage module, and stores the decompressed kernel image subfile obtained by the kernel decompression operation to a second designated storage address of the storage medium in the large core; The small core controls the power supply module to supply power to the camera module to complete the power-on process of the camera module; the small core transmits the camera module working clock to the camera module through the clock control module; the small core controls the high level or low level switching of the reset pin to control the camera module to perform a reset operation; the small core transmits the camera module configuration parameters pre-stored in the small core internal memory to the camera module through the I2C interface to complete the parameter initialization of the camera module; After the small core completes the parameter initialization of the camera module, it controls the camera module to start and collect image data; The storage module stores a kernel image subfile inside; the first designated storage address is used to store the kernel image subfile; and the second designated storage address is used to store the decompressed kernel image subfile.
10. A multi-core heterogeneous system, characterized in that: The multi-core heterogeneous system adopts the multi-core heterogeneous system fast startup method according to any one of claims 1 to 9; wherein the multi-core heterogeneous system includes a large core and a small core, the large core adopts an A7 core, and the small core adopts an M3 core.
Citation Information
Cited By
System starting method and device adaptive to multiple chips, electronic equipment and readable storage medium
CN119576435A
System starting method and device suitable for multiple chips, electronic equipment and readable storage medium
CN119576435B
Starting method and device of SMP equipment, equipment and storage medium
CN121433736A
