1. Field of the Invention
The present invention relates to a semiconductor device and a method of driving the same.
2. Description of the Related Art
Japanese Patent Laid-Open No. 11-150686 discloses a technique of providing photoelectric conversion units for focus detection, which correspond to respective distance measurement points for a camera, to set control information based on the output from each of these photoelectric conversion units. This control information is used to control, for example, a charge accumulation operation and a signal readout operation based on the accumulated charges, and can be set for each distance measurement point in normal use. This provides a semiconductor device which can achieve highly accurate focus detection.
Miniaturization of photoelectric conversion units for focus detection may lead to variations in characteristics of charge accumulation of the photoelectric conversion units. Also, complication and sophistication of a control system may cause a failure due to short-circuiting of sensor units including the photoelectric conversion units, or signal lines which control these sensor units. Therefore, the semiconductor device described in Japanese Patent Laid-Open No. 11-150686 is disadvantageous in terms of increasing the efficiency of tests for these malfunctions.
The present invention provides a technique advantageous in terms of increasing the efficiency of tests for malfunctions of a semiconductor device.
One of the aspects of the present invention provides a semiconductor device including a plurality of sensor units, and a plurality of storage units corresponding to the plurality of sensor units, respectively, the device comprising a controller which in a normal mode, sets a plurality of pieces of first control information based on outputs from the plurality of sensor units, respectively, stores the plurality of pieces of first control information in the plurality of storage units, respectively, and accumulates charges in each of the plurality of sensor units up to a reference defined in the corresponding first control information, and in a test mode, stores a plurality of pieces of second control information for tests determined in advance in the plurality of storage units, respectively, accumulates charges in each of the plurality of sensor units up to a reference defined in the corresponding second control information, and tests the plurality of sensor units based on the amounts of charges accumulated in the plurality of sensor units.
Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
A semiconductor device 1a according to the first embodiment of the present invention will be described first with reference to
The semiconductor device 1a includes a normal mode and a test mode as operation modes. In the normal mode, the control unit 100 sets first control information based on the output from each of the plurality of sensor units 10k, and stores it in the corresponding one of the plurality of storage units 20k. The control unit 100 then performs an operation of accumulating charges in each sensor unit 10k up to a reference defined in the first control information stored in the corresponding one of the plurality of storage units 20k. With this operation, in the normal mode, a charge accumulation operation in the sensor unit 10k can be controlled in accordance with the output from the sensor unit 10k as it detects, for example, external input information.
On the other hand, in the test mode, the control unit 100 stores a plurality of pieces of second control information for tests, that are determined in advance, in the plurality of storage units 20k, respectively. The control unit 100 then accumulates charges in each sensor unit 10k up to a reference defined in the second control information stored in the corresponding one of the plurality of storage units 20k, and tests the amounts of charges accumulated in the plurality of sensor units 10k. That is, in the test mode, the control unit 100 performs an operation of accumulating charges determined in advance in the plurality of sensor units 10k. Hence, when a signal output from each sensor unit 10k based on the amount of accumulated charges has a value different from a desired value, this means that this sensor unit 10k or its control signal has a malfunction.
The semiconductor device 1a shown in
Also,
On the other hand, in the test mode, the control unit 100 can set an amplification factor determined in advance. The control unit 100 can set the amplification factor to, for example, a unique value. At this time, the amplifier unit 30 can amplify a signal output from the sensor unit 10k in accordance with an amplification factor having the unique value, and output it. Note that the signal output from the sensor unit 10k is determined in accordance with the amount of charges accumulated to a reference defined in the second control information determined in advance. Hence, the semiconductor device 1b outputs a signal indicating a desired output value if it has no malfunction, or outputs a signal indicating an undesired output value if it has a malfunction. This makes it possible to detect a malfunction even under uniform irradiation light in this case as well.
The second embodiment of the present invention will be described with reference to
A photoelectric conversion unit 11k is formed by a pair of sensor arrays for the phase-difference detection method, and can form two images using, for example, about 30 to 80 pixels. A readout unit 12k can detect the amount of charges accumulated in the photoelectric conversion unit 11k, and output, for example, a peak value among the outputs from the plurality of pixels of the photoelectric conversion unit 11k. Also, for example, not only a peak value but also a bottom value may be detected to use a peak—bottom signal obtained from their difference. This output result can be output to the comparison unit 120 as a signal s_out in accordance with an instruction from the controller 150. A charge holding unit 13k can temporarily hold as a pixel signal q_out the charges accumulated in the photoelectric conversion unit 11k. The pixel signal q_out can be output to the amplifier unit 30 in accordance with an instruction from the controller 150.
A storage unit 20k can store control information (first control information or second control information), associated with charge accumulation in the photoelectric conversion unit 11k, in accordance with an instruction from the controller 150. This control information may be, for example, 2-bit information (“0” to “3”), as in this embodiment. Also, this control information can be output to the reference setting unit 110 and amplification factor setting unit 140 in accordance with an instruction from the controller 150. In this embodiment, depending on whether each storage unit 20k corresponds to the sensor unit 10k of an odd- or even-numbered unit, the signal line connected to this storage unit 20k to store control information is changed between different inputs rin_odd and rin_even. Note that the storage unit 20k of each odd-numbered unit has rin_odd as an input and rout as an output, and the storage unit 20k of each even-numbered unit has rin_even as an input, and rout as an output.
The reference setting unit 110 may have a configuration as shown in, for example,
The initial setting unit 130 can select the normal mode or the test mode as an operation mode upon setting of the mode setting terminal mode_sel. With this operation, in the normal mode, each storage unit 20k can store first control information (the measurement result c_out obtained by the counter 111; to be described later) associated with charge accumulation in the photoelectric conversion unit 11k. On the other hand, in the test mode, second control information determined in advance can be stored. The initial setting unit 130 may have a configuration as shown in, for example,
The amplification factor setting unit 140 selects the normal mode or the test mode as an operation mode upon setting of the mode setting terminal mode_sel to set control information which specifies an amplification factor for amplifying the signal q_out output from the charge holding unit 13k. The amplification factor setting unit 140 may have a configuration as shown in, for example,
The controller 150 can communicate with these functional blocks and issue operation instructions, in accordance with execution programs. The execution programs may be stored in a program memory 151 included in the controller 150, as shown in
The operations of the focus detection apparatus 2, shown in flowcharts of, for example,
In step S120, a reset process according to a flowchart (steps S120-S126) shown in, for example,
In step S140, the value of a register (not shown) for designating the unit k is initialized (k=1). In step S150, the controller 150 determines whether the value of “timer” exceeds the upper limit (Etime) of the charge accumulation time set in advance. If timer≧Etime, the process advances to step S220 (to be described later). If timer<Etime, the process advances to step S160. In step S160, in accordance with an instruction from the controller 150, the output s_out from the readout unit 12k, and the reference potential Vref based on the control information stored in the storage unit 20k are input to the comparison unit 120 for the unit k. In step S170, the comparison unit 120 compares s_out and Vref set in step S160. At this time, if the output from the comparison unit 120 is comp_out=Hi (s_out≧Vref), the process advances to step S220 (to be described later). If the output from the comparison unit 120 is comp_out=Low (s_out<Vref), the process advances to step S180. In step S180, the controller 150 determines whether the value of “timer” exceeds a halftime (Htime) set in advance. If timer≧Htime, the process advances to step S190. If timer<Htime, the process advances to step S200 (to be described later). In step S190, the controller 150 sets control information (first control information) corresponding to the amount of charges accumulated in the photoelectric conversion unit 11k of the unit k, and stores it in the storage unit 20k. The first control information is determined based on the amount of charges accumulated in the photoelectric conversion unit 11k, the reference potential Vref output from the reference setting unit 110 in accordance with an instruction from the controller 150, and the result obtained by the comparison unit 120. The operation in step S190 can be achieved by a program according to a flowchart shown in, for example,
A series of operations in step S190 will be described in more detail herein with reference to
In the case of the alternate long and short dashed line 90a (when the object is dark and charges are accumulated slowly), the operation in step S190 is done when timer Htime is set. In step S191, the output c_out from the counter 111 is reset (c_out=0) in accordance with an instruction from the controller 150. In step S192, a reference potential Vref corresponding to the value of c_out is set. The reference potential Vref at this time is set upon selection of c_out by the selector 160 in accordance with an instruction form the controller 150. For example, when c_out=2, the reference potential Vref is set to “Level 2”. In step S193, the comparison unit 120 compares Vq and Vref. If the comparison result output from the comparison unit 120 is comp_out=Low (Vq<Vref), the process advances to step S196 (to be described later). If the comparison result output from the comparison unit 120 is comp_out=Hi (Vq Vref), the process advances to step S194. In step S194, the controller 150 determines whether the reference potential Vref is set to “Level 3” (whether c_out=3). If the reference potential Vref is “Level 3” (if c_out=3), the process advances to step S196 (to be described later). If the reference potential Vref is not “Level 3” (c_out≠3), the process advances to step S195. In step S195, the reference potential Vref is set one level higher than the current level (the value of c_out is incremented by one) in accordance with an instruction from the controller 150, and the process returns to step S193. The same procedure is repeated until the process advances to step S196 after Vq Vref is set in step S193, or the process advances to step S196 after the reference potential Vref changes to “Level 3” (c_out=3) in step S194. In step S196, control information is set in accordance with the reference potential Vref set in step S193 or S194. That is, the value of c_out at this time is stored in the storage unit 20k as first control information in accordance with an instruction from the controller 150. Therefore, in the case of the alternate long and short dashed line 90a (when the object is dark and charges are accumulated slowly), c_out=1 is stored in the storage unit 20k as first control information in steps S190 to S196 described above.
On the other hand, in the case of the alternate long and short dashed line 91a (when the object is sufficiently bright and charges are accumulated early), the output potential Vq reaches a reference potential Vref at “Level 3” when timer<Htime, and the process advances to step S220 after step S170, so the operation in step S190 is not done. This is because control information “3” initialized in an arbitrary storage unit 20k is stored upon a reset process (step S120), so the reference potential Vref is set to the potential “Level 3” corresponding to the control information “3” in step S160.
In step S200, the controller 150 determines whether step S220 has been executed for all units k. If YES is determined in step S220, the process advances to step S230 (to be described later); otherwise, the process advances to step S210. In step S210, the next unit k is designated and the process returns to the operation in step S150. More specifically, if k<n, the next unit k is designated (the k value is incremented by one). If k=n, k is reset to k=1, and the next time is designated (for example, the value of “timer” is incremented by one). In step S220, the controller 150 ends the charge accumulation operation in the photoelectric conversion unit 11k of the unit k, and temporarily holds the accumulated charges in the charge holding unit 13k as the pixel signal q_out. Step S230 is an operation performed by the controller 150 after step S220 has been executed for all units k, and the pixel signal q_out is read out from an arbitrary charge holding unit 13k. In step S240, the amplification factor setting unit 140 reads out the first control information stored in the storage unit 20k to set an amplification factor. At this time, before step S240, control information can also be set again in step S190 of
In this way, in the normal mode, the focus detection apparatus 2 according to this embodiment outputs first control information which can control an accumulation operation in accordance with the luminance level of an object, and stores the first control information in each of the plurality of storage units 20k.
The operation in the test mode will be described next. The test mode is executed upon irradiation with uniform light bright enough to allow the output potential Vq to reach a reference potential Vref at “Level 3” when timer<Htime (
In step S120, a reset process (steps S120-S126) according to the test mode is performed, so control information “3” is stored in the storage unit 20k of each odd-numbered unit, and control information “0” is stored in the storage unit 20k of each even-numbered unit. This can be achieved by setting a mode setting terminal mode_sel=Hi in a selector 160s (
In step S160, a reference potential Vref which is different when the unit k has an odd number and when it has an even number can be set. This operation will be described in more detail with reference to
In step S220, charges accumulated for the time tend_odd are temporarily held in the charge holding unit 13k of each odd-numbered unit as a pixel signal q_out, and charges accumulated for the time tend_even are temporarily held in the charge holding unit 13k of each even-numbered unit as a pixel signal q_out. In step S230, therefore, the pixel signal q_out read out from the charge holding unit 13k is different between odd-numbered units and even-numbered units. In step S240, the amplification factor setting unit 140 sets information (“3” in this embodiment) which specifies an amplification factor having a given unique value, regardless of the second control information stored in the storage unit 20k. In step S250, the pixel signal q_out read out in step S230 is amplified in accordance with the amplification factor having the unique value set in step S240, and output. Therefore, if each of the plurality of sensor units 10k has no malfunction resulting from factors associated with an adjacent sensor unit 10k, the amplifier unit 30 alternately outputs different values for units k=1 to 2m. On the other hand, if each of the plurality of sensor units 10k has a malfunction resulting from factors associated with an adjacent sensor unit 10k, the amplifier unit 30 outputs the same value as that output from the adjacent sensor unit 10k for the unit having the malfunction.
In this way, in the test mode, the focus detection apparatus 2 according to this embodiment stores pieces of different information in the storage unit 20k of each odd-numbered unit and the storage unit 20k of each even-numbered unit. For example, it is only necessary to store information for setting the amount of accumulated charges to a high reference in the storage unit 20k of each odd-numbered unit as second control information, and information for setting the amount of accumulated charges to a low reference in the storage unit 20k of each even-numbered unit as second control information. Pieces of information opposite to these pieces of second control information may be stored in the storage units 20k of odd- and even-numbered units. With this operation, different amounts of charges are alternately stored in the plurality of sensor units 10k, thus making it possible to detect a malfunction of each sensor unit 10k due to factors associated with an adjacent sensor unit 10k−1 or 10k+1.
The initial setting unit 130b receives “timer” in place of c_out, and its two output terminals can be connected to signal lines for storing ring odd and ring even, respectively, in
The operations of the focus detection apparatus 3, shown in flowcharts of, for example,
The operation in the normal mode will be described first. Details of steps S400 to S423 are the same as those of steps S100 to S123, respectively, and a description thereof will not be given. In step S424, the first storage area 21k is initialized, so “3”, for example, is stored. This is because c_out (c_out=3) is set to “3” in step S423, as in the second embodiment. Then, “0” is stored in the second storage area 22k. This is because the value of “timer” is reset (timer=j) in step S410. Details of steps S425 to S460 are the same as those of steps S125 to S160, respectively, and a description thereof will not be given.
In step S470, the output comp_out from the selector 160b is determined. Note that in the normal mode (mode_sel=Low), the selector 160b selects and outputs the output (the comparison result between Vref and s_out) from the comparison unit 120. If comp_out=Hi (s_out≧Vref), the process advances to step S520 (to be described later). If comp_out=Low (s_out<Vref), the process advances to step S480. Details of steps S480 to S510 are the same as those of steps S180 to S210, respectively, and a description thereof will not be given.
In step S520, the controller 150 ends the charge accumulation operation in the photoelectric conversion unit 11k, and temporarily holds the accumulated charges in the charge holding unit 13k as a pixel signal q_out. At the same time, in the normal mode (mode_sel=Low), the selectors 160o and 160e included in the initial setting unit 130b (
In this way, in the normal mode, the focus detection apparatus 3 according to this embodiment outputs first control information for controlling an accumulation operation in accordance with the luminance level of an object, and stores the first control information in each of the plurality of first storage areas 21k. Then, charges are accumulated in each of the plurality of sensor units 10k up to a reference defined in the corresponding first control information. It is also possible to store control information associated with the time taken for this accumulation in each of the plurality of second storage areas 22k, and use it in another focus detection operation again.
The operation in the test mode will be described next. The test mode can be achieved by the same flowcharts (
In step S470, the output comp_out from the selector 160b is determined. Note that in the test mode (mode_sel=Hi), the selector 160b selects and outputs the output (the comparison result between “timer” and rout2) from the comparison unit 120b. If comp_out=Hi (timer≧rout2), the process advances to step S520 (to be described later). If comp_out=Low (timer<rout2), the process advances to step S480. Details of steps S480 to S510 are the same as in the normal mode, and a description thereof will not be given.
In step S520, the controller 150 ends the charge accumulation operation in the photoelectric conversion unit 11k, and temporarily holds the accumulated charges in the charge holding unit 13k as a pixel signal. This operation will be described in more detail with reference to
In this way, in the test mode, the focus detection apparatus 3 according to this embodiment stores pieces of different information in the second storage area 22k of each odd-numbered unit and the second storage area 22k of each even-numbered unit. Then, charges are accumulated in each of the plurality of sensor units 10k up to a reference defined in the second control information stored in the corresponding second storage area 22k. In this embodiment, information for setting a long charge accumulation time is stored in the second storage area 22k of each odd-numbered unit as second control information, and information for setting a short charge accumulation time is stored in the second storage area 22k of each even-numbered unit as second control information. Pieces of information opposite to these pieces of second control information may be stored in the second storage areas 22k of odd- and even-numbered units. With this operation, different amounts of charges are alternately stored in the plurality of sensor units 10k, thus making it possible to detect a malfunction of each sensor unit 10k due to factors associated with an adjacent sensor unit 10k−1 or 10k+1. It is also possible to similarly detect a malfunction of each second storage area 22k.
In the above-mentioned second and third embodiments, the normal mode and the test mode are selected by switching the mode setting terminal mode_sel set in the control unit 100. However, as in the fourth embodiment to be described below, it is also possible to store execution programs of the normal mode and test mode in a program memory 151 in advance, and select, read out, and execute one of these programs, instead of switching a mode setting terminal mode_sel. One of the execution programs can be selected in accordance with, for example, an instruction from an external interface. In this case, the mode setting terminal mode_sel may be fixed or may not be set.
For example, an execution program according to the flowcharts (
Although four embodiments have been described above, the present invention is not limited to them, and the object, state, use purpose, function, and other specifications can be changed as needed, so the present invention can also be practiced by other embodiments, as a matter of course. The sensor unit serves as, for example, a CCD image sensor or a CMOS image sensor, and may serve as any other sensors. Although the storage unit is assumed to be a digital memory such as an SRAM in this embodiment, an analog memory can also be used. Although the execution program is stored in the program memory included in the controller in this embodiment, it may be read out from a peripheral storage device in accordance with an instruction from a microcomputer or other peripheral circuits. Note that the storage device includes, for example, a ROM, floppy disk, hard disk, optical disk, magnetooptical disk, CD-ROM, CD-R, magnetic tape, and nonvolatile memory card. The execution program may partially or wholly be executed by, for example, the OS running on the computer, together with or in place of the controller.
Also, although a focus detection apparatus included in a camera has been described in the above-mentioned embodiment, the concept of the camera includes not only an apparatus mainly intended for image capture, but also an apparatus (for example, a personal computer and a portable terminal) accessorily provided with an image capture function. A calculation unit which executes a focus detection process may be included in the focus detection apparatus. The camera can include the focus detection apparatus according to the present invention illustrated as each of the above-mentioned embodiments, a solid-state image sensor, and a processing unit which processes a signal output from the solid-state image sensor. The processing unit can include, for example, an A/D converter and a processor which processes digital data output from the A/D converter. A focus detection process can also be performed by the processing unit.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2011-246855, filed Nov. 10, 2011, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2011-246855 | Nov 2011 | JP | national |