Communication method and device for automatic testing

By introducing the communication process of the upper computer, communication board and resource board in the automatic testing system, analyzing and operating test data packets, the problem of low software and hardware communication efficiency and stability in the existing technology is solved, and efficient software and hardware communication is achieved.

CN119835186APending Publication Date: 2025-04-15BEIJING HUAFENG TEST & CONTROL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411894227.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

The efficiency and stability of software and hardware communication in existing automatic test systems are low. The conventional register read and write communication methods lead to an increase in the number of interactions, reducing communication efficiency and stability.

Method used

The upper computer sends the test data packet to the communication board of the test machine. The communication board forwards the data packet to multiple resource boards. The resource board analyzes the data packet, obtains the register operation mode and test parameters, and operates the target register according to the preset mapping relationship.

Benefits of technology

It improves the efficiency and stability of software and hardware communication, reduces the overall communication frequency, increases the amount of data transmitted in a single communication, and realizes the effect of simultaneously controlling different resource boards to achieve the same function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835186A_ABST
    Figure CN119835186A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a communication method and device for automatic testing. Comprising the following steps: an upper computer sends a test data packet to a communication board card in test machine hardware; the communication board card forwards the test data packet to a plurality of resource board cards in the test machine hardware; for each resource board card, analyzing the test data packet to obtain a register operation mode and a test parameter; and the resource board card determines a target register corresponding to each test parameter according to a preset mapping relationship, and operates each target register according to the register operation mode. Compared with an existing register read-write mode, the method has the advantages that different resource board cards can be controlled to achieve the same function at the same time, compared with the existing register read-write mode, the register address does not need to be sent to each resource board card, the data size transmitted by software and hardware single-time communication can be effectively increased, the overall communication frequency is reduced, and therefore the software and hardware communication efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of automatic testing, and in particular to a communication method and device for automatic testing. Background Art

[0002] As the market application requirements for the capabilities of Automatic Test Equipment (ATE) continue to increase, the requirements for the efficiency and stability of software and hardware communication in ATE are also getting higher and higher. The conventional register reading and writing communication method will lead to an increasing number of software and hardware interactions, thereby reducing communication efficiency and stability. Summary of the invention

[0003] The embodiment of the present invention provides a communication method and device for automatic testing, which can improve the efficiency and stability of software and hardware communication in automatic testing.

[0004] In a first aspect, an embodiment of the present invention provides a communication method for automatic testing, comprising:

[0005] The host computer sends the test data packet to the communication board in the test machine hardware;

[0006] The communication board forwards the test data packet to a plurality of resource boards in the test machine hardware;

[0007] For each resource board, the test data packet is parsed to obtain a register operation mode and a test parameter; wherein the register operation mode includes a register read operation and a register write operation; and the number of the test parameters is one or more;

[0008] The resource board determines the target registers corresponding to each of the test parameters according to a preset mapping relationship, and operates each of the target registers according to the register operation mode; wherein the preset mapping relationship is stored in the resource board and is a mapping relationship between test parameters and registers.

[0009] In a second aspect, an embodiment of the present invention further provides a communication method for automatic testing, the method being executed by any resource board in the testing machine hardware, comprising:

[0010] Receive test data packets;

[0011] Parsing the test data packet to obtain a register operation mode and test parameters; wherein the register operation mode includes a register read operation and a register write operation; and the number of the test parameters is one or more;

[0012] The target registers corresponding to the test parameters are determined according to the preset mapping relationship, and the target registers are operated according to the register operation mode; wherein the preset mapping relationship is stored in the resource board and is the mapping relationship between the test parameters and the registers.

[0013] In a third aspect, an embodiment of the present invention further provides a communication device for automatic testing, comprising:

[0014] A test data packet sending module is provided in the host computer and is used to send the test data packet to the communication board in the test machine hardware;

[0015] A test data packet forwarding module, arranged in the communication board, for forwarding the test data packet to a plurality of resource boards in the test machine hardware;

[0016] A test data packet parsing module is provided in the resource board and is used to parse the test data packet to obtain a register operation mode and test parameters; wherein the register operation mode includes a register read operation and a register write operation; and the number of the test parameters is one or more;

[0017] A register operation module is arranged in the resource board, and is used to determine the target registers corresponding to each of the test parameters according to a preset mapping relationship, and operate each of the target registers according to the register operation mode; wherein the preset mapping relationship is stored in the resource board, and is a mapping relationship between the test parameters and the registers.

[0018] In a fourth aspect, an embodiment of the present invention further provides a communication device for automatic testing, wherein the device is arranged in any resource board in the hardware of the test machine, and comprises:

[0019] A test data packet receiving module, used for receiving a test data packet;

[0020] A test data packet parsing module, used to parse the test data packet to obtain a register operation mode and test parameters; wherein the register operation mode includes a register read operation and a register write operation; the number of the test parameters is one or more;

[0021] A register operation module is used to determine the target registers corresponding to each of the test parameters according to a preset mapping relationship, and operate each of the target registers according to the register operation mode; wherein the preset mapping relationship is stored in the resource board and is the mapping relationship between the test parameters and the registers.

[0022] In a fifth aspect, an embodiment of the present invention further provides an automatic test communication system, comprising: a host computer and test machine hardware; wherein the test machine hardware comprises a communication board and a plurality of resource boards;

[0023] The host computer is used to send the test data packet to the communication board;

[0024] The communication board is used for forwarding the test data packet to the multiple resource boards;

[0025] The resource board is used to parse the test data packet to obtain the register operation mode and test parameters; determine the target register corresponding to each test parameter according to the preset mapping relationship, and operate each target register according to the register operation mode; wherein the register operation mode includes register read operation and register write operation; the preset mapping relationship is stored in the resource board, which is the mapping relationship between the test parameters and the registers; the number of the test parameters is one or more;.

[0026] In a sixth aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0027] at least one processor; and

[0028] a memory communicatively connected to the at least one processor; wherein,

[0029] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the communication method for automatic testing described in the embodiment of the present invention.

[0030] In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the automatic test communication method described in the embodiment of the present invention when executed.

[0031] The embodiment of the present invention discloses a communication method and device for automatic testing. The host computer sends a test data packet to a communication board in the test machine hardware; the communication board forwards the test data packet to multiple resource boards in the test machine hardware; for each resource board, the test data packet is parsed to obtain a register operation mode and a test parameter; wherein the register operation mode includes a register read operation and a register write operation; the number of the test parameters is one or more; the resource board determines the target registers corresponding to each test parameter according to a preset mapping relationship, and operates each target register according to the register operation mode; wherein the mapping relationship is stored in the resource board, which is a mapping relationship between the test parameter and the register. In the communication method for automatic testing provided by the embodiment of the present invention, the host computer sends the test data packet to multiple resource boards through the communication board, so that each resource board operates each target register according to the test data packet, and the effect of simultaneously controlling different resource boards to realize the same function can be achieved. Compared with the existing register read and write mode, there is no need to send register addresses to each resource board separately, which can effectively increase the amount of data transmitted by a single communication between software and hardware, reduce the frequency of overall communication, and thus effectively improve the efficiency of software and hardware communication. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a structural diagram of an automatic test communication system in Embodiment 1 of the present invention;

[0033] Figure 2 This is an example diagram of a test data packet in Embodiment 1 of the present invention;

[0034] Figure 3 is an example diagram of a mapping relationship between a test parameter and a register in the first embodiment of the present invention;

[0035] Figure 4 is a flow chart of an automatic testing communication method in Embodiment 2 of the present invention;

[0036] Figure 5 is a signaling diagram of a communication method for automatic testing in Embodiment 2 of the present invention;

[0037] Figure 6 is a flow chart of an automatic testing communication method in Embodiment 3 of the present invention;

[0038] Figure 7 It is a structural schematic diagram of an automatic testing communication device in Embodiment 4 of the present invention;

[0039] Figure 8 This is a schematic diagram of the structure of an automatic test communication device in Embodiment 5 of the present invention.

[0040] Fig. 9It is a structural schematic diagram of an electronic device in Embodiment 6 of the present invention. DETAILED DESCRIPTION

[0041] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0042] Embodiment 1

[0043] Figure 1 A schematic diagram of the structure of an automatic test communication system provided in Embodiment 1 of the present invention, such as Figure 1 As shown, the system includes: a host computer 110 and a test machine hardware 120, such as Figure 1 As shown, the test machine hardware includes a communication board 121 and a plurality of resource boards 122 .

[0044] Among them, the host computer 110 is used to send the test data packet to the communication board 121; the communication board 121 is used to forward the test data packet to multiple resource boards 122; each resource board 122 is used to parse the test data packet to obtain the register operation mode and test parameters; determine the target register corresponding to the test parameter according to the preset mapping relationship, and operate each target register according to the register operation mode.

[0045] Among them, the register operation mode includes register read operation and register write operation; the mapping relationship is stored in the resource board, which is the mapping relationship between the test parameters and the registers; the number of test parameters is one or more;.

[0046] The test data packet may reflect two parts: register operation mode and test parameters. The register operation mode includes register read operation and register write operation. For example, Figure 2 is an example diagram of a test data packet in this embodiment, such as Figure 2As shown, four test data packets are included, namely, a write voltage data packet, a read voltage data packet, a write current data packet and a read current data packet; for the write voltage data packet, the following test parameters are included: voltage parameter, voltage clamp parameter, voltage gear parameter; for the read voltage data packet, the following test parameters are included: voltage parameter, voltage clamp parameter, voltage gear parameter; for the write current data packet, the following test parameters are included: current parameter, current clamp parameter, current gear parameter; for the read current data packet, the following test parameters are included: current parameter, current clamp parameter, current gear parameter. In this embodiment, different identifiers can be set for test data packets with different functions, for example: the identifier of the write voltage data packet is 0, the identifier of the read voltage data packet is 1, the identifier of the write current data packet is 2, and the identifier of the read current data packet is 3. Optionally, the test data packet can be a data packet with a fixed structure. If the test data packet is a data packet corresponding to a read request, it includes a data packet identifier; if the test data packet is a data packet corresponding to a write request, it includes a data packet identifier and multiple test parameters, the test parameters include test parameter values, and the multiple test parameters are arranged in a preset order.

[0047] In this embodiment, when the host computer 110 detects a test request triggered by a user, it obtains a pre-configured test data packet corresponding to the test request from the memory; or generates a test data packet according to the test request according to a preset assembly rule. Then, the test data packet is sent to the communication board 121 in the test machine hardware 120. For example, assuming that the user triggers a test request for reading voltage data, the host computer 110 obtains a pre-generated test data packet with a data packet identifier of 1, that is, a read voltage data packet.

[0048] In this embodiment, the resource board 122 stores preset parsing rules and preset mapping relationships. The preset parsing rules can be embodied in the form of program code or table, which includes the correspondence between the data packet identifier and the multiple test parameter names, and can also include the preset arrangement order between the multiple test parameter names. The preset mapping relationship can be embodied in the form of a mapping table, including the mapping relationship between the test parameters and the registers. The preset mapping relationships between resource boards can be the same or different, that is, in different resource boards, the register addresses corresponding to the same test parameter can be the same or different. For example, in resource board A, the voltage parameter corresponds to register 1, and in resource board B, the voltage parameter corresponds to register 11. For example, Figure 3 is an example diagram of a mapping relationship between a test parameter and a register in this embodiment, such as Figure 3As shown, in a certain resource board, the voltage parameter corresponds to register 1, the voltage clamp parameter corresponds to register 2, the voltage range parameter corresponds to register 3, the current parameter corresponds to register 4, the current clamp parameter corresponds to register 5, and the current range parameter corresponds to register 6; that is, the resource board realizes the reading or writing of the voltage parameter by operating register 1; the resource board realizes the reading or writing of the voltage clamp parameter by operating register 2; the resource board realizes the reading or writing of the voltage range parameter by operating register 3; the resource board realizes the reading or writing of the current parameter by operating register 4; the resource board realizes the reading or writing of the current clamp parameter by operating register 5; the resource board realizes the reading or writing of the current range parameter by operating register 6.

[0049] In this embodiment, after the resource board 122 receives the test data packet sent by the communication board 121, the data packet identifier in the received test data packet is compared with the data packet identifier in the stored preset parsing rule. If the data packet identifier in the received test data packet matches the data packet identifier in the stored preset parsing rule, it indicates that the resource board can process the received test data packet, and then parses the received test data packet to obtain the register operation mode and multiple test parameters, which include the test parameter name; then determines the target register corresponding to each test parameter according to the stored preset mapping relationship, and finally operates each target register according to the register operation mode, that is, reads the test parameter value from the target register or writes the test parameter value into the target register. Among them, the detailed communication process between the host computer and the test machine hardware is shown in the following embodiment.

[0050] The automatic test communication system provided in this embodiment includes: a host computer and a test machine hardware; wherein the test machine hardware includes a communication board and multiple resource boards; the host computer is used to send a test data packet to the communication board; the communication board is used to forward the test data packet to multiple resource boards; the resource board is used to parse the test data packet to obtain the register operation mode and test parameters; the target registers corresponding to each test parameter are determined according to the preset mapping relationship, and each target register is operated according to the register operation mode. The host computer sends the test data packet to multiple resource boards through the communication board, so that each resource board operates each target register according to the test data packet, which can achieve the effect of simultaneously controlling different resource boards to realize the same function. Compared with the existing register reading and writing method, there is no need to send the register address to each resource board separately, which can effectively increase the amount of data transmitted by a single communication between software and hardware, reduce the frequency of overall communication, and thus effectively improve the efficiency of software and hardware communication. That is, the present application is not configured in the traditional register manner, but can be configured in the form of functionally classified test parameters based on DMA technology or other network communication technologies, so that it can be encapsulated into fixed data packets. It does not need to be configured registers one by one, but is performed in batch configuration, thereby improving the efficiency of software and hardware communication.

[0051] Embodiment 2

[0052] Figure 4 A flow chart of an automatic test communication method provided in Embodiment 2 of the present invention is provided. Based on the above embodiment, Figure 4 As shown, the method specifically comprises the following steps:

[0053] S410, the host computer sends the test data packet to the communication board in the test machine hardware.

[0054] Among them, the test data packet can be a data packet with a fixed structure. If the test data packet is a data packet corresponding to a read request, it includes a data packet identifier; if the test data packet is a data packet corresponding to a write request, it includes a data packet identifier and multiple test parameters, the test parameters include test parameter values, and the multiple test parameters are arranged in a preset order. Register operation modes include register read operations and register write operations. Test data packets with different functions can be set with different identifiers. Exemplarily, the test data packet can be any one of a write voltage data packet, a read voltage data packet, a write current data packet and a read current data packet, and these test data packets correspond to different data packet identifiers respectively.

[0055] Optionally, the process of the host computer sending a test data packet to the communication board in the test machine hardware can be: in response to a test request triggered by a user, the host computer obtains a test data packet corresponding to the test request; and sends the test data packet to the communication board in the test machine hardware.

[0056] Among them, the test request includes a read request or a write request, and the test data packet is pre-set based on different test requests. If the test request is a read request, the test data packet includes a data packet identifier; if the test request is a write request, the test data packet includes a data packet identifier and a preset number of test parameters; the test parameters include test parameter values. The test request can be triggered by the user through the interactive interface in the host computer or triggered by a physical button, for example, it can be: a write voltage test request, a read voltage test request, a write current test request, or a read current test request. When the host computer detects a test request triggered by the user, it can obtain the pre-configured test data packet corresponding to the test request from the memory, and then send the test data packet to the communication board in the test machine hardware. Exemplarily, assuming that the user triggers a read voltage test request, the test data packet corresponding to the read voltage test request is obtained from the memory, and the test data packet is sent to the communication board in the test machine hardware.

[0057] Optionally, the upper computer sends a test data packet to a communication board in the test machine hardware by: responding to a test request triggered by a user, determining a data packet identifier based on the test request; if the test request is a write request, obtaining a preset number of test parameters corresponding to the test request, and assembling the data packet identifier and the preset number of test parameters into a test data packet; if the test request is a read request, assembling the data packet identifier into a test data packet; and sending the test data packet to the communication board in the test machine hardware.

[0058] Among them, the test request includes a read request or a write request, and the test parameter includes a test parameter value. Specifically, if the user triggers a write request, the data packet identifier corresponding to the test request is determined and the preset number of test parameter values ​​corresponding to the test request are obtained, and then the data packet identifier and the preset number of test parameters are assembled in a preset order to obtain a test data packet. If the user triggers a read request, the determined data packet identifier is directly assembled into a test data packet. Exemplarily, assuming that the test request is a write current test request, the determined data packet identifier is "2", and the obtained test parameters include current parameter value, current clamp parameter value, and current gear parameter value, and then they are assembled in the order of "2", current parameter value, current clamp parameter value, and current gear parameter value to obtain a write current data packet.

[0059] In this embodiment, after the test data packet is obtained, the test data packet is sent to the communication board in the test machine hardware using network communication technology or direct memory access (DMA) technology.

[0060] S420, the communication board forwards the test data packet to multiple resource boards in the test machine hardware.

[0061] In this embodiment, after receiving the test data packet, the communication board forwards the data packet to multiple resource boards in the test machine hardware.

[0062] S430, for each resource board, parse the test data packet to obtain a register operation mode and a test parameter.

[0063] Wherein, the register operation mode includes register read operation and register write operation; the number of test parameters is one or more. Register read operation can be understood as reading data from a register, and register write operation can be understood as writing data into a register. Test parameters include test parameter names and / or test parameters. If the register operation mode is register read operation, the test parameter obtained is the test parameter name, and if the register operation mode is register write operation, the test parameter obtained is the test parameter value and the test parameter name. The above-mentioned test parameter name is a test parameter name of a preset number and a preset order corresponding to the data packet identifier obtained by parsing the data packet identifier and the pre-stored data packet parsing rules. In this embodiment, the resource board stores the preset parsing rules. When the resource board receives the test data packet, the data packet identifier in the received test data packet is compared with the data packet identifier in the stored preset parsing rules. If the data packet identifier in the received test data packet matches the data packet identifier in the stored preset parsing rules, it indicates that the resource board can process the received test data packet, and then the received test data packet is parsed to obtain the register operation mode and multiple test parameters.

[0064] Optionally, the test data packet is parsed to obtain the register operation mode and test parameters by: extracting the data packet identifier in the test data packet; determining the register operation mode based on the data packet identifier, and obtaining a preset number of test parameter names based on the data packet identifier and preset parsing rules; if the register operation mode is a register write operation, then also extracting the test parameter value in the test data packet.

[0065] Among them, the preset parsing rules are stored in the resource board, including the correspondence between the data packet identifier and the preset number of test parameter names, and can also include the preset arrangement order between the test parameter names. In this embodiment, the data packet identifier and the register operation mode, as well as the correspondence between the preset number of test parameter names, will be pre-stored, for example: the test data packet identified as "0" corresponds to the voltage write operation, and corresponds to the three test parameter names of voltage parameter, voltage clamp parameter, and voltage gear parameter; the test data packet identified as "1" corresponds to the voltage read operation, and corresponds to the three test parameter names of voltage parameter, voltage clamp parameter, and voltage gear parameter; the test data packet identified as "2" corresponds to the current write operation, and corresponds to the three test parameter names of current parameter, current clamp parameter, and current gear parameter; the test data packet identified as "3" corresponds to the current read operation, and corresponds to the three test parameter names of current parameter, current clamp parameter, and current gear parameter.

[0066] Specifically, after the register operation mode determined based on the data packet identifier is a register write operation and a preset number of test parameter names are obtained based on the data packet identifier and the preset parsing rules, it is also necessary to extract the preset number of test parameter values ​​in the test data packet so that the resource board writes the corresponding test parameter values ​​to the target register based on the obtained test parameter names. If the register operation mode determined based on the data packet identifier is a register read operation and a preset number of test parameter names are obtained based on the data packet identifier and the preset parsing rules, the resource board directly reads the test parameter values ​​from the target register based on the obtained test parameter names.

[0067] S440, the resource board determines the target registers corresponding to the test parameters according to the preset mapping relationship, and operates the target registers according to the register operation mode.

[0068] The preset mapping relationship is a mapping relationship between a test parameter and a register. Specifically, the preset mapping relationship is a mapping relationship between a test parameter name and a register. The preset mapping relationship is pre-established and stored in a resource board. The mapping relationship can be embodied in the form of a mapping table. The preset mapping relationships between resource boards can be the same or different. In this embodiment, the test parameter and the register are in a one-to-one correspondence, that is, one register stores one test parameter.

[0069] Optionally, the resource board determines the target registers corresponding to each test parameter according to a preset mapping relationship, and the way in which the resource board operates each target register according to the register operation mode can be: the resource board determines the target registers corresponding to each test parameter name according to the preset mapping relationship; if the register operation mode is a register read operation, the resource board reads the test parameter value corresponding to the test parameter name from the target register; if the register operation mode is a register write operation, the resource board writes the test parameter value into the target register.

[0070] In this embodiment, for each resource card, a mapping relationship between a test parameter name and a register is stored. After the target register corresponding to each test parameter name is determined, the resource card performs a corresponding read operation or write operation on the target register. Figure 3 For example, assuming that the received data packet is a write voltage data packet, the register operation mode is a write operation, then the voltage parameter value is written to register 1, the voltage clamp parameter value is written to register 2, and the voltage gear parameter value is written to register 3.

[0071] Optionally, after operating each target register according to the register operation mode, the following steps are also included: the resource board generates a response data packet according to the operation result, and sends the response data packet to the communication board.

[0072] The operation result includes two situations: successful operation or failed operation. If the register operation mode corresponding to the test data packet is a register write operation, the response data packet includes information on "whether the write operation is successful"; if the register operation mode corresponding to the test data packet is a register read operation, the response data packet includes information on "whether the read operation is successful", and if the read operation is successful, it also includes the read "test parameter value".

[0073] Optionally, after the host computer sends the test data packet to the communication board in the test machine hardware, the following steps are also included: the host computer queries the response status from the communication board; if the queried response status is answered, the host computer reads the response data packet from the communication board, and stores the read response data packet in the host computer memory; if the queried response status is unanswered, the host computer continues to query the response status from the communication board until the queried response status is answered, or the query times out.

[0074] The response status includes "answered" and "unanswered". The response status is the status information that the communication board switches according to whether it receives the response data packet sent by the resource board. For example, it is assumed that "0" represents unanswered and "1" represents answered; if the communication board does not receive the response data packet sent by the resource board, the response status is "0", and if the communication board receives the response data packet sent by the resource board, the response status switches from "0" to "1".

[0075] In this embodiment, after the host computer sends the test data packet to the communication board in the test machine hardware, it will continue to query the response status from the communication board within a preset period of time. Specifically, if the response status queried by the host computer is answered, the query is stopped, the host computer reads the response data packet from the communication board, and stores the read response data packet in the host computer memory; if the queried response status is not answered, the host computer continues to query the response status from the communication board until the queried response status is answered, or the query times out. That is, in this embodiment, if the user triggers a write request, the host computer reads a data packet containing "write success or write failure" information; if the user triggers a read request, the host computer reads a response data packet containing "read success" information and the read "test parameter value" or a response data packet containing "read failure". In this embodiment, a response mechanism for the resource board is provided, the host computer sends a test data packet, and the resource board feeds back a response data packet, that is, one request corresponds to one response, which can improve the stability of communication between software and hardware. Compared with the traditional method of no response after request, if you want to confirm whether to reply, you need to send a request again, which leads to high interaction frequency, easy problems and poor stability. The embodiment of the present application reduces the situation of unsuccessful reading and writing, effectively reduces the frequency of interaction, and improves the stability of interaction.

[0076] Based on the above embodiments, Figure 5 is a signaling diagram of a communication method for automatic testing in this embodiment, such as Figure 5 As shown, the method comprises the following steps:

[0077] 1. The host computer sends a test data packet to the communication board;

[0078] 2. The host computer continuously queries the communication board for the response status;

[0079] 3. The communication board sends the test data packet to the resource board;

[0080] The above resource boards, Figure 5 Only one is shown in the figure, in other implementations, there may be multiple resource boards.

[0081] 4. The resource board parses the test data packet and performs the corresponding register read or write operation;

[0082] 5. The resource board generates a response data packet and sends the response data packet to the communication board;

[0083] 6. The communication board switches the response status from unanswered to answered;

[0084] 7. The response status queried by the host computer is "answered", and the query stops;

[0085] 8. The host computer reads the response data packet from the communication board.

[0086] The technical solution of this embodiment is that the host computer sends a test data packet to the communication board in the test machine hardware; the communication board forwards the test data packet to multiple resource boards in the test machine hardware; for each resource board, the test data packet is parsed to obtain the register operation mode and test parameters; wherein the register operation mode includes register read operation and register write operation; the number of test parameters is one or more; the resource board determines the target registers corresponding to each test parameter according to the preset mapping relationship, and operates each target register according to the register operation mode; wherein the preset mapping relationship is stored in the resource board, which is the mapping relationship between the test parameter and the register. The communication method for automatic testing provided by the embodiment of the present invention is that the host computer sends the test data packet to multiple resource boards through the communication board, so that each resource board operates each target register according to the test data packet, which can achieve the effect of simultaneously controlling different resource boards to realize the same function. Compared with the existing register reading and writing method, there is no need to send the register address to each resource board separately, which can effectively increase the amount of data transmitted by the single communication of software and hardware, reduce the frequency of the overall communication, and thus effectively improve the efficiency of software and hardware communication.

[0087] Embodiment 3

[0088] Figure 6 is a flow chart of a communication method for automatic testing provided by the third embodiment of the invention, the method is executed by any resource board in the test machine hardware, such as Figure 6 As shown, the method comprises the following steps:

[0089] S610: Receive a test data packet.

[0090] S620, parse the test data packet to obtain a register operation mode and test parameters.

[0091] Among them, the register operation mode includes register read operation and register write operation;

[0092] S630, determining target registers corresponding to the test parameters according to a preset mapping relationship, and operating the target registers according to the register operation mode.

[0093] The preset mapping relationship is stored in the resource board, which is the mapping relationship between the test parameters and the registers. The specific implementation process of S610-S630 can refer to the above embodiment, which will not be repeated here.

[0094] The technical solution of this embodiment is to receive a test data packet; parse the test data packet to obtain a register operation mode and test parameters; wherein the register operation mode includes a register read operation and a register write operation; the number of test parameters is one or more; determine the target registers corresponding to each of the test parameters according to a preset mapping relationship, and operate each of the target registers according to the register operation mode; wherein the preset mapping relationship is stored in the resource board and is a mapping relationship between the test parameters and the registers. It can effectively increase the amount of data transmitted by a single communication between software and hardware, reduce the frequency of overall communication, and thus effectively improve the efficiency of software and hardware communication.

[0095] Embodiment 4

[0096] Figure 7 is a schematic diagram of the structure of an automatic test communication device provided by Embodiment 4 of the present invention, such as Figure 7 As shown, the device comprises:

[0097] The test data packet sending module 710 is provided in the host computer and is used to send the test data packet to the communication board in the test machine hardware;

[0098] The test data packet forwarding module 720 is provided in the communication board and is used to forward the test data packet to multiple resource boards in the test machine hardware;

[0099] The test data packet parsing module 730 is provided in the resource board and is used to parse the test data packet to obtain the register operation mode and the test parameters; wherein the register operation mode includes the register read operation and the register write operation; the number of the test parameters is one or more;

[0100] The register operation module 740 is set in the resource board and is used to determine the target register corresponding to the test parameter according to the preset mapping relationship, and operate each target register according to the register operation mode; wherein the preset mapping relationship is stored in the resource board and is the mapping relationship between the test parameter and the register.

[0101] Optionally, the test data packet sending module 710 is further used to:

[0102] In response to a test request triggered by a user, the host computer obtains a test data packet corresponding to the test request; wherein the test request includes a read request or a write request, and the test data packet is pre-set based on different test requests. If the test request is a read request, the test data packet includes a data packet identifier; if the test request is a write request, the test data packet includes a data packet identifier and a preset number of test parameters; the test parameters include test parameter values;

[0103] Send the test data packet to the communication board in the test machine hardware.

[0104] Optionally, the test data packet sending module 710 is further used to:

[0105] In response to a test request triggered by a user, determining a data packet identifier based on the test request; wherein the test request includes a read request or a write request;

[0106] If the test request is a write request, a preset number of test parameters corresponding to the test request are obtained, and the data packet identifier and the preset number of test parameters are assembled into a test data packet; wherein the test parameters include test parameter values;

[0107] If the test request is a read request, the data packet identifier is assembled into a test data packet;

[0108] Send the test data packet to the communication board in the test machine hardware.

[0109] Optionally, the test data packet parsing module 730 is further used to:

[0110] Extracting a data packet identifier from a test data packet;

[0111] Determine the register operation mode based on the data packet identifier, and obtain a preset number of test parameter names based on the data packet identifier and a preset parsing rule; wherein the preset parsing rule is stored in the resource board, including a correspondence between the data packet identifier and the preset number of test parameter names;

[0112] If the register operation mode is a register write operation, the test parameter value in the test data packet is also extracted.

[0113] Optionally, the register operation module 740 is further configured to:

[0114] The resource board determines the target registers corresponding to the test parameter names according to a preset mapping relationship;

[0115] If the register operation mode is a register read operation, the resource board reads the test parameter value corresponding to the test parameter name from the target register;

[0116] If the register operation mode is a register write operation, the resource board writes the test parameter value into the target register.

[0117] Optionally, it also includes: a response data packet generation module, which is used to:

[0118] The resource board generates a response data packet according to the operation result, and sends the response data packet to the communication board;

[0119] The communication board generates a replied response status according to the reply data packet.

[0120] Optionally, it also includes: a response status query module, used to:

[0121] The host computer queries the response status from the communication board; the response status includes responded and unanswered;

[0122] If the queried response status is answered, the host computer reads the response data packet from the communication board and stores the read response data packet in the host computer memory.

[0123] Optionally, the response status query module is also used to:

[0124] If the response status of the query is not answered, the host computer continues to query the response status from the communication board until the response status queried is answered, or the query times out.

[0125] Embodiment 5

[0126] Figure 8 is a schematic diagram of the structure of an automatic test communication device provided in Embodiment 5 of the present invention. The device is arranged in any resource board in the test machine hardware, such as Figure 8 As shown, the device comprises:

[0127] A test data packet receiving module 810, used to receive a test data packet;

[0128] The test data packet parsing module 820 is used to parse the test data packet to obtain the register operation mode and test parameters; wherein the register operation mode includes a register read operation and a register write operation; the number of the test parameters is one or more;

[0129] The register operation module 830 is used to determine the target registers corresponding to each test parameter according to a preset mapping relationship, and operate each target register according to the register operation mode; wherein the preset mapping relationship is stored in the resource board and is the mapping relationship between the test parameters and the registers.

[0130] The above device can execute the methods provided by all the above embodiments of the present invention, and has the corresponding functional modules and beneficial effects of executing the above methods. For technical details not described in detail in this embodiment, please refer to the methods provided by all the above embodiments of the present invention.

[0131] Embodiment 6

[0132] Fig. 9A schematic diagram of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, the connections and relationships between the components, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0133] like Fig. 9 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0134] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0135] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the communication method of automatic testing.

[0136] In some embodiments, the communication method of automatic testing can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the communication method of automatic testing described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the communication method of automatic testing in any other appropriate manner (for example, by means of firmware).

[0137] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0138] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0139] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0140] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0141] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0142] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0143] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0144] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A communication method for automatic testing, characterized in that: include: The host computer sends the test data packet to the communication board in the test machine hardware; The communication board forwards the test data packet to a plurality of resource boards in the test machine hardware; For each resource board, the test data packet is parsed to obtain a register operation mode and a test parameter; wherein the register operation mode includes a register read operation and a register write operation; and the number of the test parameters is one or more; The resource board determines the target registers corresponding to each of the test parameters according to a preset mapping relationship, and operates each of the target registers according to the register operation mode; wherein the preset mapping relationship is stored in the resource board and is a mapping relationship between test parameters and registers.

2. The method according to claim 1, characterized in that The host computer sends the test data packet to the communication board in the test machine hardware, including: In response to a test request triggered by a user, the host computer obtains a test data packet corresponding to the test request; wherein the test request includes a read request or a write request, and the test data packet is pre-set based on different test requests. If the test request is a read request, the test data packet includes a data packet identifier; if the test request is a write request, the test data packet includes a data packet identifier and a preset number of test parameters; the test parameters include test parameter values; The test data packet is sent to the communication board in the test machine hardware.

3. The method according to claim 1, characterized in that The host computer sends the test data packet to the communication board in the test machine hardware, including: In response to a test request triggered by a user, determining a data packet identifier based on the test request; wherein the test request includes a read request or a write request; If the test request is a write request, obtaining a preset number of test parameters corresponding to the test request, and assembling the data packet identifier and the preset number of test parameters into a test data packet; wherein the test parameters include test parameter values; If the test request is a read request, assembling the data packet identifier into a test data packet; Send the test data packet to the communication board in the test machine hardware.

4. The method according to claim 2 or 3, characterized in that: Parsing the test data packet to obtain register operation mode and test parameters includes: Extracting a data packet identifier from the test data packet; Determine a register operation mode based on the data packet identifier, and obtain a preset number of test parameter names based on the data packet identifier and a preset parsing rule; wherein the preset parsing rule is stored in the resource board, including a correspondence between the data packet identifier and a preset number of test parameter names; If the register operation mode is a register write operation, the test parameter value in the test data packet is also extracted.

5. The method according to claim 4, characterized in that The resource board determines the target registers corresponding to the test parameters according to the preset mapping relationship, and operates the target registers according to the register operation mode, including: The resource board determines the target registers corresponding to the test parameter names according to a preset mapping relationship; If the register operation mode is a register read operation, the resource board reads the test parameter value corresponding to the test parameter name from the target register; If the register operation mode is a register write operation, the resource board writes the test parameter value into the target register.

6. The method according to claim 1, characterized in that After operating each of the target registers according to the register operation mode, the method further includes: The resource board generates a response data packet according to the operation result, and sends the response data packet to the communication board; The communication board generates a responded response status according to the response data packet.

7. The method according to claim 6, characterized in that After the host computer sends the test data packet to the communication board in the test machine hardware, it also includes: The host computer queries the response status from the communication board; wherein the response status includes responded and unanswered; If the queried response status is answered, the host computer reads the response data packet from the communication board and stores the read response data packet in the host computer memory; If the queried response status is unanswered, the host computer continues to query the response status from the communication board until the queried response status is answered, or the query times out.

8. A communication method for automatic testing, characterized in that: The method is executed by any resource board in the test machine hardware, and includes: Receive test data packets; Parsing the test data packet to obtain a register operation mode and test parameters; wherein the register operation mode includes a register read operation and a register write operation; and the number of the test parameters is one or more; The target registers corresponding to the test parameters are determined according to the preset mapping relationship, and the target registers are operated according to the register operation mode; wherein the preset mapping relationship is stored in the resource board and is the mapping relationship between the test parameters and the registers.

9. A communication device for automatic testing, characterized in that: include: A test data packet sending module is provided in the host computer and is used to send the test data packet to the communication board in the test machine hardware; A test data packet forwarding module, arranged in the communication board, for forwarding the test data packet to a plurality of resource boards in the test machine hardware; A test data packet parsing module is provided in the resource board and is used to parse the test data packet to obtain a register operation mode and test parameters; wherein the register operation mode includes a register read operation and a register write operation; and the number of the test parameters is one or more; A register operation module is arranged in the resource board, and is used to determine the target registers corresponding to each of the test parameters according to a preset mapping relationship, and operate each of the target registers according to the register operation mode; wherein the preset mapping relationship is stored in the resource board, and is a mapping relationship between the test parameters and the registers.

10. A communication device for automatic testing, characterized in that: The device is arranged in any resource board in the test machine hardware, and includes: A test data packet receiving module, used for receiving a test data packet; A test data packet parsing module, used to parse the test data packet to obtain a register operation mode and test parameters; wherein the register operation mode includes a register read operation and a register write operation; the number of the test parameters is one or more; A register operation module is used to determine the target registers corresponding to each of the test parameters according to a preset mapping relationship, and operate each of the target registers according to the register operation mode; wherein the preset mapping relationship is stored in the resource board and is the mapping relationship between the test parameters and the registers.