This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2011-037324, filed on Feb. 23, 2011, the entire contents of which are incorporated herein by reference.
1. Field
The present application relates to a phase adjusting device and a camera.
2. Description of the Related Art
In recent years, accompanying an increase in the number of pixels in an image pickup device, an electronics device, such as an electronic camera, is requested to further increase the speed of digital data transfer. In designing such an electronics device, a relationship in phase between data and clock is maintained by suppressing variations in data delay by impedance control of a transmission path, equal-length wiring, selection of materials of a printed board etc., simulation of a signal waveform, etc.
It is known that the relationship in phase between data and clock also changes depending on heat generation when an electronics device is operated continuously and the configuration of peripheral circuits. As an example of countermeasures against this, in Japanese Unexamined Patent Application Publication No. 2008-124714, a configuration of a circuit is disclosed, which adjusts a threshold value for determining the voltage of an input signal and at the same time, adjusts the relationship in phase between data and clock using two kinds of clocks in different phases.
However, there is still room for improvement in the above-described Japanese Unexamined Patent Application Publication No. 2008-124714 in that in actuality, it is difficult to determine a threshold value for determining a voltage and it becomes difficult to maintain precision of two kinds of clocks when clock's speed is increased.
A phase adjusting device of one aspect includes a first data obtaining unit, a second data obtaining unit, a determining unit, and a phase adjusting unit. The first data obtaining unit obtains each of a first output in a reference phase of serial transfer data to be input and a second output being given a phase difference to the first output by a first delay amount. The second data obtaining unit obtains each of a third output being given a phase difference to the first output by a second delay amount larger than the first delay amount and a fourth output being given a phase difference to the third output by the first delay amount. The determining unit determines whether or not a data stream to be detected included in serial transfer data can be detected in each output of the first data obtaining unit and the second data obtaining unit. The phase adjusting unit adjusts a delay amount given to the serial transfer data to be output based on a determination result by the determining unit.
<Configuration Example of Phase Adjusting Device in One Embodiment>
The phase adjusting device in
The transmitting unit 11 is a circuit that outputs a data packet (serial transfer data) that is transferred in the serial scheme to a circuit in a post stage. The output of the transmitting unit 11 is connected with the delay unit 12.
In the example of one embodiment, it is assumed that a digital data signal is transmitted by the double data rate (DDR) scheme at a rate of 400 Mbps as serial transfer data.
The serial transfer data in one embodiment is image data generated by an image pickup device (not shown schematically). The image data includes a horizontal synchronizing signal indicating a break of the scan line of the image and a vertical synchronizing signal indicating a break of one frame in addition to a pixel signal indicating luminance and a color difference (or luminance of RGB) in each pixel. In one embodiment, it is assumed that phases are adjusted using the above-mentioned synchronizing signals.
Here, the horizontal synchronizing signal and the vertical synchronizing signal in one embodiment are made of data of six words combining a word “FFF (h)” in which “1” appears 12 times successively, a word “000 (h)” in which “0” appears 12 times successively, and a word “AAA (h)” indicating “101010101010”, the bit depth of which is 12 bits. For example, the vertical synchronizing signal in one embodiment is set to “000 (h), AAA (h), 000 (h), FFF (h), FFF (h), FFF (h)”. Similarly, the horizontal synchronizing signal is set to, for example, “000 (h), AAA (h), 000 (h), FFF (h), FFF (h), 000 (h)”. In one embodiment, an example is explained in which phase adjustment processing is performed on a data stream of “AAA (h)” included in the synchronizing signal as a data stream to be detected.
Returning to
The serial transfer data input from the transmitting unit 11 is first input to the delay circuit 21. The delay circuit 21 has a plurality of delay elements 21a (inverters etc.) connected in series across a plurality of stages, a plurality of paths 21b connected with the outputs of the respective delay elements 21a, and a selector 21c connected to the respective paths 21b described above. The selector 21c selects any of the paths 21b in response to an instruction of the CPU 14 and adjusts a delay amount A of an offset in the delay circuit 21. The output of the selector 21c of the delay circuit 21 is connected to the first data obtaining unit 22.
The first data obtaining unit 22 is a 1-input 3-output circuit that generates data the phases of which are advanced and delayed with respect to input data. The first data obtaining unit 22 has three programmable delay elements (22a, 22b, 22c) having the same configuration. In one embodiment, the delay amount of each of the delay elements 22a, 22b, and 22c is set to the same delay amount (200 ps).
The input of the first data obtaining unit 22 is connected to the delay element 22a. The output of the delay element 22a branches into a signal line T0E and the input of the delay element 22b. The output of the delay element 22b branches into a signal line T0C, the input of the delay element 22c, and the input of the second data obtaining unit 23. The output of the delay element 22c is connected to a signal line T0L. The signal lines T0E, T0C, and T0L are connected to the switching control unit 13, respectively.
Here, in one embodiment, the phase of the signal line T0C is set to a reference phase of serial transfer data. The output of the signal line T0E in the first data obtaining unit 22 does not pass through the delay element 22b, and therefore, is advanced in phase by an amount corresponding to 200 ps from the output of the signal line T0C. The output of the signal line T0L further passes through the delay element 22c, and therefore, is delayed in phase by an amount corresponding to 200 ps from the output of the signal line T0C.
Consequently, it is possible for the first data obtaining unit 22 to obtain the output in the reference phase (T0C) and two kinds of outputs (T0E and T0L) given phase differences corresponding to ±200 ps with respect to the output in the reference phase, respectively.
The second data obtaining unit 23 is a 1-input 3-output circuit having substantially the same configuration as that of the first data obtaining unit 22.
The input of the second data obtaining unit 23 is connected to a delay element 23a that gives a delay amount corresponding to 1,050 ps. The output of the delay element 23a branches into a signal line T45E and the input of a delay element 23b that gives a delay amount corresponding to 200 ps. The output of the delay element 23b branches into a signal line T45C and the input of a delay element 23c that gives a delay amount corresponding to 200 ps. The output of the delay element 23c is connected to a signal line T45L. The signal lines T45E, T45C, and T45L are connected to the switching control unit 13, respectively.
Here, to the output of the signal line T45C of the second data obtaining unit 23, a delay amount of 1,250 ps is given by the delay element 23a and the delay element 23b with respect to the output of the signal line T0C in the reference phase. One data cycle in one embodiment is 2,500 ps. Consequently, the phase of the signal line T45C has a phase difference of 45 degrees with respect to the reference phase of the signal line T0C as a result.
The output of the signal line T45E in the second data obtaining unit 23 does not pass through the delay element 23b, and therefore, is advanced in phase by an amount corresponding to 200 ps from the output of the signal line T45C. The output of the signal line T45L further passes through the delay element 23c, and therefore, is delayed in phase by an amount corresponding to 200 ps from the output of the signal line T45C. Consequently, it is possible for the second data obtaining unit 23 to obtain the output (T45C) having a phase difference of 45 degrees with respect to the reference phase and two kinds of outputs (T45E and T45L) given phase differences corresponding to ±200 ps with respect to the output of T45C, respectively.
The switching control unit 13 is a 6-input 1-output selector that selectively outputs data of any one of the signal lines T0E, T0C, T0L, T45E, T45C, and T45L to a circuit in the post stage. Further, the switching control unit 13 has a determining unit 24 that operates in phase adjustment processing, to be described later, and a memory 25.
The determining unit 24 takes in the signal value of each signal line in synchronization with the timing of rise or fall of the clock signal CLK. Then, the determining unit 24 determines whether or not the above-mentioned data stream to be detected (“AAA (h)” of the synchronizing signal) can be detected in each signal line and outputs the determination result in each signal line to the CPU 14.
The memory 25 is a nonvolatile memory that stores a lookup table (LUT) applied in phase adjustment processing. Here, with reference to
For example, the first bit to the twelfth bit of the sample bit pattern with CASE number 0 correspond to “AAA (h)” and the 12 remaining bits are all “0”. The sample bit pattern with CASE number 1 is a bit pattern in which the bits corresponding to “AAA (h)” shift one bit backward in the bit pattern with CASE number 0. That is, the second bit to the thirteenth bit of the sample bit pattern with CASE number 1 correspond to “AAA (h)” and the other remaining bits are all “0”. In this manner, it is assumed that each time CASE number increases by one, the bits corresponding to “AAA (h)” shift one bit backward in the sample bit patterns in LUT.
In the example in
Returning to
<Operation Example of Phase Adjusting Device>
Next, an operation example of the phase adjusting device in one embodiment is explained. When receiving an instruction to start phase adjustment processing (for example, an instruction to record and pick up an image by pressing a release button of an electronic camera) from a user, the CPU 14 issues a start signal to each part to cause the part to start phase adjustment processing. Hereinafter, with reference to the flowchart in
(Step S101)
The CPU 14 makes an initial setting of the delay amount A of the delay circuit 21 by a path specification by the selector. For example, the CPU 14 reads the delay amount of the delay circuit 21 set in the previous phase adjustment processing or the default value of the delay circuit 21 from the register 26 and sets the read value as the above-mentioned delay amount A.
(Step S102)
The CPU 14 initializes the following flags of the register 26. Specifically, the CPU 14 resets flags (T0E_P, T0C_P, T0L_P, T45E_P, T45C_P, T45L_P) indicating whether or not the data stream to be detected is detected in each signal line, a flag (T0
(Step S103)
The transmitting unit 11 starts to output serial transfer data (image data) in response to the instruction of the CPU 14. The serial transfer data output from the transmitting unit 11 passes through the delay unit 12 in the pipeline scheme. Due to this, serial transfer data having phases different from one another is input from the signal lines T0E, T0C, T0L, T45E, T45C, and T45L to the switching control unit 13.
(Step S104)
The determining unit 24 samples the output of each signal line in synchronization with a clock signal. Then, the determining unit 24 determines whether or not the data stream to be detected is detected in each signal line. Hereinafter, with reference to the flowchart in
Step S201: The determining unit 24 obtains a 24-bit digital data stream by sampling the output of the signal line T0E.
Step S202: The determining unit 24 refers to LUT of the memory 25 and collates the sample bit pattern of LUT with the data stream in S201. Due to this, the determining unit 24 obtains the CASE number of LUT corresponding to the data stream in S201.
Step S203: The determining unit 24 determines whether or not the CASE number obtained in S202 is “D”. When the determination result is affirmative (YES side), processing moves to S204. The YES side in S204 corresponds to the case where the data stream in S201 is not the data stream to be detected. On the other hand, when the determination result is negative (NO side), processing moves to S205. The NO side in S204 corresponds to the case where the data stream in S201 includes the data stream to be detected (the case where the CASE number is any of “0 to C”).
Step S204: The determining unit 24 determines whether or not a predetermined time has elapsed after the start signal is issued. When the determination result is affirmative (YES side), processing moves to S205. The YES side in S204 corresponds to the case where the determining unit 24 aborts detection of the data stream in the signal line T0E in the state where the data stream to be detected is not detected. On the other hand, when the determination result is negative (NO side), the determining unit 24 returns the procedure to S201 to repeat the above-described operation.
Step S205: The determining unit 24 determines whether or not the CASE number obtained in the immediately previous processing in S202 is “D”. When the determination result is affirmative (YES side), processing moves to S206. On the other hand, when the determination result is negative (NO side), processing moves to S207. Step S206: The determining unit 24 outputs a signal that sets the flag T0E_P of the register 26 to “0” to the CPU 14. Then, the procedure returns to processing in S105 in
Step S207: The determining unit 24 outputs a signal that sets the flag T0E_P of the register 26 to “1” to the CPU 14 and at the same time, records information of the CASE number corresponding to the signal line T0E in the register 26. Then, the procedure returns to processing in S105 in
Explanation of the flowchart in
(Step S105)
The CPU 14 refers to the flags T0E_P, T0C_P, and T0L_P of the register 26 and sets the flag T0
As an example, in S105, it is sufficient for the CPU 14 to set the flag T0
(a) When T0E_P, T0C_P, and T0L_P are all “0” (T0E_P=T0C_P=T0L_P=0), the CPU 14 sets the flag T0
(b) When T0E_P is “1” and T0C_P and T0L_P are “0” (T0E_P=1, T0C_P=T0L_P=0), the CPU 14 sets the flag T0
(c) When T0C_P is “1” and T0E_P and T0L_P are “0” (T0C_P=1, T0E_P=T0L_P=0), the CPU 14 sets the flag T0
(d) When T0L_P is “1” and T0E_P and T0C_P are “0” (T0L_P=1, T0E_P=T0C_P=0), the CPU 14 sets the flag T0
(e) When T0C_P and T0L_P are “1” and T0E_P is “0” (T0C_P=T0L_P=1, T0E_P=0), the CPU 14 sets the flag T0
(f) When T0E_P and T0L_P are “1” and T0C_P is “0” (T0E_P=T0L_P=1, T0C_P=0), the CPU 14 sets the flag T0
(g) When T0E_P and T0C_P are “1” and T0L_P is “0” (T0E_P=T0C_P=1, T0L_P=0), the CPU 14 sets the flag T0
(h) When T0E_P, T0C_P, and T0L_P are all “1” (T0E_P=T0C_P=T0L_P=1), the CPU 14 sets the flag T0
(Step S106)
The CPU 14 refers to the flags T0
Step S301: The CPU 14 determines whether or not the flag T0
Step S302: This case is a case where the data stream to be detected can be detected in all the three signal lines in the first data obtaining unit 22 (see
Step S303: The CPU 14 determines whether or not the flag T45
Step S304: This case is a case where the data stream to be detected can be detected in all the three signal lines in the second data obtaining unit 23. In S304, the CPU 14 selects the output of the signal line T45C as the output of the switching control unit 13. In S304, the CPU 14 applies the delay amount A as it is without correction. Then, the processing of the flowchart in
Step S305: The CPU 14 determines whether or not the flag T0
Step S306: This case is a case where the data stream to be detected can be detected from T0C and T0L successive in the order of phase of the three signal lines in the first data obtaining unit 22 (see
Consequently, in S306, the CPU 14 selects the output of the signal line T0L as the output of the switching control unit 13. Further, in S306, the CPU 14 makes a setting so that the delay amount A is corrected by an amount corresponding to +200 ps. Due to this, the output of the switching control unit 13 is further adjusted in the delayed phase direction, and therefore, it is made possible to transfer data more stably. Then, the processing of the flowchart in
Step S307: The CPU 14 determines whether or not the flag T0
Step S308: This case is a case where the data stream to be detected can be detected from T0E and T0C successive in the order of phase of the three signal lines in the first data obtaining unit 22 (see
Consequently, in S308, the CPU 14 selects the output of the signal line T0E as the output of the switching control unit 13. Further, in S308, the CPU 14 makes a setting so that the delay amount A is corrected by an amount corresponding to −200 ps. Due to this, the output of the switching control unit 13 is further adjusted in the advanced phase direction, and therefore, it is made possible to transfer data more stably. Then, the processing of the flowchart in
Step S309: The CPU 14 determines whether or not the flag T45
Step S310: This case is a case where the data stream to be detected can be detected from T45C and T45L successive in the order of phase of the three signal lines in the second data obtaining unit 23. In S310, the CPU 14 selects the output of the signal line T45L as the output of the switching control unit 13. Further, in S310, the CPU 14 makes a setting so that the delay amount A is corrected by an amount corresponding to +200 ps. Then, the processing of the flowchart in
Step S311: The CPU 14 determines whether or not the flag T45
Step S312: This case is a case where the data stream to be detected can be detected from T45E and T45C successive in the order of phase of the three signal lines in the second data obtaining unit 23. In S312, the CPU 14 selects the output of the signal line T0E as the output of the switching control unit 13. Further, in S312, the CPU 14 makes a setting so that the delay amount A is corrected by an amount corresponding to −200 ps. Then, the processing of the flowchart in
Step S313: The CPU 14 determines whether or not the flag T0
Step S314: This case is a case where the data stream to be detected can be detected from T0E of the three signal lines in the first data obtaining unit 22. In this case, it can be thought that the fall and the rise of the waveform exist between the phase of T0E and the phase of T0C.
Consequently, in S314, the CPU 14 selects the output of the signal line T0E as the output of the switching control unit 13. Further, in S314, the CPU 14 makes a setting so that the delay amount A is corrected by an amount corresponding to −200 ps. Due to this, the output of the switching control unit 13 is further adjusted in the advanced phase direction, and therefore, it is made possible to transfer data more stably. Then, the processing of the flowchart in
In S314, it may also be possible for the CPU 14 to shift the delay amount A more in the advanced phase direction.
Step S315: The CPU 14 determines whether or not the flag T0
Step S316: This case is a case where the data stream to be detected can be detected from T0L of the three signal lines in the first data obtaining unit 22. In this case, it can be thought that the fall and the rise of the waveform exist between the phase of T0C and the phase of T0L.
Consequently, in S316, the CPU 14 selects the output of the signal line T0L as the output of the switching control unit 13. Further, in S316, the CPU 14 makes a setting so that the delay amount A is corrected by an amount corresponding to +200 ps. Due to this, the output of the switching control unit 13 is further adjusted in the delayed phase direction, and therefore, it is made possible to transfer data more stably. Then, the processing of the flowchart in
In S316, it may also be possible for the CPU 14 to shift the delay amount A more in the delayed phase direction.
Step S317: The CPU 14 determines whether or not the flag T45
Step S318: This case is a case where the data stream to be detected can be detected from T45E of the three signal lines in the second data obtaining unit 23. In S318, the CPU 14 selects the output of the signal line T45E as the output of the switching control unit 13. Further, in S318, the CPU 14 makes a setting so that the delay amount A is corrected by an amount corresponding to −200 ps. Then, the processing of the flowchart in
Step S319: The CPU 14 determines whether or not the flag T45
Step S320: This case is a case where the data stream to be detected can be detected from T45L of the three signal lines in the second data obtaining unit 23. In S320, the CPU 14 selects the output of the signal line T45L as the output of the switching control unit 13. Further, in S320, the CPU 14 makes a setting so that the delay amount A is corrected by an amount corresponding to +200 ps. Then, the processing of the flowchart in
Step S321: The CPU 14 determines whether or not the flag T0
Step S322: The CPU 14 determines whether or not the flag T45
Step S323: These cases correspond to a case where the waveform of serial transfer data is disturbed. In S323, the CPU 14 appropriately selects the output of the switching control unit 13 from the signal line in which the data stream to be detected can be detected. Further, in S323, the CPU 14 applies the delay amount A as it is without correction. Then, the processing of the flowchart in
Step S324: This case corresponds to a case where the flags T0
In this case, the CPU 14 selects the output of the signal line T0C in the reference phase as the output of the switching control unit 13. Then, the CPU 14 makes a setting so that the delay amount A of the delay circuit 21 is corrected and thereby the phase of the signal line T0C shifts up to the phase corresponding to the average of the output of T0L and the output of T45E (A=(T0L+T45E)/2). Because of this, even when the data stream to be detected cannot be detected at all resulting from the shift in phase, the phase of serial transfer data is adjusted appropriately. Then, the processing of the flowchart in
(Step S107)
The switching control unit 13 outputs the output of the signal line selected in S106 to a circuit in the post stage and at the same time, terminates the operation of the determining unit 24 in response to the instruction of the CPU 14. The delay circuit 21 of the delay unit 12 corrects the delay amount A in response to the instruction of the CPU 14.
Due to this, the serial transfer data output from the transmitting unit 11 in the data transfer after the phase adjustment processing passes through the delay unit 12 and the switching control unit 13, and thereby, is output to a circuit in the post stage in a state where its phase is adjusted appropriately.
It is also possible for the CPU 14 to accurately monitor the code of the serial transfer data to be input by using information during the period from the transmission of the data stream to be detected to the detection by the determining unit 24 and information of the CASE number corresponding to the signal line selected in S106. The explanation of the flowchart in
As a timing at which the delay amount A is corrected, it may also be possible to make correction in the blank period of one horizontal output. It is possible to determine and specify the blank period in signal data by counting the number of pixels from the horizontal synchronizing signal output.
The phase adjusting device in one embodiment determines whether or not the data stream to be detected can be detected in the first output (T0C) in the reference phase and in the second output (T0E, T0L) slightly advanced or delayed with respect to the first output. Similarly, the phase adjusting device determines whether or not the data stream to be detected can be detected in the third output (T45C) having a phase difference of 45 degrees with respect to the reference phase and in the fourth output (T45E, T45L) slightly advanced or delayed with respect to the third output.
Then, the phase adjusting device applies the output in which the data stream to be detected can be detected of the first output to the fourth output. Further, the phase adjusting device adjusts the delay amount to be given to the serial transfer data based on the detection result of the first output to the fourth output by selecting a signal line to be output to a circuit in the post stage and by correcting the delay amount in the delay circuit 21. Due to this, it is possible for the phase adjusting device in one embodiment to easily suppress the shift in phase of serial transfer data resulting from a change of the temperature environment etc. of the device.
Further, in the phase adjusting device in one embodiment, the code in the reference phase and the code in a phase of 45 degrees ¼ of period shifted from the reference phase are taken in, and therefore, it is made possible to efficiently adjust the shift in phase of serial transfer data even when synchronization is not established between the serial transfer data and the clock signal. Furthermore, in the phase adjusting device in one embodiment, the code given a minute phase difference with the reference phase as a center and the code given a minute phase difference with the phase of 45 degrees as a center are taken in, and therefore, it is made possible to adjust the phase of the serial transfer data with higher precision (see
(Modified Example of One Embodiment>
In the above-mentioned embodiment, the example is explained in which the reference phase of the first data obtaining unit 22 differs 45 degrees from the phase of the output, which is the center in the second data obtaining unit 23, but, it is possible to appropriately change the phase difference between both in the range from 35 degrees to 55 degrees.
In general, the design of serial transfer of data is requested to secure an interval corresponding to an amount of about 60% of the 1-bit data cycle as the confidence interval of the data. Then, the interval suitable to take in the data in the above-mentioned confidence interval is the interval of ±20% with the center of the 1-bit data cycle as a reference. The above-mentioned interval of ±20% is expressed in terms of phase by a range from 35 degrees to 55 degrees from the reference phase (see
Consequently, it is possible to practically obtain substantially the same effect as that in one embodiment even if the phase difference between the reference phase of the first data obtaining unit 22 and the phase of the output, which is the center in the second data obtaining unit 23, is changed in the above-mentioned range.
<Supplementary Items of the Embodiments>
(1) The phase adjusting device of the present invention is not limited to the example in which the phase adjusting device is incorporated in an electronic camera and may be incorporated in another kind of electronics device. Further, in the embodiments described above, the example of the device that performs serial transfer using one channel is explained, but, it is of course possible to apply the present invention to a case of a plurality of channels.
(2) It is needless to say that the delay amounts of the signal lines T0E, T0C, T0L, T45E, T45C, and T45L in the above-mentioned embodiments are changed appropriately according to the serial transfer data to be handled. Further, by appropriately adjusting the delay amount of each delay element (22a to 22c and 23a to 23c) of the first data obtaining unit 22 and the second data obtaining unit 23 using programs in the phase adjusting device in one embodiment, it is also possible to share the phase adjusting device having the same configuration in different devices.
The many features and advantages of the embodiments are apparent from the detailed specification and, thus, it is intended by the appended claims to cover all such features and advantages of the embodiments that fall within the true spirit and scope thereof. Further, since numerous modifications and changes will readily occur to those skilled in the art, it Is not desired to limit the inventive embodiments to the exact construction and operation illustrated and described, and accordingly all suitable modifications and equivalents may be resorted to, falling within the scope thereof.
Number | Date | Country | Kind |
---|---|---|---|
2011-037324 | Feb 2011 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
7243117 | Yamamoto et al. | Jul 2007 | B2 |
20080112522 | Fukuda et al. | May 2008 | A1 |
20100111227 | Philippe | May 2010 | A1 |
20110298536 | Okazaki et al. | Dec 2011 | A1 |
Number | Date | Country |
---|---|---|
A-2000-196575 | Jul 2000 | JP |
A-2008-124714 | May 2008 | JP |
Entry |
---|
Dec. 25, 2012 Japanese Office Action issued in Japanese Application No. 2011-037324 (with translation). |
Number | Date | Country | |
---|---|---|---|
20120213309 A1 | Aug 2012 | US |