Simulation test system and test system for function deployment of multi-core controller

The simulation test system deployed through multi-core controller functions solves the problems of uneven task distribution and migration failure caused by static multi-core allocation in automotive software development, realizes the simulation of synchronized dependencies and execution sequences of task migration, and reduces test verification time. and tool dependencies, optimizing the task allocation scheme.

CN118584931APending Publication Date: 2024-09-03UNITED AUTOMOTIVE ELECTRONICS SYST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410586368.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-13
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In automotive software development, static multi-core task allocation leads to problems of uneven task distribution and excessive core utilization. Moreover, task migration may lead to functional failure. There is a lack of effective simulation testing methods to simulate execution behavior before and after task migration.

Method used

Provides a simulation test system for multi-core controller function deployment, including an automatic code generation module, an execution middleware processing module and a simulation test module. By generating simulation code and synchronous execution code, it simulates multi-core scheduling and performance testing to ensure the synchronization of task migration. Dependencies and execution order to avoid software failure.

Benefits of technology

It achieves accurate simulation testing before and after task migration, reduces the multi-core execution timing deadlock problem caused by manual configuration errors, reduces the dependence on commercial simulation testing tools, and optimizes the task allocation plan through performance simulation results, reducing the time required to board the board. Test verification time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118584931A
    Figure CN118584931A
Patent Text Reader

Abstract

The invention relates to a simulation test technology, and discloses a simulation test system and a test system for function deployment of a multi-core controller. The simulation test system comprises an automatic code generation module which generates a simulation code, a first operation environment code and a second operation environment code according to a simulation deployment strategy, an on-board deployment strategy and a multi-core deployment scheme; the execution middleware processing module carries out multi-core scheduling packaging according to a runnable thread in the multi-core deployment scheme to obtain a synchronous execution code; the simulation test module executes the simulation code, the first running environment code and the synchronous execution code; and the on-board test module executes the second running environment code and the synchronous execution code. According to the method, the synchronous execution codes are obtained through multi-core scheduling packaging, inter-core synchronization of the executable codes is achieved, and the mutual dependence relation and the correct execution sequence of the original executable codes are guaranteed; by executing the simulation code running environment code and the synchronous execution code, execution behaviors before and after task migration are simulated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of simulation testing technology, and in particular to a simulation testing system and a testing system for multi-core controller function deployment. Background Art

[0002] In the automotive field, dynamic multi-core allocation and static multi-core allocation are the two main processor core resource allocation strategies. However, because the AUTOSAR (AUTomotive Open System Architecture) classic platform standard does not allow the operating system to dynamically migrate tasks between cores based on its real-time state, static multi-core allocation is often used during automotive software development. However, once a task is assigned to a specific core, it cannot be dynamically adjusted. This can easily lead to problems such as uneven multi-core load utilization and even excessive core utilization due to improper task allocation. These problems are not discovered until the function is deployed and executed on the controller side.

[0003] At the same time, as the automotive electronic and electrical architecture shifts from a distributed to a regionalized centralized architecture, the level of functional integration has increased significantly. According to the AUTOSAR classic platform standard, a functional task consists of multiple independent functional units defined in different software components. Since software development on regional controllers integrates multiple functions that were originally completed by dozens of controllers into one regional controller, a multi-core regional controller may contain as many as hundreds of them, which are interdependent and difficult to deploy on multiple cores. Therefore, when there is a load imbalance problem caused by uneven task distribution, software designers may directly migrate interdependent runnable threads to other cores for execution, but the above operation may cause functional failure or even software reset.

[0004] To sum up, when migrating interdependent tasks on the original core directly to other cores for execution, how to simulate the execution behavior before and after task migration to implement simulation testing has become a problem that needs to be solved urgently. Summary of the Invention

[0005] In view of the shortcomings of the prior art described above, the purpose of the present invention is to provide a simulation test system and a test system for multi-core controller function deployment, the main purpose of which is to solve the problem of how to accurately simulate the execution behavior before and after task migration to realize simulation testing.

[0006] To achieve the above-mentioned and other related objectives, the present invention provides a simulation test system for multi-core controller function deployment, comprising:

[0007] An automatic code generation module, configured to generate simulation code and a first operating environment code according to a preset simulation deployment strategy and a multi-core deployment solution;

[0008] An execution middleware processing module is used to perform multi-core scheduling and packaging according to the executable threads in the multi-core deployment solution to obtain synchronous execution code;

[0009] The simulation test module is used to execute the simulation code, the first operating environment code and the synchronous execution code to obtain performance simulation results.

[0010] In an optional embodiment of the present invention, the automatic code generation module includes a simulation code generator and a platform code generator:

[0011] The simulation code generator is used to generate simulation code according to the simulation deployment strategy and the multi-core deployment solution;

[0012] The platform code generator is used to generate a first operating environment code according to the simulation deployment strategy and the multi-core deployment solution.

[0013] In an optional embodiment of the present invention, the simulation code generator includes a simulation framework code generation submodule and an execution code generation submodule:

[0014] The simulation framework code generation submodule is used to generate simulation framework code according to the simulation deployment strategy;

[0015] The execution code generation submodule is used to generate executable thread execution code according to the simulation deployment strategy and the multi-core deployment solution.

[0016] In an optional embodiment of the present invention, the execution code generation submodule includes an information extraction submodule and an execution code synthesis submodule:

[0017] The information extraction submodule is used to extract target information from the multi-core deployment solution;

[0018] The execution code synthesis submodule is used to perform code synthesis according to the code entity function in the simulation deployment strategy and the target information to obtain the executable thread execution code.

[0019] In an optional embodiment of the present invention, the platform code generator includes a platform code synthesis submodule:

[0020] The platform code synthesis submodule is used to perform code synthesis according to the code execution logic in the simulation deployment strategy and the executable thread execution code to obtain a first operating environment code.

[0021] In an optional embodiment of the present invention, the execution middleware processing module includes a synchronization encapsulation module and an executable thread scheduler module:

[0022] The synchronization encapsulation module is used to generate corresponding synchronization functions according to the executable threads in the multi-core deployment solution;

[0023] The executable thread scheduler module is used to perform logic scheduling according to the synchronization function corresponding to the executable thread to obtain a synchronous execution code.

[0024] In an optional embodiment of the present invention, the synchronization encapsulation module includes a thread requirement generation submodule and a combination encapsulation submodule:

[0025] The thread demand generation submodule is used to obtain the number of waiting demands and the number of release demands of the runnable threads;

[0026] The combination encapsulation submodule is used to combine and encapsulate the waiting conditions, waiting requirement numbers and release requirement numbers corresponding to the runnable threads into a synchronization function.

[0027] In an optional embodiment of the present invention, the simulation test module includes a performance testing unit and an execution time flow graph generation unit:

[0028] The performance testing unit is used to generate a performance testing file based on the performance testing data of each task and each executable thread on the multi-core controller;

[0029] The execution time flow graph generating unit is used to generate an execution time flow graph according to the execution time of the runnable threads of different cycles in each task on the multi-core controller.

[0030] In an optional embodiment of the present invention, an on-board test module is further included:

[0031] The automatic code generation module is used to generate the second operating environment code according to the preset on-board deployment strategy and multi-core deployment solution;

[0032] The on-board test module is used to execute the second operating environment code and the synchronous execution code to obtain a performance test result.

[0033] In an optional embodiment of the present invention, the execution middleware processing module includes a synchronization encapsulation module and an executable thread scheduler module:

[0034] The synchronization encapsulation module is used to generate corresponding synchronization functions according to the executable threads in the multi-core deployment solution;

[0035] The executable thread scheduler module is used to perform logic scheduling according to the synchronization function corresponding to the executable thread to obtain a synchronous execution code;

[0036] The executable thread scheduler module includes an execution queue and a delay queue:

[0037] The execution queue is used to store executable threads that meet synchronization conditions;

[0038] The delay queue is used to store executable threads that do not meet the synchronization condition.

[0039] To achieve the above-mentioned and other related objectives, the present invention further provides a multi-core controller function deployment testing system, which is characterized by comprising:

[0040] An automatic code generation module, configured to generate a second operating environment code according to a preset on-board deployment strategy and a multi-core deployment solution;

[0041] An execution middleware processing module is used to perform multi-core scheduling and packaging according to the executable threads in the multi-core deployment solution to obtain synchronous execution code;

[0042] The on-board test module is used to execute the second operating environment code and the synchronous execution code to obtain a performance test result.

[0043] The present invention can generate executable code integrated into the controller according to the multi-core deployment solution, and obtain synchronous execution code through multi-core scheduling encapsulation, thereby realizing inter-core synchronization of the executable code, ensuring the mutual dependence and correct execution order between the original executable code, and can not only maintain the synchronous dependency of the executable code on the original core, but also avoid the software failure problem caused by directly moving the executable code; the performance simulation results generated can be used as a data indicator for predicting the performance of the allocation solution on the board and optimizing the adjustment task, thereby reducing the time for on-board testing and verification after each allocation solution is generated. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 Shown is a functional module diagram of a simulation test system for multi-core controller functional deployment according to an embodiment of the present invention.

[0045] Figure 2 A schematic diagram showing the functional modules of a simulation system for multi-core controller functional deployment according to an embodiment of the present invention is shown.

[0046] Figure 3 Shown is a functional module schematic diagram of an automatic code generation module according to an embodiment of the present invention.

[0047] Figure 4 Shown is a dependency diagram between executable threads according to an embodiment of the present invention.

[0048] Figure 5Shown is an execution time flow diagram of executing two 10ms cycles according to an embodiment of the present invention.

[0049] Figure 6 A schematic diagram showing the functional modules of a test system for deploying multi-core controller functions according to an embodiment of the present invention is shown.

[0050] In the figure: 100, a simulation test system for multi-core controller function deployment; 101, automatic code generation module; 1011, simulation code generator; 1012, platform code generator; 1013, simulation framework code generation sub-module; 1014, execution code generation sub-module; 1015, platform code synthesis sub-module; 102, execution middleware processing module; 103, simulation test module; 104, on-board test module; 200, a simulation system for multi-core controller function deployment; 300, a test system for multi-core controller function deployment. DETAILED DESCRIPTION

[0051] The following describes the embodiments of the present invention through specific examples. Those skilled in the art will readily understand the other advantages and benefits of the present invention from the disclosure herein. The present invention may also be implemented or applied through various other specific embodiments, and the details in this specification may be modified or altered based on different viewpoints and applications without departing from the spirit of the present invention.

[0052] It should be noted that the illustrations provided in this embodiment are only used to schematically illustrate the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.

[0053] In an actual application scenario of the present invention, the core controller's executable thread deployment scheme will disperse the executable threads to run on different cores, but directly migrating the interdependent tasks on the original core to other cores for execution will produce execution order errors. Therefore, the present invention proposes a simulation test system for Runnable deployment of multi-core systems, which can not only simulate and verify the feasibility of the Runnable allocation scheme before the actual execution of the software engineering, but also automatically generate multi-core deployment scheme code that can be integrated into the controller execution. At the same time, it can also simulate and predict the on-board execution performance of the multi-core deployment scheme, and use it as the basis for optimizing the allocation scheme. The entire test platform can significantly reduce the multi-core execution timing deadlock problem caused by human configuration negligence, reduce the time for manually generating RTE (Runtime environment) code, and reduce dependence on commercial simulation test tools.

[0054] like Figure 1As shown, an embodiment of the present invention provides a simulation test system 100 for multi-core controller function deployment, which mainly includes an automatic code generation module 101 , an execution middleware processing module 102 , a simulation test module 103 and an on-board test module 104 .

[0055] See Figure 2 As shown, an embodiment of the present invention provides a simulation system 200 for multi-core controller function deployment, which mainly includes an automatic code generation module 101 , an execution middleware processing module 102 and a simulation test module 103 .

[0056] Among them, the automatic code generation module 101 is used to generate simulation code and operating environment code according to the preset simulation deployment strategy and multi-core deployment solution; specifically, the automatic code generation module 101 is an automatic code generator, which can generate simulation code for statistical execution time information, simulation code for testing whether deadlock occurs, platform code that can be integrated into the controller, etc.

[0057] See Figure 2 As shown, the automatic code generation module 101 includes a simulation code generator 1011 and a platform code generator 1012; the simulation code generator 1011 is used to generate simulation code according to the simulation deployment strategy and the multi-core deployment scheme, and the platform code generator 1012 is used to generate operating environment code according to the simulation deployment strategy and the multi-core deployment scheme.

[0058] Specifically, the simulation code generator 1011 includes a simulation framework code generation submodule 1013 and an execution code generation submodule 1014; the simulation framework code generation submodule 1013 is used to generate simulation framework code according to the simulation deployment strategy, and the execution code generation submodule 1014 is used to generate executable thread execution code according to the simulation deployment strategy and the multi-core deployment solution.

[0059] Among them, the multi-core deployment plan includes the following information: 1. Runnable information, including the name of the Runnable that can be deployed on multiple cores, the assigned core, the task to which it is mapped, the functional safety level of the mapped task, the worst case execution time (WCET) of the Runnable obtained by testing, etc.; 2. Other Runnable information that needs to be executed before each Runnable that can be assigned; 3. Other Runnable information that needs to be executed after each Runnable that can be assigned.

[0060] Furthermore, the simulation deployment strategy includes the code entity function of the executable thread in the original project file, the code execution logic, the operating system and its operation strategy, the software chip type, etc.

[0061] In the embodiment of the present invention, the simulation framework code generation submodule 1013 performs operating system conversion according to information such as the operating system and its operation strategy in the simulation deployment strategy, thereby building a simulation environment and obtaining simulation framework code.

[0062] It should be noted that the multi-core deployment solution may be input into the simulation test system in the form of a table or in a storage format such as XML, and the embodiment of the present invention does not impose too many restrictions on this.

[0063] In an embodiment of the present invention, the execution code generation submodule 1014 includes an information extraction submodule and an execution code synthesis submodule; the information extraction submodule is used to extract target information from the multi-core deployment solution, and the execution code synthesis submodule is used to perform code synthesis based on the code entity function in the simulation deployment strategy and the target information to obtain executable thread execution code.

[0064] Furthermore, the platform code generator 1012 includes a platform code synthesis submodule 1015; the platform code synthesis submodule 1015 is used to perform code synthesis according to the code execution logic in the simulation deployment strategy and the executable thread execution code to obtain the operating environment code.

[0065] In the embodiment of the present invention, the execution middleware processing module 102 is used to perform multi-core scheduling and packaging according to the executable threads in the multi-core deployment solution to obtain synchronous execution code.

[0066] This paper utilizes Linux's SCHED_FIFO scheduler in conjunction with a timer to create preemptible periodic tasks, simulating the task execution method on the classic AUTOSAR platform and implementing task execution within a simulation framework. The simulation framework deploys a runnable thread scheduler for each periodic task, ensuring that synchronously encapsulated runnable threads can run correctly on multiple cores. This allows the simulation framework to accurately simulate the execution of runnable threads on a multi-core system, both at the task execution level and the runnable thread execution level.

[0067] Specifically, the execution middleware processing module 102 includes a synchronization encapsulation module and an executable thread scheduler module; the synchronization encapsulation module is used to generate corresponding synchronization functions according to the executable threads in the multi-core deployment scheme, and the executable thread scheduler module is used to perform logical scheduling according to the synchronization functions corresponding to the executable threads to obtain synchronous execution code.

[0068] Among them, the synchronization encapsulation module includes a thread demand generation submodule and a combination encapsulation submodule; the thread demand generation submodule is used to obtain the waiting demand number and release demand number of the runnable thread, and the combination encapsulation submodule is used to combine and encapsulate the waiting conditions, waiting demand number and release demand number corresponding to the runnable thread into a synchronization function.

[0069] For Runnable (runnable thread) synchronization encapsulation, see Figure 3 The figure below shows a dependency graph between Runnables, where nodes represent Runnables. In the diagram, Runnable4 must wait for Runnable1, Runnable2, and Runnable3 to complete execution. At the same time, Runnable4's completion information must be synchronized with Runnables 5 and 6. That is, Runnable4's in-degree of 3 represents the number of wait requests for Runnable 4 to execute, and its out-degree of 2 represents the number of release requests for Runnable 4 to send completion information. The Runnable's wait conditions, execution entity function, and release conditions are combined and encapsulated into the Runnable's synchronization function, which is the Runnable's synchronous execution code.

[0070] In the embodiment of the present invention, the simulation test module 103 is used to execute the simulation code, the operating environment code and the synchronous execution code to obtain a performance simulation result.

[0071] Specifically, the simulation test module 103 includes a performance testing unit and an execution time flow graph generation unit; the performance testing unit is used to generate a performance test file based on the performance test data of each task and each executable thread on the multi-core controller, and the execution time flow graph generation unit is used to generate an execution time flow graph based on the execution time of the executable threads in different cycles in each task on the multi-core controller.

[0072] See Figure 4 As shown in FIG, it is an execution time flow diagram of executing two 10ms cycles, where Core0, Core1, Core2, and Core3 represent different cores on a multi-core controller, and the dark area in the figure is the execution process of the runnable thread on each core.

[0073] It should be noted that when executing the simulation code, the simulation test module 103 is first initialized in the simulation environment: initializes the mutex, parses the command line parameters, initializes all tasks and initializes the parameters of all tasks, creates tasks on each core, and destroys the mutex after the task is completed.

[0074] Furthermore, when executing the simulation code, the operating environment code and the synchronous execution code, the scheduler is first configured, then the task parameters are parsed, the task cycle is set, and it is determined whether the statistical mode is executed. If so, the scheduler is used to schedule the execution of the runnable thread after the timing starts, the execution queue is reset and the waiting control variable is reset, and the timing ends, that is, the current cycle task ends; if not, the scheduler is used to schedule the execution of the runnable thread after the timing starts and the start and end time of the execution of the runnable thread is recorded, the execution queue is reset and the waiting control variable is reset, and the timing ends, that is, the current cycle task ends, and it is determined whether the statistical cycle ends. If so, the runnable thread time record is retained; if not, the step of using the scheduler to schedule the execution of the runnable thread and record the start and end time of the execution of the runnable thread is returned to the start timing.

[0075] To sum up, the present invention can generate executable code integrated into the controller according to the multi-core deployment solution, and obtain synchronous execution code through multi-core scheduling encapsulation, thereby realizing inter-core synchronization of the executable code, ensuring the mutual dependence and correct execution order between the original executable code, and maintaining the synchronous dependency of the executable code on the original core, while avoiding the software failure problem caused by directly moving the executable code; the performance simulation results generated can be used as a data indicator for predicting the performance of the allocation solution on the board and optimizing the adjustment tasks, thereby reducing the time for on-board testing and verification after each allocation solution is generated.

[0076] like Figure 5 As shown, an embodiment of the present invention provides a test system 300 for multi-core controller function deployment, which mainly includes an automatic code generation module 101 , an execution middleware processing module 102 and an on-board testing module 104 .

[0077] Among them, the automatic code generation module 101 is used to generate the operating environment code according to the preset on-board deployment strategy and multi-core deployment plan; the execution middleware processing module 102 is used to perform multi-core scheduling and packaging according to the executable threads in the multi-core deployment plan to obtain the synchronous execution code; the on-board testing module 104 is used to execute the operating environment code and the synchronous execution code to obtain the performance test results.

[0078] Specifically, the multi-core deployment solution includes the following information: 1. Runnable information, including the name of the Runnable that can be deployed on multiple cores, the assigned core, the task to which it is mapped, the functional safety level of the mapped task, the worst case execution time (WCET) of the Runnable obtained by testing, etc.; 2. Other Runnable information that needs to be executed before each Runnable that can be assigned; 3. Other Runnable information that needs to be executed after each Runnable that can be assigned.

[0079] It should be noted that the multi-core deployment solution may be input into the simulation test system in the form of a table or in a storage format such as XML, and the embodiment of the present invention does not impose too many restrictions on this.

[0080] Furthermore, the on-board deployment strategy includes software logic stored on the board, executable thread entity functions, code execution logic, etc.

[0081] In an embodiment of the present invention, the automatic code generation module 101 includes an on-board code synthesis submodule; the on-board code synthesis submodule is used to perform code synthesis according to the code logic in the on-board deployment strategy and the parameters in the multi-core deployment solution to obtain the operating environment code.

[0082] In the embodiment of the present invention, the execution middleware processing module 102 is used to perform multi-core scheduling and packaging according to the executable threads in the multi-core deployment solution to obtain synchronous execution code.

[0083] This paper utilizes Linux's SCHED_FIFO scheduler in conjunction with a timer to create preemptible periodic tasks, simulating the task execution method on the classic AUTOSAR platform and implementing task execution within a simulation framework. The simulation framework deploys a runnable thread scheduler for each periodic task, ensuring that synchronously encapsulated runnable threads can run correctly on multiple cores. This allows the simulation framework to accurately simulate the execution of runnable threads on a multi-core system, both at the task execution level and the runnable thread execution level.

[0084] Specifically, the execution middleware processing module 102 includes a synchronization encapsulation module and an executable thread scheduler module; the synchronization encapsulation module is used to generate corresponding synchronization functions according to the executable threads in the multi-core deployment scheme, and the executable thread scheduler module is used to perform logical scheduling according to the synchronization functions corresponding to the executable threads to obtain synchronous execution code.

[0085] Among them, the synchronization encapsulation module includes a thread demand generation submodule and a combination encapsulation submodule; the thread demand generation submodule is used to obtain the waiting demand number and release demand number of the runnable thread, and the combination encapsulation submodule is used to combine and encapsulate the waiting conditions, waiting demand number and release demand number corresponding to the runnable thread into a synchronization function.

[0086] Furthermore, the runnable thread scheduler module includes an execution queue and a delay queue, the execution queue is used to store the runnable threads that meet the synchronization condition, and the delay queue is used to store the runnable threads that do not meet the synchronization condition.

[0087] See Figure 2 As shown in the figure, in the synchronous encapsulation function, the real Runnable 4 will not be executed until all the Runnables that need to be synchronized are executed. Otherwise, the encapsulation function returns directly. If Runnable 4 does not get the synchronization condition, it will be scheduled into the delay queue by the scheduler.

[0088] During the initialization phase, the execution queue stores Runnable nodes in the order in which they are expected to execute on multiple cores. If synchronization conditions are not met during Runnable execution, the scheduler places the Runnable in the delay queue for delayed execution. Runnables that fail to meet the conditions do not wait, but instead yield the CPU to other Runnables. The Runnable scheduler schedules Runnables according to the given execution order to ensure that deadlock does not occur during Runnable execution on the board.

[0089] The present invention shortens the busy-wait time of interdependent executable threads deployed to different cores. When a busy-wait occurs during the execution of an executable thread, the scheduler will postpone the execution of the executable thread that does not meet the synchronization conditions, thereby releasing the CPU for other executable threads in the core task to execute.

[0090] It should be noted that the simulation test system for multi-core controller function deployment and the test system for multi-core controller function deployment of the present invention can be used in fields such as Autosar CP (complex device driver / complex device handler software component) and AP (application software component), and can be used in software architectures such as MicroSAR or NeuSAR or VOS, and software projects containing MCU chips such as IFX or RENESAS.

[0091] In the description herein, numerous specific details, such as examples of components and / or methods, are provided to provide a complete understanding of the embodiments of the present invention. However, those skilled in the art will recognize that embodiments of the present invention may be practiced without one or more of the specific details or with other devices, systems, assemblies, methods, components, materials, parts, etc. In other cases, well-known structures, materials, or operations are not specifically shown or described in detail to avoid obscuring aspects of the embodiments of the present invention.

[0092] The above description of the illustrated embodiments of the present invention (including that described in the Abstract) is not intended to be exhaustive or to limit the invention to the precise forms disclosed herein. Although specific embodiments of the present invention and examples of the present invention are described herein for illustrative purposes only, as those skilled in the art will recognize and appreciate, various equivalent modifications are possible within the spirit and scope of the present invention. As noted, modifications may be made to the present invention in light of the above description of the illustrated embodiments of the present invention, and such modifications will be within the spirit and scope of the present invention.

Claims

1. A simulation test system for multi-core controller function deployment, It is characterized in that include: An automatic code generation module, used to generate simulation code and a first operating environment code according to a preset simulation deployment strategy and a multi-core deployment solution; An execution middleware processing module is used to perform multi-core scheduling and packaging according to the executable threads in the multi-core deployment solution to obtain synchronous execution code; The simulation test module is used to execute the simulation code, the first operating environment code and the synchronous execution code to obtain a performance simulation result.

2. The simulation test system for multi-core controller function deployment according to claim 1, It is characterized in that The automatic code generation module includes a simulation code generator and a platform code generator: The simulation code generator is used to generate simulation code according to the simulation deployment strategy and the multi-core deployment solution; The platform code generator is used to generate a first operating environment code according to the simulation deployment strategy and the multi-core deployment solution.

3. The simulation test system for multi-core controller function deployment according to claim 2, It is characterized in that The simulation code generator includes a simulation framework code generation submodule and an execution code generation submodule: The simulation framework code generation submodule is used to generate simulation framework code according to the simulation deployment strategy; The execution code generation submodule is used to generate executable thread execution code according to the simulation deployment strategy and the multi-core deployment solution.

4. The simulation test system for multi-core controller function deployment according to claim 3, It is characterized in that The execution code generation submodule includes an information extraction submodule and an execution code synthesis submodule: The information extraction submodule is used to extract target information from the multi-core deployment solution; The execution code synthesis submodule is used to perform code synthesis according to the code entity function in the simulation deployment strategy and the target information to obtain executable thread execution code.

5. The simulation test system for multi-core controller function deployment according to claim 3, It is characterized in that The platform code generator includes a platform code synthesis submodule: The platform code synthesis submodule is used to perform code synthesis according to the code execution logic in the simulation deployment strategy and the executable thread execution code to obtain the first operating environment code.

6. The simulation test system for multi-core controller function deployment according to claim 1, It is characterized in that The execution middleware processing module includes a synchronization encapsulation module and an executable thread scheduler module: The synchronization encapsulation module is used to generate corresponding synchronization functions according to the executable threads in the multi-core deployment solution; The executable thread scheduler module is used to perform logic scheduling according to the synchronization function corresponding to the executable thread to obtain the synchronous execution code.

7. The simulation test system for multi-core controller function deployment according to claim 6, It is characterized in that The synchronous encapsulation module includes a thread requirement generation submodule and a combination encapsulation submodule: The thread demand generation submodule is used to obtain the number of waiting demands and the number of release demands of the executable threads; The combination encapsulation submodule is used to combine and encapsulate the waiting conditions, the waiting requirement numbers and the release requirement numbers corresponding to the executable threads into a synchronization function.

8. The simulation test system for multi-core controller function deployment according to claim 1, It is characterized in that The simulation test module includes a performance test unit and an execution time flow graph generation unit: The performance testing unit is used to generate a performance testing file according to the performance testing data of each task and each executable thread on the multi-core controller; The execution time flow graph generating unit is used to generate an execution time flow graph according to the execution time of executable threads of different cycles in each task on the multi-core controller.

9. The simulation test system for multi-core controller function deployment according to claim 1, It is characterized in that Also includes on-board test modules: The automatic code generation module is used to generate the second operating environment code according to the preset on-board deployment strategy and multi-core deployment solution; The on-board test module is used to execute the second operating environment code and the synchronous execution code to obtain a performance test result.

10. The simulation test system for multi-core controller function deployment according to claim 9, It is characterized in that The execution middleware processing module includes a synchronization encapsulation module and an executable thread scheduler module: The synchronization encapsulation module is used to generate corresponding synchronization functions according to the executable threads in the multi-core deployment solution; The executable thread scheduler module is used to perform logic scheduling according to the synchronization function corresponding to the executable thread to obtain a synchronous execution code; The executable thread scheduler module includes an execution queue and a delay queue: The execution queue is used to store executable threads that meet synchronization conditions; The delay queue is used to store executable threads that do not meet the synchronization condition.

11. A test system for multi-core controller function deployment, It is characterized in that include: An automatic code generation module, used to generate a second operating environment code according to a preset on-board deployment strategy and a multi-core deployment solution; An execution middleware processing module is used to perform multi-core scheduling and packaging according to the executable threads in the multi-core deployment solution to obtain synchronous execution code; The on-board test module is used to execute the second operating environment code and the synchronous execution code to obtain a performance test result.

Citation Information

Cited By

  • WCET analysis method and device for embedded multi-thread program

    CN119473643A