Equipment testing method and device, electronic equipment and computer readable storage medium

By parsing the description files of the device under test and the verification device, the port is automatically connected, which solves the problems of low manual connection efficiency and high error rate, and achieves efficient device testing.

CN118796579APending Publication Date: 2024-10-18SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411000910.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

During the chip verification process, manually connecting the port signals of the device under test and the verification device is inefficient and has a high error rate, which results in long verification time and affects verification quality.

Method used

By obtaining the signal description file of the device under test and the verification signal matching description file, the parsing module is used to determine the matching relationship between each measured port and the port, and the preset tool script is used to automatically connect the port and generate a verification environment.

Benefits of technology

It achieves accurate and efficient connection between the device under test and the verification device, shortens the equipment testing time, and improves the testing efficiency and verification quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796579A_ABST
    Figure CN118796579A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment test method and device, electronic equipment and a computer readable storage medium, and the method is applied to a test platform, and comprises the steps: obtaining a tested equipment signal description file and a verification signal matching description file according to an equipment test command; analyzing the signal description file of the tested equipment, determining each tested port in the tested equipment, and obtaining port information of each tested port; analyzing the verification signal matching description file to obtain a port matching relation; the port matching relationship is a mapping relationship between the test port and the verification port; for each tested port, querying and determining a target verification port corresponding to the tested port in the port matching relationship according to the port information of the tested port; and connecting each tested port with the corresponding target verification port by using a preset tool script, and generating a verification environment to realize equipment testing. According to the technical scheme provided by the invention, accurate and efficient connection between the tested equipment and the verification equipment can be realized, so that the verification quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of hardware testing, and in particular to a device testing method, and also to a device testing apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] With the rapid development of large-scale integrated circuit system design, the scale of SOC (System on Chip) integrated circuits is getting larger and larger, and the design complexity is also increasing. A lot of design and verification time is required to ensure the quality of the chip. Among them, chip verification work occupies almost 70% or even more time in the chip design and development process. Therefore, the quality of verification plays a decisive role in the quality of the chip. At the same time, in the face of increasingly updated verification technology, the challenges faced in actual chip verification work are also increasing. Verification technology is the first safety valve for chip function verification. Verification personnel must ensure the correctness of the internal signal connection of each module, the connection between modules, and the connection between subsystems and systems, so as to lay a good foundation for subsequent complex verification work and achieve twice the result with half the effort.

[0003] In the verification work, the verifier needs to integrate certain standard protocols VIP (Verification Intellectual Property) into the verification environment. This process requires the verifier to manually connect according to the DUT (Design Under Test) port signals. If the number of port signals is small, it can be completed quickly, but if there are hundreds, thousands or even tens of thousands of port signals, it is difficult to quickly connect them manually. In addition, manual operation is more dependent on manual experience, and it is easy to have connection errors. It can be seen that the connection between the DUT port and the VIP port based on manual operation is inefficient and has a high error rate.

[0004] Therefore, how to achieve accurate and efficient connection between the device under test and the verification device to effectively shorten the device testing time, improve the device testing efficiency, and further improve the verification quality is an urgent problem to be solved by technical personnel in this field. Summary of the invention

[0005] The purpose of this application is to provide a device testing method, which can achieve accurate and efficient connection between the device under test and the verification device, so as to effectively shorten the device testing time, improve the device testing efficiency, and thus improve the verification quality; another purpose of this application is to provide a device testing device, electronic device, computer-readable storage medium and computer program product, all of which have the above-mentioned beneficial effects.

[0006] In a first aspect, the present application provides a device testing method, which is applied to a testing platform, comprising:

[0007] When receiving a device test command, obtaining a device under test signal description file and a verification signal matching description file according to the device test command;

[0008] Parsing the device under test signal description file, determining each port under test in the device under test, and obtaining port information of each port under test;

[0009] Parsing the verification signal matching description file to obtain a port matching relationship; the port matching relationship is a mapping relationship between a test port and a verification port;

[0010] For each tested port, query and determine the target verification port corresponding to the tested port in the port matching relationship according to the port information of the tested port;

[0011] A preset tool script is used to connect each of the ports under test with a corresponding target verification port to generate a verification environment to implement device testing.

[0012] Optionally, parsing the device under test signal description file, determining each port under test in the device under test, and obtaining port information of each port under test includes:

[0013] Parsing the device under test signal description file using regular expression technology to determine each of the ports under test in the device under test;

[0014] The port information of each of the ports under test is extracted from the signal description file of the device under test.

[0015] Optionally, the port information includes a combination of one or more of a port signal name, a port signal direction, a port signal bit width, and a port signal annotation information.

[0016] Optionally, the verification signal matching description file is parsed to obtain a port matching relationship; the port matching relationship is a mapping relationship between a test port and a verification port, including:

[0017] Parsing the verification signal matching description file to obtain a corresponding relationship between the test port regular expression and the verification port information;

[0018] The corresponding relationship between the test port regular expression and the verification port information is used as the port matching relationship.

[0019] Optionally, the verification port information includes a verification port name and / or a verification port direction.

[0020] Optionally, after parsing the device under test signal description file, determining each port under test in the device under test, and obtaining port information of each port under test, the method further includes:

[0021] Generate a tested port information list according to each of the tested ports and the corresponding port information;

[0022] After the verification signal matching description file is parsed to obtain a port matching relationship, wherein the port matching relationship is a mapping relationship between a test port and a verification port, the method further includes:

[0023] Generate a port matching list based on each test port regular expression and the corresponding verification port information;

[0024] Correspondingly, for each tested port, querying and determining the target verification port corresponding to the tested port in the port matching relationship according to the port information of the tested port includes:

[0025] For each tested port in the tested port information list, a tested port regular expression is calculated according to the port information of the tested port;

[0026] Determine a target test port regular expression hit by the tested port regular expression in the port matching list;

[0027] Determine the target verification port information corresponding to the target test port regular expression in the port matching list;

[0028] The verification port corresponding to the target verification port information is used as the target verification port.

[0029] Optionally, the device testing method further includes:

[0030] For each tested port, determining a port protocol of the tested port;

[0031] For the same tested port using different port protocols, numbering the target verification ports corresponding to the tested port according to each of the port protocols;

[0032] Accordingly, the use of a preset tool script to connect each of the tested ports with a corresponding target verification port to generate a verification environment to implement device testing includes:

[0033] Referring to the verification port number, the preset tool script is used to connect each of the tested ports with the corresponding target verification port to generate the verification environment to implement device testing.

[0034] In a second aspect, the present application also provides a device testing apparatus, which is applied to a test platform, comprising:

[0035] An acquisition module, configured to acquire a device under test signal description file and a verification signal matching description file according to the device test command when a device test command is received;

[0036] A first parsing module, used to parse the signal description file of the device under test, determine each port under test in the device under test, and obtain port information of each port under test;

[0037] A second parsing module is used to parse the verification signal matching description file to obtain a port matching relationship; the port matching relationship is a mapping relationship between a test port and a verification port;

[0038] A query module, configured to query and determine, for each tested port, a target verification port corresponding to the tested port in the port matching relationship according to the port information of the tested port;

[0039] The connection module is used to connect each of the tested ports with the corresponding target verification port using a preset tool script to generate a verification environment to implement device testing.

[0040] In a third aspect, the present application further discloses an electronic device, comprising:

[0041] Memory for storing computer programs;

[0042] A processor is used to implement the steps of any one of the device testing methods described above when executing the computer program.

[0043] In a fourth aspect, the present application further discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the device testing methods described above are implemented.

[0044] In a fifth aspect, the present invention further discloses a computer program product, including a computer program / instruction, which implements the steps of any one of the device testing methods described above when executed by a processor.

[0045] The present application provides a device testing method, which is applied to a testing platform, including: when a device testing command is received, obtaining a signal description file of a device under test and a verification signal matching description file according to the device testing command; parsing the signal description file of the device under test, determining each tested port in the device under test, and obtaining port information of each of the tested ports; parsing the verification signal matching description file to obtain a port matching relationship; the port matching relationship is a mapping relationship between a test port and a verification port; for each tested port, querying and determining a target verification port corresponding to the tested port in the port matching relationship according to the port information of the tested port; and using a preset tool script to connect each tested port with the corresponding target verification port to generate a verification environment to implement device testing.

[0046] By applying the technical solution provided by the present application, for the target device that needs to be tested, that is, the above-mentioned device under test, the corresponding device under test signal description file and verification signal matching description file, as well as the parsing scripts corresponding to the two description files, are pre-created. When it is necessary to perform device testing on it, the parsing script can be used to parse the two to obtain the port information of each tested port in the device under test, as well as the mapping relationship between the test port and the verification port. Thus, the target verification port corresponding to each tested port can be determined by combining the port information of the tested port and the mapping relationship between the test port and the verification port, and the preset tool script can be used to realize the automatic connection between the two, thereby generating a verification environment and completing the device test of the device under test. It can be seen that the present technical solution realizes the automatic connection between the device under test and the verification device through the program script, which is efficient and accurate, does not require manual operation, effectively shortens the device testing time, improves the device testing efficiency, and further improves the verification quality.

[0047] In one embodiment of the present application, in the case where the same tested port is connected to multiple verification ports of the same type, each target verification port of the same type is uniquely numbered with reference to the port protocol used by the tested port for distinction, so that the connection between the tested port and each target verification port can be achieved with reference to the unique number of the target verification port, thereby effectively ensuring the accuracy of the port connection relationship, and further helping to achieve more accurate automated port connection.

[0048] The equipment testing device, electronic equipment, computer-readable storage medium and computer program product provided in this application also have the above-mentioned technical effects, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings required for use in the description of the prior art and the embodiments of the present application are briefly introduced below. Of course, the drawings described below in relation to the embodiments of the present application are only part of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work, and the obtained other drawings also belong to the protection scope of the present application.

[0050] Figure 1 A schematic diagram of a device testing method provided in this application;

[0051] Figure 2 A flowchart of another device testing method provided in this application;

[0052] Figure 3 A flowchart of another device testing method provided by the present application;

[0053] Figure 4 A schematic diagram of a flow chart of a method for parsing a device under test signal description file provided in this application;

[0054] Figure 5 A schematic diagram of the structure of a device testing device provided in this application;

[0055] Figure 6 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0056] The core of this application is to provide a device testing method, which can achieve accurate and efficient connection between the device under test and the verification device, so as to effectively shorten the device testing time, improve the device testing efficiency, and thus improve the verification quality; another core of this application is to provide a device testing device, electronic device, computer-readable storage medium and computer program product, all of which have the above-mentioned beneficial effects.

[0057] In order to describe the technical solutions in the embodiments of the present application more clearly and completely, the technical solutions in the embodiments of the present application will be introduced below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0058] An embodiment of the present application provides a device testing method.

[0059] Please refer to Figure 1 , Figure 1This is a flow chart of a device testing method provided in the present application. The device testing method is applied to a testing platform and may include the following S101 to S105.

[0060] S101: When a device test command is received, a device signal description file under test and a verification signal matching description file are obtained according to the device test command.

[0061] This step aims to achieve the acquisition of the device under test signal description file and the verification signal matching description file based on the device test command. Among them, the device test command can be initiated by the user through the user terminal connected to the test platform; the device under test signal description file is a file used to describe the signals of each port in the device under test, which records various attribute information of each port signal in the device under test, such as the port signal name, port signal direction, etc., and the device under test is the target device that needs to be tested; the verification signal matching description file is a file used to describe the port signal mapping relationship between the test device (the tested party) and the verification device (the party performing the test), which records the mapping matching relationship between each test port in the test device and each verification port in the verification device. Therefore, based on the device under test signal description file, various port information in the device under test (port information of each tested port) can be obtained, and based on the verification signal matching description file, the mapping relationship between the test port and the verification port can be obtained. Finally, the verification port corresponding to each tested port in the device under test (the target verification port described later) is determined through the mapping relationship matching and the automatic connection between the two is realized. It should be noted that different devices under test correspond to different device under test signal description files and verification signal matching description files.

[0062] In one embodiment of the present application, the obtaining of the device under test signal description file and the verification signal matching description file according to the device test command may include:

[0063] Determine the device under test according to the device test command;

[0064] Query the storage path of the device under test signal description file corresponding to the device under test and the storage path of the verification signal matching description file in the path record file;

[0065] Retrieve the device under test signal description file according to the device under test signal description file storage path;

[0066] The verification signal matching description file is retrieved according to the storage path of the verification signal matching description file.

[0067] The embodiment of the present application provides an implementation method for obtaining a signal description file of a device under test and a verification signal matching description file according to a device test command. Specifically, when a user initiates a device test request command to a test platform through a user terminal, relevant information of the device under test (which may be a unique identifier, such as an ID number) may be attached to the device test command. Thus, after receiving the device test command, the test platform can parse the command to determine the current device under test, and then query the file storage path corresponding to the current device under test, and obtain relevant files under the file storage path, namely the above-mentioned device under test signal description file and verification signal matching description file.

[0068] Among them, the query operation of the file storage path can be implemented based on the path record file, which records the storage path information of various types of files corresponding to various types of devices under test. Therefore, according to the device under test information in the device test command, the corresponding file storage path can be queried in the path record file. Specifically, the file storage path includes the storage path of the device under test signal description file and the storage path of the verification signal matching description file. The storage path of the device under test signal description file is the storage path of the device under test signal description file, and the device under test signal description file can be obtained according to the path information; the storage path of the verification signal matching description file is the storage path of the verification signal matching description file, and the verification signal matching description file can be obtained according to the path information.

[0069] Therefore, the acquisition of the device under test signal description file and the verification signal matching description file corresponding to the device under test is realized by querying the path record file, which is convenient and fast.

[0070] S102: Parse the signal description file of the device under test, determine each port under test in the device under test, and obtain port information of each port under test.

[0071] As described above, the device under test signal description file is a file used to describe the signals of each port in the device under test, which records various attribute information of each port signal in the device under test. Based on this, by parsing the device under test signal description file, each tested port in the device under test can be determined and the port information of each tested port can be obtained. In a possible implementation, the port information may include a combination of one or more of the port signal name, port signal direction, port signal bit width, and port signal annotation information.

[0072] S103: Parse the verification signal matching description file to obtain a port matching relationship; the port matching relationship is a mapping relationship between a test port and a verification port.

[0073] As described above, the verification signal matching description file is a file used to describe the port signal mapping relationship between the test device and the verification device, which records the mapping matching relationship between each test port in the test device and each verification port in the verification device. Based on this, by parsing the verification signal matching description file, the mapping relationship between the test port corresponding to the current device under test and the verification port, that is, the above-mentioned port matching relationship, can be obtained. In a possible implementation, the verification port information may include the verification port name and / or the verification port direction.

[0074] S104: For each tested port, according to the port information of the tested port, query and determine the target verification port corresponding to the tested port in the port matching relationship.

[0075] As described above, after obtaining the port information of each tested port in the tested device based on the tested device signal description file, and obtaining the mapping relationship (port matching relationship) between the test port and the verification port based on the verification signal matching description file, for each tested port in the tested device, its port information and the port matching relationship can be matched and queried to obtain its corresponding target verification port.

[0076] S105: Use a preset tool script to connect each tested port with a corresponding target verification port to generate a verification environment to implement device testing.

[0077] This step aims to achieve automated connection between each tested port in the device under test and its corresponding target verification port. This process can be implemented based on a program script pre-deployed in the test platform (i.e., the preset tool script mentioned above), thereby achieving the generation of a verification environment for the device under test and completing the device test of the device under test.

[0078] It can be seen that the device testing method provided in the embodiment of the present application, for the target device that needs to be tested, that is, the above-mentioned device under test, pre-creates its corresponding device under test signal description file and verification signal matching description file, as well as the parsing scripts corresponding to the two description files. When it is necessary to perform device testing on it, the parsing script can be used to parse the two to obtain the port information of each tested port in the device under test, as well as the mapping relationship between the test port and the verification port. Thus, the target verification port corresponding to each tested port can be determined by combining the port information of the tested port and the mapping relationship between the test port and the verification port, and the preset tool script is used to realize the automatic connection between the two, thereby generating a verification environment and completing the device test of the device under test. It can be seen that the technical solution realizes the automatic connection between the device under test and the verification device through the program script, which is efficient and accurate, does not require manual operation, effectively shortens the device testing time, improves the device testing efficiency, and further improves the verification quality.

[0079] Based on the above embodiments:

[0080] In one embodiment of the present application, the above-mentioned parsing of the device under test signal description file, determining each tested port in the device under test, and obtaining port information of each tested port may include:

[0081] Use regular expression technology to parse the signal description file of the device under test and determine each tested port in the device under test;

[0082] The port information of each port under test is extracted from the signal description file of the device under test.

[0083] The embodiment of the present application provides a method for parsing a signal description file of a device under test, determining each tested port in the device under test and obtaining port information of each tested port, which can be implemented using regular expression technology. Specifically, the device under test signal description file can be matched with a regular expression using a pre-specified type of port information to be obtained, thereby determining each tested port in the device under test and extracting port information corresponding to each type of port information.

[0084] In one embodiment of the present application, the verification signal matching description file is parsed to obtain a port matching relationship; the port matching relationship is a mapping relationship between a test port and a verification port, which may include:

[0085] Parse the verification signal matching description file to obtain the corresponding relationship between the test port regular expression and the verification port information;

[0086] The correspondence between the test port regular expression and the verification port information is used as the port matching relationship.

[0087] The embodiment of the present application provides a method for parsing a verification signal matching description file to obtain a port matching relationship, which can also be implemented using regular matching technology. Specifically, in the verification signal matching description file, the mapping relationship between the test port and the verification port can be specifically a mapping relationship between the test port regular expression and the verification port information, so that the target verification port corresponding to each tested port can be determined later through a regular expression matching operation.

[0088] In one embodiment of the present application, after parsing the signal description file of the device under test, determining each tested port in the device under test, and obtaining the port information of each tested port, the method may further include: generating a tested port information list according to each tested port and the corresponding port information;

[0089] The above-mentioned parsing of the verification signal matching description file to obtain the port matching relationship; after the port matching relationship is the mapping relationship between the test port and the verification port, it can also include: generating a port matching list according to each test port regular expression and the corresponding verification port information;

[0090] Accordingly, for each tested port, searching and determining the target verification port corresponding to the tested port in the port matching relationship according to the port information of the tested port may include:

[0091] For each tested port in the tested port information list, a tested port regular expression is calculated according to the port information of the tested port;

[0092] Determine the target test port regular expression that the tested port regular expression hits in the port match list;

[0093] Determine the target verification port information corresponding to the target test port regular expression in the port matching list;

[0094] The verification port corresponding to the target verification port information is used as the target verification port.

[0095] The embodiment of the present application provides a method for querying and determining the target verification port corresponding to the tested port. First, the tested port information obtained based on the tested device signal description file and the port matching relationship obtained based on the verification signal matching description file can be recorded in the form of a list, that is, the tested port information list and the port matching list. Further, on the basis that the port matching relationship is specifically a mapping relationship between the test port regular expression and the verification port information, for each tested port in the tested port information list, its corresponding regular expression can be calculated according to its port information, and the regular expression is matched with the port matching list. Then, the verification port information corresponding to the hit target test port regular expression is the port information of the target verification port, thereby realizing the determination of the target verification port corresponding to the tested port.

[0096] In one embodiment of the present application, the device testing method may further include:

[0097] For each tested port, determining the port protocol of the tested port;

[0098] For the same tested port using different port protocols, the target verification ports corresponding to the tested port are numbered according to each port protocol;

[0099] Correspondingly, the above-mentioned use of a preset tool script to connect each port under test with the corresponding target verification port to generate a verification environment to achieve device testing may include: referring to the verification port number, using a preset tool script to connect each port under test with the corresponding target verification port to generate a verification environment to achieve device testing.

[0100] The device testing method provided in the embodiment of the present application can further realize port connection based on different port protocols to effectively ensure the accuracy of automated port connection. Specifically, for the same tested port, different port protocols may be used when performing information communication, so it is necessary to connect multiple verification ports of the same type. Therefore, each target verification port of the same type can be numbered according to each port protocol to distinguish them. One port protocol corresponds to one number, so that when the tested port and the target verification port are subsequently connected, the unique number of the target verification port can be referenced to ensure accurate port connection.

[0101] It can be seen that in the embodiment of the present application, for the situation where the same tested port is connected to multiple verification ports of the same type, each target verification port of the same type is uniquely numbered with reference to the port protocol used by the tested port for distinction, so that the connection between the tested port and each target verification port can be achieved with reference to the unique number of the target verification port, thereby effectively ensuring the accuracy of the port connection relationship, and further helping to achieve more accurate automated port connection.

[0102] In one embodiment of the present application, the device testing method may further include:

[0103] For each port under test, determining a port signal direction of the port under test;

[0104] Accordingly, the above-mentioned use of a preset tool script to connect each tested port with a corresponding target verification port to generate a verification environment to implement device testing may include:

[0105] According to the port signal direction of the tested port, a preset tool script is used to connect the tested port with the corresponding target verification port to generate the verification environment to implement device testing.

[0106] The device testing method provided in the embodiment of the present application can further realize port connection based on different port signal directions to effectively ensure the accuracy of automated port connection. Specifically, for the same tested port, different port signal directions may be enabled when performing information communication, such as receiving signals and sending signals. On this basis, the tested port can be automatically connected to the corresponding target verification port with reference to the port signal direction to ensure accurate port connection.

[0107] It can be seen that, for the same tested port, the embodiment of the present application realizes the connection between the tested port and the corresponding target verification port by referring to the port signal direction of the tested port, effectively ensuring the accuracy of the port connection relationship, and thus helping to achieve more accurate automated port connection.

[0108] Based on the above embodiments, the embodiment of the present application provides another device testing method.

[0109] Please refer to the figure, Figure 2 This is a flow chart of another device testing method provided by the present application. The device testing method mainly includes five parts: the preparation of DUT design module description file (i.e., the above-mentioned device under test signal description file), the preparation of VIP signal matching description file (i.e., the above-mentioned verification signal matching description file), the port signal parsing algorithm, the port signal and VIP signal matching algorithm, and the tool script, among which:

[0110] 1. DUT design module description file: It is written in YAML (Yet Another Markup Language, a format used to express data serialization) file format and is used to describe the relevant information of the DUT design code module. In addition, it also specifies the instantiation name of the instantiated top-level module in the generated test platform.

[0111] 2. VIP signal matching description file: written in key-value format, used to describe the set of matching relationships between DUT signals and VIP signals (i.e., the mapping relationship between the above test ports and verification ports).

[0112] 3. Port signal parsing algorithm: used to parse the DUT design module description file, extract the signal information contained in the DUT design module (i.e. the port information of each tested port mentioned above) and generate preliminary module instantiation code.

[0113] 4. Port signal and VIP signal matching algorithm: used to match and connect DUT signals and VIP signals.

[0114] 5. Tool script: responsible for generating the integrated test platform verification environment.

[0115] On this basis, please refer to Figure 3 , Figure 3 A flow chart of another device testing method provided in this application, the specific implementation process is as follows:

[0116] 1. DUT design module description file:

[0117] Used to describe the relevant information of the DUT design code module, stored in the specified path.

[0118] 2. Port signal analysis algorithm:

[0119] According to the storage path specified in step 1, obtain the DUT design module description file and parse it. This process can be implemented using a Verilog (a hardware description language) syntax parsing engine based on regular expressions. For details, please refer to Figure 4 , Figure 4 This is a flow chart of a method for parsing a device under test signal description file provided in this application, and its implementation process is as follows:

[0120] According to the Verilog syntax rules, a set of Verilog tokens is designed. The token adopts a key-value data structure. The token contains 5 keys (keywords): root, module, parameters, module_port, and comment. These keys are formulated according to the DUT design module description file combined with the Verilog syntax rules. The value corresponding to each key is a list, which contains the regular expression matching the Verilog syntax. The current match is which attribute information of the Verilog syntax contains module, parameter, comment, module port and other information, which is connected to the key value specified above. According to the above parsing method, and according to the key-value specified by the token to match the syntax attributes, a chain syntax parsing method is formed to complete the parsing of the entire DUT design module description file. For example, the following code:

[0121] module A_TOP(,a_clk

[0122] ,a_addr

[0123] ,w_data

[0124] ,r_data );

[0126] input a_clk; / / clk singal

[0127] input [31:0] a_addr;

[0128] input [31:0] w_data;

[0129] ouput [31:0] r_data;

[0130] Endmodule.

[0131] Through the port signal parsing algorithm, various types of port signals and related information in the DUT design module description file, such as signal direction, signal tailings, signal name, signal type, etc., can be parsed and extracted, and stored in a list (i.e., the above-mentioned port signal list).

[0132] In addition, the module instantiation file is generated according to the instantiation name specified in the DUT design module description file, and the connection between the DUT port signal and the virtual interface vif (virtual interface) signal can be preliminarily completed, for example:

[0133] ModuleName SelfDefineModule(.port1(vif.port1),

[0134] .port2(vif.port2),

[0135] .port3(vif.port3)).

[0136] 3. VIP signal matching description file:

[0137] This file is written according to the classification of standard protocol signals, such as AXI (Advanced eXtensibleInterface, a bus protocol), APB (Advanced Peripheral Bus, a peripheral bus protocol), AHB (Advanced Peripheral Bus, a bus protocol designed for high-performance synchronous transmission), JTAG (JointTest Action Group, an international standard test protocol) and other protocols. The file content uses JSON (JavaScriptObject Notation, a lightweight data exchange format) file format. Take the AXI protocol address signal as an example:

[0138] {

[0139] ".*axi?.*(aw(_)?addr)": ['awaddr','input']

[0140] }

[0141] The VIP signal matching description file is written in key-value format, where the key is a regular expression that matches the port signal, and the value is maintained in a list, where the first element is the VIP signal name and the second element is the VIP signal direction.

[0142] 4. Port signal and VIP signal matching algorithm:

[0143] According to the port signal list and port signal and vif connection information list parsed in step 2, they are provided to the port signal and VIP signal matching algorithm for traversal, and combined with the VIP signal matching description file in step 3 to achieve accurate connection between the DUT port signal and the VIP signal. The specific steps are as follows:

[0144] (1) Dynamically maintain a map (bitmap), where the key is the common attribute of a certain type of port signal, and the corresponding value is used to distinguish the VIP number index of different port signals of the same protocol. For example, prefix1_axi_awaddr and prefix2_axi_awaddr are both AXI protocol signals, but the connected VIP signals need to be numbered and distinguished, and the signal attribute prefix1_axi is extracted as the key of the map, and the value is the index. For example:

[0145] {

[0146] "prefix1_axi": 0,

[0147] "prefix2_axi": 1

[0148] }

[0149] Among them, port signals with the same key use the same index.

[0150] (2) For each protocol, the count (total number) of currently connected VIP signals is recorded. For example, in step (1), if prefix1_axi does not exist in the map, the current count value is the value of prefix1_axi, and then the count is increased by 1; if the attribute of a port signal that matches already exists in the map, then the value corresponding to the current key can be directly obtained to obtain the number value of the VIP signal to be connected.

[0151] (3) For some VIP signals, the master and slave signals can be distinguished. Corresponding to different signal transmission directions (sending signals and receiving signals), a map and count can be maintained respectively.

[0152] 5. Tool script:

[0153] The results of the port signal analysis algorithm and the port signal and VIP signal matching algorithm are replaced to realize the automatic connection between the DUT signal and the VIP signal, thereby generating a verification environment and completing the device test under the verification environment.

[0154] It can be seen that the device testing method provided in the embodiment of the present application, for the target device that needs to be tested, that is, the above-mentioned device under test, pre-creates its corresponding device under test signal description file and verification signal matching description file, as well as the parsing scripts corresponding to the two description files. When it is necessary to perform device testing on it, the parsing script can be used to parse the two to obtain the port information of each tested port in the device under test, as well as the mapping relationship between the test port and the verification port. Thus, the target verification port corresponding to each tested port can be determined by combining the port information of the tested port and the mapping relationship between the test port and the verification port, and the preset tool script is used to realize the automatic connection between the two, thereby generating a verification environment and completing the device test of the device under test. It can be seen that the technical solution realizes the automatic connection between the device under test and the verification device through the program script, which is efficient and accurate, does not require manual operation, effectively shortens the device testing time, improves the device testing efficiency, and further improves the verification quality.

[0155] An embodiment of the present application provides a device testing apparatus.

[0156] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of a device testing device provided in this application. The device testing device is applied to a test platform and may include:

[0157] Acquisition module 1, used for acquiring a device signal description file and a verification signal matching description file according to the device test command when receiving the device test command;

[0158] The first parsing module 2 is used to parse the signal description file of the device under test, determine each tested port in the device under test, and obtain port information of each tested port;

[0159] The second parsing module 3 is used to parse the verification signal matching description file to obtain a port matching relationship; the port matching relationship is a mapping relationship between the test port and the verification port;

[0160] A query module 4 is used for querying and determining, for each tested port, a target verification port corresponding to the tested port in the port matching relationship according to the port information of the tested port;

[0161] The connection module 5 is used to connect each tested port with the corresponding target verification port using a preset tool script to generate a verification environment to implement device testing.

[0162] It can be seen that the device testing device provided in the embodiment of the present application, for the target device that needs to be tested, that is, the above-mentioned device under test, pre-creates its corresponding device under test signal description file and verification signal matching description file, as well as the parsing scripts corresponding to the two description files. When it is necessary to perform device testing on it, the parsing script can be used to parse the two to obtain the port information of each tested port in the device under test, as well as the mapping relationship between the test port and the verification port. Thus, the target verification port corresponding to each tested port can be determined by combining the port information of the tested port and the mapping relationship between the test port and the verification port, and the preset tool script is used to realize the automatic connection between the two, thereby generating a verification environment and completing the device test of the device under test. It can be seen that the technical solution realizes the automatic connection between the device under test and the verification device through the program script, which is efficient and accurate, does not require manual operation, effectively shortens the equipment testing time, improves the equipment testing efficiency, and further improves the verification quality.

[0163] In one embodiment of the present application, the first parsing module 2 can be specifically used to parse the device under test signal description file using regular expression technology to determine each tested port in the device under test; and extract the port information of each tested port in the device under test signal description file.

[0164] In one embodiment of the present application, the port information includes a combination of one or more of a port signal name, a port signal direction, a port signal bit width, and a port signal annotation information.

[0165] In one embodiment of the present application, the second parsing module 3 can be specifically used to parse the verification signal matching description file to obtain the correspondence between the test port regular expression and the verification port information; and use the correspondence between the test port regular expression and the verification port information as the port matching relationship.

[0166] In one embodiment of the present application, the verification port information includes a verification port name and / or a verification port direction.

[0167] In one embodiment of the present application, the device testing apparatus may further include:

[0168] A first generating module is used to generate a tested port information list according to each tested port and the corresponding port information after parsing the tested device signal description file, determining each tested port in the tested device, and obtaining the port information of each tested port;

[0169] The second generation module is used to parse the verification signal matching description file to obtain the port matching relationship; after the port matching relationship is the mapping relationship between the test port and the verification port, generate a port matching list according to the regular expression of each test port and the corresponding verification port information;

[0170] Correspondingly, the above-mentioned query module 4 can be specifically used to calculate the measured port regular expression for each measured port in the measured port information list according to the port information of the measured port; determine the target test port regular expression hit by the measured port regular expression in the port matching list; determine the target verification port information corresponding to the target test port regular expression in the port matching list; and use the verification port corresponding to the target verification port information as the target verification port.

[0171] In one embodiment of the present application, the device testing apparatus may further include:

[0172] A numbering module is used to determine the port protocol of each tested port; for the same tested port using different port protocols, number the target verification port corresponding to the tested port according to each port protocol;

[0173] Accordingly, the connection module 5 can be specifically used to refer to the verification port number, use a preset tool script to connect each tested port with the corresponding target verification port, generate a verification environment, and implement device testing.

[0174] In one embodiment of the present application, the above-mentioned acquisition module 1 can be specifically used to determine the device under test according to the device test command; query the device under test signal description file storage path and the verification signal matching description file storage path corresponding to the device under test in the path record file; call the device under test signal description file according to the device under test signal description file storage path; call the verification signal matching description file according to the verification signal matching description file storage path.

[0175] For an introduction to the device provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0176] An embodiment of the present application provides an electronic device.

[0177] Please refer to Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application, and the electronic device may include:

[0178] A memory 11, used for storing computer programs;

[0179] The processor 10 can implement the steps of any one of the above-mentioned device testing methods when executing a computer program.

[0180] like Figure 6 , which is a schematic diagram of the composition structure of an electronic device, the electronic device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through the communication bus 13.

[0181] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.

[0182] The processor 10 may call a program stored in the memory 11 . Specifically, the processor 10 may execute operations in the embodiment of the device testing method.

[0183] The memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present application, the memory 11 at least stores programs for implementing the following functions:

[0184] When receiving a device test command, obtaining a device under test signal description file and a verification signal matching description file according to the device test command;

[0185] Parse the signal description file of the device under test, determine each tested port in the device under test, and obtain the port information of each tested port;

[0186] Parse the verification signal matching description file to obtain a port matching relationship; the port matching relationship is a mapping relationship between a test port and a verification port;

[0187] For each tested port, according to the port information of the tested port, a target verification port corresponding to the tested port is searched and determined in the port matching relationship;

[0188] Use the preset tool script to connect each port under test with the corresponding target verification port to generate a verification environment to implement device testing.

[0189] In a possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.

[0190] In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0191] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.

[0192] Of course, it should be noted that Figure 6 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Figure 6 More or fewer components than shown, or combinations of certain components.

[0193] An embodiment of the present application provides a computer-readable storage medium.

[0194] The computer-readable storage medium provided in the embodiment of the present application stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned device testing methods can be implemented.

[0195] Among them, the computer-readable storage medium can be any available medium that can be stored in a computer or a data storage device such as a server or data center that includes one or more available media integrated. For example, it can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk) and other media that can store computer program codes.

[0196] For an introduction to the computer-readable storage medium provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0197] An embodiment of the present application provides a computer program product.

[0198] The computer program product provided in the embodiments of the present application includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of any of the above-mentioned device testing methods can be implemented.

[0199] Specifically, in the above embodiments, all or part of them can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of them can be implemented in the form of a computer program product.

[0200] Among them, the computer program product may include one or more computer programs / instructions, and when the computer program / instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application may be generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line, etc.) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0201] For an introduction to the computer program product provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0202] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0203] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0204] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0205] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples herein, and the description of the above embodiments is only used to help understand the method and core idea of ​​the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. A device testing method, It is characterized in that Applied to test platforms, including: When receiving a device test command, obtaining a device under test signal description file and a verification signal matching description file according to the device test command; Parsing the device under test signal description file, determining each port under test in the device under test, and obtaining port information of each port under test; Parsing the verification signal matching description file to obtain a port matching relationship; the port matching relationship is a mapping relationship between a test port and a verification port; For each tested port, query and determine the target verification port corresponding to the tested port in the port matching relationship according to the port information of the tested port; A preset tool script is used to connect each of the ports under test with a corresponding target verification port to generate a verification environment to implement device testing.

2. The device testing method according to claim 1, It is characterized in that The parsing of the signal description file of the device under test, determining each port under test in the device under test, and obtaining port information of each port under test includes: Parsing the device under test signal description file using regular expression technology to determine each of the ports under test in the device under test; The port information of each of the ports under test is extracted from the signal description file of the device under test.

3. The device testing method according to claim 2, It is characterized in that The port information includes one or more combinations of port signal name, port signal direction, port signal bit width, and port signal annotation information.

4. The device testing method according to claim 2, It is characterized in that The verification signal matching description file is parsed to obtain a port matching relationship; the port matching relationship is a mapping relationship between a test port and a verification port, including: Parsing the verification signal matching description file to obtain a corresponding relationship between the test port regular expression and the verification port information; The corresponding relationship between the test port regular expression and the verification port information is used as the port matching relationship.

5. The device testing method according to claim 4, It is characterized in that The verification port information includes a verification port name and / or a verification port direction.

6. The device testing method according to claim 5, It is characterized in that After parsing the device under test signal description file, determining each tested port in the device under test, and obtaining the port information of each tested port, the method further includes: Generate a tested port information list according to each of the tested ports and the corresponding port information; After the verification signal matching description file is parsed to obtain a port matching relationship, wherein the port matching relationship is a mapping relationship between a test port and a verification port, the method further includes: Generate a port matching list based on each test port regular expression and the corresponding verification port information; Correspondingly, for each tested port, querying and determining the target verification port corresponding to the tested port in the port matching relationship according to the port information of the tested port includes: For each tested port in the tested port information list, a tested port regular expression is calculated according to the port information of the tested port; Determine a target test port regular expression hit by the tested port regular expression in the port matching list; Determine the target verification port information corresponding to the target test port regular expression in the port matching list; The verification port corresponding to the target verification port information is used as the target verification port.

7. The device testing method according to any one of claims 1 to 6, It is characterized in that Also includes: For each tested port, determining a port protocol of the tested port; For the same tested port using different port protocols, numbering the target verification ports corresponding to the tested port according to each of the port protocols; Accordingly, the use of a preset tool script to connect each of the tested ports with a corresponding target verification port to generate a verification environment to implement device testing includes: Referring to the verification port number, the preset tool script is used to connect each of the tested ports with the corresponding target verification port to generate the verification environment to implement device testing.

8. A device testing apparatus, It is characterized in that Applied to test platforms, including: An acquisition module, configured to acquire a device under test signal description file and a verification signal matching description file according to the device test command when a device test command is received; A first parsing module, used to parse the signal description file of the device under test, determine each port under test in the device under test, and obtain port information of each port under test; A second parsing module is used to parse the verification signal matching description file to obtain a port matching relationship; the port matching relationship is a mapping relationship between a test port and a verification port; A query module, configured to query and determine, for each tested port, a target verification port corresponding to the tested port in the port matching relationship according to the port information of the tested port; The connection module is used to connect each of the tested ports with the corresponding target verification port using a preset tool script to generate a verification environment to implement device testing.

9. An electronic device, It is characterized in that include: Memory for storing computer programs; A processor, configured to implement the steps of the device testing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device testing method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Chip verification board test method, system, device, equipment, medium and product

    CN121656808A