KR20050013306A - A gradual time correcting method considering system elapse time - Google Patents

A gradual time correcting method considering system elapse time

Info

Publication number
KR20050013306A
KR20050013306A KR1020030051915A KR20030051915A KR20050013306A KR 20050013306 A KR20050013306 A KR 20050013306A KR 1020030051915 A KR1020030051915 A KR 1020030051915A KR 20030051915 A KR20030051915 A KR 20030051915A KR 20050013306 A KR20050013306 A KR 20050013306A
Authority
KR
South Korea
Prior art keywords
time
correction
elapsed
difference
elapsed time
Prior art date
Application number
KR1020030051915A
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 KR1020030051915A priority Critical patent/KR20050013306A/en
Publication of KR20050013306A publication Critical patent/KR20050013306A/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0016Arrangements for synchronising receiver with transmitter correction of synchronization errors

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Electric Clocks (AREA)

Abstract

PURPOSE: A gradual time correction method considering system elapse time is provided to correct accurately a system time and stably perform a call process by performing gradually a time correction process many times. CONSTITUTION: Reference clock information is received from a reference clock board(100). An interval count is calculated and a code of a gage is determined(110). Base time information and current time information are obtained(120). A system time is corrected by adding a correction unit time to the system time(130). An elapse time gap between a real elapse time and a calculation elapse time is obtained(180). A correction number is controlled by using the elapse time gap(190-210).

Description

시스템 경과 시간을 고려한 분할 시각 보정법{A gradual time correcting method considering system elapse time}A gradual time correcting method considering system elapse time}

본 발명은 시스템 경과 시간을 고려한 분할 시각 보정법에 관한 것으로, 보다 상세하게는, 다중 보드 시스템에서 기준 클록 보드와 주변 보드의 시각에 대한 동기화를 주기 위해서 주변 보드의 시각을 보정하는 방법에 관한 것이고, 더욱 상세하게는, 다중 보드 시스템에서 기준 클록 보드와 주변 보드의 시각에 대한 동기화를 주기 위한 시각 보정 동작 중에 경과 시간을 고려하여 기준 시각과의 차이를여러 번에 나누어 분할하여 보정하는 시각 보정 방법에 관한 것이다.The present invention relates to a split time correction method in consideration of a system elapsed time, and more particularly, to a method of correcting a time of a peripheral board in order to synchronize a time between a reference clock board and a peripheral board in a multi-board system. More specifically, in the multi-board system, the time correction method of dividing and correcting the difference from the reference time in several times in consideration of the elapsed time during the time correction operation for synchronizing the time between the reference clock board and the peripheral board. It is about.

ATM 스위치 또는 ATM 기반의 MPLS(MultiProtocol Label Switching, 다중 프로토콜 레이블 스위칭) 스위치, 혹은 호처리가 요구되는 네트워크 장비에서 호처리 프로토콜은 호처리 요구(Request)와 그에 대한 호처리 응답(Response)를 기초로 하여 모든 프로세스가 이루어진다. 통상, 이러한 네트워크 장비들은 그 구조의 복잡성으로 인해 자체 개발만으로는 모든 기능을 구현하기 어려운 경우가 대부분이고, 그에 따라 여러 가지 상용 O/S나 상용 Source를 차용하여 부분 적용하는 경우가 많다. 이러한 이유로 상기 언급된 장비들은 대부분 단일 보드 시스템이 아니라 여러 개의 보드들로 이루어진 다중 보드 시스템이다. 다중 보드 시스템의 경우에, 호처리 프로세스의 올바른 수행을 보장하기 위해서는 종래의 단일 보드 시스템에서는 크게 고려할 필요가 없었던 기준 클록 보드에 대한 시각 동기화가 필수적으로 이루어져야 한다. 그렇지 않으면 여러 보드들 사이의 신호 송수신이 원활하게 이루어지지 않을 수가 있기 때문이다.In an ATM switch or ATM-based Multiprotocol Label Switching (MPLS) switch, or a network equipment requiring call processing, the call processing protocol is based on a call processing request and a call processing response. All process is done. In general, these network equipments are often difficult to implement all the functions by their own development due to the complexity of the structure, and accordingly, they are partially applied by borrowing various commercial O / S or commercial sources. For this reason, the above mentioned devices are mostly not single board systems, but multiple board systems consisting of several boards. In the case of a multi-board system, in order to ensure the correct performance of the call processing process, time synchronization with respect to the reference clock board, which has not been greatly considered in the conventional single board system, must be made. Otherwise, the signal transmission between the boards may not be smooth.

이를 위해 다중 보드 시스템에서는, 여러 가지 신호 처리를 위해 분산되어 있는 각종 제어 보드들에게 기준 클럭을 제공하는 기준 클럭 보드를 두고, 상기 기준 클럭에서 제공하는 기준 클럭에 따라 주변의 제어 보드들이 시각 보정을 수행한다. 이러한 다중 보드 시스템에서의 시각 보정은 주기적으로 혹은 비주기적으로 일어날 수 있다. 예컨대, 기준 클록 보드가 주변의 보드들에 주기적으로 기준 클록을 보내는 경우에 주기적으로 시각 보정이 일어날 수 있으며, 운용자가 강제적으로 시스템에 시각 보정을 요구하는 경우 또는 시스템의 상태 변경시에도 시스템의 시각보정이 일어난다.To this end, in a multi-board system, a reference clock board is provided to provide a reference clock to various control boards distributed for various signal processing, and peripheral control boards perform time correction according to the reference clock provided by the reference clock. Perform. Visual correction in such a multi-board system can occur periodically or aperiodically. For example, time correction may occur periodically when the reference clock board periodically sends a reference clock to neighboring boards, and the system time is corrected even if the operator forcibly requires the system to correct the time or changes the state of the system. Calibration takes place.

다중 보드 시스템에서 시각 보정을 하는 종래의 방법을 보면 대체로 주변의 보드가 시각 보정 요구를 수신하는 즉시 기준 클록에 맞추어 self-timer의 시각을 일치시키도록 하고 있다. 즉, 주변 보드에서의 시각과 기준 클록 보드에서의 시각의 차이가 아무리 크더라도 기준 클록의 시각에 맞추어 한번에 주변 보드의 시각을 변경한다.Conventional methods of time correction in multi-board systems generally allow the surrounding boards to match their time with the reference clock as soon as they receive a time correction request. That is, even if the difference between the time on the peripheral board and the time on the reference clock board is large, the time of the peripheral board is changed at once in accordance with the time of the reference clock.

그런데, 만약 이러한 시각 보정 동작이 이루어지는 시점에서 호처리 프로세스가 동작하고 있었다면 호처리에 심각한 문제가 발생할 수도 있다. 예컨대, 호처리 프로세스의 호처리 요청(Request) 발생 후, 호처리 응답(Response)에 대한 정당한 대기 시간이 급격한 시각 보정으로 인하여 급격하게 증가 혹은 감소할 수 있는 것이다. 보다 구체적으로 설명하자면, 예를 들어, 호처리 요청 후 응답을 기다릴 때까지 10초를 대기한 후 타임아웃이 발생하도록 설계된 어떤 시스템의 경우, 호 처리를 요청한 현재의 시간이 0시 00분 10초인데 갑작스러운 시각 보정으로 현재 시각이 0시 00분 20초가 되었다면, 호 처리를 요청한 보드는 응답 데이터를 기다리지도 않고 타임아웃이 발생하여 응답 수신에 실패한 것으로 처리할 것이다. 물론, 많은 O/S가 이에 대한 처리를 적절하게 할 수 있도록 하고 있지만, 일부의 O/S는 시작 보정에 대해 여전히 적절치 못한 대처를 하고 있다.However, if the call processing process is operating at the time when such a time correction operation is performed, serious problems may occur in the call processing. For example, after a call processing request of a call processing process is generated, a legitimate waiting time for a call processing response may increase or decrease rapidly due to a sharp time correction. More specifically, for example, for some systems that are designed to wait 10 seconds after a call processing request and wait for a response, and then time out, the current time to request call processing is 00:00:10. If the current time is 00:00:20 due to a sudden time correction, the board requesting the call processing will treat it as having failed to receive a response because a timeout occurred without waiting for the response data. Of course, a lot of O / S makes it possible to handle this properly, but some O / S still do not deal with the start correction.

본 발명은 상술한 종래의 시각 보정의 문제점을 해결하기 위한 것으로, O/S의 시각 보정에 대한 처리 능력에 상관없이 시각 보정시 호처리 프로세스가 안정적으로 수행할 수 있는 방법을 제안하는데 그 목적이 있다. 또한, 본 발명은 기준 클록을 기초로 주변 보드의 시각 보정을 하는데 있어서 시스템 경과 시간을 고려하면서, 시각 보정을 한 번에 하지 않고 여러 번에 나누어서 하는 시각 보정 방법을 제공하는 것을 목적으로 한다.The present invention is to solve the problems of the conventional visual correction described above, and to propose a method that the call processing process can be stably performed at the time of the time correction irrespective of the processing capability of the O / S time correction. have. In addition, an object of the present invention is to provide a time correction method for dividing a time at a time without performing a time correction in consideration of a system elapsed time in correcting a time of a peripheral board based on a reference clock.

도 1은 본 발명에 따른 시스템 경과 시간을 고려한 분할 시각 보정 방법을 수행하기 위한 장치의 구성을 도시한다.1 shows a configuration of an apparatus for performing a split time correction method in consideration of a system elapsed time according to the present invention.

도 2는 본 발명인 시스템 경과 시간을 고려하여 시각을 분할하여 보정하는 과정을 도시하는 흐름도이다.2 is a flowchart illustrating a process of dividing and correcting a time in consideration of the present invention system elapsed time.

※ 도면의 주요 부분에 대한 부호의 설명 ※※ Explanation of code about main part of drawing ※

10.....보정 횟수 계산부 20.....시각 보정부10 ..... Calculation count calculation unit 20 ..... Time correction unit

30.....경과 시간 오류 처리부30 ..... Elapsed time error handler

상기와 같은 목적을 달성하기 위한 본 발명의 구성을 보면, 본 발명인 시스템 경과 시간을 고려한 분할 시각 보정 방법은, (a) 기준 클록 보드로부터 시각 정보를 전달받는 단계; (b) 시스템 내부 시각과 기준 클록 시각과의 차이를 기초로 보정할 횟수 및 보정 단위의 부호를 구하는 단계; (c) 시스템 내부의 현재 시각 정보로부터 보정 기준 시각을 획득하는 단계; (d) 보정단위만큼을 시스템의 시간에 더하여 시스템의 시각을 보정하는 단계; 및 (e) 보정하는 동안의 실제 경과 시간과 계산상의 경과 시간의 차이로부터 경과 시간 차이를 구하고, 상기 경과 시간 차이를 기초로 보정할 횟수를 조절하는 단계를 포함하며, 이때, 보정할 횟수가 0이 될 때까지 상기 (d)~(e) 단계를 소정의 보정 주기로 반복하는 것을 특징으로 한다.According to the configuration of the present invention for achieving the above object, the present invention divided system correction method in consideration of the elapsed time of the present invention, (a) receiving the time information from the reference clock board; (b) obtaining a number of corrections and a sign of a correction unit based on the difference between the system internal time and the reference clock time; (c) obtaining a correction reference time from current time information inside the system; (d) correcting the time of the system by adding a correction unit to the time of the system; And (e) obtaining an elapsed time difference from the difference between the actual elapsed time and the calculated elapsed time during correction, and adjusting the number of corrections based on the elapsed time difference, wherein the number of corrections is zero. The steps (d) to (e) are repeated in a predetermined correction cycle until the above is achieved.

즉, 본 발명은 기준 클록 보드가 주기적 또는 비주기적으로 자신의 시각 정보 신호를 주변의 분산되어 있는 제어보드들에게 전송했을 경우에, 이 신호를 받은 제어보드가 이를 기준으로 자신의 타이머를 맞추는 과정에서 구현될 수 있는 시각 보정 알고리즘에 관한 것이다. 본 발명에서 제안하는 시각 보정 알고리즘은, 이러한 시각 보정의 동작이 단순한 시각 맞춤의 기능을 넘어서, 호처리 프로세스나 기타 타이머를 사용하는 동작 중에 수행된 급격한 시각 보정으로 인해 발생할 수 있는 상술한 오류를 줄일 수 있도록, 단 한번의 동작으로 시각 보정을 수행하는 방식을 지양하고 보정할 시간을 여러 개로 나누어 여러 차례에 걸쳐 조금씩 보정하는 것을 특징으로 한다.That is, in the present invention, when the reference clock board periodically or aperiodically transmits its visual information signal to the control boards that are scattered around, the control board receiving the signal adjusts its timer based on this. A visual correction algorithm that can be implemented in. The time correction algorithm proposed by the present invention reduces the above-described error that may occur due to the sudden time correction performed during the call processing process or other timer operation beyond the function of the time correction. To this end, the method of avoiding the time correction in a single operation is divided and the time to be corrected is divided into a plurality of times, and characterized in that a small number of times are corrected.

더욱이, 본 발명의 알고리즘 구조는, 이러한 분할 보정 동작의 수행시 일반적으로 수행할 수 있는 단순한 분할 보정 과정에 더 추가하여, 분할되어 수행되는 매 시각 보정의 순간마다 시스템의 실제 경과 시간과 계산상의 경과 시간의 차이를 계산하고 이를 다음의 분할 시각 보정 과정에 반영함으로써 단순 시각 보정에서 일어날 수 있는 오류를 보완할 수 있게 한다. 즉, 주기적으로 분할 보정의 동작을 수행하면서, 시스템 경과 시각과 보정된 시각과의 차이를 조사하여 그 차이만큼 보정 횟수를 가감하여 분할 시각 보정의 오류를 줄이는 것이다. 여기서 말하는 단순 시각 보정에서 일어날 수 있는 오류는, 일반적인 타이머의 시각 보정시 발생하는 쓰기 시간(wirting time)의 지연(수 ㎲ ~ 수 ㎳)에 의한 오류와 시각 보정 동작의 처리 과정에서 최초와 최후 시간의 차이, 즉, 시각 보정을 하는 도중에 시간의 경과로 인한 Redundant time 발생에 의한 오류를 포함한다.In addition, the algorithm structure of the present invention, in addition to the simple division correction process that can be generally performed in performing such a division correction operation, the actual elapsed time of the system and the lapse of calculation in each moment of the time correction performed in the division. By calculating the time difference and reflecting it in the subsequent split time correction process, it is possible to compensate for errors that may occur in simple time correction. That is, while performing the segmentation correction operation periodically, the difference between the system elapsed time and the corrected time is examined, and the number of corrections is added or subtracted by the difference to reduce the error of the segmentation time correction. The errors that can occur in the simple time correction described here are the errors caused by the delay of the writing time (number 수 to number ㎳) occurring during time correction of a general timer and the initial and last time in the process of time correction operation. Difference, that is, errors caused by redundant time due to passage of time during time correction.

이제, 첨부된 도면을 참조하여 본 발명의 구성 및 동작에 대해 보다 상세히 설명한다.Now, with reference to the accompanying drawings will be described in more detail the configuration and operation of the present invention.

도 1은 본 발명에 따른 시스템 경과 시간을 고려한 분할 시각 보정 방법을 수행하기 위한 장치의 구성을 도시한다. 도 1에 도시된 바와 같이, 본 발명의 구현을 위한 구조는 보정횟수 계산부(10), 시각 보정부(20) 및 경과 시간 오류 처리부(30)를 포함한다.1 shows a configuration of an apparatus for performing a split time correction method in consideration of a system elapsed time according to the present invention. As shown in FIG. 1, the structure for implementing the present invention includes a correction count calculator 10, a time corrector 20, and an elapsed time error processor 30.

보정 횟수 계산부(10)는 기준 클록 보드로부터 시각 정보를 전달 받은 후, 기준 클록 시각과 자신의 시스템 내부 시각과의 차이를 계산하고, 이로부터 분할 보정의 횟수 및 보정의 방향(+/-)을 결정하는 역할을 한다. 먼저, 보정 횟수 계산부(10)는 자신의 시스템 내부 시각 값으로부터 기준 클록 시각 값을 뺌으로써 기준 시각과의 차이를 계산한다. 기준 시각과의 차이가 계산되면 주어진 시스템 환경에 맞는 보정 단위로 나누어 보정 횟수를 계산한다. 여기서, 보정 단위라함은 한 번의 시각 보정 동작이 일어날 때 보정하는 시간의 크기이다. 통상적으로, 호처리 프로세서의 경우 적용하는 타임아웃 값(즉, 호처리 요청을 한 후 응답이 올 때까지 대기하는 시간)이 10초 미만의 값이므로, 시스템 환경에 맞는 보정 단위는 본 발명의 구현에 있어서는 양호하게는 1초를 보정단위로 하는 것이 바람직하다. 그런 후, 시스템 내부 시각과 기준 클록 시각과의 차이가 양수일 경우(즉, 시스템 내부 시각이 더 빠를 경우)에는 후행보정(즉, 시스템 내부 시각을 느리게 하는 보정)을 하고, 음수일 경우(즉, 시스템 내부 시각이 더 느릴 경우)에는 선행보정(즉, 시스템 내부 시각을 빠르게 하는 보정)을 할 수 있도록 보정 방향을 결정한다. 즉, 본 실시예에서 보정 단위의 부호는 후행보정의 경우 -1(마이너스 보정 단위)이고 선행보정의 경우 +1(플러스 보정 단위)로 한다.After receiving the time information from the reference clock board, the correction number calculator 10 calculates a difference between the reference clock time and its own internal time, and from this, the number of divisional corrections and the direction of correction (+/-). Plays a role in determining. First, the correction count calculator 10 calculates a difference from the reference time by subtracting the reference clock time value from its internal system time value. When the difference from the reference time is calculated, the number of corrections is calculated by dividing the correction unit for a given system environment. Here, the correction unit is the amount of time to correct when one time correction operation occurs. In the case of a call processing processor, a timeout value applied to the call processor (that is, a time for waiting for a response after making a call processing request) is less than 10 seconds, so that a correction unit suitable for a system environment is implemented according to an embodiment of the present invention. In the above, preferably, 1 second is preferably a correction unit. Then, if the difference between the system internal time and the reference clock time is positive (that is, the system internal time is faster), follow-up correction (i.e., slow down the system internal time) is performed. In the case of a slower internal system time, the direction of correction is determined so that a preliminary correction (i.e., a faster system internal time) can be performed. That is, in the present embodiment, the sign of the correction unit is -1 (negative correction unit) in the case of the backward correction and +1 (plus correction unit) in the case of the preceding correction.

한편, 상기 보정 횟수 계산부(10)는 보정 동작이 수행되기 직전에 다시 한 번 시스템 내부의 현재 시각을 읽고 이를 "보정 기준 시각"으로서 저장한다. 이때, "보정 기준 시각"은, 실시예에 따라, 단순한 현재의 절대 시각 정보가 될 수도 있고, 시스템이 부팅되면서부터 현재(즉, "보정 기준 시각" 정보를 얻을 때) 시각까지 시스템의 life time에 대한 시각 정보일 수도 있다. 본 실시예에서는 편의를 위해 현재의 절대 시각 정보를 얻는 방법과 동일한 방법으로 "보정 기준 시각"에 대한 정보를 얻는다. 그러나, 다른 실시예에서 life time을 사용한 "보정 기준 시각"을 획득했을 경우에는, 기준 클록의 시각 정보나 시스템 내부의 시각 정보를 얻을 때 절대 시각 정보를 사용하지 않고 부팅 후 경과 시간에 대한 정보를 사용하면 동일하게 구현이 가능하다. 이러한 "보정 기준 시각"은 후술할 경과 시간 오류 처리부(30)에서 사용된다.On the other hand, the correction counting unit 10 reads the current time inside the system again just before the correction operation is performed and stores it as the "correction reference time". In this case, the "correction reference time" may be simple current absolute time information according to an embodiment, and the life time of the system from the time the system is booted up to the present time (ie, when the "correction reference time" information is obtained). It may also be visual information about. In this embodiment, for convenience, information on the "correction reference time" is obtained in the same manner as the method of obtaining the current absolute time information. However, in another embodiment, when the "correction reference time" using the life time is obtained, when the time information of the reference clock or the internal time information is obtained, information on the elapsed time after booting is not used without absolute time information. If you use it, you can implement the same. This "correction reference time" is used by the elapsed time error processing unit 30 to be described later.

시각 보정부(20)는 경과 시간 오류 처리부(30)와 함께 연동하여 시스템 환경에 맞는 적당한 보정 주기로 상기 보정 횟수 계산부(10)에서 계산된 보정 횟수만큼 시스템의 시각에 보정 단위를 더하는 동작을 수행한다. 이때, 시각 보정이 이루어지는 적당한 주기는 시스템의 환경에 따라 달라진다. 본 발명의 실시예에서는, 호처리 프로세서의 타임 아웃이 10초 이내인 것을 고려하여, 양호하게는, 10초 주기로 시각 보정을 수행하는 것이 바람직하다. 즉, 시각 보정부(10)는 일정한 주기마다(예컨대, 10초 타이머가 동작할 때마다) 시스템 내부 시각을 읽고, 읽어들인 시스템 시각 정보에 보정 단위(예컨대, -1 or +1)를 더하여 새로이 시스템 내부 시각을 재설정하는 역할을 수행한다. 내부 시각 재설정 후에는 보정 횟수를 1만큼 줄이고, 다음 차례의 시각 보정이 시작되기 전에 보정 횟수가 0인지 판단하여 시각 보정 기능의 중단 여부를 결정하게 된다.The time correction unit 20 interoperates with the elapsed time error processing unit 30 to add a correction unit to the time of the system by the number of corrections calculated by the correction number calculation unit 10 at an appropriate correction period suitable for the system environment. do. The proper period at which time correction is made depends on the environment of the system. In the embodiment of the present invention, considering that the time-out of the call processing processor is less than 10 seconds, it is preferable to perform the time correction every 10 seconds. That is, the time correction unit 10 reads the system internal time at regular intervals (for example, every time the 10-second timer operates), and adds a correction unit (for example, -1 or +1) to the read system time information. Resets the system internal time. After the internal time reset, the number of corrections is reduced by 1, and it is determined whether to cancel the time correction function by determining whether the correction number is 0 before the next time correction is started.

경과 시간 오류 처리부(30)는 본 발명의 시각 보정 알고리즘에서 핵심적인 부분으로, 보정 기능을 수행하는 동안의 시간 경과로 인한 타이머 자체의 오류와함께 시각 보정부의 동작이 시스템에 올바르게 반영되어 있지 않을 경우에 일어나는 오류, 기타 시각 보정을 수행하는 과정에서 일어날 수 있는 여러 오류들을 검증하고, 이러한 오류들을 보완하는 역할을 수행한다. 경과 시간 오류 처리부(30)의 동작을 위해서는 보정 횟수 계산부(10)가 상술한 바와 같이 "보정 기준 시각"에 대한 정보를 최초의 주기적인 보정 동작이 수행되기 전에 미리 얻어야 한다. 상기 경과 시간 오류 처리부(30)는, 시각 보정부(20)에서의 주기적인 보정 동작이 수행될 때마다, 상기 "보정 기준 시각"으로부터의 경과 시간을 실제 타이머의 시각을 읽어서 계산하고, 그 값을 계산상으로 도출된(즉, 보정 횟수와 보정 범위 및 보정 주기로 계산된) 경과 시간 값을 비교하여 오류 발생 여부를 감지한다. 경과 시간 오류 처리부(30)는 오류 발생을 감지하게 되면 보정 횟수를 가감하여 시각 보정의 횟수를 늘리거나 줄이는 방법을 사용하거나, 또는 과도한 오류 발생을 감지하게 된 경우에는 시각 보정 동작 자체를 중지시키는 방법으로 시스템의 오류 상황에 대처할 수 있게 한다.The elapsed time error processing unit 30 is an essential part of the time correction algorithm of the present invention, and the operation of the time correction unit with the error of the timer itself due to the time elapsed while performing the correction function may not be correctly reflected in the system. It checks for errors that occur in the case and other errors that may occur in performing visual correction, and compensates for these errors. For the operation of the elapsed time error processing unit 30, the correction number calculation unit 10 must obtain information on the "correction reference time" in advance before the first periodic correction operation is performed as described above. The elapsed time error processing unit 30 calculates the elapsed time from the "correction reference time" by reading the time of the actual timer each time the periodic correction operation in the time correction unit 20 is performed, and the value thereof. The error is detected by comparing the elapsed time value calculated by calculation (ie, the number of corrections and the calculation range and the correction period). When the elapsed time error processing unit 30 detects an error occurrence, a method of increasing or decreasing the number of visual corrections by adding or subtracting the correction number is used, or when the excessive error occurrence is detected, a method of stopping the visual correction operation itself. This allows you to cope with the error condition of the system.

여기서, 상기 실제 타이머 경과 시간과 계산상의 경과 시간을 구하는 방법은 다음과 같다. 먼저, 실제 타이머 경과 시간의 경우에는, 현재의 시각 정보를 읽어서 보정 동작 수행 직전에 이미 구한 상기 "보정 기준 시각"을 뺌으로써 얻는다. 다음으로 계산상의 경과 시간의 경우에는, 보정 주기와 보정 단위를 합하여 시각 보정부가 동작하면서 경과되는 시간을 얻어내고, 이 값과 그 때까지 보정 동작이 수행된 횟수를 곱하면 계산상의 경과 시간을 얻는다. 즉,Here, a method of obtaining the actual timer elapsed time and the calculated elapsed time is as follows. First, in the case of the actual timer elapsed time, the current time information is read and obtained by subtracting the " correction reference time " already obtained just before performing the correction operation. Next, in the case of the calculated elapsed time, the correction period and the correction unit are added to obtain the time elapsed while the time correction unit is operating, and the value is multiplied by the number of times the correction operation has been performed until then to obtain the calculated elapsed time. . In other words,

실제 타이머 경과 시간 = 시스템의 현재 시각 - 보정 기준 시각Actual timer elapsed time = current time of the system-calibration reference time

계산상의 경과 시간 = (보정 주기 + 보정 단위)*(보정 동작이 수행된 횟수)Calculated elapsed time = (calibration period + calibration unit) * (number of calibration actions performed)

이렇게 구한 계산상의 경과 시간에서 실제 타이머 경과 시간을 뺀 값이 경과 시간 차이 값으로, 이는 앞서 설명한 일반적인 타이머의 시각 보정시 발생하는 쓰기 시간의 지연 등에 의해 발생하는 오류이다. 상기 경과 시간 오류 처리부(30)는 상기 경과 시간 차이에 따라 보정 횟수를 가감한다. 이때, 보다 정확한 시각 보정을 위해서 현재까지 누적된 경과 시간 차이의 값을 고려할 수 있다. 즉,The elapsed time difference is obtained by subtracting the actual timer elapsed time from the calculated elapsed time, which is an error caused by a delay in writing time that occurs during time correction of the general timer described above. The elapsed time error processing unit 30 decrements the number of corrections according to the elapsed time difference. At this time, the value of the accumulated elapsed time difference to date can be considered for more accurate time correction. In other words,

계산상의 경과 시간 = (보정 주기 + 보정 단위)*(보정 동작이 수행된 횟수)Calculated elapsed time = (calibration period + calibration unit) * (number of calibration actions performed)

- (경과 시간 차이의 현재까지 누적된 값)-(Accumulated value to date of elapsed time difference)

그러면, 본 발명인 시스템 경과 시간을 고려하여 시각을 분할 보정하는 알고리즘을 구체적으로 도시하고 있는 도 2를 참조로, 상기 경과 시간 차이 값을 고려하여 시각 보정을 하는 본 발명의 알고리즘에 대해 보다 구체적으로 알아본다.Next, referring to FIG. 2, which specifically illustrates an algorithm for splitting and correcting time in consideration of the system elapsed time of the present invention, the algorithm of the present invention for correcting time in consideration of the elapsed time difference value will be described in more detail. see.

앞서 설명한 바와 같이, 본 발명의 구현을 위한 동작의 시발은 기준 클록 보드로부터 기준 클록 정보를 전달 받은 이후이다. 먼저, 기준 클록 보드로부터 기준 시각을 전달 받으면(S100), 시스템 내부의 현재 시각과의 차이(Interval_Count)를 구하고, 이를 기초로 보정할 횟수 및 보정의 방향(즉, 보정 단위의 부호)을 결정한다(S110). 이때, 본 실시예에서와 같이 보정 단위(Gage)가 1초인 경우에는 시스템 내부 시각과 기준 클록 시각과의 차이가 보정할 횟수와 같게 된다. 그리고, 시스템 내부의 현재 시각 정보를 다시 읽어 보정 기준 시각(Base_Time) 정보를 획득한다(S120). 그런 후, 현재의 시스템 시간(Cur_Time)에 보정 단위(Gage)를 더하여 시스템 시각을 보정하고, 현재까지 보정 동작이 수행된 횟수(Cur_Count) 및보정할 횟수(Interval_Count)를 카운트한다(S130). 상기 과정(S130)을 간단하게 표현하면 아래와 같다.As described above, the start of the operation for implementing the present invention is after receiving the reference clock information from the reference clock board. First, when the reference time is received from the reference clock board (S100), the difference (Interval_Count) from the current time inside the system is obtained, and the number of corrections and the direction of correction (that is, the sign of the correction unit) are determined based on the reference time. (S110). At this time, as in the present embodiment, when the correction unit (Gage) is 1 second, the difference between the system internal time and the reference clock time is equal to the number of corrections. Then, the current time information inside the system is read again to obtain correction reference time (Base_Time) information (S120). Then, the system time is corrected by adding a correction unit Gage to the current system time Cur_Time, and the number of times the correction operation is performed (Cur_Count) and the number of times to be corrected (Interval_Count) are counted (S130). If the process (S130) is simply expressed as follows.

Cur_Time = Cur_Time + GageCur_Time = Cur_Time + Gage

Cur_Count = Cur_Count + 1Cur_Count = Cur_Count + 1

Interval_Count = Interval_Count + GageInterval_Count = Interval_Count + Gage

이렇게, 1회의 보정이 수행된 후에, 보정할 횟수(즉, Interval_Count)가 0이면 시각 보정 과정이 완료된 것으로 보고 종료한다(S140). 보정할 횟수가 0이 아니면, 보정 주기만큼 대기한 후(S150)(예컨대, 10초 대기), 현재 시간(Cur_Time) 정보를 구하고(S160), 보정하는 동안의 실제 타이머 경과 시간(Elapse_Time_A)과 계산상의 경과 시간(Elapse_Time_B)의 차이로부터 경과 시간 차이(Gap)를 구한 후, 상기 경과 시간 차이를 기초로 보정할 횟수(Interval_Count)를 조절하여 오류 보정을 수행한다(S170~S190). 그 구체적인 알고리즘 구현의 예는 아래와 같이 표현될 수 있다.In this way, after the one-time correction is performed, if the number of corrections (that is, Interval_Count) is 0, the process is completed by reporting that the time correction process is completed (S140). If the number of corrections is not zero, after waiting for a correction period (S150) (for example, waiting 10 seconds), the current time (Cur_Time) information is obtained (S160), and the actual timer elapsed time (Elapse_Time_A) and calculation during correction are performed. After calculating the elapsed time difference Gap from the difference in the elapsed time Elapse_Time_B of the image, error correction is performed by adjusting the number of times Interval_Count to be corrected based on the difference in the elapsed time (S170 to S190). An example of the concrete algorithm implementation can be expressed as follows.

Elapse_Time_A = Cur_Time - Base_TimeElapse_Time_A = Cur_Time-Base_Time

Elapse_Time_B = (Period + Gage)*(Cur_Count) - (Err_Total)Elapse_Time_B = (Period + Gage) * (Cur_Count)-(Err_Total)

Gap = Elapse_Time_B - (Elapse_Time_A + Gage)Gap = Elapse_Time_B-(Elapse_Time_A + Gage)

Err_Total + Err_Total + GapErr_Total + Err_Total + Gap

Interval_Count = Interval_Count - GapInterval_Count = Interval_Count-gap

여기서, Err_Total은 경과 시간 차이에 대한 누적 값이고, Period는 보정 주기이다.Here, Err_Total is a cumulative value for the elapsed time difference, and Period is a correction period.

상기와 같이, 시각 보정 작업을 할 때마다 경과 시간 차이를 누적하여 이를 계산상의 경과 시간(Elapse_Time_B)에 반영함으로써, 보정할 횟수(Interval_Count)를 조절하는데 경과 시간 누적에 의한 오류를 고려할 수 있게 된다.As described above, the time elapsed time difference is accumulated and reflected in the elapsed time Elapse_Time_B in the calculation, so that the error due to the elapsed time may be taken into account in adjusting the number of times of correction (Interval_Count).

이렇게 보정할 횟수를 조절한 다음에는 위에서 구한 경과 시간 차이(Gap)의 값이 0이 아닌지 여부를 판단한다(S200). 경과 시간 차이가 0인 경우에는 타이머의 시각 보정을 하는 과정에서 쓰기 시간 지연 등과 같은 오류가 발생하지 않은 정상적인 경우이므로 단계(S130)으로 다시 되돌아가서, 현재의 시스템 시간(Cur_Time)에 보정 단위(Gage)를 더하여 시스템 시각을 보정하고, 현재까지 보정 동작이 수행된 횟수(Cur_Count) 및 보정할 횟수(Interval_Count)를 카운트하는 단계 등의 과정을 다시 수행한다(S130~S190).After adjusting the number of corrections as described above, it is determined whether the value of the elapsed time difference Gap obtained above is not 0 (S200). If the elapsed time difference is 0, since the error does not occur, such as a write time delay, during the time correction process of the timer, the process returns to step S130, and the correction unit (Gage) is applied to the current system time (Cur_Time). ) To correct the system time, and to repeat the process of counting the number of times the correction operation (Cur_Count) and the number of times to be corrected (Interval_Count) (S130 to S190).

그러나, 경과 시간 차이가 0이 아닌 경우에는 타이머의 시각 보정을 하는 과정에서 쓰기 시간 지연 등과 같은 오류가 발생한 경우로, 이 경우에는 시스템 시간을 지나치게 보정할 가능성이 있으므로 이를 확인해야 한다(S210). 과도한 보정이 있는지 여부를 판단하는 원리는 다음과 같다. 단계(S110)에서 구한 기준 시각과 시스템 내부의 현재 시각과의 차이(Interval_Count)가 음수(-)이면 시스템 내부 시각이 더 느린 경우이므로 시각 보정 방향, 즉 보정 단위(gage)의 방향은 양수(+)이어야 한다. 반대로, Interval_Count 값이 양수(+)이면 시스템 내부 시각이 더 빠른 경우이므로 시각 보정 방향, 즉 보정 단위(gage)의 방향은 음수(-)이어야 한다. 즉, 두 값의 곱은 항상 음수이어야 한다. 그런데, 시각 보정을 하는 과정에서 상기 시간 차이(Interval_Count)의 절대값은 점차 작아지게 된다. 결국, Interval_Count값이 0이면, 시각 보정이 정확하게 완료된 것이므로 시각 보정 작업을 종료한다. 한편, 시각 보정 과정에서의 오류 등으로 인해 시각 보정이 과도하게 되면 기준 시각과 시스템 내부 시각의 차이는 역전되므로 상기 Interval_Count 값의 부호가 변한다. 따라서, 보정 단위(gage)와 시간 차이(Interval_Count) 값의 곱은 양수(+)가 된다. 그러므로, 이러한 경우에도 시각 보정 작업을 종료하여야 한다.However, when the elapsed time difference is not 0, an error such as a writing time delay occurs during the time correction of the timer. In this case, the system time may be excessively corrected, so it should be checked (S210). The principle of judging whether there is excessive correction is as follows. If the difference (Interval_Count) between the reference time obtained in step S110 and the current time inside the system is negative (-), since the internal time of the system is slower, the time correction direction, that is, the direction of the correction unit (gage) is positive (+). Should be) On the contrary, if the Interval_Count value is positive, the internal time of the system is faster. Therefore, the direction of time correction, that is, the direction of the correction unit, should be negative. In other words, the product of two values must always be negative. However, the absolute value of the time difference Interval_Count gradually decreases during the time correction process. As a result, when the Interval_Count value is 0, the time correction is completed because the time correction is completed correctly. On the other hand, if the time correction is excessive due to errors in the time correction process, the difference between the reference time and the internal time of the system is reversed, so that the sign of the Interval_Count value changes. Therefore, the product of the correction unit gage and the time difference Interval_Count value is positive. Therefore, even in this case, the time correction operation must be completed.

그러나, 시각 보정 과정에서 비록 오류가 발생하더라도 여전히 두 값의 곱이 음수인 경우에는 아직 시각 보정을 더 할 필요가 있으므로 단계(S130)으로 다시 되돌아가서, 현재의 시스템 시간(Cur_Time)에 보정 단위(Gage)를 더하여 시스템 시각을 보정하고, 현재까지 보정 동작이 수행된 횟수(Cur_Count) 및 보정할 횟수(Interval_Count)를 카운트하는 단계 등의 과정을 다시 수행한다(S130~S190).However, even if an error occurs during the time correction process, if the product of the two values is still negative, it is still necessary to add time correction again, and the process returns to step S130, and the correction unit (Gage) is applied to the current system time (Cur_Time). ) To correct the system time, and to repeat the process of counting the number of times the correction operation (Cur_Count) and the number of times to be corrected (Interval_Count) (S130 to S190).

지금까지 본 발명의 구성 및 동작에 대해 상세히 설명하였다. 본 발명의 알고리즘에 따르면, 예컨대, 시스템 내부 시각과 기준 클록 시각의 시간 차이가 처음에 10초였더라도, 반드시 1초씩 10회에 걸쳐 시각 보정을 수행하는 것이 아니라, 시각 보정 과정에서 발생하는 경과 시간 오류를 매번 검사하여, 경우에 따라 9회 또는 11회에 걸쳐 시각 보정을 수행할 수도 있다. 따라서, 본 발명에 의할 경우 보다 정확하고 안전한 시각 보정이 가능하다.So far, the configuration and operation of the present invention have been described in detail. According to the algorithm of the present invention, for example, even if the time difference between the internal system time and the reference clock time is initially 10 seconds, the elapsed time that occurs during the time correction process is not necessarily performed 10 times per second. The error may be checked each time and visual correction may be performed nine or eleven times, as the case may be. Therefore, according to the present invention, more accurate and safe time correction is possible.

통상적으로, ATM 스위치 또는 ATM 기반의 MPLS 스위치 또는 호처리가 요구되는 네트워크 장비를 설계할 경우에 그 구조의 복잡함으로 인해 자체 개발만으로는 모든 기능을 구현하기 어려운 경우가 대부분이고, 그에 따라 여러 가지 상용 O/S나상용 Source를 차용하여 부분 적용하는 경우가 많다. 따라서, 본 발명의 알고리즘을 적용함으로써 다수의 O/S나 상용 Source를 사용할 경우에 각 패키지별로 타이머 동작방식의 차이로 인해서 발생할 수 있는 문제점을 최소화하고 호처리 프로토콜의 신뢰성을 보장할 수 있을 뿐만 아니라, 기타의 급격한 시간 변동에 민감한 프로세스에 적용함으로써 그 효과를 높일 수 있다.In general, when designing an ATM switch or an ATM-based MPLS switch or a network equipment requiring call processing, it is often difficult to implement all functions by self-development due to the complexity of the structure. In many cases, it is used by borrowing / S or commercial source. Therefore, by applying the algorithm of the present invention, when using a large number of operating systems or commercial sources, it is possible to minimize the problems that may occur due to the difference in timer operation for each package and to ensure the reliability of the call processing protocol. For example, this effect can be enhanced by applying it to processes that are sensitive to other rapid time changes.

Claims (6)

(a) 기준 클록 보드로부터 시각 정보를 전달받는 단계;(a) receiving time information from a reference clock board; (b) 시스템 내부 시각과 기준 클록 시각과의 차이를 기초로 보정할 횟수 및 보정 단위의 부호를 구하는 단계;(b) obtaining a number of corrections and a sign of a correction unit based on the difference between the system internal time and the reference clock time; (c) 시스템 내부의 현재 시각 정보로부터 보정 기준 시각을 획득하는 단계;(c) obtaining a correction reference time from current time information inside the system; (d) 보정단위만큼을 시스템의 시간에 더하여 시스템의 시각을 보정하는 단계; 및(d) correcting the time of the system by adding a correction unit to the time of the system; And (e) 보정하는 동안의 실제 경과 시간과 계산상의 경과 시간의 차이로부터 경과 시간 차이를 구하고, 상기 경과 시간 차이를 기초로 보정할 횟수를 조절하는 단계;를 포함하며, 보정할 횟수가 0이 될 때까지 상기 (d)~(e) 단계를 소정의 보정 주기로 반복하는 것을 특징으로 하는 시스템 경과 시간을 고려한 분할 시각 보정 방법.(e) obtaining an elapsed time difference from a difference between the actual elapsed time and the calculated elapsed time during the correction, and adjusting the number of corrections based on the difference in the elapsed time; And repeating steps (d) to (e) at a predetermined correction cycle until the time elapsed. 제 1 항에 있어서,The method of claim 1, 상기 단계 (b)에서, 보정할 횟수는 시스템 내부 시각과 기준 클록 시각과의 차이를 보정 단위로 나누어 계산하는 것을 특징으로 하는 시스템 경과 시간을 고려한 분할 시각 보정 방법.In the step (b), the number of times of correction is calculated by dividing the difference between the system internal time and the reference clock time by a correction unit, taking into account the system elapsed time. 제 1 항에 있어서,The method of claim 1, 상기 보정 기준 시각은 시스템 내부에서 현재의 절대 시각 정보 또는 시스템 부팅 후 현재까지의 경과 시각 정보인 것을 특징으로 하는 시스템 경과 시간을 고려한 분할 시각 보정 방법.The correction reference time is divided time correction method in consideration of the system elapsed time, characterized in that the current absolute time information in the system or the elapsed time information from the system boot to the present. 제 1 항에 있어서,The method of claim 1, 상기 단계 (e)에서, 보정하는 동안의 실제 경과 시간은, 시스템의 현재 시각 정보를 다시 구한 후, 상기 시스템의 현재 시각과 상기 보정 기준 시각과의 차이로부터 계산하는 것을 특징으로 하는 시스템 경과 시간을 고려한 분할 시각 보정 방법.In the step (e), the actual elapsed time during the correction is obtained by calculating the current time information of the system again, and then calculating the elapsed time from the difference between the current time of the system and the correction reference time. Consideration of split time correction method. 제 1 항에 있어서,The method of claim 1, 상기 단계 (e)에서, 계산상의 경과 시간은, 보정 주기와 보정 단위를 합하여 1회 보정시마다 경과되는 시간을 구하고, 이 값과 현재까지 보정한 횟수를 곱한 다음, 여기에서 현재까지 누적된 경과 시간 차이의 값을 뺌으로써 구하는 것을 특징으로 하는 시스템 경과 시간을 고려한 분할 시각 보정 방법.In the above step (e), the elapsed time in the calculation is the elapsed time accumulated up to the present, after calculating the time elapsed for each correction by adding the correction period and the correction unit, multiplying this value by the number of corrections to the present time. A division time correction method in which the elapsed time of the system is taken into consideration by obtaining the difference value. 제 1 항에 있어서,The method of claim 1, 상기 보정 주기는, 양호하게는, 호처리 프로세서의 타임아웃 시간과 같은 것을 특징으로 하는 시스템 경과 시간을 고려한 분할 시각 보정 방법.And the correction period is preferably equal to the timeout time of the call processing processor.
KR1020030051915A 2003-07-28 2003-07-28 A gradual time correcting method considering system elapse time KR20050013306A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020030051915A KR20050013306A (en) 2003-07-28 2003-07-28 A gradual time correcting method considering system elapse time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020030051915A KR20050013306A (en) 2003-07-28 2003-07-28 A gradual time correcting method considering system elapse time

Publications (1)

Publication Number Publication Date
KR20050013306A true KR20050013306A (en) 2005-02-04

Family

ID=37224828

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020030051915A KR20050013306A (en) 2003-07-28 2003-07-28 A gradual time correcting method considering system elapse time

Country Status (1)

Country Link
KR (1) KR20050013306A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9712974B2 (en) 2013-05-23 2017-07-18 Xiaomi Inc. Method and device for demodulating a signal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9712974B2 (en) 2013-05-23 2017-07-18 Xiaomi Inc. Method and device for demodulating a signal

Similar Documents

Publication Publication Date Title
US6199169B1 (en) System and method for synchronizing time across a computer cluster
RU2404448C2 (en) Hardware-generated time marks for network packets: improved synchronisation of network clocks
US20180224884A1 (en) Information processing apparatus and information processing method
US7716515B2 (en) Method for updating the timing of a baseboard management controller
KR20010052972A (en) Synchronization of processor in a fault toferant multi-processor system
US10496128B2 (en) Method for obtaining timestamp and computer device using the same
US20140143768A1 (en) Monitoring updates on multiple computing platforms
US7318166B2 (en) Synchronization method, computer system and program wherein the synchronization is provided as a user process of an operating system of the computer
CN112131039B (en) Memory ECC information reporting control method, device, equipment and medium
KR20050013306A (en) A gradual time correcting method considering system elapse time
US11263112B2 (en) Method and apparatus for evaluating quality of software running environment of device
JP6581254B1 (en) Clock adjustment apparatus and program
CN111611186B (en) Transmission control method and device in embedded chip
TWI728687B (en) Error detecting system, error detecting method and image display controlling system
CN112965791A (en) Timing task detection method, device, equipment and storage medium
KR102451821B1 (en) Bidirectional microcomputer monitoring method
US7249203B2 (en) Programmatic time-gap defect detection apparatus and method
JP2002216280A (en) Telemeter monitoring device
JP2002135284A (en) Line concentrator
KR100248061B1 (en) Radar system receiver/transmitter offset remover device and method
CN115794939A (en) Asynchronous copying method and device
JPH10253778A (en) Time exchanging clock system
KR100290650B1 (en) Apparatus and method for removing input jitter from a timing / frequency generating board in a CDMA system
JP2003058245A (en) Monitoring and controlling device
CN115459897A (en) Step length synchronous calibration method and device in electric power real-time simulation and related equipment

Legal Events

Date Code Title Description
N231 Notification of change of applicant
WITN Withdrawal due to no request for examination