Abstract:
A method of converting an input clock to generate an output clock and providing a certain system with the output clock is provided. The method includes setting up a desired output clock value and a variable value and determining whether the input clock is the rising edge; adding the output clock value to the variable value to provide a calculated value when the input clock is the rising edge; comparing the calculated value with the input clock value; and outputting, when the calculated value is equal to or larger than the input clock value as a result of comparison, the output clock as logic state ‘1’ and setting, a value obtained by subtracting the input clock value from the calculated value, as the variable value.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    Pursuant to 35 U.S.C. §119(a), this application claims the benefit of earlier filing date and right of priority to Korean Patent Application No. 10-2014-0009486, filed on Jan. 27, 2014, the contents of which are hereby incorporated by reference herein in its entirety. 
       BACKGROUND 
       [0002]    The present disclosure relates to a method of generating a clock operating at a rising edge and more particularly, to a method of generating a clock signal in a simple structure at high precision. 
         [0003]    The clock signal is a square wave signal in which logic states ‘1’ and ‘0’ are regularly represented. In a general system, a clock has a certain duty ratio and the system is synchronized with the clock to process various signals. 
         [0004]    A clock generation device may be a device that generates a clock having a certain duty ratio to be used in a system and may include a PLL circuit. However, the PLL circuit has limitations in that its logic is complex and it needs many transistors. 
         [0005]      FIG. 1  shows how to provide a system needing a clock having a certain duty ratio with a clock. 
         [0006]    Referring to  FIG. 1 , a PLL circuit  11  adjusts an input clock and generates an output clock suitable for a system  12 . In this case, the PLL circuit may be implemented in both hardware and software, and since a hardware PLL structure has high precision but is complex in logic structure, it needs many transistors. On the contrary, a software-type PLL structure has a limitation in that it is difficult to ensure the precision of an output clock. 
         [0007]    Also, in order to provide a system with a clock having a certain duty ratio, a clock adjustment by the PLL circuit is needed but a system that operates only at the rising edge or falling edge of the clock does not need a PLL circuit having a complex structure. Thus, in a system that needs a clock without a certain duty ratio, generating the clock precisely is needed. 
       SUMMARY 
       [0008]    Embodiments provide a method of generating a clock at high precision through a simple structure, in the case of a system that operates in the rising edge of the clock. 
         [0009]    In one embodiment, a method of converting an input clock to generate an output clock and providing a certain system with the output clock includes setting up a desired output clock value and a variable value and determining whether the input clock is the rising edge; adding the output clock value to the variable value to provide a calculated value when the input clock is the rising edge; comparing the calculated value with the input clock value; and outputting, when the calculated value is equal to or larger than the input clock value as a result of comparison, the output clock as logic state ‘1’ and setting, a value obtained by subtracting the input clock value from the calculated value, as the variable value. 
         [0010]    The output clock value may be set to be smaller than the frequency of the input clock. 
         [0011]    The determining of whether the input clock is the rising edge may include continually checking whether the input clock is the rising edge, when the input clock is not the rising edge. 
         [0012]    When the calculated value is smaller than the input clock value as a result of comparison, the variable value may be set with the calculated value and then it may be checked whether the input clock is the rising edge. 
         [0013]    When the calculated is equal to or larger than the input clock value, the output clock may be output with logic state ‘1’ and then with logic state ‘0’ at the rising edge of the input clock. 
         [0014]    The variable value may be initially set to 0, and in this case, the output clock may be set as logic state ‘0’. 
         [0015]    The method may further include determining whether the input clock is the rising edge, after the setting of the value obtained by subtracting the input clock value from the calculated value as the variable value. 
         [0016]    The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features will be apparent from the description and drawings, and from the claims. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0017]      FIG. 1  shows how to provide, a system needing a clock having a certain duty ratio, with a clock. 
           [0018]      FIG. 2  shows an example of where a clock generation device according to an embodiment is used. 
           [0019]      FIG. 3  shows a configuration of a clock generation device for a system operating at a rising edge according to an embodiment. 
           [0020]      FIG. 4  is a flowchart of the operation of a clock generation device for a system operating at a rising edge according to an embodiment. 
           [0021]      FIG. 5  is an exemplary waveform diagram of an output clock that is generated by a method of generating a clock for a system operating at a rising edge according to an embodiment. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0022]    Reference will now be made in detail to embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. 
         [0023]      FIG. 2  shows an example of where a clock generation device according to an embodiment is used, and  FIG. 3  shows a configuration of a clock generation device for a system operating at a rising edge according to an embodiment. 
         [0024]    Referring to  FIGS. 2 and 3 , a clock generation device according to an embodiment is applied to a system that operates by a rising edge. In addition, a clock generation device  110  changes an input clock to be suitable for a system  120  and provides the system  120  with a generated output clock. 
         [0025]    In addition, the clock generation device  110  may include an output clock setup unit  11  and an output clock generation unit  113 . 
         [0026]    The output clock setup unit  111  is used for setting up an output clock to be provided for the system  120  and may be a user interface with which a user set up an output clock. For example, it may include an input screen that is shown on a display to be able to input an output clock, and an input unit such as a keyboard. 
         [0027]    That is, a user may input a desired output clock to the input screen shown on the display by using a keyboard to set up the output clock. 
         [0028]    In this case, since the output clock is generated by using the rising edge of an input clock in the present embodiment, the output clock may be set to be smaller than the input clock. In addition, the unit of a value set up for the output clock setup unit  111  is a frequency. 
         [0029]    The output clock generation unit  113  changes the frequency of the input clock based on a setup value set by the output clock setup unit  111  and generates the output clock. The operation of the output clock generation unit  113  is described with reference to  FIGS. 4 and 5 . 
         [0030]      FIG. 4  is a flowchart of the operation of a clock generation device for a system operating at a rising edge according to an embodiment. 
         [0031]    Referring to  FIG. 4 , a desired output clock value N and a variable value N′ are firstly set up in step S 110 . In this case, the output clock value N is set up to be smaller than an input clock value M. In addition, the output clock value is set up through the output clock setup unit  111  and the variable value N′ is initially set to ‘0’. 
         [0032]    Next, the output clock generation unit  113  receives the output clock value set up by the output clock setup unit  111  and an input clock, converts the frequency of the input clock based on the output clock value, then generates and outputs the output clock. 
         [0033]    In particular, it is determined whether the input clock is a rising edge in step S 120 , and when negative, it is continually checked whether the input clock is the rising edge. In this case, the output clock is initially set with logic state ‘0’. 
         [0034]    When it is determined that the input clock is the rising edge, the output clock generation unit  113  adds the variable value N′ to the output clock value N to generate a calculated value N″ in step S 130 . 
         [0035]    Next, the input clock value M is compared with the calculated value N″ in step S 140 , and when the latter is smaller than the former (No in step S 140 ), the variable value N′ is set with the calculated value N″ in step S 150 . In addition, it is again determined whether the input clock is the rising edge in step S 120 . 
         [0036]    When the calculated value N″ is equal to or larger than the input clock value M (Yes in step S 140 ), the output clock generation unit  113  generates the output clock of logic state ‘1’ for a certain time and sets, a value obtained by subtracting the input clock value M from the calculated value N″, as the variable value N′ in step S 160 . 
         [0037]    Next, it is determined whether the input clock is the rising edge in step S 120 , and by repetitively performing such an operation, an output clock converted into a frequency set as an output setup value 
         [0038]    A time period during which the logic state ‘1’ of the output clock is maintained is the same as the width of logic state ‘1’ of the input clock. That is, the output state of the output clock maintains logic state ‘1’ and then changes to logic state ‘0’ as at the falling edge of the input clock. 
         [0039]    Thus, the output clock generation unit  113  maintains the output clock at logic state ‘1’ and outputs the output clock with logic state ‘0’ at the falling edge of the input clock, in step S 170 . 
         [0040]      FIG. 5  is an exemplary waveform diagram of an output clock that is generated by a method of generating a clock for a system operating at a rising edge according to an embodiment. 
         [0041]      FIG. 5  shows that the input clock value M is 300 MHz and the output clock value N is 100 MHz. When the first rising edge E_up 1  of the input clock is input (Yes in step S 120 ) while the output clock value N is initially set to 100 and the variable value N′ is initially set to 0 in step S 110 , the output clock value N ‘100’ is added to the variable value N″‘0’ to provide a calculated value N″ ‘100’ in step S 130 . 
         [0042]    Next, the input clock value M ‘300’ is compared with the calculated value N″ ‘100’ in step S 140 , and since the latter M is smaller than the former N″ (No in step S 140 ), the variable value N′ is set with the calculated value N″ in step S 150 . Thus, the variable value N′ becomes 100 and then it is determined whether the input clock is the rising edge in step S 120 . 
         [0043]    Next, when the second rising edge E_up 2  of the input clock is input, an output clock value N ‘100’ is added to the variable value N″100′ to provide a calculated value N″ ‘200’ in step S 130 . 
         [0044]    Next, the input clock value M ‘300’ is compared with the calculated value N″ ‘200’ in step S 140 , and since the former M is larger than the latter N″ (No in step S 140 ), the variable value N′ is set with the calculated value N″ in step S 150 , the variable value N′ becomes 200 and then it is determined whether the input clock is the rising edge in step S 120 . 
         [0045]    Next, when the third rising edge E_up 3  of the input clock is input, the output clock value N ‘100’ is added to the variable value N″200′ to provide a calculated value N″ ‘300’ in step S 130 . In addition, the input clock value M ‘300’ is compared with the calculated value N″ ‘300’ in step S 140 , and since the former M is equal to the latter N″ (Yes in step S 140 ), the output clock is output as logic state ‘1’ and zero obtained by subtracting the input clock value M ‘300’ from the calculated value N″ ‘300’ is set as the variable value N′ in step S 160 . 
         [0046]    Next, it is again determined whether the input clock is a rising edge in step S 120 , and as such a process is repeated, an output clock is generated. 
         [0047]    The output clock maintains logic state ‘1’ and then logic state ‘0’ at the falling edge of the input clock in step S 170 . 
         [0048]    Accordingly, when being applied to the generation of a clock for a system operating at a rising edge using only the rising edge of the clock without needing a certain duty ratio, it is possible to generate the clock without using a complex PLL. In addition, it is possible to ensure the precision of an output clock that a software-type PLL structure may not ensure.