Control computer based on domestic system and system quick starting method thereof

By using domestically-made processors and operating systems in domestically-made control computers, combining FPGA and CPU parallel loading, EMMC module delay loading and data synchronization technology, the problem of long startup time of domestically-made control computers is solved, and rapid startup is achieved to ensure information security and Improved system startup speed.

CN118939326APending Publication Date: 2024-11-12JIANGSU AUTOMATION RESEARCH INSTITUTE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410945336.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The startup time of domestically-controlled computers is long, resulting in the failure to achieve domestically-controllable in key areas such as flight control and weapons. The existing technology lacks rapid startup research for domestic processors and operating systems.

Method used

Using domestic processors and operating systems, the FPGA and CPU is loaded in parallel, the EMMC module is loaded after the system is started, and the QSPI Flash data is synchronized to the EMMC module. Combined with kernel clipping, improving the QSPI interface speed and FPGA loading clock, the compression function is enabled to shorten the system. Startup time.

Benefits of technology

The system startup time is significantly shortened by about 300ms, ensuring information security, avoiding embargo risks, and improving the system startup speed, so that domestically-made control computers can meet high-demand startup needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939326A_ABST
    Figure CN118939326A_ABST
Patent Text Reader

Abstract

The invention discloses a control computer based on a domestic system and a system quick starting method thereof. The invention provides a control computer based on a domestic processor, an FPGA (Field Programmable Gate Array), an EMMC (Embedded Multi Media Card) and other domestic devices and a domestic Mountain nine-day operating system, and provides a method for accelerating the starting speed of the system. The method for increasing the starting speed comprises the steps that parallel loading is conducted on an FPGA and a CPU, a data storage module EMMC driver is loaded after a system is started, and QSPI FLASH data is synchronized to the EMMC. After common starting speed increasing means such as time sequence optimization and kernel cutting are adopted, the system starting time is 1.7 s, while the method provided by the invention can further shorten the system starting time of 0.8 s, the system starting time is compressed from 1.7 s to 0.9 s, the use requirements of most computers in the fields with high requirements for starting speed can be met, and the application prospect is wide. Application of domestic devices is actively promoted, and foreign chip blockade is eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of embedded systems, in particular to a control computer based on a domestic system and a system quick start method thereof. Background Art

[0002] Due to the lack of research on the fast startup of control computers using domestic components, the startup time of domestic control computers is relatively long. As a result, many control computers in key areas with high requirements for startup time have not been able to achieve domestic independent control.

[0003] There is no research on fast startup using my country's processors and operating systems abroad, nor is there a corresponding fast startup method.

[0004] There are some studies on fast startup of embedded system vxWorks and X86 and POWER PC processors in China, but their acceleration methods are also based on vxWorks operating system and peripheral methods such as flash optimization. For example, patent 200910029309.2 proposes a method for fast startup of flight control computer under X86 architecture and vxWorks operating system. The method for fast startup of X86 flight control computer does not involve FPGA, and its loading of urgent and non-urgent tasks refers to application software; patent 201210259368.0. proposes a method for fast startup of Vxworks system based on MPC5200B, which also uses some peripheral methods such as BAT mapping large memory, optimizing Flash performance, and virtual file system mapping vxWorks image; patent 201310625980.X proposes a method for fast startup of high-reliability file system for NAND FLASH device, which proposes a method for accelerating the startup of high-reliability file system for NAND FLASH, rather than the entire cycle of computer startup.

[0005] As can be seen from the above, most of the current research on the fast startup of control computers is based on foreign processors and operating systems, but imported devices and technologies cannot fundamentally guarantee information security. With the continuous development and maturity and stability of technologies such as domestic chips and domestic operating systems, computers in many fields have gradually been replaced by domestic autonomous and controllable computers. However, in many key areas, such as flight control and weapons, due to their high requirements for the startup speed of control computers, and the lack of in-depth research on the startup of domestic processors and operating systems, these key areas have not yet achieved domestic autonomous control. In summary, there is still a gap in the current research on the fast startup of domestic processors and operating systems. The research on fast startup is of great significance to domestic autonomous control. Summary of the invention

[0006] The purpose of the present invention is to provide a control computer based on a domestic system and a method for quickly starting the system thereof in response to the problems existing in the above-mentioned prior art, so as to solve the problems of localization of control computer components and operating system and long startup time, meet the requirements of certain fields for localization and quick startup of control computers, and thus realize domestic substitution of computers.

[0007] The technical solution to achieve the purpose of the present invention is: on the one hand, a control computer based on a domestic system is provided, the control computer includes a processor module, an FPGA expansion module, a QSPI Flash module, a BPI Flash, an EMMC module and a memory module;

[0008] The processor module adopts the domestic LSoCAM0201 processor to realize the loading and starting of the operating system, and communicates with the FPGA expansion module through the EMIF interface to realize the expansion of the EMMC data storage function;

[0009] The FPGA expansion module implements the EMMC host function based on domestic FPGA and expands other interfaces;

[0010] The QSPI Flash module uses domestic 256M QSPI Flash to store BootLoader and operating system images, and the remaining space is used as temporary storage space for system data;

[0011] The BPI Flash is used to store FPGA configuration;

[0012] The EMMC module is used to store system application operation data;

[0013] The memory module is used to support the processor to load and run the BootLoader and the operating system image.

[0014] On the other hand, a system quick startup method based on the control computer is provided, the method comprising:

[0015] FPGA and CPU are loaded in parallel;

[0016] The EMMC module driver is loaded after the system starts;

[0017] Synchronize QSPI Flash data to EMMC module.

[0018] Furthermore, the FPGA and CPU are loaded in parallel in step 1, specifically including:

[0019] Power on the system;

[0020] FPGA loads firmware from BPI Flash. At the same time, the processor, i.e., CPU, runs the first-level BOOT to load Bootloader, and Bootloader loads the kernel.

[0021] Kernel boot;

[0022] Run the application.

[0023] Furthermore, when the FPGA and CPU are loaded in parallel, the time it takes to complete the configuration of the FPGA needs to be less than the time it takes for the processor to complete loading the kernel.

[0024] Further, the time taken by the processor to complete loading the kernel is compressed in the following manner, including:

[0025] Perform kernel pruning;

[0026] Improve QSPI interface speed.

[0027] Further, the time required to complete the FPGA configuration is compressed by the following methods, including:

[0028] Increase the FPGA loading clock;

[0029] When generating FPGA curing files, enable the compression function.

[0030] Furthermore, when the EMMC module driver is loaded after the system is started:

[0031] The data that needs to be stored after the system application runs is placed in the ring buffer in the memory, and a data storage task thread is created to store the ring buffer data in the QSPI Flash module through the QSPI interface;

[0032] After the EMMC module driver is loaded and the EMMC module can read and write, the data generated by the system application is stored in the EMMC.

[0033] Further, synchronizing the QSPI Flash data to the EMMC module specifically includes:

[0034] If the EMMC is loaded and the read and write functions are normal, proceed to the next step;

[0035] Determine whether the ring buffer is empty, and determine whether there is still data in the QSPI Flash module. If both are satisfied, read the data stored in the QSPI Flash module, and start writing from the beginning of the EMMC file, and then repeat this step; otherwise, execute the next step;

[0036] The data in the ring buffer is taken out, and writing is started from the position after the EMMC file offset qspi_data_len, and then returning to the previous step; the qspi_data_len is: the total length of the QPSI data written cumulatively when writing data to the QSPI Flash module.

[0037] Compared with the prior art, the present invention has the following significant advantages:

[0038] (1) All components and operating systems used in the control computer proposed by the present invention are domestically produced. Compared with control computers using imported components and operating systems, they can fundamentally guarantee information security and do not have the risk of embargo.

[0039] (2) The present invention adjusts the system startup mode to achieve parallel loading of the FPGA and the processor by controlling the time for FPGA configuration and the time for the processor to complete kernel loading, so that the system can further compress the system startup time by about 300ms after using traditional methods such as timing optimization and kernel trimming to improve the startup speed.

[0040] (3) The present invention loads the EMMC module driver after the system is started, and synchronizes the data stored in the QSPI Flash to the EMMC module through a data synchronization task after the system is started, thereby saving the time of device initialization and file system loading when the operating system is started, thereby improving the system startup speed.

[0041] (4) The control computer proposed in the present invention has a startup time of 1.7s after using the traditional method of accelerating system startup. After optimization by the method proposed in the present invention, the system startup time can be further shortened by 0.8s, so that the entire system startup time is reduced to 0.9s, and the system startup speed is significantly improved.

[0042] The present invention is further described in detail below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 The system block diagram of a control computer based on a domestic system in one embodiment.

[0044] Figure 2 This is a schematic diagram of the system startup process before improvement.

[0045] Figure 3 It is a schematic diagram of the improved system startup process of the present invention in one embodiment.

[0046] Figure 4 The figure is a schematic diagram of the startup process of the improved operating system in one embodiment of the present invention.

[0047] Figure 5A logical flow chart of system application data storage in one embodiment.

[0048] Figure 6 The following is a logic flow chart of data synchronization in one embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] It should be noted that if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0051] In one embodiment, in combination Figure 1 , provides a control computer based on a domestic system, the control computer includes a processor module, an FPGA expansion module, a QSPI Flash module, a BPI Flash, an EMMC module and a memory module;

[0052] The processor module adopts the domestic LSoCAM0201 processor to realize the loading and starting of the operating system, and communicates with the FPGA expansion module through the EMIF interface to realize the expansion of the EMMC data storage function;

[0053] The FPGA expansion module implements the EMMC host function based on domestic FPGA and expands other interfaces;

[0054] The QSPI Flash module uses domestic 256M QSPI Flash to store BootLoader and operating system images, and the remaining space is used as temporary storage space for system data;

[0055] The BPI Flash is used to store FPGA configuration;

[0056] The EMMC module is used to store system application operation data;

[0057] The memory module is used to support the processor to load and run the BootLoader and the operating system image.

[0058] In one embodiment, a system quick startup method is provided, the method comprising:

[0059] FPGA and CPU are loaded in parallel;

[0060] The EMMC module driver is loaded after the system starts;

[0061] Synchronize QSPI Flash data to EMMC module.

[0062] Furthermore, in some embodiments, the FPGA and the CPU are loaded in parallel, specifically including:

[0063] Power on the system;

[0064] FPGA loads firmware from BPI Flash. At the same time, the processor, i.e., CPU, runs the first-level BOOT to load Bootloader, and Bootloader loads the kernel.

[0065] Kernel boot;

[0066] Run the application.

[0067] Furthermore, in some embodiments, the time it takes to complete the FPGA configuration needs to be less than the time it takes for the processor to complete loading the kernel.

[0068] Further, in some embodiments, the time taken by the processor to complete loading the kernel is compressed in the following manner, including:

[0069] Perform kernel pruning;

[0070] Improve QSPI interface speed.

[0071] Furthermore, in some embodiments, the time required to complete the FPGA configuration is compressed in the following manner, including:

[0072] Increase the FPGA loading clock;

[0073] When generating FPGA curing files, enable the compression function.

[0074] The detailed description is given below.

[0075] Normally, after the system is powered on, the FPGA will first automatically load the configuration from the BPI Flash, and reset the LSoCAM0201 processor after the loading is complete. After the LSoCAM0201 processor is reset, it will first run the first-level Boot solidified by the built-in PROM. The first-level Boot will move the Bootloader, also known as the second-level Boot, from the QSPI Flash to the memory for execution. As the boot code, the main function of the Bootloader is to move the operating system kernel to the memory and start it. The kernel will initialize peripheral drivers, load drivers, mount file systems, load applications and start them. The system startup process is as follows: Figure 2 shown.

[0076] In the normal system startup process, the FPGA does not take any action from the time the processor is reset to the time the Bootloader completes kernel loading. The FPGA will communicate with the FPGA through the EMIF interface only when the kernel is loaded and starts running. In order to increase the system startup speed, the startup process is improved so that the processor does not wait for the FPGA reset level, but starts running after the system is powered on. After the improvement, the FPGA configuration and the operating system kernel loading can be run in parallel. The improved system startup process is as follows: Figure 3 shown.

[0077] In order to ensure that the improved system starts normally, it is necessary to ensure that the time for FPGA configuration to be completed is less than the time for the processor to complete loading the kernel. If the processor completes loading the kernel first, and the FPGA is not configured when the kernel communicates with the FPGA, a system error will occur. The present invention compresses the kernel loading time through kernel clipping and the method of improving the speed of the QSPI interface. After experimental measurement, the time from processor reset to operating system image loading is 520-550ms. Therefore, it is necessary to ensure that the time from system power-on to FPGA completion of configuration loading is less than 520ms. The present invention improves the firmware loading speed of FPGA by increasing the FPGA loading clock and enabling the compression function when the FPGA solidification file is generated. After experimental measurement, the time from system power-on to FPGA completion of configuration and starting to reset the processor can be compressed to 296-302ms, which can ensure that the FPGA is ready when the operating system is running. After hardware modification, the processor and FPGA are powered on and reset at the same time, and the system can start normally.

[0078] Before the improvement, the operating system startup time is the time for the FPGA to load the configuration, the time for the processor to load the operating system kernel, and the operating system startup time. After the improvement, the operating system startup time is the time for the processor to load the operating system kernel and the operating system startup time. Figure 4 As shown in the figure, after experimental measurement, the system startup time is shortened by about 300ms after the FPGA and CPU load the program in parallel.

[0079] Further, in some embodiments, when the EMMC module driver is loaded after the system is started:

[0080] The data that needs to be stored after the system application runs is placed in the ring buffer in the memory, and a data storage task thread is created to store the ring buffer data in the QSPI Flash module through the QSPI interface;

[0081] After the EMMC module driver is loaded and the EMMC module can read and write, the data generated by the system application is stored in the EMMC.

[0082] The detailed description is given below.

[0083] The present invention uses a domestic 32G EMMC chip as a data storage device. Since the LSoCAM0201 processor does not support the EMMC host function, it needs to be implemented through FPGA expansion. FPGA implements the EMMC host function, and the processor controls the EMMC host through the EMIF interface to realize command transmission and data interaction with the EMMC chip. After experimental testing, loading EMMC requires multiple processes such as power-on reset, disk identification, and file system mounting. The application needs to wait until the EMMC is ready before starting to run, which seriously affects the application running time. Therefore, the present invention moves the EMMC driver that was originally loaded with the operating system startup to after the operating system startup and application program running. The EMMC driver mounting is moved to the system application and loaded, resulting in the data generated by the system application running without EMMC available. The 256M QSPI Flash uses less than 10M of space as the program storage value, and the remaining space is used as a temporary data storage space, which is written in the original way without using the file system. After the system application runs, the data that needs to be stored is generated and placed in the ring buffer in the memory, and a data storage task thread is created to store the ring buffer data to the storage of the QSPI Flash through the QSPI interface. After the EMMC driver is loaded and the EMMC can read and write, the data generated by the system application is stored in the EMMC. The logical flow chart of system application data storage is as follows: Figure 5 shown.

[0084] Further, in some embodiments, synchronizing the QSPI Flash data to the EMMC module specifically includes:

[0085] If the EMMC is loaded and the read and write functions are normal, proceed to the next step;

[0086] Determine whether the ring buffer is empty, and determine whether there is still data in the QSPI Flash module. If both are satisfied, read the data stored in the QSPI Flash module, and start writing from the beginning of the EMMC file, and then repeat this step; otherwise, execute the next step;

[0087] The data in the ring buffer is taken out, and writing is started from the position after the EMMC file offset qspi_data_len, and then returning to the previous step; the qspi_data_len is: the total length of the QPSI data written cumulatively when writing data to the QSPI Flash module.

[0088] The detailed description is given below.

[0089] After the EMMC of the present invention is loaded into the system application, the data generated by the system application before the EMMC read and write functions are normal is stored in the QSPI Flash. When writing data to the QSPI Flash, it is necessary to record the total length of the accumulated written QPSI data as qspi_data_len. After the EMMC is loaded and the read and write functions are normal, the data storage thread is responsible for writing the data in the ring buffer to the position after the file offset qspi_data_len, that is, leaving the position of the length qspi_data_len in front of the file, which is used as the data stored in the QSPIFlash. When the data storage thread is idle, the data in the QSPI Flash is taken out, and writing starts from the beginning of the file until all the data stored in the QSPI Flash is written into the EMMC. The data synchronization logic flow chart is as follows Figure 6 shown.

[0090] In one embodiment, a system quick start device is provided, the device comprising:

[0091] The first module is used to realize parallel loading of FPGA and CPU;

[0092] The second module is used to realize the loading of the EMMC module driver after the system is started;

[0093] The third module is used to synchronize the QSPI Flash data to the EMMC module.

[0094] For the specific definition of the system quick startup device, please refer to the definition of the system quick startup method above, which will not be repeated here. Each module in the above system quick startup device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0095] It has been verified by experiments that after commonly used means of improving the startup speed such as timing optimization and kernel trimming, the system startup time is 1.7s. The method proposed in the present invention can further shorten the system startup time by 0.8s, compressing the system startup time from 1.7s to 0.9s, which can meet the use needs of computers in most fields with high requirements for startup speed, and actively promote the application of domestic devices and get rid of the blockade of foreign chips.

[0096] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A control computer based on a domestic system, characterized in that: The control computer includes a processor module, an FPGA expansion module, a QSPI Flash module, a BPI Flash, an EMMC module and a memory module; The processor module adopts a domestic processor to realize the loading and starting of the operating system, and communicates with the FPGA expansion module through the EMIF interface to realize the expansion of the EMMC data storage function; The FPGA expansion module implements the EMMC host function based on domestic FPGA and expands other interfaces; The QSPI Flash module uses domestic 256M QSPI Flash to store BootLoader and operating system images, and the remaining space is used as temporary storage space for system data; The BPI Flash is used to store FPGA configuration; The EMMC module is used to store system application operation data; The memory module is used to support the processor to load and run the BootLoader and the operating system image.

2. The control computer based on the domestic system according to claim 1 is characterized in that: The domestic processor adopts the domestic LSoCAM0201 processor, and the operating system adopts the domestic Lishan Jiutian operating system.

3. The method for quickly starting a computer system according to claim 1, characterized in that: The method comprises: FPGA and CPU are loaded in parallel; The EMMC module driver is loaded after the system starts; Synchronize QSPI Flash data to EMMC module.

4. The method for quickly starting a computer system according to claim 3, characterized in that: The FPGA and CPU are loaded in parallel in step 1, specifically including: Power on the system; FPGA loads firmware from BPI Flash. At the same time, the processor, i.e., CPU, runs the first-level BOOT to load Bootloader, and Bootloader loads the kernel. Kernel boot; Run the application.

5. The system quick startup method according to claim 4, characterized in that: When the FPGA and CPU are loaded in parallel, the time it takes to complete the configuration of the FPGA must be less than the time it takes for the processor to complete loading the kernel.

6. The system quick startup method according to claim 5, characterized in that: The time for the processor to complete loading the kernel is compressed in the following manner, including: Perform kernel pruning; Improve QSPI interface speed.

7. The system quick startup method according to claim 5, characterized in that: The time to complete the FPGA configuration is compressed by the following methods, including: Increase the FPGA loading clock; When generating FPGA curing files, enable the compression function.

8. The system quick startup method according to claim 3, characterized in that: When the EMMC module driver is loaded after the system starts: The data that needs to be stored after the system application runs is placed in the ring buffer in the memory, and a data storage task thread is created to store the ring buffer data in the QSPI Flash module through the QSPI interface; After the EMMC module driver is loaded and the EMMC module can read and write, the data generated by the system application is stored in the EMMC.

9. The system quick startup method according to claim 8, characterized in that: The step of synchronizing the QSPI Flash data to the EMMC module specifically includes: If the EMMC is loaded and the read and write functions are normal, proceed to the next step; Determine whether the ring buffer is empty, and determine whether there is still data in the QSPI Flash module. If both are satisfied, read the data stored in the QSPI Flash module, and start writing from the beginning of the EMMC file, and then repeat this step; otherwise, execute the next step; The data in the ring buffer is taken out, and writing is started from the position after the EMMC file offset qspi_data_len, and then returning to the previous step; the qspi_data_len is: the total length of the QPSI data written cumulatively when writing data to the QSPI Flash module.

10. A system quick start device based on the method according to any one of claims 3 to 9, characterized in that: The device comprises: The first module is used to realize parallel loading of FPGA and CPU; The second module is used to realize the loading of the EMMC module driver after the system is started; The third module is used to synchronize the QSPI Flash data to the EMMC module.