Interface conversion circuit, multi-chip interconnection system and test method thereof
By designing the interface conversion circuit inside the chip, using the matching of the chip identification code and test vector, efficient testing in the multi-chip interconnection system is achieved, solving the problems of poor universality and low efficiency in the existing technology, and supporting multiple interfaces and protocols , suitable for complex chip testing.
Patent Information
- Application Number
- CN202110194308.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-20
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2041-02-20
AI Technical Summary
The existing chip testing methods have problems such as poor versatility, poor flexibility and low efficiency. Especially in multi-chip interconnection systems, traditional JTAG protocols are difficult to meet the needs of complex chip testing.
An interface conversion circuit was designed, including chip recognition module, data module, control module, write module, reading module and comparison output module. Through the matching of chip recognition code and test vector, chip recognition and testing are realized, and the JTAG is separated from JTAG. The pins are tested and support multiple functional interfaces and protocols, which improves the versatility and efficiency of the test.
It realizes the flexibility and efficiency of chip testing, reduces data transmission, supports multiple interfaces and protocols, and is suitable for multi-chip interconnection systems, especially when tested after packaging, improves the uniformity and accuracy of testing.
Smart Images

Figure CN113009316B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of chip testing technology, and in particular to an interface conversion circuit, a multi-chip interconnection system and a testing method thereof. Background Art
[0002] Traditional chip testing is performed through the Joint Test Action Group (JTAG) test pin. The test method of the standard JTAG protocol is to inject test vectors into the chip at the test data input port, and then obtain the chip's response signal at the test data output port to determine whether the chip functions normally. The test circuit inside the chip is responsible for receiving and executing the test vectors sent by the external test system, and then feeding the result vectors back to the external chip test system. With the rapid development of computing needs, software has higher and higher requirements for computing power, resulting in larger and larger chip scales, more and more complex test vectors, and longer and longer chip testing time; and the resulting restrictions on chip yield and power consumption have made multi-chip interconnection, multi-card interconnection and other technical applications more and more popular. High-speed ports are usually used to interconnect chips in interconnected systems; and most interconnected system-level chips no longer lead out JTAG pins in system board-level applications, which requires additional connection lines and configurations for chip testing. Therefore, the existing chip testing methods have the problems of poor versatility, poor flexibility and low efficiency. Summary of the invention
[0003] The embodiment of the present invention provides an interface conversion circuit, a multi-chip interconnection system and a test method thereof, so as to improve the versatility, flexibility and efficiency of chip testing.
[0004] In a first aspect, an embodiment of the present invention provides an interface conversion circuit, which is placed inside a chip and used for chip testing. The chip is a chip in a multi-chip interconnection system, and the chip contains a chip identification code. The interface conversion circuit includes:
[0005] A chip identification module, the chip identification module is used to identify the chip identification code of the chip and output identification matching information;
[0006] A data module, wherein the input end of the data module is used to connect to an external main control device; the data module is used to obtain a test instruction and test data according to a test vector issued by the main control device; wherein the test vector matches the interface conversion circuit; the test instruction includes an identification code instruction; and the test data includes write data and expected response data;
[0007] A control module, wherein a first input terminal of the control module is connected to an output terminal of the chip identification module, and a second input terminal of the control module is connected to a first output terminal of the data module; the control module is used to determine whether the identification matching information matches the identification code instruction;
[0008] A write module, wherein a first input end of the write module is connected to a second output end of the data module, a second input end of the write module is connected to an output end of the control module, and an output end of the write module is connected to an input end of a test access port of the chip, so as to output the write data to the chip;
[0009] A reading module, the input end of which is connected to the output end of the test access port of the chip; the reading module is used to collect the reading data fed back by the chip;
[0010] A comparison output module, wherein the first input end of the comparison output module is connected to the third output end of the data module, and the second input end of the comparison output module is connected to the output end of the reading module; the comparison output module is used to obtain an error signal based on the read data and the expected response data and output it through the output end.
[0011] Optionally, the test data further includes mask data;
[0012] The comparison output module includes: an AND unit, an XOR unit and an error register;
[0013] The first input end of the AND unit is connected to the fourth output end of the data module; the second input end of the AND unit is connected to the output end of the reading module; the AND unit is used to obtain the actual concerned data according to the mask data and the read data, and filter the irrelevant data;
[0014] The first input terminal of the XOR unit is connected to the third output terminal of the data module; the second input terminal of the XOR unit is connected to the output terminal of the AND unit; the XOR unit is used to obtain a comparison result according to the actual concerned data and the expected response data;
[0015] The first input end of the error register is connected to the output end of the XOR unit, and the first output end of the error register is the output end of the comparison output module; the error register is used to obtain the error signal according to the comparison result, and store and output the error signal.
[0016] Optionally, an instruction set is configured in the data module, and the data module parses the test vector according to the rules of the instruction set to obtain the test instruction and the test data.
[0017] Optionally, the instructions in the instruction set include chip test selection instructions or multi-chip test instructions.
[0018] Optionally, the control module is connected to an interface conversion circuit of a next-level chip; the control module further includes a broadcast enabling unit; the broadcast enabling unit is used to transmit the test vector to the next-level chip.
[0019] Optionally, the test instruction includes a loop instruction, and the control module further includes a sequence control unit; the sequence control unit is respectively connected to the data module, the write module and the read module; the sequence control unit is used to control the test sequence according to the loop instruction.
[0020] Optionally, the control module further includes a mode control unit; the interface conversion circuit further includes: a data selection module;
[0021] The data selection module is connected to the comparison output module and the reading module respectively; the data selection module outputs a test result; the test result includes the error signal or the read data;
[0022] The mode control unit is connected to the data selection module and is used to select the test result output by the data selection module as the error signal or the read data.
[0023] In a second aspect, an embodiment of the present invention further provides a multi-chip interconnection system, comprising: a main control device and at least two chips; the chip comprises a chip identification code and an interface conversion circuit as provided in any embodiment of the present invention.
[0024] Optionally, the multi-chip interconnection system is a star structure, and each of the chips is connected to the main control device;
[0025] Alternatively, the multi-chip interconnection system is a daisy chain structure, and the main control device is cascade-connected to a plurality of the chips.
[0026] In a third aspect, an embodiment of the present invention further provides a method for testing a multi-chip interconnection system, comprising:
[0027] The main control device transmits a test vector matching the interface conversion circuit in the chip in the multi-chip interconnection system to the interface conversion circuit in the chip;
[0028] The data module receives the test vector and obtains a test instruction and test data according to the test vector; the test instruction includes an identification code instruction; the test data includes write data and expected response data;
[0029] The chip identification module identifies the chip identification code of the chip and outputs identification matching information;
[0030] The control module determines whether the identification matching information matches the identification code instruction; if so, the control test starts;
[0031] The writing module transmits the writing data to the chip through the test access port;
[0032] The reading module collects the reading data fed back by the chip through the test access port;
[0033] The comparison output module obtains and outputs an error signal according to the read data and the expected response data.
[0034] The interface conversion circuit provided by the embodiment of the present invention can realize the identification of the chip to be detected by setting a chip identification module, a data module and a control module. When the identification matching information identified by the chip identification module matches the identification code instruction parsed by the data module, the chip is enabled for testing; and the read data collected by the reading module can also include information related to the chip identification code to indicate the identity of the read data, thereby ensuring that the test is accurate and effective. At the same time, the setting of the chip identification code allows the chip to be specified in the test vector; there is no need to test all chips in the system at all stages, thereby making the chip test flexible and efficient. In addition, the setting of the write module and the read module allows the write data to be directly poured into the test access port, and the read data can be directly extracted from the test access port. This setting allows the chip test to be separated from the JTAG pin, and various functional interfaces can be flexibly applied to load test vectors through the interface conversion logic. In particular, during the post-packaging test, the system-level test vectors can all be integrated into a series of unified test vectors for management, thereby improving the versatility and flexibility of chip testing. Furthermore, the setting of the comparison output module enables the comparison of the read data and the expected response data inside the chip. The test system can directly obtain the error signal to know whether the chip is normal, and does not need to obtain all the read data to transmit to the main control device for processing, thereby reducing data transmission and improving test efficiency. Therefore, compared with the prior art, the embodiment of the present invention can improve the versatility, flexibility and efficiency of chip testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is a structural schematic diagram of an interface conversion circuit provided by an embodiment of the present invention;
[0036] Figure 2 is a structural schematic diagram of another interface conversion circuit provided by an embodiment of the present invention;
[0037] Figure 3 is a structural schematic diagram of another interface conversion circuit provided by an embodiment of the present invention;
[0038] Figure 4 is a structural schematic diagram of another interface conversion circuit provided by an embodiment of the present invention;
[0039] Figure 5 is a structural diagram of a comparison output module provided by an embodiment of the present invention;
[0040] Figure 6 is a structural schematic diagram of a multi-chip interconnection system provided by an embodiment of the present invention;
[0041] Figure 7 is a schematic diagram of the structure of another multi-chip interconnection system provided by an embodiment of the present invention;
[0042] Figure 8 It is a flow chart of a testing method for a multi-chip interconnection system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0044] An embodiment of the present invention provides an interface conversion circuit, which is placed inside a chip and is used for chip testing. Figure 1 Schematic diagram of an interface conversion circuit provided by an embodiment of the present invention. Figure 1 Chip 1 is a chip in a multi-chip interconnection system. Chip 1 contains a chip identification code 30. The chip identification code 30 is used to indicate the ID of the chip (such as the chip number or the position of the chip in the multi-chip interconnection system, etc.).
[0045] The interface conversion circuit 10 includes: a chip identification module 110 , a data module 120 , a control module 130 , a writing module 140 , a reading module 150 and a comparison output module 160 .
[0046] Among them, the chip identification module 110 is used to identify the chip identification code 30 of the chip 1 and output the identification matching information. The input end of the data module 120 is used to connect with the external main control device 2; the data module 120 is used to obtain the test instruction and test data according to the test vector issued by the main control device 2; wherein the test vector matches the interface conversion circuit 10; the test instruction includes the identification code instruction; the test data includes the write data and the expected response data. The first input end of the control module 130 is connected to the output end of the chip identification module 110, and the second input end of the control module 130 is connected to the first output end of the data module 120; the control module 130 is used to determine whether the identification matching information matches the identification code instruction. The first input end of the write module 140 is connected to the second output end of the data module 120, the second input end of the write module 140 is connected to the output end of the control module 130, and the output end of the write module 140 is connected to the input end of the test access port (Testing Access Port, TAP) 20 of the chip 1 to output the write data to the chip 1. The input end of the read module 150 is connected to the output end of the test access port 20 of the chip 1; the read module 150 is used to collect the read data fed back by the chip 1. The first input end of the comparison output module 160 is connected to the second output end of the data module 120, and the second input end of the comparison output module 160 is connected to the output end of the read module 150; the comparison output module 160 is used to obtain an error signal according to the read data and the expected response data and output it through the output end.
[0047] Exemplarily, the working process of the interface conversion circuit 10 is as follows: the data module 120 parses the received test vector, obtains the test instruction (including the identification code instruction) and the test data, and transmits them to the control module 130, the write module 140 and the comparison output module 160. The chip identification module 110 identifies the chip identification code 30 of the chip 1 to obtain the identification matching information; wherein the chip identification code may include information such as the chip number and the position in the interconnected system, which is used to distinguish each chip, and each chip has its unique chip identification code. The control module 130 determines whether the identification matching information matches the identification code instruction; if so, the test is controlled to start; otherwise, the test is terminated. When the control module 130 controls the test to start, the control module 130 transmits the start instruction to the write module 140; the write module 140 outputs the write data in the received test data to the chip 1 through the test access port 20. After waiting for the chip 1 to process the write data, the read module 150 collects the read data fed back by the chip 1 through the test access port 20 and transmits it to the comparison output module 160. The comparison output module 160 compares the read data with the expected response data in the previously received test data, generates an error signal and outputs it to the main control device 2 .
[0048] Optionally, taking the parsing process of a test vector as an example, after the data module 120 parses the test vector, at least one test instruction and a corresponding set of test data are obtained. The test instruction and the test data constitute a whole parsed vector. Among them, the test instruction is equivalent to the data that abstractly describes the group of test data according to certain rules, and occupies the instruction identification bit in the parsed vector; exemplarily, the test instruction may include an identification code instruction indicating the chip corresponding to the test data or a length instruction indicating the length of the test data, etc. The test data occupies the data bits in the parsed vector. After completing the parsing, the data module 120 transmits the entire parsed vector to other modules. Exemplarily, in a test vector, multiple test instructions may correspond to one test data, or a whole set of test data, or several of the test data. The correspondence between the test instruction and the test data can be described according to the needs, which is not limited here. Alternatively, after parsing the test vector, the data module 120 can obtain an instruction vector containing only test instructions and a data vector containing only test data; and transmit the instruction vector to the control module 130, and transmit the data vector to the write module 140 and the comparison output module 160; further, the data module 120 can split the test data, and transmit the write data to the write module 140; and transmit the expected response data to the comparison output module 160, so as to reduce the amount of data transmission.
[0049] Optionally, the identification matching information matches the format of the identification code instruction to facilitate processing by the control module 130. The expected response data corresponds to the written data one by one, and is used to detect whether the read data fed back by the chip 1 is correct.
[0050] Optionally, the interface conversion circuit 10 is applicable to various commonly used buses, interfaces and protocol types such as Serial Peripheral Interface (SPI), I2C (Inter-Integrated Circuit), Universal Asynchronous Receiver / Transmitter (UART), Controller Area Network (CAN), Universal Serial Bus (USB), Peripheral Component Interconnect Express (PCIE), etc., and can unify different test environments of chip 1 at different stages, and use a consistent setting environment to test all vectors. In this way, the interface conversion circuit 10 can adapt to a variety of different chips in a multi-chip interconnection system, solving the problem that different types of chips in the system cannot be tested uniformly.
[0051] Optionally, there are multiple ways for the comparison output module 160 to output an error signal, which can be set according to needs in actual applications. For example, when the chip 1 needs to process multiple test vectors, the comparison output module 160 can transmit an identification signal representing whether the result is correct or wrong to the main control device 2 each time; or, when the result is correct, no signal is output until an error result occurs or the test is completed; or, the result corresponding to each test vector is stored, and after the test is completed, the number of correct results and error results and their corresponding instruction positions are output together. In short, the comparison between the read data and the expected response data is completed inside the chip 1, and the interface conversion circuit 10 only outputs an error signal that identifies the test result, which reduces the time for data transmission and testing.
[0052] The interface conversion circuit 10 provided in the embodiment of the present invention can realize the identification of the chip 1 to be tested by setting the chip identification module 110, the data module 120 and the control module 130. When the identification matching information identified by the chip identification module 110 matches the identification code instruction parsed by the data module 130, the test is enabled on the chip 1; and the read data collected by the reading module 150 can also include information related to the chip identification code 30 to indicate the identity of the read data, thereby ensuring that the test is accurate and effective. At the same time, the setting of the chip identification code 30 allows the chip to be specified in the test vector to be tested; there is no need to test all chips in the system at all stages, thereby making the chip test flexible and efficient. In addition, the setting of the write module 140 and the read module 150 allows the write data to be directly injected into the test access port 20, and the read data can be directly extracted from the test access port 20. This arrangement allows chip testing to be performed independently of the JTAG pins. Various functional interfaces can be flexibly applied to load test vectors through the interface conversion logic. In particular, during post-packaging testing, system-level test vectors can all be integrated into a series of unified test vectors for management, thereby improving the versatility and flexibility of chip testing. In addition, the arrangement of the comparison output module 160 allows comparison of read data and expected response data within the chip 1. The test system can directly obtain an error signal to determine whether the chip is normal, and does not need to obtain all read data and transmit it to the main control device 2 for processing, thereby reducing data transmission and improving test efficiency. Therefore, the embodiments of the present invention can improve the versatility, flexibility, and efficiency of chip testing.
[0053] On the basis of the above-mentioned embodiments, optionally, an instruction set is configured in the data module 120, and the data module 120 parses the test vector according to the rules of the instruction set to obtain the test instruction and the test data. Optionally, the test data includes write data, expected response data and mask data. The mask data is applied to the comparison process of the comparison output module 160, and the application is specifically described in the following embodiment and will not be expanded here.
[0054] Optionally, the instruction set may include multiple instructions, several of which are described below.
[0055] In one embodiment, the instruction set may optionally include a chip test selection instruction. When the test vector specifies that the chip 1 including the specific chip identification code 30 needs to be tested, and other chips do not need to be tested, the instruction may indicate the fixed ID of the chip, and the control module 130, upon receiving the instruction, only enables the chip test corresponding to the ID. In this way, when debugging or troubleshooting a specific chip, the corresponding target chip can be selected for testing, which is very flexible and efficient.
[0056] In another embodiment, the instruction set may optionally include a multi-chip test instruction. The instruction may enable a broadcast control function, so that the control module 130 broadcasts the test vector received by the interface conversion circuit to the chip interconnected through the next interface conversion circuit. In this way, the test vector may be broadcast and relayed to subsequent chips, and the recovery of test result-related data may also be achieved. The instruction is applicable to a multi-chip cascade system, and its specific implementation is described in the following embodiments, which will not be expanded here.
[0057] Figure 2 FIG. 1 is a schematic diagram of another interface conversion circuit provided by an embodiment of the present invention. Figure 2 , this embodiment provides a possible connection method of chips in a multi-chip interconnection system. Optionally, in the interconnection system, the main control device 2 is not connected to all chips 1, but is connected to a part of the chips 1 (such as the mth chip 1-m in this figure); other chips (such as the nth chip 1-n in this figure) are used as subsequent chips in the cascade of chips connected to the main control device. Exemplarily, the chips cascaded in the system have the same structure; that is, the nth chip 1-n is composed of the same module as the mth chip 1-m and has the same connection method; therefore, only the nth chip 1-n is given here as an example, and its structure can refer to the mth chip 1-m.
[0058] On the basis of the above embodiments, optionally, the chip 1 further includes: a first interface 191, a second interface 192, a first cache module 171 and a second cache module 172. The first interface 191 is connected to the main control device 2 and the first cache module 171 respectively; the first cache module 171 is located in the interface conversion circuit 10, and is connected to the control module 130, the data module 120 and the comparison output module 160 respectively; the second cache module 172 is connected to the control module 130 and the second interface 192 respectively; the second interface 192 is connected to the subsequent chip (the nth chip 1-n).
[0059] The first interface 191 and the second interface 192 are both interfaces for data transmission between the chip 1 and the outside, and can perform input and output operations; the interface types of the two can be set according to actual needs and are not limited here. The first cache module 171 can transmit test vectors to the data module 120, and can also obtain the test results of the comparison output module 160 and transmit them externally. Its working mode can be controlled by the control module 130; at the same time, the first cache module 171 can also transmit data between the control module 130 and the first interface 191. Similarly, the second cache module 172 can also transmit data and instructions between the second interface 192 and the control module 130.
[0060] Exemplarily, the transmission process of the test vector in the system is as follows: the main control device 2 outputs the test vector; the first interface 191 in the mth chip 1-m receives the test vector and transmits it to the first cache module 171; the first cache module 171 transmits the test vector to the control module 130 and the data module 120; the data module 120 parses the test vector to obtain a test instruction (such as a multi-chip test instruction), and transmits it to the control module 130; the control module transmits the test vector to the second cache module 172 according to the test instruction; the second cache module 172 transmits the test vector to the nth chip 1-n through the second interface 192.
[0061] The transmission process of the test results in the system is as follows: the test result of the nth chip 1-n is transmitted to the mth chip 1-m; and is transmitted to the main control device 2 through the second interface 192, the second cache module 172, the control module 130, the first cache module 171 and the first interface 191 in the mth chip 1-m. The test result for the mth chip 1-m is generated by the comparison output module 160 and transmitted to the main control device 2 through the first cache module 171 and the first interface 191. The test result of each chip contains information related to the chip identification code to distinguish the chip to which the test result belongs.
[0062] Optionally, the data module 120 includes a decoding unit 121 and a data unit 122; the decoding unit 121 is used to parse the test vector to obtain the test instruction; the data unit 122 is used to parse the test vector to obtain the test data.
[0063] Figure 3 FIG. 1 is a schematic diagram of the structure of another interface conversion circuit provided by an embodiment of the present invention. Figure 3 , based on the above embodiments, optionally, the interface conversion circuit 10 further includes a cache module 170. The cache module 170 is connected to the master device 2, the data module 120, the comparison output module 160 and the control module 130, and is used for data transmission between the master device 2 and the chip 1. Specifically, the cache module 170 reads the test vector in the master device 2 and transmits it to the data module 120; the comparison output module 160 outputs an error signal to the cache module 170, which is transmitted to the master device 2 by the cache module 170. The manner in which the cache module 170 transmits the test vector and the error signal can be controlled by the control module 130. Exemplarily, at the beginning of the test, the cache module 170 can cache all test vectors and transmit them one by one to the data module 120; and during the test, the cache module 170 can store the test results of multiple test vectors and finally transmit them together to the master device 2.
[0064] Continue to see Figure 3 On the basis of the above embodiments, the interface conversion circuit 10 may optionally further include a parallel-serial conversion module 141 and a serial-parallel conversion module 151. The parallel-serial conversion module 141 is connected between the write module 140 and the test access port 20; the serial-parallel conversion module 151 is connected between the read module 150 and the test access port 20. In this configuration, the write data is input from the input terminal (referred to as TDI) in the test access port 20 through parallel-serial conversion; and the feedback data (i.e., read data) of the chip 1 is output from the output terminal (referred to as TDO) in the test access port 20, and then converted from serial to parallel data to be read by the read module 150, which can reduce the test time and improve the test efficiency.
[0065] Continue to see Figure 3, based on the above embodiments, optionally, since in some test processes, only some bits in the data fed back by chip 1 are concerned about whether they are correct, it is not necessary to judge each bit in the read data. In order to simplify the comparison process, the data module 130 also includes a fourth output terminal, and the test data includes mask data; the comparison output module 160 also includes a third input terminal, and the third input terminal of the comparison output module 160 is connected to the third output terminal of the data module 130. On this basis, exemplarily, the working process of the comparison output module 160 is: first, the actual concerned data is obtained according to the read data and the mask data, and the unconcerned data is filtered; then the actual concerned data is compared with the expected response data to determine whether the read data fed back by chip 1 is correct. Among them, the format of the expected response data parsed by the data module 130 according to the test vector corresponds to the format of the actual concerned data.
[0066] Continue to see Figure 3 On the basis of the above embodiments, optionally, the control module 130 includes multiple functional units for executing operations corresponding to different test instructions. Different test instructions correspond to different modules in the interface conversion circuit 10. Several possible embodiments are described below, but they are not intended to limit the present invention.
[0067] In one embodiment, the control module 130 optionally includes an enabling control unit 131, which is connected to the writing module 140 and is used to control the start or end of the test. Exemplarily, after the control module 130 determines whether the identification matching information matches the identification code instruction, the enabling control unit 131 can generate a control signal of whether to enable according to the judgment result, and transmit it to the writing module 140. Alternatively, when the comparison result in the comparison output module 160 is wrong for the first time, the chip 1 is determined to be unqualified, and the enabling control unit 131 controls the end of the test to shorten the test time, make the chip test process controllable, and improve the test efficiency.
[0068] In one embodiment, optionally, the test instruction includes a loop instruction, that is, repeatedly executing the test process included in the same test data, and the test instruction includes the number of loops. The control module 130 includes a sequence control unit 132; the sequence control unit 132 is respectively connected to the data module 120, the write module 140 and the read module 150, and is used to control the test sequence according to the loop instruction. For example, the sequence control unit 132 includes an instruction counter, which records the number of loops while controlling the test loop, and stops the test of the write data when the number of loops reaches a specified value. In this way, during the loop test, there is no need for the data module 120 to read and parse the test vector and transmit the test instructions and test data for each test, which simplifies the test logic, saves test time, and improves test efficiency.
[0069] Continue to see Figure 3 In another embodiment, optionally, the test instruction is a debug instruction, and the interface conversion circuit 10 further includes: a data selection module 180. The data selection module 180 is respectively connected to the comparison output module 160, the read module 150 and the cache module 170; the data selection module 180 outputs the test result; the test result includes an error signal or read data. The control module 130 also includes a mode control unit 133; the mode control unit 133 is connected to the data selection module 180, and is used to select the test result output by the data selection module 180 as an error signal or read data. Exemplarily, under the control of the debug instruction, the mode control unit 133 controls the chip test to be a debug mode or a normal mode. In the debug mode, the traditional test scheme can be compatible, that is, after the read module 150 reads the data fed back by the chip 1 each time, the data selection module 180 returns it to the cache module 170, or stops at a specific test vector and returns the read data to the cache module 170. This mode is very useful in the early chip test stage, and can quickly determine the problem location in the chip 1. After the test vector and the test environment are stable, the chip test can adopt the normal mode. In the normal mode, the mode control unit 133 controls the data selection module 180 to read the error signal in the comparison output module 160 and output it, which is conducive to improving the test efficiency.
[0070] Figure 4 FIG. 1 is a schematic diagram of the structure of another interface conversion circuit provided by an embodiment of the present invention. Figure 4 , the multi-chip interconnection system includes at least two cascaded chips 1. The control module 130 in the interface conversion circuit 10 in each chip 1 is connected to the interface conversion circuit 10 of the next-level chip 1 to realize the broadcast or relay of the test vector. Optionally, the structure of the interface conversion circuit 10 in this embodiment is the same as that in the above-mentioned embodiments, and the only difference lies in the functional units included in the control module 130. Therefore, only the control module 130 in the interface conversion circuit 10 is shown here as an example, and the control module 130 includes a broadcast enabling unit 134, which is used to transmit the test vector to the next-level chip 1.
[0071] For example, Figure 4Two chips 1 are shown, namely the first chip 1-1 and the second chip 1-2. The first chip 1-1 includes a first chip identification code 30-1, a first interface conversion circuit 10-1 and a first test access port 20-1; wherein the first interface conversion circuit 10-1 is respectively connected to the first chip identification code 30-1, the first test access port 20-1 and the main control device 2; the first interface conversion circuit 10-1 includes a first control module 130-1, and the first control module 130-1 includes a first broadcast enabling unit 134-1. The second chip 1-2 includes a second chip identification code 30-2, a second interface conversion circuit 10-2 and a second test access port 20-2; wherein the second interface conversion circuit 10-2 is respectively connected to the second chip identification code 30-2, the second test access port 20-2 and the first broadcast enabling unit 134-1 in the first control module 130-1. The second broadcast enabling unit 134-2 in the second control module 130-2 is used to connect to the next-level chip.
[0072] In the cascaded multi-chip interconnection system, the test vector transmission process is as follows: the test vector sent by the main control device 2 is transmitted to the first interface conversion circuit 10-1; the first interface conversion circuit 10-1 parses the test vector after receiving it (for example, the cache module receives the test vector and transmits it to the data module and the control module, the data module parses the test vector, and transmits the parsed vector including the test instruction and the test data to the control module); the first control module 130-1 receives the parsed vector and processes it to separate the multi-chip test instruction therefrom; the first broadcast enable unit 134-1 controls the test vector to be transmitted to the next level chip according to the instructions of the multi-chip test instruction (for example, it is transmitted to the cache module in the second interface conversion circuit 10-2).
[0073] Optionally, there are multiple ways for the broadcast enabling unit 134 to control the test vector to be transmitted to the next level chip, which can be set according to actual needs. For example, the control module itself receives the original test vector and transmits it to the next level chip; or, the control module receives the parsed vector and transmits it to the next level chip; or, the control module only receives the test instruction, and the broadcast enabling unit 134 controls the data module to transmit the test vector to the next level chip according to the instruction.
[0074] The above embodiments exemplarily illustrate the working principle of the interface conversion circuit 10 . Hereinafter, a possible structure of the comparison output module 160 will be described, but this is not intended to limit the present invention.
[0075] Figure 5 is a schematic diagram of the structure of a comparison output module provided by an embodiment of the present invention. Figure 5In one implementation, optionally, the comparison output module 160 includes: an AND unit 161 , an XOR unit 162 and an error register 163 .
[0076] The first input terminal of the AND unit 161 is connected to the fourth output terminal of the data module 120 for receiving the mask data Dmask; the second input terminal of the AND unit 161 is connected to the output terminal of the read module 150 for receiving the read data Dread; the AND unit 161 is used to obtain the actual concerned data according to the mask data Dmask and the read data Dread (performing an AND operation on the mask data Dmask and the read data Dread) and filter the unconcerned data. The first input terminal of the XOR unit 162 is connected to the third output terminal of the data module 120 for receiving the expected response data Dexp; the second input terminal of the XOR unit 162 is connected to the output terminal of the AND unit 161 for receiving the actual concerned data; the XOR unit 162 is used to obtain the comparison result according to the actual concerned data and the expected response data Dexp (performing an XOR operation on the actual concerned data and the expected response data Dexp). The first input end of the error register 163 is connected to the output end of the XOR unit 162, and the first output end of the error register 163 is the output end of the comparison output module 160; the error register 163 is used to obtain the error signal Serror according to the comparison result, and store and output the error signal Serror.
[0077] Optionally, the error register 163 can be an addition register (or accumulation register). When there are multiple test vectors, each comparison result is temporarily stored in the error register 163. The error register 163 automatically accumulates when the comparison result indicates that the actual concerned data is incorrect. Finally, the error register 163 can output the number of errors, error reporting data, and error data bits as an error signal Serror. Exemplarily, when the error signal Serror represents the number of errors, the initial value recorded in the error register 163 is set to 0. As long as the final error signal Serror is not 0, it means that the chip 1 is unqualified and the test fails.
[0078] The embodiment of the present invention also provides a multi-chip interconnection system, including: a main control device and at least two chips; wherein the chip includes a chip identification code and an interface conversion circuit as provided in any embodiment of the present invention, which has corresponding beneficial effects. In particular, during system-level testing, in many cases, the system-level chip interconnection has been completed using the interface conversion circuit, and the existing interconnection can be used to achieve multi-chip collaborative testing, simplifying the test steps and improving the test efficiency.
[0079] Based on the interconnection structure of the chip, the embodiment of the present invention supports several basic interconnection modes, several of which are described below.
[0080] Figure 6 is a schematic diagram of the structure of a multi-chip interconnection system provided by an embodiment of the present invention. Figure 6 In one embodiment, optionally, multiple chips 1 are interconnected in a star structure, that is, the main control device 2 is simultaneously connected to each chip in parallel (four chips are given as an example here, namely the first chip 1-1, the second chip 1-2, the third chip 1-3 and the fourth chip 1-4; each chip 1 includes an interface conversion circuit 10, which are respectively represented as the first interface conversion circuit 10-1, the second interface conversion circuit 10-2, the third interface conversion circuit 10-3 and the fourth interface conversion circuit 10-4 in the figure).
[0081] Under this structure, the test vector can be sent to all the chips under test in parallel by the main control device 2. When the test vector contains a chip test selection instruction, the target chip responds to it. Since there is an interface conversion circuit 10 in the chip 1, when testing, it is not necessary to transmit and return the read data each time. Only after the last test is completed, the main control device 2 can sequentially retrieve the test results (error signals) of different chips. In addition, after the chip 1 test is completed, the interface conversion circuit 10 can also return the information related to the chip identification code of the chip together with the test results to indicate the identity of the data, so as to facilitate the identification of the chip to which the returned data belongs.
[0082] Figure 7 FIG. 1 is a schematic diagram of another multi-chip interconnection system provided by an embodiment of the present invention. Figure 7 In one embodiment, optionally, multiple chips 1 are interconnected in a daisy chain structure, which is equivalent to the main control device 2 being cascade-connected to all chips, and the main control device 2 being connected to the first and last chips to form a loop.
[0083] Under this structure, the test vector can be sent by the main control device 2 to the first interface conversion circuit 10-1 in the first chip 1-1. Optionally, the test vector contains a multi-chip test instruction to broadcast the test vector to subsequent chips in sequence. Since the test process of each chip does not need to return the read data, after the test is completed, the test results of each chip are serially returned to the main control device 2, which is conducive to reducing data transmission and improving test efficiency. Optionally, the interface conversion circuit in the system can return information related to the chip identification code of the chip together with the test results to indicate the identity of the data, so as to facilitate the identification of the chip to which the returned data belongs.
[0084] Based on the two interconnect structures described in the above embodiments, any chip interconnect structure can be decomposed into a structure combining star interconnect and daisy chain interconnect. Therefore, it can be said that the interface conversion circuit provided by the embodiment of the present invention can support efficient testing of any complex chip interconnect structure, thereby improving the versatility of the interface conversion circuit.
[0085] Based on the above embodiments, the test system of the multi-chip interconnection system may optionally include a software system connected to the main control device for generating test vectors. Exemplarily, the software system reads the description file of the multi-chip interconnection structure and the chip identification code of the target test chip, and can add structural description data and related instruction data to the test vector of the original single-chip test, and automatically generate a test vector for testing multiple chips.
[0086] An embodiment of the present invention further provides a method for testing a multi-chip interconnection system, which is used to test the chips in the multi-chip interconnection system provided by any embodiment of the present invention, and has corresponding beneficial effects.
[0087] Figure 8 FIG. 1 is a flow chart of a method for testing a multi-chip interconnection system provided by an embodiment of the present invention. Figure 8 , the testing method of the multi-chip interconnection system comprises the following steps:
[0088] S110, the main control device transmits a test vector matching the interface conversion circuit in the chip in the multi-chip interconnection system to the interface conversion circuit in the chip.
[0089] The main control device may transmit the test vector to the data module through the cache module.
[0090] S120, the data module receives the test vector, and obtains the test instruction and test data according to the test vector; the test instruction includes the identification code instruction; the test data includes the write data and the expected response data.
[0091] Among them, taking the parsing process of a test vector as an example, after the data module parses the test vector, it obtains at least one test instruction and a corresponding set of test data. The test instruction and the test data constitute a whole parsed vector. After completing the parsing, the data module transmits the whole parsed vector to other modules. Alternatively, after the data module parses the test vector, it can obtain an instruction vector containing only test instructions and a data vector containing only test data; and transmit the instruction vector to the control module, and transmit the data vector to the write module and the comparison output module; further, the data module can split the test data, and then transmit the write data to the write module; and transmit the expected response data to the comparison output module, so as to reduce the amount of data transmission.
[0092] S130: The chip identification module identifies the chip identification code of the chip and outputs identification matching information.
[0093] The chip identification code may include information such as the chip number and the position in the interconnected system, which is used to distinguish between various chips. Each chip has its own unique chip identification code.
[0094] S140, the control module determines whether the identification matching information matches the identification code instruction; if so, execute S150; otherwise, execute S180.
[0095] The control module may include an enabling control unit for controlling the start or end of a test.
[0096] S150 , the writing module transmits the writing data to the chip through the test access port.
[0097] The write module can transmit the write data to the input terminal TDI of the test access port through the parallel-to-serial conversion module, and transmit it to the chip through the data input.
[0098] S160: The reading module collects the reading data fed back by the chip through the test access port.
[0099] The reading module can collect the reading data fed back by the chip by capturing the data output of the test access port through the serial-to-parallel conversion module.
[0100] S170, the comparison output module obtains an error signal according to the read data and the expected response data and outputs it.
[0101] Among them, there are many ways for the comparison output module to output error signals, which can be set according to needs in actual applications. For example, when the chip needs to process multiple test vectors, the comparison output module can transmit the identification signal representing the correct or incorrect result to the main control device each time; or, when the result is correct, no signal is output until an incorrect result occurs or the test is completed; or, the result corresponding to each test vector is stored, and after the test is completed, the number of correct and incorrect results and their corresponding instruction positions are output together. In short, the comparison between the read data and the expected response data is completed inside the chip, and the interface conversion circuit only outputs an error signal that identifies the test result.
[0102] S180, end the test.
[0103] When the identification matching information does not match the identification code instruction, it indicates that the chip is not the target chip of the test vector, so the current round of testing of the chip is ended until the test vector belonging to the chip arrives and then the test is started again.
[0104] Optionally, in some test processes, only some bits of the data fed back by the chip are concerned with whether they are correct, so it is not necessary to judge every bit of the read data. In order to simplify the comparison process, the test method further includes:
[0105] The data module obtains mask data according to the test vector;
[0106] The comparison output module first obtains the actual concerned data based on the read data and mask data, and filters the unconcerned data; then compares the actual concerned data with the expected response data to determine whether the read data fed back by the chip is correct. Among them, the format of the expected response data corresponds to the format of the actual concerned data.
[0107] Optionally, when it is necessary to locate the problem in the chip during the test, the test method may further include: the control module controls the chip test to be in a debugging mode according to the test instruction;
[0108] The data selection module obtains the read data from the reading module under the control of the control module, and outputs the read data as the test result.
[0109] Optionally, when multiple chips need to be tested in a chip cascade multi-chip interconnection system, the main control device does not need to transmit test vectors to all chips; the control module can transmit the test vectors to the subsequent chip according to the multi-chip test instruction. Optionally, when the control module receives the multi-chip test instruction, it immediately transmits the test vector backward to improve the overall test efficiency.
[0110] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. An interface conversion circuit, placed inside a chip, for chip testing, characterized in that: The chip is a chip in a multi-chip interconnection system, the chip contains a chip identification code, and the interface conversion circuit includes: A chip identification module, the chip identification module is used to identify the chip identification code of the chip and output identification matching information; A data module, wherein the input end of the data module is used to connect to an external main control device; the data module is used to obtain a test instruction and test data according to a test vector issued by the main control device; wherein the test vector matches the interface conversion circuit; the test instruction includes an identification code instruction; and the test data includes write data and expected response data; A control module, wherein a first input terminal of the control module is connected to an output terminal of the chip identification module, and a second input terminal of the control module is connected to a first output terminal of the data module; the control module is used to determine whether the identification matching information matches the identification code instruction; A write module, wherein a first input end of the write module is connected to a second output end of the data module, a second input end of the write module is connected to an output end of the control module, and an output end of the write module is connected to an input end of a test access port of the chip, so as to output the write data to the chip; A reading module, the input end of which is connected to the output end of the test access port of the chip; the reading module is used to collect the reading data fed back by the chip; A comparison output module, wherein a first input terminal of the comparison output module is connected to a third output terminal of the data module, and a second input terminal of the comparison output module is connected to an output terminal of the reading module; the comparison output module is used to obtain an error signal according to the read data and the expected response data and output it through an output terminal; The data module is also used to split the test data, transmit the write data to the write module; and transmit the expected response data to the comparison output module.
2. The interface conversion circuit according to claim 1, characterized in that: The test data also includes mask data; The comparison output module includes: an AND unit, an XOR unit and an error register; The first input end of the AND unit is connected to the fourth output end of the data module; the second input end of the AND unit is connected to the output end of the reading module; the AND unit is used to obtain the actual concerned data according to the mask data and the read data, and filter the irrelevant data; The first input terminal of the XOR unit is connected to the third output terminal of the data module; the second input terminal of the XOR unit is connected to the output terminal of the AND unit; the XOR unit is used to obtain a comparison result according to the actual concerned data and the expected response data; The first input end of the error register is connected to the output end of the XOR unit, and the first output end of the error register is the output end of the comparison output module; the error register is used to obtain the error signal according to the comparison result, and store and output the error signal.
3. The interface conversion circuit according to claim 1, characterized in that: The data module is configured with an instruction set, and the data module parses the test vector according to the rule of the instruction set to obtain the test instruction and the test data.
4. The interface conversion circuit according to claim 3, characterized in that: The instructions in the instruction set include chip test selection instructions or multi-chip test instructions.
5. The interface conversion circuit according to claim 4, characterized in that: The control module is connected to the interface conversion circuit of the next-level chip; the control module also includes a broadcast enabling unit; the broadcast enabling unit is used to transmit the test vector to the next-level chip.
6. The interface conversion circuit according to claim 1, characterized in that: The test instructions include loop instructions, and the control module also includes a sequence control unit; the sequence control unit is connected to the data module, the write module and the read module respectively; the sequence control unit is used to control the test sequence according to the loop instructions.
7. The interface conversion circuit according to claim 1, characterized in that: The control module also includes a mode control unit; the interface conversion circuit also includes: a data selection module; The data selection module is connected to the comparison output module and the reading module respectively; the data selection module outputs a test result; the test result includes the error signal or the read data; The mode control unit is connected to the data selection module and is used to select the test result output by the data selection module as the error signal or the read data.
8. A multi-chip interconnection system, characterized in that: include: A main control device and at least two chips; the chip comprises a chip identification code and an interface conversion circuit as described in any one of claims 1-7.
9. The multi-chip interconnection system according to claim 8, characterized in that: The multi-chip interconnection system is a star structure, and each chip is connected to the main control device; Alternatively, the multi-chip interconnection system is a daisy chain structure, and the main control device is cascade-connected to a plurality of the chips.
10. A method for testing a multi-chip interconnect system, characterized in that: include: The main control device transmits a test vector matching the interface conversion circuit in the chip in the multi-chip interconnection system to the interface conversion circuit in the chip; The data module receives the test vector and obtains a test instruction and test data according to the test vector; the test instruction includes an identification code instruction; the test data includes write data and expected response data; The chip identification module identifies the chip identification code of the chip and outputs identification matching information; The control module determines whether the identification matching information matches the identification code instruction; if so, the control test starts; The writing module transmits the writing data to the chip through the test access port; The reading module collects the reading data fed back by the chip through the test access port; The comparison output module obtains and outputs an error signal according to the read data and the expected response data; The data module splits the test data and transmits the write data to the write module; The expected response data is transmitted to the comparison output module.
