The present invention relates to a counter circuit, which operated with high frequency clock.
From long before the counter circuit has served various uses such as counting internal signals consisting data processors.
Generally, counter circuits have two types: synchronous counter circuits and asynchronous counter circuits. These two types are used as appropriate, however both circuits comprise a plurality of flip-flops such as RS flip-flops and D flip-flops.
The counter circuit shown in
The count value of the clock signal can be obtained by extracting the signal, latched by the output terminal DA of the each macro, from the output terminals D0 through D7. In such a case, the output terminal D0 is the LSB and the output terminal X07 is the MSB.
The counter circuit shown in
The count value of the clock signal can be obtained by extracting the signal, latched by the output terminal DA of the each macro. In such a case, the D flip-flop X00 is the LSB and the D flip-flop X07 is the MSB.
Japanese Published Unexamined Application No. 2003-121499 describes a counter circuit, used to reduce the performance time of an integration test, utilizing a decode circuit, without increasing the test data volume.
However, the above explained counter circuit has the technical issue that on attempting to increase the clock frequency of the counter, as shown in
There is another issue that on increasing the bit number of the counter, malfunction is caused because the carry time lag is increased in proportion to the bit number.
The present invention is created reflecting the above issues. It is an object of the present invention to provide a counter circuit, which can be operated at a high clock frequency.
In order to achieve the above object, the counter circuit relating to the present invention comprises a plurality of count units, which count the input signal and output the count result, a phase control unit, which controls a plurality of the count units so that they comprise a designated phase difference between each other, and a counter output switching unit, which switches from the output of any one count unit, controlled to comprise a designated phase difference by the phase control unit, to the output of the count units, comprising a leading phase of the count unit.
The counter circuit relating to the present invention can be a counter circuit comprising a first counter circuit, which counts the input signal and outputs the count result, a second counter circuit, which counts the input signal and outputs the count result, a phase control circuit, which controls the phase so that the second counter circuit has a phase difference of π [rad] from the first counter circuit, and a counter output switching unit, which switches between the output of the first counter circuit to the output of the second counter circuit, comprising a leading phase of π [rad] from the first counter circuit by the phase control unit with designated timing.
The counter circuit relating to the present invention can also be a counter circuit comprising a first counter circuit, which counts the input signal and outputs the count result, a second counter circuit, which counts the input signal and outputs the count result, a third counter circuit, which counts the input signal and outputs the count result, a fourth counter circuit, which counts the input signal and outputs the count result, a phase control circuit, which controls the counter circuits so that each of the first and the second counter circuits, the second and the third counter circuits, the third and the fourth counter circuits, and the fourth and the first counter circuits have leading phases of π/2 [rad], a counter output switching unit, which switches the output of the first counter circuit, the second counter circuit, the third counter circuit, and the fourth counter circuit, each comprising a leading phase of π/2 [rad] by the phase control circuit with designated timing.
In the counter circuit of the present invention comprising a plurality of counter units, which count the input signal and output the counting result, counting can be a method comprising a phase control process, which controls a plurality of count units so that they have a designated phase difference from each other, a counter output switching process, which switches from the output of any one of the count units controlled to have a designated phase difference by the phase control process to the output of the count units of the counter circuit comprising leading phase of the above count unit.
In addition, the counter circuit relating to the present invention can also be a counter circuit comprising a count unit, which counts the input signals and outputs the count results with a designated phase difference from each other, and counter output switching unit, which selects the output of any one count unit among a plurality of the count units and serially switches it to the output of the count units of the counter circuit comprising the leading phase of the above count unit at a designated timing according to the input signal.
The counter circuit relating to the present invention can be a counter circuit comprising a plurality of count units, which count the input signal and output the count result, a phase control unit, which controls the parallel distribution process in which the input signal is provided to a plurality of the count units so that a plurality of the count units comprises a designated phase difference from each other and also controls the count process in which all count units except for a particular count unit count the value to be output after the count result while the above count unit outputs the count result, and a counter output switching unit, which switches the output from the output of the above count unit have a designated phase difference by the phase control unit, to that of the output of the count units comprising a leading phase of the above count unit.
In order to address the issues described above, the present invention comprises a plurality of count units, which count input signals and outputs the count result, a phase control unit, which controls a plurality of the count units so that they have a designated phase difference between one another, and a counter output switching unit, which switches the output of the count unit 1, controlled by the phase control unit so as to have the designated phase difference, to the output of the count units comprising a leading phase of the count unit 1.
According to the present invention, effect of delay time, generated when the count unit counts the input signals, can be reduced in such a way that the counter output switching unit switches the output of count unit 1 to the output of the count unit comprising the leading phase to count unit 1.
The present invention further comprises an output selection unit, which generates timing of sequential selection of the count unit comprising the leading phase of a plurality of the count units according to the input signal, and the counter output switching unit can switch the output of the count unit 1 to the output of the generated count unit in response to the information from the output selection unit.
In this case also, following the timing of the sequential selection of the count unit comprising leading phase of a plurality of the count units according to the input signal, a counter output switching unit switches the output of any one of the above count units to the output of the other count unit, comprising the leading phase of one count unit. Therefore, the effect of the time lag, that occurs when the count unit counts the input signal, can be reduced.
The count unit can be a counter circuit, which consists of a plurality of flip-flops. More specifically, any kind of flip-flop, which consists of a counter circuit, such as D flip-flops, RS flip-flops and JK flip-flops, can be used.
In addition, the counter circuit, which consists of a plurality of flip-flops, can be either an asynchronous counter circuit or a synchronous counter circuit.
According to the present invention, it is possible to provide a high-frequency clock counter circuit and multibit counter circuit.
The embodiments of the present invention are hereafter explained with reference to
First, an explanation of the first embodiment relating to the present invention is provided below with reference to
The counter circuit shown in
The first counter circuit 1 comprises an HA macro 4 shown is
The clock signal with period T[s] input from the input terminal CK is provided to the input terminal CI of the HA macro 4, and the clock signal with period 2T[s] is output from the output terminal DA. The output from the HA macro 4 is sent to the input terminal CI of the FA macro 5a, and the clock signal with period 4T[s] is output from the output terminal DA followed by the input of the output signal to the input terminal CI of the FA macro 5b. In the same manner, the FA macros 5, processes the output signal of the preceding FA macro 5, that is the output signal with a period twice as short as the period of the input signal.
Here, the output signals of the HA macro 4 (the output signals from the output terminal O0) are the LSB (Least Significant Bit), and the output signals of the FA macro 5g (the output signals from the output terminal O7) are the MSB (Most Significant Bit).
The second counter circuit 2 comprises the FA macros 5h˜5n shown in
In order to simplify the diagram, the second counter circuit 2 is not comprised of the HA macro 4 in
The present invention is of the configuration in which the HA macro 4 (LSB in the counter circuit) in the first counter circuit 1 is shared by the LSB of the second counter circuit 2 for the purpose of parts sharing (i.e. circuit size-reduction). However, it is not limited to this configuration.
That is, the first counter circuit 1 and the second counter circuit 2 can comprise separate macros from LSB to MSB with dedicated HA macros and FA macros. In this case, additional circuits, a phase control circuit for controlling the phases of each counter circuit 1 and 2, and a counter output switching circuit for selecting the output signals of counter circuit 1 and 2, should be also comprised.
The clock signal with period T[s] input from the input terminal CK is provided to the input terminal CI of the HA macro 4, and the clock signal with period 2T[s] and phase difference of π [rad] is output from output terminal DX. The output from the DX of the HA macro 4 is provided to CI, that is the input terminal of the FA macro 5h, the clock signal with period 4T[s] is output from the output terminal DA, and the clock signal is provided to the input terminal CI of the FA macro 5i. Similarly, the macros 5, which input the output signal from an FA macro 5, output signals with a period twice as short as the period of the input signals.
The HA macro 4 comprises a function of phase control of the second counter circuit 2, and outputs the LSB signal of the second counter circuit 2 (the output signal from the output terminal E0). The output signal of the FA macro 5n (the output signal from the output terminal E7) is regarded as the MSB.
The counter output switching circuit 3 comprises a output selection circuit 9, comprising an inverter 7 and a D flip-flop 8, and SW macros 6a through 6h, which switch the output signals between the first counter circuit 1 and the output signal of the second counter circuit 2 in response to the output signal from the output selection circuit 9, and output to the output terminal D0 to D7.
In the output selection circuit 9, comprising the inverter 7 and the D flip-flop 8, the clock signal from the input terminal CK is provided to the D flip-flop 8 through the inverter 7. The output selection circuit 9 uses the output signal from the output terminal q as the first counter select signal (the output signal from the output terminal OS), and uses the inverted signal of the output terminal q as the second counter select signal (the output signal of the output terminal ES).
The SW macros 6a through 6h switch the output of the first counter circuit 1 and the output of the second counter circuit 2, based on the first counter select signal and the second counter select signal, and both are output from the output terminals D0˜D7. For example, the SW macro 6b outputs the output signal of the first counter circuit to the output terminal D1 when the first counter select signal is high, and outputs the output signal of the second counter circuit to the output terminal D1 when the second counter select signal is high.
The SW macro 6a relating to the present invention is configured to select the output signals of the first counter circuit 1 all of the time to simplify circuit configuration.
From the input terminal CL, the reset signal is input, and when the input signal is low, the state of the D flip-flop, which the first counter circuit 1, the second counter circuit 2 and the counter output switching circuit 3 are in, is cleared.
The HA macro shown in
The signal with a period twice as short as the input signal is output from the output terminal DA and the inverted signal of the output signal from the output terminal DA (the signal with phase difference π [rad]) is output from the output terminal DX.
As a result of the reset signal from the input terminal CL, the state of the D flip-flop is cleared. In other words, when the reset signal is low, the state of D flip-flop is cleared.
The FA macro shown in
Therefore, a signal with a period twice as short as the input signal is output from the output terminal DA and the state of D flip-flop is cleared when the reset signal is applied from the input terminal CL.
The SW macro shown in
Accordingly, NAND gates 14 through 16 switch the output signal of the first counter circuit 1 and the second counter circuit 2 in response to the first counter select signal and the second counter select signal, and the output signals are applied to D flip-flop 20. For example, when the first counter select signal of the output selection circuit 9 is high, and the output signal of the first counter circuit 1 is also high, a high signal are input to an input terminal d of the D flip-flop 20. When the second counter select signal of the output selection circuit 9 is high and the output signal of the second counter circuit 2 is also high, a high-level signal is input to an input terminal d of the D flip-flop 20.
The inverters 17 and 18 are inserted to adjust the time lag caused by the NAND circuits 14 through 16.
The above operations allow the SW macros to select the output signal from the first counter circuit 1 input to the input terminal OD, and to latch and output the signal in accordance with the clock signal input to the input terminal CK, when the first counter select signal from the output selection circuit 9 input to the input terminal OS is high. The above operations also allow the SW macros to select the output signal from the second counter circuit 2 input to the input terminal ED, and to latch and output the signal in accordance with the clock signal input to the input terminal CK when the second counter select signal from the output selection circuit 9 input to the input terminal ES is high.
In the explanation above, the first counter circuit 1, the second counter circuit 2 and the counter output switching circuit 3, relating to the present invention, all comprise D flip-flops, however it is not limited to this configuration. In other words, circuits comprising a similar function to the D flip-flop shown in the present invention by the combination of logic circuits and RS flip-flops or JK flip-flops, for example. Circuits comprising the combination of logic circuits with a similar function to a D flip-flop can also be used.
The counter circuit relating to the present invention is an example of an 8-bit counter circuit, however it is not limited to 8-bits. That is, the present invention can be applied to counter circuits counting by an arbitrary number of bits.
In the explanation below, labels of the output terminals shown in
The signal O0 is the output signal of the HA macro 4 in the first counter circuit 1. Thus, at the time that the signal CK becomes low, the signal O0 is switched from high to low or from low to high, and the period of the signal period becomes twice that of the signal CK.
At times when the signal CK is low, the output signal of the HA macro 4 (the signal from the output terminal DA) is switched, however the switching of the signal is not instantaneous and causes carry time lag (the time period (1) in
The signal O1 is the output signal of the FA macro 5a in the first counter circuit 1. Therefore, at times when the signal O0 is low, the signal O1 is switched from high to low or from low to high, and the period of the signal becomes twice that of the signal O0.
At times when the signal O0 is low, the output signal of the FA macro 5a is switched, however the switching of the signals is not instantaneous and causes carry time lag (the time period (2) in
Similarly, the signal O2 is the output signal of the FA macro 5b in the first counter circuit 1. At times when the signal O1 is low, the signal O2 is switched from high to low or from low to high, and the period of the signal becomes twice that of the signal O1.
At times when the signal O1 is low, the output signal of the FA macro 5b is switched, however the switching of the signal is not instantaneous and causes carry time lag (the time period (3) in
By similar operations to those explained above, the signals O3 through O7 in the first counter circuit 1 shown in
The signal E0 is the output signal from the output terminal DX of the HA macro 4 in the first counter circuit 1, and has a phase difference of π [rad] compared with the signal O0. Therefore, at the time that the signal CK becomes low, the signal E0 is switched from high to low or low to high, maintaining a phase difference of π [rad] from the signal O0. The period of the signal is twice that of the signal CK.
At times when the signal CK is low, the output signal of the HA macro 4 (the signal from the output terminal DX) is switched, however the switching of the signal is not instantaneous and causes carry time lag (the time period (4) in
The signal E1 is the output signal of the FA macro 5h in the second counter circuit 2. Therefore, at the time that the signal E0 becomes low, the signal E1 is switched from high to low or from low to high, and the period of the signal becomes twice that of the signal E0.
At times when the signal E1 is low, the output signal of the FA macro 5h is switched, however the switching of the signal is not instantaneous and causes carry time lag (the time period (5) in
Similarly, the signal E2 is the output signal of the FA macro 5i in the second counter circuit 2. At times when the signal E1 is low, the signal E2 is switched from high to low or from low to high, and the period of the signal becomes twice that of the signal E1.
At times when the signal E1 is low, the output signal of the FA macro 5i is switched, however the switching of the signal is not instantaneous and causes carry time lag (the time period (6) in
By similar operations to those explained above, the signals E3 through E7 in the second counter circuit 2 shown in
The signal OS is the output signal of the output selection circuit 9 in the counter output switching circuit 3 (the output signal from the output terminal q of the D flip-flop 8). Therefore, at times when the signal CK becomes low, the signal OS is switched from high to low or from low to high. The period of the signal becomes twice that of the signal CK.
Similarly, the signal ES is the output signal of the output selection circuit 9 in the counter output switching circuit 3 (the output signal from the output terminal d of the D flip-flop 8). Thus, the signal has a phase difference of π [rad] from the signal OS, and the period of the signal is twice that of the signal CK.
At times when the signal CK becomes low, the output signal of the D flip-flop 8 (the output signal from the output terminal d and q) is switched, however the switching of the signals is not instantaneous and causes carry time lag (the time periods (7) and (8) in
The signal D0 is the output signal of the SW macro 6a when the input to terminals OD and ED is the signal O0. At times when the signal CK is low, the signal D0 is switched from high to low or from low to high, thus D0 is a signal with a phase difference of π [rad] compared with the signal O0. At times when the signal CK is low, the output signal of the SW macro 6a (the signal from the output terminal Q) is switched, however the switching of the signals is not instantaneous and causes carry time lag (the time period (9) in
The signal D1 is the output signal selected from either the signal O1 or the signal E1 by the SW macro 6b depending on the state of the first counter select signal OS and the second counter select signal ES. For example, at times (10) (the times when the signal CK is low indicated in solid lines in
At times (11) (the time when the signal CK is low indicated by broken lines in
At time (12) (the time when the signal CK is low indicated by solid lines in
Here, regarding the above timing (10) and (12), the signal D1 switches from low to high or from high to low at times that the signal CK is low. This switch also causes carry time lag.
However, the SW macro 6b switches the signal at times that the signal CK is low, based on the first counter select signal OS and the second counter select signal ES. The carry time lag of the signal D0 from the signal CK and the carry time lag of the signal D1 from the signal CK are nearly equal. Thus the carry time lag of the signal D1 from the signal D0 can be disregarded. That is, at times when the signal D0 is low, the signal D1 can be switched from high to low or from low to high without the carry time lag.
In a similar way, the signal D2 is the output signal selected from either the signal O2 or the signal E2 by the SW macro 6c depending on the state of the first counter select signal OS and the second counter select signal ES. For example, at the time (12) (the time when the signal CK is low indicated by a solid line in
At the time (13)(the time when the signal CK is low indicated by a broken line in
At the time (14)(the time when the signal CK is low indicated by a solid line in
Here, regarding the above timing (12) and (14), the signal D2, similarly to the signal D1, switches from low to high or from high to low at the timing when the signal CK becomes low. This switch also causes carry time lag.
However, the SW macro 6c switches the signal D2 at the timing that the signal CK becomes low, based on the first counter select signal OS and the second counter select signal ES. The carry time lag of the signal D1 from the signal CK and the carry time lag of the signal D2 from the signal CK are nearly equal. Thus the carry time lag of the signal D2 from the signal D0 and D1 can be disregarded. That is, at the timing when the signal D1 becomes low, the signal D2 can be switched from high to low or from low to high without carry time lag.
By similar operations to those explained above, the signals D3 through D7 are output in the counter output switching circuit 3 shown in
On using the counter circuit explained above, the carry time lag from the HA macro 4 to the FA macro 5g in the first counter circuit 1 or the carry time lag from the HA macro 4 in the first counter circuit 1 and the FA macros 5h to 5n in the second counter circuit 2 should be within a period of the signal CK signal.
Then, the period of the clock signal, which is an external input signal (input signal to the input terminal CK of
T=T0+π/N (1)
Where T0 is the shortest period at which the LSB of the first counter circuit 1 can be operated and T is the carry time lag of all bits (for example, the carry time lag of the HA macro 4, or LSB, and FA macros 5a through 5g or the carry time lag of the FA macros 5h through 5n shown in
The counter circuit shown in
The first counter select signal OS and the second counter select signal ES in the counter output switching circuit 21 shown in
The first counter select signal OS in
According to
By the configuration explained above, the output selection circuit 9 shown in
The counter circuits shown in
A phase control circuit 36 comprises the function of the output selection circuit 9 shown in
The first counter circuit 28 comprises HA macros 22a and 22b shown in
The clock signal with period T[s] input from the input terminal CK is provided to the input terminal CI of the HA macro 22a, and the clock signal with period 2T[s] is output from the output terminal DA. The output from the HA macro 22a is provided to the input terminal CI of the HA macro 22b, and the clock signal with period 4T[s] is output from the output terminal DA. The output is provided to the input terminal CI of the FA macro 23a. Similarly, the FA macros, receiving input of the signal output from any one FA macro, output a signal with a period twice that of the input signal.
In such a case, the output signal of the HA macro 22a (the output signal from the output terminal A00) is the LSB, and the output signal of the FA macro 23j (the output signal of the output terminal A11) is the MSB.
The second counter circuit 29 comprises the HA macro 24 shown in
The clock signal with period T[s] input from the input terminal CK is provided to the input terminal CI of the HA macro 22a, and the clock signal with period 2T[s] and a phase difference of π [rad] is output from the output terminal DX. The output from the HA macro 22a is provided to the input terminal CI of the HA macro 24, the clock signal with period 4T[s]is output from the output terminal DA, and the clock signal is input to the input terminal CI of the FA macro 25a. Similarly, the FA macros, receiving input of the signal output from any one FA macro, output a signal with a period twice that of the input signal.
In such a case, the output signal of the HA macro 22a (the output signal from the output terminal A00) is the LSB, and the output signal of the FA macro 25j (the output signal of the output terminal B11) is the MSB.
The third counter circuit 30 comprises the FA macros 26a through 26j shown in
In this case, the output signal of the HA macro 22a (the output signal from the output terminal A00) is the LSB, and the output signal of the FA macro 26j (the output signal of the output terminal C11) is the MSB.
The fourth counter circuit 31 comprises the FA macros 27a through 27j shown in
The clock signal with a period T[s] input from the input terminal CK is provided to the input terminal CI of the HA macro 22a, and the clock signal with period 2T[s] and a phase difference of π [rad] is output from the output terminal DX. The output from the HA macro 22a is provided to the input terminal CI of the HA macro 24, the clock signal with a period 4T[s] and a phase difference of π [rad] is output from the output terminal DX, and the clock signal is input to the input terminal CI of the FA macro 27a. Similarly, the FA macros, receiving input of the signal output from any one FA macro, output a signal with a period twice that of the input signal.
In such a case, the output signal of the HA macro 22a (the output signal from the output terminal A00) is the LSB, and the output signal of the FA macro 27j (the output signal of the output terminal B11) is the MSB.
The counter output switching circuit 38 comprises the phase control circuit 36, comprising the HA macros 22a and 22b and the HA macro 24, AND gates 32 through 35, and the SW macros 37a through 37l.
In phase control circuit 36, as stated above, the signal D00 (the wavy line (2) in
The signal B01, the signal C01, and the signal D01 have phase differences of 0.5π [rad], 1.0π [rad]and 1.5π [rad], respectively, from the signal A01.
In AND circuits 32 through 35, the first counter select signal (wavy line (8) in
The SW macros 37a through 37k switch the output signal of the first counter circuit 28 through the fourth counter circuit 31 and output to the output terminal O00 through O11, in response to the first counter select signal, the second counter select signal, the third counter select signal and the fourth counter select signal, respectively.
The present invention is configured in such a way that the HA macro 22a (LSB in the counter circuit) in the first counter circuit 28 is shared by the LSB of the second counter circuit 29, the third counter circuit 30, and the fourth counter circuit 31, and the HA macro 22b in the first counter circuit 28 and the HA macro 24 in the second counter circuit 29 are shared by the third counter circuit 30 and the fourth counter circuit 31 for the purpose of parts sharing (i.e. circuit size-reduction). However, the present invention is not limited to this configuration.
That is, the first counter circuit 28, the second counter circuit 29 the third counter circuit 30 and the fourth counter circuit 31 can comprise separate macros from LSB to MSB with dedicated HA macros and FA macros. In such a case, additional circuits, a phase control circuit for controlling phases of the counter circuits and a counter output switching circuit for selecting the output signal of the first counter circuit 28 through the fourth counter circuit 31, should be comprised.
The SW macro shown in
The NAND gate 39 receives the output signal of the first counter circuit 28 and the first counter select signal A01 as input, the NAND gate 40 receives the output signal of the second counter circuit 29 and the second counter select signal B01 as an input, the NAND circuit 41 receives the output signal of the third counter circuit 30 and the third counter select signal C01 as input, and the NAND gate 42 receives the output signal of the fourth counter circuit 31 and the fourth counter select signal D01 as input.
NAND gates 39 through 43 switch the output signal of the first counter circuit 28, the second counter circuit 29, the third counter circuit 30 and the fourth counter circuit 31 in response to the first counter select signal, the second counter select signal, the third counter select signal and the fourth counter select signal, and output to the D flip-flop 47.
For example, when the first counter select signal is high and the output of the first counter circuit 28 is also high, a high-level signal is input to the input terminal d of the D flip-flop 47. When the second count select signal is high and the output of the second counter circuit 29 is high, a high-level signal is input to the input terminal d of the D flip-flop 47.
Similarly, when the third count select signal is high and the output of the third counter circuit 30 is high, a high-level signal is input to the input terminal d of the D flip-flop 47. When the fourth count select signal is high and the output of the fourth counter circuit 31 is high, a high-level signal is input to the input terminal d of the D flip-flop 47.
The inverters 44 through 46 are inserted in order to adjust the time lag caused by the NAND circuits 39 through 43.
The above operation allows the SW macros to select the output signal from the first counter circuit 28 and to latch and output the signal in accordance with the clock signal input to the input terminal CK when the first counter select signal is high, and to select the output signal from the second counter circuit 29 and to latch and output the signals in accordance with the clock signal input to the input terminal CK when the second counter select signal is high.
In a similar way, the SW macros select the output signal from the third counter circuit 30 and latch and output the signals in accordance with the clock signal input to the input terminal CK when the third counter select signal is high, and select the output signal from the fourth counter circuit 31 and latch and output the signals in accordance with the clock signal input to the input terminal CK when the fourth counter select signal is high.
The signal A00 is an output signal of the HA macro 22a in the first counter circuit 28. At the timing when the signal CK becomes low, the signal A00 switches from high to low or from low to high. The signal period becomes twice that of the signal CK.
At the timing when the signal CK becomes low, the signal A00 is switched, however the switching of the signal is not instantaneous and causes carry time lag (A00 in the time period with wavy line (1) in
The carry time lag of the signals A01 through A11 is generated by similar operations (A01 through A11 in the time period with a wavy line (12) in
In a similar way, a carry time lag of the signals B01 through B11, the signals C01 through C11, and the signals D01 through D11 are generated in the second counter circuit 29, in the third counter circuit 30 and in the fourth counter circuit 31, respectively (B01 through B11, C01 through C11 and D01 through D11 in the time period with wavy lines (13) and (14) in
The signal A00 is always used for the output signal O00 of the counter circuit, and the signal A01 in the output signal from the phase control circuit 36 is always used for the signal O01.
In response to the first counter select signal through the fourth counter select signal, the output signals O02 through O11 from the counter circuit switch the output signals from the first counter circuit 28, the second counter circuit 29, the third counter circuit 30 and the fourth counter circuit 31, and are output.
For example, regarding signal A02, at the timing (16) in
At the time (17), the third counter select signal is high and the signal C02 is low, the output signal O02 of the counter circuit remains low.
At the timing (18), the fourth counter select signal is high and the signal D02 is also high, the output signal O02 of the counter circuit is switched from low to high.
The SW macros 37c through 37l switch the signals at the timing when the signal CK becomes low based on the first counter select signal through the fourth counter select signal. Therefore, the carry time lag of the output signals O02 through O11 is the time lag of the switching of the signal CK.
An explanation of the second embodiment relating to the present invention is provided below based on
The counter circuit shown in
The first counter circuit 48 comprises the FA macros 51a through 51j shown in
The clock signal with a period T[s] input from the input terminal CK is provided to the D flip-flop 53, and the clock signal with a period 2T[s] is output from the output terminal q. The clock signal from the input terminal CK is provided to the D flip-flop 56 and divided into two (this demultiplied signal is hereafter referred to as the demultiplied clock signal). The FA macros 51a through 51j and the HA macro 52 are synchronized with the demultiplied clock signal, and are count processed. Similarly the FA macro 54a through 54j and the HA macro 55 is synchronized with the inverted signal of the demultiplied clock signal (a signal with a leading phase difference of π), and are count processed.
The output signal of the D flip-flop 53 is applied to the input terminal CI of the FA macro 51a, and is synchronized with the demultiplied clock signal. The clock signal with a period 4T[s] is output from the output terminal CO and input to the input terminal CI of the FA macro 51b. In a similar way, the FA macros 51, which receive input of the output signal from any one FA macro 51, output the signal with a period twice that of the input signal. At the completion, the output signal of the FA macro 51j is provided to the input terminal CI of the HA macro 52, and is output from the output terminal DA.
In this case, the output signal of the D flip-flop 53 (the output signal from the output terminal O0) is the LSB, and the output signal of the HA macro 52 (the output signal of the output terminal OB) is the MSB.
Because the first counter circuit 48 is a synchronous counter circuit, the D flip-flop 53 is synchronized with the clock signal CK, also the FA macros 51a through 51j and the HA macro 52 are synchronized with the demultiplied clock signal, and then the output signals O0 through OB are output.
The second counter circuit 49 comprises the FA macros 54a through 54j shown in
The clock signal with period T[s] is input to the D flip-flop 53 from the input terminal CK, and a signal with a period 2T[s] and a phase difference (the leading phase difference) of π [rad]from the output signal from the output terminal q (the demultiplied clock signal) is input to the input terminal CI of the FA macro 54a. The FA macro 54a is synchronized with the demultiplied leading phase clock signal, and outputs the clock signal with a period of 4T[s] from the output terminal CO, and provides it to the input terminal CI of the FA macro 54b. Similarly, the other FA macros 54, which receive input of the output signal of any one FA macro 54, output a signal with a period twice that of the input signal. Upon completion of proicessing, the output signal of the FA macro 54j is provided to the input terminal CI of the HA macro 55, and is output from the output terminal DA.
Also in this case, the output signal of the D flip-flop 53 (the output signal from the output terminal E0) is the LSB, and the output signal of the HA macro 55 (the output signal of the output terminal EB) is the MSB.
Because the second counter circuit 49 is also a synchronous counter circuit, the D flip-flop 53 is synchronized with the clock signal CK, also the FA macros 54a through 54j and the HA macro 55 are synchronized with the demultiplied clock signal, and the output signals E0 through EB are output.
The counter output signal switching circuit 50 comprises an output selection circuit 60, which comprises an inverter 58 and a D flip-flop 59, and SW macros 57a through 57l, which switche the output signals of the first counter circuit 48 and the output signal of the second counter circuit 49 and outputs from output terminals D0 to DB in response to the output signal from the output selection circuit 60.
The output selection circuit 60 comprises the inverter 58 and the D flip-flop 59. The clock signal from the input terminal CK is provided to the D flip-flop 59 through the inverter 58. The output signal from the output terminal q is used as the first counter select signal (the output signal of the output terminal ES), and the inverted signal of the output terminal q is used as the second counter select signal (the output signal of the input terminal OS).
The SW macros 57a through 57l switch, in response to the first counter select signal and the second counter select signal, the output signal of the first counter circuit 48 and the output signal of the second counter circuit 49 and output to their corresponding output terminals D0 through DB.
For example, the SW macro 57b outputs the output signal of the first counter circuit 48 to the output terminal D1 when the first counter select signal is high, and outputs the output signal of the second counter circuit 49 to the output terminal D1 when the second counter select signal is high.
The SW macro 57a relating to the present embodiment is set to constantly select the output signal of the first counter circuit 48 in order to adjust the timing (i.e. to simplify the circuit configuration).
A reset signal is provided from the input terminal CL. When the clear signal becomes low, the state of the D flip-flop in the first counter circuit 48, the second counter circuit 49 and the counter output switching circuit 50 is cleared.
In the explanation below, output terminal labels shown in
In
In a similar way, regarding the output signals E0 through EB of the second counter circuit 49, the signal E0 carries a time lag of t1 from the signal CK, and the signal E1 carries a time lag of t2 from the signal E0. Thus, the output signals E0 through EB of the second counter circuit 49 carry a total time lag of t1+t2 from the signal CK.
The output signals D0 through DB of the counter output switching circuit 50 select the first output signal when the signal OS is high, and select the second output signal when the signal ES is high. Therefore, the time lag of the output signals D0 through DB from the signal CK is t3 (<t1+t2).
The timing chart of
As explained in
Then, the period can be reduced to the period calculated using equation (1) when the carry time lag of all bits (O0 through OB, for example) is π, the number of counters is N, and the period in which the LSB of the first counter circuit 1 can be operated is T0.
The FA macros in
Exclusive OR operation of the signal from the input terminal CI and the signal q of a D flip-flop 62 by the EOR gate 61 divides the signal from the input terminal CI by two and the demultiplied signal is latched on the input terminal d of the D flip-flop 62. the latched signal is synchronized with the clock signal from the input terminal CK, and is output from the output terminal q.
The HA macro shown in
Regarding the HA macro in
The first counter circuit 48 and the second counter circuit 49 are ordinary synchronous counter circuits, each comprising FA macros 51 as shown in
The SW macro shown in
Accordingly, the NAND gates 66 through 68 switch the output signal of the first counter circuit 48 and the output signal of the second counter circuit 49, and output to D flip-flop 71, in response to the first counter select signal or the second counter select signal of the output selection circuit 60. For example, a high-level signal is input to the input terminal d of the D flip-flop 71 when the first counter select signal of the output selection circuit 60 is high and the output signal of the first counter circuit 48 is also high. A high-level signal is also input to the input terminal d of the D flip-flop 71 when the second counter select signal of the output selection circuit 60 is high and the output signal of the second counter circuit 49 is also high.
The inverters 69 and 70 are inserted so as to adjust the time lag caused by the NAND gates 66 through 68.
By the operation above, the SW macro selects the output signal from the first counter circuit 48 provided to the input terminal OD and latches and outputs a signal in accordance with the clock signal provided to the input terminal CK when the first counter select signal from the output selection circuit 60, provided to the input terminal OS, is high. The SW macro selects the output signal from the second counter circuit 49 provided to the input terminal ED and latches and outputs a signal in accordance with the clock signal provided to the input terminal CK when the second counter select signal from the output selection circuit 60, provided to the input terminal ES, is high.
The counter circuit shown in
Then, the first counter select signal OS and the second counter select signal ES in the counter output switching circuit 50 shown in
Consequently, the configuration of the counter circuit is the same as the counter circuit shown in
By the configuration explained above, the function of the output selection circuit 60 shown in
As explained above, a plurality of counter circuits are implemented so that they have a designated phase difference between each other. By selectively switching between the output of each counter circuit, it is possible to greatly reduce the influence of carry time lag on each counter circuit.
The above explanations described the case where two counter circuits are used and the case where four circuits are used. However, the number of counter circuits is not limited to two or four. That is, similar effects to the effect described in the embodiment can be obtained by the use of two or more counter circuits. The number of counter circuits used can be either an odd number or even number.
For example, when N counter circuits (N is an integer greater than 2) are used, and when said counter circuits are operated so that each counter circuit has a designated phase difference of (2π/N[rad], for example), a given counter circuit performs counting with leading phase shifted by 2π/N[rad]. By selecting the output of a counter circuit, that has finished counting, its carry time lag can be reduced by a factor of 1/N.
For a given number of bits, high-speed counting with a frequency N times higher is possible. At lower frequencies (e.g. 1/N frequency), it is possible to increase the number of bits of the counter, which reduces the carry time lag.
Number | Date | Country | Kind |
---|---|---|---|
2004-340317 | Nov 2004 | JP | national |