JP6688131B2 - Semiconductor device - Google Patents

Semiconductor device Download PDF

Info

Publication number
JP6688131B2
JP6688131B2 JP2016071092A JP2016071092A JP6688131B2 JP 6688131 B2 JP6688131 B2 JP 6688131B2 JP 2016071092 A JP2016071092 A JP 2016071092A JP 2016071092 A JP2016071092 A JP 2016071092A JP 6688131 B2 JP6688131 B2 JP 6688131B2
Authority
JP
Japan
Prior art keywords
circuit
semiconductor device
voltage
diagnosed
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016071092A
Other languages
Japanese (ja)
Other versions
JP2017183601A (en
Inventor
丸本 共治
共治 丸本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Rohm Co Ltd
Original Assignee
Rohm Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rohm Co Ltd filed Critical Rohm Co Ltd
Priority to JP2016071092A priority Critical patent/JP6688131B2/en
Publication of JP2017183601A publication Critical patent/JP2017183601A/en
Application granted granted Critical
Publication of JP6688131B2 publication Critical patent/JP6688131B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Testing Of Individual Semiconductor Devices (AREA)
  • Tests Of Electronic Circuits (AREA)
  • Semiconductor Integrated Circuits (AREA)

Description

本発明は、半導体集積回路素子の初期不良乃至偶発不良に起因する構造不良を検出する半導体装置に関する。   The present invention relates to a semiconductor device that detects a structural defect caused by an initial defect or a random defect of a semiconductor integrated circuit element.

現在、故障品の市場への流出を防ぐために、出荷テストにおいてIDDQ(静止電源電流)測定が行われている。IDDQ測定とは、静止状態にある半導体集積回路素子に流れる微小な電源電流を測定し、その測定値の大小により半導体集積回路の構造不良を検出する手法である。しかしながら、半導体集積回路には、より高い信頼性が求められており、ICの出荷時のみならず、ICの出荷後の偶発不良等による半導体集積回路の構造不良を検出する手段が必要になってきている。そこで、半導体集積回路内の素子の構造不良を検出するために、自動検査機能を有する半導体集積回路が開発されている。   Currently, IDDQ (quiescent power supply current) measurement is performed in a shipping test in order to prevent a defective product from leaking to the market. The IDDQ measurement is a method of measuring a minute power supply current flowing through a semiconductor integrated circuit element in a stationary state and detecting a structural failure of the semiconductor integrated circuit based on the magnitude of the measured value. However, the semiconductor integrated circuit is required to have higher reliability, and a means for detecting a structural defect of the semiconductor integrated circuit due to a random defect after the shipment of the IC is required not only when the IC is shipped. ing. Therefore, a semiconductor integrated circuit having an automatic inspection function has been developed in order to detect structural defects of elements in the semiconductor integrated circuit.

特許文献1に記載の自己チェック型集積回路は、電流値検出部、メイン機能部、及び不良検出部から構成される。自己チェック回路に電源が供給されると、電流値検出部を介してメイン機能部へ電源が供給される。電流値検出部は、メイン機能部へ流れる電流値を不良検出部へ出力する。不良検出部は、電流検出部から入力された電流値(電圧に変換された値)により不良を判断し、不良検出信号を送出する。電流検出部としては、ダイオードが用いられる。   The self-check type integrated circuit described in Patent Document 1 includes a current value detection unit, a main function unit, and a defect detection unit. When power is supplied to the self-check circuit, power is supplied to the main function unit via the current value detection unit. The current value detection unit outputs the current value flowing to the main function unit to the defect detection unit. The defect detection unit determines a defect based on the current value (value converted into voltage) input from the current detection unit, and sends out a defect detection signal. A diode is used as the current detector.

ダイオードに流れる順方向電流が増加した場合には、順方向電圧は上昇し、順方向電流が減少した場合には、順方向電圧は下降する。この特性を利用し、順方向電圧の上限値及び下限値を設定し、メイン機能部の不良検出を行う。   When the forward current flowing through the diode increases, the forward voltage increases, and when the forward current decreases, the forward voltage decreases. Utilizing this characteristic, the upper limit value and the lower limit value of the forward voltage are set, and the defect of the main function unit is detected.

特許3171239号公報Japanese Patent No. 3171239

特許文献1に記載の自己チェック型集積回路において、ダイオードによる不良検出を行うためには、大きな電流差が必要になる。また、特許文献1に記載の自己チェック回路では、回路動作中に不良を検出する。この場合、集積回路の一部に構造不良があっても、回路動作中に回路に流れる電流の変動は小さい。そのため、不良検出は困難である。   In the self-check integrated circuit described in Patent Document 1, a large current difference is required to detect a defect by the diode. Further, the self-check circuit described in Patent Document 1 detects a defect during circuit operation. In this case, even if a part of the integrated circuit has a structural defect, the fluctuation of the current flowing through the circuit during the circuit operation is small. Therefore, defect detection is difficult.

そこで、本発明は、半導体集積回路の構造不良をより高精度に検出することが可能な半導体装置を提供することを目的とする。   Therefore, an object of the present invention is to provide a semiconductor device capable of detecting a structural failure of a semiconductor integrated circuit with higher accuracy.

本発明においてトランジスタの第1主端子とはMOSトランジスタ及びバイポーラトランジスタに関わらず当該トランジスタに電流が流入する電極を指す。又、トランジスタの第2主端子とは当該トランジスタから電流が流出する電極を指す。例えば、NMOSトランジスタでは第1主端子はドレインであり、第2主端子がソースにあたる。PMOSトランジスタでの第1主端子はソースであり、第2主端子はドレインである。NPNトランジスタでは第1主端子はコレクタであり、第2主端子はエミッタである。PNPトランジスタでの第1主端子はエミッタであり、第2主端子はコレクタである。また、制御端子とは第1主端子から第2主端子に向かって流れる電流を制御する電極である。MOSトランジスタではゲートが、バイポーラトランジスタではベースがそれぞれ制御端子に相当する。   In the present invention, the first main terminal of a transistor refers to an electrode into which a current flows into the transistor regardless of whether it is a MOS transistor or a bipolar transistor. Further, the second main terminal of the transistor means an electrode through which current flows from the transistor. For example, in an NMOS transistor, the first main terminal is the drain and the second main terminal is the source. The first main terminal of the PMOS transistor is the source and the second main terminal is the drain. In the NPN transistor, the first main terminal is the collector and the second main terminal is the emitter. The first main terminal of the PNP transistor is the emitter, and the second main terminal is the collector. The control terminal is an electrode that controls the current flowing from the first main terminal toward the second main terminal. The gate of the MOS transistor corresponds to the control terminal of the base of the bipolar transistor.

本発明において、主導電路とは第1主端子から第2主端子に向かって電流が流れる電流経路を指す。 In the present invention, the main conductive path refers to a current path through which a current flows from the first main terminal toward the second main terminal.

本発明において、スリープモードとは、当該回路の状態が時間的に変化しない回路状態を指す。ノーマルモードとは、当該回路の状態が時間的に変化するすなわち回路動作が実行されている回路状態を指す。端的にいえば、スリープモード以外の回路状態に置かれた状態がノーマルモードである。 In the present invention, the sleep mode refers to a circuit state in which the state of the circuit does not change with time. The normal mode refers to a circuit state in which the state of the circuit changes with time, that is, a circuit operation is being executed. In short, the normal mode is a circuit state other than the sleep mode.

本発明において被診断回路とは、スリープモード及びノーマルモードの2つの回路状態に移行又は遷移されるとともに、静止電流の測定に供される当該回路を指す。   In the present invention, the circuit to be diagnosed refers to the circuit which is used for measuring the quiescent current while being transited or transited to two circuit states of the sleep mode and the normal mode.

また、本発明において静止電流とはスリープモード時に被診断回路に流れる回路電流を指す。 In the present invention, the quiescent current means a circuit current flowing through the circuit to be diagnosed in the sleep mode.

本発明に係る半導体装置は、電源電圧が供給された状態で所定のノーマルモードと電源電圧が供給された状態で所定のスリープモードに移行又は遷移できる被診断回路を有する。被診断回路がスリープモードであるときに被診断回路の静止電流を電圧に変換して出力する電流測定回路と、電流測定回路から出力された電圧の大きさを所定の基準電圧と比較し、比較結果を出力する電圧比較回路を有する。   A semiconductor device according to the present invention has a circuit to be diagnosed that can shift or transition to a predetermined normal mode when a power supply voltage is supplied and to a predetermined sleep mode when a power supply voltage is supplied. When the circuit under test is in sleep mode, the current measurement circuit that converts the quiescent current of the circuit under test to a voltage and outputs it, and the magnitude of the voltage output from the current measurement circuit are compared with a predetermined reference voltage, and compared. It has a voltage comparison circuit for outputting the result.

また、診断回路を構成する電流測定回路は、第1主端子、第2主端子、及び制御端子を有し、第1主端子と第2主端子との間に主導電路が形成されるトランジスタを有する。さらに主導電路と並列に接続される抵抗を有し、トランジスタの制御端子にトランジスタをオン又はオフさせる制御信号が印加され、制御信号によってノーマルモードではトランジスタはオンとされ、スリープモードではトランジスタはオフとされ、静止電流が抵抗を介して流れるように制御される。   Further, the current measuring circuit which constitutes the diagnostic circuit includes a transistor having a first main terminal, a second main terminal, and a control terminal, and a main conductive path is formed between the first main terminal and the second main terminal. Have. Further, it has a resistor connected in parallel with the main conductive path, and a control signal for turning the transistor on or off is applied to the control terminal of the transistor, the transistor is turned on in the normal mode by the control signal, and the transistor is turned off in the sleep mode. The quiescent current is controlled so as to flow through the resistor.

また、診断回路の電流測定回路で測定される静止電流は抵抗によって測定電圧に変換され、測定電圧は、基準電圧生成回路で生成された基準電圧と電圧比較回路で比較され、電圧比較回路から被診断回路の故障の有無を示す正常異常判定信号が出力される。   In addition, the quiescent current measured by the current measuring circuit of the diagnostic circuit is converted into the measured voltage by the resistance, and the measured voltage is compared with the reference voltage generated by the reference voltage generation circuit by the voltage comparison circuit, and the measured voltage is output from the voltage comparison circuit. A normal / abnormal determination signal indicating whether or not there is a failure in the diagnostic circuit is output.

また、別の診断回路を構成する半導体装置は、電源端子、出力端子、スリープ通知端子、及び静止電流測定端子が用いられる。さらに、半導体装置は電流測定回路、及び電圧比較回路を含む。電流測定回路には第1電源電圧が供給されるが、被診断回路にはスリープモードでは第1電源電圧が供給され、ノーマルモードでは第1電源電圧とは異なる電源経路を介して第2電源電圧が供給される。被診断回路の静止電流測定端子でもある電源端子には第1電源電圧又は第2電源電圧が選択的に供給されるようにスイッチが用いられる。   A semiconductor device that constitutes another diagnostic circuit uses a power supply terminal, an output terminal, a sleep notification terminal, and a quiescent current measurement terminal. Further, the semiconductor device includes a current measuring circuit and a voltage comparing circuit. The first power supply voltage is supplied to the current measuring circuit, but the first power supply voltage is supplied to the circuit to be diagnosed in the sleep mode, and the second power supply voltage is supplied through the power supply path different from the first power supply voltage in the normal mode. Is supplied. A switch is used so that the first power supply voltage or the second power supply voltage is selectively supplied to the power supply terminal which is also the quiescent current measuring terminal of the circuit to be diagnosed.

本発明によれば、半導体集積回路の構造不良をより高精度に検出することが可能な半導体装置を提供することができる。   According to the present invention, it is possible to provide a semiconductor device capable of detecting a structural defect of a semiconductor integrated circuit with higher accuracy.

本発明の第1の実施の形態に係る半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device which concerns on the 1st Embodiment of this invention. 図1の半導体装置の詳細な構成を示す第1の回路図である。FIG. 3 is a first circuit diagram showing a detailed configuration of the semiconductor device of FIG. 1. 図1の半導体装置の詳細な構成を示す第2の回路図である。FIG. 3 is a second circuit diagram showing a detailed configuration of the semiconductor device of FIG. 1. 図1の半導体装置の詳細な構成を示す第3の回路図である。FIG. 6 is a third circuit diagram showing a detailed configuration of the semiconductor device of FIG. 1. 図1の半導体装置の詳細な構成を示す第4の回路図である。FIG. 6 is a fourth circuit diagram showing a detailed configuration of the semiconductor device of FIG. 1. 本発明の第2の実施の形態に係る半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device which concerns on the 2nd Embodiment of this invention. 図3の半導体装置の詳細な構成を示す回路図である。FIG. 4 is a circuit diagram showing a detailed configuration of the semiconductor device of FIG. 3. 本発明の第3の実施の形態に係る半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device which concerns on the 3rd Embodiment of this invention. 本発明の第4の実施の形態に係る半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device which concerns on the 4th Embodiment of this invention. 本発明の第5の実施の形態に係る半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device which concerns on the 5th Embodiment of this invention. 図7の半導体装置の判定信号の一例を示すタイミングチャートである。8 is a timing chart showing an example of a determination signal of the semiconductor device of FIG. 7. 図7の半導体装置の判定信号の他の例を示すタイミングチャートである。9 is a timing chart showing another example of the determination signal of the semiconductor device of FIG. 7. 本発明の第6の実施の形態に係る半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device which concerns on the 6th Embodiment of this invention. 図10の半導体装置の判定信号の一例を示す表である。11 is a table showing an example of determination signals of the semiconductor device of FIG. 10. 本発明の第7の実施の形態に係る半導体装置の構成を示すブロック図である。It is a block diagram which shows the structure of the semiconductor device which concerns on the 7th Embodiment of this invention. 図12の半導体装置の詳細な構成を示す回路図である。FIG. 13 is a circuit diagram showing a detailed configuration of the semiconductor device of FIG. 12. 本発明の第8の実施の形態に係り、本発明に係る診断回路を電源レギュレータに内蔵した一例を示すブロック図である。FIG. 16 is a block diagram showing an example in which a diagnostic circuit according to the present invention is incorporated in a power supply regulator according to the eighth embodiment of the present invention. 図14の診断回路を電源レギュレータの1つであるスイッチングレギュレータに適用した一例を示す回路図である。It is a circuit diagram which shows an example which applied the diagnostic circuit of FIG. 14 to the switching regulator which is one of the power supply regulators.

(第1の実施の形態)
図1は、本発明の第1の実施の形態に係る診断回路1を含む半導体装置100aの構成を示すブロック図である。以下、図1の診断回路1を含む半導体装置100aについて図面を参照しながら説明する。なお、同一機能を有するものについては同一符号を付し、その繰り返しの説明は省略する。
(First embodiment)
FIG. 1 is a block diagram showing the configuration of a semiconductor device 100a including a diagnostic circuit 1 according to the first embodiment of the present invention. Hereinafter, a semiconductor device 100a including the diagnostic circuit 1 of FIG. 1 will be described with reference to the drawings. In addition, those having the same function are denoted by the same reference numerals, and the repeated description thereof will be omitted.

図1の半導体装置100aは、診断回路1及び被診断回路10を含む。診断回路1は、電流測定回路20、基準電圧生成回路30、及び電圧比較回路40を含む。また、半導体装置100aは、電源端子VDD、接地端子GND、通知端子T1、及び出力端子OUTを有する。電源端子VDDには電源電圧Vddが供給される。接地端子GNDは、接地電位に設定される。   The semiconductor device 100a of FIG. 1 includes a diagnostic circuit 1 and a circuit to be diagnosed 10. The diagnostic circuit 1 includes a current measurement circuit 20, a reference voltage generation circuit 30, and a voltage comparison circuit 40. The semiconductor device 100a also has a power supply terminal VDD, a ground terminal GND, a notification terminal T1, and an output terminal OUT. The power supply voltage Vdd is supplied to the power supply terminal VDD. The ground terminal GND is set to the ground potential.

被診断回路10は、スリープモード機能及びタイマ11を有する。診断回路1の電流測定回路20、及び被診断回路10は、電源端子VDDと接地端子GNDとの間に直列に接続される。電源端子VDDから電流測定回路20を介して被診断回路10に電源電圧Vddが供給される。被診断回路10は、電源電圧Vddの供給開始から一定期間、スリープモード機能によりスリープモードとなる。スリープモードとは、電源電圧Vddは供給されているが、被診断回路10が動作していない状態をいう。被診断回路10は、スリープモードになると、信号線P10を介して診断回路1の電流測定回路20にスリープ信号S10を出力する。それにより、電流測定回路20が動作する。その結果、電源端子VDDから電流測定回路20を介して被診断回路10に静止電流I20が流れる。静止電流とは、被診断回路10が動作していない状態である場合に、被診断回路10に流れる電流をいう。ここで、被診断回路10の内部の回路素子に構造不良が存在する場合には、回路素子の構造が正常である場合とは異なる大きさの静止電流I20が流れる。構造不良には、例えば、被診断回路10の内部のトランジスタが壊れてリーク電流が大きい場合、MOSトランジスタ(金属酸化物半導体電界効果トランジスタ)のしきい値電圧が基準値から大きく外れている場合、抵抗の抵抗値がばらつきにより基準値から大きく外れている場合、キャパシタのキャパシタンスがばらつきにより基準値から大きく外れている場合、配線が切断又はショートしている場合等である。 The circuit to be diagnosed 10 has a sleep mode function and a timer 11. The current measuring circuit 20 of the diagnostic circuit 1 and the circuit to be diagnosed 10 are connected in series between the power supply terminal VDD and the ground terminal GND. The power supply voltage Vdd is supplied from the power supply terminal VDD to the circuit to be diagnosed 10 through the current measuring circuit 20. The circuit to be diagnosed 10 enters the sleep mode by the sleep mode function for a certain period after the supply of the power supply voltage Vdd is started. The sleep mode is a state in which the power supply voltage Vdd is supplied but the circuit under diagnosis 10 is not operating. When in the sleep mode, the circuit to be diagnosed 10 outputs the sleep signal S10 to the current measuring circuit 20 of the diagnostic circuit 1 via the signal line P10. As a result, the current measuring circuit 20 operates. As a result, the quiescent current I20 flows from the power supply terminal VDD to the circuit under test 10 through the current measuring circuit 20. The quiescent current means a current flowing through the circuit under diagnosis 10 when the circuit under diagnosis 10 is not operating. Here, when there is a structural defect in the circuit element inside the circuit to be diagnosed 10, a quiescent current I20 having a magnitude different from that when the circuit element has a normal structure flows. The structural failure is, for example, when the transistor inside the circuit to be diagnosed 10 is broken and the leak current is large, when the threshold voltage of the MOS transistor (metal oxide semiconductor field effect transistor) is largely deviated from the reference value, This is because the resistance value of the resistor largely deviates from the reference value due to variations, the capacitance of the capacitor largely deviates from the reference value due to variations, or the wiring is cut or short-circuited.

電流測定回路20は、電圧比較回路40に接続され、被診断回路10に流れる静止電流I20の大きさに応じた測定電圧V20を生成し、電圧比較回路40に出力する。   The current measurement circuit 20 is connected to the voltage comparison circuit 40, generates a measurement voltage V20 according to the magnitude of the quiescent current I20 flowing through the circuit to be diagnosed 10, and outputs it to the voltage comparison circuit 40.

基準電圧生成回路30は、電圧比較回路40に接続され、基準電圧V30a及びV30bの少なくとも1つを生成し、電圧比較回路40に出力する。基準電圧V30a及びV30bは、測定電圧V20が所定の範囲内であるかどうかを判定する基準となる。電圧比較回路40がウインドコンパレータで構成される場合には、基準電圧V30a及びV30bの2つが用いられる。電圧比較回路40が1段のコンパレータで構成される場合には、基準電圧V30a及びV30bのいずれか1つが用いられれば十分である。 The reference voltage generation circuit 30 is connected to the voltage comparison circuit 40, generates at least one of the reference voltages V30a and V30b, and outputs it to the voltage comparison circuit 40. The reference voltages V30a and V30b serve as a reference for determining whether or not the measured voltage V20 is within a predetermined range. When the voltage comparison circuit 40 is composed of a window comparator, two reference voltages V30a and V30b are used. When the voltage comparison circuit 40 is composed of a single-stage comparator, it is sufficient to use either one of the reference voltages V30a and V30b.

電圧比較回路40は、半導体装置100aの通知端子T1に接続される。例えば、電圧比較回路40が1段のコンパレータで構成される場合には、測定電圧V20と基準電圧V30a及びV30bのいずれか一方とが比較され、比較結果に応じた通知信号S40が生成され、通知端子T1に出力される。電圧比較回路40は、例えば、測定電圧V20が基準電圧V30a以上(V20≧V30a)である場合には、ハイレベルの通知信号S40が出力され、測定電圧V20が基準電圧V30よりも低い場合(V20<V30a)には、ローレベルの通知信号S40が出力される。通知信号S40が、例えば、ローレベルである場合には、被診断回路10の内部の回路素子に構造不良が存在し、通知信号S40がハイレベルである場合には、被診断回路10の内部の回路素子に構造不良が存在しないとして正常異常判定がなされる。 The voltage comparison circuit 40 is connected to the notification terminal T1 of the semiconductor device 100a. For example, when the voltage comparison circuit 40 is composed of a single-stage comparator, the measured voltage V20 is compared with one of the reference voltages V30a and V30b, and the notification signal S40 is generated according to the comparison result, and the notification is sent. It is output to the terminal T1. For example, when the measurement voltage V20 is equal to or higher than the reference voltage V30a (V20 ≧ V30a), the voltage comparison circuit 40 outputs the high-level notification signal S40, and when the measurement voltage V20 is lower than the reference voltage V30 (V20 A low-level notification signal S40 is output to <V30a). When the notification signal S40 is at a low level, for example, there is a structural defect in the circuit element inside the circuit to be diagnosed 10, and when the notification signal S40 is at a high level, the inside of the circuit to be diagnosed 10 is diagnosed. A normal / abnormal determination is made assuming that the circuit element has no structural defect.

また、電圧比較回路40にウインドコンパレータが用いられる場合には、基準電圧V30a及びV30bの2つが用いられる。例えば、測定電圧V20が、V30b≦V20≦V30aであるときには被診断回路10は正常とし、V20<V30b、又はV20>V30aであるときには異常としてそれぞれ判定される。 When a window comparator is used for the voltage comparison circuit 40, two reference voltages V30a and V30b are used. For example, when the measured voltage V20 is V30b ≦ V20 ≦ V30a, the diagnosis target circuit 10 is determined to be normal, and when V20 <V30b or V20> V30a, it is determined to be abnormal.

なお、半導体装置100aの通知端子T1には、図示しない他のIC(Integrated Circuit)が接続される。図示しない他のICには、通知端子T1を介して通知信号S40が入力される。被診断回路10の診断結果が異常である場合には、図示しない他のICは、例えば、半導体装置100aへの電力供給を停止させる、半導体装置100aへのクロック信号の供給を停止させる、図示しない表示機器へ診断結果が異常である旨の通知を行う等の制御を行う。 Note that another IC (Integrated Circuit) (not shown) is connected to the notification terminal T1 of the semiconductor device 100a. The notification signal S40 is input to the other IC (not shown) via the notification terminal T1. If the diagnosis result of the circuit to be diagnosed 10 is abnormal, another IC (not shown) stops the power supply to the semiconductor device 100a, stops the supply of the clock signal to the semiconductor device 100a, or the like (not shown). Control such as notifying the display device that the diagnosis result is abnormal is performed.

被診断回路10は、半導体装置100aの出力端子OUTに接続され、出力端子OUTには、負荷90が接続される。負荷90としては、例えば、モータ、LED(発光ダイオード)等がある。被診断回路10の診断結果が正常である場合には、電源電圧Vddの供給開始から一定期間が経過すると、タイマ11により被診断回路10のスリープモードが解除される。その結果、被診断回路10は、ノーマルモードに遷移する。被診断回路10は、ノーマルモードになると、電流測定回路20にスリープ信号S10を出力しない。そのため、電流測定回路20は、動作を停止する。その結果、電源端子VDDから電流測定回路20を介して被診断回路10に電源電圧Vddが供給される。それにより、被診断回路10は、出力端子OUTに出力信号S100を出力し、負荷90を駆動する。 The circuit to be diagnosed 10 is connected to the output terminal OUT of the semiconductor device 100a, and the load 90 is connected to the output terminal OUT. The load 90 is, for example, a motor, an LED (light emitting diode), or the like. When the diagnosis result of the circuit under test 10 is normal, the sleep mode of the circuit under test 10 is released by the timer 11 after a lapse of a certain period from the start of supply of the power supply voltage Vdd. As a result, the circuit under test 10 transitions to the normal mode. In the normal mode, the circuit under test 10 does not output the sleep signal S10 to the current measuring circuit 20. Therefore, the current measuring circuit 20 stops its operation. As a result, the power supply voltage Vdd is supplied from the power supply terminal VDD to the circuit under test 10 via the current measuring circuit 20. As a result, the circuit to be diagnosed 10 outputs the output signal S100 to the output terminal OUT and drives the load 90.

被診断回路10のノーマルモード時には、被診断回路10に流れる電流が大きく変動するため、被診断回路10の内部の構造不良を検出することが困難である。しかし、図1の第1の実施の形態の半導体装置100aは、被診断回路10がスリープモードになった際に、静止電流I20の大きさにより被診断回路10の内部の回路素子の構造不良を検出し、通知信号S40として通知端子T1に出力する。そのため、半導体集積回路の構造不良をより高精度で検出することが可能である。また、被診断回路10にスリープ機能が内蔵されているため、外部からスリープモードにする必要はなくなる。 When the circuit to be diagnosed 10 is in the normal mode, the current flowing through the circuit to be diagnosed 10 fluctuates greatly, so it is difficult to detect structural defects inside the circuit to be diagnosed 10. However, in the semiconductor device 100a according to the first embodiment of FIG. 1, when the circuit to be diagnosed 10 is in the sleep mode, the structural failure of the circuit element inside the circuit to be diagnosed 10 may occur due to the magnitude of the quiescent current I20. It is detected and output to the notification terminal T1 as the notification signal S40. Therefore, the structural failure of the semiconductor integrated circuit can be detected with higher accuracy. Moreover, since the circuit to be diagnosed 10 has a built-in sleep function, there is no need to externally enter the sleep mode.

なお、診断回路1は、被診断回路10と接地端子GNDとの間に接続されてもかまわない。また、診断回路1の基準電圧生成回路30は、半導体装置100aの外部に設けられてもよい。この場合、基準電圧V30a及びV30bの少なくとも1つを入力するための端子が必要となるが、基準電圧V30a及びV30bの高さをそれぞれ単独に調整することが容易になる。 The diagnosis circuit 1 may be connected between the circuit to be diagnosed 10 and the ground terminal GND. The reference voltage generation circuit 30 of the diagnostic circuit 1 may be provided outside the semiconductor device 100a. In this case, a terminal for inputting at least one of the reference voltages V30a and V30b is required, but it becomes easy to individually adjust the heights of the reference voltages V30a and V30b.

図2Aは、図1の本発明の第1の実施の形態に係る診断回路1を含む半導体装置100aの詳細な構成を示す第1の回路図である。以下、図2Aの診断回路1を含む半導体装置100aaについて図面を参照しながら説明する。   FIG. 2A is a first circuit diagram showing a detailed configuration of the semiconductor device 100a including the diagnostic circuit 1 according to the first embodiment of the present invention in FIG. Hereinafter, a semiconductor device 100aa including the diagnostic circuit 1 of FIG. 2A will be described with reference to the drawings.

図2Aの半導体装置100aaは、診断回路1及び被診断回路10を含む。診断回路1は、電流測定回路20aa、基準電圧生成回路30、及び電圧比較回路40を含む。また、半導体装置100aaは、電源端子VDD、接地端子GND、通知端子T1、及び出力端子OUTを有する。電源端子VDDには電源電圧Vddが与えられる。接地端子GNDは、接地電位に設定される。電流測定回路20aa及び被診断回路10は直列に接続され、電流測定回路20aaは電源端子VDDに被診断回路10は接地端子GNDにそれぞれ接続される。   The semiconductor device 100aa in FIG. 2A includes a diagnostic circuit 1 and a circuit to be diagnosed 10. The diagnostic circuit 1 includes a current measuring circuit 20aa, a reference voltage generating circuit 30, and a voltage comparing circuit 40. Further, the semiconductor device 100aa has a power supply terminal VDD, a ground terminal GND, a notification terminal T1, and an output terminal OUT. A power supply voltage Vdd is applied to the power supply terminal VDD. The ground terminal GND is set to the ground potential. The current measuring circuit 20aa and the circuit to be diagnosed 10 are connected in series, the current measuring circuit 20aa is connected to the power supply terminal VDD, and the circuit to be diagnosed 10 is connected to the ground terminal GND.

被診断回路10は、スリープモード機能及びタイマ11を有する。被診断回路10はスリープモードとノーマルモードの2つのモード間で互いに移行できるように制御される。診断回路1の電流測定回路20aaは、PMOSトランジスタ(Pチャネル型金属酸化物半導体電界効果トランジスタ)Q20aa及び抵抗R20aaを含む。被診断回路10は、電流測定回路20aaのPMOSトランジスタQ20aaのドレインDと接地端子GNDとの間に接続される。被診断回路10は、信号線P10を介して電流測定回路20aaのPMOSトランジスタQ20aaのゲートGに接続される。電流測定回路20aaのPMOSトランジスタQ20aaのソースSは、電源端子VDDに接続される。PMOSトランジスタQ20aaの主導電路はソースSとドレインDとの間に形成される。PMOSトランジスタQ20aaの主導電路と抵抗R20aaは並列に接続される。PMOSトランジスタQ20aaは抵抗R20aaを短絡させるスイッチとして働く。スリープ信号S10によって、被診断回路10がスリープモードのときはPMOSトランジスタQ20aaがオフされ、ノーマルモードのときはPMOSトランジスタQ20aaがオンされるように、PMOSトランジスタQ20aaのゲートGが制御される。 The circuit to be diagnosed 10 has a sleep mode function and a timer 11. The circuit to be diagnosed 10 is controlled so as to be able to shift between the two modes of the sleep mode and the normal mode. The current measuring circuit 20aa of the diagnostic circuit 1 includes a PMOS transistor (P-channel type metal oxide semiconductor field effect transistor) Q20aa and a resistor R20aa. The circuit under test 10 is connected between the drain D of the PMOS transistor Q20aa of the current measuring circuit 20aa and the ground terminal GND. The circuit to be diagnosed 10 is connected to the gate G of the PMOS transistor Q20aa of the current measuring circuit 20aa via the signal line P10. The source S of the PMOS transistor Q20aa of the current measuring circuit 20aa is connected to the power supply terminal VDD. The main conductive path of the PMOS transistor Q20aa is formed between the source S and the drain D. The main conductive path of the PMOS transistor Q20aa and the resistor R20aa are connected in parallel. The PMOS transistor Q20aa functions as a switch that short-circuits the resistor R20aa. The sleep signal S10 controls the gate G of the PMOS transistor Q20aa so that the PMOS transistor Q20aa is turned off when the circuit under test 10 is in the sleep mode and is turned on when the circuit under test 10 is in the normal mode.

被診断回路10がスリープモードのときは、PMOSトランジスタQ20aaがオフするように、スリープ信号S10が被診断回路10からPMOSトランジスタQ20aaのゲートGに印加される。したがって、被診断回路10がスリープモードのときは、静止電流I20が抵抗R20aaを介して被診断回路10に流れる。静止電流とは、スリープモード時に被診断回路10に流れる電流のことである。 When the circuit under test 10 is in the sleep mode, the sleep signal S10 is applied from the circuit under test 10 to the gate G of the PMOS transistor Q20aa so that the PMOS transistor Q20aa is turned off. Therefore, when the circuit under test 10 is in the sleep mode, the quiescent current I20 flows through the circuit under test 10 through the resistor R20aa. The quiescent current is a current flowing through the circuit to be diagnosed 10 in the sleep mode.

被診断回路10がノーマルモードのときは、PMOSトランジスタQ20aaがオンするように、スリープ信号S10が被診断回路10からPMOSトランジスタQ20aaのゲートGに印加される。したがって、被診断回路10がノーマルモードのときは、その主導電路すなわちソースSとドレインDとの間に電流が流れる。PMOSトランジスタQ20aaがオンしたときのオン抵抗すなわちソースSとドレインDとの間の抵抗値は抵抗R20aaの抵抗値に比べて十分に小さいので、電源端子VDDから抵抗R20aaを介さずにPMOSトランジスタQ20aaの主導電路を介して被診断回路10に電流が供給される。 When the circuit under test 10 is in the normal mode, the sleep signal S10 is applied from the circuit under test 10 to the gate G of the PMOS transistor Q20aa so that the PMOS transistor Q20aa is turned on. Therefore, when the circuit to be diagnosed 10 is in the normal mode, a current flows between the main conductive path, that is, the source S and the drain D. Since the ON resistance when the PMOS transistor Q20aa is turned on, that is, the resistance value between the source S and the drain D is sufficiently smaller than the resistance value of the resistor R20aa, the PMOS transistor Q20aa of the power transistor VDD does not go through the resistor R20aa. Current is supplied to the circuit to be diagnosed 10 through the main conductive path.

抵抗R20aaの大きさは、電源電圧Vdd、静止電流I20、及び電圧比較回路40の回路構成とダイナミックレンジ等によって決められる。抵抗R20aaの大きさは、例えば、1kΩ〜500kΩである。PMOSトランジスタQ20aaのオン抵抗は、例えば、10mΩ〜10Ωである。したがって、抵抗R20aaは、PMOSトランジスタのオン抵抗の100倍から50000000倍の範囲となる。被診断回路10のノーマルモードでの動作を考慮するとPMOSトランジスタのオン抵抗は小さいほどよい。 The size of the resistor R20aa is determined by the power supply voltage Vdd, the quiescent current I20, the circuit configuration of the voltage comparison circuit 40, the dynamic range, and the like. The size of the resistor R20aa is, for example, 1 kΩ to 500 kΩ. The on resistance of the PMOS transistor Q20aa is, for example, 10 mΩ to 10Ω. Therefore, the resistance R20aa is in the range of 100 times to 50,000,000 times the ON resistance of the PMOS transistor. Considering the operation of the circuit under test 10 in the normal mode, the smaller the on resistance of the PMOS transistor, the better.

電流測定回路20aaのPMOSトランジスタQ20aaのドレインDは、電圧比較回路40のコンパレータCMP40の非反転入力端子(+)に接続される。電流測定回路20の抵抗R20aaは、PMOSトランジスタQ20aaのソースSとドレインDとの主導電路と並列に接続される。 The drain D of the PMOS transistor Q20aa of the current measuring circuit 20aa is connected to the non-inverting input terminal (+) of the comparator CMP40 of the voltage comparison circuit 40. The resistor R20aa of the current measuring circuit 20 is connected in parallel with the main conductive path of the source S and the drain D of the PMOS transistor Q20aa.

被診断回路10は、電源電圧Vddの供給開始から一定期間、スリープモード機能によりスリープモードとなる。被診断回路10は、スリープモードになると、信号線P10を介して診断回路1の電流測定回路20aaのPMOSトランジスタQ20aaのゲートGにスリープ信号S10を出力する。それにより、電流測定回路20aaのPMOSトランジスタQ20aaがオフとなる。その結果、電源端子VDDから電流測定回路20aaの抵抗R20aaを介して被診断回路10に静止電流I20が流れる。ここで、被診断回路10の内部の回路素子に構造不良が存在する場合には、回路素子の構造が正常である場合とは異なる大きさの静止電流I20が流れる。電流測定回路20aaの抵抗R20aaは、静止電流I20の大きさに応じた測定電圧V20を生成し、電圧比較回路40のコンパレータCMP40の非反転入力端子(+)に出力する。 The circuit to be diagnosed 10 enters the sleep mode by the sleep mode function for a certain period after the supply of the power supply voltage Vdd is started. In the sleep mode, the circuit to be diagnosed 10 outputs the sleep signal S10 to the gate G of the PMOS transistor Q20aa of the current measuring circuit 20aa of the diagnosis circuit 1 via the signal line P10. This turns off the PMOS transistor Q20aa of the current measuring circuit 20aa. As a result, the quiescent current I20 flows from the power supply terminal VDD to the circuit to be diagnosed 10 through the resistor R20aa of the current measuring circuit 20aa. Here, when there is a structural defect in the circuit element inside the circuit to be diagnosed 10, a quiescent current I20 having a magnitude different from that when the circuit element has a normal structure flows. The resistor R20aa of the current measurement circuit 20aa generates a measurement voltage V20 according to the magnitude of the quiescent current I20 and outputs it to the non-inverting input terminal (+) of the comparator CMP40 of the voltage comparison circuit 40.

基準電圧生成回路30は、抵抗R30及び抵抗R31を含む。抵抗R30及び抵抗R31は、電源端子VDDと接地端子GNDとの間に直列に接続される。基準電圧生成回路30の抵抗R30と抵抗R31との共通接続点は、電圧比較回路40のコンパレータCMP40の反転入力端子(−)に接続される。基準電圧生成回路30の抵抗R30と抵抗R31との共通接続点の電圧が基準電圧V30として電圧比較回路40のコンパレータCMP40の反転入力端子(−)に与えられる。基準電圧生成回路30は、後述の電圧比較回路40を動作させる基準電圧(V30)を生成する。なお、前述のように、後述の電圧比較回路40がウインドコンパレータで構成されることを考慮すれば、基準電圧V30に代えて、例えば、図示しない2つの基準電圧V30a及び基準電圧V30bが生成されるのが好ましい。 The reference voltage generation circuit 30 includes a resistor R30 and a resistor R31. The resistors R30 and R31 are connected in series between the power supply terminal VDD and the ground terminal GND. The common connection point of the resistors R30 and R31 of the reference voltage generation circuit 30 is connected to the inverting input terminal (−) of the comparator CMP40 of the voltage comparison circuit 40. The voltage at the common connection point between the resistor R30 and the resistor R31 of the reference voltage generation circuit 30 is supplied to the inverting input terminal (−) of the comparator CMP40 of the voltage comparison circuit 40 as the reference voltage V30. The reference voltage generation circuit 30 generates a reference voltage (V30) for operating a voltage comparison circuit 40 described later. Note that, as described above, considering that the voltage comparison circuit 40 to be described later is composed of a window comparator, for example, two reference voltages V30a and V30b (not shown) are generated instead of the reference voltage V30. Is preferred.

電圧比較回路40は、コンパレータCMP40を含む。コンパレータCMP40は、スリープモードで抵抗R20aaに流れる静止電流I20の大きさが所定の範囲に入っているか否かを検出するために用いられる。コンパレータCMP40の出力端子は、半導体装置100aaの通知端子T1に接続される。コンパレータCMP40は、測定電圧V20と基準電圧V30とを比較し、比較結果に応じた通知信号S40を生成し、通知端子T1に出力する。電圧比較回路40は、例えば、測定電圧V20が基準電圧V30以上である高い場合にはハイレベルの通知信号を出力し、測定電圧V20が基準電圧V30よりも低い場合には、ローレベルの通知信号を出力する。なお、図2Aに示した電圧比較回路40は、1段のコンパレータCMP40で構成されているが、図示しない2段以上のコンパレータによりウインドコンパレータが構成されてもよい。 The voltage comparison circuit 40 includes a comparator CMP40. The comparator CMP40 is used to detect whether or not the magnitude of the quiescent current I20 flowing through the resistor R20aa in the sleep mode is within a predetermined range. The output terminal of the comparator CMP40 is connected to the notification terminal T1 of the semiconductor device 100aa. The comparator CMP40 compares the measured voltage V20 with the reference voltage V30, generates a notification signal S40 according to the comparison result, and outputs the notification signal S40 to the notification terminal T1. For example, the voltage comparison circuit 40 outputs a high-level notification signal when the measurement voltage V20 is higher than the reference voltage V30, and outputs a low-level notification signal when the measurement voltage V20 is lower than the reference voltage V30. Is output. The voltage comparison circuit 40 shown in FIG. 2A is composed of one-stage comparator CMP40, but a window comparator may be composed of two or more comparators (not shown).

被診断回路10は、半導体装置100aaの出力端子OUTに接続される。出力端子OUTには、負荷90が接続される。負荷90としては、例えば、モータ、LED等がある。被診断回路10の診断結果が正常である場合には、電源電圧Vddの供給開始から一定期間が経過すると、タイマ11により被診断回路10のスリープモードが解除される。その結果、被診断回路10は、ノーマルモードに遷移する。被診断回路10は、ノーマルモードになると、スリープ信号S10を出力しないため、電流測定回路20aaのPMOSトランジスタQ20aaはオンとなる。その結果、電源端子VDDから電流測定回路20aaのPMOSトランジスタQ20aaを介して被診断回路10に電源電圧Vddが供給される。それにより、被診断回路10は、出力端子OUTに出力信号S100を出力し、負荷90を駆動する。なお、被診断回路10内のスリープ信号S10を生成するための図示しないスリープ信号生成回路には、電源電圧Vddが直接供給されてもよい。すなわち、スリープ信号S10は、電源電圧Vddが直接供給されることにより生成されるドライバ出力であってもよい。 The circuit to be diagnosed 10 is connected to the output terminal OUT of the semiconductor device 100aa. A load 90 is connected to the output terminal OUT. The load 90 is, for example, a motor, an LED, or the like. When the diagnosis result of the circuit under test 10 is normal, the sleep mode of the circuit under test 10 is released by the timer 11 after a lapse of a certain period from the start of supply of the power supply voltage Vdd. As a result, the circuit under test 10 transitions to the normal mode. In the normal mode, the circuit under test 10 does not output the sleep signal S10, so the PMOS transistor Q20aa of the current measuring circuit 20aa is turned on. As a result, the power supply voltage Vdd is supplied from the power supply terminal VDD to the circuit to be diagnosed 10 through the PMOS transistor Q20aa of the current measuring circuit 20aa. As a result, the circuit to be diagnosed 10 outputs the output signal S100 to the output terminal OUT and drives the load 90. The power supply voltage Vdd may be directly supplied to a sleep signal generation circuit (not shown) for generating the sleep signal S10 in the circuit to be diagnosed 10. That is, the sleep signal S10 may be a driver output generated by directly supplying the power supply voltage Vdd.

被診断回路10がノーマルモードで動作している場合は、被診断回路10に流れる電流が大きく変動するため、被診断回路10の内部の構造不良を検出することが困難である。しかし、図2Aの第1の実施の形態の半導体装置100aは、被診断回路10がスリープモードになった際に、静止電流I20の大きさにより被診断回路10の内部の回路素子の構造不良を検出し、通知信号S40として通知端子T1に出力する。そのため、半導体集積回路の構造不良をより高精度に検出することが可能である。 When the circuit to be diagnosed 10 is operating in the normal mode, the current flowing through the circuit to be diagnosed 10 fluctuates greatly, so that it is difficult to detect a structural defect inside the circuit to be diagnosed 10. However, in the semiconductor device 100a according to the first embodiment of FIG. 2A, when the circuit to be diagnosed 10 is in the sleep mode, the structural failure of the circuit elements inside the circuit to be diagnosed 10 may occur due to the magnitude of the quiescent current I20. It is detected and output to the notification terminal T1 as the notification signal S40. Therefore, the structural failure of the semiconductor integrated circuit can be detected with higher accuracy.

図2Bは、図2Aとは電流測定回路20abが異なる。図2Bでは、電流測定回路20abにバイポーラ形であるPNPトランジスタQ20abが用いられている。この点で図2Aとは異なる。PNPトランジスタQ20abの主導電路と並列に抵抗R20abが接続される。抵抗R20abの抵抗値は、例えば、1kΩ〜500kΩである。PNPトランジスタQ20abの主導電路は、エミッタEとコレクタCとの間に形成される。PNPトランジスタQ20abをオン、オフさせるスリープ信号S10は、被診断回路10から信号線P10を介してPNPトランジスタQ20abのベースBに印加される。被診断回路10がノーマルモード時には、PNPトランジスタQ20abはオンであり、その主導電路を介して被診断回路10に電流が流れる。スリープモード時には、PNPトランジスタQ20abはオフであり、抵抗R20abを介して被診断回路10に静止電流I20が流れる。抵抗R20abにより静止電流I20は電圧に変換される。変換された測定電圧V20は、電圧比較回路40で基準電圧V30と比較される。図2Bでは、電流測定回路20ab以外の構成は図2Aと同じであるので説明を省略する。 2B differs from FIG. 2A in the current measuring circuit 20ab. In FIG. 2B, a bipolar PNP transistor Q20ab is used for the current measuring circuit 20ab. This is different from FIG. 2A. A resistor R20ab is connected in parallel with the main conductive path of the PNP transistor Q20ab. The resistance value of the resistor R20ab is, for example, 1 kΩ to 500 kΩ. The main conductive path of the PNP transistor Q20ab is formed between the emitter E and the collector C. A sleep signal S10 for turning on / off the PNP transistor Q20ab is applied to the base B of the PNP transistor Q20ab from the circuit under diagnosis 10 via the signal line P10. When the circuit under test 10 is in the normal mode, the PNP transistor Q20ab is on, and a current flows through the circuit under test 10 through its main conductive path. In the sleep mode, the PNP transistor Q20ab is off, and the quiescent current I20 flows through the circuit to be diagnosed 10 through the resistor R20ab. The quiescent current I20 is converted into a voltage by the resistor R20ab. The converted measurement voltage V20 is compared with the reference voltage V30 by the voltage comparison circuit 40. In FIG. 2B, the configuration other than the current measuring circuit 20ab is the same as that in FIG.

図2Cは、図2A、図2Bとは電流測定回路20acが異なる。図2Cでは、電流測定回路20acにMOSトランジスタが用いられている。この点は図2Aと同じであるが、電流測定回路20acが接地電位GND側に接続される点が相違する。NMOSトランジスタQ20acの主導電路は、ドレインDとソースSとの間に形成される。図2Cも図2Aと同様に、抵抗がMOSトランジスタの主導電路と並列に接続される。抵抗R20acの抵抗値は、例えば、1kΩ〜500kΩである。NMOSトランジスタQ20acをオン、オフさせるスリープ信号S10は、被診断回路10から信号線P10を介してNMOSトランジスタQ20acのゲートGに印加される。被診断回路10がノーマルモード時には、NMOSトランジスタQ20acはオンであり、NMOSトランジスタQ20acの主導電路を介して被診断回路10に電流が流れる。スリープモード時には、NMOSトランジスタQ20acはオフであり、被診断回路10から抵抗R20acを介して接地電位GND側に静止電流I20が流れる。抵抗R20acにより静止電流I20は電圧に変換される。変換された測定電圧V20は、電圧比較回路40で基準電圧V30と比較される。図2Cでは、電流測定回路20acが接地端子側に、被診断回路10が電源端子VDD側にそれぞれ接続される以外の構成は図2Aと同じであるので説明は省略する。 2C differs from FIG. 2A and FIG. 2B in the current measuring circuit 20ac. In FIG. 2C, a MOS transistor is used for the current measuring circuit 20ac. This point is the same as FIG. 2A, except that the current measuring circuit 20ac is connected to the ground potential GND side. The main conductive path of the NMOS transistor Q20ac is formed between the drain D and the source S. Similarly to FIG. 2A, in FIG. 2C, the resistance is connected in parallel with the main conductive path of the MOS transistor. The resistance value of the resistor R20ac is, for example, 1 kΩ to 500 kΩ. A sleep signal S10 for turning on / off the NMOS transistor Q20ac is applied from the circuit under diagnosis 10 to the gate G of the NMOS transistor Q20ac via the signal line P10. When the circuit under test 10 is in the normal mode, the NMOS transistor Q20ac is on, and the current flows through the circuit under test 10 through the main conductive path of the NMOS transistor Q20ac. In the sleep mode, the NMOS transistor Q20ac is off, and the quiescent current I20 flows from the circuit under diagnosis 10 to the ground potential GND side via the resistor R20ac. The quiescent current I20 is converted into a voltage by the resistor R20ac. The converted measurement voltage V20 is compared with the reference voltage V30 by the voltage comparison circuit 40. 2C is the same as FIG. 2A except that the current measuring circuit 20ac is connected to the ground terminal side and the circuit to be diagnosed 10 is connected to the power supply terminal VDD side, and therefore the description thereof is omitted.

図2Dは、図2A、図2B、及び図2Cとは電流測定回路20adが異なる。図2Dでは、電流測定回路20adにバイポーラ形であるNPNトランジスタQ20adが用いられている。この点で図2Bとは異なる。抵抗R20adはNPNトランジスタQ20adの主導電路と並列に接続される。抵抗R20adの抵抗値は、例えば、1kΩ〜500kΩである。NPNトランジスタQ20adの主導電路は、コレクタCとエミッタEとの間に形成される。NPNトランジスタQ20adをオン、オフさせるスリープ信号S10は、被診断回路10から信号線P10を介してNPNトランジスタQ20adのベースBに印加される。被診断回路10がノーマルモード時は、NPNトランジスタQ20adはオンであり、被診断回路10からNPNトランジスタQ20adの主導電路を介して電流が流れる。スリープモード時は、NPNトランジスタQ20adはオフであり、被診断回路10側から抵抗R20adを介して静止電流I20が流れる。抵抗R20adにより静止電流I20は電圧に変換される。変換された測定電圧V20は、電圧比較回路40で基準電圧V30と比較される。図2Dでは、電流測定回路20ad以外の構成は、図2A、図2B、及び図2Cと同じであるので説明は省略する。 2D differs from FIG. 2A, FIG. 2B, and FIG. 2C in the current measuring circuit 20ad. In FIG. 2D, a bipolar NPN transistor Q20ad is used for the current measuring circuit 20ad. This is different from FIG. 2B. The resistor R20ad is connected in parallel with the main conductive path of the NPN transistor Q20ad. The resistance value of the resistor R20ad is, for example, 1 kΩ to 500 kΩ. The main conductive path of the NPN transistor Q20ad is formed between the collector C and the emitter E. The sleep signal S10 for turning on / off the NPN transistor Q20ad is applied from the circuit under diagnosis 10 to the base B of the NPN transistor Q20ad via the signal line P10. When the circuit under test 10 is in the normal mode, the NPN transistor Q20ad is on, and a current flows from the circuit under test 10 through the main conductive path of the NPN transistor Q20ad. In the sleep mode, the NPN transistor Q20ad is off, and the quiescent current I20 flows from the circuit under diagnosis 10 side through the resistor R20ad. The quiescent current I20 is converted into a voltage by the resistor R20ad. The converted measurement voltage V20 is compared with the reference voltage V30 by the voltage comparison circuit 40. In FIG. 2D, the configuration other than the current measurement circuit 20ad is the same as that in FIGS. 2A, 2B, and 2C, and thus the description thereof is omitted.

なお、第1の実施の形態において、被診断回路10がスリープ信号S10を生成するためには、被診断回路10内の図示しないスリープ信号生成回路にスリープ信号S10を生成するに足りる電力を供給する必要がある。このスリープ信号S10を安定的に出力させるために、被診断回路10内の図示しないスリープ信号生成回路は直接電源端子VDD又は接地端子GNDに接続されてもよい。この構成は、本発明の趣旨を逸脱するものではない。 In the first embodiment, in order for the circuit to be diagnosed 10 to generate the sleep signal S10, the sleep signal generation circuit (not shown) in the circuit to be diagnosed 10 is supplied with sufficient power to generate the sleep signal S10. There is a need. In order to stably output the sleep signal S10, a sleep signal generation circuit (not shown) in the circuit to be diagnosed 10 may be directly connected to the power supply terminal VDD or the ground terminal GND. This configuration does not depart from the gist of the present invention.

(第2の実施の形態)
図3は、本発明の第2の実施の形態に係る診断回路1を含む半導体装置100bの構成を示すブロック図である。以下、図3の診断回路1を含む半導体装置100bについて図面を参照しながら説明する。
(Second embodiment)
FIG. 3 is a block diagram showing the configuration of a semiconductor device 100b including the diagnostic circuit 1 according to the second embodiment of the present invention. Hereinafter, a semiconductor device 100b including the diagnostic circuit 1 of FIG. 3 will be described with reference to the drawings.

図3の半導体装置100bが図1の半導体装置100aと異なるのは以下の点である。 The semiconductor device 100b of FIG. 3 is different from the semiconductor device 100a of FIG. 1 in the following points.

図3の半導体装置100bの信号線P10は、電流測定回路20、基準電圧生成回路30、及び電圧比較回路40に接続される。すなわち、スリープ信号S10によって、電流測定回路20、基準電圧生成回路30、及び電圧比較回路40の3つが同時に制御される。なお、図1の半導体装置100aの信号線P10は、電流測定回路20に接続される。 The signal line P10 of the semiconductor device 100b of FIG. 3 is connected to the current measurement circuit 20, the reference voltage generation circuit 30, and the voltage comparison circuit 40. That is, the sleep signal S10 simultaneously controls the current measuring circuit 20, the reference voltage generating circuit 30, and the voltage comparing circuit 40. The signal line P10 of the semiconductor device 100a of FIG. 1 is connected to the current measuring circuit 20.

被診断回路10は、スリープモードになると、信号線P10を介して診断回路1の電流測定回路20、基準電圧生成回路30、及び電圧比較回路40にスリープ信号S10を出力する。それにより、電流測定回路20、基準電圧生成回路30、及び電圧比較回路40が動作する。 When the circuit to be diagnosed 10 enters the sleep mode, it outputs a sleep signal S10 to the current measuring circuit 20, the reference voltage generation circuit 30, and the voltage comparison circuit 40 of the diagnostic circuit 1 via the signal line P10. As a result, the current measurement circuit 20, the reference voltage generation circuit 30, and the voltage comparison circuit 40 operate.

一方、被診断回路10は、ノーマルモードになると、電流測定回路20、基準電圧生成回路30、及び電圧比較回路40にスリープ信号S10を出力しない。そのため、電流測定回路20、基準電圧生成回路30、及び電圧比較回路40は動作を停止する。その結果、図3の第2の実施の形態の半導体装置100bでは、図1の第1の実施の形態の半導体装置100aよりも、消費電力が低減される。 On the other hand, the diagnosed circuit 10 does not output the sleep signal S10 to the current measurement circuit 20, the reference voltage generation circuit 30, and the voltage comparison circuit 40 in the normal mode. Therefore, the current measurement circuit 20, the reference voltage generation circuit 30, and the voltage comparison circuit 40 stop their operations. As a result, the power consumption of the semiconductor device 100b of the second embodiment shown in FIG. 3 is lower than that of the semiconductor device 100a of the first embodiment shown in FIG.

図4は、図3の本発明の第2の実施の形態に係る診断回路1を含む半導体装置100bの詳細な構成を示す回路図である。以下、図4の診断回路1を含む半導体装置100bについて図面を参照しながら説明する。   FIG. 4 is a circuit diagram showing a detailed configuration of a semiconductor device 100b including the diagnostic circuit 1 according to the second embodiment of the present invention in FIG. Hereinafter, a semiconductor device 100b including the diagnostic circuit 1 of FIG. 4 will be described with reference to the drawings.

図4の半導体装置100bが図2Aの半導体装置100aaと異なるのは以下の点である。 The semiconductor device 100b of FIG. 4 differs from the semiconductor device 100aa of FIG. 2A in the following points.

図4の半導体装置100bでは、図2Aの半導体装置100aaの基準電圧生成回路30の抵抗R30に代えて定電流源CC30が用いられる。また、基準電圧生成回路30がスイッチSW30を含む。スイッチSW30は、定電流源CC30と抵抗R31との間に接続される。スイッチSW30と抵抗R31との共通接続点は、電圧比較回路CMP40の反転入力端子(−)に接続される。なお、スイッチSW30には、例えば、PMOSトランジスタ(Pチャネル型金属酸化物半導体電界効果トランジスタ)、バイポーラ形のPNPトランジスタ等が用いられてもよい。 In the semiconductor device 100b of FIG. 4, a constant current source CC30 is used instead of the resistor R30 of the reference voltage generation circuit 30 of the semiconductor device 100aa of FIG. 2A. Further, the reference voltage generation circuit 30 includes a switch SW30. The switch SW30 is connected between the constant current source CC30 and the resistor R31. The common connection point between the switch SW30 and the resistor R31 is connected to the inverting input terminal (−) of the voltage comparison circuit CMP40. For the switch SW30, for example, a PMOS transistor (P-channel type metal oxide semiconductor field effect transistor), a bipolar PNP transistor, or the like may be used.

図4の半導体装置100bでは、電圧比較回路40がスイッチSW40を含む。スイッチSW40は、電源端子VDDとコンパレータCMP40との間の電源供給経路に接続される。なお、スイッチSW40には、MOSトランジスタ、バイポーラトランジスタ等が用いられてもよい。 In the semiconductor device 100b of FIG. 4, the voltage comparison circuit 40 includes a switch SW40. The switch SW40 is connected to the power supply path between the power supply terminal VDD and the comparator CMP40. A MOS transistor, a bipolar transistor, or the like may be used as the switch SW40.

図4の半導体装置100bの診断回路1の信号線P10は、電流測定回路20のPMOSトランジスタQ20のゲートG、基準電圧生成回路30のスイッチSW30の制御端子、及び電圧比較回路40のスイッチSW40の制御端子に接続される。なお、図2Aの半導体装置100aaの診断回路1の信号線P10は、電流測定回路20のPMOSトランジスタQ20aaのゲートGに接続される。 The signal line P10 of the diagnostic circuit 1 of the semiconductor device 100b of FIG. 4 controls the gate G of the PMOS transistor Q20 of the current measurement circuit 20, the control terminal of the switch SW30 of the reference voltage generation circuit 30, and the switch SW40 of the voltage comparison circuit 40. Connected to the terminal. The signal line P10 of the diagnostic circuit 1 of the semiconductor device 100aa shown in FIG. 2A is connected to the gate G of the PMOS transistor Q20aa of the current measuring circuit 20.

被診断回路10は、スリープモードになると、信号線P10を介して電流測定回路20のPMOSトランジスタQ20のゲートG、基準電圧生成回路30のスイッチSW30の制御端子、及び電圧比較回路40のスイッチSW40の制御端子にスリープ信号S10を出力する。それにより、電流測定回路20のPMOSトランジスタQ20がオフ状態となり、基準電圧生成回路30のスイッチSW30がオン状態となり、電圧比較回路40のスイッチSW40がオン状態となる。すなわち、被診断回路10は、スリープモードになると、電流測定回路20、基準電圧生成回路30、及び電圧比較回路40が動作する。 When the circuit to be diagnosed 10 enters the sleep mode, the gate G of the PMOS transistor Q20 of the current measurement circuit 20, the control terminal of the switch SW30 of the reference voltage generation circuit 30, and the switch SW40 of the voltage comparison circuit 40 are connected via the signal line P10. The sleep signal S10 is output to the control terminal. As a result, the PMOS transistor Q20 of the current measuring circuit 20 is turned off, the switch SW30 of the reference voltage generation circuit 30 is turned on, and the switch SW40 of the voltage comparison circuit 40 is turned on. That is, when the circuit under diagnosis 10 enters the sleep mode, the current measurement circuit 20, the reference voltage generation circuit 30, and the voltage comparison circuit 40 operate.

一方、被診断回路10は、ノーマルモードになると、電流測定回路20のPMOSトランジスタQ20のゲートG、基準電圧生成回路30のスイッチSW30の制御端子、及び電圧比較回路40のスイッチSW40の制御端子にスリープ信号S10を出力しない。それにより、電流測定回路20のPMOSトランジスタQ20がオン状態となり、基準電圧生成回路30のスイッチSW30がオフ状態となり、電圧比較回路40のスイッチSW40がオフ状態となる。すなわち、電流測定回路20、基準電圧生成回路30、及び電圧比較回路40は動作を停止する。 On the other hand, in the normal mode, the diagnosed circuit 10 sleeps on the gate G of the PMOS transistor Q20 of the current measuring circuit 20, the control terminal of the switch SW30 of the reference voltage generation circuit 30, and the control terminal of the switch SW40 of the voltage comparison circuit 40. The signal S10 is not output. As a result, the PMOS transistor Q20 of the current measuring circuit 20 is turned on, the switch SW30 of the reference voltage generation circuit 30 is turned off, and the switch SW40 of the voltage comparison circuit 40 is turned off. That is, the current measurement circuit 20, the reference voltage generation circuit 30, and the voltage comparison circuit 40 stop their operations.

以上のように、被診断回路10は、ノーマルモードになると電流測定回路20、基準電圧生成回路30、及び電圧比較回路40の動作を停止させる。そのため、図4の第2の実施の形態の半導体装置100bでは、図2Aの第1の実施の形態の半導体装置100aaよりも、消費電力が低減される。 As described above, the circuit to be diagnosed 10 stops the operations of the current measurement circuit 20, the reference voltage generation circuit 30, and the voltage comparison circuit 40 when in the normal mode. Therefore, the power consumption of the semiconductor device 100b of the second embodiment of FIG. 4 is lower than that of the semiconductor device 100aa of the first embodiment of FIG. 2A.

なお、第2の実施の形態において、被診断回路10がスリープ信号S10を生成するためには、被診断回路10内の図示しないスリープ信号生成回路にスリープ信号S10を生成するに足りる電力を供給する必要がある。このスリープ信号S10を安定的に出力させるために、被診断回路10内の図示しないスリープ信号生成回路は直接電源端子VDD又は接地端子GNDに接続されてもよい。この構成は、本発明の趣旨を逸脱するものではない。 In the second embodiment, in order for the circuit to be diagnosed 10 to generate the sleep signal S10, the sleep signal generating circuit (not shown) in the circuit to be diagnosed 10 is supplied with sufficient power to generate the sleep signal S10. There is a need. In order to stably output the sleep signal S10, a sleep signal generation circuit (not shown) in the circuit to be diagnosed 10 may be directly connected to the power supply terminal VDD or the ground terminal GND. This configuration does not depart from the gist of the present invention.

(第3の実施の形態)
図5は、本発明の第3の実施の形態に係る診断回路1を含む半導体装置100cの構成を示すブロック図である。以下、図5の診断回路1を含む半導体装置100cについて図面を参照しながら説明する。
(Third Embodiment)
FIG. 5 is a block diagram showing the configuration of a semiconductor device 100c including the diagnostic circuit 1 according to the third embodiment of the present invention. Hereinafter, a semiconductor device 100c including the diagnostic circuit 1 of FIG. 5 will be described with reference to the drawings.

図5の半導体装置100cが図3の半導体装置100bと異なるのは以下の点である。 The semiconductor device 100c of FIG. 5 is different from the semiconductor device 100b of FIG. 3 in the following points.

図5の半導体装置100cには、スリープ端子T2が設けられ、半導体装置100cの外部からスリープ端子T2に外部スイッチSW1が接続される。外部スイッチSW1によりスリープモード機能のオンオフ状態を切り替えることが可能となる。なお、図3の半導体装置100bの被診断回路10は、電源電圧Vddの供給開始から一定期間、スリープモード機能によりスリープモードとなる。 A sleep terminal T2 is provided in the semiconductor device 100c of FIG. 5, and an external switch SW1 is connected to the sleep terminal T2 from outside the semiconductor device 100c. The external switch SW1 makes it possible to switch the on / off state of the sleep mode function. Note that the circuit to be diagnosed 10 of the semiconductor device 100b in FIG. 3 enters the sleep mode by the sleep mode function for a certain period after the supply of the power supply voltage Vdd is started.

図5の半導体装置100cにおいては、図示しない外部の回路が外部スイッチSW1を制御することにより任意のタイミングで被診断回路10のスリープモード機能のオンオフ状態を切り替えることができる。そのため、任意のタイミングで被診断回路10の診断を行うことができる。また、外部の回路構成によっては、被診断回路10の診断の頻度を調整することが可能になる。さらに、被診断回路10のスリープモード機能をオフにすることにより、何度も被診断回路10の診断が行われないように制御することが可能となる。 In the semiconductor device 100c of FIG. 5, an external circuit (not shown) controls the external switch SW1 to switch the sleep mode function of the circuit under diagnosis 10 between on and off at an arbitrary timing. Therefore, the circuit to be diagnosed 10 can be diagnosed at any timing. In addition, depending on the external circuit configuration, it becomes possible to adjust the frequency of diagnosis of the circuit to be diagnosed 10. Further, by turning off the sleep mode function of the circuit to be diagnosed 10, it is possible to control so that the circuit to be diagnosed 10 is not repeatedly diagnosed.

なお、スリープモード機能と診断機能とが分離され、図示しないスリープモード機能用スリープ端子及び端子スイッチと図示しない診断機能用スリープ端子及び端子スイッチとが設けられ、スリープモード用機能端子スイッチのみが有効となるスイッチ状態になったときにスリープ信号S10が電流測定回路のみに供給されるようにし、診断機能用端子スイッチ及びスリープモード用機能端子スイッチの双方が有効となるスイッチ状態になったときにのみ診断用の信号が基準電圧生成回路30及び電圧比較回路40に供給されるようにしてもよい。この場合、スリープモード時の消費電力がより低減される。 The sleep mode function and the diagnostic function are separated, and a sleep mode function sleep terminal and terminal switch (not shown) and a diagnostic function sleep terminal and terminal switch (not shown) are provided, and only the sleep mode function terminal switch is effective. The sleep signal S10 is supplied only to the current measuring circuit when the switch state becomes such that the diagnosis function terminal switch and the sleep mode function terminal switch are both activated when the switch state becomes effective. May be supplied to the reference voltage generation circuit 30 and the voltage comparison circuit 40. In this case, the power consumption in the sleep mode is further reduced.

なお、第3の実施の形態において、被診断回路10がスリープ信号S10を生成するためには、被診断回路10内の図示しないスリープ信号生成回路にスリープ信号S10を生成するに足りる電力を供給する必要がある。このスリープ信号S10を安定的に出力させるために、被診断回路10内の図示しないスリープ信号生成回路は直接電源端子VDD又は接地端子GNDに接続されてもよい。この構成は、本発明の趣旨を逸脱するものではない。 In the third embodiment, in order for the circuit to be diagnosed 10 to generate the sleep signal S10, the sleep signal generation circuit (not shown) in the circuit to be diagnosed 10 is supplied with sufficient power to generate the sleep signal S10. There is a need. In order to stably output the sleep signal S10, a sleep signal generation circuit (not shown) in the circuit to be diagnosed 10 may be directly connected to the power supply terminal VDD or the ground terminal GND. This configuration does not depart from the gist of the present invention.

(第4の実施の形態)
図6は、本発明の第4の実施の形態に係る診断回路1を含む半導体装置100dの構成を示すブロック図である。以下、図6の診断回路1を含む半導体装置100dについて図面を参照しながら説明する。
(Fourth Embodiment)
FIG. 6 is a block diagram showing the configuration of a semiconductor device 100d including the diagnostic circuit 1 according to the fourth embodiment of the present invention. Hereinafter, a semiconductor device 100d including the diagnostic circuit 1 of FIG. 6 will be described with reference to the drawings.

図6の半導体装置100dが図3の半導体装置100bと異なるのは以下の点である。図6の半導体装置100dは、通信端子T3をさらに備え、被診断回路10は、通信回路12及びレジスタ13をさらに備える。 The semiconductor device 100d of FIG. 6 is different from the semiconductor device 100b of FIG. 3 in the following points. The semiconductor device 100d of FIG. 6 further includes a communication terminal T3, and the circuit to be diagnosed 10 further includes a communication circuit 12 and a register 13.

半導体装置100dの被診断回路10の通信回路12は、被診断回路10のレジスタ13に接続される。レジスタ13には、被診断回路10の通常のセッティングデータに加え、スリープ機能のオンオフ状態に関するセッティングデータが格納される。被診断回路10の通信回路12は、半導体装置100dの通信端子T3に接続される。半導体装置100dの通知端子T1及び通信端子T3は、それぞれ半導体装置100dの外部のマイコン200の各端子に接続される。半導体装置100dは、被診断回路10がスリープモードになると被診断回路10の診断を行い、その診断結果を通知信号S40としてマイコン200へ出力する。 The communication circuit 12 of the circuit under test 10 of the semiconductor device 100d is connected to the register 13 of the circuit under test 10. In addition to the normal setting data of the circuit to be diagnosed 10, the register 13 stores setting data regarding the on / off state of the sleep function. The communication circuit 12 of the circuit to be diagnosed 10 is connected to the communication terminal T3 of the semiconductor device 100d. The notification terminal T1 and the communication terminal T3 of the semiconductor device 100d are connected to the respective terminals of the microcomputer 200 outside the semiconductor device 100d. The semiconductor device 100d diagnoses the circuit to be diagnosed 10 when the circuit to be diagnosed 10 enters the sleep mode, and outputs the diagnosis result to the microcomputer 200 as a notification signal S40.

マイコン200は、半導体装置100dの通知端子T3を介して、例えば、SPI(Serial Peripheral Interface)通信、IIC(Inter Integrated Circuit)通信、SENT(Single−Edge Nibble Transmission)通信等により被診断回路10のスリープモード機能のオンオフのセッティングデータを被診断回路10の通信回路12を介して被診断回路10のレジスタ13に格納する。SPI通信とは、同期式シリアル通信の一つである。マイコン200は、レジスタ13に格納するセッティングデータにより被診断回路10のスリープモード機能のオンオフ状態を制御する。また、マイコン200は、電源IC300に接続され、電源IC300を制御する。 The microcomputer 200, via the notification terminal T3 of the semiconductor device 100d, for example, SPI (Serial Peripheral Interface) communication, IIC (Inter Integrated Circuit) communication, SENT (Single-Edge Nibble Transmission) communication of the circuit to be diagnosed 10 of the diagnosis circuit 10 and the like. The setting data of ON / OFF of the mode function is stored in the register 13 of the circuit under diagnosis 10 via the communication circuit 12 of the circuit under diagnosis 10. SPI communication is one of synchronous serial communication. The microcomputer 200 controls the on / off state of the sleep mode function of the circuit to be diagnosed 10 according to the setting data stored in the register 13. Further, the microcomputer 200 is connected to the power supply IC 300 and controls the power supply IC 300.

電源IC300は、半導体装置100dの電源端子VDDに接続され、半導体装置100dに電力を供給する。 The power supply IC 300 is connected to the power supply terminal VDD of the semiconductor device 100d and supplies power to the semiconductor device 100d.

被診断回路10の内部の回路素子に構造不良が存在すると判定された場合には、マイコン200は、電源IC300を制御し、半導体装置100dへの電力の供給を停止させる。一方、回路素子の構造が正常であると判定された場合には、マイコン200は、半導体装置100dが正常に動作するように電源IC300を制御し、電力を供給させる。 When it is determined that the circuit element inside the circuit to be diagnosed 10 has a structural defect, the microcomputer 200 controls the power supply IC 300 to stop the supply of power to the semiconductor device 100d. On the other hand, when it is determined that the structure of the circuit element is normal, the microcomputer 200 controls the power supply IC 300 so that the semiconductor device 100d operates normally and supplies power.

以上のように、被診断回路10に通信回路12が存在する場合には、半導体装置100dの診断のタイミングをマイコン200により制御することが可能である。それにより、任意のタイミングで被診断回路10のスリープモード機能のオンオフ状態を切り替え、被診断回路10の診断を行うことができる。また、被診断回路10の診断の頻度を調整することが可能になる。さらに、被診断回路10のスリープモード機能をオフにすることにより、何度も被診断回路10の診断が行われないように制御することが可能となる。 As described above, when the circuit to be diagnosed 10 includes the communication circuit 12, the timing of diagnosis of the semiconductor device 100d can be controlled by the microcomputer 200. As a result, the sleep mode function of the circuit to be diagnosed 10 can be switched on and off at an arbitrary timing to diagnose the circuit to be diagnosed 10. Further, it becomes possible to adjust the frequency of diagnosis of the circuit to be diagnosed 10. Further, by turning off the sleep mode function of the circuit to be diagnosed 10, it is possible to control so that the circuit to be diagnosed 10 is not repeatedly diagnosed.

なお、スリープモード機能と診断機能とが分離され、レジスタ13にスリープモード機能用ビットと診断機能用ビットとが設けられ、スリープモード機能用ビットが所定の値である場合に、スリープ信号S10が電流測定回路のみに供給されるようにし、スリープモード機能用ビット及び診断機能用ビットの双方が所定の値である場合にのみ診断用の信号が基準電圧生成回路30及び電圧比較回路40に供給されるようにしてもよい。この場合、スリープモード時の消費電力がより低減される。 Note that the sleep mode function and the diagnostic function are separated, the sleep mode function bit and the diagnostic function bit are provided in the register 13, and when the sleep mode function bit has a predetermined value, the sleep signal S10 is a current. The signal for diagnosis is supplied only to the measurement circuit, and the signal for diagnosis is supplied to the reference voltage generation circuit 30 and the voltage comparison circuit 40 only when both the sleep mode function bit and the diagnosis function bit have predetermined values. You may do it. In this case, the power consumption in the sleep mode is further reduced.

なお、電圧比較回路40の通知信号S40が被診断回路10の通信回路12に入力され、通信回路12がマイコン200に被診断回路10の診断結果を通知するようにしてもよい。この場合、通知端子T1が不要となる。また、被診断回路10の診断結果がマイコン200に通知された際に、マイコン200が通信端子T3を介して被診断回路10の動作を停止させるようにしてもよい。 The notification signal S40 of the voltage comparison circuit 40 may be input to the communication circuit 12 of the circuit to be diagnosed 10, and the communication circuit 12 may notify the microcomputer 200 of the diagnosis result of the circuit to be diagnosed 10. In this case, the notification terminal T1 becomes unnecessary. Further, when the diagnosis result of the circuit to be diagnosed 10 is notified to the microcomputer 200, the microcomputer 200 may stop the operation of the circuit to be diagnosed 10 via the communication terminal T3.

なお、第4の実施の形態において、被診断回路10がスリープ信号S10を生成するためには、被診断回路10内の図示しないスリープ信号生成回路にスリープ信号S10を生成するに足りる電力を供給する必要がある。このスリープ信号S10を安定的に出力させるために、被診断回路10内の図示しないスリープ信号生成回路は直接電源端子VDD又は接地端子GNDに接続されてもよい。この構成は、本発明の趣旨を逸脱するものではない。 In the fourth embodiment, in order for the circuit to be diagnosed 10 to generate the sleep signal S10, the sleep signal generating circuit (not shown) in the circuit to be diagnosed 10 is supplied with sufficient power to generate the sleep signal S10. There is a need. In order to stably output the sleep signal S10, a sleep signal generation circuit (not shown) in the circuit to be diagnosed 10 may be directly connected to the power supply terminal VDD or the ground terminal GND. This configuration does not depart from the gist of the present invention.

(第5の実施の形態)
図7は、本発明の第5の実施の形態に係る診断回路1を含む半導体装置100eの構成を示すブロック図である。以下、図7の診断回路1を含む半導体装置100eについて図面を参照しながら説明する。
(Fifth Embodiment)
FIG. 7 is a block diagram showing the configuration of a semiconductor device 100e including the diagnostic circuit 1 according to the fifth embodiment of the present invention. Hereinafter, a semiconductor device 100e including the diagnostic circuit 1 of FIG. 7 will be described with reference to the drawings.

図7の半導体装置100eが図3の半導体装置100bと異なるのは以下の点である。   The semiconductor device 100e of FIG. 7 differs from the semiconductor device 100b of FIG. 3 in the following points.

図7の半導体装置100eは、判定信号生成回路50を有する。被診断回路10は通常機能ブロック14及び安全対策機能ブロック15から構成される。診断回路1の電圧比較回路40の通知信号S40は、被診断回路10の安全対策機能ブロック15に出力される。安全対策機能ブロック15は、電圧比較回路40からの通知信号S40に応じて動作し、通常機能ブロック14を制御する。安全対策機能ブロック15は、通常機能ブロック14の制御結果を制御結果信号S11として判定信号生成回路50に出力する。判定信号生成回路50は、制御結果信号S11に応じた判定結果を判定信号S50として通知端子T1に出力する。 The semiconductor device 100e of FIG. 7 includes a determination signal generation circuit 50. The circuit to be diagnosed 10 is composed of a normal function block 14 and a safety measure function block 15. The notification signal S40 of the voltage comparison circuit 40 of the diagnosis circuit 1 is output to the safety countermeasure function block 15 of the circuit to be diagnosed 10. The safety measure function block 15 operates according to the notification signal S40 from the voltage comparison circuit 40, and controls the normal function block 14. The safety measure function block 15 outputs the control result of the normal function block 14 to the determination signal generation circuit 50 as a control result signal S11. The determination signal generation circuit 50 outputs the determination result according to the control result signal S11 to the notification terminal T1 as the determination signal S50.

被診断回路10の診断結果が正常である場合には、安全対策機能ブロック15は、被診断回路10が正常である旨の制御結果信号S11を生成し、判定信号生成回路50に出力する。判定信号生成回路50は、被診断回路10が正常である旨の判定信号S50を生成し、通知端子T1に出力する。 When the diagnosis result of the circuit to be diagnosed 10 is normal, the safety countermeasure function block 15 generates the control result signal S11 indicating that the circuit to be diagnosed 10 is normal, and outputs it to the determination signal generation circuit 50. The determination signal generation circuit 50 generates the determination signal S50 indicating that the circuit under diagnosis 10 is normal, and outputs it to the notification terminal T1.

被診断回路10の診断結果が異常である場合には、安全対策機能ブロック15は、被診断回路10の通常機能ブロック14に安全対策処理を施す。安全対策処理とは、具体的には、通常機能ブロック14の動作を停止させる、通常機能ブロック14の論理レベルを固定する、通常機能ブロック14への電力供給を停止させる等である。その後、安全対策機能ブロック15は、通常機能ブロック14から安全対策処理が完了したことを示す信号を受け取るか電圧比較回路40から被診断回路10が正常であることを示す通知信号S40を受け取ると、通常機能ブロック14に安全対策処理を施した旨の制御結果信号S11を生成し、判定信号生成回路50に出力する。判定信号生成回路50は、通常機能ブロック14に安全対策処理を施した旨の判定信号S50を生成し、通知端子T1に出力する。 When the diagnosis result of the circuit to be diagnosed 10 is abnormal, the safety measure function block 15 performs the safety measure process on the normal function block 14 of the circuit to be diagnosed 10. Specifically, the safety countermeasure process is to stop the operation of the normal function block 14, fix the logic level of the normal function block 14, stop the power supply to the normal function block 14, and the like. After that, when the safety measure function block 15 receives a signal indicating that the safety measure process is completed from the normal function block 14 or a notification signal S40 indicating that the circuit under diagnosis 10 is normal from the voltage comparison circuit 40, A control result signal S11 indicating that the safety measure processing has been performed on the normal function block 14 is generated and output to the determination signal generation circuit 50. The determination signal generation circuit 50 generates a determination signal S50 indicating that the normal function block 14 has been subjected to the safety countermeasure process, and outputs the determination signal S50 to the notification terminal T1.

被診断回路10の診断結果が異常である場合であって、安全対策機能ブロック15による被診断回路10の通常機能ブロック14の安全対策処理が不能である場合には、安全対策機能ブロック15は、通常機能ブロック14への安全対策処理が不能である旨の制御結果信号S11を生成し、判定信号生成回路50に出力する。判定信号生成回路50は、通常機能ブロック14への安全対策処理が不能である旨の判定信号S50を生成し、通知端子T1に出力する。ここで、安全対策処理が不能であるとは、例えば、安全対策処理が完了したことを示す信号が通常機能ブロック14から安全対策機能ブロック15に返ってこない場合、通常機能ブロック14の電力供給が停止されたにも関わらず被診断回路10の診断結果が異常である旨の通知信号S40が電圧比較回路40から安全対策機能ブロック15に出力されている場合等をいう。後者の場合は、安全対策機能ブロック15自体に構造不良が存在し、安全対策機能ブロック15の正常動作が担保されていないため、安全対策処理が不能であると判断されることになる。 When the diagnosis result of the circuit to be diagnosed 10 is abnormal and the safety measure processing of the normal function block 14 of the circuit to be diagnosed 10 by the safety measure function block 15 is impossible, the safety measure function block 15 The control result signal S11 indicating that the safety measure processing for the normal function block 14 cannot be performed is generated and output to the determination signal generation circuit 50. The determination signal generation circuit 50 generates a determination signal S50 indicating that the safety measure processing for the normal function block 14 is impossible, and outputs it to the notification terminal T1. Here, when the safety measure processing is impossible, for example, when the signal indicating that the safety measure processing is completed is not returned from the normal function block 14 to the safety measure function block 15, the power supply of the normal function block 14 is stopped. This is a case where the notification signal S40 indicating that the diagnosis result of the circuit to be diagnosed 10 is abnormal despite being stopped is output from the voltage comparison circuit 40 to the safety measure function block 15. In the latter case, there is a structural defect in the safety measure function block 15 itself, and the normal operation of the safety measure function block 15 is not ensured, so it is determined that the safety measure process is impossible.

なお、被診断回路10の診断結果が異常である場合に、安全対策機能ブロック15は、図示しないI/O回路への信号を遮断してもよい。また、安全対策機能ブロック15は、被診断回路10に接続される図示しない他の回路への信号をハイレベル又はローレベルの安全な論理レベルに固定するように制御してもよい。 When the diagnosis result of the circuit to be diagnosed 10 is abnormal, the safety countermeasure function block 15 may block the signal to the I / O circuit (not shown). Further, the safety countermeasure function block 15 may control signals to other circuits (not shown) connected to the circuit to be diagnosed 10 to be fixed to a safe logic level of high level or low level.

以上のように、被診断回路10に構造不良が存在する場合には、安全対策機能ブロック15が周囲の回路の動作を停止させることが可能になり、半導体装置100eに接続された他の回路の異常動作を防止することができる。また、被診断回路10の動作を止めるため、被診断回路の発熱等を防止することができる。 As described above, when the circuit to be diagnosed 10 has a structural defect, the safety measure functional block 15 can stop the operation of the peripheral circuits, and the safety measure function block 15 can stop the operation of other circuits connected to the semiconductor device 100e. It is possible to prevent abnormal operation. Moreover, since the operation of the circuit to be diagnosed 10 is stopped, heat generation or the like of the circuit to be diagnosed can be prevented.

図8は、図7の診断回路1を含む半導体装置100eの判定信号S50の一例を示すタイミングチャートである。判定信号生成回路50は、判定信号S50を三値レベルで出力されるように構成される。三値レベルの1つのレベルは低レベルLであり、例えば、0Vに設定される。三値レベルの2つのレベルは中間レベルであり、例えば、電源電圧vddの1/2の大きさに設定される。三値レベルの3つのレベルは高レベルであり、例えば、電源電圧vddと同じレベルに設定される。判定信号生成回路50から三値を出力する方法では、出力端子が1つで十分であるが中間レベルを生成する回路部が必要となる。以下、図8の診断回路1を含む半導体装置100eについて図7を参照しながら説明する。 FIG. 8 is a timing chart showing an example of the determination signal S50 of the semiconductor device 100e including the diagnostic circuit 1 of FIG. The determination signal generation circuit 50 is configured to output the determination signal S50 at a ternary level. One of the three levels is the low level L and is set to 0V, for example. The two levels of the ternary level are intermediate levels, and are set to, for example, half the power supply voltage vdd. The three levels of the ternary level are high levels, and are set to the same level as the power supply voltage vdd, for example. In the method of outputting three values from the determination signal generation circuit 50, one output terminal is sufficient, but a circuit unit for generating an intermediate level is required. Hereinafter, a semiconductor device 100e including the diagnostic circuit 1 of FIG. 8 will be described with reference to FIG.

図8のタイミングチャートにおいて、縦軸は判定信号S50の電圧Vを示し、横軸は時刻Tを示している。 In the timing chart of FIG. 8, the vertical axis represents the voltage V of the determination signal S50 and the horizontal axis represents the time T.

時刻T0から時刻T1にかけてのローレベルLは、被診断回路10の診断結果が正常であることを示している。この場合、判定信号S50の電圧は0Vである。時刻T1から時刻T2にかけての中間レベルMは、被診断回路10の診断結果は異常であり、通常機能ブロック14への安全対策処理が施されたことを示している。安全対策処理が施された場合とは、具体的には、通常機能ブロック14の動作を停止させる、通常機能ブロック14の論理レベルを固定する、通常機能ブロック14への電力供給を停止させる等により安全対策処理が完了したことを示す信号が通常機能ブロック14から安全対策処理ブロック15に返ってくる場合、通常機能ブロック14の電力供給が停止されたことにより通知信号S40の状態が正常に変化する場合等をいう。これらの場合、判定信号S50の電圧は電源電圧vddの1/2であるVdd/2に設定される。時刻T2以降のハイレベルは、被診断回路10の診断結果は異常であるとともに、安全対策機能ブロック15が通常機能ブロック14の安全対策処理も不能であることを示している。この場合、判定信号S50の電圧は電源電圧Vddと同じレベルである。ここで、時刻T2以降は、通常機能ブロック14及び安全対策機能ブロック15の両者が異常である状態を示す。 The low level L from time T0 to time T1 indicates that the diagnosis result of the circuit under diagnosis 10 is normal. In this case, the voltage of the determination signal S50 is 0V. The intermediate level M from the time T1 to the time T2 indicates that the diagnosis result of the circuit to be diagnosed 10 is abnormal and the normal function block 14 has been subjected to the safety measure process. When the safety measure process is performed, specifically, the operation of the normal function block 14 is stopped, the logic level of the normal function block 14 is fixed, the power supply to the normal function block 14 is stopped, and the like. When the signal indicating that the safety measure process is completed is returned from the normal function block 14 to the safety measure process block 15, the state of the notification signal S40 is normally changed because the power supply to the normal function block 14 is stopped. Refers to cases etc. In these cases, the voltage of the determination signal S50 is set to Vdd / 2 which is 1/2 of the power supply voltage vdd. The high level after the time T2 indicates that the diagnosis result of the circuit to be diagnosed 10 is abnormal and the safety countermeasure function block 15 cannot perform the safety countermeasure process of the normal function block 14. In this case, the voltage of the determination signal S50 is at the same level as the power supply voltage Vdd. Here, after time T2, both the normal function block 14 and the safety measure function block 15 are in an abnormal state.

以上のように、図8の判定信号S50の一例では、判定信号S50の3つのレベルの違いによって判定結果を区別する。このとき、図8に示す3つのレベルを生成する回路が必要となり、判定信号を受け取る側に3つのレベルを判定する回路が必要になる。 As described above, in the example of the determination signal S50 of FIG. 8, the determination result is distinguished by the difference in the three levels of the determination signal S50. At this time, a circuit for generating the three levels shown in FIG. 8 is required, and a circuit for determining the three levels is required on the side receiving the determination signal.

図9は、図7の診断回路1を含む半導体装置100eの判定信号S50を図8の三値レベルとは別の信号形態で出力させるタイミングチャートを示す。以下、図9の診断回路1を含む半導体装置100eについて図7を参照しながら説明する。 FIG. 9 shows a timing chart for outputting the determination signal S50 of the semiconductor device 100e including the diagnostic circuit 1 of FIG. 7 in a signal form different from the three-value level of FIG. Hereinafter, a semiconductor device 100e including the diagnostic circuit 1 of FIG. 9 will be described with reference to FIG.

図9のタイミングチャートにおいて、縦軸は判定信号S50の電圧Vを示し、横軸は時刻Tを示している。 In the timing chart of FIG. 9, the vertical axis represents the voltage V of the determination signal S50 and the horizontal axis represents the time T.

時刻T0から時刻T1にかけてのローレベルLは、被診断回路10の診断結果が正常であることを示している。この場合、判定信号S50の電圧はローレベルLである。時刻T1から時刻T2にかけてのハイレベルHとローレベルLが繰り返えされるパルス信号は、被診断回路10の診断結果が異常であり、安全対策機能ブロック15から通常機能ブロック14への安全対策処理が施されたことを示している。安全対策処理が施された場合とは、具体的には、通常機能ブロック14の動作を停止させる、通常機能ブロック14の論理レベルを固定する、通常機能ブロック14への電力供給を停止させる等により安全対策処理が完了したことを示す信号が通常機能ブロック14から安全対策処理ブロック15に返ってくる場合、通常機能ブロック14の電力供給が停止されたことにより通知信号S40の状態が正常に変化する場合等をいう。これらの場合、判定信号S50はパルス状である。時刻T2以降は、被診断回路10の診断結果は異常であり、安全対策機能ブロック15から通常機能ブロック14への安全対策処理も不能であることを示している。この場合、判定信号S50の電圧は高レベルHを保持する。ここで、時刻T2以降は、通常機能ブロック14及び安全対策機能ブロック15の両者が異常である状態を示す。 The low level L from time T0 to time T1 indicates that the diagnosis result of the circuit under diagnosis 10 is normal. In this case, the voltage of the determination signal S50 is low level L. The pulse signal in which the high level H and the low level L are repeated from the time T1 to the time T2 indicates that the diagnosis result of the circuit to be diagnosed 10 is abnormal, and the safety measure processing from the safety measure function block 15 to the normal function block 14 is performed. Has been applied. When the safety measure process is performed, specifically, the operation of the normal function block 14 is stopped, the logic level of the normal function block 14 is fixed, the power supply to the normal function block 14 is stopped, and the like. When the signal indicating that the safety measure processing is completed is returned from the normal function block 14 to the safety measure processing block 15, the state of the notification signal S40 is normally changed because the power supply to the normal function block 14 is stopped. Refers to cases etc. In these cases, the determination signal S50 has a pulse shape. After time T2, the diagnosis result of the circuit to be diagnosed 10 is abnormal, and the safety measure processing from the safety measure function block 15 to the normal function block 14 is also impossible. In this case, the voltage of the determination signal S50 holds the high level H. Here, after time T2, both the normal function block 14 and the safety measure function block 15 are in an abnormal state.

以上のように、図9の判定信号S50の一例では、一定レベルの又はパルス状の判定信号S50によって判定結果を区別する。それにより、図8に示す三値レベルを生成する回路は不要となる。しかし、パルス信号を生成する論理回路が必要となり、判定信号を受け取る側にパルス信号幅を測定する回路が必要となる。 As described above, in the example of the determination signal S50 of FIG. 9, the determination result is distinguished by the determination signal S50 having a constant level or a pulse shape. As a result, the circuit for generating the ternary level shown in FIG. 8 is unnecessary. However, a logic circuit that generates a pulse signal is required, and a circuit that measures the pulse signal width is required on the side that receives the determination signal.

なお、第5の実施の形態において、被診断回路10がスリープ信号S10を生成するためには、被診断回路10内の図示しないスリープ信号生成回路にスリープ信号S10を生成するに足りる電力を供給する必要がある。このスリープ信号S10を安定的に出力させるために、被診断回路10内の図示しないスリープ信号生成回路は直接電源端子VDD又は接地端子GNDに接続されてもよい。この構成は、本発明の趣旨を逸脱するものではない。 In the fifth embodiment, in order for the circuit to be diagnosed 10 to generate the sleep signal S10, the sleep signal generating circuit (not shown) in the circuit to be diagnosed 10 is supplied with sufficient power to generate the sleep signal S10. There is a need. In order to stably output the sleep signal S10, a sleep signal generation circuit (not shown) in the circuit to be diagnosed 10 may be directly connected to the power supply terminal VDD or the ground terminal GND. This configuration does not depart from the gist of the present invention.

(第6の実施の形態)
図10は、本発明の第6の実施の形態に係る診断回路1を含む半導体装置100fの構成を示すブロック図である。以下、図10の診断回路1を含む半導体装置100fについて図面を参照しながら説明する。
(Sixth Embodiment)
FIG. 10 is a block diagram showing the configuration of a semiconductor device 100f including the diagnostic circuit 1 according to the sixth embodiment of the present invention. A semiconductor device 100f including the diagnostic circuit 1 of FIG. 10 will be described below with reference to the drawings.

図10の半導体装置100fが図7の半導体装置100eと異なるのは以下の点である。 The semiconductor device 100f of FIG. 10 is different from the semiconductor device 100e of FIG. 7 in the following points.

図10の半導体装置100fでは、図7の半導体装置100eの通知端子T1に代えて通知端子T1a及び通知端子T1bの2つの端子が用いられる。判定信号生成回路50は、通知端子T1aに判定信号S50aを出力し、通知端子T1bに判定信号S50bを出力する。図10の半導体装置100fでは、判定信号S50a及び判定信号S50bが図8及び図9に示した判定信号とは別の形態で出力される。すなわち、判定信号S50a及び判定信号50bはハイレベル又はローレベルのいずれかで出力される。判定信号S50a及び判定信号S50bの2つの信号を用いて被診断回路10の3つの状態を通知端子T1a及び通知端子T1bに通知する。 In the semiconductor device 100f of FIG. 10, two terminals, a notification terminal T1a and a notification terminal T1b, are used instead of the notification terminal T1 of the semiconductor device 100e of FIG. The determination signal generation circuit 50 outputs the determination signal S50a to the notification terminal T1a and outputs the determination signal S50b to the notification terminal T1b. In the semiconductor device 100f of FIG. 10, the determination signal S50a and the determination signal S50b are output in a different form from the determination signals shown in FIGS. 8 and 9. That is, the determination signal S50a and the determination signal 50b are output at either a high level or a low level. The notification terminal T1a and the notification terminal T1b are notified of the three states of the circuit to be diagnosed 10 by using the two signals of the determination signal S50a and the determination signal S50b.

以上のように、図10の半導体装置100fでは、ハイレベル又はローレベルの2つの判定信号を用いて被診断回路10の3つの状態を表すため、通知端子が2つ設けられるが判定信号生成回路50の回路構成が容易になる。また、後述するように2つの判定信号をハイレベルまたはローレベルで出力するので、判定信号生成回路50の後段に接続される各種回路手段の選択が比較的容易になる。 As described above, in the semiconductor device 100f of FIG. 10, since two states of the circuit to be diagnosed 10 are represented by using two determination signals of high level or low level, two notification terminals are provided, but the determination signal generation circuit is provided. The circuit configuration of 50 becomes easy. Further, as will be described later, since two determination signals are output at high level or low level, selection of various circuit means connected to the subsequent stage of the determination signal generation circuit 50 becomes relatively easy.

図11は、図10の診断回路1を含む半導体装置100fの判定信号S50a,S50bの一例を示す。 FIG. 11 shows an example of the determination signals S50a and S50b of the semiconductor device 100f including the diagnostic circuit 1 of FIG.

被診断回路10の診断結果が正常状態である場合には、判定信号生成回路50は、ローレベルLの判定信号S50a及びローレベルLの判定信号S50bを生成し、通知端子T1a及び通知端子T1bにそれぞれ出力する。 When the diagnosis result of the circuit to be diagnosed 10 is normal, the determination signal generation circuit 50 generates the determination signal S50a of low level L and the determination signal S50b of low level L, and notifies the notification terminal T1a and the notification terminal T1b. Output each.

被診断回路10の診断結果が異常である場合であって、安全対策機能ブロック15により通常機能ブロック14への安全対策処理が施された場合には、判定信号生成回路50は、ローレベルLの判定信号S50a及びハイレベルHの判定信号S50bを生成する。ローレベルLの判定信号S50aを通知端子T1aに出力し、ハイレベルHの判定信号S50bを通知端子T1bに出力する。なお、安全対策処理が施された場合とは、具体的には、通常機能ブロック14の動作を停止させる、通常機能ブロック14の論理レベルを固定する、通常機能ブロック14への電力供給を停止させる等により安全対策処理が完了したことを示す信号が通常機能ブロック14から安全対策処理ブロック15に返ってくる場合、通常機能ブロック14の電力供給が停止されたことにより通知信号S40の状態が正常に変化する場合等をいう。 When the diagnosis result of the circuit to be diagnosed 10 is abnormal and the safety measure function block 15 performs the safety measure process on the normal function block 14, the determination signal generation circuit 50 outputs the low level L signal. The determination signal S50a and the determination signal S50b of high level H are generated. The low-level L determination signal S50a is output to the notification terminal T1a, and the high-level H determination signal S50b is output to the notification terminal T1b. In addition, when the safety measure process is performed, specifically, the operation of the normal function block 14 is stopped, the logic level of the normal function block 14 is fixed, and the power supply to the normal function block 14 is stopped. When a signal indicating that the safety measure process is completed is returned from the normal function block 14 to the safety measure process block 15 due to the above reasons, the power supply of the normal function block 14 is stopped, and the state of the notification signal S40 becomes normal. When changing, etc.

被診断回路10の診断結果が異常である場合であって、安全対策機能ブロック15が通常機能ブロック14への安全対策処理が不能である場合には、判定信号生成回路50は、ハイレベルHの判定信号S50a及びローレベルLの判定信号S50bを生成する。ハイレベルHの判定信号S50aを通知端子T1aに出力し、ローレベルLの判定信号S50bを通知端子T1bに出力する。こうした状態は、通常機能ブロック14及び安全対策機能ブロック15の両者が異常であることを示す。 When the diagnosis result of the circuit to be diagnosed 10 is abnormal and the safety measure function block 15 cannot perform the safety measure process on the normal function block 14, the determination signal generation circuit 50 outputs the high level H signal. The determination signal S50a and the low level L determination signal S50b are generated. The determination signal S50a of high level H is output to the notification terminal T1a, and the determination signal S50b of low level L is output to the notification terminal T1b. Such a state indicates that both the normal function block 14 and the safety measure function block 15 are abnormal.

なお、被診断回路10の診断結果が異常である場合であって、通常機能ブロック14への安全対策処理が不能である場合には、判定信号生成回路50は、ハイレベルHの判定信号S50a及びハイレベルHの判定信号S50bを生成し、ハイレベルHの判定信号S50aを通知端子T1aに出力し、ハイレベルHの判定信号S50bを通知端子T1bに出力するようにしてもよい。 In addition, when the diagnosis result of the circuit to be diagnosed 10 is abnormal and the safety measure process to the normal function block 14 is impossible, the determination signal generation circuit 50 outputs the determination signal S50a of high level H and The high-level H determination signal S50b may be generated, the high-level H determination signal S50a may be output to the notification terminal T1a, and the high-level H determination signal S50b may be output to the notification terminal T1b.

なお、第6の実施の形態において、被診断回路10がスリープ信号S10を生成するためには、被診断回路10内の図示しないスリープ信号生成回路にスリープ信号S10を生成するに足りる電力を供給する必要がある。このスリープ信号S10を安定的に出力させるために、被診断回路10内の図示しないスリープ信号生成回路は直接電源端子VDD又は接地端子GNDに接続されてもよい。この構成は、本発明の趣旨を逸脱するものではない。 In the sixth embodiment, in order for the circuit to be diagnosed 10 to generate the sleep signal S10, the sleep signal generating circuit (not shown) in the circuit to be diagnosed 10 is supplied with sufficient power to generate the sleep signal S10. There is a need. In order to stably output the sleep signal S10, a sleep signal generation circuit (not shown) in the circuit to be diagnosed 10 may be directly connected to the power supply terminal VDD or the ground terminal GND. This configuration does not depart from the gist of the present invention.

(第7の実施の形態)
図12は、本発明の第7の実施の形態に係る診断回路1を含む半導体装置100gの構成を示すブロック図である。診断回路として汎用性をもたせるため、被診断回路10は、半導体装置100gの内部ではなく、その外部に接続される。以下、図12の診断回路1を含む半導体装置100gについて図面を参照しながら説明する。
(Seventh embodiment)
FIG. 12 is a block diagram showing the configuration of a semiconductor device 100g including the diagnostic circuit 1 according to the seventh embodiment of the present invention. In order to have versatility as a diagnostic circuit, the circuit to be diagnosed 10 is connected not to the inside of the semiconductor device 100g but to the outside thereof. Hereinafter, a semiconductor device 100g including the diagnostic circuit 1 of FIG. 12 will be described with reference to the drawings.

図12の半導体装置100gが図1の半導体装置100aと異なるのは以下の点である。 The semiconductor device 100g of FIG. 12 differs from the semiconductor device 100a of FIG. 1 in the following points.

図12の半導体装置100gには、スリープ通知端子T4及び測定端子T5が外部端子として設けられる。また、被診断回路10のスリープ通知端子T4a及び測定端子T5aは、それぞれ半導体装置100gのスリープ通知端子T4及び測定端子T5に接続される。 The semiconductor device 100g of FIG. 12 is provided with a sleep notification terminal T4 and a measurement terminal T5 as external terminals. The sleep notification terminal T4a and the measurement terminal T5a of the circuit to be diagnosed 10 are connected to the sleep notification terminal T4 and the measurement terminal T5 of the semiconductor device 100g, respectively.

外部の被診断回路10により、スリープ信号S10がスリープ通知端子T4aから半導体装置100gのスリープ通知端子T4に入力されると、半導体装置100gの電源端子VDDから電流測定回路20、測定端子T5、及び測定端子T5aを介して被診断回路10に静止電流I20が流れる。 When the sleep signal S10 is input from the sleep notification terminal T4a to the sleep notification terminal T4 of the semiconductor device 100g by the external diagnosed circuit 10, the current measurement circuit 20, the measurement terminal T5, and the measurement from the power supply terminal VDD of the semiconductor device 100g. The quiescent current I20 flows through the circuit to be diagnosed 10 through the terminal T5a.

静止電流I20は、半導体装置100gの電流測定回路20で測定電圧V20に変換さる。測定電圧V20は電圧比較回路40にて基準電圧生成回路30で生成される基準電圧V30と比較される。測定電圧V20と基準電圧V30との比較結果に基づき、電圧比較回路40は通知端子T1に通知信号S40を出力する。電圧比較回路40は、例えば、測定電圧V20が基準電圧V30以上(V20≧V30)である場合にはハイレベルの通知信号S40を出力し、測定電圧V20が基準電圧V30よりも低い場合(V20<V30)には、ローレベルの通知信号S40を出力する。例えば、通知信号S40がローレベルである場合には、被診断回路10の内部の回路素子に構造不良が存在し、通知信号S40がハイレベルである場合には、被診断回路10の内部の回路素子に構造不良が存在しないとして正常異常判定がなされる。 The quiescent current I20 is converted into a measurement voltage V20 by the current measuring circuit 20 of the semiconductor device 100g. The measured voltage V20 is compared by the voltage comparison circuit 40 with the reference voltage V30 generated by the reference voltage generation circuit 30. Based on the comparison result between the measured voltage V20 and the reference voltage V30, the voltage comparison circuit 40 outputs the notification signal S40 to the notification terminal T1. For example, the voltage comparison circuit 40 outputs a high-level notification signal S40 when the measurement voltage V20 is equal to or higher than the reference voltage V30 (V20 ≧ V30), and when the measurement voltage V20 is lower than the reference voltage V30 (V20 < A low-level notification signal S40 is output to V30). For example, when the notification signal S40 is at a low level, there is a structural defect in the circuit element inside the circuit to be diagnosed 10, and when the notification signal S40 is at a high level, the circuit inside the circuit to be diagnosed 10 is present. A normal / abnormal determination is made on the assumption that there is no structural defect in the element.

また、電圧比較回路40にウインドコンパレータが用いられる場合には、基準電圧V30aと基準電圧V30bとの2つが用いられ、例えば、測定電圧V20が、V30b≦V20≦V30aであるとき被診断回路10は正常とし、V20<V30b、又はV20>V30aであるときは異常としてそれぞれ判定される。 Further, when the window comparator is used for the voltage comparison circuit 40, two of the reference voltage V30a and the reference voltage V30b are used. For example, when the measured voltage V20 is V30b ≦ V20 ≦ V30a, the diagnosis target circuit 10 is It is determined to be normal, and when V20 <V30b or V20> V30a, it is determined to be abnormal.

以上のように、図12の半導体装置100gでは、被診断回路10が外部から接続されるため、被診断回路10の交換が容易になる。また、被診断回路10を入れ替えることにより複数の被診断回路10の診断を行うことが可能となる。 As described above, in the semiconductor device 100g of FIG. 12, the circuit to be diagnosed 10 is connected from the outside, so that the circuit to be diagnosed 10 can be easily replaced. Further, by exchanging the circuits 10 to be diagnosed, it is possible to diagnose a plurality of circuits 10 to be diagnosed.

なお、第7の実施の形態において、被診断回路10がスリープ信号S10を生成するためには、被診断回路10内の図示しないスリープ信号生成回路にスリープ信号S10を生成するに足りる電力を供給する必要がある。このスリープ信号S10を安定的に出力させるために、被診断回路10内の図示しないスリープ信号生成回路は直接電源端子VDD又は接地端子GNDに接続されてもよい。この構成は、本発明の趣旨を逸脱するものではない。 In the seventh embodiment, in order for the circuit to be diagnosed 10 to generate the sleep signal S10, the sleep signal generating circuit (not shown) in the circuit to be diagnosed 10 is supplied with sufficient power to generate the sleep signal S10. There is a need. In order to stably output the sleep signal S10, a sleep signal generation circuit (not shown) in the circuit to be diagnosed 10 may be directly connected to the power supply terminal VDD or the ground terminal GND. This configuration does not depart from the gist of the present invention.

(第7の実施形態の具体例)
図13は、図12の本発明の第7の実施の形態に係る診断回路1を含む半導体装置100gの詳細な構成を示す回路図である。以下、図13の診断回路1を含む半導体装置100gについて図面を参照しながら説明する。
(Specific example of the seventh embodiment)
FIG. 13 is a circuit diagram showing a detailed configuration of a semiconductor device 100g including the diagnostic circuit 1 according to the seventh embodiment of the present invention in FIG. Hereinafter, a semiconductor device 100g including the diagnostic circuit 1 of FIG. 13 will be described with reference to the drawings.

図13の半導体装置100gが図1の半導体装置100aaと異なるのは以下の点である。 The semiconductor device 100g of FIG. 13 is different from the semiconductor device 100aa of FIG. 1 in the following points.

図13の半導体装置100gには、スリープ通知端子T4及び測定端子T5が外部端子として設けられる。また、被診断回路10のスリープ通知端子T4a及び測定端子T5aは、それぞれ半導体装置100gのスリープ通知端子T4及び測定端子T5に接続される。 The semiconductor device 100g of FIG. 13 is provided with a sleep notification terminal T4 and a measurement terminal T5 as external terminals. The sleep notification terminal T4a and the measurement terminal T5a of the circuit to be diagnosed 10 are connected to the sleep notification terminal T4 and the measurement terminal T5 of the semiconductor device 100g, respectively.

図13の半導体装置100gは、診断回路1を含む。診断回路1は、電流測定回路20、基準電圧生成回路30、及び電圧比較回路40を含む。   The semiconductor device 100g of FIG. 13 includes the diagnostic circuit 1. The diagnostic circuit 1 includes a current measurement circuit 20, a reference voltage generation circuit 30, and a voltage comparison circuit 40.

被診断回路10は、スリープモード機能及びタイマ11を有する。被診断回路10のスリープ通知端子T4a及び測定端子T5aは、半導体装置100gのスリープ通知端子T4及び測定端子T5にそれぞれ接続される。半導体装置100gの診断回路1の電流測定回路20は、PMOSトランジスタQ20及び抵抗R20を含む。被診断回路10は、スリープ通知端子T4a及び信号線P10を介して電流測定回路20のPMOSトランジスタQ20のゲートGに接続される。電流測定回路20のPMOSトランジスタQ20のソースSは、電源端子VDDに接続される。電流測定回路20のPMOSトランジスタのドレインDは、電圧比較回路40のコンパレータCMP40の非反転入力端子(+)に接続される。電流測定回路20の抵抗R20は、電源端子VDDと測定端子T5との間に接続される。電源端子VDDから電流測定回路20のPMOSトランジスタQ20及び測定端子T5を介して被診断回路10の電源端子である測定端子T5aに電源電圧Vddが供給される。 The circuit to be diagnosed 10 has a sleep mode function and a timer 11. The sleep notification terminal T4a and the measurement terminal T5a of the circuit to be diagnosed 10 are connected to the sleep notification terminal T4 and the measurement terminal T5 of the semiconductor device 100g, respectively. The current measuring circuit 20 of the diagnostic circuit 1 of the semiconductor device 100g includes a PMOS transistor Q20 and a resistor R20. The circuit to be diagnosed 10 is connected to the gate G of the PMOS transistor Q20 of the current measuring circuit 20 via the sleep notification terminal T4a and the signal line P10. The source S of the PMOS transistor Q20 of the current measuring circuit 20 is connected to the power supply terminal VDD. The drain D of the PMOS transistor of the current measuring circuit 20 is connected to the non-inverting input terminal (+) of the comparator CMP40 of the voltage comparing circuit 40. The resistor R20 of the current measurement circuit 20 is connected between the power supply terminal VDD and the measurement terminal T5. The power supply voltage Vdd is supplied from the power supply terminal VDD to the measurement terminal T5a which is the power supply terminal of the circuit to be diagnosed 10 through the PMOS transistor Q20 of the current measurement circuit 20 and the measurement terminal T5.

被診断回路10は、スリープモード機能によりスリープモードになると、スリープ端子T4a,T4及び信号線P10を介して診断回路1の電流測定回路20のPMOSトランジスタQ20のゲートGにスリープ信号S10を出力する。それにより、電流測定回路20のPMOSトランジスタQ20がオフ状態となる。その結果、電源端子VDDから電流測定回路20の抵抗R20、及び測定端子T5,T5aを介して被診断回路10に静止電流I20が流れる。ここで、被診断回路10の内部の回路素子に構造不良が存在した場合には、回路素子の構造が正常である場合とは異なる大きさの静止電流I20が流れる。電流測定回路20の抵抗R20により静止電流I20の大きさに応じた測定電圧V20が生成される。測定電圧V20は、電圧比較回路40のコンパレータCMP40の非反転入力端子(+)に出力される。 When the circuit to be diagnosed 10 enters the sleep mode by the sleep mode function, it outputs the sleep signal S10 to the gate G of the PMOS transistor Q20 of the current measuring circuit 20 of the diagnosis circuit 1 via the sleep terminals T4a and T4 and the signal line P10. As a result, the PMOS transistor Q20 of the current measuring circuit 20 is turned off. As a result, the quiescent current I20 flows from the power supply terminal VDD to the circuit to be diagnosed 10 through the resistor R20 of the current measuring circuit 20 and the measuring terminals T5 and T5a. Here, when there is a structural defect in the circuit element inside the circuit to be diagnosed 10, a quiescent current I20 having a magnitude different from that when the circuit element has a normal structure flows. The resistance R20 of the current measuring circuit 20 generates a measurement voltage V20 according to the magnitude of the quiescent current I20. The measurement voltage V20 is output to the non-inverting input terminal (+) of the comparator CMP40 of the voltage comparison circuit 40.

基準電圧生成回路30は、抵抗R30及び抵抗R31を含む。抵抗R30及び抵抗R31は、電源端子VDDと接地端子GNDとの間に直列に接続される。基準電圧生成回路30の抵抗R30と抵抗R31との共通接続点は、電圧比較回路40のコンパレータCMP40の反転入力端子(−)に接続される。基準電圧生成回路30の抵抗R30と抵抗R31との共通接続点の電圧が基準電圧V30として電圧比較回路40のコンパレータCMP40の反転入力端子(−)に与えられる。基準電圧生成回路30は抵抗で構成されたものを示したが、バンドギャップ電圧回路や、トランジスタ、ダイオード、抵抗、及び定電流源等の組み合わせにより構成されてもよい。 The reference voltage generation circuit 30 includes a resistor R30 and a resistor R31. The resistors R30 and R31 are connected in series between the power supply terminal VDD and the ground terminal GND. The common connection point of the resistors R30 and R31 of the reference voltage generation circuit 30 is connected to the inverting input terminal (−) of the comparator CMP40 of the voltage comparison circuit 40. The voltage at the common connection point between the resistor R30 and the resistor R31 of the reference voltage generation circuit 30 is supplied to the inverting input terminal (−) of the comparator CMP40 of the voltage comparison circuit 40 as the reference voltage V30. Although the reference voltage generation circuit 30 is shown to be configured by a resistor, it may be configured by a bandgap voltage circuit, a combination of a transistor, a diode, a resistor, a constant current source, or the like.

電圧比較回路40は、コンパレータCMP40を含む。コンパレータCMP40は、電源端子VDDに接続される。また、コンパレータCMP40の出力端子は、半導体装置100gの通知端子T1に接続される。コンパレータCMP40は、測定電圧V20と基準電圧V30とを比較し、比較結果に応じた通知信号S40を生成し、通知端子T1に出力する。電圧比較回路40は、例えば、測定電圧V20が基準電圧V30以上である場合にはハイレベルの通知信号を出力し、測定電圧V20が基準電圧V30よりも低い場合には、ローレベルの通知信号を出力する。電圧比較回路40はコンパレータCMP40の1段で構成されているが、図示しないコンパレータを2段用いてウインドコンパレータが構成されてもよい。 The voltage comparison circuit 40 includes a comparator CMP40. The comparator CMP40 is connected to the power supply terminal VDD. The output terminal of the comparator CMP40 is connected to the notification terminal T1 of the semiconductor device 100g. The comparator CMP40 compares the measured voltage V20 with the reference voltage V30, generates a notification signal S40 according to the comparison result, and outputs the notification signal S40 to the notification terminal T1. The voltage comparison circuit 40 outputs, for example, a high-level notification signal when the measurement voltage V20 is equal to or higher than the reference voltage V30, and outputs a low-level notification signal when the measurement voltage V20 is lower than the reference voltage V30. Output. Although the voltage comparison circuit 40 is configured by one stage of the comparator CMP40, a window comparator may be configured by using two stages of comparators (not shown).

以上のように、図13の第7の実施の形態の半導体装置100gの具体例では、被診断回路10がスリープモードになった際に、静止電流I20の大きさにより被診断回路10の内部の回路素子の構造不良を検出し、通知信号S40として通知端子T1に出力する。そのため、半導体集積回路に存在する比較的検出が難しい構造不良をより高精度に検出することが可能である。また、図13の半導体装置100gでは、被診断回路10が外部から接続されるため、被診断回路10の交換が容易になる。さらに、被診断回路10を入れ替えることにより複数の被診断回路10の診断を行うことが可能となる。 As described above, in the specific example of the semiconductor device 100g according to the seventh embodiment of FIG. 13, when the circuit to be diagnosed 10 is in the sleep mode, the internal circuit of the circuit to be diagnosed 10 is affected by the magnitude of the quiescent current I20. A structural defect of the circuit element is detected and output as a notification signal S40 to the notification terminal T1. Therefore, it is possible to detect a structural defect existing in the semiconductor integrated circuit, which is relatively difficult to detect, with higher accuracy. Further, in the semiconductor device 100g of FIG. 13, since the circuit under diagnosis 10 is connected from the outside, the circuit under diagnosis 10 can be easily replaced. Further, by exchanging the circuits to be diagnosed 10, it is possible to diagnose a plurality of circuits 10 to be diagnosed.

図13にはPMOSトランジスタQ20を用いたが、この替わりにバイポーラ形のPNPトランジスタを用いて被診断回路10に静止電流I20を供給するようにしてもよい。 Although the PMOS transistor Q20 is used in FIG. 13, a quiescent current I20 may be supplied to the circuit to be diagnosed 10 by using a bipolar PNP transistor instead.

また、PMOSトランジスタQ20又は図示しないPNPトランジスタを用いずにNMOSトランジスタ又はNPNトランジスタが用いられ、図2C、図2Dに示したように被診断回路10側から静止電流I20が流れるようにしてもよい。 Alternatively, instead of using the PMOS transistor Q20 or a PNP transistor (not shown), an NMOS transistor or an NPN transistor may be used, and the quiescent current I20 may flow from the circuit under test 10 side as shown in FIGS. 2C and 2D.

(第8の実施の形態)
図14は、本発明の第8の実施の形態に係る診断回路1を含む半導体装置100hの構成を示すブロック図である。半導体装置100hは電源レギュレータを含む。以下、半導体装置100hについて図面を参照しながら説明する。
(Eighth Embodiment)
FIG. 14 is a block diagram showing the configuration of a semiconductor device 100h including the diagnostic circuit 1 according to the eighth embodiment of the present invention. The semiconductor device 100h includes a power supply regulator. Hereinafter, the semiconductor device 100h will be described with reference to the drawings.

図14の半導体装置100hは、診断回路1、制御回路60、電源レギュレータDR、インバータINV、スイッチSW60、及びスイッチSW61を含む。したがって、半導体装置100hは診断回路1の他に各種の回路部を有していることで図1〜図14の半導体装置とは異なる。診断回路1は、電流測定回路20、基準電圧生成回路30、電圧比較回路40を含む。半導体装置100hには、電源端子VDD、接地端子GND、出力端子OUT、スリープ端子T4等の端子が設けられる。電源レギュレータDRは、被診断回路10の電源端子VCCすなわち、図13に示す測定端子T5aに相当する電源端子に電源電圧を供給するために用いられる。電源レギュレータDRは、リニアレギュレータであるシリーズレギュレータ、シャントレギュレータ等で構成される。なお、電源レギュレータの中には後述するスイッチングレギュレータも含まれる。電源レギュレータDRには電源電圧Vinが供給される。電源電圧Vinは、電流測定回路Vddに供給される電源電圧Vddとは別の電源経路を介して供給される。電源電圧Vinと電源電圧Vddとは、被診断回路10の回路機能によっては同じ大きさである場合もあり異なる場合もある。出力電圧Voutは、電源電圧電源レギュレータDRの出力から取り出される。電源レギュレータDRがリニアレギュレータで構成された場合には、出力電圧Voutは電源電圧Vinよりも小さく、Vout<Vinの関係になる。   The semiconductor device 100h in FIG. 14 includes a diagnostic circuit 1, a control circuit 60, a power supply regulator DR, an inverter INV, a switch SW60, and a switch SW61. Therefore, the semiconductor device 100h is different from the semiconductor device of FIGS. 1 to 14 in that it has various circuit parts in addition to the diagnostic circuit 1. The diagnostic circuit 1 includes a current measurement circuit 20, a reference voltage generation circuit 30, and a voltage comparison circuit 40. The semiconductor device 100h is provided with terminals such as a power supply terminal VDD, a ground terminal GND, an output terminal OUT, and a sleep terminal T4. The power supply regulator DR is used to supply a power supply voltage to the power supply terminal VCC of the circuit to be diagnosed 10, that is, the power supply terminal corresponding to the measurement terminal T5a shown in FIG. The power regulator DR is composed of a linear regulator such as a series regulator and a shunt regulator. The power regulator also includes a switching regulator described later. The power supply voltage Vin is supplied to the power supply regulator DR. The power supply voltage Vin is supplied via a power supply path different from the power supply voltage Vdd supplied to the current measuring circuit Vdd. The power supply voltage Vin and the power supply voltage Vdd may be the same or different depending on the circuit function of the circuit to be diagnosed 10. The output voltage Vout is taken out from the output of the power supply voltage power supply regulator DR. When the power supply regulator DR is composed of a linear regulator, the output voltage Vout is smaller than the power supply voltage Vin and Vout <Vin.

スイッチSW61は、スイッチSW60と同様に、第1接点a及び第2接点bを有する。スイッチSW61の第1接点aは出力端子OUTに接続される。スイッチSW61の第2接点bは電源レギュレータDRの出力に接続される。被診断回路10がスリープモードであるときには、スイッチSW61の第1接点aと第2接点bとの接続は電気的に絶縁(オフ)される。それにより、被診断回路10に電源レギュレータDRの出力電圧Voutが印加されない。被診断回路10がノーマルモードであるときには、スイッチSW61の第1接点aと第2接点bとの接続は短絡(オン)される。それにより、被診断回路10に電源レギュレータDRの出力電圧Voutが印加される。   Like the switch SW60, the switch SW61 has a first contact a and a second contact b. The first contact a of the switch SW61 is connected to the output terminal OUT. The second contact b of the switch SW61 is connected to the output of the power regulator DR. When the circuit to be diagnosed 10 is in the sleep mode, the connection between the first contact a and the second contact b of the switch SW61 is electrically insulated (off). As a result, the output voltage Vout of the power supply regulator DR is not applied to the circuit to be diagnosed 10. When the circuit to be diagnosed 10 is in the normal mode, the connection between the first contact a and the second contact b of the switch SW61 is short-circuited (turned on). As a result, the output voltage Vout of the power supply regulator DR is applied to the circuit to be diagnosed 10.

スイッチSW60は、スイッチSW61と同様に、第1接点a及び第2接点bを有する。スイッチSW60の第1接点aは出力端子OUTに接続される。スイッチSW60の第2接点bは診断回路1の電流測定回路20に接続される。被診断回路10がスリープモードであるときには、スイッチSW60の第1接点aと第2接点bとの接続は電気的に短絡(オン)される。それにより、電源電圧Vddが電流測定回路20を介して被診断回路10に印加される。被診断回路10がノーマルモードであるときには、スイッチSW60の第1接点aと第2接点bとの接続は電気的に絶縁(オフ)される。それにより、電流測定回路20と被診断回路10との回路接続は遮断(オフ)される。なお、図13に示したように、電流測定回路20の具体的な回路構成は、トランジスタSW20と抵抗20とが並列された並列接続体でもよく、また抵抗R20単独で構成されてもかまわない。   Like the switch SW61, the switch SW60 has a first contact a and a second contact b. The first contact a of the switch SW60 is connected to the output terminal OUT. The second contact b of the switch SW60 is connected to the current measuring circuit 20 of the diagnostic circuit 1. When the circuit to be diagnosed 10 is in the sleep mode, the connection between the first contact a and the second contact b of the switch SW60 is electrically short-circuited (turned on). Thereby, the power supply voltage Vdd is applied to the circuit to be diagnosed 10 via the current measuring circuit 20. When the circuit to be diagnosed 10 is in the normal mode, the connection between the first contact a and the second contact b of the switch SW60 is electrically insulated (off). As a result, the circuit connection between the current measuring circuit 20 and the circuit to be diagnosed 10 is cut off (OFF). Note that, as shown in FIG. 13, the specific circuit configuration of the current measurement circuit 20 may be a parallel connection body in which the transistor SW20 and the resistor 20 are connected in parallel, or may be configured by the resistor R20 alone.

スイッチSW60は、例えば、制御信号S60がハイレベルのときにオンとなり、ローレベルのときにオフとなる。スイッチSW61は、例えば、制御信号S60がハイレベルのときにオフとなり、ローレベルのときにオンとなる。インバータINVは制御信号S60を反転する。制御信号S60がスイッチSW60に与えられ、インバータINVにより反転された信号がスイッチSW61に与えられる。それにより、スイッチSW60とスイッチSW61とが互いに相補的にオンオフする。すなわち、スイッチSW60がオンであるとき、スイッチSW61はオフになる。一方、スイッチSW61がオンであるときは、スイッチSW60はオフになる。なお、スイッチSW60とスイッチSW61の2つのスイッチの第1接点a同士は、出力端子OUTに共通に接続される。そのため、スイッチSW60及びスイッチSW61に代えて、これらの接点同士を共通接点とした1つの切替スイッチが用いられてもよい。   The switch SW60 is turned on when the control signal S60 is at a high level and turned off when it is at a low level, for example. The switch SW61 is turned off when the control signal S60 is at a high level, and turned on when the control signal S60 is at a low level, for example. The inverter INV inverts the control signal S60. The control signal S60 is given to the switch SW60, and the signal inverted by the inverter INV is given to the switch SW61. As a result, the switch SW60 and the switch SW61 are turned on and off complementarily to each other. That is, when the switch SW60 is on, the switch SW61 is off. On the other hand, when the switch SW61 is on, the switch SW60 is off. The first contacts a of the two switches SW60 and SW61 are commonly connected to the output terminal OUT. Therefore, instead of the switch SW60 and the switch SW61, one changeover switch having these contacts as a common contact may be used.

制御回路60は、電源レギュレータDR、スイッチSW60,SW61の制御端子、及び診断回路1の電流測定回路20に接続される。ここで、スイッチSW60の制御端子及びスイッチSW61の制御端子とは、例えば、これらのスイッチがMOSトランジスタ又はバイポーラトランジスタで構成されたときのそれぞれゲート又はベースに相当する。制御回路60は、被診断回路10からのスリープ信号S10により、被診断回路10をノーマルモードで動作させるか、又はスリープモードにして被診断回路10を診断し、その正常異常を判定するかを切り替える。   The control circuit 60 is connected to the power supply regulator DR, the control terminals of the switches SW60 and SW61, and the current measuring circuit 20 of the diagnostic circuit 1. Here, the control terminal of the switch SW60 and the control terminal of the switch SW61 correspond to, for example, a gate or a base when these switches are configured by MOS transistors or bipolar transistors, respectively. The control circuit 60 switches between operating the circuit to be diagnosed 10 in the normal mode or setting the sleep mode to the sleep mode to diagnose the circuit to be diagnosed 10 and to determine whether the circuit is normal or abnormal according to the sleep signal S10 from the circuit to be diagnosed 10. .

被診断回路10がノーマルモードのときには、制御信号S60により、スイッチSW60はオフされる。これにより、電流測定回路20の動作は停止される。このときに、スイッチSW61はスイッチSW60に対して相補的に動作するのでオンされる。そのため、電源レギュレータDRに供給される電源電圧Vinに基づき生成される出力電圧Voutは被診断回路10に供給される。 When the circuit to be diagnosed 10 is in the normal mode, the switch SW60 is turned off by the control signal S60. As a result, the operation of the current measuring circuit 20 is stopped. At this time, the switch SW61 operates in a complementary manner to the switch SW60, and thus is turned on. Therefore, the output voltage Vout generated based on the power supply voltage Vin supplied to the power supply regulator DR is supplied to the circuit to be diagnosed 10.

一方、被診断回路10がスリープモードのときには、制御信号S60により、スイッチSW60がオンにされる。これにより、被診断回路10に流れる静止電流I20は、電流測定回路20で測定電圧V20に変換される。このとき、スイッチSW61はオフされ、電源レギュレータDRに供給される電源電圧Vinに基づき生成される出力電圧Voutは、遮断され被診断回路10に供給されない。電圧比較回路40において、測定電圧V20と基準電圧生成回路30で生成される基準電圧V30とが比較され、比較結果に基づく通知信号S40が制御回路60に出力される。電圧比較回路40は、例えば、測定電圧V20が基準電圧V30以上(V20≧V30)である場合にはハイレベルの通知信号S40を出力し、測定電圧V20が基準電圧V30よりも低い場合(V20<V30)には、ローレベルの通知信号S40を出力する。通知信号S40が例えばローレベルである場合には、被診断回路10の内部の回路素子に構造不良が存在し、通知信号S40がハイレベルとなる場合には、被診断回路10の内部の回路素子に構造不良が存在しないとして正常異常判定がなされる。 On the other hand, when the circuit to be diagnosed 10 is in the sleep mode, the switch SW60 is turned on by the control signal S60. As a result, the quiescent current I20 flowing through the circuit to be diagnosed 10 is converted into the measurement voltage V20 by the current measuring circuit 20. At this time, the switch SW61 is turned off, and the output voltage Vout generated based on the power supply voltage Vin supplied to the power supply regulator DR is cut off and not supplied to the circuit to be diagnosed 10. In the voltage comparison circuit 40, the measurement voltage V20 is compared with the reference voltage V30 generated by the reference voltage generation circuit 30, and the notification signal S40 based on the comparison result is output to the control circuit 60. For example, the voltage comparison circuit 40 outputs a high-level notification signal S40 when the measurement voltage V20 is equal to or higher than the reference voltage V30 (V20 ≧ V30), and when the measurement voltage V20 is lower than the reference voltage V30 (V20 < A low-level notification signal S40 is output to V30). When the notification signal S40 is, for example, low level, there is a structural defect in the circuit element inside the circuit to be diagnosed 10. When the notification signal S40 is high level, the circuit element inside the circuit to be diagnosed 10 is present. It is determined that there is no structural failure in the normal / abnormal state.

半導体装置100hは、被診断回路10の診断結果が正常であり、被診断回路10のスリープモードが解除されると、被診断回路10をノーマルモードに移行又は遷移させる。一方、被診断回路10の診断結果が異常である場合には、被診断回路10への電力の供給を停止する。その結果、被診断回路10の構造不良による発熱等を防止することができる。   When the diagnosis result of the circuit under test 10 is normal and the sleep mode of the circuit under test 10 is released, the semiconductor device 100h shifts or transitions the circuit under test 10 to the normal mode. On the other hand, when the diagnosis result of the circuit to be diagnosed 10 is abnormal, the power supply to the circuit to be diagnosed 10 is stopped. As a result, it is possible to prevent heat generation and the like due to the structural failure of the circuit to be diagnosed 10.

図14では、リニアレギュレータが用いられた電源レギュレータDRが示されている。しかし、本発明に適用される診断回路の電源レギュレータは、リニアレギュレータに限らず、例えば、スイッチングレギュレータが適用されてもよい。 In FIG. 14, a power supply regulator DR using a linear regulator is shown. However, the power supply regulator of the diagnostic circuit applied to the present invention is not limited to the linear regulator, and for example, a switching regulator may be applied.

図15は、図14に示す本発明の第8の実施の形態に係る診断回路1を含む半導体装置100hの1つの変形である。以下、半導体装置100hについて図面を参照しながら説明する。   FIG. 15 is a modification of the semiconductor device 100h including the diagnostic circuit 1 according to the eighth embodiment of the present invention shown in FIG. Hereinafter, the semiconductor device 100h will be described with reference to the drawings.

図15の半導体装置100hは、診断回路1a、診断回路1b、制御回路60、スイッチングドライバDRa、スイッチングドライバDRb、スイッチSW60a、スイッチSW60bを含む。図15の半導体装置100hは、2組の診断回路1a及び1b、スイッチングドライバDRa及びDRb並びにスイッチSW60a及びスイッチSW60bを含むが、半導体装置100hが1組又は3組以上の診断回路、スイッチングドライバ及びスイッチを含んでもよい。診断回路1aは、電流測定回路20a、基準電圧生成回路30a、及び電圧比較回路40aを含む。診断回路1bは、電流測定回路20b、基準電圧生成回路30b、及び電圧比較回路40bを含む。半導体装置100hの外部にはインダクタLa、インダクタLb、キャパシタCa、キャパシタCb、被診断回路10a、及び被診断回路10bが接続される。なお、半導体装置100hには、電源端子VDD、接地端子GND、出力端子OUTa、出力端子OUTb、スリープ端子T4a、スリープ端子T4b等の端子等が設けられる。スイッチSW60a及びスイッチSW60bには、MOSトランジスタ、バイポーラトランジスタ等が用いられる。   The semiconductor device 100h of FIG. 15 includes a diagnostic circuit 1a, a diagnostic circuit 1b, a control circuit 60, a switching driver DRa, a switching driver DRb, a switch SW60a, and a switch SW60b. The semiconductor device 100h of FIG. 15 includes two sets of diagnostic circuits 1a and 1b, switching drivers DRa and DRb, and switches SW60a and switch SW60b, but the semiconductor device 100h includes one set or three or more sets of diagnostic circuits, switching drivers, and switches. May be included. The diagnostic circuit 1a includes a current measuring circuit 20a, a reference voltage generating circuit 30a, and a voltage comparing circuit 40a. The diagnostic circuit 1b includes a current measuring circuit 20b, a reference voltage generating circuit 30b, and a voltage comparing circuit 40b. An inductor La, an inductor Lb, a capacitor Ca, a capacitor Cb, a circuit under test 10a, and a circuit under test 10b are connected to the outside of the semiconductor device 100h. The semiconductor device 100h is provided with terminals such as a power supply terminal VDD, a ground terminal GND, an output terminal OUTa, an output terminal OUTb, a sleep terminal T4a, and a sleep terminal T4b. A MOS transistor, a bipolar transistor, or the like is used for the switch SW60a and the switch SW60b.

制御回路60は、スイッチングドライバDRa、スイッチSW20aの制御端子、及び診断回路1aの電流測定回路20aのスイッチSW20aに接続される。また、制御回路60は、スイッチングドライバDRb、スイッチSW60bの制御端子、及び診断回路1bの電流測定回路20bのスイッチSW20bに接続される。制御回路60は、被診断回路10aからのスリープ信号S10aにより、被診断回路10aをノーマル動作させるか被診断回路10aを診断するかを切り替える。また、制御回路60は、被診断回路10bからのスリープ信号S10bにより、被診断回路10bをノーマル動作させるか被診断回路10bを診断するかを切り替える。   The control circuit 60 is connected to the switching driver DRa, the control terminal of the switch SW20a, and the switch SW20a of the current measuring circuit 20a of the diagnostic circuit 1a. Further, the control circuit 60 is connected to the switching driver DRb, the control terminal of the switch SW60b, and the switch SW20b of the current measuring circuit 20b of the diagnostic circuit 1b. The control circuit 60 switches between normal operation of the circuit under test 10a and diagnosis of the circuit under test 10a according to the sleep signal S10a from the circuit under test 10a. Further, the control circuit 60 switches between normal operation of the circuit to be diagnosed 10b and diagnosis of the circuit to be diagnosed 10b according to the sleep signal S10b from the circuit to be diagnosed 10b.

被診断回路10aがノーマルモードである場合には、制御回路60は、制御信号S60aにより、電流測定回路20aのスイッチSW20aをオフ状態にするとともに、スイッチSW60aをオン状態にし、スイッチングドライバDRaを制御することにより、被診断回路10aをノーマル動作させる。スイッチSW20aとスイッチSW60aとは互いに相補的にオンオフする。被診断回路10aがスリープモードである場合には、制御回路60は、制御信号S60aにより、スイッチSW60aをオフ状態にし、スイッチングドライバDRaの動作を停止させるとともに、電流測定回路20aのスイッチSW20aをオフ状態にすることにより、被診断回路10aの診断を行う。   When the circuit to be diagnosed 10a is in the normal mode, the control circuit 60 sets the switch SW20a of the current measurement circuit 20a to the off state and the switch SW60a to the on state by the control signal S60a to control the switching driver DRa. As a result, the circuit under test 10a operates normally. The switch SW20a and the switch SW60a are turned on / off in a complementary manner. When the circuit to be diagnosed 10a is in the sleep mode, the control circuit 60 turns off the switch SW60a by the control signal S60a to stop the operation of the switching driver DRa and turns off the switch SW20a of the current measuring circuit 20a. By doing so, the diagnosis of the circuit to be diagnosed 10a is performed.

スイッチングドライバDRa及びスイッチSW60aは、制御回路60と出力端子OUTaとの間に直列に接続され、制御回路60からの信号に基づいて半導体装置100hの出力端子OUTaに接続される被診断回路10aを駆動する。なお、半導体装置100h内のスイッチングドライバDRaは、電源レギュレータの一例であるスイッチングレギュレータの一部を構成する電源電圧供給部である。   The switching driver DRa and the switch SW60a are connected in series between the control circuit 60 and the output terminal OUTa, and drive the diagnosis target circuit 10a connected to the output terminal OUTa of the semiconductor device 100h based on the signal from the control circuit 60. To do. The switching driver DRa in the semiconductor device 100h is a power supply voltage supply unit that forms a part of a switching regulator that is an example of a power supply regulator.

半導体装置100hの出力端子OUTaと被診断回路10aとの間には、インダクタLaが接続される。インダクタLaと接地端子GNDとの間にキャパシタCaが接続される。インダクタLa及びキャパシタCaにより平滑回路が構成される。インダクタLaとキャパシタCaとの共通接続点には直流電圧が生成される。この直流電圧は、被診断回路10aの電源端子VCC1に供給される。電源端子VCC1は、図13に示した測定端子T5aに相当する。なお、半導体装置100h内のスイッチングドライバDRaと半導体装置100hの外部に接続される平滑回路とによりスイッチングレギュレータが構成される。   An inductor La is connected between the output terminal OUTa of the semiconductor device 100h and the circuit to be diagnosed 10a. A capacitor Ca is connected between the inductor La and the ground terminal GND. The inductor La and the capacitor Ca form a smoothing circuit. A DC voltage is generated at the common connection point between the inductor La and the capacitor Ca. This DC voltage is supplied to the power supply terminal VCC1 of the circuit to be diagnosed 10a. The power supply terminal VCC1 corresponds to the measurement terminal T5a shown in FIG. A switching regulator is configured by the switching driver DRa in the semiconductor device 100h and a smoothing circuit connected to the outside of the semiconductor device 100h.

被診断回路10aは、スリープモード機能を有する。被診断回路10aは、スリープモード機能によりスリープモードになると、信号線P10a、及び半導体装置100hのスリープ通知端子T4aを介してスリープ信号S10aを制御回路60に出力する。 The circuit to be diagnosed 10a has a sleep mode function. When the circuit under test 10a enters the sleep mode by the sleep mode function, the circuit under test 10a outputs the sleep signal S10a to the control circuit 60 via the signal line P10a and the sleep notification terminal T4a of the semiconductor device 100h.

電流測定回路20aは、抵抗R20aとスイッチSW20aとから構成される。抵抗R20a及びスイッチSW20aは、電源端子VDDと半導体装置100hの出力端子OUTaとの間に直列に接続される。電流測定回路20aは、電源端子VDDから抵抗R20a、及び半導体装置100hの出力端子OUTaを介して被診断回路10aに流れる静止電流I20aの大きさに応じた測定電圧V20aを生成し、電圧比較回路40aに出力する。スイッチSW20aは、例えば、MOSトランジスタ、バイポーラトランジスタ等で構成される。   The current measuring circuit 20a includes a resistor R20a and a switch SW20a. The resistor R20a and the switch SW20a are connected in series between the power supply terminal VDD and the output terminal OUTa of the semiconductor device 100h. The current measurement circuit 20a generates a measurement voltage V20a corresponding to the magnitude of the quiescent current I20a flowing from the power supply terminal VDD to the circuit under test 10a via the resistor R20a and the output terminal OUTa of the semiconductor device 100h, and the voltage comparison circuit 40a. Output to. The switch SW20a is composed of, for example, a MOS transistor, a bipolar transistor, or the like.

基準電圧生成回路30aは、基準電圧源VREFaで構成され、電圧比較回路40aと接地端子GNDとの間に接続される。基準電圧生成回路30aは、基準電圧源VREFaにより、基準電圧V30aを生成し、電圧比較回路40aに出力する。 The reference voltage generation circuit 30a includes a reference voltage source VREFa and is connected between the voltage comparison circuit 40a and the ground terminal GND. The reference voltage generation circuit 30a generates a reference voltage V30a by the reference voltage source VREFa and outputs it to the voltage comparison circuit 40a.

電圧比較回路40aは、コンパレータCMP40aで構成される。コンパレータCMP40aの非反転入力端子(+)は、電流測定回路20aの抵抗R20aとスイッチSW20aとの共通接続点に接続される。コンパレータCMP40aの反転入力端子(−)は、基準電圧生成回路30aの基準電圧源VREFaに接続される。コンパレータCMP40aの出力端子は、制御回路60に接続される。電圧比較回路40aは、測定電圧V20aと基準電圧V30aとを比較し、比較結果に応じた通知信号S40aを生成し、制御回路60に出力する。電圧比較回路40aは、例えば、測定電圧V20aが基準電圧V30a以上である場合にはハイレベルの通知信号S40aを出力し、測定電圧V20aが基準電圧V30aよりも低い場合には、ローレベルの通知信号S40aを出力する。 The voltage comparison circuit 40a is composed of a comparator CMP40a. The non-inverting input terminal (+) of the comparator CMP40a is connected to the common connection point of the resistor R20a of the current measuring circuit 20a and the switch SW20a. The inverting input terminal (-) of the comparator CMP40a is connected to the reference voltage source VREFa of the reference voltage generation circuit 30a. The output terminal of the comparator CMP40a is connected to the control circuit 60. The voltage comparison circuit 40a compares the measurement voltage V20a with the reference voltage V30a, generates a notification signal S40a according to the comparison result, and outputs the notification signal S40a to the control circuit 60. The voltage comparison circuit 40a outputs, for example, a high-level notification signal S40a when the measurement voltage V20a is equal to or higher than the reference voltage V30a, and a low-level notification signal S40a when the measurement voltage V20a is lower than the reference voltage V30a. Outputs S40a.

半導体装置100hは、被診断回路10aの診断結果が正常であり、被診断回路10aのスリープモードが解除されると、被診断回路10aをノーマルモードで動作させる。一方、被診断回路10aの診断結果が異常と判定された場合には、被診断回路10aへの電力の供給を停止する。その結果、被診断回路10aの構造不良による発熱等を防止することができる。   When the diagnosis result of the circuit under test 10a is normal and the sleep mode of the circuit under test 10a is released, the semiconductor device 100h causes the circuit under test 10a to operate in the normal mode. On the other hand, when it is determined that the diagnosis result of the circuit to be diagnosed 10a is abnormal, the power supply to the circuit to be diagnosed 10a is stopped. As a result, it is possible to prevent heat generation and the like due to the structural failure of the circuit to be diagnosed 10a.

また、制御回路60は、被診断回路10bがスリープモードでない場合には、制御信号S60bにより、電流測定回路20bのスイッチSW20bをオフ状態にするとともに、スイッチSW60bをオン状態にし、スイッチングドライバDRbを制御することにより、被診断回路10bをノーマル動作させる。スイッチSW20bとスイッチSW60bとは互いに背反の関係を有する。一方、被診断回路10bがスリープモードである場合には、制御信号S60bにより、スイッチSW60bをオフ状態にし、スイッチングドライバDRbの動作を停止させるとともに、電流測定回路20bを制御することにより、被診断回路10bの診断を行う。   When the circuit under diagnosis 10b is not in the sleep mode, the control circuit 60 turns off the switch SW20b of the current measuring circuit 20b and turns on the switch SW60b by the control signal S60b to control the switching driver DRb. By doing so, the circuit to be diagnosed 10b is normally operated. The switch SW20b and the switch SW60b have an antithetical relationship with each other. On the other hand, when the circuit to be diagnosed 10b is in the sleep mode, the switch SW60b is turned off by the control signal S60b, the operation of the switching driver DRb is stopped, and the circuit to be diagnosed is controlled by controlling the current measuring circuit 20b. Diagnosis of 10b is performed.

スイッチングドライバDRb及びスイッチSW60bは、制御回路60と出力端子OUTbとの間に直列に接続され、制御回路60からの信号に基づいて半導体装置100hの出力端子OUTbに接続される被診断回路10bを駆動する。なお、半導体装置100h内のスイッチングドライバDRbは、電源レギュレータの一例であるスイッチングレギュレータの一部を構成する電源電圧供給部である。   The switching driver DRb and the switch SW60b are connected in series between the control circuit 60 and the output terminal OUTb, and drive the diagnosis target circuit 10b connected to the output terminal OUTb of the semiconductor device 100h based on the signal from the control circuit 60. To do. The switching driver DRb in the semiconductor device 100h is a power supply voltage supply unit that forms part of a switching regulator that is an example of a power supply regulator.

半導体装置100hの出力端子OUTbと被診断回路10bとの間には、インダクタLbが接続される。インダクタLbと接地端子GNDとの間にキャパシタCbが接続される。インダクタLb及びキャパシタCbにより平滑回路が構成される。インダクタLbとキャパシタCbとの共通接続点には直流電圧が生成される。この直流電圧は、被診断回路10bの電源端子VCC2に供給される。電源端子VCC2は、図13に示した測定端子T5aに相当する。なお、半導体装置100h内のスイッチングドライバDRbと半導体装置100hの外部に接続される平滑回路とによりスイッチングレギュレータが構成される。   The inductor Lb is connected between the output terminal OUTb of the semiconductor device 100h and the circuit to be diagnosed 10b. The capacitor Cb is connected between the inductor Lb and the ground terminal GND. A smoothing circuit is configured by the inductor Lb and the capacitor Cb. A DC voltage is generated at the common connection point between the inductor Lb and the capacitor Cb. This DC voltage is supplied to the power supply terminal VCC2 of the circuit to be diagnosed 10b. The power supply terminal VCC2 corresponds to the measurement terminal T5a shown in FIG. A switching regulator is configured by the switching driver DRb in the semiconductor device 100h and a smoothing circuit connected to the outside of the semiconductor device 100h.

被診断回路10bは、スリープモード機能を有する。被診断回路10bは、スリープモード機能によりスリープモードになると、信号線P10b、及び半導体装置100hのスリープ通知端子T4bを介してスリープ信号S10bを制御回路60に出力する。 The circuit to be diagnosed 10b has a sleep mode function. When the circuit under test 10b enters the sleep mode by the sleep mode function, the circuit under test 10b outputs the sleep signal S10b to the control circuit 60 via the signal line P10b and the sleep notification terminal T4b of the semiconductor device 100h.

電流測定回路20bは、抵抗R20bとスイッチSW20bとから構成される。抵抗R20b及びスイッチSW20bは、電源端子VDDと半導体装置100hの出力端子OUTbとの間に直列に接続される。電流測定回路20bは、電源端子VDDから抵抗R20b、及び半導体装置100hの出力端子OUTbを介して被診断回路10bに流れる静止電流I20bの大きさに応じた測定電圧V20bを生成し、電圧比較回路40bに出力する。スイッチSW20bは、例えば、MOSトランジスタ、バイポーラトランジスタ等が用いられてもよい。   The current measuring circuit 20b includes a resistor R20b and a switch SW20b. The resistor R20b and the switch SW20b are connected in series between the power supply terminal VDD and the output terminal OUTb of the semiconductor device 100h. The current measurement circuit 20b generates a measurement voltage V20b according to the magnitude of the quiescent current I20b flowing from the power supply terminal VDD to the circuit under test 10b via the resistor R20b and the output terminal OUTb of the semiconductor device 100h, and the voltage comparison circuit 40b. Output to. As the switch SW20b, for example, a MOS transistor, a bipolar transistor or the like may be used.

基準電圧生成回路30bは、基準電圧源VREFbから構成され、電圧比較回路40bと接地端子GNDとの間に接続される。基準電圧生成回路30bは、基準電圧源VREFbにより、基準電圧V30bを生成し、電圧比較回路40bに出力する。 The reference voltage generation circuit 30b includes a reference voltage source VREFb and is connected between the voltage comparison circuit 40b and the ground terminal GND. The reference voltage generation circuit 30b generates the reference voltage V30b by the reference voltage source VREFb and outputs it to the voltage comparison circuit 40b.

電圧比較回路40bは、コンパレータCMP40bから構成される。コンパレータCMP40bの非反転入力端子(+)は、電流測定回路20bの抵抗R20bとスイッチSW20bとの共通接続点に接続される。コンパレータCMP40bの反転入力端子(−)は、基準電圧生成回路30bの基準電圧源VREFbに接続される。コンパレータCMP40bの出力端子は、制御回路60に接続される。電圧比較回路40bは、測定電圧V20bと基準電圧V30bとを比較し、比較結果に応じた通知信号S40bを生成し、制御回路60に出力する。電圧比較回路40bは、例えば、測定電圧V20bが基準電圧V30b以上である場合にはローレベルの通知信号S40bを出力し、測定電圧V20bが基準電圧V30bよりも低い場合には、ハイレベルの通知信号S40bを出力する。 The voltage comparison circuit 40b is composed of a comparator CMP40b. The non-inverting input terminal (+) of the comparator CMP40b is connected to a common connection point between the resistor R20b of the current measuring circuit 20b and the switch SW20b. The inverting input terminal (−) of the comparator CMP40b is connected to the reference voltage source VREFb of the reference voltage generation circuit 30b. The output terminal of the comparator CMP40b is connected to the control circuit 60. The voltage comparison circuit 40b compares the measured voltage V20b with the reference voltage V30b, generates a notification signal S40b according to the comparison result, and outputs the notification signal S40b to the control circuit 60. The voltage comparison circuit 40b outputs, for example, a low-level notification signal S40b when the measurement voltage V20b is equal to or higher than the reference voltage V30b, and a high-level notification signal S40b when the measurement voltage V20b is lower than the reference voltage V30b. Outputs S40b.

半導体装置100hは、被診断回路10bの診断結果が正常であり、被診断回路10bのスリープモードが解除されると、被診断回路10bをノーマル動作させる。一方、被診断回路10bの診断結果が異常である場合には、被診断回路10bへの電力の供給を停止する。その結果、被診断回路10aの構造不良による発熱等を防止することができる。   When the diagnosis result of the circuit under test 10b is normal and the sleep mode of the circuit under test 10b is released, the semiconductor device 100h causes the circuit under test 10b to operate normally. On the other hand, when the diagnosis result of the circuit to be diagnosed 10b is abnormal, the power supply to the circuit to be diagnosed 10b is stopped. As a result, it is possible to prevent heat generation and the like due to the structural failure of the circuit to be diagnosed 10a.

以上のように、半導体装置100hは、複数の被診断回路10a及び被診断回路10bの制御と診断を行うことができる。なお、複数の被診断回路10a及び被診断回路10bの診断は、同時に行われても、別々に行われてもよい。 As described above, the semiconductor device 100h can control and diagnose the plurality of circuits 10a and 10b to be diagnosed. The plurality of circuits to be diagnosed 10a and the circuit to be diagnosed 10b may be diagnosed simultaneously or separately.

なお、上記の第1〜第8の実施の形態については、すべての構成を同時に適用してもよいし、必要な構成だけを独立に適用してもよい。また、本明細書中に開示されている種々の技術的特徴は、上記実施の形態の他、その技術的創作の趣旨を逸脱しない範囲で種々の変更を加えることが可能である。   In addition, about the said 1st-8th embodiment, all the structures may be applied simultaneously and only a required structure may be applied independently. Further, various technical features disclosed in this specification can be modified in various ways other than the above-described embodiment without departing from the spirit of the technical creation.

本発明は、半導体集積回路装置全般に利用することができる。そのため、本発明は、産業上の利用可能性は高い。   The present invention can be applied to all semiconductor integrated circuit devices. Therefore, the present invention has high industrial applicability.

1,1a,1b 診断回路
10,10a,10b 被診断回路
11 タイマ
12 通信回路
13 レジスタ
14 通常機能ブロック
15 安全対策機能ブロック
20,20a,20b 電流測定回路
30,30a,30b 基準電圧生成回路
40,40a,40b 電圧比較回路
50 判定信号生成回路
60 制御回路
90 負荷
100a,100b,100c,100d,100e,100f,100g,100h 半導体装置
200 マイコン
300 電源IC
C,Ca,Cb キャパシタ
CC30 定電流源
CMP40,CMP40a,CMP40b コンパレータ
D ドレイン
DR 電源レギュレータ
DRa,DRb スイッチングドライバ
G ゲート
GND 接地端子
I20 静止電流
L,La,Lb インダクタ
OUT,OUTa,OUTb 出力端子
Q20,Q20aa PMOSトランジスタ
Q20ab PNPトランジスタ
Q20ac NMOSトランジスタ
Q20ad NPNトランジスタ
P10,P10a,P10b 信号線
R20,R20a,R20b,R30,R31 抵抗
S ソース
S10,S10a,S10b スリープ信号
S11 制御結果信号
S40,S40a,S40b 通知信号
S50,S50a,S50b 判定信号
S60,S60a,S60b 制御信号
S100 出力信号
SW1,SW20a,SW20b,SW30,SW40,SW60,SW60a,SW60b スイッチ
T1,T1a,T1b 通知端子
T2 スリープ端子
T3 通信端子
T4,T4a,T4b スリープ通知端子
T5,T5a 測定端子
V20,V20a,V20b 測定電圧
V30,V30a,V30b 基準電圧
VDD 電源端子
Vdd,Vin 電源電圧
Vout,Vouta,Voutb 出力電圧
VREFa,VREFb 基準電圧源
1, 1a, 1b Diagnostic circuit 10, 10a, 10b Diagnostic circuit 11 Timer 12 Communication circuit 13 Register 14 Normal function block 15 Safety measure function block 20, 20a, 20b Current measuring circuit 30, 30a, 30b Reference voltage generation circuit 40, 40a, 40b Voltage comparison circuit 50 Judgment signal generation circuit 60 Control circuit 90 Load 100a, 100b, 100c, 100d, 100e, 100f, 100g, 100h Semiconductor device 200 Microcomputer 300 Power supply IC
C, Ca, Cb Capacitor CC30 Constant current source CMP40, CMP40a, CMP40b Comparator D Drain DR Power regulator DRa, DRb Switching driver G Gate GND Ground terminal I20 Quiescent current L, La, Lb Inductor OUT, OUTa, OUTb Output terminal Q20, Q20aa PMOS transistor Q20ab PNP transistor Q20ac NMOS transistor Q20ad NPN transistor P10, P10a, P10b Signal line R20, R20a, R20b, R30, R31 Resistance S source S10, S10a, S10b Sleep signal S11 Control result signal S40, S40a, S40b Notification signal S50, S50a, S50b Judgment signal S60, S60a, S60b Control signal S100 Output signal SW1, S W20a, SW20b, SW30, SW40, SW60, SW60a, SW60b Switches T1, T1a, T1b Notification terminal T2 Sleep terminal T3 Communication terminals T4, T4a, T4b Sleep notification terminal T5, T5a Measuring terminals V20, V20a, V20b Measuring voltage V30, V30a , V30b Reference voltage VDD Power supply terminal Vdd, Vin Power supply voltage Vout, Vouta, Voutb Output voltage VREFa, VREFb Reference voltage source

Claims (23)

ノーマルモードとスリープモードとに切替え可能な被診断回路に接続可能な半導体装置であって、
前記被診断回路が前記スリープモードであるときに前記被診断回路の静止電流を電圧に変換して出力する電流測定回路と、
前記電流測定回路から出力された前記電圧を所定の基準電圧と比較し、比較結果を前記被診断回路の正常及び異常を選択的に示す通知信号として出力する電圧比較回路と、
出力端子と、
電源レギュレータの一部又は全てを構成しかつ前記出力端子を介して前記被診断回路の電源端子に電源電圧を供給する電源電圧供給部と、
を有する半導体装置。
A semiconductor device that can be connected to a circuit under diagnosis that can be switched between a normal mode and a sleep mode,
A current measurement circuit that converts the quiescent current of the circuit under test into a voltage and outputs the voltage when the circuit under test is in the sleep mode;
A voltage comparison circuit that compares the voltage output from the current measurement circuit with a predetermined reference voltage, and outputs the comparison result as a notification signal that selectively indicates normality and abnormality of the circuit to be diagnosed,
Output terminal,
A power supply voltage supply unit that constitutes a part or all of a power supply regulator and supplies a power supply voltage to the power supply terminal of the circuit to be diagnosed via the output terminal;
A semiconductor device having.
前記半導体装置は、
前記電源電圧供給部と前記出力端子との間に接続される第1スイッチと、
前記電流測定回路と前記出力端子との間に接続され前記第1スイッチと相補的に動作する第2スイッチとを含み、
前記ノーマルモードのときには前記第1スイッチがオンされることにより前記電源電圧が前記被診断回路に供給され、前記スリープモードのときには前記第2スイッチがオンされることにより前記電流測定回路が前記被診断回路の静止電流を電圧に変換して出力する、請求項に記載の半導体装置。
The semiconductor device is
A first switch connected between the power supply voltage supply section and the output terminal;
A second switch connected between the current measuring circuit and the output terminal, the second switch operating complementarily to the first switch;
In the normal mode, the first switch is turned on to supply the power supply voltage to the circuit to be diagnosed, and in the sleep mode, the second switch is turned on to cause the current measuring circuit to perform the diagnosis. The semiconductor device according to claim 1 , wherein the quiescent current of the circuit is converted into a voltage and output.
前記半導体装置は、前記被診断回路がノーマルモードであるかスリープモードであるかを示すスリープ信号を前記被診断回路から受け、前記スリープ信号に基づいて前記第1スイッチ及び前記第2スイッチのオンオフを切り替える制御回路をさらに含む、請求項に記載の半導体装置。 The semiconductor device receives a sleep signal indicating whether the circuit under test is in a normal mode or a sleep mode from the circuit under test, and turns on / off the first switch and the second switch based on the sleep signal. The semiconductor device according to claim 2 , further comprising a switching control circuit. 前記電源電圧供給部は電源レギュレータである、請求項のいずれか一項に記載の半導体装置。 The power voltage supply unit is a power supply regulator, the semiconductor device according to any one of claims 1 to 3. 前記電源電圧供給部は、電源レギュレータの一部を構成するスイッチングドライバを含み、
前記半導体装置の前記出力端子と、前記被診断回路の前記電源端子との間にインダクタが接続され、前記被診断回路の前記電源端子と接地電位との間にキャパシタが接続され、前記インダクタと前記キャパシタとによって、前記電源レギュレータの平滑回路が構成される請求項のいずれか一項に記載の半導体装置。
The power supply voltage supply unit includes a switching driver forming a part of a power supply regulator,
An inductor is connected between the output terminal of the semiconductor device and the power supply terminal of the circuit to be diagnosed, a capacitor is connected between the power supply terminal of the circuit to be diagnosed and a ground potential, and the inductor and the by a capacitor, a semiconductor device according to any one of the power regulator of the smoothing circuit is constituted claims 1-3.
前記被診断回路は、前記スリープモードを設定するためのタイマを含む、請求項1〜のいずれか一項に記載の半導体装置。 Wherein the diagnostic circuitry includes a timer for setting the sleep mode, the semiconductor device according to any one of claims 1-5. 前記所定の基準電圧を生成する基準電圧生成回路をさらに有し、
前記電圧比較回路及び前記基準電圧生成回路は前記ノーマルモードにおいてオフになる、請求項1〜のいずれか一項に記載の半導体装置。
Further comprising a reference voltage generation circuit for generating the predetermined reference voltage,
The voltage comparator circuit and the reference voltage generating circuit turned off in the normal mode, the semiconductor device according to any one of claims 1-6.
ノーマルモードとスリープモードとに切替え可能な被診断回路と、
前記被診断回路が前記スリープモードであるときに前記被診断回路の静止電流を電圧に変換して出力する電流測定回路と、
前記電流測定回路から出力された前記電圧を所定の基準電圧と比較し、比較結果を前記被診断回路の正常及び異常を選択的に示す通知信号として出力する電圧比較回路と、
を有し、
前記被診断回路は、前記スリープモードを設定するためのタイマを含む、半導体装置。
A diagnostic circuit that can switch between normal mode and sleep mode,
A current measurement circuit that converts the quiescent current of the circuit under test into a voltage and outputs the voltage when the circuit under test is in the sleep mode;
A voltage comparison circuit that compares the voltage output from the current measurement circuit with a predetermined reference voltage, and outputs the comparison result as a notification signal that selectively indicates normality and abnormality of the circuit to be diagnosed,
Have a,
The semiconductor device , wherein the circuit to be diagnosed includes a timer for setting the sleep mode .
ノーマルモードとスリープモードとに切替え可能な被診断回路と、
前記被診断回路が前記スリープモードであるときに前記被診断回路の静止電流を電圧に変換して出力する電流測定回路と、
前記電流測定回路から出力された前記電圧を所定の基準電圧と比較し、比較結果を前記被診断回路の正常及び異常を選択的に示す通知信号として出力する電圧比較回路と、
前記所定の基準電圧を生成する基準電圧生成回路と、
を有し、
前記電圧比較回路及び前記基準電圧生成回路は、前記ノーマルモードにおいてオフになる、半導体装置。
A diagnostic circuit that can switch between normal mode and sleep mode,
A current measurement circuit that converts the quiescent current of the circuit under test into a voltage and outputs the voltage when the circuit under test is in the sleep mode;
A voltage comparison circuit that compares the voltage output from the current measurement circuit with a predetermined reference voltage, and outputs the comparison result as a notification signal that selectively indicates normality and abnormality of the circuit to be diagnosed,
A reference voltage generation circuit for generating the predetermined reference voltage,
Have a,
The semiconductor device , wherein the voltage comparison circuit and the reference voltage generation circuit are turned off in the normal mode .
前記被診断回路及び前記電流測定回路は電源電圧が供給される電源端子と接地電位との間に直列に接続され、前記電流測定回路は前記電源端子側に接続される、請求項8又は9に記載の半導体装置。 Wherein the diagnostic circuit and the current measuring circuit is connected in series between the power supply terminal and a ground potential power supply voltage is supplied, the current measuring circuit is connected to the power supply terminal side, to claim 8 or 9 The semiconductor device described. 前記被診断回路及び前記電流測定回路は電源電圧が供給される電源端子と接地電位との間に直列に接続され、前記電流測定回路は前記接地電位側に接続される、請求項8又は9に記載の半導体装置。 Wherein the diagnostic circuit and the current measuring circuit is connected in series between the power supply terminal and a ground potential power supply voltage is supplied, the current measuring circuit is connected to the ground potential, to claim 8 or 9 The semiconductor device described. 前記電流測定回路は、
第1主端子、第2主端子、及び制御端子を有し前記第1主端子と前記第2主端子との間に主導電路が形成されるトランジスタと、
前記主導電路と並列に接続される抵抗とを有し、
前記被診断回路は、前記ノーマルモードにおいて前記トランジスタをオンしかつ前記スリープモードにおいて前記トランジスタをオフする制御信号を前記トランジスタの前記制御端子に与え、前記スリープモードにおいて前記抵抗に流れる前記静止電流による電圧降下を前記電圧として出力し、
前記トランジスタは、前記ノーマルモードにおいて前記被診断回路及び前記主導電路に電流が流れるように直列に接続される、請求項11のいずれか一項に記載の半導体装置。
The current measuring circuit is
A transistor having a first main terminal, a second main terminal, and a control terminal in which a main conductive path is formed between the first main terminal and the second main terminal;
A resistor connected in parallel with the main conductive path,
The circuit to be diagnosed supplies a control signal to the control terminal of the transistor to turn on the transistor in the normal mode and to turn off the transistor in the sleep mode, and a voltage due to the quiescent current flowing through the resistor in the sleep mode. Output the drop as the voltage,
The transistor, wherein in the normal mode current to the diagnostic circuit and the main path is connected in series to flow, the semiconductor device according to any one of claims 8-11.
前記トランジスタは、PチャネルMOSトランジスタまたはPNPバイポーラトランジスタである、請求項12に記載の半導体装置。 The semiconductor device according to claim 12 , wherein the transistor is a P-channel MOS transistor or a PNP bipolar transistor. 前記トランジスタは、NチャネルMOSトランジスタまたはNPNバイポーラトランジスタである、請求項12に記載の半導体装置。 The semiconductor device according to claim 12 , wherein the transistor is an N-channel MOS transistor or an NPN bipolar transistor. 前記電圧比較回路はコンパレータ又はウインドコンパレータを含む、請求項1〜14のいずれか一項に記載の半導体装置。 The voltage comparator circuit includes a comparator or window comparator, the semiconductor device according to any one of claims 1-14. 前記電圧比較回路は前記ウインドコンパレータを含み、
前記ウインドコンパレータは、前記電流測定回路から出力された電圧が所定の範囲外であるかを判定し、前記電流測定回路から出力された電圧が前記所定の範囲外であるときに前記被診断回路が異常であることを示す前記通知信号を出力する、請求項15に記載の半導体装置。
The voltage comparison circuit includes the window comparator,
The window comparator determines whether the voltage output from the current measuring circuit is out of a predetermined range, and when the voltage output from the current measuring circuit is out of the predetermined range, the circuit to be diagnosed is The semiconductor device according to claim 15 , which outputs the notification signal indicating an abnormality.
前記被診断回路は、前記ノーマルモード及び前記スリープモードを設定するための外部信号を受ける外部端子を有し、前記外部信号に基づいて前記ノーマルモード又は前記スリープモードに切り替えられる、請求項1〜16のいずれか一項に記載の半導体装置。   The circuit to be diagnosed has an external terminal for receiving an external signal for setting the normal mode and the sleep mode, and is switched to the normal mode or the sleep mode based on the external signal. The semiconductor device according to claim 1. 前記被診断回路の前記外部端子は、外部のマイクロコンピュータから前記外部信号を受ける、請求項17に記載の半導体装置。   18. The semiconductor device according to claim 17, wherein the external terminal of the circuit to be diagnosed receives the external signal from an external microcomputer. 前記電圧比較回路は、前記通知信号を前記マイクロコンピュータに通知する、請求項18に記載の半導体装置。   19. The semiconductor device according to claim 18, wherein the voltage comparison circuit notifies the microcomputer of the notification signal. 前記被診断回路は、
主機能回路として動作する通常機能ブロックと、
前記通常機能ブロックを安全な回路状態に維持するための安全対策機能ブロックとを有し、
前記半導体装置は、
前記安全対策機能ブロックに接続され前記安全対策機能ブロックの状態を示す判定信号を出力する判定信号生成回路をさらに有する、請求項1〜19のいずれか一項に記載の半導体装置。
The circuit to be diagnosed is
Normal function block that operates as main function circuit,
Having a safety measure function block for maintaining the normal function block in a safe circuit state,
The semiconductor device is
20. The semiconductor device according to claim 1, further comprising a determination signal generation circuit that is connected to the safety countermeasure function block and outputs a determination signal indicating a state of the safety countermeasure function block.
前記判定信号は三値信号である、請求項20に記載の半導体装置。   The semiconductor device according to claim 20, wherein the determination signal is a ternary signal. 前記判定信号はパルス信号である、請求項20に記載の半導体装置。   The semiconductor device according to claim 20, wherein the determination signal is a pulse signal. 前記判定信号は、前記通常機能ブロックの正常及び異常を選択的に示す第1の信号と前記安全対策機能ブロックの正常及び異常を選択的に示す第2の信号とを含む、請求項20に記載の半導体装置。   21. The determination signal according to claim 20, wherein the determination signal includes a first signal selectively indicating normality and abnormality of the normal function block and a second signal selectively indicating normality and abnormality of the safety measure function block. Semiconductor device.
JP2016071092A 2016-03-31 2016-03-31 Semiconductor device Active JP6688131B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016071092A JP6688131B2 (en) 2016-03-31 2016-03-31 Semiconductor device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016071092A JP6688131B2 (en) 2016-03-31 2016-03-31 Semiconductor device

Publications (2)

Publication Number Publication Date
JP2017183601A JP2017183601A (en) 2017-10-05
JP6688131B2 true JP6688131B2 (en) 2020-04-28

Family

ID=60008635

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016071092A Active JP6688131B2 (en) 2016-03-31 2016-03-31 Semiconductor device

Country Status (1)

Country Link
JP (1) JP6688131B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7083728B2 (en) * 2018-08-24 2022-06-13 ルネサスエレクトロニクス株式会社 Self-diagnosis device, semiconductor device and self-diagnosis method
CN114221526B (en) * 2021-12-30 2022-10-28 杭州山科智能科技股份有限公司 Ultrasonic water meter working current self-diagnosis method and system

Also Published As

Publication number Publication date
JP2017183601A (en) 2017-10-05

Similar Documents

Publication Publication Date Title
US7518390B2 (en) Semiconductor integrated circuit device with a test circuit that measures a period to select a test mode
JP6353648B2 (en) Semiconductor abnormality detection circuit
WO2018042939A1 (en) Drive device for semiconductor components
US7280333B2 (en) Method and device for short circuit or open load detection
JP6688131B2 (en) Semiconductor device
KR100213845B1 (en) Power supply monitor circuit
JP4618149B2 (en) High side drive circuit
WO1999027375A1 (en) Ic testing device
JP2010226844A (en) Hall sensor abnormality detector and motor drive
JP4618598B2 (en) Semiconductor device
JP5000536B2 (en) Burn-in power supply method and burn-in board
JP4148243B2 (en) Abnormality detection circuit
JP4746489B2 (en) Semiconductor measuring equipment
US11675327B2 (en) Fault detection in power supply to a load in terms of a broken wire detection for a functional safety DC output
JP5794940B2 (en) Integrated circuit device
JP4657339B2 (en) Fire alarm
JP5206348B2 (en) Control circuit
JP4315228B2 (en) Semiconductor integrated circuit device
JP4690731B2 (en) Semiconductor device, test apparatus and test method thereof.
JP2007146336A (en) Knitting machine
JP2545318B2 (en) Integrated logic / analog circuit
JP6254874B2 (en) Step-down converter circuit and test method thereof
JP2015021798A (en) Semiconductor testing apparatus
JP5221095B2 (en) Coil winding inspection method and inspection apparatus
JPH11136110A (en) Power-on reset circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190225

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191114

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191119

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200108

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200324

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200403

R150 Certificate of patent or registration of utility model

Ref document number: 6688131

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250