Test method and system, computing processing end, and readable storage medium
By configuring computing resources at the computing processing end and connecting them with multiple physical channels, the problem that industrial control machines can only be used for a single test task in the prior art is solved, and the function of multi-task execution and sharing of multiple users is realized, which improves the resource utilization efficiency and flexibility of the test system.
Patent Information
- Application Number
- PCT/CN2024/120517
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-25
- Filing Date
- 2024-09-24
- Publication Date
- 2025-04-03
AI Technical Summary
In the existing hardware in the ring test system, industrial control machines can only be used in one test environment with a single test task, cannot perform multiple test tasks at the same time, and resource utilization is insufficient.
By configuring computing resources on the computing processing end and connecting it with multiple physical channels, the computing processing end realizes that the computing processing end executes multiple test tasks simultaneously for at least part of the time, and supports multiple users to share the same computing processing end to complete their respective test tasks.
It realizes more efficient resource utilization, can execute multiple test tasks at the same time, shortens the test cycle, improves the flexibility of the test system and multi-user sharing capabilities.
Smart Images

Figure CN2024120517_03042025_PF_FP_ABST
Abstract
Description
A testing method and system, computing processing terminal and readable storage medium Technical Field
[0001] The present application relates to the field of testing technology, and in particular to a testing method and system, a computing and processing terminal, and a readable storage medium. Background Art
[0002] In automobiles, new energy vehicles and other vehicles, the electronic and electrical architecture of the entire vehicle is becoming more and more complex. The number of electronic control units (ECUs), data bandwidth, and the processing power of CPUs and GPUs have all changed by an order of magnitude compared to before.
[0003] Hardware-in-the-Loop (HIL) testing can verify the functions of various controllers in the vehicle, such as domain controllers, ECUs, and CPUs, in advance, thereby shortening the controller development cycle.
[0004] In existing HIL test systems, devices with data storage and processing capabilities (such as real-time machines, or industrial computers, Real-time Parameter Controls (RTPCs)) and I / O cards are used to execute test tasks and complete the testing of the device under test. Typically, there is only one industrial computer, and it is only suitable for a single test task and a set of test environments. Based on the above technical problems, the applicant has proposed the technical solution of this application.
[0005] Summary of the Invention
[0006] The purpose of this application is to provide a testing method and system, a computing processing end and a readable storage medium, wherein the computing processing end can execute multiple testing tasks simultaneously for at least part of the time, thereby making full and reasonable use of the computing resources and physical channel resources in the test system.
[0007] Furthermore, at least two of the multiple test tasks may belong to different users, enabling multiple users to complete their respective test tasks using the same computing and processing terminal.
[0008] To achieve the above-mentioned objectives, the present application provides a testing method applied to a HIL system, wherein the HIL system includes a computing processing end configured with computing resources, and multiple physical channels for directly or indirectly connecting to a device under test; the testing method includes: the computing processing end receiving multiple test tasks to be executed; and, at least part of the time, the computing processing end simultaneously executing the multiple test tasks to test the same or different devices under test through the corresponding physical channels.
[0009] The present application also provides a computing processing end, in which computing resources are configured and which is used to execute the above-mentioned testing method.
[0010] The present application also provides a test system, which is a HIL system, including: the above-mentioned computing and processing end, and multiple physical channels, the computing and processing end is connected to the multiple physical communications, and the physical channels are directly or indirectly connected to the device under test; the physical channels are used to exchange data between the computing and processing end and the device under test.
[0011] The present application also provides a readable storage medium storing a computer program, which implements the above-mentioned testing method when running.
[0012] In one embodiment, among the multiple test tasks simultaneously executed by the computing processing end, at least two of the test tasks are test tasks of different users.
[0013] In one embodiment, the computing processing end simultaneously executes multiple test tasks to test the same or different devices under test through corresponding physical channels, including: the computing processing end uses different test processes to execute different test tasks to test the same or different devices under test through corresponding physical channels.
[0014] In one embodiment, the multiple test tasks include a target test task and other test tasks received by the computing processing end during the execution of the target test task.
[0015] In one embodiment, the multiple test tasks include a first test task, and the task data of the first test task includes: data describing the relationship between the test simulation model and the data transmission; the data transmission relationship includes: the first data transmission relationship between the first physical channel configured for the first test task and / or the first functional channel corresponding to the first physical channel and the test simulation model; the computing processing end simultaneously executes multiple test tasks to test the same or different devices under test through the corresponding physical channels, including: the computing processing end runs the test simulation model and exchanges target data with the first physical channel to test the device under test through the first physical channel, the target data includes first target data generated by the test simulation model, and / or: second target data that needs to be fed back to the test simulation model.
[0016] In one embodiment, the data transmission relationship also includes: a second data transmission relationship between multiple test simulation models; the computing processing end simultaneously executes multiple test tasks to test the same or different test devices through corresponding physical channels, and also includes: based on the second data transmission relationship, exchanging data between the multiple test simulation models.
[0017] In one embodiment, each of the test tasks has a corresponding test container; the method further includes: creating a namespace corresponding to each of the test containers; the computing processing end uses different test processes to execute different test tasks, including: the computing processing end uses different test processes to call test containers in different namespaces to execute different test tasks.
[0018] In one embodiment, each of the test tasks has a corresponding test container; the namespace corresponding to each test container defines resource information for executing the test task corresponding to the test container, and the resource information includes: computing resource information and channel resource information; each of the test processes uses the computing resources and physical channels of the computing processing end based on the resource information defined in the namespace. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] FIG1 is a first schematic diagram of a test system according to a test method according to a first embodiment of the present application;
[0020] FIG2 is a second schematic diagram of a test system used in the test method according to the first embodiment of the present application;
[0021] 3 is a schematic diagram of a test system according to the test method in the first embodiment of the present application, wherein the test system further includes an I / O control module;
[0022] FIG4 is a specific flow chart of the testing method according to the first embodiment of the present application;
[0023] FIG5 is a specific flow chart of the testing method according to the second embodiment of the present application. Specific embodiments
[0024] The following will describe in detail the various embodiments of the present application in conjunction with the accompanying drawings to provide a clearer understanding of the purpose, features, and advantages of the present application. It should be understood that the embodiments shown in the accompanying drawings are not intended to limit the scope of the present application, but are only intended to illustrate the essential spirit of the technical solution of the present application.
[0025] In the following description, for the purpose of illustrating the various disclosed embodiments, certain specific details are set forth in order to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the relevant art will recognize that the embodiments may be practiced without one or more of these specific details. In other cases, well-known devices, structures, and techniques associated with this application may not be shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.
[0026] Unless the context requires otherwise, throughout the specification and claims, the word "comprise" and variations such as "include" and "have" should be construed in an open, inclusive sense, that is, should be interpreted to mean "including, but not limited to."
[0027] Reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any manner in one or more embodiments.
[0028] As used in this specification and the appended claims, the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It should be noted that the term "or" is generally employed in its sense including "or / and" unless the context clearly dictates otherwise.
[0029] In the following description, in order to clearly demonstrate the structure and working method of this application, many directional words will be used for description, but words such as "front", "back", "left", "right", "outside", "inside", "outward", "inward", "up", and "down" should be understood as convenient terms and should not be understood as restrictive terms.
[0030] The first embodiment of the present application relates to a testing method, which is applied to an HIL hardware-in-the-loop test system. The HIL system includes a computing processing end configured with computing resources, and multiple physical channels; the computing processing end is configured with at least one computing resource such as a CPU and a memory, and the computing processing end is directly or indirectly connected to the multiple physical channels for communication, and each physical channel is directly or indirectly connected to the device under test. The HIL system can be used to test the ECU, domain controller and other devices under test (DUT) in vehicles (including but not limited to new energy vehicles, fuel vehicles, etc.). Common devices under test in vehicles include vehicle controllers, battery management system controllers, electric drive controllers, body controllers, chassis suspension controllers, assisted driving controllers, etc. Test items include but are not limited to operation stability tests and control algorithm tests in various scenarios.
[0031] The computing and processing end of the HIL system can be understood as an industrial computer, which is equipped with computing resources (including but not limited to CPU and memory). The computing and processing end and industrial computer can also be understood as RTPC.
[0032] In one example, referring to FIG. 1 , the HIL system includes an industrial computer 11 and a plurality of physical channels, and the plurality of physical channels can constitute an I / O pool 2 .
[0033] In another example, referring to Figure 2 , the HIL system includes an industrial computer pool 1 and an I / O pool 2. The industrial computer pool 1 and the I / O pool 2 can be located in the same cabinet or in different cabinets. Specifically, the industrial computer pool 1 can include multiple industrial computers 11, the number of which can be fixed or expandable, and the industrial computers 11 in the industrial computer pool 1 can be located in the same cabinet or in different cabinets. The I / O pool 2 can include at least one physical channel 21, the number of which can be fixed or expandable, and the physical channels 21 in the I / O pool 2 can be located in the same cabinet or in different cabinets.
[0034] In one example, the IPC pool 1 includes a configurable number of at least one IPC 11. Specifically, the number of IPCs 11 in the IPC pool 1 is scalable and can be configured based on demand, site requirements, and cost. The IPCs 11 in the IPC pool 1 are interconnected, and each IPC 11 includes one or more CPUs. In the IPC pool 1, multiple IPCs 11 are interconnected, meaning that the multiple IPCs 11 are pooled to form the IPC pool 1. However, this is not limiting; the multiple IPCs 11 may also be independent of one another, without establishing communication connections.
[0035] In one example, the I / O pool 2 includes multiple physical channels 21, the number of which can be fixed or variable in configuration, that is, the number of physical channels 21 in the I / O pool 2 can be expandable to achieve the expansion of the number of physical channels 21, and the number can be configured according to demand, site, cost, etc.; in one example, the physical channels 21 in the I / O pool 2 can come from different I / O units respectively, and each I / O unit can include one or more physical interfaces. There is a set number of interfaces in the I / O cabinet for setting the I / O unit, and the I / O unit is detachably installed and connected to the interface in the I / O cabinet. For example, the I / O unit is an I / O board, which can be directly plugged into the interface in the I / O cabinet; thereby, the number of I / O units in the I / O cabinet can be configured according to demand, site, cost, etc., that is, the number of physical channels 21 in the cabinet can be configured, and the physical channels 21 connected to the I / O cabinet interface form the I / O pool 2.
[0036] In FIG. 2 , it is taken as an example that each industrial computer 1 is directly connected to one or more corresponding physical channels 21 .
[0037] In another example, referring to FIG. 3 , the HIL system further includes an I / O control module 3 and a cluster control module 4 .
[0038] The I / O control module 3 is communicatively connected to the industrial computer 11 in the industrial computer pool 1, and the I / O control module 3 is also communicatively connected to the multiple physical channels 21 in the I / O pool 2. For example, the I / O control module 3 and each physical channel 21 are connected to the same EtherCAT network, wherein the physical channel 21 is connected to the I / O control module 3 in a cascade manner and communicates based on EtherCAT. The use of EtherCAT can basically meet the low latency requirement. In addition, the I / O unit including the physical channel 21 can also be plugged into the I / O control module 3. For example, the I / O unit is connected to the I / O control module 3 via the data bus of the I / O control module 3 (such as a PCIe bus). Among them, the I / O control module 3 can be a computer including an I / O controller.
[0039] The number of I / O control modules 3 can be one, and then the I / O control module 3 can be directly connected to all physical channels 21, or cascaded with all physical channels 21. The number of I / O control modules 3 can also be multiple, and each I / O control module 3 is connected to the corresponding multiple physical channels 21. Each I / O control module 3 can also be connected to the same Ethernet network as the cluster I / O control module 3, and then interact with the cluster I / O control module 3 (for example, feedback data transmission relationship).
[0040] In this embodiment, each physical channel 21 is directly or indirectly connected to the device under test 5, and the number of devices under test 5 can be one or more. In Figure 3, the direct connection between the physical channel 21 and the device under test 5 is used as an example. That is, the device under test 5 is directly connected to the port of each physical channel 21 via a connector to achieve signal transmission; each physical channel 21 can be connected to a different pin of the device under test 5 to transmit different information. The cluster control module 4 is communicatively connected to each industrial computer 11. The cluster control module 4 can be a computer including a cluster controller, which is communicatively connected to each industrial computer 11 via wired or wireless communication. In addition, the cluster control module 4 can be communicatively connected to the host computer 6 via wired or wireless communication.
[0041] In Figures 2 and 3, the industrial computer 11 can be understood as part or all of the real-time simulator RTPC in the HIL system. The industrial computer 11 and the I / O control module 3 can be different computers, or different circuit boards, circuits, etc.
[0042] An I / O unit, which contains one or more physical channels, can be understood as an input / output unit.
[0043] Specifically, it can be understood that the I / O unit meets at least one of the following requirements:
[0044] Able to input data relative to the device under test 5;
[0045] Able to output data relative to the device under test 5;
[0046] Ability to input data relative to the industrial computer 11;
[0047] Ability to output data relative to the industrial computer 11;
[0048] The data A input and / or output by the I / O unit relative to the device under test 5 and the data B input and / or output by the I / O unit relative to the industrial computer may be related or unrelated.
[0049] Specifically, data A and data B can be data with the same content in different formats. For example, a digital signal with a certain content is received from the industrial computer 11, and an analog signal with the same content is sent to the device under test 5. Or vice versa, for example, a signal before the fault is injected is received from the industrial computer 11, and a signal after the fault is injected into the I / O unit is sent to the device under test 5.
[0050] Data A and data B may also be data with the same content and format;
[0051] Data A and data B may also be data of different contents. For example, data A and data B are respectively a trigger signal for triggering the I / O unit to generate a certain Sign1 signal and the Sign1 signal. For another example, the I / O unit needs to obtain a certain conditional signal from the industrial computer 11 in order to simulate the Sing2 signal to be sent to the device under test 5. In this case, the conditional signal and the Sign2 signal are respectively data A and data B.
[0052] An I / O unit can refer to a circuit, a circuit board, or a device containing a circuit board and other assemblies.
[0053] In one example, the I / O unit can interact with the industrial computer 11 via the I / O control module 3, and can also interact with the device under test 5 (such as a vehicle controller) directly or via a switching matrix.
[0054] An I / O unit can implement only input and / or output functions. In some examples, it can also process the transmitted signals during the input and / or output process, such as performing signal conversion, fault simulation, information simulation, signal generation, on / off control, etc. Therefore, whether or not other functions are integrated can be considered as an implementation method of an I / O unit.
[0055] The I / O unit can be an I / O board, for example, one that supports at least one of the following functions: digital signal input, analog signal input, digital signal output, analog signal output, PWM signal input, PWM signal output, high-side power output, and low-side power output. This can further enable high-speed signal acquisition and output, and flexible configuration of board resources based on demand. This technology delivers industry-leading board accuracy and sampling frequency.
[0056] The I / O boards include at least one of the following: AD PWM-IN board, DAC board, FIU board, PWM-OUT board, RELAY-IO board, RC board, PSI5&DSI3&SENT board, multi-bus board (Flexray / CANFD / LIN), Eth (vehicle Ethernet) board, etc.
[0057] The I / O board may also be, for example, at least one of the following dedicated boards: a current output board, a thermocouple board, a battery simulator, a temperature simulator, a motor board, and an IO_HUB board.
[0058] Furthermore, the I / O unit can be understood as including one or more physical channels, and the I / O unit can also be understood as the physical channel of the I / O board.
[0059] It should be noted that FIG3 takes the HIL system as an example of setting up a single device as the cluster control module 4, but is not limited thereto. Any industrial computer 11 can also be configured as the cluster control module 4, thereby eliminating the need to set up a single device as the cluster control module 4.
[0060] In the HIL test systems of Figures 2 and 3, target data is transmitted between the K industrial computers 11 in the industrial computer pool 1 and the L physical channels in the I / O pool 3. Each I / O unit can have one or more physical channels for transmitting target data.
[0061] In a specific example, corresponding to the above I / O board, the target data may include at least one of the following: the downward information generated by the industrial computer 11 that needs to be sent to the device under test 5 (for example, part or all of the first target data generated by the test simulation model); and the upward information from the device under test 5 that needs to be sent to the industrial computer (for example, part or all of the second target data that needs to be fed back to the test simulation model).
[0062] Furthermore, based on the diversity of I / O board functions, the target data may also include at least one of the following: downward information generated by the industrial computer 11 that needs to be sent to the physical channel 21 for processing (for example, part or all of the first target data generated by the test simulation model); and upward information generated by the physical channel 21 that needs to be sent to the industrial computer 11 (for example, part or all of the second target data that needs to be fed back to the test simulation model).
[0063] The specific process of the testing method in this embodiment is shown in FIG4 .
[0064] Step 101: The computing processing end receives a plurality of test tasks to be executed.
[0065] Step 102: At least part of the time, the computing processing end simultaneously executes multiple test tasks to test the same or different devices under test through corresponding physical channels.
[0066] Taking Figures 1 to 3 as an example, the industrial computer in the computing and processing end can receive test tasks from the connected host computer or cluster control module, or the test user can directly configure the test tasks in the industrial computer.
[0067] For an industrial computer, if the industrial computer currently receives multiple test tasks to be executed, it can execute multiple test tasks simultaneously if the resources of the industrial computer (including but not limited to computing resources and channel resources) allow. Of course, whether simultaneous execution is required can be determined based on the time selected by the user to execute the test task, or the user can actively start the execution of the test task at the desired time, or it can be automatically configured. For example, when the industrial computer has not yet executed any test task, it selects multiple test tasks to execute simultaneously according to the order in which the test tasks are received or the priority of the test tasks, and after a test task is completed, it can continue to select a test task to start execution. Alternatively, when the industrial computer receives a test task, it immediately starts executing the test task. Subsequently, while executing the test task, it receives another test task. At this time, the computing and processing end can simultaneously execute the other test task, and when it receives other test tasks later, it can still execute the received test task. In this way, the industrial computer can execute multiple test tasks simultaneously at least part of the time. Each test task corresponds to one or more physical channels. When the industrial computer executes each test task, it can test the device under test through the physical channel corresponding to the test task. In addition, multiple test tasks may target the same DUT (the number may be one or more), or multiple test tasks may target different DUTs, and each test task may target one or more DUTs.
[0068] In addition, the industrial computer on the computing resource side stops executing after each test task reaches the completion conditions (such as the set test time or the set number of cycles, etc.). The computing resources and channel resources for executing the test task are released and re-enter the idle state, and can be used to execute other test tasks later.
[0069] In this embodiment, among the multiple test tasks executed simultaneously by the computing and processing end, at least two test tasks are test tasks of different users, that is, the multiple test tasks executed simultaneously by a single industrial computer can come from different users, that is, multiple users can use the same industrial computer to complete their respective test tasks; in this industrial computer, different test environments can be configured for different users, thereby making full use of the computing resources in the industrial computer.
[0070] For each industrial computer in the computing and processing end, when executing multiple test tasks at the same time, it creates a corresponding test process for each test task, so as to use different test processes to execute different test tasks. That is, a corresponding test process is created for each test task in the industrial computer to execute the corresponding test task. The computing resources and channel resources occupied by different test processes are also separated, which can isolate the computing resources used to execute the test tasks from the test environment formed by the physical channel. The test processes of different test tasks are independent of each other. The creation, execution, and termination of the test process of a certain test task do not affect the test process of another test task. That is, the execution of a certain test task will not affect the execution of another test task. In this way, the isolation of the test environment between different test tasks is achieved by utilizing the separation of resources occupied by the test processes executing different test tasks. That is, when a single industrial computer executes multiple test tasks at the same time, multiple tests are used to isolate these multiple test tasks, so that multiple test tasks can be executed simultaneously in the industrial computer. Multiple test tasks can belong to the same user or to different users, so that multiple users can access the same industrial computer to complete their respective test tasks.
[0071] For example, the multiple test tasks include a target test task and other test tasks received by the computing processing end during the execution of the target test task; that is, if the computing processing end receives other test tasks during the execution of a target test task, it can still execute the test task. At this time, the computing processing end executes these two test tasks at the same time; the two test tasks can be isolated through different processes so that they will not affect each other.
[0072] In one embodiment, during the configuration of each test task (which can be configured in the host computer, cluster control module or computing processing end), a corresponding test container is deployed for the test task. The test container is used to encapsulate the data that forms the test task. Specifically, the data set of the test task can be encapsulated in the image file of the corresponding test container.
[0073] When the computing and processing end executes multiple test tasks simultaneously, it creates a namespace corresponding to the test container of each test task, so that the industrial computer can use different test processes to call test containers of different namespaces to execute different test tasks; that is, when the industrial computer uses the test process to execute the corresponding test task, the test process can call the test container of the corresponding namespace to retrieve and use the data related to the test task in the test container of the test task. Among them, the process ID of the test process corresponding to the test task can be defined in the namespace corresponding to the test container of the created test task, so that the test process of the test task can be associated with the namespace corresponding to the test container of the test task. In addition, the user information (such as the user name) of the user to whom the test task belongs can also be defined in the namespace corresponding to the test container of the test task.
[0074] Furthermore, the namespace corresponding to each test container defines the resource information for executing the test task corresponding to the test container. The resource information includes: computing resource information and channel resource information. At this time, each test process uses the computing resources and physical channels of the computing processing end based on the resource information defined in the namespace.
[0075] The test process corresponding to each test task runs in the namespace of the test container of the test task. The namespace mechanism implements the isolation of system resources (including computing resources and physical channel resources) for different test processes. The test process in the namespace has independent global system resources. Changing the system resources in the namespace will only affect the test process in the current namespace and will not affect the test processes in other namespaces. Therefore, each test process can preempt and use the computing resources and physical channels in the computing processing end within the resource limit specified by the resource information defined in the namespace to execute the corresponding test task to test the device under test.
[0076] The resource information for each test task can be configured by the user in the task data of the test task when configuring the test task, or can be obtained by the host computer, cluster control module, or computing processing end based on the task data of the test task. The resource information of the test task includes at least computing resource information and channel resource information.
[0077] The computing resource information at least represents the constraints on the use of various computing resources when executing the test task, for example, at least one of the following:
[0078] The range or value of the CPU usage when executing the test task, such as the upper limit;
[0079] The range or value of the CPU usage when executing the test task, such as the upper limit;
[0080] The memory size range or value used when executing the test task, such as the upper limit;
[0081] For another example, it may also include the range or value of the memory occupied space;
[0082] The channel resource information represents the type of physical channels or functional channels used to perform the test task and the number of channels of each type.
[0083] For example, taking any test task among multiple test tasks (recorded as the first test task) as an example, the task data of the first test task includes: data describing the relationship between the test simulation model and the data transmission; the data transmission relationship includes: the first physical channel configured for the first test task and / or the first functional channel corresponding to the first physical channel and the first data transmission relationship between the test simulation model; then, based on the first physical channel or first functional channel used, the type of physical channel or functional channel used to execute the test task and the number of each type of channel can be determined.
[0084] The second embodiment of the present application relates to a testing method. In this embodiment, a testing task is used as an example to further illustrate the testing method, as follows:
[0085] The specific process of the testing method of this embodiment is shown in FIG5 .
[0086] Step 201: The computing processing end receives a plurality of test tasks to be executed.
[0087] In step 202, the computing processing end runs the test simulation model and exchanges target data with the first physical channel based on the first data transmission relationship to test the device under test through the first physical channel. The target data includes the first target data generated by the test simulation model and / or: the second target data that needs to be fed back to the test simulation model.
[0088] In this example, when a single industrial computer executes multiple test tasks simultaneously, any one of the multiple test tasks (recorded as the first test task) is taken as an example for description.
[0089] The task data of the first test task includes: data describing the relationship between the test simulation model and the data transmission; the data transmission relationship includes: a first data transmission relationship between the first physical channel configured for the first test task and / or the first functional channel corresponding to the first physical channel and the test simulation model. In the HIL system, the physical channel can be configured as one of the functional channel types supported by the physical channel. For example, if an I / O channel supports two functional channel types, voltage input (Valtage Input) and PWM signal input (PWM Input), the I / O channel can be configured as a Voltage Input functional channel or a PWM Input functional channel. Thus, after the user configures the first functional channel of the type required to execute the first test task, the first data transmission relationship between the first functional channel and the test simulation model can be obtained. Alternatively, when configuring the first test task, the user directly selects the first physical channel of the type required to execute the test task from the idle physical channels. In this case, the selected first physical channel is configured as a non-idle state (i.e., it can no longer be selected for executing other test tasks), thereby obtaining the first data transmission relationship between the first physical channel and the test simulation model.
[0090] The first data transmission relationship may be understood as a data transmission relationship between a model port (ie, an interface for transmitting data) of a test simulation model and the first physical channel or a first functional channel corresponding to the first physical channel.
[0091] Before executing the first test task, the CPU and memory used to execute the test task can be selected from the CPUs and memories that are currently in an idle state based on the computing resource information of the resource information of the first test task. If the channel resource information only indicates the type of the first functional channel required to execute the first test task and the number of each type of first functional channel, and the first data transmission relationship only indicates the first data transmission relationship between the first functional channel and the test simulation model, then the industrial computer selects the first physical channel that can be configured with the first functional channel from the physical channels that are currently in an idle state and configures it to obtain the first physical channel used to execute the first test task, and forms a corresponding relationship between the first functional channel and the first physical channel. Combining this with the above-mentioned first data transmission relationship, the data transmission relationship between each first physical channel and the test simulation model can be obtained. If the first data transmission relationship has already determined the first physical channel used to execute the first test task, there is no need to execute the above-mentioned step of selecting the first physical channel, and the first data transmission relationship between the first physical channel and the test simulation model can be directly determined.
[0092] The idle state referred to in this embodiment means that there is no test task currently being executed or to be executed. In addition, the cluster control module will also determine the CPU, memory in the newly expanded industrial computer in the industrial computer pool and the newly expanded physical channels in the I / O pool as idle states.
[0093] The industrial computer then calls the selected CPU to run the test simulation model of the first test task, and the selected memory caches all test-related data for calling or forwarding. The data cached in the memory includes, for example, data generated by the test simulation model and data that needs to be fed back to the test model.
[0094] Specifically, when the industrial computer in the computing and processing end is executing the first test task to test the device under test, the industrial computer creates a test process for executing the test task. The test process can run the test simulation model to test the device under test, and can call the mirror file data of the test container of the first test task during the test process. The test simulation model can generate first target data during the operation process. The first target data can be sent to the first physical channel. For part or all of the data, the first physical channel can send a corresponding signal to the device under test based on the first target data. At this time, the test process can send the first target data to the first physical channel based on the first data transmission relationship. In addition, during the test process, the first physical channel or the device under test connected to the first physical channel can also generate data that needs to be fed back to the test simulation model (i.e., second target data or data used to make the first physical channel generate second target data), and then the second target data can be fed back to the test simulation model via the first physical channel. The second target data is fed back to the test simulation model from the first physical channel based on the first data transmission relationship. For example, the industrial computer reads the second target data of the specified first physical channel based on the first data transmission relationship.
[0095] In one example, the number of test simulation models can be multiple, and the target industrial computer including the selected CPU runs these multiple test simulation models, then the data transmission relationship also includes: a second data transmission relationship between multiple test simulation models; the second data transmission relationship can be understood as the data transmission relationship between the model port (i.e., the interface for transmitting data) of each test simulation model and the model port (i.e., the interface for transmitting data) of one or more other second test simulation models.
[0096] During the process of executing the first test task to test the device under test, the industrial computer will also test the interaction data between simulation models (recorded as third target data). The third target data is the data generated by the test simulation model that needs to be sent to other test simulation models. For example, if the test simulation model model1 run by the industrial computer generates data that needs to be shared with the test simulation model model2, the industrial computer can feed back the data to the test simulation model model2 running in the same or different industrial computers based on the second data transmission relationship.
[0097] As can be seen from the above, before executing each test task to test the DUT, the industrial computer will first determine the data transmission relationship of the test task. The data transmission relationship can be understood as: determining the test simulation model and the first physical channel that need to directly or indirectly share data with each other when executing the corresponding test task;
[0098] Furthermore, the data transmission may at least indicate a relationship between the test simulation model and one or more first physical channels that allows data transmission, that is, is used to define the test simulation model and the first physical channel that allow data transmission.
[0099] In one example, the data transmission relationship can further determine which physical channel the data transmitted from the test simulation model should be synchronized to, that is, the mapping relationship between the test simulation model and the physical channel can be defined in detail. Furthermore, the data transmission relationship can define in detail the mapping relationship between the port in the test simulation model and the port of the physical channel; the port can refer to a hardware port, or a software port, address, etc. (for example, an output port or input port of a model running in an industrial computer); further, when the mapping relationship is described, the test simulation model and the first physical channel that allow data transmission can be represented.
[0100] Taking the HIL system in Figures 1 to 3 as an example, when executing the first test task, the target industrial computer can, based on the data transmission relationship of the first test task, determine which first physical channel to send the first target data to when it needs to send the first target data; determine which first physical channel to use to obtain the first target data when it needs to obtain the second target data; and determine which test simulation model to use to obtain the third target data when it needs to obtain the third target data. If the first test task is executed by multiple target industrial computers, each target industrial computer can focus only on the portion of the first data transmission relationship between the test simulation model it is running and the corresponding first physical channel, and the portion of the second data transmission relationship between the test simulation model it is running and the test simulation model that interacts with the test simulation model it is running.
[0101] Please refer to the HIL system of FIG3 , taking as an example the number of target industrial computers (including the selected CPU) selected to execute the first test task as K and the number of first physical channels as L.
[0102] In one example, the data transmission relationship of the first test task is sent to K target industrial computers respectively. Based on this data transmission relationship, when the target industrial computers need to obtain the second target data when running a certain test simulation model, they can know which first physical channel to use to obtain the second target data; when they need to send the first target data to the device under test, they can know which first physical channel to send the first target data to; and the connection relationship between the I / O control module and the first physical channel is fixed. Therefore, the industrial computer 11 can know which I / O control module to obtain the required second target data from, and also know which I / O control module to send the first target data to; when running a certain test simulation model, it needs to obtain the third target data, and can know which test simulation model to use to obtain the third target data. Specifically: when the test simulation model running on the target industrial computer needs to send the first target data to the device under test, based on this data transmission relationship, it specifies the first physical channel for receiving each first target data, and then the I / O control module sends each first target data to the device under test through the specified first physical channel. In addition, when the device under test needs to send second target data to the target industrial computer, the I / O control module receives the second target data through L first physical channels. The first physical channel can mark the first physical channel for sending each second target data, so that each target industrial computer receives the second target data from the specified first physical channel based on the above-mentioned data transmission relationship.
[0103] Assume that data needs to be transmitted between a target industrial computer and a first physical channel connected to an I / O control module. The target industrial computer is denoted as device A and the I / O control module is denoted as device B.
[0104] For example, the address space of each device is preset in the memory of each device (including the above-mentioned target industrial computer and I / O control module). When device A runs the test simulation model and wants to transfer the target data that needs to be shared to device B, it can write the target data to the corresponding address space in the memory of device B. Device B can regularly obtain data from its own corresponding address space in the memory. At this time, if device B wants to distribute the obtained data to the first physical channel, under one scheme, device A can write the identifier of the first physical channel in the shared target data, and device B allocates it according to the identifier contained in the obtained data; under another scheme, different first physical channels of device B can be assigned different address subspaces. Device A can instruct to write the target data to the corresponding address subspace when sharing the target data, and device B only needs to read it from the address subspace and give it to the corresponding first physical channel.
[0105] When device A obtains target data from device B, it can also directly obtain data from the corresponding address space or address subspace of device B based on the data transmission relationship, and then give it to the corresponding port of the corresponding model according to the data transmission relationship; the model mentioned here can refer to the test simulation model running in device A. Or,
[0106] When device A obtains target data from device B, device B can also write the target data to the corresponding address space of device A. Device A can periodically obtain the target data from its own corresponding address space in the memory. At this time, if the target data is to be given to the corresponding model and its port; under one solution, device B can write the identifier of the first physical channel in the shared target data. Based on this identifier and the data transmission relationship, device A knows which port of which test simulation model the data from the first physical channel should be given to.
[0107] In another example, the data transmission relationship of the first test task is sent to one or more I / O control modules connected to the L first physical channels. When each target industrial computer needs to send a downlink message to the device under test when running the test simulation model, the downlink message is directly sent to the I / O control module. The I / O control module sends each downlink message to the device under test through the designated first physical channel based on the data transmission relationship. Similarly, when the device under test needs to send reporting information to the designated test simulation model running in the target industrial computer, the I / O control module receives the reporting information through the L first physical channels. Based on the above-mentioned data transmission relationship, the I / O control module sends the reporting information from each target industrial computer to the designated test simulation model running in the target industrial computer.
[0108] For example, in the process of executing the first test task, K target industrial computers and L first physical channels are used to test the device under test, and the L first physical channels are connected to the device under test; the data transmission relationship limits the flow of target data between the test simulation models run by the K target industrial computers and the L first physical channels, that is, after the reporting information from the device under test or the first physical channel that needs to be sent to the specified test simulation model run by the target industrial computer is transmitted to the first physical channel, each first physical channel sends the reporting information to the I / O control module. The data transmission relationship determines that the I / O control module will send the reporting information from each first physical channel to the test simulation model (or its port) of the target industrial computer; and after the downlink information generated by the test simulation model run by the target industrial computer that needs to be sent to the device under test or the first physical channel is transmitted to the I / O control module 13, the data transmission relationship determines that the I / O control module 13 will send the downlink information from each test simulation model to the device under test or the first physical channel, wherein the device under test can receive different information through different pins. Among them, when the target industrial computer transmits the downlink information to the I / O control module, it can add the identifier of the test simulation model that generates the downlink information or the identity identifier of the first physical channel that receives the data in the downlink information; when the first physical channel transmits the reporting information to the I / O control module, it can add its own identity identifier or the identity identifier of the test simulation model that receives the reporting information in the reporting information; thereby, the I / O control module can forward data between the target industrial computer and the first physical channel.
[0109] It can be seen that the I / O control module can be used to realize the selectability of the interaction path between the test simulation model running in the target industrial computer and the first physical channel.
[0110] It should be noted that the number of I / O control modules in FIG3 is used as an example, but it is not limited to this. The number of I / O control modules can also be multiple, each I / O control module corresponds to one or more physical channels, each physical channel corresponds to only one I / O control module, and each I / O control module is connected to the corresponding physical channel; for the first test task, each I / O control module can obtain the data transmission relationship corresponding to itself. Taking any I / O control module as an example, the data transmission relationship determined by the I / O control module defines the data transmission relationship between the test simulation model run by at least part of the target industrial computer and all the first physical channels corresponding to it, that is, the I / O control module determines which test simulation model the data transmitted from each first physical channel should be synchronized to, and which physical channel the data transmitted from the test simulation model should be synchronized to. Among them, each I / O control module and the corresponding physical channels can be connected in a cascade manner, or each I / O control module can be directly connected to the corresponding physical channels respectively.
[0111] In this embodiment, each physical channel is directly or indirectly connected to the DUT, and the number of DUTs can be one or more. In Figure 3, the direct connection between the physical channel and the DUT is taken as an example, that is, the DUT is directly connected to the port of each physical channel through a connector to achieve signal transmission; different physical channels can be connected to different pins of the DUT to transmit different information. In another example, a switching matrix can be set in the HIL system, and the switching matrix is connected between the physical channel and the DUT, that is, each physical channel is indirectly connected to the corresponding DUT through the switching matrix. Among them, all physical channels can be set to be connected to the DUT through the same switching matrix, or all physical channels connected to the same I / O control module can be set to be connected to the DUT through the same switching matrix.
[0112] As can be seen, in order to achieve corresponding communication between the industrial computer, I / O control module, physical channel, and DUT, and to transmit target data, if a switching matrix is provided, it is necessary to configure both the switching matrix and the data transmission relationship of the I / O control module. This allows for data transmission required for testing between the industrial computer and the DUT, such as data transmission between the port of the simulation model in the industrial computer and the port of the DUT. In this way, the connection method for the DUT is more flexible and free, requiring only configuration of the switching matrix based on the actual connection situation. For example, after configuring the I / O control module, if the switching matrix is not set up, it is necessary to determine which I / O control modules the DUT should connect to and how to connect them based on the configuration results. If a switching matrix is set up, the DUT can be connected to the switching matrix more freely, and then the data transmission required for testing can be achieved by simply configuring the switching matrix.
[0113] In one example, the cluster control module, the industrial computer, and the I / O control module are connected via Ethernet. Specifically, the computer where the cluster control module resides, the industrial computer, and the computer where the I / O control module reside are connected via Ethernet, meeting the communication needs of all three parties. For example, the cluster control module can send the aforementioned data transmission relationship to a second target industrial computer and / or I / O control module via Ethernet. Furthermore, the industrial computer and the I / O control module can also communicate via methods other than Ethernet (e.g., reflective memory or other means) to achieve data sharing. This communication method can be used in conjunction with Ethernet or in combination with Ethernet.
[0114] The third embodiment of the present application relates to a computing processing end, which is configured with at least one computing resource such as a CPU and memory. The computing processing end is applied in a HIL test system, and the computing processing end includes: an industrial computer, which is configured with computing resources such as a CPU and memory; the computing processing end is used to execute the test method in the first or second embodiment.
[0115] A fourth embodiment of the present application relates to a test system, which is a HIL test system. The HIL system includes: the computing processing end of the third embodiment, and multiple physical channels, the computing processing end is connected to the multiple physical communication channels, and the physical channels are directly or indirectly connected to a device under test;
[0116] The physical channel is used to exchange data between the computing and processing end and the device under test.
[0117] A fifth embodiment of the present application relates to a readable storage medium storing a computer program, which implements the above-mentioned testing method when the computer program is executed.
[0118] Preferred embodiments of the present application have been described in detail above, but it should be understood that aspects of the embodiments can be modified, if necessary, to employ aspects, features and concepts of the various patents, applications and publications to provide further embodiments.
[0119] These and other changes can be made to the embodiments in light of the above detailed description.In general, in the claims, the terms used should not be construed as limited to the specific embodiments disclosed in the specification and claims, but should be construed to include all possible embodiments along with the full scope of equivalents to which these claims are entitled.
Claims
1. A testing method, characterized in that: Applied to a HIL system, the HIL system includes a computing processing end configured with computing resources, and a plurality of physical channels for directly or indirectly connecting to a device under test; The testing method comprises: The computing processing end receives a plurality of test tasks to be executed; At least part of the time, the computing processing end simultaneously executes a plurality of testing tasks to test the same or different devices under test through the corresponding physical channels.
2. The testing method according to claim 1, characterized in that: Among the multiple test tasks simultaneously executed by the computing processing end, at least two of the test tasks are test tasks of different users.
3. The testing method according to claim 1, characterized in that: The computing and processing end executes multiple test tasks simultaneously to test the same or different DUTs through corresponding physical channels, including: The computing and processing end uses different test processes to execute different test tasks, so as to test the same or different devices under test through corresponding physical channels.
4. The testing method according to claim 1, characterized in that: The multiple test tasks include a target test task and other test tasks received by the computing processing end during the execution of the target test task.
5. The testing method according to claim 1, characterized in that: The multiple test tasks include a first test task, and the task data of the first test task includes: data describing the relationship between the test simulation model and the data transmission; the data transmission relationship includes: a first data transmission relationship between the first physical channel configured for the first test task and / or the first functional channel corresponding to the first physical channel and the test simulation model; The computing and processing end executes multiple test tasks simultaneously to test the same or different DUTs through corresponding physical channels, including: The computing processing end runs the test simulation model and exchanges target data with the first physical channel to test the device under test through the first physical channel. The target data includes first target data generated by the test simulation model and / or second target data that needs to be fed back to the test simulation model.
6. The testing method according to claim 5, characterized in that: The data transmission relationship also includes: a second data transmission relationship between a plurality of test simulation models; The computing and processing end executes multiple test tasks simultaneously to test the same or different DUTs through corresponding physical channels, and also includes: Based on the second data transmission relationship, data is exchanged between the multiple test simulation models.
7. The testing method according to claim 3, characterized in that: Each of the test tasks has a corresponding test container; the method further includes: Create a namespace corresponding to each of the test containers; The computing processing end uses different test processes to perform different test tasks, including: The computing processing end uses different test processes to call test containers in different namespaces to execute different test tasks.
8. The testing method according to claim 3, characterized in that: Each of the test tasks has a corresponding test container; the namespace of each of the test containers defines resource information for executing the test task corresponding to the test container, the resource information including: computing resource information and channel resource information; Each of the test processes uses the computing resources and physical channels of the computing processing end based on the resource information defined in the namespace.
9. A computing processing terminal, characterized in that: The computing processing end is configured with computing resources, and the computing processing end is used to execute the testing method according to any one of claims 1 to 8.
10. A testing system, characterized in that: The test system is a HIL system, comprising: the computing processing end as claimed in claim 9, and a plurality of physical channels, the physical channels being directly or indirectly connected to the device under test; The physical channel is used to exchange data between the computing and processing end and the device under test.
11. A readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed, the test method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Simulation task deployment method, system and related device
CN113722091A
Parallel analogue simulation test method based on HIL test system and related equipment
CN115407745A
Task testing method and device, storage medium and electronic device
CN115712572A
Service-oriented ECU test system
CN115963809A
Test method and system, computing processing end and readable storage medium
CN117311313A