[go: up one dir, main page]

CN105630067A - A high-precision clock detection method based on FPGA - Google Patents

A high-precision clock detection method based on FPGA Download PDF

Info

Publication number
CN105630067A
CN105630067A CN201510994485.5A CN201510994485A CN105630067A CN 105630067 A CN105630067 A CN 105630067A CN 201510994485 A CN201510994485 A CN 201510994485A CN 105630067 A CN105630067 A CN 105630067A
Authority
CN
China
Prior art keywords
clock
signal
event
fpga
detection method
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.)
Pending
Application number
CN201510994485.5A
Other languages
Chinese (zh)
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.)
Haohan Data Technology Co ltd
Original Assignee
Haohan Data 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 Haohan Data Technology Co ltd filed Critical Haohan Data Technology Co ltd
Priority to CN201510994485.5A priority Critical patent/CN105630067A/en
Publication of CN105630067A publication Critical patent/CN105630067A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/14Time supervision arrangements, e.g. real time clock

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Manipulation Of Pulses (AREA)

Abstract

The invention discloses a high-precision clock detection method based on FPGA (field programmable gate array), and relates to a clock detection method. The invention can obviously improve the time control precision of realizing the 1588 function in the FPGA.

Description

一种基于FPGA的高精度时钟检测方法A high-precision clock detection method based on FPGA

技术领域technical field

本发明涉及一种时钟检测方法,特别是涉及一种基于FPGA的高精度时钟检测方法。The invention relates to a clock detection method, in particular to an FPGA-based high-precision clock detection method.

背景技术Background technique

1588具有纳秒级别的精确度,信息短、占据带宽资源少,综合成本低,可靠性高,因此目前社会在积极推动1588协议的发展和应用。1588 has nanosecond-level accuracy, short information, less bandwidth resources, low overall cost, and high reliability. Therefore, the society is currently actively promoting the development and application of the 1588 protocol.

目前,基于FPGA的1588时钟解决方案主要有以下特点:At present, the FPGA-based 1588 clock solution mainly has the following characteristics:

1、直接使用本地时钟直接检测时钟事件(报文到达或者离开);1. Directly use the local clock to directly detect clock events (message arrival or departure);

2、时钟(Timer)采用简单的计数器逻辑维护;2. The clock (Timer) is maintained by simple counter logic;

现有技术的缺点:Disadvantages of existing technology:

1、检测时钟时间(报文到达或者离开)的精度低,直接影响对时准确度;1. The accuracy of detecting clock time (message arrival or departure) is low, which directly affects the accuracy of time synchronization;

2、时钟采用简单的技术器逻辑维护,控制精度低,误差大。2. The clock is maintained by simple technical logic, with low control precision and large errors.

发明内容Contents of the invention

有鉴于现有技术的上述缺陷,本发明所要解决的技术问题是提供一种提高时钟事件的检测精度的方法。In view of the above-mentioned defects in the prior art, the technical problem to be solved by the present invention is to provide a method for improving the detection accuracy of clock events.

为实现上述目的,本发明提供了一种基于FPGA的高精度时钟检测方法,在一个时钟周期内产生多个相位不同的时钟信号,通过判断被测量信号与各个时钟信号的相位关系,确定被测信号发生时间;In order to achieve the above object, the present invention provides a high-precision clock detection method based on FPGA, which generates multiple clock signals with different phases in one clock cycle, and determines the phase relationship between the measured signal and each clock signal by judging the phase relationship between the measured signal and each clock signal. signal occurrence time;

系统主时钟产生n个相位时钟信号,n为正整数;时钟事件的到达,以一个上升沿脉冲表示;D触发器的时钟输入端接收到时钟信号作为D触发器的数据输入信号;所述时钟信号将一个系统时钟周期分割成n个区域,然后判断时钟事件的发生区域。The system master clock generates n phase clock signals, n is a positive integer; the arrival of the clock event is represented by a rising edge pulse; the clock input terminal of the D flip-flop receives the clock signal as the data input signal of the D flip-flop; the clock The signal divides a system clock cycle into n regions, and then determines the occurrence region of the clock event.

较佳的,所述判断时钟事件的发生区域按以下步骤进行:当时钟事件信号到达,D触发器将锁存输出各个相位时钟信号,输出一个4比特编码值;根据解码映射表,确定事件发生区域。Preferably, the determination of the occurrence area of the clock event is carried out according to the following steps: when the clock event signal arrives, the D flip-flop will latch and output each phase clock signal, and output a 4-bit encoded value; according to the decoding mapping table, determine the occurrence of the event area.

本发明的有益效果是:本发明能够明显提高在FPGA中实现1588功能的时间控制精度。The beneficial effect of the present invention is: the present invention can obviously improve the time control precision of realizing 1588 function in FPGA.

附图说明Description of drawings

图1是本发明多相位检测的结构框图;Fig. 1 is the structural block diagram of polyphase detection of the present invention;

图2是多相位检测的原理图。Figure 2 is a schematic diagram of multi-phase detection.

具体实施方式detailed description

下面结合附图和实施例对本发明作进一步说明:Below in conjunction with accompanying drawing and embodiment the present invention will be further described:

如图1和图2所示,一种基于FPGA的高精度时钟检测方法,其特征在于:在一个时钟周期内产生多个相位不同的时钟信号,通过判断被测量信号与各个时钟信号的相位关系,确定被测信号发生时间;As shown in Figure 1 and Figure 2, an FPGA-based high-precision clock detection method is characterized in that: multiple clock signals with different phases are generated within one clock cycle, and the phase relationship between the measured signal and each clock signal is judged , to determine the occurrence time of the signal under test;

系统主时钟产生n个相位时钟信号,n为正整数。在本实施例中,产生四个相位时钟信号,相位间隔是90度。时间事件的到达,以一个上升沿脉冲表示(以报文的SOF信号上升沿信号表示的话,该信号将作为D触发器的时钟信号),它将发送到D触发器的时钟输入端;4个相位的时钟信号作为D触发器的数据输入信号。四相位的时钟信号,将一个系统时钟周期分割成4个区域,由于本发明能够判断事件的发生区域,那么事件检测的准确度理论上将提高四倍。The system master clock generates n phase clock signals, where n is a positive integer. In this embodiment, four phase clock signals are generated with a phase interval of 90 degrees. The arrival of the time event is represented by a rising edge pulse (if it is represented by the rising edge signal of the SOF signal of the message, this signal will be used as the clock signal of the D flip-flop), which will be sent to the clock input of the D flip-flop; 4 The clock signal of the phase is used as the data input signal of the D flip-flop. The four-phase clock signal divides a system clock cycle into four regions, and since the present invention can judge the occurrence region of an event, the accuracy of event detection will theoretically be increased by four times.

所述判断时钟事件的发生区域按以下步骤进行:当时钟事件信号到达(SOF),D触发器将锁存输出各个相位时钟信号,输出一个4比特编码值给解码器;根据解码映射表,确定事件发生区域。为阐述本实施例,设定系统时钟125MHz(周期8ns),从表1中可以看到,不考虑其它因素影响的前提下,事件到达时间的判决精度可以从8ns提高到2ns。The occurrence region of the described judgment clock event is carried out according to the following steps: when the clock event signal arrives (SOF), the D flip-flop will latch and output each phase clock signal, and output a 4-bit encoded value to the decoder; according to the decoding mapping table, determine The area where the incident occurred. To illustrate this embodiment, the system clock is set to 125 MHz (period 8 ns). It can be seen from Table 1 that the judgment accuracy of event arrival time can be increased from 8 ns to 2 ns without considering the influence of other factors.

表1.事件解码时间映射表Table 1. Event decoding time mapping table

以上详细描述了本发明的较佳具体实施例。应当理解,本领域的普通技术人员无需创造性劳动就可以根据本发明的构思作出诸多修改和变化。因此,凡本技术领域中技术人员依本发明的构思在现有技术的基础上通过逻辑分析、推理或者有限的实验可以得到的技术方案,皆应在由权利要求书所确定的保护范围内。The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make many modifications and changes according to the concept of the present invention without creative efforts. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning or limited experiments on the basis of the prior art shall be within the scope of protection defined by the claims.

Claims (2)

1.一种基于FPGA的高精度时钟检测方法,其特征在于:在一个时钟周期内产生多个相位不同的时钟信号,通过判断被测量信号与各个时钟信号的相位关系,确定被测信号发生时间;1. A high-precision clock detection method based on FPGA, characterized in that: a plurality of clock signals with different phases are produced in one clock cycle, and by judging the phase relationship between the measured signal and each clock signal, the time of occurrence of the measured signal is determined ; 系统主时钟产生n个相位时钟信号,n为正整数;时钟事件的到达,以一个上升沿脉冲表示;D触发器的时钟输入端接收到时钟信号作为D触发器的数据输入信号;所述时钟信号将一个系统时钟周期分割成n个区域,然后判断时钟事件的发生区域。The system master clock generates n phase clock signals, n is a positive integer; the arrival of the clock event is represented by a rising edge pulse; the clock input terminal of the D flip-flop receives the clock signal as the data input signal of the D flip-flop; the clock The signal divides a system clock cycle into n regions, and then determines the occurrence region of the clock event. 2.如权利要求1所述的一种基于FPGA的高精度时钟检测方法,其特征是:2. a kind of high-precision clock detection method based on FPGA as claimed in claim 1, is characterized in that: 所述判断时钟事件的发生区域按以下步骤进行:当时钟事件信号到达,D触发器将锁存输出各个相位时钟信号,输出一个4比特编码值;根据解码映射表,确定事件发生区域。The determination of the occurrence area of the clock event is carried out according to the following steps: when the clock event signal arrives, the D flip-flop will latch and output each phase clock signal, and output a 4-bit encoded value; determine the event occurrence area according to the decoding mapping table.
CN201510994485.5A 2015-12-25 2015-12-25 A high-precision clock detection method based on FPGA Pending CN105630067A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510994485.5A CN105630067A (en) 2015-12-25 2015-12-25 A high-precision clock detection method based on FPGA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510994485.5A CN105630067A (en) 2015-12-25 2015-12-25 A high-precision clock detection method based on FPGA

Publications (1)

Publication Number Publication Date
CN105630067A true CN105630067A (en) 2016-06-01

Family

ID=56045118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510994485.5A Pending CN105630067A (en) 2015-12-25 2015-12-25 A high-precision clock detection method based on FPGA

Country Status (1)

Country Link
CN (1) CN105630067A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5796682A (en) * 1995-10-30 1998-08-18 Motorola, Inc. Method for measuring time and structure therefor
CN102334038A (en) * 2009-02-27 2012-01-25 古野电气株式会社 Phase determining device and frequency determining device
CN102466748A (en) * 2010-11-03 2012-05-23 北京普源精电科技有限公司 Digital oscilloscope with equivalent sampling function, and equivalent sampling method for digital oscilloscope
CN103558753A (en) * 2013-10-30 2014-02-05 福建星网锐捷网络有限公司 High-resolution clock detection method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5796682A (en) * 1995-10-30 1998-08-18 Motorola, Inc. Method for measuring time and structure therefor
CN102334038A (en) * 2009-02-27 2012-01-25 古野电气株式会社 Phase determining device and frequency determining device
CN102466748A (en) * 2010-11-03 2012-05-23 北京普源精电科技有限公司 Digital oscilloscope with equivalent sampling function, and equivalent sampling method for digital oscilloscope
CN103558753A (en) * 2013-10-30 2014-02-05 福建星网锐捷网络有限公司 High-resolution clock detection method and device

Similar Documents

Publication Publication Date Title
CN109387776B (en) Method of measuring clock jitter, clock jitter measuring circuit, and semiconductor device
CN104535918B (en) A kind of cross clock domain lock unit internal constant test circuit and method
CN102291138B (en) A random time-to-digital converter
CN106385256A (en) Multi-channel parallel acquisition system with storage function and synchronous recognition function
CN103558753B (en) A kind of high-resolution clock detection method and device
CN105116318B (en) A kind of method that burr detection is realized in logic analyser
US7876873B2 (en) Asynchronous ping-pong counter and thereof method
CN103176059B (en) A kind of measure the method for pulse width, device and cymometer
CN107911102B (en) Synchronous filter and method for cross-clock domain asynchronous data
TWI586107B (en) Timing Error Detection and Correction Device and Its Normal Timing Design Method
CN105068405A (en) Method and device for highly precisely measuring single-channel signal pulse width through FPGA
CN106301378A (en) A high-speed DAC synchronization method and circuit
US8878569B1 (en) Self-recovering bus signal detector
US7936855B2 (en) Oversampling data recovery circuit and method for a receiver
CN107422193B (en) A circuit and method for measuring single particle flip transient pulse length
CN103645379A (en) TTL signal frequency hopping monitoring system and method
CN103312318B (en) A kind of High-accuracy phase frequency detector
CN103312307B (en) Clock frequency deviation detection method and device
CN105630067A (en) A high-precision clock detection method based on FPGA
WO2015124047A1 (en) Method and device for waveform analysis
US20120033772A1 (en) Synchroniser circuit and method
CN109104168B (en) A circuit for fine time measurement
CN104133407A (en) Counting device and method for incremental encoder
CN104639165B (en) Two step TDC full time-domain error correction circuit
TWI788592B (en) Signal detection circuit and signal detection method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160601

RJ01 Rejection of invention patent application after publication