Channel allocation method and device
By automatically allocating I/O channels in the test system, the problems of waste and efficiency reduction caused by artificial allocation in the prior art are solved, and more efficient use of test resources is achieved.
Patent Information
- Application Number
- CN202310993990.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-06
- Filing Date
- 2023-08-08
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2043-08-08
AI Technical Summary
The way in which existing hardware is artificially allocated HIL test bench test resources in the ring test system leads to wasted testing resources and reduced testing efficiency.
Through a channel allocation method, the target I/O channel is automatically selected from the I/O channels available in the test system based on the functional channel configuration information, and configured to perform test tasks to achieve reasonable allocation and full utilization of I/O channels.
It realizes the automated allocation of I/O channels in the test system, reduces the waste of test resources, improves the testing efficiency, and is especially suitable for clustered test scenarios.
Smart Images

Figure CN117076216B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of testing technology, and specifically to a channel allocation method and device. Background Technology
[0002] In automobiles, new energy vehicles, and other vehicles, the electronic and electrical architecture of the entire vehicle is becoming increasingly complex. The number of Electronic Control Units (ECUs), data bandwidth, and the processing power of CPUs and GPUs have all increased by an order of magnitude compared to the past. ECUs are composed of integrated circuits such as microprocessors, memory, input / output interfaces, and analog-to-digital converters.
[0003] Hardware-in-the-Loop (HIL) testing is typically performed during ECU development. A HIL testing system simulates the operating state of a controlled object, connects to the ECU under test via I / O interfaces, and performs comprehensive and systematic testing. HIL testing has become a crucial part of the ECU development process, reducing the number of real-vehicle road tests, shortening development time, reducing costs, improving ECU software quality, and mitigating risks for automakers.
[0004] In the existing HIL testing process, HIL test benches are allocated to testers who need to perform different functional tests. Testers communicate and negotiate to allocate the usage time of the HIL test benches. However, this method of manually allocating HIL test bench test resources inevitably leads to waste of test resources due to communication problems, reducing the overall testing efficiency. Summary of the Invention
[0005] The purpose of this invention is to provide a channel allocation method and device that automatically allocates I / O channels for each test task, thereby achieving reasonable allocation and full utilization of I / O channels in the test system, and is more suitable for clustered test scenarios.
[0006] To achieve the above objectives, the present invention also provides a channel allocation method for allocating multiple I / O channels of at least one I / O device included in a test system; the method includes: after receiving functional channel configuration information related to a test task, selecting a target I / O channel for executing the test task from the available I / O channels in the test system based on the functional channel configuration information; configuring the target I / O channel in the target I / O device to execute the test task, so that the target I / O device can send and receive data related to the test task through the target I / O channel during the test, wherein the target I / O device is the I / O device that includes the target I / O channel.
[0007] The present invention also provides a channel configuration device for performing the channel allocation method described above.
[0008] The present invention also provides a non-transitory computer-readable storage medium storing processor-executable instructions configured to execute the channel allocation method described above.
[0009] In one embodiment, selecting a target I / O channel for executing the test task from the available I / O channels in the test system based on the functional channel configuration information includes: determining whether the available I / O channels in the test system can execute the test task based on the functional channel configuration information; and after determining that the available I / O channels in the test system can execute the test task, selecting a target I / O channel for executing the test task from the available I / O channels in the test system.
[0010] In one embodiment, each I / O channel can be configured as one of the functional channel types supported by the I / O channel. The functional channel configuration information includes: the type of test functional channel required to execute the test task and the required number of test functional channels of each type. Determining whether the available I / O channels in the test system can execute the test task based on the functional channel configuration information includes: obtaining the current functional channel resource pool based on the functional channel types supported by each currently available I / O channel in the test system, and determining whether the required number of test functional channels of each type can be selected from the functional channel resource pool. If the required number of test functional channels of each type can be selected from the functional channel resource pool, it is determined that the available I / O channels in the test system can execute the test task. If the required number of test functional channels of each type cannot be selected from the functional channel resource pool, it is determined that the available I / O channels in the test system cannot execute the test task.
[0011] In one embodiment, determining whether the required number of test function channels of each type can be selected from the function channel resource pool includes: if the number of target function channels of the same type as each test function channel in the function channel resource pool is greater than or equal to the required number of each test function channel, and each target function channel can be configured to an available I / O channel, then it is determined that the available I / O channels in the test system can execute the test task; if the number of target function channels of the same type as each test function channel in the function channel resource pool is less than the required number of each test function channel, and / or any target function channel cannot be configured to an available I / O channel, then it is determined that the available I / O channels in the test system cannot execute the test task.
[0012] In one embodiment, determining whether the available I / O channels in the test system can execute the test task based on the functional channel configuration information includes: determining whether the available I / O channels in the test system can execute the test task within a set number of time periods based on the functional channel configuration information; before selecting a target I / O channel for executing the test task from the available I / O channels, the method includes: displaying the time periods available for executing the test task from the test system for selection; selecting a target I / O channel for executing the test task from the available I / O channels includes: after receiving at least one target time period selected from the time periods available for executing the test task from the test system, selecting the target I / O channel within each of the time periods from the available I / O channels in the test system within each target time period.
[0013] In one embodiment, selecting the target I / O channel within each time period from the available I / O channels in the test system for each target time period further includes: determining whether the available I / O channels in the test system for each target time period can execute the test task based on the functional channel configuration information; if it is determined that the available I / O channels in the test system for each target time period can execute the test task, proceeding to the step of selecting the target I / O channel within each time period from the available I / O channels in the test system for each target time period.
[0014] In one embodiment, each of the I / O devices includes: an I / O control module and at least one I / O channel; configuring the target I / O channel in the target I / O device to perform the test task includes: configuring the correspondence between the target I / O channel and the test task in the I / O control module of the target I / O device, so that the I / O control module of the target I / O device can send and receive data related to the test task through the target I / O channel during the test.
[0015] In one embodiment, the testing system further includes: a computing resource terminal configured with a CPU; the method further includes: determining a target CPU in the computing resource terminal for executing the testing task based on the task requirement information of the testing task, so that when the target CPU and the target I / O channel are used to execute the testing task to test the device under test, the device under test and the target CPU interact through the target I / O channel.
[0016] In one embodiment, before selecting a target I / O channel for executing the test task from the available I / O channels in the test system based on the functional channel configuration information, the method further includes: determining whether all I / O channels in the test system can complete the test task based on the functional channel configuration information; if it is determined that all I / O channels in the test system can complete the test task, proceeding to the step of selecting a target I / O channel for executing the test task from the available I / O channels in the test system based on the functional channel configuration information. Attached Figure Description
[0017] Figure 1 This is a block diagram of a test system for which the channel allocation method according to the first embodiment of the present invention is applied;
[0018] Figure 2 This is a block diagram of a test system according to the first embodiment of the present invention, wherein the cluster control module is an industrial control computer;
[0019] Figure 3 This is a block diagram of a test system according to a first embodiment of the present invention, wherein the test system includes multiple I / O control modules, and each I / O control module is cascaded with an I / O channel;
[0020] Figure 4 This is a block diagram of a test system according to a first embodiment of the present invention, wherein the test system includes multiple I / O control modules, each I / O control module being directly connected to an I / O channel;
[0021] Figure 5 This is a schematic diagram of the specific process of the channel allocation method according to the first embodiment of the present invention;
[0022] Figure 6 This is a schematic diagram of the specific process of the channel allocation method according to the second embodiment of the present invention;
[0023] Figure 7 This is a schematic diagram of the reservation initiation interface of the cluster control module according to the second embodiment of the present invention;
[0024] Figure 8 This is a schematic diagram of the selection and reservation configuration interface of the cluster control module according to the second embodiment of the present invention;
[0025] Figure 9 This is the interface for selecting a time period in the cluster control module according to the second embodiment of the present invention. Detailed Implementation
[0026] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings to provide a clearer understanding of the purpose, features, and advantages of the present invention. It should be understood that the embodiments shown in the drawings are not intended to limit the scope of the present invention, but are merely illustrative of the essential spirit of the technical solution of the present invention.
[0027] In the following description, certain specific details are set forth for the purpose of illustrating various disclosed embodiments in order to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the art will recognize that embodiments may be practiced without one or more of these specific details. In other instances, well-known apparatuses, structures, and techniques associated with this application may not have been shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.
[0028] Unless the context requires otherwise, throughout the specification and claims, the word “comprising” and its variations, such as “including” and “having”, shall be understood to have an open, inclusive meaning, that is, to be interpreted as “including, but not limited to”.
[0029] Throughout this specification, references to "an embodiment" or "an embodiment" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Therefore, the appearance of "in an embodiment" or "an embodiment" in various places throughout the specification does not necessarily refer to the same embodiment. Furthermore, a particular feature, structure, or characteristic may be combined in any manner in one or more embodiments.
[0030] The singular forms “a” and “the” used in this specification and the appended claims include plural references unless otherwise expressly stated herein. It should be noted that the term “or” is generally used to include the meaning of “or / and” unless otherwise expressly stated herein.
[0031] In the following description, in order to clearly demonstrate the structure and working method of the present invention, a number of directional terms will be used. However, terms such as "front", "back", "left", "right", "outside", "inside", "outward", "inward", "up", and "down" should be understood as convenient terms and not as limiting terms.
[0032] The first embodiment of the present invention relates to a channel allocation method applied to a channel configuration device. The channel configuration device can be a device dedicated to allocating I / O channels in a test system, or it can be a cluster control module of the test system (described below as an example). It can allocate multiple I / O channels included in the test system based on the channel allocation method of this embodiment. The test system includes one or more I / O devices, and each I / O device includes one or more I / O channels. The I / O channels are physical channels used to realize data interaction between the CPU in the computing resource end and the device under test during the test. The computing resource end can include one or more real-time computing devices configured with CPUs (e.g., industrial control computers). If the computing resource end includes multiple real-time computing devices, these multiple real-time computing devices can be pooled or not pooled.
[0033] In an I / O device, each I / O channel can be configured as one of the functional channel types supported by that I / O channel. For example, if an I / O channel supports two functional channel types, namely voltage input and PWM signal input, then the I / O channel can be configured as either a voltage input channel or a PWM input channel.
[0034] In one example, the test system is the HIL test system; please refer to [reference needed]. Figure 1 and Figure 2 The test system includes: an industrial computer pool 1, at least one I / O control module 2 (one is shown in the figure as an example) and an I / O pool 3.
[0035] In this embodiment, an I / O control module 2 and at least one I / O channel 31 connected to it are considered as an I / O device. That is, the I / O device includes: an I / O control module 2 and an I / O channel 31 connected to the I / O control module 2.
[0036] The industrial computer pool 1 and the I / O pool 3 can be housed in the same rack or in different racks. Specifically, the industrial computer pool 1 can include multiple industrial computers 11, the number of which can be fixed or expandable. The industrial computers 11 in the industrial computer pool 1 can be housed in the same rack or in different racks. The I / O pool 3 can include at least one I / O channel 31, the number of which can be fixed or expandable. The I / O channel 31 belongs to the same I / O device, that is, the I / O device includes multiple I / O channels 31. The I / O pool 3 includes the I / O channels 31 of one or more I / O devices. If the I / O pool 3 includes multiple I / O devices, all I / O devices can be housed in the same rack or in different racks.
[0037] In one example, the industrial PC pool 1 includes at least one configurable number of industrial PCs 11 (Real-time Parameter Controls, RTPCs). That is, the number of industrial PCs 11 in the industrial PC pool 1 is expandable and can be configured according to needs. For example, the industrial PC cabinet used to house the industrial PCs 1 may have a set number of interfaces. The industrial PCs 11 are detachably installed and connected to the interfaces in the industrial PC cabinet, thereby enabling the configuration of the number of industrial PCs 11 in the cabinet as needed. The industrial PCs 11 connected to the interfaces of the industrial PC cabinet form the industrial PC pool 1. The industrial PCs 11 in the industrial PC pool 1 are interconnected, and each industrial PC 11 includes one or more CPUs. The industrial PC is a form of real-time computing device, which can be a board directly plugged into the interface of the industrial PC cabinet, or a separate device connected to the interface of the industrial PC via a data cable.
[0038] As automotive functions become increasingly complex and data bandwidth grows (cameras, LiDAR), CPU processing power has exceeded 50,000 DMIPS, and AI computing power has even reached 1000 TOPS. Traditional isolated single industrial control computers can no longer meet this testing demand. Only through clustering, pooling more computing resources, CPU resources, and bus bandwidth together, can the resource bottleneck of simulation be solved. The use of industrial control computer pools in the above solution effectively solves the resource bottleneck problem. Furthermore, the solution in this manual can be applied to this scenario, solving the resource bottleneck while ensuring efficient and effective test operation.
[0039] In one example, the I / O pool 3 includes at least one configurable number of I / O channels 31, meaning the number of I / O devices in the HIL system is scalable to expand the number of I / O channels 31 in the I / O pool 3. This number can be configured according to requirements, space, cost, etc. For example, the I / O rack used to house the I / O devices may have a set number of interfaces. The I / O devices can be detachably installed and connected to the interfaces in the I / O rack, or the units formed by the I / O channels 31 contained in the I / O devices can be connected to the interfaces in the I / O rack. Thus, the number of I / O channels 31 in the I / O rack can be configured according to requirements, space, cost, etc., and the I / O channels 31 connected to the I / O rack interfaces form the I / O pool 3. In one example, the I / O device or the unit formed by the I / O channels 31 contained in the I / O device is an I / O board, which can be directly plugged into the interfaces in the I / O rack.
[0040] I / O control module 2 communicates with industrial computer 11 in industrial computer pool 1. I / O control module 2 also communicates with one or more corresponding I / O channels 31 in I / O pool 3. If there is only one I / O control module 2, then the I / O control module 2 communicates with all I / O channels 31.
[0041] Please refer to Figure 3 and Figure 4 If there are multiple I / O control modules 2, each I / O control module 2 can be communicatively connected to one or more I / O channels 31, and each I / O channel 31 can only be communicatively connected to one I / O control module 2. The I / O control modules 2 can be cascaded or directly connected to the I / O channels 31.
[0042] In one example, there is one I / O control module 2, which is connected to each I / O channel 31 in the same EtherCAT network. The I / O channels 31 and I / O control module 2 are cascaded and communicate via EtherCAT, which generally meets the low latency requirements. Furthermore, the units formed by the I / O channels 31 included in the I / O device can also be plugged into the I / O control module 2 within that I / O device. For example, these units can be connected to the I / O control module 2 via its data bus (e.g., PCIe bus). The I / O control module 2 can be a computer that includes an I / O controller.
[0043] The number of I / O control modules 2 can be one, which can be directly connected to all I / O channels 31 or cascaded with all I / O channels 31. The number of I / O control modules 2 can also be multiple, with each I / O control module 2 connected to multiple corresponding I / O channels 31. Each I / O control module 2 can also be connected to the same Ethernet as the cluster control module, thereby interacting with the cluster control module (e.g., feedback of data transmission relationships).
[0044] Data interaction between the I / O control module 2 and the industrial computer 11 is achieved through writing and reading from the storage unit (distributed or centralized storage unit), thereby enabling target data interaction between the device under test (DUT) 4 and the industrial computer 11. For example, if the DUT 4 needs to feed target data back to the industrial computer 11, the corresponding I / O channel 31 can acquire a signal containing the target data to be transmitted. Then, the I / O control module 2 corresponding to the I / O channel 31 can write the target data into the storage unit, and the industrial computer 11 can then read the target data from the storage unit. As another example, if the industrial computer 11 needs to feed target data back to the DUT 4, the industrial computer 11 can write the target data into the storage unit, and the I / O control module 2 can read it and send it to the corresponding I / O channel 31, which then feeds it back to the DUT 4. Target data refers to the data that needs to be exchanged between the DUT 4 and the industrial computer 11.
[0045] Compared to traditional solutions that use Ethernet for data exchange, the above solutions offer better transmission efficiency and synchronization.
[0046] In this embodiment, each I / O channel 31 is connected to a corresponding device under test (DUT) 4, and the number of DUTs 4 can be one or more. Each I / O channel 31 can be directly connected to its corresponding DUT 4; that is, the DUT 4 is directly connected to the port of each I / O channel 31 via a connector to achieve signal transmission. Different I / O channels 31 can be connected to different pins of the DUT 4 to transmit different information. If multiple DUTs 4 are simultaneously subjected to cluster testing, each I / O channel 31 is connected to the same pin of each DUT 4 to transmit the same information.
[0047] In one example, the test system also includes a switching matrix 5 connecting the I / O channels 31 and the device under test (DUT) 4, meaning that each I / O channel 31 is indirectly connected to the corresponding DUT 4 through the switching matrix 5. The switching matrix 5 includes at least one first port and at least one second port; each first port is connected to each I / O channel 31, and each second port is connected to each DUT 4. The switching matrix 5 has switchable connection channels that can connect the first and second ports on both sides of the switching matrix 5. Therefore, by configuring the connection channels within the switching matrix 5, each I / O channel 31 can be connected to the corresponding DUT 4. Different connection channels in the switching matrix 5 can be used to transmit different signals, and the switching matrix 5 can also be equipped with an Ethernet module to achieve digital signal switching. It can be seen that in order to achieve corresponding communication between the industrial control computer 11, the I / O channels 31, and the DUT 4, and to transmit target data, when a switching matrix is provided, both the switching matrix and the data transmission relationship of the I / O control module 2 need to be configured. This enables data transmission required for testing between the industrial control computer 11 and the device under test (DUT) 4, such as data transmission between the port of the simulation model in the industrial control computer 11 and the port of the DUT 4. In this method, the connection method for the DUT 4 is more flexible and free. Only the switching matrix 5 needs to be configured according to the actual connection situation. For example, after configuring the I / O control module 2, if the testing system does not have a switching matrix, it is necessary to find out which I / O channels 31 the DUT 4 should be connected to and how to connect them based on the configuration results. With the switching matrix 5 configured in the testing system, the DUT 4 can be connected to the switching matrix 5 more freely, and then only the switching matrix 5 needs to be configured to achieve the data transmission required for testing.
[0048] The industrial control computer 11 can be understood as part or all of the real-time emulator (RTPC) in the HIL system.
[0049] The I / O channel 31 can be understood as an input / output unit. Specifically, the I / O channel 31 satisfies the following: it can realize data input and / or output relative to the device under test 4, and / or it can realize data input and / or output relative to the industrial control computer 11.
[0050] The data A input and / or output of I / O channel 31 to the device under test 4 and the data B input and / or output of I / O channel to industrial computer 11 can be related or unrelated. Specifically, data A and data B can be different forms of the same content. For example, the industrial computer 11 may receive a digital signal with certain content and send an analog signal with the same content to the device under test 4, or vice versa. For another example, the industrial computer 11 may receive a signal before the fault is injected and send a signal after the fault is injected to the device under test 4 via I / O channel 31.
[0051] Data A and data B can also be data with the same content and format;
[0052] Data A and data B can also be data with different contents. For example, data A and data B are respectively the trigger signal that triggers I / O channel 31 to generate a certain Sign1 signal and the Sign1 signal itself. For another example, I / O channel 31 needs to obtain a certain condition signal from industrial control computer 11 in order to simulate the Sing2 signal that needs to be sent to the device under test 4. In this case, the condition signal and the Sign2 signal are data A and data B respectively.
[0053] In addition, I / O channel 31 can refer to a circuit, a circuit board, or a device containing a circuit board and other assemblies.
[0054] In one example, the I / O channel 31 can interact with the industrial computer 11 via the I / O control module 2, or it can interact with the device under test 4 (e.g., the vehicle controller) directly or via the switching matrix 5. The interaction can be unidirectional or bidirectional.
[0055] An I / O device can perform input and / or output functions solely through its I / O channel 31. In some examples, the transmitted signals can also be processed during the input and output process, such as signal conversion, fault simulation, information simulation, signal generation, and on / off control. Therefore, as long as signal interaction can be achieved between the industrial control computer 11 and the device under test 4, regardless of whether other functions are integrated, it can be considered a form of I / O device implementation.
[0056] The I / O device or the unit formed by the I / O channel 31 included in the I / O device can be an I / O board, for example, a board 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. The I / O channel 31 can be configured to implement any one of these functions. High-speed signal acquisition and output can be further realized. Furthermore, flexible configuration of board resources can be achieved according to requirements. The board accuracy and sampling frequency performance brought by this technology have reached industry-leading levels.
[0057] 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-mounted network) board, etc.
[0058] The I / O boards may also include at least one of the following dedicated boards: current output board, thermocouple board, battery simulator, temperature simulator, motor board, IO_HUB board.
[0059] In this embodiment, the I / O control module 2 is used to transmit target data between the K industrial computers 11 in the industrial computer pool 1 and the L I / O channels 31 in the I / O pool 3; K and L are both arbitrary integers greater than or equal to 1.
[0060] Any data that can be transmitted between the industrial control computer 11 and the I / O channel 31 can be understood as 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: information generated by the industrial computer 11 that needs to be sent to the device under test 4; and information originating from the device under test 4 that needs to be sent to the industrial computer 11.
[0062] Furthermore, based on the diversity of I / O board functions, the target data may also include at least one of the following: information generated by the industrial computer 11 that needs to be sent to the I / O device for processing; and information generated by the I / O device that needs to be sent to the industrial computer 11.
[0063] The specific process of the channel allocation method in this embodiment is as follows: Figure 5 As shown.
[0064] Step 101: After receiving the functional channel configuration information related to the test task, select the target I / O channel for executing the test task from the available I / O channels in the test system based on the functional channel configuration information.
[0065] In one example, based on the functional channel configuration information, a target I / O channel for executing the test task is selected from the available I / O channels in the test system. This includes: determining whether the available I / O channels in the test system can execute the test task based on the functional channel configuration information; and after determining that the available I / O channels in the test system can execute the test task, selecting the target I / O channel for executing the test task from the available I / O channels in the test system.
[0066] Step 102: Configure the target I / O channel in the target I / O device to perform test tasks, so that the target I / O device can send and receive data related to the test tasks through the target I / O channel during the test. The target I / O device is an I / O device that includes the target I / O channel.
[0067] The data in step 102 can be understood to include at least the aforementioned target data, that is: the data that needs to be transmitted between the device under test and the industrial control computer.
[0068] The channel allocation method in this embodiment will be explained below in conjunction with the aforementioned HIL testing system.
[0069] The cluster control module is connected to the I / O control module 2 in each I / O device via the same Ethernet, and can exchange information with each I / O control module 2. The cluster control module can read the I / O channels 31 contained in each I / O device and the functional channel types supported by the I / O channels 31 in each I / O device from the I / O control module 2 of each I / O device, but it is not limited to this, and can also be the above information configured by the back-end administrator.
[0070] In this embodiment, the cluster control module can receive test tasks from the connected host computer or the user can directly configure test tasks in the cluster control module to obtain the task data of the test tasks. The task data includes, but is not limited to: the test simulation model corresponding to the test task, the type of test function channel, the number of various test function channels, and the data transmission relationship between the test simulation model and the test function channel; that is, the task data contains function channel configuration information.
[0071] The cluster control module can determine the task requirements of a test task based on the task data. These requirements include at least the number of CPUs needed to execute the corresponding test task, as well as the type and quantity of test function channels. Additionally, the task requirements also include the memory and storage space required for the test; that is, selecting CPUs and test function channels requires considering whether their available memory and storage space meets the test requirements. In one specific example, the task requirements can also characterize the quantity and / or type of required memory, GPUs, bus interfaces, sensor interfaces, simulation boards, etc. In another specific example, the task requirements can also characterize various parameters of the CPU, and the model, brand, and attributes of the GPU and memory.
[0072] In this embodiment, after accessing the cluster control module, the tester can receive user input of functional channel configuration information related to the test task in the cluster control module, or receive functional channel configuration information sent by the tester through the host computer. The functional channel configuration information is used to determine the test functional channels required to execute the test task.
[0073] For example, when a tester accesses and requests to configure a function channel, the cluster control module can display a configuration interface. The configuration interface contains the configuration interface for all the function channel types supported by all I / O channels in the test system. The user can select the required function channel type and the number of function channels of each type in the configuration interface. After receiving the confirmation instruction, the function channel configuration information will be formed based on the currently selected function channel type and the input number of function channels of each type. That is, the function channel configuration information includes: the type of test function channel required to execute the test task and the required number of test function channels of each type.
[0074] Regarding the functional channel configuration information, the cluster control module can first read the status of each I / O channel through each I / O control module 2 to obtain the I / O channels that are currently idle. The idle I / O channels are the available I / O channels. Then, based on the functional channel types supported by the I / O devices to which the available I / O channels belong, all currently available I / O channels are virtualized to obtain the current functional channel resource pool. For example, if an I / O channel supports two functional channel types, namely voltage input and PWM signal input, it is virtualized into two functional channels in the functional channel resource pool, namely the voltage input functional channel and the PWM input functional channel.
[0075] The cluster control module then determines whether it can select the required number of test function channels of each type from the current function channel resource pool. Specifically, it determines whether the number of target function channels of the same type as each test function channel in the function channel resource pool is greater than or equal to the required number of each test function channel, and whether each target function channel can be configured to an available I / O channel. If the number of target function channels of the same type in the function channel resource pool is greater than or equal to the required number of each test function channel, and each target function channel can be configured to an available I / O channel, then the available I / O channels in the test system are determined to be able to execute test tasks. If the number of target function channels of the same type in the function channel resource pool is less than the required number of each test function channel, and / or any target function channel cannot be configured to an available I / O channel, then the available I / O channels in the test system are determined to be unable to execute test tasks.
[0076] For example, the functional channel configuration information includes two types of test functional channels, A and B, with the required quantity of test functional channel A being X. A The required quantity of test function channel B is X. B Then, for test function channel A, determine whether X can be found in the current function channel resource pool. AIf test function channel A can find X A If there is a test function channel A, then X is selected from the current function channel resource pool. A Test function channel A determines whether X can be... A Each test function channel A is configured to an available I / O channel. If these X channels can be configured... A Each test function channel A is configured to an available I / O channel. The availability of each test function channel A as a configurable I / O channel is recorded. I / O channels recorded as configurable as test function channel A cannot be configured as other types of function channels. Priority is given to configuring I / O channels that cannot be configured as test function channel B as test function channel A. If X cannot be found... A Test function channel A or find X A If not all test function channels A can be configured to available I / O channels, then the available I / O channels in the test system are deemed unsuitable for executing test tasks.
[0077] Then determine whether X can be found in the resource pool of that function channel. B If test function channel B can find X B Test function channel B, then judge this X B Can test function channel B be configured to an available I / O channel? If X B Each test function channel B can be configured to an available I / O channel. Recording that each test function channel B can be configured to an available I / O channel confirms that the available I / O channels in the test system can execute test tasks. Then, according to the aforementioned records, these X... A Each test function channel A is configured to an available I / O channel, and this X B Each test function channel B is configured to an available I / O channel to obtain X. A Target I / O channels A and X B Target function channel B.
[0078] If X cannot be found B Test function channel B or find X B If not all test function channels B can be configured to available I / O channels, then the available I / O channels in the test system are deemed unsuitable for executing test tasks.
[0079] For example, there are currently 16 available I / O channels. These 16 I / O channels belong to two I / O devices (e.g., the AD_PWMIN board). Each I / O device includes 8 available I / O channels. The AD_PWMIN board supports two functional channel types: voltage input and PWM signal input. The virtualized functional channel resource pool thus includes 32 functional channels: 16 voltage input functional channels and 16 PWM input functional channels. However, only 16 functional channels can be mapped to I / O channels.
[0080] For example, the function channel configuration information includes: executing the test task requires 6 Valtage Input function channels and 12 PWM Input function channels; first, 6 Valtage Input function channels are selected from the function channel resource pool, and these 6 Valtage Input function channels can be mapped to 6 I / O channels (these 6 I / O channels cannot be configured as PWM Input function channels); then, 12 PWM Input function channels are selected from the function channel resource pool. Since only 10 available I / O channels can be configured as PWM Input function channels at this time, it is determined that the available I / O channels in the test system cannot execute the test task.
[0081] For example, the functional channel configuration information includes: 4 Valtage Input functional channels and 8 PWM Input functional channels are required to execute the test task; first, 4 Valtage Input functional channels are selected from the functional channel resource pool. These 4 Valtage Input functional channels can be mapped to 4 I / O channels (these 6 I / O channels cannot be configured as PWM Input functional channels). Then, 8 PWM Input functional channels are selected from the functional channel resource pool. At this time, there are still 12 available I / O channels that can be configured as PWM Input functional channels. 8 of these available I / O channels can be configured as PWM Input functional channels, thus determining the available I / O channels in the test system that can execute the test task; at this time, mapping the 4 Valtage Input functional channels to the 4 I / O channels yields 4 target I / O channels configured as Valtage Input. 8 of these available I / O channels can be configured as PWM Input functional channels, resulting in 8 target I / O channels configured as PWM Input. Therefore, 12 target I / O channels were selected to perform the test task, that is, the range of 12 target I / O channels used to complete the test task was defined in the HIL test system.
[0082] In one example, before determining whether the available I / O channels in the test system can execute test tasks based on the functional channel configuration information, the cluster control module first determines whether all I / O channels in the test system can complete the test tasks based on the functional channel configuration information. If it is determined that all I / O channels in the test system can complete the test tasks, then it determines whether the available I / O channels in the test system can execute the test tasks based on the functional channel configuration information. The specific method for determining whether all I / O channels in the test system can complete the test tasks based on the functional channel configuration information is similar to the aforementioned method for determining whether the available I / O channels in the test system can execute the test tasks based on the functional channel configuration information. The main difference is that here, a functional channel resource pool virtualized from all I / O channels in the test system is used, which will not be elaborated further here.
[0083] For example, the total number of available I / O channels in the test system is 32. These 32 I / O channels belong to 4 I / O devices (e.g., the AD_PWMIN board). Each I / O device includes 8 available I / O channels. The AD_PWMIN board supports two functional channel types: voltage input and PWM signal input. The virtualized functional channel resource pool thus includes 64 functional channels: 32 voltage input functional channels and 32 PWM input functional channels. However, only 32 functional channels can establish a mapping relationship with I / O channels.
[0084] The functional channel configuration information for a certain test task includes: 33 ValtageInput functional channels and 9 PWM Input functional channels are required to execute the test task; the functional channel resource pool only contains 32 Valtage Input functional channels, so it is determined that all I / O channels in the test system cannot complete the test task.
[0085] The configuration information for the function channels of another test task includes: 10 ValtageInput function channels and 9 PWM Input function channels are required to execute this test task. The function channel resource pool includes 32 Valtage Input function channels and 32 PWM Input function channels, and the number of I / O channels is 32, which is sufficient to complete the test task. Then, it is determined whether the available I / O channels in the test system can execute the test task. Please refer to the above process for details, which will not be repeated here.
[0086] Subsequently, the I / O control module 2 of the target I / O device is configured with the correspondence between the target I / O channel and the test task, so that the I / O control module 2 of the target I / O device can send and receive data related to the test task through the target I / O channel during the test.
[0087] Taking the 12 target I / O channels selected above for executing the test task as an example, if these 12 I / O channels belong to the same I / O device, the correspondence between these 12 target I / O channels and the test task can be configured in the I / O control module 2 of that I / O device. During the subsequent execution of the test task, the I / O control module 2 uses these 12 target I / O channels to send and receive data related to the test task. If these 12 I / O channels belong to different I / O devices, the correspondence between the target I / O channels of each I / O device and the test task can be configured in the I / O control module 2 of these multiple different I / O devices, or the correspondence between the 12 target I / O channels and the test task can be configured in the I / O control module 2 of each I / O device. During the subsequent execution of the test task, the I / O control module 2 of each I / O device can send and receive data related to the test task based on the configured correspondence between the target I / O channels and the test task.
[0088] Before or after determining the target I / O channel for executing the test task, the cluster control module can determine the target CPU in the computing resource terminal for executing the test task based on the task requirement information of the test task. The computing resource terminal can be an industrial control computer. The process of determining the target CPU can be implemented by determining the CPU or by determining the target industrial control computer. That is, if the target industrial control computer is determined, it can also be understood that the CPU in the determined target industrial control computer is the target CPU.
[0089] Specifically, the task requirement information of the test task at least indicates the number of CPUs required to execute the test task. At this time, N target CPUs can be selected from the CPUs that are currently in an idle state according to the above test task requirement information.
[0090] Taking the number of target I / O channels as L as an example, the test environment consisting of N target CPUs and L target I / O channels can be divided for executing the test task, that is, the range of CPUs and I / O channels used to execute the test task is defined; N and L are any integers greater than or equal to 1.
[0091] Specifically, the task requirements information for a test task at least indicates which industrial control computer (ICC) is needed to execute the test task, or what characteristics the ICC has. Based on this test task requirements information, the appropriate ICC can be selected. For example, the interface can display the available ICCs in the test system, allowing the user to select one as the target ICC.
[0092] In addition, if the task requirements information can also include the memory and storage space required for the test, then when selecting N target CPUs and L target I / O channels, the memory and storage space required for the test can also be referenced. That is, it is necessary to ensure that the selected target CPUs and target I / O channels meet the requirements for memory and storage space.
[0093] In this embodiment, being in an idle state means that there are currently no test tasks being executed or waiting to be executed. In addition, the cluster control module will also determine that newly expanded industrial control computers in the industrial control computer pool and newly expanded I / O channels in the I / O pool are in an idle state.
[0094] After determining the N target CPUs and L target I / O channels required to execute the test task, the cluster control module identifies the target industrial control computer as the industrial control computer that contains one less target CPU among the selected N target CPUs. This allows the determination of the target industrial control computer and target I / O channels corresponding to the test container of the test task.
[0095] Subsequently, the cluster control module can use the target industrial control computer and target I / O channel corresponding to the test container to execute test tasks to test the device under test, enabling the device under test to interact with N target CPUs through L target I / O channels.
[0096] Furthermore, the correspondence between the target I / O channel configured in the I / O control module 2 and the test task can be understood as the data transmission relationship between the target industrial control computer executing the test task and the target I / O channel.
[0097] For example, if there are K target industrial control computers containing the target CPU, the cluster control module selects K target industrial control computers in industrial control computer pool 1 and L target I / O channels in I / O pool 3 to execute the same test task, thus obtaining the data transmission relationship between the K target industrial control computers and the L target I / O channels in I / O pool 3. This data transmission relationship is configured in I / O control module 2 connected to each target I / O channel. I / O control module 2 is used to transmit target data between the K target industrial control computers and the L target I / O channels based on the data transmission relationship between the K target industrial control computers in industrial control computer pool 1 and the L target I / O channels in I / O pool 3; K and L are both arbitrary integers greater than or equal to 1.
[0098] The data transmission relationship can be understood as: at least indicating a relationship between one or more target industrial control computers and one or more target I / O channels that allows data transmission, that is, at least determining the range of target industrial control computers and target I / O channels that allow data transmission.
[0099] In one example, the data transmission relationship can further determine which target I / O channel the data transmitted from the target industrial control computer should be synchronized to, and which target industrial control computer the data transmitted from the target I / O channel should be synchronized to. That is, the mapping relationship between the target industrial control computer and the target I / O channel is defined in detail. Furthermore, the mapping relationship between the ports in the target industrial control computer and the ports in the target I / O channel can also be defined in detail. Then, the I / O control module 2 can transmit the transmitted data based on this mapping relationship. Thus, with the mapping relationship described, the target industrial control computer and the target I / O channel that are allowed to transmit can be represented.
[0100] In another example, the data transmission relationship is mainly used to define the scope of the target industrial control computer and the target I / O channel that are allowed to transmit test task-related data. As for which target I / O channel, device under test (DUT 4), or port (target I / O channel or DUT 4 port) the data from the target I / O channel should be transmitted to each time, and which target industrial control computer or port within the target industrial control computer should be transmitted to the data from the target I / O channel, these can be determined by other means. For example, a corresponding identifier can be carried during transmission. The I / O control module 2 can determine whether the data transmission relationship is satisfied based on the carried identifier; if so, transmission will proceed.
[0101] Furthermore, if there are multiple I / O control modules 2, and different I / O control modules 2 are connected to different target I / O channels, then in one example, the data transmission relationship acquired and used by the I / O control module 2 can be a partial data transmission relationship, that is, a secondary data transmission relationship corresponding to the target I / O channel to which the I / O control module 2 is connected. Furthermore, the secondary data transmission relationship can be understood as: at least used to determine the range of the target industrial control computer and the target I / O channel to which the I / O control module 2 is connected, allowing data transmission. In a further example, a mapped port can be determined in the target industrial control computer and the target I / O channel to which the I / O control module 2 is connected.
[0102] The data transmission relationships received by different I / O control modules 2 can be partial data transmission relationships, i.e., secondary data transmission relationships, and these secondary data transmission relationships can be different. Of course, all data transmission relationships can also be sent to all I / O control modules 2 connected to the target I / O channel. That is, the data transmission relationships received by different I / O control modules 2 can also be the same.
[0103] The ports mentioned can refer to hardware ports, software ports, port addresses, etc. (e.g., a certain output port or input port of a certain model running in the target industrial control computer).
[0104] I / O control module 2 can obtain some or all of the data transmission relationships from the cluster control module, or other information used to determine the data transmission relationships. This process can be, for example, obtained via Ethernet.
[0105] Furthermore, at the same time, the target I / O channels connected to a single I / O control module 2 may all be used for the same test task, or they may be used partly for one test task and partly for other test tasks. The I / O control module 2 can obtain the required data transmission relationships separately or together.
[0106] The information sent from the target industrial control computer to the device under test (DUT) 4 includes, but is not limited to: test instructions to be run in the DUT 4, test signals generated by the simulation model running the test on the target industrial control computer or by the simulation board connected to the target industrial control computer (the test signals are related to the DUT 4 and the test scenario, such as signals of the current environment of the vehicle, in-vehicle environment signals, simulated traffic flow, pedestrian flow image signals, etc.); the information reported by the DUT 4 to the target industrial control computer includes, but is not limited to: feedback signals generated by the DUT 4 based on the information sent from the target industrial control computer, and the DUT 4's own operating status information during the test process (such as clock signals, power supply voltage, temperature signals, load rate, etc.).
[0107] Specifically, during the execution of a certain test task, K target industrial computers in industrial computer pool 1 and L target I / O channels in I / O pool 3 are used to test the device under test (DUT) 4. The L target I / O channels are connected to the DUT 4. For example, the data transmission relationship limits the flow of target data between the target industrial computers and the target I / O channels. That is, after the reporting information from the DUT 4 or the target I / O channels that needs to be sent to the target industrial computers is transmitted to the target I / O channels, each target I / O channel will send the reporting information to the I / O control module 2. This data transmission relationship determines that the I / O control module 2 will send the reporting information from each target I / O channel to the target industrial computer (or its port). And after the sending information generated by the target industrial computers that needs to be sent to the DUT 4 or the target I / O channels is transmitted to the I / O control module 2, this data transmission relationship determines that the I / O control module 2 will send the sending information from each target industrial computer to the DUT 4 or the target I / O channels. The DUT 4 can receive different information through different pins.
[0108] When testing component 4, each target industrial control computer can perform a complete test on component 4 individually, or K target industrial control computers can cooperate to test component 4. Each test part can be implemented by one or more target industrial control computers. For example, each target industrial control computer runs a different simulation model. Each target industrial control computer can receive the reported information from component 4 or the target I / O channel; and / or, test signals generated by other target industrial control computers running the corresponding simulation model, and generate test signals to be sent to other target industrial control computers and / or information to be sent to component 4 or the target I / O channel.
[0109] In one example, the computers containing the target industrial control computers and the computers containing the I / O control module 2 can be connected via Ethernet communication. Both the target industrial control computers and the I / O control module 2 are equipped with software-implemented network protocols. The computer sending data encapsulates the data into the network protocol through software and transmits it to other computers. The software of the receiving computer receives the network packets, extracts the data from the network packets, and then uses it. Thus, the I / O control module 2 can exchange and share target data between K target industrial control computers and L target I / O channels based on Ethernet, which has the advantages of low cost and ease of implementation.
[0110] In this embodiment, the data transmission relationship between the K target industrial control computers in the industrial control computer pool 1 and the L target I / O channels in the I / O pool 3, which execute the current test task, can be determined by the cluster control module in the test system. The number of cluster control modules can be one or more; each test task can test one or more devices under test of the same type, and the device under test tested by the test task is... Figure 1 The test piece 4 in the test piece can be one or more.
[0111] Specifically, for the current test task to be executed, the cluster control module can first allocate K target industrial control computers from industrial control computer pool 1 to execute the test task, and allocate L target I / O channels from I / O pool 3 to execute the first test task. This results in the K target industrial control computers and L target I / O channels used to execute the first test task. Then, the data transmission relationship between the K target industrial control computers and the L target I / O channels is established. If there are insufficient resources in the target industrial control computers in industrial control computer pool 1 and / or the target I / O channels in I / O pool 3, horizontal scaling can be performed accordingly.
[0112] After determining the data transmission relationship between K target industrial control computers and L target I / O channels, the cluster control module sends this data transmission relationship to each of the K target industrial control computers. When each target industrial control computer needs to send information to the first device under test (DUT), it designates a target I / O channel for receiving the information based on this data transmission relationship. Then, the I / O control module 2 sends the information to the DUT through the designated target I / O channel. Furthermore, when the DUT needs to send reporting information to the target industrial control computers, the I / O control module 2 receives the reporting information through the L target I / O channels. The target I / O channels can mark the target I / O channels that send the reporting information, thus allowing each target industrial control computer to receive the reporting information from the designated target I / O channel based on the aforementioned data transmission relationship.
[0113] or,
[0114] After determining the data transmission relationship between K target industrial control computers and L target I / O channels, the cluster control module feeds this relationship back to the I / O control module 2. When each target industrial control computer needs to send a message to the device under test (DUT), it directly sends the message to the I / O control module 2. The I / O control module 2 then, based on this data transmission relationship, sends the message to the first DUT through the designated target I / O channel. Similarly, when the DUT needs to send a report to the target industrial control computer, the I / O control module 2 receives the report through the L target I / O channels. Based on the aforementioned data transmission relationship, the I / O control module 2 sends the report from each target I / O channel to the designated target industrial control computer.
[0115] In addition, the L target I / O channels are configured to communicate with the device under test (DUT). For example, after dividing the L target I / O channels, the L target I / O channels are directly connected to each DUT, or a switching matrix 5 is connected between the target I / O channels and the DUT. The cluster control module configures the first port of the switching matrix 5 connected to the L target I / O channels and the second port connected to the DUT to form a connection channel, thus establishing a communication connection between the L target I / O channels and the DUT. In this way, the switching matrix 5 can transmit target data between the L target I / O channels and the DUT through the configured connection channel.
[0116] The cluster control module is also used to send the task information of the test task to K target industrial control computers, so that the target industrial control computers can generate the transmission information to be sent to the first device under test based on the task information of the first test task. The task information of the first test task includes the simulation model, test parameters, and test cases required for the test.
[0117] It should be noted that, in Figure 1Multiple industrial control computers 11 have been pooled, so the CPUs in each industrial control computer 11 can access all I / O channels. If multiple target CPUs are selected, these target CPUs can belong to the same industrial control computer 11 or to different industrial control computers 11, and can all interact with the selected target I / O channels. If multiple industrial control computers 11 are not pooled, when selecting target CPUs and I / O channels, it must be ensured that there is a physical connection between the target CPUs and I / O channels that are interacting with data.
[0118] In this embodiment, the cluster control module can be configured in the test system in the following two ways, as follows:
[0119] Method 1: Please refer to Figure 1 The test system also includes a cluster control module 6; the cluster control module 6 is communicatively connected to each industrial control computer 11. The cluster control module 6 can be a computer including a cluster controller, which is communicatively connected to each industrial control computer 11 via wired or wireless means.
[0120] In addition, the cluster control module 6 can communicate with the host computer 7 via wired or wireless means. The host computer 7 can generate test tasks based on the user's configuration and distribute the task information of the generated test tasks to the corresponding K industrial control computers 11.
[0121] In one example, the cluster control module 6, the industrial computer 11, and the I / O control module 2 are connected via Ethernet communication. That is, the computer where the cluster control module 6 is located, the computers where the industrial computers 11 and the I / O control module 2 are located are connected via Ethernet to communicate with each other, which can meet the communication needs of the three parties. For example, the cluster control module 6 can send the above data transmission relationship to the industrial computer 11 and / or the I / O control module 2 via Ethernet.
[0122] Method 2: Please refer to Figure 2 Any one of the industrial control computers 11 included in the test system is configured as a cluster control module. The industrial control computer 11 configured as a cluster control module can be connected to a host computer 7. The host computer 7 can generate test tasks based on user configuration and send the generated test tasks to the industrial control computer 11 configured as a cluster control module. The industrial control computer 11 then distributes the task information of the first test task to the corresponding K industrial control computers 11. The configuration as a cluster control module can be used solely to implement the functions of a cluster controller, but is not limited to this; it can also simultaneously function as a cluster controller and perform testing on the device under test.
[0123] It should be noted that, in Figures 1 to 4 Only one host computer 7 is shown schematically, but there can be multiple host computers 7.
[0124] It should also be noted that this embodiment only illustrates how to allocate I / O channels for a single test task. Further I / O channels allocated to execute this test task will be configured as unavailable. If, after an I / O channel is allocated for a test task, the cluster control module receives functional channel configuration information for another test task, it will still allocate an I / O channel from the currently available I / O channels for that test task and repeat the aforementioned process until the I / O channels in the cluster control module are insufficient to execute the currently received test task, thus achieving full utilization of I / O channel resources in the test system. Furthermore, after a test task is completed or after receiving an instruction from the tester indicating the end of test task execution, the cluster control module will reconfigure the I / O channel used to execute that test task into an available state.
[0125] In this embodiment, when a test task can be executed on an available I / O channel in the test system, the cluster control module can select a target I / O channel from the available I / O channels in the test system based on the functional channel configuration information of the test task. The module then configures the target I / O channel in the target I / O device to execute the test task, enabling the target I / O device to send and receive data related to the test task through the target I / O channel during the test. For a cluster formed by connecting multiple test benches, all testers can request I / O channels through the cluster control module. The cluster control module automatically allocates I / O channels for each test task, achieving reasonable allocation and full utilization of I / O channels in the test system without requiring the relocation of the test benches, making it more suitable for clustered testing scenarios.
[0126] The second embodiment of the present invention relates to a channel allocation method. The main difference between this embodiment and the first embodiment is that testers can reserve I / O channel resources of the test system according to time periods.
[0127] The specific process of the channel allocation method in this embodiment is as follows: Figure 6 As shown.
[0128] Step 201: After receiving the functional channel configuration information related to the test task, determine whether the available I / O channels in the test system can execute the test task within the set multiple time periods based on the functional channel configuration information.
[0129] Step 202: Show the test system the available time periods for executing test tasks.
[0130] Specifically, the cluster control module pre-divides each day into multiple time slots and sets a future number of days where testers can reserve I / O channels in the testing system according to these time slots. For example, please refer to... Figure 7 When testers access the cluster control module, they enter... Figure 7 The reservation interface is divided into 8 time slots per day, each lasting 3 hours, and displays all time slots for the next seven days. At this time, the tester enters the functional channel configuration information for the test task, and all time slots are unselectable.
[0131] When the tester triggers Figure 7 When the "Initiate Reservation" button is pressed, a pop-up appears. Figure 8 The interface for selecting and reserving configurations displays all the functional channel types supported by all I / O channels in the test system. Figure 8 The system displays 15 functional channel types. Testers can configure the required number of each functional channel type. After a tester selects a functional channel type, configures the number, and triggers the search button, the system can read the functional channel configuration information configured by the tester.
[0132] Subsequently, for each time period of each day in the next seven days, the available I / O channels within that time period are read. Then, based on the functional channel types supported by the I / O devices to which each available I / O channel belongs within that time period, all currently available I / O channels are virtualized to obtain the current functional channel resource pool. It is then determined whether the functional channel resource pool within that time period can execute test tasks. Repeating this process can determine whether each time period of each day in the next seven days can execute test tasks. The process of determining whether the functional channel resource pool within each time period can execute test tasks is similar to the specific method in the first embodiment for determining whether the available I / O channels in the test system can execute test tasks based on functional channel configuration information, and will not be described in detail here.
[0133] The system then demonstrates the available time periods for executing test tasks.
[0134] For example, please refer to Figure 9 This is the interface for selecting time periods. Time periods for executable test tasks are configured to be selectable (white area), while time periods for non-executable test tasks are configured to be unselectable (gray area). Testers can then select one or more time periods from the executable test task time periods (white area), and the selected time period becomes the target time period. Figure 9The selected target time periods include: 00:00-03:00, 03:00-06:00, 06:00-09:00, and 09:00-12:00. Testers can click "Cancel" to cancel the selected target time periods, and then click "Submit." The cluster control module will display the selected function channel type and number, along with the selected target time periods, in a pop-up window for further confirmation by the testers.
[0135] Step 203: After receiving at least one target time period selected from the time periods available for the test system to perform test tasks, select the target I / O channel within each time period from the I / O channels available in the test system for each target time period.
[0136] Specifically, after receiving at least one target time period selected by the tester from the available time periods for executing test tasks, for each target time period, a target I / O channel for executing the test task is selected from the available I / O channels in the test system within that target time period. This yields the target I / O channels for executing test tasks within each target time period. When selecting target I / O channels within adjacent target time periods, the same target I / O channels are preferentially selected. The process of selecting the target I / O channel for executing test tasks from the available I / O channels in the test system within each target time period is similar to that in the first embodiment, and will not be repeated here.
[0137] In one example, after receiving at least one target time period selected from the time periods available for test task execution in the test system, and before selecting the target I / O channel within each time period from the available I / O channels in the test system for each target time period, the system determines whether the available I / O channels in the test system within each target time period are capable of executing the test task based on the functional channel configuration information. If it is determined that the available I / O channels in the test system within each target time period are capable of executing the test task, then the target I / O channel within each time period is selected from the available I / O channels in the test system within each target time period. That is, when the tester selects the target time period to be reserved, the system again determines whether the available I / O channels in the test system within each target time period are capable of executing the test task based on the functional channel configuration information. This allows the system to determine whether other testers have reserved the relevant I / O channels before the tester selects the target time period, avoiding a situation where there are not enough available I / O channels to execute the test task within one or more target time periods. If the available I / O channels in the test system can execute test tasks within each target time period, then select the target I / O channel within each time period from the available I / O channels in the test system within each target time period; if one or more available I / O channels in the test system cannot execute test tasks within a target time period, a prompt message can be issued to indicate the unexecuted target time period, so that the tester can determine whether to reselect the target time period.
[0138] Step 204: Configure the target I / O channel in the target I / O device to perform test tasks, so that the target I / O device can send and receive data related to the test tasks through the target I / O channel during the test. The target I / O device is an I / O device that includes the target I / O channel.
[0139] Specifically, for each target time period, for each target I / O device containing a target I / O channel within that target time period, a target I / O channel is configured in that target I / O device to execute test tasks, and a valid time period for executing the test tasks is set for the target I / O channel; this valid time period is the target time period. Thus, each target I / O device is configured with a target I / O channel for executing test tasks, and a valid time period for the target I / O channel to execute test tasks is set. Therefore, each target I / O device can send and receive data related to the test tasks through the target I / O channel within each valid time period of the test process.
[0140] In this embodiment, an I / O channel resource reservation function is introduced, which allows testers to reserve I / O channel resources in advance according to time periods, which is conducive to the further rational planning and utilization of I / O channel resources; in addition, it can also know the usage of I / O channel resources in the future for a certain period of time.
[0141] The third embodiment of the present invention relates to a channel configuration device, which can be used to execute the channel allocation method in the first or second embodiment to allocate I / O channel resources in a test system. In one example, the channel configuration device can be a cluster control module in a HIL test system, as described in the first embodiment, and will not be repeated here.
[0142] Since the third embodiment corresponds to the first and second embodiments, it can be implemented in conjunction with the first and second embodiments. The relevant technical details mentioned in the first and second embodiments remain valid in the third embodiment, and the technical effects achievable in the first and second embodiments can also be realized in the third embodiment. To reduce repetition, these details will not be repeated here. Correspondingly, the relevant technical details mentioned in the first and second embodiments can also be applied to the third embodiment.
[0143] The fourth embodiment of the present invention relates to a non-transitory computer-readable storage medium storing processor-executable instructions configured to execute a channel allocation method as described in the first or second embodiment.
[0144] Since the fourth embodiment corresponds to the first to third embodiments, it can be implemented in conjunction with the first to third embodiments. The relevant technical details mentioned in the first to third embodiments remain valid in the fourth embodiment, and the technical effects achievable in the first to third embodiments can also be realized in the fifth embodiment. To reduce repetition, these details will not be repeated here. Correspondingly, the relevant technical details mentioned in the first to third embodiments can also be applied to the fourth embodiment.
[0145] The preferred embodiments of the present invention have been described in detail above, but it should be understood that, if necessary, aspects of the embodiments can be modified to utilize aspects, features, and concepts from various patents, applications, and publications to provide other embodiments.
[0146] In light of the detailed description above, these and other changes can be made to the embodiments. Generally, the terminology used in the claims should not be considered limited to the specific embodiments disclosed in the specification and claims, but should be understood to include all possible embodiments together with the full scope of equivalents enjoyed by these claims.
Claims
1. A channel allocation method, characterized in that: For allocating a plurality of I / O channels of at least one I / O device included in a test system; the method comprising: After receiving the function channel configuration information related to the test task, based on the function channel configuration information, for the test system including available I / O channels and unavailable I / O channels within the target time period, a target I / O channel for executing the test task is selected from the available I / O channels, wherein the unavailable I / O channel is an I / O channel that cannot be used to execute the test task because it has been assigned other test tasks other than the test task within the target time period; The target I / O channel in the target I / O device is configured to execute the test task so that in the target time period: the target I / O device sends and receives data related to the test task through the target I / O channel during the test process, and the target I / O device is the I / O device including the target I / O channel.
2. The channel allocation method according to claim 1, characterized in that: The selecting, based on the functional channel configuration information, a target I / O channel for executing the test task from available I / O channels in the test system comprises: Based on the functional channel configuration information, determining whether the available I / O channels in the test system can execute the test task; After determining that the available I / O channels in the test system can execute the test task, selecting a target I / O channel for executing the test task from the available I / O channels in the test system; Among them, each of the I / O channels can be configured as one of the functional channel types supported by the I / O channel, and the functional channel configuration information includes: the type of test functional channels required to execute the test task and the required number of each type of test functional channels.
3. The channel allocation method according to claim 2, characterized in that: The determining, based on the functional channel configuration information, whether the available I / O channels in the test system can execute the test task comprises: Based on the functional channel types supported by each I / O channel currently available in the test system, a current functional channel resource pool is obtained, and it is determined whether each type of the test functional channels that meets the required number can be selected from the functional channel resource pool; If the test function channels of each type that meet the required number can be selected from the function channel resource pool, it is determined that the available I / O channels in the test system can execute the test task; If the test function channels of each type that meet the required quantity cannot be selected from the function channel resource pool, it is determined that the available I / O channels in the test system cannot execute the test task.
4. The channel allocation method according to claim 3, characterized in that: The determining whether the test function channels of various types meeting the required quantity can be respectively selected from the function channel resource pool comprises: If the number of target function channels of the same type as each of the test function channels in the function channel resource pool is greater than or equal to the required number of each of the test function channels, and each of the target function channels can be configured to the available I / O channels, it is determined that the available I / O channels in the test system can execute the test task; If the number of target function channels of the same type as each of the test function channels in the function channel resource pool is less than the required number of each of the test function channels, and / or any of the target function channels cannot be configured to the available I / O channels, it is determined that the available I / O channels in the test system cannot execute the test task.
5. The channel allocation method according to claim 2, characterized in that: The determining, based on the functional channel configuration information, whether the available I / O channels in the test system can execute the test task comprises: Determining whether the test task can be executed by the I / O channels available in the test system within a set plurality of time periods based on the functional channel configuration information; Before selecting a target I / O channel for executing the test task from the available I / O channels, the method includes: Displaying the time period during which the test system can be used to perform the test task for selection; The step of selecting a target I / O channel for executing the test task from the available I / O channels includes: After receiving at least one target time period selected from the time periods in which the test system can be used to execute the test task, the target I / O channels within each of the time periods are selected from the I / O channels available in the test system in each of the target time periods, so that: within the target time period, data related to the test task is sent and received through the target I / O channels.
6. The channel allocation method according to claim 5, characterized in that: The step of selecting the target I / O channel in each of the target time periods from the I / O channels available in the test system in each of the target time periods further includes: Determine whether the I / O channels available in the test system within each target time period can execute the test task based on the functional channel configuration information; If it is determined that the I / O channels available in the test system within each target time period can execute the test task, the step of selecting the target I / O channels within each time period from the I / O channels available in the test system within each target time period is entered.
7. The channel allocation method according to claim 1, characterized in that: Each of the I / O devices comprises: an I / O control module and at least one I / O channel; the target I / O channel in the configured target I / O device is used to execute the test task, comprising: The correspondence between the target I / O channel and the test task is configured in the I / O control module of the target I / O device so that the I / O control module of the target I / O device sends and receives data related to the test task through the target I / O channel during the test.
8. The channel allocation method according to claim 1, characterized in that: The test system also includes: a computing resource end configured with a CPU; the method also includes: based on the task requirement information of the test task, determining the target CPU in the computing resource end for executing the test task, so that when the target CPU and the target I / O channel are used to execute the test task to test the device under test, the device under test and the target CPU interact through the target I / O channel.
9. The channel allocation method according to claim 1, characterized in that: Before selecting a target I / O channel for executing the test task from the available I / O channels in the test system based on the functional channel configuration information, the method further includes: Determine whether all I / O channels in the test system can complete the test task based on the functional channel configuration information; If it is determined that all I / O channels in the test system can complete the test task, the step of selecting a target I / O channel for executing the test task from the available I / O channels in the test system based on the functional channel configuration information is entered.
10. A channel configuration device, characterized in that: Used to execute the channel allocation method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Automatic hardware-in-loop simulation environment model generating system and method
CN104731080A
Control system for HIL test and method therof
KR102217002B1