Oversampling method, device, electronic device and computer-readable storage medium
By tracking the phase shift in real time during PON module bit error rate testing, and utilizing sliding selection and data extraction techniques, the problem of inaccurate sampling caused by jitter and phase shift in the oversampling method was solved, achieving data phase alignment and accurate extraction.
Patent Information
- Application Number
- CN202411136970.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-08-19
AI Technical Summary
In existing technologies, the oversampling method in PON module bit error rate testing cannot effectively cope with jitter and phase shift, resulting in inaccurate sampling results.
By collecting oversampled data groups based on the current clock cycle, performing real-time parallel oversampled data groups, and performing sliding selection and data extraction based on the target phase offset parameter, the sliding offset direction and amount are determined by comparing the phase of the first filtering cycle and the second filtering cycle, thereby achieving real-time tracking of phase offset and accurate data extraction.
It improves the response speed of data phase tracking and the accuracy of sampling data, effectively filters out bit jitter caused by jitter, and ensures the correctness of data extraction, especially in recovering the phase offset of data when optical power changes.
Smart Images

Figure CN118660246B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical network testing technology, and in particular to an oversampling method, device, electronic equipment and computer-readable storage medium. Background Art
[0002] Passive Optical Network (PON) is a pure medium network that avoids electromagnetic interference and lightning effects from external devices, reduces the failure rate of lines and external devices, improves system reliability, and saves maintenance costs.
[0003] Error analysis technology, especially burst error analysis technology, is a very useful technical means. Through error analysis, we can effectively understand the various errors that occur in data transmission. It is usually used in the field of PON module error testing. One of the most challenging components in the PON environment is BCDR (fast clock extraction) working on burst signals of 2.48832Gb / s and 1.24416Gb / s. Similarly, it is also a difficult problem to perform BCDR on 2.48832Gb / s and 1.24416Gb / s burst data in the field of PON module error test instruments. When a high-speed transceiver (10Gb / s) is used to oversample low-rate data (such as 2.48832Gb / s and 1.24416Gb / s), the received data will have multiple bits, and with the change of optical power, the received data will have jitter and phase offset, which makes the oversampled data have errors.
[0004] Therefore, the current oversampling method in the PON module bit error test has a technical problem of being unable to cope with jitter and phase offset, making the oversampling result relatively inaccurate. Summary of the invention
[0005] In view of this, an object of the present invention is to provide an oversampling method, device, electronic device and computer-readable storage medium, which solve the technical problem of inaccurate oversampling in the prior art.
[0006] In order to solve the above technical problems, the present invention provides an oversampling method, comprising:
[0007] Obtaining a real-time parallel oversampled data group based on the oversampled data group collected in the current clock cycle;
[0008] According to the pre-obtained target phase offset parameter corresponding to the current clock cycle, performing sliding frame selection on the real-time parallel over-sampling data group corresponding to the current clock cycle to obtain a real-time frame selection data group;
[0009] Extracting data from the real-time frame-selected data group to obtain a valid sampling data group corresponding to the current clock cycle;
[0010] The target phase offset parameter is obtained based on the comparison between a first target phase corresponding to a first filtering period and a second target phase corresponding to a second filtering period. The first filtering period and the second filtering period are continuous and non-overlapping, and any filtering period includes a preset number of clock periods.
[0011] Optionally, the first filtering period is a filtering period before a current filtering period, and the second filtering period is a filtering period before the first filtering period; before obtaining the target phase offset parameter corresponding to the current clock period in advance, the method further includes obtaining the target phase offset parameter based on a comparison between the first target phase and the second target phase, including:
[0012] Performing signal edge change detection on any data block group included in any clock cycle within the first filtering cycle to obtain a corresponding edge change detection result, and obtaining a clock cycle phase corresponding to the corresponding clock cycle based on all the edge change detection results within any of the clock cycles;
[0013] Taking the clock cycle phase with the largest number in the first filtering period as the first target phase;
[0014] The first target phase is compared with the predetermined second target phase to determine the target phase offset parameter.
[0015] Optionally, performing signal edge change detection on any data block group included in any clock cycle within the first filtering cycle to obtain a corresponding edge change detection result, and obtaining a clock cycle phase corresponding to the corresponding clock cycle based on all the edge change detection results within any of the clock cycles, includes:
[0016] Determining whether there is a rising edge phase in all edge change detection results of any of the clock cycles;
[0017] If so, the rising edge phase is used as the corresponding clock cycle phase.
[0018] Optionally, performing signal edge change detection on any data block group included in any clock cycle within the first filtering cycle to obtain a corresponding edge change detection result, and obtaining a clock cycle phase corresponding to the corresponding clock cycle based on all the edge change detection results within any of the clock cycles, further comprising:
[0019] If not, determining whether there is a falling edge phase in all edge change detection results of any of the clock cycles;
[0020] If so, taking the phase of the previous clock cycle as the clock cycle phase;
[0021] If not, the preset phase is used as the clock cycle phase.
[0022] Optionally, taking the rising edge phase as the corresponding clock cycle phase includes:
[0023] The first non-zero rising edge phase of all data block groups arranged from high to low bits is used as the clock cycle phase of the corresponding clock cycle.
[0024] Optionally, the target phase offset parameter includes a sliding offset direction and a sliding offset amount;
[0025] The step of comparing the first target phase with the predetermined second target phase to determine the target phase offset parameter includes:
[0026] acquiring the second target phase;
[0027] Comparing the magnitudes of the first target phase and the second target phase, and determining the sliding offset direction according to the comparison result;
[0028] An absolute value of a difference between the first target phase and the second target phase is determined as the sliding offset.
[0029] Optionally, comparing the first target phase with the second target phase, and determining the sliding offset direction according to the comparison result includes:
[0030] When the first target phase is equal to the second target phase, the first target phase is not offset compared to the second target phase;
[0031] When the first target phase is greater than the second target phase, the sliding offset direction is determined to be rightward; wherein the first target phase is not a phase maximum value and the second target phase is not a phase minimum value; or, the first target phase is not the phase minimum value and the second target phase is not the phase maximum value;
[0032] When the first target phase is less than the second target phase, the sliding offset direction is determined to be leftward; wherein the first target phase is not a phase maximum value and the second target phase is not a phase minimum value; or, the first target phase is not the phase minimum value and the second target phase is not the phase maximum value;
[0033] When the first target phase is the maximum phase value and the second target phase is the minimum phase value, determining that the sliding offset direction is leftward;
[0034] When the first target phase is the minimum phase value and the second target phase is the maximum phase value, it is determined that the sliding offset direction is rightward movement.
[0035] Optionally, before performing the pre-acquired target phase offset parameter corresponding to the current clock cycle, the method further includes acquiring a sliding frame selection start signal corresponding to the first filtering cycle, and performing sliding frame selection on the real-time parallel oversampled data group corresponding to the current clock cycle to obtain a real-time frame selection data group includes:
[0036] Determine whether the sliding box selection start signal is a target signal value;
[0037] If yes, get the initial frame selection position;
[0038] Based on the initial frame selection position, sliding according to the target phase offset parameter to obtain a target frame selection position;
[0039] The real-time frame selection data group is obtained by frame selection in the parallel oversampled data according to the target frame selection position.
[0040] Optionally, before obtaining the real-time parallel oversampled data group based on the oversampled data group collected in the current clock cycle, the method further includes:
[0041] When a preset number of clock cycles form the first filtering period, the sliding box selection start signal corresponding to the first filtering period is updated to the target signal value.
[0042] The present invention also provides an oversampling device, comprising:
[0043] A data group determination module, used to obtain a real-time parallel oversampled data group based on the oversampled data group collected in the current clock cycle;
[0044] A real-time frame-selected data group determination module, configured to perform sliding frame selection on the real-time parallel oversampled data group corresponding to the current clock cycle according to a pre-obtained target phase offset parameter corresponding to the current clock cycle to obtain a real-time frame-selected data group;
[0045] A valid sampling data group determination module, used for extracting data from the real-time frame-selected data group to obtain a valid sampling data group corresponding to the current clock cycle;
[0046] The target phase offset parameter is obtained based on the comparison between a first target phase corresponding to a first filtering period and a second target phase corresponding to a second filtering period. The first filtering period and the second filtering period are continuous and non-overlapping, and any filtering period includes a preset number of clock periods.
[0047] The present invention also provides an electronic device, comprising:
[0048] Memory for storing computer programs;
[0049] A processor is used to implement the steps of the above-mentioned oversampling method when executing the computer program.
[0050] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned oversampling method are implemented.
[0051] It can be seen that the present invention obtains a real-time parallel oversampling data group by using an oversampling data group collected based on the current clock cycle; according to the pre-obtained target phase offset parameter corresponding to the current clock cycle, the real-time parallel oversampling data group corresponding to the current clock cycle is subjected to sliding frame selection to obtain a real-time framed data group; data is extracted from the real-time framed data group to obtain a valid sampling data group corresponding to the current clock cycle; wherein the target phase offset parameter is obtained based on the comparison between the first target phase corresponding to the first filtering cycle and the second target phase corresponding to the second filtering cycle, the first filtering cycle and the second filtering cycle are continuous and do not overlap, and any filtering cycle includes a preset number of clock cycles. The beneficial effects of the present invention are as follows: the present invention obtains a target phase offset parameter by comparing the first target phase corresponding to the first filtering cycle with the second target phase corresponding to the second filtering cycle, thereby tracking the phase offset in real time, improving the response speed of data phase tracking, and improving the accuracy of sampling data extraction.
[0052] In addition, the present invention also provides an oversampling device, an electronic device and a computer-readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0054] Figure 1 A flow chart of an oversampling method provided by an embodiment of the present invention;
[0055] Figure 2 An example flow chart of an oversampling method provided by an embodiment of the present invention;
[0056] Figure 3 An example diagram of a structural framework of an oversampling method provided by an embodiment of the present invention;
[0057] Figure 4 A schematic diagram of jitter and phase shift provided by an embodiment of the present invention;
[0058] Figure 5 A schematic diagram of the structure of an oversampling device provided by an embodiment of the present invention;
[0059] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0061] Please refer to Figure 1 , Figure 1 A flowchart of an oversampling method provided by an embodiment of the present invention. The method may include:
[0062] S101, obtaining a real-time parallel over-sampled data group based on the over-sampled data group collected in the current clock cycle.
[0063] The execution subject of this embodiment is an electronic device, which may be a test device, such as a bit error analyzer, especially a burst bit error analyzer. In this embodiment, obtaining a real-time parallel oversampled data group based on the oversampled data group collected in the current clock cycle may refer to combining the sampled data based on the current clock cycle and the sampled data of a preset number of clock cycles closest to the current clock cycle into a real-time parallel oversampled data group. This embodiment does not limit the specific data bit number of the real-time parallel oversampled data group, for example, it may be 64 bits, 96 bits, etc.
[0064] It should be further explained that, in order to improve the accuracy of the sliding frame selection timing, before obtaining the real-time parallel oversampled data group based on the oversampled data group collected in the current clock cycle, the above method may also include: when a preset number of clock cycles form a first filtering cycle, updating the sliding frame selection start signal corresponding to the first filtering cycle to a target signal value. This embodiment updates the sliding frame selection start signal once every preset number of clock cycles, so that the sliding frame selection and data extraction can be performed in time in each filtering cycle.
[0065] S102, according to the pre-obtained target phase offset parameter corresponding to the current clock cycle, sliding frame selection is performed on the real-time parallel over-sampling data group corresponding to the current clock cycle to obtain a real-time frame selection data group.
[0066] The target phase offset parameter in this embodiment may include a sliding offset direction and a sliding offset amount. This embodiment does not limit the method of sliding frame selection. For example, this embodiment may recombine the received two-beat parallel 32-bit data into 64-bit data, perform sliding frame selection from the 64-bit, and obtain 32-bit parallel data for subsequent data extraction. Alternatively, this embodiment may also recombine the received three-beat parallel 32-bit data into 96-bit data, perform sliding frame selection from the 96-bit, and obtain 32-bit parallel data.
[0067] It should be further explained that the first filtering cycle is the previous filtering cycle of the current filtering cycle, and the second filtering cycle is the previous filtering cycle of the first filtering cycle; before the target phase offset parameter corresponding to the current clock cycle is obtained in advance, the method also includes obtaining the target phase offset parameter based on the comparison between the first target phase and the second target phase, which may include: performing signal edge change detection on any data block group included in any clock cycle in the first filtering cycle to obtain the corresponding edge change detection result, and obtaining the clock cycle phase corresponding to the corresponding clock cycle based on all edge change detection results in any clock cycle; taking the clock cycle phase with the largest number in the first filtering cycle as the first target phase; comparing the first target phase with the predetermined second target phase to determine the target phase offset parameter. Among them, the second target phase can be a set value, or it can be an effective target phase value corresponding to any filtering cycle before the first filtering cycle. This embodiment realizes phase filtering processing by taking the clock cycle phase with the largest number in the first filtering cycle as the first target phase of the first filtering cycle.
[0068] It should be noted that any oversampled data is divided into several data block groups in order according to the sampling multiple, and each data block group includes the same bit data of the sampling multiple, such as, when the sampling multiple is 4, the data block group can be b1111, b0111, b0011, b0001 or b0000. The edge change detection result in this embodiment is a phase value. For example, the phase value of the edge change detection result in this embodiment can be 1, such as data block b0111 (the rising edge position is 1); or the phase value of the edge change detection result in this embodiment can also be 2, such as data block b0011 (the rising edge position is 2); or the phase value of the edge change detection result in this embodiment can also be 3, such as data block group b0001 (the rising edge position is 3).
[0069] It is understandable that due to the jitter in the received data, the oversampled data received during oversampling will occasionally have phase jitter and inconsistent bit width. Phase jitter, for example, two adjacent data blocks b0011, b1100. When phase jitter occurs, the two data blocks may become b0111, b1000 or b0001, b1110. Inconsistent bit width, for example, two adjacent data blocks b0011, and b1100, when the bit width is inconsistent, the two data blocks may become b0001, b1100 or b0111, b1000. In view of the above situation, the wrong phase caused by jitter must be filtered out. The clock cycle phase corresponding to each clock cycle in the first filtering cycle is counted, and the clock cycle phase with the largest number of clock cycle phases is assigned to the current phase register. This embodiment does not limit the specific number of the preset number of clock cycles in the first filtering cycle. For example, the preset number in this embodiment can be 1000; or the preset number in this embodiment can also be 1500. This embodiment does not limit the method for determining the phase that appears the most times. For example, this embodiment can perform statistical processing to determine the phase that appears the most times; or this embodiment can also use a register to store different phases obtained each time (each register corresponds to a different phase), so as to determine the clock cycle phase that appears the most times in the first filtering cycle by counting the number of times of the register, that is, by counting the number of phases of each clock cycle corresponding to the clock cycle of the first filtering cycle, and storing it in Phase_count_reg (Phase count) register, i range is 0~3, Phase_count_reg <0> Stores the number of phases that are 0; Phase_count_reg <1> Stores the number of phases that are 1; Phase_count_reg <2> Stores the number of phases 2; Phase_count_reg <3> The number of stored phases is 3; by comparing the values of these registers, the phase with the largest value is used as the clock cycle phase with the largest number. This embodiment provides a specific process for determining the first target phase, thereby improving the accuracy of determining the target phase offset parameter based on the first target phase and the second target phase.
[0070] It should be further explained that, in order to improve the accuracy of the clock cycle phase determination, the above-mentioned signal edge change detection is performed on any data block group included in any clock cycle within the first filtering cycle to obtain a corresponding edge change detection result, and the clock cycle phase corresponding to the corresponding clock cycle is obtained based on all edge change detection results in any clock cycle, which may include:
[0071] S1, determine whether there is a rising edge phase in all edge change detection results of any clock cycle;
[0072] S2, if yes, take the rising edge phase as the corresponding clock cycle phase.
[0073] S3, if not, determine whether there is a falling edge phase in all edge change detection results of any clock cycle;
[0074] S4, if yes, use the phase of the previous clock cycle as the clock cycle phase;
[0075] S5, if not, taking the preset phase as the clock cycle phase.
[0076] This embodiment does not limit the specific method of using the rising edge phase as the corresponding clock cycle phase. For example, in this embodiment, the first non-0 rising edge phase that appears can be used as the corresponding clock cycle phase; or this embodiment can also use the second non-0 rising edge phase that appears as the corresponding clock cycle phase. If there is no rising edge phase, determine whether there is a falling edge phase. If there is a falling edge phase, the phase of the previous clock cycle is used as the clock cycle phase. If there is no falling edge phase, the preset phase is used as the clock cycle phase. This embodiment does not limit the specific preset phase. For example, the preset phase in this embodiment can be 0. The purpose is to eliminate the phase misjudgment that may be caused when the phase is 0. This embodiment eliminates the phase misjudgment that may be caused when the phase is 0 by determining the clock cycle phases corresponding to multiple data block groups under different circumstances, thereby further improving the accuracy of phase determination.
[0077] It should be further explained that the above target phase offset parameter is obtained based on the comparison between the first target phase corresponding to the first filtering period and the second target phase corresponding to the second filtering period.
[0078] In a preferred embodiment, the first filter period and the second filter period are continuous and non-overlapping, and any filter period includes a preset number of clock periods. Specifically, the first target phase is the phase of the clock period with the largest number determined by the first filter period. The second target phase is the phase of the clock period with the largest number determined by the second filter period, and is also the effective target phase. The data of the second filter period, the first filter period, and the current filter period are collected and obtained in sequence, and the number of clock periods in the current filter period has not yet reached the preset number.
[0079] It should be further explained that, in order to improve the accuracy of determining the target phase offset parameters, the above-mentioned target phase offset parameters include a sliding offset direction and a sliding offset amount; the above-mentioned determination of the target phase offset parameters by comparing the first target phase with the predetermined second target phase may include: obtaining the second target phase; comparing the magnitudes of the first target phase and the second target phase, and determining the sliding offset direction according to the comparison result; and determining the absolute value of the difference between the first target phase and the second target phase as the sliding offset amount.
[0080] The target phase offset parameter in this embodiment may include a sliding offset direction and a sliding offset amount, and a method for determining the sliding offset direction and the sliding offset amount is provided, so the accuracy of determining the target phase offset parameter can be improved.
[0081] It should be further explained that the comparison of the first target phase and the second target phase and determining the sliding offset direction according to the comparison result may include:
[0082] S1021, when the first target phase is equal to the second target phase, the first target phase is not offset compared to the second target phase.
[0083] S1022, when the first target phase is greater than the second target phase, determine that the sliding offset direction is rightward; wherein the first target phase is not a phase maximum value and the second target phase is not a phase minimum value; or, the first target phase is not a phase minimum value and the second target phase is not a phase maximum value.
[0084] In this embodiment, when the comparison result is that the first target phase is greater than the second target phase, the phase shift direction is determined to be right shift. This embodiment does not limit the specific maximum phase value, for example, the maximum phase value in this embodiment may be 3, and this embodiment does not limit the minimum phase value, for example, the minimum phase value in this embodiment may be 0.
[0085] S1023, when the first target phase is less than the second target phase, determine that the sliding offset direction is left shift; wherein the first target phase is not the maximum phase value and the second target phase is not the minimum phase value; or, the first target phase is not the minimum phase value and the second target phase is not the maximum phase value.
[0086] S1024: When the first target phase is a maximum phase value and the second target phase is a minimum phase value, determine that the sliding offset direction is leftward.
[0087] S1025: When the first target phase is a minimum phase value and the second target phase is a maximum phase value, determine that the sliding offset direction is rightward movement.
[0088] Select one of the above steps S1021-S1025 to execute.
[0089] This embodiment provides the sliding offset directions corresponding to the first target phase and the second target phase in various situations, thereby improving the accuracy of determining the sliding offset directions.
[0090] It should be further explained that in order to improve the accuracy of sliding frame selection, before the target phase offset parameter corresponding to the current clock cycle is obtained in advance, the method also includes obtaining a sliding frame selection start signal corresponding to the first filtering cycle, and sliding frame selection is performed on the real-time parallel oversampled data group corresponding to the current clock cycle to obtain a real-time frame selection data group, which may include: determining whether the sliding frame selection start signal is the target signal value; if so, obtaining the initial frame selection position; based on the initial frame selection position, sliding according to the target phase offset parameter to obtain the target frame selection position; according to the target frame selection position, frame selection in the parallel oversampled data to obtain the real-time frame selection data group. This embodiment does not limit the specific sliding frame selection start signal. For example, the sliding frame selection start signal in this embodiment may be 1. This embodiment does not limit the specific initial frame selection position, for example, the initial frame selection position in this embodiment may be 17; or the initial frame selection position in this embodiment may be 32. It is understandable that when 32 bits are extracted from 64 bits, the initial frame selection position can be 17. When 32 data are extracted from 96 bits in 3 clock cycles, the sliding position is even larger. The initial frame selection position can be 32, that is, it can generally be the middle position of the total sliding position (the position around the median of the total number of bits minus the number of extracted bits), or other positions. If the frame selection is close to the middle position, the accuracy is relatively higher.
[0091] S103, extracting data from the real-time frame-selected data group to obtain a valid sampling data group corresponding to the current clock cycle.
[0092] This embodiment does not limit the specific method of data extraction. For example, this embodiment can extract the second bit of each real-time frame selection data group as the valid bit of the data group, and a total of 8-bit wide sampled data data_8bit[7:0] can be obtained. At this time, data_8bit[7:0] is the valid data obtained by tracking the oversampling technology of phase offset; or, this embodiment can also extract the third bit of each real-time frame selection data group as the valid bit of the data group. It can be understood that the middle bit can generally be selected as the valid bit of the data group. The first filter cycle and the second filter cycle in this embodiment are continuous and non-overlapping filter cycles. For example, the first 1000 clock cycles are used as a filter cycle, and the next filter cycle is 1000 clock cycles corresponding to the 2000th clock cycle.
[0093] The oversampling method provided by the embodiment of the present invention may include: S101, obtaining a real-time parallel oversampling data group based on the oversampling data group collected in the current clock cycle; S102, sliding and selecting the real-time parallel oversampling data group corresponding to the current clock cycle according to the pre-obtained target phase offset parameter corresponding to the current clock cycle to obtain a real-time framed data group; S103, extracting data from the real-time framed data group to obtain a valid sampling data group corresponding to the current clock cycle; wherein the target phase offset parameter is obtained based on the comparison of the first target phase corresponding to the first filtering cycle and the second target phase corresponding to the second filtering cycle, the first filtering cycle and the second filtering cycle are continuous and do not overlap, and any filtering cycle includes a preset number of clock cycles. The present invention obtains a target phase offset parameter based on the comparison of the first target phase corresponding to the first filtering cycle and the second target phase corresponding to the second filtering cycle, tracks the phase offset in real time, improves the response speed of data phase tracking, and improves the accuracy of oversampling data extraction. Furthermore, the embodiment provides a specific process for determining the first target phase, thereby improving the accuracy of determining the target phase offset parameter according to the first target phase and the second target phase; further, the embodiment eliminates the phase misjudgment that may be caused when the phase is 0 by determining the clock cycle phase corresponding to multiple data block groups in different situations, thereby further improving the accuracy of phase determination; further, the target phase offset parameter in the embodiment may include a sliding offset direction and a sliding offset amount, and provides a method for determining the sliding offset direction and the sliding offset amount, thereby improving the accuracy of determining the target phase offset parameter; further, the embodiment provides the sliding offset directions corresponding to the first target phase and the second target phase in multiple situations, thereby improving the accuracy of determining the sliding offset direction.
[0094] In order to make the present invention easier to understand, please refer to Figure 2 , Figure 2 An example flow chart of an oversampling method provided by an embodiment of the present invention may specifically include:
[0095] S201, obtaining parallel over-sampled data corresponding to any clock cycle in a first filtering cycle, and dividing the parallel over-sampled data into a plurality of data block groups.
[0096] S202, performing signal edge change detection on any data block group included in any clock cycle within the first filtering cycle to obtain a corresponding edge change detection result, and obtaining a clock cycle phase corresponding to the corresponding clock cycle based on all edge change detection results within any clock cycle.
[0097] S203: Taking the clock cycle phase with the largest number in the first filtering period as the first target phase.
[0098] S204, comparing the first target phase with a predetermined second target phase to determine the sliding offset direction; the first target phase is the clock cycle phase with the largest number determined by the first filtering period, and the second target phase is the clock cycle phase with the largest number determined by the second filtering period, which is also the effective target phase. The first filtering period and the second filtering period are continuous and do not overlap.
[0099] S205: Determine the absolute value of the difference between the first target phase and the second target phase as the sliding offset.
[0100] S206, obtaining an initial frame selection position, and based on the initial frame selection position, obtaining a target frame selection position according to a sliding offset and a sliding offset direction.
[0101] S207, performing frame selection in the parallel oversampled data corresponding to the current clock cycle according to the target frame selection position to obtain a real-time frame selection data group, and grouping the real-time frame selection data group to obtain a plurality of grouped data.
[0102] S208, extracting preset bits of each grouped data as valid bits of the grouped data, and using all valid bits as valid sampling data groups of the current clock cycle.
[0103] The embodiment of the present invention can effectively filter out the parallel data bit jitter caused by phase jitter, and can continuously track the data phase offset, so as to align the phases of the parallel data to be extracted, thereby ensuring the correctness of data extraction.
[0104] In order to make the present invention easier to understand, please refer to Figure 3 , Figure 3An example diagram of the structural framework of an oversampling method provided by an embodiment of the present invention may specifically include: a bit phase detector, a phase filtering module, a phase offset calculation module, a sliding frame selection module, and a data extraction module. The embodiment of the present invention proposes a calculation method for an oversampling technology for tracking phase offset. The oversampling technology is to sample the input data at a sampling rate N times the input rate, and sample one bit of the input data N times, so that parallel data of 1 group of each N bits will be obtained. The received data will pass through the bit phase detector to calculate the clock cycle phase of the current clock cycle. The phase filtering module performs statistical calculations on the calculated clock cycle phase for filtering, and continuously counts M times to take the phase position with the largest number as the target phase of the current filtering cycle, and updates the current phase position every M times. The phase offset calculation module is used to determine the sliding offset and the sliding offset direction. Taking the K+1th statistics as an example, the Kth phase result is used as feedback, and the Kth and K+1th phase positions are compared to determine the K+1th sliding offset and sliding offset direction. The sliding frame selection module is used to perform sliding frame selection on the current oversampled data according to the sliding offset and sliding offset direction. The data selected by this algorithm can be directly used for data extraction. Four bits are grouped together, and the second or third bit is used as the tap position, which can effectively resist jitter. It is very important for receiving and recovering serial data with jitter and phase shift. Especially in the GPON module test, when the phase continues to shift due to changes in optical power, this technical solution provides a very effective solution. Please refer to the following steps for details:
[0105] Step 1: After passing through a receiver with a rate N times the input rate, parallel oversampled data with N identical bits forming one group is obtained.
[0106] For easier understanding, please refer to Figure 4 , Figure 4 A schematic diagram of jitter and phase shift provided in an embodiment of the present invention is an optical communication OLT (optical line terminal) link at a rate of 2.48832Gbps, and the receiving rate is 9.95328Gbps to oversample the data. When the input optical power of the OLT module changes, the electrical port data converted by the OLT will have jitter and phase shift of the flip edge. The parallel data of the receiver is manifested as bit jitter and bit shift in the parallel data bit at the boundary position of 0 and 1.
[0107] After this embodiment passes through a receiver with a rate N times that of the input, parallel data with N identical bits in each group will be obtained. Taking 4 times oversampling as an example, that is, using a 9.95328Gbps receiver to receive 2.48832Gbps input data, 4 identical bits of data are sampled for each input bit sampled. Taking the actual 8-bit sampled data collected as an example, oversampling obtains 32-bit parallel data. Due to serial data delay and the working principle of the receiver, the repeated 4 bits are not phase-aligned in 32 bits. And the overall position offset will also occur.
[0108] Step 2: Process the parallel oversampled data using a bit phase detector to obtain the phase of the current clock cycle.
[0109] The current clock cycle phase in this embodiment corresponds to the clock cycle phase described above. The bit phase detector in this embodiment obtains the phase of the current clock cycle in the following manner: the input 32-bit parallel data is recorded as in_data<31:0>, and is divided into 8 groups of data blocks (corresponding to the data block groups described above) from high to low, with each 4 bits as a data block, recorded as data_4bitdiv <3:0>, i = 0~7. data_4bitdiv <0> =in_data<31:28>, is the 28th to 31st bits of the received data; data_4bitdiv <1> =in_data<27:24>, is the 24th to 27th bits of the received data; ...data_4bitdiv <7> = in_data<3:0>, which is the 0th to 3rd bits of the received data; perform rising edge phase detection on each data block and determine whether a falling edge bit_falledge is generated; b0111, its rising edge phase is 1, bit_falledge=0; b0011, its rising edge phase is 2, bit_falledge=0; b0001, its rising edge phase is 3, bit_falledge=0; otherwise, its rising edge phase is 0, bit_falledge=1; perform rising edge phase detection on the 8 groups of data blocks from high to low, and the first non-0 rising edge phase is used as the clock cycle phase of the 8 groups of data blocks, recorded as bit_current_position. If there is no rising edge, determine whether bit_falledge is 0. If it is 0, the phase of the 8 groups of data blocks is 0; if bit_falledge is 1, the phase of the 8 groups of data blocks remains consistent with the bit_current_position of the previous clock cycle. The purpose of this is to eliminate the phase misjudgment that may be caused when the phase is 0. Through the above method, the phase bit_current_position of the current clock cycle can be obtained.
[0110] Step 3: Utilize the phase filtering module to filter the phase of the current clock cycle to obtain the first target phase of the current filtering cycle.
[0111] The first target phase of the current filtering cycle in this embodiment corresponds to the filtered phase position in the diagram. The process of the phase filtering module obtaining the first target phase of the current filtering cycle in this embodiment includes: due to the jitter in the received data, the parallel data received during oversampling will occasionally have phase jitter and bit width inconsistency. Phase jitter, for example, two adjacent data blocks b0011, b1100. When phase jitter occurs, the two data blocks may become b0111, b1000 or b0001, b1110. Inconsistent bit width, for example, two adjacent data blocks b0011, and b1100. When bit width inconsistency occurs, the two data blocks may become b0001, b1100 or b0111, b1000. In view of the above situation, the erroneous phase caused by jitter must be filtered out. Count the number of each phase in 1000 clock cycles and store it in Phase_count_reg (Phase count) register, i range is 0~3, Phase_count_reg <0> The number of stored phases is 0; Phase_count_reg <1> Stores the number of phases that are 1; Phase_count_reg <2> Stores the number of phases 2; Phase_count_reg <3> Store the number of phases of 3; by comparing the data of these registers, assign the phase of the register with the largest value to the current phase register bit_position_reg after filtering, update bit_position_reg every 1000 clock cycles, and set the sliding box selection start signal bit_draw_check_flag in the sliding box selection module to 1. Therefore, the phase filter module uses 1000 clock cycles as a filtering cycle, outputs the current phase register bit_position_reg, and the sliding box selection start signal bit_draw_check_flag in the sliding box selection module.
[0112] Step 4: Determine the sliding offset amount and sliding offset direction by using the phase offset calculation module according to the first target phase of the current filtering cycle and the second target phase that has been effective in the previous filtering cycle.
[0113] In this embodiment, the process of the phase offset calculation module determining the sliding offset and the sliding offset direction is as follows: the phase offset calculation module and the sliding frame selection module below are calculated once per filtering cycle, that is, the sliding frame selection module will give the effective phase position (second target phase) bit_position_valid of the previous filtering cycle as feedback to the phase offset calculation module. Two data will be obtained by calculating the current phase (first target phase) bit_position_reg corresponding to the current phase register. One is the offset direction register bit_position_dir, which is used to determine the bit offset direction (sliding offset direction) of the sliding frame selection module; the other is the bit offset bit_position_offset, which is used to determine the sliding offset of the sliding frame selection module. Perform logical judgment on the current phase register bit_position_reg and the effective phase register bit_position_valid in the sliding frame selection module, calculate the absolute value of the difference between the two, and assign it to the bit_position_offset register.Compare the current phase register bit_position_reg with the effective phase register bit_position_valid. There are the following situations: When bit_position_valid = bit_position_reg, it means that the phase in the current filtering period has not changed compared to the phase in the previous filtering period. At this time, bit_position_dir = 0 and bit_position_offset = 0; When bit_position_valid < bit_position_reg, it means that the phase in the current filtering period has shifted to the right compared to the phase in the previous filtering period. At this time, bit_position_dir = 2 and bit_position_offset = bit_position_reg - bit_position_valid; When bit_position_valid > bit_position_reg, it means that the phase in the current filtering period has shifted to the left compared to the phase in the previous filtering period. At this time, bit_position_dir = 1 and bit_position_offset = bit_position_valid - bit_position_reg; When bit_position_valid = 0 and bit_position_reg = 3, it means that the phase in the current filtering period has shifted to the left compared to the phase in the previous filtering period. At this time, bit_position_dir = 1 and bit_position_offset = 1; When bit_position_valid = 3 and bit_position_reg = 0, it means that the phase in the current filtering period has shifted to the right compared to the phase in the previous filtering period. At this time, bit_position_dir = 2 and bit_position_offset = 1; Through the above logical judgment, the sliding offset direction bit_position_dir and the sliding offset amount bit_position_offset can be obtained.
[0114] Step 5: Use the sliding selection module to determine the real-time selected data group according to the sliding offset amount and the sliding offset direction using the sliding selection module.
[0115] In this embodiment, the process of determining the sliding frame selection phase using the sliding frame selection module includes: recombining the received two-shot parallel 32-bit data into 64-bit data recorded as s_data_64bit. The function of this module is to select 32-bit parallel data from 64 bits according to the frame selection position box (bit_draw_position) in each clock cycle and record it as s_data_get32bit for data extraction in the data extraction module. Therefore, the position of the frame selection is very important for the correctness of data extraction. Frame selection method: s_data_32bit=s_data_64bit<64-bit_draw_position:32-bit_draw_position>; extract 32-bit data from the 64-bit data composed of two-shot parallel 32-bit data according to bit_draw_position. That is, when bit_draw_position=16, s_data_get32bit=s_data_64bit<48:17>; when bit_draw_position=15, s_data_get32bit=s_data_64bit<49:18>; when bit_draw_position=1, s_data_get32bit=s_data_64bit<63:32>; bit_draw_position has an initial value of 17, s_data_get32bit=s_data_64bit<47:16>, and the initial value of bit_position_valid is 0; when the bit_draw_check_flag start signal of the filtering module arrives, the value of bit_draw_position is calculated according to the direction register bit_position_dir and the offset bit_position_offset output by the offset calculation module. The calculation method is as follows: when bit_position_dir=1, bit_draw_position itself is subtracted from bit_position_offset, and the frame selection position is shifted left by bit_position_offset bits; when bit_position_dir=2, bit_draw_position itself is added with bit_position_offset, and the frame selection position is shifted right by bit_position_offset bits; when bit_position_dir=0, bit_draw_position remains unchanged, and the frame selection position remains unchanged; while the above frame selection position takes effect, the value of bit_position_reg is assigned to bit_position_valid to participate in the feedback of the next filtering cycle.The s_data_get32bit obtained by the above selection method is phase-aligned 32-bit data, and as the phase of the received signal moves, bit_position_dir and bit_position_offset change accordingly. The position of the selection bit_draw_position will also track the movement of the phase to ensure that the selected data is composed of 8 groups of 4-bit repeated data blocks and are phase-aligned.
[0116] Step 6: Utilize the data extraction module to extract the preset bits of each grouped data as the valid bits of the grouped data, and use all the valid bits as the valid sampling data group of the current clock cycle.
[0117] The process of obtaining valid data by using the data extraction module in this embodiment includes: dividing the s_data_get32bit data obtained by the sliding frame selection module into 8 groups of data blocks, recorded as data_4bit_in[j][3:0], the value range of j is 0~7, where data_4bit_in[0][3:0]=s_data_get32bit[31:28]; data_4bit_in[1][3:0]=s_data_get32bit[27:24]; ... data_4bit_in[7][3:0]=s_data_get32bit[3:0]; extracting the second bit of each data group as the valid bit of the data group, a total of 8-bit wide sampled data data_8bit[7:0] can be obtained. At this time, data_8bit[7:0] is the valid data obtained by the oversampling technology of tracking phase offset.
[0118] The embodiment of the present invention proposes an oversampling technology for tracking phase offset, and proposes a method for phase identification and phase filtering, which can effectively filter out the phase error caused by phase jitter. It is proposed that when the phase of the received signal is offset, the data phase offset direction and offset are calculated through feedback control to achieve phase tracking of the data. A method for extracting data by sliding frame selection is designed. According to the data phase offset direction and offset, the frame selection position is periodically adjusted to obtain phase-aligned parallel data for data extraction. The use of this method can ensure that data phase jitter and data phase offset are effectively dealt with during the oversampling of low-speed data. Parallel data bit jitter caused by phase jitter can be effectively filtered out, and data phase offset can be continuously tracked to align the phase of the parallel data to be extracted, thereby ensuring the correctness of data extraction. This method can effectively solve the problem of phase offset of the recovered data when the optical power changes during the test of the GPON optical module, and can continuously follow the phase change to restore the correct data.
[0119] The oversampling device provided by an embodiment of the present invention is introduced below. The oversampling device described below and the oversampling method described above can be referred to each other.
[0120] Please refer to Figure 5 , Figure 5 A schematic diagram of the structure of an oversampling device provided in an embodiment of the present invention may include:
[0121] The data group determination module 100 is used to obtain a real-time parallel oversampled data group based on the oversampled data group collected in the current clock cycle;
[0122] A real-time frame-selected data group determination module 200 is used to perform sliding frame selection on the real-time parallel oversampled data group corresponding to the current clock cycle according to a pre-obtained target phase offset parameter corresponding to the current clock cycle to obtain a real-time frame-selected data group;
[0123] The valid sampling data group determination module 300 is used to extract data from the real-time frame selected data group to obtain a valid sampling data group corresponding to the current clock cycle;
[0124] The target phase offset parameter is obtained based on the comparison between a first target phase corresponding to a first filtering period and a second target phase corresponding to a second filtering period. The first filtering period and the second filtering period are continuous and non-overlapping, and any filtering period includes a preset number of clock periods.
[0125] Further, based on the above embodiment, the above first filtering period is a filtering period before the current filtering period, and the second filtering period is a filtering period before the first filtering period; the above oversampling device may further include: a target phase offset parameter determination module, used to obtain the target phase offset parameter based on the comparison between the first target phase and the second target phase, and the target phase offset parameter determination module may include:
[0126] a clock cycle phase determination unit, configured to perform signal edge change detection on any data block group included in any clock cycle within the first filtering cycle to obtain a corresponding edge change detection result, and to obtain a clock cycle phase corresponding to the corresponding clock cycle based on all the edge change detection results within any of the clock cycles;
[0127] A first target phase determining unit, configured to take the clock cycle phase with the largest number in the first filtering period as the first target phase;
[0128] A target phase offset parameter determination unit is used to compare the first target phase with the predetermined second target phase to determine the target phase offset parameter.
[0129] Further, based on the above embodiment, the clock cycle phase determination unit may include:
[0130] A rising edge phase judgment subunit, used to judge whether there is a rising edge phase in all edge change detection results of any of the clock cycles;
[0131] The first clock cycle phase determining subunit is configured to use the rising edge phase as the corresponding clock cycle phase.
[0132] Further, based on the above embodiment, the clock cycle phase determination unit may include:
[0133] a falling edge phase determination subunit, for determining whether there is a falling edge phase in all edge change detection results of any of the clock cycles, if not;
[0134] A second clock cycle determining subunit, configured to, if yes, use the phase of the previous clock cycle as the clock cycle phase;
[0135] The third clock cycle determining subunit is used for, if not, using a preset phase as the clock cycle phase.
[0136] Further, based on the above embodiment, the above rising edge phase judgment subunit may include:
[0137] Based on the non-zero rising edge phase judgment subunit, it is used to use the first non-zero rising edge phase of all data block groups arranged from high to low as the clock cycle phase of the corresponding clock cycle.
[0138] Further, based on any of the above embodiments, the target phase offset parameter includes a sliding offset direction and a sliding offset amount; the target phase offset parameter determination unit may include:
[0139] A second target phase acquisition subunit, configured to acquire the second target phase;
[0140] a sliding offset direction determining subunit, configured to compare the magnitudes of the first target phase and the second target phase, and determine the sliding offset direction according to a comparison result;
[0141] The sliding offset determination subunit is configured to determine an absolute value of a difference between the first target phase and the second target phase as the sliding offset.
[0142] Further, based on the above embodiment, the above sliding offset direction determining subunit may include:
[0143] A first offset direction determining subunit, configured to ensure that when the first target phase is equal to the second target phase, the first target phase is not offset compared to the second target phase;
[0144] A second offset direction determination subunit is configured to determine that the sliding offset direction is a rightward shift when the first target phase is greater than the second target phase; wherein the first target phase is not a phase maximum value and the second target phase is not a phase minimum value; or, the first target phase is not the phase minimum value and the second target phase is not the phase maximum value;
[0145] A third offset direction determination subunit is configured to determine that the sliding offset direction is a left shift when the first target phase is less than the second target phase; wherein the first target phase is not a phase maximum value and the second target phase is not a phase minimum value; or, the first target phase is not the phase minimum value and the second target phase is not the phase maximum value;
[0146] a fourth offset direction determining subunit, configured to determine that the sliding offset direction is a left shift when the first target phase is the maximum phase value and the second target phase is the minimum phase value;
[0147] The fifth offset direction determining subunit is configured to determine that the sliding offset direction is rightward when the first target phase is the minimum phase value and the second target phase is the maximum phase value.
[0148] Further, based on the above embodiment, the above oversampling device may further include: a sliding frame selection start signal acquisition module, used to acquire a sliding frame selection start signal corresponding to the first filtering period, and the above real-time frame selection data group determination module 200 may include:
[0149] A target signal value determination unit, used to determine whether the sliding box selection start signal is a target signal value;
[0150] an initial frame selection position determining unit, configured to obtain an initial frame selection position if yes;
[0151] A target frame selection position determining unit, configured to obtain a target frame selection position by sliding according to the target phase offset parameter based on the initial frame selection position;
[0152] A real-time frame selection data group determination unit is used to obtain the real-time frame selection data group by frame selection in the parallel oversampled data according to the target frame selection position.
[0153] Further, based on the above embodiment, the above oversampling device may further include:
[0154] The target signal value updating module is used to update the sliding box selection start signal corresponding to the first filtering period to the target signal value when a preset number of clock periods form the first filtering period.
[0155] It should be noted that the order of the modules and units in the above-mentioned oversampling device can be changed without affecting the logic.
[0156] The oversampling device provided by the embodiment of the present invention may include: a data group determination module 100, which is used to obtain a real-time parallel oversampling data group based on the oversampling data group collected in the current clock cycle; a real-time frame selection data group determination module 200, which is used to slide the real-time parallel oversampling data group corresponding to the current clock cycle according to the pre-obtained target phase offset parameter corresponding to the current clock cycle to obtain a real-time frame selection data group; an effective sampling data group determination module 300, which is used to extract data from the real-time frame selection data group to obtain a valid sampling data group corresponding to the current clock cycle; wherein the target phase offset parameter is obtained based on the comparison of the first target phase corresponding to the first filtering cycle and the second target phase corresponding to the second filtering cycle, the first filtering cycle and the second filtering cycle are continuous and do not overlap, and any filtering cycle includes a preset number of clock cycles. The present invention obtains a target phase offset parameter based on the comparison of the first target phase corresponding to the first filtering cycle and the second target phase corresponding to the second filtering cycle, tracks the phase offset in real time, improves the response speed of data phase tracking, and improves the accuracy of oversampling data extraction. Furthermore, the embodiment provides a specific process for determining the first target phase, thereby improving the accuracy of determining the target phase offset parameter according to the first target phase and the second target phase; further, the embodiment eliminates the phase misjudgment that may be caused when the phase is 0 by determining the clock cycle phase corresponding to multiple data block groups in different situations, thereby further improving the accuracy of phase determination; further, the target phase offset parameter in the embodiment may include a sliding offset direction and a sliding offset amount, and provides a method for determining the sliding offset direction and the sliding offset amount, thereby improving the accuracy of determining the target phase offset parameter; further, the embodiment provides the sliding offset directions corresponding to the first target phase and the second target phase in multiple situations, thereby improving the accuracy of determining the sliding offset direction.
[0157] An electronic device provided by an embodiment of the present invention is introduced below, and the electronic device described below and the oversampling method described above can be referred to each other. Specifically, the electronic device is a test device for GPON optical module testing in the field of optical network testing technology, such as a general bit error analyzer, a burst bit error analyzer, etc., which is used to perform bit error rate testing, optical eye testing, receiving sensitivity testing, etc. of the GPON optical module based on the valid sampling data group collected by the above-mentioned oversampling method.
[0158] Please refer to Figure 6 , Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention may include:
[0159] A memory 10, used for storing computer programs;
[0160] The processor 20 is used to execute a computer program to implement the above-mentioned oversampling method.
[0161] The memory 10 , the processor 20 , and the communication interface 30 all communicate with each other via a communication bus 40 .
[0162] In an embodiment of the present invention, the memory 10 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In an embodiment of the present invention, the memory 10 may store programs for implementing the functions corresponding to the above-mentioned process method.
[0163] In a possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
[0164] In addition, the memory 10 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include an NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.
[0165] The processor 20 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, a microprocessor or any conventional processor, etc. The processor 20 may call a program stored in the memory 10 .
[0166] The communication interface 30 may be an interface of a communication module, and is used to connect to other devices or systems.
[0167] Of course, it should be noted that Figure 6 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present invention. In actual applications, the electronic device may include Figure 6 More or fewer components than shown, or combinations of certain components.
[0168] The computer-readable storage medium provided by the embodiment of the present invention is introduced below. The computer-readable storage medium described below and the oversampling method described above can be referred to each other.
[0169] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned oversampling method are implemented.
[0170] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0171] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0172] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0173] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0174] The above is a detailed introduction to an oversampling method, device, electronic device and computer-readable storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. An oversampling method, characterized in that: include: Obtaining a real-time parallel oversampled data group based on the oversampled data group collected in the current clock cycle; According to the pre-obtained target phase offset parameter corresponding to the current clock cycle, performing sliding frame selection on the real-time parallel over-sampling data group corresponding to the current clock cycle to obtain a real-time frame selection data group; Extracting data from the real-time frame-selected data group to obtain a valid sampling data group corresponding to the current clock cycle; The target phase offset parameter is obtained based on the comparison between a first target phase corresponding to a first filtering cycle and a second target phase corresponding to a second filtering cycle, the first filtering cycle and the second filtering cycle are continuous and do not overlap, and any filtering cycle includes a preset number of clock cycles; the first filtering cycle is a filtering cycle before the current filtering cycle, and the second filtering cycle is a filtering cycle before the first filtering cycle; Before obtaining the target phase offset parameter corresponding to the current clock cycle in advance, the method further includes obtaining the target phase offset parameter based on a comparison between the first target phase and the second target phase, including: Performing signal edge change detection on any data block group included in any clock cycle within the first filtering cycle to obtain a corresponding edge change detection result, and obtaining a clock cycle phase corresponding to the corresponding clock cycle based on all the edge change detection results within any of the clock cycles; Taking the clock cycle phase with the largest number in the first filtering period as the first target phase; The first target phase is compared with the predetermined second target phase to determine the target phase offset parameter.
2. The oversampling method according to claim 1, characterized in that: Performing signal edge change detection on any data block group included in any clock cycle within the first filtering cycle to obtain a corresponding edge change detection result, and obtaining a clock cycle phase corresponding to the corresponding clock cycle based on all the edge change detection results within any of the clock cycles, including: Determine whether there is a rising edge phase in all edge change detection results of any of the clock cycles; If so, the rising edge phase is used as the corresponding clock cycle phase.
3. The oversampling method according to claim 2, characterized in that: Performing signal edge change detection on any data block group included in any clock cycle within the first filtering cycle to obtain a corresponding edge change detection result, and obtaining a clock cycle phase corresponding to the corresponding clock cycle based on all the edge change detection results within any of the clock cycles, further comprising: If not, determining whether there is a falling edge phase in all edge change detection results of any of the clock cycles; If so, taking the phase of the previous clock cycle as the clock cycle phase; If not, the preset phase is used as the clock cycle phase.
4. The oversampling method according to claim 2, characterized in that: The taking the rising edge phase as the corresponding clock cycle phase comprises: The first non-zero rising edge phase of all data block groups arranged from high to low bits is used as the clock cycle phase of the corresponding clock cycle.
5. The oversampling method according to claim 1, characterized in that: The target phase offset parameters include a sliding offset direction and a sliding offset amount; The step of comparing the first target phase with the predetermined second target phase to determine the target phase offset parameter includes: acquiring the second target phase; Comparing the magnitudes of the first target phase and the second target phase, and determining the sliding offset direction according to the comparison result; An absolute value of a difference between the first target phase and the second target phase is determined as the sliding offset.
6. The oversampling method according to claim 5, characterized in that: The comparing the first target phase with the second target phase and determining the sliding offset direction according to the comparison result includes: When the first target phase is equal to the second target phase, the first target phase is not offset compared to the second target phase; When the first target phase is greater than the second target phase, the sliding offset direction is determined to be rightward; wherein the first target phase is not a phase maximum value and the second target phase is not a phase minimum value; or, the first target phase is not the phase minimum value and the second target phase is not the phase maximum value; When the first target phase is less than the second target phase, the sliding offset direction is determined to be leftward; wherein the first target phase is not a phase maximum value and the second target phase is not a phase minimum value; or, the first target phase is not the phase minimum value and the second target phase is not the phase maximum value; When the first target phase is the maximum phase value and the second target phase is the minimum phase value, determining that the sliding offset direction is leftward; When the first target phase is the minimum phase value and the second target phase is the maximum phase value, it is determined that the sliding offset direction is rightward movement.
7. The oversampling method according to claim 5, characterized in that: Before performing the pre-acquired target phase offset parameter corresponding to the current clock cycle, the method further includes acquiring a sliding frame selection start signal corresponding to the first filtering cycle, and performing sliding frame selection on the real-time parallel oversampling data group corresponding to the current clock cycle to obtain a real-time frame selection data group, including: Determine whether the sliding box selection start signal is a target signal value; If yes, get the initial frame selection position; Based on the initial frame selection position, sliding according to the target phase offset parameter to obtain a target frame selection position; The real-time frame selection data group is obtained by frame selection in the parallel oversampled data according to the target frame selection position.
8. The oversampling method according to claim 7, characterized in that: Before obtaining the real-time parallel oversampled data group based on the oversampled data group collected in the current clock cycle, the method further includes: When a preset number of clock cycles form the first filtering period, the sliding box selection start signal corresponding to the first filtering period is updated to the target signal value.
9. An oversampling device, characterized in that: include: A data group determination module, used to obtain a real-time parallel oversampled data group based on the oversampled data group collected in the current clock cycle; A real-time frame-selected data group determination module, configured to perform sliding frame selection on the real-time parallel oversampled data group corresponding to the current clock cycle according to a pre-obtained target phase offset parameter corresponding to the current clock cycle to obtain a real-time frame-selected data group; A valid sampling data group determination module, used for extracting data from the real-time frame-selected data group to obtain a valid sampling data group corresponding to the current clock cycle; The target phase offset parameter is obtained based on the comparison between a first target phase corresponding to a first filtering cycle and a second target phase corresponding to a second filtering cycle, the first filtering cycle and the second filtering cycle are continuous and do not overlap, and any filtering cycle includes a preset number of clock cycles; the first filtering cycle is a filtering cycle before the current filtering cycle, and the second filtering cycle is a filtering cycle before the first filtering cycle; The oversampling device further includes: a target phase offset parameter determination module, configured to obtain the target phase offset parameter based on a comparison between the first target phase and the second target phase, wherein the target phase offset parameter determination module includes: a clock cycle phase determination unit, configured to perform signal edge change detection on any data block group included in any clock cycle within the first filtering cycle to obtain a corresponding edge change detection result, and to obtain a clock cycle phase corresponding to the corresponding clock cycle based on all the edge change detection results within any of the clock cycles; A first target phase determining unit, configured to take the clock cycle phase with the largest number in the first filtering period as the first target phase; A target phase offset parameter determination unit is used to compare the first target phase with the predetermined second target phase to determine the target phase offset parameter.
10. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the oversampling method according to any one of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the oversampling method according to any one of claims 1 to 8 are implemented.
