Abstract:
To divide a clock signal, a clock pulse counter counting clock pulses of the clock signal is in each case alternately reset after passing through different count differences. In this process, a first signal and a second signal is formed, the logic state of which is in each case changed with the presence of a first or, respectively, second predetermined count of the clock pulse counter by a rising or, respectively, falling clock signal edge. A divided output clock signal is then generated by a logical operation on the first and the second signal.

Description:
BACKGROUND OF THE INVENTION  
         [0001]    1. Field of the Invention  
           [0002]    The present invention is directed to a frequency divider and more particularly, to a frequency divider having a pulse duty factor of 1:1 at an odd dividing ratio.  
           [0003]    2. Description of the Related Art  
           [0004]    Clock signals of different frequency are frequently needed for clocking modern digital circuits. Such clock signals are generally derived from a reference clock signal by dividing its clock frequency. Depending on the dividing ratio, clock signals of quite different frequency can be generated in this manner.  
           [0005]    The frequency of a clock signal is frequently divided by means of a clock pulse counter which is incremented by the pulses of the clock signal to be divided in order to be reset periodically when a predetermined final count has been reached in each case. A divided output clock signal can be formed, for example from the most significant bit of the current count. The frequency of the output clock signal is then lower than the frequency of the clock signal to be divided, by the factor of the final count.  
           [0006]    The problem with this type of frequency division is, however, that with odd dividing ratios, the pulse duty factor of the divided output clock signal is not equal to 1:1. In this connection, the pulse duty factor is the ratio between the period of time in which the output clock signal is at a logic 1 level and the period of time in which the output clock signal is at a logic 0 level. However, many applications require an output clock signal with a pulse duty factor of 1:1. The deviation of the pulse duty factor of an output clock signal generated by means of the method described above deviates very greatly from the ideal value of 1:1, especially in the case of small odd dividing ratios such as 3 or 5.  
         SUMMARY OF THE INVENTION  
         [0007]    It is the object of the present invention to specify a method for dividing the frequency of a clock signal by means of which an output clock signal having a predetermined pulse duty factor can be generated. In particular, it should be possible to generate an output clock signal having a pulse duty factor of 1:1 even at an odd dividing ratio. It is also the object of the invention to specify a frequency divider circuit for implementing the method according to the invention.  
           [0008]    The above objects are achieved by a method having the features of claim  1 . The objects also are achieved by a frequency divider circuit having the features of claim  7 .  
           [0009]    Dividing the frequency of a clock signal in accordance with the invention is done with the aid of a clock pulse counter counting the clock pulses of the clock signal, which counter which alternately runs through a first count difference, called A in the text which follows, and a different second count difference, called B in the text which follows. In this connection, count difference is the respective number of counted clock pulses after which the clock pulse counter is reset in each case. A respective count difference thus corresponds to the difference between a respective counter start value to which the clock pulse counter is reset, and a respective counter end value after which, when it has been reached, the clock pulse counter is reset again. Alternately running through different count differences can be achieved, for example, by alternately resetting the clock pulse counter to different counter start values from one counter end value which remains the same, or by resetting the clock pulse counter after different counter end values have alternately been reached, the counter start value remaining the same.  
           [0010]    Using the clock pulse counter, a first signal and a second signal are formed, the logic state (0 or 1) of which is changed when a first or second count, in each case predetermined, of the clock pulse counter is present. A change in the state of the first signal is triggered by a risingEdge of the clock signal whilst a change in the state of the second signal is initiated by a falling clock signal edge. Since a logical initial state is assumed again after two successive state changes in both signals, the signal period of both signals is A+B clock periods in the simplest case, i.e. when the counter passes alternately through the first and the second count difference. From the first and the second signal, a divided output clock signal is derived by logically combining these signals. The output clock signal thus also exhibits a period of A+B clock periods. The dividing ratio of a clock frequency division according to the invention, i.e. the ratio between the period of the output clock signal and the clock period of the clock signal, is thus A+B in the aforementioned case.  
           [0011]    The pulse duty factor of the output clock signal can be adjusted within wide limits by selecting the in each case predetermined count at which the first and, respectively, second signal changes its logic state and by selecting the logical combination of the first and second signal. In particular, a pulse duty factor of 1:1 can also be achieved with odd dividing ratios in a simple manner. This can be achieved, for example, by selecting B=A+1 resulting in an odd dividing ratio of A+B =2A+1 and by selecting both the first and the second predetermined count to be equal to the counter end value. The first and the second signal thus change their logic state during the same clock period and are thus offset in time with respect to one another by half a clock period. In the case where the first and the second signal are set to the logic state of 1 after the counter passes through the greater count difference B=A+1 in each case, and to the logic state of 0 after the counter passes through the smaller count difference A, an output clock signal having a pulse duty factor of 1:1 can be formed by a logical OR operation on the first and the second signal. If, in contrast, the first and second signal are set to 0 after the counter has passed through the greater count difference B=A+1, and to 1 after it has passed through the smaller count difference A, an output clock signal having a pulse duty factor of 1:1 can be formed by a logical AND operation on the first and the second signal.  
           [0012]    According to an advantageous further development of the invention, a read/write register can be provided in which a predetermined counter end value and/or a predetermined counter start value and/or a predetermined first and/or second count can be stored. The dividing ratio and the pulse duty factor of the output clock signal of an existing frequency divider circuit according to the invention can thus be varied in a particularly simple manner by changing the register content.  
           [0013]    These together with other objects and advantages which will be subsequently apparent, reside in the details of construction and operation as more fully hereinafter described and claimed, reference being had to the accompanying drawings forming a part hereof, wherein like numerals refer to like parts throughout. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0014]    In the text which follows, an exemplary embodiment of the invention will be explained in greater detail with reference to the drawing, in which:  
         [0015]    [0015]FIG. 1 shows a block diagram of a frequency divider circuit, and  
         [0016]    [0016]FIG. 2 shows a signal timing diagram of signals relevant to a frequency division. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0017]    [0017]FIG. 1 diagrammatically shows a frequency divider circuit FT according to the invention which generates a divided output clock signal clkDiv 5  from an input clock signal clkref. The frequency of the output clock signal clkDiv 5  is less than the frequency of the input clock signal clkref by the odd divider factor of 5. The output clock signal clkDiv 5  has a pulse duty factor of 1:1. The frequency divider circuit FT has as functional components a clock pulse counter TZ with a counting register ZR, a reset device RS connected to the clock pulse counter TZ, a signal generating circuit SE connected to the former and a logical OR gate OG, the two inputs of which are coupled to the signal generating circuit SE. The input clock signal clkref is fed both to the clock pulse counter TZ and to the signal generating circuit SE and the divided output clock signal clkDiv 5  is output at the output of the logical OR gate OG. The reset circuit RS, in turn, has a counter start value register ZAR and a comparison device VE with a counter end value register ZER. The counter start value register ZAR and the counter end value register ZER are constructed as read/write registers. In the present exemplary embodiment, the binary values 01 and 10 are stored in the counter start value register ZAR as counter start values and the binary value 11 is stored in the counter end value register ZER as counter end value.  
         [0018]    In the text which follows, the interaction of the functional components will be explained with reference to a signal timing diagram shown in FIG. 2.  
         [0019]    [0019]FIG. 2 illustrates the variation of various signals contributing to the generation of the output clock signal clkDiv 5  with time. The input clock signal clkref predetermines for all signals shown a timing pattern which is indicated by dotted lines. The input clock signal clkref is used by the clock pulse counter TZ for incrementing the counting register ZR from a respective start value, here alternately 01 and 10. The count cntclkDiv 5  of the counting register ZR which can consist, for example, of cascaded flip-flop circuits, is incremented by 1 with each rising clock pulse edge of the clock signal clkref. The count cntclkDiv 5  is continuously compared with the counter end value 11 stored in the counter end value register ZER by the comparison device VE. When the counter end value 11 is reached, the comparison device VE initiates a reset of the counting register ZR by the resetting device RS. The counting register ZR is alternately reset to the counter start values 01 and 10 contained in the counter start value register ZAR. Thus, the count cntclkDiv 5  of the counting register ZR periodically cycles through the binary values 01, 10, 11, 10 and 11.  
         [0020]    Activated by the comparison device VE, the reset circuit RS generates a reset signal cntReset which assumes the logic state of 1 at the precise time when the count cntclkDiv 5  of the counting register ZR matches the counter end value 11 stored in the counter end value register ZER. This reset signal cntReset is supplied by the reset device RS to the signal generating circuit SE which generates a first signal risingEdge and a second signal fallingEdge from the reset signal cntReset supplied and the clock signal clkref supplied. Both signals risingEdge and fallingEdge are logically combined with the reset signal cntReset to the extent that they invert their logic state at the precise point in time when the reset signal cntReset has the logic state of 1. Such signal behavior can be implemented, for example, by means of a flip-flop circuit. The first signal risingEdge changes its logic state during a risingEdge of the clock signal clkRef whilst the second signal fallingEdge changes its logic state with a fallingEdge of the clock signal clkref. Both signals are set to the logic state of 1 after the counter has passed through the greater count difference starting from counter start value 01 in each case and are reset to the logic state of 0 after the counter has passed through the smaller count difference starting from counter start value 10. The signals risingEdge and fallingEdge thus stay in the logic state of 1 for two clock periods of the clock signal clkref and in the logic state of 0 for three clock periods, both signals being offset in time by half a clock period.  
         [0021]    Both signals risingEdge and fallingEdge are supplied to the inputs of the logical OR gate OG which forms from these the divided output signal clkDiv 5  by means of a logical OR operation on the signals risingEdge and fallingEdge. Due to the time offset of the signals risingEdge and fallingEdge, the output clock signal clkDiv 5  generated by the logical OR operation on them stays in the logic state of 1 for 2½ clock periods and in the logic state of 0 also for 2½ clock periods and thus has a pulse duty factor of 1:1.  
         [0022]    The frequency divider circuit FT can be configured in a simple manner for generating output clock signals having other divider ratios and/or other pulse duty factors by storing a different counter end value in the counter end value register ZER and/or other counter start values in the counter start register ZAR. Thus, storing a binary counter end value of 111 in the counter end value register ZER and the counter start values remaining 01 or, respectively, 10, produces a frequency division of the input clock signal clkref with the dividing ratio of 13. The output clock signal generated in this case also has a pulse duty factor of 1:1.  
         [0023]    In general, the frequency divider circuit FT of the present exemplary embodiment divides the frequency of an input clock signal clkref by an odd divider ratio T which is given by: T=2*ZE−1 with a counter end value of ZE and the counter start values of 01 and 10. The pulse duty factor of each respective output clock signal is 1:1.  
         [0024]    In the text which follows, an actual embodiment of a frequency divider circuit according to the invention is specified by means of the VHSIC hardware description language VHDL (VHSIC: Very High Speed Integrated Circuit) according to IEEE (IEEE: Institute of Electrical and Electronic Engineers) Standard:  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             -- ##################################################       -- #######Clock Divider ###################################       -- #####################################################       library IEEE, ARITHMETIC;       use IEEE.std_logic_1164.all;       use ARITHMETIC. std_logic_arith.all;       entity CLKD is                port                (           clkRef : IN std_ulogic;           pon : IN std_ulogic;                clkDiv5   :   OUT std_ulogic           );            end CLKD;       -- #####################################################       architecture RTL of CLKD is                signal cntclkDiv5   :   std_ulogic_vector(2 downto 0);           signal cntReset   :   std_ulogic;           signal fallingEdge   :   std_ulogic;           signal risingEdge   :   std_ulogic;            begin       ++++++++++++++++++++++++++++++++++++++++       ++++++++++++++++++++++++++++++       -- clkDiv5 clock divider (clkRef:5= clkDiv5)       --       ++++++++++++++++++++++++++++++++++++++++       ++++++++++++++++++++++++++++++                ClkDiv5_counter : process (clkRef,pon)           begin                if (pon =‘1’) then                cntclkDiv5 &lt;= “001”;                elsif((clkRef′ event) and (clkRef= ‘1’)) then                if (cntRset= ‘1’) then                cntclkDiv5 &lt;== “001” + (“00” &amp; fallingEdge);                else                cntclkDiv5 &lt;== cntclkDiv 5 + (“001”;                end if;                end if;                end process clkDiv5_counter;            --       ++++++++++++++++++++++++++++++++++++++++       ++++++++++++++++++++++++++++++                CntReset_gen : process (cntclkDiv5)           begin                if(cntclkDiv5= “111”) then           cntReset &lt;= ‘1’;                else                cntReset &lt;= ‘0’;                end if;                end process CntReset_gen;            --       ++++++++++++++++++++++++++++++++++++++++       ++++++++++++++++++++++++++++++                FallingEdge_ff : process (clkRef, pon)           begin                if (pon = ‘1’) then                fallingEdge &lt;= ‘0’;                elsif((clkRef′event) and (clkRef= ‘0’)) then                if (cntReset= ‘1’) then                fallingEdge &lt;= not fallingEdge;                end if;                end if;                end process fallingEdge_ff;            --       ++++++++++++++++++++++++++++++++++++++++       ++++++++++++++++++++++++++++++                RisingEdge_ff : process (clkRef,pon)           begin                if(pon = ‘1’) then                risingEdge &lt;= ‘0’;                elsif ((c/kRef′event) and (clkRef= ‘1’) then                if (cntReset = ‘1’) then                risingEdge &lt;= not risingEdge;                end if;                end if;                end process RisingEdge_ff;            --       ++++++++++++++++++++++++++++++++++++++++       ++++++++++++++++++++++++++++++                clkDiv5 &lt;= risingEdge or fallingEdge;            --       ++++++++++++++++++++++++++++++++++++++++       ++++++++++++++++++++++++++++++       END RTL;                The VHDL code specified and describing the frequency divider circuit            can be used directly for automatically generating a chip layout for the frequency       divider circuit. The VHDL code itself is independent of any technology to be       used during the chip production.