CN114153772B - Method and device for determining data sampling points - Google Patents

Method and device for determining data sampling points Download PDF

Info

Publication number
CN114153772B
CN114153772B CN202010933980.6A CN202010933980A CN114153772B CN 114153772 B CN114153772 B CN 114153772B CN 202010933980 A CN202010933980 A CN 202010933980A CN 114153772 B CN114153772 B CN 114153772B
Authority
CN
China
Prior art keywords
sampling
data
phase
determining
points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010933980.6A
Other languages
Chinese (zh)
Other versions
CN114153772A (en
Inventor
徐寅飞
匡双鸽
朱国钟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Allwinner Technology Co Ltd
Original Assignee
Allwinner Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Allwinner Technology Co Ltd filed Critical Allwinner Technology Co Ltd
Priority to CN202010933980.6A priority Critical patent/CN114153772B/en
Publication of CN114153772A publication Critical patent/CN114153772A/en
Application granted granted Critical
Publication of CN114153772B publication Critical patent/CN114153772B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7807System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a method and a device for determining a data sampling point, wherein the method comprises the steps of performing phase edge dividing operation on a sampling clock based on the rising edge of the sampling clock and the falling edge of the sampling clock to obtain a preset number of sampling phase edges; and acquiring target data sent by external equipment according to all sampling phase edges, obtaining a transmission start identifier corresponding to the target data, and determining sampling points of the target data according to the transmission start identifier and all sampling phase edges. Therefore, the sampling clock is divided by combining the rising edge and the falling edge of the sampling clock, and the data is sampled simultaneously and correspondingly based on the plurality of phase edges of the divided sampling clock, so that the data sampling point determining operation can be simplified, and the data sampling point determining efficiency and accuracy can be improved; and the data are sampled by combining the rising edge and the falling edge of the sampling clock, so that the sampling frequency of the clock can be reduced, and the hardware realization difficulty and the power consumption can be reduced.

Description

Method and device for determining data sampling points
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for determining a data sampling point.
Background
In a SOC (System-on-a-Chip) Chip, there are peripheral interfaces (e.g., MASTER/SPI/UART/NAND FLASH/SD/EMMC, etc.) using different protocols, and the SOC interacts with external devices by using these peripheral interfaces. In practical applications, the peripheral interface of the SOC chip is usually MASTER, the external device of the SOC chip is slave, and the working clock of the external device is usually provided by the SOC end of the SOC chip, while the data returned by the external device is usually clock-free. Therefore, the SOC interface controller of the SOC chip is required to be responsible for sampling of data.
Currently, a method for determining sampling points of data of an SOC interface controller generally comprises the following steps: and adjusting the phase of a sampling clock of the SOC chip, sampling data returned by an external device of the SOC chip, judging the correctness of the sampled data, finding an optimal sampling point of the data by combining a software algorithm (for example, a Monte Carlo sampling algorithm) after determining that the data is correct, configuring a controller of the SOC chip according to the found optimal sampling point, and repeating the operation of adjusting the phase of the sampling clock of the SOC chip to finish the determination of the sampling point of the data. However, the practice finds that the software flow of the method is complex, the determination efficiency and accuracy of the sampling points are low, and the sampling points are easy to drift out of the sampling window due to the influence of various factors (such as chip difference, environment and chip temperature change, working voltage, working frequency, PCB layout and external connection device difference, and the like), so that the stability of data transmission is influenced, and the data transmission efficiency is reduced. Therefore, how to simplify the operation of determining the sampling point and improve the efficiency and accuracy of determining the sampling point is a technical problem to be solved.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method and a device for determining a data sampling point, which can simplify the operation for determining the sampling point and improve the efficiency and accuracy of determining the sampling point.
In order to solve the above technical problems, a first aspect of an embodiment of the present invention discloses a method for determining a data sampling point, where the method includes:
performing phase edge dividing operation on the sampling clock based on the rising edge of the acquired sampling clock and the falling edge of the sampling clock to obtain a preset number of sampling phase edges, wherein the phase corresponding to each sampling phase edge is sequentially delayed by a preset angle;
and acquiring target data sent by external equipment according to all the sampling phase edges, obtaining a transmission start identifier corresponding to the target data, and determining sampling points of the target data according to the transmission start identifier and all the sampling phase edges.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, after the determining, according to the transmission start identifier and all the sampling phase edges, a sampling point of the target data, the method further includes:
judging whether the number of the sampling points is larger than or equal to the determined sampling point number threshold value, judging whether the number of the sampling points is odd or not when the judgment result is yes, and updating the sampling point which is positioned at the middle of all the sampling points into the sampling point of the target data when the number of the sampling points is judged to be odd;
When the number of the sampling points is judged to be even, two sampling points which are positioned at the middle and adjacent to each other are screened from all the sampling points, and phase division operation is carried out on the two adjacent sampling points, so that the sampling points of the target data are obtained.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, after the determining, according to the transmission start identifier and all the sampling phase edges, a sampling point of the target data, the method further includes:
acquiring the sampling condition of each sampling point, wherein the sampling condition of each sampling point comprises the establishment margin of the sampling point and the holding margin of the sampling point;
and after the two sampling points which are the most middle and adjacent are selected from all the sampling points, and before the two adjacent sampling points are subjected to phase division operation, the method further comprises the steps of:
judging whether the two adjacent sampling points do not meet the determined data sampling requirement according to the sampling conditions of the two adjacent sampling points;
and when the data sampling requirement is judged not to be met, triggering and executing the operation of executing phase division on two adjacent sampling points to obtain the sampling points of the target data.
In an optional implementation manner, in the first aspect of the embodiment of the present invention, after it is determined that the data sampling requirement is met, it is determined whether the target data is multi-bit data, and when the determination result is yes, the operation of performing the phase division operation on two adjacent sampling points is triggered to obtain the sampling point of the target data.
In an optional implementation manner, in a first aspect of the embodiment of the present invention, the determining, according to sampling conditions of two adjacent sampling points, whether the two adjacent sampling points do not meet the determined data sampling requirement includes:
judging whether two adjacent sampling points have target sampling points with target margin larger than or equal to the determined margin threshold according to sampling conditions of the two adjacent sampling points, wherein the target margin comprises a setup margin and/or a hold margin;
and when judging that at least one target sampling point exists, determining that two adjacent sampling points do not meet the determined data sampling requirement.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the method further includes:
And when the number of the sampling points is smaller than or equal to the threshold value of the number of the sampling points, performing delay operation on the phases corresponding to all the sampling phase edges based on the determined delay phases, and re-performing the operation of acquiring the target data according to all the sampling phase edges to obtain the transmission start identifier corresponding to the target data.
As an optional implementation manner, in the first aspect of the embodiment of the present invention, the determining, according to the transmission start identifier and all the sampling phase edges, a sampling point of the target data includes:
determining a starting sampling phase edge from all the sampling phase edges according to the transmission starting identification, wherein the starting sampling phase edge is a phase edge with a changed data state, which is used for representing that the data state is changed from a high level to a low level or from a low level to a high level, of all the sampling phase edges, wherein the data state of the target data is firstly acquired;
and traversing all the sampling phase edges from the initial sampling phase edge, and determining the phase corresponding to the sampling phase edge capable of acquiring the target data as a sampling point of the target data.
The second aspect of the embodiment of the invention discloses a device for determining a data sampling point, which comprises:
the dividing module is used for performing phase edge dividing operation on the sampling clock based on the rising edge of the acquired sampling clock and the falling edge of the sampling clock to obtain a preset number of sampling phase edges, and the phase corresponding to each sampling phase edge is sequentially delayed by a preset angle;
the acquisition module is used for acquiring target data sent by external equipment according to all the sampling phase edges to obtain a transmission start identifier corresponding to the target data;
and the determining module is used for determining the sampling point of the target data according to the transmission starting identification and all the sampling phase edges.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the determining device further includes:
the judging module is used for judging whether the number of the sampling points is larger than or equal to the determined sampling point number threshold value after the determining module determines the sampling points of the target data according to the transmission starting identification and all the sampling phase edges;
the judging module is further used for judging whether the number of the sampling points is an odd number or not when judging that the number of the sampling points is larger than or equal to the threshold value of the number of the sampling points;
The updating module is used for updating the sampling points which are positioned at the middle among all the sampling points into the sampling points of the target data when the judging module judges that the number of the sampling points is odd;
the screening module is used for screening two sampling points which are positioned at the middle and adjacent from all the sampling points when the judging module judges that the number of the sampling points is even;
the dividing module is further configured to perform a phase dividing operation on two adjacent sampling points, so as to obtain sampling points of the target data.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the determining device further includes:
the acquisition module is used for acquiring the sampling condition of each sampling point after the determination module determines the sampling point of the target data according to the transmission starting identification and all the sampling phase edges, wherein the sampling condition of each sampling point comprises the establishment margin of the sampling point and the holding margin of the sampling point;
the judging module is further configured to judge whether the two adjacent sampling points do not meet the determined data sampling requirement according to the sampling condition of the two adjacent sampling points after the screening module screens the two sampling points which are located in the middle and are adjacent from all the sampling points, and before the dividing module performs phase division operation on the two adjacent sampling points to obtain the sampling point of the target data, and when the judging module judges that the data sampling requirement is not met, trigger the dividing module to perform the phase division operation on the two adjacent sampling points to obtain the sampling point of the target data.
In a second aspect of the embodiment of the present invention, the determining module is further configured to determine whether the target data is multi-bit data after determining that the data sampling requirement is met, and when the determination result is yes, trigger the dividing module to execute the phase dividing operation on two adjacent sampling points to obtain the operation of the sampling points of the target data.
In a second aspect of the embodiment of the present invention, the determining module determines, according to sampling conditions of two adjacent sampling points, whether the two adjacent sampling points do not meet the determined data sampling requirement, by specifically:
judging whether two adjacent sampling points have target sampling points with target margin larger than or equal to the determined margin threshold according to sampling conditions of the two adjacent sampling points, wherein the target margin comprises a setup margin and/or a hold margin;
and when judging that at least one target sampling point exists, determining that two adjacent sampling points do not meet the determined data sampling requirement.
As an optional implementation manner, in the second aspect of the embodiment of the present invention, the determining device further includes:
And the delay module is used for executing delay operation on the phases corresponding to all the sampling phase edges based on the determined delay phases when the judgment module judges that the number of the sampling points is smaller than or equal to the sampling point number threshold value, and triggering the acquisition module to execute the operation of acquiring the target data according to all the sampling phase edges again to obtain the transmission start identification corresponding to the target data.
In a second aspect of the embodiment of the present invention, the determining module determines, according to the transmission start identifier and all the sampling phase edges, a specific sampling point of the target data:
determining a starting sampling phase edge from all the sampling phase edges according to the transmission starting identification, wherein the starting sampling phase edge is a phase edge with a changed data state, which is used for representing that the data state is changed from a high level to a low level or from a low level to a high level, of all the sampling phase edges, wherein the data state of the target data is firstly acquired;
and traversing all the sampling phase edges from the initial sampling phase edge, and determining the phase corresponding to the sampling phase edge capable of acquiring the target data as a sampling point of the target data.
The third aspect of the present invention discloses another device for determining a data sampling point, where the device for determining a data sampling point includes:
a memory storing executable program code;
a processor coupled to the memory;
the processor invokes the executable program code stored in the memory to perform the method for determining the data sampling points disclosed in the first aspect of the present invention.
A fourth aspect of the present invention discloses a computer storage medium storing computer instructions which, when called, are adapted to perform the method of determining data sampling points disclosed in the first aspect of the present invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the embodiment of the invention discloses a method and a device for determining a data sampling point, wherein the method comprises the steps of performing phase edge dividing operation on a sampling clock based on the rising edge of the acquired sampling clock and the falling edge of the sampling clock to obtain a preset number of sampling phase edges, and sequentially lagging the phase corresponding to each sampling phase edge by a preset angle; and acquiring target data sent by the external equipment according to all sampling phase edges, obtaining a transmission start identifier corresponding to the target data, and determining sampling points of the target data according to the transmission start identifier and all sampling phase edges. Therefore, the embodiment of the invention divides the sampling clock by combining the rising edge and the falling edge of the sampling clock, and samples corresponding data based on a plurality of phase edges of the divided sampling clock, so that the operation of determining the sampling point of the data can be simplified, and the efficiency and the accuracy of determining the sampling point of the data can be improved; and the data are sampled by combining the rising edge and the falling edge of the sampling clock, so that the sampling frequency of the clock can be reduced, and the hardware realization difficulty and the power consumption can be reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for determining data sampling points according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for determining data sampling points according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a device for determining a data sampling point according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of another apparatus for determining data sampling points according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a determining device for data sampling points according to another embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a determining device for data sampling points according to another embodiment of the present invention;
FIG. 7 is a timing diagram of a single bit data sample point according to an embodiment of the present invention;
FIG. 8 is a timing diagram of a multi-bit data sampling point according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or device that comprises a list of steps or elements is not limited to the list of steps or elements but may, in the alternative, include other steps or elements not expressly listed or inherent to such process, method, article, or device.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The invention discloses a method and a device for determining a data sampling point, which can divide a sampling clock by combining the rising edge and the falling edge of the sampling clock, sample corresponding data at the same time based on a plurality of phase edges of the divided sampling clock, simplify the determination operation of the data sampling point, and be beneficial to improving the determination efficiency and accuracy of the data sampling point; and the data are sampled by combining the rising edge and the falling edge of the sampling clock, so that the sampling frequency of the clock can be reduced, and the hardware realization difficulty and the power consumption can be reduced. The following will describe in detail.
Example 1
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for determining a data sampling point according to an embodiment of the present invention. The method for determining the data sampling points described in fig. 1 is applied to a data sampling system/a data sampling device/a data sampling server (wherein the data sampling server comprises a local data sampling server or a cloud data sampling server). As shown in fig. 1, the method for determining the data sampling point may include the following operations:
101. And performing phase edge dividing operation on the sampling clock based on the rising edge of the acquired sampling clock and the falling edge of the sampling clock to obtain a preset number of sampling phase edges.
In the embodiment of the invention, the sampling clock can be a high-frequency clock (for example, 100M) or a low-frequency clock (for example, 100K). Further, the sampling clock may be divided according to an equal-proportion division manner or an arbitrary division manner, so as to obtain a preset number (for example, 3) of sampling phase edges. When the sampling clocks are divided according to the equal-proportion dividing mode, the preset angles of sequentially lagging each sampling phase along the corresponding phase are the same, for example: and dividing the sampling phase edges into 4 sampling phase edges in equal proportion, and sequentially lagging the corresponding phase of each sampling phase edge by 90 degrees. It should be noted that, the number of sampling phase edges of the sampling clock depends on the required sampling precision, that is, the higher the required sampling precision is, the greater the number of sampling phase edges is, that is, the greater the value of the preset number is.
102. And acquiring target data sent by the external equipment according to all sampling phase edges, and obtaining a transmission start identifier corresponding to the target data.
In the embodiment of the present invention, the protocol between the data sampling system and the external device includes one of interface protocols such as SD, EMMC, SPI and UART, which is not limited in the embodiment of the present invention. Wherein the data line or command line will typically have a distinct start and end identifier, such as: the high level is the start mark, i.e. the start mark, the low level is the end mark, i.e. the end mark, or the low level is the start mark, i.e. the start mark, and the high level is the end mark, i.e. the end mark. In the case of non-data or non-command transmission, the data line or the command line is kept in a fixed state idle, i.e. in a high state or in a low state. Therefore, the sampling clock divided into a plurality of sampling phase edges is used for monitoring the transmission start identification of the data sent by the external equipment in real time, and automatically tracking the edge change of the returned data to select the sampling point of the data so as to finish the data sampling.
103. And determining the sampling point of the target data according to the transmission start identification and all sampling phase edges.
As an alternative embodiment, determining the sampling point of the target data according to the transmission start identifier and all sampling phase edges includes:
determining an initial sampling phase edge from all sampling phase edges according to the transmission initial identification, wherein the initial sampling phase edge is a phase edge with a changed data state of the target data acquired first in all sampling phase edges;
and traversing all sampling phase edges from the initial sampling phase edge, and determining the phase corresponding to the sampling phase edge capable of acquiring the target data as a sampling point of the target data.
In this alternative embodiment, the change in data state is used to indicate a change from high to low or from low to high.
In this alternative embodiment, if the number of sampling phase edges is odd, when the sampling phase edge located in the middle collects the target data, the sampling phase edge located in the middle is determined to be the optimal sampling point of the target data, so that the optimal sampling point of the target data can be determined, and the power consumption of the data sampling system can be reduced.
In this alternative embodiment, when the transmission start identifier of the target data is collected, it indicates that the target data is collected, that is, the corresponding sampling phase edge is the sampling point of the target data. Further, when a certain sampling phase edge collects the transmission start identification of the target data, a certain sampling phase edge is marked, and the sequence of the transmission start identification of the target data collected by all sampling phase edges is obtained. Therefore, the sequence of the transmission start mark of the collected target data is favorable for further improving the accuracy and the efficiency of determining the sampling point of the target data.
It can be seen that this alternative embodiment enables the determination of the sampling points of the data and the reduction of the occurrence of omission of the sampling points of the data by traversing all the sampling phase points based on the determined starting sampling phase edges.
In an alternative embodiment, after performing the finishing step 103, the method for determining a data sampling point may further include the following operations:
judging whether the number of the sampling points is greater than or equal to the determined sampling point number threshold value, judging whether the number of the sampling points is odd when the judgment result is yes, and updating the sampling point which is positioned at the most middle of all the sampling points into the sampling point of the target data when the number of the sampling points is judged to be odd;
When the number of the sampling points is judged to be even, two sampling points which are positioned at the middle and are adjacent are screened from all the sampling points, and phase division operation is carried out on the two adjacent sampling points, so that the sampling points of the target data are obtained.
In this alternative embodiment, the number of sampling points threshold is less than or equal to the preset number in step 101, i.e. the maximum value of the number of sampling points threshold is equal to the number of sampling phase edges. For example: the number of sampling points may be 1 or 2, where it is to be noted that when the number of sampling points is 1, the number of sampling points of the target data is only 1, that is, the sampling point is the middle sampling point in all the sampling points.
In this optional embodiment, as an optional implementation manner, performing a phase division operation on two adjacent sampling points to obtain a sampling point of the target data may include:
and executing division operation on two adjacent sampling points based on the determined division mode to obtain the sampling points of the target data.
In this alternative embodiment, the division includes an equal-scale division or any division. For the description of this division manner, please refer to the above detailed description of the division of the sampling clock, which is not repeated herein, and preference is given to equal-proportion division.
For example, when the number of sampling points obtained in step 103 is 4, the phase between the 2 nd sampling point and the 3 rd sampling point is selected to divide the 3 sampling points in a further equal proportion, and the middle sampling point of the 3 sampling points is obtained as the sampling point of the target data.
Therefore, in this optional embodiment, after the sampling points of the data are obtained, the final sampling point of the data is further accurately determined according to the number of sampling points, that is, if the number of sampling points is odd, the sampling point located in the middle is directly used as the final sampling point of the data, and if the number of sampling points is even, fine sampling point adjustment is performed on the data by two sampling points located in the middle and adjacent to each other, so that the accuracy of determining the sampling points of the data can be further improved, the sampling frequency of a clock is further reduced, the unstable or failed sampling point is automatically eliminated, and thus the stability of data sampling is further improved, and the implementation difficulty and the power consumption of hardware are reduced.
In yet another alternative embodiment, the method for determining the data sampling point may further include the operations of:
and when the number of the sampling points is less than or equal to the threshold value of the number of the sampling points, performing delay operation on the phases corresponding to all sampling phase edges based on the determined delay phases (for example, 22.5 degrees), and re-performing the operation of acquiring the target data according to all the sampling phase edges to obtain the transmission start identifier corresponding to the target data.
In this alternative embodiment, the number of sampling points is different, corresponding to different delay phases, for example: the value of the delay phase corresponding to the number of sampling points being 0 is larger than the value of the delay phase corresponding to the number of sampling points being 1.
In this alternative embodiment, the step of performing the delay operation on the phases corresponding to all the sampling phase edges based on the determined delay phases is divided into coarse delay and fine delay, so as to obtain delayed sampling phase edges, i.e. the delay operation is performed on the phases corresponding to all the sampling phase edges by selecting a larger delay phase (for example, 22.5 °) and then the delay operation is performed on the phases corresponding to all the sampling phase edges by selecting a smaller delay phase (for example, 5 °). Thus, the method is beneficial to improving the accuracy of determining the sampling points of the data and the efficiency of determining the sampling points of the data.
It can be seen that, in this alternative embodiment, when the number of sampling points of the data is determined to be smaller, the phases corresponding to all the adopted phase edges are delayed, so that a sufficient number of adopted points can be obtained, thereby being beneficial to obtaining accurate sampling points of the data.
In yet another alternative embodiment, after performing the finishing step 103, the method for determining a data sampling point may further include the following operations:
Acquiring the sampling condition of each sampling point, wherein the sampling condition of each sampling point comprises the establishment margin of the sampling point and the holding margin of the sampling point;
and after screening the two sampling points which are positioned at the middle and are adjacent from all the sampling points, and before performing phase division operation on the two adjacent sampling points to obtain the sampling points of the target data, the method for determining the data sampling points can further comprise the following operations:
judging whether the two adjacent sampling points do not meet the determined data sampling requirement according to the sampling conditions of the two adjacent sampling points;
when the data sampling requirement is judged not to be met, triggering and executing the operation of executing the phase division operation on the two adjacent sampling points to obtain the sampling points of the target data.
In this optional embodiment, as an optional implementation manner, determining whether the two adjacent sampling points do not meet the determined data sampling requirement according to the sampling conditions of the two adjacent sampling points includes:
judging whether target sampling points with target margin larger than or equal to the determined margin threshold exist in the two adjacent sampling points according to sampling conditions of the two adjacent sampling points, wherein the target margin comprises a setup margin and/or a hold margin;
When at least one target sampling point is judged to exist, determining that two adjacent sampling points do not meet the determined data sampling requirement.
In the optional implementation manner, when it is determined that the target margin is not greater than or equal to the determined margin threshold value for the two adjacent sampling points, it is determined that the two adjacent sampling points all meet the data sampling requirement, and at this time, the two adjacent sampling points are all determined to be final sampling points of the target data.
In this alternative embodiment, the sampling condition of each sampling point includes a setup margin of the sampling point and a hold margin of the sampling point, where the setup margin of each sampling point is used to indicate a duration that the sampling point holds before the target data is acquired, and the hold margin of each sampling point is used to indicate a duration that the sampling point holds after the target data is acquired.
In this way, by comparing the establishment margin and/or the holding margin of two adjacent sampling points with the determined margin threshold, if the margin threshold is greater than or equal to the margin threshold, the sampling points are judged not to meet the data sampling requirement, and the accuracy and the efficiency of determining that the sampling points do not meet the data sampling requirement can be improved.
Therefore, in this optional embodiment, after the sampling points of the data are obtained, the sampling condition of each sampling point is further obtained, and after the number of sampling points is even and two adjacent sampling points in the middle are obtained, whether the two adjacent sampling points meet the data sampling requirement is judged, if not, the subsequent fine tuning operation of the data sampling points is executed, so that not only can the high-precision sampling points be obtained, but also the power consumption of the data sampling device can be reduced.
In yet another alternative embodiment, the method for determining the data sampling point may further include the operations of:
and after judging that the data sampling requirement is met, judging whether the target data is multi-bit data (for example, 4-bit data), and when the judgment result is yes, triggering and executing the operation of executing the phase division operation on two adjacent sampling points to obtain the sampling points of the target data.
Therefore, after judging that two adjacent sampling points meet the sampling requirement of the data, the optional embodiment further judges whether the data is multi-bit data, if so, the phase fine tuning dividing operation is executed, so that the situation that the sampling stability of the data is poor due to the fact that the sampling window is reduced due to the influence of factors such as the turning speed of the data and the data transmission delay can be reduced, namely, the high sampling stability is still maintained under the condition that the sampling clock is not increased, and the implementation difficulty and the power consumption of hardware are further reduced.
In order to make the present solution more clear to the person skilled in the art, the present solution is first illustrated in connection with fig. 7 and 8:
as shown in fig. 7, for sampling of single bit data, the sampling window T of the sampling clock, the transmission start of the data is identified as low level (S in fig. 7), and four different phase edges of the sampling clock continuously sample the data transmitted by the external device at the same time. When phase3 in the four phase edges is sampled to a low level firstly, namely, the state that the data is changed from a high level to a low level is sampled firstly, determining that phase3 is a first phase edge, and when all phase edges phase0, phase1 and phase2 lagging behind phase3 collect the data from a high level to a low level, all phase3, phase0, phase1 and phase2 are sampling points of the data. Still further, as shown in fig. 7, when the acquired data is di_s0, the setup margin from the falling edge of the di_s0 data to the rising edge of phase3 is Δt (0 < Δt < T/4). If the phase delayed by 90 degrees is selected, the phase edge of the searched sampling point is phase0, and at the moment, for the phase0 phase edge, the di_s0 data sampling point has a setup margin of T/4+delta T and a hold margin of 3T/4-delta T. If a 180 DEG delayed phase is selected, and the phase edge phase1 is taken as a sampling point, a margin for T/2+delta T establishment exists and a margin for T/2-delta T is kept. At this time, since the difference between the setup margin and the hold margin of the two sampling points phase0 and phase1 is relatively large, the two sampling points phase0 and phase1 are both deviated from the sampling intermediate point. At this time, three sampling points of m0, m1 and m2 can be added between phase0 and phase1, wherein the m0 sampling point has a setup margin of T/4+T/16+Δt and a hold margin of 3T/4-T/16- Δt; the m1 sampling point has a setup margin of T/4+T/8+Deltat and a hold margin of 3T/4-T/8-Deltat; the m2 sampling points have a setup margin of T/4+3T/16+Deltat and a hold margin of 3T/4-3T/16-Deltat, and as can be seen, m0, m1 and m2 are respectively closer to the setup margin and the hold margin, therefore, by adding three sampling points of m0, m1 and m2 between phase0 and phase1, more accurate sampling points can be obtained, thereby being beneficial to obtaining more stable sampling data. It should be noted that, when the sampled data is di_s1, di_s2 or di_s3, the corresponding sampling phase edges are phase1, phase2 and phase3 respectively, and the principle is similar to that when the sampled data is di_s0, and will not be repeated here.
For the sampling of multi-bit data, as the data of each bit such as the data turning speed and the data transmission delay are different, the sampling window T is reduced, as shown in FIG. 8, only phase1 and phase2 are available in the data sampling phase shown in the figure, and the sampling stability of phase1 is poor because the setup time deltat 1 is too small and phase2 is too small because the hold time deltat 2 is too small. At this time, a clock phase fine tuning device is added between phase1 and phase2, which is equivalent to m0, m1 and m2 sampling points, wherein the m0 sampling point has a setup margin of T/16+Δt1 and a hold margin of 3T/16+Δt2; the m1 sampling point has a setup margin of T/8+Deltat1 and a hold margin of T/8+Deltat2; the m2 sampling point has a setup margin of 3T/16+Deltat1 and a hold margin of T/16+Deltat2; at this time, the establishment margin and the holding margin of m1 are balanced most and the anti-interference capability is strongest by comparing m0, m1 and m2, so that the m1 sampling point is selected as the final sampling point, and the data sampling stability can be optimized. Thus, better sampling stability can be maintained without raising the sampling clock, so that the dynamic power consumption of the data sampling system can be reduced to 1/4 of that of the method which also uses only the high-frequency clock locking phase.
Therefore, the method for determining the data sampling point described in fig. 1 can divide the sampling clock by combining the rising edge and the falling edge of the sampling clock, and sample corresponding data at the same time based on a plurality of phase edges of the divided sampling clock, so that the operation for determining the data sampling point can be simplified, and the efficiency and accuracy for determining the data sampling point can be improved; and the data are sampled by combining the rising edge and the falling edge of the sampling clock, so that the sampling frequency of the clock can be reduced, and the hardware realization difficulty and the power consumption can be reduced.
Example two
Referring to fig. 2, fig. 2 is a flowchart illustrating another method for determining a data sampling point according to an embodiment of the present invention. The method for determining the data sampling points described in fig. 2 is applied to a data sampling system/a data sampling device/a data sampling server (wherein the data sampling server comprises a local data sampling server or a cloud data sampling server). As shown in fig. 2, the method for determining the data sampling point may include the following operations:
201. and performing phase edge dividing operation on the sampling clock based on the rising edge of the acquired sampling clock and the falling edge of the sampling clock to obtain a preset number of sampling phase edges.
In the embodiment of the invention, each sampling phase sequentially lags behind the corresponding phase by a preset angle.
202. And acquiring target data sent by the external equipment according to all sampling phase edges, and obtaining a transmission start identifier corresponding to the target data.
203. And determining sampling points of the target data according to the transmission start identification and all sampling phase edges, wherein the number of the target sampling points is larger than 1.
204. Judging whether the target data is multi-bit data or not, and triggering and executing step 205 when the judging result is yes; and ending the flow when the judgment result is negative.
In the embodiment of the present invention, optionally, when the result of the determination in step 204 is no, the step of triggering and executing the foregoing determination whether the number of sampling points is greater than or equal to the determined threshold value of the number of sampling points may be performed.
205. And performing phase division operation on all sampling points of the target data to obtain a final sampling point of the target data.
In the embodiment of the present invention, for determining sampling points of multi-bit data, when performing phase division operation on all sampling points of target data, the sampling points may be selectively divided into more sampling points, for example: the phase between phase1 and phase2 is divided into 6 sampling points, and then the middle sampling point is selected as the final sampling point of the target data, so that the occurrence of unstable sampling caused by the reduction of sampling windows is further reduced by dividing more sampling points, and the accuracy and efficiency of determining the optimal sampling point are further improved.
In the embodiment of the present invention, other descriptions of performing the phase dividing operation on all sampling points of the target data refer to the related descriptions in the first embodiment, and are not described herein.
Therefore, in the embodiment of the invention, after the sampling point of the target data is obtained, whether the target data is multi-bit data is further judged, if yes, the phase fine adjustment dividing operation is executed, so that the condition that the sampling stability of the data is poor due to the fact that the sampling window is reduced due to the influence of factors such as the data turning speed and the data transmission delay can be reduced, namely, the high sampling stability is still maintained under the condition that the sampling clock is not increased, and the realization difficulty and the power consumption of hardware are further reduced.
In the embodiment of the present invention, please refer to the detailed description of step 101 to step 103 in the first embodiment for the description of step 201 to step 203, and the description of the embodiment of the present invention is omitted.
Therefore, the method for determining the data sampling point described in fig. 2 can be implemented by dividing the sampling clock by combining the rising edge and the falling edge of the sampling clock, and simultaneously sampling corresponding data based on a plurality of phase edges of the divided sampling clock, so that the operation for determining the data sampling point can be simplified, and the efficiency and accuracy for determining the data sampling point can be improved; and the data are sampled by combining the rising edge and the falling edge of the sampling clock, so that the sampling frequency of the clock can be reduced, and the hardware realization difficulty and the power consumption can be reduced. In addition, the situation that the sampling window is reduced due to the influence of factors such as the data overturning speed and the data transmission delay to cause poor data sampling stability can be reduced, namely, the high sampling stability is still maintained under the condition that the sampling clock is not increased, and the realization difficulty and the power consumption of hardware are further reduced.
Example III
Referring to fig. 3, fig. 3 is a schematic structural diagram of a data sampling point determining apparatus according to an embodiment of the present invention. The determination device of the data sampling point described in fig. 3 is applied to a data sampling system/data sampling device/data sampling server (wherein the data sampling server comprises a local data sampling server or a cloud data sampling server). As shown in fig. 3, the determining device of the data sampling point may include a dividing module 301, an acquisition module 302, and a determining module 303, where:
and the dividing module 301 is configured to perform a phase edge dividing operation on the sampling clock based on the obtained rising edge of the sampling clock and the obtained falling edge of the sampling clock, so as to obtain a preset number of sampling phase edges, where a phase corresponding to each sampling phase edge is sequentially delayed by a preset angle.
And the acquisition module 302 is configured to acquire target data sent by the external device according to all sampling phase edges, and obtain a transmission start identifier corresponding to the target data.
A determining module 303, configured to determine a sampling point of the target data according to the transmission start identifier and all sampling phase edges.
Therefore, the device for determining the data sampling point described in fig. 3 can divide the sampling clock by combining the rising edge and the falling edge of the sampling clock, and sample the corresponding data at the same time based on a plurality of phase edges of the divided sampling clock, so that the operation for determining the data sampling point can be simplified, and the efficiency and accuracy for determining the data sampling point can be improved; and the data are sampled by combining the rising edge and the falling edge of the sampling clock, so that the sampling frequency of the clock can be reduced, and the hardware realization difficulty and the power consumption can be reduced.
In another alternative embodiment, as shown in fig. 4, the apparatus further includes a judging module 304, an updating module 305, and a screening module 306, where:
the determining module 304 is configured to determine whether the number of sampling points is greater than or equal to the determined threshold number of sampling points after the determining module 303 determines the sampling points of the target data according to the transmission start identifier and all sampling phase edges.
The judging module 304 is further configured to judge whether the number of sampling points is an odd number when it is judged that the number of sampling points is greater than or equal to the threshold value of the number of sampling points.
And an updating module 305, configured to update the sampling point in the middle among all the sampling points to the sampling point of the target data when the judging module 304 judges that the number of sampling points is odd.
And a screening module 306, configured to screen two sampling points that are the most middle and adjacent from all the sampling points when the determining module 304 determines that the number of sampling points is even.
The dividing module 301 is further configured to perform a phase dividing operation on two adjacent sampling points, so as to obtain a sampling point of the target data.
It can be seen that, by implementing the determining device for data sampling points described in fig. 4, after obtaining the sampling points of the data, the final sampling point of the data is further accurately determined according to the number of sampling points, that is, if the number of sampling points is odd, the sampling point located in the middle is directly used as the final sampling point of the data, and if the number of sampling points is even, fine sampling point adjustment is performed on the data by two sampling points located in the middle and adjacent to each other, so that the accuracy of determining the sampling points of the data can be further improved, the sampling frequency of a clock is further reduced, and the situation that the sampling points are unstable or fail is automatically eliminated, thereby further facilitating the improvement of the stability of data sampling, and realizing the reduction of the implementation difficulty and the power consumption of hardware.
In yet another alternative embodiment, as shown in fig. 4, the apparatus further comprises an acquisition module 307, wherein:
the obtaining module 307 is configured to obtain a sampling condition of each sampling point after the determining module 303 determines the sampling point of the target data according to the transmission start identifier and all sampling phase edges, where the sampling condition of each sampling point includes a setup margin of the sampling point and a hold margin of the sampling point.
The judging module 304 is further configured to judge whether the two adjacent sampling points do not meet the determined data sampling requirement according to the sampling condition of the two adjacent sampling points after the screening module 306 screens the two sampling points that are located in the middle and are adjacent from all the sampling points, and before the dividing module 301 performs the phase division operation on the two adjacent sampling points to obtain the sampling point of the target data, and when it is judged that the data sampling requirement is not met, trigger the dividing module 301 to perform the phase division operation on the two adjacent sampling points to obtain the sampling point of the target data.
It can be seen that, after the data sampling point determining device described in fig. 4 is implemented to obtain the sampling point of the data, the sampling condition of each sampling point is further obtained, and after the number of sampling points is even and two adjacent sampling points in the middle are obtained, whether the two adjacent sampling points meet the data sampling requirement is judged, if not, the subsequent fine adjustment operation of the data sampling point is executed, so that not only can the high-precision sampling point be obtained, but also the power consumption of the data sampling device can be reduced.
In yet another alternative embodiment, as shown in fig. 4, the determining module 304 is further configured to determine whether the target data is multi-bit data after determining that the data sampling requirement is met, and when the determination result is yes, trigger the dividing module 301 to perform the above-mentioned phase dividing operation on two adjacent sampling points to obtain the sampling point of the target data.
Therefore, the determining device for implementing the data sampling points described in fig. 4 further determines whether the data is multi-bit data after determining that two adjacent sampling points meet the sampling requirement of the data, if yes, the phase fine adjustment dividing operation is performed, so that the situation that the sampling window is reduced due to the influence of factors such as the turning speed of the data and the data transmission delay to cause poor data sampling stability can be reduced, that is, under the condition that the sampling clock is not raised, high sampling stability is still maintained, and the implementation difficulty and the power consumption of hardware are further reduced.
In yet another alternative embodiment, as shown in fig. 4, the determining module 304 determines whether the two adjacent sampling points do not meet the determined data sampling requirement according to the sampling condition of the two adjacent sampling points, specifically:
Judging whether target sampling points with target margin larger than or equal to the determined margin threshold exist in the two adjacent sampling points according to sampling conditions of the two adjacent sampling points, wherein the target margin comprises a setup margin and/or a hold margin;
when at least one target sampling point is judged to exist, determining that two adjacent sampling points do not meet the determined data sampling requirement.
Therefore, the determining device for the data sampling points described in fig. 4 is implemented by comparing the setup margin and/or the hold margin of two adjacent sampling points with the determined margin threshold, and if the setup margin and/or the hold margin are greater than or equal to the margin threshold, determining that the sampling points do not meet the data sampling requirement can improve the accuracy and the efficiency of determining that the sampling points do not meet the data sampling requirement.
In yet another alternative embodiment, as shown in fig. 4, the apparatus further comprises a delay module 308, wherein:
and the delay module 308 is configured to, when the number of sampling points is determined to be less than or equal to the threshold value of the number of sampling points by the determining module 304, perform a delay operation on phases corresponding to all sampling phase edges based on the determined delay phases, and trigger the acquisition module 302 to acquire the target data according to all sampling phase edges, so as to obtain an operation of a transmission start identifier corresponding to the target data.
Therefore, when the determining device for data sampling points described in fig. 4 determines that the number of data sampling points is smaller, the phase corresponding to all the adopted phase edges is delayed, so that a sufficient number of adopted points can be obtained, and accurate data sampling points can be obtained.
In yet another alternative embodiment, as shown in fig. 4, the determining module 303 determines the sampling point of the target data according to the transmission start identifier and all sampling phase edges specifically includes:
determining a starting sampling phase edge from all sampling phase edges according to a transmission starting identifier, wherein the starting sampling phase edge is a phase edge in which the data state of target data is changed, and the data state is changed to represent that the data state is changed from a high level to a low level or from a low level to a high level, wherein the data state is firstly acquired in all sampling phase edges;
and traversing all sampling phase edges from the initial sampling phase edge, and determining the phase corresponding to the sampling phase edge capable of acquiring the target data as a sampling point of the target data.
In this alternative embodiment, if the number of sampling phase edges is odd, when the sampling phase edge located in the middle collects the target data, the sampling phase edge located in the middle is determined to be the optimal sampling point of the target data, so that the optimal sampling point of the target data can be determined, and the power consumption of the data sampling system can be reduced.
In this alternative embodiment, when the transmission start identifier of the target data is collected, it indicates that the target data is collected, that is, the corresponding sampling phase edge is the sampling point of the target data. Further, when a certain sampling phase edge collects the transmission start identification of the target data, a certain sampling phase edge is marked, and the sequence of the transmission start identification of the target data collected by all sampling phase edges is obtained. Therefore, the sequence of the transmission start mark of the collected target data is favorable for further improving the accuracy and the efficiency of determining the sampling point of the target data.
It can be seen that implementing the data sampling point determining apparatus described in fig. 4 can implement the determination of the sampling point of the data and reduce the occurrence of the omission of the data sampling point by traversing all the sampling phase points based on the determined initial sampling phase edge.
Example IV
Referring to fig. 5, fig. 5 is a schematic diagram of a determining apparatus for determining a data sampling point according to another embodiment of the present invention. The data sampling point determining apparatus described in fig. 5 is applied to a data sampling system/data sampling device/data sampling server (wherein the data sampling server includes a local data sampling server or a cloud data sampling server). As shown in fig. 5, the determining device of the data sampling point may include: the clock management module 200 includes a clock phase generating module, a clock fine tuning module, and a phase generating module, the data selecting module 400 includes a determining unit and a selecting unit, wherein an input end of the clock management module 200 is electrically connected to an output end of the clock module 100, clock ports of the plurality of data sampling modules 300 are electrically connected to a plurality of output ends of the clock management module 200 in a one-to-one correspondence manner, and an input end of the data selecting module 400 is electrically connected to an output end of each data sampling module 300, wherein:
A clock module 100 for generating a sampling clock.
A clock phase generating module, configured to divide the sampling clock output by the clock module 100 into a plurality of phase edges with different phases, such as: 4 phase edges, phase0, phase1, phase2, phase3; phase fine adjustment means (clock fine adjustment module and phase generation module) for generating fine adjustment phases with respect to respective phase edges, for example: phase0 and phase0_del phases are only phase-adjusted by the phase fine adjustment means (e.g., 5 °); phase1 and phase1_del phases are only phase-adjusted by the phase fine adjustment device (e.g., 5), and so on.
A plurality of data sampling modules 300 for sampling data using respective phase edges output by 200.
Further, the data port of each data sampling module 300 is adapted to be electrically connected to the data output terminal of the external device (di), so as to trace the data output terminal according to the received phase edges.
The data selecting module 400 is configured to select sampling points of data according to the sequence of tracking the transmission start identifier of the data along the phase edges of a plurality of different phases.
Further, the data selecting module 400 includes a determining unit and a selecting unit, wherein the determining unit is configured to determine a first phase edge (initial phase edge) of the plurality of phase edges that is first tracked to the transmission start identifier; and a selecting unit configured to select any one of the phase edges located after the first phase edge and before the last phase edge as a sampling point of the data. The last phase edge is the end phase edge corresponding to the first phase edge as the initial phase edge.
In the embodiment of the present invention, the clock module 100, the clock management module 200, the plurality of data sampling modules 300 and the data selecting module 400 refer to the detailed description of the functions of the corresponding modules in the third embodiment, and are not repeated herein.
Therefore, the data sampling point determining device described in fig. 5 can divide the sampling clock by combining the rising edge and the falling edge of the sampling clock, and sample corresponding data at the same time based on a plurality of phase edges of the divided sampling clock, so that the data sampling point determining operation can be simplified, and the data sampling point determining efficiency and accuracy can be improved; and the data are sampled by combining the rising edge and the falling edge of the sampling clock, so that the sampling frequency of the clock can be reduced, and the hardware realization difficulty and the power consumption can be reduced.
Example five
Referring to fig. 6, fig. 6 is a schematic diagram of a determining apparatus for determining a data sampling point according to another embodiment of the present invention. The data sampling point determining apparatus described in fig. 6 is applied to a data sampling system/data sampling device/data sampling server (wherein the data sampling server includes a local data sampling server or a cloud data sampling server). As shown in fig. 6, the determining device of the data sampling point may include:
A memory 601 in which executable program codes are stored;
a processor 602 coupled to the memory 601;
further, an input interface 603 and an output interface 604 coupled to the processor 602 may also be included;
wherein the processor 602 invokes executable program code stored in the memory 601 for performing the steps of the method for determining data sampling points described in embodiment one or embodiment two.
Example six
The embodiment of the invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the steps of the method for determining data sampling points described in the first embodiment or the second embodiment.
Example seven
An embodiment of the present invention discloses a computer program product comprising a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps of the method for determining a data sampling point described in the first or second embodiment.
The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above detailed description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product that may be stored in a computer-readable storage medium including Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable programmable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic disc Memory, tape Memory, or any other medium that can be used for computer-readable carrying or storing data.
Finally, it should be noted that: the method and the device for determining the data sampling point disclosed by the embodiment of the invention are only disclosed in the preferred embodiment of the invention, and are only used for illustrating the technical scheme of the invention, but are not limited to the technical scheme; although the invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that; the technical scheme recorded in the various embodiments can be modified or part of technical features in the technical scheme can be replaced equivalently; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (9)

1. A method for determining a data sampling point, the method comprising:
performing phase edge dividing operation on the sampling clock based on the rising edge of the acquired sampling clock and the falling edge of the sampling clock to obtain a preset number of sampling phase edges, wherein the phase corresponding to each sampling phase edge is sequentially delayed by a preset angle;
acquiring target data sent by external equipment according to all sampling phase edges, obtaining a transmission start identifier corresponding to the target data, and determining sampling points of the target data according to the transmission start identifier and all sampling phase edges;
And determining the sampling point of the target data according to the transmission start identifier and all the sampling phase edges, including:
determining a starting sampling phase edge from all the sampling phase edges according to the transmission starting identification, wherein the starting sampling phase edge is a phase edge with a changed data state, which is used for representing that the data state is changed from a high level to a low level or from a low level to a high level, of all the sampling phase edges, wherein the data state of the target data is firstly acquired;
and traversing all the sampling phase edges from the initial sampling phase edge, and determining the phase corresponding to the sampling phase edge capable of acquiring the target data as a sampling point of the target data.
2. The method according to claim 1, wherein after determining the sampling point of the target data based on the transmission start identification and all the sampling phase edges, the method further comprises:
judging whether the number of the sampling points is larger than or equal to the determined sampling point number threshold value, judging whether the number of the sampling points is odd or not when the judgment result is yes, and updating the sampling point which is positioned at the middle of all the sampling points into the sampling point of the target data when the number of the sampling points is judged to be odd;
When the number of the sampling points is judged to be even, two sampling points which are positioned at the middle and adjacent to each other are screened from all the sampling points, and phase division operation is carried out on the two adjacent sampling points, so that the sampling points of the target data are obtained.
3. The method according to claim 2, wherein after determining the sampling point of the target data based on the transmission start identification and all the sampling phase edges, the method further comprises:
acquiring the sampling condition of each sampling point, wherein the sampling condition of each sampling point comprises the establishment margin of the sampling point and the holding margin of the sampling point;
and after the two sampling points which are the most middle and adjacent are selected from all the sampling points, and before the two adjacent sampling points are subjected to phase division operation, the method further comprises the steps of:
judging whether the two adjacent sampling points do not meet the determined data sampling requirement according to the sampling conditions of the two adjacent sampling points;
and when the data sampling requirement is judged not to be met, triggering and executing the operation of executing phase division on two adjacent sampling points to obtain the sampling points of the target data.
4. A method of determining a data sampling point according to claim 3, further comprising:
and after judging that the data sampling requirement is met, judging whether the target data is multi-bit data, and when the judging result is yes, triggering and executing the operation of executing phase division operation on two adjacent sampling points to obtain the sampling points of the target data.
5. The method for determining a data sampling point according to claim 3 or 4, wherein the determining whether the two adjacent sampling points do not meet the determined data sampling requirement according to sampling conditions of the two adjacent sampling points includes:
judging whether two adjacent sampling points have target sampling points with target margin larger than or equal to the determined margin threshold according to sampling conditions of the two adjacent sampling points, wherein the target margin comprises a setup margin and/or a hold margin;
and when judging that at least one target sampling point exists, determining that two adjacent sampling points do not meet the determined data sampling requirement.
6. The method for determining a data sampling point according to any one of claims 2 to 4, further comprising:
And when the number of the sampling points is smaller than or equal to the threshold value of the number of the sampling points, performing delay operation on the phases corresponding to all the sampling phase edges based on the determined delay phases, and re-performing the operation of acquiring the target data according to all the sampling phase edges to obtain the transmission start identifier corresponding to the target data.
7. A data sampling point determining apparatus, characterized in that the determining apparatus comprises:
the dividing module is used for performing phase edge dividing operation on the sampling clock based on the rising edge of the acquired sampling clock and the falling edge of the sampling clock to obtain a preset number of sampling phase edges, and the phase corresponding to each sampling phase edge is sequentially delayed by a preset angle;
the acquisition module is used for acquiring target data sent by external equipment according to all the sampling phase edges to obtain a transmission start identifier corresponding to the target data;
the determining module is used for determining sampling points of the target data according to the transmission starting identification and all the sampling phase edges;
and the determining module determines the sampling point of the target data according to the transmission start identifier and all the sampling phase edges as follows:
Determining a starting sampling phase edge from all the sampling phase edges according to the transmission starting identification, wherein the starting sampling phase edge is a phase edge with a changed data state, which is used for representing that the data state is changed from a high level to a low level or from a low level to a high level, of all the sampling phase edges, wherein the data state of the target data is firstly acquired;
and traversing all the sampling phase edges from the initial sampling phase edge, and determining the phase corresponding to the sampling phase edge capable of acquiring the target data as a sampling point of the target data.
8. A data sampling point determining apparatus, characterized in that the determining apparatus comprises:
a memory storing executable program code;
a processor coupled to the memory;
the processor invokes the executable program code stored in the memory to perform the method of determining a data sampling point as claimed in any one of claims 1 to 6.
9. A computer storage medium storing computer instructions which, when invoked, are adapted to perform the method of determining data sampling points according to any one of claims 1-6.
CN202010933980.6A 2020-09-08 2020-09-08 Method and device for determining data sampling points Active CN114153772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010933980.6A CN114153772B (en) 2020-09-08 2020-09-08 Method and device for determining data sampling points

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010933980.6A CN114153772B (en) 2020-09-08 2020-09-08 Method and device for determining data sampling points

Publications (2)

Publication Number Publication Date
CN114153772A CN114153772A (en) 2022-03-08
CN114153772B true CN114153772B (en) 2024-04-12

Family

ID=80460671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010933980.6A Active CN114153772B (en) 2020-09-08 2020-09-08 Method and device for determining data sampling points

Country Status (1)

Country Link
CN (1) CN114153772B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825794A (en) * 2005-02-24 2006-08-30 美国博通公司 Network device and method for prediction of an optimal sampling phase
EP1968070A1 (en) * 2007-03-08 2008-09-10 Samsung Electronics Co., Ltd. Memory controller
CN101771809A (en) * 2009-10-20 2010-07-07 大连捷成实业发展有限公司 Method for realizing multipath digital video synchronous processing on basis of FPGA
CN202033737U (en) * 2010-12-31 2011-11-09 威海北洋电气集团股份有限公司 FPGA-based high-speed data acquisition system
WO2011142721A1 (en) * 2010-05-14 2011-11-17 Agency For Science, Technology And Research System and method of sampling a signal having a plurality of identically shaped pulses
CN102714589A (en) * 2010-01-14 2012-10-03 维特赛半导体公司 Clock and data recovery for burst-mode serial signals
CN104219464A (en) * 2014-09-19 2014-12-17 北京空间机电研究所 Sampling location self-adaptive adjustment CCD video signal processing system
CN105205028A (en) * 2015-09-15 2015-12-30 珠海全志科技股份有限公司 Method and device for searching sampling point of data
CN109194460A (en) * 2018-10-26 2019-01-11 光梓信息科技(上海)有限公司 Clock data recovery circuit, adaptive adjustment module and method
CN111124998A (en) * 2018-10-30 2020-05-08 三星电子株式会社 System on chip, operating method thereof and electronic device comprising system on chip

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2389969A1 (en) * 2002-06-25 2003-12-25 John W. Bogdan Digital signal processing of multi-sampled phase

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825794A (en) * 2005-02-24 2006-08-30 美国博通公司 Network device and method for prediction of an optimal sampling phase
EP1968070A1 (en) * 2007-03-08 2008-09-10 Samsung Electronics Co., Ltd. Memory controller
CN101771809A (en) * 2009-10-20 2010-07-07 大连捷成实业发展有限公司 Method for realizing multipath digital video synchronous processing on basis of FPGA
CN102714589A (en) * 2010-01-14 2012-10-03 维特赛半导体公司 Clock and data recovery for burst-mode serial signals
WO2011142721A1 (en) * 2010-05-14 2011-11-17 Agency For Science, Technology And Research System and method of sampling a signal having a plurality of identically shaped pulses
CN202033737U (en) * 2010-12-31 2011-11-09 威海北洋电气集团股份有限公司 FPGA-based high-speed data acquisition system
CN104219464A (en) * 2014-09-19 2014-12-17 北京空间机电研究所 Sampling location self-adaptive adjustment CCD video signal processing system
CN105205028A (en) * 2015-09-15 2015-12-30 珠海全志科技股份有限公司 Method and device for searching sampling point of data
CN109194460A (en) * 2018-10-26 2019-01-11 光梓信息科技(上海)有限公司 Clock data recovery circuit, adaptive adjustment module and method
CN111124998A (en) * 2018-10-30 2020-05-08 三星电子株式会社 System on chip, operating method thereof and electronic device comprising system on chip

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于FPGA的高精度随机等效采样系统的实现;刘莎;张福洪;易志强;;南阳理工学院学报(第02期);5-8 *

Also Published As

Publication number Publication date
CN114153772A (en) 2022-03-08

Similar Documents

Publication Publication Date Title
CN107402597B (en) Method, device, medium and magnetic resonance equipment for aligning data and clock
US11177827B2 (en) Encoder signal sampling method and device
US9031182B2 (en) Method and circuit for clock recovery of a data stream description
CN106301378B (en) A kind of high-speed DAC synchronous method and circuit
US7778093B2 (en) Memory control circuit capable of dynamically adjusting deglitch windows, and related method
CN103092258B (en) Clock generation circuit self correcting system and bearing calibration thereof
CN109831206B (en) Delay locked loop and delay locking method
CN115312092B (en) Gate-controlled data strobe signal generation circuit and signal generation method and device thereof
US20230006676A1 (en) Method and apparatus for synchronizing two systems
CN112910498A (en) PMF-FFT measurement and control signal capturing device and method
CN114153772B (en) Method and device for determining data sampling points
CN109543811B (en) Counting circuit, counting method and chip
CN109167705B (en) Method and system for acquiring delay step time in storage module
CN107622785B (en) Method and system for measuring data reading time of embedded memory
CN111541446B (en) Clock synchronization circuit
CN109359010B (en) Method and system for obtaining internal transmission delay of storage module
CN109450755B (en) Method and system for enhancing stability margin of memory module bus interface
CN203340051U (en) Phase-locked loop system
CN105634474B (en) Leggy delay-locked loop
CN105205028A (en) Method and device for searching sampling point of data
CN109359067B (en) Method and system for acquiring delay step time in storage module
EP4152019A1 (en) Current-sampling method, chip, and sampling apparatus for phase current of motor
CN115664626B (en) Clock phase determining method and device, near field communication chip and near field communication equipment
Huang et al. Automatic calibration method of multi-component synchronization for ultra-fast parallelized sampling systems
CN109284239B (en) Method and system for acquiring delay step time in storage module

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant