[go: up one dir, main page]

CN120673828A - Built-in self-test architecture, system and method for in-memory computing macro unit - Google Patents

Built-in self-test architecture, system and method for in-memory computing macro unit

Info

Publication number
CN120673828A
CN120673828A CN202511187180.3A CN202511187180A CN120673828A CN 120673828 A CN120673828 A CN 120673828A CN 202511187180 A CN202511187180 A CN 202511187180A CN 120673828 A CN120673828 A CN 120673828A
Authority
CN
China
Prior art keywords
test
self
memory
calculation
built
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.)
Granted
Application number
CN202511187180.3A
Other languages
Chinese (zh)
Other versions
CN120673828B (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.)
Hangzhou Micro Nano Core Electronic Technology Co ltd
Original Assignee
Hangzhou Micro Nano Core Electronic 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 Hangzhou Micro Nano Core Electronic Technology Co ltd filed Critical Hangzhou Micro Nano Core Electronic Technology Co ltd
Priority to CN202511187180.3A priority Critical patent/CN120673828B/en
Publication of CN120673828A publication Critical patent/CN120673828A/en
Application granted granted Critical
Publication of CN120673828B publication Critical patent/CN120673828B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Tests Of Electronic Circuits (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • For Increasing The Reliability Of Semiconductor Memories (AREA)

Abstract

本发明涉及一种面向存内计算宏单元的内建自测试方法、架构及系统,包括执行第一测试模式:在MBIST测试算法的中插入计算激活向量及计算使能指令,以在读操作后进行进行计算测试以检测存储阵列及其与位乘法逻辑之间的耦合故障进行;以及判断存储读取结果和计算结果是否正确,若是,则进入第二测试模式或判定自测试正确并完成检测,否则基于检测结果诊断故障位置。本申请提供的测试方法,在传统MBIST算法中的插入计算使能和计算激活向量,在读操作之后通过对额外执行的乘累加计算操作的验证,在覆盖传统存储器故障类型的前提下,能够进一步有效检测存储单元和计算单元之间的数据耦合这一特有的故障,提高了故障的覆盖率。

The present invention relates to a built-in self-test method, architecture, and system for in-memory computing macrocells, comprising executing a first test mode: inserting a computation activation vector and a computation enable instruction in an MBIST test algorithm to perform a computation test after a read operation to detect coupling faults between a storage array and its bit multiplication logic; and determining whether the storage read result and the computation result are correct. If so, entering a second test mode or determining that the self-test is correct and completing the test; otherwise, diagnosing the fault location based on the test result. The test method provided by the present application inserts a computation enable and computation activation vector in a traditional MBIST algorithm, and by verifying the additional multiplication-accumulation computation operation performed after the read operation, while covering traditional memory fault types, can further effectively detect the unique fault of data coupling between storage cells and computing cells, thereby improving fault coverage.

Description

Built-in self-test architecture, system and method for in-memory computing macro unit
Technical Field
The invention relates to the technical field of chip testing, in particular to a built-in self-test architecture, a system and a method for a memory internal computing macro unit.
Background
With the rapid development of artificial intelligence algorithms, the problem of "memory wall" in traditional computing hardware is increasingly prominent with the rapid development of Deep Neural Networks (DNNs). In-memory Computing (CIM) technology effectively reduces data migration costs and power consumption by introducing computing power into memory, and is one of the key technologies to solve this problem.
In-memory computing macros are typically widely deployed in AI chips as computing IPs that provide computing power and partial storage. While a large number of on-chip in-memory computing macros need to be robust and self-checking to ensure system-level reliability and testability. In addition, as technology scales shrink and design complexity continues to increase, the probability of chip failure increases. Therefore, the reliability and testability of DCIM should be carefully ensured prior to mass production.
For conventional memory (IP), built-in self-test (BIST) is an efficient and fast method to verify its function and enhance its reliability in chip design. On-chip BIST can enable autonomous, efficient self-test, reducing reliance on expensive Automated Test Equipment (ATE). BIST has been widely used in SRAM memories and dedicated Memory BIST (MBIST) algorithms, such as MSCAN, checkerboard, have been developed.
However, the characteristic that DCIM tightly combines memory cells with computational logic presents new challenges to chip testing, and since DCIM couples SRAM memory and logic together, a coupling failure of both in addition to the original failure of SRAM and computational logic can cause circuit failure, which is a characteristic failure caused by the characteristics of DCIM. Meanwhile, in the BIST of the conventional memory, since read-write data are identical, i.e., the test vector (write data) and the result to be verified (read data) are identical, the result comparison circuit thereof can simply adopt an XOR structure. In the case of DCIM, the calculation result is a multiply-accumulate (MAC) result of the weight data and the input data read out by the multi-row SRAM, and the multiply-accumulate result and the input data are completely different. For a set of test vectors, the ideal calculation Result is called Golden reference (Golden Result). The generation of the golden reference of the MAC results of DCIM requires either additional memory (ROM) or an additional set of equivalent calculation circuits, both of which generate a huge area overhead. And the fault location is difficult to be located directly and accurately after a multiply-accumulate (MAC) operation. Because the input to the computing output is a many-to-one mapping (i.e., different inputs may produce the same output). Conventional Memory BIST (MBIST) schemes, such as the March algorithm, have been inadequate to cope with the test requirements of DCIM because they fail to cover computationally dependent coupling failures, resulting in lower test coverage, affecting the system reliability and yield of AI chips.
Most CIM tests now adopt FPGA to apply test stress, and the test method is only suitable for testing a small number or single chip, is difficult to realize automation, and cannot be applied to a mass production scene (the large number of chips need to be rapidly screened, and a large amount of time and manpower are consumed for testing one chip independently). And this method can only apply test stress from the top layer of the AI chip, and it is difficult to test and locate faults on each CIM individually for a chip integrating multiple CIMs.
In the prior art, a self-test circuit is designed for CIM, but test vectors/instructions of the self-test circuit are all generated randomly, and analysis and coverage are not carried out for the specific fault type of the in-memory calculation, so that the test fault coverage rate is low.
Therefore, there is a need for improved test architecture and method for in-memory computing macro cells.
Disclosure of Invention
In order to solve the technical problems, the invention provides a built-in self-test architecture of an in-memory computing macro unit, which is efficient, low in cost and capable of realizing high fault coverage rate, and the built-in self-test architecture comprises a built-in self-test method of the in-memory computing macro unit, and is characterized by comprising the following steps of executing a first test mode:
Inserting a compute enable vector and a compute enable instruction in an MBIST test algorithm to conduct a compute test after a read operation to detect a coupling failure between a memory array and its bit multiplication logic, and
Judging whether the stored reading result and the calculated result are correct, if so, entering a second test mode or judging that the self-test is correct and finishing the detection, otherwise, diagnosing the fault position based on the detection result.
According to the testing method provided by the application, the special fault of data coupling between the storage unit and the computing unit can be further and effectively detected on the premise of covering the traditional memory fault type by inserting the computation enabling vector and the computation activating vector in the traditional MBIST algorithm and verifying the additionally executed multiply-accumulate computation operation after the read operation, so that the fault coverage rate is improved.
Optionally, the built-in self-test method for the in-memory computing macro unit provided by the application further includes executing a second test mode:
Generating a set of automatic test vectors by ATPG, traversing the set of automatic test vectors and corresponding activation vectors for performing multiply-accumulate operations for testing calculation logic, respectively, and
Judging whether the calculation result is correct, if not, diagnosing the fault position, if so, judging that the self-test is correct and finishing the detection.
The second test mode is used as the supplement of the first test mode to form a multi-mode combined test system, the integrity, the robustness and the reliability of the whole test of the in-memory computing unit are improved, the second test mode automatically generates an input mode with high fault coverage rate through ATPG, and the test efficiency and the coverage rate are improved.
Optionally, the built-in self-test method for the in-memory computing macro unit provided by the application further comprises the following steps:
a mode selection step of selecting a corresponding test mode based on a test requirement, wherein the test mode comprises a first test mode, a second test mode and a sequential test mode;
If only the storage test is needed, executing a first test mode;
executing the second test mode if only the calculation test is needed, and
If the storage test and the calculation test are needed to be carried out at the same time, the sequential test mode is executed, namely the first test mode is executed first, and then the second test mode is executed.
The method and the device realize flexible adaptation for different test requirements by supporting storage, calculation and combination of multiple test modes, enhance the universality and configuration capability of a test scheme, improve the intelligentization and automation degree of a test flow by configuration logic of a mode selection mechanism, simplify the test control flow, and finally avoid redundant test by calling according to the requirement, improve the test efficiency, shorten the test time and reduce the resource consumption.
Optionally, the built-in self-test method for the in-memory computing macro unit provided by the application, the first test mode includes:
A step of writing the right into the memory array, which is to sequentially output ascending addresses to the test address channel, write the test data into each row of the memory array through the test weight channel in the corresponding period of each address, and synchronously control the write operation through controlling the CIM write enabling signal so as to ensure that all physical addresses of the memory array are loaded with uniform known data and provide known weight references for subsequent tests;
the calculation activating step is that the address range of the weight rewriting step is traversed again, a test input channel is loaded as an activating vector, a CIM calculation enabling signal and a CIM reading enabling signal are pulled up to trigger the storage array to read and multiply the linkage starting of an accumulation calculating path, and in each period, the storage array reads the weight of a corresponding row and carries out parallel bit multiplication operation with an input activating value, and then accumulation is completed through an addition tree, and a calculating result is output;
And a result judging and error detecting step, wherein if the calculated result is consistent with the expected value, the next test mode is entered or the BIST correct is output to finish the test, otherwise, the system outputs the BIST correct to be low and enters the diagnosis flow.
Firstly, the known weight writing mechanism is unified, the predictability of the subsequent calculation output can be ensured, an ideal reference value is provided for fault detection, and the test controllability and accuracy are improved.
And secondly, a synchronous control mechanism of CIM write enabling signals and calculation/read enabling signals can realize precisely controlled write-in and calculation processes, avoid time sequence dislocation or test distortion and enhance test stability.
Optionally, the built-in self-test method for the in-memory computing macro unit provided by the application, the second test mode includes:
The test vector weight loading step is that the automatic test vector generated by ATPG is written into the corresponding storage array address row, and the writing time sequence is controlled by a CIM writing enabling signal, so that the correct configuration of the automatic test vector data is ensured;
After the automatic test vector writing is completed, the system synchronously loads the corresponding activation vector to a calculation path, and simultaneously pulls up CIM calculation enabling and starts multiply-accumulate operation;
and a result judging step of carrying out self-comparison on the test result and the adjacent columns, if all the automatic test vector tests pass, pulling up a BIST test pass signal and sending out a BIST end instruction, and if any automatic test vector test fails, recording error position information and outputting the error position information.
The main technical effects of such design include:
and the test precision of the calculation path is improved, namely the corner errors and interconnection anomalies of the complex calculation path can be accurately covered by the diversified test vectors generated by the ATPG.
The test dependence is reduced, the reference golden value requirement is eliminated by a self-comparison mechanism, and the test storage cost and the external control complexity are reduced.
And the stability of time sequence control is improved, and the synchronism and consistency of the test process are ensured through fine control signals such as CIM write enable, CIM calculation enable and the like.
And an automatic diagnosis and feedback mechanism, wherein once a fault is found, the system can automatically record and output the fault position, so that the fault positioning and debugging efficiency is enhanced.
The expansion is strong, the support is expanded to a plurality of groups of vector tests or different activation combination tests, and the flexibility of the whole BIST is improved.
In order to achieve the above object, the present application provides a built-in self-test architecture for an in-memory computing macro unit, comprising:
An MBIST module configured to generate a test address and a test weight for testing a memory array of the in-memory computing macro-cell in a first test mode;
An LBIST module configured to generate test inputs for coupling fault detection between the memory array and its bit multiplication logic in a first test mode, and to provide an automatic test vector for testing the computation logic of the in-memory computation macro-cell in a second test mode;
the BIST controller is connected with the MBIST module and the LBIST module and used for controlling the operation of the MBIST module and the LBIST module;
A multiplexer network connected among the BIST controller, the MBIST module, the LBIST module and the in-memory computing macro unit for switching inputs corresponding to modes between a functional mode and a test mode, and
And the diagnosis unit is connected with the BIST controller and used for analyzing and outputting the fault position according to the test feedback information.
Optionally, the MBIST module includes:
A memory decoder for generating test weights, and
And the storage counter is connected with the storage decoder and is used for generating a test address.
Optionally, the LBIST module includes:
A logic decoder for generating test inputs and automatic test vectors, and
And the logic counter is connected with the logic decoder and is used for controlling the time sequence of the automatic test vector.
In order to achieve the above object, the present application provides a built-in self-test system for an in-memory computing macro unit, including any one of the built-in self-test architecture for an in-memory computing macro unit described above, further including:
a memory computing macro unit connected with the built-in self-test architecture, and
The comparison unit is connected with the in-memory calculation macro unit and the diagnosis unit, and can compare the stored test result and/or the calculated test result of the in-memory calculation macro unit with a preset value and send the stored error information and/or the logic error information to the diagnosis unit.
Optionally, the comparing unit includes a logic comparator and a storage comparator, which are respectively used for calculating the comparison of the test results and storing the comparison of the test results, and the logic comparator determines whether the calculation results are correct based on the consistency of the calculation results of two adjacent columns.
Drawings
FIG. 1 is a schematic diagram of a typical failure model of an in-memory computing array.
Fig. 2 is a schematic structural diagram of a built-in self-test system for in-memory computing macro unit according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of the logic comparator of fig. 2.
Fig. 4 is a flowchart of a first test mode in a built-in self-test method for an in-memory computing macro unit according to an embodiment of the present invention.
Fig. 5 is a flowchart of a second test mode in the built-in self-test method for an in-memory computing macro unit according to the embodiment of the present invention.
Fig. 6 is a timing diagram of a built-in self-test method for an in-memory computing macro cell according to an embodiment of the present invention.
Fig. 7 is a schematic diagram of steps of a built-in self-test method for an in-memory computing macro unit according to an embodiment of the present invention.
Fig. 8 is a schematic diagram of steps of a method for built-in self-test of an in-memory computing macro cell according to an embodiment of the present invention.
Fig. 9 is a schematic diagram of steps of a built-in self-test method for an in-memory computing macro unit according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
FIG. 1 illustrates an in-memory compute array and two typical failure models thereof, the in-memory compute array being used to perform the following operations:
vector-matrix multiplication (VMM) or matrix-matrix multiplication (MMM), i.e., y=w×a;
Wherein, A is input vector or input matrix, through address lines A0, A1, AM input, W is weight matrix, stored in memory cell mode, Y is output vector or matrix, representing the result after weight calculation.
With continued reference to fig. 1, the weight storage unit W { i, j } is responsible for storing the weight value of the ith row and jth column, and is typically implemented using SRAM, RRAM, feRAM, and other technologies.
The bit multiplication unit, i.e. multiplier x, receives the corresponding input Ai for each row and multiplies the weights of each column in parallel with W { i, j }. Ai.
The adder array accumulates multiplication results of all rows in the same column to realize vector dot product.
The multi-column computation structure selects different column results to output to Y {0,0} to Y {0, N }.
In two typical fault models, the first is a weight-input coupling fault, the fault is located between an input signal and a weight storage unit, electrical coupling exists between the input and the weight, voltage disturbance may be wound, and therefore the stored weight is unstable in reading, the stability of the storage unit may be affected by the input signal, the read weight is made to be in error, finally, the calculated weight value of multiplication is incorrect, and even if the input is correct, the result is wrong.
The second type is a coupling fault of weight-bit multiplication results, which is located between the weight storage unit and the multiplication result output end, and the stored weight value affects the multiplier result output line in the output process, which may cause the output multiplication result to be polluted due to weight change, and may cause the original result to be interfered by bypass signals in the output stage, and finally, even if the input and the weight are correct, the final result may be wrong due to the influence of the weight on the output path.
Since DCIM couples SRAM memory and logic together, a coupling failure of both in addition to the original SRAM and computational logic can cause circuit failure, which is a characteristic failure caused by the characteristics of DCIM. After finding the above-mentioned specific faults caused by the characteristics of in-memory computation, the applicant purposefully proposes a built-in self-test architecture 100 of an in-memory computation macrocell which is efficient, low-cost and capable of realizing high fault coverage, as shown in fig. 2, comprising:
MBIST module 10 for generating test stimulus for a memory path in-memory computational macro cell 200, specifically, MBIST module is configured to generate test address and test weight for testing a memory array of the in-memory computational macro cell in a first test mode, MBIST module 10 includes memory decoder 11 for generating test weight and decoding into control signal, memory counter 12 connected with memory decoder 11 for generating test address;
An LBIST module 20 for generating test stimuli for the computation path of the in-memory computation macro-cell 200, in particular, for generating test inputs for the storage array and the detection of coupling faults between it and the bit multiplication logic in a first test mode, and for providing an automatic test vector for testing the computation logic of the in-memory computation macro-cell 200 in a second test mode, the LBIST module 20 comprising a logic decoder 21 for generating test inputs of the logic function unit and the automatic test vector, a logic counter 22 connected to the logic decoder 21 for controlling the timing of the automatic test vector;
BIST controller 30, connected to MBIST module 10 and LBIST module 20, for controlling operation of MBIST module 10 and LBIST module 20;
A multiplexer network 40 connected between the BIST controller 30, the MBIST module 10, and the LBIST module 20 and the in-memory computation macro cell 200, capable of switching between a functional mode and a test mode and gating inputs corresponding to the modes, and
A diagnostic unit 50, coupled to the BIST controller 30, for analyzing and outputting the fault location and/or fault type based on the test feedback information.
Specifically, the multiplexer network 40 includes a weight selector 41 for selectively inputting test weights or functional weights, an input selector 42 for selectively inputting test inputs or functional inputs (matrices or vectors), an address selector 43 for selectively inputting test addresses or outputs of logic counters, and a control signal selector 44 for selectively inputting test control signals or control signals, the inputs of each selector being determined by the output instructions of the BIST controller 30, in other words, each selector being selectively operated in a test mode or a functional mode under the control of the BIST controller 30.
Specifically, the logic decoder 21 is configured to integrate ATPG for generating test vectors, which is an automated tool for generating test vectors for digital circuits, with the aim of detecting specific types of faults (such as open circuits, short circuits, coupling, delays, etc.), thereby verifying whether the chip has manufacturing defects or functional failures, and in some embodiments, ATPG may be provided separately from the logic decoder 21 and connected thereto.
With continued reference to fig. 2, the present embodiment further provides a built-in self-test system of the in-memory computing macro unit, which includes the built-in self-test architecture 100 of the in-memory computing macro unit, the in-memory computing macro unit 200, and the comparing unit 300.
Optionally, the comparing unit 300 includes a logic comparator 310 and a storage comparator 320, which are respectively used for comparing the calculated test results and comparing the stored test results, more specifically, the logic comparator 310 determines whether the calculated result is correct based on the consistency of the calculated results of two adjacent columns, as shown in fig. 3, in this embodiment, since the self-comparison method is adopted, the same activation and weight can be input into each column without generating an ideal reference calculated result, and further, whether the calculation is correct is determined by comparing the consistency of the calculated results between two adjacent columns, thereby greatly reducing the additional hardware cost.
The in-memory computing macro unit 200 is connected to the built-in self-test architecture 100, and the comparing unit 300 is connected to the in-memory computing macro unit 200 and the diagnosing unit 50, and is capable of comparing the stored test result and/or the computed test result of the in-memory computing macro unit 200 with a preset value, and transmitting the stored error information and/or the logic error information to the diagnosing unit 50.
The embodiment also provides a built-in self-test method of the memory computing macro unit, which comprises a first test mode and a second test mode, wherein fig. 4 is a flow chart of the first test mode, after the first test mode is started, a basic storage test algorithm is firstly selected, a test algorithm is executed, a computing enabling vector is inserted, a computing activating vector is computed after a reading operation, whether a storage reading result and a computing result are correct or not is judged, if not, a fault position is diagnosed, whether the last operation of the algorithm is further judged, if yes, the BIST is output correctly, if not, the test algorithm is executed again, and the computing enabling vector is inserted, so that the computing test is carried out after the reading operation.
FIG. 5 is a flow chart of a second test mode, after the second test mode is started, traversing the ATPG test vector, judging whether the calculation result is correct, if not, diagnosing the error position, if yes, further judging whether the calculation result is the last test vector, if yes, outputting the BIST correctly, and if not, returning to traversing the ATPG test vector.
The following describes the operation of the built-in self-test architecture 100 of the in-memory computational macro shown in fig. 2 with reference to fig. 6, wherein the BIST controller 30, upon receiving the BIST enable signal, gates the multiplexer network 40 into test control signals, test weights, test inputs and test addresses, and requires testing if the test instructions require both memory functions and computational functions:
Firstly, a first Test mode is executed, namely a built-In memory Self-Test module 10 is executed, based on a traditional MBIST algorithm such as a March C - algorithm, and then an address traversing and weight writing step is executed, namely a BIST controller 30 sequentially outputs ascending addresses (0-511) to Test address channels, and writes all 1 Test data into each row of the SRAM through the Test weight channels In each address corresponding period, wherein the writing operation is synchronously controlled by controlling a CIM write enable signal so as to ensure that all physical addresses of the SRAM are loaded with uniform known data, and a known weight reference is provided for subsequent tests.
After the write is completed, a computation activation step is performed in which BIST controller 30 re-traverses the address range (0-511), which loads the test input (also referred to as input activation) channel into a 32-bit all 1 activation vector (i.e., 32' hfffffffff), and pulls up the "CIM computation enable" signal and the "CIM read enable" signal to trigger the SRAM read and multiply-accumulate computation path to start in a coordinated manner. In each period, the SRAM reads the all 1 weights of the corresponding rows, performs parallel bit multiplication operation with the input activation value, then completes accumulation through an addition tree, and outputs a calculation result.
After the calculation is completed, the step of judging the result and detecting the error is carried out, wherein the expected output of the system is a multiplication accumulation result of 32-bit all 1 weight and 32-bit all 1 activation, namely a fixed value. The calculated output is sent to a logic comparator for result determination, if the calculated value is consistent with the expected value, the next test mode is entered, otherwise the system outputs a BIST correct low, and the diagnostic flow is entered.
In the test stage, whether the final accumulated result is an expected value is compared by a logic comparator, and the intermediate paths (reading, calculating and storing) are involved in data transmission, so that SRAM bitcell faults, reading path errors, local faults of a multiplier/adder and coupling defects in a data path are effectively covered.
It should be noted that the test inputs are all 1 as examples, and different test inputs may be selected to match corresponding algorithms for testing in different basic MBIST algorithms and different steps of the same MBIST algorithm.
According to the testing method provided by the embodiment, the computation enabling vector and the computation activating vector are inserted in the traditional MBIST algorithm, after the reading operation, the special fault of data coupling between the storage unit and the computing unit can be further and effectively detected on the premise of covering the traditional memory fault type through verification of additionally executed multiply-accumulate computation operation, and the fault coverage rate is improved.
If the settlement value executed by the first test mode is consistent with the expected value, a second test mode (also called entering a second test stage) is executed, and the second test mode mainly carries out coverage test on complex combination logic structures such as multipliers, addition trees and the like in the CIM structure, and excitation and expected pairs which are generated in advance by an automatic test vector generation tool (ATPG) are adopted.
The second test mode includes the steps of:
Test vector weight loading step the BIST controller 30 writes weight vectors (W0, W1,..w31) generated by ATPG (Automatic TEST PATTERN Generation) into corresponding SRAM address rows in sequence according to the ascending address. The weight data width is 256 bits, and each group of weights corresponds to a specific activation vector and is used for combining test calculation paths. And in the loading process, a CIM write enabling signal controls a write time sequence to ensure that the weight data is correctly configured.
And the step of activating vector loading and calculating triggering, namely after the weight writing is completed, synchronously loading corresponding activating vectors (A0, A1, ai) to a calculating path by a system, simultaneously pulling up CIM calculation enabling, and starting multiply-accumulate operation. In the process, the output result of the multiplier is compared and judged again through the self-comparison module, and the functional correctness of the multiplier is verified.
And a result judging step, namely after all ATPG vector tests pass, the BIST controller pulls up the BIST to pass and sends out a BIST ending instruction to complete the whole BIST flow. If either test fails, the BIST controller 30 records error location information and outputs the error location information through the diagnostic unit.
It should be noted that the BIST test pass is only characterized if the BIST is correct and the BIST is completed at 1.
Alternatively, if only the memory function is to be tested, only the relevant steps of the first test mode may be performed, and similarly, if only the logic function is to be tested, only the relevant steps of the second test mode may be performed. Specifically, as shown in fig. 4, the built-in self-test method of the in-memory computing macro unit further includes a mode selection step, if only a memory test is needed, entering a first test mode, if only a computation/logic test is needed, entering a second test mode, and if both a memory test and a computation test are needed, executing a sequential test mode, that is, executing a related step of the first test mode first and then executing a related step of the second test mode.
Optionally, as shown in fig. 7, the present embodiment provides a built-in self-test method for an in-memory computing macro unit, including the steps of:
Inserting a compute enable vector and a compute enable instruction in an MBIST test algorithm to conduct a compute test after a read operation to detect a coupling failure between a memory array and its bit multiplication logic, and
Judging whether the stored reading result and the calculated result are correct, if so, entering a second test mode or judging that the self-test is correct and finishing the detection, otherwise, diagnosing the fault position based on the detection result.
Optionally, as shown in fig. 8, the method for built-in self-testing of an in-memory computing macro unit according to the present embodiment further includes executing a second test mode:
Generating a set of automatic test vectors by ATPG, traversing the set of automatic test vectors and corresponding activation vectors for performing multiply-accumulate operations for testing calculation logic, respectively, and
Judging whether the stored reading result and the calculated result are correct, if not, diagnosing the fault position, if so, judging that the self-test is correct and finishing the detection.
Optionally, as shown in fig. 9, the built-in self-test method for an in-memory computing macro unit provided in this embodiment further includes the steps of:
A mode selection step of selecting a corresponding test mode based on a test requirement, wherein the test mode comprises a first test mode, a second test mode and a sequential test mode;
If only the storage test is needed, executing a first test mode;
executing the second test mode if only the calculation test is needed, and
If the storage test and the calculation test are needed to be carried out at the same time, the sequential test mode is executed, namely the first test mode is executed first, and then the second test mode is executed.
Optionally, the first test mode includes:
A step of writing the right into the memory array, which is to sequentially output ascending addresses to the test address channel, write the test data into each row of the memory array through the test weight channel in the corresponding period of each address, and synchronously control the write operation through controlling the CIM write enabling signal so as to ensure that all physical addresses of the memory array are loaded with uniform known data and provide known weight references for subsequent tests;
The method comprises the steps of computing and activating, namely, traversing the address range of the weight writing step again, loading a test input channel as an activating vector, pulling up a CIM computing enabling signal and a CIM reading enabling signal to trigger the memory array to read and multiply the computing path in a linkage mode, reading the weight of a corresponding row by the memory array in each period, carrying out parallel bit multiplication operation with an input activating value, completing accumulation through an addition tree, and outputting a computing result;
and a result judging and error detecting step, wherein if the calculated result is consistent with the expected value, the next test mode is started or the BIST correct is output to finish the test, otherwise, the system outputs the BIST correct to be low, and error diagnosis is carried out.
Optionally, the second test mode includes:
The test vector weight loading step is that the automatic test vector generated by ATPG is written into the corresponding storage array address row, and the writing time sequence is controlled by a CIM writing enabling signal, so that the correct configuration of the automatic test vector data is ensured;
after the automatic test vector writing is completed, the system synchronously loads the corresponding activation vector to a calculation path, pulls up CIM calculation enabling, and starts multiply-accumulate operation;
And a result judging step of carrying out self-comparison on the test result and the adjacent columns, if all the automatic test vectors pass the test, pulling up a BIST correct signal and sending out a BIST ending instruction, and if any automatic test vector fails the test, recording error position information and outputting the error position information.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (10)

1.一种面向存内计算宏单元的内建自测试方法,其特征在于,包括执行第一测试模式:1. A built-in self-test method for an in-memory computing macrocell, comprising executing a first test mode: 在MBIST测试算法的中插入计算激活向量及计算使能指令,以在读操作后进行进行计算测试以检测存储阵列及其与位乘法逻辑之间的耦合故障进行;以及Inserting a calculation activation vector and a calculation enable instruction in the MBIST test algorithm to perform a calculation test after the read operation to detect coupling faults between the storage array and the bit multiplication logic; and 判断存储读取结果和计算结果是否正确,若是,则进入第二测试模式或判定自测试正确并完成检测,否则基于检测结果诊断故障位置。Determine whether the stored read result and the calculation result are correct. If so, enter the second test mode or determine that the self-test is correct and complete the test. Otherwise, diagnose the fault location based on the test result. 2.根据权利要求1所述的面向存内计算宏单元的内建自测试方法,其特征在于,还包括执行第二测试模式:2. The built-in self-test method for an in-memory computing macro unit according to claim 1 , further comprising executing a second test mode: 采用ATPG生成一组自动测试向量,遍历所述一组自动测试向量及对应的激活向量分别进行乘累加操作以用于测试计算逻辑;以及Generating a set of automatic test vectors using ATPG, traversing the set of automatic test vectors and corresponding activation vectors to perform multiplication and accumulation operations respectively for testing computing logic; and 判断计算结果是否正确,若否,诊断故障位置,若是,则判定自测试正确并完成检测。Determine whether the calculation result is correct. If not, diagnose the fault location. If so, determine that the self-test is correct and complete the test. 3.根据权利要求2所述的面向存内计算宏单元的内建自测试方法,其特征在于,还包括步骤:3. The built-in self-test method for an in-memory computing macro unit according to claim 2, further comprising the steps of: 模式选择步骤,基于测试需求选择对应的测试模式,所述测试模式包括第一测试模式、第二测试模式及顺序测试模式;A mode selection step, selecting a corresponding test mode based on the test requirements, wherein the test modes include a first test mode, a second test mode, and a sequential test mode; 若仅需要进行存储测试,则执行第一测试模式;If only a storage test is required, the first test mode is executed; 若仅需要进行计算测试,则执行第二测试模式;以及If only calculation test is required, the second test mode is executed; and 若同时需要进行存储测试及计算测试,执行顺序测试模式:先执行第一测试模式,后执行第二测试模式。If storage test and calculation test are required at the same time, execute the sequential test mode: execute the first test mode first, then execute the second test mode. 4.根据权利要求1所述的面向存内计算宏单元的内建自测试方法,其特征在于,所述第一测试模式包括:4. The built-in self-test method for an in-memory computing macro unit according to claim 1 , wherein the first test mode comprises: 权重写入步骤:依次向测试地址通道输出升序地址,在每个地址对应周期内通过测试权重通道将测试数据写入所述存储阵列的每一行,该写入操作通过控制“CIM写使能”信号进行同步控制,以确保所述存储阵列的所有物理地址均加载统一的已知数据,为后续测试提供已知的权重基准;Weight writing step: outputting ascending addresses to the test address channel in sequence, and writing test data into each row of the memory array through the test weight channel during each address corresponding cycle. This write operation is synchronously controlled by controlling the "CIM write enable" signal to ensure that all physical addresses of the memory array are loaded with uniform known data, providing a known weight benchmark for subsequent tests; 计算激活步骤:重新遍历所述权重写入步骤的地址范围,将测试输入通道加载为激活向量,拉高“CIM计算使能”信号和“CIM读使能”信号,以触发所述存储阵列读取与乘累加计算路径联动启动,在每一周期内,所述存储阵列读取相应行的权重,并与输入激活值进行并行位乘运算,随后通过加法树完成累加,输出计算结果;Computation activation step: retraverse the address range of the weight writing step, load the test input channel as the activation vector, pull high the "CIM calculation enable" signal and the "CIM read enable" signal to trigger the storage array read and the multiplication and accumulation calculation path to start in conjunction. In each cycle, the storage array reads the weight of the corresponding row and performs parallel bitwise multiplication with the input activation value, then completes the accumulation through the addition tree and outputs the calculation result; 结果判断与错误检测步骤:所述计算结果若与期望值一致,则进入下一测试模式或输出“BIST正确”为高完成测试;否则系统将输出“BIST正确”为低,进入诊断流程。Result judgment and error detection steps: If the calculation result is consistent with the expected value, the system enters the next test mode or outputs "BIST correct" as high to complete the test; otherwise, the system will output "BIST correct" as low and enter the diagnosis process. 5.根据权利要求1所述的面向存内计算宏单元的内建自测试方法,其特征在于,所述第二测试模式包括:5. The built-in self-test method for an in-memory computing macro unit according to claim 1 , wherein the second test mode comprises: 测试向量权重加载步骤:将ATPG生成的自动测试向量写入对应的存储阵列地址行,并通过“CIM写使能”信号控制写入时序,确保自动测试向量数据正确配置;Test vector weight loading step: Write the automatic test vector generated by ATPG into the corresponding memory array address line, and control the write timing through the "CIM write enable" signal to ensure that the automatic test vector data is correctly configured; 激活向量加载与计算触发步骤:在自动测试向量写入完成后,系统同步加载对应的激活向量至计算路径,同时拉高“CIM计算使能”,启动乘累加操作;Activation vector loading and calculation triggering steps: After the automatic test vector is written, the system synchronously loads the corresponding activation vector to the calculation path and simultaneously pulls up the "CIM calculation enable" to start the multiplication and accumulation operation; 结果判断步骤:将测试结果与相邻列进行自比较,若全部自动测试向量测试通过后,拉高“BIST测试通过”信号,并发出“BIST结束”指令;若任一自动测试向量测试未通过,则记录错误位置信息并输出。Result judgment step: compare the test results with the adjacent columns. If all automatic test vectors pass the test, pull up the "BIST test passed" signal and issue the "BIST end" instruction; if any automatic test vector fails the test, record the error location information and output it. 6.一种面向存内计算宏单元的内建自测试架构,其特征在于,包括:6. A built-in self-test architecture for an in-memory computing macrocell, comprising: MBIST模块,被配置为在第一测试模式下,生成用于测试所述存内计算宏单元的存储阵列的测试地址和测试权重;An MBIST module is configured to generate a test address and a test weight for testing the storage array of the in-memory computing macro unit in a first test mode; LBIST模块,被配置为在以第一测试模式下,生成用于存储阵列及其与位乘法逻辑之间的耦合故障检测的测试输入,在第二测试模式下,提供用于测试所述存内计算宏单元的计算逻辑的自动测试向量;The LBIST module is configured to generate test inputs for detecting coupling faults between the memory array and the bit multiplication logic in a first test mode, and to provide automatic test vectors for testing the computation logic of the in-memory computation macrocell in a second test mode; BIST控制器,与所述MBIST模块及所述LBIST模块相连接,用于控制所述MBIST模块与所述LBIST模块的运行;A BIST controller is connected with the MBIST module and the LBIST module, and is used to control the operation of the MBIST module and the LBIST module; 多路选择器网络,连接于所述BIST控制器、所述MBIST模块及所述LBIST模块与所述存内计算宏单元之间,用于在功能模式与测试模式之间切换与模式对应的输入;以及a multiplexer network connected between the BIST controller, the MBIST module, the LBIST module, and the in-memory computation macrocell, for switching inputs corresponding to the modes between a functional mode and a test mode; and 诊断单元,与所述BIST控制器连接,用于根据测试反馈信息分析并输出故障位置。The diagnosis unit is connected to the BIST controller and is used to analyze and output the fault location according to the test feedback information. 7.根据权利要求6所述的面向存内计算宏单元的内建自测试架构,其特征在于,所述MBIST模块包括:7. according to claim 6, towards the built-in self-test framework of storing interior computing macrocell, it is characterized in that described MBIST module comprises: 存储解码器,用于生成测试权重;以及Storing decoders for generating test weights; and 存储计数器,与所述存储解码器相连接,用于生成测试地址。A storage counter is connected to the storage decoder and is used to generate a test address. 8.根据权利要求6所述的面向存内计算宏单元的内建自测试架构,其特征在于,所述LBIST模块包括:8. The built-in self-test architecture for an in-memory computing macrocell according to claim 6, wherein the LBIST module comprises: 逻辑解码器,用于生成测试输入及自动测试向量;以及Logic decoders for generating test inputs and automatic test vectors; and 逻辑计数器,与所述逻辑解码器相连接,用于控制自动测试向量的时序。A logic counter is connected to the logic decoder and is used to control the timing of the automatic test vector. 9. 一种面向存内计算宏单元的内建自测试系统,包括权利要求6-8中任一项所述的面向存内计算宏单元的内建自测试架构,其特征在于,还包括:9. A built-in self-test system for an in-memory computing macrocell, comprising the built-in self-test architecture for an in-memory computing macrocell according to any one of claims 6 to 8, further comprising: 存内计算宏单元,与所述内建自测试架构相连接;以及an in-memory computing macro unit connected to the built-in self-test architecture; and 比较单元,与所述存内计算宏单元及所述诊断单元相连接,能够将所述存内计算宏单元的存储测试结果和/或计算测试结果与预设值进行比较,并将存储错误信息和/或逻辑错误信息发送至所述诊断单元。A comparison unit is connected to the in-memory computing macro unit and the diagnostic unit, and can compare the storage test results and/or calculation test results of the in-memory computing macro unit with preset values, and send storage error information and/or logic error information to the diagnostic unit. 10.根据权利要求9所述的面向存内计算宏单元的内建自测试系统,其特征在于,所述比较单元包括逻辑比较器及存储比较器,分别用于计算测试结果比较及存储测试结果比较,所述逻辑比较器基于相邻两列的计算结果的一致性判定计算结果是否正确。10. The built-in self-test system for in-memory computing macro units according to claim 9 is characterized in that the comparison unit includes a logic comparator and a storage comparator, which are respectively used for comparing calculation test results and storage test results, and the logic comparator determines whether the calculation result is correct based on the consistency of the calculation results of two adjacent columns.
CN202511187180.3A 2025-08-25 2025-08-25 Built-in self-test architecture, system and method for in-memory computing macro unit Active CN120673828B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202511187180.3A CN120673828B (en) 2025-08-25 2025-08-25 Built-in self-test architecture, system and method for in-memory computing macro unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202511187180.3A CN120673828B (en) 2025-08-25 2025-08-25 Built-in self-test architecture, system and method for in-memory computing macro unit

Publications (2)

Publication Number Publication Date
CN120673828A true CN120673828A (en) 2025-09-19
CN120673828B CN120673828B (en) 2025-11-18

Family

ID=97055532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202511187180.3A Active CN120673828B (en) 2025-08-25 2025-08-25 Built-in self-test architecture, system and method for in-memory computing macro unit

Country Status (1)

Country Link
CN (1) CN120673828B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180174665A1 (en) * 2016-12-20 2018-06-21 Ampere Computing Llc Method to dynamically inject errors in a repairable memory on silicon and a method to validate built-in-self-repair logic
US11043259B2 (en) * 2019-04-12 2021-06-22 The Trustees Of Princeton University System and method for in-memory compute
US20210279299A1 (en) * 2020-03-09 2021-09-09 International Business Machines Corporation Multiplication of a matrix with an input vector
CN117149537A (en) * 2023-06-27 2023-12-01 杭州智芯科微电子科技有限公司 Method and device for testing in-memory computing device, storage medium and equipment
CN117349092A (en) * 2023-09-21 2024-01-05 上海砺群科技有限公司 Memory computing structure, self-test method and self-repair method based on memory computing structure
CN118335162A (en) * 2023-01-10 2024-07-12 上海后摩智能科技有限公司 Method, device and chip for testing calculation macro in digital memory
CN118571300A (en) * 2024-05-30 2024-08-30 东南大学 General top-level test circuit system and method based on SRAM memory internal computing macro unit
CN118942522A (en) * 2024-07-19 2024-11-12 苏州雄立科技有限公司 Method and device for memory self-check and repair

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180174665A1 (en) * 2016-12-20 2018-06-21 Ampere Computing Llc Method to dynamically inject errors in a repairable memory on silicon and a method to validate built-in-self-repair logic
US11043259B2 (en) * 2019-04-12 2021-06-22 The Trustees Of Princeton University System and method for in-memory compute
US20210279299A1 (en) * 2020-03-09 2021-09-09 International Business Machines Corporation Multiplication of a matrix with an input vector
CN118335162A (en) * 2023-01-10 2024-07-12 上海后摩智能科技有限公司 Method, device and chip for testing calculation macro in digital memory
CN117149537A (en) * 2023-06-27 2023-12-01 杭州智芯科微电子科技有限公司 Method and device for testing in-memory computing device, storage medium and equipment
CN117349092A (en) * 2023-09-21 2024-01-05 上海砺群科技有限公司 Memory computing structure, self-test method and self-repair method based on memory computing structure
CN118571300A (en) * 2024-05-30 2024-08-30 东南大学 General top-level test circuit system and method based on SRAM memory internal computing macro unit
CN118942522A (en) * 2024-07-19 2024-11-12 苏州雄立科技有限公司 Method and device for memory self-check and repair

Also Published As

Publication number Publication date
CN120673828B (en) 2025-11-18

Similar Documents

Publication Publication Date Title
CN100399473C (en) Built-in self-test system and method
US4687988A (en) Weighted random pattern testing apparatus and method
TW559823B (en) System and method for identification of faulty or weak memory cells under simulated extreme operating conditions
CN110120242B (en) Memory testing method, apparatus, computer equipment, and storage medium
US20030120985A1 (en) Method and apparatus for memory self testing
US5517637A (en) Method for testing a test architecture within a circuit
JPH0643218A (en) Test generation by environmental emulation
US7533309B2 (en) Testing memories using algorithm selection
CN115083500B (en) Reconfigurable MBIST method based on adaptive March algorithm
US20020157051A1 (en) Method and apparatus for ABIST diagnostics
CN114398848A (en) A test vector generation method, device and storage medium
US11092645B2 (en) Chain testing and diagnosis using two-dimensional scan architecture
US8595557B2 (en) Method and apparatus for verifying memory testing software
US7571367B2 (en) Built-in self diagnosis device for a random access memory and method of diagnosing a random access
Powell et al. BIST for deep submicron ASIC memories with high performance application
JPH09128997A (en) Memory test system for multi-bit testing
CN115691632B (en) Test control system and method
CN120673828B (en) Built-in self-test architecture, system and method for in-memory computing macro unit
US20060026478A1 (en) Built-in self-test emulator
Kumari et al. FPGA implementation of memory design and testing
JP3428313B2 (en) Failure simulation method and failure analysis method for large-scale integrated circuit device
US20090210761A1 (en) AC Scan Diagnostic Method and Apparatus Utilizing Functional Architecture Verification Patterns
CN102737725A (en) Programmable built-in self testing system capable of automatic optimization on memory performance and built-in self testing method
KR102483739B1 (en) Dram-based post-silicon debugging method and apparatus reusing bira cam structure
Sowmya et al. Strategic DFT Implementation and Verification of Next–Gen Electronics Using ATPG Simulation

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