Chip, chip testing method, electronic equipment and storage medium
By designing built-in modules on the chip to generate and receive test signals, self-testing of the chip data transmission interface is realized, which solves the problem of high chip testing costs, reduces dependence on third-party equipment, and improves detection efficiency and accuracy.
Patent Information
- Application Number
- CN202410289302.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-13
- Publication Date
- 2024-08-30
AI Technical Summary
Chip testing costs are high, and existing technology relies on third-party testing equipment, resulting in high costs and limited interface resources, making it impossible to fully test.
Design a chip that contains at least two functional modules, which are connected through the interface to be tested. Test signals are generated and compared to test the data transmission interface between different functional modules in the chip and reduce dependence on third-party equipment.
By generating and receiving test signals through the built-in module of the chip, the self-test of the chip data transmission interface is realized, which reduces the test cost and improves the detection efficiency and accuracy.
Smart Images

Figure CN118567919A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of integrated circuits, and in particular relates to a chip, a chip testing method, an electronic device and a storage medium. Background Art
[0002] With the development of chip technology, chips can be built with multiple different functional modules. On this basis, the interface responsible for data transmission between different functional modules has a great impact on the operation of the entire chip, so these interfaces need to be tested.
[0003] Currently, third-party testing equipment, such as Automatic Test Equipment (ATE) or simulation boards, is often used to test the data transmission interfaces between different functional modules. However, third-party testing equipment is often expensive, which makes the testing cost high. Summary of the invention
[0004] The present invention provides a chip, a chip testing method, an electronic device and a storage medium, so as to solve the problem of high chip testing cost.
[0005] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:
[0006] In a first aspect, the present invention provides a chip, the chip is composed of at least two functional modules, the chip includes a first module and a second module, the first module and the second module are connected through a test interface, the first module and the second module are located in different functional modules; the test interface is a data transmission interface between any two functional modules in the chip;
[0007] The first module and the second module are used to generate a corresponding first test signal and a second test signal respectively;
[0008] The first module is used to send the first test signal through the interface to be tested;
[0009] The second module is used to receive the signal to be tested through the interface to be tested, and generate a detection result based on the signal to be tested and the second test signal.
[0010] In a second aspect, the present invention provides a chip testing method, the method is applied to a second module in a chip, the chip is the chip described in the first aspect, and the method comprises:
[0011] Generate a second test signal, and receive the test signal through the test interface; the test signal is sent after the test interface receives the first test signal, the first test signal is generated by the first module in the chip, and the first test signal corresponds to the second test signal;
[0012] A detection result is generated based on the signal to be tested and the second test signal.
[0013] In a third aspect, the present invention provides an electronic device, wherein the electronic device comprises the chip described in the first aspect.
[0014] In a fourth aspect, the present invention provides a readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the chip testing method described in the second aspect.
[0015] In the embodiment of the present invention, the first module and the second module in the chip are located in different functional modules and are connected through the data transmission interface between any two functional modules. The first module and the second module can generate corresponding first test signals and second test signals. The first module can send the first test signal through the interface to be tested, and the second module can receive the signal to be tested through the interface to be tested, and generate the detection result through the signal to be tested and the second test signal. In this way, the data transmission interface between different functional modules in the chip can be tested based on the first module and the second module on the chip, without the need to use third-party testing equipment, which greatly reduces the testing cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 is a schematic diagram of the structure of a chip provided by an embodiment of the present invention;
[0018] Figure 2 is a schematic diagram of the structure of another chip provided by an embodiment of the present invention;
[0019] Figure 3 is a schematic diagram of the structure of another chip provided by an embodiment of the present invention;
[0020] Figure 4 is a structural schematic diagram of a comparison unit provided by an embodiment of the present invention;
[0021] Figure 5is a schematic diagram of the structure of another chip provided by an embodiment of the present invention;
[0022] Figure 6 is a schematic diagram of the structure of another chip provided by an embodiment of the present invention;
[0023] Figure 7 is a schematic diagram of the structure of another chip provided by an embodiment of the present invention;
[0024] Figure 8 is a structural schematic diagram of a signal generating unit provided by an embodiment of the present invention;
[0025] Fig. 9 is a schematic diagram of a partial structure of a chip provided by an embodiment of the present invention;
[0026] Fig.10 is a schematic diagram of a partial structure of another chip provided by an embodiment of the present invention;
[0027] Fig.11 It is a step flow chart of a chip testing method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] Figure 1 is a schematic diagram of the structure of a chip provided by an embodiment of the present invention. The method can be applied to a chip consisting of at least two functional modules, such as Figure 1 As shown, the chip includes at least one set of a first module 11 and a second module 12, and the first module 11 and the second module 12 are connected via a test interface 13; the first module 11 and the second module 12 are located in different functional modules;
[0030] Among them, the interface to be tested 13 is a data transmission interface between any two functional modules in the chip;
[0031] The first module 11 and the second module 12 are used to generate corresponding first test signals and second test signals respectively; the first module 11 is used to send the first test signal through the test interface 13; the second module 12 is used to receive the test signal through the test interface 13, and generate a detection result based on the test signal and the second test signal.
[0032] Among them, the above-mentioned interface to be tested refers to the data transmission interface between any two functional modules, and may include a sending (TX) interface of a functional module and a receiving (RX) interface of another functional module. Accordingly, the above-mentioned first module can be connected to the TX interface of any functional module, and the second module can be connected to the RX interface of another functional module. Among them, the functional module in the embodiment of the present invention refers to an independent circuit module in the chip for realizing a certain function, for example, it can be a clock module, a clock recovery module, a serial-to-parallel module or a parallel-to-serial module, etc. In one case, the functional module in the embodiment of the present invention can be a core particle.
[0033] It should be noted that the first module and the second module can be used as a group of chip test modules. On this basis, one interface to be tested can correspond to a group of chip test modules. When the chip contains multiple functional modules and multiple interfaces to be tested, multiple groups of chip test modules can be set on the chip. At the same time, for chip test modules corresponding to different interfaces to be tested, the first module can be located on the functional module corresponding to the transmitting end of the interface to be tested, and correspondingly, the second module can be located on the functional module corresponding to the receiving end of the interface to be tested. In one case, when bidirectional data transmission can be performed between two functional modules in the chip, there are often two data transmission interfaces between the two functional modules, corresponding to data transmission in two different directions. On this basis, the embodiment of the present invention can set the first module and the second module on any of the two functional modules at the same time, the first module is connected to the TX interface of the functional module, and the second module is connected to the RX interface of the functional module.
[0034] Specifically, a signal generating circuit may be provided in the first module and the second module to generate a first test signal and a second test signal. The corresponding first test signal and the second test signal refer to that the first test signal and the second test signal satisfy a preset condition, and the preset condition may be that the first test signal and the second test signal are consistent, or that the first test signal and the second test signal are mutually inverted signals. Of course, other preset conditions may also be provided, as long as the first test signal and the second test signal correspond to each other, and the embodiment of the present invention does not limit this. Furthermore, the signal generating circuit in the first module may be exactly the same as the signal generating circuit in the second module, so that the first test signal and the second test signal may be consistent, and of course, they may be different.
[0035] Further, after the second module receives the signal to be tested through the interface to be tested, the signal to be tested and the second test signal can be compared. It can be understood that when the data transmission interface functions normally, the transmitted signal should be consistent before and after the transmission, that is, the signal to be tested received by the second module should be consistent with the first test signal sent by the first module through the interface to be tested, and the first test signal corresponds to the second test signal, so that the second module can generate a corresponding test result by whether the second test signal corresponds to the signal to be tested. Specifically, in the case where the second test signal corresponds to the signal to be tested, a test result can be generated that the interface to be tested meets the test requirements. Correspondingly, in the case where the second test signal does not correspond to the signal to be tested, a test result can be generated that the interface to be tested does not meet the test requirements.
[0036] In summary, in the embodiment of the present invention, the first module and the second module in the chip are located in different functional modules, and are connected through the data transmission interface between any two functional modules. The first module and the second module can generate corresponding first test signals and second test signals. The first module can send the first test signal through the interface to be tested, and the second module can receive the signal to be tested through the interface to be tested, and generate a test result through the signal to be tested and the second test signal. In this way, the data transmission interface between different functional modules in the chip can be tested based on the first module and the second module on the chip, without the need to use third-party testing equipment, which greatly reduces the testing cost.
[0037] Optionally, Figure 2 is a schematic diagram of the structure of another chip provided by an embodiment of the present invention, such as Figure 2 As shown, both the first module and the second module include a signal generating unit 14 .
[0038] The signal generating unit 14 is used to generate a pseudo-random binary sequence as a first test signal or a second test signal based on the initial test data when a trigger signal is received; wherein the initial test data received by the signal generating unit in the first module is consistent with the initial test data received by the signal generating unit in the second module.
[0039] The trigger signal may be a signal indicating the start of the test, and the trigger signal may be sent to the chip by a relevant person. Specifically, the relevant person may write a signal indicating the start of the test (e.g., 1) into a processor register (CPU_REG) specified on the chip, and the signal generating unit may be connected to the processor register, so that the signal generating unit may obtain the trigger signal by accessing the processor register.
[0040] Specifically, the pseudo-random binary sequence generated by the signal generating unit in the first module is the first test signal, and correspondingly, the pseudo-random binary sequence generated by the signal generating unit in the second module is the second test signal.
[0041] Among them, a pseudo-random binary sequence (PRBS) refers to a pseudo-random sequence that only contains 0 and 1, and a pseudo-random sequence refers to a sequence that can be repeatedly generated and has certain random characteristics. Specifically, PRBS has a faster transmission efficiency, is easy to compare, and has a high random test coverage, so the embodiment of the present invention uses PRBS as a test signal to improve the test efficiency to a certain extent. Specifically, a signal generating unit can be set in both the first module and the second module, and the signal generating unit in the first module and the signal generating unit in the second module can be synchronously connected to CPU_REG, so that both can receive a trigger signal at the same time to synchronously generate a pseudo-random binary sequence.
[0042] The above-mentioned initial test data refers to the initial value (seed) set for the signal generating unit, which can be called a seed, and the signal generating unit can generate a PRBS based on the initial value. Specifically, the above-mentioned initial test data can also be transmitted to the signal generating unit through a register, and the initial test data received by the signal generating unit in the first module and the signal generating unit in the second module are consistent and synchronized, so as to ensure that the pseudo-random binary sequence generated by the signal generating unit in the first module and the pseudo-random binary sequence generated by the signal generating unit in the second module are synchronized under the chip clock, so that the first test signal and the second test signal can be kept consistent in each clock cycle, so that the second module can compare the test signal with the second test signal.
[0043] In the embodiment of the present invention, the signal generating unit generates a pseudo-random binary sequence as the first test signal or the second test signal, which can improve the test efficiency to a certain extent. At the same time, the initial test data received by the signal generating unit in the first module and the signal generating unit in the second module are consistent, which can ensure that the pseudo-random binary sequence generated by the signal generating unit in the first module and the pseudo-random binary sequence generated by the signal generating unit in the second module are synchronized under the chip clock, so that the first test signal and the second test signal can be kept consistent in each clock cycle, which is convenient for the second module to compare the signal to be tested with the second test signal.
[0044] Optionally, Figure 3 is a schematic diagram of the structure of another chip provided by an embodiment of the present invention, such as Figure 3 As shown, the second module further includes a comparison unit 15 .
[0045] The comparison unit 15 is used to receive the signal to be tested and the second test signal;
[0046] The comparison unit is also used to generate a first detection result when the signal to be tested and the second test signal are consistent; the first detection result is used to indicate that the interface to be tested meets the detection requirements;
[0047] The comparison unit is also used to generate a second detection result when the signal to be tested and the second test signal are inconsistent; the second detection result is used to indicate that the interface to be tested does not meet the detection requirements.
[0048] The comparison unit is used to receive the signal to be tested and the second test signal, and compare the two. Specifically, since the signal generation unit is provided in both the first module and the second module, and the initial test data received by the signal generation unit in the first module is consistent with the initial test data received by the signal generation unit in the second module, the first test signal and the second test signal are consistent in each clock cycle, so that the comparison unit can generate a detection result by whether the signal to be tested and the second test signal are consistent.
[0049] Specifically, when the signal to be tested is consistent with the second test signal, a test result can be generated indicating that the interface to be tested meets the test requirements. Accordingly, when the signal to be tested is inconsistent with the second test signal, a test result can be generated indicating that the interface to be tested does not meet the test requirements.
[0050] Optionally, the comparison unit can be constructed using logic devices, for example, an XOR gate can be used as the comparison unit, and the two input ends of the XOR gate receive the signal to be tested and the second test signal respectively. When the two are inconsistent, 1 is output as the second detection result. Correspondingly, when the two are consistent, 0 is output as the first detection result. Alternatively, since the first test signal and the second test signal are binary sequences, the comparison unit will receive a new signal to be tested and the second test signal in each clock cycle. In order to avoid test omissions, an XOR gate, an OR gate and a trigger can also be used to form a comparison unit. For example, Figure 4 is a schematic diagram of a comparison unit provided by an embodiment of the present invention, such as Figure 4 As shown, the two input terminals 1511 and 1512 of the XOR gate 151 receive the signal to be tested and the second test signal respectively, the output terminal 1513 of the XOR gate is connected to an input terminal 1521 of the OR gate 152, the other input terminal 1522 of the OR gate is connected to the output terminal 1532 of the trigger 153, the output terminal 1523 of the OR gate is connected to the input terminal 1531 of the trigger 153, and the output terminal 1532 of the trigger 153 outputs the detection result. In this way, when the signal to be tested is inconsistent with the second test signal in any clock cycle during the test process, the output terminal of the trigger will remain at 1 to avoid test omissions.
[0051] In the embodiment of the present invention, by setting a comparison unit to compare the signal to be tested with the second test signal, a corresponding detection result can be generated according to whether the signal to be tested and the second test signal are consistent, and the test cost is low.
[0052] Optionally, Figure 5 is a schematic diagram of the structure of another chip provided by an embodiment of the present invention, such as Figure 5 As shown, the interface to be tested 13 includes a plurality of paths to be tested 131 .
[0053] The comparison unit is also used to determine a target path that does not meet the detection requirements from the multiple paths to be tested based on the difference between the signal to be tested and the second test signal when the signal to be tested and the second test signal are inconsistent, and write the identification data of the target path into a preset register.
[0054] Among them, there may be multiple paths in the data transmission interface. For example, when the functional module is a core particle, a serializer (SERDES) may exist at the TX interface of the first core particle and the RX interface of the second core particle, which may include analog modules such as a clock module, a clock recovery module, a serial-to-parallel module or a parallel-to-serial module. The TX interface and the RX interface can constitute different paths in the data transmission interface by connecting with different analog modules. Problems with any module may cause data transmission errors. Therefore, the embodiment of the present invention can further detect the paths in the interface to be tested to test the circuit functions within the physical layer of the interface.
[0055] The identification data refers to a unique identification of a channel, which may be pre-set. Different channels in the chip correspond to different identification data, which is usually related to the arrangement position or arrangement order of the channels in the chip. Specifically, the first test signal may include different first sub-signals, and different first sub-signals may be sent through different channels to be tested, so that the sub-signals to be tested of each channel to be tested constitute the signal to be tested, and each sub-signal to be tested may be used as a different bit in the signal to be tested, so that the number of bits of the sub-signal to be tested in the signal to be tested may be used as the identification data of the corresponding channel.
[0056] Furthermore, different bits of the signal to be tested can be compared with different bits of the second test signal in sequence, and the path to be tested corresponding to the inconsistent bit number can be determined as the target path that does not meet the detection requirements. The above-mentioned preset register can be set according to actual needs, and the embodiment of the present invention does not limit this. Furthermore, relevant personnel can obtain the target path with abnormal function by reading the data in the preset register, thereby facilitating the repair of the target path.
[0057] Optionally, each of the channels under test is used to receive each first sub-signal in the first test signal and output each sub-signal under test, and the comparison unit includes multiple comparison sub-units; each comparison sub-unit is used to receive each sub-signal under test and each second sub-signal in the second test signal.
[0058] Specifically, the embodiment of the present invention can be provided with a plurality of comparison subunits, and different comparison subunits are used to receive the first subsignal and the second subsignal of different channels to be tested. Accordingly, the embodiment of the present invention can generate a mapping table for the correspondence between the identification data of each comparison subunit and each channel to be tested in advance, so that it can be determined whether there is a target channel that does not meet the detection requirements through the detection results of each comparison subunit, and the identification data of the target channel is obtained through the above mapping table and written into the preset register. Among them, the number of the above preset registers can be multiple, and the number of preset registers can be set according to the number of channels to be tested. For example, in the case of 30 channels to be tested, the embodiment of the present invention can set 5 preset registers in series. In the case that the subsignal to be tested and the second subsignal of the sixth channel to be tested (identification data is 5) are inconsistent, its identification data "5" can be converted into binary "00101" and written into these 5 preset registers, and the 5 preset registers are respectively used to store different bits of the identification data.
[0059] In the embodiment of the present invention, the accuracy of the detection can be improved by further detecting the target path to be detected. Meanwhile, the identification data of the target path that does not meet the detection requirements is written into the preset register, which facilitates the subsequent repair of the target path.
[0060] Optionally, Figure 6 is a schematic diagram of the structure of another chip provided by an embodiment of the present invention, such as Figure 6 As shown, the chip further includes a third module 16, the interface to be tested further includes a redundant path 132, and the third module is connected to the multiple paths to be tested and the redundant path respectively.
[0061] The third module is used to read the identification data in the preset register and determine the target path represented by the identification data as the path to be replaced; the third module is also used to replace the path to be replaced with the redundant path.
[0062] The redundant path may be pre-built into the chip, and the connection mode of the redundant path may be consistent with the connection mode of the path to be tested. When the chip works normally, the redundant path is in an empty state. The number of redundant paths may be one or more, and may be set according to the actual needs of the chip, which is not limited in the embodiment of the present invention.
[0063] Further, the third module can read the identification data stored in the preset register, and can read it according to a certain period, or can read it when receiving a read instruction, which is not limited by the embodiment of the present invention. Further, after the third module reads the identification data in the preset register, if the target path represented by the identification data is the path to be tested with an abnormality, the target path corresponding to the identification data can be determined as the path to be replaced, and the redundant path can be used to replace the path to be replaced.
[0064] Specifically, the third module may be a multiplexer (MUX), which may be connected to both the path to be tested and the redundant path. After reading the identification data of the target path, the MUX may route the data to be transmitted to the redundant path when the target path needs to transmit data, so that the redundant path replaces the target path for data transmission, thereby replacing the target path.
[0065] In the embodiment of the present invention, by providing a redundant path and a third module, when a target path that does not meet the detection requirements is detected, the redundant path can be used to replace the target path, thereby achieving automatic internal repair of the faulty path.
[0066] Optional, Figure 7 is a schematic diagram of the structure of another chip provided by an embodiment of the present invention, such as Figure 7 As shown, the signal generating unit 14 includes a feedback circuit 141, a plurality of registers 142 and a selector 143. Each of the selectors includes a first input terminal and a second input terminal, each of the registers and the second input terminal of each of the selectors are alternately connected in series to form a transmission chain, the input terminal of the feedback circuit is connected to the output terminals of the first register and the second register, and the output terminal of the feedback circuit is connected to the input terminal of the transmission chain; wherein the first register and the second register both belong to the plurality of registers;
[0067] Each of the selectors is used to receive initial test data through the first input terminal and input the initial test data into each of the registers when the trigger signal is received, and to receive data to be transmitted through the second input terminal and input the data to be transmitted into each of the registers when the trigger signal is not received;
[0068] The feedback circuit is used to receive the output values of the first register and the second register, and generate a feedback value to be input to the input end of the transmission chain; the target register among the multiple registers is used to output a pseudo-random binary sequence.
[0069] Wherein, the target register is used to connect the interface to be tested. The above register can be pre-selected from the registers contained in the chip, and the number of registers can be consistent with the number of channels to be tested, or can be greater than the number of channels to be tested, and the embodiment of the present invention does not limit this. Specifically, the above selector can receive a trigger signal and initial test data, and input the initial test data into each register. Specifically, each selector in the signal generation unit can be connected in parallel with respect to the processor register storing the initial test data, that is, each selector receives the initial test data by connecting to the processor register storing the initial test data. Correspondingly, each selector can also receive the trigger signal by connecting to the processor register storing the trigger signal. Specifically, the above trigger signal can be an instantaneous signal, that is, when the selector receives the trigger signal, it selects to input the initial test data received by the first input end into each register, and after the trigger signal is immediately turned off, the selector does not receive the trigger signal at this time, and can select the data received by the second receiving end as the data to be transmitted.
[0070] The selectors and registers are connected in series alternately to form a transmission chain, that is, the selector is connected to the register, and the register is connected to the next selector, and so on, and the transmission chain is formed in a circular manner. Specifically, a selector can be connected in series with a register as a group of transmission units, and each transmission unit is connected in series. The number of selectors and registers can be set by oneself, and the number of selectors and the number of registers can be kept consistent. In one case, the number of registers can be the same as the number of channels to be tested, that is, one register corresponds to one channel to be tested.
[0071] The first register and the second register may belong to multiple registers, may be any two registers among the multiple registers, may be the second and third registers in the transmission chain, or may be the third and fourth registers, and may be set according to actual needs. The input end of the feedback circuit may be connected to the output end of the first register and the second register, respectively, and the output end thereof may be connected to the input end of the transmission chain, that is, the input end of the first selector in the transmission chain.
[0072] Among them, the above-mentioned feedback circuit can be composed of several logic gates, and the feedback circuit can be constructed by using an XOR gate. Of course, other logic gates can also be used, and the embodiment of the present invention does not limit this. Specifically, a feedback circuit is used to receive the output values of the first register and the second register, and generate a feedback value to input into the input end of the transmission chain, so that the feedback value can be sequentially transmitted to each register in the feedback chain through the input end of the transmission chain to achieve data shifting. At the same time, the feedback circuit will continue to receive the new output values of the first register and the second register, and then generate a new feedback value to input into the transmission chain. In this way, each register in the transmission chain will generate random binary data in each clock cycle, and a pseudo-random binary sequence will be formed in multiple clock cycles. In one case, when the feedback circuit uses an XOR gate, the above-mentioned signal generation unit can be called a linear feedback shift register (LFSR). The LFSR can be given the output of the previous state, and the linear function of the output is used as the input shift register again, and then the bits in the transmission chain are shifted as a whole. The linear feedback shift register can generate a sequence that looks random and has a very long cycle period.
[0073] The target register is a register connected to the interface to be tested. In the first module, the target register is directly connected to the interface to be tested. The target register in the second module is connected to the comparison unit, and the comparison unit is connected to the interface to be tested. Several registers can be set as target registers according to the number of paths to be tested included in the interface to be tested. The target register sends the current data in each clock cycle.
[0074] For example, Figure 8 is a schematic diagram of the structure of a signal generating unit provided by an embodiment of the present invention, such as Figure 8 As shown, the signal generating unit 14 includes a feedback circuit 141, a plurality of registers 142 and a selector 143. Each of the selectors includes a first input terminal 1 and a second input terminal 0, and each of the registers 142 and the second input terminal 0 of each of the selectors are alternately connected in series to form a transmission chain.
[0075] The input end of the feedback circuit is connected to the output ends of the first register and the second register, and the output end of the feedback circuit is connected to the input end of the transmission chain.
[0076] Among them, Figure 8As shown, the third and fourth registers in the transmission chain can be used as the first register and the second register respectively. The feedback circuit is an XOR gate. On this basis, each selector 143 can receive the initial test data through the first input terminal 1 and transmit it to the register 142 when receiving the trigger signal, and after the trigger signal ends, the selector can receive and transmit the data to be transmitted through the second input terminal 0. Furthermore, several registers can be selected from multiple registers as target registers to output a pseudo-random binary sequence, such as Figure 8 As shown, the four registers used can all be used as target registers, and the output end of the target register can be connected to the interface to be tested.
[0077] In an embodiment of the present invention, by setting up a signal generating unit including a feedback circuit, only initial test data needs to be input, and the number of each register can be caused to produce pseudo-random changes in each clock cycle through the transmission chain and the feedback chain, so that the interface to be tested can end the pseudo-random binary sequence through the target register in the transmission chain, thereby improving detection efficiency and coverage.
[0078] In the prior art, when testing interfaces in a chip, it is often necessary to lead out each interface through interconnection lines and test it through a third-party external device. Not only is the testing cost high, but due to limited interface resources, some interfaces cannot be tested.
[0079] The chip provided by the embodiment of the present invention is as follows: Fig. 9 As shown, Fig. 9 It is a schematic diagram of a partial structure of a chip provided by an embodiment of the present invention, which may include an LFSR generation module (first module) and an LFSR detection module (second module), the LFSR generation module and the LFSR detection module are connected through a path to be tested 131, and the LFSR generation module and the LFSR detection module both include a signal generation unit 14, which includes a feedback circuit 141, multiple registers 142 and multiple selectors 143. The registers and the selectors are alternately connected in series to form a transmission chain.
[0080] like Fig. 9 As shown, the output end of the feedback circuit 141 in the signal generating unit is connected to the input end of the transmission chain. Fig. 9 The input end of the transmission chain is the second input end 0 of the first selector. The output end of each selector is connected to the input end of each register, and the output end of the register is connected to the second input end of the next selector. The input end of the feedback circuit is connected to the output end of the first register and the second register. Fig. 9The third and fourth registers in the transmission chain are used as the first register and the second register respectively. LFSR_EN is the trigger signal, and CLK is the clock of the chip. LFSR_SEED is the initial test data, which is input to the first input terminal of each selector, and LFSR_SEEDN corresponds to the Nth bit of the initial test data.
[0081] like Fig. 9 As shown, the LFSR detection module also includes a comparison unit 15, which is used to receive the signal to be tested and the second test signal, and the comparison unit is used to output the detection result. The structure of the signal generation unit 14 included in the LFSR generation module and the LFSR detection module is the same, so that the pseudo-random binary sequence generated by the LFSR generation module and the LFSR detection module is the same in each clock cycle. When performing chip testing, the same initial test data (LFSR_SEED) is used to start the generation of the pseudo-random binary sequence (Pseudo-Random Binary Sequence, PRBS) to ensure the consistency of the two. These sequences are input and compared in each clock cycle to achieve full-speed testing. If different data are detected, the comparison unit will output 1. The embodiment of the present invention can also output the detection structure of each comparison subunit to the port by setting a test chain (Joint Test Action Group, JTAG chain).
[0082] like Fig. 9 As shown, the comparison unit 15 may include a plurality of comparison subunits, each of which has the same structure and includes an XOR gate 151, an OR gate 152, and a trigger 153. Fig. 9 As shown, the two input ends of the XOR gate 151 receive the signal to be tested and the second test signal respectively, the output end of the XOR gate is connected to one input end of the OR gate 152, the other input end of the OR gate 152 is connected to the output end of the trigger 153, the output end of the OR gate 152 is connected to the input end of the trigger 153, and the output end of the trigger 153 outputs the detection result.
[0083] Further, Fig.10 is a schematic diagram of a partial structure of another chip provided by an embodiment of the present invention, such as Fig.10 As shown, Fig.10 Take two functional modules as an example. The two functional modules can transmit bidirectionally, thus including two test interfaces with different transmission directions. Each test interface includes 30 test channels IO[x]. It should be noted that, for ease of understanding, Fig.10 The RX and TX ends of each functional module are equated as one end, so Fig.10The IO in the IO can be transmitted from the IO[0]~IO
[29] of the first functional module to the IO[0]~IO
[29] of the second functional module, or can be transmitted from the IO[0]~IO
[29] of the second functional module to the IO[0]~IO
[29] of the first functional module. On this basis, the LFSR generation module and the LFSR detection module can be set on both functional modules. The two functional modules are respectively the first functional module and the second functional module. The LFSR generation module in the first functional module is connected to the LFSR detection module of the second functional module through the IO[0]~IO
[29] of the first functional module and the IO[0]~IO
[29] of the second functional module. Correspondingly, the LFSR generation module of the second functional module is connected to the LFSR detection module of the first functional module through the IO[0]~IO
[29] of the second functional module and the IO[0]~IO
[29] of the first functional module.
[0084] in, Fig.10 The IO repair in the above refers to the third module, the IO between the two third modules is the path to be tested, and IO_repair is a redundant path. The chip also includes a preset register 17, which can be composed of 5 registers connected in series, and is used to store the identification data of the target path.
[0085] After the LFSR detection module of a functional module generates the second test signal, it receives the 30-bit test signal (Bit[0] to Bit
[29] ) transmitted by the LFSR generation module of another functional module through IO[0] to IO
[29] . Each bit corresponds to a path to be tested. The LFSR detection module can compare the test signal and the second test signal, and write the identification of the target path with inconsistent comparison results into the preset register 17. Furthermore, the selector 18 in the third module can replace the target path with the redundant path IO_repair by reading the identification data in the preset register 17.
[0086] Optionally, after reading the identification data in the preset register 17, the selector may compress the data and input it into a one-time programmable memory (EFUSE) in the chip. After the chip is powered on again, the EFUSE decodes the compressed identification data to determine the target path, and replaces the target path with a redundant path to complete the redundant replacement of the interconnection interface.
[0087] In summary, in the embodiment of the present invention, the first module and the second module in the chip are located in different functional modules, and are connected through the data transmission interface between any two functional modules. The first module and the second module can generate corresponding first test signals and second test signals. The first module can send the first test signal through the interface to be tested, and the second module can receive the signal to be tested through the interface to be tested, and generate the detection result through the signal to be tested and the second test signal. In this way, the data transmission interface between the functional modules in the chip can be tested based on the first module and the second module on the chip, without the need to use third-party testing equipment, which greatly reduces the testing cost. The data path and function of the on-chip system are used to realize the automatic testing of the internal functional module circuit of the physical layer, and the test results are output to the port for observation and replacement of the link with problems.
[0088] Fig.11 1 is a flow chart of the steps of a chip testing method provided by an embodiment of the present invention. The method is applied to the second module in the chip, and the chip is the aforementioned chip, such as Fig.11 As shown, the method includes:
[0089] Step 401, generating a second test signal, and receiving the test signal through the test interface;
[0090] The signal to be tested is sent after the interface to be tested receives a first test signal, the first test signal is generated by a first module in the chip, and the first test signal corresponds to the second test signal.
[0091] Step 402: Generate a detection result based on the signal to be tested and the second test signal.
[0092] In the embodiment of the present invention, the specific execution process of step 401 to step 402 can refer to the above-mentioned related description, and this embodiment will not be repeated.
[0093] Optionally, generating a second test signal comprises:
[0094] When a trigger signal is received, a pseudo-random binary sequence is generated as the second test signal based on the initial test data.
[0095] Optionally, generating a detection result based on the signal to be tested and the second test signal includes:
[0096] When the signal to be tested and the second test signal are consistent, a first test result is generated; the first test result is used to indicate that the interface to be tested meets the test requirements;
[0097] In the case that the signal to be tested and the second test signal are inconsistent, a second test result is generated; the second test result is used to indicate that the interface to be tested does not meet the test requirements.
[0098] Optionally, the method further comprises:
[0099] When the signal to be tested and the second test signal are inconsistent, based on the difference between the signal to be tested and the second test signal, a target path that does not meet the detection requirements is determined from the multiple paths to be tested, and the identification data of the target path is written into a preset register.
[0100] In summary, in the chip testing method provided by the embodiment of the present invention, the first module and the second module in the chip are located in different functional modules, and are connected through the data transmission interface between any two functional modules. The first module and the second module can generate corresponding first test signals and second test signals. The first module can send the first test signal through the interface to be tested, and the second module can receive the signal to be tested through the interface to be tested, and generate the detection result through the signal to be tested and the second test signal. In this way, the data transmission interface between the functional modules in the chip can be tested based on the first module and the second module on the chip, without the need to use third-party testing equipment, which greatly reduces the testing cost.
[0101] The present invention also provides an electronic device. The chip provided in an embodiment of the present invention can be located in the electronic device. For example, the electronic device can be a mobile phone, a computer, a digital broadcast terminal, a message sending and receiving device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0102] The present invention also provides a readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the chip testing method of the aforementioned embodiment.
[0103] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0104] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0105] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0106] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0107] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0108] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0109] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0110] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0111] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0112] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A chip, characterized in that: The chip is composed of at least two functional modules, the chip includes at least one group of a first module and a second module, the first module and the second module are connected through a test interface, and the first module and the second module are located in different functional modules; the test interface is a data transmission interface between any two functional modules in the chip; The first module and the second module are used to generate a corresponding first test signal and a second test signal respectively; The first module is used to send the first test signal through the interface to be tested; The second module is used to receive the signal to be tested through the interface to be tested, and generate a detection result based on the signal to be tested and the second test signal.
2. The chip according to claim 1, characterized in that: The first module and the second module both include a signal generating unit; The signal generating unit is used for generating a pseudo-random binary sequence as the first test signal or the second test signal based on the initial test data when a trigger signal is received; The initial test data received by the signal generating unit in the first module is consistent with the initial test data received by the signal generating unit in the second module.
3. The chip according to claim 2, characterized in that: The second module further includes a comparison unit, and the comparison unit is used to receive the signal to be tested and the second test signal; The comparison unit is further used to generate a first detection result when the signal to be tested and the second test signal are consistent; the first detection result is used to indicate that the interface to be tested meets the detection requirements; The comparison unit is further used to generate a second detection result when the signal to be tested and the second test signal are inconsistent; the second detection result is used to indicate that the interface to be tested does not meet the detection requirements.
4. The chip according to claim 3, characterized in that: The interface to be tested includes a plurality of paths to be tested; The comparison unit is also used to determine a target path that does not meet the detection requirements from the multiple paths to be tested based on the difference between the signal to be tested and the second test signal when the signal to be tested and the second test signal are inconsistent, and write the identification data of the target path into a preset register.
5. The chip according to claim 4, characterized in that: The chip further includes a third module, the interface to be tested further includes a redundant path, and the third module is respectively connected to the plurality of paths to be tested and the redundant path; The third module is used to read the identification data in the preset register, and determine the target path represented by the identification data as the path to be replaced; The third module is further configured to use the redundant path to replace the path to be replaced.
6. The chip according to claim 2, characterized in that: The signal generating unit comprises a feedback circuit, a plurality of registers and a selector, each of the selectors comprises a first input terminal and a second input terminal, each of the registers and the second input terminals of each of the selectors are alternately connected in series to form a transmission chain, the input terminal of the feedback circuit is connected to the output terminals of the first register and the second register, and the output terminal of the feedback circuit is connected to the input terminal of the transmission chain; wherein the first register and the second register both belong to the plurality of registers; Each of the selectors is used to receive initial test data through the first input terminal and input the initial test data into each of the registers when the trigger signal is received, and to receive data to be transmitted through the second input terminal and input the data to be transmitted into each of the registers when the trigger signal is not received; The feedback circuit is used to receive the output values of the first register and the second register, and generate a feedback value to be input to the input end of the transmission chain; A target register among the plurality of registers is used to output a pseudo-random binary sequence.
7. The chip according to claim 4, characterized in that: Each of the channels to be tested is used to receive each first sub-signal in the first test signal and output each sub-signal to be tested, and the comparison unit includes a plurality of comparison sub-units; Each of the comparison sub-units is used to receive each of the sub-signals to be tested and each second sub-signal in the second test signal.
8. A chip testing method, characterized in that: The method is applied to a second module in a chip, the chip being the chip according to any one of claims 1 to 7, and the method comprises: Generate a second test signal, and receive the test signal through the test interface; the test signal is sent after the test interface receives the first test signal, the first test signal is generated by the first module in the chip, and the first test signal corresponds to the second test signal; A detection result is generated based on the signal to be tested and the second test signal.
9. An electronic device, characterized in that: The electronic device comprises the chip according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method of claim 8.
Citation Information
Cited By
Transmission circuit, reception circuit, integrated circuit chip, and test method
CN119517768A
Transmitting circuit, receiving circuit, integrated circuit chip and testing method
CN119517768B
Method and device for testing protocol consistency function of network switching chip
CN119603185A
Chip testing method and device, storage medium and electronic equipment
CN119758044A
Chip Testing Method, Device, Storage Medium and Electronic Device
CN119758044B
