US 6,541,994 B2Grant
Semiconductor device with a self-testing function and a method for testing the semiconductor device
Issue Date:2003-04-01
•13 Claims
•9 Drawing Sheets
Abstract
A semiconductor device and a method for testing the semiconductor device of the present invention includes n macro blocks which process input data supplied from input terminals and output the data from output terminals, a test circuit which supplies test data for testing the macro blocks and receives the test data processed by the macro blocks in the test mode and a test path which supplies the test data from the test circuit to the input terminal of the macro block, supplies data of the output terminal of the k-th (k=1 to (n−1)) macro block to the input terminal of the macro block to the test circuit in the test mode. One macro block can be selected randomly to be tested.
Metadata
Assignee
- NEC Corporation
Inventor
- Kazuaki Masuda
Application Information
Application Number:US 09/849,396
Filing Date:2001-05-07
Priority Date:2000-05-08
Art Unit:7
Classifications
IPC:
G01R 3126
Field of Search:
324 7313247653247633241581714724714733714736702117702119
Patent Drawings (9 sheets)
Description
BACKGROUND OF THE INVENTION
[0002] 1. Field of the Invention
[0003] The present invention relates to a semiconductor device having a self-testing function and a method for testing the semiconductor device, and more particularly, to a semiconductor device having a function to test a plurality of macro blocks and a method for testing the macro blocks.
[0004] 2. Description of the Related Art
[0005] FIG. 7 is a block diagram for explaining a semiconductor device having a self-testing function and a method for testing the semiconductor device.
[0006] In the semiconductor device shown in FIG. 7, in a normal operation mode, input data Din is supplied to each of macro blocks 751, 752. and 75m, . . . Each of macro blocks 751, 752, . . . and 75mprocess the input data Din and output the processed data Dout.
[0007] In a test mode, test circuit 71 supplies test data (data used for testing) TTD to a circuit block 74 via a test bus 72. The test data TTD is input to m (m represents an integer more than 1) macro blocks 751, 752, . . . and 75min the circuit block 74. Bus selectors 791, 792, . . . and 79mrespectively included in the macro blocks 751, 752, . . . and 75msupply the test data TTD from the test circuit 71 to network circuits 761, 762, . . . and 76m. Each of the network circuits 761, 762, . . . and 76mprocess the test data TRD and output processed data TRD to the test circuit 71 through test buses 731, 732, . . . and 73m, respectively. The test circuit 71 compares the supplied processed data TRD with the expected value.
[0008] In the semiconductor device shown in FIG. 7, the test data TTD output from the test circuit 71 is supplied parallel to all of the macro blocks 751, 752, . . . and 75m, and processed parallel by the macro blocks 751, 752, . . . and 75m. Further, the respective processed data TRD of the macro blocks 751, 752, . . . and 75mare transmitted parallel to the test circuit 71. Due to this parallelism, regardless of the number of the macro blocks 751, 752, . . . and 75m, time period required for the test is almost the same as time period for testing a single macro block.
[0009] FIG. 8 is a block diagram for explaining another example of a conventional semiconductor device having a self-testing function. In the semiconductor device shown in FIG. 8, a test circuit 81 supplies test data TTD to a circuit block 84 via a test bus 82. A bus selector 89i(i represents an integer from 1 to m) selected by the test circuit 81 from among m bus selectors 891, 892, . . . and 89mrespectively included in macro blocks 851, 852, . . . and 85msupplies the test data TTD to a network circuit 86iin the selected macro block 85i. The network circuit 86iprocesses the test data TTD and outputs processed data TRD. A bus selector 88isupplies the processed data TRD to the test circuit 81 via a test bus 83. The test circuit 81 compares the received processed data TRD with the expected value.
[0010] The test circuit 81 repeats the above stated testing procedures for all the macro blocks, selecting one macro block at a time. FIGS. 9A and 9B are time charts showing the testing procedures of the semiconductor device shown in FIG. 8. As known from FIGS. 9A and 9B, time period for testing the semiconductor device shown in FIG. 8 is calculated by the equation below.
[0011] time period for testing the semiconductor device=(transmission time of the test data)×(number of macro blocks)+(time period for changing macro blocks)×(number of macro blocks−1)+delay time
[0012] The delay is caused by internal transmission of data in a macro block, most part of which is a time period required for data processing by a macro block.
[0013] The semiconductor device shown in FIG. 7 requires the same number of test buses and circuits for comparing the processed data TRD with the expected data, as the number of macro blocks. Therefore, this semiconductor device requires a large occupation area.
[0014] The semiconductor device shown in FIG. 8 cannot test a plurality of macro blocks parallel or at a time. Thus, if the number of macro blocks to be tested increases, more time is needed for testing those macro blocks.
[0015] An example of a semiconductor device which performs testing by individually transmitting test data to a plurality of macro blocks as shown in FIG. 8 is disclosed in Unexamined Japanese Patent Application KOKAI Publication No. H2-10179. In testing, the semiconductor device disclosed in this publication selects a macro block to be tested under control by a test interface circuit equipped in each macro block, transmits test data to the selected macro block and tests this macro block individually. This disclosure is incorporated herein by reference.
SUMMARY OF THE INVENTION
[0016] Accordingly, it is an object of the present invention to provide a semiconductor device having a testing function and a method for testing a plurality of macro blocks in a short period of time.
[0017] It is another object of the present invention to provide a semiconductor device with a self-testing function which occupies a small area.
[0018] To achieve the above objects, a semiconductor device with a self-testing function according to the first aspect of the present invention comprises:
[0019] a first to n-th (n is an integer more than 1) macro blocks each of which receives input data, processes the input data, and outputs processed data;
[0020] a data path which supplies data to-be-processed to the n macro blocks, and transmits processed data processed by and output from the n macro blocks respectively, in a normal operation mode;
[0021] a test circuit which outputs test data for testing the n macro blocks and receives the test data processed by the n macro blocks, in a test mode; and
[0022] a test path which supplies the test data output from the test circuit to the first macro block, supplies data output from the h-th (h is an integer from 1 to (n−1)) macro block to the (h+1)th macro block and supplies data output from the n-th macro block to the test circuit.
[0023] The test path may comprise: a first test bus which transmits the test data output from the test circuit to the first macro block; connectors which transmit data output from the h-th macro block to the (h+1)th macro block; and a second test bus which transmits data output from the n-th macro block to the test circuit.
[0024] The test circuit may compare data received from the n-th macro block and an expected value, and detects that there is defect if received data substantially does not coincide with the expected value.
[0025] The test circuit may comprises: a supplier which supplies the test data; and a comparator which compares expected data with data received from the n-th macro block.
[0026] The test circuit may further comprise: a controller which designates j-th (j is an integer from 1 to n) macro block. In this case, it is desirable that the supplier supplies test data for testing the j-th macro block designated by the controller, the comparator compares expected data for the j-th macro block with data output from the j-th macro block, and the test path transmits the test data for testing the j-th macro block supplied from the supplier to the j-th macro block and supplies data output from the j-th macro block to the comparator.
[0027] For example, the controller performs control to test the j-th macro block individually, if any defect is found by the test circuit.
[0028] The test circuit may comprise a controller which designates j-th (j is an integer from 1 to n) macro block, a supplier which supplies test data for testing the j-th macro block designated by the controller, and a comparator which compares expected data for j-th macro block with data output from the j-th macro block. And the test path may further transmit the test data for testing the j-th macro block supplied from the supplier to the j-th macro block and supply data output from the j-th macro block to the comparator.
[0029] The semiconductor device may further comprise a second test path which supplies the test data to one of the macro blocks designated by the test circuit and transmits data which is the test data processed by the designated macro block. In this case, it is desirable that the test circuit tests all of the macro blocks with the test path, and if any defect is found in the macro blocks, then, tests each of the n macro blocks with the second test path, sequentially.
[0030] For example, the data path comprises a selector, first to n-th input terminal connectors and first to n-th output terminal connectors, and the first to n-th macro blocks include first to n-th circuits, respectively. In this case, for example, the selector selects one from between the test data supplied from the test circuit and the to-be-processed data of the first circuit and supplies selected one to the first input terminal connector, the first input terminal connector supplies an output from the selector to an input terminal of the first circuit; the k-th input terminal connector selects one from between an externally supplied to-be-processed data of the k-th circuit and an output from the k−1)th output terminal connector and supplies selected one to an input terminal of the k-th circuit; the n-th input terminal connector selects one from between an externally supplied to-be-processed data of n-th circuit and an output from the (n−1)th output terminal connector and supplies selected one to an input terminal of the n-th circuit; the first output terminal connector externally outputs an output from an output terminal of the first circuit or supplies the output from the output terminal to the second input terminal connector; the k-th output terminal connector externally outputs an output from an output terminal of the k-th circuit or supplies the output from the output terminal to the (k+1)th input terminal connector; and the n-th output terminal connector externally outputs an output from an output terminal of the n-th circuit or supplies the output from the output terminal to the test circuit. In a normal operation mode: the selector selects the to-be-processed data of the first circuit and supplies the to-be-processed data to the first input terminal connector, m-th (m is an integer from 2 to n) input terminal connector selects the to-be-processed data from the selector and supplies the to-be-processed data to the input terminal of the m-th circuit; and the m-th output terminal connector selects and externally outputs an output from an output terminal of the m-th circuit. On the other hand, in a test mode, the selector selects the test data output from the test circuit and supplies the test data to the first input terminal connector, the first input terminal connector supplies an output from the selector to the input terminal of the first circuit; the k-th input terminal connector selects an output from the (k−1)th output terminal connector and supplies selected output to the input terminal of the k-th circuit; the n-th input terminal connector selects an output from the (n−1)th output terminal connector and supplies selected output to the input terminal of the n-th circuit; the first output terminal connector supplies an output from the output terminal of the first circuit to the second input terminal connector, the k-th output terminal connector supplies an output from the output terminal of the k-th circuit to the (k+1)th input terminal connector, and the n-th output terminal connector supplies an output from the output terminal of the n-th circuit to the test circuit.
[0031] For example, each of the selector and the second to n-th input terminal connectors comprises a multiplexer of two inputs 1 one output type, and each of the output terminal connectors comprises a switch of one inputs/two outputs type.
[0032] The data path and the test path may comprise first to n-th selectors, first to n-th input terminal connectors and first to n-th output terminal connectors. In this case, the first to n-th macro blocks include first to n-th circuits, respectively; the first selector selects one from between an output from the second selector and to-be-processed data of the first circuit and supplies selected one to the first input terminal connector, the k-th k is a natural number from 2 to (n−1)) selector selects one from between an output from the (k+1)th selector and the to-be-processed data of the k-th circuit and supplies selected one to the k-th input terminal connector or the (k−1)th selector; the n-th selector selects one from between the test data supplied from the test circuit and the to-be-processed data of the n-th circuit and supplies selected one to the n-th input terminal connector or the (n−1)th selector, the first input terminal connector supplies an output from the first selector to an input terminal of the first circuit; the k-th input terminal connector selects one from between an output from the k-th selector and an output from the (k−1)th output terminal connector and supplies selected one to an input terminal of the k-th circuit or the k-th output terminal connector, the n-th input terminal connector selects one from between an output from the n-th selector and an output from the (n−1)th output terminal connector and supplies selected one to an input terminal of the n-th circuit or the n-th output terminal connector; the first output terminal connector externally outputs an output from an output terminal of the first circuit or supplies the output from the output terminal to the second input terminal connector; the k-th output terminal connector selects one from between an output from an output terminal of the k-th circuit and an output from the k-th input terminal connector and externally outputs selected one or supplies the selected one to the (k+1)th input terminal connector; and the n-th output terminal connector selects one from between an output from an output terminal of the n-th circuit and an output from the n-th input terminal connector and externally outputs selected one or supplies the selected one to the test circuit. In a normal operation mode, the m-th (m is a natural number from 1 to n) selector selects the to-be-processed data of the m-th circuit and supplies the to-be-processed data to the m-th input terminal connector, the m-th input terminal connector selects the to-be-processed data from the m-th selector and supplies the to-be-processed data to an input terminal of the m-th circuit; and the m-th output terminal connector selects and externally outputs an output from an output terminal of the m-th circuit. In a first test mode, the n-th selector selects the test data output from the test circuit and supplies the test data to the (n−1)th selector; the k-th selector selects an output from the (k+1)th selector and supplies selected output to the (k−1)th selector, the first selector selects an output from the second selector and supplies selected output to the first input terminal connector; the first input terminal connector supplies the output from the first selector to the input terminal of the first circuit; the k-th input terminal connector selects an output from the (k−1)th output terminal connector and supplies selected output to the input terminal of the k-th circuit; the n-th input terminal connector selects an output from the (n−1)th output terminal connector and supplies selected output to the input terminal of the n-th circuit; the first output terminal connector selects an output from the output terminal of the first circuit and supplies the output to the second input terminal connector, the k-th output terminal connector selects an output from the output terminal of the k-th circuit and supplies selected output to the (k+1)th input terminal connector, and the n-th output terminal connector selects an output from the output terminal of the n-th circuit and supplies selected output to the test circuit. In a second test mode where the controller designates the j-th circuit, the j-th selector selects the test data supplied from the test circuit and supplies the test data to the j-th input terminal connector; the j-th input terminal connector selects an output from the j-th selector and supplies selected output to an mput terminal of the j-th circuit; and the j-th output terminal connector selects an output from an output terminal of the j-th circuit and supplies the output to the test circuit.
[0033] For example, the first selector comprises a switch of two inputs/one output type, the k-th selector comprises a switch of two inputs/two outputs type and the n-th selector comprises a switch of two inputs/two outputs type; the k-th input terminal connector comprises a switch of two inputs/two outputs type and the n-th input terminal connector comprises a switch of two inputs/two outputs type; and the first output terminal connector comprises a switch of two inputs/two outputs type, the k-th output terminal connector comprises a switch of two inputs/two outputs type and the n-th output terminal connector comprises two inputs/two outputs type.
[0034] To achieve the above objects, a method for testing a semiconductor device which comprises first to n-th (n is a natural number more than 1) macro blocks, according to the second aspect of the present invention comprises:
[0035] a method for testing a semiconductor device which comprises first to n-th (n is a natural number more than 1) macro blocks, the method comprising:
[0036] supplying test data for testing the n macro blocks to the first macro block;
[0037] processing in the first macro block, the test data and outputting processed test data;
[0038] supplying data output from the h-th (h is a natural number from 1 to (n−1)) macro block to the (h+1)th macro block;
[0039] processing in the (h+1)th macro block, the data supplied to the (h+1)th macro block and outputting the processed data from the (h+1)th macro block;
[0040] supplying data output from the n-th macro block to the test circuit; and
[0041] comparing, in the test circuit, the data output from the n-th macro block with expected data.
BRIEF DESCRIPTION OF THE DRAWINGS
[0042] These objects and other objects and advantages of the present invention will become more apparent upon reading of the following detailed description and the accompanying drawings in which:
[0043] FIG. 1 is a block diagram for explaining the first embodiment of a semiconductor device with a self-testing function;
[0044] FIG. 2 is a circuit diagram of a test circuit shown in FIG. 1;
[0045] FIG. 3 is a diagram showing a data route in the semiconductor device with a self-testing function shown in FIG. 1;
[0046] FIGS. 4A to 4D are time charts showing a time period for testing the semiconductor device;
[0047] FIG. 5 is a block diagram for explaining the second embodiment of a semiconductor device with a self-testing function;
[0048] FIG. 6 is a diagram showing a data route in the semiconductor device with a self-testing function shown in FIG. 5;
[0049] FIG. 7 is a block diagram for explaining an example of a conventional semiconductor device with a self-testing function;
[0050] FIG. 8 is a block diagram for explaining another example of a conventional semiconductor device with a self-testing function; and
[0051] FIGS. 9A and 9B are time charts showing a time period for testing the semiconductor device with a self-testing function by the method for testing the semiconductor device explained in FIG. 8.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0052] A semiconductor device with a self-testing function and a method for testing the semiconductor device according to embodiments of the present invention will now be described below with reference to the drawings.
First Embodiment
[0053] FIG. 1 is a block diagram for explaining a semiconductor device with a self-testing function according to the first embodiment of the present invention. This semiconductor device comprises a test circuit 11, a first test bus 12, a second test bus 13 and a circuit block 14. The circuit block 14 includes m (m is an integer more than 1) macro blocks 151to 15m. The macro blocks 151to 15minclude network circuits 161to 16m, selectors 171to 17mand bifurcating sections 181to 18m, respectively. The macro block 15malso includes a selector 19m.
[0054] Each of the selectors 171to 17mand the selector 19mis comprised of, for example, a multiplexer (or switch) having two input terminals and one output terminal, and selects and outputs one input in accordance with a control signal supplied form the test circuit 11. Each of the bifurcating sections 181to 18mis comprised of, for example, a switch having one input terminal and two output terminals, and outputs an input signal at a selected output terminal in accordance with a control signal supplied from the test circuit 11.
[0055] In a normal operation mode, the selector 19mreceives the input data (n bits) Din from an external circuit 111 and supplies the input data Din to the selector 17mso as to supply it to the network circuit 16m. In a test mode, the selector 19mreceives the test data TTD supplied from the test circuit 11 through the test bus 12 and supplies the test data TTD to the selector 17mso as to supply it to the network circuit 16m.
[0056] In the normal operation mode, the selectors 171to 17m−1receive the input data (n bits) Din directly and supply the input data Din to the network circuits 161to 16m−1, respectively. In the test mode, the selectors 171to 17m, receive processed data supplied from the bifurcating sections 182to 18mof the adjacent macro blocks 152to 15mand supply the processed data to the network circuits 161to 16m−1.
[0057] In the normal operation mode, the selector 17mreceives the input data Din via the selector 19mand supplies the input data Din to the network circuit 16m. In the test mode, the selector 17mreceives the test data TTD via the selector 19mand supplies the test data TTD to the network circuit 16m.
[0058] The bifurcating section 181receives data output from the network circuit 161and, in the normal operation mode, outputs the data as the output data (n bits) Dout to the external circuit 111, and in the test mode, outputs the data to the test circuit 11 as the processed data TRD through the second test bus 12.
[0059] The bifurcating sections 182to 18mreceive data output from the network circuits 162to 16m, and output, in the normal operation mode, the data as the output data (n bits) Dout to the external circuit 111, and, in the test mode, the data as the processed data to the selectors 171to 17m−1of the adjacent macro blocks 151to 15m−1.
[0060] FIG. 2 is a block diagram showing the internal structure of the test circuit 11 shown in FIG. 1. As shown in FIG. 2, the test circuit comprises a data generator 21, an expected value table 22, a comparator 23 and a controller 24. The data generator 21 generates and outputs the test data TTD to the circuit block 14 through the first test bus 12. The expected value table 22 stores expected value data. The expected valued data is equal to the test data TDR adequately processed by the network circuits 161to 16msequentially. The comparator 23 receives the processed data TRD and corresponding expected value data, compares them with each other and determines whether a tested macro block is deficient or not. The controller 24 controls the data generator 21, the expected value table 22 and the comparator 23. Further, the controller 24 controls the selection of data paths (route of data flow) by controlling the selectors 171to 17mand 19m, and the bifurcating sections 181to 18m.
[0061] The controller 24 controls the selectors 171to 17mand 19m, and the bifurcating sections 181to 18mby supplying control signals to them.
[0062] A register, a ROM or the like can be used as the expected value table 22 shown in FIG. 2. Instead of providing the expected value table 22, the comparator 23 may generate the expected value data internally under control by the controller 24. Further, the expected value data may be externally supplied to the semiconductor device. In this case, the comparator 23 receives the externally provided expected value data when the semiconductor device performs testing. The PRBS (Pseudo Random Bit Stream) can be used as the test data TTD. The PRBS is a stream of random bit data generated in accordance with a generation polynomial.
[0063] The operation of the semiconductor device will now be described.
[0064] In a normal operation mode, the selector 171to 17m−1and 19mselect the input data Din from the external circuit 111 and the selector 17mselects data from the selector 19m. Therefore, the input data Din is supplied to the network circuit 161to 16m. The network circuit 161to 16mprocess the input data Din and output processed data to the bifurcating section 181to 18m. The bifurcating section 181to 18mselect the processed data and output it to the external circuit 111 as the output data Dout.
[0065] Next, the test operation of the semiconductor device and method for testing the circuit block 14 will now be described with reference to FIG. 3.
[0066] FIG. 3 is a diagram showing a route through which data flows, in the test mode, in the semiconductor device shown in FIG. 1. In this test mode, all of the macro blocks 161to 16min the semiconductor device shown in FIG. 1 are tested at a time.
[0067] The test circuit 11 supplies the test data TTD through the first test bus 12 to the circuit block 14. The test data TTD supplied to the circuit block 14 is supplied to the selector 19mof the macro block 15m. The selector 19mselects the test data TTD and supplies it to the selector 17m. The selector 17msupplies the test data TTD to the network circuit 16m. The network circuit 16mreceives the test data TTD, processes the test data TTD and outputs processed data to the bifurcating section 18m. The bifurcating section 18mreceives the processed data and outputs it to the selector 17m−1of the adjacent macro block 15m−1. The selector 17m−1supplies the processed data to the network circuit 16m−1. The network circuit 16m−1receives the processed data, further processes the processed data and outputs the processed data to the bifurcating section 18m−1. The bifurcating section 18m−1receives the processed data, and outputs it to the adjacent macro block 15m−2. In the same manner, the processed data is sequentially transmitted to adjacent macro blocks and further processed.
[0068] The selector 171of the macro block 151receives processed data from the macro block 152. The selector 171supplies the processed data to the network circuit 161. The network circuit 161further processes received processed data and outputs the processed data to the bifurcating section 181. The bifurcating section 181supplies the processed output data as the processed data TRD to the test circuit 11.
[0069] The comparator 23 of the test circuit 11 compares the processed data TRD with the expected value pre-stored in the expected value table 22 to determine whether the processed data TRD and the expected data substantially coincide with each other. If there is at least one defect at any one of the macro blocks 151to 15mand/or buses 12 and 13, they do not coincide with each other. Therefore, the controller 24 determines that the target semiconductor device has defect if the coincidence is not found, and that the target semiconductor device has no defect if the coincidence is found.
[0070] As described above, each macro block receives the test data output from the adjacent macro block. Accordingly, testing can be performed to all of the macro blocks sequentially in a short period of time, forming the data route 30 which is like a line drawn in one stroke.
[0071] FIGS. 4A to 4D are time charts for explaining time period required for testing the semiconductor device. As shown in FIG. 4A, the test data TTD output from the test circuit 11 is supplied to the macro block 15mwithout delay. Assume that the length of the data supplied to each macro blocks 15ifrom the adjacent macro block 15i+1is equal to the length of the original test data TTD.
[0072] The output of the data from the macro block 15mand the input of the data to the macro block 15m−1are performed later than the input of the test data TTD to the macro block 15mby a delay period as shown in FIGS.4A and 4B. The delay period is a time period required for internal transmission of data in the macro block 15m, which is substantially equal to the time period required for data processing by the network circuit 16m. In the same manner, the data flows through the macro blocks 15mto 151sequentially, with the delay as shown in FIGS. 4A to 4D.
[0073] The input of the processed data TRD to the test circuit 11 is delayed from the output of the test data TTD from the test circuit 11 by the sum of the time periods of delay in each of macro blocks 15mto 151. The sum of the time periods of delay varies according to the specification of the macro blocks, the number of macro blocks, arrangement of the macro blocks and the like. The processed data TRD is compared with the expected value with such delay taken into consideration. Due to this, even if internal transmission delay is caused, the delay has no influence on the test result.
[0074] The time period for testing the semiconductor device shown in FIGS. 1 and 3 is calculated by the following equation as known from FIGS. 4A to 4D.
[0075] time period for testing the semiconductor device=(time period for transmission of the test data TTD)+(sum of the time periods of delay by the internal transmission)
[0076] Generally, the sum of the time periods of delay by the internal transmission is short in comparison with the time period for transmission of the test data. For example, in the case of a semiconductor device including ten macro blocks each of which requires 500 msec for testing it, if the macro blocks are tested sequentially, it takes 5 sec (500 msec×10) to test all the macro blocks. If this semiconductor device is tested with using the data route 30 shown in FIG. 3, the time period for testing is approximately 500 msec. One to two micro sec is required as the sum of the delay. However, one to two micro sec is sufficiently short compared to the time period for transmission of the test data.
[0077] As explained above, the semiconductor device with a self-testing function and the method for testing the semiconductor device explained in the first embodiment can test all the macro blocks included in the semiconductor device by transmitting the test data TTD only once though the route like a line drawn in one stroke. Due to this, the operation of a large number of macro blocks can be tested in a time period almost equal to the time period for testing one macro block. Due to this, all the macro blocks can be tested in a short period of time. This testing method is effective to determine whether the semiconductor device has deficient or not in a short period of time.
[0078] The test data is transmitted and received between a plurality of macro blocks 15 and the test circuit 11, with two buses 12 and 13. Therefore, the size of the test circuit 11 and buses is unchanged regardless of the number of macro blocks.
Second Embodiment
[0079] The semiconductor device of the first embodiment can detect whether the semiconductor device has defect or not. But, they can not detect the location or position of defect in the semiconductor device. The second embodiment of the semiconductor device with the self-testing function which can detect the location of the defect will be explained.
[0080] FIG. 5 is a block diagram for explaining the second embodiment of a semiconductor device with a self-testing function.
[0081] As shown, the semiconductor device comprises a test circuit 51, a first test bus 52, a second test bus 53 and a circuit block 54. The circuit block 54 includes m (m is an integer more than 1) macro blocks 551to 55m. The macro blocks 551to 55minclude network circuits 561to 56m, selectors 571to 57m, 581to 58mand 591to 59m, respectively.
[0082] The structure of the semiconductor device shown in FIG. 5 is basically the same as that of the semiconductor device shown in FIG. 1. The internal structure of the test circuit 51 is the same as that of the test circuit 11 shown in FIG. 2.
[0083] The semiconductor device shown in FIG. 5 is different from the semiconductor device shown in FIG. 1 in that data paths are provided to directly connect the selectors 571to 57mand the selectors 581to 58m, respectively, and that the selectors 591to 59mare provided not only to the macro block 55mbut to all of the macro blocks 551to 55m.
[0084] In the normal operation mode, the selectors 591to 59mreceive the input data (n bits) Din and output it on paths to supply the input data Din to the selectors 571to 57mso that the input data Din is supplied to the network circuit 561to 56m, respectively.
[0085] In the test mode, the selector 591receives the test data TTD from the test circuit 51 and selects a path to supply the test data TTD to the selector 571so that the test data TTD is supplied to the network circuit 561or a path to supply the test data TTD to the selectors 592of the macro blocks 552so that the test data TTD is supplied to the macro blocks 552to 55m.
[0086] In the test mode, the selectors 592to 59m−1receive the data via the selectors 591to 59m−2of the adjacent macro blocks 551to 55m−2and select paths to supply the test data TTD to the selectors 572to 57m−1so that the test data TTD is supplied to the network circuits 562to 56m−1or paths to supply the test data TTD to the selectors 593to 59mof the adjacent macro blocks 553to 55mso that the test data TTD is supplied to the adjacent macro blocks 553to 55m.
[0087] In the test mode, the selector 59mreceives the test data TTD via the selector 59m−1of the adjacent macro block 55m−1and selects a path to supply the test data TTD to the selector 57mso that the test data TTD is supplied to the network circuit 56m.
[0088] In the normal operation mode, the selectors 571to 57mreceive the input data Din via the selectors 591to 59mand select paths to supply the input data Din to the network circuit 561to 56m.
[0089] In the test mode, the selector 571selectively receives the test data TTD via the selector 591and the processed data TRD output from the selector 582of the adjacent macro block 552, and selects a path to supply the received data to the network circuit 561or a path to supply the received data to the selector 581of the macro block 551so that the received data is supplied to the test circuit 51.
[0090] In the test mode, the selectors 572to 57m−1selectively receive the test data TTD via the selectors 592to 59m−1and the processed data output from the selectors 583to 58mof the adjacent macro blocks 553to 55m. Then, the selectors 572to 57m−1select paths to supply the received data to the network circuits 562to 56m−1or paths to supply the received data to the selectors 582to 58m−1of the macro blocks 552to 55m−1so that the received data is supplied to the adjacent macro blocks 551to 55m−2.
[0091] In the test mode, the selector 57mreceives the test data TTD which comes via the selector 59mand selects a path to supply the received data to the network circuit 56m.
[0092] In the normal operation mode, the selectors 581to 58mreceive data output from the network circuit 561to 56mand select paths to output the received data as the output data Dout. In the test mode, the selector 581selectively receives data output from the network circuit 561and data from the selector 571of the macro block 551and selects a path to supply the received data to the test circuit 51.
[0093] In the test mode, the selectors 582to 58mselectively receive data output from the network circuits 562to 56mand data output from the selectors 572to 57mof the macro blocks 552to 55m. Then, the selectors 582to 58mselect paths to supply the received data to the selectors 571to 57m−1of the adjacent macro blocks 551to 55m−1.
[0094] All of the macro blocks 551to 55mcan be tested at a time by transmitting the test data through a data route similar to the data route 30 of the first embodiment explained with reference to FIG. 3.
[0095] In the case where all of the macro blocks are to be tested at a time, the selector 591receives the test data TTD output from the test circuit 51 and selects a path to supply it to the selectors 592, the selectors 592to 59m−1receive the test data TTD output from the selectors 591to 59m−2and select paths to supply it to the selectors 593to 59m, and the selector 59mreceives the test data TTD output from the selector 59m−1and selects a path to supply it to selector 57m. The selector 57mreceives the test data TTD from the selector 59mand selects a path to supply it to the network circuit 56m, the selectors 571to 57m−1receive the data from the selectors 582to 58mand select paths to supply it to the network circuits 561to 56m−1, respectively. The selectors 582to 58mreceive the processed data output from the network circuits 562to 56mand select paths to supply it to the selectors 571to 57m−1, respectively and the selector 581receives the data output from the network circuits 561and select a path to supply it to the test circuit 51.
[0096] FIG. 6 is a diagram showing a data route 60 for testing selected one of the macro blocks 561to 56m, in the semiconductor device shown in FIG. 5.
[0097] The test circuit 51 designates a macro block to be tested and selects a path of each of the selectors to establish a data route 60 (indicated by a bold line in FIG. 6) through which a signal can be transmitted and received between the test circuit 51 and the designated macro block.
[0098] For easy understanding, it is assumed that the macro block 552will be tested as shown in FIG. 6. In this case, the selector 591receives the test data TTD from the test circuit 51 and selects a path to supply the test data TTD to the selectors 592of the macro blocks 552, the selector 592receives the data from the selector 591and selects a path to supply the test data TTD to the selectors 572, the selector 572receives the test data TTD and selects a path to supply it to the network circuit 562, the selector 582receives the processed data output from the network circuit 562and selects a path to supply it to the selector 571, the selector 571receives the data from the selector 582and selects a path to supply it to the selector 581, and the selector 581receives the data from the selector 571and selects a path to supply it to the test circuit 51.
[0099] The test circuit 11 supplies the test data TTD through the first test bus 52. The test data TTD is transmitted to the network circuit 562through the data route 60 including selectors 591, 592, and 572.
[0100] The network circuit 562receives the test data TTD, processes the test data TTD and supplies the processed test data TTD as the processed data TRD to the test circuit 11 through the data route 60 including selector 582, 571, and 581. Accordingly, the specific macro block 552can be selected from among the plurality of macro blocks 551to 55mand be tested.
[0101] The controller of the test circuit 51, for example, first, tests the plurality of macro blocks 551to 55mat a time, then, if defect is detected, it tests each of the plurality of macro blocks 551to 55msequentially.
[0102] The semiconductor device and the method of the second embodiment can test all the macro blocks by transmitting the test data TTD only once through a data route like a line drawn in one stroke explained in the first embodiment. Due to this, even in the case where a large number of macro blocks are tested, those macro blocks can be tested in a time period which is almost the same as the time period for testing one macro block. Further, the semiconductor device of the second embodiment can select one specific macro block from among a plurality of macro blocks and test the selected macro block individually. This testing method is effective for analyzing in detail a semiconductor device which is detected as a deficient one. For example, when a deficiency is found as a result of testing all the macro blocks at a time, each of the macro blocks is individually tested until the deficient macro block is specified, or all the macro blocks are tested individually.
[0103] In the above mentioned embodiments, the test data is transmitted and received between a plurality of macro blocks and the test circuit, with use of only two buses. Therefore, the size of the test circuit of the semiconductor device is unchanged regardless of the number of macro blocks included in the semiconductor device. Due to this, the time period for testing the semiconductor device and areas needed for the test buses and the test circuit are almost the same as those of a semiconductor device including one macro block.
[0104] In the embodiments described above, a semiconductor device having a test circuit has been explained. However, the test circuit may be provided out of the semiconductor device. In this case, an outside device having the function of the test circuit supplies the test data TTD into the circuit block and the circuit block outputs the processed data TRD to the outside device so that the outside device determines whether the semiconductor device works adequately or not.
[0105] In the embodiments described above, the positional relation between the adjacent macro blocks is not limited to the physical adjacency but may include the theoretical adjacency.
[0106] Various embodiments and changes may be made thereonto without departing from the broad spirit and scope of the invention. The above-described embodiments are intended to illustrate the present invention, not to limit the scope of the present invention. The scope of the present invention is shown by the attached claims rather than the embodiments. Various modifications made within the meaning of an equivalent of the claims of the invention and within the claims are to be regarded to be in the scope of the present invention.
[0107] This application is based on Japanese Patent Application No. 2000-135093 filed on May 8, 2000 and including specification, claims, drawings and summary. The disclosure of the above Japanese Patent Application is incorporated herein by reference in its entirety.
Claims
What is claimed is:
1. A semiconductor device with a self-testing function, comprising:
first to n-th (n is an integer more than 1) macro blocks each of which receives input data, processes the input data, and outputs processed data;
a data path which supplies data to-be-processed to said n macro blocks, and transmits processed data processed by and output from said n macro blocks respectively, in a normal operation mode;
a test circuit which outputs test data for testing said n macro blocks and receives test data processed by said n macro blocks, in a test mode; and
a test path which supplies the test data output from said test circuit to said first macro block, supplies data output from h-th (h is an integer from 1 to (n−1)) macro block to (h+1)th macro block and supplies data output from said n-th macro block to said test circuit.
2. The semiconductor device according to claim 1, wherein
said test path comprises:
a first test bus which transmits the test data output from said test circuit to said first macro block;
connectors which transmit data output from said h-th macro block to said (h+1)th macro block; and
a second test bus which transmits data output from said n-th macro block to said test circuit.
3. The semiconductor device according to claim 1, wherein said test circuit compares data received from said n-th macro block and an expected value, and detects that at least a defect exists in at least one of said first to n-th macro blocks if received data substantially does not coincide with the expected value.
4. The semiconductor device according to claim 1, wherein said test circuit comprises: a supplier which supplies the test data; and a comparator which compares expected data with data received from said n-th macro block.
5. The semiconductor device according to claim 4, wherein:
said test circuit further comprises: a controller which designates j-th (j is an integer from 1 to n) macro block;
said supplier supplies test data for testing said j-th macro block designated by said controller;
said comparator compares expected data for said j-th macro block with data output from said j-th macro block; and
said test path transmits said test data for testing said j-th macro block supplied from said supplier to said j-th macro block and supplies data output from said j-th macro block to said comparator.
6. The semiconductor device according to claim 5, wherein:
said controller performs control to test i-th macro block individually, if any defect is found by said test circuit.
7. The semiconductor device according to claim 1, wherein:
said test circuit comprises: a controller which designates j-th (j is an integer from 1 to n) macro block; a supplier which supplies test data for testing said j-th macro block designated by said controller; and a comparator which compares expected data for said j-th macro block with data output from said j-th macro block; and
said test path further transmits said test data for testing said j-th macro block supplied from said supplier to said j-th macro block and supplies data output from said j-th macro block to said comparator.
8. The semiconductor device according to claim 1, further comprising a second test path which supplies the test data to one of the macro blocks designated by said test circuit and transmits data which is the test data processed by designated macro block, and wherein
said test circuit tests all of the macro blocks with said test path, and if any defect is found in the macro blocks, then, tests, each of the n macro blocks with said second test path, sequentially.
9. The semiconductor device according to claim 1, wherein:
said data path comprises a selector, first to n-th input terminal connectors and first to n-th output terminal connectors;
said first to n-th macro blocks include first to n-th circuits, respectively;
said selector selects one from between the test data supplied from said test circuit and the to-be-processed data of said first circuit and supplies selected one to said first input terminal connector;
said first input terminal connector supplies an output from said selector to an input terminal of said first circuit;
k-th input terminal connector selects one from between an externally supplied to-be-processed data of the k-th circuit and an output from (k−1)th output terminal connector and supplies selected one to an input terminal of k-th circuit;
said n-th input terminal connector selects one from between an externally supplied to-be-processed data of n-th circuit and an output from (n−1)th output terminal connector and supplies selected one to an input terminal of said n-th circuit;
said first output terminal connector externally outputs an output from an output terminal of said first circuit or supplies the output from the output terminal to said second input terminal connector;
k-th output terminal connector externally outputs an output from an output terminal of said k-th circuit or supplies the output from the output terminal to (k+1)th input terminal connector; and
said n-th output terminal connector externally outputs an output from an output terminal of said n-th circuit or supplies the output from the output terminal to said test circuit,
in a normal operation mode:
said selector selects the to-be-processed data of said first circuit and supplies the to-be-processed data to said first input terminal connector,
m-th (m is an integer from 2 to n) input terminal connector selects the to-be-processed data from said selector and supplies the to-be-processed data to said input terminal of m-th circuit; and
said m-th output terminal connector selects and externally output an output from said output terminal of said m-th circuit,
in a test mode:
said selector selects the test data output from said test circuit and supplies the test data to said first input terminal connector,
said first input terminal connector supplies an output from said selector to said input terminal of said first circuit;
said k-th input terminal connector selects an output from said (k−1)th output terminal connector and supplies selected output to said input terminal of said k-th circuit;
said n-th input terminal connector selects an output from said (n−1)th output terminal connector and supplies selected output to said input terminal of said n-th circuit;
said first output terminal connector supplies an output from said output terminal of said first circuit to said second input terminal connector;
said k-th output terminal connector supplies an output from said output terminal of said k-th circuit to said (k+1)th input terminal connector; and
said n-th output terminal connector supplies an output from said output terminal of said n-th circuit to said test circuit.
10. The semiconductor device according to claim 9, wherein:
each of said selector and said second to n-th input terminal connectors comprises a multiplexer of two inputs/one output type;
each of said output terminal connectors comprises a switch of one inputs/two outputs type.
11. The semiconductor device according to claim 7, wherein:
said data path and said test path comprise first to n-th selectors, first to n-th input terminal connectors and first to n-th output terminal connectors;
said first to n-th macro blocks include first to n-th circuits, respectively;
said first selector selects one from between an output from said second selector and to-be-processed data of said first circuit and supplies selected one to said first input terminal connector,
k-th (k is a natural number from 2 to (n−1)) selector selects one from between an output from (k+1)th selector and the to-be-processed data of said k-th circuit and supplies selected one to said k-th input terminal connector or (k−1)th selector;
n-th selector selects one from between the test data supplied from said test circuit and the to-be-processed data of said n-th circuit and supplies selected one to said n-th input terminal connector or (n−1)th selector,
said first input terminal connector supplies an output from said first selector to an input terminal of said first circuit;
said k-th input terminal connector selects one from between an output from said k-th selector and an output from (k−1)th output terminal connector and supplies selected one to an input terminal of k-th circuit or said k-th output terminal connector;
n-th input terminal connector selects one from between an output from said n-th selector and an output from said (n−1)th output terminal connector and supplies selected one to an input terminal of said n-th circuit or said n-th output terminal connector;
said first output terminal connector externally outputs an output from an output terminal of said first circuit or supplies the output from the output terminal to said second input terminal connector;
said k-th output terminal connector selects one from between an output from an output terminal of said k-th circuit and an output from said k-th input terminal connector and externally outputs selected one or supplies the selected one to said (k+1)th input terminal connector; and
said n-th output terminal connector selects one from between an output from an output terminal of said n-th circuit and an output from said n-th input terminal connector and externally outputs, selected one or supplies the selected one to said test circuit,
in a normal operation mode:
m-th (m is a natural number from 1 to n) selector selects the to-be-processed data of said m-th circuit and supplies the to-be-processed data to said m-th input terminal connector;
said m-th input terminal connector selects the to-be-processed data from said m-th selector and supplies the to-be-processed data to an input terminal of said m-th circuit; and
said m-th output terminal connector selects and externally outputs an output from an output terminal of said m-th circuit,
in a first test mode:
said n-th selector selects the test data output from said test circuit and supplies the test data to (n−1)th selector;
said k-th selector selects an output from said (k+1)th selector and supplies selected output to said (k−1)th selector;
said first selector selects an output from said second selector and supplies selected output to said first input terminal connector;
said first input terminal connector supplies the output from said first selector to said input terminal of said first circuit;
said k-th input terminal connector selects an output from said (k−1)th output terminal connector and supplies selected output to said input terminal of said k-th circuit;
said n-th input terminal connector selects an output from said (n−1)th output terminal connector and supplies selected output to said input terminal of said n-th circuit;
said first output terminal connector selects an output from said output terminal of said first circuit and supplies the output to said second input terminal connector;
said k-th output terminal connector selects an output from said output terminal of said k-th circuit and supplies selected output to said (k+1)th input terminal connector; and
said n-th output terminal connector selects an output from said output terminal of said n-th circuit and supplies selected output to said test circuit,
in a second test mode, in a case where said controller designates j-th circuit;
said j-th selector selects the test data supplied from said test circuit and supplies the test data to said j-th input terminal connector;
said j-th input terminal connector selects an output from said j-th selector and supplies selected output to an input terminal of said j-th circuit; and
said j-th output terminal connector selects an output from an output terminal of said j-th circuit and supplies the output to said test circuit.
12. The semiconductor device with a self-testing function according to claim 11, wherein:
said first selector comprises a switch of two inputs/one output type, said k-th selector comprises a switch of two inputs/two outputs type and said n-th selector comprises a switch of two inputs/two outputs type;
said k-th input terminal connector comprises a switch of two inputs/two outputs type and said n-th input terminal connector comprises a switch of two inputs/two outputs type; and
said first output terminal connector comprises a switch of two inputs/two outputs type, said k-th output terminal connector comprises a switch of two inputs/two outputs type and said n-th output terminal connector comprises a switch of two inputs/two outputs type.
13. A method for testing a semiconductor device which comprises first to n-th (n is a natural number more than 1) macro blocks, said method comprising:
supplying test data for testing said n macro blocks to said first macro block;
processing in said first macro block, the test data and outputting processed test data;
supplying data output from an said h-th (h is a natural number from 1 to (n−1)) macro block to an (h+1)th macro block;
processing in said (h+1)th macro block, the data supplied to said (h+1)th macro block and outputting the processed data from said (h+1)th macro block;
supplying data output from said n-th macro block to said test circuit; and
comparing, in said test circuit, the data output from said n-th macro block with expected data.