[go: up one dir, main page]

CN117970070B - Boolean satisfaction-based compression method and device for automatic circuit test vector - Google Patents

Boolean satisfaction-based compression method and device for automatic circuit test vector Download PDF

Info

Publication number
CN117970070B
CN117970070B CN202311668035.8A CN202311668035A CN117970070B CN 117970070 B CN117970070 B CN 117970070B CN 202311668035 A CN202311668035 A CN 202311668035A CN 117970070 B CN117970070 B CN 117970070B
Authority
CN
China
Prior art keywords
test
fault
subset
vector
test vector
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202311668035.8A
Other languages
Chinese (zh)
Other versions
CN117970070A (en
Inventor
晁志腾
叶靖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongke Jianxin Beijing Technology Co ltd
Original Assignee
Zhongke Jianxin Beijing Technology Co ltd
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 Zhongke Jianxin Beijing Technology Co ltd filed Critical Zhongke Jianxin Beijing Technology Co ltd
Priority to CN202311668035.8A priority Critical patent/CN117970070B/en
Publication of CN117970070A publication Critical patent/CN117970070A/en
Application granted granted Critical
Publication of CN117970070B publication Critical patent/CN117970070B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/2851Testing of integrated circuits [IC]
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/28Testing of electronic circuits, e.g. by signal tracer
    • G01R31/2851Testing of integrated circuits [IC]
    • G01R31/2853Electrical testing of internal connections or -isolation, e.g. latch-up or chip-to-lead connections

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

本申请公开了一种基于布尔可满足性的电路自动测试向量的压缩方法和装置。其中,该方法包括:获取目标芯片的原始测试向量集和测试故障集,原始测试向量集包括多条测试向量;利用原始测试向量集的第一测试向量子集,对测试故障集中的所有测试故障进行故障仿真,确定测试故障集的已测故障子集;利用原始测试向量集的第二测试向量子集和测试故障集的未测故障子集,建立局部故障字典,局部故障字典用于记录第二测试向量子集中测试向量与未测故障子集中测试故障之间的关联;调用Pure MaxSAT问题求解器对局部故障字典进行求解,从而得到精简测试向量。本申请解决了相关技术中向量压缩比较耗时的技术问题。

The present application discloses a method and device for compressing automatic test vectors of circuits based on Boolean satisfiability. The method includes: obtaining the original test vector set and test fault set of the target chip, wherein the original test vector set includes multiple test vectors; using the first test vector subset of the original test vector set to perform fault simulation on all test faults in the test fault set, and determine the tested fault subset of the test fault set; using the second test vector subset of the original test vector set and the untested fault subset of the test fault set to establish a local fault dictionary, the local fault dictionary is used to record the association between the test vectors in the second test vector subset and the test faults in the untested fault subset; calling the Pure MaxSAT problem solver to solve the local fault dictionary, thereby obtaining a streamlined test vector. The present application solves the technical problem that vector compression is relatively time-consuming in the related art.

Description

基于布尔可满足性的电路自动测试向量的压缩方法和装置Method and device for compressing circuit automatic test vectors based on Boolean satisfiability

技术领域Technical Field

本申请涉及芯片测试领域,具体而言,涉及一种基于布尔可满足性的电路自动测试向量的压缩方法和装置。The present application relates to the field of chip testing, and in particular, to a method and device for compressing circuit automatic test vectors based on Boolean satisfiability.

背景技术Background Art

本部分旨在为权利要求书或说明书中陈述的内容提供背景或上下文,此处描述的内容不因为包括在本部分中就承认是现有技术。This section is intended to provide a background or context to what is stated in the claims or specification, and no admission is made that what is described herein is prior art by inclusion in this section.

静态测试向量压缩(Static Test Vector Compression)是在芯片测试中使用的一种技术,旨在减少测试数据的存储需求和测试时间,同时保持对芯片功能的全面覆盖。在芯片测试中,需要使用大量的测试向量来验证芯片的功能和性能。这些测试向量是一系列输入数据,用于激励芯片并观察输出结果。然而,测试向量的数量通常非常庞大,特别是对于复杂的芯片设计,这可能导致存储需求和测试时间的大幅增加。Static Test Vector Compression is a technique used in chip testing to reduce test data storage requirements and test time while maintaining full coverage of chip functions. In chip testing, a large number of test vectors are needed to verify the functionality and performance of the chip. These test vectors are a series of input data used to stimulate the chip and observe the output results. However, the number of test vectors is usually very large, especially for complex chip designs, which can lead to a significant increase in storage requirements and test time.

静态测试向量压缩技术通过利用测试向量之间的冗余性和重复性,以及芯片内部的状态信息,实现对测试向量的压缩。具体而言,它可以通过以下几种方式来实现压缩:Static test vector compression technology compresses test vectors by utilizing the redundancy and repetitiveness between test vectors and the internal state information of the chip. Specifically, it can achieve compression in the following ways:

1)基于编码的压缩:该方法使用编码技术将测试向量转换为更紧凑的表示形式。例如,可以使用行程长度编码(Run-Length Encoding)将连续相同的位模式编码为一个计数值,从而减少存储空间。1) Coding-based compression: This method uses coding techniques to convert the test vector into a more compact representation. For example, run-length encoding can be used to encode consecutive identical bit patterns into a count value, thereby reducing storage space.

2)基于模式匹配的压缩:该方法通过识别和存储测试向量之间的重复模式来实现压缩。当发现相同的测试向量或相似的测试向量序列时,只需存储一次该模式,然后使用相应的指令或参数来重现该模式。2) Compression based on pattern matching: This method achieves compression by identifying and storing repeated patterns between test vectors. When the same test vector or a similar test vector sequence is found, the pattern only needs to be stored once, and then the corresponding instructions or parameters are used to reproduce the pattern.

3)基于状态压缩的压缩:该方法利用芯片内部的状态信息来压缩测试向量。通过存储和重用芯片在测试过程中的内部状态,可以减少所需的测试向量数量。这可以通过在测试向量之间共享状态信息或通过状态恢复技术来实现。3) Compression based on state compression: This method uses the internal state information of the chip to compress the test vectors. By storing and reusing the internal state of the chip during the test process, the number of test vectors required can be reduced. This can be achieved by sharing state information between test vectors or through state recovery techniques.

静态测试向量压缩技术可以显著减少测试数据的存储需求和测试时间,从而降低了芯片测试的成本和复杂性。然而,静态测试向量压缩技术也面临一些挑战。例如,压缩和解压缩过程可能会增加测试时间,因为需要进行额外的计算和操作。此外,压缩算法的设计和实现需要考虑到芯片的特性和测试需求,以确保压缩后的测试向量仍能有效地覆盖芯片的功能。Static test vector compression technology can significantly reduce the storage requirements and test time of test data, thereby reducing the cost and complexity of chip testing. However, static test vector compression technology also faces some challenges. For example, the compression and decompression process may increase the test time because additional calculations and operations are required. In addition, the design and implementation of the compression algorithm need to take into account the characteristics and test requirements of the chip to ensure that the compressed test vectors can still effectively cover the functions of the chip.

针对上述的问题,目前尚未提出有效的解决方案。To address the above-mentioned problems, no effective solution has been proposed yet.

发明内容Summary of the invention

本申请实施例提供了一种基于布尔可满足性的电路自动测试向量的压缩方法和装置,以至少解决相关技术中向量压缩比较耗时的技术问题。The embodiments of the present application provide a method and device for compressing circuit automatic test vectors based on Boolean satisfiability, so as to at least solve the technical problem that vector compression in related technologies is relatively time-consuming.

根据本申请实施例的一个方面,提供了一种基于布尔可满足性的电路自动测试向量的压缩方法,包括:获取目标芯片的原始测试向量集和测试故障集,其中,所述原始测试向量集包括多条测试向量,所述测试故障集包括多个测试故障;利用所述原始测试向量集的第一测试向量子集,对所述测试故障集中的所有测试故障进行故障仿真,确定所述测试故障集的已测故障子集,其中,所述原始测试向量集包括所述第一测试向量子集和第二测试向量子集,所述测试故障集包括所述已测故障子集和未测故障子集,所述已测故障子集用于保存被测出的测试故障,所述未测故障子集用于保存未被测出的测试故障;利用所述第二测试向量子集和所述未测故障子集,建立局部故障字典,其中,所述局部故障字典用于记录所述第二测试向量子集中测试向量与所述未测故障子集中测试故障之间的关联;调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量。According to one aspect of an embodiment of the present application, a method for compressing automatic test vectors of circuits based on Boolean satisfiability is provided, comprising: obtaining an original test vector set and a test fault set of a target chip, wherein the original test vector set includes multiple test vectors, and the test fault set includes multiple test faults; using a first test vector subset of the original test vector set, performing fault simulation on all test faults in the test fault set, and determining a tested fault subset of the test fault set, wherein the original test vector set includes the first test vector subset and the second test vector subset, and the test fault set includes the tested fault subset and the untested fault subset, the tested fault subset is used to store tested test faults, and the untested fault subset is used to store untested test faults; using the second test vector subset and the untested fault subset, establishing a local fault dictionary, wherein the local fault dictionary is used to record the association between the test vectors in the second test vector subset and the test faults in the untested fault subset; calling a Pure MaxSAT problem solver to solve the local fault dictionary, thereby obtaining a simplified test vector.

可选地,利用所述原始测试向量集的第一测试向量子集,对所述测试故障集中的所有测试故障进行故障仿真,确定所述测试故障集的已测故障子集,包括:按照预设比例将所述原始测试向量集分为所述第一测试向量子集和所述第二测试向量子集,其中,所述第二测试向量子集中测试向量的数量多于所述第一测试向量子集中测试向量的数量;利用所述第一测试向量子集对所述测试故障集中的所有测试故障进行故障仿真,确定所述已测故障子集。Optionally, the first test vector subset of the original test vector set is used to perform fault simulation on all test faults in the test fault set to determine the tested fault subset of the test fault set, including: dividing the original test vector set into the first test vector subset and the second test vector subset according to a preset ratio, wherein the number of test vectors in the second test vector subset is greater than the number of test vectors in the first test vector subset; and the first test vector subset is used to perform fault simulation on all test faults in the test fault set to determine the tested fault subset.

可选地,利用所述第二测试向量子集和所述未测故障子集,建立局部故障字典,包括:利用所述第二测试向量子集中的测试向量对所述未测故障子集中的测试故障进行故障仿真,得到每条测试向量与所有测试故障之间的关系;利用每条测试向量与所有测试故障之间的关系建立所述局部故障字典,其中,所述局部故障字典的每一行对应一个测试向量或测试故障,每一列对应一个测试故障或测试向量,任意一行与一列交叉的元素用于表示对应测试向量与对应测试故障之间的关系,在该元素的取值为1时表示测试向量能检测到测试故障,在该元素的取值为0时表示测试向量不能检测到测试故障。Optionally, a local fault dictionary is established using the second test vector subset and the untested fault subset, including: using the test vectors in the second test vector subset to perform fault simulation on the test faults in the untested fault subset to obtain the relationship between each test vector and all test faults; and establishing the local fault dictionary using the relationship between each test vector and all test faults, wherein each row of the local fault dictionary corresponds to a test vector or a test fault, and each column corresponds to a test fault or a test vector, and an element at the intersection of any row and a column is used to represent the relationship between the corresponding test vector and the corresponding test fault, and when the value of the element is 1, it indicates that the test vector can detect the test fault, and when the value of the element is 0, it indicates that the test vector cannot detect the test fault.

可选地,在调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量之后,所述方法还包括:将得到的所述第二测试向量子集的精简测试向量和所述第一测试向量子集作为所述目标芯片的最终测试向量。Optionally, after calling the Pure MaxSAT problem solver to solve the local fault dictionary to obtain a simplified test vector, the method further includes: using the obtained simplified test vector of the second test vector subset and the first test vector subset as the final test vector of the target chip.

可选地,获取目标芯片的原始测试向量集,包括:在调用自动测试向量生成ATPG工具为所述目标芯片生成测试向量之前,将所述自动测试向量生成工具的测试模式设置为指定测试模式,其中,所述指定测试模式用于指示一个测试故障所需的向量数量n,n的值为2或3;调用所述自动测试向量生成ATPG工具为所述目标芯片生成所述原始测试向量集。Optionally, obtaining the original test vector set of the target chip includes: before calling the automatic test vector generation ATPG tool to generate test vectors for the target chip, setting the test mode of the automatic test vector generation tool to a specified test mode, wherein the specified test mode is used to indicate the number of vectors n required for a test fault, and the value of n is 2 or 3; calling the automatic test vector generation ATPG tool to generate the original test vector set for the target chip.

可选地,调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量,包括:对所述局部故障字典进行处理,得到待输入Pure MaxSAT问题求解器的WCNF文件,其中,所述WCNF文件中记录有所述局部故障字典的数据结构;将所述WCNF文件输入所述Pure MaxSAT问题求解器进行求解,得到所述精简测试向量。Optionally, calling a Pure MaxSAT problem solver to solve the local fault dictionary to obtain a simplified test vector includes: processing the local fault dictionary to obtain a WCNF file to be input into the Pure MaxSAT problem solver, wherein the WCNF file records a data structure of the local fault dictionary; inputting the WCNF file into the Pure MaxSAT problem solver for solving to obtain the simplified test vector.

可选地,在将所述WCNF文件输入所述Pure MaxSAT问题求解器进行求解的过程中,所述方法还包括:识别所述WCNF文件中的关键向量,其中,所述关键向量为唯一能够检测某一测试故障的测试向量;将所述关键向量作为必须保留的向量来进行求解。Optionally, in the process of inputting the WCNF file into the Pure MaxSAT problem solver for solving, the method further includes: identifying a key vector in the WCNF file, wherein the key vector is a test vector that is uniquely capable of detecting a certain test fault; and solving the key vector as a vector that must be retained.

根据本申请实施例的另一方面,还提供了一种基于布尔可满足性的电路自动测试向量的压缩装置,包括:获取单元,用于获取目标芯片的原始测试向量集和测试故障集,其中,所述原始测试向量集包括多条测试向量,所述测试故障集包括多个测试故障;确定单元,用于利用所述原始测试向量集的第一测试向量子集,对所述测试故障集中的所有测试故障进行故障仿真,确定所述测试故障集的已测故障子集,其中,所述原始测试向量集包括所述第一测试向量子集和第二测试向量子集,所述测试故障集包括所述已测故障子集和未测故障子集,所述已测故障子集用于保存被测出的测试故障,所述未测故障子集用于保存未被测出的测试故障;创建单元,用于利用所述第二测试向量子集和所述未测故障子集,建立局部故障字典,其中,所述局部故障字典用于记录所述第二测试向量子集中测试向量与所述未测故障子集中测试故障之间的关联;压缩单元,用于调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量。According to another aspect of an embodiment of the present application, a compression device for automatic circuit test vectors based on Boolean satisfiability is also provided, including: an acquisition unit, used to acquire an original test vector set and a test fault set of a target chip, wherein the original test vector set includes multiple test vectors, and the test fault set includes multiple test faults; a determination unit, used to use a first test vector subset of the original test vector set to perform fault simulation on all test faults in the test fault set, and determine a tested fault subset of the test fault set, wherein the original test vector set includes the first test vector subset and the second test vector subset, and the test fault set includes the tested fault subset and the untested fault subset, the tested fault subset is used to store tested test faults, and the untested fault subset is used to store untested test faults; a creation unit, used to use the second test vector subset and the untested fault subset to establish a local fault dictionary, wherein the local fault dictionary is used to record the association between the test vectors in the second test vector subset and the test faults in the untested fault subset; a compression unit, used to call Pure The MaxSAT problem solver solves the local fault dictionary to obtain a simplified test vector.

根据本申请实施例的另一方面,还提供了一种存储介质,该存储介质包括存储的程序,程序运行时执行上述的方法。According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above method is executed when the program is run.

根据本申请实施例的另一方面,还提供了一种电子装置,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器通过计算机程序执行上述的方法。According to another aspect of an embodiment of the present application, an electronic device is further provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above method through the computer program.

根据本申请的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方法中任一实施例的步骤。According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the embodiments of the above method.

在本申请实施例中,获取目标芯片的原始测试向量集和测试故障集,原始测试向量集包括多条测试向量,测试故障集包括多个测试故障;利用原始测试向量集的第一测试向量子集,对测试故障集中的所有测试故障进行故障仿真,确定测试故障集的已测故障子集,原始测试向量集包括第一测试向量子集和第二测试向量子集,测试故障集包括已测故障子集和未测故障子集,已测故障子集用于保存被测出的测试故障,未测故障子集用于保存未被测出的测试故障;利用第二测试向量子集和未测故障子集,建立局部故障字典,局部故障字典用于记录第二测试向量子集中测试向量与未测故障子集中测试故障之间的关联;调用Pure MaxSAT问题求解器对局部故障字典进行求解,从而得到精简测试向量,在本方案中,建立局部故障字典,通过挑选小批次向量进行故障仿真,筛选出未测到的故障和剩下的向量组成局部故障字典,并将对故障字典的向量约简转换成了Pure MaxSAT问题;提出扩展候选向量集方法,提供ATPG算法中的“n-detect”模式为向量约简提供更多候选向量,提升约简效果;提出通过将SAT问题中专门求解Pure MaxSAT问题的专用求解器引入STC,通过高效的局部搜索算法设计实现了快速的STC问题求解。可以解决了相关技术中向量压缩比较耗时的技术问题。In an embodiment of the present application, an original test vector set and a test fault set of a target chip are obtained, wherein the original test vector set includes multiple test vectors, and the test fault set includes multiple test faults; a first test vector subset of the original test vector set is used to perform fault simulation on all test faults in the test fault set to determine a tested fault subset of the test fault set, wherein the original test vector set includes a first test vector subset and a second test vector subset, and the test fault set includes a tested fault subset and an untested fault subset, wherein the tested fault subset is used to store tested test faults, and the untested fault subset is used to store untested test faults; a local fault dictionary is established using the second test vector subset and the untested fault subset, wherein the local fault dictionary is used to record the association between the test vectors in the second test vector subset and the test faults in the untested fault subset; a Pure MaxSAT problem solver is called to solve the local fault dictionary to obtain a simplified test vector. In this solution, a local fault dictionary is established, and a small batch of vectors are selected for fault simulation to screen out untested faults and the remaining vectors to form a local fault dictionary, and the vector reduction of the fault dictionary is converted into a Pure MaxSAT problem; proposed a method to expand the candidate vector set, providing the "n-detect" mode in the ATPG algorithm to provide more candidate vectors for vector reduction, improving the reduction effect; proposed to introduce a dedicated solver for Pure MaxSAT problem in SAT problem into STC, and realized fast STC problem solving through efficient local search algorithm design. It can solve the technical problem that vector compression is time-consuming in related technologies.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

图1是根据本申请实施例的一种可选的基于布尔可满足性的电路自动测试向量的压缩方法的流程图;FIG1 is a flow chart of an optional method for compressing circuit automatic test vectors based on Boolean satisfiability according to an embodiment of the present application;

图2是根据本申请实施例的一种可选的基于布尔可满足性的电路自动测试向量的压缩方案的示意图;FIG2 is a schematic diagram of an optional compression scheme for circuit automatic test vectors based on Boolean satisfiability according to an embodiment of the present application;

图3是根据本申请实施例的一种可选的基于布尔可满足性的电路自动测试向量的压缩方案的示意图;FIG3 is a schematic diagram of an optional compression scheme for circuit automatic test vectors based on Boolean satisfiability according to an embodiment of the present application;

图4是根据本申请实施例的一种可选的基于布尔可满足性的电路自动测试向量的压缩装置的示意图;以及,FIG4 is a schematic diagram of an optional circuit automatic test vector compression device based on Boolean satisfiability according to an embodiment of the present application; and,

图5是根据本申请实施例的一种终端的结构框图。FIG5 is a structural block diagram of a terminal according to an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

在静态测试向量压缩STC中,可通过建立故障字典,即每条测试向量能检测到的故障集的记录,将STC问题转换成Partial Maximum Satisfiability(Partial MaxSAT)问题中的Pure Maximum Satisfiability(Pure MaxSAT)特例,Partial MaxSAT,即在一个布尔表达式中,要求变量的真值指派必须满足所有的硬子句和最大数量的软子句;PureMaxSAT,在上述前提下,要求布尔表达式中所有硬子句都是具有相同极性(正)的纯子句,并且所有的软子句都是具有相反极性(负)的纯子句。In static test vector compression STC, the STC problem can be converted into a special case of Pure Maximum Satisfiability (Pure MaxSAT) in the Partial Maximum Satisfiability (Partial MaxSAT) problem by establishing a fault dictionary, that is, a record of the fault set that each test vector can detect. Partial MaxSAT requires that in a Boolean expression, the truth value assignment of variables must satisfy all hard clauses and the maximum number of soft clauses; PureMaxSAT, under the above premise, requires that all hard clauses in the Boolean expression are pure clauses with the same polarity (positive), and all soft clauses are pure clauses with opposite polarity (negative).

建立故障字典和求解故障字典转换成的Pure MaxSAT问题是STC中两个至关重要的时间瓶颈,然而STC是一组NP-Complete问题,也就是说不存在一个算法使得该问题在线性时间内得到有效解决。Building a fault dictionary and solving the Pure MaxSAT problem converted from the fault dictionary are two crucial time bottlenecks in STC. However, STC is a set of NP-Complete problems, which means that there is no algorithm that can effectively solve the problem in linear time.

对一个由n个测试向量组成的测试向量集,m个故障组成的故障集的电路来说,建立故障字典需要对每一条向量进行故障仿真,仿真每一个故障,在实际生产应用中会带来过大的计算复杂度。For a circuit with a test vector set consisting of n test vectors and a fault set consisting of m faults, establishing a fault dictionary requires fault simulation for each vector. Simulating each fault will bring too much computational complexity in actual production applications.

为解决上述STC的问题,可采用基于粒子群的多目标测试集优化方法(DPSO),以最大故障检测率、最少测试数目和最小测试代价为优化目标指导粒子群的这一启发式算法来搜索压缩测试集。行加权局部搜索方法(Row Weighting Local Search,RWLS),提出预处理步骤,在局部搜索前有效减少搜索空间,且采用多个禁忌策略有效避免搜索的重复和循环来搜索压缩测试集。此外还有一些基于遗传算法,单目标优化粒子群算法的求解算法和专用的集合覆盖问题求解器。To solve the above STC problem, a multi-objective test set optimization method (DPSO) based on particle swarm can be used to guide the particle swarm's heuristic algorithm to search for compressed test sets with the maximum fault detection rate, the minimum number of tests and the minimum test cost as the optimization goals. The row weighting local search method (RWLS) proposes a preprocessing step to effectively reduce the search space before the local search, and uses multiple taboo strategies to effectively avoid search repetition and loops to search for compressed test sets. In addition, there are some solution algorithms based on genetic algorithms, single-objective optimization particle swarm algorithms and dedicated set cover problem solvers.

上述的STC问题求解算法,在问题规模过大的情况下求解时间会大大增加。时间的增长主要来自两个方面:一是建立故障字典需要大量的时间用于故障仿真,每一条向量需要对所有的故障进行故障仿真,故障集的规模随着电路规模的增长而线性增长,向量虽然不会线性增长但也会提升,导致故障字典的规模超线性增长;二是故障字典规模的上升导致求解STC问题变得非常困难,求解器的求解时间一般会随着故障字典的规模的线性增长而超线性增长。The above-mentioned STC problem solving algorithm will greatly increase the solving time when the problem scale is too large. The time increase mainly comes from two aspects: first, it takes a lot of time to build a fault dictionary for fault simulation. Each vector needs to simulate all faults. The size of the fault set grows linearly with the growth of the circuit scale. Although the vector does not grow linearly, it will also increase, resulting in a super-linear growth in the size of the fault dictionary. Second, the increase in the size of the fault dictionary makes it very difficult to solve the STC problem. The solving time of the solver generally grows super-linearly with the linear growth of the size of the fault dictionary.

STC效果受到向量质量的严重制约,一般用一条向量能测到的故障数量来评价该向量质量,数量越多质量越好。但是由于传统ATPG算法(ATPG全称为Automatic TestPattern Generation,即自动测试向量生成,是在半导体电器测试中使用的测试图形向量由程序自动生成的过程。测试向量按顺序地加载到器件的输入脚上,输出的信号被收集并与预算好的测试向量相比较从而判断测试的结果。ATPG有效性是衡量测试错误覆盖率的重要指标)执行过程中每测到一个故障就会把该故障丢弃掉,每条新生成的向量都是为了检测目前未测到的故障,因此向量质量不一定高。The STC effect is severely restricted by the quality of the vector. The quality of a vector is generally evaluated by the number of faults that can be detected by a vector. The more faults a vector can detect, the better the quality. However, due to the traditional ATPG algorithm (ATPG stands for Automatic Test Pattern Generation, which is the process of automatically generating test pattern vectors used in semiconductor electrical testing by a program. Test vectors are loaded sequentially onto the input pins of the device, and the output signals are collected and compared with the budgeted test vectors to determine the test results. ATPG effectiveness is an important indicator for measuring test error coverage) every time a fault is detected during execution, the fault will be discarded, and each newly generated vector is to detect faults that are not currently detected, so the vector quality is not necessarily high.

为了高效地实现数字电路自动测试向量静态压缩(STC),提高其性能表现,根据本申请实施例的一方面,提供了一种基于布尔可满足性的电路自动测试向量的压缩方法的方法实施例。通过建立局部故障字典,能够大大削减故障字典的规模,从而大大减少建立故障字典需要的故障仿真时间和Pure MaxSAT问题求解器求解的时间;通过借助ATPG算法里的“n-detect”模式,提供更大范围的候选测试向量,可以取得更好的向量约简效果。In order to efficiently realize static compression (STC) of digital circuit automatic test vectors and improve their performance, according to one aspect of the embodiment of the present application, a method embodiment of a method for compressing circuit automatic test vectors based on Boolean satisfiability is provided. By establishing a local fault dictionary, the size of the fault dictionary can be greatly reduced, thereby greatly reducing the fault simulation time required to establish the fault dictionary and the time for Pure MaxSAT problem solver to solve; by using the "n-detect" mode in the ATPG algorithm, a larger range of candidate test vectors is provided, and better vector reduction effects can be achieved.

图1是根据本申请实施例的一种可选的基于布尔可满足性的电路自动测试向量的压缩方法的流程图,如图1所示,该方法可以包括以下步骤:FIG. 1 is a flow chart of an optional method for compressing circuit automatic test vectors based on Boolean satisfiability according to an embodiment of the present application. As shown in FIG. 1 , the method may include the following steps:

步骤S102,获取目标芯片的原始测试向量集和测试故障集,原始测试向量集包括多条测试向量,测试故障集包括多个测试故障。Step S102, obtaining an original test vector set and a test fault set of the target chip, wherein the original test vector set includes a plurality of test vectors, and the test fault set includes a plurality of test faults.

在本申请的技术方案中,获取目标芯片的原始测试向量集时,将自动测试向量生成工具的测试模式设置为指定测试模式,指定测试模式用于指示一个测试故障所需的向量数量n,n的值为2或3,之后调用自动测试向量生成ATPG工具为目标芯片生成原始测试向量集。在自动测试程序生成(Automatic Test Pattern Generation,ATPG)算法中,“n-detect”是一种故障检测度量,用于评估测试模式对芯片中故障的检测能力,在本申请的技术方案中,n的取值较小,此时具有更高的测试效率:较小的n值意味着测试模式只需要检测到少量的故障即可满足要求,这可以减少测试模式的数量和测试时间,提高测试效率。In the technical solution of the present application, when obtaining the original test vector set of the target chip, the test mode of the automatic test vector generation tool is set to the specified test mode, and the specified test mode is used to indicate the number of vectors n required for a test fault, and the value of n is 2 or 3. Then, the automatic test vector generation ATPG tool is called to generate the original test vector set for the target chip. In the automatic test program generation (ATPG) algorithm, "n-detect" is a fault detection metric used to evaluate the detection ability of the test pattern for the faults in the chip. In the technical solution of the present application, the value of n is small, and the test efficiency is higher at this time: a smaller n value means that the test pattern only needs to detect a small number of faults to meet the requirements, which can reduce the number of test patterns and test time, and improve test efficiency.

步骤S104,利用原始测试向量集的第一测试向量子集,对测试故障集中的所有测试故障进行故障仿真,确定测试故障集的已测故障子集,原始测试向量集包括第一测试向量子集和第二测试向量子集,测试故障集包括已测故障子集和未测故障子集,已测故障子集用于保存被测出的测试故障,未测故障子集用于保存未被测出的测试故障。Step S104, using the first test vector subset of the original test vector set, perform fault simulation on all test faults in the test fault set to determine the tested fault subset of the test fault set, the original test vector set includes the first test vector subset and the second test vector subset, the test fault set includes a tested fault subset and an untested fault subset, the tested fault subset is used to save the tested test faults, and the untested fault subset is used to save the untested test faults.

在本申请的技术方案中,可按照预设比例将原始测试向量集分为第一测试向量子集和第二测试向量子集,第二测试向量子集中测试向量的数量远远多于第一测试向量子集中测试向量的数量,例如上述预设比列为1:9;利用第一测试向量子集对测试故障集中的所有测试故障进行故障仿真,确定已测故障子集。In the technical solution of the present application, the original test vector set can be divided into a first test vector subset and a second test vector subset according to a preset ratio, and the number of test vectors in the second test vector subset is much larger than the number of test vectors in the first test vector subset. For example, the above preset ratio is 1:9; the first test vector subset is used to perform fault simulation on all test faults in the test fault set to determine the tested fault subset.

步骤S106,利用第二测试向量子集和未测故障子集,建立局部故障字典,局部故障字典用于记录第二测试向量子集中测试向量与未测故障子集中测试故障之间的关联。Step S106, using the second test vector subset and the untested fault subset, a local fault dictionary is established, where the local fault dictionary is used to record associations between test vectors in the second test vector subset and test faults in the untested fault subset.

在本申请的技术方案中,利用第二测试向量子集中的测试向量对未测故障子集中的测试故障进行故障仿真,得到每条测试向量与所有测试故障之间的关系;利用每条测试向量与所有测试故障之间的关系建立局部故障字典,局部故障字典的每一行对应一个测试向量或测试故障,每一列对应一个测试故障或测试向量,任意一行与一列交叉的元素用于表示对应测试向量与对应测试故障之间的关系,在该元素的取值为1时表示测试向量能检测到测试故障,在该元素的取值为0时表示测试向量不能检测到测试故障。In the technical solution of the present application, the test vectors in the second test vector subset are used to perform fault simulation on the test faults in the untested fault subset to obtain the relationship between each test vector and all test faults; a local fault dictionary is established using the relationship between each test vector and all test faults, each row of the local fault dictionary corresponds to a test vector or a test fault, and each column corresponds to a test fault or a test vector. The elements that intersect any row and column are used to represent the relationship between the corresponding test vector and the corresponding test fault. When the value of the element is 1, it indicates that the test vector can detect the test fault, and when the value of the element is 0, it indicates that the test vector cannot detect the test fault.

步骤S108,调用Pure MaxSAT问题求解器对局部故障字典进行求解,从而得到精简测试向量。Step S108, calling the Pure MaxSAT problem solver to solve the local fault dictionary, thereby obtaining a simplified test vector.

在本申请的技术方案中,对所述局部故障字典进行处理,得到待输入Pure MaxSAT问题求解器的WCNF文件,其中,所述WCNF文件中记录有所述局部故障字典的数据结构;将所述WCNF文件输入所述Pure MaxSAT问题求解器进行求解,得到所述精简测试向量。In the technical solution of the present application, the local fault dictionary is processed to obtain a WCNF file to be input into a Pure MaxSAT problem solver, wherein the WCNF file records the data structure of the local fault dictionary; the WCNF file is input into the Pure MaxSAT problem solver for solving to obtain the simplified test vector.

在将所述WCNF文件输入所述Pure MaxSAT问题求解器进行求解的过程中,识别所述WCNF文件中的关键向量,所述关键向量为唯一能够检测某一测试故障的测试向量;In the process of inputting the WCNF file into the Pure MaxSAT problem solver for solving, identifying a key vector in the WCNF file, wherein the key vector is a test vector that is uniquely capable of detecting a certain test fault;

在调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量之后,将得到的所述第二测试向量子集的精简测试向量和所述第一测试向量子集作为所述目标芯片的最终测试向量。After the Pure MaxSAT problem solver is called to solve the local fault dictionary to obtain a reduced test vector, the reduced test vector of the second test vector subset and the first test vector subset are used as the final test vector of the target chip.

通过上述步骤,获取目标芯片的原始测试向量集和测试故障集,原始测试向量集包括多条测试向量,测试故障集包括多个测试故障;利用原始测试向量集的第一测试向量子集,对测试故障集中的所有测试故障进行故障仿真,确定测试故障集的已测故障子集,原始测试向量集包括第一测试向量子集和第二测试向量子集,测试故障集包括已测故障子集和未测故障子集,已测故障子集用于保存被测出的测试故障,未测故障子集用于保存未被测出的测试故障;利用第二测试向量子集和未测故障子集,建立局部故障字典,局部故障字典用于记录第二测试向量子集中测试向量与未测故障子集中测试故障之间的关联;调用Pure MaxSAT问题求解器对局部故障字典进行求解,从而得到精简测试向量,在本方案中,建立局部故障字典,通过挑选小批次向量进行故障仿真,筛选出未测到的故障和剩下的向量组成局部故障字典,并将对故障字典的向量约简转换成了Pure MaxSAT问题;提出扩展候选向量集方法,提供ATPG算法中的“n-detect”模式为向量约简提供更多候选向量,提升约简效果;提出通过将SAT问题中专门求解Pure MaxSAT问题的专用求解器引入STC,通过高效的局部搜索算法设计实现了快速的STC问题求解。可以解决了相关技术中向量压缩比较耗时的技术问题。Through the above steps, the original test vector set and test fault set of the target chip are obtained, the original test vector set includes multiple test vectors, and the test fault set includes multiple test faults; the first test vector subset of the original test vector set is used to perform fault simulation on all test faults in the test fault set to determine the tested fault subset of the test fault set, the original test vector set includes the first test vector subset and the second test vector subset, the test fault set includes the tested fault subset and the untested fault subset, the tested fault subset is used to save the tested test faults, and the untested fault subset is used to save the untested test faults; the second test vector subset and the untested fault subset are used to establish a local fault dictionary, the local fault dictionary is used to record the association between the test vectors in the second test vector subset and the test faults in the untested fault subset; the Pure MaxSAT problem solver is called to solve the local fault dictionary to obtain a simplified test vector. In this scheme, a local fault dictionary is established, and a small batch of vectors are selected for fault simulation to screen out the untested faults and the remaining vectors to form a local fault dictionary, and the vector reduction of the fault dictionary is converted into Pure MaxSAT problem; proposed a method to expand the candidate vector set, providing the "n-detect" mode in the ATPG algorithm to provide more candidate vectors for vector reduction, improving the reduction effect; proposed to introduce a dedicated solver for Pure MaxSAT problem in SAT problem into STC, and realized fast STC problem solving through efficient local search algorithm design. It can solve the technical problem that vector compression is time-consuming in related technologies.

本申请提出的基于Pure MaxSAT求解器的数字电路测试向量约简方案,其思想是:针对大规模电路STC问题的两个瓶颈,故障字典建立需要太多故障仿真的时间瓶颈,故障字典规模太大带来的求解难度瓶颈。作为一种可选的实施例,下面结合具体实施方式进一步详述本申请的技术方案:The digital circuit test vector reduction scheme based on Pure MaxSAT solver proposed in this application is based on the idea of: targeting the two bottlenecks of large-scale circuit STC problems, the time bottleneck of too many fault simulations required to establish the fault dictionary, and the bottleneck of difficulty in solving the problem caused by the large size of the fault dictionary. As an optional embodiment, the technical solution of this application is further described in detail below in combination with specific implementation methods:

以下用图2中的例子描述该方案的总体框架,主要分为执行商业DFT流程(DFT全称为Design for Testability,即测试可设计,是一种设计技术和方法,旨在增强集成电路的可测试性,它是在集成电路设计过程中采用的一系列技术和策略,以确保设计能够有效地进行测试和故障检测)、建立故障字典、CNF生成和专用SAT求解器求解四个步骤。图2显示了整个流程的示意图。The following uses the example in Figure 2 to describe the overall framework of the solution, which is mainly divided into four steps: executing the commercial DFT process (DFT stands for Design for Testability, which is a design technology and method that aims to enhance the testability of integrated circuits. It is a series of technologies and strategies used in the integrated circuit design process to ensure that the design can be effectively tested and fault detected), establishing a fault dictionary, generating CNF, and solving with a dedicated SAT solver. Figure 2 shows a schematic diagram of the entire process.

1)执行商业DFT流程。商业DFT工具中运行的传统的ATPG算法一般是“1-检测”,意思是当一个故障被检测到就被丢弃掉,只给目前未测到的故障生成测试向量。1) Execute the commercial DFT flow. The traditional ATPG algorithm running in the commercial DFT tool is generally "1-detection", which means that when a fault is detected, it is discarded and only test vectors are generated for the currently undetected faults.

商业DFT(Design for Testability,测试可设计)流程是在集成电路设计过程中采用的一系列技术和方法,旨在确保设计的可测试性和可靠性。商业DFT流程通常包括以下关键步骤:The commercial DFT (Design for Testability) process is a series of technologies and methods used in the integrated circuit design process to ensure the testability and reliability of the design. The commercial DFT process usually includes the following key steps:

1.1)测试需求分析:在设计开始阶段,确定测试的目标、约束和要求。这包括定义测试覆盖率目标、故障模型、测试资源预算等。1.1) Test requirements analysis: At the beginning of the design phase, determine the test objectives, constraints, and requirements. This includes defining test coverage targets, fault models, test resource budgets, etc.

1.2)DFT规划:根据测试需求,制定测试策略和规划。确定使用哪些DFT技术和方法,以及它们在设计中的应用方式。1.2) DFT planning: Develop test strategies and plans based on test requirements. Determine which DFT techniques and methods to use and how to apply them in the design.

1.3)扫描链设计:扫描链是一种常用的DFT技术,用于简化测试模式的加载和输出。在扫描链设计中,将设计中的寄存器转换为可扫描的形式,使得测试模式可以通过扫描链进入和退出电路。1.3) Scan chain design: Scan chain is a commonly used DFT technique to simplify the loading and output of test patterns. In scan chain design, the registers in the design are converted into a scannable form so that the test pattern can enter and exit the circuit through the scan chain.

1.4)边界扫描设计:边界扫描是一种扫描技术,用于测试设计中的输入和输出接口。通过在输入和输出接口上添加扫描链,可以有效地测试这些接口的功能和通信。1.4) Boundary Scan Design: Boundary scan is a scanning technique used to test the input and output interfaces in a design. By adding scan chains on the input and output interfaces, the functionality and communication of these interfaces can be effectively tested.

1.5)故障模拟和测试模式生成:使用故障模拟工具对设计进行故障模拟,以评估测试模式的覆盖率和故障检测能力。根据故障模拟结果生成测试模式,以激活和检测设计中的故障。1.5) Fault simulation and test pattern generation: Use fault simulation tools to perform fault simulation on the design to evaluate the coverage and fault detection capabilities of the test pattern. Generate test patterns based on the fault simulation results to activate and detect faults in the design.

1.6)ATPG是一种自动生成测试模式的技术。通过使用ATPG工具,根据故障模型和测试需求,自动生成能够检测设计中故障的测试模式。1.6) ATPG is a technology that automatically generates test patterns. By using ATPG tools, test patterns that can detect faults in the design are automatically generated based on fault models and test requirements.

1.7)特殊测试技术,商业DFT流程还可以包括一些特殊的测试技术,如BIST(Built-In Self-Test,内置自检测)、Boundary Scan(边界扫描)等。这些技术可以在芯片内部提供自测和自校验功能,减少对外部测试设备的依赖。1.7) Special testing technologies: Commercial DFT processes can also include some special testing technologies, such as BIST (Built-In Self-Test), Boundary Scan, etc. These technologies can provide self-test and self-verification functions inside the chip, reducing dependence on external testing equipment.

1.8)验证和仿真:在设计完成后,进行验证和仿真,以确保设计在各种工作条件下的正确性和可测试性。这包括功能验证、时序验证和测试模式的仿真等。1.8) Verification and simulation: After the design is completed, verification and simulation are performed to ensure the correctness and testability of the design under various working conditions. This includes functional verification, timing verification, and simulation of test modes, etc.

商业DFT流程的目标是确保设计具有良好的测试覆盖率、高故障检测能力和可靠性。通过在设计过程中集成测试相关的技术和方法,可以提高芯片的测试效率,减少测试成本,并提高产品质量和可靠性。The goal of the commercial DFT process is to ensure that the design has good test coverage, high fault detection capability and reliability. By integrating test-related technologies and methods in the design process, the chip testing efficiency can be improved, the testing cost can be reduced, and the product quality and reliability can be improved.

在ATPG算法中,“n-检测”是指一种故障检测度量,用于测量检测电路中每个故障所需的最小测试向量数。它指定检测所有故障至少n次所需的向量数量,其中n通常设置为2或更多。例如,如果设置为“2-检测”,这意味着至少需要两个向量来检测该故障,以实现所需的故障覆盖率。该度量可用于评估测试集的有效性,并优化实现所需故障覆盖率所需的测试向量的数量。一般来说,“n-检测”度量将增加ATPG算法生成的测试向量的数量。In the context of ATPG algorithms, "n-detect" refers to a fault detection metric that measures the minimum number of test vectors required to detect each fault in a circuit. It specifies the number of vectors required to detect all faults at least n times, where n is typically set to 2 or more. For example, if set to "2-detect", this means that at least two vectors are required to detect that fault to achieve the desired fault coverage. This metric can be used to evaluate the effectiveness of a test set and optimize the number of test vectors required to achieve the desired fault coverage. In general, the "n-detect" metric will increase the number of test vectors generated by the ATPG algorithm.

因此在商业DFT工具中运行ATPG算法时,还指定了“2-检测”和“3-检测”模式,以期望生成更多的候选测试向量,不考虑更大的“n-detect”,因为这将导致ATPG执行时间更长和生成的向量数量过多。Therefore, when running the ATPG algorithm in commercial DFT tools, “2-detect” and “3-detect” modes are also specified in the expectation of generating more candidate test vectors, without considering a larger “n-detect” as this will result in longer ATPG execution time and an excessive number of generated vectors.

2)建立故障字典。本方案选择了商业ATPG工具生成的10%的向量进行故障仿真,丢弃可以检测到的故障,并获得保留的90%向量和目前测不到的故障,用于单向量故障仿真。这会生成一个故障字典,记录每个向量可以检测到的故障。所选的10%向量被直接保留而不约简。2) Establish a fault dictionary. This solution selects 10% of the vectors generated by the commercial ATPG tool for fault simulation, discards the faults that can be detected, and obtains the retained 90% vectors and the currently undetectable faults for single-vector fault simulation. This generates a fault dictionary that records the faults that can be detected by each vector. The selected 10% vectors are directly retained without reduction.

3)WCNF生成。本方案设计的专用SAT求解器是一种Pure MaxSAT求解器,其输入文件称为WCNF(weighted conjunctive normal form),为了描述WCNF生成过程,使用了以下定义和符号。设T={T1,T2,…,Tm}是一个给定的测试向量集,其中Ti是单个测试向量,m是T的计数。固定型故障(SAF)的集合表示为F={F1,F2,……,Fn},其中Fj是单个可测试故障,n是F的计数。描述测试向量和故障之间映射的故障字典可以表示为矩阵,m行表示测试向量,n列表示故障。对于测试向量ti和故障fj,矩阵的值被表示为r(ti,fj),如果测试向量ti(行)能够检测到故障fj(列),则矩阵的值取r(ti,fj)=1,否则r(ti,fj)=0。3) WCNF generation. The dedicated SAT solver designed in this scheme is a Pure MaxSAT solver, and its input file is called WCNF (weighted conjunctive normal form). In order to describe the WCNF generation process, the following definitions and symbols are used. Let T = {T 1 , T 2 , ..., T m } be a given set of test vectors, where Ti is a single test vector and m is the count of T. The set of stuck-at faults (SAFs) is represented as F = {F 1 , F 2 , ..., F n }, where F j is a single testable fault and n is the count of F. The fault dictionary that describes the mapping between test vectors and faults can be represented as a matrix, with m rows representing test vectors and n columns representing faults. For test vector ti and fault fj , the value of the matrix is represented as r( ti , fj ). If test vector ti (row) can detect fault fj (column), the value of the matrix takes r( ti , fj ) = 1, otherwise r( ti , fj ) = 0.

图3显示了将故障字典转换为CNF的过程。TestSet(fj)表示可以检测故障fj的向量集,Cj表示WCNF中的第j子句,其中子句的数量等于向量计数加上故障字典中的故障计数,即m+n。Figure 3 shows the process of converting the fault dictionary to CNF. TestSet( fj ) represents the set of vectors that can detect fault fj , and Cj represents the jth clause in WCNF, where the number of clauses is equal to the vector count plus the fault count in the fault dictionary, that is, m+n.

4)专用SAT求解器。本方案设计了一个专用的部分Pure MaxSAT求解器,该求解器结合了识别关键向量的预处理,旨在加速求解过程。关键向量被定义为能够在故障字典中唯一检测特定故障的向量。通过查询TestSet(fj)的大小,我们可以识别关键向量。如果TestSet(fj)的大小等于1,则表明故障fj只能由这个关键向量检测到,并且必须保留此向量。然后可以利用这些信息来加速初始解求解。4) Dedicated SAT solver. This proposal designs a dedicated partial Pure MaxSAT solver that combines preprocessing to identify key vectors, aiming to accelerate the solving process. A key vector is defined as a vector that can uniquely detect a specific fault in the fault dictionary. By querying the size of TestSet(f j ), we can identify the key vector. If the size of TestSet(f j ) is equal to 1, it means that fault f j can only be detected by this key vector and this vector must be retained. This information can then be used to accelerate the initial solution.

综上,本发明提出一种基于Pure MaxSAT求解器的测试向量静态压缩方法,通过单条向量故障仿真建立局部故障字典可以转换成WCNF输入给Pure MaxSAT求解器,得出约简后的向量集合,从而达到减少测试周期和测试成本的目的。在ISCAS89和ITC99的基准电路上进行了验证,结果验证了该发明的有效性。In summary, the present invention proposes a test vector static compression method based on Pure MaxSAT solver. The local fault dictionary established by single vector fault simulation can be converted into WCNF input to Pure MaxSAT solver to obtain a simplified vector set, thereby achieving the purpose of reducing test cycle and test cost. The invention was verified on the ISCAS89 and ITC99 benchmark circuits, and the results verified the effectiveness of the invention.

本发明在ISCAS89和ITC99基准电路上进行验证,综合评估测试向量集合约简前后的向量数量和测试周期,结果表明了本发明相对于传统启发式策略的有效性。本发明能够在程序占用内存更少的情况下更快地求解STC问题,且对比完整故障字典的约简效果并没有太大差距。The present invention is verified on ISCAS89 and ITC99 benchmark circuits, and the number of vectors and test cycles before and after the test vector set is reduced are comprehensively evaluated. The results show the effectiveness of the present invention compared with the traditional heuristic strategy. The present invention can solve the STC problem faster while the program occupies less memory, and the reduction effect is not much different from that of the complete fault dictionary.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

根据本申请实施例的另一个方面,还提供了一种用于实施上述基于布尔可满足性的电路自动测试向量的压缩方法的基于布尔可满足性的电路自动测试向量的压缩装置。图4是根据本申请实施例的一种可选的基于布尔可满足性的电路自动测试向量的压缩装置的示意图,如图4所示,该装置可以包括:According to another aspect of the embodiment of the present application, a Boolean satisfiability-based circuit automatic test vector compression device for implementing the above-mentioned Boolean satisfiability-based circuit automatic test vector compression method is also provided. FIG4 is a schematic diagram of an optional Boolean satisfiability-based circuit automatic test vector compression device according to an embodiment of the present application. As shown in FIG4, the device may include:

获取单元41,用于获取目标芯片的原始测试向量集和测试故障集,其中,所述原始测试向量集包括多条测试向量,所述测试故障集包括多个测试故障;An acquisition unit 41 is used to acquire an original test vector set and a test fault set of a target chip, wherein the original test vector set includes a plurality of test vectors, and the test fault set includes a plurality of test faults;

确定单元43,用于利用所述原始测试向量集的第一测试向量子集,对所述测试故障集中的所有测试故障进行故障仿真,确定所述测试故障集的已测故障子集,其中,所述原始测试向量集包括所述第一测试向量子集和第二测试向量子集,所述测试故障集包括所述已测故障子集和未测故障子集,所述已测故障子集用于保存被测出的测试故障,所述未测故障子集用于保存未被测出的测试故障;A determination unit 43 is used to perform fault simulation on all test faults in the test fault set by using the first test vector subset of the original test vector set to determine a tested fault subset of the test fault set, wherein the original test vector set includes the first test vector subset and the second test vector subset, the test fault set includes the tested fault subset and the untested fault subset, the tested fault subset is used to store the tested test faults, and the untested fault subset is used to store the untested test faults;

创建单元45,用于利用所述第二测试向量子集和所述未测故障子集,建立局部故障字典,其中,所述局部故障字典用于记录所述第二测试向量子集中测试向量与所述未测故障子集中测试故障之间的关联;A creating unit 45, configured to establish a local fault dictionary using the second test vector subset and the untested fault subset, wherein the local fault dictionary is used to record associations between test vectors in the second test vector subset and test faults in the untested fault subset;

压缩单元47,用于调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量。The compression unit 47 is used to call the Pure MaxSAT problem solver to solve the local fault dictionary, so as to obtain a simplified test vector.

可选地,确定单元还用于:按照预设比例将所述原始测试向量集分为所述第一测试向量子集和所述第二测试向量子集,其中,所述第二测试向量子集中测试向量的数量多于所述第一测试向量子集中测试向量的数量;利用所述第一测试向量子集对所述测试故障集中的所有测试故障进行故障仿真,确定所述已测故障子集。Optionally, the determination unit is also used to: divide the original test vector set into the first test vector subset and the second test vector subset according to a preset ratio, wherein the number of test vectors in the second test vector subset is greater than the number of test vectors in the first test vector subset; use the first test vector subset to perform fault simulation on all test faults in the test fault set to determine the tested fault subset.

可选地,创建单元还用于:利用所述第二测试向量子集中的测试向量对所述未测故障子集中的测试故障进行故障仿真,得到每条测试向量与所有测试故障之间的关系;利用每条测试向量与所有测试故障之间的关系建立所述局部故障字典,其中,所述局部故障字典的每一行对应一个测试向量或测试故障,每一列对应一个测试故障或测试向量,任意一行与一列交叉的元素用于表示对应测试向量与对应测试故障之间的关系,在该元素的取值为1时表示测试向量能检测到测试故障,在该元素的取值为0时表示测试向量不能检测到测试故障。Optionally, the creation unit is also used to: use the test vectors in the second test vector subset to perform fault simulation on the test faults in the untested fault subset to obtain the relationship between each test vector and all test faults; use the relationship between each test vector and all test faults to establish the local fault dictionary, wherein each row of the local fault dictionary corresponds to a test vector or a test fault, and each column corresponds to a test fault or a test vector, and the elements that intersect any row and column are used to represent the relationship between the corresponding test vector and the corresponding test fault, and when the value of the element is 1, it indicates that the test vector can detect the test fault, and when the value of the element is 0, it indicates that the test vector cannot detect the test fault.

可选地,压缩单元还用于在调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量之后,将得到的所述第二测试向量子集的精简测试向量和所述第一测试向量子集作为所述目标芯片的最终测试向量。Optionally, the compression unit is further used to, after calling the Pure MaxSAT problem solver to solve the local fault dictionary to obtain a reduced test vector, use the reduced test vector of the second test vector subset and the first test vector subset as the final test vector of the target chip.

可选地,获取单元还用于:在调用自动测试向量生成ATPG工具为所述目标芯片生成测试向量之前,将所述自动测试向量生成工具的测试模式设置为指定测试模式,其中,所述指定测试模式用于指示一个测试故障所需的向量数量n,n的值为2或3;调用所述自动测试向量生成ATPG工具为所述目标芯片生成所述原始测试向量集。Optionally, the acquisition unit is also used to: before calling the automatic test vector generation ATPG tool to generate test vectors for the target chip, set the test mode of the automatic test vector generation tool to a specified test mode, wherein the specified test mode is used to indicate the number of vectors n required for a test fault, and the value of n is 2 or 3; and call the automatic test vector generation ATPG tool to generate the original test vector set for the target chip.

可选地,压缩单元还用于:对所述局部故障字典进行处理,得到待输入PureMaxSAT问题求解器的WCNF文件,其中,所述WCNF文件中记录有所述局部故障字典的数据结构;将所述WCNF文件输入所述Pure MaxSAT问题求解器进行求解,得到所述精简测试向量。Optionally, the compression unit is also used to: process the local fault dictionary to obtain a WCNF file to be input into a PureMaxSAT problem solver, wherein the WCNF file records a data structure of the local fault dictionary; input the WCNF file into the Pure MaxSAT problem solver for solving, to obtain the simplified test vector.

可选地,压缩单元还用于:在将所述WCNF文件输入所述Pure MaxSAT问题求解器进行求解的过程中,识别所述WCNF文件中的关键向量,其中,所述关键向量为唯一能够检测某一测试故障的测试向量;将所述关键向量作为必须保留的向量来进行求解。Optionally, the compression unit is also used to: during the process of inputting the WCNF file into the Pure MaxSAT problem solver for solving, identify the key vector in the WCNF file, wherein the key vector is the only test vector that can detect a certain test fault; and solve the key vector as a vector that must be retained.

通过上述模块,获取目标芯片的原始测试向量集和测试故障集,其中,所述原始测试向量集包括多条测试向量,所述测试故障集包括多个测试故障;利用所述原始测试向量集的第一测试向量子集,对所述测试故障集中的所有测试故障进行故障仿真,确定所述测试故障集的已测故障子集,其中,所述原始测试向量集包括所述第一测试向量子集和第二测试向量子集,所述测试故障集包括所述已测故障子集和未测故障子集,所述已测故障子集用于保存被测出的测试故障,所述未测故障子集用于保存未被测出的测试故障;利用所述第二测试向量子集和所述未测故障子集,建立局部故障字典,其中,所述局部故障字典用于记录所述第二测试向量子集中测试向量与所述未测故障子集中测试故障之间的关联;调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量,在本方案中,建立局部故障字典,通过挑选小批次向量进行故障仿真,筛选出未测到的故障和剩下的向量组成局部故障字典,并将对故障字典的向量约简转换成了Pure MaxSAT问题;提出扩展候选向量集方法,提供ATPG算法中的“n-detect”模式为向量约简提供更多候选向量,提升约简效果;提出通过将SAT问题中专门求解Pure MaxSAT问题的专用求解器引入STC,通过高效的局部搜索算法设计实现了快速的STC问题求解。可以解决了相关技术中向量压缩比较耗时的技术问题。Through the above module, the original test vector set and test fault set of the target chip are obtained, wherein the original test vector set includes multiple test vectors, and the test fault set includes multiple test faults; using the first test vector subset of the original test vector set, all test faults in the test fault set are subjected to fault simulation to determine the tested fault subset of the test fault set, wherein the original test vector set includes the first test vector subset and the second test vector subset, and the test fault set includes the tested fault subset and the untested fault subset, wherein the tested fault subset is used to store the tested test faults, and the untested fault subset is used to store the untested test faults; using the second test vector subset and the untested fault subset, a local fault dictionary is established, wherein the local fault dictionary is used to record the association between the test vectors in the second test vector subset and the test faults in the untested fault subset; calling Pure The MaxSAT problem solver solves the local fault dictionary to obtain a simplified test vector. In this solution, a local fault dictionary is established, and by selecting a small batch of vectors for fault simulation, untested faults and the remaining vectors are screened out to form a local fault dictionary, and the vector simplification of the fault dictionary is converted into a Pure MaxSAT problem; a method for expanding the candidate vector set is proposed, and the "n-detect" mode in the ATPG algorithm is provided to provide more candidate vectors for vector simplification, thereby improving the simplification effect; it is proposed to introduce a special solver for solving Pure MaxSAT problems in the SAT problem into STC, and realize fast STC problem solving through efficient local search algorithm design. The technical problem that vector compression is relatively time-consuming in related technologies can be solved.

此处需要说明的是,上述模块与对应的步骤所实现的示例和应用场景相同,但不限于上述实施例所公开的内容。需要说明的是,上述模块作为装置的一部分可以运行在相应的硬件环境中,可以通过软件实现,也可以通过硬件实现,其中,硬件环境包括网络环境。It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules, as part of the device, can be run in a corresponding hardware environment, can be implemented by software, and can also be implemented by hardware, wherein the hardware environment includes a network environment.

根据本申请实施例的另一个方面,还提供了一种用于实施上述基于布尔可满足性的电路自动测试向量的压缩方法的服务器或终端。According to another aspect of an embodiment of the present application, a server or terminal is provided for implementing the above-mentioned method for compressing automatic circuit test vectors based on Boolean satisfiability.

图5是根据本申请实施例的一种终端的结构框图,如图5所示,该终端可以包括:一个或多个(图中仅示出一个)处理器501、存储器503、以及传输装置505,如图5所示,该终端还可以包括输入输出设备507。Figure 5 is a structural block diagram of a terminal according to an embodiment of the present application. As shown in Figure 5, the terminal may include: one or more (only one is shown in the figure) processors 501, a memory 503, and a transmission device 505. As shown in Figure 5, the terminal may also include an input and output device 507.

其中,存储器503可用于存储软件程序以及模块,如本申请实施例中的基于布尔可满足性的电路自动测试向量的压缩方法和装置对应的程序指令/模块,处理器501通过运行存储在存储器503内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的基于布尔可满足性的电路自动测试向量的压缩方法。存储器503可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器503可进一步包括相对于处理器501远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。Among them, the memory 503 can be used to store software programs and modules, such as the program instructions/modules corresponding to the compression method and device of the circuit automatic test vector based on Boolean satisfiability in the embodiment of the present application. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 503, that is, the compression method of the circuit automatic test vector based on Boolean satisfiability is realized. The memory 503 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 503 may further include a memory remotely arranged relative to the processor 501, and these remote memories can be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

上述的传输装置505用于经由一个网络接收或者发送数据,还可以用于处理器与存储器之间的数据传输。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置505包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置505为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。The above-mentioned transmission device 505 is used to receive or send data via a network, and can also be used for data transmission between a processor and a memory. The above-mentioned network specific examples may include wired networks and wireless networks. In one example, the transmission device 505 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 505 is a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.

其中,具体地,存储器503用于存储应用程序。Specifically, the memory 503 is used to store application programs.

处理器501可以通过传输装置505调用存储器503存储的应用程序,以执行下述步骤:The processor 501 may call the application stored in the memory 503 through the transmission device 505 to perform the following steps:

获取目标芯片的原始测试向量集和测试故障集,其中,所述原始测试向量集包括多条测试向量,所述测试故障集包括多个测试故障;Acquire an original test vector set and a test fault set of a target chip, wherein the original test vector set includes a plurality of test vectors, and the test fault set includes a plurality of test faults;

利用所述原始测试向量集的第一测试向量子集,对所述测试故障集中的所有测试故障进行故障仿真,确定所述测试故障集的已测故障子集,其中,所述原始测试向量集包括所述第一测试向量子集和第二测试向量子集,所述测试故障集包括所述已测故障子集和未测故障子集,所述已测故障子集用于保存被测出的测试故障,所述未测故障子集用于保存未被测出的测试故障;Utilizing the first test vector subset of the original test vector set, performing fault simulation on all test faults in the test fault set, and determining a tested fault subset of the test fault set, wherein the original test vector set includes the first test vector subset and the second test vector subset, the test fault set includes the tested fault subset and the untested fault subset, the tested fault subset is used to store the tested test faults, and the untested fault subset is used to store the untested test faults;

利用所述第二测试向量子集和所述未测故障子集,建立局部故障字典,其中,所述局部故障字典用于记录所述第二测试向量子集中测试向量与所述未测故障子集中测试故障之间的关联;Using the second test vector subset and the untested fault subset, a local fault dictionary is established, wherein the local fault dictionary is used to record associations between test vectors in the second test vector subset and test faults in the untested fault subset;

调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量。The Pure MaxSAT problem solver is called to solve the local fault dictionary, thereby obtaining a simplified test vector.

可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

本领域普通技术人员可以理解,图5所示的结构仅为示意,终端可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile InternetDevices,MID)、PAD等终端设备。图5其并不对上述电子装置的结构造成限定。例如,终端还可包括比图5中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图5所示不同的配置。It can be understood by those skilled in the art that the structure shown in FIG5 is for illustration only, and the terminal may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. FIG5 does not limit the structure of the above electronic devices. For example, the terminal may also include more or fewer components (such as a network interface, a display device, etc.) than those shown in FIG5, or have a configuration different from that shown in FIG5.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(RandomAccess Memory,RAM)、磁盘或光盘等。A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

本申请的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以用于执行基于布尔可满足性的电路自动测试向量的压缩方法的程序代码。The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to execute the program code of the method for compressing circuit automatic test vectors based on Boolean satisfiability.

可选地,在本实施例中,上述存储介质可以位于上述实施例所示的网络中的多个网络设备中的至少一个网络设备上。Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.

可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:

获取目标芯片的原始测试向量集和测试故障集,其中,所述原始测试向量集包括多条测试向量,所述测试故障集包括多个测试故障;Acquire an original test vector set and a test fault set of a target chip, wherein the original test vector set includes a plurality of test vectors, and the test fault set includes a plurality of test faults;

利用所述原始测试向量集的第一测试向量子集,对所述测试故障集中的所有测试故障进行故障仿真,确定所述测试故障集的已测故障子集,其中,所述原始测试向量集包括所述第一测试向量子集和第二测试向量子集,所述测试故障集包括所述已测故障子集和未测故障子集,所述已测故障子集用于保存被测出的测试故障,所述未测故障子集用于保存未被测出的测试故障;Utilizing the first test vector subset of the original test vector set, performing fault simulation on all test faults in the test fault set, and determining a tested fault subset of the test fault set, wherein the original test vector set includes the first test vector subset and the second test vector subset, the test fault set includes the tested fault subset and the untested fault subset, the tested fault subset is used to store the tested test faults, and the untested fault subset is used to store the untested test faults;

利用所述第二测试向量子集和所述未测故障子集,建立局部故障字典,其中,所述局部故障字典用于记录所述第二测试向量子集中测试向量与所述未测故障子集中测试故障之间的关联;Using the second test vector subset and the untested fault subset, a local fault dictionary is established, wherein the local fault dictionary is used to record associations between test vectors in the second test vector subset and test faults in the untested fault subset;

调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量。The Pure MaxSAT problem solver is called to solve the local fault dictionary, thereby obtaining a simplified test vector.

可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.

在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims (9)

1.一种基于布尔可满足性的电路自动测试向量的压缩方法,其特征在于,包括:1. A method for compressing circuit automatic test vectors based on Boolean satisfiability, characterized by comprising: 获取目标芯片的原始测试向量集和测试故障集,其中,所述原始测试向量集包括多条测试向量,所述测试故障集包括多个测试故障;Acquire an original test vector set and a test fault set of a target chip, wherein the original test vector set includes a plurality of test vectors, and the test fault set includes a plurality of test faults; 利用所述原始测试向量集的第一测试向量子集,对所述测试故障集中的所有测试故障进行故障仿真,确定所述测试故障集的已测故障子集,其中,所述原始测试向量集包括所述第一测试向量子集和第二测试向量子集,所述测试故障集包括所述已测故障子集和未测故障子集,所述已测故障子集用于保存被测出的测试故障,所述未测故障子集用于保存未被测出的测试故障;Utilizing the first test vector subset of the original test vector set, performing fault simulation on all test faults in the test fault set, and determining a tested fault subset of the test fault set, wherein the original test vector set includes the first test vector subset and the second test vector subset, the test fault set includes the tested fault subset and the untested fault subset, the tested fault subset is used to store the tested test faults, and the untested fault subset is used to store the untested test faults; 利用所述第二测试向量子集和所述未测故障子集,建立局部故障字典,包括:利用所述第二测试向量子集中的测试向量对所述未测故障子集中的测试故障进行故障仿真,得到每条测试向量与所述未测故障子集中所有测试故障之间的关系;利用每条测试向量与所述未测故障子集中所有测试故障之间的关系建立所述局部故障字典,其中,所述局部故障字典的每一行对应一个测试向量或测试故障,每一列对应一个测试故障或测试向量,任意一行与一列交叉的元素用于表示对应测试向量与对应测试故障之间的关系,在该元素的取值为1时表示测试向量能检测到测试故障,在该元素的取值为0时表示测试向量不能检测到测试故障,其中,所述局部故障字典用于记录所述第二测试向量子集中测试向量与所述未测故障子集中测试故障之间的关联;Using the second test vector subset and the untested fault subset, a local fault dictionary is established, including: using the test vectors in the second test vector subset to perform fault simulation on the test faults in the untested fault subset to obtain the relationship between each test vector and all the test faults in the untested fault subset; using the relationship between each test vector and all the test faults in the untested fault subset to establish the local fault dictionary, wherein each row of the local fault dictionary corresponds to a test vector or a test fault, and each column corresponds to a test fault or a test vector, and an element at the intersection of any row and a column is used to represent the relationship between the corresponding test vector and the corresponding test fault, and when the value of the element is 1, it indicates that the test vector can detect the test fault, and when the value of the element is 0, it indicates that the test vector cannot detect the test fault, wherein the local fault dictionary is used to record the association between the test vector in the second test vector subset and the test fault in the untested fault subset; 调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量。The Pure MaxSAT problem solver is called to solve the local fault dictionary, thereby obtaining a simplified test vector. 2.根据权利要求1所述的方法,其特征在于,利用所述原始测试向量集的第一测试向量子集,对所述测试故障集中的所有测试故障进行故障仿真,确定所述测试故障集的已测故障子集,包括:2. The method according to claim 1, characterized in that the method comprises: using the first test vector subset of the original test vector set to perform fault simulation on all test faults in the test fault set to determine the tested fault subset of the test fault set, comprising: 按照预设比例将所述原始测试向量集分为所述第一测试向量子集和所述第二测试向量子集,其中,所述第二测试向量子集中测试向量的数量多于所述第一测试向量子集中测试向量的数量;Dividing the original test vector set into the first test vector subset and the second test vector subset according to a preset ratio, wherein the number of test vectors in the second test vector subset is greater than the number of test vectors in the first test vector subset; 利用所述第一测试向量子集对所述测试故障集中的所有测试故障进行故障仿真,确定所述已测故障子集。Fault simulation is performed on all test faults in the test fault set using the first test vector subset to determine the tested fault subset. 3.根据权利要求1所述的方法,其特征在于,获取目标芯片的原始测试向量集,包括:3. The method according to claim 1, characterized in that obtaining the original test vector set of the target chip comprises: 在调用自动测试向量生成ATPG工具为所述目标芯片生成测试向量之前,将所述自动测试向量生成ATPG工具的测试模式设置为指定测试模式,其中,所述指定测试模式用于指示一个测试故障所需的向量数量n,n的值为2或3;Before calling the automatic test vector generation ATPG tool to generate test vectors for the target chip, setting the test mode of the automatic test vector generation ATPG tool to a specified test mode, wherein the specified test mode is used to indicate the number of vectors n required for a test fault, and the value of n is 2 or 3; 调用所述自动测试向量生成ATPG工具为所述目标芯片生成所述原始测试向量集。The automatic test vector generation ATPG tool is called to generate the original test vector set for the target chip. 4.根据权利要求1所述的方法,其特征在于,调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量,包括:4. The method according to claim 1, characterized in that calling a Pure MaxSAT problem solver to solve the local fault dictionary to obtain a simplified test vector comprises: 对所述局部故障字典进行处理,得到待输入Pure MaxSAT问题求解器的WCNF文件,其中,所述WCNF文件中记录有所述局部故障字典的数据结构;Processing the local fault dictionary to obtain a WCNF file to be input into a Pure MaxSAT problem solver, wherein the WCNF file records a data structure of the local fault dictionary; 将所述WCNF文件输入所述Pure MaxSAT问题求解器进行求解,得到所述精简测试向量。The WCNF file is input into the Pure MaxSAT problem solver for solving to obtain the simplified test vector. 5.根据权利要求4所述的方法,其特征在于,在将所述WCNF文件输入所述Pure MaxSAT问题求解器进行求解的过程中,所述方法还包括:5. The method according to claim 4, characterized in that, in the process of inputting the WCNF file into the Pure MaxSAT problem solver for solving, the method further comprises: 识别所述WCNF文件中的关键向量,其中,所述关键向量为唯一能够检测某一测试故障的测试向量;Identifying a key vector in the WCNF file, wherein the key vector is a test vector that is uniquely capable of detecting a certain test fault; 将所述关键向量作为必须保留的向量来进行求解。The key vector is taken as a vector that must be retained for solving. 6.根据权利要求1至5中任意一项所述的方法,其特征在于,在调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量之后,所述方法还包括:6. The method according to any one of claims 1 to 5, characterized in that after calling the Pure MaxSAT problem solver to solve the local fault dictionary to obtain a reduced test vector, the method further comprises: 将得到的所述第二测试向量子集的精简测试向量和所述第一测试向量子集作为所述目标芯片的最终测试向量。The obtained simplified test vectors of the second test vector subset and the first test vector subset are used as final test vectors of the target chip. 7.一种基于布尔可满足性的电路自动测试向量的压缩装置,其特征在于,包括:7. A circuit automatic test vector compression device based on Boolean satisfiability, characterized by comprising: 获取单元,用于获取目标芯片的原始测试向量集和测试故障集,其中,所述原始测试向量集包括多条测试向量,所述测试故障集包括多个测试故障;An acquisition unit, used to acquire an original test vector set and a test fault set of a target chip, wherein the original test vector set includes a plurality of test vectors, and the test fault set includes a plurality of test faults; 确定单元,用于利用所述原始测试向量集的第一测试向量子集,对所述测试故障集中的所有测试故障进行故障仿真,确定所述测试故障集的已测故障子集,其中,所述原始测试向量集包括所述第一测试向量子集和第二测试向量子集,所述测试故障集包括所述已测故障子集和未测故障子集,所述已测故障子集用于保存被测出的测试故障,所述未测故障子集用于保存未被测出的测试故障;a determination unit, configured to perform fault simulation on all test faults in the test fault set by using the first test vector subset of the original test vector set, and determine a tested fault subset of the test fault set, wherein the original test vector set includes the first test vector subset and the second test vector subset, the test fault set includes the tested fault subset and the untested fault subset, the tested fault subset is used to store the tested test faults, and the untested fault subset is used to store the untested test faults; 创建单元,用于利用所述第二测试向量子集和所述未测故障子集,建立局部故障字典,包括:利用所述第二测试向量子集中的测试向量对所述未测故障子集中的测试故障进行故障仿真,得到每条测试向量与所述未测故障子集中所有测试故障之间的关系;利用每条测试向量与所述未测故障子集中所有测试故障之间的关系建立所述局部故障字典,其中,所述局部故障字典的每一行对应一个测试向量或测试故障,每一列对应一个测试故障或测试向量,任意一行与一列交叉的元素用于表示对应测试向量与对应测试故障之间的关系,在该元素的取值为1时表示测试向量能检测到测试故障,在该元素的取值为0时表示测试向量不能检测到测试故障,其中,所述局部故障字典用于记录所述第二测试向量子集中测试向量与所述未测故障子集中测试故障之间的关联;A creation unit, used to establish a local fault dictionary using the second test vector subset and the untested fault subset, including: using the test vectors in the second test vector subset to perform fault simulation on the test faults in the untested fault subset to obtain the relationship between each test vector and all the test faults in the untested fault subset; establishing the local fault dictionary using the relationship between each test vector and all the test faults in the untested fault subset, wherein each row of the local fault dictionary corresponds to a test vector or a test fault, and each column corresponds to a test fault or a test vector, and an element at the intersection of any row and a column is used to represent the relationship between the corresponding test vector and the corresponding test fault, and when the value of the element is 1, it indicates that the test vector can detect the test fault, and when the value of the element is 0, it indicates that the test vector cannot detect the test fault, wherein the local fault dictionary is used to record the association between the test vector in the second test vector subset and the test fault in the untested fault subset; 压缩单元,用于调用Pure MaxSAT问题求解器对所述局部故障字典进行求解,从而得到精简测试向量。The compression unit is used to call the Pure MaxSAT problem solver to solve the local fault dictionary, so as to obtain a simplified test vector. 8.一种存储介质,其特征在于,所述存储介质包括存储的程序,其中,所述程序运行时执行上述权利要求1至6任一项中所述的方法。8. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program executes the method described in any one of claims 1 to 6 when running. 9.一种电子装置,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器通过所述计算机程序执行上述权利要求1至6任一项中所述的方法。9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method described in any one of claims 1 to 6 through the computer program.
CN202311668035.8A 2023-12-06 2023-12-06 Boolean satisfaction-based compression method and device for automatic circuit test vector Active CN117970070B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311668035.8A CN117970070B (en) 2023-12-06 2023-12-06 Boolean satisfaction-based compression method and device for automatic circuit test vector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311668035.8A CN117970070B (en) 2023-12-06 2023-12-06 Boolean satisfaction-based compression method and device for automatic circuit test vector

Publications (2)

Publication Number Publication Date
CN117970070A CN117970070A (en) 2024-05-03
CN117970070B true CN117970070B (en) 2024-11-01

Family

ID=90846639

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311668035.8A Active CN117970070B (en) 2023-12-06 2023-12-06 Boolean satisfaction-based compression method and device for automatic circuit test vector

Country Status (1)

Country Link
CN (1) CN117970070B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103646129A (en) * 2013-11-22 2014-03-19 中国科学院计算技术研究所 Reliability assessment method and device applied to FPGA
CN110687433A (en) * 2019-10-23 2020-01-14 吉林大学 A method for reducing integrated circuit test pattern set combined with PMS technology

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6397362B1 (en) * 1997-09-24 2002-05-28 Nec Corporation Fault diagnosis method and system for a sequential circuit
JP5247480B2 (en) * 2009-01-13 2013-07-24 キヤノン株式会社 Object identification device and object identification method
US8977576B2 (en) * 2010-11-19 2015-03-10 D-Wave Systems Inc. Methods for solving computational problems using a quantum processor
CN102262209B (en) * 2011-04-15 2014-01-01 詹文法 An Automatic Test Vector Generation Method Based on Generalized Folding Sets
US8689069B2 (en) * 2011-06-09 2014-04-01 Mentor Graphics Corporation Multi-targeting boolean satisfiability-based test pattern generation
WO2014210368A1 (en) * 2013-06-28 2014-12-31 D-Wave Systems Inc. Systems and methods for quantum processing of data
US10235377B2 (en) * 2013-12-23 2019-03-19 Sap Se Adaptive dictionary compression/decompression for column-store databases
CN116296395A (en) * 2023-03-15 2023-06-23 国能神东煤炭集团有限责任公司 Bearing vibration signal processing method and bearing vibration signal processing system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103646129A (en) * 2013-11-22 2014-03-19 中国科学院计算技术研究所 Reliability assessment method and device applied to FPGA
CN110687433A (en) * 2019-10-23 2020-01-14 吉林大学 A method for reducing integrated circuit test pattern set combined with PMS technology

Also Published As

Publication number Publication date
CN117970070A (en) 2024-05-03

Similar Documents

Publication Publication Date Title
JP5268656B2 (en) Multi-stage test response compactor
CN107544017B (en) A low-power weighted pseudo-random test method and related equipment based on vector compression
CN110058147B (en) Chip testing system and method based on fpga
US4779273A (en) Apparatus for self-testing a digital logic circuit
US9933485B2 (en) Deterministic built-in self-test based on compressed test patterns stored on chip and their derivatives
US7228262B2 (en) Semiconductor integrated circuit verification system
CN111965530A (en) JTAG-based FPGA chip automatic test method
CN111767210A (en) Strategy testing method, apparatus, computer equipment and storage medium
CN112052160A (en) Code case obtaining method and device, electronic equipment and medium
CN116956801B (en) Chip verification method, device, computer equipment and storage medium
CN118780221A (en) Chip verification method, device, equipment and storage medium
CN111814414B (en) Coverage rate convergence method and system based on genetic algorithm
CN117054864A (en) Chip testing system, method, chip and medium
CN102707712A (en) Electronic equipment fault diagnosis method and system
CN117970070B (en) Boolean satisfaction-based compression method and device for automatic circuit test vector
US6968286B1 (en) Functional-pattern management system for device verification
CN109933473A (en) Method, device, equipment and medium for measuring power consumption of chip memory
Bernardi et al. An effective technique for minimizing the cost of processor software-based diagnosis in SoCs
CN115827446A (en) Method and device for processing coverage rate problem of chip test
WO2023169195A1 (en) Method for generating test pattern, and electronic device and storage medium
US20070220386A1 (en) Verification of the design of an integrated circuit background
Pomeranz et al. LFSR-based test generation for reduced fail data volume
US6804803B2 (en) Method for testing integrated logic circuits
CN112649723B (en) Test reduction method and device in a compressed environment for switching delay fault testing
CN119719028A (en) STIL file-to-test bench file method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant