CHIP TEST CIRCUIT AND CIRCUIT TEST METHOD
20230204660 · 2023-06-29
Inventors
- Changming CUI (Shenzhen, CN)
- Junlin HUANG (Shenzhen, CN)
- Yu HUANG (Shenzhen, CN)
- Haitao FU (Chengdu, CN)
Cpc classification
G01R31/3172
PHYSICS
G01R31/31722
PHYSICS
International classification
Abstract
This disclosure provides methods and apparatuses for testing a tested circuit. In an implementation, a chip test circuit transmits input data of a test vector to a data distribution circuit through an input of a test bus, and transmits the input data of the test vector to a scan input channel of a tested circuit through the data distribution circuit. After scanning of the tested circuit ends, output data of the test vector of the scan output channel of the tested circuit is transmitted to an output of the test bus through the data distribution circuit to complete the test of the tested circuit. A dynamic correspondence between the data distribution circuit and the test bus is implemented by configuring a first selector, so that test resources can be dynamically allocated.
Claims
1. A test circuit, comprising: a plurality of test subcircuits configured to respectively connect a corresponding plurality of tested circuits to a test bus; a j.sup.th test subcircuit in the plurality of test subcircuits comprises Nj data distribution circuits and M first selectors, wherein Nj and M are both positive integers, M is equal to a bit width of the test bus, and M is greater than or equal to Nj; in the j.sup.th test subcircuit, first input ends of the Nj data distribution circuits are respectively connected to Nj inputs of the test bus, first output ends of the Nj data distribution circuits are connected to a scan input channel of the tested circuit corresponding to the j.sup.th test subcircuit, and second input ends of the Nj data distribution circuits are connected to a scan output channel of the tested circuit corresponding to the j.sup.th test subcircuit; in the j.sup.th test subcircuit, output ends of the M first selectors are respectively connected to M outputs of the test bus; first input ends of Nj first selectors of the M first selectors are respectively connected to second output ends of the Nj data distribution circuits, and first input ends of remaining M-Nj first selectors are respectively connected to inputs of M-Nj test buses on which no data distribution circuit is disposed; second input ends of Nj first selectors of the M first selectors are respectively connected to the second output ends of the Nj data distribution circuits, and second input ends of the remaining M-Nj first selectors are respectively connected to the inputs of the M-Nj test buses on which no data distribution circuit is disposed; and a first input end and a second input end of each of the M-Nj first selectors connects to a different test bus.
2. The test circuit according to claim 1, wherein in the j.sup.th test subcircuit of the plurality of test subcircuits, based on a preset test bus sequence, the first input ends of the Nj data distribution circuits are sequentially connected to inputs of first Nj test buses; first input ends of first Nj first selectors are sequentially connected to the second output ends of the Nj data distribution circuits, and first input ends of last M-Nj first selectors are sequentially connected to last M-Nj inputs of the test bus; and second input ends of first M-Nj first selectors are sequentially connected to the last M-Nj inputs of the test bus, and second input ends of last Nj first selectors are sequentially connected to the second output ends of the Nj data distribution circuits.
3. The test circuit according to claim 2, wherein the preset test bus sequence is a sequence or a reverse sequence of a bit sequence of a test bus.
4. The test circuit according to claim 1, wherein first output ends of CI.sub.j data distribution circuits in the Nj data distribution circuits are respectively connected to CI.sub.j scan input channels of the tested circuit corresponding to the j.sup.th test subcircuit, second input ends of CO.sub.j data distribution circuits in the Nj data distribution circuits are respectively connected to CO.sub.j scan output channels of the tested circuit corresponding to the j.sup.th test subcircuit, and Nj=Max(CI.sub.j, CO.sub.j).
5. The test circuit according to claim 1, wherein each data distribution circuit comprises a fourth selector, a register, and a fifth selector; a first input end and a second input end of the fourth selector are respectively connected to a first input end and a second input end of the data distribution circuit; an input end of the register is connected to an output end of the fourth selector, and an output end of the register is connected to a first input end of the fifth selector; a second input end of the fifth selector is connected to the first input end of the data distribution circuit, and an output end of the fifth selector is connected to a second output end of the data distribution circuit; and a first output end of the data distribution circuit is connected to the first input end of the data distribution circuit, the output end of the register, or the second output end of the data distribution circuit.
6. The test circuit according to claim 5, wherein each test subcircuit further comprises a controller, and the controller comprises: a first signal interface, configured to control the first input end of a first selector to connect to an output end, or the second input end of the first selector to connect to the output end; and a second signal interface, configured to control the first input end and the second output end of the data distribution circuit to be directly connected or connected through the register.
7. The test circuit according to claim 1, wherein in the j.sup.th test subcircuit of the plurality of test subcircuits, the data distribution circuit is connected to the scan input channel of the tested circuit corresponding to the j.sup.th test subcircuit through a first gate control circuit, and is configured to control whether data in the data distribution circuit is output to the scan input channel of the tested circuit corresponding to the j.sup.th test subcircuit; and the data distribution circuit is connected to the scan output channel of the tested circuit corresponding to the j.sup.th test subcircuit through a second gating circuit, and is configured to control whether data of the scan output channel of the tested circuit corresponding to the j.sup.th test subcircuit is output to the data distribution circuit.
8. The test circuit according to claim 7, wherein each test subcircuit further comprises a state machine, and the state machine comprises: a first state control interface, configured to generate an output capture enabling signal, and control each data distribution circuit in the test subcircuit whether to receive scan output data of the tested circuit; a second state control interface, configured to generate a first gating enabling signal, and control whether data of each data distribution circuit in the test subcircuit is transmitted to a scan input channel of a corresponding tested circuit in the test subcircuit; a third state control interface, configured to generate a second gating enabling signal, and control whether data of a scan output channel of a corresponding tested circuit in the test subcircuit is transmitted to the data distribution circuit in the tested circuit; and a fourth state control interface, configured to generate a scan enabling signal, and configured to control whether to perform test scanning on a scan structure of the tested circuit corresponding to the test subcircuit.
9. The test circuit according to claim 1, wherein the test circuit is disposed inside or outside the tested circuit.
10. The test circuit according to claim 1, wherein each test subcircuit further comprises a frequency dividing circuit, and the frequency dividing circuit is connected to a bus clock interface and a scan clock interface of the tested circuit respectively, and is configured to classify a clock of the test bus as a scan clock of the tested circuit.
11. An integrated circuit, comprising a plurality of tested circuits, a test bus, and the test circuit comprises: a plurality of test subcircuits configured to respectively connect the plurality of tested circuits to a test bus; a j.sup.th test subcircuit in the plurality of test subcircuits comprises Nj data distribution circuits and M first selectors, wherein Nj and M are both positive integers, M is equal to a bit width of the test bus, and M is greater than or equal to Nj; in the j.sup.th test subcircuit, first input ends of the Nj data distribution circuits are respectively connected to Nj inputs of the test bus, first output ends of the Nj data distribution circuits are connected to a scan input channel of the tested circuit corresponding to the j.sup.th test subcircuit, and second input ends of the Nj data distribution circuits are connected to a scan output channel of the tested circuit corresponding to the j.sup.th test subcircuit; in the j.sup.th test subcircuit, output ends of the M first selectors are respectively connected to M outputs of the test bus; first input ends of Nj first selectors of the M first selectors are respectively connected to second output ends of the Nj data distribution circuits, and first input ends of remaining M-Nj first selectors are respectively connected to inputs of M-Nj test buses on which no data distribution circuit is disposed; second input ends of Nj first selectors of the M first selectors are respectively connected to the second output ends of the Nj data distribution circuits, and second input ends of the remaining M-Nj first selectors are respectively connected to the inputs of the M-Nj test buses on which no data distribution circuit is disposed; and a first input end and a second input end of each of the M-Nj first selectors connects to a different test bus; and the plurality of tested circuits are connected to the test bus through a plurality of test subcircuits corresponding to the tested circuit in the test circuit.
12. The integrated circuit according to claim 11, wherein in the j.sup.th test subcircuit of the plurality of test subcircuits, based on a preset test bus sequence, the first input ends of the Nj data distribution circuits are sequentially connected to inputs of first Nj test buses; first input ends of first Nj first selectors are sequentially connected to the second output ends of the Nj data distribution circuits, and first input ends of last M-Nj first selectors are sequentially connected to last M-Nj inputs of the test bus; and second input ends of first M-Nj first selectors are sequentially connected to the last M-Nj inputs of the test bus, and second input ends of last Nj first selectors are sequentially connected to the second output ends of the Nj data distribution circuits.
13. The integrated circuit according to claim 12, wherein the preset test bus sequence is a sequence or a reverse sequence of a bit sequence of a test bus.
14. The integrated circuit according to claim 11, wherein first output ends of CI.sub.j data distribution circuits in the Nj data distribution circuits are respectively connected to CI.sub.j scan input channels of the tested circuit corresponding to the j.sup.th test subcircuit, second input ends of CO.sub.j data distribution circuits in the Nj data distribution circuits are respectively connected to CO.sub.j scan output channels of the tested circuit corresponding to the j.sup.th test subcircuit, and Nj=Max(CI.sub.j, CO.sub.j).
15. A circuit test method performed by a test circuit, wherein the test circuit comprises: a plurality of test subcircuits configured to respectively connect a corresponding plurality of tested circuits to a test bus; a j.sup.th test subcircuit in the plurality of test subcircuits comprises Nj data distribution circuits and M first selectors, wherein Nj and M are both positive integers, M is equal to a bit width of the test bus, and M is greater than or equal to Nj; in the j.sup.th test subcircuit, first input ends of the Nj data distribution circuits are respectively connected to Nj inputs of the test bus, first output ends of the Nj data distribution circuits are connected to a scan input channel of the tested circuit corresponding to the j.sup.th test subcircuit, and second input ends of the Nj data distribution circuits are connected to a scan output channel of the tested circuit corresponding to the j.sup.th test subcircuit; in the j.sup.th test subcircuit, output ends of the M first selectors are respectively connected to M outputs of the test bus; first input ends of Nj first selectors of the M first selectors are respectively connected to second output ends of the Nj data distribution circuits, and first input ends of remaining M-Nj first selectors are respectively connected to inputs of M-Nj test buses on which no data distribution circuit is disposed; second input ends of Nj first selectors of the M first selectors are respectively connected to the second output ends of the Nj data distribution circuits, and second input ends of the remaining M-Nj first selectors are respectively connected to the inputs of the M-Nj test buses on which no data distribution circuit is disposed; and a first input end and a second input end of each of the M-Nj first selectors connects to a different test bus; the method comprises: generating configuration information and a test vector; and the configuration information is used to configure the test circuit, and the test vector is test excitation data of the tested circuit and is determined by a circuit structure of the tested circuit.
16. The circuit test method according to claim 15, wherein the method further comprises: configuring the test circuit based on the configuration information; transmitting the test vector to a test bus, and transmitting the test vector to a scan input channel of the tested circuit through the test circuit; and transmitting test result data of the tested circuit to an output of the test bus through the tested circuit.
17. The circuit test method according to claim 16, wherein the transmitting the test vector to a test bus, and transmitting the test vector to a scan input channel of the tested circuit through the test circuit comprises: transmitting the test vector to the scan input channel of the tested circuit based on a correspondence between the scan input channel of the tested circuit and an input of the test bus through the input of the test bus corresponding to the scan input channel of the tested circuit; and the correspondence between the scan input channel of the tested circuit and the input of the test bus is determined by a data distribution circuit in a test subcircuit corresponding to the tested circuit.
18. The circuit test method according to claim 17, wherein the transmitting test result data of the tested circuit to an output of the test bus through the tested circuit comprises: transmitting the test result data output by a scan output channel of the tested circuit to the output of the test bus corresponding to the scan output channel of the tested circuit based on a correspondence between the scan output channel of the tested circuit and the output of the test bus; and the correspondence between the scan output channel of the tested circuit and the output of the test bus is determined by a data distribution circuit in a test subcircuit corresponding to the tested circuit.
19. The circuit test method according to claim 17, wherein the transmitting the test vector to the scan input channel of the tested circuit based on a correspondence between the scan input channel of the tested circuit and an input of the test bus through the input of the test bus corresponding to the scan input channel of the tested circuit comprises: transmitting, by the test bus, the test vector to the scan input channel of the tested circuit in sequence in a plurality of bus clock cycles, wherein a quantity of scan input channels of the tested circuit corresponding to one input of the test bus exceeds one.
20. The circuit test method according to claim 18, wherein the transmitting the test result data output by a scan output channel of the tested circuit to the output of the test bus corresponding to the scan output channel of the tested circuit based on a correspondence between the scan output channel of the tested circuit and the output of the test bus comprises: transmitting, by the test bus, the test result data in the scan output channel of the tested circuit to the output of the test bus in sequence in a plurality of clock cycles, wherein a quantity of scan output channels of the tested circuit corresponding to one output of the test bus exceeds one.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071]
REFERENCE NUMERALS
[0072] 01-tested circuit; 02-test bus; 03-test circuit; 30-test subcircuit; 301-data distribution circuit; 302-first selector; 303-controller; 304-state machine; 305-frequency dividing circuit; 306-first gate control circuit; 307-second gating circuit; 308-second selector; 309-third selector; 310-OR gate; 3011-fourth selector; 3012-register; 3013-fifth selector.
DESCRIPTION OF EMBODIMENTS
[0073] The following describes the technical solutions in embodiments of this application with reference to the accompanying drawings in embodiments of this application. It is clear that the described embodiments are merely a part rather than all of embodiments of this application.
[0074] Terms such as “first” and “second” mentioned below are merely intended for a purpose of description, and shall not be understood as an indication or implication of relative importance or implicit indication of a quantity of indicated technical features. Therefore, a feature limited by “first”, “second”, or the like may explicitly or implicitly include one or more features.
[0075] It should be noted that, in this application, words such as “example” or “for example” are used for representing giving an example, an illustration, or a description. Any embodiment or design scheme described as an “example” or “for example” in this application should not be explained as being more preferred or having more advantages than another embodiment or design scheme. Exactly, use of the word such as “example” or “for example” is intended to present a related concept in a specific manner.
[0076] In this application, unless otherwise specified and limited, the term “connection” should be understood in a broad sense. For example, “connection” may refer to a direct physical connection, or may refer to an electrical connection implemented by using an intermediate medium, for example, a connection implemented by using a resistor, an inductor, a capacitor, or another electronic component.
[0077] Embodiments of this application provide a test circuit 03 (as shown in
[0078] Embodiments of this application provide an integrated circuit.
[0079] An embodiment of this application further provides an electronic device. The electronic device includes a printed circuit board and the integrated circuit provided in the foregoing embodiment. The integrated circuit provided in the foregoing embodiment is disposed on the printed circuit board. The electronic device includes an electronic device such as a mobile phone, a tablet computer (pad), a computer, an intelligent wearable product (for example, a smartwatch or a smart band), a virtual reality (VR) terminal device, and an augmented reality (AR) terminal device. A specific form of the electronic device is not specially limited in embodiments of this application.
[0080] The following describes in detail the test circuit 03 provided in embodiments of this application with reference to the accompanying drawings.
[0081]
[0082] It should be noted that the test subcircuit 30 shown in
[0083] Specifically, the data distribution circuit 301 may also be referred to as a dynamic routing unit (DRU). The data distribution circuit 301 has two input ends and two output ends. A first input end of the data distribution circuit 301 is connected to an input channel scanbus_in of the test bus 02. A second input end is connected to a scan output channel channel_out of the tested circuit 01. A first output end is connected to a scan input channel_in of the tested circuit 01. A second output end is connected to an output channel scanbus_out of the test bus 02.
[0084] In the test circuit in this embodiment of this application, the data distribution circuit 301 receives data of the input channel scanbus_in of the test bus 02. The data input into the input channel scanbus_in of the test bus 02 is a test vector required by the tested circuit 01. The data distribution circuit 301 transmits the received data in the input channel scanbus_in of the test bus 02 to a scan structure (scanstucture) of the tested circuit 01 through the scan input channel channel_in of the tested circuit 01. The scan structure of the tested circuit 01 is a structure block used to perform a scanning test on the tested circuit 01 in the tested circuit 01. Both the scan input channel and the scan output channel of the tested circuit 01 are connected to the scan structure in the tested circuit 01. After receiving input data of the scan input channel channel_in, the scan structure performs a scanning test on the tested circuit. After the test is completed, test result data is output through the scan output channel_out in the scan structure. When the scan structure of the tested circuit 01 completes the scanning test, the data distribution circuit 301 outputs the test result data through the scan output channel channel_out of the tested circuit 01, transmits the test result data to the output channel scanbus_out of the test bus 02, and transmits the test result data to test software for comparison with expected test result data, or directly compares the test result data with the expected test result data on a test machine to determine whether the tested circuit 01 is faulty. The test software is EDA software.
[0085] In the entire test circuit, the data distribution circuit 301, that is, the DRU, distributes and transfers test data. In a data distribution and transfer process, the data distribution circuit 301 is configured to receive the input data of the input channel scanbus_in of the test bus, and transfer the input data to the scan input channel channel_in of the tested circuit 01. After the test scanning of the tested circuit 01 ends, the data distribution circuit 301 receives the test result data through the scan output channel channel_out of the tested circuit 01, and transmits the test result data to the output channel scanbus_out of the test bus 02 for output to complete the test. A correspondence between the data distribution circuit 301 and the test bus 02 may be dynamically allocated. For example, one data distribution circuit may be connected to a plurality of inputs or outputs of the test bus. An actual connection between the data distribution circuit 301 and the plurality of inputs or outputs of the test bus 02 may be dynamically configured in a multiplexer manner, to achieve an objective of dynamically connecting the data distribution circuit 301 and the test bus 02. Through the dynamic connection relation between the data distribution circuit 301 and the test bus 02, the test bus 02 is dynamically allocated, to meet a requirement of testing a large quantity of tested circuits 01. This resolves line connection, reducing line congestion, and reducing area overheads.
[0086] For how the data distribution circuit 301 is dynamically connected to the test bus, embodiments of this application provide a plurality of example embodiments.
[0087] Example 1: Refer to
[0088] It should be noted that the preset test bus sequence is a sequence or a reverse sequence of a bit sequence of the test bus. The sequence may also be any other preset or specified bus sequence, which is not limited herein. For example, the preset test bus sequence is [0] [2] [4] [6] [1] [3] [5] [7]. [0] is bit [0] (bit) of test bus 02, that is, scanbus_in[0] and scanbus_out[0].
[0089] Refer to
[0090] In
[0091] It should be noted that, in the example shown in
[0092] In addition, the test subcircuits corresponding to the tested circuit A, the tested circuit B, and the tested circuit C may be disposed outside the tested circuit A, the tested circuit B, and the tested circuit C. For example, refer to a circuit structure shown in
[0093] In
[0094] A scan structure of the tested circuit B has five scan input channels channel_in, which are respectively channel_in[0], channel_in[1], channel_in[2], channel_in[3] and channel_in[4]; and five scan output channels channel_out, which are respectively channel_out[0], channel_out[1], channel_out[2], channel_out[3] and channel_out[4] (not shown in
[0095] A scan structure of the tested circuit C has four scan input channels channel_in, which are respectively channel_in[0], channel_in[1], channel_in[2] and channel_in[3]; and four scan output channels channel_out, which are respectively channel_out[0], channel_out[1], channel_out[2] and channel_out[3] (not shown in
[0096] Therefore, a first test subcircuit corresponding to tested circuit A has three data distribution circuits 301. A second test subcircuit corresponding to tested circuit B has five data distribution circuits 301. A third test subcircuit corresponding to tested circuit C has four data distribution circuits 301.
[0097] For example, a bit width of the test bus in
[0098] For the first selector 302, in this example, a quantity of first selectors 302 corresponding to each test subcircuit is equal to the bit width of the test bus. In other words, the quantity of first selectors 302 corresponding to each test subcircuit is eight.
[0099] Therefore, in the first test subcircuit corresponding to the tested circuit A, first input ends of first three first selectors 302 are connected to second output ends of the three data distribution circuits 301. First input ends of the last five first selectors 302 are connected to inputs scanbus_in of last five test buses, that is, scanbus_in[3], scanbus_in[4], scanbus_in[5], scanbus_in[6] and scanbus_in[7] of the test buses. Second input ends of first five first selectors 302 are connected to inputs scanbus_in of last five test buses, that is, connected to scanbus_in[3], scanbus_in[4], scanbus_in[5], scanbus_in[6] and scanbus_in[7] of the test buses. Second input ends of last three first selectors 302 are connected to second input ends of three data distribution circuits 301.
[0100] By analogy, in the second test subcircuit corresponding to the tested circuit B, first input ends of the first five first selectors 302 are connected to second output ends of five data distribution circuits 301. First input ends of the last three first selectors 302 are connected to inputs scanbus_in of last three test buses, that is, scanbus_in[5], scanbus_in[6] and scanbus_in[7] of the test buses. Second input ends of the first three first selectors 302 are connected to inputs scanbus_in of the last three test buses, that is, scanbus_in[5], scanbus_in[6] and scanbus_in[7] of the test buses. Second input ends of the last five first selectors 302 are connected to second input ends of the five data distribution circuits 301.
[0101] In the third test subcircuit corresponding to the tested circuit C, first input ends of first four first selectors 302 are connected to second output ends of four data distribution circuits 301. First input ends of last four first selectors 302 are connected to inputs scanbus_in of last four test buses, that is, scanbus_in[4], scanbus_in[5], scanbus_in[6] and scanbus_in[7] of the buses. Second input ends of the first four first selectors 302 are connected to the inputs scanbus_in of the last four test buses, that is, scanbus_in[4], scanbus_in[5], scanbus_in[6] and scanbus_in[7] of the test buses. Second input ends of the last four first selectors 302 are connected to second input ends of the four data distribution circuits 301.
[0102] It should be understood that, in this example, to control the first selector 302 to select whether the first input end is connected to the output end or the second input end is connected to the output end, a control end of the first selector 302 receives a shift selection control signal bus_shift for control. The shift selection control signal bus_shift is configured and generated by a controller 303, that is, corresponds to a first signal interface of the controller 303. The controller 303 may be configured by using an IEEE 1687 standard (Internal JTAG, IJTAG) protocol pin.
[0103] When the shift selection control signal bus_shift indicates the first selector 302 to select the first input end to connect to the output end, the input scanbus_in and the output scanbus_out of the test bus in the test subcircuit are in a direct connection mode. For example, scanbus_in[0] of the test bus corresponds to scanbus_out[0] of the test bus, and so on.
[0104] When the shift selection control signal bus_shift indicates the first selector 302 to select the second input end to connect to the output end, input scanbus_in and output scanbus_out of the test bus in the test subcircuit are in a shift connection mode. In other words, corresponding to the example in
[0105] It should be noted that, in such a shift connection manner, in some test scenarios, the tested circuit 01 may not participate in the test. For the tested circuit 01 that does not participate in the test, a bus in the test subcircuit 30 shown in
[0106] In the example shown in
[0107]
[0108] The fourth selector 3011 is configured to enable the data distribution circuit 301 to choose whether to receive data from the test bus 02 or from the corresponding scan output channel channel_out of the tested circuit 01. In other words, a first input end and a second input end of the fourth selector 3011 are respectively connected to a first input end and a second input end of the data distribution circuit 301. A control end of the fourth selector 3011 is connected to a first control end of the data distribution circuit 301, and is configured to control selecting and inputting bus data to the data distribution circuit 301, or selecting and inputting corresponding scan output data of the tested circuit 01 to the data distribution circuit 301.
[0109] The register 3012 is configured to temporarily store the data received by the data distribution circuit 301. Therefore, an input end of the register 3012 is connected to an output end of the fourth selector 3011. An output end of the register 3012 is connected to the first input end of the fifth selector 3013.
[0110] The fifth selector 3013 is configured to implement configuration of whether input data of the test bus 02 passes through the register 3012. In other words, a second input end of the fifth selector 3013 is connected to the first input end of the data distribution circuit 301. An output end of the fifth selector 3013 is connected to a second output end of the data distribution circuit 301. A control end of the fifth selector 3013 is connected to a second control end of the data distribution circuit 301.
[0111] A first output end of the data distribution circuit 301 is connected to the first input end of the data distribution circuit 301, the output end of the register 3012, or the second output end of the data distribution circuit 301.
[0112] In a case in which the tested circuit 01 that does not participate in the test exists, to reduce test time, the fifth selector 3013 is disposed in the foregoing data distribution circuit 301. The fifth selector 3013 is an alternative selector, and a bypass enabling signal dru_bp is generated through configuration by the controller 303. In other words, corresponding to the second signal interface of the controller 303, the first input end of the fifth selector 3013 is controlled to be connected to the output end of the fifth selector 3013, or the second input end of the fifth selector 3013 is controlled to be connected to the output end of the fifth selector 3013. When the bypass enabling signal dru_bp indicates the fifth selector 3013 to select the first input end to connect to the output end of the fifth selector 301, the data distribution circuit 301 is in a bypass state. In other words, the first input end and the second output end of the data distribution circuit 301 are directly connected. Therefore, when a tested circuit 01 does not participate in the test, all data distribution circuits 301 in a test subcircuit corresponding to the tested circuit 01 are set to a bypass state, and no additional time period is occupied in a data transmission process. This reduces test time.
[0113] Example 2: Refer to
[0114] In the j.sup.th test subcircuit, CO.sub.j input ends of each second selector 308 in the M second selectors 308 are respectively connected to CO.sub.j scan output channels channel_out of the tested circuit 01 corresponding to the j.sup.th test subcircuit. Output ends of the M second selectors 308 are respectively connected to second input ends of the M data distribution circuits 301 in the test subcircuit. The second selector 308 is a one-of-many multiplexer. A quantity of input ends of the second selector 308 is related to a quantity of scan output channels channel_out of the tested circuit 01 corresponding to the j.sup.th test subcircuit. For example, if the quantity of scan output channels channel_out of the tested circuit 01 is three, the second selector 308 may select a one-of-three multiplexer, configured to select a data distribution circuit 301 corresponding to each scan output channel channel_out of the tested circuit 01, and an input channel scanbus_in or an output channel scanbus_out of the corresponding test bus 02.
[0115] In the j.sup.th test subcircuit, M input ends of each third selector 309 of the CI.sub.j third selectors 309 are respectively connected to first output ends of the M data distribution circuits 301. Output ends of the CI.sub.j third selectors 309 are respectively connected to CIj scan input channels channel_in of the tested circuit 01 corresponding to the j.sup.th test subcircuit. The third selector 309 is also a one-of-many multiplexer. A quantity of input ends of the third selector 309 is related to a quantity of data distribution circuits 301 corresponding to the j.sup.th test subcircuit. The quantity of the data distribution circuits 301 is related to the bit width of the test bus 02. For example, if the bit width of the test bus 02 is eight bits, the third selector 309 may be a one-of-eight multiplexer, configured to select the data distribution circuit 301 corresponding to the scan input channel channel_in of the tested circuit 01, and the input channel scanbus_in or the output channel scanbus_out of the corresponding test bus 02.
[0116] In this example, the second selector 308 is used to configure the scan output channel channel_out of the tested circuit 01 to select a connected data distribution circuit 301, and the third selector 309 is used to configure the scan input channel channel_in of the tested circuit 01 to select the connected data distribution circuit 301. Corresponding to each test subcircuit 30 shown in
[0117] Corresponding to the example in
[0118] Refer to
[0119] It should be further noted that, in the example in
[0120] In addition, corresponding to the example in
[0121] Example 3: Refer to
[0122] The CI.sub.j OR gates 310 are respectively corresponding to CI.sub.j groups of data distribution circuits 301 in the Nj groups of data distribution circuits 301. The CI.sub.j OR gates 310 are respectively corresponding to the CI.sub.j scan input channels channel_in of the tested circuit 01. CO.sub.j groups of data distribution circuits 301 in the Nj groups of data distribution circuits 301 respectively correspond to the CO.sub.j scan output channels channel_out of the tested circuit 01. For example, the quantity of scan channels of the tested circuit 01 is four, and the quantity of scan channels is a maximum value of the quantity of the scan input channels channel_in and the quantity of the scan output channels channel_out. Therefore, the quantity of groups of data distribution circuits 301 in the test subcircuit corresponding to the tested circuit 01 is four. Each group of data distribution circuits 301 may correspond to one scan input channel channel_in and one scan output channel channel_out. The quantity of OR gates in the test subcircuit is the quantity of scan input channels channel_in, that is, three. Therefore, each OR gate 301 also corresponds to a group of data distribution circuits 301, and corresponds to a scan input channel channel_in of the tested circuit 01.
[0123] In the j.sup.th test subcircuit, each group of data distribution circuits 301 includes M data distribution circuits 301. The M data distribution circuits 301 are respectively connected to a test bus of M bits.
[0124] Each group of data distribution circuits in the Nj groups of data distribution circuits 301 are serially connected to the corresponding test bus through a first input end and a second output end of each data distribution circuit 301 in sequence. In other words, a plurality of data distribution circuits 301 on the same test bus 02 are connected to the same test bus 02 through the first input end and the second output end in sequence.
[0125] First output ends of the M data distribution circuits 301 in each group of data distribution circuits 301 are connected to M input ends of corresponding OR gates 310. Output ends of the OR gates 310 are connected to corresponding scan input channels channel_in of the tested circuit 01.
[0126] Second input ends of the M data distribution circuits 301 in each group of data distribution circuits 301 are connected to a corresponding scan output channel channel_out of the tested circuit 01.
[0127] Each data distribution circuit 301 is further configured to control reset of the data distribution circuit 301. When the data distribution circuit 301 is reset, output of the data distribution circuit 301 is zero. In each group of data distribution circuits 301, an output value of the OR gate 310 is a value output by the first output end of the selected data distribution circuit 301, that is, a value input by the input channel scanbus_in of the selected test bus 02.
[0128] In Example 3, an OR gate 310 is disposed between the scan input channel channel_in of the tested circuit 01 and the data distribution circuit 301 connected to the test bus. The data transmitted to the scan input channel channel_in of the tested circuit 01 is selected through the OR gate 310. In this way, area overheads can be reduced as much as possible, and a winding congestion problem can be resolved. In addition, by performing a reset operation on unselected data distribution circuits 301, the output value of each OR gate 310 may be the value output by the first output end of the selected data distribution circuit 301, thereby implementing more flexible test bus resources allocation.
[0129] Corresponding to the example in
[0130] It should be noted that the bypass enabling signal dru_bp in the example shown in
[0131]
[0132] Example 4: Refer to
[0133] In the j.sup.th test subcircuit, first input ends of the Nj data distribution circuits 301 are respectively connected to Nj input channels scanbus_in of the test bus. In other words, the first input end of the data distribution circuit 301 is configured to receive scan test data input by the input channel scanbus_in of the test bus 02. First output ends of CI.sub.j data distribution circuits 301 in the Nj data distribution circuits 301 are respectively connected to the CI.sub.j scan input channels channel_in of the tested circuit 01 corresponding to the j.sup.th test subcircuit. In other words, a first output end of the data distribution circuit 301 is configured to transmit the scan test data received from the test bus 02 to a corresponding scan input channel channel_in of the tested circuit 01. Second input ends of CO.sub.j data distribution circuits 301 in the Nj data distribution circuits 301 are respectively connected to the CO.sub.j scan output channels channel_out of the tested circuit 01 corresponding to the j.sup.th test subcircuit. In other words, a second input end of the data distribution circuit 301 is configured to receive test result data output by a corresponding scan output channel channel_out of the tested circuit 01. The test result data is output to the output channel scanbus_out of the test bus 02 through a second output end of the data distribution circuit 301.
[0134] A quantity M of first selectors 302 of each test subcircuit in the plurality of test subcircuits shown in
[0135] First input ends of the M first selectors 302 are respectively connected to M input channels scanbus_in of the test bus 02. Second input ends of Nj first selectors 302 of the M first selectors 302 are respectively connected to the second output ends of the Nj data distribution circuits 301. Second input ends of the remaining M-Nj first selectors 302 are respectively connected to the input channels scanbus_in of the M-Nj test buses on which no data distribution circuit 301 is disposed. The first input end and the second output end of each first selector 302 are connected to different buses.
[0136] A line structure of the test subcircuit 30 shown in
[0137] In Example 4, in the test circuit, test resources are allocated and transferred through the data distribution circuit 301. The first selector 302 is configured in a manner so that the test resources can be dynamically allocated. This greatly resolves a winding congestion problem, and simplifies a configuration process.
[0138] Optionally, in the j.sup.th test subcircuit of the plurality of test subcircuits 30 shown in
[0139] For the explanation of the preset test bus sequence, refer to Example 1 shown in
[0140] It should be noted that, corresponding to Example 4 shown in
[0141] Corresponding to Example 4 in
[0142] In addition, configuration of the first selector 302 may still be controlled by using a shift selection control signal bus_shift generated by the controller 303. For details, refer to Example 1 shown in
[0143] It should be further noted that
[0144] Corresponding to Example 1 in
[0145] For example, in the j.sup.th test subcircuit, first output ends of CI.sub.j data distribution circuits 301 in the Nj data distribution circuits 301 are respectively connected to input ends of CI.sub.j first gate control circuits 306. Output ends of the CI.sub.j first gate control circuits 306 are respectively connected to CI.sub.j scan input channels channel_in of the tested circuit 01 corresponding to the j.sup.th test subcircuit. In the j.sup.th test subcircuit, CO.sub.j scan output channels channel_out of the tested circuit 01 corresponding to the j.sup.th test subcircuit are respectively connected to input ends of CO.sub.j second gating circuits 307. Output ends of the CO.sub.j second gating circuits 307 are respectively connected to second input ends of CO.sub.j data distribution circuits 301 in the Nj data distribution circuits 301.
[0146] Corresponding to Example 2 in
[0147] For example, the CO.sub.j scan output channels channel_out of the tested circuit 01 corresponding to the j.sup.th test subcircuit are respectively connected to input ends of CO.sub.j second gating circuits 307. Output ends of the CO.sub.j second gating circuits 307 are respectively connected to COj inputs of each second selector 308 of the M second selectors 308. Output ends of the CI.sub.j third selectors 309 are respectively connected to input ends of CI.sub.j first gate control circuits 306. Output ends of the CI.sub.j first gate control circuits 306 are respectively connected to CI.sub.j scan input channels channel_in of the tested circuit 01 corresponding to the j.sup.th test subcircuit.
[0148] Corresponding to Example 3 in
[0149] For example, output ends of the CI.sub.j OR gates 310 are respectively connected to input ends of CI.sub.j first gate control circuits 306. Output ends of the CI.sub.j first gate control circuits 306 are respectively connected to CI.sub.j scan input channels channel_in of the tested circuit 01 corresponding to the j.sup.th test subcircuit. The CO.sub.j scan output channels channel_out of the tested circuit 01 corresponding to the j.sup.th test subcircuit are respectively connected to the input ends of the CO.sub.j second gating circuits 307. The COj second gating circuits 307 are respectively corresponding to CO.sub.j groups of data distribution circuits 301. Second input ends of each data distribution circuit 301 in each group of data distribution circuits 301 are connected to output ends of a corresponding second gating circuit 307.
[0150] It should be understood that a corresponding gating circuit is disposed between the scan input channel_in of the tested circuit 01 and the data distribution circuit 301, and between the scan output channel_out of the tested circuit 01 and the data distribution circuit 301. Therefore, data can be transmitted between the data distribution circuit 301 and the scan input channel_in of the tested circuit 01 or between the scan output channel channel_out of the tested circuit 01 and the data distribution circuit 301 only when the corresponding gating circuit is enabled. This avoids transmission of invalid data.
[0151] For example, to facilitate the test of the tested circuit 01, some parameters need to be configured in the entire test process. For example, the test parameters are configured by using a state machine 304. Therefore, each test subcircuit 30 shown in
[0152] The first state control interface is configured to generate an output capture enabling signal so_cap_en, transfer the output capture enabling signal so_cap_en to a first control end of each data distribution circuit 301 in each test subcircuit 30 shown in
[0153] The second state control interface is configured to generate a first gating enabling signal ch_in_gate_en, and configure the first gate control circuit 306 by using the first gating enabling signal ch_in_gate_en, to control whether the scan test data of each data distribution circuit 301 in the test subcircuit 30 shown in
[0154] The third state control interface is configured to generate a second gating enabling signal ch_out_gate_en, and configure the second gating circuit by using the second gating enabling signal ch_out_gate_en, to control whether the scan output data of the scan output channel channel_out of the corresponding tested circuit 01 in the test subcircuit 30 shown in
[0155] The fourth state control interface is configured to generate a scan enabling signal scan_enable, and configure a scan structure of the tested circuit 01 by using the scan enabling signal, to control whether to perform test scanning on the scan structure of the tested circuit 01 corresponding to the test subcircuit 30 shown in
[0156] The finite state machine 304 generates the foregoing four types of signals to configure a test process of the test circuit. Configuration is simple and easy to implement.
[0157] Optionally, corresponding to the examples in
[0158] For example,
[0159] Refer to
[0160] S1101: Generate configuration information and a test vector. It should be understood that the configuration information and the test vector may be generated by the EDA software. In a test process, the EDA software may generate the configuration information and test excitation data based on some test parameters given by a tester. The configuration information may be used to configure a test circuit. The test vector is the test excitation data of the tested circuit, and is determined by a circuit structure of the tested circuit.
[0161] S1102: Configure the test circuit based on the configuration information.
[0162] Before configuring the test circuit, circuits to be tested at the same time are specified. Therefore, the tested circuits can be tested by group. Generally, the tested circuits can be grouped based on a principle of shortest total test time.
[0163] When the test circuit is configured, a specific configuration method and configuration content vary based on different test circuit structures.
[0164] For example, in the test circuits shown in
[0165] In the test circuit shown in
[0166] In the test circuit shown in
[0167] In the test circuit shown in
[0168] In addition, in any test circuit shown in
[0169] In addition, in the configuration process, a frequency division ratio of the frequency dividing circuit 305 further needs to be configured. The frequency division ratio of the frequency dividing circuit 305 is determined by the quantity of scan input channels channel_in, the quantity of scan output channels channel_out, and the bit width of the test bus 02 of the tested circuit 01. A calculation formula of the frequency division ratio R.sub.div of the frequency dividing circuit 305 is:
R.sub.div=┌Max(ΣCI.sub.i,ΣCO.sub.i)/B┐+1.
[0170] CI.sub.i is a quantity of scan input channels of an i.sup.th tested circuit. CO.sub.i is a quantity of scan output channels of the i.sup.th tested circuit. B is a bit width of a bus.
[0171] S1103: Transmit the test vector to the test bus, and transmit the test vector to a scan input channel of the tested circuit through the test circuit. The test vector is the test excitation data of the tested circuit, and is determined by a circuit structure of the tested circuit.
[0172] The transmitting a test vector to the scan input channel of the tested circuit through the test circuit includes: transmitting the test vector to the scan input channel of the tested circuit based on a correspondence between the scan input channel of the tested circuit and an input of the test bus through the input of the test bus corresponding to the scan input channel of the tested circuit.
[0173] The correspondence between the scan input channel channel_in of the tested circuit and the input channel scanbus_in of the test bus 02 is determined by a data distribution circuit 301 in the test subcircuit 30 shown in
[0174] For example, in the test circuits shown in
[0175] In the test circuit shown in
[0176] In the test circuit shown in
[0177] S1104: Transmit test result data of the tested circuit to an output of the test bus through the tested circuit. Specifically, based on the correspondence between the scan output channel of the tested circuit and the output of the test bus, the test result data output by the scan output channel of the tested circuit is transmitted to the output of the test bus corresponding to the scan output channel of the tested circuit.
[0178] The correspondence between the scan output channel of the tested circuit and the output channel of the test bus is determined by the data distribution circuit in the test subcircuit corresponding to the tested circuit. The method for determining the correspondence between the scan output channel channel_out of the tested circuit 01 and the output channel scanbus_out of the test bus 02 is similar to the method for determining the correspondence between the scan input channel of the tested circuit and the input of the test bus in step S1103, and is not described herein again.
[0179] It should be noted that, when the test circuit tests the tested circuit, a plurality of tested circuits may be tested at the same time. However, the bit width of the test bus is limited. Therefore, the test bus is multiplexed. In other words, the test bus transmits data to scan input channels of the plurality of tested circuits through time sequence dividing. In a bus clock cycle, the test bus can transmit data to only one scan input channel or output data from only one scan output channel. Therefore, if the input of the test bus needs to transmit data to the plurality of scan input channels channel_in, or the output needs to output data from the plurality of scan output channels channel_out, the transmitted data is divided and transmitted in sequence in a plurality of bus clock cycles. For a specific example, refer to the test solution shown in
[0180] In addition, each time the test bus transmits scanning data of one cycle, one bus clock cycle is added, to transmit the test vector data in the data distribution circuit to the scan input channel channel_in of the tested circuit 01, and transmit the test result data of the scan output channel channel_out of the tested circuit 01 to the data distribution circuit. The scanning data in a period refers to the scan test data scanned once by all the tested circuits.
[0181] For the test method of the foregoing circuit, the following uses the test circuit shown in
TABLE-US-00001 TABLE 1 input channels output scanbus_in[0] core_A.channel_in[0] core_A.channel_out[0] scanbus_out[1] scanbus_in[1] core_A.channel_in[1] core_A.channel_out[1] scanbus_out[2] scanbus_in[2] core_A.channel_in[2] core_A.channel_out[2] scanbus_out[3] scanbus_in[3] core_C.channel_in[0] core_C.channel_out[0] scanbus_out[4] scanbus_in[4] core_C.channel_in[1] core_C.channel_out[1] scanbus_out[5] scanbus_in[5] core_C.channel_in[2] core_C.channel_out[2] scanbus_out[6] scanbus_in[6] core_C.channel_in[3] core_C.channel_out[3] scanbus_out[7] scanbus_in[7] / / scanbus_out[0]
[0182] Refer to the test solution shown in
[0183] According to the correspondence between the test bus 02 and the scan channel of the tested circuit 01 in Table 1, the test vector is transmitted to the scan input channel of the tested circuit through the input channel scanbus_in of the test bus. The test result data is transmitted from the scan output channel of the tested circuit to the output channel scanbus_out of the test bus. Each input or output of the test bus corresponds to only one scan channel of the tested circuit. Therefore, the test vector and test result data can be transmitted in one period.
[0184] In the example shown in
[0185] In this example, a bit width of the test bus 02 is 8 bits. The tested circuit A has three scan channels. The tested circuit B has five scan channels. The tested circuit C has four scan channels. The quantity of scan channels is a maximum value between the quantity of scan input channels and the quantity of scan output channels of the tested circuit. Therefore, for allocation of the test bus, the tested circuit A needs to allocate three-bit input and output of the test bus. The tested circuit B needs to allocate five-bit input and output of the test bus. In other words, the tested circuit A and the tested circuit B have occupied all resources of the test bus. The tested circuit C can only multiplex the test bus, and input or output the test vector data and test result data in two different clock cycles. For a correspondence between the test bus 02 and the scan input channel of the tested circuit 01, refer to Table 2. channel[x] in Table 2 may represent channel_in[x] or channel_out[x] in
TABLE-US-00002 TABLE 2 input Cycle1 Cycle2 output scanbus_in[0] core_C.channel[0] core_A.channel[0] scanbus_out[4] scanbus_in[1] core_C.channel[1] core_A.channel[1] scanbus_out[5] scanbus_in[2] core_C.channel[2] core_A.channel[2] scanbus_out[6] scanbus_in[3] core_C.channel[3] core_B.channel[0] scanbus_out[7] scanbus_in[4] / core_B.channel[1] scanbus_out[0] scanbus_in[5] / core_B.channel[2] scanbus_out[1] scanbus_in[6] / core_B.channel[3] scanbus_out[2] scanbus_in[7] / core_B.channel[4] scanbus_out[3]
[0186] In the test solution shown in
[0187] It should be noted that the test solution shown in
[0188] For example,
[0189] Refer to
[0190] S1501: Obtain a quantity of scan input channels, a quantity of scan output channels, and a bus bit width of a test bus of each tested circuit.
[0191] S1502: Configure, on the test bus, a data distribution circuit in a test subcircuit corresponding to each tested circuit based on the bit width of the test bus, the quantity of the scan input channels, and the quantity of the scan output channels of each tested circuit, and generate any test circuit shown in
[0192] A quantity of data distribution circuits in the test subcircuit corresponding to each tested circuit is determined by the bit width of the test bus, or the quantity of the scan input channels and the quantity of the scan output channels of each tested circuit.
[0193] In the examples in
[0194] An embodiment of this application further provides a computer-readable storage medium. The computer storage medium stores computer-readable instructions. When a computer reads and executes the computer-readable instructions, the computer is enabled to perform the circuit test method in the method embodiment shown in
[0195] An embodiment of this application further provides a computer program product. When a computer reads and executes the computer program product, the computer is enabled to perform the circuit test method in the method embodiment shown in
[0196] It should be understood that, the processor in embodiments of this application may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or another programmable logic device, a discrete gate or a transistor logic device, a discrete hardware component, or the like. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor or the like.
[0197] It may be understood that the memory in embodiments of this application may be a volatile memory or a nonvolatile memory, or may include a volatile memory and a nonvolatile memory. The nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), used as an external cache. Through an example rather than a limitative description, random access memories (RAM) in many forms may be used, for example, a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchlink dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM).
[0198] All or some of the foregoing embodiments may be implemented using software, hardware (for example, circuit), firmware, or any combination thereof. When software is used to implement embodiments, the foregoing embodiments may be implemented completely or partially in a form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the program instructions or the computer programs are loaded and executed on the computer, the procedure or functions according to embodiments of this application are all or partially generated. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable apparatuses. The computer instructions may be stored in a computer-readable storage medium or may be transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (for example, infrared, radio, or microwave) manner. The computer-readable storage medium may be any usable medium accessible by a computer, or a data storage device, such as a server or a data center, integrating one or more usable media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state drive.
[0199] The foregoing descriptions are merely specific implementations of this application, but the protection scope of this application is not limited thereto. Any variation or replacement that can be readily figured out by the person skilled in the art within the technical scope disclosed in this application shall fall within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.