Method for selecting measurement points based on hspice transient simulation

CN116306444BActive Publication Date: 2026-08-11UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-22
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

但是,Hspice在进行瞬态仿真时会出现采样时间未严格按照步长来进行的情况,尤其是对于复杂电路来说,采样时间更不具备规律性,生成的数据由于采样时间的差异性使得采用欧式距离判断测点能否检测缺陷的方法不再适用,需要进一步改进

Benefits of technology

[0022]本发明基于Hspice瞬态仿真的的测点优选方法,向集成电路注入缺陷,采用Hspice瞬态仿真生成瞬态仿真文件,从每个瞬态仿真文件中提取对应运行状态的数据矩阵,根据每个数据矩阵得到其中每个测点的电压数据曲线,根据缺陷电压数据曲线和正常运行状态下的电压数据曲线之间的面积判断测点是否可以检测缺陷,从而得到缺陷-测点矩阵,再基于遗传算法来进行测点优选,得到最优测点组合。本发明可以有效得到最优测点组合,进而提高集成电路的缺陷检测效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116306444B_ABST
    Figure CN116306444B_ABST
Patent Text Reader

Abstract

This invention discloses a measurement point optimization method based on Hspice transient simulation. The method involves injecting defects into an integrated circuit, generating transient simulation files using Hspice transient simulation, extracting data matrices corresponding to the operating state from each transient simulation file, obtaining voltage data curves for each measurement point based on each data matrix, and determining whether a measurement point can detect defects based on the area between the defect voltage data curve and the voltage data curve under normal operating conditions. This yields a defect-measurement point matrix. Then, a genetic algorithm is used to optimize the measurement points, obtaining the optimal combination of measurement points. This invention can effectively obtain the optimal combination of measurement points, thereby improving the defect detection efficiency of integrated circuits.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of integrated circuit technology, and more specifically, relates to a method for optimizing measurement points based on Hspice transient simulation. Background Technology

[0002] Currently, integrated circuits are developing towards greater complexity and integration, making defect detection increasingly difficult. Defect detection in integrated circuits typically involves using simulation to obtain a fault dictionary for the test points beforehand, and then performing detection based on this dictionary. However, due to the increasing scale of integrated circuits, the method of drawing circuit diagrams and performing simulations using simulation software such as PSpice is becoming increasingly cumbersome. Given the large number of components in the circuit, Hspice is considered for circuit simulation. Hspice is an analog, RF, and mixed-signal electronic design software with advantages such as a large number of models, high simulation accuracy, and strong convergence. Hspice's input file is a netlist file of the circuit, containing all the circuit information. This eliminates the reliance on drawing circuit diagrams and is more suitable for simulating larger circuits.

[0003] Synopsys HSPICE is an optimized analog circuit simulation software. The size of the circuits that HSPICE can simulate is limited only by memory. As a 32-bit application, HSPICE can handle up to 2GB of memory. Compared to traditional SPICE simulators, HSPICE is faster and has more features. It can perform DC simulation, AC simulation, transient simulation, and other operations, and has reliable automatic convergence capabilities, providing convenience for analyzing circuit performance.

[0004] To improve the efficiency of integrated circuit defect detection, the selection of measurement points is crucial, and simulation data can often be used to optimize these points. However, Hspice sometimes fails to strictly adhere to the step size during transient simulations, especially for complex circuits where sampling times are less predictable. This variation in sampling time renders the Euclidean distance method for determining defect detection capability in the generated data inapplicable, necessitating further improvement. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a measurement point optimization method based on Hspice transient simulation. The method obtains the measurement point voltage data under various defects through Hspice transient simulation, determines whether the measurement point can detect defects based on the area between the defect voltage data and the normal voltage data, and obtains the defect-measurement point matrix. Then, the method optimizes the measurement points based on the genetic algorithm, making the optimal combination of measurement points more reasonable, thereby improving the defect detection efficiency of integrated circuits.

[0006] To achieve the above-mentioned objectives, the measurement point optimization method based on Hspice transient simulation of the present invention includes the following steps:

[0007] S1: Select from integrated circuits according to actual needs. One alternative test point and setting up integrated circuits For each defect, a defect model is designed, and a script is written to inject the defect into the integrated circuit using the alter statement. Hspice transient simulation is then used to generate the model. Transient simulation files for each running state , , This indicates that the integrated circuit is in normal operating condition. Indicates that the integrated circuit is in the first position. The operational status of each defect;

[0008] S2: From each transient simulation file The time information is extracted, and the voltage data of each candidate measurement point in the integrated circuit at each time point is extracted to form a measurement point voltage data vector. The measurement point voltage data vectors at each time point are arranged in chronological order as row vectors to form a data matrix corresponding to the operating state. ;

[0009] S3: For each data matrix Extract each candidate measurement point from it. Voltage data sequence, A coordinate system was established with time as the x-axis and voltage data as the y-axis, and the results were obtained for each candidate measurement point by fitting the data. In the data matrix Voltage data curves from the start to the end of the simulation ;

[0010] S4: For each alternative measurement point Calculate its voltage data curve under normal operating conditions of the integrated circuit. Area enclosed by the horizontal axis Then calculate its value in the first place. Voltage data curves under each defect and voltage data curve Area obtained by enclosure , ,if , The preset proportional parameter is used to determine the candidate measurement points. The first one can be detected A defect, causing the defect-test point labeling. Otherwise, mark the defect-test point. The obtained defect-measuring point markers will form a structure of size [size missing]. Defect-measurement point matrix;

[0011] S5: After obtaining the defect-measurement point matrix, a genetic algorithm is used to optimize the measurement points. The specific method is as follows:

[0012] S5.1: Pre-set two target parameters for measurement points, namely the fault detection rate index. and fault isolation rate index ;

[0013] S5.2: Select vector for measurement points As individuals within a population, Indicates alternative measurement points Selected, Indicates alternative measurement points Not selected; set population size to Randomly generated Individuals as the initial population Initialize the number of iterations. ;

[0014] S5.3: The fitness value of each individual is calculated using the following formula. :

[0015] ,

[0016] in, Indicates alternative measurement points The cost of testing; The fault detection rate for the current individual is calculated as follows: obtain the set of selected measurement points for the current individual. Record the number of selected measurement points as . Based on the defect-measurement point matrix, the column vector corresponding to each selected measurement point is obtained, forming a matrix of size [missing information]. The defect-measurement point submatrix, then The defect detection vector for the current individual is obtained by performing an OR operation on each column vector. The number of elements with a value of 1 in the defect detection vector is counted as the number of detectable defects for the current individual. Then the fault detection rate ;

[0017] The fault isolation rate for the current individual is calculated as follows: For the defect-measurement point submatrix, delete the row vectors that are 0, then delete the identical row vectors, and denote the number of remaining row vectors as... Increase fault isolation rate ;

[0018] S5.4: From the population Select individuals for crossover and mutation to obtain a new population. ;

[0019] S5.5: Determine if , This indicates the preset maximum number of iterations. If so, proceed to step S5.6; otherwise, proceed to step S5.7.

[0020] S5.6: Order population Return to step S5.3;

[0021] S5.7: Calculate the current population For each individual, the fitness is determined, and the individual with the highest fitness is selected. The set of selected measurement points corresponding to this individual is then used as the optimal combination of measurement points.

[0022] This invention presents a measurement point optimization method based on Hspice transient simulation. It involves injecting defects into an integrated circuit, generating transient simulation files using Hspice transient simulation, extracting data matrices corresponding to the operating state from each transient simulation file, obtaining voltage data curves for each measurement point based on each data matrix, and determining whether a measurement point can detect defects based on the area between the defect voltage data curve and the voltage data curve under normal operating conditions. This yields a defect-measurement point matrix. Finally, a genetic algorithm is used to optimize measurement points, resulting in the optimal combination of measurement points. This invention can effectively obtain the optimal combination of measurement points, thereby improving the defect detection efficiency of integrated circuits. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating a specific implementation of the measurement point optimization method based on Hspice transient simulation of the present invention.

[0024] Figure 2 This is a schematic diagram of the defect model in this embodiment;

[0025] Figure 3 This is an example diagram of the alter statement for defect injection in this embodiment;

[0026] Figure 4 This is a flowchart of the measurement point selection based on the genetic algorithm in this embodiment;

[0027] Figure 5 This is a data example diagram of the integrated files in this embodiment;

[0028] Figure 6 yes Figure 5 The integrated data matrix extracted from the integrated file shown;

[0029] Figure 7 This is a fitting result diagram of the node at the disabled position in this embodiment;

[0030] Figure 8 This is an example diagram of the voltage data curve of node net0114 in this embodiment;

[0031] Figure 9 This is the defect-detection matrix in this embodiment. Detailed Implementation

[0032] The specific embodiments of the present invention will now be described with reference to the accompanying drawings to enable those skilled in the art to better understand the invention. It should be particularly noted that in the following description, detailed descriptions of known functions and designs that might obscure the main content of the invention will be omitted here.

[0033] Example

[0034] Figure 1 This is a flowchart illustrating a specific implementation of the measurement point optimization method based on Hspice transient simulation of the present invention. Figure 1 As shown, the specific steps of the measurement point optimization method based on Hspice transient simulation of the present invention include:

[0035] S101: Defect injection into integrated circuits:

[0036] Select from integrated circuits according to actual needs. One alternative test point and setting up integrated circuits For each defect, a defect model is designed, and a script is written to inject the defect into the integrated circuit using the alter statement. Hspice transient simulation is then used to generate the model. Transient simulation files for each running state , , This indicates that the integrated circuit is in normal operating condition. Indicates that the integrated circuit is in the first position. The defective operating status.

[0037] This embodiment only considers hard faults when injecting defects. The IEEE 2427 standard is used to simulate the injected defect model. For example, for open / short circuit faults in resistors, the resistor parameter values ​​in the netlist are modified. For an open circuit fault, the resistor value is changed to 10G or a larger value; for a short circuit fault, the resistor value is changed to 1 or a lower value. For three-terminal devices, such as MOSFETs, the short circuit fault model involves adding a small resistor between the pins where the short circuit occurs, and the open circuit fault model involves connecting a large resistor in series with the corresponding pin. Figure 2 This is a schematic diagram of the defect model in this embodiment. For example... Figure 2As shown, this embodiment sets up 5 types of defects. Based on the above defect model, a script is written to inject defects into the circuit using the `alter` statement, so that all defect results can be generated with only one simulation. Figure 3 This is an example diagram of the alter statement for defect injection in this embodiment.

[0038] S102: Obtain the defect data matrix:

[0039] From each transient simulation file The time information is extracted, and the voltage data of each candidate measurement point in the integrated circuit at each time point is extracted to form a measurement point voltage data vector. The measurement point voltage data vectors at each time point are arranged in chronological order as row vectors to form a data matrix corresponding to the operating state. .

[0040] In this embodiment, the data matrix The method to obtain it is as follows:

[0041] The contents of all transient simulation files obtained in step S101 are integrated into one file. Redundant information is removed from the integrated file, and the time information and the voltage data of each candidate measurement point in the integrated circuit corresponding to each time point are extracted to form a measurement point voltage data vector. The measurement point voltage data vectors at each time point are used as row vectors to form an integrated data matrix according to the time order and the transient simulation file order.

[0042] Table 1 is an example table of data matrices in this embodiment.

[0043]

[0044] Table 1

[0045] Since the simulation start and end times for each defect are the same, this is used as feature information. The integrated data matrix is ​​then divided row-wise according to the simulation start and end times, yielding... Data Matrix This refers to the data matrix under normal conditions and under injected defect conditions. The rows of the data matrix correspond to the sampling time data, so the number of rows is not all the same; at the same time, the column data are the voltage data of the measurement points in the circuit, so the number of columns is the same.

[0046] S103: Fitting voltage data curves at measurement points:

[0047] For each data matrix Extract each candidate measurement point from it. Voltage data sequence, A coordinate system was established with time as the x-axis and voltage data as the y-axis, and the results were obtained for each candidate measurement point by fitting the data. In the data matrix Voltage data curves from the start to the end of the simulation .

[0048] S104: Preliminary screening of measuring points:

[0049] For each candidate measurement point Calculate its voltage data curve under normal operating conditions of the integrated circuit. Area enclosed by the horizontal axis Then calculate its value in the first place. Voltage data curves under each defect and voltage data curve Area obtained by enclosure , ,if , This represents the preset proportional parameter (set in this embodiment). Then determine the candidate measurement points. The first one can be detected A defect, causing the defect-test point labeling. Otherwise, mark the defect-test point. The obtained defect-measuring point markers will form a structure of size [size missing]. The defect-measurement point matrix.

[0050] S105: Optimization of measurement points based on genetic algorithm:

[0051] After obtaining the defect-test point matrix, a genetic algorithm (GA) is used to optimize the test points, with the aim of using the fewest possible test point combinations to meet the set testability criteria. Figure 4 This is a flowchart of the measurement point selection based on a genetic algorithm in this embodiment. For example... Figure 4 As shown, the specific steps for selecting measurement points based on genetic algorithms in this embodiment include:

[0052] S401: Set preferred target:

[0053] In this invention, two preferred targets for measurement points need to be set in advance, namely the fault detection rate index. and fault isolation rate index .

[0054] S402: Genetic Algorithm Parameter Initialization:

[0055] In this invention, the encoding of individuals in the genetic algorithm population uses binary encoding, that is, the test point selection vector. As individuals within a population, Indicates alternative measurement points Selected, Indicates alternative measurement points Not selected. Set population size to Randomly generated Individuals as the initial population Initialize the number of iterations. .

[0056] S403: Calculate the fitness function:

[0057] The fitness function setting is crucial to the performance of genetic algorithms. Since this invention addresses the problem of optimal selection of test points, its objective is to select a set of test points that satisfies a fault detection rate greater than [a certain value]. Fault isolation rate greater than Simultaneous detection costs are minimized. Based on this, the present invention proposes a piecewise function form of fitness function, that is, the fitness value of each individual is calculated using the following formula. :

[0058] ,

[0059] in, Indicates alternative measurement points The cost of testing. The fault detection rate for the current individual is calculated as follows: obtain the set of selected measurement points for the current individual. Record the number of selected measurement points as . Based on the defect-measurement point matrix, the column vector corresponding to each selected measurement point is obtained, forming a matrix of size [missing information]. The defect-measurement point submatrix, then The defect detection vector for the current individual is obtained by performing an OR operation on each column vector. The number of elements with a value of 1 in the defect detection vector is counted as the number of detectable defects for the current individual. Then the fault detection rate .

[0060] The fault isolation rate for the current individual is calculated as follows: For the defect-measurement point submatrix, delete the row vectors that are 0, then delete the identical row vectors, and denote the number of remaining row vectors as... Increase fault isolation rate .

[0061] S404: Individual evolution yields a new population:

[0062] From population Select individuals for crossover and mutation to obtain a new population. Individual evolution is a fundamental operation in genetic algorithms, and will not be elaborated upon here.

[0063] S405: Determine if , This indicates the preset maximum number of iterations. If so, proceed to step S406; otherwise, proceed to step S407.

[0064] S406: Order population Return to step S403.

[0065] S407: Determine the optimal combination of measuring points:

[0066] Calculate the current population For each individual, the fitness is determined, and the individual with the highest fitness is selected. The set of selected measurement points corresponding to this individual is then used as the optimal combination of measurement points.

[0067] To better illustrate the technical effects of this invention, a bandgap reference circuit was used as a model for simulation experiments. This circuit model is the latest IEEE standard circuit model from 2021. In analog circuits, voltage and current references are widely used, and parameters such as circuit gain, output noise, and power consumption are often directly related to these references. These references are generally DC, requiring them to be independent of process parameters, power supply, and temperature (PVT). By using a bandgap reference circuit to superimpose currents or voltages with positive and negative temperature coefficients, a constant current or voltage unaffected by process, power supply voltage, and temperature (PVT) can be generated. The circuit simulation software used for verification was Hspice-2021, and the simulation data was processed using Python.

[0068] ● Hspice simulation:

[0069] 1) Inject defects into the initial netlist, targeting components in the circuit, using... Figure 2 The defect model is used to inject corresponding defects. Using the alter statement, a script is written to write the open and short circuit defects of the device in the netlist.

[0070] 2) Set the simulation mode. Add a simulation statement and set it to transient simulation (.tran t1 t2), where t1 is the step size of the transient simulation and t2 is the termination time of the simulation. The simulation starts from time 0 by default. By default, the generated tr file is in binary format, which is inconvenient to read. Use the command .option post=2 to convert the format to ASCII format.

[0071] 3) Open Hspice, select the storage path of the netlist in Input netlist file, import the netlist into Hspice, and then click simulate to start the simulation.

[0072] 4) After the simulation is complete, a .lis file will be generated, which can be used to check the simulation status. If there are no error instructions in the .lis file, the simulation is successful.

[0073] 5) After running Hspice, you will get one more tr file than the number of injected defects. tr0 represents the data of the normal operation state of the integrated circuit, and the subsequent tr files (tr1, tr2, ...) correspond to the defect files after the defects are injected in the alter order.

[0074] ● Feature extraction:

[0075] 1) In this experiment, a step size of 1µs was used, starting from time 0 and ending at time 110ms. 29 defects were injected, and the 79 nodes in the integrated circuit were used as test vectors. The generated .tr files were then integrated into a single file using a script.

[0076] 2) Figure 5 This is a data example diagram of the integrated files in this embodiment. For example... Figure 5 As shown, the data in the integrated file is mixed together and contains a lot of redundant information. The script removes the redundant information and separates the remaining data according to time data (the first column is the time data, and the following columns are the voltage data of different nodes at that time). Figure 6 yes Figure 5 The integrated data matrix extracted from the integrated file is shown.

[0077] 3) Using the start time 0s and the end time 110ms as feature points, the integrated matrix is ​​divided into rows, resulting in 30 smaller matrices. Each matrix contains the data information of the corresponding tr file.

[0078] 4) Using time nodes as the horizontal axis and node voltages as the vertical axis, linear interpolation is used to fit the data at different nodes in the generated matrix. Figure 7 This is a fitting result diagram of the node at the disabled location in this embodiment.

[0079] 5) Defects are detected by integrating curves. The integral between the fitted defect curve and the curve under normal conditions at the same node is calculated. If the calculated value is greater than a certain threshold, it means that the corresponding defect can be detected at that node. Figure 8 This is an example diagram of the voltage data curve for node net0114 in this embodiment. Figure 8As shown, the black curve is the voltage fitting curve of node net0114 under normal conditions, and the gray curve is the fitting curve of that node after injecting an open-circuit defect of r248. The area between the curves obtained by the integral function is 0.007550935222231404, which is greater than 20% of the area enclosed by the voltage data curve under normal operation and the horizontal axis, indicating that an open-circuit defect of r248 can be detected at net0114.

[0080] 6) Generate a defect-detection matrix. If a node can detect a defect, set the corresponding defect row and the corresponding test vector column of the matrix to 1; otherwise, set them to 0. Figure 9 This is the defect-detection matrix in this embodiment.

[0081] Then, based on the aforementioned defect-detection matrix, a genetic algorithm is used to optimize the test points. In this embodiment, the final optimized test vector is: A total of 12 test sites were selected, for individuals The corresponding Fault Detection Rate (FDR) and Fault Isolation Rate (FIR) were 93.22% and 42.13%, respectively.

[0082] As demonstrated by the simulation results above, the algorithm of this invention can effectively determine the optimal combination of measurement points in integrated circuits when there is inconsistency in the sampling points during transient simulation, thereby improving the efficiency of defect detection.

[0083] Although the illustrative specific embodiments of the present invention have been described above to enable those skilled in the art to understand the invention, it should be understood that the invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the invention as defined and determined by the appended claims, and all inventions utilizing the concept of the present invention are protected.

Claims

1. A method for optimizing measurement points based on Hspice transient simulation, characterized in that, Includes the following steps: S1: Select from integrated circuits according to actual needs. One alternative test point and setting up integrated circuits For each defect, a defect model is designed, and a script is written to inject the defect into the integrated circuit using the alter statement. Hspice transient simulation is then used to generate the model. Transient simulation files for each running state , , This indicates that the integrated circuit is in normal operating condition. Indicates that the integrated circuit is in the first position. The operational status of each defect; S2: From each transient simulation file The time information is extracted, and the voltage data of each candidate measurement point in the integrated circuit at each time point is extracted to form a measurement point voltage data vector. The measurement point voltage data vectors at each time point are arranged in chronological order as row vectors to form a data matrix corresponding to the operating state. ; S3: For each data matrix Extract each candidate measurement point from it. Voltage data sequence, A coordinate system was established with time as the x-axis and voltage data as the y-axis, and the results were obtained for each candidate measurement point by fitting the data. In the data matrix Voltage data curves from the start to the end of the simulation ; S4: For each candidate measurement point Calculate its voltage data curve under normal operating conditions of the integrated circuit. Area enclosed by the horizontal axis Then calculate its value in the first place. Voltage data curves under each defect and voltage data curve The area obtained by enclosing , ,if , The preset proportional parameter is used to determine the candidate measurement points. The first one can be detected A defect, causing the defect-test point labeling. Otherwise, mark the defect-test point. The obtained defect-measuring point markers will form a structure of size [size missing]. Defect-measurement point matrix; S5: After obtaining the defect-measurement point matrix, a genetic algorithm is used to optimize the measurement points. The specific method is as follows: S5.1: Pre-set two target parameters for measurement points, namely the fault detection rate index. and fault isolation rate index ; S5.2: Select vector for measurement points As individuals within a population, Indicates alternative measurement points Selected, Indicates alternative measurement points Not selected; set population size to Randomly generated Individuals as the initial population Initialize the number of iterations. ; S5.3: The fitness value of each individual is calculated using the following formula. : , in, Indicates alternative measurement points The cost of testing; The fault detection rate for the current individual is calculated as follows: obtain the set of selected measurement points corresponding to the current individual. Record the number of selected measurement points as . Based on the defect-measurement point matrix, the column vector corresponding to each selected measurement point is obtained, forming a matrix of size [missing information]. The defect-measurement point submatrix, then The defect detection vector for the current individual is obtained by performing an OR operation on each column vector. The number of elements with a value of 1 in the defect detection vector is counted as the number of detectable defects for the current individual. Then the fault detection rate ; The fault isolation rate for the current individual is calculated as follows: For the defect-measurement point submatrix, delete the row vectors that are 0, then delete the identical row vectors, and denote the number of remaining row vectors as... Increase fault isolation rate ; S5.4: From the population Select individuals for crossover and mutation to obtain a new population. ; S5.5: Determine if , This indicates the preset maximum number of iterations. If so, proceed to step S5.6; otherwise, proceed to step S5.

7. S5.6: Order population Return to step S5.3; S5.7: Calculate the current population For each individual, the fitness is determined, and the individual with the highest fitness is selected. The set of selected measurement points corresponding to this individual is then used as the optimal combination of measurement points.

2. The method for selecting the optimal measuring point according to claim 1, characterized in that, Extracting the data matrix in step S2 The specific method is as follows: The contents of all transient simulation files obtained in step S1 are integrated into one file. Redundant information is removed from the integrated file, and the time information and voltage data of each candidate measurement point in the integrated circuit corresponding to each time point are extracted to form a measurement point voltage data vector. The measurement point voltage data vectors are then arranged as row vectors according to the time order and the transient simulation file order to form an integrated data matrix. The integrated data matrix is ​​then divided by row according to the simulation start and end times to obtain… Data Matrix .