Digital self-test method, device, electronic equipment and system based on dTOF
By generating target test cases and performing digital logic calculations in the SRAM of dTOF devices, the problems of low digital processing function point verification efficiency and ambient light interference in the existing technology are solved, and efficient self-testing and function point coverage are achieved.
Patent Information
- Application Number
- CN202410684469.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-05-29
AI Technical Summary
In the testing of digital and analog hybrid devices, it is difficult to independently verify the various algorithm functions of digital internal designs, such as filtering and correction, with existing technology, resulting in low troubleshooting efficiency. Moreover, the DTOF system that is resistant to ambient light is difficult to operate in an outdoor environment due to ambient light interference. Effective testing.
By generating target test cases, the reference model of the dTOF device under test is used to determine the expected results, and the test stimulus data is stored in the SRAM of the device. Digital logic calculations are performed through the configuration interface to replace multi-event TDC data to realize digital processing of the dTOF device. Self-testing of function points.
It improves test efficiency and coverage, simplifies problem analysis, can generate test stimulus data according to needs, independently verifies digital processing function points, and reduces dependence on actual scene data collection.
Smart Images

Figure CN118503122B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of digital analog hybrid device testing, and in particular to a dTOF-based digital self-test method, device, electronic equipment and system. Background Art
[0002] DTOF (Direct Time of Flight) devices are the mainstream sensors for current LiDAR detection. They are mainly composed of a pixel part, an analog front end (AFE (Analog Front End) + TDC (Time-to-Digital Converter)) and a digital front end (signal processing). The input of the entire system is the pixel part, which converts the detected reflected light signal into an electrical pulse and sends it to the TDC of the analog front end. The TDC uses the optical drive signal that controls the laser emission as the start signal and the detected reflected electrical pulse transmitted by the pixel part as the end signal to complete the measurement of the time interval between the two pulse signals and convert it into a corresponding digital signal. The digital part calculates the depth of the TDC signal to the target object through digital processing methods (such as TCSPC (Time-Correlated SinglePhoton Counting)) for the digital signal detected by TDC, and outputs it to the outside for post-processing.
[0003] For the above systems, during the test process, it is often only possible to roughly verify the correctness of the device function by detecting objects at a certain fixed depth and comparing the detection results with the standard rangefinder results. The various algorithm functions designed internally, such as filtering and correction, are difficult to independently verify, which makes it difficult to troubleshoot problems when they occur. At the same time, the test efficiency is low, and the result judgment often requires manual participation. At the same time, in order to solve the problem of outdoor ambient light interference, the current anti-ambient light DTOF is often used with a multi-event TDC. Conventional data replacement solutions are difficult to complete the simulation of multi-event TDC data. Summary of the invention
[0004] In view of this, the present application provides a digital self-test method, device, electronic device and system based on dTOF.
[0005] Specifically, the present application is implemented through the following technical solutions:
[0006] According to a first aspect of an embodiment of the present application, a dTOF-based digital self-test method is provided, comprising:
[0007] Obtain a target test case to be executed; wherein the target test case is generated according to a digital processing function point to be tested of the dTOF device to be tested, the target test case includes test stimulus data and a test configuration, and the data structure of the test stimulus data is consistent with the multi-event TDC output data structure;
[0008] Determining the expected result corresponding to the target test case based on the test stimulus data and the test configuration of the target test case and using a reference model corresponding to the dTOF device to be tested; and
[0009] Storing the test stimulus data of the target test case into the SRAM in the dTOF device to be tested, writing the test configuration of the target test case into the dTOF device to be tested through the configuration interface of the dTOF device to be tested, and controlling the dTOF device to be tested to perform digital logic calculations according to the test stimulus data stored in the SRAM to obtain an output result corresponding to the target test case;
[0010] According to the comparison result between the expected result and the output result, the test result corresponding to the target test case is determined.
[0011] According to a second aspect of an embodiment of the present application, a dTOF-based digital self-test device is provided, comprising:
[0012] An acquisition unit, used for acquiring a target test case to be executed; wherein the target test case is generated according to a digital processing function point to be tested of the dTOF device to be tested, the target test case includes test stimulus data and a test configuration, and the data structure of the test stimulus data is consistent with the multi-event TDC output data structure;
[0013] A first determination unit is used to determine the expected result corresponding to the target test user according to the test stimulus data and the test configuration of the target test case and using a reference model corresponding to the dTOF device to be tested;
[0014] A control unit, used for storing the test stimulus data of the target test case into the static random access memory SRAM in the dTOF device to be tested, writing the test configuration of the target test case into the dTOF device to be tested through the configuration interface of the dTOF device to be tested, and controlling the dTOF device to be tested to perform digital logic calculation according to the test stimulus data stored in the SRAM to obtain an output result corresponding to the target test case;
[0015] The second determining unit is used to determine the test result corresponding to the target test case according to the comparison result between the expected result and the output result.
[0016] According to a third aspect of an embodiment of the present application, there is provided an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the method provided in the first aspect.
[0017] According to a fourth aspect of an embodiment of the present application, a machine-readable storage medium is provided, wherein the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by a processor, the method provided in the first aspect is implemented.
[0018] According to a fifth aspect of an embodiment of the present application, a dTOF-based digital self-test system is provided, comprising: a master control and a direct time-of-flight detection dTOF device to be tested; wherein:
[0019] A main control, used to obtain a target test case to be executed; wherein the target test case is generated according to a digital processing function point to be tested of a dTOF device, the target test case includes test stimulus data and a test configuration, and the data structure of the test stimulus data is consistent with the multi-event TDC output data structure;
[0020] Determine the expected result corresponding to the target test case according to the test stimulus data and the test configuration of the target test case and using the reference model corresponding to the dTOF device to be tested;
[0021] The master control is further used to store the test stimulus data of the target test case into the SRAM in the dTOF device to be tested, and write the test configuration of the target test case into the dTOF device to be tested through the configuration interface of the dTOF device to be tested;
[0022] The dTOF device to be tested is used to perform digital logic calculation according to the control instruction of the master control and the test stimulus data stored in the SRAM to obtain the output result corresponding to the target test case;
[0023] The main control is further used to determine the test result corresponding to the target test case based on the comparison result between the expected result and the output result.
[0024] The dTOF-based digital self-test method of the embodiment of the present application generates a target test case to be executed based on the digital processing function point to be tested of the dTOF device to be tested. For the target test case to be executed, on the one hand, the corresponding expected result can be determined based on the test stimulus data and test configuration of the target test case and the reference model corresponding to the dTOF device to be tested; on the other hand, the test stimulus data of the target test case can be stored in the SRAM in the dTOF device to be tested, and the test configuration of the target test case can be written into the dTOF device to be tested through the configuration interface of the dTOF device to be tested, and the dTOF device to be tested can be controlled to perform digital logic calculations based on the test stimulus data stored in the SRAM to obtain the corresponding output result. Then, the test result corresponding to the target test case can be determined based on the comparison result between the expected result and the output result. By using the internal SRAM of the dTOF device to store the test stimulus data instead of the multi-event TDC data, the digital processing function point test of the dTOF device is realized. Since the test stimulus data and the related test configuration can be configured according to the digital processing function point to be tested to generate the test case, the test is realized based on the simulation data without relying on the data collection of the actual scene, which effectively improves the test efficiency and test coverage. In addition, since the test stimulus data can be generated according to demand and the digital processing functional points of the dTOF device are tested instead of the analog part with high randomness, it is conducive to the analysis and troubleshooting of measurement problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flowchart of a digital self-test method based on dTOF provided by an exemplary embodiment of the present application;
[0026] Figure 2 It is a flowchart of a digital self-test solution based on dTOF provided by an exemplary embodiment of the present application;
[0027] Figure 3 is a schematic diagram of a module structure of a test system provided by an exemplary embodiment of the present application;
[0028] Figure 4 It is a schematic diagram of address mapping from SPI to SRAM provided by an exemplary embodiment of the present application;
[0029] Figure 5A This is a schematic diagram of an implementation flow of performing a write operation on SRAM via SPI provided by an exemplary embodiment of the present application;
[0030] Figure 5B This is a schematic diagram of an implementation flow of performing a read operation on an SRAM via SPI provided by an exemplary embodiment of the present application;
[0031] Figure 6 It is a schematic diagram of a storage format of excitation data in an SRAM provided by an exemplary embodiment of the present application;
[0032] Figure 7 It is a structural schematic diagram of a digital self-test device based on dTOF provided by an exemplary embodiment of the present application;
[0033] Figure 8 is a structural schematic diagram of another dTOF-based digital self-test device provided by another exemplary embodiment of the present application;
[0034] Fig. 9 It is a schematic diagram of the hardware structure of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.
[0036] See also Figure 1 , is a flow chart of a digital self-test method based on dTOF provided in an embodiment of the present application, such as Figure 1 As shown, the dTOF-based digital self-test method may include the following steps:
[0037] For example, Figure 1 The dTOF-based digital self-test method shown can be applied to a master in a dTOF-based digital self-test system.
[0038] Step S100, obtaining a target test case to be executed; wherein the target test case is generated based on a digital processing function point to be tested of the dTOF device to be tested, the target test case includes test stimulus data and test configuration, and the data structure of the test stimulus data is consistent with the multi-event TDC output data structure.
[0039] Exemplarily, the test case may be determined by the test target, and according to the test target, corresponding stimulus data (which may be referred to as test stimulus data) and a related pattern configuration list may be generated to together constitute a test case list.
[0040] Exemplarily, the test target may include a digital processing function point to be tested in the dTOF device, such as filtering or correction.
[0041] Exemplarily, a test target may correspond to a digital processing function point of a dTOF device.
[0042] According to the test target, test stimulus data adapted to the test target can be constructed, and a test configuration can be generated. According to the test stimulus data and the test configuration, a test case can be generated.
[0043] Exemplarily, one test target may correspond to one test case.
[0044] Illustratively, a test case may include test stimulus data and test configuration.
[0045] Exemplarily, the test configuration may include part or all of the number of measurements, frame rate, whether filtering is enabled, whether interpolation is required, peak search (highest point of the histogram) range, etc.
[0046] Illustratively, the data structure of the test stimulus data is consistent with the multi-event TDC output data structure.
[0047] Exemplarily, the incentive data may be generated in a random manner.
[0048] Exemplarily, the test case to be tested (referred to as a target test case in this article) may include one or more test cases.
[0049] In the case where the test case to be tested includes multiple test cases, the execution order of each test case can be determined according to the priority.
[0050] Exemplarily, the priority of the test cases can be determined based on the scenario.
[0051] Step S110 : Determine the expected result corresponding to the target test case based on the test stimulus data and test configuration of the target test case and using the reference model corresponding to the dTOF device to be tested.
[0052] Step S120, store the test stimulus data of the target test case into the SRAM in the dTOF device to be tested, write the test configuration of the target test case into the dTOF device to be tested through the configuration interface of the dTOF device to be tested, and control the dTOF device to be tested to perform digital logic calculations according to the test stimulus data stored in the SRAM to obtain the output result corresponding to the target test case.
[0053] In an embodiment of the present application, for a target test case, on the one hand, based on the test excitation data and test configuration of the target test case, a reference model corresponding to the dTOF device to be tested can be used to determine the expected result corresponding to the target test case, that is, the theoretical depth data corresponding to the test excitation data under the test configuration.
[0054] Exemplarily, in order to achieve the determination of the expected result, a corresponding reference model can be configured in the main control according to the digital processing logic inside the dTOF device to be tested, and the reference model can implement the digital processing logic.
[0055] Exemplarily, the reference model is related to the type of the dTOF device, and the reference models corresponding to the same type of dTOF devices are the same.
[0056] Exemplarily, the depth data may be data of a depth map, which respectively records the depth information detected (simulated detection) corresponding to each pixel position of the dTOF device to be tested.
[0057] On the other hand, the test stimulus data of the target test case can be stored in the SRAM (Static Random-Access Memory) in the dTOF device to be tested, and the test configuration of the target test case can be written into the dTOF device to be tested through the configuration interface of the dTOF device to be tested.
[0058] Furthermore, the dTOF device to be tested can be controlled to perform digital logic calculations according to the test stimulus data stored in the SRAM to obtain the output results corresponding to the target test case.
[0059] That is, the dTOF to be tested is controlled to perform digital logic calculation on the test stimulus data of the target test case under the test configuration of the target test case to obtain the output result corresponding to the target test case.
[0060] Exemplarily, the master may send a self-test instruction to the dTOF device to be tested, and the self-test instruction may be used to instruct the dTOF device to be tested to enter a self-test mode.
[0061] In the self-test mode, the dTOF device to be tested can read the data stored in the SRAM (i.e., the test stimulus data mentioned above) to replace the multi-event TDC data under normal working conditions, and perform digital logic calculations based on the read test record data to obtain the output results corresponding to the target test case.
[0062] Step S130: Determine the test result corresponding to the target test case based on the comparison result between the determined expected result and the obtained output result.
[0063] In an embodiment of the present application, when the expected results and output results corresponding to the target test case are determined in the above manner, the expected results and the output results can be compared to determine the comparison results, and based on the comparison results, the test results corresponding to the target test case can be determined.
[0064] Exemplarily, the comparison result may include that the expected result and the output result are consistent, or that the expected result and the output result are inconsistent.
[0065] Exemplarily, when the expected result and the output result are inconsistent, a test record can be generated, which may include the current test case and the actual output data of the dTOF device (i.e., the above-mentioned output result), so that the cause of the error can be analyzed in the subsequent process based on the current test case included in the error record and the output result of the dTOF device.
[0066] For example, when the expected result and the output result are consistent, Figure 1 The method flow shown executes the next test case until all test cases are executed.
[0067] It can be seen that in Figure 1 In the method flow shown, a target test case to be executed is generated based on the digital processing function point to be tested of the dTOF device to be tested. For the target test case to be executed, on the one hand, the corresponding expected result can be determined based on the test stimulus data and test configuration of the target test case and the reference model corresponding to the dTOF device to be tested; on the other hand, the test stimulus data of the target test case can be stored in the SRAM of the dTOF device to be tested, and the test configuration of the target test case can be written into the dTOF device to be tested through the configuration interface of the dTOF device to be tested, and the dTOF device to be tested is controlled to perform digital logic calculations based on the test stimulus data stored in the SRAM to obtain the corresponding output result. Then, the test result of the target test case can be determined based on the comparison result between the expected result and the output result. By using the internal SRAM of the dTOF device to store the test stimulus data instead of the multi-event TDC data, the digital processing function point test of the dTOF device is realized. Since the test stimulus data and the related test configuration can be configured according to the digital processing function point to be tested to generate the test case, the test is realized based on the simulation data without relying on the data collection of the actual scene, which effectively improves the test efficiency and test coverage. In addition, since the test stimulus data can be generated according to demand and the digital processing functional points of the dTOF device are tested instead of the analog part with high randomness, it is conducive to the analysis and troubleshooting of measurement problems.
[0068] In some embodiments, storing the test stimulus data of the target test case into the SRAM in the dTOF device to be tested may include:
[0069] Through the SPI bus, the test stimulus data of the target test case is stored in the SRAM of the dTOF device to be tested using the interval address mapping method.
[0070] Exemplarily, the test stimulus data of the target test case can be stored in the SRAM of the dTOF device to be tested via the SPI bus.
[0071] Exemplarily, in order to complete free writing and reading of a high-depth SRAM using fewer registers, an interval address mapping method can be used to store the test stimulus data of the target test case into the SRAM in the dTOF device to be tested.
[0072] That is, the memory address is divided into multiple areas (or intervals), each area corresponds to a section of SRAM storage space. When the SRAM needs to be accessed, the memory address will be calculated through a certain mapping algorithm to obtain the actual physical address.
[0073] Accordingly, each data read and write can be performed on an area in the SRAM.
[0074] In one example, storing the test stimulus data of the target test case into the SRAM in the dTOF device to be tested through the SPI bus by using the interval address mapping method may include:
[0075] In the case where there is data to be written, the read / write flag register is configured to a first value through the SPI bus; wherein the read / write flag register is the first value, indicating that the current SRAM operation is to write to the SRAM; the data to be written includes the test stimulus data of the target test case, which is not currently stored in the SRAM of the dTOF device to be tested;
[0076] Through the SPI bus, the read / write address register is configured as the current storage address; wherein the initial value of the current storage address is the storage start address; in the case where the test stimulus data of the target test case is not written for the first time, the current storage address is the next storage address of the first target storage address, and the first target storage address is the storage address of the test stimulus data of the target test case that was last written;
[0077] Through the SPI bus, the write data register is configured to be data in the data to be written that matches the space of the current storage address;
[0078] Through the SPI bus, the read / write enable register is configured to a third value; wherein the read / write enable register is the third value, which is used to indicate that the dTOF device completes an SRAM operation indicated by the read / write flag register;
[0079] The read / write enable register is configured to a fourth value through the SPI bus; wherein the fourth value is an initial value of the read / write enable register.
[0080] Exemplarily, the actual management registers of the SPI may include: a read / write enable register R301, a read / write flag register R302, a read / write address register R303, a write data register R304, and a read data register R305; wherein:
[0081] Read / write enable register R301: When dTOF detects that the master configures this register to "1" (which can be called the third value) through SPI, it automatically completes a read or write SRAM operation. Whether it is a read or write operation is determined by the read / write flag register R302;
[0082] Read / write flag register R302: used to determine whether the current SRAM operation is read or write. When this register is configured to "1" (can be called the first value), it means that the current SRAM operation is to read SRAM; when this register is configured to "0" (can be called the second value), it means that the current SRAM operation is to write SRAM;
[0083] Read / write address register R303: used to determine the corresponding address of the current SRAM operation;
[0084] Write data register R304: When the current SRAM operation is a write operation, this register is used to store the data expected to be written into the corresponding address of the SRAM;
[0085] Read data register R305: When the current SRAM operation is a read operation, this register is used to store the data result of reading the corresponding address from the SRAM.
[0086] Accordingly, when there is data to be written, the master control can configure the read-write flag register to the first value through the SPI bus, and configure the read-write address register to the current storage address through the SPI bus, so that the dDOF device to be tested determines that the current SRAM operation is a write SRAM, and the write address is the current storage address.
[0087] Exemplarily, one storage address corresponds to one area of the SRAM.
[0088] After completing the above operations, the master control can configure the write data register to the data to be written that matches the space of the current storage address through the SPI bus, and configure the read / write enable register to the third value through the SPI bus.
[0089] Exemplarily, when the size of the data to be written does not exceed the size of the storage space corresponding to the current storage address, all the data to be written may be written into the storage area corresponding to the current storage address.
[0090] When the size of the data to be written exceeds the size of the storage space corresponding to the current storage address, part of the data to be written whose size matches the size of the storage space corresponding to the current storage address can be written into the storage area corresponding to the current storage address, and the remaining data can be written into subsequent storage areas in the same way.
[0091] Exemplarily, when the read / write enable register is configured as a third value, the dTOF device detects that the read / write enable register value is the third value, and automatically writes the value of the write data register to the storage address corresponding to the read / write address register in the SRAM.
[0092] It should be noted that the writing speed of the internal SRAM of dTOF is generally greater than the speed of the external master configuring SPI, that is, the writing operation can be completed before the next external master completes the SPI bus operation.
[0093] Accordingly, after the master configures the read / write enable register to the third value through the SPI main line, the read / write enable register can be configured to the initial value (referred to as the initial value in this article) through the SPI bus, that is, restored to the initial state of the read / write enable register to facilitate the next read / write operation.
[0094] In some embodiments, the dTOF-based digital self-test method provided in the embodiments of the present application may further include:
[0095] In the case where there is data to be read, the read / write flag register is configured to a second value through the SPI bus; wherein the read / write flag register is the second value, indicating that the current SRAM operation is to read the SRAM; the data to be read includes the test stimulus data stored in the SRAM in the dTOF device to be tested, and the data is not currently read;
[0096] Through the SPI bus, the read / write address register is configured as the current storage address; wherein the initial value of the current storage address is the storage start address; in the case of not reading the test stimulus data of the target test case for the first time, the current storage address is the next storage address of the second target storage address, and the second target storage address is the storage address of the test stimulus data of the target test case read last time;
[0097] Through the SPI bus, the read and write enable register is configured to a third value;
[0098] The read / write enable register is configured to be the fourth value through the SPI bus, and the value of the read register is read through the SPI bus.
[0099] Exemplarily, for the SRAM read operation, the specific steps are similar to those of the SRAM write operation, and are mainly used for the read-back check of the test stimulus data written into the SRAM.
[0100] Exemplarily, when there is data to be read, the master control may configure the read / write flag register to a second value through the SPI bus, so that the dTOF device determines that it is currently reading the SRAM based on the value of the read / write flag register.
[0101] Exemplarily, the data to be read includes test stimulus data stored in the SRAM of the dTOF device to be tested and data that is not currently read.
[0102] For example, when the size of the test stimulus data exceeds the size of the storage space corresponding to a single storage address, multiple readings are required during the process of reading back the test stimulus data.
[0103] Exemplarily, when the value of the read / write flag register is the second value, the read / write address register can be configured as the current storage address through the SPI bus.
[0104] Exemplarily, the current storage address is a storage address next to the storage address of the test stimulus data of the target test case read last time.
[0105] Exemplarily, the initial value of the current storage address is the storage start address.
[0106] Exemplarily, when the above operation is completed, the master can configure the read / write enable register to the third value through the SPI bus. When the dTOF device detects that the value of the read / write enable register is the third value, it automatically reads the data of the storage address corresponding to the read / write address register from the SRAM and writes it to the read data register.
[0107] It should be noted that the internal SRAM reading speed of the dTOF device is generally faster than the speed of the external master configuring the SPI, that is, the reading operation can be completed before the next external master completes the SPI bus operation.
[0108] Accordingly, after the master configures the read / write enable register to the third value through the SPI main line, the read / write enable register can be configured to the initial value (referred to as the initial value in this article) through the SPI bus, that is, restored to the initial state of the read / write enable register to facilitate the next read / write operation.
[0109] In some embodiments, the data stored in the SRAM is stored in the format of measurement number flag + measurement data;
[0110] The measurement number flag is used to identify the measurement number corresponding to the measurement data; the measurement data associated with the same measurement number flag includes one or more;
[0111] Among them, in the process of performing digital logic calculations on the dTOF device to be tested according to the test stimulus data stored in the SRAM, for any measurement, the measurement data involved in the calculation are the measurement data whose associated measurement number flag matches the measurement.
[0112] Exemplarily, in order to better adapt to the multi-event TDC, the storage format of the data stored in the SRAM may be a format of measurement number flag+measurement data.
[0113] The measurement times flag may be used to identify the measurement times corresponding to the measurement data.
[0114] Exemplarily, the measurement data associated with the same measurement number flag may include one or more.
[0115] For example, when the measurement data of one measurement exceeds the amount of data that can be stored in the storage space corresponding to a single storage address, the measurement data of one measurement can be stored in the storage spaces corresponding to multiple consecutive storage addresses, and the measurement data in the multiple storage spaces have the same measurement number flag associated with them.
[0116] Exemplarily, during the process of digital logic calculation of the dTOF device to be tested according to the test stimulus data stored in the SRAM, for any measurement, the measurement data involved in the calculation are the measurement data whose associated measurement number flag matches the measurement.
[0117] Exemplarily, the dTOF device may internally maintain the number of measurements.
[0118] For example, there may be an automatic counter inside the dTOF device to record the current corresponding measurement number (such as the measurement sequence number).
[0119] Exemplarily, the specific implementation of the dTOF device reading data from the SRAM can be described below with reference to specific examples.
[0120] In order to enable those skilled in the art to better understand the technical solutions provided in the embodiments of the present application, the technical solutions provided in the embodiments of the present application are described below with reference to specific examples.
[0121] In this embodiment, for a dTOF device based on a multi-event TDC, a digital self-test scheme is proposed that replaces the multi-event TDC output by internal SRAM storage.
[0122] See also Figure 2 , is a flow chart of a digital self-test solution based on dTOF provided in an embodiment of the present application, such as Figure 2 As shown, the following steps may be included:
[0123] Step S200: Arrange the corresponding test cases according to the test objectives, and sort the execution order of the test cases according to the priorities.
[0124] Exemplarily, a test case includes test stimulus data and test configuration.
[0125] Step S210: Write all test cases into the master control in order; starting from the first test case, calculate the expected result (ie, the expected result) using the reference model in the master control according to the internal stimulus data and test configuration.
[0126] Step S220: The master controller configures the test stimulus data corresponding to the current test case to be stored in the SRAM inside the dTOF through the SPI bus.
[0127] Illustratively, the data structure of the test stimulus data is consistent with the multi-event TDC output data structure.
[0128] Step S230: The master controller writes the configuration of the current test case into the dTOF device via the SPI bus, configures the system to enter the self-test mode, and configures the startup system to start working.
[0129] Step S240: In the self-test mode, the internal digital input interface of the system will automatically switch to SRAM through the multiplexer, and read the data stored in SRAM to replace the multi-event TDC data under normal working conditions; after the digital logic calculation inside the system, the result will be output through the data transmission interface; the externally connected master control will automatically complete the collection and storage of the output data of the dTOF device.
[0130] Step S250: The main control automatically compares the expected result of the current test case with the output result of the collected dTOF device. If the two are consistent, switch to the next test case for loop execution; if the two are inconsistent, go to step S260.
[0131] Step S260: further analyze the cause of the error and locate the error point based on the saved current test case features and the actual output data of the stored DTOF.
[0132] The module structure of the test system in the embodiment of the present application is described below.
[0133] See also Figure 3 , is a schematic diagram of the module structure of the test system provided in the embodiment of the present application. Figure 3 As shown, the test system includes a dTOF device to be tested M214, an external main control M215, and a test case M213.
[0134] Exemplarily, the dTOF device to be tested may include a detection pixel M201, a multi-event TDC M202, a digital control logic M203, a self-test stimulus storage SRAM M204, a multiplexer M205, and a digital processing logic M206. Among them:
[0135] The detection pixel M201 is a photosensitive device of the dTOF device, which can receive the reflected laser signal and convert it into a corresponding electrical pulse.
[0136] The multi-event TDC M202 is an important analog module in the dTOF device, which can convert the time intervals between multiple pulse signals and the start pulse into digital signals (the size of the digital value represents the length of the interval).
[0137] The digital control logic M203 refers to the control logic inside the dTOF device, which is used to implement working state configuration and startup, and can also complete the configuration of the self-test stimulus storage SRAM and the control of the multiplexer.
[0138] The self-test stimulus storage SRAM M204 is mainly used to store the test stimulus data input in the self-test mode, and its output data structure is consistent with the output data structure of the multi-event TDC M202.
[0139] The multiplexer is used to switch the data input to the digital processing logic. Under normal working conditions, the output of the multi-event TDC enters the digital processing logic for processing; in self-test mode, the data stored in the self-test stimulus storage SRAM is used to replace the multi-event TDC M202 output.
[0140] The digital processing logic M205 is mainly used to process the detection data, including TCSPC algorithm, peak finding, filtering and other digital processing operations, and completes the output of the final depth data.
[0141] Exemplarily, the external master control mainly includes a data acquisition module M207, a data storage module M208, a data comparison module M209, a reference model module M210, a work mode configuration module M211 and a use case management module M212. Among them:
[0142] The data acquisition module is mainly responsible for collecting the depth map data (ie, the above-mentioned output result) sent by the dTOF device to be tested, and simultaneously sending it to the data storage module M208 and the data comparison module M209.
[0143] The data storage module M208 is mainly responsible for storing the depth map data sent by the data acquisition module 207 to facilitate further result analysis later.
[0144] The digital comparison module 209 is mainly responsible for comparing the actual depth map data sent by the data acquisition module with the expected depth data (i.e., the expected result mentioned above), and outputting the comparison result; if the comparison passes, the measurement of the next corresponding test case will be started; if the comparison fails, manual error analysis is required.
[0145] The reference model module M210 is a reference algorithm provided by the algorithm, which is an implementation reference for the digital processing logic M206 inside the dTOF device to be tested.
[0146] The working module configuration module M211 is mainly responsible for sending the test stimulus data of the current test case and the corresponding test configuration to the dTOF device to be tested M214 through the SPI MASTER (used to manage the SPI bus).
[0147] The use case management module M212 is responsible for managing the test case queue. After the current test case is executed and compared, the test stimulus data and test configuration corresponding to the next test case in the queue will be automatically sent to the working module configuration module M211 and the reference model module M210.
[0148] Exemplarily, the test case M213 is mainly determined by the test objective. According to the test objective and the assumed target scenario, the corresponding test stimulus data and the related test configuration list can be generated to together constitute a test case list; the test order is then sorted according to the test priority and stored in the external master control M215.
[0149] In this embodiment, the self-test stimulus storage SRAM can be configured using SPI, and the address of the SPI is mapped to the deep address of the SRAM.
[0150] Exemplarily, an interval address mapping method may be used to implement address mapping from the SPI to the deep address of the SRAM.
[0151] See also Figure 4 , is a schematic diagram of an address mapping from SPI to SRAM provided in an embodiment of the present application, such as Figure 4 As shown, the actual management register of SPI may include: read / write enable register R301, read / write flag register R302, read / write address register R303, write data register R304, read data register R305; wherein:
[0152] Read / write enable register R301: When dTOF detects that the master configures this register as "1" through SPI, it automatically completes a read or write SRAM operation. Whether it is a read or write operation is determined by the read / write flag register R302.
[0153] Read / write flag register R302: used to determine whether the current SRAM operation is read or write. When this register is configured as "1", it means that the current SRAM operation is to read SRAM; when this register is configured as "0", it means that the current SRAM operation is to write SRAM;
[0154] Read / write address register R303: used to determine the corresponding address of the current SRAM operation;
[0155] Write data register R304: When the current SRAM operation is a write operation, this register is used to store the data expected to be written into the corresponding address of the SRAM;
[0156] Read data register R305: When the current SRAM operation is a read operation, this register is used to store the data result of reading the corresponding address from the SRAM.
[0157] Based on the above register mapping design, the implementation process of writing and reading SRAM through SPI can be as follows: Figure 5A and Figure 5B shown.
[0158] like Figure 5A As shown, for the SRAM write operation, the specific steps may include:
[0159] Step 501: The external master completes the configuration of the read / write flag register R302 to "0" through the SPI bus.
[0160] Step 502: The external master completes the configuration of the read / write address register R303 to "0" via the SPI bus.
[0161] Step 503: The external master completes the configuration of the write data register R304 to the test stimulus data corresponding to the current address through the SPI bus.
[0162] Step 504: The external master completes the configuration of the read / write enable register R301 to "1" via the SPI bus.
[0163] Exemplarily, when the dTOF device detects a rising edge (ie, the value is 1) in the output value of the read / write enable register R301, it automatically writes the value of the write data register R304 to the address corresponding to the read / write address register R303 in the SRAM.
[0164] Exemplarily, the internal SRAM write speed of the dTOF device is generally faster than the speed of the external master configuring the SPI, that is, the write operation can be completed before the next external master completes the SPI bus operation.
[0165] Step 505: The external master completes the configuration of the read / write enable register R301 to "0" through the SPI bus, that is, restores the read / write enable register 301 to its initial state, facilitating the next read / write operation.
[0166] Step 506: Determine whether the excitation data configuration writing of all expected addresses has been completed. If not, write the subsequent configuration address to the read / write address register 503 again, repeat steps 503 to 505, complete the writing of other SRAM addresses, until all data are written.
[0167] For the SRAM read operation, the specific steps are similar to the SRAM write operation, which is mainly used for the readback check of the written stimulus data, such as Figure 5B As shown, the specific steps may include:
[0168] Step 507: The external master completes the configuration of the read / write flag register R302 to "1" through the SPI bus.
[0169] Step 508: The external master completes the configuration of the read / write address register R303 to "0" through the SPI bus.
[0170] Step 509: The external master completes the configuration of the read / write enable register R301 to "1" through the SPI bus.
[0171] Exemplarily, when the dTOF device detects a rising edge (ie, the value is 1) in the output value of the read / write enable register 301, it automatically reads the data at the address corresponding to the read / write address register R303 from the SRAM and writes it into the read data register R305.
[0172] For example, the internal SRAM reading speed of the dTOF device is generally faster than the speed of the external master configuring the SPI, that is, the reading operation can be completed before the next external master completes the SPI bus operation.
[0173] Step 510: The external master completes the configuration of the read / write enable register R301 to "0" through the SPI bus, that is, restores the read / write enable register 301 to its initial state, to facilitate the next read / write operation.
[0174] Step 511: the external master completes the reading of the read data register R305 through the SPI bus. The data read at this time is the stimulus data of the corresponding address in the SRAM that is expected to be read.
[0175] Step 512: Determine whether the excitation data reading operation of all expected addresses is completed. If not, write the subsequent read address to the read / write address register R303 again, repeat steps 509 to 511, and complete the reading of other SRAM addresses until all data are read.
[0176] It can be seen that the stimulus data stored in the SRAM can be used to replace the output data of the multi-event TDC and complete the test coverage of the corresponding processing logic.
[0177] For a multi-event TDC, it can output the time data of several arriving pulses in one measurement; therefore, for the stimulus data stored in the SRAM, it is necessary to be able to achieve this feature as well.
[0178] Exemplarily, in order to adapt to the multi-event TDC, the storage format of the stimulus data in the SRAM can be as follows: Figure 6 shown.
[0179] like Figure 6 As shown, the data stored in the SRAM includes: CNT and DATA, where the CNT part represents the number of measurements corresponding to the current data, and the data with the same CNT represents the multi-event TDC data obtained in the same measurement (between START and STOP pulses); and DATA represents the specific TDC measurement value, which is proportional to the arrival time of the event pulse (detection of reflected laser).
[0180] When the self-measurement mode is turned on, the SRAM will automatically output the corresponding measured TDC data and determine whether continuous output is required based on the value of CNT (the results of the same measurement need to be output continuously, and if they are different, they do not need to be output).
[0181] by Figure 6 In the storage as an example:
[0182] When the dTOF device is configured in self-test mode and starts working, the digital control logic M203 will automatically send out START and STOP signals as the start and stop signals of TDC. At the same time, there will be an automatic counter inside to record the current corresponding measurement number.
[0183] For the first measurement, the SRAM will first read out the stimulus data in address 0, and determine whether the read CNT is consistent with the current corresponding measurement number; if consistent, the read corresponding data will be sent to the digital processing logic M206; then the SRAM will continue to read out the data at address 1, and again determine whether the CNT at address 1 is consistent with the current corresponding measurement number, and repeat this process until the CNT read in address X is inconsistent with the currently recorded measurement number; then stop reading and wait for the next measurement to start.
[0184] When the next measurement starts, the corresponding measurement number is automatically accumulated. At this time, it is determined whether the CNT in address X is consistent with the measurement number. This process is repeated until the entire measurement process is completed, and the replacement of the multi-event TDC data by the stimulus data in the SRAM is completed.
[0185] By configuring different stimulus data values in SRAM, any multi-event TDC series measurement behavior can be simulated to achieve high coverage measurement objectives.
[0186] The method provided by the present application is described above. The device provided by the present application is described below:
[0187] See also Figure 7 , is a structural diagram of a digital self-test device based on dTOF provided in an embodiment of the present application, such as Figure 7 As shown, the dTOF-based digital self-test device may include:
[0188] An acquisition unit 710 is used to acquire a target test case to be executed; wherein the target test case is generated according to a test target of a digital processing function point to be tested of a dTOF device to be tested, and the target test case includes test stimulus data and a test configuration, and the data structure of the test stimulus data is consistent with the multi-event TDC output data structure;
[0189] A first determination unit 720 is used to determine an expected result corresponding to the target test case based on the test stimulus data and the test configuration of the target test case and using a reference model corresponding to the dTOF device to be tested;
[0190] A control unit 730 is used to store the test stimulus data of the target test case into the SRAM in the dTOF device to be tested, write the test configuration of the target test case into the dTOF device to be tested through the configuration interface of the dTOF device to be tested, and control the dTOF device to be tested to perform digital logic calculation according to the test stimulus data stored in the SRAM to obtain an output result corresponding to the target test case;
[0191] The second determining unit 740 is used to determine the test result corresponding to the target test case according to the comparison result between the expected result and the output result.
[0192] In some embodiments, the control unit 730 stores the test stimulus data of the target test case into the SRAM in the dTOF device to be tested, including:
[0193] The test stimulus data of the target test case is stored in the SRAM of the dTOF device to be tested through the SPI bus and using the interval address mapping method.
[0194] In some embodiments, the control unit 730 stores the test stimulus data of the target test case into the SRAM in the dTOF device to be tested through the SPI bus by using an interval address mapping method, including:
[0195] In the case where there is data to be written, the read-write flag register is configured to a first value through the SPI bus; wherein the read-write flag register is the first value, indicating that the current SRAM operation is to write to the SRAM; the data to be written includes the test stimulus data of the target test case, which is not currently stored in the SRAM in the dTOF device to be tested;
[0196] Through the SPI bus, the read-write address register is configured as the current storage address; wherein the initial value of the current storage address is the storage start address; in the case where the test stimulus data of the target test case is not written for the first time, the current storage address is the next storage address of the first target storage address, and the first target storage address is the storage address of the test stimulus data of the target test case that was last written;
[0197] Through the SPI bus, the write data register is configured to be data in the data to be written that matches the space of the current storage address;
[0198] Through the SPI bus, the read / write enable register is configured to a third value; wherein the read / write enable register is the third value, which is used to indicate that the dTOF device completes an SRAM operation indicated by the read / write flag register;
[0199] The read / write enable register is configured to be a fourth value through the SPI bus; wherein the fourth value is an initial value of the read / write enable register.
[0200] In some embodiments, the control unit 730 is further used to configure the read / write flag register to a second value through the SPI bus when there is data to be read; wherein the read / write flag register is the second value, indicating that the current SRAM operation is to read the SRAM; the data to be read includes the test stimulus data stored in the SRAM in the dTOF device to be tested, which is currently not read;
[0201] Through the SPI bus, the read / write address register is configured as the current storage address; wherein the initial value of the current storage address is the storage start address; in the case where the test stimulus data of the target test case is not read for the first time, the current storage address is the next storage address of the second target storage address, and the second target storage address is the storage address of the test stimulus data of the target test case read last time;
[0202] Through the SPI bus, configuring the read / write enable register to be the third value;
[0203] The read / write enable register is configured to be the fourth value through the SPI bus, and the value of the read register is read through the SPI bus.
[0204] In some embodiments, the data stored in the SRAM is stored in the format of measurement number flag + measurement data;
[0205] The measurement number flag is used to identify the measurement number corresponding to the measurement data; the measurement data associated with the same measurement number flag includes one or more;
[0206] Among them, in the process of performing digital logic calculations on the dTOF device to be tested according to the test stimulus data stored in the SRAM, for any measurement, the measurement data involved in the calculation are the measurement data whose associated measurement number flag matches the measurement.
[0207] In some embodiments, Figure 8 As shown, the dTOF-based digital self-test device may further include:
[0208] The generating unit 750 is used to generate an error record when the expected result and the output result are inconsistent; wherein the error record may include the target test case and the output result of the dTOF device to be tested.
[0209] An embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the dTOF-based digital self-test method described above.
[0210] See also Fig. 9 , is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 901 and a memory 902 storing machine executable instructions. The processor 901 and the memory 902 may communicate via a system bus 903. In addition, by reading and executing the machine executable instructions corresponding to the dTOF-based digital self-test logic in the memory 902, the processor 901 may execute the dTOF-based digital self-test method described above.
[0211] The memory 902 mentioned herein may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (RadomAccess Memory, random access memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.
[0212] In some embodiments, a machine-readable storage medium is also provided. Fig. 9 The memory 902 in the machine readable storage medium stores machine executable instructions, and when the machine executable instructions are executed by the processor, the digital self-test method based on dTOF described above is implemented. For example, the storage medium can be ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0213] The embodiment of the present application provides a dTOF-based digital self-test system, including: a master control and a dTOF device to be tested; wherein:
[0214] A main control, used to obtain a target test case to be executed; wherein the target test case is generated according to a digital processing function point to be tested of the dTOF device to be tested, the target test case includes test stimulus data and a test configuration, and the data structure of the test stimulus data is consistent with the multi-event TDC output data structure;
[0215] Determine the expected result corresponding to the target test case according to the test stimulus data and the test configuration of the target test case and using the reference model corresponding to the dTOF device to be tested;
[0216] The master control is further used to store the test stimulus data of the target test case into the SRAM in the dTOF device to be tested, and write the test configuration of the target test case into the dTOF device to be tested through the configuration interface of the dTOF device to be tested;
[0217] The dTOF device to be tested is used to perform digital logic calculation according to the control instruction of the master control and the test stimulus data stored in the SRAM to obtain the output result corresponding to the target test case;
[0218] The main control is further used to determine the test result corresponding to the target test case based on the comparison result between the expected result and the output result.
[0219] For example, the specific processing flow of the master control can refer to the relevant description in the above method embodiment.
Claims
1. A digital self-test method based on dTOF, characterized in that: include: Obtain a target test case to be executed; wherein the target test case is generated based on a digital processing function point to be tested of a direct time of flight detection dTOF device to be tested, the target test case includes test stimulus data and a test configuration, and the data structure of the test stimulus data is consistent with the multi-event TDC output data structure; Determining an expected result corresponding to the target test case based on the test stimulus data and the test configuration of the target test case and using a reference model corresponding to the dTOF device to be tested; and Storing the test stimulus data of the target test case in the static random access memory SRAM in the dTOF device to be tested, writing the test configuration of the target test case into the dTOF device to be tested through the configuration interface of the dTOF device to be tested, and controlling the dTOF device to be tested to perform digital logic calculation according to the test stimulus data stored in the SRAM to obtain an output result corresponding to the target test case; According to the comparison result between the expected result and the output result, the test result corresponding to the target test case is determined.
2. The method according to claim 1, characterized in that The step of storing the test stimulus data of the target test case into a static random access memory SRAM in the dTOF device to be tested comprises: The test stimulus data of the target test case is stored in the SRAM of the dTOF device to be tested through the SPI bus and using the interval address mapping method.
3. The method according to claim 2, characterized in that The method of storing the test stimulus data of the target test case into the SRAM in the dTOF device to be tested by using the SPI bus and the interval address mapping method comprises: In the case where there is data to be written, the read-write flag register is configured to a first value through the SPI bus; wherein the read-write flag register is the first value, indicating that the current SRAM operation is to write to the SRAM; the data to be written includes the test stimulus data of the target test case, which is not currently stored in the SRAM in the dTOF device to be tested; Through the SPI bus, the read-write address register is configured as the current storage address; wherein the initial value of the current storage address is the storage start address; in the case where the test stimulus data of the target test case is not written for the first time, the current storage address is the next storage address of the first target storage address, and the first target storage address is the storage address of the test stimulus data of the target test case that was last written; Through the SPI bus, the write data register is configured to be data in the data to be written that matches the space of the current storage address; Through the SPI bus, the read / write enable register is configured to a third value; wherein the read / write enable register is the third value, which is used to indicate that the dTOF device completes an SRAM operation indicated by the read / write flag register; The read / write enable register is configured to be a fourth value through the SPI bus; wherein the fourth value is an initial value of the read / write enable register.
4. The method according to claim 3, characterized in that The method further comprises: In the case where there is data to be read, the read / write flag register is configured to a second value through the SPI bus; wherein the read / write flag register is the second value, indicating that the current SRAM operation is to read the SRAM; the data to be read includes the test stimulus data stored in the SRAM in the dTOF device to be tested, which is currently not read; Through the SPI bus, the read / write address register is configured as the current storage address; wherein the initial value of the current storage address is the storage start address; in the case where the test stimulus data of the target test case is not read for the first time, the current storage address is the next storage address of the second target storage address, and the second target storage address is the storage address of the test stimulus data of the target test case read last time; Through the SPI bus, configuring the read / write enable register to be the third value; The read / write enable register is configured to be the fourth value through the SPI bus, and the value of the read register is read through the SPI bus.
5. The method according to any one of claims 1 to 4, characterized in that: The data stored in the SRAM is stored in the format of measurement number flag+measurement data; The measurement number flag is used to identify the measurement number corresponding to the measurement data; the measurement data associated with the same measurement number flag includes one or more; Among them, in the process of performing digital logic calculations on the dTOF device to be tested according to the test stimulus data stored in the SRAM, for any measurement, the measurement data involved in the calculation are the measurement data whose associated measurement number flag matches the measurement.
6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When the expected result and the output result are inconsistent, an error record is generated; wherein the error record includes the target test case and the output result of the dTOF device to be tested.
7. A digital self-test device based on dTOF, characterized in that: include: An acquisition unit, used for acquiring a target test case to be executed; wherein the target test case is generated according to a digital processing function point to be tested of a direct time of flight detection dTOF device to be tested, the target test case includes test stimulus data and a test configuration, and the data structure of the test stimulus data is consistent with the multi-event TDC output data structure; A first determination unit, configured to determine an expected result corresponding to the target test case based on the test stimulus data and the test configuration of the target test case and using a reference model corresponding to the dTOF device to be tested; A control unit, used for storing the test stimulus data of the target test case into the static random access memory SRAM in the dTOF device to be tested, writing the test configuration of the target test case into the dTOF device to be tested through the configuration interface of the dTOF device to be tested, and controlling the dTOF device to be tested to perform digital logic calculation according to the test stimulus data stored in the SRAM to obtain an output result corresponding to the target test case; The second determining unit is used to determine the test result corresponding to the target test case according to the comparison result between the expected result and the output result.
8. The device according to claim 7, characterized in that The control unit stores the test stimulus data of the target test case into a static random access memory SRAM in the dTOF device to be tested, including: The test stimulus data of the target test case is stored in the SRAM in the dTOF device to be tested by using the SPI bus and the interval address mapping method; The control unit stores the test stimulus data of the target test case into the SRAM in the dTOF device to be tested through the SPI bus by using an interval address mapping method, including: In the case where there is data to be written, the read-write flag register is configured to a first value through the SPI bus; wherein the read-write flag register is the first value, indicating that the current SRAM operation is to write to the SRAM; the data to be written includes the test stimulus data of the target test case, which is not currently stored in the SRAM in the dTOF device to be tested; Through the SPI bus, the read-write address register is configured as the current storage address; wherein the initial value of the current storage address is the storage start address; in the case where the test stimulus data of the target test case is not written for the first time, the current storage address is the next storage address of the first target storage address, and the first target storage address is the storage address of the test stimulus data of the target test case that was last written; Through the SPI bus, the write data register is configured to be data in the data to be written that matches the space of the current storage address; Through the SPI bus, the read / write enable register is configured to a third value; wherein the read / write enable register is the third value, which is used to indicate that the dTOF device completes an SRAM operation indicated by the read / write flag register; Through the SPI bus, configuring the read / write enable register to be a fourth value; wherein the fourth value is an initial value of the read / write enable register; Wherein, the control unit is further used to configure the read / write flag register to a second value through the SPI bus when there is data to be read; wherein the read / write flag register is the second value, indicating that the current SRAM operation is to read the SRAM; the data to be read includes the test stimulus data stored in the SRAM in the dTOF device to be tested, which is currently not read; Through the SPI bus, the read / write address register is configured as the current storage address; wherein the initial value of the current storage address is the storage start address; in the case where the test stimulus data of the target test case is not read for the first time, the current storage address is the next storage address of the second target storage address, and the second target storage address is the storage address of the test stimulus data of the target test case read last time; Through the SPI bus, configuring the read / write enable register to be the third value; Through the SPI bus, configuring the read / write enable register to the fourth value, and reading the value of the read register through the SPI bus; and / or, The data stored in the SRAM is stored in the format of measurement number flag+measurement data; The measurement number flag is used to identify the measurement number corresponding to the measurement data; the measurement data associated with the same measurement number flag includes one or more; Wherein, in the process of performing digital logic calculation according to the test stimulus data stored in the SRAM, for any measurement, the measurement data involved in the calculation is the measurement data whose associated measurement number flag matches the measurement; and / or, The device also includes: A generating unit is used to generate an error record when the expected result and the output result are inconsistent; wherein the error record includes the target test case and the output result of the dTOF device to be tested.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the method according to any one of claims 1 to 6.
10. A digital self-test system based on dTOF, characterized in that: include: Main control and direct time-of-flight detection dTOF device to be tested; among them: A main control, used to obtain a target test case to be executed; wherein the target test case is generated according to a test target of a digital processing function point to be tested of a direct time of flight detection dTOF device to be tested, the target test case includes test stimulus data and a test configuration, and the data structure of the test stimulus data is consistent with the multi-event TDC output data structure; Determine the expected result corresponding to the target test case according to the test stimulus data and the test configuration of the target test case and using the reference model corresponding to the dTOF device to be tested; The master control is further used to store the test stimulus data of the target test case into the static random access memory SRAM in the dTOF device to be tested, and write the test configuration of the target test case into the dTOF device to be tested through the configuration interface of the dTOF device to be tested; The dTOF device to be tested is used to perform digital logic calculation according to the control instruction of the master control and the test stimulus data stored in the SRAM to obtain the output result corresponding to the target test case; The main control is further used to determine the test result corresponding to the target test case based on the comparison result between the expected result and the output result.
