WO2023169195A1 - Method for generating test pattern, and electronic device and storage medium - Google Patents

Method for generating test pattern, and electronic device and storage medium Download PDF

Info

Publication number
WO2023169195A1
WO2023169195A1 PCT/CN2023/077205 CN2023077205W WO2023169195A1 WO 2023169195 A1 WO2023169195 A1 WO 2023169195A1 CN 2023077205 W CN2023077205 W CN 2023077205W WO 2023169195 A1 WO2023169195 A1 WO 2023169195A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
clock
power consumption
packet
package
Prior art date
Application number
PCT/CN2023/077205
Other languages
French (fr)
Chinese (zh)
Inventor
王乃行
王泽中
余航
黄宇
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023169195A1 publication Critical patent/WO2023169195A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/25Testing of logic operation, e.g. by logic analysers

Definitions

  • the present disclosure relates to the field of electronics, and more particularly to methods and electronic devices for designing test circuits.
  • chip testing is to pick out defective chips. Because the cost of such defective chips entering the market will be far greater than the cost of chip testing, chip testing is a crucial part of the chip manufacturing process.
  • a design for testability (DFT) structure such as a scan chain can be added to the chip during the chip design stage, and a chip with a DFT structure can be manufactured.
  • ATE automatic test equipment
  • chip power consumption As the complexity and scale of chip design continues to rise, chip power consumption also rises sharply. Modern chip designs based on scan chains will cause the chip to enter a state that it will not enter in functional mode during testing, thus causing additional power consumption. For example, during testing, the flipping of the logic values of registers in the scan chain generates power consumption during the test. Excessive test power consumption will cause the following problems: (1) causing power consumption hot spots in the chip, thereby causing breakdown and other damage to the chip; (2) excessive power consumption will cause electromigration, which will greatly affect the chip. reliability; (3) causing a reduction in the chip supply voltage, resulting in a loss of chip yield.
  • test power consumption can be divided into the following two categories: shift power (shift power) in the stage when the logic value is shifted in the scan chain, and capture power (capture power) in the logic value capture stage. ).
  • Shift power consumption represents the power consumption of the chip itself during the stages when the test vector is moved in and the test response is moved out.
  • Capture power consumption refers to the power consumption generated when the chip enters the functional stage after the test vector is moved in and before the test response is moved out.
  • only after the final test vector is generated it is verified whether the power consumption of the generated test vector meets the low power consumption requirements. This will lead to a large number of test vectors that do not meet the test power consumption requirements, thus affecting the performance of various test vectors. Test coverage for faults.
  • embodiments of the present disclosure aim to provide a method, an electronic device, a computer-readable storage medium and a program product for generating test vectors for generating test vectors for a circuit under test.
  • a method for generating test vectors includes performing a test vector compaction operation on the first test package and the second test package to generate a first intermediate test package.
  • the first test package and the second test package are used to test the circuit under test.
  • the method also includes determining a test power consumption corresponding to the first intermediate test package; and in response to the test power consumption being higher than the first threshold power consumption, at least testing the first intermediate test based on a set of control clocks of a plurality of scan chains of the circuit under test.
  • the package is adjusted to generate a second intermediate test package.
  • a control clock set is used to control multiple registers in multiple scan chains.
  • the method also includes determining the target test packet based on the second intermediate test packet in response to the adjusted second intermediate test packet not being higher than the first threshold power consumption.
  • generating the first intermediate test package includes: merging the first test package and the second test package to generate a combined test package; determining the shift power consumption corresponding to the combined test package ; In response to the shift power consumption not being higher than the second threshold power consumption, perform a dynamic compaction operation on the merged test packet to generate a first intermediate test packet.
  • performing a dynamic compression operation on the merged test package to generate the first intermediate test package further includes: performing a shift power consumption detection on the merged test package on which the dynamic compression operation is performed, in response to the If the power consumption of the merged test packet on which the dynamic compression operation is performed is not higher than the first threshold, the merged test packet on which the dynamic compression operation is performed is determined as the first intermediate test vector.
  • unknown states in some test vectors in the merged test package will be assigned certain values, which may cause the shift power consumption of the merged test package to change. By once again detecting the shift power consumption, the safety of automatic vector testing can be ensured.
  • determining the test power consumption corresponding to the first intermediate test package includes: determining capture flip rates of multiple scan chains corresponding to the first intermediate test package; and generating a second intermediate test Including: in response to the capture flip rate being higher than the capture threshold flip rate, adjusting the first intermediate test packet based on at least a control clock set of a plurality of scan chains of the circuit under test to generate a second intermediate test packet.
  • determining the shift power consumption corresponding to the merged test packet includes: determining shift flip rates of multiple scan chains corresponding to the merged test packet; and generating the first intermediate test includes: In response to the shift flip rate not being higher than the shift threshold flip rate, a dynamic compaction operation is performed on the merged test packet to generate a first intermediate test packet. By detecting the shift toggle rate, the test power consumption can be determined in a simple way.
  • generating the second intermediate test includes: in response to the test power consumption being higher than the first threshold power consumption, adjusting the first clock bit set in the first intermediate test packet.
  • the adjusted first clock bit set is used to turn off the first clock in the control clock set, which is used to control registers in multiple scan chains, and the first clock is the clock that controls the most registers in the control clock set; and respond
  • the captured power consumption corresponding to the adjusted first intermediate test packet is not higher than the first threshold power consumption
  • the adjusted first intermediate test packet is determined as the second intermediate test packet.
  • Some clocks can be turned off by adjusting the clock bits of the intermediate test packets. Because the clock is turned off, registers in the scan chain that are configured to receive this clock cannot change their logic values. Correspondingly, the number of flipped logic values of registers in the scan chain can be reduced, thereby reducing capture power consumption.
  • the method further includes: generating a first initial vector packet for the first test fault; determining a first test bit set corresponding to the first test fault; based on the first test bit a set to determine a set of clocks to be turned off; and based on the set of clocks to be turned off, adjust the first initialization vector packet to generate a first test packet.
  • the method further includes: generating a second initial vector packet for the second test fault; determining a second test bit set corresponding to the second test fault; based on the second test bit set, determine the second set of clocks to be turned off; and based on the second set of clocks to be turned off, adjust the second initialization vector packet to generate Second test package.
  • the assignment combination corresponding to the clock gate can be used to close the clock gate. In this way, it can be clearly known in the subsequent simulation process that the corresponding clock gate is in a closed state, so that the possible logic value flip rate of the scan chain can be calculated more accurately.
  • the method further includes: determining clock gates for controlling multiple scan chains based on netlist data used to represent the circuit under test and a sample test vector set for the circuit under test Collection of distribution and clock control bits.
  • the clock gate distribution represents a correspondence between multiple clock gates and registers in multiple scan chains that they respectively control.
  • the clock gate is configured to close the clock gate based on the clock control bits in the received clock control bit set. corresponding register.
  • a small amount of ATPG and simulation can be performed on the original circuit under test.
  • the scan chain distribution and register distribution used in the circuit under test can be obtained.
  • the clock gate distribution can be obtained.
  • the clock gate distribution can be used to close the clock gate in the subsequent test vector generation for faults, thereby more accurately calculating the possible logic value flip rate of the scan chain.
  • the method further includes: performing simulation using the netlist data and the sample test vector set to determine, for the circuit under test, a low-power circuit, each scan chain of the plurality of scan chains at least one of a toggle rate during a logic value shift process and a logic value toggle rate in a logic value capture stage for each register in the plurality of scan chains.
  • determining the clock gate distribution and clock control bit set used to control multiple scan chains includes: determining the scan chain distribution based on the netlist data and the sample test vector set, and the scan chain distribution Represents the scan chains used in the automatic vector test generation process in multiple scan chains; determines the register distribution based on the netlist data and sample test vector set, and the register distribution represents the number of registers in multiple scan chains.
  • the shift flip rate of the scan chain and the capture flip rate of the register obtained through analysis can be used to constrain the shift power consumption and capture power consumption of the scan chain in subsequent stages.
  • the shift toggle rate of the scan chain and the capture toggle rate of the register can also be used to determine the clock gate distribution.
  • a computer-readable storage medium storing a plurality of programs configured to be executed by one or more processors, the plurality of programs including a program for executing the method according to the first aspect. instruction.
  • a computer program product includes a plurality of programs configured to be executed by one or more processors.
  • the plurality of programs include a method for executing the method according to the first aspect. instructions.
  • an electronic device includes: one or more processors; and a memory including computer instructions that when executed by the one or more processors of the electronic device cause the electronic device to perform the method according to the first aspect.
  • an electronic device includes a generation unit, a test power consumption determination unit, an adjustment unit and a target test package determination unit.
  • the generating unit is configured to perform a test vector compaction operation on the first test package and the second test package to generate a first intermediate test package, and the first test package and the second test package are used for testing the circuit under test.
  • the test power consumption determining unit is configured to determine the test power consumption corresponding to the first intermediate test package.
  • the adjustment unit is configured to adjust the first intermediate test package based on at least a control clock set of a plurality of scan chains of the circuit under test in response to the test power consumption being higher than the first threshold power consumption to generate a second intermediate test package, control Clock sets are used to control multiple registers in multiple scan chains.
  • the target test packet determining unit is configured to determine the target test packet based on the second intermediate test packet in response to the adjusted second intermediate test packet not being higher than the first threshold power consumption.
  • the generation unit is further configured to: merge the first test packet and the second test packet to generate a merged test packet; determine the shift power consumption corresponding to the merged test packet; In response to the shift power consumption not being higher than the second threshold power consumption, a dynamic compaction operation is performed on the merged test packet to generate a first intermediate test packet.
  • the generation unit is further configured to: merge the first test packet and the second test packet to generate a merged test packet; determine the shift power consumption corresponding to the merged test packet; In response to the shift power consumption not being higher than the second threshold power consumption, a dynamic compaction operation is performed on the merged test packet to generate a first intermediate test packet.
  • the test power consumption determination unit is further configured to: determine capture flip rates of the plurality of scan chains corresponding to the first intermediate test packet; and the adjustment unit is further configured to include: responding When the capture flip rate is higher than the capture threshold flip rate, the first intermediate test packet is adjusted based on at least control clock sets of multiple scan chains of the circuit under test to generate a second intermediate test packet. By detecting the capture toggle rate, the test power consumption can be determined in a simple way.
  • the generation unit is further configured to: determine shift flip rates of the plurality of scan chains corresponding to the merged test packet; and flip in response to the shift flip rate not being higher than the shift threshold rate, perform a dynamic compaction operation on the merged test package to generate the first intermediate test package.
  • the shift toggle rate By detecting the shift toggle rate, the test power consumption can be determined in a simple way.
  • the adjustment unit is further configured to: in response to the test power consumption being higher than the first threshold power consumption, adjust the first clock bit set in the first intermediate test packet.
  • the adjusted first clock bit set is used to turn off the first clock in the control clock set, which is used to control registers in multiple scan chains, and the first clock is the clock that controls the most registers in the control clock set; and respond
  • the captured power consumption corresponding to the adjusted first intermediate test packet is not higher than the first threshold power consumption
  • the adjusted first intermediate test packet is determined as the second intermediate test packet.
  • Some clocks can be turned off by adjusting the clock bits of the intermediate test packets. Because the clock is turned off, registers in the scan chain that are configured to receive this clock cannot change their logic values. Correspondingly, the number of flipped logic values of registers in the scan chain can be reduced, thereby reducing capture power consumption.
  • the generation unit is further configured to: generate a first initial vector packet for the first test fault; determine a first test bit set corresponding to the first test fault; based on the first test a set of bits to determine a set of clocks to be turned off; and based on the set of clocks to be turned off, adjust the first initialization vector packet to generate a first test packet.
  • the assignment combination corresponding to the clock gate can be used to close the clock gate. In this way, it can be clearly known in the subsequent simulation process that the corresponding clock gate is in a closed state, so that the possible logic value flip rate of the scan chain can be calculated more accurately.
  • the electronic device further includes: a distribution determination unit configured to determine, based on the netlist data used to represent the circuit under test and the sample test vector set for the circuit under test, the distribution determination unit for controlling the circuit under test.
  • Clock gate distribution and clock control bit set of multiple scan chains The clock gate distribution represents the correspondence between multiple clock gates and the registers in the multiple scan chains they control respectively.
  • the clock gate is configured to be based on the received clock.
  • Clock control in a set of control bits Control bits to turn off the register corresponding to the clock gate.
  • a small amount of ATPG and simulation can be performed on the original circuit under test.
  • the scan chain distribution and register distribution used in the circuit under test can be obtained.
  • the clock gate distribution can be obtained.
  • the clock gate distribution can be used to close the clock gate in the subsequent test vector generation for faults, thereby more accurately calculating the possible logic value flip rate of the scan chain.
  • the electronic device is further configured to perform simulation using the netlist data and the sample test vector set to determine, for the circuit under test, the low-power circuit, each scan in the plurality of scan chains At least one of a toggle rate during a logic value shift process of the chain and a logic value toggle rate in a logic value capture phase for each register in the plurality of scan chains.
  • the distribution determination unit is further configured to determine the scan chain distribution based on the netlist data and the sample test vector set, where the scan chain distribution represents the automatic vector test generation process in multiple scan chains.
  • the scan chain used in the scan chain determine the register distribution based on the netlist data and the sample test vector set, and the register distribution represents the registers used in the automatic vector test generation process among the multiple registers in multiple scan chains; and Based on the scan chain distribution and register distribution, the clock gate distribution and clock control bit set are determined.
  • a low-power control circuit can be generated that can have improved encoding capabilities and use fewer encoding bits.
  • the shift flip rate of the scan chain and the capture flip rate of the register obtained through analysis can be used to constrain the shift power consumption and capture power consumption of the scan chain in subsequent stages.
  • the shift toggle rate of the scan chain and the capture toggle rate of the register can also be used to determine the clock gate distribution.
  • FIG. 1 shows a schematic diagram of a simulation system of a logic circuit according to some embodiments of the present disclosure.
  • FIG. 2 shows a schematic structural diagram of a chip applying test compression technology according to some embodiments of the present disclosure.
  • FIG. 3 shows a schematic diagram of a two-dimensional sparse two-dimensional switch matrix circuit applied to a low-power decoder and a mask decoder according to some embodiments of the present disclosure.
  • Figure 4 shows a schematic diagram of scan chains and combinational logic in accordance with some embodiments of the present disclosure.
  • Figure 5 shows a schematic flow diagram of a method for generating test vectors according to some embodiments of the present disclosure.
  • Figure 6 shows a schematic flowchart of a method for determining a low power control circuit in accordance with some embodiments of the present disclosure.
  • Figure 7 shows a schematic flow diagram of a method for generating test vectors according to some embodiments of the present disclosure.
  • Figure 8 shows a schematic flowchart of a method for determining test power consumption according to some embodiments of the present disclosure.
  • Figure 9 shows a schematic block diagram of an electronic device according to some embodiments of the present disclosure.
  • Figure 10 shows a schematic block diagram of an example device that may be used to implement embodiments of the present disclosure.
  • the term “include” and its variations mean an open inclusion, ie, "including but not limited to.” Unless otherwise stated, the term “or” means “and/or”. The term “based on” means “based at least in part on.” The terms “one example embodiment” and “an embodiment” mean “at least one example embodiment.” The term “another embodiment” means “at least one additional embodiment”. The terms “first,” “second,” etc. may refer to different or the same object. Other explicit and implicit definitions may be included below.
  • EDA electronic design automation
  • the user inputs the configuration to the EDA software, the EDA software generates the logic circuit, and then the chip is obtained through pattern making and tape-out.
  • the chip can be installed on the ATE and the test stimulus is input by the ATE to the input pin of the IC chip.
  • the set of required test vectors also grows rapidly. This results in increased chip testing costs.
  • test compression technology is proposed to compress test vectors while ensuring test coverage.
  • the test compression technique is based on scan chains. Scan chain technology essentially connects flip-flops in a sequential circuit into multiple "shift registers (scan cells)", and the input and output values of each shift register can be independently observed.
  • the feasibility of testing compression techniques is based on the fact that a single raw test generated by ATPG contains the input values of all shift registers in the scan chain, and only the input values on a small number of shift registers are valid values. Therefore, the original test vector can be compressed and decompressed to recover the effective value by stimulating the decompression module (decompressor).
  • the output values on the scan chain can also be compressed through the response compression module (compactor). The output compression value is sent to ATE through the output pin, and ATE compares the output compression value with the expected value to locate the scan chain shift register position where the error occurred.
  • test cub for each fault needs to be generated.
  • the test package for each fault can be generated through a series of calculation, analysis, verification and other operations to generate the final test package set.
  • This final set of test packages is provided to the ATE, which uses the final set of test packages to verify whether the circuit design is faulty.
  • ATE performs ATPG on each target fault in the target fault set (fault list) to generate multiple test packages. After a certain amount of test packages are generated, the entire process will enter steps such as test package fusion (cube merging) to make the final test package set as compact as possible.
  • the final test package set is simulated and the logical value flip rate of each test vector is calculated. If the logic value flip rate does not meet the requirements set by the user, the test vector will be discarded.
  • the testing process only adds a verification step after the final set of test packages is generated. Although this method can ensure that the final generated test vectors meet the requirements of low-power testing, a large number of test vectors will be discarded, which greatly affects the test coverage. For example, some faults may go undetected because their corresponding test vectors are discarded.
  • the test power consumption of the compressed intermediate test packet is detected, and the test packet whose test power consumption is higher than the threshold is detected. Adjustments can be made to meet power consumption requirements. In this way, the test vectors that would have been discarded during the simulation phase will be adjusted to meet the power consumption requirements during the test vector generation process, which can significantly improve the utilization of the test package. Therefore, more test vectors are When used instead of discarded, the test circuit can be detected for more faults, thereby improving test coverage for various faults.
  • FIG. 1 shows a schematic diagram of a simulation system 100 for a logic circuit according to some embodiments of the present disclosure.
  • the simulation system 100 includes an electronic device 10 and an ATPG device 20, for example.
  • the electronic device 10 is, for example, a computer.
  • Electronic device 10 includes a processor 14 and memory 12 , where processor 14 includes cache 16 .
  • processor 14 includes cache 16 .
  • cache 16 may also be independent of processor 14, which is not limited to the scope of the present disclosure.
  • ATPG device 20 is configured to generate ATPG data for logic simulation and transmit the ATPG data to electronic device 10 .
  • the electronic device 10 and the ATPG device 20 are limited independently in FIG.
  • the ATPG device 20 may be integrated with the electronic device 10 , which is not limited by the present disclosure.
  • Electronic device 10 may include input devices, communication devices, displays, audio devices, and other components not shown here.
  • the electronic device 10 may include, for example, a desktop computer, a notebook, a workstation, a server, and other devices with computing functions.
  • the netlist file used to describe the logic circuit can be transferred to the electronic device 10 through various wired or wireless methods.
  • the electronic device 10 may also use a storage medium in which the netlist file is stored to read the netlist file.
  • ATPG device 20 may generate different ATPG data for different logic circuits.
  • the ATPG data includes, for example, simulation cycle data, original data input, fault simulation data, and the like.
  • the simulation cycle data includes, for example, tick data, ie, data representing a time frame executed by the processor for logic simulation and/or fault simulation.
  • the time frames of logic simulation and fault simulation may be the same or different, and this disclosure does not limit this.
  • the original inputs include, for example, the original data inputs for each original data input port in the logic circuit in the logic simulation and the original clock input corresponding to the original clock port used to calculate the logic value of the clock port of the sequential logic gate. Since a time frame is usually multiple time frames, the raw data input for a single raw data input port may be a raw data input set for the multiple time frames, which includes a series of bit values, such as a 64-bit bit value.
  • the fault simulation data includes, for example, a fault data input for a fault data input.
  • the original fault data input for a single fault input terminal can be a fault input set, which includes a series of bit values, such as 64 bits, for the multiple time frames. bit value. Bit values can have more or fewer bits.
  • FIG. 2 shows a schematic structural diagram of a chip applying test compression technology according to some embodiments of the present disclosure.
  • FIG. 2 shows a schematic structural diagram of a chip 200 applying test compression technology according to some embodiments of the present disclosure.
  • the chip 200 includes a circuit to be tested 211, a low-power shift register 216, a mask register 218, a decompression module 212, a compression module 213, a low-power controller 214, a mask controller 215, and multiple One AND gate 207-1, 207-2...207-N and multiple AND gates 209-1, 209-2...209-N, where N represents an integer greater than 1.
  • a low-power shift register 216, a mask register 218, a decompression module 212, a compression module 213, a low-power controller 214, a mask controller 215, and a plurality of AND gates 207-1, 207- 2 Vietnamese207-N and multiple AND gates 209-1, 209-2...209-N are used to test the circuit under test 211. Therefore, in one embodiment, the test circuitry of chip 200 may include at least one of low power controller 214 or mask controller 215. In another embodiment, the test circuit of the chip 200 may further include a low-power shift register 216, a mask register 218, a decompression module 212, a compression module 213, and a plurality of AND gates 207-1, 207-2...
  • ATE inputs ATPG test vectors to the low-power shift register 216 of the chip 200 through a small number of input pins of the chip 200.
  • the ATPG test includes the input compression value of the decompression module 212, that is, the compressed seed, the encoding value of the low-power controller 214, the encoding value of the mask controller 215, and so on. Input compressed values are injected into decompression module 212 via low power shift register 216 and mask register 218.
  • the encoded value of the low-power controller 214 is injected into the low-power controller 214 via the low-power shift register 216 , and the encoded value of the mask controller 215 is injected via the low-power shift register 216 and the mask register 218 Mask Controller 215.
  • the low-power controller 214 decodes the encoded value to open the appropriate scan chain.
  • the compression module 212 decompresses the input compressed value of the low-power shift register 216, and fills the decompressed value into the corresponding shift register through shifting under the control of the low-power controller 214.
  • the mask controller 215 decodes the encoded value, uses the decoded bit value to mask the X state in the scan chain output value, and sends the processed output value to the response compression module 213 for compression.
  • the circuit under test 211 includes a plurality of scan chains 211-1, 211-2...211-N (hereinafter individually or collectively referred to as 11), the number of scan chains is related to the number of AND gates 207-1, 207 -2...207-N (hereinafter individually or collectively referred to as 7) corresponds to a plurality of AND gates 209-1, 209-2...209-N (hereinafter individually or collectively referred to as 9) respectively.
  • Each scan chain may include one or more sequential logic circuits, such as registers, in the circuit under test.
  • the network of sequential logic XOR gates generates a shift output in response to the shift output.
  • the low-power controller 214 includes a low-power register 214A and a decoder 214B.
  • the decoder 214B generates a control signal through decoding to control one or more of the AND gates 207-1, 207-2...207-N.
  • the AND gate is turned on or off. For example, in multiple cycles, the decoder 214B may continuously generate a logic value “1” to the AND gate 207-1, so that the decompressed value is successively shifted and input to the scan chain 211-1.
  • the decoder 214B may output "0" to turn off the AND gates 207-2...207-N, so that the scan chains 211-2...211-N continue to receive "0"s. Since there is no logic value change in the scan chains 211-2...211-N, the sequential logic gates in the chip do not operate. Since the sequential logic gates do not operate, power consumption during testing can be reduced.
  • the mask controller 215 includes a mask register 215A and a mask decoder 215B.
  • the mask decoder 215B generates a control signal through decoding to control one of the AND gates 209-1, 209-2...209-N. Turning on or off multiple AND gates.
  • the mask decoder 215B can generate a control signal through decoding to close the AND gate corresponding to the scan chain having the X state among the AND gates 209-1, 209-2...209-N.
  • the decompression module 212 may be any circuit capable of expanding a small amount of test stimuli into a large number of scan chain test vectors and outputting the test vectors.
  • the decompression module 212 may be a random signal generator, for example.
  • the embodiment of the present application does not limit the structure of the response compression module 213.
  • the response compression module 213 may be any circuit capable of receiving test responses and performing logical operations on the received test responses to output from a small number of output channels.
  • the response compression module 213 may be, for example, a compression module based on a multiple-input signature register (MISR) or an XOR gate (XOR) tree structure.
  • MISR multiple-input signature register
  • XOR XOR gate
  • FIG. 3 shows a schematic diagram of a two-dimensional sparse two-dimensional switch matrix circuit 300 applied to the low-power decoder 214B or the mask decoder 215B according to some embodiments of the present disclosure.
  • the sparse two-dimensional switch matrix circuit 300 may be, for example, a specific implementation of the low-power decoder 214B or the mask decoder 215B. It can be understood that the two-dimensional sparse two-dimensional switch matrix circuit may have different switch distributions depending on the circuit 11 to be tested.
  • the sparse two-dimensional switch matrix circuit 300 includes a plurality of rows and a plurality of columns. Each row may be controlled by a corresponding row select signal from row selector 32 .
  • Each column may be controlled by a corresponding column select signal of column selector 33 .
  • the sparse two-dimensional switch matrix circuit 300 has switches coupled with the scan chain of the circuit under test 11 , such as switches 31 or 34 , at only some nodes among the row and column nodes. In other words, switches coupled to scan chains may not be provided at some nodes of rows and columns in the sparse two-dimensional switch matrix circuit 300 . Therefore, a sparse two-dimensional switch matrix circuit represents a two-dimensional switch matrix circuit in which at least one node does not have a switch. In Figure 3, although rows and columns are shown crossing at some nodes without switches, this is only to simplify the illustration. It can be understood that the conductive lines of the rows and columns are not coupled, but disconnected at the nodes.
  • the sparse two-dimensional switch matrix circuit 300 allows the number of scan chains (control granularity of each dimension) connected to each column encoding bit (column encoding bit) and row encoding bit (row encoding bit) to be flexibly adjustable.
  • the number of scan chains connected to each row encoding bit can be less than the number of groups n, and the number of scan chains connected to each column encoding bit can be less than the number of rows m.
  • granularity means the number of switches controlled by a row or column.
  • the granularity of the sparse two-dimensional switch matrix circuit can be set to a uniform granularity.
  • the switches in each row and column are substantially equal to each other, and the number of controlled switches differs by at most one. Since each row and column has essentially the same or close switches, this The total number of switches that are mistakenly turned on can be minimized.
  • switch 34 is located at a node above switch 31, the conduction of switch 34 will affect the conduction of the two switches on the left and right sides and switch 31 (a total of 3 switches). This is because when switch 34 When on, it must have its row and column set to 1. In other words, in this case, the encoding success rate of the three switches will be affected.
  • switch 34 When switch 34 is in the position shown in Figure 3, switch 34 only affects the switch to its right as well as switch 31 (only 2 switches).
  • the sparse two-dimensional switch matrix circuit 300 is set as a uniform-granularity coefficient matrix, which can improve the coding success rate.
  • a 3 ⁇ 3 two-dimensional sparse two-dimensional switch matrix circuit 300 is shown in FIG. 3 , this is only for illustration and does not limit the scope of the present disclosure.
  • the two-dimensional sparse two-dimensional switch matrix circuit may have an n ⁇ m two-dimensional structure, where n represents a row and has an integer value greater than 1, m represents a column and has an integer value greater than 1, and m is the same as n can be the same or different.
  • the switch in Figure 3 could be an AND gate. In other embodiments, the switches may be other logic gates or other switches.
  • an OR gate can be used as a switch.
  • the control bit signal output by the switch is 1, that is, the switch will open the corresponding scan chain.
  • the control bit signal output by the switch 31 is 0, that is, the switch will close the corresponding scan chain.
  • the number of rows and columns in the sparse two-dimensional switch matrix circuit 300 may be related to the number of scan chains of the circuit under test 11 .
  • the distribution of switches coupled to different scan chains in the sparse two-dimensional switch matrix circuit 300 may be random or arranged according to certain rules. In some embodiments of the present disclosure, an optimized two-dimensional sparse switching distribution for the circuit under test 11 may be obtained through ATPG learning, as described below.
  • Figure 4 shows a schematic diagram of scan chain 411 and combinational logic 42 in accordance with some embodiments of the present disclosure.
  • scan chain 411 may be a specific example of scan chain 211-N in FIG. 2 and includes three registers 44, 46, and 48. It is understood that in other embodiments, the scan chain 411 may include more or fewer registers.
  • Scan chain 411 and combinational logic 42 may be part of circuit under test 211 in FIG. 2 .
  • the scan chain 411 includes two phases during the test process, namely the shift phase and the capture phase.
  • the shift enable (SE) terminals of registers 44, 46, and 48 receive the SE establishment signal. Therefore, the registers 44, 46, and 48 are at their respective shift input (SI) terminals. Shift logic values are received in turn.
  • scan chain 411 receives an SI of "110". In this case, the logic value of scan chain 411 is flipped once. The shift flip rate of scan chain 411 is therefore 1/2, or 50%.
  • registers 44, 46 and 48 of scan chain 411 have all been moved into initial logic values.
  • the SE terminal of registers 44, 46 and 48 receives the solution establishment signal and the SI terminal is disabled.
  • the logic values of registers 44, 46 and 48 are supplied to combinational logic 42 at the Q terminal.
  • the combinational logic 42 provides the logic values obtained by the operations to the registers 44, 46 and 48 through a data input (DI) terminal.
  • DI data input
  • Combinational logic 42 in its functional operation phase, may generate corresponding logical outputs Y1 and Y2 based on the received inputs X1, X2 and X3.
  • the combinational logic 42 may calculate the logic output to the DI terminal of the register based on the multiple outputs from the Q terminal of the register.
  • the combinational logic 42 may also receive a clock signal set CKS of the chip, and the clock signal set CKS may include one or more system clock pulses.
  • Some of the clock gates (logic gates) in combinational logic 42 may selectively provide clock signals to registers 44, 46, and 48 based on system clock pulses and logic inputs, where the logic outputs may be from registers of the same or different scan chains.
  • a logic gate or a combination of logic gates in combinational logic 42 for controlling the clock port CK of a register is referred to as a clock gate.
  • a logic gate for calculating a logic value supplied to the DI terminal of the register using a logic value from the Q terminal of the register is called a computational logic gate.
  • a clock gate may be an AND gate that receives a clock pulse on one end and a logic value from a register on the other end.
  • the clock signal may be provided to the clock terminal CK of the register, and in the case of a logic value of "0", the clock gate is closed, that is, no clock signal is provided to The clock terminal CK of the register.
  • the clock gate is shown as an AND gate here, it can be understood that this is only illustrative and does not limit the scope of the present disclosure.
  • a clock gate can be an OR gate, an XOR gate, or a combination of multiple logic gates.
  • the clock gates used to control different registers can be different, and the bit combinations of different clock gates used to turn off the corresponding registers can also be different.
  • one or more clock gates may control one register, and one clock gate may control one or more registers. It can be understood that the manner and combination of clock gate control registers may be different, and this disclosure does not limit this.
  • the clock gates in the combinational logic 42 may be the same as, different from, or partially the same as the calculation logic gates in the combinational logic 42, which is not limited by this disclosure. Additionally, although both clock gates and computational logic gates are shown here as part of combinational logic 42, this is for illustration only and does not limit the scope of the present disclosure. In other embodiments, clock gates and computational logic gates may belong to different combinational logic circuits.
  • FIG. 5 shows a schematic flow diagram of a method 500 for generating test vectors in accordance with some embodiments of the present disclosure. It will be appreciated that various aspects described above with respect to FIGS. 1-4 may be selectively applicable to the method 500.
  • an electronic device such as a computer, optionally determines clock gate distribution and clock control for controlling a plurality of scan chains based on netlist data representing the circuit under test and a set of sample test vectors for the circuit under test. A collection of bits.
  • the clock gate distribution represents a correspondence between multiple clock gates and registers in multiple scan chains that they respectively control.
  • the clock gate is configured to close the clock gate based on the clock control bits in the received clock control bit set. corresponding register.
  • an AND gate which is a clock gate, receives the logic value "0" on one input and the system clock pulse on the other input. In this case, the logic value "0" is the clock control bit in a clock control bit set.
  • the pre-analysis stage a small amount of ATPG and simulation can be performed on the original circuit under test.
  • the scan chain distribution and register distribution used in the circuit under test can be obtained.
  • the clock gate distribution can be obtained. The clock gate distribution can be used to close the clock gate in the subsequent test vector generation for faults, thereby more accurately calculating the possible logic value flip rate of the scan chain.
  • method 500 further includes performing simulations using the netlist data and the set of sample test vectors to determine logic value shifts for each of the plurality of scan chains for the low power circuit of the circuit under test. At least one of a toggle rate in the process and a logic value toggle rate in a logic value capture stage for each register in the plurality of scan chains.
  • Figure 6 shows a schematic flowchart of a method 600 of determining a low-power circuit in accordance with some embodiments of the present disclosure.
  • the low-power consumption circuit may be, for example, at least one of the low-power decoder 214B and the mask decoder 215B in FIG. 2 .
  • one or more alternative switch distributions may be determined based on characteristics of the circuit under test 211. It can be understood that for specific requirements, there may be various distributions of two-dimensional switch matrix circuits.
  • determining the candidate switch distribution includes determining the number of rows and the number of columns of the two-dimensional switch matrix circuit. Determining the candidate switch distribution also includes determining a distribution of the plurality of switches coupled to the scan chain at nodes in the two-dimensional switch matrix circuit.
  • the initial sparsity can be obtained based on the characteristics of the circuit under test 11 . Using the initial sparsity, the number of rows and columns of the switch distribution can be calculated.
  • Sparsity can be defined as Where m and n are the number of rows and columns in the two-dimensional switch matrix circuit, and N is the number of scan chains of the circuit 11 under test.
  • the initial sparsity may be determined based on a coding success rate estimation model. You can refer to formulas (1)-(3) to use the binary search algorithm to determine the initial sparsity.
  • N represents the total number of scan chains
  • s represents sparsity
  • P represents the encoding success rate
  • k represents a test package that uses k scan chains
  • d k represents the number of test packages that use k scan chains in the test package set collected by ATPG statistics.
  • Proportion ⁇ represents the maximum proportion of the scan chain opened after encoding and decoding that the user expects, ⁇ can also be called the low power consumption threshold.
  • f s (m 1 , n 1 , k) represents the number of combinations of k scan chains that are successfully encoded within an m 1 ⁇ n 1 submatrix of the switch distribution when the sparsity is s.
  • m1 and n1 indicate that k open scan chains may be distributed in the m1 row and n1 column of the sparse two-dimensional switch matrix circuit.
  • u and v represent that k open scan chains may be distributed in the u row and v column in the m1 row and n1 column in the sparse two-dimensional switch matrix circuit.
  • S s ( ⁇ ) represents the success rate of successfully encoding k scan chains when the sparsity is s and given ⁇ .
  • the weighted sum of the success rate S s ( ⁇ ) and d k represents the coding success rate P s ( ⁇ ) of the switch distribution determined by the current sparsity s on the test packet set of ATPG statistics.
  • the sparsity s can be used as the initial sparsity s 0 .
  • the greater the sparsity the higher the hardware cost.
  • the maximum encoding success rate P max can be adjustable, for example, P max can be set to 99%.
  • the maximum sparsity s max is also adjustable, for example s max can be set to 100%.
  • the maximum sparsity s max can be related to a switch power limit, which represents the ratio of the actual number of flips to the maximum number of flips in the registers on the scan chain when the input is shifted.
  • the number of rows m and the number of columns n in the two-dimensional switch matrix circuit can be determined with reference to formulas (4)-(5).
  • one or more alternative switch distributions may be determined at uniform granularity using a random strategy or a deterministic strategy.
  • Uniform granularity means that any two rows of m number have the smallest difference in the number of switches and any two columns of n number have the smallest difference in the number of switches.
  • the distribution of switches coupled to N scan chains at the nodes can be determined.
  • Switch distribution can be random or arranged according to deterministic rules. For details on stochastic and deterministic strategies, see PCT/CN2021/109508, the entire text of which is incorporated herein by reference.
  • one or more encoding success rates corresponding to the one or more candidate switch distributions can be obtained. For example, one or more encoding success rates for one or more alternative switch distributions can be verified on a test set. After the distribution of multiple switches in the two-dimensional switch matrix circuit is determined, the encoding success rate can be calculated for each determined candidate switch distribution.
  • the electronic device may determine the test set based on the test packet set collected by ATPG statistics. In some embodiments, for the low-power decoder 214B, the test set may be a set of test packets determined through fault sampling and ATPG, and the test set may only save the identification of the scan chain.
  • the test set may include an observation test set and a mask test set.
  • the observation test set includes the identification of the scan chain where the value of the logic gate to be observed is located, and the value of the logic gate to be observed is the value of the logic gate corresponding to the test package.
  • Mask test set package Includes the identification of the scan chain in which the X-state is located that prevents the value of the logic gate to be observed from being observed. By validating one or more alternative switch distributions on the test set, the corresponding encoding success rate can be obtained.
  • a switching distribution for the circuit under test 211 may be determined based at least on one or more encoding success rates.
  • the switch distribution may be determined based on encoding success rate.
  • the switch distribution can be determined based on both coding success rate and sparsity. For example, it can be determined whether the encoding success rate reaches the encoding success rate threshold.
  • the coding success rate threshold may be the maximum coding success rate P max . If the encoding success rate threshold is reached, the current switch distribution may be determined as the switch distribution for the circuit under test 211 .
  • one or more coding success rates may be compared to a coding success rate threshold to determine a first set of alternative switch distributions.
  • Each candidate switch distribution in the first set of candidate switch distributions has a coding success rate that is higher than a coding success rate threshold. Further, the candidate switch distribution with the smallest sparsity in the first candidate switch distribution set may be determined as the switch distribution for the circuit under test 211 .
  • the current switch distribution may be determined as the switch distribution for the circuit under test 211 .
  • the sparsity may be increased. Based on the increased sparsity, a new one or more candidate switch distributions may be determined and steps 604 and 606 repeated to determine the switch distribution for the circuit under test 211 .
  • the method 600 described above may use a random strategy and a deterministic strategy respectively to determine the corresponding switch distribution.
  • a random strategy can be used to determine the first switch distribution that satisfies the threshold condition.
  • a deterministic strategy can also be used to determine the second switch distribution that satisfies the threshold condition.
  • At least one of coding success rate and sparsity of the first switch distribution and the second switch distribution may be further compared to determine the final switch distribution. For example, if the difference between the coding success rates of the first switch distribution and the second switch distribution on the test set is greater than the threshold ⁇ , then the switch distribution with a higher coding success rate is selected as the final switch distribution. On the contrary, if the difference in coding success rate is less than the threshold ⁇ , the switch distribution with smaller sparsity, that is, using fewer coding bits, is selected as the final switch distribution.
  • one or more alternative switch distributions may be determined at uniform granularity using a random strategy or a deterministic strategy.
  • N switches coupled with N scan chains can be placed at multiple nodes in a two-dimensional switch matrix circuit using a random strategy or a deterministic strategy.
  • the plurality of nodes may be some of the nodes in the rows and columns of the two-dimensional switch matrix circuit.
  • Multiple nodes to be switched in the two-dimensional switch matrix circuit may be determined with uniform granularity using a random strategy or a deterministic strategy based on the number of rows m and the number of columns n.
  • a plurality of switches may be placed at a plurality of nodes in a random manner to determine one or more alternative switch distributions.
  • each switch coupled to a corresponding scan chain may be randomly arranged at one of the plurality of nodes.
  • multiple switches may also be positioned at multiple nodes in a deterministic manner to determine one or more alternative switch distributions.
  • each switch coupled to a corresponding scan chain may be arranged at one of the plurality of nodes according to a rule.
  • rules can be related to frequency of use and dependency of use of scan chains.
  • the rules can be related to the X-state distribution of the scan chain.
  • multiple switches may be arranged at multiple nodes in a spiral manner from the center to the periphery according to the usage frequency of the corresponding scan chain to determine one or more alternative switch distributions.
  • a switch corresponding to the scan chain with the highest usage frequency among the plurality of scan chains is set at a central node among the plurality of nodes.
  • the activation probability of the scan chain can be determined based on the test packet set, and the scan chains are spirally arranged from the center to the periphery according to the activation probability from high to low.
  • the scan chains that do not contain X states can be arranged at the periphery, and then the scan chains are spirally wound from the center to the periphery according to the frequency of the X states in the scan chain from high to low. Row.
  • switches coupled to scan chains that do not contain X states are distributed on the periphery of the two-dimensional switch matrix circuit, and switches coupled to scan chains with the highest frequency of The nodes are distributed at the center of the two-dimensional switch matrix circuit.
  • a plurality of switches may be arranged at a plurality of nodes in a spiral manner from the center to the periphery according to the usage correlation of the corresponding scan chain to determine one or more alternative switch distributions.
  • the usage correlation of the scan chains corresponding to two switches among the plurality of switches that are adjacent in the first direction or the second direction is greater than the usage correlation of the other two switches among the plurality of switches that are not adjacent in the first direction or the second direction.
  • the usage dependency of the corresponding scan chain can refer to the probability that each scan chain is used simultaneously with other scan chains.
  • the shift flip rate of the scan chain and the capture flip rate of the register obtained through analysis can be used to constrain the shift power consumption and capture power consumption of the scan chain in subsequent stages.
  • the shift toggle rate of the scan chain and the capture toggle rate of the register can also be used to determine the clock gate distribution.
  • the electronic device may optionally add control bits in the test packet for the fault based on the scan chain distribution and the register distribution.
  • the electronic device may generate a first initialization vector packet for the first test fault and determine a first set of test bits corresponding to the first test fault. For example, for a certain fault, the initial vector package includes a first logical value sequence "1xxxx01xxx" and a second logical value sequence "xxx11xxxxx". Since some bits need to present specific logic values, the electronic device can determine the clock set to be turned off based on the first test bit set. For example, the electronic device may use the clock gate distribution and clock control bit set obtained in 502.
  • the register controlled by the clock gate retains that value (because there is no clock stimulus to enable the register).
  • the electronic device may then adjust the first initial vector packet to generate the first test packet based on the set of clocks to be turned off. That is, the electronic device may set the logic value of the clock gate in the first initialization vector packet for turning off the clock. It can be understood that for different faults, the initial vector package can be generated in a similar manner and then the corresponding test package can be generated, which will not be described again here.
  • an electronic device such as a computer may perform a test vector compaction operation on the plurality of test packages to generate corresponding intermediate test vectors. It can be understood that different test packages can be generated for different faults. For example, for 100 faults, 100 test packages can be generated, each test package including a combination of test vectors for different scan chains.
  • the first test package may be for the test vector combination of scan chain 211-1 and scan chain 211-3.
  • the test vector combination may include, for example, a first test vector "10xxxxxx011xxxxxxx” for the scan chain 211-1 and a second test vector "xxxxx1xxxxxxxxxxxx” for the scan chain 211-3, where x represents an unknown state, that is, the logical value is uncertain state.
  • test vector compaction includes at least one of test packet merging and dynamic compaction.
  • one test packet may be represented as 1xxx1xx0 and another test packet may be represented as 1x1xxxx0. After considering logical value compatibility, the two test packages can be merged into 1x1x1xx0. In this way, the number of test packages can be reduced. It can be understood that although compatibility is taken as an example to illustrate the merging of test packages, this is only illustrative and does not limit the scope of the present disclosure. Other test package merging schemes can be used.
  • some test packets may include many "x" bits.
  • a dynamic compaction operation can be performed on the test packet, that is, some bits of "x" are filled with bit values for merging of test vectors.
  • the electronic device may perform a power consumption check on the test vector compacted intermediate test packet.
  • a power consumption check may be performed on the merged test packets.
  • a power consumption check is performed on the dynamically compressed test packet. Only when the compressed test vector is within the set threshold range, this test vector compression will be accepted, otherwise the test vector compression operation will be cancelled. That is, merging or dynamic compaction are not accepted.
  • power consumption can be determined by calculating the toggle rate of a scan chain's registers, since the number of flips is essentially proportional to the test power consumption.
  • shift power consumption there are two types of power consumption: shift power consumption and capture power consumption.
  • the calculation of the flip rate fs for shift power consumption follows the following calculation rules:
  • n represents the number of scan chains contained in the entire circuit 211 under test
  • p represents the shift flip rate of each opened scan chain
  • p is calculated through simulation results in the pre-analysis stage of the circuit. For different For the circuit under test, p is determined by the characteristics of the circuit itself.
  • clock gates are closed according to the number of clock gate control registers.
  • the clock gates with more control registers will be given priority for closing. In other words, you can try to turn off the clock in sequence according to the number of clock gate control registers and detect the effect after turning it off. For example, after each clock gate is closed, the logic value flip rate in the current circuit under test is recalculated based on the updated test vector, and the calculation process traverses each clock gate.
  • the rules are as follows: (1) If the clock gate is closed, the logic value of the register controlled by the clock gate cannot be flipped, then the number of such registers is recorded as n1; (2) If the clock gate is opened, the logic value of the register controlled by the clock gate cannot be reversed.
  • the logic value of the register may be flipped, then the number of such registers is recorded as n2; (3) If the clock gate does not define the open or closed state, the logic value of the register controlled by the clock gate may be flipped, then the number of such registers is recorded as n2 The number is n3.
  • the capture flip rate fc of the entire circuit under test 211 is calculated as follows, where ⁇ represents the logic value flip rate of the register capture stage calculated during the circuit analysis stage:
  • the electronic device may adjust the test package based on the results of the power consumption check.
  • the electronic device in response to the test power consumption being higher than the first threshold power consumption, the electronic device adjusts the first intermediate test vector package based on at least a control clock set of multiple scan chains of the circuit under test 211 to generate a second Intermediate test vector package.
  • the test power consumption includes, for example, at least one of the shift toggle rate fs and the capture toggle rate fc
  • the first threshold power consumption may be, for example, the reference toggle rate.
  • the test power consumption is represented by the flip rate here, this is only for illustration and does not limit the scope of the present disclosure. Other attributes or parameters can be used to characterize test power consumption.
  • the control clock set includes, for example, a bit set for the clock of the CK end of each register, which may be used to turn off the corresponding clock, for example.
  • the clock gate distribution and the clock control bit set can be obtained. Further, the corresponding clock can be turned off based on the clock gate distribution and the clock control bit set.
  • the electronic device may merge the first test vector packet and the second test vector packet to generate a merged test vector packet; determine the shift power consumption corresponding to the merged test vector packet; In response to the shift power consumption not being higher than the second threshold power consumption, a dynamic compaction operation is performed on the merged test vector packet to generate a first intermediate test vector packet.
  • the electronic device may adjust the merged test packet to avoid the test.
  • Vector compaction is not accepted and test packets for a certain fault are dropped.
  • the electronic device may adjust the merged test package using a greedy algorithm, as described below with reference to Figures 7 and 8.
  • Figure 7 shows a schematic flow diagram of a method for generating test vectors according to some embodiments of the present disclosure.
  • the method 700 of FIG. 7 can be combined with the method 600 of FIG. 6 , so various aspects described with respect to the method 600 can be selectively applied to the method 700 , and the present disclosure will not be repeated here.
  • the electronic device can determine a list of target faults.
  • the target fault list may be input by the designer or come from other devices, and includes faults that need to be tested for the circuit under test 211 in the simulation.
  • the electronic device determines whether test packages for all faults in the target fault list have been generated.
  • control bits may also be added to the test packet, such as the control bits described in 504 of FIG. 5 .
  • the electronic device can determine whether the test packet pool is full. It is understandable that test packages of test vectors usually contain more data, and the test package pool will continue to grow as test packages are added. By determining whether the test packet pool is full, it can be ensured that subsequent operations can be performed correctly without placing a greater operating burden on the electronic device. In other embodiments, if the performance of the electronic device such as a computer is strong enough or the number of faults in the target fault list is small, step 706 may be omitted.
  • the electronic device may perform test packet merging and calculate the power consumption of the merged test packets.
  • the electronic device may combine the first test packet and the second test packet, and calculate the combined shift power consumption and capture power consumption. If the shift power consumption is higher than the shift threshold power consumption, the first test packet and the second test packet are refused to be merged, and an unmerged third test packet is selected to be merged with the first test packet. If the shift power consumption is not higher than the shift threshold power consumption, a determination of capture power consumption is made. Merging is acceptable if the capture power consumption is not higher than the capture threshold power consumption. If the capture power consumption is higher than the threshold power consumption, test vector adjustments can be made to the merged test package.
  • the first clock bit set in the first intermediate test vector packet is adjusted, and the adjusted first clock bit set is used in the shutdown control clock set a first clock, a set of control clocks for controlling registers in a plurality of scan chains, the first clock being a clock in the set of control clocks that controls the most registers; and in response to the capture function corresponding to the adjusted first intermediate test vector packet If the power consumption is not higher than the first threshold power consumption, the adjusted first intermediate test vector packet is determined as the second intermediate test vector packet.
  • Some clocks can be turned off by adjusting the clock bits in the intermediate test vector packets. Because the clock is turned off, registers in the scan chain that are configured to receive this clock cannot change their logic values. Correspondingly, the number of flipped logic values of registers in the scan chain can be reduced, thereby reducing capture power consumption.
  • the second test packet may be rejected and the third test packet may be used to merge with the first test packet.
  • the merging, power consumption judgment and comparison of the third test package and the first test package are similar to the situations described above for the first test package and the second test package, and will not be described again here. It can be understood that all test packages in the test package pool can be merged sequentially using a greedy algorithm until all test packages have been merged or are refused to be merged.
  • the electronic device can perform the dynamic compression operation as described above on the test package, such as the merged test package, and calculate the shift power consumption of the dynamically compressed test package and capture whether the power consumption satisfies Corresponding power consumption requirements. Dynamic compression is only accepted if power requirements are met. Further, when the capture power consumption does not meet the requirements, some clock gates can be similarly closed for adjustment, thereby reducing the capture power consumption.
  • test vector compaction is described above in the order of executing 708 first and then executing 710, it can be understood that this is only illustrative and does not limit the scope of the present disclosure. In some embodiments, only either 708 or 710 may be present. In other embodiments, step 710 may be performed first and then step 708, and this disclosure does not limit this.
  • the electronic device may perform simulation, analyze the test vector compacted set of test packets, and discard failed test vector packets.
  • Figure 8 illustrates a schematic flow diagram of a method 800 for determining test power consumption in accordance with some embodiments of the present disclosure.
  • the method 800 of FIG. 8 can be combined with the method 600 of FIG. 6 and/or the method 700 of FIG. 7 , so various aspects described with respect to the method 600 or 700 can be selectively applied to the method 800, and the present disclosure will not be repeated here.
  • test power consumption is essentially proportional to the toggle rate of the logic values of the memory in the scan chain.
  • the electronic device may first calculate the shift flip rate for the scan chain of the test packet, as shown in equation (6) above.
  • the first clock set can be turned off appropriately to further reduce the capture power consumption.
  • the electronic device can calculate the shift toggle rate after turning off the first clock set. It can be understood that since the first clock set needs to be turned off, some registers in the multiple scan chains need to be assigned some logical values to turn off the first clock set. In this case, the test vectors in the test packet may change, which results in a change in the shift flip rate during the shift process. Therefore, by calculating the shift flip rate after turning off the first clock set, it is possible to avoid the occurrence of a situation where the shift power consumption exceeds the threshold.
  • FIG. 9 shows a schematic block diagram of an electronic device 900 in accordance with some embodiments of the present disclosure.
  • the electronic device 900 may include a plurality of modules for performing corresponding steps in the methods discussed in FIGS. 5-8 .
  • the electronic device 900 includes a generation unit 902 , a test power consumption determination unit 904 , an adjustment unit 906 and a target test vector packet determination unit 908 .
  • the generation unit 902 is configured to perform a test vector packet compaction operation on the first test vector packet and the second test vector packet to generate a first intermediate test vector packet, and the first test vector packet and the second test vector packet are used for the circuit under test. carry out testing.
  • the test power consumption determining unit 904 is configured to determine the test power consumption corresponding to the first intermediate test vector packet.
  • the adjustment unit 906 is configured to adjust the first intermediate test vector package based on at least the control clock set of the plurality of scan chains of the circuit under test in response to the test power consumption being higher than the first threshold power consumption to generate a second intermediate test vector.
  • Package,Control Clock Set is used to control multiple registers in,multiple scan chains.
  • the target test vector packet determination unit 908 is configured to determine the target test vector packet based on the second intermediate test vector packet in response to the adjusted second intermediate test vector packet not being higher than the first threshold power consumption.
  • test vector package utilization By detecting the test power consumption of the compressed intermediate test vector package during the test vector generation process, especially during the test vector package compression operation stage, and adjusting the test vector package whose test power consumption is higher than the threshold, it can be significantly improved. Test vector package utilization. The test vector package is generated for each fault, so the test circuit can be detected for more faults when more test vectors are used instead of discarded.
  • the generating unit 902 is further configured to: merge the first test vector packet and the second test vector packet to generate a merged test vector packet; determine the shift power consumption corresponding to the merged test vector packet; respond When the shift power consumption is not higher than the second threshold power consumption, a dynamic compression operation is performed on the combined test vector packet to generate a first intermediate test vector packet.
  • the generating unit 902 is further configured to: merge the first test vector packet and the second test vector packet to generate a merged test vector packet; determine the shift power consumption corresponding to the merged test vector packet; respond When the shift power consumption is not higher than the second threshold power consumption, a dynamic compression operation is performed on the combined test vector packet to generate a first intermediate test vector packet.
  • the test power consumption determination unit 904 is further configured to: determine capture toggle rates for the plurality of scan chains corresponding to the first intermediate test vector packet; and the adjustment unit 906 is further configured to include: in response to the capture toggle If the rate is higher than the capture threshold flip rate, the first intermediate test vector packet is adjusted based on at least a control clock set of the plurality of scan chains of the circuit under test to generate a second intermediate test vector packet. By detecting the capture toggle rate, the test power consumption can be determined in a simple way.
  • the generation unit 902 is further configured to: determine shift flip rates of the plurality of scan chains corresponding to the merged test vector packet; and in response to the shift flip rate being not higher than the shift threshold flip rate, the merge The test vector package performs a dynamic compaction operation to generate a first intermediate test vector package. By detecting the shift toggle rate, the test power consumption can be determined in a simple way.
  • the adjustment unit 906 is further configured to: in response to the test power consumption being higher than the first threshold power consumption, adjust the first clock bit set in the first intermediate test vector packet, and the adjusted first a set of clock bits for turning off a first clock in a set of control clocks, the set of control clocks being used to control registers in multiple scan chains, the first clock being a clock that controls the most registers in the set of control clocks; and in response to the adjusted The capture power consumption corresponding to the first intermediate test vector packet is not higher than the first threshold power consumption, and the adjusted first intermediate test vector packet is determined as the second intermediate test vector packet.
  • Some clocks can be turned off by adjusting the clock bits in the intermediate test vector packets. Because the clock is turned off, registers in the scan chain that are configured to receive this clock cannot change their logic values. Correspondingly, the number of flipped logic values of registers in the scan chain can be reduced, thereby reducing capture power consumption.
  • the generating unit 902 is further configured to: generate a first initial vector packet for the first test fault; determine a first test bit set corresponding to the first test fault; determine based on the first test bit set, a set of clocks to be turned off; and based on the set of clocks to be turned off, adjusting the first initial vector package to generate a first test vector package.
  • the assignment combination corresponding to the clock gate can be used to close the clock gate. In this way, it can be clearly known in the subsequent simulation process that the corresponding clock gate is in a closed state, so that the possible logic value flip rate of the scan chain can be calculated more accurately.
  • the electronic device 900 further includes: a distribution determination unit configured to determine, based on the netlist data used to represent the circuit under test and the sample test vector set for the circuit under test, for controlling the plurality of scan chains.
  • Clock gate distribution and clock control bit set Clock gate distribution represents the correspondence between multiple clock gates and registers in multiple scan chains that they control respectively.
  • the clock gate is configured to be based on the received clock control bit set.
  • the clock control bit is used to close the register corresponding to the clock gate.
  • a small amount of ATPG and simulation can be performed on the original circuit under test.
  • the scan chain distribution and register distribution used in the circuit under test can be obtained.
  • the clock gate distribution can be obtained.
  • the clock gate distribution can be used to close the clock gate in the subsequent test vector generation for faults, thereby more accurately calculating the possible logic value flip rate of the scan chain.
  • the electronic device 900 is further configured to perform simulation using the netlist data and the sample test vector set to determine the logic value shift for each of the plurality of scan chains for the low power circuit of the circuit under test. At least one of: a toggle rate in a bit process and a logic value toggle rate in a logic value capture stage for each register in the plurality of scan chains.
  • the distribution determination unit is further configured to determine a scan chain distribution based on the netlist data and the sample test vector set, the scan chain distribution representing the scans used in the automatic vector test generation process among the plurality of scan chains. chain; based on netlist number According to the sample test vector set, the register distribution is determined.
  • the register distribution represents the registers used in the automatic vector test generation process among the multiple registers in multiple scan chains; and based on the scan chain distribution and register distribution, the clock gate is determined Collection of distribution and clock control bits.
  • a low-power control circuit can be generated that can have improved encoding capabilities and use fewer encoding bits.
  • the shift flip rate of the scan chain and the capture flip rate of the register obtained through analysis can be used to constrain the shift power consumption and capture power consumption of the scan chain in subsequent stages.
  • the shift toggle rate of the scan chain and the capture toggle rate of the register can also be used to determine the clock gate distribution.
  • FIG 10 shows a schematic block diagram of an example device 1000 that may be used to implement embodiments of the present disclosure.
  • device 1000 includes a computing unit 1001 that may be loaded into RAM 1003 and/or from storage unit 1008 in accordance with computer program instructions stored in random access memory (RAM) and/or read only memory (ROM) 1002 Computer program instructions in ROM 1002 to perform various appropriate actions and processes.
  • RAM 1003 and/or ROM 1002 various programs and data required for operation of device 1000 may also be stored.
  • the computing unit 1001 and the RAM 1003 and/or ROM 1002 are connected to each other via a bus 1004.
  • An input/output (I/O) interface 1005 is also connected to bus 1004.
  • I/O interface 1005 Multiple components in the device 1000 are connected to the I/O interface 1005, including: input unit 1006, such as a keyboard, mouse, etc.; output unit 1007, such as various types of displays, speakers, etc.; storage unit 1008, such as a magnetic disk, optical disk, etc. ; and communication unit 1009, such as a network card, modem, wireless communication transceiver, etc.
  • the communication unit 1009 allows the device 1000 to exchange information/data with other devices through computer networks such as the Internet and/or various telecommunications networks.
  • Computing unit 1001 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processing processor (DSP), and any appropriate processor, controller, microcontroller, etc.
  • the computing unit 1001 performs various methods and processes described above, such as methods 500, 600, 700 or 800.
  • method 500, 600, 700, or 800 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 1008.
  • part or all of the computer program may be loaded and/or installed onto device 1000 via RAM and/or ROM and/or communication unit 1009 .
  • a computer program When a computer program is loaded into RAM and/or ROM and executed by computing unit 1001, one or more steps of method 300 described above may be performed.
  • computing unit 1001 may be configured to perform method 500, 600, 700 or 800 in any other suitable manner (eg, by means of firmware).
  • Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions specified in the flowcharts and/or block diagrams/ The operation is implemented.
  • the program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM portable compact disk read-only memory
  • magnetic storage device or any suitable combination of the above.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

The present disclosure relates to a method for generating a test pattern, and an electronic device and a storage medium. The method for generating a test pattern comprises: during a test pattern generation process, particularly in an operation phase of test pattern tightening, detecting the test power of a tightened intermediate test packet, and adjusting a test packet of which the test power is higher than a threshold value, such that the test packet can meet power requirements. In this way, a test pattern which would originally be discarded in a simulation phase can meet power requirements after being adjusted during a test pattern generation process, such that the utilization rate of a test packet can be significantly improved. Therefore, when more test patterns are used instead of being discarded, a test circuit can be tested for more faults, thereby improving the coverage rate of tests for various faults.

Description

用于生成测试向量的方法、电子设备和存储介质Methods, electronic devices and storage media for generating test vectors
本申请要求于2022年3月7日提交中国专利局、申请号为202210217081.5、发明名称为“用于生成测试向量的方法、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application submitted to the China Patent Office on March 7, 2022, with the application number 202210217081.5 and the invention name "Method, electronic device and storage medium for generating test vectors", and its entire content is approved This reference is incorporated into this application.
技术领域Technical field
本公开涉及电子领域,更具体而言涉及用于设计测试电路的方法和电子设备。The present disclosure relates to the field of electronics, and more particularly to methods and electronic devices for designing test circuits.
背景技术Background technique
在芯片的制造过程和封装过程中不可避免的会因为各种原因(如工艺、材料等)导致芯片存在缺陷,这种缺陷会导致芯片无法正常工作。芯片测试的主要任务就是挑选出有缺陷的芯片。因为这种有缺陷的芯片流入市场后带来的开销将远远大于芯片测试的开销,因此芯片测试是芯片制造过程中至关重要的一环。During the manufacturing and packaging processes of chips, it is inevitable that chips will have defects due to various reasons (such as process, materials, etc.). Such defects will cause the chips to fail to work properly. The main task of chip testing is to pick out defective chips. Because the cost of such defective chips entering the market will be far greater than the cost of chip testing, chip testing is a crucial part of the chip manufacturing process.
具体地,可以在芯片设计阶段向芯片中添加诸如扫描链(scan chain)之类的可测试性设计(design for testablility,DFT)结构,并且制造具有DFT结构的芯片。可以利用自动测试向量生成(automatic test pattern generation,ATPG)工具生成针对各种芯片故障的多个测试向量(test pattern),并利用自动测试设备(automatic test equipment,ATE)对待测芯片输入测试向量。通过比较被测芯片的回应与预期回应是否一致,可以在生产完成后立即进行质量检测。Specifically, a design for testability (DFT) structure such as a scan chain can be added to the chip during the chip design stage, and a chip with a DFT structure can be manufactured. You can use automatic test pattern generation (ATPG) tools to generate multiple test patterns (test patterns) for various chip faults, and use automatic test equipment (automatic test equipment, ATE) to input test vectors for the chip under test. By comparing the response of the chip under test to the expected response, quality inspection can be performed immediately after production is completed.
随着芯片设计的复杂度及规模的不断攀升,芯片功耗也随之急剧攀升。基于扫描链的现代芯片设计会使得芯片在测试时进入到功能模式下不会进入的状态,也因此带来的额外的功率消耗。例如,在测试时,扫描链中的寄存器的逻辑值的翻转产生测试过程中的功耗。过大的测试功耗会引起以下问题:(1)造成芯片中的功耗热点,从而对芯片造成击穿等损害;(2)过高的功耗会造成电迁移现象,从而极大影响芯片的可靠性;(3)造成芯片供电电压的降低,造成芯片良率的损失。根据芯片测试所处的不同阶段,测试功耗可分为以下两类:逻辑值在扫描链中被移位阶段的移位功耗(shift power)和逻辑值捕捉阶段的捕捉功耗(capture power)。移位功耗表示芯片在测试向量移入和测试响应移出的阶段中芯片本身的功耗。捕捉功耗是指在测试向量移入之后到测试响应移出之前,芯片进入到功能阶段时所产生的功耗。在一些常规方案中,仅在最终的测试向量生成之后验证所生成的测试向量的功耗是否满足低功耗要求,这会导致大量的不符合测试功耗要求的测试向量,从而影响针对各种故障的测试覆盖率。As the complexity and scale of chip design continues to rise, chip power consumption also rises sharply. Modern chip designs based on scan chains will cause the chip to enter a state that it will not enter in functional mode during testing, thus causing additional power consumption. For example, during testing, the flipping of the logic values of registers in the scan chain generates power consumption during the test. Excessive test power consumption will cause the following problems: (1) causing power consumption hot spots in the chip, thereby causing breakdown and other damage to the chip; (2) excessive power consumption will cause electromigration, which will greatly affect the chip. reliability; (3) causing a reduction in the chip supply voltage, resulting in a loss of chip yield. According to the different stages of chip testing, test power consumption can be divided into the following two categories: shift power (shift power) in the stage when the logic value is shifted in the scan chain, and capture power (capture power) in the logic value capture stage. ). Shift power consumption represents the power consumption of the chip itself during the stages when the test vector is moved in and the test response is moved out. Capture power consumption refers to the power consumption generated when the chip enters the functional stage after the test vector is moved in and before the test response is moved out. In some conventional solutions, only after the final test vector is generated, it is verified whether the power consumption of the generated test vector meets the low power consumption requirements. This will lead to a large number of test vectors that do not meet the test power consumption requirements, thus affecting the performance of various test vectors. Test coverage for faults.
发明内容Contents of the invention
根据上述问题,本公开的实施例旨在提供一种生成测试向量的方法、电子设备、计算机可读存储介质和程序产品,用于生成针对待测电路的测试向量。Based on the above problems, embodiments of the present disclosure aim to provide a method, an electronic device, a computer-readable storage medium and a program product for generating test vectors for generating test vectors for a circuit under test.
根据本公开的第一方面,提供一种用于生成测试向量的方法。该方法包括对第一测试包和第二测试包执行测试向量紧缩操作,以生成第一中间测试包。第一测试包和第二测试包用于对待测电路进行测试。该方法还包括确定与第一中间测试包对应的测试功耗;以及响应于测试功耗高于第一阈值功耗,至少基于待测电路的多个扫描链的控制时钟集对第一中间测试 包进行调整,以生成第二中间测试包。控制时钟集用于控制多个扫描链中的多个寄存器。该方法还包括响应于经调整的第二中间测试包不高于第一阈值功耗,基于第二中间测试包,确定目标测试包。通过在测试向量生成的过程中,特别是在测试向量紧缩操作阶段,检测经紧缩的中间测试包的测试功耗,并且对测试功耗高于阈值的测试包进行调整,可以显著提高测试包的利用率。测试包是针对各个故障所生成的,因此在更多的测试向量被使用,而不是被舍弃的情形下,可以针对更多的故障对测试电路进行检测。According to a first aspect of the present disclosure, a method for generating test vectors is provided. The method includes performing a test vector compaction operation on the first test package and the second test package to generate a first intermediate test package. The first test package and the second test package are used to test the circuit under test. The method also includes determining a test power consumption corresponding to the first intermediate test package; and in response to the test power consumption being higher than the first threshold power consumption, at least testing the first intermediate test based on a set of control clocks of a plurality of scan chains of the circuit under test. The package is adjusted to generate a second intermediate test package. A control clock set is used to control multiple registers in multiple scan chains. The method also includes determining the target test packet based on the second intermediate test packet in response to the adjusted second intermediate test packet not being higher than the first threshold power consumption. By detecting the test power consumption of the compressed intermediate test packets during the test vector generation process, especially during the test vector compression operation phase, and adjusting the test packets whose test power consumption is higher than the threshold, the performance of the test packets can be significantly improved. Utilization. Test packages are generated for each fault, so the test circuit can be detected for more faults when more test vectors are used instead of discarded.
在第一方面的一种可能实现方式中,生成第一中间测试包包括:对第一测试包和第二测试包进行合并,以生成合并测试包;确定与合并测试包对应的移位功耗;响应于移位功耗不高于第二阈值功耗,对合并测试包执行动态紧缩操作以生成第一中间测试包。通过首先检测移位功耗并且在移位功耗满足要求的情形下才进行动态紧缩操作,可以排除不符合移位功耗要求的测试向量,从而节省了后续的计算时间,这是因为移位功耗通常难于通过调整测试包来使得其满足移位功耗要求。In a possible implementation of the first aspect, generating the first intermediate test package includes: merging the first test package and the second test package to generate a combined test package; determining the shift power consumption corresponding to the combined test package ; In response to the shift power consumption not being higher than the second threshold power consumption, perform a dynamic compaction operation on the merged test packet to generate a first intermediate test packet. By first detecting the shift power consumption and performing the dynamic compaction operation only when the shift power consumption meets the requirements, test vectors that do not meet the shift power consumption requirements can be eliminated, thereby saving subsequent calculation time. This is because the shift Power Consumption It is often difficult to adjust a test package to meet shift power requirements.
在第一方面的一种可能实现方式中,对合并测试包执行动态紧缩操作以生成第一中间测试包还包括:对被执行动态紧缩操作的合并测试包执行移位功耗检测,响应于对被执行动态紧缩操作的合并测试包不高于第一阈值功耗,将被行动态紧缩操作的合并测试包确定为第一中间测试向量。在执行动态紧缩的过程中,合并测试包中的一些测试向量中的未知态会被赋予确定的值,这可能会导致该合并测试包的移位功耗发生改变。通过再一次检测移位功耗,可以确保自动向量测试的安全性。In a possible implementation of the first aspect, performing a dynamic compression operation on the merged test package to generate the first intermediate test package further includes: performing a shift power consumption detection on the merged test package on which the dynamic compression operation is performed, in response to the If the power consumption of the merged test packet on which the dynamic compression operation is performed is not higher than the first threshold, the merged test packet on which the dynamic compression operation is performed is determined as the first intermediate test vector. During the process of performing dynamic compaction, unknown states in some test vectors in the merged test package will be assigned certain values, which may cause the shift power consumption of the merged test package to change. By once again detecting the shift power consumption, the safety of automatic vector testing can be ensured.
在第一方面的一种可能实现方式中,确定与第一中间测试包对应的测试功耗包括:确定与第一中间测试包对应的多个扫描链的捕捉翻转率;以及生成第二中间测试包括:响应于捕捉翻转率高于捕捉阈值翻转率,至少基于待测电路的多个扫描链的控制时钟集对第一中间测试包进行调整,以生成第二中间测试包。通过检测捕捉翻转率,可以以简易的方式确定测试功耗。In a possible implementation of the first aspect, determining the test power consumption corresponding to the first intermediate test package includes: determining capture flip rates of multiple scan chains corresponding to the first intermediate test package; and generating a second intermediate test Including: in response to the capture flip rate being higher than the capture threshold flip rate, adjusting the first intermediate test packet based on at least a control clock set of a plurality of scan chains of the circuit under test to generate a second intermediate test packet. By detecting the capture toggle rate, the test power consumption can be determined in a simple way.
在第一方面的一种可能实现方式中,确定与合并测试包对应的移位功耗包括:确定与合并测试包对应的多个扫描链的移位翻转率;以及生成第一中间测试包括:响应于移位翻转率不高于移位阈值翻转率,对合并测试包执行动态紧缩操作以生成第一中间测试包。通过检测移位翻转率,可以以简易的方式确定测试功耗。In a possible implementation of the first aspect, determining the shift power consumption corresponding to the merged test packet includes: determining shift flip rates of multiple scan chains corresponding to the merged test packet; and generating the first intermediate test includes: In response to the shift flip rate not being higher than the shift threshold flip rate, a dynamic compaction operation is performed on the merged test packet to generate a first intermediate test packet. By detecting the shift toggle rate, the test power consumption can be determined in a simple way.
在第一方面的一种可能实现方式中,生成第二中间测试包括:响应于测试功耗高于第一阈值功耗,对第一中间测试包中的第一时钟比特位集合进行调整,经调整的第一时钟比特位集合用于关闭控制时钟集合中的第一时钟,控制时钟集合用于控制多个扫描链中的寄存器,第一时钟是控制时钟集合中控制最多寄存器的时钟;以及响应于与经调整的第一中间测试包对应的捕捉功耗不高于第一阈值功耗,将经调整的第一中间测试包确定为第二中间测试包。通过调整中间测试包的时钟比特位,可以关闭一些时钟。由于时钟被关闭,扫描链中被配置为接收该时钟的寄存器因此无法改变其逻辑值。相应地,可以减少扫描链中的寄存器的逻辑值被翻转的数目,从而降低捕捉功耗。In a possible implementation of the first aspect, generating the second intermediate test includes: in response to the test power consumption being higher than the first threshold power consumption, adjusting the first clock bit set in the first intermediate test packet. The adjusted first clock bit set is used to turn off the first clock in the control clock set, which is used to control registers in multiple scan chains, and the first clock is the clock that controls the most registers in the control clock set; and respond When the captured power consumption corresponding to the adjusted first intermediate test packet is not higher than the first threshold power consumption, the adjusted first intermediate test packet is determined as the second intermediate test packet. Some clocks can be turned off by adjusting the clock bits of the intermediate test packets. Because the clock is turned off, registers in the scan chain that are configured to receive this clock cannot change their logic values. Correspondingly, the number of flipped logic values of registers in the scan chain can be reduced, thereby reducing capture power consumption.
在第一方面的一种可能实现方式中,该方法还包括:针对第一测试故障生成第一初始向量包;确定与第一测试故障对应的第一测试比特位集合;基于第一测试比特位集合,确定待关闭的时钟集合;以及基于待关闭的时钟集合,对第一初始向量包进行调整以生成第一测试包。在第一方面的一种可能实现方式中,该方法还包括:针对第二测试故障生成第二初始向量包;确定与第二测试故障对应的第二测试比特位集合;基于第二测试比特位集合,确定待关闭的第二时钟集合;以及基于待关闭的第二时钟集合,对第二初始向量包进行调整以生成 第二测试包。在针对故障的测试过程中,如果针对某个故障需要关闭一个时钟门,可以使用与该时钟门对应的赋值组合来进行该时钟门的关闭。通过这样的方式,可以在后续的仿真流程中清楚地知晓所对应的时钟门已经处于关闭状态,从而可以更加精确的计算扫描链的可能的逻辑值翻转率。In a possible implementation of the first aspect, the method further includes: generating a first initial vector packet for the first test fault; determining a first test bit set corresponding to the first test fault; based on the first test bit a set to determine a set of clocks to be turned off; and based on the set of clocks to be turned off, adjust the first initialization vector packet to generate a first test packet. In a possible implementation of the first aspect, the method further includes: generating a second initial vector packet for the second test fault; determining a second test bit set corresponding to the second test fault; based on the second test bit set, determine the second set of clocks to be turned off; and based on the second set of clocks to be turned off, adjust the second initialization vector packet to generate Second test package. During fault testing, if a clock gate needs to be closed for a certain fault, the assignment combination corresponding to the clock gate can be used to close the clock gate. In this way, it can be clearly known in the subsequent simulation process that the corresponding clock gate is in a closed state, so that the possible logic value flip rate of the scan chain can be calculated more accurately.
在第一方面的一种可能实现方式中,该方法还包括:基于用于表示待测电路的网表数据和针对待测电路的样本测试向量集,确定用于控制多个扫描链的时钟门分布和时钟控制比特位集合。时钟门分布表示多个时钟门与其分别控制的多个扫描链中的寄存器之间的对应关系,时钟门被配置为基于所接收的时钟控制比特位集合中的时钟控制比特位来关闭与时钟门对应的寄存器。在预分析阶段,可以对原始的待测电路进行少量的ATPG和仿真。在这个流程结束之后,可以获得待测电路中所使用到的扫描链分布和寄存器分布。通过对这些扫描链分布和寄存器分布的进一步分析,可以获得时钟门分布。时钟门分布可以在后续的针对故障的测试向量生成中,用于关闭时钟门,从而更加精确的计算扫描链的可能的逻辑值翻转率。In a possible implementation of the first aspect, the method further includes: determining clock gates for controlling multiple scan chains based on netlist data used to represent the circuit under test and a sample test vector set for the circuit under test Collection of distribution and clock control bits. The clock gate distribution represents a correspondence between multiple clock gates and registers in multiple scan chains that they respectively control. The clock gate is configured to close the clock gate based on the clock control bits in the received clock control bit set. corresponding register. In the pre-analysis stage, a small amount of ATPG and simulation can be performed on the original circuit under test. After this process is completed, the scan chain distribution and register distribution used in the circuit under test can be obtained. Through further analysis of these scan chain distributions and register distributions, the clock gate distribution can be obtained. The clock gate distribution can be used to close the clock gate in the subsequent test vector generation for faults, thereby more accurately calculating the possible logic value flip rate of the scan chain.
在第一方面的一种可能实现方式中,该方法还包括:使用网表数据和样本测试向量集进行仿真,以确定针对待测电路的低功耗电路、多个扫描链中每个扫描链的逻辑值移位过程中的翻转率和多个扫描链中的每个寄存器在逻辑值捕捉阶段中的逻辑值翻转率中的至少一项。在第一方面的一种可能实现方式中,确定用于控制多个扫描链的时钟门分布和时钟控制比特位集合包括:基于网表数据和样本测试向量集,确定扫描链分布,扫描链分布表示多个扫描链中的在自动向量测试生成过程中所使用到的扫描链;基于网表数据和样本测试向量集,确定寄存器分布,寄存器分布表示多个扫描链中的多个寄存器中的在自动向量测试生成过程中所使用到的寄存器;以及基于扫描链分布和寄存器分布,确定时钟门分布和时钟控制比特位集合。通过分析获得上述数据,可以生成低功耗控制电路,该低功耗控制电路可以具有改进的编码能力并且使用更少的编码位。此外,通过分析得到的扫描链的移位翻转率和寄存器的捕捉翻转率,可以用于在后续阶段对扫描链的移位功耗和捕捉功耗进行约束。此外,扫描链的移位翻转率和寄存器的捕捉翻转率还可以用于确定时钟门分布。In a possible implementation of the first aspect, the method further includes: performing simulation using the netlist data and the sample test vector set to determine, for the circuit under test, a low-power circuit, each scan chain of the plurality of scan chains at least one of a toggle rate during a logic value shift process and a logic value toggle rate in a logic value capture stage for each register in the plurality of scan chains. In a possible implementation of the first aspect, determining the clock gate distribution and clock control bit set used to control multiple scan chains includes: determining the scan chain distribution based on the netlist data and the sample test vector set, and the scan chain distribution Represents the scan chains used in the automatic vector test generation process in multiple scan chains; determines the register distribution based on the netlist data and sample test vector set, and the register distribution represents the number of registers in multiple scan chains. The registers used in the automatic vector test generation process; and based on the scan chain distribution and register distribution, determine the clock gate distribution and clock control bit set. By analyzing the above data, a low-power control circuit can be generated that can have improved encoding capabilities and use fewer encoding bits. In addition, the shift flip rate of the scan chain and the capture flip rate of the register obtained through analysis can be used to constrain the shift power consumption and capture power consumption of the scan chain in subsequent stages. In addition, the shift toggle rate of the scan chain and the capture toggle rate of the register can also be used to determine the clock gate distribution.
根据本公开的第二方面,提供一种计算机可读存储介质,存储多个程序,多个程序被配置为一个或多个处理器执行,多个程序包括用于执行根据第一方面的方法的指令。According to a second aspect of the present disclosure, there is provided a computer-readable storage medium storing a plurality of programs configured to be executed by one or more processors, the plurality of programs including a program for executing the method according to the first aspect. instruction.
根据本公开的第三方面,提供一种计算机程序产品,计算机程序产品包括多个程序,多个程序被配置为一个或多个处理器执行,多个程序包括用于执行根据第一方面的方法的指令。According to a third aspect of the present disclosure, a computer program product is provided. The computer program product includes a plurality of programs configured to be executed by one or more processors. The plurality of programs include a method for executing the method according to the first aspect. instructions.
根据本公开的第四方面,提供一种电子设备。电子设备包括:一个或多个处理器;包括计算机指令的存储器,计算机指令在由电子设备的一个或多个处理器执行时使得电子设备执行根据第一方面的方法。According to a fourth aspect of the present disclosure, an electronic device is provided. The electronic device includes: one or more processors; and a memory including computer instructions that when executed by the one or more processors of the electronic device cause the electronic device to perform the method according to the first aspect.
根据本公开的第五方面,提供一种电子设备。电子设备包括生成单元、测试功耗确定单元、调整单元和目标测试包确定单元。生成单元被配置为对第一测试包和第二测试包执行测试向量紧缩操作,以生成第一中间测试包,第一测试包和第二测试包用于对待测电路进行测试。测试功耗确定单元被配置为确定与第一中间测试包对应的测试功耗。调整单元被配置为响应于测试功耗高于第一阈值功耗,至少基于待测电路的多个扫描链的控制时钟集对第一中间测试包进行调整,以生成第二中间测试包,控制时钟集用于控制多个扫描链中的多个寄存器。目标测试包确定单元被配置为响应于经调整的第二中间测试包不高于第一阈值功耗,基于第二中间测试包,确定目标测试包。通过在测试向量生成的过程中,特别是在测试向量紧缩操作阶段,检测经紧缩的中间测试包的测试功耗,并且对测试功耗高于阈值的测试包进行调整,可以显著提高测试包的利用率。测试包是针对各个故障所生成的,因此在更多的测试 向量被使用,而不是被舍弃的情形下,可以针对更多的故障对测试电路进行检测。According to a fifth aspect of the present disclosure, an electronic device is provided. The electronic device includes a generation unit, a test power consumption determination unit, an adjustment unit and a target test package determination unit. The generating unit is configured to perform a test vector compaction operation on the first test package and the second test package to generate a first intermediate test package, and the first test package and the second test package are used for testing the circuit under test. The test power consumption determining unit is configured to determine the test power consumption corresponding to the first intermediate test package. The adjustment unit is configured to adjust the first intermediate test package based on at least a control clock set of a plurality of scan chains of the circuit under test in response to the test power consumption being higher than the first threshold power consumption to generate a second intermediate test package, control Clock sets are used to control multiple registers in multiple scan chains. The target test packet determining unit is configured to determine the target test packet based on the second intermediate test packet in response to the adjusted second intermediate test packet not being higher than the first threshold power consumption. By detecting the test power consumption of the compressed intermediate test packets during the test vector generation process, especially during the test vector compression operation phase, and adjusting the test packets whose test power consumption is higher than the threshold, the performance of the test packets can be significantly improved. Utilization. Test packages are generated for individual faults, so more tests With vectors used instead of discarded, the test circuit can be detected for more faults.
在第五方面的一种可能实现方式中,生成单元被进一步配置为:对第一测试包和第二测试包进行合并,以生成合并测试包;确定与合并测试包对应的移位功耗;响应于移位功耗不高于第二阈值功耗,对合并测试包执行动态紧缩操作以生成第一中间测试包。通过首先检测移位功耗并且在移位功耗满足要求的情形下才进行动态紧缩操作,可以排除不符合移位功耗要求的测试向量,从而节省了后续的计算时间,这是因为移位功耗通常难于通过调整测试包来使得其满足移位功耗要求。In a possible implementation of the fifth aspect, the generation unit is further configured to: merge the first test packet and the second test packet to generate a merged test packet; determine the shift power consumption corresponding to the merged test packet; In response to the shift power consumption not being higher than the second threshold power consumption, a dynamic compaction operation is performed on the merged test packet to generate a first intermediate test packet. By first detecting the shift power consumption and performing the dynamic compaction operation only when the shift power consumption meets the requirements, test vectors that do not meet the shift power consumption requirements can be eliminated, thereby saving subsequent calculation time. This is because the shift Power Consumption It is often difficult to adjust a test package to meet shift power requirements.
在第五方面的一种可能实现方式中,生成单元被进一步配置为:对第一测试包和第二测试包进行合并,以生成合并测试包;确定与合并测试包对应的移位功耗;响应于移位功耗不高于第二阈值功耗,对合并测试包执行动态紧缩操作以生成第一中间测试包。通过首先检测移位功耗并且在移位功耗满足要求的情形下才进行动态紧缩操作,可以排除不符合移位功耗要求的测试向量,从而节省了后续的计算时间,这是因为移位功耗通常难于通过调整测试包来使得其满足移位功耗要求。In a possible implementation of the fifth aspect, the generation unit is further configured to: merge the first test packet and the second test packet to generate a merged test packet; determine the shift power consumption corresponding to the merged test packet; In response to the shift power consumption not being higher than the second threshold power consumption, a dynamic compaction operation is performed on the merged test packet to generate a first intermediate test packet. By first detecting the shift power consumption and performing the dynamic compaction operation only when the shift power consumption meets the requirements, test vectors that do not meet the shift power consumption requirements can be eliminated, thereby saving subsequent calculation time. This is because the shift Power Consumption It is often difficult to adjust a test package to meet shift power requirements.
在第五方面的一种可能实现方式中,测试功耗确定单元被进一步配置为:确定与第一中间测试包对应的多个扫描链的捕捉翻转率;以及调整单元被进一步配置为包括:响应于捕捉翻转率高于捕捉阈值翻转率,至少基于待测电路的多个扫描链的控制时钟集对第一中间测试包进行调整,以生成第二中间测试包。通过检测捕捉翻转率,可以以简易的方式确定测试功耗。In a possible implementation of the fifth aspect, the test power consumption determination unit is further configured to: determine capture flip rates of the plurality of scan chains corresponding to the first intermediate test packet; and the adjustment unit is further configured to include: responding When the capture flip rate is higher than the capture threshold flip rate, the first intermediate test packet is adjusted based on at least control clock sets of multiple scan chains of the circuit under test to generate a second intermediate test packet. By detecting the capture toggle rate, the test power consumption can be determined in a simple way.
在第五方面的一种可能实现方式中,生成单元被进一步配置为:确定与合并测试包对应的多个扫描链的移位翻转率;以及响应于移位翻转率不高于移位阈值翻转率,对合并测试包执行动态紧缩操作以生成第一中间测试包。通过检测移位翻转率,可以以简易的方式确定测试功耗。In a possible implementation of the fifth aspect, the generation unit is further configured to: determine shift flip rates of the plurality of scan chains corresponding to the merged test packet; and flip in response to the shift flip rate not being higher than the shift threshold rate, perform a dynamic compaction operation on the merged test package to generate the first intermediate test package. By detecting the shift toggle rate, the test power consumption can be determined in a simple way.
在第五方面的一种可能实现方式中,调整单元被进一步配置为:响应于测试功耗高于第一阈值功耗,对第一中间测试包中的第一时钟比特位集合进行调整,经调整的第一时钟比特位集合用于关闭控制时钟集合中的第一时钟,控制时钟集合用于控制多个扫描链中的寄存器,第一时钟是控制时钟集合中控制最多寄存器的时钟;以及响应于与经调整的第一中间测试包对应的捕捉功耗不高于第一阈值功耗,将经调整的第一中间测试包确定为第二中间测试包。通过调整中间测试包的时钟比特位,可以关闭一些时钟。由于时钟被关闭,扫描链中被配置为接收该时钟的寄存器因此无法改变其逻辑值。相应地,可以减少扫描链中的寄存器的逻辑值被翻转的数目,从而降低捕捉功耗。In a possible implementation of the fifth aspect, the adjustment unit is further configured to: in response to the test power consumption being higher than the first threshold power consumption, adjust the first clock bit set in the first intermediate test packet. The adjusted first clock bit set is used to turn off the first clock in the control clock set, which is used to control registers in multiple scan chains, and the first clock is the clock that controls the most registers in the control clock set; and respond When the captured power consumption corresponding to the adjusted first intermediate test packet is not higher than the first threshold power consumption, the adjusted first intermediate test packet is determined as the second intermediate test packet. Some clocks can be turned off by adjusting the clock bits of the intermediate test packets. Because the clock is turned off, registers in the scan chain that are configured to receive this clock cannot change their logic values. Correspondingly, the number of flipped logic values of registers in the scan chain can be reduced, thereby reducing capture power consumption.
在第五方面的一种可能实现方式中,生成单元被进一步配置为:针对第一测试故障生成第一初始向量包;确定与第一测试故障对应的第一测试比特位集合;基于第一测试比特位集合,确定待关闭的时钟集合;以及基于待关闭的时钟集合,对第一初始向量包进行调整以生成第一测试包。在针对故障的测试过程中,如果针对某个故障需要关闭一个时钟门,可以使用与该时钟门对应的赋值组合来进行该时钟门的关闭。通过这样的方式,可以在后续的仿真流程中清楚地知晓所对应的时钟门已经处于关闭状态,从而可以更加精确的计算扫描链的可能的逻辑值翻转率。In a possible implementation of the fifth aspect, the generation unit is further configured to: generate a first initial vector packet for the first test fault; determine a first test bit set corresponding to the first test fault; based on the first test a set of bits to determine a set of clocks to be turned off; and based on the set of clocks to be turned off, adjust the first initialization vector packet to generate a first test packet. During fault testing, if a clock gate needs to be closed for a certain fault, the assignment combination corresponding to the clock gate can be used to close the clock gate. In this way, it can be clearly known in the subsequent simulation process that the corresponding clock gate is in a closed state, so that the possible logic value flip rate of the scan chain can be calculated more accurately.
在第五方面的一种可能实现方式中,电子设备还包括:分布确定单元,被配置为基于用于表示待测电路的网表数据和针对待测电路的样本测试向量集,确定用于控制多个扫描链的时钟门分布和时钟控制比特位集合,时钟门分布表示多个时钟门与其分别控制的多个扫描链中的寄存器之间的对应关系,时钟门被配置为基于所接收的时钟控制比特位集合中的时钟控 制比特位来关闭与时钟门对应的寄存器。在预分析阶段,可以对原始的待测电路进行少量的ATPG和仿真。在这个流程结束之后,可以获得待测电路中所使用到的扫描链分布和寄存器分布。通过对这些扫描链分布和寄存器分布的进一步分析,可以获得时钟门分布。时钟门分布可以在后续的针对故障的测试向量生成中,用于关闭时钟门,从而更加精确的计算扫描链的可能的逻辑值翻转率。In a possible implementation of the fifth aspect, the electronic device further includes: a distribution determination unit configured to determine, based on the netlist data used to represent the circuit under test and the sample test vector set for the circuit under test, the distribution determination unit for controlling the circuit under test. Clock gate distribution and clock control bit set of multiple scan chains. The clock gate distribution represents the correspondence between multiple clock gates and the registers in the multiple scan chains they control respectively. The clock gate is configured to be based on the received clock. Clock control in a set of control bits Control bits to turn off the register corresponding to the clock gate. In the pre-analysis stage, a small amount of ATPG and simulation can be performed on the original circuit under test. After this process is completed, the scan chain distribution and register distribution used in the circuit under test can be obtained. Through further analysis of these scan chain distributions and register distributions, the clock gate distribution can be obtained. The clock gate distribution can be used to close the clock gate in the subsequent test vector generation for faults, thereby more accurately calculating the possible logic value flip rate of the scan chain.
在第五方面的一种可能实现方式中,电子设备还被配置为使用网表数据和样本测试向量集进行仿真,以确定针对待测电路的低功耗电路、多个扫描链中每个扫描链的逻辑值移位过程中的翻转率和多个扫描链中的每个寄存器在逻辑值捕捉阶段中的逻辑值翻转率中的至少一项。在第五方面的一种可能实现方式中,分布确定单元被进一步配置为基于网表数据和样本测试向量集,确定扫描链分布,扫描链分布表示多个扫描链中的在自动向量测试生成过程中所使用到的扫描链;基于网表数据和样本测试向量集,确定寄存器分布,寄存器分布表示多个扫描链中的多个寄存器中的在自动向量测试生成过程中所使用到的寄存器;以及基于扫描链分布和寄存器分布,确定时钟门分布和时钟控制比特位集合。通过分析获得上述数据,可以生成低功耗控制电路,该低功耗控制电路可以具有改进的编码能力并且使用更少的编码位。此外,通过分析得到的扫描链的移位翻转率和寄存器的捕捉翻转率,可以用于在后续阶段对扫描链的移位功耗和捕捉功耗进行约束。此外,扫描链的移位翻转率和寄存器的捕捉翻转率还可以用于确定时钟门分布。In a possible implementation of the fifth aspect, the electronic device is further configured to perform simulation using the netlist data and the sample test vector set to determine, for the circuit under test, the low-power circuit, each scan in the plurality of scan chains At least one of a toggle rate during a logic value shift process of the chain and a logic value toggle rate in a logic value capture phase for each register in the plurality of scan chains. In a possible implementation of the fifth aspect, the distribution determination unit is further configured to determine the scan chain distribution based on the netlist data and the sample test vector set, where the scan chain distribution represents the automatic vector test generation process in multiple scan chains. The scan chain used in the scan chain; determine the register distribution based on the netlist data and the sample test vector set, and the register distribution represents the registers used in the automatic vector test generation process among the multiple registers in multiple scan chains; and Based on the scan chain distribution and register distribution, the clock gate distribution and clock control bit set are determined. By analyzing the above data, a low-power control circuit can be generated that can have improved encoding capabilities and use fewer encoding bits. In addition, the shift flip rate of the scan chain and the capture flip rate of the register obtained through analysis can be used to constrain the shift power consumption and capture power consumption of the scan chain in subsequent stages. In addition, the shift toggle rate of the scan chain and the capture toggle rate of the register can also be used to determine the clock gate distribution.
应当理解,发明内容部分中所描述的内容并非旨在限定本公开的实施例的关键或重要特征,亦非用于限制本公开的范围。本公开的其它特征将通过以下的描述变得容易理解。It should be understood that what is described in this summary is not intended to identify key or important features of the embodiments of the disclosure, nor to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the description below.
附图说明Description of the drawings
结合附图并参考以下详细说明,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。在附图中,相同或相似的附图标记表示相同或相似的元素,其中:The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent with reference to the following detailed description taken in conjunction with the accompanying drawings. In the drawings, the same or similar reference numbers represent the same or similar elements, where:
图1示出了根据本公开的一些实施例的逻辑电路的仿真系统的示意图。FIG. 1 shows a schematic diagram of a simulation system of a logic circuit according to some embodiments of the present disclosure.
图2示出了根据本公开的一些实施例的应用测试压缩技术的芯片的结构示意图。FIG. 2 shows a schematic structural diagram of a chip applying test compression technology according to some embodiments of the present disclosure.
图3示出了根据本公开的一些实施例的应用于低功耗译码器和掩码译码器的二维的稀疏二维开关矩阵电路的示意图。3 shows a schematic diagram of a two-dimensional sparse two-dimensional switch matrix circuit applied to a low-power decoder and a mask decoder according to some embodiments of the present disclosure.
图4示出了根据本公开的一些实施例的扫描链和组合逻辑的示意图。Figure 4 shows a schematic diagram of scan chains and combinational logic in accordance with some embodiments of the present disclosure.
图5示出了根据本公开的一些实施例的用于生成测试向量的方法的示意流程图。Figure 5 shows a schematic flow diagram of a method for generating test vectors according to some embodiments of the present disclosure.
图6示出了根据本公开的一些实施例的用于确定低功耗控制电路的方法的示意流程图。Figure 6 shows a schematic flowchart of a method for determining a low power control circuit in accordance with some embodiments of the present disclosure.
图7示出了根据本公开的一些实施例的用于生成测试向量的方法的示意流程图。Figure 7 shows a schematic flow diagram of a method for generating test vectors according to some embodiments of the present disclosure.
图8示出了根据本公开的一些实施例的用于确定测试功耗的方法的示意流程图。Figure 8 shows a schematic flowchart of a method for determining test power consumption according to some embodiments of the present disclosure.
图9示出了根据本公开的一些实施例的电子设备的示意性框图。Figure 9 shows a schematic block diagram of an electronic device according to some embodiments of the present disclosure.
图10示出了可以用来实施本公开的实施例的示例设备的示意性框图。Figure 10 shows a schematic block diagram of an example device that may be used to implement embodiments of the present disclosure.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。 Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, which rather are provided for A more thorough and complete understanding of this disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of the present disclosure.
在本公开的实施例的描述中,术语“包括”及其类似用语应当理解为开放性包含,即“包括但不限于”。术语“基于”应当理解为“至少部分地基于”。术语“一个实施例”或“该实施例”应当理解为“至少一个实施例”。术语“第一”、“第二”等等可以指代不同的或相同的对象。下文还可能包括其他明确的和隐含的定义。In the description of embodiments of the present disclosure, the term "including" and similar expressions shall be understood as an open inclusion, that is, "including but not limited to." The term "based on" should be understood to mean "based at least in part on." The terms "one embodiment" or "the embodiment" should be understood to mean "at least one embodiment". The terms "first," "second," etc. may refer to different or the same object. Other explicit and implicit definitions may be included below.
下面将参照附图更详细地描述本公开的优选实施例。虽然附图中显示了本公开的优选实施例,然而应该理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了使本公开更加透彻和完整,并且能够将本公开的范围完整地传达给本领域的技术人员。Preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
在本文中使用的术语“包括”及其变形表示开放性包括,即“包括但不限于”。除非特别申明,术语“或”表示“和/或”。术语“基于”表示“至少部分地基于”。术语“一个示例实施例”和“一个实施例”表示“至少一个示例实施例”。术语“另一实施例”表示“至少一个另外的实施例”。术语“第一”、“第二”等等可以指代不同的或相同的对象。下文还可能包括其他明确的和隐含的定义。As used herein, the term "include" and its variations mean an open inclusion, ie, "including but not limited to." Unless otherwise stated, the term "or" means "and/or". The term "based on" means "based at least in part on." The terms "one example embodiment" and "an embodiment" mean "at least one example embodiment." The term "another embodiment" means "at least one additional embodiment". The terms "first," "second," etc. may refer to different or the same object. Other explicit and implicit definitions may be included below.
在芯片的电子设计自动化(electronic design automation,EDA)设计过程中,用户向EDA软件输入配置,由EDA软件生成逻辑电路,然后通过制版和流片得到芯片。在对芯片进行测试的过程中,可以将芯片安装在ATE并且由ATE向IC芯片的输入管脚输入测试激励。通过比较芯片的输出管脚的响应与期望响应,可以判断芯片是否合格。如上所述,随着芯片集成度和复杂度的不断提高,所需的测试向量集也随之快速增长。这导致了芯片测试成本的增加。为了控制测试成本,测试压缩技术被提出以实现在压缩测试向量的同时保证测试覆盖率(test coverage)。测试压缩技术是基于扫描链的。扫描链技术本质上是将时序电路中的触发器连接成多个“移位寄存器(scan cells)”,每一个移位寄存器的输入输出值都可以被单独观测。In the electronic design automation (EDA) design process of the chip, the user inputs the configuration to the EDA software, the EDA software generates the logic circuit, and then the chip is obtained through pattern making and tape-out. In the process of testing the chip, the chip can be installed on the ATE and the test stimulus is input by the ATE to the input pin of the IC chip. By comparing the response of the chip's output pin with the expected response, you can determine whether the chip is qualified. As mentioned above, as chip integration and complexity continue to increase, the set of required test vectors also grows rapidly. This results in increased chip testing costs. In order to control test costs, test compression technology is proposed to compress test vectors while ensuring test coverage. The test compression technique is based on scan chains. Scan chain technology essentially connects flip-flops in a sequential circuit into multiple "shift registers (scan cells)", and the input and output values of each shift register can be independently observed.
测试压缩技术的可行性基于以下事实:由ATPG生成的单个原始测试包含扫描链上所有移位寄存器的输入值,而只有少部分移位寄存器上的输入值才是有效值。因此可以将原始测试向量进行压缩,并通过激励解压缩模块(decompressor)进行解压恢复出有效值。另外,扫描链上的输出值也可以经过响应压缩模块(compactor)进行压缩。输出压缩值通过输出管脚送入ATE,ATE将输出压缩值与期望值进行比对定位出发生错误的扫描链移位寄存器位置。The feasibility of testing compression techniques is based on the fact that a single raw test generated by ATPG contains the input values of all shift registers in the scan chain, and only the input values on a small number of shift registers are valid values. Therefore, the original test vector can be compressed and decompressed to recover the effective value by stimulating the decompression module (decompressor). In addition, the output values on the scan chain can also be compressed through the response compression module (compactor). The output compression value is sent to ATE through the output pin, and ATE compares the output compression value with the expected value to locate the scan chain shift register position where the error occurred.
此外,在芯片测试过程中,需要针对各种可能的故障进行测试。为此,需要生成针对各个故障的测试包(test cub),针对各个故障的测试包通过一系列的计算、分析和验证等操作,可以生成最终的测试包集合。该最终测试包集合被提供给ATE,ATE使用该最终测试包集合来验证电路设计是否存在故障。具体而言,ATE会对目标故障集(fault list)中的每一个目标故障进行ATPG,以产生多个测试包。当产生一定量的测试包后,整个流程会进入测试包融合(cube merging)等步骤以使得最终产生的测试包集合尽可能的紧凑。在流程的最后一步,最终产生的测试包集合会被进行仿真,并对每一个测试向量的逻辑值翻转率进行计算。若逻辑值翻转率不满足用户设定的要求,则该测试向量会被丢弃。在这类常规方案中,测试流程仅在最终测试包集合生成以后添加验证步骤。这种方法虽然可以保证最终生成的测试向量是满足低功耗测试要求的,但是会有大量的测试向量被丢弃,从而使得测试覆盖率受到极大影响。例如,一些故障可能会因为与其对应的测试向量被丢弃而未被检测到。In addition, during chip testing, various possible failures need to be tested. To this end, a test package (test cub) for each fault needs to be generated. The test package for each fault can be generated through a series of calculation, analysis, verification and other operations to generate the final test package set. This final set of test packages is provided to the ATE, which uses the final set of test packages to verify whether the circuit design is faulty. Specifically, ATE performs ATPG on each target fault in the target fault set (fault list) to generate multiple test packages. After a certain amount of test packages are generated, the entire process will enter steps such as test package fusion (cube merging) to make the final test package set as compact as possible. In the last step of the process, the final test package set is simulated and the logical value flip rate of each test vector is calculated. If the logic value flip rate does not meet the requirements set by the user, the test vector will be discarded. In this type of conventional scenario, the testing process only adds a verification step after the final set of test packages is generated. Although this method can ensure that the final generated test vectors meet the requirements of low-power testing, a large number of test vectors will be discarded, which greatly affects the test coverage. For example, some faults may go undetected because their corresponding test vectors are discarded.
在本公开的一些实施例中,在测试向量生成的过程中,特别是在测试向量紧缩操作阶段中,检测经紧缩的中间测试包的测试功耗,并且对测试功耗高于阈值的测试包进行调整,可以使其满足功耗要求。这样,原本将在仿真阶段被丢弃的测试向量会因为在测试向量生成的过程中被调整而符合功耗要求,这可以显著提高测试包的利用率。因此在更多的测试向量被 使用而不是被舍弃的情形下,可以针对更多的故障对测试电路进行检测,从而提高针对各种故障的测试覆盖率。In some embodiments of the present disclosure, during the test vector generation process, especially in the test vector compression operation stage, the test power consumption of the compressed intermediate test packet is detected, and the test packet whose test power consumption is higher than the threshold is detected. Adjustments can be made to meet power consumption requirements. In this way, the test vectors that would have been discarded during the simulation phase will be adjusted to meet the power consumption requirements during the test vector generation process, which can significantly improve the utilization of the test package. Therefore, more test vectors are When used instead of discarded, the test circuit can be detected for more faults, thereby improving test coverage for various faults.
图1示出了根据本公开的一些实施例的逻辑电路的仿真系统100的示意图。在一个实施例中,仿真系统100例如包括电子设备10和ATPG设备20。在一个实施例中,电子设备10例如是计算机。电子设备10包括处理器14和存储器12,其中处理器14包括高速缓存16。备选地,在一些实施例中,高速缓存16也可以独立于处理器14,本公开的范围对此不进行限制。ATPG设备20被配置为生成针对逻辑仿真的ATPG数据,并且将ATPG数据传输至电子设备10。虽然在图1中将电子设备10和ATPG设备20独立地限制,但是在一些实施例中,ATPG设备20可以与电子设备10集成在一起,本公开对此不进行限制。电子设备10可以包括输入装置、通信装置、显示器、音频装置等在此未被示出的其它部件。电子设备10例如可以包括台式计算机、笔记本、工作站、服务器等具有计算功能的设备。用于描述逻辑电路的网表文件可以通过各种有线或无线的方式传递至电子设备10。备选地,电子设备10还可以使用存储有网表文件的存储介质来读取该网表文件。ATPG设备20可以针对不同的逻辑电路生成不同的ATPG数据。在一个实施例中,ATPG数据例如包括仿真周期数据、原始数据输入和故障仿真数据等。仿真周期数据例如包括节拍数据,即,用于表示处理器针对逻辑仿真和/或故障仿真所执行的时间帧的数据。逻辑仿真和故障仿真的时间帧可以相同或不同,本公开对此不进行限制。原始输入例如包括在逻辑仿真中针对逻辑电路中的各个原始数据输入端口的原始数据输入和用于计算时序逻辑门的时钟端口的逻辑值的、与原始时钟端口对应的原始时钟输入。由于时间帧通常为多个时间帧,因此针对单个原始数据输入端口的原始数据输入可以是针对该多个时间帧的原始数据输入集,其包括一系列比特值,例如64位比特值。可以理解,取决于时间帧,可以有更多或更少位的比特值,例如32位或128位比特值。故障仿真数据例如包括针对故障数据输入端的故障数据输入。类似地,由于故障仿真中的时间帧通常为多个时间帧,因此针对单个故障输入端的原始故障数据输入可以是故障输入集,其包括针对该多个时间帧的一系列比特值,例如64位比特值。可以有更多或更少位的比特值。FIG. 1 shows a schematic diagram of a simulation system 100 for a logic circuit according to some embodiments of the present disclosure. In one embodiment, the simulation system 100 includes an electronic device 10 and an ATPG device 20, for example. In one embodiment, the electronic device 10 is, for example, a computer. Electronic device 10 includes a processor 14 and memory 12 , where processor 14 includes cache 16 . Alternatively, in some embodiments, cache 16 may also be independent of processor 14, which is not limited to the scope of the present disclosure. ATPG device 20 is configured to generate ATPG data for logic simulation and transmit the ATPG data to electronic device 10 . Although the electronic device 10 and the ATPG device 20 are limited independently in FIG. 1 , in some embodiments, the ATPG device 20 may be integrated with the electronic device 10 , which is not limited by the present disclosure. Electronic device 10 may include input devices, communication devices, displays, audio devices, and other components not shown here. The electronic device 10 may include, for example, a desktop computer, a notebook, a workstation, a server, and other devices with computing functions. The netlist file used to describe the logic circuit can be transferred to the electronic device 10 through various wired or wireless methods. Alternatively, the electronic device 10 may also use a storage medium in which the netlist file is stored to read the netlist file. ATPG device 20 may generate different ATPG data for different logic circuits. In one embodiment, the ATPG data includes, for example, simulation cycle data, original data input, fault simulation data, and the like. The simulation cycle data includes, for example, tick data, ie, data representing a time frame executed by the processor for logic simulation and/or fault simulation. The time frames of logic simulation and fault simulation may be the same or different, and this disclosure does not limit this. The original inputs include, for example, the original data inputs for each original data input port in the logic circuit in the logic simulation and the original clock input corresponding to the original clock port used to calculate the logic value of the clock port of the sequential logic gate. Since a time frame is usually multiple time frames, the raw data input for a single raw data input port may be a raw data input set for the multiple time frames, which includes a series of bit values, such as a 64-bit bit value. It will be appreciated that depending on the time frame, there may be more or fewer bit values, such as 32-bit or 128-bit bit values. The fault simulation data includes, for example, a fault data input for a fault data input. Similarly, since the time frame in fault simulation is usually multiple time frames, the original fault data input for a single fault input terminal can be a fault input set, which includes a series of bit values, such as 64 bits, for the multiple time frames. bit value. Bit values can have more or fewer bits.
图2示出了根据本公开的一些实施例的应用测试压缩技术的芯片的结构示意图。图2示出了根据本公开的一些实施例的应用测试压缩技术的芯片200的结构示意图。如图2所示,芯片200包括待测电路211、低功耗移位寄存器216、掩码寄存器218、解压缩模块212、压缩模块213、低功耗控制器214、掩码控制器215、多个与门207-1、207-2…..207-N和多个与门209-1、209-2……209-N,其中N表示大于1的整数。在芯片200中,低功耗移位寄存器216、掩码寄存器218、解压缩模块212、压缩模块213、低功耗控制器214、掩码控制器215、多个与门207-1、207-2…..207-N和多个与门209-1、209-2……209-N用于对待测电路211进行测试。因此,在一个实施例中,芯片200的测试电路可以包括低功耗控制器214或掩码控制器215中的至少一项。在另一实施例中,芯片200的测试电路可以还包括低功耗移位寄存器216、掩码寄存器218、解压缩模块212、压缩模块213、多个与门207-1、207-2…..207-N和多个与门209-1、209-2……209-N。在对芯片200进行实际测试时,ATE通过芯片200的少量输入管脚向芯片200的低功耗移位寄存器216输入ATPG测试向量。ATPG测试包含解压缩模块212的输入压缩值,即压缩种子(compressed seed)、低功耗控制器214的编码值和掩码控制器215的编码值等。输入压缩值经由低功耗移位寄存器216和掩码寄存器218被注入解压缩模块212。低功耗控制器214的编码值经由低功耗移位寄存器216被注入低功耗控制器214,并且掩码控制器215的编码值经由低功耗移位寄存器216和掩码寄存器218被注入掩码控制器215。在输入阶段,低功耗控制器214将编码值进行译码,以打开合适的扫描链。解 压缩模块212将低功耗移位寄存器216的输入压缩值解压,并将解压后的值在低功耗控制器214的控制下通过移位填充到对应的移位寄存器上。FIG. 2 shows a schematic structural diagram of a chip applying test compression technology according to some embodiments of the present disclosure. FIG. 2 shows a schematic structural diagram of a chip 200 applying test compression technology according to some embodiments of the present disclosure. As shown in Figure 2, the chip 200 includes a circuit to be tested 211, a low-power shift register 216, a mask register 218, a decompression module 212, a compression module 213, a low-power controller 214, a mask controller 215, and multiple One AND gate 207-1, 207-2...207-N and multiple AND gates 209-1, 209-2...209-N, where N represents an integer greater than 1. In the chip 200, a low-power shift register 216, a mask register 218, a decompression module 212, a compression module 213, a low-power controller 214, a mask controller 215, and a plurality of AND gates 207-1, 207- 2…..207-N and multiple AND gates 209-1, 209-2…209-N are used to test the circuit under test 211. Therefore, in one embodiment, the test circuitry of chip 200 may include at least one of low power controller 214 or mask controller 215. In another embodiment, the test circuit of the chip 200 may further include a low-power shift register 216, a mask register 218, a decompression module 212, a compression module 213, and a plurality of AND gates 207-1, 207-2... .207-N and multiple AND gates 209-1, 209-2...209-N. When actually testing the chip 200, ATE inputs ATPG test vectors to the low-power shift register 216 of the chip 200 through a small number of input pins of the chip 200. The ATPG test includes the input compression value of the decompression module 212, that is, the compressed seed, the encoding value of the low-power controller 214, the encoding value of the mask controller 215, and so on. Input compressed values are injected into decompression module 212 via low power shift register 216 and mask register 218. The encoded value of the low-power controller 214 is injected into the low-power controller 214 via the low-power shift register 216 , and the encoded value of the mask controller 215 is injected via the low-power shift register 216 and the mask register 218 Mask Controller 215. During the input phase, the low-power controller 214 decodes the encoded value to open the appropriate scan chain. untie The compression module 212 decompresses the input compressed value of the low-power shift register 216, and fills the decompressed value into the corresponding shift register through shifting under the control of the low-power controller 214.
在输出阶段,掩码控制器215将编码值进行译码,通过使用译码比特值对扫描链输出值中X态进行掩盖,并将处理后的输出值送入响应压缩模块213进行压缩。在一个实施例中,待测电路211包括多个扫描链211-1、211-2……211-N(下文单独或统称为11),扫描链的数目与多个与门207-1、207-2…..207-N(下文单独或统称为7)和多个与门209-1、209-2……209-N(下文单独或统称为9)分别对应。每个扫描链可以包括一个或多个待测电路中的时序逻辑电路,例如寄存器。该时序逻辑异或门网络响应于移位输出而生成移位输出。低功耗控制器214包括低功耗寄存器214A和译码器214B,译码器214B通过译码生成控制信号以控制与门207-1、207-2…..207-N中的一个或多个与门的导通或关断。例如,在多个周期内,译码器214B可以持续生成逻辑值“1”给与门207-1,以使得解压值被陆续移位输入至扫描链211-1。与此同时,译码器214B可以输出“0”以关断与门207-2…..207-N,以使得扫描链211-2……211-N持续接收“0”。由于扫描链211-2……211-N没有逻辑值改变,因此芯片中的时序逻辑门没有操作。由于时序逻辑门不进行操作,因此可以降低测试过程中的功耗。掩码控制器215包括掩码寄存器215A和掩码译码器215B,掩码译码器215B通过译码生成控制信号以控制与门209-1、209-2……209-N中的一个或多个与门的导通或关断。类似地,掩码译码器215B通过译码可以产生控制信号以关闭与门209-1、209-2……209-N中的与具有X态的扫描链对应的与门。In the output stage, the mask controller 215 decodes the encoded value, uses the decoded bit value to mask the X state in the scan chain output value, and sends the processed output value to the response compression module 213 for compression. In one embodiment, the circuit under test 211 includes a plurality of scan chains 211-1, 211-2...211-N (hereinafter individually or collectively referred to as 11), the number of scan chains is related to the number of AND gates 207-1, 207 -2...207-N (hereinafter individually or collectively referred to as 7) corresponds to a plurality of AND gates 209-1, 209-2...209-N (hereinafter individually or collectively referred to as 9) respectively. Each scan chain may include one or more sequential logic circuits, such as registers, in the circuit under test. The network of sequential logic XOR gates generates a shift output in response to the shift output. The low-power controller 214 includes a low-power register 214A and a decoder 214B. The decoder 214B generates a control signal through decoding to control one or more of the AND gates 207-1, 207-2...207-N. The AND gate is turned on or off. For example, in multiple cycles, the decoder 214B may continuously generate a logic value “1” to the AND gate 207-1, so that the decompressed value is successively shifted and input to the scan chain 211-1. At the same time, the decoder 214B may output "0" to turn off the AND gates 207-2...207-N, so that the scan chains 211-2...211-N continue to receive "0"s. Since there is no logic value change in the scan chains 211-2...211-N, the sequential logic gates in the chip do not operate. Since the sequential logic gates do not operate, power consumption during testing can be reduced. The mask controller 215 includes a mask register 215A and a mask decoder 215B. The mask decoder 215B generates a control signal through decoding to control one of the AND gates 209-1, 209-2...209-N. Turning on or off multiple AND gates. Similarly, the mask decoder 215B can generate a control signal through decoding to close the AND gate corresponding to the scan chain having the X state among the AND gates 209-1, 209-2...209-N.
应理解的是,本申请实施例不对解压缩模块212的结构进行限定。解压缩模块212可以是任何能够实现将少量测试激励扩展为大量扫描链测试向量并将测试向量输出的电路。解压缩模块212例如可以是随机信号发生器。类似地,本申请实施例不对响应压缩模块213的结构进行限定。响应压缩模块213可以是任何能够接收测试响应并将接收到的测试响应进行逻辑运算以从少量的输出通道输出的电路。响应压缩模块213例如可以是基于多输入特征寄存器(multiple-input signature register,MISR)或者异或门(XOR)树结构的压缩模块。It should be understood that the embodiment of the present application does not limit the structure of the decompression module 212. The decompression module 212 may be any circuit capable of expanding a small amount of test stimuli into a large number of scan chain test vectors and outputting the test vectors. The decompression module 212 may be a random signal generator, for example. Similarly, the embodiment of the present application does not limit the structure of the response compression module 213. The response compression module 213 may be any circuit capable of receiving test responses and performing logical operations on the received test responses to output from a small number of output channels. The response compression module 213 may be, for example, a compression module based on a multiple-input signature register (MISR) or an XOR gate (XOR) tree structure.
图3示出了根据本公开的一些实施例的应用于低功耗译码器214B或掩码译码器215B的二维稀疏二维开关矩阵电路300的示意图。稀疏二维开关矩阵电路300例如可以是低功耗译码器214B或掩码译码器215B的一种具体实现方式。可以理解,根据待测电路11的不同,二维稀疏二维开关矩阵电路可以具有不同的开关分布。如图3所示,稀疏二维开关矩阵电路300包括多个行和多个列。每行可以由行选择器32的相应的行选择信号控制。每列可以由列选择器33的相应的列选择信号控制。与开关矩阵电路200不同的是,稀疏二维开关矩阵电路300在行与列的节点中的仅部分节点处具有与待测电路11的扫描链耦合的开关,例如开关31或34。换句话说,稀疏二维开关矩阵电路300中的行和列的一部分节点处可以不设置有与扫描链耦合的开关。因此,稀疏二维开关矩阵电路表示其中至少一个节点不具有开关的二维开关矩阵电路。在图3中,虽然在一些不具有开关的节点处,行和列被示出为交叉,但是这仅是为了简化图示。可以理解,行和列的导电线并不耦合,而是在节点处断开。3 shows a schematic diagram of a two-dimensional sparse two-dimensional switch matrix circuit 300 applied to the low-power decoder 214B or the mask decoder 215B according to some embodiments of the present disclosure. The sparse two-dimensional switch matrix circuit 300 may be, for example, a specific implementation of the low-power decoder 214B or the mask decoder 215B. It can be understood that the two-dimensional sparse two-dimensional switch matrix circuit may have different switch distributions depending on the circuit 11 to be tested. As shown in FIG. 3, the sparse two-dimensional switch matrix circuit 300 includes a plurality of rows and a plurality of columns. Each row may be controlled by a corresponding row select signal from row selector 32 . Each column may be controlled by a corresponding column select signal of column selector 33 . Different from the switch matrix circuit 200 , the sparse two-dimensional switch matrix circuit 300 has switches coupled with the scan chain of the circuit under test 11 , such as switches 31 or 34 , at only some nodes among the row and column nodes. In other words, switches coupled to scan chains may not be provided at some nodes of rows and columns in the sparse two-dimensional switch matrix circuit 300 . Therefore, a sparse two-dimensional switch matrix circuit represents a two-dimensional switch matrix circuit in which at least one node does not have a switch. In Figure 3, although rows and columns are shown crossing at some nodes without switches, this is only to simplify the illustration. It can be understood that the conductive lines of the rows and columns are not coupled, but disconnected at the nodes.
稀疏二维开关矩阵电路300中允许每个列编码比特(column encoding bit)和行编码比特(row encoding bit)所连接的扫描链的数量(每个维度的控制粒度)灵活可调。例如,每个row encoding bit连接的扫描链个数可以少于组数n,每个column encoding bit连接的扫描链个数可以少于行数m。在本文中,粒度表示行或列所控制的开关数目。在一些实施例中,可以将稀疏二维开关矩阵电路的粒度设置为均匀粒度。也即,每行和每列中的开关彼此基本上相等,所控制的开关数目最多相差为1。由于每行和每列具有基本上相同或接近的开关,这 可以使得被误打开的开关的总数目尽量减少。例如,作为对比,假设开关34位于开关31上方的节点处,则开关34的导通会影响左右两侧的两个开关和开关31(共3个开关)的导通,这是因为当开关34导通时,其必须将其所在的行和列设置为1。换言之,在此情形下,会影响3个开关的编码成功率。当开关34位于图3中所示的位置时,开关34仅影响其右侧开关以及开关31(仅2个开关)。换言之,在此情形下,仅影响两个开关的编码成功率。因此,将稀疏二维开关矩阵电路300设置为均匀粒度的系数矩阵,这可以提高编码成功率。虽然在图3中示出了3×3的二维稀疏二维开关矩阵电路300,但是这仅是示意而非对本公开的范围进行限制。在一些实施例中,二维稀疏二维开关矩阵电路可以具有n×m的二维结构,其中n表示行并且具有大于1的整数值,m表示列并且具有大于1的整数值,并且m与n可以相同或不同。The sparse two-dimensional switch matrix circuit 300 allows the number of scan chains (control granularity of each dimension) connected to each column encoding bit (column encoding bit) and row encoding bit (row encoding bit) to be flexibly adjustable. For example, the number of scan chains connected to each row encoding bit can be less than the number of groups n, and the number of scan chains connected to each column encoding bit can be less than the number of rows m. In this article, granularity means the number of switches controlled by a row or column. In some embodiments, the granularity of the sparse two-dimensional switch matrix circuit can be set to a uniform granularity. That is, the switches in each row and column are substantially equal to each other, and the number of controlled switches differs by at most one. Since each row and column has essentially the same or close switches, this The total number of switches that are mistakenly turned on can be minimized. For example, as a comparison, assuming that switch 34 is located at a node above switch 31, the conduction of switch 34 will affect the conduction of the two switches on the left and right sides and switch 31 (a total of 3 switches). This is because when switch 34 When on, it must have its row and column set to 1. In other words, in this case, the encoding success rate of the three switches will be affected. When switch 34 is in the position shown in Figure 3, switch 34 only affects the switch to its right as well as switch 31 (only 2 switches). In other words, in this case, only the coding success rate of two switches is affected. Therefore, the sparse two-dimensional switch matrix circuit 300 is set as a uniform-granularity coefficient matrix, which can improve the coding success rate. Although a 3×3 two-dimensional sparse two-dimensional switch matrix circuit 300 is shown in FIG. 3 , this is only for illustration and does not limit the scope of the present disclosure. In some embodiments, the two-dimensional sparse two-dimensional switch matrix circuit may have an n×m two-dimensional structure, where n represents a row and has an integer value greater than 1, m represents a column and has an integer value greater than 1, and m is the same as n can be the same or different.
图3中的开关可以是与门。在另一些实施例中,开关可以是其它逻辑门或是其它开关。例如针对编码译码器,可以使用或门作为开关。当行选择信号和列选择信号均为1时,开关输出的控制位信号为1,也即开关将打开相应的扫描链。当行选择信号或者列选择信号为0时,开关31输出的控制位信号为0,也即开关将关闭相应的扫描链。稀疏二维开关矩阵电路300中行和列的数目可以与待测电路11的扫描链的数目有关。与不同扫描链耦合的开关在稀疏二维开关矩阵电路300中的分布可以是随机或按照一定规律排布的。在本公开的一些实施例中,可以通过ATPG学习来获得针对待测电路11的优化的二维稀疏开关分布,如下文所述。The switch in Figure 3 could be an AND gate. In other embodiments, the switches may be other logic gates or other switches. For a codec, for example, an OR gate can be used as a switch. When the row selection signal and column selection signal are both 1, the control bit signal output by the switch is 1, that is, the switch will open the corresponding scan chain. When the row selection signal or the column selection signal is 0, the control bit signal output by the switch 31 is 0, that is, the switch will close the corresponding scan chain. The number of rows and columns in the sparse two-dimensional switch matrix circuit 300 may be related to the number of scan chains of the circuit under test 11 . The distribution of switches coupled to different scan chains in the sparse two-dimensional switch matrix circuit 300 may be random or arranged according to certain rules. In some embodiments of the present disclosure, an optimized two-dimensional sparse switching distribution for the circuit under test 11 may be obtained through ATPG learning, as described below.
图4示出了根据本公开的一些实施例的扫描链411和组合逻辑42的示意图。在一个实施例中,扫描链411可以图2中的扫描链211-N的一个具体示例,并且包括3个寄存器44、46和48。可以理解,在另一些实施例中,扫描链411可以包括更多或更少的寄存器。扫描链411和组合逻辑42可以是图2中的待测电路211的一部分。如上所述,扫描链411在测试过程中包括两个阶段,即移位阶段和捕捉阶段。Figure 4 shows a schematic diagram of scan chain 411 and combinational logic 42 in accordance with some embodiments of the present disclosure. In one embodiment, scan chain 411 may be a specific example of scan chain 211-N in FIG. 2 and includes three registers 44, 46, and 48. It is understood that in other embodiments, the scan chain 411 may include more or fewer registers. Scan chain 411 and combinational logic 42 may be part of circuit under test 211 in FIG. 2 . As mentioned above, the scan chain 411 includes two phases during the test process, namely the shift phase and the capture phase.
在移位阶段中,寄存器44、46和48的移位使能(shift enable,SE)端接收到SE确立信号,寄存器44、46和48因此在各自的移位输入(shift input,SI)端依次接收移位逻辑值。在一个示例中,扫描链411接收“110”的SI。在此情形下,扫描链411的逻辑值被翻转一次。扫描链411的移位翻转率因此是1/2,即50%。在另一些实施例中,一个扫描链接收P位移位输入,并且P位输入的逻辑值翻转次数是T,则该扫描链的移位翻转率RS=T/(P-1),其中T和P均表示正整数,并且T小于P。During the shift phase, the shift enable (SE) terminals of registers 44, 46, and 48 receive the SE establishment signal. Therefore, the registers 44, 46, and 48 are at their respective shift input (SI) terminals. Shift logic values are received in turn. In one example, scan chain 411 receives an SI of "110". In this case, the logic value of scan chain 411 is flipped once. The shift flip rate of scan chain 411 is therefore 1/2, or 50%. In other embodiments, a scan chain receives a P-bit shift input, and the number of logic value flips of the P-bit input is T, then the shift flip rate RS of the scan chain =T/(P-1), where Both T and P represent positive integers, and T is smaller than P.
在捕捉阶段,扫描链411的寄存器44、46和48均已被移入初始逻辑值。寄存器44、46和48的SE端接收解确立信号,并且SI端被禁用。寄存器44、46和48的逻辑值在Q端被提供给组合逻辑42。组合逻辑42在经过一系列组合逻辑运算之后,将运算所得到的逻辑值经由数据输入(data input,DI)端提供至寄存器44、46和48。寄存器44、46和48响应于在始终端CK接收到时钟脉冲信号进行计算,以在相应的Q端获得更新的输出逻辑值。组合逻辑42在功能操作阶段,可以基于所接收的输入X1、X2和X3生成对应的逻辑输出Y1和Y2。在测试阶段,组合逻辑42可以基于来自寄存器的Q端的多个输出来计算得到逻辑输出给寄存器的DI端。此外,组合逻辑42还可以接收芯片的时钟信号集CKS,时钟信号集CKS可以包括一个或多个系统时钟脉冲。组合逻辑42中的一些时钟门(逻辑门)可以基于系统时钟脉冲和逻辑输入来选择性地提供时钟信号给寄存器44、46和48,其中逻辑输出可以来自相同或不同的扫描链的寄存器。在本公开中,组合逻辑42中的用于控制寄存器的时钟端口CK(例如关闭或打开寄存器)的逻辑门或逻辑门组合被称为时钟门。相对地,用于使用来自寄存器Q端的逻辑值来计算得到被提供至寄存器的DI端的逻辑值的逻辑门被称为计算逻辑门。 例如,在一个实施例中,一个时钟门可以是与门,其一端接收时钟脉冲,另一端接收来自寄存器的逻辑值。在逻辑值为“1”的情形下,该时钟信号可以被提供至寄存器的时钟端CK,而在逻辑值为“0”的情形下,该时钟门被关闭,即,没有时钟信号被提供给寄存器的时钟端CK。虽然在此以与门示出了时钟门的示意,但是可以理解,这仅是示意而非对本公开的范围进行限制。时钟门可以是或门、异或门或者是多个逻辑门的组合。在此情形下,用于控制不同寄存器的时钟门可以不同,并且不同时钟门的用于关闭相应寄存器的比特位组合也可以不同。此外,在一些实施例中,可以有一个或多个时钟门控制一个寄存器,也可以有一个时钟门控制一个或多个寄存器。可以理解,时钟门控制寄存器的方式和组合可以不同,本公开对此不进行限制。During the capture phase, registers 44, 46 and 48 of scan chain 411 have all been moved into initial logic values. The SE terminal of registers 44, 46 and 48 receives the solution establishment signal and the SI terminal is disabled. The logic values of registers 44, 46 and 48 are supplied to combinational logic 42 at the Q terminal. After a series of combinational logic operations, the combinational logic 42 provides the logic values obtained by the operations to the registers 44, 46 and 48 through a data input (DI) terminal. The registers 44, 46 and 48 perform calculations in response to receiving the clock pulse signal at the terminal CK to obtain an updated output logic value at the corresponding terminal Q. Combinational logic 42, in its functional operation phase, may generate corresponding logical outputs Y1 and Y2 based on the received inputs X1, X2 and X3. During the test phase, the combinational logic 42 may calculate the logic output to the DI terminal of the register based on the multiple outputs from the Q terminal of the register. In addition, the combinational logic 42 may also receive a clock signal set CKS of the chip, and the clock signal set CKS may include one or more system clock pulses. Some of the clock gates (logic gates) in combinational logic 42 may selectively provide clock signals to registers 44, 46, and 48 based on system clock pulses and logic inputs, where the logic outputs may be from registers of the same or different scan chains. In this disclosure, a logic gate or a combination of logic gates in combinational logic 42 for controlling the clock port CK of a register (eg, turning the register off or on) is referred to as a clock gate. In contrast, a logic gate for calculating a logic value supplied to the DI terminal of the register using a logic value from the Q terminal of the register is called a computational logic gate. For example, in one embodiment, a clock gate may be an AND gate that receives a clock pulse on one end and a logic value from a register on the other end. In the case of a logic value of "1", the clock signal may be provided to the clock terminal CK of the register, and in the case of a logic value of "0", the clock gate is closed, that is, no clock signal is provided to The clock terminal CK of the register. Although the clock gate is shown as an AND gate here, it can be understood that this is only illustrative and does not limit the scope of the present disclosure. A clock gate can be an OR gate, an XOR gate, or a combination of multiple logic gates. In this case, the clock gates used to control different registers can be different, and the bit combinations of different clock gates used to turn off the corresponding registers can also be different. Furthermore, in some embodiments, one or more clock gates may control one register, and one clock gate may control one or more registers. It can be understood that the manner and combination of clock gate control registers may be different, and this disclosure does not limit this.
组合逻辑42中的时钟门可以与组合逻辑42中的计算逻辑门相同或不同,或者部分相同,本公开对此不进行限制。此外,虽然在此将时钟门和计算逻辑门都示出为组合逻辑42的一部分,但是这仅是示意,而非对本公开的范围进行限制。在另一些实施例中,时钟门和计算逻辑门可以隶属于不同的组合逻辑电路。The clock gates in the combinational logic 42 may be the same as, different from, or partially the same as the calculation logic gates in the combinational logic 42, which is not limited by this disclosure. Additionally, although both clock gates and computational logic gates are shown here as part of combinational logic 42, this is for illustration only and does not limit the scope of the present disclosure. In other embodiments, clock gates and computational logic gates may belong to different combinational logic circuits.
图5示出了根据本公开的一些实施例的用于生成测试向量的方法500的示意流程图。可以理解,上面针对图1-图4所描述的各个方面可以选择性地适用于方法500。在502,诸如计算机之类的电子设备可选地基于用于表示待测电路的网表数据和针对待测电路的样本测试向量集,确定用于控制多个扫描链的时钟门分布和时钟控制比特位集合。时钟门分布表示多个时钟门与其分别控制的多个扫描链中的寄存器之间的对应关系,时钟门被配置为基于所接收的时钟控制比特位集合中的时钟控制比特位来关闭与时钟门对应的寄存器。例如,作为一个时钟门的与门在一个输入端接收逻辑值“0”,并且在另一个输入端接收系统时钟脉冲。在此情形下,逻辑值“0”即为一个时钟控制比特位集合中的时钟控制比特位。Figure 5 shows a schematic flow diagram of a method 500 for generating test vectors in accordance with some embodiments of the present disclosure. It will be appreciated that various aspects described above with respect to FIGS. 1-4 may be selectively applicable to the method 500. At 502, an electronic device, such as a computer, optionally determines clock gate distribution and clock control for controlling a plurality of scan chains based on netlist data representing the circuit under test and a set of sample test vectors for the circuit under test. A collection of bits. The clock gate distribution represents a correspondence between multiple clock gates and registers in multiple scan chains that they respectively control. The clock gate is configured to close the clock gate based on the clock control bits in the received clock control bit set. corresponding register. For example, an AND gate, which is a clock gate, receives the logic value "0" on one input and the system clock pulse on the other input. In this case, the logic value "0" is the clock control bit in a clock control bit set.
具体而言,在预分析阶段,可以对原始的待测电路进行少量的ATPG和仿真。在这个流程结束之后,可以获得待测电路中所使用到的扫描链分布和寄存器分布。通过对这些扫描链分布和寄存器分布的进一步分析,可以获得时钟门分布。时钟门分布可以在后续的针对故障的测试向量生成中,用于关闭时钟门,从而更加精确的计算扫描链的可能的逻辑值翻转率。Specifically, in the pre-analysis stage, a small amount of ATPG and simulation can be performed on the original circuit under test. After this process is completed, the scan chain distribution and register distribution used in the circuit under test can be obtained. Through further analysis of these scan chain distributions and register distributions, the clock gate distribution can be obtained. The clock gate distribution can be used to close the clock gate in the subsequent test vector generation for faults, thereby more accurately calculating the possible logic value flip rate of the scan chain.
此外,在一些实施例中,方法500还包括使用网表数据和样本测试向量集进行仿真,以确定针对待测电路的低功耗电路、多个扫描链中每个扫描链的逻辑值移位过程中的翻转率和多个扫描链中的每个寄存器在逻辑值捕捉阶段中的逻辑值翻转率中的至少一项。图6示出了根据本公开的一些实施例的确定低功耗电路的方法600的示意流程图。低功耗电路例如可以是图2中的低功耗译码器214B和掩码译码器215B中的至少一项。在602,可以基于待测电路211的特征,确定一个或多个备选开关分布。可以理解,针对特定的要求,可能存在二维开关矩阵电路的多种分布。Additionally, in some embodiments, method 500 further includes performing simulations using the netlist data and the set of sample test vectors to determine logic value shifts for each of the plurality of scan chains for the low power circuit of the circuit under test. At least one of a toggle rate in the process and a logic value toggle rate in a logic value capture stage for each register in the plurality of scan chains. Figure 6 shows a schematic flowchart of a method 600 of determining a low-power circuit in accordance with some embodiments of the present disclosure. The low-power consumption circuit may be, for example, at least one of the low-power decoder 214B and the mask decoder 215B in FIG. 2 . At 602, one or more alternative switch distributions may be determined based on characteristics of the circuit under test 211. It can be understood that for specific requirements, there may be various distributions of two-dimensional switch matrix circuits.
对于二维开关矩阵电路而言,所对应的扫描链的数目是确定的,这例如可以通过步骤402确定。例如扫描链的总数目为N,N表示大于1的整数。在一个实施例中,确定备选开关分布包括确定二维开关矩阵电路的行数目和列数目。确定备选开关分布还包括确定与扫描链耦合的多个开关在二维开关矩阵电路中的节点处的分布。可以基于待测电路11的特征来获得初始稀疏度。使用初始稀疏度,可以计算开关分布的行数目和列数目。稀疏度可以定义为其中m和n为二维开关矩阵电路中的行数目和列数目,N为待测电路11的扫描链的数目。例如,可以基于编码成功率估计模型来确定初始稀疏度。可以参考公式(1)-(3)来使用二分搜索算法来确定初始稀疏度。


For a two-dimensional switch matrix circuit, the number of corresponding scan chains is determined, which can be determined through step 402, for example. For example, the total number of scan chains is N, and N represents an integer greater than 1. In one embodiment, determining the candidate switch distribution includes determining the number of rows and the number of columns of the two-dimensional switch matrix circuit. Determining the candidate switch distribution also includes determining a distribution of the plurality of switches coupled to the scan chain at nodes in the two-dimensional switch matrix circuit. The initial sparsity can be obtained based on the characteristics of the circuit under test 11 . Using the initial sparsity, the number of rows and columns of the switch distribution can be calculated. Sparsity can be defined as Where m and n are the number of rows and columns in the two-dimensional switch matrix circuit, and N is the number of scan chains of the circuit 11 under test. For example, the initial sparsity may be determined based on a coding success rate estimation model. You can refer to formulas (1)-(3) to use the binary search algorithm to determine the initial sparsity.


其中N表示扫描链总数,s表示稀疏度,P表示编码成功率,k表示一个测试包使用了k条扫描链,dk表示ATPG统计的测试包集合中使用了k条扫描链的测试包的占比,α表示用户期望的编码译码后打开扫描链的占比最大值,α也可以称为低功耗阈值。m0和n0表示将N条扫描链紧密排列成方阵后的行数和列数,即m0×n0=N。fs(m1,n1,k)表示稀疏度为s时,在开关分布的一个m1×n1的子矩阵内成功编码k条扫描链的组合数。m1和n1表示k个打开的扫描链可能在稀疏二维开关矩阵电路的m1行,n1列里分布。u和v表示k个打开的扫描链可能分布在稀疏二维开关矩阵电路中m1行、n1列里的u行v列。Ss(α)表示稀疏度为s并且给定α时,成功编码k条扫描链的成功率。该成功率Ss(α)和dk的加权求和表示当前稀疏度s所决定的开关分布在ATPG统计的测试包集合上的编码成功率Ps(α)。Among them, N represents the total number of scan chains, s represents sparsity, P represents the encoding success rate, k represents a test package that uses k scan chains, and d k represents the number of test packages that use k scan chains in the test package set collected by ATPG statistics. Proportion, α represents the maximum proportion of the scan chain opened after encoding and decoding that the user expects, α can also be called the low power consumption threshold. m0 and n0 represent the number of rows and columns after N scan chains are closely arranged into a square matrix, that is, m0×n0=N. f s (m 1 , n 1 , k) represents the number of combinations of k scan chains that are successfully encoded within an m 1 × n 1 submatrix of the switch distribution when the sparsity is s. m1 and n1 indicate that k open scan chains may be distributed in the m1 row and n1 column of the sparse two-dimensional switch matrix circuit. u and v represent that k open scan chains may be distributed in the u row and v column in the m1 row and n1 column in the sparse two-dimensional switch matrix circuit. S s (α) represents the success rate of successfully encoding k scan chains when the sparsity is s and given α. The weighted sum of the success rate S s (α) and d k represents the coding success rate P s (α) of the switch distribution determined by the current sparsity s on the test packet set of ATPG statistics.
当编码成功率Ps(α)大于最大编码成功率Pmax时,稀疏度s可以作为初始稀疏度s0。稀疏度越大,则硬件成本越高。此外,研究发现,当稀疏度达到一定程度之后,编码成功率并不会显著增加。因此还可以设置初始稀疏度s0应小于最大稀疏度smax的条件。When the coding success rate P s (α) is greater than the maximum coding success rate P max , the sparsity s can be used as the initial sparsity s 0 . The greater the sparsity, the higher the hardware cost. In addition, the study found that when the sparsity reaches a certain level, the encoding success rate does not increase significantly. Therefore, you can also set the condition that the initial sparsity s 0 should be less than the maximum sparsity s max .
最大编码成功率Pmax可以是可调的,例如Pmax可以设置为99%。最大稀疏度smax也是可调的,例如smax可以设置为100%。最大稀疏度smax可以与开关功率(switch power)限制有关,该开关功率限制表示在移位输入时,扫描链上的寄存器实际发生翻转的数目与发生最大翻转数目的比值。The maximum encoding success rate P max can be adjustable, for example, P max can be set to 99%. The maximum sparsity s max is also adjustable, for example s max can be set to 100%. The maximum sparsity s max can be related to a switch power limit, which represents the ratio of the actual number of flips to the maximum number of flips in the registers on the scan chain when the input is shifted.
基于所确定的稀疏度s,可以参考公式(4)-(5)来确定二维开关矩阵电路中的行数目m和列数目n。

Based on the determined sparsity s, the number of rows m and the number of columns n in the two-dimensional switch matrix circuit can be determined with reference to formulas (4)-(5).

基于所确定的行数目m和列数目n,可以使用随机策略或确定性策略按照均匀粒度确定一个或多个备选开关分布。均匀粒度表示数目为m的行中的任意两行所具有的开关数目之差最小并且数目为n的列中任意两列所具有的开关数目之差最小。换句话说,基于所确定的行数目m和列数目n,可以确定与N个扫描链耦合的开关在节点处的分布。开关分布可以是随机的也可以是按照确定性的规律排布的。关于随机策略和确定性策略的细节,参见PCT/CN2021/109508,该申请的全文通过引用的方式并入本文。Based on the determined number of rows m and column number n, one or more alternative switch distributions may be determined at uniform granularity using a random strategy or a deterministic strategy. Uniform granularity means that any two rows of m number have the smallest difference in the number of switches and any two columns of n number have the smallest difference in the number of switches. In other words, based on the determined number of rows m and number of columns n, the distribution of switches coupled to N scan chains at the nodes can be determined. Switch distribution can be random or arranged according to deterministic rules. For details on stochastic and deterministic strategies, see PCT/CN2021/109508, the entire text of which is incorporated herein by reference.
在604,使用一个或多个备选开关分布,可以获得与一个或多个备选开关分布对应的一个或多个编码成功率。例如,可以在测试集上验证一个或多个备选开关分布的一个或多个编码成功率。当多个开关在二维开关矩阵电路中的分布被确定之后,可以针对已确定的各个备选开关分布来计算编码成功率。电子设备可以基于ATPG统计的测试包集合来确定测试集。在一些实施例中,针对低功耗译码器214B,测试集可以是通过故障采样和ATPG确定的测试包集合,并且测试集可以仅保存扫描链的标识。在一些实施例中,针对掩码译码器215B,测试集可以包括观测测试集和掩码测试集两部分。观测测试集包括要被观测到的逻辑门的值所在的扫描链的标识,要被观测到的逻辑门的值是与测试包对应的逻辑门的值。掩码测试集包 括阻碍要被观测到的逻辑门的值被观测的X态所在的扫描链的标识。通过在测试集上验证一个或多个备选开关分布,可以获得相应的编码成功率。At 604, using the one or more candidate switch distributions, one or more encoding success rates corresponding to the one or more candidate switch distributions can be obtained. For example, one or more encoding success rates for one or more alternative switch distributions can be verified on a test set. After the distribution of multiple switches in the two-dimensional switch matrix circuit is determined, the encoding success rate can be calculated for each determined candidate switch distribution. The electronic device may determine the test set based on the test packet set collected by ATPG statistics. In some embodiments, for the low-power decoder 214B, the test set may be a set of test packets determined through fault sampling and ATPG, and the test set may only save the identification of the scan chain. In some embodiments, for the mask decoder 215B, the test set may include an observation test set and a mask test set. The observation test set includes the identification of the scan chain where the value of the logic gate to be observed is located, and the value of the logic gate to be observed is the value of the logic gate corresponding to the test package. Mask test set package Includes the identification of the scan chain in which the X-state is located that prevents the value of the logic gate to be observed from being observed. By validating one or more alternative switch distributions on the test set, the corresponding encoding success rate can be obtained.
在606,至少基于一个或多个编码成功率,可以确定针对待测电路211的开关分布。在一个实施例中,可以基于编码成功率来确定开关分布。附加地,可以基于编码成功率和稀疏度两者来确定开关分布。例如,可以判断编码成功率是否达到编码成功率阈值。编码成功率阈值可以是最大编码成功率Pmax。如果达到编码成功率阈值,则可以将当前开关分布确定为针对待测电路211的开关分布。备选地或附加地,可以将一个或多个编码成功率与编码成功率阈值进行比较以确定第一备选开关分布集合。第一备选开关分布集合中的每个备选开关分布具有高于编码成功率阈值的编码成功率。进一步地,可以将第一备选开关分布集合中具有最小稀疏度的备选开关分布确定为针对待测电路211的开关分布。At 606, a switching distribution for the circuit under test 211 may be determined based at least on one or more encoding success rates. In one embodiment, the switch distribution may be determined based on encoding success rate. Additionally, the switch distribution can be determined based on both coding success rate and sparsity. For example, it can be determined whether the encoding success rate reaches the encoding success rate threshold. The coding success rate threshold may be the maximum coding success rate P max . If the encoding success rate threshold is reached, the current switch distribution may be determined as the switch distribution for the circuit under test 211 . Alternatively or additionally, one or more coding success rates may be compared to a coding success rate threshold to determine a first set of alternative switch distributions. Each candidate switch distribution in the first set of candidate switch distributions has a coding success rate that is higher than a coding success rate threshold. Further, the candidate switch distribution with the smallest sparsity in the first candidate switch distribution set may be determined as the switch distribution for the circuit under test 211 .
备选地,如果编码成功率没有达到编码成功率阈值但稀疏度达到稀疏度阈值,则可以将当前开关分布确定为针对待测电路211的开关分布。备选地,如果编码成功率没有达到编码成功率阈值且稀疏度没有达到编码成功率阈值,则可以增加稀疏度。基于经增加的稀疏度,可以确定新的一个或多个备选开关分布并重复步骤604和606,从而确定针对待测电路211的开关分布。Alternatively, if the encoding success rate does not reach the encoding success rate threshold but the sparsity reaches the sparsity threshold, the current switch distribution may be determined as the switch distribution for the circuit under test 211 . Alternatively, if the encoding success rate does not reach the encoding success rate threshold and the sparsity does not reach the encoding success rate threshold, the sparsity may be increased. Based on the increased sparsity, a new one or more candidate switch distributions may be determined and steps 604 and 606 repeated to determine the switch distribution for the circuit under test 211 .
在一些实施例中,利用上述方法600可以分别使用随机策略和确定性(deterministic)策略来确定相应的开关分布。换句话说,可以使用随机策略来确定满足阈值条件的第一开关分布。还可以使用确定性策略来确定满足阈值条件的第二开关分布。可以进一步比较第一开关分布和第二开关分布的编码成功率和稀疏度中的至少一项来确定最终的开关分布。例如,如果第一开关分布和第二开关分布在测试集上的编码成功率的差值大于阈值δ,则选择编码成功率较高的开关分布作为最终的开关分布。相反,如果编码成功率的差值小于阈值δ,则选择稀疏度较小、也即使用更少编码位的开关分布作为最终的开关分布。In some embodiments, the method 600 described above may use a random strategy and a deterministic strategy respectively to determine the corresponding switch distribution. In other words, a random strategy can be used to determine the first switch distribution that satisfies the threshold condition. A deterministic strategy can also be used to determine the second switch distribution that satisfies the threshold condition. At least one of coding success rate and sparsity of the first switch distribution and the second switch distribution may be further compared to determine the final switch distribution. For example, if the difference between the coding success rates of the first switch distribution and the second switch distribution on the test set is greater than the threshold δ, then the switch distribution with a higher coding success rate is selected as the final switch distribution. On the contrary, if the difference in coding success rate is less than the threshold δ, the switch distribution with smaller sparsity, that is, using fewer coding bits, is selected as the final switch distribution.
如上所述,基于所确定的行数目m和列数目n,可以使用随机策略或确定性策略按照均匀粒度确定一个或多个备选开关分布。例如,可以使用随机策略或确定性策略将与N个扫描链耦合的N个开关设置在二维开关矩阵电路中的多个节点处。多个节点可以是二维开关矩阵电路中行与列的节点中的一部分节点。可以基于行数目m和列数目n使用随机策略或确定性策略按照均匀粒度确定二维开关矩阵电路中待设置开关的多个节点。As described above, based on the determined number of rows m and column number n, one or more alternative switch distributions may be determined at uniform granularity using a random strategy or a deterministic strategy. For example, N switches coupled with N scan chains can be placed at multiple nodes in a two-dimensional switch matrix circuit using a random strategy or a deterministic strategy. The plurality of nodes may be some of the nodes in the rows and columns of the two-dimensional switch matrix circuit. Multiple nodes to be switched in the two-dimensional switch matrix circuit may be determined with uniform granularity using a random strategy or a deterministic strategy based on the number of rows m and the number of columns n.
在一些实施例中,基于所确定的多个节点,可以以随机的方式将多个开关设置在多个节点处以确定一个或多个备选开关分布。在一个实施例中,与相应扫描链耦合的每个开关可以被随机地排布在多个节点中的一个节点处。在另一实施例中,还可以以确定性的方式将多个开关设置在多个节点处以确定一个或多个备选开关分布。换句话说,与相应扫描链耦合的每个开关可以按照规则被排布在多个节点中的一个节点处。针对低功耗译码器,规则可以与扫描链的使用频率和使用相关性有关。针对掩码译码器,规则可以与扫描链的X态分布有关。In some embodiments, based on the determined plurality of nodes, a plurality of switches may be placed at a plurality of nodes in a random manner to determine one or more alternative switch distributions. In one embodiment, each switch coupled to a corresponding scan chain may be randomly arranged at one of the plurality of nodes. In another embodiment, multiple switches may also be positioned at multiple nodes in a deterministic manner to determine one or more alternative switch distributions. In other words, each switch coupled to a corresponding scan chain may be arranged at one of the plurality of nodes according to a rule. For low-power decoders, rules can be related to frequency of use and dependency of use of scan chains. For mask decoders, the rules can be related to the X-state distribution of the scan chain.
在一些实施例中,可以将多个开关按照对应的扫描链的使用频率以从中心到外围的螺旋方式设置在多个节点处,以确定一个或多个备选开关分布。多个开关中与多个扫描链中具有最高使用频率的扫描链对应的开关被设置在多个节点中位于中心的节点。具体地,可以基于测试包集合确定的扫描链的激活概率,并且按照激活概率从高到低来将扫描链从中心到外围进行螺旋绕排。In some embodiments, multiple switches may be arranged at multiple nodes in a spiral manner from the center to the periphery according to the usage frequency of the corresponding scan chain to determine one or more alternative switch distributions. Among the plurality of switches, a switch corresponding to the scan chain with the highest usage frequency among the plurality of scan chains is set at a central node among the plurality of nodes. Specifically, the activation probability of the scan chain can be determined based on the test packet set, and the scan chains are spirally arranged from the center to the periphery according to the activation probability from high to low.
备选地或附加地,针对掩码译码器,可以将不含有X态的扫描链排在外围,然后按照扫描链中X态频率从高到低来将扫描链从中心到外围进行螺旋绕排。换句话说,与不含X态的扫描链耦合的开关分布在二维开关矩阵电路的外围,并且与X态频率最高的扫描链耦合的开 关分布在二维开关矩阵电路的中心处的节点。Alternatively or additionally, for the mask decoder, the scan chains that do not contain X states can be arranged at the periphery, and then the scan chains are spirally wound from the center to the periphery according to the frequency of the X states in the scan chain from high to low. Row. In other words, switches coupled to scan chains that do not contain X states are distributed on the periphery of the two-dimensional switch matrix circuit, and switches coupled to scan chains with the highest frequency of The nodes are distributed at the center of the two-dimensional switch matrix circuit.
备选地或附加地,可以将多个开关按照对应的扫描链的使用相关性以从中心到外围的螺旋方式设置在多个节点处,以确定一个或多个备选开关分布。多个开关中在第一方向或第二方向上相邻的两个开关所对应的扫描链的使用相关性大于多个开关中在第一方向或第二方向上不相邻的另两个开关所对应的扫描链的使用相关性。扫描链的使用相关性可以指代每个扫描链与其他扫描链被同时使用的概率。Alternatively or additionally, a plurality of switches may be arranged at a plurality of nodes in a spiral manner from the center to the periphery according to the usage correlation of the corresponding scan chain to determine one or more alternative switch distributions. The usage correlation of the scan chains corresponding to two switches among the plurality of switches that are adjacent in the first direction or the second direction is greater than the usage correlation of the other two switches among the plurality of switches that are not adjacent in the first direction or the second direction. The usage dependency of the corresponding scan chain. The usage correlation of a scan chain can refer to the probability that each scan chain is used simultaneously with other scan chains.
返回至图5的502,通过分析得到的扫描链的移位翻转率和寄存器的捕捉翻转率,可以用于在后续阶段对扫描链的移位功耗和捕捉功耗进行约束。此外,扫描链的移位翻转率和寄存器的捕捉翻转率还可以用于确定时钟门分布。Returning to 502 of FIG. 5 , the shift flip rate of the scan chain and the capture flip rate of the register obtained through analysis can be used to constrain the shift power consumption and capture power consumption of the scan chain in subsequent stages. In addition, the shift toggle rate of the scan chain and the capture toggle rate of the register can also be used to determine the clock gate distribution.
在504,电子设备可以可选地基于扫描链分布和寄存器分布,在针对故障的测试包中添加控制比特。在一个实施例中,电子设备可以针对第一测试故障生成第一初始向量包,并且确定与第一测试故障对应的第一测试比特位集合。例如,针对某个故障,初始向量包包括第一逻辑值序列“1xxxx01xxx”和第二逻辑值序列“xxx11xxxxx”。由于在一些比特位上需要呈现特定逻辑值,因此电子设备可以基于第一测试比特位集合,确定待关闭的时钟集合。例如,电子设备可以使用502中所得到的时钟门分布和和时钟控制比特位集合。当这些特定比特位所对应的时钟被关闭(例如通过将与门的一端设置为0)时,该时钟门所控制的寄存器就会保持该值(因为没有时钟激励来使能该寄存器)。电子设备继而可以基于待关闭的时钟集合,对第一初始向量包进行调整以生成第一测试包。即,电子设备可以设置第一初始向量包中的、用于关闭时钟的时钟门的逻辑值。可以理解,针对不同的故障,可以以类似的方式生成初始向量包并且继而生成相应的测试包,在此不再赘述。At 504, the electronic device may optionally add control bits in the test packet for the fault based on the scan chain distribution and the register distribution. In one embodiment, the electronic device may generate a first initialization vector packet for the first test fault and determine a first set of test bits corresponding to the first test fault. For example, for a certain fault, the initial vector package includes a first logical value sequence "1xxxx01xxx" and a second logical value sequence "xxx11xxxxx". Since some bits need to present specific logic values, the electronic device can determine the clock set to be turned off based on the first test bit set. For example, the electronic device may use the clock gate distribution and clock control bit set obtained in 502. When the clock corresponding to those specific bits is turned off (for example, by setting one end of the AND gate to 0), the register controlled by the clock gate retains that value (because there is no clock stimulus to enable the register). The electronic device may then adjust the first initial vector packet to generate the first test packet based on the set of clocks to be turned off. That is, the electronic device may set the logic value of the clock gate in the first initialization vector packet for turning off the clock. It can be understood that for different faults, the initial vector package can be generated in a similar manner and then the corresponding test package can be generated, which will not be described again here.
通过这样的方式,可以在后续的仿真流程中清楚地知晓所对应的时钟门已经处于关闭状态,从而可以更加精确的计算扫描链的可能的逻辑值翻转率。虽然在此以使用502中分析的时钟门分布和时钟控制比特位集合的方式来关闭特定时钟,但是这仅是示意而非对本公开的范围进行限制。在506,诸如计算机之类的电子设备可以对多个测试包进行测试向量紧缩操作,以生成相应的中间测试向量。可以理解,针对不同的故障,可以生成不同的测试包。例如,针对100个故障,可以生成100个测试包,每个测试包包括针对不同扫描链的测试向量组合。例如,第一测试包可以针对扫描链211-1和扫描链211-3的测试向量组合。该测试向量组合例如可以包括针对扫描链211-1的第一测试向量“10xxxxxx011xxxxxxx”和针对扫描链211-3的第二测试向量“xxxxx1xxxxxxxxxxxx”,其中x表示未知态,即,逻辑值不确定的状态。In this way, it can be clearly known in the subsequent simulation process that the corresponding clock gate is in a closed state, so that the possible logic value flip rate of the scan chain can be calculated more accurately. Although a specific clock is turned off using the clock gate distribution and clock control bit set analyzed in 502, this is only illustrative and does not limit the scope of the present disclosure. At 506, an electronic device such as a computer may perform a test vector compaction operation on the plurality of test packages to generate corresponding intermediate test vectors. It can be understood that different test packages can be generated for different faults. For example, for 100 faults, 100 test packages can be generated, each test package including a combination of test vectors for different scan chains. For example, the first test package may be for the test vector combination of scan chain 211-1 and scan chain 211-3. The test vector combination may include, for example, a first test vector "10xxxxxx011xxxxxxx" for the scan chain 211-1 and a second test vector "xxxxx1xxxxxxxxxxxx" for the scan chain 211-3, where x represents an unknown state, that is, the logical value is uncertain state.
由于测试包的数目和所包含的比特位通常巨大,因此需要对多个测试包进行测试向量紧缩操作以减少测试包的数目和数据量。在一些实施例中,测试向量紧缩包括测试包合并和动态紧缩中的至少一项。在一个实施例中,一个测试包可以表示为1xxx1xx0,而另一个测试包可以表示为1x1xxxx0。考虑逻辑值兼容性之后,两个测试包可以合并为1x1x1xx0。这样,可以减少测试包的数目。可以理解,虽然在此以兼容性为例说明了测试包的合并,但是这仅是示意而非对本公开的范围进行限制。可以使用其它测试包合并的方案。在一些实施例中,一些测试包(例如合并之后的测试包)可能包括许多为“x”的比特位。在此情形下,可以对测试包执行动态紧缩(compact)操作,即,对一些为“x”的比特位填充比特值,以用于测试向量的融合(merge)。Since the number of test packets and the bits they contain are usually huge, test vector compression operations need to be performed on multiple test packets to reduce the number of test packets and the amount of data. In some embodiments, test vector compaction includes at least one of test packet merging and dynamic compaction. In one embodiment, one test packet may be represented as 1xxx1xx0 and another test packet may be represented as 1x1xxxx0. After considering logical value compatibility, the two test packages can be merged into 1x1x1xx0. In this way, the number of test packages can be reduced. It can be understood that although compatibility is taken as an example to illustrate the merging of test packages, this is only illustrative and does not limit the scope of the present disclosure. Other test package merging schemes can be used. In some embodiments, some test packets (eg, merged test packets) may include many "x" bits. In this case, a dynamic compaction operation can be performed on the test packet, that is, some bits of "x" are filled with bit values for merging of test vectors.
在508,电子设备可以对经测试向量紧缩的中间测试包执行功耗检查。在一个实施例中,在执行测试包合并之后,可以对经合并的测试包执行功耗检查。在另一个实施例中,在执行 动态紧缩之后,对经动态紧缩的测试包执行功耗检查。只有当测试向量紧缩后的测试向量在设定的阈值范围之内,这次测试向量紧缩才会被接受,否则测试向量紧缩操作会被取消。即,合并或动态紧缩不被接受。At 508, the electronic device may perform a power consumption check on the test vector compacted intermediate test packet. In one embodiment, after performing test packet merging, a power consumption check may be performed on the merged test packets. In another embodiment, while executing After dynamic compression, a power consumption check is performed on the dynamically compressed test packet. Only when the compressed test vector is within the set threshold range, this test vector compression will be accepted, otherwise the test vector compression operation will be cancelled. That is, merging or dynamic compaction are not accepted.
具体而言,可以通过计算扫描链的寄存器的翻转率来确定功耗,这是因为翻转的数量基本上与测试功耗成比例。如上所述,在测试过程中,存在移位功耗和捕捉功耗这两类功耗。对移位功耗的翻转率fs计算遵循以下计算规则:
Specifically, power consumption can be determined by calculating the toggle rate of a scan chain's registers, since the number of flips is essentially proportional to the test power consumption. As mentioned above, during the test process, there are two types of power consumption: shift power consumption and capture power consumption. The calculation of the flip rate fs for shift power consumption follows the following calculation rules:
其中,n表示整个待测电路211中所含有的扫描链条数,p表示每条开启的扫描链的移位翻转率,p是在电路的预分析阶段通过仿真结果计算得出,对不同的的待测电路,p由电路本身的特性所决定。Among them, n represents the number of scan chains contained in the entire circuit 211 under test, p represents the shift flip rate of each opened scan chain, and p is calculated through simulation results in the pre-analysis stage of the circuit. For different For the circuit under test, p is determined by the characteristics of the circuit itself.
针对捕捉功耗,按照时钟门控制寄存器的多少进行时钟门的关闭,控制寄存器多的时钟门会被优先考虑关闭。换言之,可以按照时钟门控制寄存器的数目来依次尝试关闭时钟并且检测其关闭之后的效果。例如,在每次时钟门关闭之后,根据更新后的测试向量重新计算计算当前待测电路中的逻辑值翻转率,计算的过程会遍历每个时钟门。规则如下:(1)若该时钟门关闭,该时钟门所控制的寄存器的逻辑值则不可翻转,则记这类寄存器的数目为n1;(2)若该时钟门打开,该时钟门所控制的寄存器的逻辑值可能翻转,则记这类寄存器的数目为n2;(3)若该时钟门未定义开启关闭状态,该时钟门所控制的寄存器的逻辑值则可能翻转,则记这类寄存器的数目为n3。整个待测电路211的捕捉翻转率fc计算如下,其中θ表示在电路分析阶段计算的寄存器捕捉阶段逻辑值翻转率:
In order to capture power consumption, clock gates are closed according to the number of clock gate control registers. The clock gates with more control registers will be given priority for closing. In other words, you can try to turn off the clock in sequence according to the number of clock gate control registers and detect the effect after turning it off. For example, after each clock gate is closed, the logic value flip rate in the current circuit under test is recalculated based on the updated test vector, and the calculation process traverses each clock gate. The rules are as follows: (1) If the clock gate is closed, the logic value of the register controlled by the clock gate cannot be flipped, then the number of such registers is recorded as n1; (2) If the clock gate is opened, the logic value of the register controlled by the clock gate cannot be reversed. The logic value of the register may be flipped, then the number of such registers is recorded as n2; (3) If the clock gate does not define the open or closed state, the logic value of the register controlled by the clock gate may be flipped, then the number of such registers is recorded as n2 The number is n3. The capture flip rate fc of the entire circuit under test 211 is calculated as follows, where θ represents the logic value flip rate of the register capture stage calculated during the circuit analysis stage:
在510,电子设备可以基于功耗检查的结果,调整测试包。在一个实施例中,电子设备响应于测试功耗高于第一阈值功耗,至少基于待测电路211的多个扫描链的控制时钟集对第一中间测试向量包进行调整,以生成第二中间测试向量包。在一个实施例中,测试功耗例如包括移位翻转率fs和捕捉翻转率fc中的至少一项,并且第一阈值功耗例如可以是参考翻转率。虽然在此以翻转率来体现测试功耗,但是这仅是示意而非对本公开的范围进行限制。可以使用其他属性或参数来表征测试功耗。控制时钟集例如包括针对各个寄存器的CK端的时钟的比特位集合,其例如可以用于关闭相应时钟。如上所述,在502的预分析阶段,可以获得时钟门分布和时钟控制比特位集合。进一步地,可以基于时钟门分布和时钟控制比特位集合来关闭相应的时钟。At 510, the electronic device may adjust the test package based on the results of the power consumption check. In one embodiment, in response to the test power consumption being higher than the first threshold power consumption, the electronic device adjusts the first intermediate test vector package based on at least a control clock set of multiple scan chains of the circuit under test 211 to generate a second Intermediate test vector package. In one embodiment, the test power consumption includes, for example, at least one of the shift toggle rate fs and the capture toggle rate fc, and the first threshold power consumption may be, for example, the reference toggle rate. Although the test power consumption is represented by the flip rate here, this is only for illustration and does not limit the scope of the present disclosure. Other attributes or parameters can be used to characterize test power consumption. The control clock set includes, for example, a bit set for the clock of the CK end of each register, which may be used to turn off the corresponding clock, for example. As mentioned above, in the pre-analysis stage of 502, the clock gate distribution and the clock control bit set can be obtained. Further, the corresponding clock can be turned off based on the clock gate distribution and the clock control bit set.
在一个实施例中,在移位阶段中,电子设备可以对第一测试向量包和第二测试向量包进行合并,以生成合并测试向量包;确定与合并测试向量包对应的移位功耗;响应于移位功耗不高于第二阈值功耗,对合并测试向量包执行动态紧缩操作以生成第一中间测试向量包。通过首先检测移位功耗并且在移位功耗满足要求的情形下才进行动态紧缩操作,可以排除不符合移位功耗要求的测试向量,从而节省了后续的计算时间,这是因为移位功耗通常难于通过调整测试向量包来使得其满足移位功耗要求。In one embodiment, in the shifting phase, the electronic device may merge the first test vector packet and the second test vector packet to generate a merged test vector packet; determine the shift power consumption corresponding to the merged test vector packet; In response to the shift power consumption not being higher than the second threshold power consumption, a dynamic compaction operation is performed on the merged test vector packet to generate a first intermediate test vector packet. By first detecting the shift power consumption and performing the dynamic compaction operation only when the shift power consumption meets the requirements, test vectors that do not meet the shift power consumption requirements can be eliminated, thereby saving subsequent calculation time. This is because the shift Power Consumption It is often difficult to adjust the test vector package to meet the shift power consumption requirements.
在另一实施例中,在移位之后的捕捉阶段中,电子设备如果确定经测试向量紧缩的合并测试包的功耗高于阈值功耗,则可以对合并测试包进行调整,以避免该测试向量紧缩不被接受而丢弃针对某个故障的测试包。在一个实施例中,电子设备可以使用贪心算法来调整合并测试包,具体如下面参见图7和图8所述。通过在测试向量生成的过程中,特别是在测试向量包紧缩操作阶段,检测经紧缩的中间测试向量包的测试功耗,并且对测试功耗高于阈值的 测试向量包进行调整,可以显著提高测试向量包的利用率。测试向量包是针对各个故障所生成的,因此在更多的测试向量被使用,而不是被舍弃的情形下,可以针对更多的故障对测试电路进行检测。In another embodiment, in the capture phase after shifting, if the electronic device determines that the power consumption of the merged test packet after the test vector compaction is higher than the threshold power consumption, the electronic device may adjust the merged test packet to avoid the test. Vector compaction is not accepted and test packets for a certain fault are dropped. In one embodiment, the electronic device may adjust the merged test package using a greedy algorithm, as described below with reference to Figures 7 and 8. By detecting the test power consumption of the compressed intermediate test vector package during the test vector generation process, especially during the test vector package compression operation stage, and detecting the test power consumption higher than the threshold Adjusting the test vector package can significantly improve the utilization of the test vector package. The test vector package is generated for each fault, so the test circuit can be detected for more faults when more test vectors are used instead of discarded.
图7示出了根据本公开的一些实施例的用于生成测试向量的方法的示意流程图。图7的方法700可以与图6的方法600结合,因此关于方法600描述的各个方面,可以选择性适用于方法700,本公开在此不再赘述。在701,电子设备可以确定目标故障列表。目标故障列表可以由设计人员输入或来自于其它设备,其包括了在仿真中针对待测电路211需要测试的故障。在702,电子设备判断是否针对目标故障列表中的所有故障的测试包都已经生成。在704,如果未完成,则从目标故障列表中挑选未生成测试包的故障,并且针对该故障生成测试包,并且将其加入测试包池。进一步地,还可以在此是在该测试包中添加控制比特,例如参见图5的504所述的控制比特。Figure 7 shows a schematic flow diagram of a method for generating test vectors according to some embodiments of the present disclosure. The method 700 of FIG. 7 can be combined with the method 600 of FIG. 6 , so various aspects described with respect to the method 600 can be selectively applied to the method 700 , and the present disclosure will not be repeated here. At 701, the electronic device can determine a list of target faults. The target fault list may be input by the designer or come from other devices, and includes faults that need to be tested for the circuit under test 211 in the simulation. At 702, the electronic device determines whether test packages for all faults in the target fault list have been generated. At 704, if it is not completed, select a fault for which no test package is generated from the target fault list, generate a test package for the fault, and add it to the test package pool. Further, control bits may also be added to the test packet, such as the control bits described in 504 of FIG. 5 .
在706,可选地,电子设备可以判断测试包池是否已满。可以理解,测试向量的测试包通常包含较多数据,测试包池也会随着测试包的加入而不断变大。通过判断测试包池是否已满,可以确保后续的操作能够正确执行而不至于给电子设备带来较大操作负担。在另一些实施例中,如果诸如计算机之类的电子设备的性能足够强,或者目标故障列表中的故障数目较少,则可以省略步骤706。At 706, optionally, the electronic device can determine whether the test packet pool is full. It is understandable that test packages of test vectors usually contain more data, and the test package pool will continue to grow as test packages are added. By determining whether the test packet pool is full, it can be ensured that subsequent operations can be performed correctly without placing a greater operating burden on the electronic device. In other embodiments, if the performance of the electronic device such as a computer is strong enough or the number of faults in the target fault list is small, step 706 may be omitted.
在708,在测试包池已满的情形下,电子设备可以执行测试包合并并且计算合并后的测试包的功耗。在一个实施例中,电子设备可以将第一测试包和第二测试包合并,并且计算合并后的移位功耗和捕捉功耗。如果移位功耗高于移位阈值功耗,拒绝将第一测试包与第二测试包进行合并,而是选择未经合并的第三测试包与第一测试包进行合并。如果移位功耗不高于移位阈值功耗,则进行捕捉功耗的判断。如果捕捉功耗不高于捕捉阈值功耗,则可以接受合并。如果捕捉功耗高于阈值功耗,则可以对合并测试包进行测试向量调整。例如,适量关闭一些时钟门以满足捕捉功耗的要求。如上所述,响应于测试功耗高于捕捉阈值功耗,对第一中间测试向量包中的第一时钟比特位集合进行调整,经调整的第一时钟比特位集合用于关闭控制时钟集合中的第一时钟,控制时钟集合用于控制多个扫描链中的寄存器,第一时钟是控制时钟集合中控制最多寄存器的时钟;以及响应于与经调整的第一中间测试向量包对应的捕捉功耗不高于第一阈值功耗,将经调整的第一中间测试向量包确定为第二中间测试向量包。通过调整中间测试向量包的时钟比特位,可以关闭一些时钟。由于时钟被关闭,扫描链中被配置为接收该时钟的寄存器因此无法改变其逻辑值。相应地,可以减少扫描链中的寄存器的逻辑值被翻转的数目,从而降低捕捉功耗。At 708, in the event that the test packet pool is full, the electronic device may perform test packet merging and calculate the power consumption of the merged test packets. In one embodiment, the electronic device may combine the first test packet and the second test packet, and calculate the combined shift power consumption and capture power consumption. If the shift power consumption is higher than the shift threshold power consumption, the first test packet and the second test packet are refused to be merged, and an unmerged third test packet is selected to be merged with the first test packet. If the shift power consumption is not higher than the shift threshold power consumption, a determination of capture power consumption is made. Merging is acceptable if the capture power consumption is not higher than the capture threshold power consumption. If the capture power consumption is higher than the threshold power consumption, test vector adjustments can be made to the merged test package. For example, close some clock gates appropriately to meet the requirements of capturing power consumption. As described above, in response to the test power consumption being higher than the capture threshold power consumption, the first clock bit set in the first intermediate test vector packet is adjusted, and the adjusted first clock bit set is used in the shutdown control clock set a first clock, a set of control clocks for controlling registers in a plurality of scan chains, the first clock being a clock in the set of control clocks that controls the most registers; and in response to the capture function corresponding to the adjusted first intermediate test vector packet If the power consumption is not higher than the first threshold power consumption, the adjusted first intermediate test vector packet is determined as the second intermediate test vector packet. Some clocks can be turned off by adjusting the clock bits in the intermediate test vector packets. Because the clock is turned off, registers in the scan chain that are configured to receive this clock cannot change their logic values. Correspondingly, the number of flipped logic values of registers in the scan chain can be reduced, thereby reducing capture power consumption.
如果无法通过调整来使得合并测试包的捕捉功耗低于捕捉功耗阈值,则可以拒绝第二测试包,而是使用第三测试包与第一测试包合并。可以理解,第三测试包和第一测试包的合并、功耗判断和比较与上面针对第一测试包和第二测试包所述的情形相似,在此不赘述。可以理解,针对测试包池中的所有测试包都可以使用贪心算法依次合并,直至所有测试包都已经被合并或被拒绝合并。If the capture power consumption of the merged test packet cannot be adjusted to be lower than the capture power consumption threshold, the second test packet may be rejected and the third test packet may be used to merge with the first test packet. It can be understood that the merging, power consumption judgment and comparison of the third test package and the first test package are similar to the situations described above for the first test package and the second test package, and will not be described again here. It can be understood that all test packages in the test package pool can be merged sequentially using a greedy algorithm until all test packages have been merged or are refused to be merged.
在710,与708类似,电子设备可以对测试包,例如经合并的测试包,执行如上所述的动态紧缩的操作,并且计算动态紧缩后的测试包的移位功耗、捕捉功耗是否满足相应功耗要求。仅在满足功耗要求的情形下,接受动态紧缩。进一步地,在捕捉功耗不满足要求的情形下,可以类似地关闭一些时钟门来调整,从而降低捕捉功耗。At 710, similar to 708, the electronic device can perform the dynamic compression operation as described above on the test package, such as the merged test package, and calculate the shift power consumption of the dynamically compressed test package and capture whether the power consumption satisfies Corresponding power consumption requirements. Dynamic compression is only accepted if power requirements are met. Further, when the capture power consumption does not meet the requirements, some clock gates can be similarly closed for adjustment, thereby reducing the capture power consumption.
可以理解,在708和710的情形下,在动态紧缩之后的扫描链的逻辑值在后续移位过程中,因为一些赋值而存在移位翻转率超过阈值翻转率的情形,因此可以针对调整之后的扫描 链的移位功耗再进行一次移位功耗检测和判断。It can be understood that in the case of 708 and 710, in the subsequent shifting process of the logical value of the scan chain after dynamic compression, the shift flip rate exceeds the threshold flip rate due to some assignments, so it can be adjusted for scanning The shift power consumption of the chain is detected and judged again.
虽然在上面以先执行708后执行710的顺序描述了测试向量紧缩,但是可以理解这仅是示意而非对本公开的范围进行限制。在一些实施例中,可以仅存在708和710中的任一项。在另一些实施例中,可以先执行710的步骤再执行708的步骤,本公开对此不进行限制。在712,电子设备可以进行仿真,对经测试向量紧缩的测试包集合进行分析,并且丢弃不合格的测试向量包。Although the test vector compaction is described above in the order of executing 708 first and then executing 710, it can be understood that this is only illustrative and does not limit the scope of the present disclosure. In some embodiments, only either 708 or 710 may be present. In other embodiments, step 710 may be performed first and then step 708, and this disclosure does not limit this. At 712, the electronic device may perform simulation, analyze the test vector compacted set of test packets, and discard failed test vector packets.
图8示出了根据本公开的一些实施例的用于确定测试功耗的方法800的示意流程图。图8的方法800可以与图6的方法600和/或图7的方法700结合,因此关于方法600或700描述的各个方面,可以选择性适用于方法800,本公开在此不再赘述。如上所述,测试功耗基本上与扫描链中的存储器的逻辑值的翻转率成比例。在802,电子设备可以首先计算针对测试包的扫描链的移位翻转率,如上面的式子(6)所示。在804,由于捕捉功耗超过阈值,可以适量关闭第一时钟集,来进一步降低捕捉功耗。可以理解,扫描链的寄存器中的CK端口的时钟被关闭的情形下,寄存器的Q端的输出将不再改变。也即,时钟被关闭的寄存器的输出值将不会翻转,因此也降低了整体的翻转率,从而降低捕捉功耗。在806,电子设备可以计算关闭第一时钟集之后的移位翻转率。可以理解,由于需要关闭第一时钟集,因此多个扫描链中的一些寄存器需要被赋予一些逻辑值来关闭第一时钟集。在此情形下,测试包中的测试向量可能会改变,这会导致在移位过程中的移位翻转率的改变。因此,通过计算关闭第一时钟集之后的移位翻转率,可以避免移位功耗超阈值的情形的发生。Figure 8 illustrates a schematic flow diagram of a method 800 for determining test power consumption in accordance with some embodiments of the present disclosure. The method 800 of FIG. 8 can be combined with the method 600 of FIG. 6 and/or the method 700 of FIG. 7 , so various aspects described with respect to the method 600 or 700 can be selectively applied to the method 800, and the present disclosure will not be repeated here. As mentioned above, test power consumption is essentially proportional to the toggle rate of the logic values of the memory in the scan chain. At 802, the electronic device may first calculate the shift flip rate for the scan chain of the test packet, as shown in equation (6) above. At 804, since the capture power consumption exceeds the threshold, the first clock set can be turned off appropriately to further reduce the capture power consumption. It can be understood that when the clock of the CK port in the register of the scan chain is turned off, the output of the Q port of the register will no longer change. That is, the output value of the register whose clock is turned off will not flip, thus reducing the overall flip rate and thus reducing the capture power consumption. At 806, the electronic device can calculate the shift toggle rate after turning off the first clock set. It can be understood that since the first clock set needs to be turned off, some registers in the multiple scan chains need to be assigned some logical values to turn off the first clock set. In this case, the test vectors in the test packet may change, which results in a change in the shift flip rate during the shift process. Therefore, by calculating the shift flip rate after turning off the first clock set, it is possible to avoid the occurrence of a situation where the shift power consumption exceeds the threshold.
图9示出了根据本公开的一些实施例的电子设备900的示意性框图。电子设备900可以包括多个模块,以用于执行如图5-图8中所讨论的方法中的对应步骤。如图9所示,电子设备900包括生成单元902、测试功耗确定单元904、调整单元906和目标测试向量包确定单元908。生成单元902被配置为对第一测试向量包和第二测试向量包执行测试向量包紧缩操作,以生成第一中间测试向量包,第一测试向量包和第二测试向量包用于对待测电路进行测试。测试功耗确定单元904被配置为确定与第一中间测试向量包对应的测试功耗。调整单元906被配置为响应于测试功耗高于第一阈值功耗,至少基于待测电路的多个扫描链的控制时钟集对第一中间测试向量包进行调整,以生成第二中间测试向量包,控制时钟集用于控制多个扫描链中的多个寄存器。目标测试向量包确定单元908被配置为响应于经调整的第二中间测试向量包不高于第一阈值功耗,基于第二中间测试向量包,确定目标测试向量包。通过在测试向量生成的过程中,特别是在测试向量包紧缩操作阶段,检测经紧缩的中间测试向量包的测试功耗,并且对测试功耗高于阈值的测试向量包进行调整,可以显著提高测试向量包的利用率。测试向量包是针对各个故障所生成的,因此在更多的测试向量被使用,而不是被舍弃的情形下,可以针对更多的故障对测试电路进行检测。Figure 9 shows a schematic block diagram of an electronic device 900 in accordance with some embodiments of the present disclosure. The electronic device 900 may include a plurality of modules for performing corresponding steps in the methods discussed in FIGS. 5-8 . As shown in FIG. 9 , the electronic device 900 includes a generation unit 902 , a test power consumption determination unit 904 , an adjustment unit 906 and a target test vector packet determination unit 908 . The generation unit 902 is configured to perform a test vector packet compaction operation on the first test vector packet and the second test vector packet to generate a first intermediate test vector packet, and the first test vector packet and the second test vector packet are used for the circuit under test. carry out testing. The test power consumption determining unit 904 is configured to determine the test power consumption corresponding to the first intermediate test vector packet. The adjustment unit 906 is configured to adjust the first intermediate test vector package based on at least the control clock set of the plurality of scan chains of the circuit under test in response to the test power consumption being higher than the first threshold power consumption to generate a second intermediate test vector. Package,Control Clock Set is used to control multiple registers in,multiple scan chains. The target test vector packet determination unit 908 is configured to determine the target test vector packet based on the second intermediate test vector packet in response to the adjusted second intermediate test vector packet not being higher than the first threshold power consumption. By detecting the test power consumption of the compressed intermediate test vector package during the test vector generation process, especially during the test vector package compression operation stage, and adjusting the test vector package whose test power consumption is higher than the threshold, it can be significantly improved. Test vector package utilization. The test vector package is generated for each fault, so the test circuit can be detected for more faults when more test vectors are used instead of discarded.
在一些实施例中,生成单元902被进一步配置为:对第一测试向量包和第二测试向量包进行合并,以生成合并测试向量包;确定与合并测试向量包对应的移位功耗;响应于移位功耗不高于第二阈值功耗,对合并测试向量包执行动态紧缩操作以生成第一中间测试向量包。通过首先检测移位功耗并且在移位功耗满足要求的情形下才进行动态紧缩操作,可以排除不符合移位功耗要求的测试向量,从而节省了后续的计算时间,这是因为移位功耗通常难于通过调整测试向量包来使得其满足移位功耗要求。In some embodiments, the generating unit 902 is further configured to: merge the first test vector packet and the second test vector packet to generate a merged test vector packet; determine the shift power consumption corresponding to the merged test vector packet; respond When the shift power consumption is not higher than the second threshold power consumption, a dynamic compression operation is performed on the combined test vector packet to generate a first intermediate test vector packet. By first detecting the shift power consumption and performing the dynamic compaction operation only when the shift power consumption meets the requirements, test vectors that do not meet the shift power consumption requirements can be eliminated, thereby saving subsequent calculation time. This is because the shift Power Consumption It is often difficult to adjust the test vector package to meet the shift power consumption requirements.
在一些实施例中,生成单元902被进一步配置为:对第一测试向量包和第二测试向量包进行合并,以生成合并测试向量包;确定与合并测试向量包对应的移位功耗;响应于移位功耗不高于第二阈值功耗,对合并测试向量包执行动态紧缩操作以生成第一中间测试向量包。 通过首先检测移位功耗并且在移位功耗满足要求的情形下才进行动态紧缩操作,可以排除不符合移位功耗要求的测试向量,从而节省了后续的计算时间,这是因为移位功耗通常难于通过调整测试向量包来使得其满足移位功耗要求。In some embodiments, the generating unit 902 is further configured to: merge the first test vector packet and the second test vector packet to generate a merged test vector packet; determine the shift power consumption corresponding to the merged test vector packet; respond When the shift power consumption is not higher than the second threshold power consumption, a dynamic compression operation is performed on the combined test vector packet to generate a first intermediate test vector packet. By first detecting the shift power consumption and performing the dynamic compaction operation only when the shift power consumption meets the requirements, test vectors that do not meet the shift power consumption requirements can be eliminated, thereby saving subsequent calculation time. This is because the shift Power Consumption It is often difficult to adjust the test vector package to meet the shift power consumption requirements.
在一些实施例中,测试功耗确定单元904被进一步配置为:确定与第一中间测试向量包对应的多个扫描链的捕捉翻转率;以及调整单元906被进一步配置为包括:响应于捕捉翻转率高于捕捉阈值翻转率,至少基于待测电路的多个扫描链的控制时钟集对第一中间测试向量包进行调整,以生成第二中间测试向量包。通过检测捕捉翻转率,可以以简易的方式确定测试功耗。In some embodiments, the test power consumption determination unit 904 is further configured to: determine capture toggle rates for the plurality of scan chains corresponding to the first intermediate test vector packet; and the adjustment unit 906 is further configured to include: in response to the capture toggle If the rate is higher than the capture threshold flip rate, the first intermediate test vector packet is adjusted based on at least a control clock set of the plurality of scan chains of the circuit under test to generate a second intermediate test vector packet. By detecting the capture toggle rate, the test power consumption can be determined in a simple way.
在一些实施例中,生成单元902被进一步配置为:确定与合并测试向量包对应的多个扫描链的移位翻转率;以及响应于移位翻转率不高于移位阈值翻转率,对合并测试向量包执行动态紧缩操作以生成第一中间测试向量包。通过检测移位翻转率,可以以简易的方式确定测试功耗。In some embodiments, the generation unit 902 is further configured to: determine shift flip rates of the plurality of scan chains corresponding to the merged test vector packet; and in response to the shift flip rate being not higher than the shift threshold flip rate, the merge The test vector package performs a dynamic compaction operation to generate a first intermediate test vector package. By detecting the shift toggle rate, the test power consumption can be determined in a simple way.
在一些实施例中,调整单元906被进一步配置为:响应于测试功耗高于第一阈值功耗,对第一中间测试向量包中的第一时钟比特位集合进行调整,经调整的第一时钟比特位集合用于关闭控制时钟集合中的第一时钟,控制时钟集合用于控制多个扫描链中的寄存器,第一时钟是控制时钟集合中控制最多寄存器的时钟;以及响应于与经调整的第一中间测试向量包对应的捕捉功耗不高于第一阈值功耗,将经调整的第一中间测试向量包确定为第二中间测试向量包。通过调整中间测试向量包的时钟比特位,可以关闭一些时钟。由于时钟被关闭,扫描链中被配置为接收该时钟的寄存器因此无法改变其逻辑值。相应地,可以减少扫描链中的寄存器的逻辑值被翻转的数目,从而降低捕捉功耗。In some embodiments, the adjustment unit 906 is further configured to: in response to the test power consumption being higher than the first threshold power consumption, adjust the first clock bit set in the first intermediate test vector packet, and the adjusted first a set of clock bits for turning off a first clock in a set of control clocks, the set of control clocks being used to control registers in multiple scan chains, the first clock being a clock that controls the most registers in the set of control clocks; and in response to the adjusted The capture power consumption corresponding to the first intermediate test vector packet is not higher than the first threshold power consumption, and the adjusted first intermediate test vector packet is determined as the second intermediate test vector packet. Some clocks can be turned off by adjusting the clock bits in the intermediate test vector packets. Because the clock is turned off, registers in the scan chain that are configured to receive this clock cannot change their logic values. Correspondingly, the number of flipped logic values of registers in the scan chain can be reduced, thereby reducing capture power consumption.
在一些实施例中,生成单元902被进一步配置为:针对第一测试故障生成第一初始向量包;确定与第一测试故障对应的第一测试比特位集合;基于第一测试比特位集合,确定待关闭的时钟集合;以及基于待关闭的时钟集合,对第一初始向量包进行调整以生成第一测试向量包。在针对故障的测试过程中,如果针对某个故障需要关闭一个时钟门,可以使用与该时钟门对应的赋值组合来进行该时钟门的关闭。通过这样的方式,可以在后续的仿真流程中清楚地知晓所对应的时钟门已经处于关闭状态,从而可以更加精确的计算扫描链的可能的逻辑值翻转率。In some embodiments, the generating unit 902 is further configured to: generate a first initial vector packet for the first test fault; determine a first test bit set corresponding to the first test fault; determine based on the first test bit set, a set of clocks to be turned off; and based on the set of clocks to be turned off, adjusting the first initial vector package to generate a first test vector package. During fault testing, if a clock gate needs to be closed for a certain fault, the assignment combination corresponding to the clock gate can be used to close the clock gate. In this way, it can be clearly known in the subsequent simulation process that the corresponding clock gate is in a closed state, so that the possible logic value flip rate of the scan chain can be calculated more accurately.
在一些实施例中,电子设备900还包括:分布确定单元,被配置为基于用于表示待测电路的网表数据和针对待测电路的样本测试向量集,确定用于控制多个扫描链的时钟门分布和时钟控制比特位集合,时钟门分布表示多个时钟门与其分别控制的多个扫描链中的寄存器之间的对应关系,时钟门被配置为基于所接收的时钟控制比特位集合中的时钟控制比特位来关闭与时钟门对应的寄存器。在预分析阶段,可以对原始的待测电路进行少量的ATPG和仿真。在这个流程结束之后,可以获得待测电路中所使用到的扫描链分布和寄存器分布。通过对这些扫描链分布和寄存器分布的进一步分析,可以获得时钟门分布。时钟门分布可以在后续的针对故障的测试向量生成中,用于关闭时钟门,从而更加精确的计算扫描链的可能的逻辑值翻转率。In some embodiments, the electronic device 900 further includes: a distribution determination unit configured to determine, based on the netlist data used to represent the circuit under test and the sample test vector set for the circuit under test, for controlling the plurality of scan chains. Clock gate distribution and clock control bit set. Clock gate distribution represents the correspondence between multiple clock gates and registers in multiple scan chains that they control respectively. The clock gate is configured to be based on the received clock control bit set. The clock control bit is used to close the register corresponding to the clock gate. In the pre-analysis stage, a small amount of ATPG and simulation can be performed on the original circuit under test. After this process is completed, the scan chain distribution and register distribution used in the circuit under test can be obtained. Through further analysis of these scan chain distributions and register distributions, the clock gate distribution can be obtained. The clock gate distribution can be used to close the clock gate in the subsequent test vector generation for faults, thereby more accurately calculating the possible logic value flip rate of the scan chain.
在一些实施例中,电子设备900还被配置为使用网表数据和样本测试向量集进行仿真,以确定针对待测电路的低功耗电路、多个扫描链中每个扫描链的逻辑值移位过程中的翻转率和多个扫描链中的每个寄存器在逻辑值捕捉阶段中的逻辑值翻转率中的至少一项。在一些实施例中,分布确定单元被进一步配置为基于网表数据和样本测试向量集,确定扫描链分布,扫描链分布表示多个扫描链中的在自动向量测试生成过程中所使用到的扫描链;基于网表数 据和样本测试向量集,确定寄存器分布,寄存器分布表示多个扫描链中的多个寄存器中的在自动向量测试生成过程中所使用到的寄存器;以及基于扫描链分布和寄存器分布,确定时钟门分布和时钟控制比特位集合。通过分析获得上述数据,可以生成低功耗控制电路,该低功耗控制电路可以具有改进的编码能力并且使用更少的编码位。此外,通过分析得到的扫描链的移位翻转率和寄存器的捕捉翻转率,可以用于在后续阶段对扫描链的移位功耗和捕捉功耗进行约束。此外,扫描链的移位翻转率和寄存器的捕捉翻转率还可以用于确定时钟门分布。In some embodiments, the electronic device 900 is further configured to perform simulation using the netlist data and the sample test vector set to determine the logic value shift for each of the plurality of scan chains for the low power circuit of the circuit under test. At least one of: a toggle rate in a bit process and a logic value toggle rate in a logic value capture stage for each register in the plurality of scan chains. In some embodiments, the distribution determination unit is further configured to determine a scan chain distribution based on the netlist data and the sample test vector set, the scan chain distribution representing the scans used in the automatic vector test generation process among the plurality of scan chains. chain; based on netlist number According to the sample test vector set, the register distribution is determined. The register distribution represents the registers used in the automatic vector test generation process among the multiple registers in multiple scan chains; and based on the scan chain distribution and register distribution, the clock gate is determined Collection of distribution and clock control bits. By analyzing the above data, a low-power control circuit can be generated that can have improved encoding capabilities and use fewer encoding bits. In addition, the shift flip rate of the scan chain and the capture flip rate of the register obtained through analysis can be used to constrain the shift power consumption and capture power consumption of the scan chain in subsequent stages. In addition, the shift toggle rate of the scan chain and the capture toggle rate of the register can also be used to determine the clock gate distribution.
图10示出了可以用来实施本公开的实施例的示例设备1000的示意性框图。如图所示,设备1000包括计算单元1001,其可以根据存储在随机存取存储器(RAM)和/或只读存储器(ROM)1002的计算机程序指令或者从存储单元1008加载到RAM 1003和/或ROM 1002中的计算机程序指令,来执行各种适当的动作和处理。在RAM 1003和/或ROM 1002中,还可存储设备1000操作所需的各种程序和数据。计算单元1001和RAM 1003和/或ROM 1002通过总线1004彼此相连。输入/输出(I/O)接口1005也连接至总线1004。Figure 10 shows a schematic block diagram of an example device 1000 that may be used to implement embodiments of the present disclosure. As shown, device 1000 includes a computing unit 1001 that may be loaded into RAM 1003 and/or from storage unit 1008 in accordance with computer program instructions stored in random access memory (RAM) and/or read only memory (ROM) 1002 Computer program instructions in ROM 1002 to perform various appropriate actions and processes. In RAM 1003 and/or ROM 1002, various programs and data required for operation of device 1000 may also be stored. The computing unit 1001 and the RAM 1003 and/or ROM 1002 are connected to each other via a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
设备1000中的多个部件连接至I/O接口1005,包括:输入单元1006,例如键盘、鼠标等;输出单元1007,例如各种类型的显示器、扬声器等;存储单元1008,例如磁盘、光盘等;以及通信单元1009,例如网卡、调制解调器、无线通信收发机等。通信单元1009允许设备1000通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the device 1000 are connected to the I/O interface 1005, including: input unit 1006, such as a keyboard, mouse, etc.; output unit 1007, such as various types of displays, speakers, etc.; storage unit 1008, such as a magnetic disk, optical disk, etc. ; and communication unit 1009, such as a network card, modem, wireless communication transceiver, etc. The communication unit 1009 allows the device 1000 to exchange information/data with other devices through computer networks such as the Internet and/or various telecommunications networks.
计算单元1001可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元1001的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元1001执行上文所描述的各个方法和处理,例如方法500、600、700或800。例如,在一些实施例中,方法500、600、700或800可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元1008。在一些实施例中,计算机程序的部分或者全部可以经由RAM和/或ROM和/或通信单元1009而被载入和/或安装到设备1000上。当计算机程序加载到RAM和/或ROM并由计算单元1001执行时,可以执行上文描述的方法300的一个或多个步骤。备选地,在其他实施例中,计算单元1001可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行方法500、600、700或800。Computing unit 1001 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processing processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1001 performs various methods and processes described above, such as methods 500, 600, 700 or 800. For example, in some embodiments, method 500, 600, 700, or 800 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1000 via RAM and/or ROM and/or communication unit 1009 . When a computer program is loaded into RAM and/or ROM and executed by computing unit 1001, one or more steps of method 300 described above may be performed. Alternatively, in other embodiments, computing unit 1001 may be configured to perform method 500, 600, 700 or 800 in any other suitable manner (eg, by means of firmware).
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that the program codes, when executed by the processor or controller, cause the functions specified in the flowcharts and/or block diagrams/ The operation is implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of this disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, laptop disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限 于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。The various embodiments of the present disclosure have been described above. The above description is illustrative, not exhaustive, and is not limiting. in each of the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。 Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims (19)

  1. 一种用于生成测试向量的方法,包括:A method for generating test vectors consisting of:
    对第一测试包和第二测试包执行测试向量紧缩操作,以生成第一中间测试包,所述第一测试包和所述第二测试包用于对待测电路进行测试;Perform a test vector compaction operation on the first test package and the second test package to generate a first intermediate test package, the first test package and the second test package being used to test the circuit under test;
    确定与所述第一中间测试包对应的测试功耗;Determine the test power consumption corresponding to the first intermediate test package;
    响应于所述测试功耗高于第一阈值功耗,至少基于所述待测电路的多个扫描链的控制时钟集对所述第一中间测试包进行调整,以生成第二中间测试包,所述控制时钟集用于控制所述多个扫描链中的多个寄存器;以及In response to the test power consumption being higher than the first threshold power consumption, adjusting the first intermediate test package based on at least a control clock set of a plurality of scan chains of the circuit under test to generate a second intermediate test package, The control clock set is used to control a plurality of registers in the plurality of scan chains; and
    响应于经调整的第二中间测试包不高于第一阈值功耗,基于所述第二中间测试包,确定目标测试包。In response to the adjusted second intermediate test packet being no higher than the first threshold power consumption, a target test packet is determined based on the second intermediate test packet.
  2. 根据权利要求1所述的方法,其中生成所述第一中间测试包包括:The method of claim 1, wherein generating the first intermediate test package includes:
    对所述第一测试包和所述第二测试包进行合并,以生成合并测试包;Merge the first test package and the second test package to generate a merged test package;
    确定与所述合并测试包对应的移位功耗;Determine the shift power consumption corresponding to the combined test package;
    响应于所述移位功耗不高于第二阈值功耗,对所述合并测试包执行动态紧缩操作以生成所述第一中间测试包。In response to the shift power consumption not being higher than the second threshold power consumption, a dynamic compaction operation is performed on the merged test packet to generate the first intermediate test packet.
  3. 根据权利要求1或2所述的方法,其中确定与所述第一中间测试包对应的测试功耗包括:确定与所述第一中间测试包对应的多个扫描链的捕捉翻转率;以及The method of claim 1 or 2, wherein determining the test power consumption corresponding to the first intermediate test packet includes: determining capture flip rates of a plurality of scan chains corresponding to the first intermediate test packet; and
    生成所述第二中间测试包括:响应于所述捕捉翻转率高于捕捉阈值翻转率,至少基于所述待测电路的多个扫描链的控制时钟集对所述第一中间测试包进行调整,以生成第二中间测试包。Generating the second intermediate test includes adjusting the first intermediate test package based on at least a set of control clocks for a plurality of scan chains of the circuit under test in response to the capture toggle rate being greater than a capture threshold toggle rate, to generate a second intermediate test package.
  4. 根据权利要求2或3所述的方法,其中确定与所述合并测试包对应的移位功耗包括:确定与所述合并测试包对应的多个扫描链的移位翻转率;以及The method according to claim 2 or 3, wherein determining the shift power consumption corresponding to the merged test packet includes: determining shift flip rates of a plurality of scan chains corresponding to the merged test packet; and
    生成所述第一中间测试包括:响应于所述移位翻转率不高于移位阈值翻转率,对所述合并测试包执行动态紧缩操作以生成所述第一中间测试包。Generating the first intermediate test includes performing a dynamic compaction operation on the merged test packet to generate the first intermediate test packet in response to the shift toggle rate being not higher than a shift threshold toggle rate.
  5. 根据权利要求1-4中任一项所述的方法,其中生成所述第二中间测试包括:The method of any one of claims 1-4, wherein generating the second intermediate test includes:
    响应于所述测试功耗高于第一阈值功耗,对所述第一中间测试包中的第一时钟比特位集合进行调整,所述经调整的第一时钟比特位集合用于关闭控制时钟集合中的第一时钟,所述控制时钟集合用于控制所述多个扫描链中的寄存器,所述第一时钟是所述控制时钟集合中控制最多寄存器的时钟;以及In response to the test power consumption being higher than the first threshold power consumption, adjusting a first clock bit set in the first intermediate test packet, the adjusted first clock bit set being used to turn off the control clock A first clock in a set, the control clock set is used to control registers in the plurality of scan chains, the first clock is the clock that controls the most registers in the control clock set; and
    响应于与经调整的第一中间测试包对应的捕捉功耗不高于所述第一阈值功耗,将经调整的第一中间测试包确定为所述第二中间测试包。In response to the captured power consumption corresponding to the adjusted first intermediate test packet being not higher than the first threshold power consumption, the adjusted first intermediate test packet is determined to be the second intermediate test packet.
  6. 根据权利要求1-5中任一项所述的方法,还包括:The method according to any one of claims 1-5, further comprising:
    针对第一测试故障生成所述第一初始向量包;Generate the first initialization vector packet for the first test fault;
    确定与所述第一测试故障对应的第一测试比特位集合;Determine a first test bit set corresponding to the first test fault;
    基于所述第一测试比特位集合,确定待关闭的时钟集合;以及Based on the first set of test bits, determine a set of clocks to be turned off; and
    基于所述待关闭的时钟集合,对所述第一初始向量包进行调整以生成所述第一测试包。Based on the set of clocks to be turned off, the first initialization vector packet is adjusted to generate the first test packet.
  7. 根据权利要求1-6中任一项所述的方法,还包括:The method according to any one of claims 1-6, further comprising:
    基于用于表示所述待测电路的网表数据和针对所述待测电路的样本测试向量集,确定用于控制多个扫描链的时钟门分布和时钟控制比特位集合,所述时钟门分布表示多个时钟门与其分别控制的多个扫描链中的寄存器之间的对应关系,所述时钟门被配置为基于所接收的时 钟控制比特位集合中的时钟控制比特位来关闭与所述时钟门对应的寄存器。Based on the netlist data used to represent the circuit under test and the sample test vector set for the circuit under test, a clock gate distribution and a clock control bit set for controlling multiple scan chains are determined, the clock gate distribution Represents the corresponding relationship between multiple clock gates and registers in multiple scan chains that they respectively control, and the clock gate is configured to be based on the received clock The clock control bit in the clock control bit set is used to close the register corresponding to the clock gate.
  8. 根据权利要求7所述的方法,其中确定用于控制多个扫描链的时钟门分布和时钟控制比特位集合包括:The method of claim 7, wherein determining a clock gate distribution and a set of clock control bits for controlling multiple scan chains includes:
    基于所述网表数据和所述样本测试向量集,确定扫描链分布,所述扫描链分布表示多个扫描链中的在自动向量测试生成过程中所使用到的扫描链;Based on the netlist data and the sample test vector set, determine a scan chain distribution, where the scan chain distribution represents a scan chain used in the automatic vector test generation process among multiple scan chains;
    基于所述网表数据和所述样本测试向量集,确定寄存器分布,所述寄存器分布表示多个扫描链中的多个寄存器中的在自动向量测试生成过程中所使用到的寄存器;以及Determine a register distribution based on the netlist data and the sample test vector set, the register distribution representing a register used in an automatic vector test generation process among a plurality of registers in a plurality of scan chains; and
    基于所述扫描链分布和所述寄存器分布,确定所述时钟门分布和所述时钟控制比特位集合。Based on the scan chain distribution and the register distribution, the clock gate distribution and the clock control bit set are determined.
  9. 一种计算机可读存储介质,存储多个程序,所述多个程序被配置为一个或多个处理器执行,所述多个程序包括用于执行权利要求1-8中任一项所述的方法的指令。A computer-readable storage medium storing a plurality of programs configured to be executed by one or more processors, the plurality of programs including a method for executing the method described in any one of claims 1-8. Method instructions.
  10. 一种计算机程序产品,所述计算机程序产品包括多个程序,所述多个程序被配置为一个或多个处理器执行,所述多个程序包括用于执行权利要求1-8中任一项所述的方法的指令。A computer program product comprising a plurality of programs configured to be executed by one or more processors, the plurality of programs including a program for executing any one of claims 1-8 instructions for the method described.
  11. 一种电子设备,包括:An electronic device including:
    一个或多个处理器;one or more processors;
    包括计算机指令的存储器,所述计算机指令在由所述电子设备的所述一个或多个处理器执行时使得所述电子设备执行权利要求1-8中任一项所述的方法。A memory comprising computer instructions that when executed by the one or more processors of the electronic device cause the electronic device to perform the method of any one of claims 1-8.
  12. 一种电子设备,包括:An electronic device including:
    生成单元,被配置为对第一测试包和第二测试包执行测试向量紧缩操作,以生成第一中间测试包,所述第一测试包和所述第二测试包用于对待测电路进行测试;a generating unit configured to perform a test vector compaction operation on the first test package and the second test package to generate a first intermediate test package, the first test package and the second test package being used to test the circuit under test ;
    测试功耗确定单元,被配置为确定与所述第一中间测试包对应的测试功耗;a test power consumption determination unit configured to determine the test power consumption corresponding to the first intermediate test package;
    调整单元,被配置为响应于所述测试功耗高于第一阈值功耗,至少基于所述待测电路的多个扫描链的控制时钟集对所述第一中间测试包进行调整,以生成第二中间测试包,所述控制时钟集用于控制所述多个扫描链中的多个寄存器;以及an adjustment unit configured to, in response to the test power consumption being higher than a first threshold power consumption, adjust the first intermediate test package based on at least a control clock set of a plurality of scan chains of the circuit under test to generate A second intermediate test package, the control clock set is used to control multiple registers in the multiple scan chains; and
    目标测试包确定单元,被配置为响应于经调整的第二中间测试包不高于第一阈值功耗,基于所述第二中间测试包,确定目标测试包。The target test packet determining unit is configured to determine the target test packet based on the second intermediate test packet in response to the adjusted second intermediate test packet not being higher than the first threshold power consumption.
  13. 根据权利要求12所述的电子设备,其中所述生成单元被进一步配置为:The electronic device of claim 12, wherein the generating unit is further configured to:
    对所述第一测试包和所述第二测试包进行合并,以生成合并测试包;Merge the first test package and the second test package to generate a merged test package;
    确定与所述合并测试包对应的移位功耗;Determine the shift power consumption corresponding to the combined test package;
    响应于所述移位功耗不高于第二阈值功耗,对所述合并测试包执行动态紧缩操作以生成所述第一中间测试包。In response to the shift power consumption not being higher than the second threshold power consumption, a dynamic compaction operation is performed on the merged test packet to generate the first intermediate test packet.
  14. 根据权利要求12或13所述的电子设备,其中所述测试功耗确定单元被进一步配置为:确定与所述第一中间测试包对应的多个扫描链的捕捉翻转率;以及The electronic device according to claim 12 or 13, wherein the test power consumption determination unit is further configured to: determine capture flip rates of a plurality of scan chains corresponding to the first intermediate test packet; and
    所述调整单元被进一步配置为包括:响应于所述捕捉翻转率高于捕捉阈值翻转率,至少基于所述待测电路的多个扫描链的控制时钟集对所述第一中间测试包进行调整,以生成第二中间测试包。The adjustment unit is further configured to include: in response to the capture toggle rate being higher than a capture threshold toggle rate, adjusting the first intermediate test package based on at least a control clock set of a plurality of scan chains of the circuit under test , to generate the second intermediate test package.
  15. 根据权利要求13或14所述的电子设备,其中所述生成单元被进一步配置为:The electronic device according to claim 13 or 14, wherein the generating unit is further configured to:
    确定与所述合并测试包对应的多个扫描链的移位翻转率;以及determining shift flip rates for a plurality of scan chains corresponding to the merged test packet; and
    响应于所述移位翻转率不高于移位阈值翻转率,对所述合并测试包执行动态紧缩操作以生成所述第一中间测试包。 In response to the shift toggle rate being not higher than a shift threshold toggle rate, a dynamic compaction operation is performed on the merged test packet to generate the first intermediate test packet.
  16. 根据权利要求12-15中任一项所述的电子设备,其中所述调整单元被进一步配置为:The electronic device according to any one of claims 12-15, wherein the adjustment unit is further configured to:
    响应于所述测试功耗高于第一阈值功耗,对所述第一中间测试包中的第一时钟比特位集合进行调整,所述经调整的第一时钟比特位集合用于关闭控制时钟集合中的第一时钟,所述控制时钟集合用于控制所述多个扫描链中的寄存器,所述第一时钟是所述控制时钟集合中控制最多寄存器的时钟;以及In response to the test power consumption being higher than the first threshold power consumption, adjusting a first clock bit set in the first intermediate test packet, the adjusted first clock bit set being used to turn off the control clock A first clock in a set, the control clock set is used to control registers in the plurality of scan chains, the first clock is the clock that controls the most registers in the control clock set; and
    响应于与经调整的第一中间测试包对应的捕捉功耗不高于所述第一阈值功耗,将经调整的第一中间测试包确定为所述第二中间测试包。In response to the captured power consumption corresponding to the adjusted first intermediate test packet being not higher than the first threshold power consumption, the adjusted first intermediate test packet is determined to be the second intermediate test packet.
  17. 根据权利要求12-16中任一项所述的电子设备,其中所述生成单元被进一步配置为:The electronic device according to any one of claims 12-16, wherein the generating unit is further configured to:
    针对第一测试故障生成所述第一初始向量包;Generate the first initialization vector packet for the first test fault;
    确定与所述第一测试故障对应的第一测试比特位集合;Determine a first test bit set corresponding to the first test fault;
    基于所述第一测试比特位集合,确定待关闭的时钟集合;以及Based on the first set of test bits, determine a set of clocks to be turned off; and
    基于所述待关闭的时钟集合,对所述第一初始向量包进行调整以生成所述第一测试包。Based on the set of clocks to be turned off, the first initialization vector packet is adjusted to generate the first test packet.
  18. 根据权利要求12-17中任一项所述的电子设备,还包括:The electronic device according to any one of claims 12-17, further comprising:
    分布确定单元,被配置为基于用于表示所述待测电路的网表数据和针对所述待测电路的样本测试向量集,确定用于控制多个扫描链的时钟门分布和时钟控制比特位集合,所述时钟门分布表示多个时钟门与其分别控制的多个扫描链中的寄存器之间的对应关系,所述时钟门被配置为基于所接收的时钟控制比特位集合中的时钟控制比特位来关闭与所述时钟门对应的寄存器。a distribution determination unit configured to determine clock gate distribution and clock control bits for controlling multiple scan chains based on netlist data representing the circuit under test and a sample test vector set for the circuit under test A set, the clock gate distribution represents a correspondence between a plurality of clock gates and registers in a plurality of scan chains that they respectively control, and the clock gate is configured to be based on the clock control bits in the received clock control bit set. bit to turn off the register corresponding to the clock gate.
  19. 根据权利要求18所述的电子设备,其中所述分布确定单元被进一步配置为:The electronic device of claim 18, wherein the distribution determining unit is further configured to:
    基于所述网表数据和所述样本测试向量集,确定扫描链分布,所述扫描链分布表示多个扫描链中的在自动向量测试生成过程中所使用到的扫描链;Based on the netlist data and the sample test vector set, determine a scan chain distribution, where the scan chain distribution represents a scan chain used in the automatic vector test generation process among multiple scan chains;
    基于所述网表数据和所述样本测试向量集,确定寄存器分布,所述寄存器分布表示多个扫描链中的多个寄存器中的在自动向量测试生成过程中所使用到的寄存器;以及Determine a register distribution based on the netlist data and the sample test vector set, the register distribution representing a register used in an automatic vector test generation process among a plurality of registers in a plurality of scan chains; and
    基于所述扫描链分布和所述寄存器分布,确定所述时钟门分布和所述时钟控制比特位集合。 Based on the scan chain distribution and the register distribution, the clock gate distribution and the clock control bit set are determined.
PCT/CN2023/077205 2022-03-07 2023-02-20 Method for generating test pattern, and electronic device and storage medium WO2023169195A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210217081.5A CN116775386A (en) 2022-03-07 2022-03-07 Method for generating test vector, electronic device and storage medium
CN202210217081.5 2022-03-07

Publications (1)

Publication Number Publication Date
WO2023169195A1 true WO2023169195A1 (en) 2023-09-14

Family

ID=87937189

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/077205 WO2023169195A1 (en) 2022-03-07 2023-02-20 Method for generating test pattern, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN116775386A (en)
WO (1) WO2023169195A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158706A (en) * 2007-11-16 2008-04-09 哈尔滨工业大学 Large scale integrated circuit test data and method for testing power consumption cooperate optimization
CN103076559A (en) * 2012-12-29 2013-05-01 东南大学 Optimizing method for shift power consumption in scanning test
US20150285854A1 (en) * 2010-03-16 2015-10-08 Mark A. Kassab Test Scheduling and Test Access in Test Compression Environment
CN107544017A (en) * 2017-07-12 2018-01-05 清华大学 Low-power consumption Weighted pseudo-random test method and relevant device based on vector compression
US20210156918A1 (en) * 2019-11-21 2021-05-27 Mentor Graphics Corporation Trajectory-Optimized Test Pattern Generation for Built-In Self-Test
WO2023284594A1 (en) * 2021-07-13 2023-01-19 华为技术有限公司 Test vector generation method, electronic device, and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101158706A (en) * 2007-11-16 2008-04-09 哈尔滨工业大学 Large scale integrated circuit test data and method for testing power consumption cooperate optimization
US20150285854A1 (en) * 2010-03-16 2015-10-08 Mark A. Kassab Test Scheduling and Test Access in Test Compression Environment
CN103076559A (en) * 2012-12-29 2013-05-01 东南大学 Optimizing method for shift power consumption in scanning test
CN107544017A (en) * 2017-07-12 2018-01-05 清华大学 Low-power consumption Weighted pseudo-random test method and relevant device based on vector compression
US20210156918A1 (en) * 2019-11-21 2021-05-27 Mentor Graphics Corporation Trajectory-Optimized Test Pattern Generation for Built-In Self-Test
WO2023284594A1 (en) * 2021-07-13 2023-01-19 华为技术有限公司 Test vector generation method, electronic device, and storage medium

Also Published As

Publication number Publication date
CN116775386A (en) 2023-09-19

Similar Documents

Publication Publication Date Title
US7526033B2 (en) Serializer deserializer (SERDES) testing
US9933485B2 (en) Deterministic built-in self-test based on compressed test patterns stored on chip and their derivatives
US8176454B2 (en) Non-invasive timing characterization of integrated circuits using sensitizable signal paths and sparse equations
JP2000137061A (en) Test method of embedded core in system-on-chip and constitution thereof
Breuer Hardware that produces bounded rather than exact results
US10146555B2 (en) Adaptive routing to avoid non-repairable memory and logic defects on automata processor
WO2023284594A1 (en) Test vector generation method, electronic device, and storage medium
CN116718902A (en) Chip built-in self-test method and system based on Chiplet
US6938228B1 (en) Simultaneously simulate multiple stimuli and verification using symbolic encoding
JP2002311090A (en) Semiconductor integrated circuit and testing board
WO2023169195A1 (en) Method for generating test pattern, and electronic device and storage medium
US7673204B2 (en) Method using non-linear compression to generate a set of test vectors for use in scan testing an integrated circuit
US20230258717A1 (en) Decompression circuit, circuit generation method, and ic chip
US20050138500A1 (en) Functional test design for testability (DFT) and test architecture for decreased tester channel resources
US20230252192A1 (en) Hardware trojan detection method, hardware trojan detection device, and program for hardware trojan detection
WO2023004731A1 (en) Method for designing test circuit, and electronic device
Anita et al. Multiple fault diagnosis and test power reduction using genetic algorithms
WO2023029011A1 (en) Method for designing decoder and electronic device
Lee et al. Reduced-pin-count BOST for test-cost reduction
Voyiatzis et al. Symmetric transparent online BIST for arrays of word-organized RAMs
KR20080019078A (en) Method and apparatus for test using cyclic redundancy check
Merten et al. A codeword-based compactor for on-chip generated debug data using two-stage artificial neural networks
US9933481B2 (en) Testing a feedback shift-register
CN117214652A (en) Electronic circuit, method, apparatus and storage medium for designing electronic circuit
US11983032B2 (en) Path margin monitor integration with integrated circuit

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23765773

Country of ref document: EP

Kind code of ref document: A1