A general data excitation method for embedded software based on virtual hardware platform

CN115712482BActive Publication Date: 2026-08-11XIAN FLIGHT SELF CONTROL INST OF AVIC
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-11
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]本发明的目的是:为了有效解决基于虚拟硬件平台嵌入式软件数据激励问题,本发明提供了一种基于虚拟硬件平台的嵌入式软件通用数据激励方法,建立了以监控点地址被读或写作为激励点的可复用的虚拟平台嵌入式软件通用激励设备,大提高虚拟平台嵌入式软件的数据激励效率

Benefits of technology

[0025]综上所述,采用本发明的方法进行虚拟硬件平台的嵌入式软件通用数据激励,抽象了虚拟数据激励行为,可避免因不同项目需激励的数据和方式的差异性和相同项目不同场景需激励的数据及方式的差异性,从而建立可复用的虚拟平台嵌入式软件通用激励设备,大大提高虚拟平台嵌入式软件的数据激励效率。同时有效利用了虚拟硬件平台可监控地址读写操作的优势,以监控点地址被读或写作为激励点,随用户设计的监控点不同而达到不同的激励效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115712482B_ABST
    Figure CN115712482B_ABST
Patent Text Reader

Abstract

This application provides a general data stimulus method for embedded software based on a virtual hardware platform. The method includes: editing a stimulus data file according to the stimulus scenario, the stimulus data file including N stimulus data and corresponding stimulus values; editing the stimulus device configuration information, the stimulus device configuration information including: processor model, path of the stimulus data file, loading time of different stimulus data files, and name of stimulus point variables; starting the virtual hardware platform to simulate and run the embedded software, reading the processor model in the stimulus device configuration information, parsing the target code according to the processor model, and obtaining debugging information of global variables; comparing the running time of the virtual hardware platform with the loading time of the stimulus data file; when the loading time of the first stimulus data file is reached, the stimulus device on the virtual hardware platform executes the loading of the stimulus data file according to the stimulus data file path; and performing data stimulus on the stimulus data file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of inertial navigation systems, specifically relating to a general data excitation method for embedded software based on a virtual hardware platform. Background Technology

[0002] Virtual hardware platforms enable embedded software to run without physical hardware. However, unlike real hardware, they lack external and internal data sources, necessitating data incentivization for data transfer. Different projects require different incentivized data and methods, and even within the same project, different scenarios require different incentivized data and methods. Therefore, numerous virtual data incentivization devices need to be developed for different projects and scenarios, resulting in low efficiency and difficulty in reuse. Furthermore, previous data incentivization methods all used time as the initiation point for the incentivization action. While the incentivization time is fixed, it ignores the internal runtime sequence of the embedded software. This can lead to data being overwritten by internal logic assignments after incentivization, failing to achieve effective incentivization.

[0003] A general data incentive method for embedded software based on a virtual hardware platform can be applied to the data incentive of embedded software running on the virtual hardware platform. It abstracts the virtual data incentive behavior, avoiding the differences in incentive data and methods required by different projects and different scenarios within the same project, thus establishing a reusable general incentive device for embedded software on the virtual platform. Simultaneously, it effectively utilizes the advantage of the virtual hardware platform's ability to monitor address read and write operations, using the reading or writing of a monitoring point address as the incentive point. Different incentive effects are achieved depending on the user-designed monitoring points, greatly improving the data incentive efficiency of embedded software on the virtual platform. Summary of the Invention

[0004] The purpose of this invention is to effectively solve the data incentive problem of embedded software based on a virtual hardware platform. This invention provides a general data incentive method for embedded software based on a virtual hardware platform, and establishes a reusable general incentive device for embedded software on a virtual platform with the reading or writing of monitoring point addresses as incentive points, which greatly improves the data incentive efficiency of embedded software on a virtual platform.

[0005] Technical solution: A general data stimulus method for embedded software based on a virtual hardware platform, the method comprising:

[0006] Based on the incentive scenario, edit the incentive data file, which includes N incentive data and the corresponding incentive values;

[0007] Edit the excitation device configuration information, which includes: processor model, path to excitation data file, loading time of different excitation data files, and name of excitation point variables;

[0008] The virtual hardware platform is started to simulate and run the embedded software. The processor model in the configuration information of the excitation device is read, and the target code is parsed according to the processor model to obtain the debugging information of the global variables.

[0009] Compare the runtime of the virtual hardware platform with the loading time of the stimulus data file;

[0010] When the loading time of the first stimulus data file is reached, the stimulus device on the virtual hardware platform loads the stimulus data file according to the stimulus data file path;

[0011] Data incentives are applied to the incentive data file.

[0012] Furthermore, the data incentive process for the incentive data file specifically includes:

[0013] Based on the debugging information of the global variables and the names of the excitation point variables, the excitation point addresses are obtained;

[0014] Observe whether the excitation point address is read or written during the operation;

[0015] If a read / write operation occurs, the incentive data name and incentive value are extracted from the incentive data file. The incentive data address is obtained based on the incentive data name and global variable debugging information. The incentive value is then written into the incentive data address to complete this data incentive.

[0016] Furthermore, the debugging information for the global variables includes the address and length information of the global variables.

[0017] Furthermore, the range of N is 1 to 6.

[0018] Furthermore, the virtual hardware platform is a fully digital simulation of real physical processor cores and real hardware devices, used to run embedded software object code.

[0019] Furthermore, the methods also include:

[0020] Determine whether the loading time for the next data stimulus file has been reached; if the loading time for the next data stimulus file has been reached, the stimulus device on the virtual hardware platform executes the loading of the corresponding stimulus data file according to the stimulus data file path and completes the data stimulus, until all N stimulus data files have been stimulated.

[0021] Furthermore, the processor type is used to parse target code debugging information.

[0022] Furthermore, the path to the incentive data file is used to determine the specific content of the incentive data.

[0023] Furthermore, the loading time of the different stimulus data files is used to configure the start stimulus time of the different data files.

[0024] Furthermore, the name of the incentive point variable is used to incentivize actions.

[0025] In summary, the method of this invention for general data incentives for embedded software on virtual hardware platforms abstracts virtual data incentive behavior, avoiding the differences in data and methods required for incentives across different projects and within the same project in different scenarios. This establishes a reusable general incentive device for embedded software on virtual platforms, significantly improving data incentive efficiency. Furthermore, it effectively utilizes the advantage of virtual hardware platforms in monitoring address read / write operations, using the reading or writing of monitoring point addresses as incentive points, achieving different incentive effects depending on the user-designed monitoring points. Attached Figure Description

[0026] Figure 1 This is a flowchart illustrating a general data incentive method for embedded software based on a virtual hardware platform. Detailed Implementation

[0027] Example 1

[0028] The method will now be described in further detail with reference to the accompanying drawings.

[0029] like Figure 1 As shown, this application provides a general data stimulus method for embedded software based on a virtual hardware platform. The method performs data stimulus on the embedded software on the virtual hardware platform and includes the following steps:

[0030] Step 11: Edit the incentive data file according to the incentive scenario. The incentive data file includes N incentive data and the incentive values ​​corresponding to the incentive data.

[0031] Wherein, N ranges from 1 to 6.

[0032] The incentive scenarios include data incentives for various discrete analog quantities in embedded systems.

[0033] Specifically, the file format of the stimulus data file is as follows:

[0034] #Incentive data names: Incentive data 1 name; Incentive data 2 name, Incentive data 3 name, Incentive data 4 name, Incentive data 5 name, Incentive data 6 name;

[0035] #Incentive values: Incentive data 1 value; Incentive data 2 value; Incentive data 3 value; Incentive data 4 value; Incentive data 5 value; Incentive data 6 value.

[0036] Users can edit multiple incentive data files according to the incentive scenario. Each incentive data file can incentivize up to 6 data points. The incentive values ​​can be edited in multiple lines, depending on the user's usage scenario. Each incentive will extract one line of incentive values.

[0037] Step 12: Edit the excitation device configuration information, which includes: processor model, path of excitation data file, loading time of different excitation data files, and name of excitation point variables.

[0038] The processor type is used to parse the target code debugging information.

[0039] The path to the incentive data file is used to determine the specific content of the incentive data.

[0040] The loading time of different stimulus data files is used to configure the start stimulus time of different data files.

[0041] The name of the stimulus point variable, used to stimulate the action.

[0042] It should be noted that controlling the injection timing by monitoring read and write operations using the stimulus point address ensures that data can be stimulated at a defined timing when the stimulus point is set correctly, thus preventing the stimulus data from being overwritten.

[0043] Step 13: Start the virtual hardware platform to simulate and run the embedded software, read the processor model in the configuration information of the excitation device, parse the target code according to the processor model, and obtain the debugging information of the global variables;

[0044] The debugging information for global variables includes the address and length information of the global variables.

[0045] The virtual hardware platform is a fully digital simulation of real physical processor cores and real hardware devices such as timers and network cards, and can run embedded software object code just like a real hardware platform.

[0046] Step 14: Compare the runtime of the virtual hardware platform with the loading time of the stimulus data file;

[0047] Step 15: When the loading time of the first stimulus data file is reached, the stimulus device on the virtual hardware platform loads the stimulus data file according to the stimulus data file path.

[0048] Step 16: Perform data stimulus on the stimulus data file;

[0049] Specifically, step 16 includes:

[0050] Step 161: Obtain the stimulus point address based on the debugging information of the global variable and the stimulus point variable name;

[0051] Step 162: Observe whether the excitation point address is read or written during the operation;

[0052] Step 163: If a read / write operation occurs, extract a line of stimulus data name and stimulus value from the stimulus data file loaded in step 15, obtain the stimulus data address based on the stimulus data name and global variable debugging information, and write the stimulus value into the stimulus data address to complete this data stimulus.

[0053] Step 164: If another read / write operation occurs, extract the stimulus data name and stimulus value from the stimulus data file loaded in step 15, and perform data stimulus according to the method in step 163.

[0054] Step 17: Determine whether the loading time of the next data stimulus file has been reached; if the loading time of the next data stimulus file has been reached, the stimulus device on the virtual hardware platform executes the loading of the corresponding stimulus data file according to the stimulus data file path and completes the data stimulus, until all N stimulus data files have been stimulated.

[0055] Example 2

[0056] Taking the analog input of a certain type of sensor as an example, the general data stimulation method for embedded software based on a virtual hardware platform provided in this application is explained as follows:

[0057] Step 21: Based on the data collected by the sensor, edit the excitation data file, which includes two excitation data and the excitation values ​​corresponding to the excitation data;

[0058] Specifically, the file format of the stimulus data file is as follows:

[0059] #Incentive Data Name:

[0060] g_ui16_test1, g_ui16_test2;

[0061] #Incentive Values:

[0062] 1,2,

[0063] 5,6

[0064] 17, 18,

[0065] 29, 30,

[0066] Step 22: Edit the excitation device configuration information, which includes: processor model, path of excitation data file, loading time of different excitation data files, and name of excitation point variable.

[0067] Processor model: DSP6713

[0068] Stimulus data file path: C:\stimulus data file

[0069] Stimulus data file loading time: 5s

[0070] stimulus variable name: g_ui16_insert_flag

[0071] The processor type is used to parse the target code debugging information.

[0072] The path to the incentive data file is used to determine the specific content of the incentive data.

[0073] The loading time of different stimulus data files is used to configure the start stimulus time of different data files.

[0074] The name of the stimulus point variable, used to stimulate the action.

[0075] It should be noted that controlling the injection timing by monitoring read and write operations using the stimulus point address ensures that data can be stimulated at a defined timing when the stimulus point is set correctly, thus preventing the stimulus data from being overwritten.

[0076] Step 23: Start the virtual hardware platform to simulate and run the embedded software, read the processor model in the configuration information of the excitation device, parse the target code according to the processor model DSP6713, and obtain the debugging information of global variables;

[0077] Name, Address, Length

[0078] g_ui16_test1, 0x2000000, 2

[0079] g_ui16_test2, 0x2000002,2

[0080] The debugging information for global variables includes the address and length information of the global variables.

[0081] The virtual hardware platform is a fully digital simulation of real physical processor cores and real hardware devices such as timers and network cards, and can run embedded software object code just like a real hardware platform.

[0082] Step 24: Compare the runtime of the virtual hardware platform with the loading time of the stimulus data file (5 seconds);

[0083] Step 25: When the loading time of the first stimulus data file reaches 5 seconds, the stimulus device on the virtual hardware platform loads the stimulus data file according to the stimulus data file path C:\stimulus data file 1.

[0084] Step 26: Perform data stimulus on the stimulus data file;

[0085] Specifically, step 26 includes:

[0086] Step 261: Obtain the stimulus point address based on the debugging information of the global variable and the stimulus point variable name;

[0087] Step 262: Observe whether the address of the stimulus point g_ui16_insert_flag is read or written during the operation;

[0088] Step 263: If a read / write operation occurs at the address of g_ui16_insert_flag, extract the incentive data name and incentive value from one line of the incentive data file loaded in step 25. Obtain the incentive data address based on the incentive data name and global variable debugging information, and write the incentive value into the incentive data address. Specifically, write the value 1 into the address 0x2000000 of g_ui16_test1, and write the value 2 into the address 0x2000002 of g_ui16_test2, thus completing this data incentive.

[0089] Step 264: If the address of g_ui16_insert_flag is read or written again, that is, the second row of data is extracted and the stimulus is executed, that is, the value 5 is written to the address 0x2000000 of g_ui16_test1 and the value 6 is written to the address 0x2000002 of g_ui16_test2.

[0090] Step 17: Determine whether the loading time of the next data stimulus file has been reached; if the loading time of the next data stimulus file has been reached, the stimulus device on the virtual hardware platform executes the loading of the corresponding stimulus data file according to the stimulus data file path and completes the data stimulus, until all N stimulus data files have been stimulated.

[0091] This invention provides a general data stimulus method for embedded software based on a virtual hardware platform. When the virtual hardware platform containing the general data stimulus device runs the embedded software, it reads the configuration information of the designed general data stimulus device. This configuration information includes the processor model, stimulus point variable settings, stimulus data file, and stimulus data file loading time. The stimulus data file contains the stimulus data name and stimulus data value. Based on the processor model, target code parsing information is obtained. Different stimulus data files are loaded at different runtimes based on the stimulus data loading information. Data stimulus is executed whenever the virtual hardware platform detects a read or write operation on the stimulus point variable address. During data stimulus execution, the stimulus data name and corresponding stimulus data value are extracted from the currently loaded stimulus data file. Using the stimulus data name as input, the corresponding stimulus address is obtained from the target code parsing information, and the stimulus data value is written to that address, completing the data stimulus.

[0092] The method of this invention provides a general data incentive for embedded software on a virtual hardware platform. It abstracts the virtual data incentive behavior, avoiding the differences in incentive data and methods required for different projects and different scenarios within the same project. This establishes a reusable general incentive device for embedded software on a virtual platform, significantly improving the data incentive efficiency. Simultaneously, it effectively utilizes the advantage of the virtual hardware platform's ability to monitor address read and write operations, using the reading or writing of a monitoring point address as the incentive point, achieving different incentive effects depending on the user-designed monitoring points.

Claims

1. A general data incentive method for embedded software based on a virtual hardware platform, characterized in that, The methods include: Based on the incentive scenario, edit the incentive data file, which includes N incentive data and corresponding incentive values; Edit the excitation device configuration information, which includes: processor model, path to excitation data file, loading time of different excitation data files, and name of excitation point variables; The virtual hardware platform is started to simulate and run the embedded software. The processor model in the configuration information of the excitation device is read, and the target code is parsed according to the processor model to obtain the debugging information of the global variables. Compare the runtime of the virtual hardware platform with the loading time of the stimulus data file; When the loading time of the first stimulus data file is reached, the stimulus device on the virtual hardware platform loads the stimulus data file according to the stimulus data file path; Data incentives are applied to the incentive data file; The process of applying data incentives to the incentive data file specifically includes: Based on the debugging information of the global variables and the names of the excitation point variables, the excitation point addresses are obtained; Observe whether the excitation point address is read or written during the operation; If a read / write operation occurs, the incentive data name and incentive value are extracted from the incentive data file. The incentive data address is obtained based on the incentive data name and global variable debugging information. The incentive value is then written into the incentive data address to complete this data incentive.

2. The general data incentive method for embedded software based on a virtual hardware platform according to claim 1, characterized in that, The debugging information for the global variables includes the address and length information of the global variables.

3. The general data incentive method for embedded software based on a virtual hardware platform according to claim 1, characterized in that, The range of N is 1 to 6.

4. The general data incentive method for embedded software based on a virtual hardware platform according to claim 1, characterized in that, The virtual hardware platform is a fully digital simulation of real physical processor cores and real hardware devices, used to run embedded software target code.

5. The general data incentive method for embedded software based on a virtual hardware platform according to claim 1, characterized in that, The method also includes: Determine whether the loading time for the next data stimulus file has been reached; if the loading time for the next data stimulus file has been reached, the stimulus device on the virtual hardware platform executes the loading of the corresponding stimulus data file according to the stimulus data file path and completes the data stimulus, until all N stimulus data files have been stimulated.

6. The general data incentive method for embedded software based on a virtual hardware platform according to claim 1, characterized in that, Processor model, used to parse target code debugging information.

7. The general data incentive method for embedded software based on a virtual hardware platform according to claim 1, characterized in that, The path to the incentive data file is used to determine the specific content of the incentive data.

8. The general data incentive method for embedded software based on a virtual hardware platform according to claim 1, characterized in that, The loading times of the different stimulus data files are used to configure the start stimulus time of the different data files.

9. The general data incentive method for embedded software based on a virtual hardware platform according to claim 1, characterized in that, The name of the incentive point variable is used to incentivize actions.

Citation Information

Patent Citations

  • Integrated circuit testing excitation generation system based on modular excitation model

    CN109061448A