Single-point test method and device and electronic equipment
By constructing a test script to automatically extract and set chip test single points, the problem of low single-point detection efficiency and accuracy in the existing technology is solved, and efficient and accurate single-point testing is achieved.
Patent Information
- Application Number
- CN202410796289.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-10-18
AI Technical Summary
The efficiency and accuracy of single-point detection in existing chip testing methods are low, resulting in missed test scenarios and extended iteration cycles.
By building a test script, obtaining the hardware description language file, extracting the test single point of the module to be tested, setting the target test single point as an error logic value, and running the module to be tested to obtain the test results, automated single point testing is achieved.
It improves the convenience, efficiency and accuracy of single-point testing, reduces human errors, and ensures high coverage test results.
Smart Images

Figure CN118796568A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip testing technology, and in particular to a single-point testing method, device and electronic equipment. Background Art
[0002] In the chip testing process, the coverage of single-point detection is a key test link, which aims to ensure that the device under test (DUT) can still operate stably under various possible abnormal conditions. In order to test the response capability of the module under test to single-point failures, single-point testing can be performed based on the software test library (STL). In the STL test, the module signal needs to be transistorized, and each bit signal inside the module needs to be independently injected, detected, covered, and scenario collected, so as to comprehensively test the robustness and reliability of the module.
[0003] In order to effectively manage a large number of single points, it is necessary to extract the single points of the test from the designed module to be tested, making them executable and visual entities. However, the extraction method is that the tester manually extracts the single points based on experience and detection range, performs error verification on them, and confirms whether the corresponding single point errors can be detected. This method is time-consuming and labor-intensive, and due to the limitations of human understanding, it is easy to cause omissions in test scenarios, prolong the iteration cycle, and reduce test efficiency and accuracy. Summary of the invention
[0004] The present application provides a single-point testing method, device and electronic equipment to solve the problem of low testing efficiency and accuracy during single-point testing.
[0005] In a first aspect, the present application provides a single-point testing method, the method comprising:
[0006] Build test scripts;
[0007] Obtaining a hardware description language file of the module to be tested, wherein the hardware description language file is used to describe the structure and execution logic of the module to be tested;
[0008] Extracting a test point of the hardware description language file based on the test script, the test point being a bit position of a signal in the module to be tested;
[0009] Set the target test point to an incorrect logic value;
[0010] The module to be tested is run to obtain a test result corresponding to the module to be tested when the target test point is set to an erroneous logic value.
[0011] In an optional implementation, the step of constructing a test script includes:
[0012] Build script files;
[0013] The script file is written with a parsing function, a signal bit width calculation function, a macro definition translation function and a random single point function; the parsing function is used to parse a hardware description language file to extract a test single point of the module to be tested; the signal bit width calculation function is used to calculate the signal bit width of a signal in the module to be tested; the macro definition translation function is used to translate the macro definition parameters in the hardware description language file into actual character strings represented by the macro definition parameters; the random single point function is used to perform numbering processing on the test single points of the module to be tested, and to select a target test single point from the test single points of the module to be tested;
[0014] An output information template is constructed in the script file to obtain a test script, wherein the output information template is used to instruct the test script to output the test result according to the output information template.
[0015] In an optional embodiment, the method further comprises:
[0016] Passing the file path of the hardware description language file of the module to be tested into the test script;
[0017] The hardware description language file of the module to be tested is obtained according to the file path based on the test script, and the hardware description language file is parsed to extract the test single point of the hardware description language file.
[0018] In an optional embodiment, the method further comprises:
[0019] Accessing a macro definition file based on the test script, wherein the macro definition file is used to store macro definition parameters required by the module to be tested;
[0020] Reading macro definition parameters in the macro definition file, wherein the macro definition parameters are used to represent actual character strings in the hardware description language file;
[0021] The macro definition parameters in the hardware description language file are translated into actual character strings represented by the macro definition parameters.
[0022] In an optional embodiment, the method further comprises:
[0023] Calculating the signal bit width of the signal in the module to be tested based on the test script, wherein the signal bit width is used to characterize the number of bits of the signal;
[0024] Setting numbers for the test points of the module to be tested according to the signal bit width;
[0025] The corresponding relationship between the test points and the numbers is stored in the dictionary library;
[0026] Selecting a target number in the dictionary library, the target number being a number corresponding to any test point in the module to be tested;
[0027] Set the test point corresponding to the target number as the target test point.
[0028] In an optional embodiment, the method further comprises:
[0029] Obtaining the total number of test points in the dictionary library and the number of tested points of the tested test points;
[0030] Calculate coverage, where the coverage is the ratio of the number of tested single points to the total number of single points;
[0031] The coverage ratio is output.
[0032] In an optional embodiment, the method further comprises:
[0033] Passing the module level and error annotation category of the module to be tested into the test script, wherein the module level is used to characterize the hierarchical structure of the module to be tested, and the error annotation category is the error category corresponding to the erroneous logic value;
[0034] splicing the module level, the signal name and target number corresponding to the target test point, the error category and the test result according to the output information template;
[0035] Output the spliced test results.
[0036] In an optional embodiment, the method further comprises:
[0037] Passing the output file path to the test script;
[0038] accessing an output file based on the output file path;
[0039] The test results are written in the output file.
[0040] In a second aspect, the present application provides a single-point testing device, including a single-point extraction module and a testing module, wherein:
[0041] The single point extraction module is used to construct a test script;
[0042] Obtaining a hardware description language file of the module to be tested, wherein the hardware description language file is used to describe the structure and execution logic of the module to be tested;
[0043] Extracting a test point of the hardware description language file based on the test script, the test point being a bit position of a signal in the module to be tested;
[0044] Set the target test point to an incorrect logic value;
[0045] The testing module is used to run the module to be tested to obtain the test result corresponding to the module to be tested when the target test single point is set to an erroneous logical value.
[0046] In a third aspect, the present application provides an electronic device, including: a processor, a memory, and a bus;
[0047] The processor and the memory establish a communication connection via the bus;
[0048] The memory stores instructions executable by the processor; the processor is configured to:
[0049] Build test scripts;
[0050] Obtaining a hardware description language file of the module to be tested, wherein the hardware description language file is used to describe the structure and execution logic of the module to be tested;
[0051] Extracting a test point of the hardware description language file based on the test script, the test point being a bit position of a signal in the module to be tested;
[0052] Set the target test point to an incorrect logic value;
[0053] The module to be tested is run to obtain a test result corresponding to the module to be tested when the target test point is set to an erroneous logic value.
[0054] It can be seen from the above technical solutions that the present application provides a single-point test method, device and electronic device, the method can construct a test script, obtain the hardware description language file of the module to be tested based on the test script, and extract the test single point of the hardware description language file, the hardware description language file is used to describe the structure and execution logic of the module to be tested, and the test single point is the bit position of the signal in the module to be tested. The target test single point is set to an erroneous logic value, and the module to be tested is run to obtain the test result corresponding to the module to be tested when the target test single point is set to an erroneous logic value. The method automatically counts, numbers and randomly selects single points for the internal signals of any module to be tested by calling the constructed test script, and outputs the simulation point information of the corresponding test single point, thereby improving the convenience, efficiency and accuracy of the test. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A schematic diagram of a single-point testing method according to an embodiment of the present invention;
[0057] Figure 2 A schematic diagram of the architecture of the test script provided in the embodiment of the present application;
[0058] Figure 3 A schematic diagram of a single-point numbering process provided in an embodiment of the present application;
[0059] Figure 4 A schematic diagram of a process for single-point error injection for target testing provided in an embodiment of the present application;
[0060] Figure 5 A schematic diagram of a test process provided for an embodiment of the present application;
[0061] Figure 6 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0062] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
[0063] In the chip testing process, the coverage of single-point detection is a key test link, which aims to ensure that the device under test (DUT) can still operate stably under various possible abnormal conditions. In order to test the response capability of the device under test to single-point failures, single-point testing can be performed based on the software test library (STL).
[0064] In STL testing, a single point refers to a bit of a signal in the module to be tested, in order to check the changes in the output and internal state of the module to be tested when an error is injected into the bit. For example, each bit signal is set to a specific logic value, such as 0, 1, x (unknown value), z (high impedance state), etc., in order to test the robustness and fault tolerance of the module to be tested.
[0065] During the STL test, the module signals need to be interfaced with transistors, and the single points that need to be tested in the module to be tested need to be extracted to perform independent error injection, detection, coverage, and scenario collection on each bit signal. For each bit signal, different error states (such as 0, 1, x, and z) are tested separately to comprehensively test the robustness and reliability of the module.
[0066] In order to effectively manage a large number of single points, it is necessary to extract the single points of the test from the designed module to be tested, making them executable and visual entities. However, the extraction method is that the tester manually extracts the single points based on experience and detection range, performs error verification on them, and confirms whether the corresponding single point errors can be detected. This method is time-consuming and labor-intensive, and due to the limitations of human understanding, it is easy to cause omissions in test scenarios, prolong the iteration cycle, and reduce test efficiency and accuracy.
[0067] In order to solve the above problems, some embodiments of the present application provide a single-point testing method, which can automatically count, number and randomly select single points for any internal signal of the module to be tested through the test script, and output the simulation point information of the corresponding test point according to the output information template, thereby improving the convenience, efficiency and accuracy of STL testing. Figure 1 As shown, Figure 1 A schematic diagram of a single-point testing method provided in an embodiment of the present application, wherein the single-point testing method comprises the following steps:
[0068] S101: Build a test script.
[0069] Among them, the test script is used to count, number and randomly select single points of the internal signals of the module to be tested, and output the test results of the corresponding test points according to the output information template. The test single point is the bit of the signal in the module to be tested, that is, a bit in the signal. The signal is the logic execution carrier in the module to be tested, which is used to define the physical quantity or state in the module to be tested. Through the test script, all the bits of the internal signal of the module to be tested can be extracted, and a bit can be randomly selected for testing to ensure that all bits are fully tested, thereby achieving a high test coverage.
[0070] In some embodiments, a script file can be constructed, and the tools required for the steps of counting, numbering, randomly selecting single points, and outputting simulation point information of the test single points of the internal signals of the test module can be imported into the script file to obtain a test script. For example, a command line parameter parsing library (argparse), a regular expression library (re), a random number generation library (random) and a logging library (logging), etc., wherein the argparse library is used to allow the user to define command line parameters and automatically parse the command line parameters. The re library is used to process text data and can match, search, replace or split strings. The random library is used to generate random numbers or perform random selections. The Logging library is used to add a logging function in the program to provide a flexible logging mechanism.
[0071] In some embodiments, after constructing the script file, a parsing function, a signal bit width calculation function, a macro definition translation function and a random single point function may be written into the script file, and an output information template may be constructed in the script file to obtain a test script.
[0072] like Figure 2 As shown, the framework schematic diagram of the test script provided for the embodiment of the present application, wherein, the parsing function (parse_verilog) is used to parse the hardware description language file (Hardware Description Language, HDL) of the module to be tested, to extract the test single point of the module to be tested. That is, a function that can parse the hardware description language file and extract all signal information inside the module is constructed in the test script. The signal information can include the name, type (such as reg or wire), width (number of bits), direction (input, output or bidirectional) of the signal. For the single-dimensional and multi-dimensional signals inside the module to be tested, the signal information of all signals in the module to be tested can be extracted based on the test script, and branch parsing is performed according to the signal category to obtain each bit of each signal in the module to be tested, i.e., a test single point, which is used for the numbering of subsequent test single points and the random selection of test single points.
[0073] The signal bit width calculation function (calc_bit_width) is used to calculate the signal bit width of the signal in the module to be tested, which is used for the numbering processing of the subsequent test single points.
[0074] The macro definition translation function (convert_macro) is used to translate the macro definition parameters in the hardware description language file into the actual string represented by the macro definition parameters. It is understandable that in order to facilitate project iteration, macro definitions (Macro-define) or custom parameters (Parameters) can be used in the hardware description language file for numerical representation, that is, the actual string in the file is replaced by the macro definition parameters. In order to adapt to this type of scenario, a function that detects macro definitions and translates macro definitions into corresponding actual strings is built in the test script to facilitate parsing of the hardware description language file.
[0075] The random single point function (select_random_bit) is used to perform numbering processing on the test single points of the module to be tested, and randomly select the target test single point from the test single points of the module to be tested for single point testing. That is, a function that can perform numbering processing on all the test single points of the module to be tested and randomly select any test single point is constructed in the test script. After all the test single points inside the module to be tested are obtained by parsing the hardware description language file, they are collected and numbered one by one and stored in the preset dictionary library. At the same time, a numbered test single point can be randomly selected as the target test single point for performing single point detection.
[0076] The output information template is used to instruct the test script to output the test results according to the output information template. It is understandable that the test result information of the single-point test needs to be refined to a certain bit of a certain signal in a certain module. Therefore, in order to facilitate analysis and understanding, the final test result can be output in the form indicated by the output information template.
[0077] S102: Obtain a hardware description language file of the module to be tested.
[0078] The Hardware Description Language (HDL) file is a file used to describe the structure and execution logic of the module to be tested, for example, a Verilog file, a VHDL file, an AHDL file, etc.
[0079] In some embodiments, the file path of the hardware description language file of the module to be tested can be passed into the test script. The test script can obtain the hardware description language file of the module to be tested according to the file path and parse the hardware description language file to extract the test points of the hardware description language file.
[0080] In some embodiments, the file path can be passed to the test script based on the command line, that is, a command line parameter for defining the file path is passed to the test script. The test script can parse the command line parameter to read the file path and obtain the hardware description language file based on the file path.
[0081] In some embodiments, the file path can be passed to the test script via a file, that is, a configuration file containing the file path can be passed to the test script. The test script can parse the configuration file to read the file path and obtain the hardware description language file based on the file path.
[0082] S103: Extracting test points of the hardware description language file based on the test script.
[0083] After obtaining the hardware description language file, the hardware description language file can be parsed based on the parsing function of the test script to obtain the signal information of the module to be tested, which is used for the statistics, numbering and random selection of subsequent test points. Among them, the test point is the bit of the signal in the module to be tested, that is, a bit in the signal.
[0084] In some embodiments, in order to adapt to the situation where there are additional macro definition processing in the hardware description language file, a macro definition file can be created and maintained to store the macro definition parameters required by the module to be tested. That is, the special macro processing required by each module to be tested can be stored in the macro definition file.
[0085] Therefore, after obtaining the hardware description language file, the preset macro definition file can be accessed based on the test script, and the macro definition parameters in the macro definition file can be read. The macro definition parameters are used to represent the actual string in the hardware description language file. The macro definition parameters in the hardware description language file are translated into the actual string represented by the macro definition parameters, so that the hardware description language file after macro definition processing is restored to the actual hardware description language file, and the translated hardware description language file is parsed to obtain the signal information of the module to be tested.
[0086] For example, a macro definition file named "lga_macro" can be maintained. When executing the test, the additional macro definition parameters or custom parameters required inside the module to be tested can be filled in the lga_macro file, so that the test script can read the macro definition parameters or custom parameters from the lga_macro file, and in the parsing process of the hardware description language file, the macro definition parameters or custom parameters in the hardware description language file can be restored to the actual string represented by the macro definition parameters or custom parameters.
[0087] In some embodiments, Figure 3 As shown, for the statistics, numbering and random selection of test points, the signal width of the signal in the module to be tested can be calculated based on the test script, and the signal width is used to characterize the number of bits of the signal. The test points of the module to be tested are numbered according to the signal width, and the corresponding relationship between the test points and the numbers is stored in the dictionary library.
[0088] For example, taking a signal with a signal width of 16 bits as an example, the signal includes 16 bits, and the 16 bits can be numbered as values 1 to 16. In order to facilitate the management of the bits of different signals, the corresponding relationship between the signal name (an identifier used to identify and distinguish different signals) and the 16 bit numbers is stored in the Python dictionary library. In the key-value pairs stored in the dictionary library, the key is the signal name and the value is the bit number.
[0089] When performing a single-point test, you can select a target number in the dictionary library and set the test point corresponding to the target number as the target test point for performing the single-point test. The target number is the number corresponding to any test point in the module to be tested, that is, a numbered signal is randomly selected in the dictionary library to perform a single-point test.
[0090] S104: Setting the target test point to an erroneous logic value.
[0091] After selecting the target test point, you can inject errors into the target test point, that is, introduce errors or faults into the target test point to test the robustness and fault tolerance of the module to be tested.
[0092] In some embodiments, Figure 4 As shown, the target test point can be set to an error logic value, and the error logic value includes a low level state value (0), a high level state value (1), an unknown state value (x), and a high impedance state value (z). Among them, the low level state value represents a low level state. The high level state value represents a high level state. The unknown state value indicates that the state of the signal is unknown. The high impedance state value represents a high impedance state, that is, the state of the signal is in a special state that is neither a high level nor a low level. By setting the bit position of the signal to four signal states of 0, 1, x, and z, the operating state of the module to be tested under the four signal states can be tested.
[0093] S105: Run the module to be tested to obtain a test result corresponding to the module to be tested when the target test point is set to an erroneous logic value.
[0094] After the target test single point is incorrectly noted, the module to be tested is run to obtain the running result of the module to be tested after the target test single point is incorrectly noted, so as to realize single point testing.
[0095] In some embodiments, in order to facilitate analysis and understanding, the test results can be output based on the output information template of the test script. The module level and the error category of the module to be tested can be passed to the test script, and the test script can splice the module level, the signal name and target number corresponding to the target test point, the error category and the test result according to the output information template, and output the spliced test result.
[0096] Among them, the module level is used to characterize the hierarchical structure of the module to be tested in Electronic Design Automation (EDA). In Electronic Design Automation (EDA), the hierarchical structure refers to the abstract level of the designed module to be tested, such as behavioral level, register transfer level, gate level, etc. Note: The error category is the error category corresponding to the error logic value, such as the error category corresponding to the four error logic values of 0, 1, x, and z.
[0097] For example, the output information template may be in the form of "{module level}.{signal name}.[{bit 1}]", "{module level}.{signal name}.[{bit 1}][{bit 2}]", etc. Therefore, for the test result of a certain bit of a certain signal in the module to be tested, the test result after splicing according to the above output information template may be "{module level}.{signal name}.[{bit}.[{test result}]".
[0098] In some embodiments, the module level and error annotation category can be passed to the test script based on the command line or file. The specific passing steps can refer to the passing steps of the file path of the hardware description language file mentioned above, which will not be repeated here.
[0099] In some embodiments, the output file path may be passed to the test script, and the test script may access the output file based on the output file path and write the test results in the output file. For example, a file path named "output point.log" may be passed to the test script based on a command line or a file, so that the test script may write the test results in a file named "output point.log" based on the log record library, which is convenient for subsequent statistics and data analysis.
[0100] In some embodiments, in order to perform coverage analysis of single-point testing to evaluate the effectiveness and completeness of the test, the total number of test points in the dictionary library and the number of tested single points of the tested test points can be obtained. The coverage is calculated based on the number of tested single points and the total number of single points, and the coverage is output. The coverage is the ratio of the number of tested single points to the total number of single points.
[0101] like Figure 5 As shown, when executing the test process, the embodiment of the present application can output the specific simulation point information of the bits of the random signal in the module to be tested by calling the test script and passing a series of data to the test script.
[0102] You can fill in additional macro definition parameters or custom parameters inside the module to be tested in the macro definition file maintained uniformly in the project, and pass the file path of the macro definition file to the test script through the command line or file, so that the test script can read the macro definition parameters or custom parameters and perform hardware description language file parsing.
[0103] The file path of the module to be tested can be passed to the test script through the command line or file, telling the test script the location of the main object to be parsed. The test script parses the command line or file to obtain the hardware description language file of the module to be tested. Then the hardware description language file is parsed to extract signal information, and all bits of the internal signal of the module are numbered one by one and stored in the dictionary library. A numbered bit is randomly selected as the object for the final test execution.
[0104] The level of the module to be tested in EDA can be passed to the test script through the command line or file for output of specific error information.
[0105] The error category of a test point, such as 0, 1, x, z, etc., can be passed to the test script through the command line or file for output of specific error information.
[0106] The file path of the output file of a test point can be passed to the test script through the command line or file to write the test results to the output file.
[0107] In this embodiment, by unifying the standard and utilizing the characteristics of the python3 language, the automatic generation of monitoring points required for STL testing is realized, reducing the complicated work of the verification personnel to extract the required single points one by one. The automatic selection of random bits from the hardware description language file for testing has strong normalization and versatility for the module. If there are additional macro definitions in the hardware description language file that affect the bit width, the macro definition only needs to be added to the macro definition file maintained by the project, which is conducive to the iteration of the verification environment and improves flexibility.
[0108] By weakening the differences in design, hierarchy, and signal complexity between different modules, unified processing is achieved. The strong binding between testers and modules is released, and there is no need to deeply understand the details of the modules. Testing can be performed through scripts and processes. The dependencies between modules are separated. Even if a module has a problem, it will not affect the normal testing of other modules, thus improving the efficiency of STL testing.
[0109] Based on the above single point testing method, some embodiments of the present application also provide a single point testing device, including a single point extraction module and a testing module, wherein:
[0110] A single point of extraction module for building test scripts.
[0111] Obtain a hardware description language file of the module to be tested, where the hardware description language file is used to describe the structure and execution logic of the module to be tested.
[0112] A test point of a hardware description language file is extracted based on a test script, where the test point is a bit position of a signal in a module to be tested.
[0113] Sets the target test point to an error logic value.
[0114] The test module is used to run the module to be tested to obtain the test result corresponding to the module to be tested when the target test single point is set to an erroneous logical value.
[0115] Based on the above single point test method. Some embodiments of the present application also provide an electronic device, such as Figure 6 As shown, Figure 5 The structural block diagram of an electronic device provided in an embodiment of the present application, the electronic device 800 includes: at least one processor 801, at least one communication interface 802, at least one memory 803 and at least one bus 804. Among them, the bus 804 is used to realize the direct connection and communication of these components, the communication interface 802 is used to communicate signaling or data with other node devices, and the memory 803 stores computer program instructions that can be executed by the processor 801. When the electronic device 800 is running, the processor 801 communicates with the memory 803 through the bus 804, and the processor 801 calls the computer program stored in the memory 803 and executes the computer program to realize the single-point test method provided in the embodiment of the present application.
[0116] Similar parts between the embodiments provided in this application can be referenced to each other. The specific implementation methods provided above are only a few examples under the general concept of this application and do not constitute a limitation on the protection scope of this application. For those skilled in the art, any other implementation methods expanded based on the scheme of this application without creative work belong to the protection scope of this application.
Claims
1. A single point test method, It is characterized in that The method comprises: Build test scripts; Obtaining a hardware description language file of the module to be tested, wherein the hardware description language file is used to describe the structure and execution logic of the module to be tested; Extracting a test point of the hardware description language file based on the test script, the test point being a bit position of a signal in the module to be tested; Set the target test point to an incorrect logic value; The module to be tested is run to obtain a test result corresponding to the module to be tested when the target test point is set to an erroneous logic value.
2. The single-point testing method according to claim 1, It is characterized in that The steps of constructing the test script include: Build script files; The script file is written with a parsing function, a signal bit width calculation function, a macro definition translation function and a random single point function; the parsing function is used to parse a hardware description language file to extract a test single point of the module to be tested; the signal bit width calculation function is used to calculate the signal bit width of a signal in the module to be tested; the macro definition translation function is used to translate the macro definition parameters in the hardware description language file into actual character strings represented by the macro definition parameters; the random single point function is used to perform numbering processing on the test single points of the module to be tested, and to select a target test single point from the test single points of the module to be tested; An output information template is constructed in the script file to obtain a test script, wherein the output information template is used to instruct the test script to output the test result according to the output information template.
3. The single point testing method according to claim 2, It is characterized in that The method further comprises: Passing the file path of the hardware description language file of the module to be tested into the test script; The hardware description language file of the module to be tested is obtained according to the file path based on the test script, and the hardware description language file is parsed to extract the test single point of the hardware description language file.
4. The single-point testing method according to claim 3, It is characterized in that The method further comprises: Accessing a macro definition file based on the test script, wherein the macro definition file is used to store macro definition parameters required by the module to be tested; Reading macro definition parameters in the macro definition file, wherein the macro definition parameters are used to represent actual character strings in the hardware description language file; The macro definition parameters in the hardware description language file are translated into actual character strings represented by the macro definition parameters.
5. The single-point testing method according to claim 2, It is characterized in that The method further comprises: Calculating the signal bit width of the signal in the module to be tested based on the test script, wherein the signal bit width is used to characterize the number of bits of the signal; Setting numbers for the test points of the module to be tested according to the signal bit width; The corresponding relationship between the test points and the numbers is stored in the dictionary library; Selecting a target number in the dictionary library, the target number being a number corresponding to any test point in the module to be tested; Set the test point corresponding to the target number as the target test point.
6. The single-point testing method according to claim 5, It is characterized in that The method further comprises: Obtaining the total number of test points in the dictionary library and the number of tested points of the tested test points; Calculate coverage, where the coverage is the ratio of the number of tested single points to the total number of single points; The coverage ratio is output.
7. The single-point testing method according to claim 6, It is characterized in that The method further comprises: Passing the module level and error annotation category of the module to be tested into the test script, wherein the module level is used to characterize the hierarchical structure of the module to be tested, and the error annotation category is the error category corresponding to the erroneous logic value; splicing the module level, the signal name and target number corresponding to the target test point, the error category and the test result according to the output information template; Output the spliced test results.
8. The single-point testing method according to claim 2, It is characterized in that The method further comprises: Passing the output file path to the test script; Accessing an output file based on the output file path; The test results are written in the output file.
9. A single point test device, It is characterized in that It includes single-point extraction module and test module, among which: The single point extraction module is used to construct a test script; Obtaining a hardware description language file of the module to be tested, wherein the hardware description language file is used to describe the structure and execution logic of the module to be tested; Extracting a test point of the hardware description language file based on the test script, the test point being a bit position of a signal in the module to be tested; Set the target test point to an incorrect logic value; The testing module is used to run the module to be tested to obtain the test result corresponding to the module to be tested when the target test single point is set to an erroneous logical value.
10. An electronic device, It is characterized in that include: processor, memory, and bus; The processor and the memory establish a communication connection via the bus; The memory stores instructions executable by the processor; The processor is configured to: Build test scripts; Obtaining a hardware description language file of the module to be tested, wherein the hardware description language file is used to describe the structure and execution logic of the module to be tested; Extracting a test point of the hardware description language file based on the test script, the test point being a bit position of a signal in the module to be tested; Set the target test point to an incorrect logic value; The module to be tested is run to obtain a test result corresponding to the module to be tested when the target test point is set to an erroneous logic value.
