# US 2021/0223311 A1 · Method and apparatus for testing artificial intelligence chip, device and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0223311 A1
- Document ID: US20210223311A1
- Status: Published application
- Kind: A1
- Application number: 17/021,080
- Filed: 2020-09-15
- Published: 2021-07-22
- Earliest claimed: 2019-12-31
- Assignees: Beijing Baidu Netcom Science Technology Co., Ltd.
- Applicants: Beijing Baidu Netcom Science Technology Co., Ltd.
- Inventors: Ziyu GUO
- Web page: https://patentgrep.com/patent/US20210223311A1

## CPC

- G01R 31/3177: Testing of logic operation, e.g. by logic analysers
- G06N 5/02: Knowledge representation; Symbolic representation
- G01R 31/31701: {Arrangements for setting the Unit Under Test [UUT] in a test mode}
- G01R 31/31703: {Comparison aspects, e.g. signature analysis, comparators (concerning scan tests G01R31/318566; concerning testers G01R31/3193)}
- G01R 31/31704: {Design for test; Design verification (concerning scan tests G01R31/318583; computer-aided design G06F30/00)}
- G01R 31/318519: {Test of field programmable gate arrays [FPGA]}
- G01R 31/318583: {Design for test}
- G01R 31/31912: {Tester/user interface}
- G01R 31/3193: with comparison between actual response and known fault free response {(receiver details G01R31/31924)}
- G01R 31/31932: {Comparators}
- G06F 11/2226: {to test ALU}
- G06F 11/2236: {to test CPU or processors}
- G06F 2115/08: Intellectual property [IP] blocks or IP cores
- G01R: MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES (indicating correct tuning of resonant circuits H03J3/12)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure discloses a method and an apparatus for testing an artificial intelligence chip test, a device and a storage medium, and relates to the field of artificial intelligence. The specific implementation solution is: the target artificial intelligence chip has multiple same arithmetic units, the method includes: obtaining scale information of the target artificial intelligence chip; determining whether the target artificial intelligence chip satisfies a test condition of an arithmetic unit array level according to the scale information; dividing all the arithmetic units into multiple same arithmetic unit arrays, and performing a DFT test on the arithmetic unit arrays, respectively, if it is determined that the test condition of the arithmetic unit array level is satisfied; performing the DFT test on the arithmetic units, respectively, if it is not determined that the test condition of the arithmetic unit array level is not satisfied.

## Claims

### Claim 1

A method for testing an artificial intelligence chip, wherein a target artificial intelligence chip has multiple same arithmetic units, and the method comprises:
obtaining scale information of the target artificial intelligence chip;
determining whether the target artificial intelligence chip satisfies a test condition of an arithmetic unit array level according to the scale information;
dividing all the arithmetic units into multiple same arithmetic unit arrays, and performing a Design for Test (DFT) test on the arithmetic unit arrays, respectively, if it is determined that the test condition of the arithmetic unit array level is satisfied;
performing the DFT test on the arithmetic units, respectively, if it is determined that the test condition of the arithmetic unit array level is not satisfied.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the scale information comprises a number of transistors in an arithmetic unit, and the determining whether the target artificial intelligence chip satisfies a test condition of an arithmetic unit array level according to the scale information, comprises:
determining whether the number of the transistors is smaller than a preset scale threshold;
determining that the test condition of the arithmetic unit array level is satisfied, if it is determined that the number of the transistors is less than the preset scale threshold;
determining that the test condition of the arithmetic unit array level is not satisfied, if it is determined that the number of the transistors is greater than or equal to the preset scale threshold.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the dividing all the arithmetic units into multiple same arithmetic unit arrays, comprises:
determining a number of arithmetic units in an arithmetic unit array according to the number of the transistors and the total number of the arithmetic units;
dividing all the arithmetic units into the multiple same arithmetic unit arrays, according to the number of the arithmetic units.

### Claim 4 (depends on 1)

The method according to claim 1, wherein each of the arithmetic unit arrays is provided with a first test logic circuit;
the performing a DFT test on the arithmetic unit arrays, respectively, comprises:
generating first test vectors corresponding to the arithmetic unit arrays, wherein the first test vectors corresponding to respective ones of the arithmetic unit arrays are the same;
performing the DFT test on the arithmetic unit arrays, respectively, by inputting the first test vectors into first test logic circuits corresponding to respective ones of the arithmetic unit arrays, respectively;
outputting test results corresponding to respective ones of the arithmetic unit arrays.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the first test logic circuit comprises: a first test interface;
the performing the DFT test on the arithmetic unit arrays, respectively, by inputting the first test vectors into first test logic circuits corresponding to respective ones of the arithmetic unit arrays, respectively, comprises:
performing the DFT test on the arithmetic unit arrays in parallel by broadcasting, through respective first test interfaces, the first test vectors to the first test logic circuits of corresponding arithmetic unit arrays.

### Claim 6 (depends on 1)

The method according to claim 1, wherein each of the arithmetic units is provided with a second test logic circuit;
the performing the DFT test on the arithmetic units, respectively, comprises:
generating second test vectors corresponding to the arithmetic units, wherein the second test vectors corresponding to respective ones of the arithmetic units are the same;
performing the DFT test on the arithmetic units, respectively, by inputting the second test vectors into second test logic circuits corresponding to respective ones of the arithmetic units, respectively;
outputting test results corresponding to respective ones of the arithmetic units.

### Claim 7 (depends on 6)

The method according to claim 6, wherein the second test logic circuit comprises: a second test interface;
the performing the DFT test on the arithmetic units, respectively, by inputting the second test vectors into second test logic circuits corresponding to respective ones of the arithmetic units, respectively, comprises:
performing the DFT test on the arithmetic units in parallel by broadcasting, through respective second test interfaces, the second test vectors to the second test logic circuits of corresponding arithmetic units.

### Claim 8 (depends on 4)

The method according to claim 4, wherein before the performing the DFT test on the arithmetic unit arrays, respectively, the method further comprises:
performing a test on at least one first preset DFT logic circuit in the first test logic circuit at a register-transfer level (RTL) stage of the target artificial intelligence chip;
repairing the first preset DFT logic circuit at the RTL stage of the target artificial intelligence chip, if the first preset DFT logic circuit fails the test.

### Claim 9 (depends on 6)

The method according to claim 6, wherein before the performing the DFT test on the arithmetic units, respectively, the method further comprises:
performing a test on at least one second preset DFT logic circuit in the second test logic circuit at an RTL stage of the target artificial intelligence chip;
repairing the second preset DFT logic circuit at the RTL stage of the target artificial intelligence chip, if the second preset DFT logic circuit fails the test.

### Claim 10

An electronic device, comprising:
at least one processor; and
a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the at least one processor when executing the instructions is configured to:
obtain scale information of the target artificial intelligence chip;
determine whether the target artificial intelligence chip satisfies a test condition of an arithmetic unit array level according to the scale information;
divide all the arithmetic units into multiple same arithmetic unit arrays, and perform a Design for Test (DFT) test on the arithmetic unit arrays, respectively, if it is determined that the test condition of the arithmetic unit array level is satisfied;
perform the DFT test on the arithmetic units, respectively, if it is determined that the test condition of the arithmetic unit array level is not satisfied.

### Claim 11 (depends on 10)

The electronic device according to claim 10, wherein the scale information comprises a number of transistors in an arithmetic unit, and
the at least one processor is configured to:
determine whether the number of the transistors is smaller than a preset scale threshold; determine the test condition of the arithmetic unit array level is satisfied, if it is determined that the number of the transistors is less than the preset scale threshold; determine the test condition of the arithmetic unit array level is not satisfied, if it is determined that the number of the transistors is greater than or equal to the preset scale threshold.

### Claim 12 (depends on 11)

The electronic device according to claim 11, wherein when dividing all the arithmetic units into multiple same arithmetic unit arrays, the at least one processor is configured to:
determine a number of arithmetic units in an arithmetic unit array according to the number of the transistors and the total number of the arithmetic units; and divide all the arithmetic units into the multiple same arithmetic unit arrays, according to the number of the arithmetic units.

### Claim 13 (depends on 10)

The electronic device according to claim 10, wherein each of the arithmetic unit arrays is provided with a first test logic circuit; and
when performing the DFT test on the arithmetic unit arrays, respectively, the at least one processor is configured to:
generate first test vectors corresponding to the arithmetic unit arrays, wherein the first test vectors corresponding to respective ones of the arithmetic unit arrays are the same; perform the DFT test on the arithmetic unit arrays, respectively, by inputting the first test vectors into first test logic circuits corresponding to respective ones of the arithmetic unit arrays, respectively; output test results corresponding to respective ones of the arithmetic unit arrays.

### Claim 14 (depends on 13)

The electronic device according to claim 13, wherein the first test logic circuit comprises: a first test interface; and
when performing the DFT test on the arithmetic unit arrays, respectively, by inputting the first test vectors into the first test logic circuits corresponding to respective ones of the arithmetic unit arrays, respectively, the at least one processor is configured to:
perform the DFT test on the arithmetic unit arrays in parallel by broadcasting, through respective first test interfaces, the first test vectors to the first test logic circuits of corresponding arithmetic unit arrays.

### Claim 15 (depends on 10)

The electronic device according to claim 10, wherein each of the arithmetic units is provided with a second test logic circuit; and
when performing the DFT test on the arithmetic units, respectively, the at least one processor is configured to:
generate second test vectors corresponding to the arithmetic units, wherein the second test vectors corresponding to respective ones of the arithmetic units are the same; perform the DFT test on the arithmetic units, respectively, by inputting the second test vectors into second test logic circuits corresponding to respective ones of the arithmetic units, respectively; and output test results corresponding to respective ones of the arithmetic units.

### Claim 16 (depends on 15)

The electronic device according to claim 15, wherein the second test logic circuit comprises: a second test interface;
when performing the DFT test on the arithmetic units, respectively, by inputting the second test vectors into second test logic circuits corresponding to respective ones of the arithmetic units, respectively, the at least one processor is configured to:
perform the DFT test on the arithmetic units in parallel by broadcasting, through respective second test interfaces, the second test vectors to the second test logic circuits of corresponding arithmetic units.

### Claim 17 (depends on 13)

The electronic device according to claim 13, wherein before the performing the DFT test on the arithmetic unit arrays, respectively, the at least one processor is further configured to:
perform a test on at least one first preset DFT logic circuit in the first test logic circuit at a register-transfer level (RTL) stage of the target artificial intelligence chip; and repair the first preset DFT logic circuit at the RTL stage of the target artificial intelligence chip, if the first preset DFT logic circuit fails the test.

### Claim 18 (depends on 15)

The electronic device according to claim 15, wherein before the performing the DFT test on the arithmetic units, respectively, the at least one processor is further configured to:
perform a test on at least one second preset DFT logic circuit in the second test logic circuit at an RTL stage of the target artificial intelligence chip; and repair the second preset DFT logic circuit at the RTL stage of the target artificial intelligence chip, if the second preset DFT logic circuit fails the test.

### Claim 19

A non-transitory computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are used to cause a computer to perform the method comprising:
obtaining scale information of the target artificial intelligence chip;
determining whether the target artificial intelligence chip satisfies a test condition of an arithmetic unit array level according to the scale information;
dividing all the arithmetic units into multiple same arithmetic unit arrays, and performing a Design for Test (DFT) test on the arithmetic unit arrays, respectively, if it is determined that the test condition of the arithmetic unit array level is satisfied;
performing the DFT test on the arithmetic units, respectively, if it is determined that the test condition of the arithmetic unit array level is not satisfied.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium according to claim 19, wherein the scale information comprises a number of transistors in an arithmetic unit, and
the determining whether the target artificial intelligence chip satisfies a test condition of an arithmetic unit array level according to the scale information, comprises:
determining whether the number of the transistors is smaller than a preset scale threshold; determining the test condition of the arithmetic unit array level is satisfied, if it is determined that the number of the transistors is less than the preset scale threshold; determining the test condition of the arithmetic unit array level is not satisfied, if it is determined that the number of the transistors is greater than or equal to the preset scale threshold.
