Neural network processor NPU software and hardware integrated verification system and method

Through the combination of neural network processor compiler and hardware verification environment, test cases are automatically generated, which solves the problems of NPU verification complexity and high communication cost, and achieves efficient software and hardware verification and higher usage efficiency.

CN118733451APending Publication Date: 2024-10-01SHANGHAI SHENSILICON SEMICON CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410799683.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing technology is difficult to effectively verify the complex register configuration and instruction execution of the neural network processor NPU. Traditional verification platforms cannot support integrated verification of software and hardware, resulting in low verification coverage and high communication costs.

Method used

Provides a neural network processor NPU software and hardware integrated verification system, including a neural network processor compiler and a hardware verification environment. By automatically and batch generating test cases, it reduces the work of manual maintenance of the verification environment and supports software and hardware integration design.

Benefits of technology

It improves the verification efficiency and reliability of NPU, reduces communication costs, supports chip-level and IP-level verification, promotes the collaborative work of software and hardware engineers, and improves the use efficiency of NPU.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733451A_ABST
    Figure CN118733451A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of integrated verification, and provides a neural network processor NPU software and hardware integrated verification system which comprises a neural network processor compiler and a hardware verification environment. The neural network processor compiler is used as a compiler customized through software and is used for customizing an instruction set assembly according to an instruction set designed by a neural network processor, customizing an operator instruction set according to a configuration requirement of a hardware operator, and generating a test case, an instruction, test data and instruction and test data parameters at the same time; and the hardware verification environment is used for completing verification of the neural network processor NPU according to the chip-level verification environment and the I P-level verification environment together with the test case, the instruction and test data and the instruction and test data parameters generated by the neural network processor compiler. Automatic and batch generation of the test cases is supported, the work of manually maintaining the verification environment is reduced, and great help is brought to software and hardware fusion design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of integrated verification, and in particular to a neural network processor NPU software and hardware integrated verification system and method. Background Art

[0002] As a neural network processor, NPU generally acts as a coprocessor to accelerate neural network calculations and plays an important role in accelerating neural network calculations. However, compared with traditional processors or accelerators, NPU is more complex in terms of configuring registers, executing instructions, and processing various types of data. In addition, as a product of highly integrated software and hardware, NPU also faces some challenges and limitations during the verification process.

[0003] NPU usually needs to configure a large number of registers to control its behavior and function. These registers may involve various configuration parameters, such as the structure of the neural network, calculation mode, optimization options, etc. At the same time, NPU also needs to execute a large number of instructions to perform neural network calculations. Verifying the correctness of these registers and the function and performance of the instructions is an important task in the verification process.

[0004] NPU needs to process and move a large amount of different types of data, such as feature maps, weights, biases, etc. These data may have different formats and sizes and need to be processed and transmitted efficiently in hardware. The verification process needs to ensure the correctness and reliability of the data during processing and movement.

[0005] In addition, as a product of software and hardware integration, the verification process of NPU involves the interaction and collaboration of software and hardware. Traditional verification platforms may not be able to support the integrated verification of software and hardware well, and more advanced and flexible verification methods and tools are needed.

[0006] Traditional verification platforms may have certain limitations and cannot well support the complex verification requirements of NPU. This may include limitations in the performance, flexibility, and scalability of the verification platform, which requires customization based on the characteristics of NPU or the use of more advanced verification methods and tools.

[0007] In the prior art, the neural network processor NPU is generally verified through testbench and UVM:

[0008] (1) Testbench is an environment for verifying the design (Design Under Test, DUT). It provides input stimulus and checks the output response to confirm whether the design's function and performance meet the specifications. The main function of the testbench is to manually write Verilog code, input the test stimulus into the DUT, collect the response output of the DUT, and compare the collected response output with the expected output to obtain the simulation verification result. The logic and behavior of input stimulus and collection of response output need to be designed according to protocol standards or special rules. For example, if the function of a certain IP needs to be verified, and this IP is a slave device under the bus, then a simulation model needs to be designed to simulate the master device to access this DUT.

[0009] However, the testbench requires manual construction of the environment and test cases, which is suitable for relatively simple DUT verification. For complex DUTs, especially NPUs, which require a large number of register parameter configurations and binary instruction execution, it is almost impossible to write test stimuli completely manually. A small number of test cases leads to reduced verification coverage, which is not accepted in the standard verification process.

[0010] (2) UVM is a verification methodology based on SystemVerilog, which provides a complete set of verification frameworks and methods, including building a test environment, generating test vectors, managing test results, etc. UVM is a universal verification methodology for chip hardware design. Users can quickly build a verification environment through reuse and derivation. UVM supports many VIPs, especially commonly used IPs and buses. Users do not need to spend a lot of time to build simulation models to simulate the behavior of buses or IPs, and it also improves the reliability of simulation models. Another advantage of UVM is random verification. It can generate random numbers with certain dependencies and perform random scanning verification.

[0011] However, UVM is a verification platform developed for hardware and cannot verify software. It does not support the integration of software and hardware, and the communication cost between software and hardware is high. Although UVM can quickly build an environment and perform a large number of random scans, the expected calculation results of NPU need to rely on software algorithms. Generally, the hardware side puts forward verification parameter requirements to the software side, and the software team generates calculation results and submits them to the hardware team. This causes trouble for large-scale test case simulation and greatly increases the communication cost. In addition, UVM is a pure hardware verification platform, and the reliability of the software compiler design also needs to be verified.

[0012] In order to solve the problems existing in the above-mentioned prior art, general industry practitioners will design a dedicated verification process, use scripts to generate instructions in batches, integrate the output data generated by the algorithm into the verification process, and transmit the corresponding input data as input to the neural network processor DUT.

[0013] However, hardware engineers and software engineers generally have little overlap in hardware verification, and rarely build a hardware verification platform that is jointly developed by software and hardware engineers from top to bottom, from software to hardware. Generally, software only provides support for the parts that interact with hardware, such as compiled binary instructions, calculation data, etc., and does not care about the construction of the underlying hardware verification platform, such as the writing of Verilog or SystemVerilog, two widely used languages ​​for hardware description and verification. Hardware engineers also do not care about how to write software compilers. The generation gap in understanding between the two aspects may prevent the NPU from achieving maximum effectiveness. Summary of the invention

[0014] In view of the above problems, the purpose of the present invention is to provide a neural network processor NPU hardware and software integrated verification system and method, which supports automatic and batch generation of test cases, reduces the work of manual maintenance of the verification environment, and is of great help to the software and hardware fusion design.

[0015] The above-mentioned object of the present invention is achieved through the following technical solutions:

[0016] A neural network processor NPU software and hardware integrated verification system, including: a neural network processor compiler and a hardware verification environment;

[0017] The neural network processor compiler is a software-customized compiler for customizing instruction set assembly according to the instruction set designed for the neural network processor, customizing operator instruction sets according to the configuration requirements of the hardware operators, and simultaneously generating test cases, instructions and test data, and instruction and test data parameters;

[0018] The hardware verification environment is used to complete the verification of the neural network processor NPU based on the test cases, instructions and test data, and instruction and test data parameters generated by the neural network processor compiler according to the two verification environments of chip level verification and IP level verification.

[0019] Further, in the neural network processor compiler, the instruction set assembly is customized according to the instruction set designed for the neural network processor, and all configuration instruction assemblies required for calculations are assembled together, including register configuration instructions and calculation trigger instructions;

[0020] Among them, the register configuration instruction includes setting parameters including the length and width of the feature map feature, the size of the convolution kernel, and the step size in the convolution calculation, and the calculation trigger instruction is used to inform the hardware to start executing the convolution calculation task.

[0021] Furthermore, in the neural network processor compiler, the operator instruction set is customized according to the configuration requirements of the hardware operator, and provides a series of instructions for configuring and controlling the hardware operator, including configuring the input and output parameters of the hardware operator, and setting the operation mode and behavior of the hardware operator;

[0022] In the neural network processor compiler, a high-level computer language calls the operator instruction set to generate binary instruction machine code to implement the functions of the neural network processor compiler.

[0023] Further, the neural network processor compiler simultaneously generates the test case, the instruction and test data, and the instruction and test data parameters, and receives configuration parameters of a single operator for satisfying the IP level verification;

[0024] The test case uses C language to perform the chip-level verification of the neural network processor. The neural network processor is used as a coprocessor. A central processing unit CPU is used in the chip system SOC to perform simple configuration and control on the neural network processor. The central processing unit CPU supports the execution of machine code compiled from C language code. The test case is generated by combining the C language general code for the chip-level verification and the dedicated code related to the neural network processor NPU;

[0025] The instructions and test data include binary data of custom instructions for the neural network processor and input data of the neural network algorithm including feature graph feature, weight weight, bias, and expected calculation output data;

[0026] The instruction and test data parameters include the size and length of the test data in bytes.

[0027] Furthermore, the chip-level verification uses a compilation tool including a compiler suite gcc;

[0028] The compilation tool receives the test case generated by the neural network processor compiler, and uses a storage space on the system chip to receive the instructions and test data generated by the neural network processor compiler;

[0029] The compilation tool translates C speech into binary machine code for execution by the central processing unit CPU in the chip system SOC, performs basic configuration of the chip system SOC and moves the instructions and test data of the neural network processor NPU to the designated memory according to the design of the neural network processor NPU, performs basic configuration of the neural network processor NPU and enables the neural network processor NPU to run.

[0030] Furthermore, the IP level verification is constructed using any test environment including Verilogtestbench and UVM;

[0031] The IP-level verification first inputs the configuration parameters of the single operator including the feature map feature size, the convolution kernel kernel size, and the step size into the neural network processor compiler, and the neural network processor compiler generates random instructions and test data according to the configuration parameters of the single operator, and generates size information parameters corresponding to the instructions and test data;

[0032] According to the verification requirements, the configuration parameters of the single operator are imported in batches at the software level of the neural network processor compiler, thereby meeting the requirements of batch verification.

[0033] Further, the IP-level verification includes storing simulation models and fixed test cases;

[0034] The storage simulation model is used to store the instructions and test data generated by the neural network processor compiler;

[0035] The fixed test cases are the core part of the IP verification environment, which are used to receive the instructions and test data parameters generated by the neural network processor compiler, generate input stimuli, move different types of test data to the storage space according to the differences in the instructions and test data parameters, and use the neural network processor NPU to perform calculations. After the neural network processor NPU completes the calculation, the calculation result is automatically compared with the expected output through the size parameter of the expected output.

[0036] A neural network processor NPU software and hardware integration verification method using the neural network processor NPU software and hardware integration verification system as described above comprises the following steps:

[0037] S1: The neural network processor compiler customizes the instruction set assembly according to the instruction set designed for the neural network processor, customizes the operator instruction set according to the configuration requirements of the hardware operator, and simultaneously generates test cases, instructions and test data, as well as instruction and test data parameters;

[0038] S2: The hardware verification environment completes the verification of the neural network processor NPU based on the test cases, instructions and test data, and instruction and test data parameters generated by the neural network processor compiler according to the chip-level verification and IP-level verification environments.

[0039] A computer device comprises a memory and one or more processors, wherein the memory stores computer codes, and when the computer codes are executed by the one or more processors, the one or more processors execute the above method.

[0040] A computer-readable storage medium stores computer codes. When the computer codes are executed, the above method is executed.

[0041] Compared with the prior art, the present invention has at least one of the following beneficial effects:

[0042] (1) By providing a neural network processor NPU hardware and software integrated verification system, including a neural network processor compiler and a hardware verification environment, software and hardware engineers can jointly participate in the construction of a hardware verification platform, making the integration of software and hardware more in-depth, communication more convenient, and the neural network processor NPU using the most efficient.

[0043] (2) In the neural network processor NPU hardware and software integrated verification system, the neural network processor compiler can automatically generate test cases in large quantities, improve verification efficiency and increase reliability.

[0044] (3) IP-level verification is built using any test environment including Verilog testbench and UVM. It is not limited to a traditional hardware test platform. Users can flexibly choose a hardware verification platform according to their needs.

[0045] (4) Supports both chip-level verification and IP-level verification.

[0046] (5) Coupling hardware verification with future chip software development work can increase efficiency and reduce communication costs. A large amount of software verification work can be completed during the hardware verification phase. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 This is the overall structure diagram of the neural network processor NPU software and hardware integrated verification system of the present invention;

[0048] Figure 2 This is an overall flow chart of the neural network processor NPU hardware and software integration verification method of the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0050] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0051] First embodiment

[0052] like Figure 1 As shown, this embodiment provides a neural network processor NPU software and hardware integrated verification system, characterized by comprising: a neural network processor compiler and a hardware verification environment;

[0053] The neural network processor compiler is a software-customized compiler used to customize the instruction set assembly according to the instruction set designed for the neural network processor, customize the operator instruction set according to the configuration requirements of the hardware operator, and simultaneously generate test cases, instructions and test data, as well as instruction and test data parameters; the hardware verification environment is used to complete the verification of the neural network processor NPU based on the test cases, instructions and test data, and instruction and test data parameters generated by the neural network processor compiler according to the two verification environments of chip-level verification and IP-level verification.

[0054] The following describes the specific structure of the neural network processor compiler and hardware verification environment:

[0055] In the neural network processor compiler, the instruction set assembly is customized according to the instruction set designed for the neural network processor, and the configuration instruction assembly required for all calculations is concentrated together, including register configuration instructions and calculation trigger instructions. These instructions include configuring hardware status, controlling data flow, and triggering hardware to perform calculation tasks. Among them, the register configuration instruction includes setting parameters including the length and width of the feature map feature, the size of the convolution kernel, and the step size in the convolution calculation, and the calculation trigger instruction is used to inform the hardware to start executing the convolution calculation task.

[0056] In the neural network processor compiler, the operator instruction set is customized according to the configuration requirements of the hardware operator, and provides a series of instructions for configuring and controlling the hardware operator, including configuring the input and output parameters of the hardware operator, and setting the operation mode and behavior of the hardware operator. In the neural network processor compiler, the high-level computer language calls the operator instruction set to generate binary instruction machine code to implement the functions of the neural network processor compiler.

[0057] In summary, the instruction set assembly is mainly used to control the operation of the neural network processor, while the operator instruction set is used to configure and control the operators in the hardware. Register configuration instructions and calculation trigger instructions are part of the instruction set assembly, which are used to configure the registers in the neural network processor and trigger the hardware to perform calculation tasks.

[0058] The neural network processor compiler simultaneously generates the test case, the instructions and test data, and the instruction and test data parameters, and receives the configuration parameters of a single operator to meet the IP level verification.

[0059] The test case uses C language to perform chip-level verification of the neural network processor. The neural network processor serves as a coprocessor. A central processing unit CPU is used in the chip system SOC to perform simple configuration and control of the neural network processor. The central processing unit CPU supports machine code execution after C language code is compiled. The test case is generated by combining the C language general code for chip-level verification and the dedicated code related to the neural network processor NPU; the instructions and test data include binary data of customized instructions of the neural network processor and input data of the neural network algorithm including feature map feature, weight weight, bias and expected calculation output data; the instruction and test data parameters include the size and length of the test data in bytes.

[0060] The chip-level verification uses a compilation tool including a compiler suite gcc;

[0061] The compilation tool receives the test case generated by the neural network processor compiler, and uses a storage space on the system chip to receive the instructions and test data generated by the neural network processor compiler;

[0062] The compilation tool translates C speech into binary machine code for execution by the central processing unit CPU in the chip system SOC, performs basic configuration of the chip system SOC and moves the instructions and test data of the neural network processor NPU to the designated memory according to the design of the neural network processor NPU, performs basic configuration of the neural network processor NPU and enables the neural network processor NPU to run.

[0063] The IP-level verification is built using any test environment including Verilogtestbench and UVM. Verilogtestbench is a test environment written in Verilog language, which is used to verify the correctness of the design. By writing test vectors and monitors, various input conditions can be simulated, and the output of the design can be checked to see if it meets expectations. This method is simple and direct, suitable for small projects or scenarios with low verification requirements. UVM is a verification methodology based on SystemVerilog, which provides a complete set of verification frameworks and methods, including building a test environment, generating test vectors, managing test results, etc. The advantage of UVM is that it can improve test efficiency, reusability and maintainability, and is suitable for complex IP and SoC designs.

[0064] The IP-level verification first inputs the configuration parameters of the single operator, including the feature map feature size, the convolution kernel kernel size, and the step size, into the neural network processor compiler. The neural network processor compiler generates random instructions and test data according to the configuration parameters of the single operator, and generates size information parameters corresponding to the instructions and test data; according to the verification requirements, the configuration parameters of the single operator are imported in batches at the software level of the neural network processor compiler (such as random generation, import according to a table, etc.), thereby meeting the requirements of batch verification.

[0065] The IP-level verification includes a storage simulation model and a fixed test case; the storage simulation model is used to store the instructions and test data (generally instructions, inputs, models) generated by the neural network processor compiler; the fixed test case is the core part of the IP verification environment, which is used to receive the instructions and test data parameters generated by the neural network processor compiler, generate input stimuli, move different types of test data to the storage space according to the different parameters of the instructions and test data, and use the neural network processor NPU for calculation. After the neural network processor NPU calculates, the calculation result is automatically compared with the expected output through the expected output size parameter. For example, in a real NPU application scenario, the instructions and models of the neural network are stored in a non-volatile memory. During the calculation process, the instructions and models need to be moved to the specified memory space for calculation, and the size of each model is different from the corresponding instruction size. At this time, the compiler provides the size information of each data type and gives it to the test case in the form of parameters. The test case code can be fixed in the form of calling parameters, thereby achieving the purpose of automated testing.

[0066] The present invention is a complete NPU verification solution that can meet both chip-level and IP-level verification requirements. Both levels of verification can support automatic generation of test cases without manual maintenance. For IP-level verification, large-scale and random testing requirements can be flexibly implemented at the software level. The product can also complete a large amount of software verification work such as algorithm and compiler design at the hardware verification stage.

[0067] Second embodiment

[0068] like Figure 2 As shown, this embodiment provides a neural network processor NPU software and hardware integration verification method using the neural network processor NPU software and hardware integration verification system as in the first embodiment, including the following steps:

[0069] S1: The neural network processor compiler customizes the instruction set assembly according to the instruction set designed for the neural network processor, customizes the operator instruction set according to the configuration requirements of the hardware operator, and simultaneously generates test cases, instructions and test data, as well as instruction and test data parameters;

[0070] S2: The hardware verification environment completes the verification of the neural network processor NPU based on the test cases, instructions and test data, and instruction and test data parameters generated by the neural network processor compiler according to the chip-level verification and IP-level verification environments.

[0071] A computer-readable storage medium stores a computer code. When the computer code is executed, the above method is executed. A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.

[0072] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

[0073] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0074] It should be noted that the above embodiments can be freely combined as needed. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention.

Claims

1. A neural network processor NPU hardware and software integrated verification system, characterized in that: include: Neural network processor compiler and hardware verification environment; The neural network processor compiler is a software-customized compiler for customizing instruction set assembly according to the instruction set designed for the neural network processor, customizing operator instruction sets according to the configuration requirements of the hardware operators, and simultaneously generating test cases, instructions and test data, and instruction and test data parameters; The hardware verification environment is used to complete the verification of the neural network processor NPU based on the test cases, instructions and test data, and instruction and test data parameters generated by the neural network processor compiler according to the two verification environments of chip level verification and IP level verification.

2. The neural network processor NPU hardware and software integrated verification system according to claim 1, characterized in that: In the neural network processor compiler, the instruction set assembly is customized according to the instruction set designed for the neural network processor, and all configuration instruction assemblies required for calculations are assembled together, including register configuration instructions and calculation trigger instructions; Among them, the register configuration instruction includes setting parameters including the length and width of the feature map feature, the size of the convolution kernel, and the step size in the convolution calculation, and the calculation trigger instruction is used to inform the hardware to start executing the convolution calculation task.

3. The neural network processor NPU hardware and software integrated verification system according to claim 1, characterized in that: In the neural network processor compiler, the operator instruction set is customized according to the configuration requirements of the hardware operator, and provides a series of instructions for configuring and controlling the hardware operator, including configuring the input and output parameters of the hardware operator, and setting the operation mode and behavior of the hardware operator; In the neural network processor compiler, a high-level computer language calls the operator instruction set to generate binary instruction machine code to implement the functions of the neural network processor compiler.

4. The neural network processor NPU hardware and software integrated verification system according to claim 1, characterized in that: The neural network processor compiler simultaneously generates the test case, the instruction and test data, and the instruction and test data parameters, and receives configuration parameters of a single operator to satisfy the IP level verification; The test case uses C language to perform the chip-level verification of the neural network processor. The neural network processor is used as a coprocessor. A central processing unit CPU is used in the chip system SOC to perform simple configuration and control on the neural network processor. The central processing unit CPU supports the execution of machine code compiled from C language code. The test case is generated by combining the C language general code for the chip-level verification and the dedicated code related to the neural network processor NPU; The instructions and test data include binary data of custom instructions for the neural network processor and input data of the neural network algorithm including feature graph feature, weight weight, bias, and expected calculation output data; The instruction and test data parameters include the size and length of the test data in bytes.

5. The neural network processor NPU hardware and software integrated verification system according to claim 4, characterized in that: The chip-level verification uses a compilation tool including a compiler suite gcc; The compilation tool receives the test case generated by the neural network processor compiler, and uses a storage space on the system chip to receive the instructions and test data generated by the neural network processor compiler; The compilation tool translates C speech into binary machine code for execution by the central processing unit CPU in the chip system SOC, performs basic configuration of the chip system SOC and moves the instructions and test data of the neural network processor NPU to the designated memory according to the design of the neural network processor NPU, performs basic configuration of the neural network processor NPU and enables the neural network processor NPU to run.

6. The neural network processor NPU hardware and software integrated verification system according to claim 4, characterized in that: The IP level verification is built using any test environment including Veri log testbench and UVM; The IP-level verification first inputs the configuration parameters of the single operator including the feature map feature size, the convolution kernel kernel size, and the step size into the neural network processor compiler, and the neural network processor compiler generates random instructions and test data according to the configuration parameters of the single operator, and generates size information parameters corresponding to the instructions and test data; According to the verification requirements, the configuration parameters of the single operator are imported in batches at the software level of the neural network processor compiler, thereby meeting the requirements of batch verification.

7. The neural network processor NPU hardware and software integrated verification system according to claim 1, characterized in that: The IP level verification includes storing simulation models and fixed test cases; The storage simulation model is used to store the instructions and test data generated by the neural network processor compiler; The fixed test cases are the core part of the IP verification environment, which are used to receive the instructions and test data parameters generated by the neural network processor compiler, generate input stimuli, move different types of test data to the storage space according to the differences in the instructions and test data parameters, and use the neural network processor NPU to perform calculations. After the neural network processor NPU completes the calculation, the calculation result is automatically compared with the expected output through the size parameter of the expected output.

8. A neural network processor NPU software and hardware integration verification method using the neural network processor NPU software and hardware integration verification system as described in any one of claims 1 to 7, characterized in that: The following steps are involved: S1: The neural network processor compiler customizes the instruction set assembly according to the instruction set designed for the neural network processor, customizes the operator instruction set according to the configuration requirements of the hardware operator, and simultaneously generates test cases, instructions and test data, as well as instruction and test data parameters; S2: The hardware verification environment completes the verification of the neural network processor NPU based on the test cases, instructions and test data, and instruction and test data parameters generated by the neural network processor compiler according to the chip-level verification and IP-level verification environments.

9. A computer device comprising a memory and one or more processors, wherein the memory stores computer codes, and when the computer codes are executed by the one or more processors, the one or more processors execute the method according to claim 8. 10 . A computer-readable storage medium storing a computer code, wherein when the computer code is executed, the method according to claim 8 is executed.

Citation Information

Cited By

  • Neural network processing unit verification method and device and electronic equipment

    CN122387821A