CN117009267A - Method for inserting time information in source synchronous data stream - Google Patents
Method for inserting time information in source synchronous data stream Download PDFInfo
- Publication number
- CN117009267A CN117009267A CN202311277094.2A CN202311277094A CN117009267A CN 117009267 A CN117009267 A CN 117009267A CN 202311277094 A CN202311277094 A CN 202311277094A CN 117009267 A CN117009267 A CN 117009267A
- Authority
- CN
- China
- Prior art keywords
- time
- source synchronous
- transmission interval
- 1pps
- signal
- 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.)
- Granted
Links
- 230000001360 synchronised effect Effects 0.000 title claims abstract description 56
- 238000000034 method Methods 0.000 title claims abstract description 9
- 230000005540 biological transmission Effects 0.000 claims abstract description 50
- 230000000630 rising effect Effects 0.000 claims abstract description 5
- 238000013459 approach Methods 0.000 claims abstract description 4
- 230000004927 fusion Effects 0.000 claims abstract description 4
- 230000009191 jumping Effects 0.000 claims abstract description 3
- 238000012545 processing Methods 0.000 abstract description 6
- 238000012546 transfer Methods 0.000 abstract description 4
- 235000008694 Humulus lupulus Nutrition 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000002045 lasting effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 239000013598 vector Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
- G06F13/28—Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
Abstract
The application discloses a method for inserting time information in a source synchronous data stream, which relates to the technical field of signal processing, defines a fusion signal CLK_1PPS, and defines a source synchronous transmission interval and a time transmission interval; when the local real-time clock approaches 1 second and at least two source synchronous clock periods exist, if CLK_1PPS is high level, stopping jumping, setting and maintaining the signal, and when the local real-time clock reaches a 1 second boundary, resetting the signal, so that the CLK_1PPS signal generates high level pulses with the rising edge of more than two source synchronous clock periods, the rising edge of the pulses means that an interface signal enters a time transmission interval, and the falling edge means a boundary of 1 second in the absolute time; when the time transfer ends, clk_1pps is set for at least two clock cycles of the time transfer, and the interface returns to the source synchronous transfer interval. The application fuses the time interface into the source synchronous data stream to achieve the purpose of simplifying interface IO.
Description
Technical Field
The application relates to the technical field of signal processing, in particular to a method for inserting time information in a source synchronous data stream.
Background
Non-high-speed signal transmission inside electronic devices, inside boards or between boards often uses source synchronous interfaces, and a typical application scenario is between two programmable gate arrays FPGAs. The source synchronous interfaces are typically parallel buses. The source synchronous interface has the advantages that clocks at the two ends of the receiving and transmitting are homologous, and the data clocks are synchronous, so that transmission errors of data streams at the two ends of the bus can be avoided. The source synchronous interface is a parallel port, which has the disadvantage of occupying more bus input/output interfaces IO in the board. If time information needs to be transferred inside the device, such as from one chip to another, it is common practice to transfer time in the form of pulse-per-second + serial data. The second pulse 1PPS can precisely locate a boundary of one second in the absolute time, and the serial data is used to tell the receiving end the current absolute time value. The receiving end can completely synchronize the time information of the local real-time clock with the real-time clock of the transmitting end through the two signals. This approach requires the use of at least two IOs, one pulse per second signal, one (group) data signal. When we transmit source synchronous data stream and time information between two chips (such as FPGA), there is sometimes a scenario that the number of IOs is tight, i.e. there are not so many IOs to transmit all information, so we hope to have a scheme that can fuse time information into the source synchronous interface, so as to achieve the purpose of simplifying IOs.
Disclosure of Invention
The application aims to provide a method for inserting time information into a source synchronous data stream, which is used for solving the problem that IO resources are tensed when the source synchronous data stream and the time information are transmitted between FPGAs simultaneously in the prior art.
The application solves the problems by the following technical proposal:
a method of inserting time information in a source synchronous data stream, comprising:
step S1, defining a fusion signal CLK_1PPS of second pulse information and source synchronous clock information, defining a source synchronous transmission interval and a time transmission interval, wherein the source synchronous transmission interval refers to a source synchronous data stream transmitted by an interface, and the time transmission interval refers to current time information transmitted by the interface;
step S2, when the local real-time clock approaches 1 second and at least two source synchronous clock periods exist, if CLK_1PPS is high level, stopping jumping, setting and maintaining the signal, and when the local real-time clock reaches a 1 second boundary, resetting the signal, so that the CLK_1PPS signal generates a high level pulse which is more than two source synchronous clock periods, the rising edge of the pulse means that an interface signal enters a time transmission interval, and the falling edge means a boundary of 1 second in absolute time;
and step S3, setting the CLK_1PPS to at least two clock cycles of time transmission after the time transmission is finished, and returning the interface to the source synchronous transmission interval.
Further comprises: the receiving end normally checks the high level duration of 1PPS at high frequency, when the high level which lasts for more than 1 source synchronous clock period is found in the source synchronous transmission interval, the 1 second boundary which indicates the absolute time comes immediately, and when the signal is checked to be 0, the 1 second boundary which indicates the absolute time at the moment.
Compared with the prior art, the application has the following advantages:
(1) The application fuses the time interface into the source synchronous data stream to achieve the purpose of simplifying interface IO. And inserting time information into the source synchronous data stream through the fusion signal CLK_1PPS, informing the receiving end of synchronizing the local real clock, negotiating the receiving and transmitting ends to continue transmitting the original data stream after the time information is sent, and reducing the influence on the bandwidth of the source data stream to the minimum.
(2) In the source synchronous transmission interval, the data bus transmits source synchronous data; in the time transmission interval, the data bus transmits the current time information. In order to reduce the bandwidth impact on the bus source synchronous data, it is necessary to transmit time information to the receiving end as soon as possible, i.e. the shorter the time transmission interval is, the better the compression. The second boundary can be accurately known by clk_1pps. In the time transmission interval, clk_1pps hops according to the clock frequency of the agreed time transmission interval, and provides a time reference for bus value judgment.
Drawings
FIG. 1 is a schematic diagram of the present application;
FIG. 2 is a flow chart of the present application;
FIG. 3 is a schematic diagram of transmission codes according to the present application;
fig. 4 is a flow chart of a receiving end processing in the present application.
Detailed Description
The present application will be described in further detail with reference to examples, but embodiments of the present application are not limited thereto.
Example 1:
a method of inserting time information in a source synchronous data stream, comprising:
1. clock and second pulse
First we fuse the information of the second pulse with the source-synchronous clock information, we define this signal as the fused signal clk_1pps. At the same time we define two transmission intervals: a source synchronous transmission interval and a time transmission interval, wherein the source synchronous transmission interval refers to a source synchronous data stream transmitted by an interface; the time transmission interval refers to the time information transmitted by the interface.
As shown in fig. 1, for the transmitting end, when the local real-time clock is very close to one second, but there are at least two source synchronous clock cycles, if clk_1pps is high, the transition is stopped, it is set and maintained, and when the local real-time clock reaches the 1 second boundary, the signal is reset. The clk_1PPS signal will thus generate a high pulse of more than two source synchronous clock cycles, the rising edge of which means that the interface signal enters the time transmission interval and the falling edge means the boundary of one second in absolute time.
When the time transmission is finished, clk_1pps is set for at least two clock cycles of the time transmission, and the interface returns to the data stream transmission interval.
The processing flow of the transmitting end is shown in fig. 2, and the receiving end normally checks the high level duration of clk_1pps at high frequency. When a high level lasting more than 1 source synchronous clock period is found in the source synchronous transmission interval, a 1 second boundary indicating time is immediately arrived. When the signal is checked to be set to 0, this indicates that this time is the 1 second boundary of absolute time. At the end of the time transmission, clk_1pps sets two periods and returns to the source synchronous transmission interval.
2. Data bus
In the source synchronous transmission interval, the data bus transmits source synchronous data; in the time transmission interval, the data bus transmits the current time information. In order to reduce the bandwidth impact on the bus source synchronous data, it is necessary to transmit time information to the receiving end as soon as possible, i.e. the shorter the time transmission interval is, the better the compression.
The second boundary can be accurately known by clk_1pps. In the time transmission interval, clk_1pps hops according to the clock frequency of the agreed time transmission interval, and provides a time reference for bus value judgment.
In conventional processing, a high level on the data bus represents a 1, and a low level represents a 0. In the application, in order to compress the time transmission interval to the minimum, two judgment vectors of duty ratio and phase are introduced besides high and low levels. In one period of the time transmission interval, each transmission code is defined as shown in table 1 with reference to the period time of clk_1pps:
table 1 transmission coding table
The coding scheme is shown in fig. 3.
The processing flow of the receiving end is shown in fig. 4. The coding of the transmitting end is the same.
The information of year, month, day, time, minute and second is transmitted in the time transmission interval through the codes, so that the receiving end receives the absolute time information of the current moment, and the receiving end synchronizes the absolute time information to the local real clock in the next second.
Although the application has been described herein with reference to the above-described illustrative embodiments thereof, the foregoing embodiments are merely preferred embodiments of the present application, and it should be understood that the embodiments of the present application are not limited to the above-described embodiments, and that numerous other modifications and embodiments can be devised by those skilled in the art that will fall within the scope and spirit of the principles of this disclosure.
Claims (2)
1. A method of inserting time information in a source synchronous data stream, comprising:
step S1, defining a fusion signal CLK_1PPS of second pulse information and source synchronous clock information, defining a source synchronous transmission interval and a time transmission interval, wherein the source synchronous transmission interval refers to a source synchronous data stream transmitted by an interface, and the time transmission interval refers to current time information transmitted by the interface;
step S2, when the local real-time clock approaches 1 second and at least two source synchronous clock periods exist, if CLK_1PPS is high level, stopping jumping, setting and maintaining the signal, and when the local real-time clock reaches a 1 second boundary, resetting the signal, so that the CLK_1PPS signal generates a high level pulse which is more than two source synchronous clock periods, the rising edge of the pulse means that an interface signal enters a time transmission interval, and the falling edge means a boundary of 1 second in absolute time;
and step S3, setting the CLK_1PPS to at least two clock cycles of time transmission after the time transmission is finished, and returning the interface to the source synchronous transmission interval.
2. The method of inserting time information in a source synchronous data stream of claim 1, further comprising: the receiving end normally checks the high level duration of 1PPS at high frequency, when the high level which lasts for more than 1 source synchronous clock period is found in the source synchronous transmission interval, the 1 second boundary which indicates the absolute time comes immediately, and when the signal is checked to be 0, the 1 second boundary which indicates the absolute time at the moment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311277094.2A CN117009267B (en) | 2023-10-07 | 2023-10-07 | Method for inserting time information in source synchronous data stream |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311277094.2A CN117009267B (en) | 2023-10-07 | 2023-10-07 | Method for inserting time information in source synchronous data stream |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117009267A true CN117009267A (en) | 2023-11-07 |
CN117009267B CN117009267B (en) | 2024-01-30 |
Family
ID=88567565
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311277094.2A Active CN117009267B (en) | 2023-10-07 | 2023-10-07 | Method for inserting time information in source synchronous data stream |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117009267B (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020087921A1 (en) * | 2000-12-29 | 2002-07-04 | Rodriguez Pablo M. | Method and apparatus for detecting and recovering from errors in a source synchronous bus |
US20030217301A1 (en) * | 2002-05-16 | 2003-11-20 | Levy Paul S. | Method and apparatus for transmitting side-band data within a source synchronous clock signal |
CN1529958A (en) * | 2001-02-24 | 2004-09-15 | ��M�������� | Data catching technology for high-speed signals |
CN202818320U (en) * | 2012-08-30 | 2013-03-20 | 上海远景数字信息技术有限公司 | Clock server based on multi-mode clock source synchronization |
CN104484011A (en) * | 2014-11-25 | 2015-04-01 | 上海高性能集成电路设计中心 | Distributive control and double-clock asynchronous sending and receiving module and FIFO (First In First Out) device |
CN105262565A (en) * | 2015-09-11 | 2016-01-20 | 烽火通信科技股份有限公司 | Coding method and coding system capable of transmitting clock and data based on phase modulation |
CN109981205A (en) * | 2019-02-22 | 2019-07-05 | 烽火通信科技股份有限公司 | The transmission method and system of 1PPS+TOD signal |
US20190296723A1 (en) * | 2018-03-23 | 2019-09-26 | Sandisk Technologies Llc | Receiver-side setup and hold time calibration for source synchronous systems |
CN210041846U (en) * | 2019-06-05 | 2020-02-07 | 北京国盾量子信息技术有限公司 | Quantum communication network time synchronization system and quantum communication network |
CN112838860A (en) * | 2019-11-23 | 2021-05-25 | 西安诺瓦星云科技股份有限公司 | Data output method, device and system |
CN113746587A (en) * | 2020-05-29 | 2021-12-03 | 深圳市中兴微电子技术有限公司 | Timestamp information transmission method, device, equipment and storage medium |
CN113965287A (en) * | 2021-09-29 | 2022-01-21 | 中国船舶重工集团公司七五0试验场 | LinkPort communication system and method based on FPGA |
-
2023
- 2023-10-07 CN CN202311277094.2A patent/CN117009267B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020087921A1 (en) * | 2000-12-29 | 2002-07-04 | Rodriguez Pablo M. | Method and apparatus for detecting and recovering from errors in a source synchronous bus |
CN1529958A (en) * | 2001-02-24 | 2004-09-15 | ��M�������� | Data catching technology for high-speed signals |
US20030217301A1 (en) * | 2002-05-16 | 2003-11-20 | Levy Paul S. | Method and apparatus for transmitting side-band data within a source synchronous clock signal |
CN202818320U (en) * | 2012-08-30 | 2013-03-20 | 上海远景数字信息技术有限公司 | Clock server based on multi-mode clock source synchronization |
CN104484011A (en) * | 2014-11-25 | 2015-04-01 | 上海高性能集成电路设计中心 | Distributive control and double-clock asynchronous sending and receiving module and FIFO (First In First Out) device |
CN105262565A (en) * | 2015-09-11 | 2016-01-20 | 烽火通信科技股份有限公司 | Coding method and coding system capable of transmitting clock and data based on phase modulation |
US20190296723A1 (en) * | 2018-03-23 | 2019-09-26 | Sandisk Technologies Llc | Receiver-side setup and hold time calibration for source synchronous systems |
CN109981205A (en) * | 2019-02-22 | 2019-07-05 | 烽火通信科技股份有限公司 | The transmission method and system of 1PPS+TOD signal |
CN210041846U (en) * | 2019-06-05 | 2020-02-07 | 北京国盾量子信息技术有限公司 | Quantum communication network time synchronization system and quantum communication network |
CN112838860A (en) * | 2019-11-23 | 2021-05-25 | 西安诺瓦星云科技股份有限公司 | Data output method, device and system |
CN113746587A (en) * | 2020-05-29 | 2021-12-03 | 深圳市中兴微电子技术有限公司 | Timestamp information transmission method, device, equipment and storage medium |
CN113965287A (en) * | 2021-09-29 | 2022-01-21 | 中国船舶重工集团公司七五0试验场 | LinkPort communication system and method based on FPGA |
Non-Patent Citations (1)
Title |
---|
管叙民: "嵌入式计算机标准互联体系及传输方法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 4, pages 136 - 1084 * |
Also Published As
Publication number | Publication date |
---|---|
CN117009267B (en) | 2024-01-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11558136B2 (en) | High speed embedded protocol for distributed control system | |
US10673565B2 (en) | Confirming data accuracy in a distributed control system | |
EP2140589B1 (en) | Method of synchronising data | |
EP2976866B1 (en) | Timestamp correction in a multi-lane communication link with skew | |
CN106936531B (en) | A kind of synchronous method of multi-disc based on JESD204B agreements ADC | |
CN109032498B (en) | Waveform quantization synchronization method of multi-FPGA multi-channel acquisition system | |
JPH08509580A (en) | Delay line separator for data bus | |
EP1958404A2 (en) | Alignment and deskew for multiple lanes of serial interconnect | |
CN111510277B (en) | Multi-channel signal synchronization system, circuit and method | |
US20160087737A1 (en) | A network receiver for a network using distributed clock synchronization and a method of sampling a signal received from the network | |
EP3748512A1 (en) | Method for a slave device for calibrating its output timing, method for a master device for enabling a slave device to calibrate its output timing, master device and slave device | |
CN114328347A (en) | Method for improving SPI bus frequency | |
CN117009267B (en) | Method for inserting time information in source synchronous data stream | |
US6326824B1 (en) | Timing synchronizing system, devices used in the system, and timing synchronizing method | |
CN115080489A (en) | Propagation delay compensation for SPI interface | |
US20060098770A1 (en) | Synchronizer for passing data from a first system to a second system | |
US9208844B1 (en) | DDR retiming circuit | |
CN110875911B (en) | Communication protocol and communication method for supporting automatic identification of single data packet data bit number | |
US4327442A (en) | Clock recovery device | |
JPH1098763A (en) | Method and circuit for synchronizing pilot signal between base stations | |
US7180935B2 (en) | System and method for compensating for delay time fluctuations | |
CN114355032A (en) | Clock synchronization circuit, method, electronic device and medium for dual-core electric energy meter | |
CN117394852A (en) | Method and device for achieving output phase consistency of multi-path second pulse signals | |
GB2374768A (en) | Encoder for encoding data into a plurality of formats selected by control inputs, and corresponding decoder | |
JP5633132B2 (en) | Data transmission system and method, data transmitting apparatus and receiving apparatus |
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 |