Differential count-based spad histogram adaptive storage system and method
By employing differential counting and dynamic BIN merging mechanisms, the problems of high resource consumption and low utilization in SPAD histogram storage are solved, achieving noise suppression and efficient utilization of storage resources, thereby improving SPAD imaging resolution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIDIAN UNIV
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-02
AI Technical Summary
Existing SPAD histogram storage technology consumes a lot of resources, has low utilization, and does not fully consider the distribution characteristics of background and echo in the time domain, which limits the improvement of imaging resolution.
A SPAD histogram adaptive storage system based on differential counting is adopted. Through multi-interval differential counting, dynamic merging of histogram BINs based on count overflow, and adaptive storage resource management, resource consumption is reduced and utilization efficiency is improved.
It effectively suppresses background noise, improves the system signal-to-noise ratio, expands the statistical dynamic range, improves resource utilization, reduces hardware overhead, and provides an efficient histogram storage solution.
Smart Images

Figure CN122131977A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of integrated circuit technology, specifically relating to a SPAD histogram adaptive storage system and method based on differential counting. Background Technology
[0002] Single-photon avalanche diodes (SPADs), as the core detectors in solid-state lidar receivers, are widely used in fields such as intelligent vehicles and biomedical imaging due to their single-photon sensitivity. However, the high gain and nonlinear response of SPADs make them more susceptible to interference from ambient background light compared to traditional APDs (avalanche photodiodes). To improve robustness, histogram statistical algorithms are typically used to extract reliable range information of the target by accumulating the time-of-flight distribution of a large number of photon events.
[0003] Traditional histogram circuits employ a structure that allocates a fixed depth of storage cells to each time interval (BIN), resulting in a positive correlation between histogram resource consumption and measurement dynamic range and ranging accuracy, thus limiting the improvement of SPAD imaging resolution. Furthermore, the distribution characteristics of background and echo in the time domain are not fully considered during histogram statistics, leading to low histogram resource utilization.
[0004] Therefore, there is an urgent need for a low-resource, high-energy-efficiency histogram storage architecture to better adapt to high-resolution SPAD array sensors. Summary of the Invention
[0005] To address the problems of high resource consumption and low storage resource utilization in existing SPAD histogram storage technologies, this invention provides a SPAD histogram adaptive storage system based on differential counting. Through multi-interval differential counting, dynamic merging of histogram BINs based on count overflow, and adaptive storage resource management, it can reduce histogram resource consumption and improve dynamic resource utilization efficiency. This invention provides a SPAD histogram adaptive storage system based on differential counting, comprising a multi-interval differential counting module, a histogram BIN dynamic merging module based on count overflow, and a storage module, wherein... The multi-interval differential counting module is used to receive photon triggering events from the SPAD array, divide the measurement time window into N time intervals, and calculate the difference between photon triggering events in the preset time intervals to obtain multiple differential count values. The histogram BIN dynamic merging module based on overflow is used to accumulate the multiple differential count values with the corresponding stored differential count values, monitor the overflow of the differential count values after accumulation in real time, and adaptively merge and reorganize the storage address corresponding to the overflow data when overflow occurs, so as to reallocate the storage capacity to the corresponding overflow data. The storage circuit is used to store the updated accumulated data according to the current storage address when no overflow occurs, or to store the updated accumulated data according to the reallocated storage address when an overflow occurs.
[0006] In one embodiment of the present invention, the multi-interval differential counting module includes an interval selection unit and a dual-mode counting unit, wherein, The interval selection unit is used to receive photon triggering events from the SPAD array and divide the measurement time window into N time intervals at equal intervals, wherein each time interval corresponds to M histograms (BINs). The dual-mode counting unit is used to count the number of photon triggers in the corresponding histogram BIN for each time interval. i The difference between the BIN values at the same position in the (N / 2+j)th time interval and the jth time interval is calculated to obtain the difference count sequence between the (N / 2+j)th time interval and the jth time interval. The difference count sequence includes M difference count values, where the value of j ranges from 1 to N / 2, and N is an even number.
[0007] In one embodiment of the present invention, The interval selection unit is used to divide the measurement time window into N time intervals at equal intervals, wherein the first time interval includes BIN0~BIN M-1 The second time interval includes BIN. M ~BIN 2M-1 And so on, the Nth time interval includes BIN (N-1)×M ~BIN N×M-1 ; The interval selection unit is further configured to sequentially pair the (N / 2+1)th time interval to the Nth time interval with the 1st time interval to the (N / 2)th time interval, calculate the difference between the corresponding sequential BIN values within each pairing interval, and obtain the difference count value for each pair. Specifically, the (N / 2+j)th time interval and the... j Differential count values CBIN for each time interval (j-1,i) It equals the (N / 2+j)th time interval. i The value of the BIN of the histogram minus the value of the j-th time interval i The values of the histogram BIN. iThe value range is from 0 to M-1.
[0008] In one embodiment of the present invention, the histogram BIN dynamic merging module based on count overflow includes a summation unit, a comparison unit, an effective photon filtering unit, and a histogram BIN dynamic merging unit, wherein, The summation unit connects the multi-interval difference counting module and the storage module, and is used to add the difference count value sequence from the multi-interval difference counting module to the current accumulated value sequence stored in the storage module at corresponding positions within the current exposure cycle to obtain an updated accumulated value sequence. The comparison unit is used to compare each accumulated value in the updated accumulated value sequence with a set overflow threshold, and generate a corresponding overflow flag signal when the current accumulated value in the updated accumulated value sequence exceeds the overflow threshold; The effective photon filtering unit is used to delete another accumulated value stored in the same storage unit as the accumulated value corresponding to the overflow flag signal, according to the overflow flag signal. The histogram BIN dynamic merging unit is used to merge the storage address corresponding to the accumulated value corresponding to the overflow flag signal into a single storage unit according to the overflow flag signal and the corresponding storage address index. The merged storage unit is used to store the accumulated value corresponding to the overflow flag signal.
[0009] In one embodiment of the present invention, the summing unit acquires the difference count value sequence CBIN from the multi-interval difference counting module. (j-1,0)新 ~CBIN (j-1,M-1)新 And the previously accumulated differential count sequence CBIN stored in the storage module. (j-1,0)累加 ~CBIN (j-1,M-1)累加 Then, the corresponding positions are accumulated to obtain the accumulated and updated differential count value sequence CBIN. (j-1,0)累加 ~CBIN (j-1,M-1)累加 .
[0010] In one embodiment of the present invention, the storage circuit includes a state machine control module and a storage unit, wherein, The state machine control module is used to generate read / write control signals and address selection signals for the storage unit based on the system clock signal, measurement enable signal, and overflow flag signal. The storage unit is used to store the updated accumulated data according to the current storage address when no overflow occurs, or to store the updated accumulated data according to the reallocated storage address when an overflow occurs, based on the read / write control signal and the address selection signal.
[0011] In one embodiment of the present invention, the storage unit adopts a dual-port SRAM. Each storage unit is initially configured with a storage depth of K bits and is divided into N / 2 consecutive storage bit segments according to a fixed interval. The general formula of the storage bit segment is [(p-1)×2K / N+1]~[p×2K / N] bits, where p is the storage bit segment number and the value range is 1≤p≤N / 2. In the initial configuration, the first storage segment of each storage cell [(1-1)×2K / N+1]~[1×2K / N] bits, i.e., 1~2K / N bits, is used to store the differential count value CBIN(0,i); the second storage segment [(2-1)×2K / N+1]~[2×2K / N] bits, i.e., 2K / N+1~4K / N bits, is used to store the differential count value CBIN(1,i); and the p-th storage segment [(p-1)×2K / N+1]~[p×2K / N] bits is used to store the differential count value CBIN(p-1,i).
[0012] Another aspect of the present invention provides a SPAD histogram adaptive storage method based on differential counting, the method comprising: Receive photon trigger events from the SPAD array, divide the measurement time window into N time intervals, calculate the difference between photon trigger events in the preset time intervals, and obtain multiple differential count values; The multiple differential count values are accumulated with the corresponding stored differential count values. The overflow of the differential count values after accumulation is monitored in real time. When an overflow occurs, the storage address corresponding to the overflow data is adaptively merged and reorganized so as to reallocate the storage capacity to the corresponding overflow data. If no overflow occurs, the updated accumulated data is stored at the current storage address; if an overflow occurs, the updated accumulated data is stored at the reallocated storage address.
[0013] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention provides a SPAD histogram adaptive storage system and method based on differential counting. Through a collaborative architecture of multi-interval differential counting modules, a histogram BIN dynamic merging module based on count overflow, and a storage module, a closed-loop processing system of "event acquisition - overflow detection - noise suppression - dynamic storage" is constructed. This system addresses the problems of high histogram storage resource consumption and low utilization in SPAD ranging systems by achieving noise suppression through a differential counting mechanism, expanding the statistical dynamic range through a dynamic BIN merging mechanism, and improving resource utilization through adaptive storage allocation.
[0014] Compared to existing technologies, the core advantages of this invention are reflected in three aspects: First, it effectively suppresses background noise and improves the system signal-to-noise ratio through differential counting; second, it resolves the contradiction between storage resource allocation and dynamic range through a dynamic BIN merging mechanism; and third, it prioritizes the allocation of limited storage capacity to more active histogram intervals through a conditional storage reallocation mechanism. The overall system reduces hardware overhead while ensuring system performance, providing an efficient histogram storage solution for high-performance SPAD detection systems.
[0015] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the overall architecture of a SPAD histogram adaptive storage system based on differential counting, provided in an embodiment of the present invention. Figure 2 This is a flowchart of a SPAD histogram adaptive storage method based on differential counting, provided by an embodiment of the present invention. Detailed Implementation
[0017] To further illustrate the technical means and effects adopted by the present invention to achieve the intended purpose, the following detailed description, in conjunction with the accompanying drawings and specific embodiments, provides a SPAD histogram adaptive storage system and method based on differential counting proposed in accordance with the present invention.
[0018] The foregoing and other technical contents, features, and effects of the present invention will be clearly presented in the following detailed description of specific embodiments in conjunction with the accompanying drawings. Through the description of the specific embodiments, a more in-depth and concrete understanding can be gained of the technical means and effects adopted by the present invention to achieve its intended purpose. However, the accompanying drawings are for reference and illustration only and are not intended to limit the technical solutions of the present invention.
[0019] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations are intended to cover non-exclusive inclusion, such that an article or apparatus comprising a list of elements includes not only those elements but also other elements not expressly listed. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or apparatus that includes said element.
[0020] Example 1 Please see Figure 1 , Figure 1This is a schematic diagram of the overall architecture of a SPAD histogram adaptive storage system based on differential counting, provided by an embodiment of the present invention. The SPAD histogram adaptive storage system includes a multi-interval differential counting module 100, a histogram BIN dynamic merging circuit 200 based on count overflow, and a storage circuit 300. The multi-interval differential counting module 100 receives photon trigger events from the SPAD array, divides the measurement time window into N time intervals, and calculates the difference between photon trigger events in the preset time intervals to obtain multiple differential count values. The histogram BIN dynamic merging module 200 accumulates the multiple differential count values with the corresponding stored differential count values, monitors the overflow of the accumulated differential count values in real time, and adaptively merges and reassembles the storage addresses corresponding to the overflow data when overflow occurs, so as to reallocate the storage capacity to the corresponding overflow data. The storage circuit 300 stores the updated accumulated data according to the current storage address when no overflow occurs, or stores the updated accumulated data according to the reallocated storage capacity when overflow occurs.
[0021] The multi-interval differential counting module 100 of this embodiment includes an interval selection unit 1001 and a dual-mode counting unit 1002. Through the coordinated action of the interval selection circuit 1001 and the dual-mode counting circuit 1002, the functions of dividing the measurement time window, differential counting, and noise suppression are realized. Specifically, the interval selection unit 1001 is used to receive photon triggering events from the SPAD array and divide the measurement time window into N time intervals at equal intervals, wherein each time interval corresponds to M histograms (BINs).
[0022] For example, the sampling circuit operates within a clock cycle, corresponding to a dynamic measurement range of 512 ns, meaning the system's measurement time window is 512 ns. Assuming each bin has a storage depth of 12 bits, a traditional equal-depth histogram structure requires 128 bins, resulting in a total storage requirement of 128 × 12 bits. To address this issue, this invention proposes a "4-BIN / Cell" histogram multiplexing structure. This structure divides the 128 bins into four time intervals: A1 (BIN0~BIN31), A2 (BIN32~BIN63), A3 (BIN64~BIN95), and A4 (BIN96~BIN127), with each time interval comprising 32 bins.
[0023] In other words, the interval selection circuit 1001 divides the 512 ns measurement time window into four equally spaced time intervals based on the system clock signal and the measurement enable signal, with each time interval corresponding to 32 bins. In this embodiment, the system clock signal has a frequency of 250 MHz and a period of 4 ns. The interval selection circuit 1001 includes a 7-bit counter that counts the system clock signal when the measurement enable signal is valid, with a count value ranging from 0 to 127, which serves as the index output for the time interval.
[0024] Furthermore, the dual-mode counting unit 1002 is used to count the number of photon triggering events (BIN) corresponding to the histogram BIN in each time interval. i And calculate the difference between the BIN at the same position in the N / 2+j time interval and the j-th time interval, to obtain the difference count value sequence between the N / 2+j time interval and the j-th time interval. This difference count value sequence includes M difference count values, where, j The value of is in the range of 1 to N / 2, and N is an even number.
[0025] Interval selection unit 1001 is used to divide the measurement time window into N time intervals at equal intervals, wherein the first time interval includes the interval from BIN0 to BIN0. M-1 The second time interval includes from BIN M To BIN 2M-1 And so on, the Nth time interval includes BIN (N-1)×M ~BIN N×M-1 The interval selection unit 1001 is also used to sequentially pair the (N / 2+1)th time interval to the Nth time interval with the 1st time interval to the (N / 2)th time interval, calculate the difference of the corresponding sequential BIN within each pairing interval, and obtain the difference count value for each group. Specifically, the (N / 2+j)th time interval and the... j Differential count values CBIN for each time interval (j-1,i) It equals the (N / 2+j)th time interval. i The value of the BIN of the histogram minus the value of the first histogram. j The first time interval i The values of the histogram BIN. i The value range is 0 to M-1.
[0026] As shown above, in the example given in this embodiment, the measurement time window is divided into N=4 time intervals at equal intervals, where each time interval corresponds to M=32 histograms BIN. Then, the difference between the BIN at the same position in time interval A3 and time interval A1 is calculated, and the difference between the BIN at the same position in time interval A4 and time interval A2 is calculated.
[0027] If N=6, that is, the measurement time window is divided into time intervals A1~A6 at equal intervals, then the dual-mode counting unit 1002 calculates the difference between the BIN at the same position in time interval A6 and time interval A3, calculates the difference between the BIN at the same position in time interval A5 and time interval A2, and calculates the difference between the BIN at the same position in time interval A4 and time interval A1.
[0028] Taking N=4 as an example, the interval selection unit 1001 is used to divide the measurement time window into 4 time intervals at equal intervals, each time interval corresponding to 32 BINs, wherein time interval A1 includes BIN0~BIN 31 Time interval A2 includes BIN 32 ~BIN 63 Time interval A3 includes BIN 64 ~BIN 95 Time interval A4 includes BIN 96 ~BIN 127 During the difference calculation process, the first BIN(BIN) in time interval A3 is calculated respectively. 64 The difference CBINA0 between the number of photon triggers in time interval A1 and the number of photon triggers in the first BIN (BIN0) in time interval A3 is calculated. 65 The difference between the number of photon triggers in time interval A1 and the number of photon triggers in the second BIN (BIN61) is CBINA2. Similarly, the difference between the corresponding BINs in time intervals A3 and A1 is CBINA0~CBINA31, i.e., CBINA... i = BIN 64+i BIN i Similarly, the difference between the corresponding BIN values in time intervals A4 and A2 is obtained as CBINB0~CBINB31, i.e., CBINB i = BIN 96+i BIN 32+i ,31≥ i ≥0.
[0029] See also Figure 1 The histogram BIN dynamic merging module 200 based on count overflow in this embodiment includes a summing unit 2001, a comparison unit 2002, an effective photon filtering unit 2003, and a histogram BIN dynamic merging unit 2004. This module achieves dynamic allocation of storage resources through the coordinated operation of the summing unit 2001, the comparison unit 2002, the effective photon filtering unit 2003, and the histogram BIN dynamic merging unit 2004.
[0030] The summation unit 2001 connects the multi-interval difference counting module 100 and the storage module 300, and is used to add the difference count value sequence from the multi-interval difference counting module 100 to the current accumulated value sequence stored in the storage module 300 at corresponding positions within the current exposure cycle to obtain the updated accumulated value sequence.
[0031] It should be noted that the bit width of the differential count value in this embodiment is 6 bits. Each storage unit of the storage module 300 is initially configured with a storage depth of 12 bits (divided into low 6 bits and high 6 bits). In the initial stage, each storage unit is configured to store two independent 6-bit differential count values at the same time: the low 6 bits are used to store CBINA0~CBINA31 (i.e., the difference between the corresponding BINs between time intervals A3 and A1), and the high 6 bits are used to store CBINB0~CBINB31 (i.e., the difference between the corresponding BINs between time intervals A4 and A2), thereby improving storage reuse efficiency without increasing the total number of storage units.
[0032] In this embodiment, the summation unit 2001 acquires the difference count value sequence CBIN from the multi-interval difference counting module 100. (j-1,0)新 ~CBIN (j-1,M-1)新 And the previously accumulated differential count sequence CBIN stored in storage module 300 (j-1,0)累加 ~CBIN (j-1,M-1)累加 Then, the corresponding positions are accumulated to obtain the accumulated and updated differential count value sequence CBIN. (j-1,0)累加 ~CBIN (j-1,M-1)累加 .
[0033] Specifically, continuing with N=4 as an example, the summation unit 2001 obtains the difference count value sequence CBINA0 from the multi-interval difference counting module 100. 新 ~CBINA31 新 and CBINB0 新 ~CBINB31 新 And the previously accumulated differential count sequence CBINA0 stored in storage module 300 累加 ~CBINA31 累加 and CBINB0 累加 ~CBINB31 累加 And then accumulate at the corresponding positions. For example, CBINA0... 新 With CBINA0 累加 Add them together, and add CBINA1 新 With CBINA1 累加 Add them together, and so on, until CBINA31 is added. 新 With CBINA31 累加The values are added together to obtain the cumulative and updated differential count sequence CBINA0. 累加 ~CBINA31 累加 Similarly, obtain the cumulatively updated sequence of difference counts, CBINB0. 累加 ~CBINB31 累加 .
[0034] The comparison unit 2002 compares each accumulated value in the updated accumulated value sequence with a set overflow threshold, and generates a corresponding overflow flag signal when the current accumulated value in the updated accumulated value sequence exceeds the overflow threshold. Specifically, the comparison unit 2002 receives the accumulated and updated differential count value sequence CBINA0 from the summing unit 2001. 累加 ~CBINA31 累加 and CBINB0 累加 ~CBINB31 累加 The differential count value is compared with a preset overflow threshold. When any differential count value in the accumulated and updated differential count value sequence exceeds the overflow threshold, the comparison unit 2002 generates a corresponding overflow flag signal. In this embodiment, the bit width of the differential count value is 6 bits, and the overflow threshold is 63. In the initial stage, each BIN is configured with a 6-bit storage depth. The comparison circuit 2002 can be a 6-bit comparator, with one input being the output value of the summing circuit 2001 and the other input being the overflow threshold.
[0035] Furthermore, the effective photon filtering unit 2003 is used to delete, based on the overflow flag signal, another accumulated value stored in the same storage unit as the accumulated value corresponding to the overflow flag signal. As shown above, each storage unit is configured to simultaneously store two independent 6-bit differential count values: the lower 6 bits are used to store CBINA0. 累加 ~CBINA31 累加 The high 6 bits are used to store CBINB0 累加 ~CBINB31 累加 , i.e., CBINA0 累加 and CBINB0 累加 Stored in the same 12-bit memory cell, CBINA1 累加 and CBINB1 累加 Stored in the same 12-bit memory cell, and so on, CBINA31 累加 and CBINB31 累加 They are stored in the same 12-bit memory cell. When CBINA1 累加If the overflow threshold is exceeded, the comparison unit 2002 generates a corresponding overflow flag signal and sends it to the valid photon filtering unit 2003. The valid photon filtering unit 2003 then deletes photos containing CBINA1 from the data sequence based on the overflow flag signal. 累加 Another accumulated value CBINB1 stored in the unified storage unit 累加 .
[0036] The histogram BIN dynamic merging unit 2004 is used to merge the storage addresses corresponding to the accumulated values corresponding to the overflow flag signal into a single storage unit based on the overflow flag signal and the corresponding storage address index. The merged storage unit is used to store the accumulated values corresponding to the overflow flag signal. For example, when CBINA1 累加 If the overflow threshold is exceeded, the histogram BIN dynamic merging unit 2004 is used to merge the CBINA1 according to the overflow flag signal and the corresponding storage address index. 累加 The high 6 bits and low 6 bits of the corresponding memory cell are combined into a single memory cell, and the combined memory cell is used to store CBINA1. 累加 The corresponding accumulated value.
[0037] The storage circuit 300 is used to store the updated accumulated data at the current storage address when no overflow occurs, or to store the updated accumulated data at the reallocated storage address when an overflow occurs. The storage circuit 300 includes a state machine control module 3001 and a storage unit 3002. Through the coordinated operation of the state machine control module 3001 and the storage unit 3002, reliable data storage and efficient access are achieved. Specifically, the storage circuit 300 includes a state machine control module 3001 and a storage unit 3002. The state machine control module 3001 generates read / write control signals and address selection signals for the storage unit 3002 based on the system clock signal, measurement enable signal, and overflow flag signal. This module ensures that all accumulated values are updated within a single measurement cycle and triggers storage reorganization in a timely manner when an overflow is detected. The storage unit 3002 stores the updated accumulated data at the current storage address when no overflow occurs, or stores the updated accumulated data at the reallocated storage address when an overflow occurs, based on the read / write control signals and address selection signals.
[0038] In this embodiment, the storage unit 3002 uses a dual-port SRAM. Each storage unit is initially configured with a K-bit storage depth, divided into N / 2 consecutive storage segments according to a fixed interval. The general formula for each storage segment is [(p-1)×2K / N+1]~[p×2K / N] bits, where p is the storage segment number, with a value range of 1≤p≤N / 2. During initial configuration, the first storage segment of each storage unit, [(1-1)×2K / N+1]~[1×2K / N] bits (i.e., 1~2K / N bits), is used to store the differential count value CBIN(0,i); the second storage segment, [(2-1)×2K / N+1]~[2×2K / N] bits (i.e., 2K / N+1~4K / N bits), is used to store the differential count value CBIN(1,i); the p-th storage segment, [(p-1)×2K / N+1]~[...]... [p×2K / N] bits are used to store the differential count value CBIN(p-1,i).
[0039] In this embodiment, the storage unit 3002 uses a dual-port SRAM with a total of 128 storage units. Each unit is initially configured with a 12-bit storage depth (divided into low 6 bits and high 6 bits). During initial configuration, the high 6 bits of each storage unit are used to store CBINA. i The lower 6 bits of each storage unit are used to store CBINB. i .
[0040] For example, when CBINA1 累加 When the preset overflow threshold is exceeded—that is, when the high 6 bits of the corresponding memory cell first reach the count value of 63—the comparator circuit 2002 outputs an overflow flag signal. The state machine control module 3001 responds to this overflow flag signal and controls the histogram BIN dynamic merging unit 2004 to merge the high 6 bits and low 6 bits of the current memory cell. The subsequent accumulated result is stored in the merged 12-bit address space. Simultaneously, the accumulated result corresponding to the low 6 bits of the corresponding memory cell is cleared to zero and counting stops. Through this dynamic merging mechanism, the system can significantly improve storage resource utilization while maintaining linearity and dynamic range.
[0041] It should be noted that during actual storage, this SPAD histogram adaptive storage system monitors the overflow status of each storage segment in real time to determine in which sub-segment events should continue to be accumulated. When the lower 6-bit segment Ai<5:0> reaches its maximum count value first, its corresponding overflow flag Oi<1:0> is set to state "1". At this time, subsequent events will be redirected to the complete 12-bit address space Ai<11:0> and continue to be used for the accumulation of CBINA[i]; simultaneously, the corresponding CBINB[i] channel will stop counting. Conversely, if the higher 6-bit segment Ai<11:6> overflows first, Oi<1:0> is set to state "2". At this time, Ai<11:0> will be dedicated to the accumulation of CBINB[i], while the CBINA[i] count is paused. Through this conditional storage reallocation mechanism, the system can dynamically adjust storage resources according to the signal statistical characteristics during the measurement process, prioritizing the allocation of limited storage capacity to more active histogram intervals.
[0042] This histogram-based memory reuse mechanism significantly improves memory utilization efficiency. Traditional histogram structures typically allocate a fixed depth of storage cells to each bin. However, in practical applications, most noise events (such as background light triggering) are sparsely distributed across a large number of bins on the time axis, while the true echo signal is concentrated in only a few bins, resulting in significant waste of storage resources. In contrast, the proposed adaptive reuse scheme allows each storage cell to serve two bins simultaneously in the early stages of accumulation. When a signal becomes significant in a certain interval, the entire storage depth is then allocated to that active bin, thus achieving dynamic depth scheduling. This method not only effectively avoids resource idleness but also improves the dynamic range of the system while maintaining measurement linearity. For strong reflected echo signals, if the original shallow storage bin is about to saturate, the system can automatically expand its effective storage depth to prevent information loss and maintain the linearity of the histogram response. Meanwhile, bins with weak signals or predominant noise remain in a shallow storage state, further improving overall storage efficiency.
[0043] Example 2 Based on Embodiment 1, this embodiment provides an adaptive storage method for SPAD histograms based on differential counting, such as... Figure 2 The storage method includes the following steps: S1: Receive photon trigger events from the SPAD array, divide the measurement time window into N time intervals, calculate the difference between photon trigger events in the preset time intervals, and obtain multiple differential count values.
[0044] S2: The multiple differential count values are accumulated with the corresponding stored differential count values. The overflow of the differential count values after accumulation is monitored in real time. When an overflow occurs, the storage address corresponding to the overflow data is adaptively merged and reorganized to reallocate the storage capacity to the corresponding overflow data.
[0045] S3: If no overflow occurs, store the updated accumulated data at the current storage address; or if an overflow occurs, store the updated accumulated data at the reallocated storage address.
[0046] For the specific execution process, please refer to Example 1, which will not be repeated here.
[0047] In summary, the SPAD histogram adaptive storage system and method based on differential counting provided in this invention constructs a closed-loop processing system of "event acquisition - overflow detection - noise suppression - dynamic storage" through a collaborative architecture of multi-interval differential counting modules, a histogram BIN dynamic merging module based on count overflow, and a storage module. This system addresses the problems of high histogram storage resource consumption and low utilization in SPAD ranging systems by achieving noise suppression through a differential counting mechanism, expanding the statistical dynamic range through a dynamic BIN merging mechanism, and improving resource utilization through adaptive storage allocation.
[0048] Compared to existing technologies, the core advantages of this invention are reflected in three aspects: First, it effectively suppresses background noise and improves the system signal-to-noise ratio through differential counting; second, it resolves the contradiction between storage resource allocation and dynamic range through a dynamic BIN merging mechanism; and third, it prioritizes the allocation of limited storage capacity to more active histogram intervals through a conditional storage reallocation mechanism. The overall architecture reduces hardware overhead while ensuring system performance, providing an efficient histogram storage solution for high-performance SPAD detection systems.
[0049] It should be noted that the module division and configuration of the technical solution disclosed in this invention are only a logical functional division. In actual applications, they can be flexibly adjusted according to hardware design requirements. For example, the multi-interval differential counting system and the histogram BIN dynamic merging system can be integrated into the same processing unit. The storage depth and number of BINs of the storage system can be configured according to the application scenario. All of the above adjustments do not deviate from the core design concept of this invention.
[0050] In the several embodiments provided by this invention, it should be understood that the apparatus and methods disclosed in this invention can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of modules is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0051] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A SPAD histogram adaptive storage system based on differential counting, characterized in that, It includes a multi-interval difference counting module (100), a histogram BIN dynamic merging module based on counting overflow (200), and a storage module (300), wherein, The multi-interval differential counting module (100) is used to receive photon triggering events from the SPAD array, divide the measurement time window into N time intervals, calculate the difference between photon triggering events in the preset time intervals, and obtain multiple differential counting values. The histogram BIN dynamic merging module (200) based on overflow is used to accumulate the multiple differential count values with the corresponding stored differential count values, monitor the overflow of the differential count values after accumulation in real time, and adaptively merge and reorganize the storage address corresponding to the overflow data when overflow occurs, so as to reallocate the storage capacity to the corresponding overflow data. The storage circuit (300) is used to store the updated accumulated data according to the current storage address when no overflow occurs, or to store the updated accumulated data according to the reallocated storage address when an overflow occurs.
2. The SPAD histogram adaptive storage system based on differential counting according to claim 1, characterized in that, The multi-interval differential counting module (100) includes an interval selection unit (1001) and a dual-mode counting unit (1002), wherein, The interval selection unit (1001) is used to receive photon triggering events from the SPAD array and divide the measurement time window into N time intervals at equal intervals, wherein each time interval corresponds to M histograms (BINs). The dual-mode counting unit (1002) is used to count the number of photon triggering events in the corresponding histogram BIN for each time interval. i The difference between the BIN values at the same position in the (N / 2+j)th time interval and the jth time interval is calculated to obtain the difference count sequence between the (N / 2+j)th time interval and the jth time interval. The difference count sequence includes M difference count values, where the value of j ranges from 1 to N / 2, and N is an even number.
3. The SPAD histogram adaptive storage system based on differential counting according to claim 2, characterized in that, The interval selection unit (1001) is used to divide the measurement time window into N time intervals at equal intervals, wherein the first time interval includes BIN0~BIN M-1 The second time interval includes BIN. M ~BIN 2M-1 And so on, the Nth time interval includes BIN (N-1)×M ~BIN N×M-1 ; The interval selection unit (1001) is further configured to pair the (N / 2+1)th time interval to the Nth time interval with the 1st time interval to the (N / 2)th time interval in sequence, calculate the difference between the corresponding sequential BIN values within each pairing interval, and obtain the difference count value for each pairing interval. Specifically, the (N / 2+j)th time interval and the... j Differential count values CBIN for each time interval (j-1,i) It equals the (N / 2+j)th time interval. i The value of the BIN of the histogram minus the value of the j-th time interval i The values of the histogram BIN. i The value range is from 0 to M-1.
4. The SPAD histogram adaptive storage system based on differential counting according to claim 3, characterized in that, The histogram BIN dynamic merging module (200) based on count overflow includes a summation unit (2001), a comparison unit (2002), an effective photon filtering unit (2003), and a histogram BIN dynamic merging unit (2004), wherein, The summation unit (2001) connects the multi-interval difference counting module (100) and the storage module (300), and is used to add the difference count value sequence from the multi-interval difference counting module (100) to the current accumulated value sequence stored in the storage module (300) at corresponding positions within the current exposure cycle to obtain the updated accumulated value sequence. The comparison unit (2002) is used to compare each accumulated value in the updated accumulated value sequence with a set overflow threshold, and generate a corresponding overflow flag signal when the current accumulated value in the updated accumulated value sequence exceeds the overflow threshold; The effective photon filtering unit (2003) is used to delete another accumulated value stored in the same storage unit as the accumulated value corresponding to the overflow flag signal, according to the overflow flag signal; The histogram BIN dynamic merging unit (2004) is used to merge the storage address corresponding to the accumulated value corresponding to the overflow flag signal into a single storage unit according to the overflow flag signal and the corresponding storage address index. The merged storage unit is used to store the accumulated value corresponding to the overflow flag signal.
5. The SPAD histogram adaptive storage system based on differential counting according to claim 4, characterized in that, The summing unit (2001) acquires the difference count value sequence CBIN from the multi-interval difference counting module (100). (j-1,0)新 ~CBIN (j-1,M-1)新 and the accumulated differential count sequence CBIN stored in the storage module (300). (j-1,0)累加 ~CBIN (j-1,M-1)累加 Then, the corresponding positions are accumulated to obtain the accumulated and updated differential count value sequence CBIN. (j-1,0)累加 ~CBIN (j-1,M-1)累加 .
6. The SPAD histogram adaptive storage system based on differential counting according to claim 5, characterized in that, The storage circuit (300) includes a state machine control module (3001) and a storage unit (3002), wherein, The state machine control module (3001) is used to generate read / write control signals and address selection signals for the storage unit (3002) based on the system clock signal, measurement enable signal, and overflow flag signal. The storage unit (3002) is used to store the updated accumulated data according to the current storage address when no overflow occurs, or to store the updated accumulated data according to the reallocated storage address when an overflow occurs, based on the read / write control signal and the address selection signal.
7. The SPAD histogram adaptive storage system based on differential counting according to claim 6, characterized in that, The storage unit (3002) adopts a dual-port SRAM. Each storage unit is initially configured with a K-bit storage depth and is divided into N / 2 consecutive storage bit segments according to a fixed interval. The general formula of the storage bit segment is [(p-1)×2K / N+1]~[p×2K / N] bits, where p is the storage bit segment number and the value range is 1≤p≤N / 2. In the initial configuration, the first storage segment of each storage cell [(1-1)×2K / N+1]~[1×2K / N] bits, i.e., 1~2K / N bits, is used to store the differential count value CBIN(0,i); the second storage segment [(2-1)×2K / N+1]~[2×2K / N] bits, i.e., 2K / N+1~4K / N bits, is used to store the differential count value CBIN(1,i); and the p-th storage segment [(p-1)×2K / N+1]~[p×2K / N] bits is used to store the differential count value CBIN(p-1,i).
8. A SPAD histogram adaptive storage method based on differential counting, characterized in that, Utilizing SPAD histogram adaptive storage execution according to any one of claims 1 to 7, the method comprises: Receive photon trigger events from the SPAD array, divide the measurement time window into N time intervals, calculate the difference between photon trigger events in the preset time intervals, and obtain multiple differential count values; The multiple differential count values are accumulated with the corresponding stored differential count values. The overflow of the differential count values after accumulation is monitored in real time. When an overflow occurs, the storage address corresponding to the overflow data is adaptively merged and reorganized so as to reallocate the storage capacity to the corresponding overflow data. If no overflow occurs, the updated accumulated data is stored at the current storage address; if an overflow occurs, the updated accumulated data is stored at the reallocated storage address.