Chip test vector generation method, system, device and storage medium

By generating hex files and configuring target test files, and using compilation software to generate chip test vectors, the problem of increased time and misjudgment risks caused by simulation dependence in traditional methods is solved, and efficient and accurate test vector generation is achieved.

CN118425742BActive Publication Date: 2024-09-03合肥智芯半导体有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410877537.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-09-03
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

Traditional chip test vector generation methods rely on simulation, which leads to the risk of misjudgment due to unconcerned comparison values. As the scale of integrated circuits expands, test time increases significantly, affecting efficiency and cost.

Method used

By generating a hex file, configure the target test file according to the target test requirements, use the compilation software to read and write the startup port identifier, load port identifier, port operation sequence and vector observation value, and generate the test vector file to avoid the simulation process and simplify the configuration steps. , adapt to different testing needs and chip types.

Benefits of technology

It shortens test preparation and vector generation time, reduces the risk of test failure, and improves test accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118425742B
    Figure CN118425742B
Patent Text Reader

Abstract

The present invention relates to the field of chip testing technology, and provides a test vector generation method, system, device and storage medium for a chip, generates a hex file through a test code to be executed, and configures the target test file according to the target test requirements and the hex file, thereby simplifying the cumbersome configuration steps in the traditional test process, and by configuring the target test file, it can be conveniently adapted to different test requirements and chip types. The target test file is input into the compilation software, and the target test vector can be quickly generated, so that the effect of generating the test vector without simulation is achieved, which greatly shortens the time for test preparation and generating the test vector, and improves the overall test efficiency. At the same time, the process of configuring the target test file only compares the output values ​​of concern, avoiding the interference of the comparison values ​​of no concern on the test results, thereby reducing the risk of test failure and improving the accuracy of the test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip testing technology, and in particular to a chip test vector generation method, system, device and storage medium. Background Art

[0002] During the mass production test of integrated circuits, it is usually necessary to load the test program into non-volatile storage units such as SRAM or Flash on the chip and execute it by the CPU core. The output of the test program is observed by ATE (automatic test equipment) to verify the function and performance of the integrated circuit. The traditional ATE test vector generation method mainly relies on the way of grabbing port values ​​during the simulation process, which has multiple problems.

[0003] First, traditional methods often introduce unrelated comparison values, which do not directly affect the test results during the test process, but their existence may lead to misjudgment, thereby increasing the risk of test failure. Second, with the continuous expansion of the scale of integrated circuits, the time required for simulation-based test vector generation methods has increased significantly, which not only affects test efficiency but also increases test costs. Summary of the invention

[0004] In view of this, the purpose of the present invention is to propose a test vector generation method, system, device and storage medium for a chip, aiming to solve one of the technical problems in the related art at least to a certain extent.

[0005] Based on the above objectives, the first objective of the present invention is to provide a test vector generation method for a chip, comprising: generating a hex file according to a test code to be executed; wherein the test code to be executed is compiled according to a target test requirement; The target test file is configured according to the target test requirements and the hex file, and the target test file is input into the compilation software; the compilation software reads the startup port identifier and the startup port value required for the chip under test to enter the target test mode from the target test file, and writes the startup port identifier and the startup port value into the first vector sequence; the compilation software reads the hex file path in the hex file from the target test file, reads the load port identifier and the test data required to load the test data to the chip under test according to the hex file path, and writes the load port identifier and the test data into the second vector sequence; wherein, the load port identifier is used to indicate that the test data is loaded into the target load port of the chip under test; the compilation software reads the port operation sequence required for the chip under test to release the CPU, and writes the port operation sequence into the third vector sequence; the compilation software reads the vector observation value required for testing the chip under test from the target test file, and writes the vector observation value into the fourth vector sequence; wherein, the vector observation value is used to test the chip under test; the compilation software obtains the test vector file according to the first vector sequence, the second vector sequence, the third vector sequence and the fourth vector sequence.

[0006] Thus, the present invention generates a hex file through the test code to be executed, and configures the target test file according to the target test requirements and the hex file, which simplifies the cumbersome configuration steps in the traditional test process, and by configuring the target test file, it can be easily adapted to different test requirements and chip types. The target test file is input into the compiler software, and the target test vector can be quickly generated, achieving the effect of generating the test vector without simulation, greatly shortening the time for test preparation and generating the test vector, and improving the overall test efficiency. At the same time, the process of configuring the target test file only compares the output values ​​of concern, avoiding the interference of the comparison values ​​of no concern on the test results, thereby reducing the risk of test failure and improving the accuracy of the test.

[0007] The second objective of the present invention is to provide a test vector generation system for a chip.

[0008] A third objective of the present invention is to provide an electronic device.

[0009] A fourth object of the present invention is to provide a computer-readable storage medium.

[0010] To achieve the above-mentioned purpose, the first embodiment of the present invention proposes a test vector generation method for a chip, firstly generating a hex file according to the test code to be executed; wherein the test code to be executed is compiled according to the target test requirements; configuring the target test file according to the target test requirements and the hex file, and inputting the target test file into the compilation software; the compilation software reads the startup port identifier and the startup port value required for the chip to be tested to enter the target test mode from the target test file, and writes the startup port identifier and the startup port value into the first vector sequence; the compilation software reads the hex file path in the hex file from the target test file, and reads the load vector according to the hex file path. The compiler software reads the port operation sequence required for the chip under test to release the CPU, and writes the port operation sequence into the third vector sequence; the compiler software reads the vector observation values ​​required for testing the chip under test from the target test file, and writes the vector observation values ​​into the fourth vector sequence; the vector observation values ​​are used to test the chip under test; the compiler software obtains the test vector file according to the first vector sequence, the second vector sequence, the third vector sequence and the fourth vector sequence.

[0011] In addition, the data processing method according to the above embodiment of the present invention may also have the following additional technical features:

[0012] According to some embodiments of the present invention, the test code to be executed includes a load port identifier of the chip to be tested and test data;

[0013] Generate a hex file based on the test code to be executed, including:

[0014] Input the load port identifier and test data into the compiler, compile the test data from high bit to low bit, and generate a hex file.

[0015] According to some embodiments of the present invention, configuring a target test file according to the target test requirement and the hex file includes:

[0016] Determine the target test mode according to the target test requirements;

[0017] Set the start port identifier and start port value required to start the chip under test to enter the target test mode;

[0018] Determine the communication protocol required to start the chip under test into the target test mode;

[0019] Configure the target test file according to the target test mode, the start port identifier, the start port value, and the communication protocol.

[0020] According to some embodiments of the present invention, configuring a target test file according to target test requirements and a hex file further includes:

[0021] Set the load port identifier required to load the test data to the chip under test, and configure the target test file according to the load port identifier.

[0022] According to some embodiments of the present invention, configuring a target test file according to target test requirements and a hex file further includes:

[0023] Describe the port operation sequence required to release the CPU after the test data is loaded into the chip under test, and configure the target test file according to the port operation sequence; wherein the port operation sequence is used to ensure that after the test data is loaded into the chip under test, the chip under test can normally release the CPU and start executing the test data.

[0024] According to some embodiments of the present invention, configuring a target test file according to target test requirements and a hex file further includes:

[0025] Setting a test cycle and a test mode instance of a target test mode; wherein the test mode instance includes a test instance name, a forced stimulus for a test signal, a test frequency for testing the test signal, and pulse signal information;

[0026] Configure the target test files according to the test cycle and test mode instance.

[0027] According to some embodiments of the present invention, the further comprising:

[0028] Determine the format and save path of the test vector file, and configure the target test file according to the format and save path; the formats include ATP, AVC and Verilog testbench.

[0029] According to the test vector generation method of the chip of the embodiment of the present invention, first, a hex file is generated according to the test code to be executed; wherein the test code to be executed is compiled according to the target test requirements; the target test file is configured according to the target test requirements and the hex file, and the target test file is input into the compilation software; the compilation software reads the startup port identifier and the startup port value required for the chip to be tested to enter the target test mode from the target test file, and writes the startup port identifier and the startup port value into the first vector sequence; the compilation software reads the hex file path in the hex file from the target test file, reads the load port identifier and the test data required to load the test data to the chip to be tested according to the hex file path, and writes the load port identifier and the test data into the second vector sequence; wherein the load port identifier is used to indicate that the test data is loaded into the target load port of the chip to be tested; the compilation software reads the port operation sequence required for the chip to be tested to release the CPU, and writes the port operation sequence into the third vector sequence; the compilation software reads the vector observation value required for testing the chip to be tested from the target test file, and writes the vector observation value into the fourth vector sequence; wherein the vector observation value is used to test the chip to be tested; the compilation software obtains the test vector file according to the first vector sequence, the second vector sequence, the third vector sequence and the fourth vector sequence.

[0030] To achieve the above object, a second embodiment of the present invention provides a test vector generation system for a chip, the system comprising:

[0031] A generation module is used to generate a hex file according to the test code to be executed; wherein the test code to be executed is compiled according to the target test requirements;

[0032] Configuration module, used to configure the target test file according to the target test requirements and the hex file, and input the target test file into the compilation software;

[0033] A compiling software module is used to read the startup port identifier and the startup port value required for the chip under test to enter the target test mode from the target test file, and write the startup port identifier and the startup port value into the first vector sequence;

[0034] Reading a hex file path in a hex file from a target test file, reading a load port identifier and test data required to load test data to the chip under test according to the hex file path, and writing the load port identifier and the test data into a second vector sequence; wherein the load port identifier is used to indicate that the test data is loaded into a target load port of the chip under test;

[0035] Read the port operation sequence required by the chip under test to release the CPU, and write the port operation sequence into the third vector sequence;

[0036] Reading vector observation values ​​required for testing the chip under test from the target test file, and writing the vector observation values ​​into a fourth vector sequence; wherein the vector observation values ​​are used for testing the chip under test;

[0037] A test vector file is obtained according to the first vector sequence, the second vector sequence, the third vector sequence and the fourth vector sequence.

[0038] A test vector generation system provided according to an embodiment of the present invention includes a generation module, a configuration module, and a compilation software module, wherein the generation module is used to generate a hex file according to a test code to be executed; the test code to be executed is compiled according to target test requirements; The configuration module is used to configure the target test file according to the target test requirements and the hex file, and input the target test file into the compilation software; the compilation software module is used to read the startup port identifier and the startup port value required for the chip under test to enter the target test mode from the target test file, and write the startup port identifier and the startup port value into the first vector sequence; read the hex file path in the hex file from the target test file, read the load port identifier and the test data required to load the test data to the chip under test according to the hex file path, and write the load port identifier and the test data into the second vector sequence; wherein the load port identifier is used to indicate that the test data is loaded into the target load port of the chip under test; read the port operation sequence required for the chip under test to release the CPU, and write the port operation sequence into the third vector sequence; read the vector observation value required for testing the chip under test from the target test file, and write the vector observation value into the fourth vector sequence; wherein the vector observation value is used to test the chip under test; obtain the test vector file according to the first vector sequence, the second vector sequence, the third vector sequence and the fourth vector sequence.

[0039] To achieve the above-mentioned purpose, the third aspect of the present invention proposes an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the program, the test vector generation method of the chip as described above is implemented.

[0040] In order to achieve the above-mentioned purpose, a fourth aspect of the present invention proposes a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the test vector generation method for the chip described above.

[0041] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the present invention or 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 in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A schematic flow chart of a method for generating test vectors for a chip provided in an embodiment of the present invention.

[0044] Figure 2 A schematic diagram of a test vector generation system for a chip provided in an embodiment of the present invention.

[0045] Figure 3 A more specific schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention.

[0046] Reference numerals: first generation module- 201 , second generation module- 202 , third generation module- 203 , processor- 310 , memory- 320 , input / output interface- 330 , communication interface- 340 , and bus- 350 . DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.

[0048] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Words such as "include" or "comprise" mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0049] As mentioned in the background technology section, the main purpose of integrated circuit testing (IC testing) is to distinguish qualified chips from unqualified chips to ensure product quality and reliability. With the rapid development of integrated circuits, their scale is getting larger and larger, and the requirements for circuit quality and reliability are further improved, and the testing methods of integrated circuits are becoming more and more difficult.

[0050] In the prior art, in order to achieve the above purpose, various chip testing equipment is needed. This type of equipment is the so-called ATE (Automatic Test Equipment), which refers to an integrated circuit (IC) automatic tester, which is used to detect the integrity of the integrated circuit function. It is the final process of integrated circuit production and manufacturing to ensure the quality of integrated circuit production and manufacturing. During the chip testing process, ATE sends the input timing of the test vector (pattern) to the input pin of the tested chip, compares the output timing of the output pin of the tested chip with the expected timing of the test vector (pattern), and determines whether the test chip meets the requirements based on the comparison results to judge the performance of the chip.

[0051] In the process of implementing the present invention, the applicant discovered that in the prior art, the test program is usually downloaded to the SRAM or non-volatile storage unit Flash on the chip and executed by the CPU core, and the output of the program is observed by the automatic test equipment (ATE). The ATE test vector (pattern) in this process is realized by grabbing the value of the port during the simulation process, which will inevitably introduce unimportant comparison values ​​and may cause the failure of the final test. At the same time, this simulation-based test vector generation requires a considerable amount of time in large-scale integrated circuit design. Therefore, how to quickly and efficiently generate test vectors so that the test output is an output value of concern is a technical problem that needs to be solved urgently.

[0052] The technical solution of the present invention is further described in detail below through specific embodiments.

[0053] refer to Figure 1 , which is a flow chart of a test vector generation method for a chip provided in an embodiment of the present invention.

[0054] Step S101, generating a hex file according to the test code to be executed; wherein the test code to be executed is compiled according to the target test requirements.

[0055] In specific implementation, the main goal of chip testing is to ensure the correct function and performance of the chip. Specifically, the test objectives include but are not limited to verifying whether the function of the chip is consistent with the design requirements, such as the correct operation of each logic gate, the accuracy of input and output, etc.; testing the performance parameters of the chip, such as clock frequency, power consumption, response time, etc.; detecting the reliability and stability of the chip, such as long-term running tests, tests under temperature and voltage changes, etc. In order to effectively test the chip, it is necessary to build a corresponding test environment, including the use of appropriate test tools, such as programmers, emulators, test scripts, etc.; using corresponding test software, such as automated test equipment (ie, the ATE mentioned above), test data analysis tools, etc. It is also necessary to prepare enough chip samples for various tests and verifications.

[0056] The target test requirements define the purpose, scope, conditions and expected results of the test. The target test requirements are the guidance and basis for testers to conduct test experiments on chips.

[0057] Among them, the target test requirements clarify the purpose of the test, including determining whether the test is to verify the functional correctness and performance stability of the integrated circuit, or to discover potential design defects or manufacturing process problems. Clarifying the test purpose helps testers develop targeted test plans and strategies. Secondly, the target test requirements describe the scope of the test in detail, including determining the chip model, functional module, interface protocol, etc. that need to be tested. By clarifying the test scope, testers can avoid missing important test points and reduce unnecessary testing work. In addition, the target test requirements also specify the conditions for the test, including requirements for the test environment, test tools, test data, etc. For example, the test environment may require specific temperature, humidity, and electromagnetic interference conditions; the test tool may need to support specific communication protocols and interface standards; and the test data may need to comply with specific formats and scopes. By clarifying the target test requirements, testers can ensure the accuracy and reliability of the test results. Finally, the target test requirements clarify the expected test results, including defining the criteria for success and failure, as well as possible abnormal situations and handling methods. The expected test results help testers to promptly discover and handle problems during the test process, and also provide a basis for subsequent test analysis and improvement.

[0058] As an optional embodiment, the test code to be executed is usually written in C language, including the load port identifier of the chip to be tested and the test data, and is compiled into a hexadecimal hex file by a compiler of a specific platform. The purpose of this design is to combine the efficiency of C language and the versatility of hex files, so that the test program can be easily loaded onto the chip to be tested for execution. Among them, the load port identifier is used to indicate that the test data is loaded into the target load port of the chip to be tested.

[0059] As an optional embodiment, the test code to be executed includes a load port identifier of the chip to be tested and test data.

[0060] Generate a hex file based on the test code to be executed, including:

[0061] Input the load port identifier and test data into the compiler, compile the test data from high bit to low bit, and generate a hex file.

[0062] The compiler is a tool that converts C language source code into machine language code. During the integrated circuit testing process, the tester needs to use the compiler of the corresponding platform to compile the test program written in C language into a hex file.

[0063] A hex file is a commonly used text format file that records binary format information and contains machine language code and data required for program execution. By compiling the test code to be executed into a hex file, the test code can be easily loaded into the SRAM or Flash storage unit of the chip to be tested and executed by the CPU core.

[0064] Step S102, configuring a target test file according to the target test requirement and the hex file, and inputting the target test file into a compiling software.

[0065] Specifically, the target test file is input into the compiling software, and the compiling software reads the relevant information in the target test file to generate a test vector file.

[0066] Step S103, the compiling software reads the startup port identifier and the startup port value required for the chip under test to enter the target test mode from the target test file, and writes the startup port identifier and the startup port value into the first vector sequence;

[0067] Step S104, the compiler software reads the hex file path in the hex file from the target test file, reads the load port identifier and test data required to load the test data to the chip under test according to the hex file path, and writes the load port identifier and the test data into a second vector sequence; wherein the load port identifier is used to indicate that the test data is loaded into the target load port of the chip under test;

[0068] Step S105, the compiling software reads the port operation sequence required by the chip under test to release the CPU, and writes the port operation sequence into a third vector sequence;

[0069] Step S106, the compilation software reads the vector observation values ​​required for testing the chip under test from the target test file, and writes the vector observation values ​​into a fourth vector sequence; wherein the vector observation values ​​are used to test the chip under test.

[0070] Step S107: the compiling software obtains a test vector file according to the first vector sequence, the second vector sequence, the third vector sequence and the fourth vector sequence.

[0071] Specifically, step S103 to step S106 are the entire test process for configuring the target test file (json configuration file), which is described in parts P1, P2, P3, and P4 in turn. The execution code is:

[0072] "test steps": {

[0073] "P1": {

[0074] "timeplate": "test mode entry",

[0075] "constraints": {

[0076] "RESET B": "0",

[0077] "EXTAL CLK": "1",

[0078] "RAMACCESS": "X",

[0079] "RAMACCESS EN": "X"

[0080] },

[0081] "procedure file": "procedure mode entry.json"

[0082] },

[0083] "P2": {

[0084] "timeplate": "ram access",

[0085] "constraints": {

[0086] "RESET B": "1",

[0087] "EXTAL CLK": "1",

[0088] "JTAG TCK": "1"

[0089] },

[0090] "procedure file": "procedure ram access.json"

[0091] },

[0092] "P3": {

[0093] "timeplate": "test mode entry",

[0094] "constraints": {

[0095] "RESET B": "1",

[0096] "EXTAL CLK": "1",

[0097] "JTAG TCK": "1"

[0098] },

[0099] "procedure file": "procedure release cpu.json"

[0100] },

[0101] "P4": {

[0102] "timeplate": "functional test",

[0103] "constraints": {

[0104] "RESET B": "1",

[0105] "EXTAL CLK": "1",

[0106] "JTAG TCK": "1",

[0107] },

[0108] "procedure file": "procedure functional test.json"

[0109] }

[0110] }.

[0111] "test steps" / / This section describes the different test steps and related information in the test process. In the embodiment of the present application, it includes "P1", "P2", "P3" and "P4" steps. Each step contains the following attributes:

[0112] As an optional embodiment, the target test mode is determined according to the target test requirements; the startup port identifier and the startup port value required to start the chip under test to enter the target test mode are set; the communication protocol required to start the chip under test to enter the target test mode is determined; and the target test file is configured according to the target test mode, the startup port identifier, the startup port value and the communication protocol.

[0113] "P1":{"timeplate":"test_mode_entry","constraints":{"RESET_B":"0","EXTAL_CLK":"1","RAMACCESS":"X","RAMACCESS_EN":"X"},"procedure_file":"procedure_mode_entry.json"} / / The "timeplate" field specifies the time plate used by this test step.

[0114] For example, the timing template used in step P1 is "test_mode_entry". RESET_B is set to 0, indicating that the reset signal is inactive. EXTAL_CLK is set to 1, indicating that the external clock signal is active. RAMACCESS and RAMACCESS_EN are both set to X, which usually indicates an uncertain or undefined state in the hardware description.

[0115] Among them, RESET_B, EXTAL_CLK, RAMACCESS and RAMACCESS_EN can be understood as the start port identifier, "0", "1", "X", "X" can be understood as the start port value. The P1 part can be understood as the first vector sequence.

[0116] As an optional embodiment, a load port identifier required for loading test data into the chip to be tested is set, and a target test file is configured according to the load port identifier.

[0117] "P2": {"timeplate":"ram_access","constraints":{"RESET_B":"1","EXTAL_CLK":"1","JTAG_TCK":"1"},"procedure_file":"procedure_ram_access.json"} / / The time template used in the P2 step is "ram_access". RESET_B is set to 1, indicating that the reset signal is active. EXTAL_CLK is set to 1, indicating that the external clock signal is active. JTAG_TCK is set to 1, indicating that the JTAG test clocks are all active. "procedure_file" specifies the file containing the detailed operations of the "ram_access" step, and the file name is "procedure_ram_access.json".

[0118] RESET_B, EXTAL_CLK and JTAG_TCK can be understood as load port identifiers, and the P2 part can be understood as a second vector sequence.

[0119] As an optional embodiment, a port operation sequence required to release the CPU after the test data is loaded into the chip under test is described, and a target test file is configured according to the port operation sequence; wherein, the port operation sequence is used to ensure that after the test data is loaded into the chip under test, the chip under test can normally release the CPU and start executing the test data.

[0120] "P3": {"timeplate":"test_mode_entry","constraints":{"RESET_B":"1","EXTAL_CLK":"1","JTAG_TCK":"1"},"procedure_file":"procedure_release_cpu.json"} / / The time template used in the P3 step is "test_mode_entry". RESET_B is set to 1, indicating that the reset signal is active. EXTAL_CLK is set to 1, indicating that the external clock signal is active. JTAG_TCK is set to 1, indicating that the JTAG test clocks are all active. "procedure_file" specifies the file containing the detailed operations of the "release_cpu" step, and the file name is "procedure_release_cpu.json".

[0121] P3 is the step of releasing the CPU. This step records the chip port operations required to release the CPU. After the software gets these values, it writes them into the vector file. RESET_B, EXTAL_CLK and JTAG_TCK can be understood as the port operation sequence. The P3 part can be understood as the third vector sequence.

[0122] As an optional embodiment, a test cycle and a test mode instance of a target test mode are set; wherein the test mode instance includes a test instance name, a forced stimulus for a test signal, a test frequency for testing the test signal, and pulse signal information; and a target test file is configured according to the test cycle and the test mode instance.

[0123] "P4": {"timeplate":"functional_test","constraints":{"RESET_B":"1","EXTAL_CLK":"1","JTAG_TCK":"1"},"procedure_file":"procedure_ functional_test.json"} / / The time plate used in the P4 step is "functional_test". RESET_B is set to 1, indicating that the reset signal is active. EXTAL_CLK is set to 1, indicating that the external clock signal is active. JTAG_TCK is set to 1, indicating that the JTAG test clocks are all active. "procedure_file" specifies the file containing the detailed operations of the "functional_test" step, and the file name is "procedure_ functional_test.json".

[0124] P4 is the program execution phase, which records what output will be obtained at the corresponding ports (RESET_B, EXTAL_CLK and JTAG_TCK) after the program is executed. The compiler software also reads these vector observation values ​​and writes them into the vector file in the form of the fourth vector sequence.

[0125] The following is a compilation example to explain the overall implementation process of configuring the target test file.

[0126] It should be noted that the description or definition after the “ / / ” character is used to explain the non-natural language meaning before the “ / / ” character.

[0127] deframaccess_pat_gen(self):

[0128] #compile c codes;

[0129] hex_gen =HexFileGen(self.config);

[0130] hex_gen.compile();

[0131] #jtag_sequence_gen&hex2sequence;

[0132] pat_assemble=PatternAssemble(self.config);

[0133] pat_assemble.gen_pattern();

[0134] # write_pattern;

[0135] pat_writer = PatternWriter(self.config, pat_assemble.get_pattern());

[0136] pat_writer.write().

[0137] def ramaccess_pat_gen(self): / / defines a method named ramaccess_pat_gen, which belongs to a class (inferred by the self parameter) and is used to generate a test vector (pattern) for accessing RAM (random access memory).

[0138] #compile c codes / / Indicates that the following code block is used to compile C code.

[0139] hex_gen = HexFileGen(self.config) / / Creates a HexFileGen object, which is responsible for compiling the C code (i.e. the test code to be executed) into a hex file. self.config can include the parameters required for compilation, such as the path of the C code, compiler options, etc.

[0140] hex_gen.compile() / / Call the compile method of the HexFileGen object, which actually compiles the C code and generates a hex file. The hex file contains the test data for loading onto the chip under test; the test data is a series of serial numbers formed by a series of encryption and hashing of the serial number of the chip under test.

[0141] # jtag_sequence_gen&hex2sequence / / indicates that the following code block involves the generation of JTAG sequence and the conversion from hex to sequence.

[0142] pat_assemble=PatternAssemble(self.config) / / Creates a PatternAssemble object, which is responsible for assembling the corresponding test port sequences into a pattern. This pattern contains instructions and test data sent to the chip under test through a specific interface (such as JTAG) to first enter a target test mode, and then convert the data in the hex file into a chip port sequence that can be loaded into RAM through ATE.

[0143] pat_assemble.gen_pattern() / / Call the gen_pattern method of the PatternAssemble object, which converts the previously generated hex file into a test sequence that can be injected into the chip through ATE, and then assembles it together with the JTAG sequence that first enters the test mode.

[0144] # write_pattern / / indicates that the following code block is used to write the pattern file.

[0145] pat_writer = PatternWriter(self.config, pat_assemble.get_pattern()) / / Creates a PatternWriter object.

[0146] This object is responsible for writing the pattern sequence to a file. pat_assemble.get_pattern() obtains the previously generated pattern sequence and passes it as a parameter to PatternWriter.

[0147] pat_writer.write() / / Call the write method of the PatternWriter object, which is responsible for writing the pattern sequence to the specified file.

[0148] As can be seen from the above, the entire process of the ramaccess_pat_gen method is automated. It starts with compiling the C code, generating a hex file, then converting the hex into a sequence that can be loaded into the storage through the external port of the chip under test, and finally generating a pattern file (i.e., a test vector file).

[0149] {

[0150] “running_ mode”:“ram_access_pattern_gen”

[0151] “protocol”:protocol “JTAG”

[0152] “test_lable”:“ram_access_user_pattern”

[0153] “c_compile”:{

[0154] “project_dir”:“your_project_direction”,

[0155] “options” :{

[0156] “test”:“ram_access_user_pattern”,

[0157] “caseset”:“ate”,

[0158] “make only”:“”

[0159] }

[0160] },

[0161] “hex”:{

[0162] “file_name”: “ram_access_user_pattern.ram.hex”,

[0163] “total_bits”:“40”,

[0164] “data_bits”:“32”,

[0165] “ecc”:{

[0166] “ecc_bits”:“7”

[0167] “ecc_function”:“ram_ecc_encoder_32_7”

[0168] “ecc_bits_site”:“MSB”

[0169] }

[0170] }。

[0171] Among them, "running_ mode": "ram_access_pattern_gen" / / "running_mode" indicates the mode identifier required by the system; "ram_access_pattern_gen" indicates that the current running mode is "RAM access pattern generation", and the next operation to be performed by the system is to generate the target test pattern for RAM access.

[0172] "protocol": protocol "JTAG" / / "protocol" indicates the protocol supported by the system, used to enter test_mode; "JTAG" indicates that the communication protocol used to test and access RAM is JTAG. JTAG is a hardware debugging interface standard that allows access and control of hardware devices through a specific interface.

[0173] "test_lable": "ram_access_user_pattern" / / "test_lable" indicates the label in the pattern file that indicates which test_case (test case); "ram_access_user_pattern" is the label of the test, which is used to identify a specific test or test pattern. Test labels help track and identify specific test instances in log records, result reports, or other documents.

[0174] "c_compile" / / This key contains configuration information for compiling C code, instructing the system how to generate the user's hex file.

[0175] "project_dir": "your_project_direction" / / "your_project_direction" specifies the directory where the test code to be executed is located.

[0176] "options" / / represents a sub-dictionary containing compilation options.

[0177] "test": "ram_access_user_pattern" / / "ram_access_user_pattern" can be a compile option used to specify a test name or type.

[0178] "caseset": "ate" / / "ate" refers to a test set or configuration related to automated test equipment (ATE).

[0179] "make only": "" / / The value of this key is empty, which means that the compilation process only needs to execute the "make" command, and no other additional build or configuration steps are required.

[0180] "hex" / / This key contains configuration information related to generating hex files, instructing the system how to load the generated hex files into the pattern sequence of ATE.

[0181] "file_name": "ram_access_user_pattern.ram.hex" / / "ram_access_user_pattern.ram.hex" is the name of the generated hex file.

[0182] "total_bits": "40" / / "40" indicates the total number of bits for each data unit in the hex file.

[0183] "data_bits": "32" / / "32" indicates the number of bits actually used for data in each data unit.

[0184] "ecc" / / indicates that this sub-dictionary contains configuration information for error checking and correction (ECC).

[0185] "ecc_bits": "7" / / "7" indicates the number of ECC bits. This value determines how many check bits are added to the test data to correct errors.

[0186] "ecc_function": "ram_ecc_encoder_32_7" / / "ram_ecc_encoder_32_7" specifies the ECC encoding function. The ECC encoding function determines how to generate the corresponding ECC check bits based on the test data bits.

[0187] "ecc_bits_site": "MSB" / / "MSB" specifies at which end of the data bit the ECC bit is added. There are usually two options, namely adding it to the high bit (MSB, Most Significant Bit) or the low bit (LSB, Least Significant Bit) of the data bit. In the embodiment of the present application, the ECC bit is added to the high bit of the data bit.

[0188] In the hex file, its content is:

[0189] / * E0008003:ram_access_user_pattern.srec * /

[0190] @Load port identifier + test data.

[0191] @ is followed by the RAM address (i.e. the loading port identifier of the chip to be tested), followed by the test data at the address (8-bit hexadecimal number, representing 32-bit binary data). During the test process, the test data needs to be loaded into the RAM, which is achieved through circuit design. When entering the test mode, there will be several ports in the design connected to the datapin of the RAM, so that the test data can be directly loaded into the RAM of the chip to be tested. Generally speaking, in a 32-bit system, the data pin of the RAM will have an additional 7 bits of ecc_bits, so there will be 39 bits of data bits in the end, but in the specific design, 39 ports will not be opened for loading data, so a loop is required to load 39 bits of data through 8 ports.

[0192] The first 32-bit data of the hex file is 20007FF0, which will eventually form 40-bit data (user-configurable, high bits are filled with 0), for example: 0+7 ecc bits +20007FF0. It is loaded into RAM through the user-specified "RAMACCESS" port (which needs to be described in the json configuration file from high to low) by looping 5 times, 8 bits each time, from high to low (user-unconfigurable).

[0193] As an optional embodiment, when configuring the target test file, it is also necessary to determine the mapping relationship between the test signal of the chip to be tested and the pin of the chip to be tested, and determine the mapping order of the test signal on the pin. Specifically:

[0194] "pin_map" describes the mapping relationship between each test signal and the pin of the chip under test.

[0195] "RESET_B": "pta[5]" / / Indicates that the RESET_B test signal is mapped to pin pta[5].

[0196] "JTAG_TMS": "pta[4]" / / Indicates that the JTAG_TMS test signal is mapped to pin pta[4].

[0197] "JTAG_TDI": "ptc[5]" / / Indicates that the JTAG_TDI test signal is mapped to pin pta[5].

[0198] "JTAG_TDO": "pta

[12] " / / Indicates that the JTAG_TDO test signal is mapped to pin pta

[12] .

[0199] "JTAG_TCK": "ptc[4]" / / Indicates that the JTAG_TCK test signal is mapped to pin pta[4].

[0200] "EXTAL_CLK": "["ptb[7]"]" / / Indicates that the EXTAL_CLK test signal is mapped to pin pta[7].

[0201] "RAMACCESS": "ptb[1], pta[1], pta[7], pte[8], ptb[5], ptc[2], ptc[3], ptd[5]" / / specifies the pins used for the test signal for RAM access. For example, "pta[1]" means that the RAM access signal is connected to the first pin of the pta port.

[0202] "RAMACCESS_EN": "["ptb[6]"]" specifies the connection of the RAM access enable signal. Unlike RAMACCESS, an array is used here to represent the connected pins. For example, ["ptb[6]"] means that the RAM access enable signal is connected to the 6th pin of the ptb port.

[0203] "pin_sequence" / / describes the connection order of the test signals on the pins of the chip under test.

[0204] ["RESET_B", "JTAG_TMS", "JTAG_TDI", "JTAG_TDO", "JTAG_TCK", "EXTAL_CLK", "RAMACCESS", "RAMACCESS_EN"] / / In this order, RESET_B comes first, then the JTAG related signals, followed by EXTAL_CLK, and finally RAMACCESS and RAMACCESS_EN.

[0205] As an optional embodiment, when configuring the target test file, it is also necessary to determine the number of pins of the port of the chip to be tested, specifically:

[0206] "pad_order" / / specifies the number of pins on each port.

[0207] "pta": "18" / / means the pta port has 18 pins.

[0208] "ptb": "18" / / means the PTB port has 18 pins.

[0209] "ptc": "18" / / means the PTC port has 18 pins.

[0210] "ptd": "18" / / means the ptd port has 18 pins.

[0211] "pte": "17" / / means the pte port has 17 pins.

[0212] As an optional embodiment, when configuring the target test file, it is also necessary to determine the time scale of the target test mode and the test mode instance of the target test mode; wherein the test mode instance includes the test instance name, the forced stimulus for the test signal, the test frequency for testing the test signal, the pulse signal information and the test cycle, specifically:

[0213] "timescale": "1ns / 1ps" / / This field specifies the time scale of the timing. In the embodiment of the present application, 1ns represents 1 nanosecond and 1ps represents 1 picosecond, indicating that the basic unit of time is nanosecond and the accuracy of time can reach the picosecond level.

[0214] "timeplates" / / This field contains different test modes. Each test mode is an object containing the following properties:

[0215] "name": "test_mode_entry" / / The name of the test timing template, such as "test mode entry", "ram access", "functional test", etc.

[0216] "force_pi": "0" / / This field describes the situation of forced excitation. The value includes the number 0. This field indicates that forced excitation is added at time 0 of each cycle.

[0217] "measure_po": "24" / / This field describes the number of measurement points. During the test, it may be necessary to measure the signal at a specific time point. This field specifies that the signal is measured at 24 nanoseconds in each cycle.

[0218] "pulse" {"JTAG_TCK": "25 50", "EXTAL_CLK": "25 50"} / / This field describes the properties of the pulse signal. For each pulse signal, it contains the signal name (such as "JTAG_TCK", "EXTAL_CLK"), the pulse start point and the width. For example, the pulse start point of the "JTAG_TCK" signal is 25 and the pulse width is 50. The pulse start point of the "EXTAL_CLK" signal is 25 and the pulse width is 50.

[0219] "period": "100" / / This field describes the period of the timing template. In the embodiment of the present application, the period of each test mode is set to 100 time units, which means that in this test mode, the repetition time interval of the signal is 100 time units. With this information, the test system can accurately configure and control the test mode to ensure the correct timing and signal behavior during the test. This information is very important for the design and execution of the test because it defines the execution order, timing requirements, and signal characteristics of the test.

[0220] "name": "ram access" / / The name of the timing template.

[0221] "force_pi": "2" / / This field describes the situation of forced excitation. The value includes the number 2. This field indicates that forced excitation is added at time 2 in each cycle.

[0222] "measure_po": "24" / / This field describes the number of measurement points. During the test, it may be necessary to measure the signal at a specific time point. This field specifies that the signal is measured at 24 nanoseconds in each cycle.

[0223] "pulse" {"JTAG_TCK": "25 50", "EXTAL_CLK": "0 50"} / / The JTAG_TCK pulse starting point is 25, and the pulse width is 50; the EXTAL_CLK pulse starting point is 0, and the pulse width is 50.

[0224] "period": "100" / / The period of the timing template.

[0225] "name": "functional_test" / / The name of the timing template.

[0226] "force_pi": "0" / / This field describes the situation of forced excitation, and its value includes the number 0. This field indicates that forced excitation is added at time 0 of each cycle.

[0227] "measure_po": "24" / / This field specifies that the signal is measured at 24 nanoseconds in each cycle.

[0228] "pulse" {"JTAG_TCK": "25 50", "EXTAL_CLK": "25 50"} / / The pulse start point of the "JTAG_TCK" signal is 25, and the pulse width is 50. The pulse start point of the "EXTAL_CLK" signal is 25, and the pulse width is 50.

[0229] "period": "100" / / The period of the timing template.

[0230] In the embodiment of the present application, the above content describes the different steps in the test process and their related constraints and process files, helping the test system to execute the test and record the results in a specified manner.

[0231] Furthermore, procedure_instruction includes functions such as "loop", "force", "compare", "jtag_reset", "scan_type", "access_ram", and "package_compare".

[0232] {

[0233] "loop": {

[0234] "JTAG_TMS": "0",

[0235] "JTAG_TDI": "0",

[0236] "JTAG_TDO": "X",

[0237] "JTAG_TCK": "0",

[0238] "count": "2500",

[0239] "comment": "wait"

[0240] }

[0241] }

[0242] Among them, "loop": {"JTAG_TMS": "0", "JTAG_TDI": "0", "JTAG_TDO": "X", "count": "2500", "comment": "wait"} / / This data describes the setting of a loop test, including the status of the JTAG signal, the number of loops "count" and comments, etc., among which:

[0243] "JTAG_TMS": "0" means the JTAG_TMS signal is set to logic 0.

[0244] "JTAG_TDI": "0" means the JTAG_TDI signal is set to logic 0.

[0245] "JTAG_TDO": An "X" indicates that the JTAG_TDO signal is set to an unknown or indeterminate state.

[0246] The count field specifies the number of loops, which is set to 2500 in the embodiment of the present application.

[0247] The comment field provides a note about the purpose or description of the loop. In the present application embodiment, the note "wait" indicates that this loop is for waiting for a period of time.

[0248] In summary, procedure_loop describes a loop test in which the states of the JTAG signals are set to specific values ​​and the loop is executed 2500 times to wait for a period of time or to perform other operations.

[0249] "force": {"RESET_B": "1", "comment": "reset_b_pulse"} / / This data segment describes a forced excitation (force) operation, which includes setting the RESET_B signal to logic 1 and related comments, where:

[0250] The force field indicates that this is a forced activation operation.

[0251] "RESET_B": "1" indicates that the RESET_B signal is forced and set to logic 1.

[0252] The comment field provides comments about the forced excitation operation. In the embodiment of the present application, the comment is "reset_b_pulse", indicating that this operation is used to generate a RESET_B pulse signal.

[0253] In summary, procedure_force describes the operation of forcing the RESET_B signal to set it to logic 1.

[0254] "compare": {"ptb[5]": "H"} / / This data segment describes a comparison operation, which includes comparing the state of the ptb[5] pin. The expected state is logic high ("H"), where:

[0255] The compare field indicates that this is a comparison operation.

[0256] "jtag_reset":{},"comment":"" / / This section of data describes a JTAG reset operation.

[0257] "comment": "" / / This field provides comments about the JTAG reset operation. In the embodiment of the present application, the comment is an empty string, indicating that no additional description information is provided.

[0258] {"scan_type":"IR","length":"4","write_data":"0b1010","read_data":"","comment":"IR_DPACC = "0b1010"} / / This section of data describes the scan operation of the JTAG data register (IR). It sets the scan type to IR (Instruction Register), the scan length to 4 bits, and the write data to "0b1010", which represents the binary number 1010.

[0259] "read_data" indicates that this field is usually used to specify the data to be read from the JTAG signal. In the embodiment of the present application, the read data is an empty string, indicating that it is not necessary to read temporarily.

[0260] The “comment” field provides comments about the JTAG scan operation, and in the embodiment of the present application, is used to set the instruction register IR_DPACC to the binary number 1010.

[0261] {"scan_type":"DR","length":"35","write_data":"0b00000000000000000000000000000000000011","read_data":"0b1111000000000000000000000000000001XXX","comment":"IR_DPACC = "dpacc read CTRL_STAT 0xF0000001"} / / This section of data describes the scan operation of the JTAG data register (DR). The package sets the scan type to DR (Data Register). The scan length is 35 bits, the write data is “0b00000000000000000000000000000000011”, and the read data is “0b111100000000000000000000000000001XXX”.

[0262] The comment field provides comments about the JTAG scan operation. In the embodiment of the present application, the comment is "dpacc read CTRL_STAT 0xF0000001", indicating that this operation is used to read the CTRL_STAT data in the dpacc register, and the expected result is 0xF0000001. The expected result can be understood as an expected sequence, which is used to compare with the result sequence read by the test to determine the performance of the chip under test.

[0263] "access_ram": {"access_count": "2"} / / This data segment describes the access operation to RAM, including the number of times RAM is accessed is 2 times.

[0264] "package_compare":{"data_bits":"32","data_value":"0x12345678","data_output_port":"RAMACCESS","data_first_out":"LSB","sync_port":"SYNC_PORT","sync_port_transition_cycle":"300","comment":"compare xx register",} / / This section of data describes the action of a package compare operation, including the number of compared data bits, data value, data output port, data output order, synchronization port, synchronization port transition cycle and related comments, specifically:

[0265] "data_bits": "32" means the number of data bits to be compared is 32 bits.

[0266] "data_value": "0x12345678" means the data value to be compared is the hexadecimal number 0x12345678.

[0267] "data_output_port": "RAMACCESS" means the comparison result will be output to the RAMACCESS port.

[0268] "data_first_out": "LSB" means the comparison result is output in the order of least significant bit (LSB) first.

[0269] "sync_port": "SYNC_PORT" means the synchronization port is SYNC_PORT.

[0270] "sync_port_transition_cycle": "300" means the synchronous port transition cycle is 300. The system will compare after the specified number of cycles. This is the time to wait for the CPU to execute. The larger the better. It can be modified according to the simulation results. For example, 0x12345678 will compare 0x78 after waiting for 300 cycles. The 301st cycle will flip the sync_port. The 601st cycle will compare 0x56. The 602nd cycle will flip the sync_port. The 902nd cycle will compare 0x34, and so on.

[0271] "comment": The "compare xx register" field provides a comment about the packet comparison operation. In the embodiment of the present application, the comment is "compare xx register", indicating that this operation is used to compare the value of a certain register.

[0272] As an optional embodiment, the format and saving path of the test vector file are determined, and the target test file is configured according to the format and the saving path; wherein the formats include atp, avc and verilog testbench.

[0273] "pattern" / / This field indicates the settings of the final generated pattern file.

[0274] "atp_pattern" / / This field describes the settings of the ATP format file.

[0275] “file_name”: “ram_access.atp” / / indicates that the file name of the ATP format file is “ram_access.atp”.

[0276] "opcode_mode": "extended" / / Indicates the use of extended opcode mode.

[0277] "avc_pattern" / / This field describes the settings of the AVC format file.

[0278] “file_name”: “ram_access.avc” / / indicates that the file name of the AVC format file is “ram_access.avc”.

[0279] "testbench" / / This field describes the settings of the testbench file.

[0280] "file_name": "ram_access.v" / / Indicates that the file name of the test bench file is "ram_access.v".

[0281] "top_name": "testbench" / / Indicates that the top-level module in the testbench file is named "testbench".

[0282] "instance_name": "top" / / means the instance name in the testbench file is "top".

[0283] "chip_top": "chip_top" / / Indicates that the top module of the chip is named "chip_top".

[0284] As an optional embodiment, the code is a program in C language, which mainly involves writing to registers and bit operations, wherein:

[0285] int main(void) is the main function in C language, and the execution of the program will start from here.

[0286] The code W032(ADDR32(PARCC_RBASE+PARCC_PORTB*4), 0x5B000000) is a write operation to the register. Furthermore, W032 can be a macro or function used to write data to a specified address. ADDR32 is used to specify the address to be written, and PARCC_RBASE+PARCC_PORTB*4 can be a calculation expression of a register address. 0x5B000000 is the data to be written, that is, the test data.

[0287] WCE32(PORTB_PCR5, 0x00000100, 0x00000100): This code also writes to the register, but includes some bit mask operations. PORTB_PCR5 can represent a register address, 0x00000100 is the data to be written, and 0x00000100 may represent a bit mask to specify the bits to be modified.

[0288] return is the return statement of a function, which means that the program execution ends here and returns.

[0289] "procedure" / / This field indicates that this is a description of a procedure.

[0290] {"loop":{"count":"2000","comment":"wait_for_functest_end"}} / / The "loop" field describes a loop operation. "count":"2000" means the number of loops is 2000. "comment":"wait_for_functest_end" provides a comment on the loop operation, explaining the purpose of waiting for the end of the functional test.

[0291] The "compare" field describes a comparison operation. "ptb[5]": "H" means that the state of the ptb[5] pin is compared and the expected state is logic high ("H").

[0292] In summary, the above describes the procedure for configuring the target test file, which includes a loop operation and a comparison operation. The loop operation is used to wait for the end of the functional test, and the comparison operation is used to check whether the state of the ptb[5] pin is logic high.

[0293] The test code to be executed (i.e. C code) finally outputs 1 on the ptb[5] port. The previous codes are all handed over to the CPU to complete. From the perspective of ATE, it is just a simple wait. In the procedure, it is manifested as a loop of 2000 cycles. The larger the number 2000, the better. It can be adjusted later based on the simulation results.

[0294] It can be seen that the present invention proposes a test vector generation method for a chip, first generating a hex file according to the test code to be executed; wherein the test code to be executed is compiled according to the target test requirements; configuring the target test file according to the target test requirements and the hex file, and inputting the target test file into the compilation software; the compilation software reads the startup port identifier and the startup port value required for the chip to be tested to enter the target test mode from the target test file, and writes the startup port identifier and the startup port value into the first vector sequence; the compilation software reads the hex file path in the hex file from the target test file, and reads the load test data to the chip to be tested according to the hex file path. The compiler software reads the port operation sequence required for the chip under test to release the CPU, and writes the port operation sequence into the third vector sequence; the compiler software reads the vector observation values ​​required for testing the chip under test from the target test file, and writes the vector observation values ​​into the fourth vector sequence; the vector observation values ​​are used to test the chip under test; the compiler software obtains the test vector file according to the first vector sequence, the second vector sequence, the third vector sequence and the fourth vector sequence.

[0295] Based on the same inventive concept, corresponding to the method provided in any of the above embodiments, the present application also provides a test vector generation system for a chip.

[0296] refer to Figure 2 , which is a schematic diagram of a test vector generation system for a chip provided in an embodiment of the present invention.

[0297] The system includes: a first generation module 201 , a configuration module 202 and a compilation software module 203 .

[0298] A generating module 201 is used to generate a hex file according to the test code to be executed; wherein the test code to be executed is compiled according to the target test requirements;

[0299] Configuration module 202, configured to configure a target test file according to target test requirements and a hex file, and input the target test file into the compilation software;

[0300] The compiling software module 203 is used to read the startup port identifier and the startup port value required for the chip under test to enter the target test mode from the target test file, and write the startup port identifier and the startup port value into the first vector sequence;

[0301] Reading a hex file path in a hex file from a target test file, reading a load port identifier and test data required to load test data to the chip under test according to the hex file path, and writing the load port identifier and the test data into a second vector sequence; wherein the load port identifier is used to indicate that the test data is loaded into a target load port of the chip under test;

[0302] Read the port operation sequence required by the chip under test to release the CPU, and write the port operation sequence into the third vector sequence;

[0303] Reading vector observation values ​​required for testing the chip under test from the target test file, and writing the vector observation values ​​into a fourth vector sequence; wherein the vector observation values ​​are used for testing the chip under test;

[0304] A test vector file is obtained according to the first vector sequence, the second vector sequence, the third vector sequence and the fourth vector sequence.

[0305] A test vector generation system provided according to an embodiment of the present invention includes a generation module, a configuration module, and a compilation software module, wherein the generation module is used to generate a hex file according to a test code to be executed; the test code to be executed is compiled according to target test requirements; The configuration module is used to configure the target test file according to the target test requirements and the hex file, and input the target test file into the compilation software; the compilation software module is used to read the startup port identifier and the startup port value required for the chip under test to enter the target test mode from the target test file, and write the startup port identifier and the startup port value into the first vector sequence; read the hex file path in the hex file from the target test file, read the load port identifier and the test data required to load the test data to the chip under test according to the hex file path, and write the load port identifier and the test data into the second vector sequence; wherein the load port identifier is used to indicate that the test data is loaded into the target load port of the chip under test; read the port operation sequence required for the chip under test to release the CPU, and write the port operation sequence into the third vector sequence; read the vector observation value required for testing the chip under test from the target test file, and write the vector observation value into the fourth vector sequence; wherein the vector observation value is used to test the chip under test; obtain the test vector file according to the first vector sequence, the second vector sequence, the third vector sequence and the fourth vector sequence.

[0306] For the convenience of description, the above system is described as being divided into various modules according to their functions. Of course, when implementing the present invention, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0307] The system of the above embodiment is used to implement the test vector generation method of the corresponding chip in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0308] Based on the same inventive concept, corresponding to the method provided in any of the above embodiments, the present invention also proposes an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the program, the test vector generation method for the chip as described above is implemented.

[0309] Figure 3 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 310, a memory 320, an input / output interface 330, a communication interface 340, and a bus 350. The processor 310, the memory 320, the input / output interface 330, and the communication interface 340 are connected to each other in communication within the device through the bus 350.

[0310] The processor 310 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0311] The memory 320 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 320 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 320 and are called and executed by the processor 310.

[0312] The input / output interface 330 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0313] The communication interface 340 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0314] The bus 350 comprises a pathway that transmits information between the various components of the device (eg, the processor 310 , the memory 320 , the input / output interface 330 , and the communication interface 340 ).

[0315] It should be noted that, although the above device only shows the processor 310, the memory 320, the input / output interface 330, the communication interface 340 and the bus 350, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0316] The electronic device of the above embodiment is used to implement the test vector generation method of the corresponding chip in any of the above embodiments, and has the beneficial effects of the corresponding data processing method embodiment, which will not be repeated here.

[0317] Based on the same inventive concept, corresponding to the test vector generation method for the chip described in any of the above embodiments, the present invention also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the test vector generation method for the chip described in any of the above embodiments.

[0318] The above-mentioned non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.

[0319] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the data processing method described in any embodiment in the above exemplary method part, and have the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0320] In addition, although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flow chart can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.

[0321] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0322] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the embodiments of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0323] Although the spirit and principle of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and this division is only for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims. The scope of the attached claims conforms to the broadest interpretation, thereby including all such modifications and equivalent structures and functions.

Claims

1. A method for generating a test vector for a chip, characterized in that: include: Generate a hex file according to the test code to be executed; wherein the test code to be executed is compiled according to the target test requirements; Configure a target test file according to the target test requirements and the hex file, and input the target test file into the compiling software; The compiling software reads the startup port identifier and the startup port value required for the chip under test to enter the target test mode from the target test file, and writes the startup port identifier and the startup port value into the first vector sequence; The compiler software reads the hex file path in the hex file from the target test file, reads the load port identifier and test data required to load the test data to the chip under test according to the hex file path, and writes the load port identifier and the test data into a second vector sequence; wherein the load port identifier is used to indicate that the test data is loaded into the target load port of the chip under test; The compiling software reads the port operation sequence required by the chip under test to release the CPU, and writes the port operation sequence into a third vector sequence; The compiling software reads the vector observation values ​​required for testing the chip under test from the target test file, and writes the vector observation values ​​into a fourth vector sequence; wherein the vector observation values ​​are used to test the chip under test; The compilation software obtains a test vector file according to the first vector sequence, the second vector sequence, the third vector sequence and the fourth vector sequence.

2. The chip test vector generation method according to claim 1, characterized in that: The test code to be executed includes a load port identifier of the chip to be tested and test data; The generating of the hex file according to the test code to be executed includes: The load port identifier and the test data are input into a compiler, and the test data is compiled from high bits to low bits to generate the hex file.

3. The chip test vector generation method according to claim 1, characterized in that: The configuring the target test file according to the target test requirement and the hex file includes: Determine a target test mode according to the target test requirement; Setting the start port identifier and the start port value required to start the chip under test to enter the target test mode; Determine the communication protocol required to start the chip under test to enter the target test mode; The target test file is configured according to the target test mode, the start port identifier, the start port value, and the communication protocol.

4. The test vector generation method for a chip according to claim 1, characterized in that: The configuring the target test file according to the target test requirement and the hex file also includes: A load port identifier required for loading the test data into the chip to be tested is set, and the target test file is configured according to the load port identifier.

5. The chip test vector generation method according to claim 1, characterized in that: The configuring the target test file according to the target test requirement and the hex file also includes: Describe the port operation sequence required to release the CPU after the test data is loaded into the chip under test, and configure the target test file according to the port operation sequence; wherein, the port operation sequence is used to ensure that after the test data is loaded into the chip under test, the chip under test can normally release the CPU and start executing the test data.

6. The chip test vector generation method according to claim 1, characterized in that: The configuring the target test file according to the target test requirement and the hex file also includes: Setting the test cycle and test mode instance of the target test mode; wherein the test mode instance includes the test instance name, the forced stimulus for the test signal, the test frequency for testing the test signal, and the pulse signal information; The target test file is configured according to the test cycle and the test mode instance.

7. The chip test vector generation method according to claim 1, characterized in that: Also includes: Determine the format and save path of the test vector file, and configure the target test file according to the format and the save path; wherein the formats include atp, avc and verilog testbench.

8. A chip test vector generation system, characterized in that: include: A generation module, used to generate a hex file according to the test code to be executed; wherein the test code to be executed is compiled according to the target test requirements; A configuration module, used to configure a target test file according to the target test requirements and the hex file, and input the target test file into the compilation software; A compiling software module is used to read the startup port identifier and the startup port value required for the chip under test to enter the target test mode from the target test file, and write the startup port identifier and the startup port value into the first vector sequence; Reading a hex file path in the hex file from the target test file, reading a load port identifier and test data required for loading test data into the chip under test according to the hex file path, and writing the load port identifier and the test data into a second vector sequence; wherein the load port identifier is used to indicate that the test data is loaded into a target load port of the chip under test; Reading a port operation sequence required by the chip under test to release the CPU, and writing the port operation sequence into a third vector sequence; Reading vector observation values ​​required for testing the chip under test from the target test file, and writing the vector observation values ​​into a fourth vector sequence; wherein the vector observation values ​​are used to test the chip under test; A test vector file is obtained according to the first vector sequence, the second vector sequence, the third vector sequence and the fourth vector sequence.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute any one of claims 1 to 7.

Citation Information

Patent Citations

  • Chip testing method and device, processor chip and server

    CN112444731A

  • Test method and test platform for testability design of chip

    CN115656791A

  • Generation device, generation method, and program

    US20150234007A1

  • Method for testing circuit design using exhaustive test vector sequence

    US6237117B1