KR970009679B1 - Device for measuring phase difference between clocks - Google Patents

Device for measuring phase difference between clocks Download PDF

Info

Publication number
KR970009679B1
KR970009679B1 KR1019940021842A KR19940021842A KR970009679B1 KR 970009679 B1 KR970009679 B1 KR 970009679B1 KR 1019940021842 A KR1019940021842 A KR 1019940021842A KR 19940021842 A KR19940021842 A KR 19940021842A KR 970009679 B1 KR970009679 B1 KR 970009679B1
Authority
KR
South Korea
Prior art keywords
phase difference
data
clock
difference data
receiving
Prior art date
Application number
KR1019940021842A
Other languages
Korean (ko)
Inventor
김대중
김흥국
Original Assignee
삼성전자 주식회사
김광호
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 삼성전자 주식회사, 김광호 filed Critical 삼성전자 주식회사
Priority to KR1019940021842A priority Critical patent/KR970009679B1/en
Application granted granted Critical
Publication of KR970009679B1 publication Critical patent/KR970009679B1/en

Links

Abstract

An apparatus for measuring a phase difference between clock signals is disclosed. The apparatus comprises a phase difference detector(10) detecting a phase difference between two clocks to provide a clock phase difference signal corresponding to the phase difference; a phase difference measuring unit(20), responsive to the clock phase difference signal, for outputting a phase difference data corresponding to the ratio of the clock phase difference signal; a latching unit(30,40) for latching the first phase difference data and latching each phase difference data at each input period to output an instant phase difference data; a phase difference changing detector(50) for receiving the first phase difference data and the instant phase difference data to provide a phase difference changing data corresponding to the changing quantity between the first phase difference data and the instant phase difference data; and an interrupt generator(60), responsive to the phase difference changing data, for generating a phase difference measuring data corresponding to the measured phase difference between two clocks.

Description

클럭간 위상차 측정기Clock-to-clock phase difference meter

제1도는 본 발명의 일 실시에에 따른 클럭간 위상차 측정기의 블럭 구성도.1 is a block diagram of a phase difference measuring device between clocks according to an exemplary embodiment of the present invention.

제2도는 제1도의 구성중 위상차 검출기(10)의 입출력 타이밍 일례도.2 is an example of input / output timing of the phase difference detector 10 in the configuration of FIG.

제3도는 제1도의 구성중 위상차 측정기(20)의 상세 구성도.3 is a detailed configuration diagram of the phase difference measuring instrument 20 in the configuration of FIG.

제4도는 전송률 19.2Kbps의 데이타 클럭에 대한 4.096MHz의 기준클럭 분주값을 나타내는 타이밍도.4 is a timing diagram showing a reference clock division value of 4.096 MHz for a data clock of 19.2 Kbps data rate.

제5도는 제4도의 분주값으로부터 위상차의 각 백분률에 따른 클럭 카운팅값과 위상차 데이타(DCBA)를 나타내는 상태도.5 is a state diagram showing a clock counting value and phase difference data (DCBA) according to each percentage of phase difference from the division value of FIG.

제6도는 본 발명의 일 실시예에 따라 처음값 래치부(30)에 래치되는 처음 위상차 데이타와 순간값 래치부(40)에 래치되는 순간 위상차 데이타의 비교에 의해 결정되는 위상차 변화량 데이타의 결정 상태도.6 is a determination state of phase difference amount data determined by comparing initial phase difference data latched by the initial value latch unit 30 and instantaneous phase difference data latched by the instantaneous value latch unit 40 according to an embodiment of the present invention. Degree.

제7도는 서로 다른 클럭원으로부터 발생되는 두 클럭간의 위상차를 일례로 도시한 파형도.7 is a waveform diagram showing an example of a phase difference between two clocks generated from different clock sources.

제8도는 제1도의 구성중 위상차 변화량 데이타 입력에 따른 인터럽터 발생부(60)의 위상차 측정 데이타 결정 상태도.FIG. 8 is a state diagram of phase difference measurement data determination of the interrupter generator 60 according to phase difference variation data input during configuration of FIG.

본 발명은 네트워크를 형성하는 데이타 통신시스템에 관한 것으로서, 특히 데이타 통신시스템의 서로 다른 클럭원으로부터 생성출력간의 위상차 측정기에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to data communication systems forming a network, and more particularly to a phase difference measurer between generation outputs from different clock sources of a data communication system.

일반적으로 네트워크를 형성하고 있는 데이타 통신시스템에 있어서, 송신측과 수신측은 각각 서로 다른 클럭원에 의해 생성되는 데이타 클럭을 사용하여 상호간의 데이타 송수신을 이루게 된다. 그러나 상술한 데이타 송수신에 있어서, 서로 다른 클럭원을 사용함으로써 두 데이타 클럭간에 정확한 동기가 이루어지지 않고 클럭간의 위상차가 발생할 때에는 데이타 송수신 에러가 발생하게 된다.In general, in a data communication system forming a network, a transmitting side and a receiving side use data clocks generated by different clock sources, respectively, to perform data transmission and reception with each other. However, in the above-described data transmission / reception, a data transmission / reception error occurs when a phase difference between clocks does not occur precisely between two data clocks by using different clock sources.

즉, 송신측(일례로 네트워크의 메인 통신시스템)과 수신측(일례로 터미널)의 두 클럭이 정확히 동기되지 않으면, 송신측의 클럭이 수신측(일례로 터미널)의 클럭보다 빠르거나 느린 경우가 존재한다. 이때 수신측의 클럭이 빠를 때에는 수신측이 송신측으로부터 보내진 데이타중 동일 데이타를 두변 가져가는 엘가 발생되는 문제점이 있었다. 또한 수신측의 클럭이 느릴때에는 수신측에서 상기 송신측으로부터 송신되어진 데이타중 일부를 상실하는 에러가 발생할 수 있다. 그러므로, 서로 다른 클럭원에서 생성출력되는 두 클럭간의 위상차에 의해 발생하는 데이타의 손실 또는 이중 수신의 경우를 없애기 위해서는 이 두 데이타 클럭간의 위상을 측정하여 측정된 값에 따라서 보상을 해주어야 한다.That is, if the two clocks of the transmitting side (such as the main communication system of the network) and the receiving side (such as the terminal) are not synchronized correctly, the clock of the transmitting side may be faster or slower than the clock of the receiving side (such as the terminal). exist. At this time, when the clock of the receiver is fast, there is a problem in that the receiver takes both sides of the same data among the data sent from the transmitter. In addition, when the clock of the receiver is slow, an error may occur in which the receiver loses some of the data transmitted from the transmitter. Therefore, in order to eliminate data loss or double reception caused by the phase difference between two clocks generated from different clock sources, the phases between the two data clocks must be measured and compensated according to the measured values.

따라서 본 발명의 목적은 네트워크를 형성하는 데이타 통신시스템에 있어서, 서로 다른 클럭원들로부터 생성되는 두 클럭간의 위상차를 측정하기 위한 클럭간 위상차 측정기를 제공함에 있다.Accordingly, an object of the present invention is to provide a phase difference clock measurer for measuring a phase difference between two clocks generated from different clock sources in a data communication system forming a network.

상술한 목적을 달성하기 위한 본 발명은 네트워크를 형성하는 데이타 통신시스템에 있어서, 서로 다른 클럭원으로부터 입력되는 제1 및 제2 클럭과 소정 기준클럭을 입력받으며, 상기 기준클럭에 동기하여 상기 제1 및 제2클럭간의 위상차를 구하고 상기 위상차에 대응하는 클럭위상차신호를 생성출력하는 위상차 검출수단과, 상기 클럭위상차신호를 입력받아 상기 기준클럭에 동기하여 상기 클럭위상차신호의 한주기동안 기준 클럭에 의한 현재 주기에서의 카운팅값을 구하고, 한주기전 위상차 데이타를 귀환입력받아 한주기전 카운팅값으로 치환하며, 상기 현재 주기의 카운팅값과 상기 한주기전 카운팅값을 비교하여 상기 클럭위상차신호의 변화률에 대응하는 위상차 데이타를 출력하는 위상차 측정수단과, 상기 위상차 데이타를 순차적으로 입력받아 최초 입력된 처음 위상차 데이타 및 각 입력주기에서의 상기 위상차 데이타를 각각 순간 위상차 데이타로 래치 출력하는 래치수단과, 상기 처음 위상차 데이타와 상기 순간 위상차 데이타를 각각 입력받으며, 상기 처음 위상차 데이타와 상기 순간 위상차 데이타의 위상차 변화량에 대응하는 위상차 변화량 데이타를 생성출력하는 위상차 변화량 검출수단과, 상기 위상차 변화량 데이타를 입력받아 상기 두 클럭간의 측정된 위상차에 대응하는 위상차 측정 데이타를 생성출력하는 인터럽트 발생수단으로 구성한다.According to an aspect of the present invention, a data communication system for forming a network includes a first and second clocks and a predetermined reference clock inputted from different clock sources, and are synchronized with the reference clock. And phase difference detection means for obtaining a phase difference between the second clocks and generating and outputting a clock phase difference signal corresponding to the phase difference, and receiving the clock phase difference signal and synchronizing with the reference clock to generate a phase difference signal based on the reference clock for one period of the clock phase difference signal. The counting value is calculated in the current period, and the phase difference data is fed back one cycle, and the counting value is replaced by one counting value. The counting value of the current period and the one-period counting value are compared to correspond to the rate of change of the clock phase difference signal. Phase difference measuring means for outputting phase difference data and the phase difference data sequentially A latch means for latching and outputting the first phase difference data and the phase difference data in each input period as instantaneous phase difference data, respectively, and receiving the first phase difference data and the instantaneous phase difference data, respectively, the first phase difference data and the instantaneous phase difference data; Phase difference amount detecting means for generating and outputting phase difference amount data corresponding to the phase difference amount of phase difference data, and interrupt generation means for receiving the phase difference amount data and generating and outputting phase difference measurement data corresponding to the measured phase difference between the two clocks. do.

이하 본 발명의 바람직한 구성 및 동작의 일 실시예를 첨부된 도면을 참조하여 상세히 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

제 1 도는 본 발명의 일 실시예에 따른 클럭간의 위상차 측정기의 블럭 구성도로서, 위상차 검출기(10)는 서로 다른 클럭원으로부터 입력되는 제1 및 제2 클럭(R1,R2)과 소정 기준클럭(C4M)을 입력받으며, 상기 기준클럭(C4M)에 동기하여 상기 두 입력클럭(R1,R2)의 위상차를 구하여 클럭위상차신호(R2-R1)로 출력한다.FIG. 1 is a block diagram of a phase difference measuring device between clocks according to an exemplary embodiment of the present invention, wherein the phase difference detector 10 includes first and second clocks R1 and R2 and predetermined reference clocks inputted from different clock sources. C4M) is input, and the phase difference between the two input clocks R1 and R2 is obtained in synchronization with the reference clock C4M and output as a clock phase difference signal R2-R1.

위상차 측정기(20)는 상기 클럭위상차신호(R2-R1)를 입력받으며, 상기 클럭위상차신호(R2-R1)의 한주기를 상기 기준클럭(C4M)에 동기하여 카운팅한 기준클럭 카운팅값(Q0~Q6)을 구하고, 이전 주기의 카운팅값(Q0'~Q6')과 비교하여 위상차신호의 변화를 대응하는 4비트의 위상차 데이타(DCBA)를 출력한다.The phase difference measuring unit 20 receives the clock phase difference signals R2-R1, and counts one reference period of the clock phase difference signals R2-R1 in synchronization with the reference clock C4M to calculate the reference clock counting values Q0 to Q6. ) Is compared with the counting values (Q0 'to Q6') of the previous period, and the 4-bit phase difference data (DCBA) corresponding to the change in the phase difference signal is output.

처음값 래치부(30)는 상기 위상차 데이타(DCBA)를 입력받으며, 시스템 초기화후 입력된 위상차 데이타(DCBA)를 처음 위상차 데이타로 래치 출력한다.The initial value latch unit 30 receives the phase difference data DCBA, and latches and outputs the phase difference data DCBA input as the first phase difference data after system initialization.

순간값 래치부(40)는 각 입력주기마다의 상기 위상차 데이타(DCBA)를 순차적으로 입력받아 순간 위상차 데이타로 래치 출력한다.The instantaneous value latch unit 40 sequentially receives the phase difference data DCBA for each input period and latches it as instantaneous phase difference data.

위상차 변화량 검출부(50)는 상기 처음값 래치부(30)로부터 래치 출력되는 처음 위상차 데이타와 상기 순간값 래치부(40)로부터 출력되는 순간 위상차 데이타를 각각 입력받아 상기 두 입력 위상차 데이타 간의 변화량에 대응하는 위상차 변화량 데이타를 출력한다.The phase difference change detection unit 50 receives the first phase difference data latch output from the initial value latch unit 30 and the instantaneous phase difference data output from the instantaneous value latch unit 40 to correspond to the amount of change between the two input phase difference data. Outputs phase difference change data.

인터럽트 발생부(60)는 상기 위상차 변화량 데이타를 입력받아 위상차 측정 데이타(D6~D0)로 변환 출력하고, 위상차의 변화에 대응하는 인터럽트신호(INT)를 생성출력한다.The interrupt generator 60 receives the phase difference change amount data, converts the phase difference measurement data D6 to D0, and generates and outputs an interrupt signal INT corresponding to the change of the phase difference.

제 2 도는 두 다른 클럭원으로부터 생성된 두 클럭(R1,R2)을 입력받아 상기 클럭위상차신호(R2-R1)를 출력하는 상기 위상차 검출기(10)의 입출력 타이밍을 일례로 도시한 타이밍도이다.2 is a timing diagram illustrating input and output timing of the phase difference detector 10 that receives two clocks R1 and R2 generated from two different clock sources and outputs the clock phase difference signals R2-R1.

제 3 도는 상술한 제 1 도의 구성중 상기 위상차 측정기(20)의 상게 구성도로서, 제 1 카운터(21)는 상기 클럭위상차신호(R2-R1)와 상기 기준클럭(C4M)을 입력받으며, 상기 클럭위상차신호(R2-R1)로 로우 상태구간을 상기 기준클럭(C4M)으로 카운팅하고, 그 카운팅값(Q0~Q6)을 출력한다.FIG. 3 is a schematic diagram of the phase difference measuring unit 20 of FIG. 1, wherein the first counter 21 receives the clock phase difference signals R2-R1 and the reference clock C4M. The low state section is counted to the reference clock C4M using the clock phase difference signals R2-R1, and the counting values Q0 to Q6 are output.

치환비교기(22)는 상기 카운팅값(Q0~Q6)을 입력받으며, 또한 한주기전에 입력된 클럭위상차신호(R2'-R1')에 따른 한주기전 위상차 데이타(D'C'B'A')를 피드백 입력받아 한주기전 카운팅값(Q0'~Q6')으로 치환하고, 상기 현재 주기에서의 카운팅값(Q0~Q6)과 비교하여 비교결과신호(OUT)를 출력한다.The substitution comparator 22 receives the counting values Q0 to Q6, and the phase difference data D'C'B'A 'before one cycle according to the clock phase difference signals R2'-R1' input one cycle ago. Is replaced with the counting values Q0 'to Q6' one cycle before, and compared with the counting values Q0 to Q6 in the current period to output the comparison result signal OUT.

제 2 카운터(23)는 상기 비교결과신호(OUT)를 카운트인에이블신호로 입력받으며, 상기 기준클럭(C4M)에 동기하여 16진 카운팅한 후 그 카운팅값을 현재 클럭위상차신호에 따른 상기 위상차 데이타(DCBA)로 출력한다.The second counter 23 receives the comparison result signal OUT as a count enable signal, hexadecimal counts in synchronization with the reference clock C4M, and sets the count value according to the current clock phase difference signal. Output to (DCBA).

제 4 도는 전송률 19.2Kbps의 데이타 클럭에 대한 4.096MHz의 기준클럭 분주값을 나타내는 타이밍도이다. 상술한 제 4 도는 CCITT V.100의 권고안에 따른 일례로서, 동기동작시 데이타 전송률 600bps×2n(n=0,1,2,3,4,5)중의 하나이며, 제 1 클럭(R1)의 결정은 0.6×[8Kbps×2n(n=0,1,2)]이다. 따라서 이 경우 위상차의 측정은 전송률 19.2Kbps, 9600bps 및 4800bps의 경우에 대한 위상차를 측정한다.4 is a timing diagram showing a reference clock division value of 4.096 MHz for a data clock of 19.2 Kbps. 4 is an example according to the recommendation of CCITT V.100, which is one of a data rate of 600bps × 2n (n = 0,1,2,3,4,5) during synchronous operation, and the first clock R1. The crystal of is 0.6 x [8 Kbps x 2 n (n = 0, 1, 2)]. Therefore, in this case, the measurement of the phase difference measures the phase difference for the cases of 19.2Kbps, 9600bps and 4800bps.

일례로 전송률 19.2Kbps의 데이타 클럭에 대해 4.096MHz의 기준클럭(C4M)을 사용한 경우,For example, using a 4.096 MHz reference clock (C4M) for a data clock of 19.2 Kbps.

상기 1식에 의거하여 전송률 19.2Kbps의 데이타 클럭에 213.333만큼의 분주를 실행하여 위상차를 측정하게 된다. 즉 상술한 제 4 도는 분주값 및 타이밍을 도시하고 있으며, 213.333의 분주값을 대신하여 213, 213, 214의 분주값으로 정의한다.Based on the above equation, the phase difference is measured by performing division of 213.333 on the data clock of 19.2 Kbps. That is, FIG. 4 shows the divided value and the timing, and is defined as the divided value of 213, 213, and 214 instead of the divided value of 213.333.

제 5 도는 상술한 제 4 도의 분주값으로부터 위상차의 각 백분률에 따른 클럭카운팅값과 위상차 데이타(DCBA)를 나타내는 상태도이다.FIG. 5 is a state diagram showing a clock counting value and phase difference data DCBA corresponding to each percentage of phase difference from the division value of FIG. 4 described above.

제 6 도는 처음값 래치부(30)에 래치되는 처음 위상차 데이타와 순간값 래치부(40)에 래치되는 순간 위상차 데이타의 비교에 의해 결정되는 위상차 변화량 데이타의 결정 상태도이다.6 is a state diagram of the phase difference change data determined by comparing the initial phase difference data latched by the initial value latch unit 30 and the instantaneous phase difference data latched by the instantaneous value latch unit 40.

제 7 도는 서로 다른 클럭원으로부터 발생되는 두 클럭간의 위상차를 나타내는 파형도이다.7 is a waveform diagram illustrating a phase difference between two clocks generated from different clock sources.

제 8 도는 제 1 도의 구성중 위상차 변화량 데이타 입력에 따른 인터럽트 발생부(60)의 위상차 측정 데이타 결정 상태도로서, 제8a도는 속도 코드 결정상태이며, 제8b도는 위상차 코드 결정상태를 나타낸다.FIG. 8 is a phase difference measurement data determination state diagram of the interrupt generator 60 according to the phase difference variation data input in FIG. 1, and FIG. 8A is a speed code determination state, and FIG. 8B is a phase difference code determination state.

이하 상술한 제 1 도 및 제 3 도의 구성과 제2,4,5,6도의 상태도 및 타이밍도를 참조하여 본 발명의 일 실시예에 따른 특징 및 동작을 상세히 설명한다.Hereinafter, features and operations according to an exemplary embodiment of the present invention will be described in detail with reference to the above-described configuration of FIGS. 1 and 3 and the state diagrams and timing diagrams of FIGS.

먼저 이하에서 서술할 본 발명의 일 실시예 특징 및 동작에서는 상술한 제 4 도의 간단한 설명에서 밝혔듯이, 일례로 4.096MHz의 기본클럭(C4M)을 사용하고 있으며, 전송률 19.2Kbps의 데이타 클럭(R1,R2)을 사용하고 있다.First, in an embodiment feature and operation of the present invention to be described below, as shown in the brief description of FIG. 4, a basic clock (C4M) of 4.096 MHz is used as an example, and a data clock (R1, of 19.2 Kbps) is used. R2) is used.

먼저 위상차 검출기(10)은 서로다른 클럭원으로부터 전송률 19.2Kbps의 데이타 클럭(R1,R2)이 입력되면, 소정 기준클럭원(도시되지 않음)으로부터 입력되는 4.096MHz의 기준클럭(C4M)에 동기하여 상기 두 데이타 클럭(R1,R2)의 위상차를 검출하여 클럭위상차신호9R2-R1)를 출력한다. 이때 상기 두 데이타 클럭(R1,R2)에 대한 상기 위상차 검출기(10)의 클럭이상차신호 출력상태는 제 2 도의 일례도와 같이 나타날 수 있다.First, when the data clocks R1 and R2 having a transmission rate of 19.2 Kbps are input from different clock sources, the phase difference detector 10 is synchronized with a 4.096 MHz reference clock C4M input from a predetermined reference clock source (not shown). The phase difference between the two data clocks R1 and R2 is detected to output the clock phase difference signals 9R2-R1. At this time, the clock out-of-clock difference signal output state of the phase difference detector 10 with respect to the two data clocks (R1, R2) can be shown as an example of FIG.

이후 위상차 측정기(20)내의 제 1 카운터(21)는 상기 클럭위상차신호(R2-R1)를 입력받으며, 상기 기준클럭(C4M)에 동기하여 상기 클럭위상차신호(R2-R1)의 로우상태 구간을 2진카운팅하여 그 카운팅값을 출력한다. 이때 상기 제 1 카운터(21)의 카운팅값(Q0~Q6)은 상기 제 1 카운터(21)를 구성하는 2진카운터의 단수에 따라 몇 비트의 데이타로 출력될 것인가가 결정된다. 상술한 제 1 카운터(21)의 구성은 상기 입력클럭(R1,R2) 및 기준클럭(C4M)의 속도에 따라 증감될 수 있다. 즉, 본 발명의 일 실시예에서는 상기 로우상태 구간을 상기 기준클럭(C4M)으로 카운팅한 최대 카운팅값은 107을 넘지 않으므로, 최대 107의 카운팅 동작을 수행하기 위한 제 1 카운터(21)의 구성은 직렬로 연결되는 7개의 2진카운터에 의해 가능하다. 따라서 상기 카운팅값(Q0~Q6)은 7비트의 데이타형태로 나타나게 된다.Thereafter, the first counter 21 in the phase difference measuring unit 20 receives the clock phase difference signals R2-R1 and synchronizes the low state section of the clock phase difference signals R2-R1 in synchronization with the reference clock C4M. Binary counting outputs the counting value. At this time, it is determined how many bits of data are to be counted based on the number of binary counters constituting the first counter 21. The configuration of the first counter 21 described above may be increased or decreased according to the speeds of the input clocks R1 and R2 and the reference clock C4M. That is, in one embodiment of the present invention, since the maximum counting value counting the low state section to the reference clock C4M does not exceed 107, the configuration of the first counter 21 for performing the counting operation of 107 at maximum is It is possible with seven binary counters connected in series. Accordingly, the counting values Q0 to Q6 are represented by 7-bit data types.

치환비교기(22)는 상기 카운팅값(Q0~Q6)을 입력받으며, 또한 한주기전에 입력된 상기 클럭위상차신호(R2'~R1')에 따라 상기 제 2 카운터(23)로부터 출력되는 한주기전 위상차 데이타(D'C'B'A')를 귀환 입력받는다. 이후 상기 치환비교기(22)는 상기 한주기전 위상차 데이타(D'C'B'A')로부터 한주기전 클럭위상차신호의 카운팅값(Q0'~Q6')을 차환하여 현재 클럭위상차신호의 카운팅값(Q0~Q6)과 비교한다. 이때 상기 치환비교기(22)의 한주기전 카운팅값(Q0'~Q6')으로의 치환구성은 하기 식으로 구성할 수 있다.The substitution comparator 22 receives the counting values Q0 to Q6 and also outputs the phase difference from the second counter 23 in response to the clock phase difference signals R2 'to R1' input one cycle before. The data D'C'B'A 'is fed back. Subsequently, the replacement comparator 22 converts the counting values Q0 'to Q6' of the clock phase difference signal one cycle before from the phase difference data D'C'B'A 'one cycle before to count the current clock phase difference signal. Q0 to Q6). At this time, the substitution configuration of the substitution comparator 22 with the counting value Q0 'to Q6' before one cycle can be configured by the following equation.

즉 Q0'-Q6'가 각각 '1'의 출력을 만족하는 하기 식과 같은 D'C'B'A'의 연산구성에 따라,That is, according to the calculation configuration of D'C'B'A 'as shown in the following equation where Q0'-Q6' satisfies the output of '1',

로 치환될 수 있다.It may be substituted by.

이후 상기 치환비교기(22)는 상기 한주기전 카운팅값(Q0'~Q6')을 하기 식에 따른 결과를 그 비교결과신호(OUT)로 출력한다.Subsequently, the substitution comparator 22 outputs the counting values Q0 'to Q6' one cycle before as a comparison result signal OUT.

제 2 카운터(23)는 상기 비교결과신호(OUT)를 카운트 인에이블신호로 입력받아 상기 기준클럭(C4M)에 동기하여 16진 카운팅하며, 그 카운팅값을 4비트의 위상차 데이타(DCBA)로 출력한다. 이때 상기 위상차 데이타(DCBA)는 각 주기에서의 위상차에 대한 변위값을 나타내며, 제 5 도에 도시된 바와 같이 0-5%사이를 나타내는 0-9의 데이타로 나타난다. 따라서 상술한 제 5 도를 참조하면, 일례로 상기 비교결과신호(OUT)에 인에이블되어 16진카운팅한 위상차 데이타(DCBA)가 0011이면, 한주기전의 위상차에 대한 현재 위상차변위는 20%의 변화량을 나타낸다.The second counter 23 receives the comparison result signal OUT as a count enable signal and counts hexadecimal in synchronization with the reference clock C4M, and outputs the counting value as 4 bits of phase difference data DCBA. do. In this case, the phase difference data DCBA represents a displacement value with respect to the phase difference in each period, and is represented by data of 0-9 representing 0-5% as shown in FIG. Therefore, referring to FIG. 5 described above, if the phase difference data DCBA, which is enabled in the comparison result signal OUT and hexadecimal counted as 0011, is 0011, the current phase shift with respect to the phase difference before one cycle is 20%. Indicates.

처음값 래치부(30)는 최초로 입력되는 상기 위상차 데이타(DCBA)만을 입력받아 처음 위상차 데이타로 래치출력한다. 순간값 래치부(40)는 연이어 입력되는 상기 위상차 데이타(DCBA)를 입력받으며, 순간 위상차 데이타로 래치 출력한다.The initial value latch unit 30 receives only the phase difference data DCBA input for the first time and latches the first phase difference data. The instantaneous value latch unit 40 receives the phase difference data DCBA sequentially input and latches the instantaneous phase difference data.

시스템 전원온시 상기 처음값 래치부(30)에서는 R1과 R2의 클럭이 시작된 후 입력되는 위상차 데이타(DCBA)를 래치한다. 이때 상기 처음값 래치부(30)는 연이어 입력되는 최초 3개의위상차 데이타(DCBA)중 다수값에 의해 결정된 위상차 데이타(DCBA)를 래치한다. 즉, 상기 처음값 래치부(30)는 연이어 입력된 3개의 위상차 데이타(DCBA)중 2개 이상의 동일값인 경우 이를 정확한 처음 위상차 데이타로 래치하며, 각자가 다른 경우에는 래치하지 않고 다음 3개의 위상차 데이타(DCBA)를 다시 검색하여 래치출력한다. 상술한 동작은 R1과 R2의 노이즈에 따른 예기치 못한 경우의 에러를 방지하기 위함이다. 이때 처음에 래치되는 상기 처음 위상차 데이타는 위상차에 따른 실제값을 래치하여 다음 위상차 데이타와의 상대적인 비교를 실행하여 위상의 순간변화를 결정하므로 어떤값이 래치되든 무관하다.When the system is powered on, the initial value latch unit 30 latches the phase difference data DCBA input after the clocks of R1 and R2 start. At this time, the initial value latch unit 30 latches the phase difference data DCBA determined by a plurality of values among the first three phase difference data DCBA that are subsequently input. That is, the initial value latch unit 30 latches the same initial phase difference data when two or more of three consecutive phase difference data DCBAs are the same, and in the case of different values, the next three phase differences do not latch. Retrieve the data (BABA) again and latch out. The above operation is to prevent an error in an unexpected case due to noise of R1 and R2. At this time, the first phase difference data latched at the first latches an actual value according to the phase difference, and performs a relative comparison with the next phase difference data to determine the instantaneous change of phase, regardless of which value is latched.

위상차 변화량 검출부(50)는 상기 처음값 래치부(30)로부터 래치 출력되는 처음 위상차 데이타와 상기 순간값 래치부(40)로부터 출력되는 순간 위상차 데이타를 입력받으며, 상기 두 입력 위상차 데이타를 비교하여 제 6 도의 결정상태에 따라 결정되는 위상차 변화량 데이타를 해당 출력단(CK00-CK80)을 통해 출력한다.The phase difference change detection unit 50 receives the first phase difference data latch output from the initial value latch unit 30 and the instantaneous phase difference data output from the instantaneous value latch unit 40, and compares the two input phase difference data. The phase difference change data determined according to the crystal state of 6 degrees is output through the corresponding output terminals CK00 to CK80.

이하 제 6도의 결정상태를 참조하여 상기 위상차 변화량 검출부(50)의 동작을 간단히 살펴본다.Hereinafter, the operation of the phase difference detection unit 50 will be briefly described with reference to the determination state of FIG. 6.

일례로서 제 6 도에서 처음 위상차 데이터(FLV : First Lached Value)가 7이고, 현재 주기에서의 순간 위상차 데이타 입력이 8인 경우에는 처음값보다 순간값이 증가되었으므로 업 상태이다. 순간값이 10이 되는 경우 ±15%(±20%)이며, 홀수번째 6인 경우 ±35%(±40%)이고, 짝수번째인 2인 경우15%(20%)이며, 짝수번째 7인 경우 0%에 해당된다. 이후 상술한 동작에서 결정된 업 상태를 이용 R1을 기준으로 R2의 상태에 따라 R2의 속도가 R1보다 느린지 빠른지는 제 8 도의 속도결정상태도에 따라 결정된다. 일례로 제 7 도의 파형도를 참조하면, A와 같이 업상태가 결정된 후 R1과 R2의 클럭관계를 보면 R2가 느린 경우이고, 다운상태(down state)라면 E2가 보다 빠른 것이다. B의 경우는 업상태의 경우 R2가 빠른 경우이며, 다운상태인 경우 R2가 느린 경우이다. 일례로 상기 위상차 결정량이35%이고, R1보다 R2가 빠른 경우에, 상기 위상차 변화량 검출부(50)는 CK40 출력단을 통해 위상차 변화량 데이타를 출력한다.As an example, in FIG. 6, when the first phase difference data (FLV) is 7 and the instantaneous phase difference data input in the current period is 8, the instantaneous value is increased because the instantaneous value is increased from the initial value. If the instantaneous value is 10, ± 15% (± 20%), odd 6, ± 35% (± 40%), even 2 15% ( 20%) and 0% for even 7th. Then, whether the speed of R2 is slower or faster than R1 based on the state of R2 using the up state determined in the above-described operation is determined according to the speed determination state diagram of FIG. For example, referring to the waveform diagram of FIG. 7, when the up state is determined as shown in A, the clock relationship between R1 and R2 is a case where R2 is slow, and when it is a down state, E2 is faster. In case of B, R2 is fast in the up state and R2 is slow in the down state. For example, the phase difference determination amount When the ratio is 35% and R2 is faster than R1, the phase difference detection unit 50 outputs phase difference change data through the CK40 output terminal.

인터럽트 발생부(60)는 상기 위상차 변화량 검출부(50)를 통해 입력되는 위상차 변화량 데이타를 입력받아 위상차 측정 데이타로 변화출력하고, 입력클럭의 위상차 변화가 있음을 알리는 인터럽트신호(INT)로 출력한다. 상기 위상차 측정 데이타로의 변환은, 먼저 상기 위상차 변화량 검출부(50)의 CK40출력단을 통해 상기 위상차 변화량 데이타가 입력되면 위상차 결정량이 +40임을 인지하고, 제 8 도의 결정상태도에 따라 R1보다 R2 가 빠르므로 D6D5의 데이타값은 01이며, 위상차 결정량이 40이므로 위상차 측정데이타의 최종 출력은 1101110(D0~D6)이 된다.The interrupt generator 60 receives the phase difference change data input through the phase difference change detector 50 and outputs the phase difference change data as phase difference measurement data and outputs an interrupt signal INT indicating that there is a phase difference change in the input clock. In the conversion to the phase difference measurement data, when the phase difference amount data is inputted through the CK40 output terminal of the phase difference amount detecting unit 50, the phase difference amount is recognized as +40, and R2 is faster than R1 according to the crystal state diagram of FIG. Since the data value of D6D5 is 01 and the phase difference determination amount is 40, the final output of the phase difference measurement data is 1101110 (D0 to D6).

따라서 상술한 바와 같이 본 발명은 서로다른 클럭원에서 생성된 데이타 클럭의 위상차를 정확히 측정할 수 있으므로 데이타 통신시스템의 데이타 전송시에 송수신측의 데이타 클럭보상을 정확히 이루도록 할 수 있다는 장점이 있다.Therefore, as described above, the present invention can accurately measure the phase difference of the data clocks generated from different clock sources, and thus, there is an advantage in that the data clock compensation of the transmission / reception side can be accurately achieved during data transmission of the data communication system.

또한 본 발명은 디지탈 로직게이트로 구현하므로 단일 칩으로의 설계가 용이하다.In addition, since the present invention is implemented with a digital logic gate, it is easy to design a single chip.

Claims (6)

네트워크를 형성하는 데이타 통신시스템에 있어서 ; 서로 다른 클럭원으로부터 입력되는 제1 및 제2 클럭과 소정 기준클럭을 입력받으며, 상기 기준클럭에 동기하여 상기 제1 및 제2클럭간의 위상차를 구하고 상기 위상차에 대응하는 클럭위상차신호를 생성출력하는 위상차 검출수단과 ; 상기 클럭위상차신호를 입력받아 상기 기준클럭에 동기하여 상기 클럭위상차신호의 한주기동안 기준 클럭에 의한 현재 주기에서의 카운팅값을 구하고, 한주기전 위상차 데이타를 귀환입력받아 한주기전 카운팅값으로 치환하며, 상기 현재 주기의 카운팅값과 상기 한주기전 카운팅값을 비교하여 상기 클럭위상차신호의 변화률에 대응하는 위상차 데이타를 출력하는 위상차 측정수단과 ; 상기 위상차 데이타를 순차적으로 입력받아 최초 입력된 처음 위상차 데이타 및 각 입력주기에서의 상기 위상차 데이타를 각각 순간 위상차 데이타로 래치 출력하는 래치수단과 ; 상기 처음 위상차 데이타와 상기 순간 위상차 데이타를 각각 입력받으며, 상기 처음 위상차 데이타와 상기 순간 위상차 데이타의 위상차 변화량에 대응하는 위상차 변화량 데이타를 생성출력하는 위상차 변화량 검출수단과 ; 상기 위상차 변화량 데이타를 입력받아 상기 두 클럭간의 측정된 위상차에 대응하는 위상차 측정 데이타를 생성출력하는 인터럽트 발생수단으로 구성함을 특징으로 하는 클럭간의 위상차 측정기.In a data communication system forming a network; Receiving a first reference clock and a predetermined reference clock input from different clock sources, obtaining a phase difference between the first clock and the second clock in synchronization with the reference clock, and generating and outputting a clock phase difference signal corresponding to the phase difference Phase difference detection means; Receiving the clock phase difference signal and obtaining a counting value in the current period by the reference clock for one period of the clock phase difference signal in synchronization with the reference clock, receiving the phase difference data one cycle before, and replacing it with a counting value before one cycle, Phase difference measuring means for comparing the counting value of the current period and the counting value before one period and outputting phase difference data corresponding to the rate of change of the clock phase difference signal; Latch means for sequentially receiving the phase difference data and latching the first phase difference data first inputted and the phase difference data in each input period as instantaneous phase difference data; Phase difference change detection means for receiving the first phase difference data and the instantaneous phase difference data, respectively, and generating and outputting phase difference amount data corresponding to the phase difference change amount of the initial phase difference data and the instantaneous phase difference data; And an interrupt generator which receives the phase difference change amount data and generates and outputs phase difference measurement data corresponding to the measured phase difference between the two clocks. 제 1 항에 있어서, 상기 위상차 측정수단은 ; 상기 클럭위상차신호와 상기 기준클럭을 입력받으며, 상기 클럭위상차 신호를 상기 기준크럭으로 분주하여 그 분주비를 출력하는 분주수단과, 상기 분주비를 입력받으며, 또한 한주기전 위상차 데이타를 피드백입력받아 한주기전 클럭위상차신호에 대한 한주기전 분주비로 치환하고, 상기 분주비와 상기 한주기전 분주비를 연산비교하여 그 비교결과신호를 출력하는 치환 비교수단과, 상기 비교결과신호를 카운트인에이블신호로 입력받으며, 상기 기준클럭에 동기하여 카운팅한 후 그 카운팅값을 현재 클럭위상차신호에 따른 상기 위상차 데이타로 출력하는 카운팅 수단으로 구성함을 특징으로 하는 클럭간의 위상차 측정장치.The method of claim 1, wherein the phase difference measuring means; A division means for receiving the clock phase difference signal and the reference clock, dividing the clock phase difference signal into the reference clock and outputting the division ratio, and receiving the division ratio, and receiving feedback input of phase difference data one cycle before Substitution comparison means for substituting the frequency division ratio of the mechanical clock phase difference signal by one cycle, calculating the operation ratio of the division ratio and the division ratio before one cycle, and outputting a comparison result signal, and receiving the comparison result signal as a count enable signal. And counting means for counting in synchronization with the reference clock and outputting the counting value as the phase difference data according to a current clock phase difference signal. 제 2 항에 있어서, 상기 카운팅수단이, 16진 카운터임을 특징으로 하는 클럭간의 위상차 측정장치.3. The apparatus of claim 2, wherein the counting means is a hexadecimal counter. 제 1 항에 있어서, 상기 래치수단은 ; 초기화부터 순차적으로 입력되는 상기 위상차 데이타를 입력받으며, 상기 위상차 데이타중 적어도 둘 이상의 동일값을 나타내는 위상차 데이타를 처음 위상차 데이타로 래치하고 출력하는 처음값 래치수단과 ; 상기 위상차 데이타를 순차적으로 입력받아 각각 순간 위상차 데이타로 래치출력하는 순간값 래치수단으로 구성함을 특징으로 하는 클럭간의 위상차 측정장치.The method of claim 1, wherein the latch means; An initial value latch means for receiving the phase difference data sequentially inputted from the initial stage, and latching and outputting phase difference data representing at least two or more identical values among the phase difference data as initial phase difference data; And an instantaneous value latching means for sequentially receiving the phase difference data and latching them as instantaneous phase difference data, respectively. 네트워크를 형성하는 데이타 통신시스템에 있어서 ; 서로 다른 클럭원으로부터 입력되는 제1 및 제2 클럭과 소정 기준클럭을 입력받으며, 상기 기준클럭에 동기하여 상기 제1 및 제2클럭간의 위상차를 구하고 상기 위상차에 대응하는 클럭위상차신호를 생성출력하는 위상차 검출수단과 ; 상기 클럭위상차신호와 상기 기준클럭을 입력받으며, 상기 클럭위상차신호를 상기 기준클럭으로 분주하여 그 분주비를 출력하는 분주수단과 ; 상기 분주비를 입력받으며, 또한 한주기전 위상차 데이타를 피드백 입력받아 한주기전 클럭위상차신호에 대한 한주기전 분주비로 치환하고, 상기 분주비와 상기 한주기전 분주비를 연산비교하여 그 비교결과 신호를 출력하는 치환 비교수단과 ; 상기 비교결과신호를 카운트인에이블신호로 입력받으며, 상기 기준클럭에 동기하여 카운팅한 후 그 카운팅값을 현재 클럭위상차신호에 따른 상기 위상차 데이타로 출력하는 카운팅 수단과 ; 초기화부터 순차적으로 입력되는 상기 위상차 데이타를 입력받으며, 상기 위상차 데이타중 적어도 둘 이상의 동일값을 나타내는 위상차 데이타를 처음 위상차 데이타로 래치하고 출력하는 처음값 래치 수단과 ; 각 입력클럭 주기마다의 상기 위상차 데이타를 순차적으로 입력받아 각각 순간 위상차 데이타로 래치 출력하는 순간값 래치수단과 ; 상기 처음 위상차 데이타와 상기 순간 위상차 데이타를 각각 입력받으며, 상기 처음 위상차 데이타와 상기 순간 위상차 데이타간의 위상차 변화량에 대응하는 위상차 변화량 데이타를 생성출력하는 위상차 변화량 검출수단과 ; 상기 위상차 변화량 데이타를 입력받아 상기 두 클럭간의 측정된 위상차에 대응하는 위상차 측정 데이타를 생성출력하는 인터럽트 발생수단으로 구성함을 특징으로 하는 클럭간의 위상차 측정기.In a data communication system forming a network; Receiving a first reference clock and a predetermined reference clock input from different clock sources, obtaining a phase difference between the first clock and the second clock in synchronization with the reference clock, and generating and outputting a clock phase difference signal corresponding to the phase difference Phase difference detection means; A division means for receiving the clock phase difference signal and the reference clock, dividing the clock phase difference signal into the reference clock and outputting a division ratio thereof; The division ratio is input, and the phase difference data is inputted one cycle before, and the cycle ratio is divided by one cycle before the clock phase difference signal, and the comparison ratio is divided by one cycle before the cycle. Substitution comparison means; Counting means for receiving the comparison result signal as a count enable signal, counting in synchronization with the reference clock, and outputting the counted value as the phase difference data according to a current clock phase difference signal; An initial value latch means for receiving the phase difference data sequentially inputted from the initial stage, and latching and outputting phase difference data representing at least two or more identical values among the phase difference data as initial phase difference data; Instantaneous value latching means for sequentially receiving the phase difference data for each input clock period and latching them as instantaneous phase difference data; Phase difference change detection means for receiving the first phase difference data and the instantaneous phase difference data, respectively, and generating and outputting phase difference amount data corresponding to the amount of phase difference change between the first phase difference data and the instantaneous phase difference data; And an interrupt generator which receives the phase difference change amount data and generates and outputs phase difference measurement data corresponding to the measured phase difference between the two clocks. 제 5 항에 있어서, 상기 카운팅수단이 16진 카운터임을 특징으로 하는 클럭간의 위상차 측정기.6. The phase difference measuring device of claim 5, wherein the counting means is a hexadecimal counter.
KR1019940021842A 1994-08-31 1994-08-31 Device for measuring phase difference between clocks KR970009679B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019940021842A KR970009679B1 (en) 1994-08-31 1994-08-31 Device for measuring phase difference between clocks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019940021842A KR970009679B1 (en) 1994-08-31 1994-08-31 Device for measuring phase difference between clocks

Publications (1)

Publication Number Publication Date
KR970009679B1 true KR970009679B1 (en) 1997-06-17

Family

ID=19391707

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019940021842A KR970009679B1 (en) 1994-08-31 1994-08-31 Device for measuring phase difference between clocks

Country Status (1)

Country Link
KR (1) KR970009679B1 (en)

Similar Documents

Publication Publication Date Title
US5864581A (en) Apparatus for measuring the signal transit time of a digital transmission device
US4247936A (en) Digital communications system with automatic frame synchronization and detector circuitry
US7508844B2 (en) Frame signal waveform observation apparatus and method
US5946362A (en) Apparatus for detecting clock failure for use in a synchronous transmission system
KR970009679B1 (en) Device for measuring phase difference between clocks
US5068879A (en) Monitoring of digital transmission systems
US5619532A (en) Digital communication system
US6198736B1 (en) Telecommunications system
CN100586055C (en) Clock transmission apparatus for performing network synchronization of systems
US5430746A (en) Method of and circuitry for detecting synchronism failure of two word sequences
JPH0795142A (en) Master station terminal equipment for star network
US5222102A (en) Digital phased locked loop apparatus for bipolar transmission systems
CN1066875C (en) Method and apparatus for measuring phase difference between pulse signals in communication facility
KR920010379B1 (en) Jitter decreasing device
US5072448A (en) Quasi-random digital sequence detector
US4860009A (en) Bidirectional multiframe converter for data communications systems
KR100202946B1 (en) Apparatus and method for transmitting a synchronization by using a state machine in a synchronous residual time stamp
JPS5917914B2 (en) Jitter measurement device
JP3138598B2 (en) Delay measurement method
KR0121156Y1 (en) 64k/72k bit transmission velocity transform data transmission system
JPH08102763A (en) Jitter measurement device
KR100199186B1 (en) Block sync. circuit of digital ultra frequency transmission device
KR0138310Y1 (en) Signal Processing Device by Internal Synchronization
KR940010203B1 (en) Tv pointer processor of digital synchronous transmission system
SU832780A1 (en) Device for discriminating address call signals

Legal Events

Date Code Title Description
A201 Request for examination
G160 Decision to publish patent application
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20080903

Year of fee payment: 12

LAPS Lapse due to unpaid annual fee