Oversampling method, device, electronic device and computer-readable storage medium

By detecting signal edge changes and updating target phases and calculating phase offset parameters, the problem of inability to track phase offsets in PON module in real time is solved, and the accuracy and response speed of sampled data are improved.

CN118660247BActive Publication Date: 2024-11-12STELIGHT INSTR CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411136971.9
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

Technical Problem

The prior art cannot track the signal phase offset in real time in PON module code error test, resulting in inaccurate oversampling results.

Method used

By detecting the phase changes of the signal edge in the current clock cycle, determining the common phase, updating the target phase during the filter cycle, calculating phase offset parameters, and sliding box selection and data extraction are performed based on these parameters to obtain effective sampled data.

Benefits of technology

Real-time filtering of phase jitter is realized, improving the data phase tracking response speed and the accuracy of sampled data extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118660247B_ABST
    Figure CN118660247B_ABST
Patent Text Reader

Abstract

The present invention discloses an oversampling method, device, electronic device and computer-readable storage medium, which are applied to the field of optical network testing technology, including: taking the most common phase in the current filtering cycle as the first target phase corresponding to the current filtering cycle; the current filtering cycle includes a preset number of continuous clock cycles up to the current clock cycle; calculating and obtaining the current phase offset parameter corresponding to the current filtering cycle based on the first target phase corresponding to the current filtering cycle and the second target phase corresponding to the previous filtering cycle; according to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle, sliding frame selection and data extraction are performed on the parallel oversampling data group corresponding to the current clock cycle to obtain the valid sampling data group corresponding to the current clock cycle. The present invention performs filtering processing in each clock cycle to improve the response speed of data phase tracking, thereby improving the accuracy of oversampling.
Need to check novelty before this filing date? Find Prior Art

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] One of the most challenging components in the PON (Passive Optical Network) environment is the 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 bit error test instrumentation. In the existing technology, oversampling technology is usually used for data acquisition. For example, a high-speed transceiver (10Gb / s) is used to oversample low-rate data (such as 2.48832Gb / s and 1.24416Gb / s), and the received data will have multiple bits. However, due to changes in optical power, the received data will have jitter and phase offset, which will cause errors in the oversampled data.

[0003] In this regard, the phase of multiple bits is usually tracked, determined and extracted in real time to obtain correct data. However, the tracking capability of existing oversampling technology is poor, which is mainly reflected in the fact that when phase offset or jitter occurs, the number of sliding bits that can be achieved by the corresponding data sliding frame selection is relatively limited, usually only about 5 bits, and it is impossible to respond in real time based on the phase offset or jitter that occurs in real time.

[0004] Therefore, the current oversampling method in the PON module bit error test has a technical problem of being unable to track the phase offset in real time, 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 in the prior art that phase offset cannot be tracked in real time.

[0006] In order to solve the above technical problems, the present invention provides an oversampling method, comprising:

[0007] Based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle, a common phase corresponding to the current clock cycle is obtained; any of the data block groups is obtained by grouping the oversampled data groups collected based on the current clock cycle according to the sampling multiple;

[0008] The common phase with the largest number in the current filtering cycle is used as the first target phase corresponding to the current filtering cycle; the current filtering cycle includes a preset number of consecutive clock cycles ending at the current clock cycle;

[0009] Obtaining a current phase offset parameter corresponding to the current filtering cycle based on the first target phase corresponding to the current filtering cycle and the second target phase corresponding to the previous filtering cycle;

[0010] According to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle, the parallel oversampling data group corresponding to the current clock cycle is subjected to sliding frame selection and data extraction to obtain a valid sampling data group corresponding to the current clock cycle.

[0011] Optionally, obtaining a common phase corresponding to the current clock cycle based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle includes:

[0012] Performing signal edge change detection on any data block group within the current clock cycle to obtain at least one signal edge phase change detection result;

[0013] The common phase of the current clock cycle is determined based on at least one of the signal edge phase change detection results.

[0014] Optionally, determining the common phase of the current clock cycle based on at least one of the signal edge phase change detection results includes:

[0015] Determine whether the signal edge phase change detection result corresponding to the current clock cycle has a rising edge phase;

[0016] If so, the rising edge phase is used as the common phase of the current clock cycle.

[0017] Optionally, the determining the common phase of the current clock cycle based on at least one of the signal edge phase change detection results further includes:

[0018] If not, determining whether the signal edge phase change detection result has a falling edge phase;

[0019] If so, taking the phase of the previous clock cycle as the common phase of the current clock cycle;

[0020] If not, the preset bit value is used as the common phase of the current clock cycle.

[0021] Optionally, taking the common phase with the largest number in the current filtering period as the first target phase corresponding to the current filtering period includes:

[0022] Writing the common phase of the current clock cycle, and shifting out the phase corresponding to the first written clock cycle according to the first-in-first-out principle to update the common phase included in the current filtering cycle;

[0023] updating each phase storage counter corresponding to the current filtering cycle based on the common phase of the current clock cycle and the common phase of the first written clock cycle;

[0024] The count values ​​of the phase storage counters are compared to determine a common phase with the largest count value, and the common phase with the largest count value is used as the first target phase of the current filtering cycle.

[0025] Optionally, updating each phase storage counter corresponding to the current filtering cycle based on the common phase of the current clock cycle and the common phase of the first written clock cycle includes:

[0026] Determine whether the common phase of the current clock cycle is equal to the common phase of the first written clock cycle;

[0027] If they are equal, there is no need to update the count value corresponding to the phase storage counter;

[0028] If they are not equal, the count value corresponding to the phase storage counter corresponding to the common phase of the first written clock cycle is reduced, and the count value corresponding to the phase storage counter corresponding to the common phase of the current clock cycle is increased.

[0029] Optionally, the offset parameter includes a phase offset direction and a phase offset amount;

[0030] The step of calculating and obtaining a current phase offset parameter corresponding to the current filtering cycle based on the first target phase corresponding to the current filtering cycle and the second target phase corresponding to the previous filtering cycle includes:

[0031] Compare the first target phase of the current filtering cycle with the second target phase of the previous filtering cycle, and determine the phase shift direction according to the comparison result;

[0032] The phase offset is determined by the absolute value of the difference between the first target phase of the current filtering cycle and the second target phase of the previous filtering cycle.

[0033] Optionally, comparing the first target phase of the current filtering cycle with the second target phase of the previous filtering cycle, and determining the phase shift direction according to the comparison result includes:

[0034] When the first target phase is equal to the second target phase, the first target phase has no offset compared to the second target phase;

[0035] When the first target phase is greater than the second target phase, the phase shift direction is determined to be right shift; 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;

[0036] When the first target phase is less than the second target phase, the phase shift direction is determined to be left shift; wherein the first target phase is not the phase maximum value and the second target phase is not the 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;

[0037] When the first target phase is the maximum phase value and the second target phase is the minimum phase value, determining that the phase shift direction is left shift;

[0038] 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 phase shift direction is right shift.

[0039] Optionally, performing sliding frame selection and data extraction on the parallel oversampled data group corresponding to the current clock cycle to obtain a valid sampling data group corresponding to the current clock cycle according to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle, includes:

[0040] Get the initial frame selection position;

[0041] Determine whether the sliding box selection start signal exists;

[0042] If yes, based on the initial frame selection position, sliding according to the current phase offset parameter obtains the target frame selection position;

[0043] Select a frame in the parallel oversampled data according to the target frame position to obtain a real-time frame selection data group;

[0044] Grouping the real-time frame-selected data group to obtain a plurality of grouped data;

[0045] The preset bits of each grouped data are extracted as the valid bits of the grouped data, and all the valid bits are used as the valid sampling data group of the current clock cycle.

[0046] The present invention also provides an oversampling device, comprising:

[0047] A common phase determination module, configured to obtain a common phase corresponding to the current clock cycle based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle; any of the data block groups is obtained by grouping the oversampled data groups collected in the current clock cycle according to the sampling multiple;

[0048] A first target phase determination module, configured to use the common phase with the largest number in a current filtering cycle as a first target phase corresponding to the current filtering cycle; the current filtering cycle includes a preset number of consecutive clock cycles ending at a current clock cycle;

[0049] A phase offset parameter determination module, configured to calculate a current phase offset parameter corresponding to a current filtering cycle based on the first target phase corresponding to the current filtering cycle and the second target phase corresponding to a previous filtering cycle;

[0050] The effective sampling data group determination module is used to perform sliding frame selection and data extraction on the parallel oversampling data group corresponding to the current clock cycle according to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle to obtain the effective sampling data group corresponding to the current clock cycle.

[0051] The present invention also provides an electronic device, comprising:

[0052] Memory for storing computer programs;

[0053] A processor is used to implement the steps of the above-mentioned oversampling method when executing the computer program.

[0054] 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.

[0055] It can be seen that the present invention obtains a common phase corresponding to the current clock cycle based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle; any data block group is obtained by grouping according to the sampling multiple based on the oversampled data group collected in the current clock cycle; the common phase with the largest number in the current filtering cycle is used as the first target phase corresponding to the current filtering cycle; the current filtering cycle includes a preset number of consecutive clock cycles up to the current clock cycle; the current phase offset parameter corresponding to the current filtering cycle is calculated based on the first target phase corresponding to the current filtering cycle and the second target phase corresponding to the previous filtering cycle; according to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle, the parallel oversampled data group corresponding to the current clock cycle is slid and data extracted to obtain a valid sampling data group corresponding to the current clock cycle. Compared with the current oversampling method that cannot cope with the jitter caused by the change of optical power in real time, the present invention takes the common phase with the largest number in the current filtering cycle as the first target phase corresponding to the current filtering cycle. Since the current filtering cycle includes a preset number of continuous clock cycles up to the current clock cycle, each clock cycle can be filtered, and the bit jitter caused by phase jitter can be effectively filtered out in real time, thereby improving the response speed of data phase tracking and the accuracy of sampling data extraction.

[0056] 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

[0057] 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.

[0058] Figure 1 A flow chart of an oversampling method provided by an embodiment of the present invention;

[0059] Figure 2 An example flow chart of an oversampling method provided by an embodiment of the present invention;

[0060] Figure 3 A schematic diagram of a framework of an oversampling method provided by an embodiment of the present invention;

[0061] Figure 4 An example diagram of jitter and phase shift provided in an embodiment of the present invention;

[0062] Figure 5A schematic diagram of the structure of an oversampling device provided by an embodiment of the present invention;

[0063] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0064] 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.

[0065] 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:

[0066] S101, obtaining a common phase corresponding to the current clock cycle based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle; any data block group is obtained by grouping the oversampled data group collected in the current clock cycle according to the sampling multiple.

[0067] The execution subject of this embodiment is a test device, specifically a test device for testing GPON optical modules, including but not limited to a general error analyzer, a burst error analyzer, etc. The data block group in this embodiment is determined by using an oversampling technique. The oversampling technique is to sample the input data at a sampling rate N times the input rate, and increase the sampling rate of the input data to N times the original rate, so that oversampled data of 1 group for every N bits will be obtained. The received oversampled data will pass through a bit phase detector to calculate the current phase. The data block group in this embodiment is to group the sampled data so that the bit size of each data block group is consistent. This embodiment does not limit the grouping method. For example, it can be grouped arbitrarily, or it can be grouped from high to low, or it can also be grouped from low to high. For example, the input parallel data with a bit width of 32 bits is recorded as in_data<31:0>, from high to low, it is divided into 8 groups of data blocks (corresponding to the data block group above), and every 4 bits is 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>, is the 0th to 3rd bits of the received data, is the 0th to 3rd bits of the received data. This embodiment does not limit the specific process of obtaining the signal edge phase change detection result, and the signal edge phase change detection result may be a phase value. The signal edge phase change detection result in this embodiment may be the result obtained by performing rising edge phase detection on the data block group; or the signal edge phase change detection result in this embodiment may also be the result obtained based on rising edge phase detection and falling edge phase detection (rising edge phase detection and falling edge phase detection may be performed in parallel, or rising edge phase detection may be performed first and then falling edge phase detection). When the rising edge phase detection and the falling edge phase detection are carried out in parallel, when there are 8 data block groups in the current clock cycle, the rising edge phase detection is carried out on the data block groups, and it is determined whether the falling edge phase bit_falledge is generated: b0111, its rising edge phase position is 1, bit_falledge=0; b0011, its rising edge phase position is 2, bit_falledge=0; b0001, its rising edge phase position is 3, bit_falledge=0; b0000 or b1111, its rising edge phase position is 0, bit_falledge=0; otherwise, its rising edge position is 0, bit_falledge=1; the rising edge phase detection is carried out on the 8 data block groups from high to low, and the first non-0 rising edge phase that appears is taken as the common phase of the 8 data blocks and stored in bit_current_position (the common phase of the clock cycle). If there is no rising edge, it is determined whether bit_falledge is 0. If it is 0, the phase of the 8 data blocks is 0; if it is 1, the phase of the 8 data blocks is the bit_current_position of the previous beat (cycle). The purpose of this is to eliminate the possible phase misjudgment caused by the phase being 0. Through the above method, the common phase bit_current_position of the current clock cycle can be obtained.

[0068] It should be further explained that, in order to improve the efficiency of signal edge phase change detection, the above-mentioned obtaining a common phase corresponding to the current clock cycle based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle may include: performing signal edge change detection on any data block group in the current clock cycle to obtain at least one signal edge phase change detection result; and determining the common phase of the current clock cycle based on at least one signal edge phase change detection result. In this embodiment, it is necessary to determine the common phase of the current clock cycle based on at least one signal edge phase change detection result. For example, the common phase corresponding to the current clock cycle may be obtained based on at least one rising edge phase change detection result. Since this embodiment can determine the common phase of the current clock cycle based on only one signal edge phase change detection result, without obtaining all signal edge phase change detection results, the efficiency of signal edge phase change detection can be improved.

[0069] It should be further explained that, in order to improve the accuracy of the common phase determination, the above-mentioned determination of the common phase of the current clock cycle based on at least one signal edge phase change detection result may include: judging whether there is a rising edge phase in the signal edge phase change detection result corresponding to the current clock cycle; if so, taking the rising edge phase as the common phase of the current clock cycle. If not, judging whether there is a falling edge phase in the signal edge phase change detection result; if so, taking the phase of the previous clock cycle as the common phase of the current clock cycle; if not, taking the preset bit value as the common phase of the current clock cycle.

[0070] S102, taking the common phase with the largest number in the current filtering cycle as the first target phase corresponding to the current filtering cycle; the current filtering cycle includes a preset number of continuous clock cycles ending at the current clock cycle.

[0071] In this embodiment, the clock cycle repeated in the current filtering cycle and the previous filtering cycle is the preset number minus 1, and only one clock cycle is different. For example, if the current filtering cycle is composed of the 1st to 1000th clock cycles, the corresponding previous filtering cycle is composed of the 2nd to 10001st clock cycles; or if the current filtering is composed of the 10th to 20th clock cycles, the corresponding previous filtering cycle is composed of the 11th to 21st clock cycles. This embodiment does not limit the determination method of the largest number of common phases. For example, this embodiment can statistically determine the common phases within a preset number of clock cycles; or, this embodiment can store the common phases of the current clock cycle acquired each time to the corresponding phase counter, and when a filtering cycle is used, the largest number of common phases in the current filtering cycle can be determined according to the count value of the phase counter, thereby determining the first target phase. The range of the preset number in this embodiment can be 800~1500. It can be understood that due to the instantaneous jitter in the received data, the parallel 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 bit width inconsistency occurs, the two data blocks may become b0001, b1100 or b0011, b1000. For the above situations, the wrong phase caused by jitter must be filtered out, so the common phase with the largest number in the current filter cycle needs to be used as the first target phase corresponding to the current filter cycle.

[0072] It should be further explained that, in order to improve the accuracy of determining the first target phase, the above-mentioned taking the common phase with the largest number in the current filtering cycle as the first target phase corresponding to the current filtering cycle can include: writing the common phase of the current clock cycle, and removing the phase corresponding to the first written clock cycle according to the first-in-first-out principle to update the common phase included in the current filtering cycle; updating each phase storage counter corresponding to the current filtering cycle based on the common phase of the current clock cycle and the common phase of the first written clock cycle; comparing the count values ​​of each phase storage counter to determine the common phase with the largest count value, and taking the common phase with the largest count value as the first target phase of the current filtering cycle. When determining the first target phase of the current filtering cycle, this embodiment will write the phase of the current clock cycle into the previous filtering cycle, and remove the common phase of the clock cycle first written in the previous filtering cycle, so that the filtering cycle only includes the common phase of a preset number of clock cycles, thereby updating the value of the phase storage counter, and directly determining the first target phase corresponding to the current filtering cycle according to the count value of the phase storage counter, so that the accuracy of the first target phase determination can be improved.

[0073] It should be further explained that, in order to improve the efficiency of determining the count value, the above-mentioned updating of each phase storage counter corresponding to the current filtering cycle based on the common phase of the current clock cycle and the common phase of the first written clock cycle can include: judging whether the common phase of the current clock cycle is equal to the common phase of the first written clock cycle; if they are equal, there is no need to update the count value corresponding to the phase storage counter; if they are not equal, then the count value corresponding to the phase storage counter corresponding to the common phase of the first written clock cycle is reduced, and the count value corresponding to the phase storage counter corresponding to the common phase of the current clock cycle is increased. In this embodiment, the current clock cycle is the latest written clock cycle, and the first clock cycle entered in this embodiment is the first clock cycle of the previous filtering cycle. For example, when a filtering cycle includes 10 clock cycles and the current clock cycle is the 11th clock cycle, then the 11th clock cycle is the latest entered clock cycle, and the 1st clock cycle is the first entered clock cycle.

[0074] For ease of understanding, this embodiment provides specific steps for determining the first target phase. Initially, 1000 clock cycles are continuously received (each filtering cycle includes 1000 clock cycles) and written into a fifo first-in first-out (Phase_Mem_fifo, read-write synchronization) with a depth greater than 1000 in the order of reception; at the same time, the number of each phase value of 1000 clock cycles is counted and stored in Phase_count_reg In the phase storage counter, the range of i 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> Stores the number of phases 3. Stores the counter Phase_count_reg according to each phase The common phase value with the largest count value is assigned to the current phase register bit_position_reg as the first target phase, and the start signal bit_draw_check_fla in the sliding box selection module is set to 1. To ensure the real-time performance of the filtering algorithm, the phase value of 1000 clock cycles needs to be updated in real time, and the number of each phase value needs to be calculated. Therefore, the phase filtering module needs to implement phase storage pool update, phase statistics pool update, and phase statistics assignment. a) Update of phase storage pool: In the initial state, Phase_Mem_fifo has stored the phase values ​​(common phase) from the 1st clock cycle phase value to the 1000th clock cycle in sequence. When the current phase value bit_current_position is determined in the 1001st clock cycle, the Phase_Mem_fifo is read and written. Based on the first-in-first-out principle, the 1001st clock cycle phase value is written and the 1st clock cycle phase value bit_old_position is read. At this time, the number of phase values ​​in Phase_Mem_fifo is still 1000, and it is the 2nd clock cycle phase value to the 1001st clock cycle phase value. In the same way, when the current phase value bit_current_position of the M+1000th clock cycle is calculated in the M+1000th clock cycle, the Phase_Mem_fifo is read and written, the M+1000th clock cycle phase value is written, and the phase value of the Mth clock cycle is read at the same time, which is recorded as bit_old_position. Ensure that the number of phase values ​​in Phase_Mem_fifo is 1000, and it is the phase value from the M+1th clock cycle to the M+1000th clock cycle. In the above way, the 1000 phase values ​​stored in Phase_Mem_fifo are updated every clock cycle, and Phase_Mem_fifo is read to update the value of bit_old_position. b) Phase statistics pool update. At the same time, by comparing bit_current_position and bit_old_position, calculate and update Phase_count_reg The value of the phase storage counter is calculated as follows: When bit_current_position≠bit_old_position, bit_current_position=i; for Phase_count_reg Phase storage counter Phase_count_reg =Phase_count_reg +1 calculation; and bit_old_position=j; for Phase_count_reg <j>Phase storage counter Phase_count_reg <j>=Phase_count_reg <j>-1 calculation. The range of i and j is 0~3, and i≠j; for example: when bit_current_position=1; and bit_old_position=2, bit_current_position≠bit_old_position; Phase_count_reg <1> =Phase_count_reg <1> +1; and Phase_count_reg <2> =Phase_count_reg <2> -1; when bit_current_position = bit_old_position, Phase_count_reg is not required Through the above operations and statistical calculations, Phase_count_reg The value in the phase storage counter is updated in real time. c) Phase statistics assignment. In each clock cycle, the updated phase storage counter Phase_count_reg is The data are compared and the phase with the largest value is assigned to the current phase storage counter bit_position_reg after filtering for phase offset calculation.

[0075] S103, obtaining a current phase offset parameter corresponding to the current filtering cycle based on a first target phase corresponding to the current filtering cycle and a second target phase corresponding to the previous filtering cycle.

[0076] The second target phase determination method of the previous filtering cycle in this embodiment is the same as the first target phase determination method, except that the clock cycle is different. The current phase offset parameter in this embodiment includes a phase offset direction and a phase offset amount, the phase offset direction is determined based on the comparison of the first target phase and the second target phase, and the phase offset amount is determined based on the absolute value of the difference between the first target phase and the second target phase.

[0077] It should be further explained that, in order to improve the accuracy of determining the phase offset parameter, the above-mentioned offset parameter includes a phase offset direction and a phase offset amount; calculating and obtaining the current phase offset parameter corresponding to the current filtering cycle based on the first target phase corresponding to the current filtering cycle and the second target phase corresponding to the previous filtering cycle may include: comparing the first target phase of the current filtering cycle with the second target phase of the previous filtering cycle, and determining the phase offset direction according to the comparison result;

[0078] The phase offset is determined by the absolute value of the difference between the first target phase of the current filtering cycle and the second target phase of the previous filtering cycle. It can be understood that taking the second target phase that has been effective in the previous clock cycle as feedback and calculating it with the first target phase will obtain two data. One is the bit_position_dir phase offset direction, which is used to determine the sliding direction of the sliding frame selection module; the other is the phase offset bit_position_offset, which is used to determine the sliding amount of the sliding frame selection module. The absolute value of the difference between the first target phase and the second target phase is calculated to determine the phase offset. The first target phase of the current filtering cycle is compared with the second target phase of the previous filtering cycle to determine the phase offset direction. The target phase offset parameter in this embodiment may include a phase offset direction and a phase offset, and a method for determining the phase offset direction and the phase offset is provided, so the accuracy of the phase offset parameter determination can be improved.

[0079] It should be further noted that the above-mentioned comparison of the magnitudes of the first target phase in the current filtering period and the second target phase in the previous filtering period, and determining the phase shift direction according to the comparison result, may include: when the first target phase is equal to the second target phase, there is no shift of the first target phase compared to the second target phase; when the first target phase is greater than the second target phase, it is determined that the phase shift direction is a right shift; wherein, the first target phase is not the phase maximum value and the second target phase is not the 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, it is determined that the phase shift direction is a left shift; wherein, the first target phase is not the phase maximum value and the second target phase is not the 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 phase maximum value and the second target phase is the phase minimum value, it is determined that the phase shift direction is a left shift; when the first target phase is the phase minimum value and the second target phase is the phase maximum value, it is determined that the phase shift direction is a right shift. It can be understood that when bit_position_valid (the second target phase in the previous filtering period) = bit_position_reg (the first target phase in the current filtering period), it means that the phase in the current clock cycle (since the filtering period is determined once per clock cycle, the current filtering period is equivalent to the current clock cycle) has not changed compared to the phase in the previous clock cycle. At this time, bit_position_dir = 0, and there is no shift of the first target phase compared to the second target phase; when bit_position_valid < bit_position_reg, it means that the phase shift direction of the current clock cycle compared to the previous clock cycle is a right shift. At this time, bit_position_dir = 2; when bit_position_valid > bit_position_reg, it means that the phase shift direction of the current clock cycle compared to the previous clock cycle is a left shift. At this time, bit_position_dir = 1; when bit_position_valid = 0 and bit_position_reg = 3, it means that the phase shift direction of the current clock cycle compared to the previous clock cycle is a left shift. At this time, bit_position_dir = 1; when bit_position_valid = 3 and bit_position_reg = 0, it means that the phase shift direction of the current clock cycle compared to the previous clock cycle is a right shift. At this time, bit_position_dir = 2; through the above logical judgment, the phase shift direction can be obtained. This embodiment gives the phase shift directions corresponding to various magnitude situations of the first target phase and the second target phase, improving the accuracy of determining the phase shift direction.

[0080] S104, according to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle, sliding frame selection and data extraction are performed on the parallel over-sampling data group corresponding to the current clock cycle to obtain a valid sampling data group corresponding to the current clock cycle.

[0081] The sliding frame selection start signal in this embodiment can improve the timeliness of the sliding frame selection. This embodiment does not limit the specific process of sliding frame selection. For example, this embodiment can perform sliding frame selection based on two parallel oversampled data groups; or this embodiment can perform sliding frame selection based on three parallel oversampled data groups.

[0082] It should be further explained that, in order to improve the accuracy of sliding frame selection, the above-mentioned sliding frame selection and data extraction of the parallel oversampled data group corresponding to the current clock cycle according to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle to obtain the valid sampling data group corresponding to the current clock cycle may include:

[0083] S1041, obtaining an initial frame selection position.

[0084] 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 32 bits are extracted from 64 bits, and the initial frame selection position may be 17, so that 32 data are extracted from 96 bits in 3 clock cycles, and the sliding position is larger, and the initial frame selection position may be 32, that is, it may 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. When the frame selection is close to the middle position, the accuracy is relatively higher.

[0085] S1042, determine whether there is a sliding box selection start signal.

[0086] The sliding frame selection start signal in this embodiment may be to turn on the sliding frame selection start signal bit_draw_check_flag=1 when the largest number of common phases are determined.

[0087] S1043: If yes, based on the initial frame selection position, slide according to the current phase offset parameter to obtain the target frame selection position.

[0088] S1044, select a frame in the parallel oversampled data according to the target frame selection position to obtain a real-time frame selection data group.

[0089] In this embodiment, the step of performing frame selection may include: recombining the received two-beat parallel 32-bit data (data of the current clock cycle and data of the previous clock cycle) into 64-bit data recorded as s_data_64bit, and selecting 32-bit parallel data from the determined 64-bit parallel data according to the target frame selection position bit_draw_position in each clock cycle, recorded as s_data_get32bit, for data extraction. Therefore, the position of the frame selection is very important for the correctness of data extraction. Box selection method: s_data_32bit = s_data_64bit <64 - bit_draw_position: 32 -bit_draw_position -1>; that is, the meaning of the above expression 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>, at this time the initial value of bit_position_valid is 0; when the sliding box selection start signal bit_draw_check_flag arrives, the value of bit_draw_position is calculated according to the phase offset direction and phase offset. 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; when the above frame selection position takes effect, the value of bit_position_reg will be assigned to bit_position_valid as feedback for the next clock 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.

[0090] S1045, grouping the real-time frame selected data group to obtain a plurality of grouped data.

[0091] In this embodiment, grouping the real-time frame selection data group may include dividing the 32-bit real-time frame selection data group into 8 data groups, for example, dividing the s_data_get32bit data obtained by the sliding frame selection module into 8 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]. The real-time frame selection data group in this embodiment may be to use the data of the current clock cycle and the data of the previous clock cycle as the real-time parallel sampling data, and to perform real-time parallel sampling on the real-time parallel sampling data.

[0092] S1046, 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.

[0093] This embodiment does not limit the specific position of the preset bit. For example, the preset bit of this embodiment may be the second bit; or the preset bit of this embodiment may also be the third bit. When the preset bit is the second bit and there are 8 groups of grouped data, the second bit of each data group is extracted 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 sampled data group obtained by the oversampling technology of tracking phase offset.

[0094] The oversampling method provided by the embodiment of the present invention may include: S101, obtaining a common phase corresponding to the current clock cycle based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle; any data block group is obtained by grouping the oversampled data group collected based on the current clock cycle according to the sampling multiple; S102, taking the common phase with the largest number in the current filtering cycle as the first target phase corresponding to the current filtering cycle; the current filtering cycle includes a preset number of continuous clock cycles up to the current clock cycle; S103, calculating and obtaining a current phase offset parameter corresponding to the current filtering cycle based on the first target phase corresponding to the current filtering cycle and the second target phase corresponding to the previous filtering cycle; S104, according to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle, sliding frame selection and data extraction are performed on the parallel oversampled data group corresponding to the current clock cycle to obtain a valid sampling data group corresponding to the current clock cycle. Compared with the current oversampling method that cannot cope with the jitter caused by changes in optical power, the present invention uses the common phase with the largest number in the current filtering cycle as the first target phase corresponding to the current filtering cycle, thereby effectively filtering out the bit jitter caused by phase jitter in real time, and each clock cycle can determine a filtering cycle, so that real-time tracking of phase offset can be achieved based on the first target phase and the second target phase, thereby improving the response speed of data phase tracking and thus improving the accuracy of sampled data extraction.

[0095] 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:

[0096] S201, performing signal edge change detection on any data block group in the current clock cycle to obtain at least one signal edge phase change detection result.

[0097] S202: Determine a common phase of a current clock cycle based on at least one signal edge phase change detection result.

[0098] S203, taking the common phase with the largest number in the current filtering cycle as the first target phase corresponding to the current filtering cycle; the current filtering cycle includes a preset number of continuous clock cycles ending at the current clock cycle.

[0099] S204, calculating a current phase offset parameter corresponding to the current filtering cycle based on a first target phase corresponding to the current filtering cycle and a second target phase corresponding to a previous filtering cycle; the previous filtering cycle includes a preset number of consecutive clock cycles ending with a previous clock cycle.

[0100] The filter period in this embodiment is updated faster, which can effectively solve the filter period delay, eliminate the phase error caused by phase jitter, and calculate the phase offset parameter in real time to achieve fast phase tracking of the data.

[0101] S205, obtaining an initial frame selection position, and when there is a sliding frame selection start signal, based on the initial frame selection position, sliding according to the current phase offset parameter to obtain a target frame selection position.

[0102] S206, selecting a frame in the parallel oversampled data 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.

[0103] S207, extracting preset bits of each group of data as valid bits of the group of data, and using all valid bits as valid sampling data groups of the current clock cycle.

[0104] The embodiment of the present invention can ensure that in the process of oversampling low-speed data, data phase jitter and data phase offset can be effectively dealt with, and parallel data bit jitter caused by phase jitter can be effectively filtered out in real time, and data phase offset can be tracked in real time, thereby improving the response speed of data phase tracking, making the parallel data to be extracted more quickly phase-aligned, and ensuring the correctness of data extraction. It can effectively solve the problem of phase offset of recovered data when optical power changes during GPON optical module (Gigabit-Capable PassiveOptical Network) testing, and can quickly and continuously follow the phase change to recover the correct data.

[0105] In order to make the present invention easier to understand, please refer to Figure 3 , Figure 3 A schematic diagram of a framework of an oversampling method provided for 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.

[0106] After passing through a receiver with a rate that is N times the input rate, parallel data with N identical bits in each group will be obtained. Taking 4x oversampling as an example, a 9.95328Gbps receiver is used to receive 2.48832Gbps input data, and one bit of the input data is sampled N times, 4 identical bits of data are sampled, and combined into 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 the 32 bits. In addition, an overall position offset will occur, which is processed using a bit phase detector, a phase filter module, a phase offset calculation module, a sliding frame selection module, and a data extraction module. For ease of understanding, please refer to Figure 4 , Figure 4 An example diagram of jitter and phase shift provided in an embodiment of the present invention is shown in FIG. Figure 4 The figure shows an optical network test OLT link (optical line terminal at the network provider end) at a rate of 2.48832Gbps. 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 offset on the flip edge. The parallel data of the receiver is reflected in the bit jitter and bit offset in the parallel data bit at the boundary position of 0 and 1.

[0107] Bit phase detector: used to execute the above step of obtaining the common phase corresponding to the current clock cycle based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle. The input of the bit phase detector is parallel sampling data, and the signal edge phase change detection is performed on the data block group corresponding to the parallel sampling data to calculate the current phase.

[0108] Phase filtering module: used to execute the above-mentioned step of taking the most common phase in the current filtering cycle as the first target phase corresponding to the current filtering cycle; the current filtering cycle includes a preset number of continuous clock cycles up to the current clock cycle. That is, this embodiment uses the phase statistical pool (corresponding to the phase storage counter above) to perform statistical calculations on the calculated phase for filtering, and continuously counts M times to take the most phase position as the common phase of the data block group corresponding to the current filtering cycle, and stores it in the phase storage pool. Only the first time is to update the common phase of the current filtering cycle once every M times (for example, 1000 times), and then update it once for each clock cycle. When the M+1th phase value is calculated, the statistical pool with a numerical value of M removes the first phase value and adds the M+1th phase value to ensure that the statistical pool value is fixed to M, and re-counts the most phase position as the common phase corresponding to the data block group of the filtering cycle, and the statistical filtering process is performed in real time.

[0109] Phase offset calculation module: used to perform the above-mentioned step of calculating and obtaining the current phase offset parameter corresponding to the current filtering cycle based on the first target phase corresponding to the current filtering cycle and the second target phase corresponding to the previous filtering cycle. This embodiment compares the current phase (first target phase) with the feedback (second target phase) to determine the bit offset direction and bit offset amount.

[0110] Sliding frame selection module: used to execute the above-mentioned step of sliding frame selection on the parallel oversampled data group corresponding to the current clock cycle according to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle. This embodiment performs sliding frame selection on the current data according to the bit offset direction and offset.

[0111] Data extraction module: used to execute the above data extraction step to obtain a valid sampling data group corresponding to the current clock cycle. In this embodiment, the data selected by the sliding box is directly used for data extraction, 4 bits are grouped together, and the second or third bit is used as the tap position, which can effectively resist jitter.

[0112] The embodiment of the present invention can effectively solve the problem of phase shift of recovered data when optical power changes during the GPON optical module test process, and can quickly and continuously follow the phase change.

[0113] 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.

[0114] 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:

[0115] The common phase determination module 100 is used to obtain a common phase corresponding to the current clock cycle based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle; any of the data block groups is obtained by grouping the oversampled data groups collected in the current clock cycle according to the sampling multiple;

[0116] A first target phase determination module 200, configured to use the common phase with the largest number in a current filtering cycle as a first target phase corresponding to the current filtering cycle; the current filtering cycle includes a preset number of consecutive clock cycles ending at a current clock cycle;

[0117] A phase offset parameter determination module 300, configured to calculate a current phase offset parameter corresponding to a current filtering cycle based on the first target phase corresponding to the current filtering cycle and the second target phase corresponding to a previous filtering cycle;

[0118] The effective sampling data group determination module 400 is used to perform sliding frame selection and data extraction on the parallel oversampling data group corresponding to the current clock cycle according to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle to obtain the effective sampling data group corresponding to the current clock cycle.

[0119] Further, based on the above embodiment, the common phase determination module 100 may include:

[0120] A signal edge phase change detection result determination unit, configured to perform signal edge change detection on any data block group within the current clock cycle to obtain at least one signal edge phase change detection result;

[0121] A common phase determination unit is used to determine the common phase of the current clock cycle based on at least one of the signal edge phase change detection results.

[0122] Further, based on any of the above embodiments, the common phase determination unit may include:

[0123] A rising edge phase judgment subunit, used for judging whether the signal edge phase change detection result corresponding to the current clock cycle has a rising edge phase;

[0124] The first common phase determining subunit is configured to use the rising edge phase as the common phase of the current clock cycle.

[0125] Further, based on the above embodiment, the common phase determination unit may further include:

[0126] A falling edge judgment subunit, used for judging whether the signal edge phase change detection result has a falling edge phase or not;

[0127] a second common phase determination subunit, configured to, if yes, use the phase of the previous clock cycle as the common phase of the current clock cycle;

[0128] The third common phase determination subunit is used for, if not, using a preset bit value as the common phase of the current clock cycle.

[0129] Further, based on any of the above embodiments, the first target phase determination module 200 may include:

[0130] A writing unit, used for writing the common phase of the current clock cycle, and shifting out the phase corresponding to the first written clock cycle according to the first-in-first-out principle to update the common phase included in the current filtering cycle;

[0131] A phase storage counter updating unit, configured to update each phase storage counter corresponding to the current filtering cycle based on the common phase of the current clock cycle and the common phase of the first written clock cycle;

[0132] The first target phase updating unit is used to compare the count values ​​of each phase storage counter, determine the common phase with the largest count value, and use the common phase with the largest count value as the first target phase of the current filtering period.

[0133] Further, based on the above embodiment, the above phase storage counter updating unit may include:

[0134] A clock cycle common phase determination subunit, used to determine whether the common phase of the current clock cycle is equal to the common phase of the first written clock cycle;

[0135] The count value determination non-update subunit is used for not updating the count value corresponding to the phase storage counter if they are equal;

[0136] The count value updating subunit is used to reduce the count value corresponding to the phase storage counter corresponding to the common phase of the first written clock cycle, and increase the count value corresponding to the phase storage counter corresponding to the common phase of the current clock cycle if they are not equal.

[0137] Further, based on any of the above embodiments, the offset parameter includes a phase offset direction and a phase offset amount; the phase offset parameter determination module 300 may include:

[0138] a phase shift direction determining unit, configured to compare the first target phase of the current filtering cycle with the second target phase of the previous filtering cycle, and determine the phase shift direction according to the comparison result;

[0139] A phase offset determination unit is used to determine the phase offset by using the absolute value of the difference between the first target phase of the current filtering cycle and the second target phase of the previous filtering cycle.

[0140] Further, based on the above embodiment, the above phase shift direction determining unit may include:

[0141] A first phase offset direction determining subunit, configured to determine that when the first target phase is equal to the second target phase, the first target phase has no offset compared to the second target phase;

[0142] A second phase offset direction determination subunit is used to determine that the phase offset direction is a right 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;

[0143] A third phase offset direction determination subunit is configured to determine that the phase 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 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;

[0144] a fourth phase shift direction determining subunit, configured to determine that the phase shift 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;

[0145] The fifth phase shift direction determining subunit is configured to determine that the phase shift direction is right shift when the first target phase is the minimum phase value and the second target phase is the maximum phase value.

[0146] Further, based on any of the above embodiments, the valid sampling data group determination module 400 may include:

[0147] An initial frame selection position obtaining unit, used to obtain an initial frame selection position;

[0148] A sliding box selection start signal determination unit, used to determine whether the sliding box selection start signal exists;

[0149] a target frame selection position determining unit, configured to obtain a target frame selection position by sliding according to the current phase offset parameter based on the initial frame selection position;

[0150] A real-time frame selection data group determination unit, configured to obtain a real-time frame selection data group by frame selection in the parallel oversampled data according to the target frame selection position;

[0151] A grouping unit, used for grouping the real-time frame selected data group to obtain a plurality of grouped data;

[0152] The extraction unit is used to extract the preset bits of each packet data as the valid bits of the packet data, and use all the valid bits as the valid sampling data group of the current clock cycle.

[0153] 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.

[0154] The oversampling device provided by the embodiment of the present invention may include: a common phase determination module 100, which is used to obtain a common phase corresponding to the current clock cycle based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle; any of the data block groups is obtained by grouping the oversampled data groups collected based on the current clock cycle according to the sampling multiple; a first target phase determination module 200, which is used to use the common phase with the largest number in the current filtering cycle as the first target phase corresponding to the current filtering cycle; the current filtering cycle includes a preset number of consecutive clock cycles up to the current clock cycle; a phase offset parameter determination module 300, which is used to calculate and obtain a current phase offset parameter corresponding to the current filtering cycle based on the first target phase corresponding to the current filtering cycle and the second target phase corresponding to the previous filtering cycle; and a valid sampling data group determination module 400, which is used to perform sliding frame selection and data extraction on the parallel oversampled data group corresponding to the current clock cycle according to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle to obtain a valid sampling data group corresponding to the current clock cycle. Compared with the current oversampling method that cannot cope with the jitter caused by changes in optical power, the present invention uses the common phase with the largest number in the current filtering cycle as the first target phase corresponding to the current filtering cycle, thereby effectively filtering out the bit jitter caused by phase jitter in real time, and each clock cycle can determine a filtering cycle, so that real-time tracking of phase offset can be achieved based on the first target phase and the second target phase, thereby improving the response speed of data phase tracking and thus improving the accuracy of sampled data extraction.

[0155] 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.

[0156] 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:

[0157] A memory 10, used for storing computer programs;

[0158] The processor 20 is used to execute a computer program to implement the steps of the above-mentioned oversampling method.

[0159] The memory 10 , the processor 20 , and the communication interface 30 all communicate with each other via a communication bus 40 .

[0160] In the embodiment of the present invention, the memory 10 is used to store one or more programs, and the program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:

[0161] A common phase corresponding to the current clock cycle is obtained based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle; any data block group is obtained by grouping the oversampled data group collected in the current clock cycle according to the sampling multiple;

[0162] The common phase with the largest number in the current filtering cycle is taken as the first target phase corresponding to the current filtering cycle; the current filtering cycle includes a preset number of continuous clock cycles up to the current clock cycle;

[0163] Obtaining a current phase offset parameter corresponding to the current filtering cycle based on a first target phase corresponding to the current filtering cycle and a second target phase corresponding to the previous filtering cycle;

[0164] According to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle, the parallel oversampling data group corresponding to the current clock cycle is subjected to sliding frame selection and data extraction to obtain a valid sampling data group corresponding to the current clock cycle.

[0165] 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.

[0166] 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.

[0167] 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 .

[0168] The communication interface 30 may be an interface of a communication module, and is used to connect to other devices or systems.

[0169] 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.

[0170] 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.

[0171] 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.

[0172] 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.

[0173] 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.

[0174] 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.

[0175] 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 "comprise", "include" or any other variants are intended to cover non-exclusive inclusion, so that a process, method, article or device including 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.

[0176] 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 method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.< / j> < / j> < / j>

Claims

1. An oversampling method, characterized in that: include: Obtaining a common phase corresponding to the current clock cycle based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle; Any of the data block groups is obtained by grouping the oversampled data group collected based on the current clock cycle according to the sampling multiple; Taking the common phase with the largest number in the current filtering cycle as the first target phase corresponding to the current filtering cycle; The current filtering period includes a preset number of consecutive clock periods ending at the current clock period; Compare the first target phase of the current filtering cycle with the second target phase of the previous filtering cycle, and determine the phase shift direction according to the comparison result; determine the phase shift amount according to the absolute value of the difference between the first target phase of the current filtering cycle and the second target phase of the previous filtering cycle; Using the phase shift direction and the phase shift amount as phase shift parameters; According to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle, the parallel oversampling data group corresponding to the current clock cycle is subjected to sliding frame selection and data extraction to obtain a valid sampling data group corresponding to the current clock cycle.

2. The oversampling method according to claim 1, characterized in that: Obtaining a common phase corresponding to the current clock cycle based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle, comprising: Performing signal edge change detection on any data block group within the current clock cycle to obtain at least one signal edge phase change detection result; The common phase of the current clock cycle is determined based on at least one of the signal edge phase change detection results.

3. The oversampling method according to claim 2, characterized in that: Determining the common phase of the current clock cycle based on at least one of the signal edge phase change detection results includes: Determine whether the signal edge phase change detection result corresponding to the current clock cycle has a rising edge phase; If so, the rising edge phase is used as the common phase of the current clock cycle.

4. The oversampling method according to claim 3, characterized in that: Determining the common phase of the current clock cycle based on at least one of the signal edge phase change detection results, further comprising: If not, determining whether the signal edge phase change detection result has a falling edge phase; If so, taking the phase of the previous clock cycle as the common phase of the current clock cycle; If not, the preset bit value is used as the common phase of the current clock cycle.

5. The oversampling method according to any one of claims 1 to 4, characterized in that: Taking the common phase with the largest number in the current filtering cycle as the first target phase corresponding to the current filtering cycle, comprising: Writing the common phase of the current clock cycle, and shifting out the phase corresponding to the first written clock cycle according to the first-in-first-out principle to update the common phase included in the current filtering cycle; updating each phase storage counter corresponding to the current filtering cycle based on the common phase of the current clock cycle and the common phase of the first written clock cycle; The count values ​​of the phase storage counters are compared to determine a common phase with the largest count value, and the common phase with the largest count value is used as the first target phase of the current filtering cycle.

6. The oversampling method according to claim 5, characterized in that: The method of updating each phase storage counter corresponding to the current filtering cycle based on the common phase of the current clock cycle and the common phase of the first written clock cycle includes: Determine whether the common phase of the current clock cycle is equal to the common phase of the first written clock cycle; If they are equal, there is no need to update the count value corresponding to the phase storage counter; If they are not equal, the count value corresponding to the phase storage counter corresponding to the common phase of the first written clock cycle is reduced, and the count value corresponding to the phase storage counter corresponding to the common phase of the current clock cycle is increased.

7. The oversampling method according to claim 1, characterized in that: Comparing the first target phase of the current filtering cycle with the second target phase of the previous filtering cycle, and determining the phase shift direction according to the comparison result, including: When the first target phase is equal to the second target phase, the first target phase has no offset compared to the second target phase; When the first target phase is greater than the second target phase, the phase shift direction is determined to be right shift; 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 phase shift direction is determined to be left shift; wherein the first target phase is not the phase maximum value and the second target phase is not the 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 phase shift direction is left shift; 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 phase shift direction is right shift.

8. The oversampling method according to claim 1, characterized in that: According to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering period, sliding frame selection and data extraction are performed on the parallel oversampling data group corresponding to the current clock period to obtain a valid sampling data group corresponding to the current clock period, including: Get the initial frame selection position; Determine whether the sliding box selection start signal exists; If yes, based on the initial frame selection position, sliding according to the current phase offset parameter obtains the target frame selection position; Select a frame in the parallel oversampled data according to the target frame position to obtain a real-time frame selection data group; Grouping the real-time frame-selected data group to obtain a plurality of grouped data; The preset bits of each grouped data are extracted as the valid bits of the grouped data, and all the valid bits are used as the valid sampling data group of the current clock cycle.

9. An oversampling device, characterized in that: include: A common phase determination module, configured to obtain a common phase corresponding to the current clock cycle based on at least one signal edge phase change detection result corresponding to any data block group in the current clock cycle; Any of the data block groups is obtained by grouping the oversampled data group collected based on the current clock cycle according to the sampling multiple; A first target phase determination module, configured to take the common phase with the largest number in a current filtering cycle as a first target phase corresponding to the current filtering cycle; The current filtering period includes a preset number of consecutive clock periods ending at the current clock period; A phase offset parameter determination module, used to compare the first target phase of the current filtering cycle with the second target phase of the previous filtering cycle, and determine the phase offset direction according to the comparison result; determine the phase offset according to the absolute value of the difference between the first target phase of the current filtering cycle and the second target phase of the previous filtering cycle; Using the phase shift direction and the phase shift amount as phase shift parameters; The effective sampling data group determination module is used to perform sliding frame selection and data extraction on the parallel oversampling data group corresponding to the current clock cycle according to the current phase offset parameter and the sliding frame selection start signal corresponding to the current filtering cycle to obtain the effective sampling data group corresponding to the current clock cycle.

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.

Citation Information

Patent Citations

  • Receiver, transmitter and a method for digital multiple sub-band processing

    CN107786484A

  • Phase jitter sampling method

    CN114499514A

  • Oversampling data recovery method and device, equipment and storage medium

    CN117255141A

  • Oversampling method for data signal and oversampling apparatus thereof

    US20140375365A1