METHOD AND SYSTEM FOR DETECTING GLITCH AT HIGH SAMPLING RATE
20230061075 · 2023-03-02
Assignee
Inventors
Cpc classification
G01R31/31703
PHYSICS
International classification
Abstract
Methods for detecting a glitch at a high sampling rate are provided. In some embodiments, a method includes the following steps: S1, acquiring to-be-identified data; S2, processing the to-be-identified data to obtain normal sampling data; and S3, performing glitch identification on the to-be-identified data to obtain a glitch position of the normal sampling data. In other embodiments, the disclosure provides a system for detecting a glitch at a high sampling rate and for implementing the method for detecting a glitch at a high sampling rate. The system includes an acquisition unit and a glitch identification unit. The acquisition unit acquires and processes the to-be-identified data to obtain the normal sampling data, and the glitch identification unit performs glitch identification on the to-be-identified data to obtain the glitch position of the normal sampling data.
Claims
1. A method for detecting a glitch at a high sampling rate, comprising the steps of: S1, acquiring to-be-identified data; S2, processing the to-be-identified data to obtain normal sampling data; and S3, performing glitch identification on the to-be-identified data to obtain a glitch position of the normal sampling data.
2. The method according to claim 1, wherein S2 comprises performing equal-interval extraction on the to-be-identified data based on a timing analysis rate to obtain the normal sampling data.
3. The method according to claim 2, wherein S3 comprises the steps of: S301, performing end-to-end splicing on the to-be-identified data at a previous sampling moment of a current sampling moment, the to-be-identified data at the current sampling moment, and the to-be-identified data at a next sampling moment of the current sampling moment to obtain spliced data; and S302, extracting transition edge position data based on the spliced data and a quantity of interval of the equal-interval extraction, and identifying a glitch based on the transition edge position data.
4. The method according to claim 3, wherein, when S301 is performed: only a last bit of the to-be-identified data at the previous sampling moment of the current sampling moment is taken; and first the quantity of interval of the equal-interval extraction minus one bits of the to-be-identified data at the next sampling moment of the current sampling moment is taken.
5. The method according to claim 3, wherein S302 comprises: (1) calculating and extracting the transition edge position data based on the spliced data; and (2) determining, based on the transition edge position data, whether a position difference between two adjacent transition edges is less than the quantity of interval of the equal-interval extraction, wherein: if the position difference between the two adjacent transition edges is less than the quantity of interval of the equal-interval extraction, the glitch appears at a corresponding position of the normal sampling data, and the glitch is subject to a first transition edge position of a glitch pulse; and otherwise, no glitch appears at the corresponding position of the normal sampling data.
6. The method according to claim 5, wherein in step (1), pairwise exclusive OR operation shown in the following formula is performed on adjacent bits of the spliced data to obtain the transition edge position data:
Edge[i]=Data_com[i]⊕Data_com[i+1], wherein: Edge [i] represents a set of the transition edge position data, Edge [i] being 1 represents that a transition edge appears at the corresponding position of the normal sampling data, and Edge [i] being 0 represents that no transition edge appears at the corresponding position of the normal sampling data; Data_com [i] represents [i]-th bit of a set of the spliced data; and Data_com [i+1] represents [i+1]-th bit of the set of the spliced data.
7. The method according to claim 6, wherein in step (2), the step of determining whether the position difference between two adjacent transition edges is less than the quantity of interval of the equal-interval extraction is conducted by using a determining criterion such that any one group of data among Edge [0+k×m+m−1:0+k×m], Edge [1+k×m+m−1:1+k×m], Edge [2+k×m+m−1:2+k×m], . . . , Edge [m−1+k×m+m−1:m−1+k×m] among the transition edge position data Edge [i] has two 1s and a lowest bit in the group of data is 1, wherein m is the quantity of interval of the equal-interval extraction and k is an integer selected from the group consisting of 0, 1, 2, . . . .
8. The method according to claim 1, wherein S1 comprises: S101, performing time-interleaved sampling on a data channel of the to-be-identified data by two acquisition units to obtain two groups of to-be-detected data; and S102, performing alternative splicing on the two groups of the to-be-detected data to obtain the to-be-identified data.
9. The method according to claim 8, wherein: the two acquisition units comprise a first acquisition unit and a second acquisition unit; and a QUAD phase of a reference clock of the second acquisition unit is greater than that of the first acquisition unit by 180°.
10. The method according to claim 4, wherein S302 comprises: (1) calculating and extracting the transition edge position data based on the spliced data; and (2) determining, based on the transition edge position data, whether a position difference between two adjacent transition edges is less than the quantity of interval of the equal-interval extraction, wherein: if the position difference between the two adjacent transition edges is less than the quantity of interval of the equal-interval extraction, the glitch appears at a corresponding position of the normal sampling data, and the glitch is subject to a first transition edge position of a glitch pulse; and otherwise, no glitch appears at the corresponding position of the normal sampling data.
11. The method according to claim 10, wherein in step (1), pairwise exclusive OR operation shown in the following formula is performed on adjacent bits of the spliced data to obtain the transition edge position data:
Edge[i]=Data_com[i]⊕Data_com[i+1], wherein: Edge [i] represents a set of the transition edge position data, Edge [i] being 1 represents that a transition edge appears at the corresponding position of the normal sampling data, and Edge [i] being 0 represents that no transition edge appears at the corresponding position of the normal sampling data; Data_com [i] represents [i]-th bit of a set of the spliced data; and Data_com [i+1] represents [i+1]-th bit of the set of the spliced data.
12. The method according to claim 11, wherein in step (2), the step of determining whether the position difference between two adjacent transition edges is less than the quantity of interval of the equal-interval extraction is conducted by using a determining criterion such that any one group of data among Edge [0+k×m+m−1:0+k×m], Edge [1+k×m+m−1:1+k×m], Edge [2+k×m+m−1:2+k×m], . . . , Edge [m−1+k×m+m−1:m−1+k×m] among the transition edge position data Edge [i] has two 1s and a lowest bit in the group of data is 1, wherein m is the quantity of interval of the equal-interval extraction and k is an integer selected from the group consisting of 0, 1, 2, . . . .
13. A system for detecting the glitch at the high sampling rate and for implementing the method for detecting the glitch at the high sampling rate according to claim 1, comprising an acquisition unit and a glitch identification unit, wherein: the acquisition unit acquires and processes the to-be-identified data to obtain the normal sampling data; and the glitch identification unit performs glitch identification on the to-be-identified data to obtain the glitch position of the normal sampling data.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Illustrative embodiments of the present disclosure are described in detail below with reference to the figures.
[0021]
[0022]
DETAILED DESCRIPTION
[0023] The following describes some non-limiting embodiments of the invention with reference to the accompanying drawings. The described embodiments are merely a part rather than all of the embodiments of the invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the disclosure shall fall within the scope of the disclosure.
[0024] The implementations of the present disclosure are described below by using specific instances, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the content disclosed in this specification. The present disclosure can further be implemented or applied by using other different specific implementations. Based on different viewpoints and applications, various modifications or amendments can be made to various details of this specification without departing from the spirit of the present disclosure. It should be noted that the embodiments and the features of the embodiments may be combined with each other without conflict.
[0025] It should be noted that the drawings provided in the following embodiments are only used to illustrate the basic concept of the present disclosure in a schematic way. Therefore, the drawings only show the components related to the present disclosure rather than the quantity, shape, and size of components during actual implementation. The pattern, quantity, and proportion of each component can be changed at will during actual implementation, and the layout and the pattern of the components may also be more complicated.
Embodiment I
[0026] As shown in
[0027] S1 To-be-identified data are acquired.
[0028] S101 Time-interleaved sampling on a data channel of the to-be-identified data is performed by two acquisition units, to obtain two groups of the to-be-detected data.
[0029] In this embodiment, a high-speed transceiver inside an FPGA is used as an acquisition unit. A GTY transceiver may convert a high-speed serial signal into a low-speed parallel signal, to implement a sampling rate of 25 Gbps. At this time, a data bit width is 128 bits.
[0030] The acquisition unit includes a first acquisition unit and a second acquisition unit, and a QUAD phase of a reference clock of the second acquisition unit is greater than a QUAD phase of a reference clock of the first acquisition unit by 180°.
[0031] The QUAD phase of the reference clock of the first acquisition unit is 0°, and the QUAD phase of the reference clock of the second acquisition unit is 180°.
[0032] By giving two acquisition units (i.e. two high-speed transceivers) different reference clocks with a QUAD phase difference of 180°, a sampling rate of 25 gigabit samples per second (GSPS) with a phase difference of 180° between two phases may be implemented, that is, time-interleaved sampling.
[0033] A group of the to-be-detected data acquired by the first acquisition unit is represented as Data1 [127:0], an acquisition rate is 25 GSPS, and the data bit width is 128 bits. A group of the to-be-detected data acquired by the second acquisition unit is represented as Data2 [127:0], the acquisition rate is 25 GSPS, and the data bit width is 128 bits.
[0034] S102 Alternative splicing is performed on the two groups of the to-be-detected data, to obtain the to-be-identified data.
[0035] A sampling rate of 50 GSPS may be implemented through the alternative splicing. At this time, the data bit width is 256 bits.
[0036] Data is alternately extracted in sequence from the to-be-detected data Data1 [127:0] acquired by the first acquisition unit and the to-be-detected data Data2 [127:0] acquired by the second acquisition unit, to obtain the to-be-identified data Data [255:0].
[0037] Data [255:0] represents alternately spliced data with the sampling rate of 50 GSPS. At this time, the data bit width is 256 bits, and a time interval between two consecutive bits of data is 20 ps.
[0038] Time-interleaved sampling and alternate splicing are performed on a data channel of the to-be-identified data by using two high-speed transceivers, so that the to-be-identified data with the sampling rate of 50 GSPS may be obtained. At the sampling rate of 50 GSPS, the time interval between every two sampling points is 20 ps. The high-speed transceiver converts high-speed serial data into low-speed parallel data with the bit width of 256 bits at the sampling rate of 50 GSPS.
[0039] Time-interleaved sampling and alternate splicing are performed on the data channel by using two high-speed transceivers with 25 GSPS, to implement the sampling rate of 50 GSPS.
[0040] S2 The to-be-identified data is processed to obtain normal sampling data, and glitch flag bit data corresponding to the normal sampling data is set.
[0041] S201: Equal-interval extraction is performed on the to-be-identified data based on a timing analysis rate, to obtain the normal sampling data.
[0042] At this time, the timing analysis rate is set to 3.125 GSPS. Therefore, the data (i.e. the to-be-identified data) with a width of 256 bits acquired at the rate of 50 GSPS should be extracted at 16-fold equal intervals, and the extracted data is stored as the normal sampling data. The normal sampling data is represented as acq_data [15:0], which includes Data [240], Data [224], . . . , Data [32], Data [16], and Data [0].
[0043] S202: The glitch flag bit data glitch [15:0] corresponding to the normal sampling data acq_data [15:0] is set.
[0044] The glitch flag bit data glitch [0] corresponds to the normal sampling data acq_data [0], and by analogy, until the glitch flag bit data glitch [15] corresponds to the normal sampling data acq_data [15].
[0045] S3: A glitch is identified.
[0046] S301: End-to-end splicing is performed on the to-be-identified data at a previous sampling moment of a current sampling moment, the to-be-identified data at the current sampling moment, and the to-be-identified data at a next sampling moment of the current sampling moment, to obtain spliced data.
[0047] Two transition edges of a glitch pulse may be distributed at two different sampling moments. Therefore, the end-to-end splicing needs to be performed on the high-bit to-be-identified data at the previous sampling moment, the to-be-identified data at the current sampling moment, and the low-bit to-be-identified data (the low-bit data is first acquired by default) at the next sampling moment, in case that no glitch is identified because the two transition edges of the glitch signal are distributed at the two moments.
[0048] When S301 is performed, only a last bit of the to-be-identified data at the previous sampling moment of the current sampling moment is taken, and first [the quantity of interval of the equal-interval extraction−1] bits of the to-be-identified data at the next sampling moment of the current sampling moment is taken.
[0049] In this embodiment, the to-be-identified data at the previous moment is Data_n [255:0], the to-be-identified data at the current moment is Data_n1 [255:0], the to-be-identified data at the next moment is Data_n2 [255:0], and the spliced data is Data_com [271:0]. Data_n [255] is used as Data_com [0], Data_n1 [255:0] is used as Data_com [256:1], and Data_n2 [14:0] is used as Data_com [271:257]. In this way, the spliced data Data_com [271:0] is obtained.
[0050] Only the last bit of the to-be-identified data at the previous sampling moment of the current sampling moment is taken, and the first [the quantity of interval of the equal-interval extraction−1] bits of the to-be-identified data at the next sampling moment of the current sampling moment is taken. A reason is as follows:
[0051] This embodiment is taken as an example. Analysis is performed in combination with S302. In Data_n1 [15:0], whether Data_n1 [0] is a transition edge position depends on Data_n [255]. If Data_n [255] is 1 and Data_n1 [0] is 0, Data_n1 [0] is a falling edge position. If Data_n [255] is 0 and Data_n1 [0] is 1, Data_n1 [0] is a rising edge position. Therefore, the transition edge position data at the current moment may be generated by using the highest-bit data Data_n [255] at the previous moment (the highest-bit data is acquired at last by default). Therefore, only one bit is taken from the sampling data at the previous moment. That is, only the last bit is taken from the to-be-identified data at the previous sampling moment of the current sampling moment.
[0052] When whether there is a glitch signal in Data_n1 [255:240] is determined, Data_n1 [255:240] is first converted into transition edge data Edge_n1 [255:240], and then whether two transition edges appear in 16 consecutive bits of data in the transition edge data is determined. A method for determining whether the two transition edges appear is: determining whether there are two transition edges in 16-bit data starting with Edge_n1 [240], determining whether there are two transition edges in 16-bit data starting with Edge_n1 [241], . . . , and determining whether there are two transition edges in 16-bit data starting with Edge_n1 [255]. However, Edge_n1 [255] is the highest-bit data at the current moment. Therefore, when whether there are two transition edge positions in the 16-bit data starting with Edge_n1 [255] is determined, 15-bit data at the next moment is needed.
[0053] S302: Transition edge position data is extracted based on the spliced data and the quantity of interval of the equal-interval extraction, and the glitch is identified based on the transition edge position data.
[0054] (1) The transition edge position data are calculated and extracted based on the spliced data.
[0055] Pairwise exclusive OR operation shown in the following formula is performed on adjacent bits of the spliced data, to obtain the transition edge position data:
Edge[i]=Data_com[i]⊕Data_com[i+1],
[0056] where, Edge [i] represents the transition edge position data.
[0057] Edge [i] being 1 represents that a transition edge appears at a corresponding position, and Edge [i] being 0 represents that no transition edge appears at the corresponding position.
[0058] The transition edge position data is Edge [270:0].
[0059] (2) Based on the transition edge position data, it is determined whether a position difference between two adjacent transition edges is less than the quantity of interval (i.e. the quantity of the currently set sampling interval) of the equal-interval extraction, where if the position difference between the two adjacent transition edges is less than the quantity of interval of the equal-interval extraction, the glitch appears at a corresponding position of the normal sampling data, and the glitch flag bit data at the corresponding position is set to 1 (this is subject to a first transition edge position of a glitch pulse); otherwise, no glitch appears in the normal sampling data at the corresponding position, and the glitch flag bit data at the corresponding position is set to 0.
[0060] m is the quantity of interval of the equal-interval extraction, and k is 0, 1, 2 . . . .
[0061] If any one group of data among Edge [0+k×m+m−1:0+k×m], Edge [1+k×m+m−1:1+k×m], Edge [2+k×m+m−1:2+k×m], . . . , Edge [m−1+k×m+m−1:m−1+k×m] has two 1s and a lowest bit of the group of data is 1, it indicates that two transition edges appear in m consecutive bits of data. Therefore, there is a glitch pulse in the to-be-identified data Data_n1 [0+k×m+m−1:0+k×m] at the current moment, and the glitch flag bit data glitch [k] corresponding to acq_data [k] is set to 1; otherwise, the glitch flag bit data glitch [k] corresponding to acq_data [k] is set to 0.
[0062] In this embodiment, m=16, and a maximum of k is 15.
[0063] If any one group of data among Edge [15:0], Edge [16:1], Edge [17:2], . . . , Edge [30:15] has two 1s and a lowest bit of the group of data is 1, glitch [0] is set to 1; otherwise, glitch [0] is set to 0.
[0064] Because acq_data [0] is obtained, by the equal-interval extraction, from the to-be-identified data Data_n1 [255:0] at the current moment, when there is glitch data in Data_n1 [15:0], the glitch flag bit data glitch [0] corresponding to acq_data[0] should be set to 1. If there is no glitch data in Data_n1 [15:0], the glitch flag bit data glitch [0] corresponding to acq_data [0] should be set to 0.
[0065] If any one group of data among Edge [31:16], Edge [32:17], Edge [33:18], . . . , Edge [46:31] has two 1s and a lowest bit of the group of data is 1, glitch [1] is set to 1; otherwise, glitch [1] is set to 0.
[0066] By analogy, if any one group of data among Edge [255:240], Edge [256:241], Edge [257:242], . . . , Edge [270:257] has two 1s and a lowest bit of the group of data is 1, glitch [15] is set to 1; otherwise, glitch [15] is set to 0.
[0067] In this way, the glitch flag bit data glitch [15:0] may be obtained.
[0068] For the timing analysis rate of 3.125 GSPS, a pulse whose pulse width is less than 320 ps is the glitch pulse. The time interval of two consecutive bits of data is 20 ps. In this way, 16 consecutive bits of data has a total of 15 time intervals with a total duration of 300 ps. Therefore, if there are two transition edge positions in the 16 consecutive bits of data, it indicates that a signal with a pulse width not greater than 300 ps is acquired.
[0069] Before glitch determining is performed on the spliced data, the transition edge position data is first extracted. Exclusive OR operation is performed on adjacent bits of the spliced data, to extract the transition edge position data. Whether a time between two transition edges is less than a currently set sampling interval is determined. If the time between the two transition edges is less than the currently set sampling interval, the glitch flag bit data corresponding to the normal sampling data position is set to 1 (this is subject to a first transition edge position of a glitch pulse). If the time between the two transition edges is greater than the currently set sampling interval, the glitch flag bit data corresponding to the normal sampling data position is set to 0.
[0070] S4: The normal sampling data and the glitch flag bit data are stored.
[0071] During the glitch detection, a storage depth of the data channel is halved, half of the storage space is used to store the normal sampling data, and the other half of the storage space is used to store the corresponding glitch flag bit data. An upper computer reads data from the storage space, displays the normal sampling data in a waveform, and marks the glitch at the normal sampling data corresponding to the glitch flag bit data at the same time.
[0072] In this example, at the timing analysis rate of 3.125 GSPS, a narrow pulse with a width of less than 320 ps may be considered as the glitch, and a smallest glitch with a width of 20 ps may be detected.
[0073] The acquisition unit samples and processes the data channel, to obtain the to-be-identified data. The to-be-identified data is extracted and stored as the normal sampling data. At the same time, the glitch flag bit data is set in a manner of corresponding to the normal sampling data, and the glitch position is determined based on the to-be-identified data. The normal sampling data and the glitch flag bit data are stored at the same time, and the upper computer reads the normal sampling data and the glitch flag bit data, and marks the glitch on a waveform of the normal sampling data.
[0074] A system for detecting a glitch at a high sampling rate, for implementing the method for detecting a glitch at a high sampling rate, is provided, including an acquisition unit and a glitch identification unit. The acquisition unit acquires and processes the to-be-identified data to obtain the normal sampling data. The glitch identification unit performs glitch identification on the to-be-identified data, to obtain the glitch position of the normal sampling data.
[0075] The system for detecting a glitch at a high sampling rate further includes a storage and display unit. The storage and display unit stores the normal sampling data and the glitch flag bit data. The storage and display system further displays the normal sampling data in a waveform and marks the glitch in the normal sampling data corresponding to the glitch flag bit data.
[0076] A method for implementing ps-level glitch detection at a sampling rate of 50 GSPS by using a high-speed transceiver resource inside an FPGA is provided. At the timing analysis rate of 3.125 GSPS, a narrow pulse with a width of less than 320 ps may be considered as the glitch, and a smallest glitch with a width of 20 ps may be detected, so that the glitch is accurately detected at the high sampling rate.
[0077] The foregoing examples merely represent some specific implementations of the present disclosure, and the description thereof is relatively specific and detailed, but these examples should not be construed as limiting the patent scope of the present disclosure. It should be noted that those of ordinary skill in the art can further make several variations and improvements without departing from the idea of the present disclosure, but such variations and improvements shall all fall within the protection scope of the present disclosure.
[0078] Various embodiments of the disclosure may have one or more of the following beneficial effects. In some embodiments, the disclosure may overcome the disadvantage of the conventional art by providing a method and system for detecting a glitch at a high sampling rate and by accurately detecting the glitch at the high sampling rate.
[0079] Many different arrangements of the various components depicted, as well as components not shown, are possible without departing from the spirit and scope of the present disclosure. Embodiments of the present disclosure have been described with the intent to be illustrative rather than restrictive. Alternative embodiments will become apparent to those skilled in the art that do not depart from its scope. A skilled artisan may develop alternative means of implementing the aforementioned improvements without departing from the scope of the present disclosure.
[0080] It will be understood that certain features and subcombinations are of utility and may be employed without reference to other features and subcombinations and are contemplated within the scope of the claims. Unless indicated otherwise, not all steps listed in the various figures need be carried out in the specific order described.