JP2013242746A - Failure detection system and method, and semiconductor device - Google Patents

Failure detection system and method, and semiconductor device Download PDF

Info

Publication number
JP2013242746A
JP2013242746A JP2012116221A JP2012116221A JP2013242746A JP 2013242746 A JP2013242746 A JP 2013242746A JP 2012116221 A JP2012116221 A JP 2012116221A JP 2012116221 A JP2012116221 A JP 2012116221A JP 2013242746 A JP2013242746 A JP 2013242746A
Authority
JP
Japan
Prior art keywords
signal
processor
jtag
monitoring
tdo
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.)
Pending
Application number
JP2012116221A
Other languages
Japanese (ja)
Inventor
Moritaka Goto
守孝 後藤
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.)
NEC Communication Systems Ltd
Original Assignee
NEC Communication Systems 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 NEC Communication Systems Ltd filed Critical NEC Communication Systems Ltd
Priority to JP2012116221A priority Critical patent/JP2013242746A/en
Publication of JP2013242746A publication Critical patent/JP2013242746A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Hardware Redundancy (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a system that expands the range of failure detection for internal states of a processor so as to shorten time from the occurrence of a failure to the detection of the failure.SOLUTION: A failure detection system includes: JTAG-compliant first and second processors (101A and 101B); and a processor monitoring JTAG controller (105) that generates JTAG signals for monitoring the processors during normal operation and that commonly and parallelly inputs monitoring TDI-signals to the first and second processors (101A and 101B); and a TDO signal comparison circuit (103) that receives TDO signals that are parallelly output from the first and second processors (101A and 101B), compares them with each other and, if a mismatch is detected, brings a processor failure notification signal into an active state.

Description

本発明は、故障検出技術に関し、特に、プロセッサの故障の検出に好適な故障検出システムと方法並びに半導体装置に関する。   The present invention relates to a failure detection technique, and more particularly, to a failure detection system and method suitable for detecting a processor failure and a semiconductor device.

プロセッサ等半導体装置の機能安全(Functional Safety)の向上又は要求される機能安全規格の確保のために、プロセッサ等半導体装置を実装したシステム製品の運用中にプロセッサ等半導体装置の故障を、いち早く且つ高精度に検出することが求められている。ここで、機能安全とは、安全機能が正しく動作することによって実現される安全性をいう。なお、電気・電子・プログラマブル電子安全関連系の機能安全規格は、例えばIEC61508に標準化されている(IEC:International Electro-technical Commission:国際電気標準会議)。IEC61508では安全レベル(SIL: Safety Integrity Level)を4段階に規定している。安全関連系は、安全機能を実行する主体をいう。また、車載装置等、自動車の安全規格として例えばISO26262がある(ISO: International Organization for Standardization:国際標準化機構)。   In order to improve the functional safety of semiconductor devices such as processors or to ensure the required functional safety standards, failure of semiconductor devices such as processors can be quickly and rapidly increased during the operation of system products equipped with semiconductor devices such as processors. There is a demand for accurate detection. Here, functional safety refers to safety realized by the safety function operating correctly. Note that the functional safety standards for electrical / electronic / programmable electronic safety-related systems are standardized in, for example, IEC 61508 (IEC: International Electro-technical Commission). In IEC61508, the safety level (SIL: Safety Integrity Level) is defined in four stages. A safety-related system is an entity that performs a safety function. In addition, there is ISO26262 (ISO: International Organization for Standardization) as a safety standard for automobiles such as in-vehicle devices.

<デュアルプロセッサのロックステップ方式>
フェールセーフ機能を実現するための構成として、例えばデュアルプロセッサのロックステップ・システム(lockstep system)が知られている。デュアルプロセッサのロックステップ・システムは、2つのプロセッサで同一の処理を実行しその差を検出することで故障を検出する。図1は、デュアルプロセッサ・ロックステップ方式を説明する図である(例えば非特許文献1のFigure 1参照)。なお、デュアルプロセッサはデュアルコアともいう。
<Dual processor lockstep method>
As a configuration for realizing the fail-safe function, for example, a dual processor lockstep system is known. A dual processor lockstep system detects a failure by performing the same process on two processors and detecting the difference. FIG. 1 is a diagram for explaining a dual processor lockstep system (see, for example, FIG. 1 of Non-Patent Document 1). The dual processor is also called a dual core.

図1を参照すると、半導体装置(半導体チップ)10(SOC(System On Chip:システム・オン・チップ):必要なシステム機能を1チップに集積化したデバイス)に搭載されるプロセッサ#0(11A)とプロセッサ#1(11B)は同一構成とされ、共通のクロック信号で駆動され、互いに同一のプログラム(命令)を同時に実行する。   Referring to FIG. 1, a processor # 0 (11A) mounted on a semiconductor device (semiconductor chip) 10 (SOC (System On Chip): a device in which necessary system functions are integrated on one chip). And processor # 1 (11B) have the same configuration, are driven by a common clock signal, and simultaneously execute the same program (instruction).

比較回路13は、プロセッサ#0からプロセッサ#0バス信号12Aに出力されたプログラム処理結果#0と、プロセッサ#1からプロセッサ#1バス信号12Bに出力されるプログラム処理結果#1を受け取り、これらを比較して、一致・不一致を検出する。比較回路13は、プログラム処理結果#0、#1が不一致の場合、プロセッサ故障発生と判定し、図示されないプロセッサ故障通知信号を、例えば周辺回路制御バス14あるいは半導体装置10の外部に出力する。なお、プロセッサ#0(11A)からのプログラム処理結果#0と、プロセッサ#1(11B)からのプログラム処理結果#0とは互いに同期して比較回路13に入力され比較される必要がある。このため、プロセッサ#0とプロセッサ#1を同期化させる同期化手段(不図示)が設けられている。   The comparison circuit 13 receives the program processing result # 0 output from the processor # 0 to the processor # 0 bus signal 12A and the program processing result # 1 output from the processor # 1 to the processor # 1 bus signal 12B. Compare and detect match / mismatch. When the program processing results # 0 and # 1 do not match, the comparison circuit 13 determines that a processor failure has occurred, and outputs a processor failure notification signal (not shown) to the peripheral circuit control bus 14 or the semiconductor device 10, for example. The program processing result # 0 from the processor # 0 (11A) and the program processing result # 0 from the processor # 1 (11B) need to be input to the comparison circuit 13 and compared in synchronization with each other. For this reason, synchronization means (not shown) for synchronizing the processor # 0 and the processor # 1 is provided.

このように、製品等の応用等に対応したプログラムが、二つのプロセッサ#0(11A)とプロセッサ#1(11B)で同時に実行され、処理結果を監視することで故障を検出する。   As described above, a program corresponding to an application of a product or the like is simultaneously executed by the two processors # 0 (11A) and processor # 1 (11B), and a failure is detected by monitoring the processing results.

なお、特に制限されないが、プロセッサ#0(11A)とプロセッサ#1(11B)は、周辺回路制御バス14を介して、不図示のメモリ(プログラム命令を記憶保持するDRAM(Dynamic Random Access Memory)等のメモリ)から命令をフェッチして実行する。また、特に制限されないが、プロセッサ#0(11A)とプロセッサ#1(11B)のデュアルプロセッサの一方を制御用プロセッサとし、他方を監視用プロセッサとする構成も用いられる。この場合、例えば制御用プロセッサに該当するプロセッサのプログラム処理結果が周辺回路制御バス14等を介して、不図示のメモリあるいは不図示の入出力(IO)装置等に出力される。   Although not particularly limited, the processor # 0 (11A) and the processor # 1 (11B) are connected to a memory (not shown) such as a DRAM (Dynamic Random Access Memory) that stores and holds program instructions via the peripheral circuit control bus 14. Instruction is fetched from memory) and executed. Although not particularly limited, a configuration in which one of the dual processors of the processor # 0 (11A) and the processor # 1 (11B) is a control processor and the other is a monitoring processor is also used. In this case, for example, the program processing result of the processor corresponding to the control processor is output to a memory (not shown) or an input / output (IO) device (not shown) via the peripheral circuit control bus 14 or the like.

図1に例示したデュアルプロセッサのロックステップ方式では、基本的に、プロセッサが出力した信号から判別できる範囲の故障しか検出できない。このため、プロセッサから信号が出力されない場合には、故障の検出は困難である(故障によっては検出できない場合もある)。以下説明する。   In the dual processor lockstep method illustrated in FIG. 1, basically, only a failure within a range that can be discriminated from the signal output from the processor can be detected. For this reason, when a signal is not output from the processor, it is difficult to detect a failure (in some cases, the failure cannot be detected). This will be described below.

図2は、図1において、プロセッサ#0とプロセッサ#1から汎用レジスタ#0の値をプロセッサ#1バス信号とプロセッサ#1バス信号に出力するプログラムを実行した場合の動作を説明する図(参考図)である。なお、図2には、プロセッサ動作クロック信号(プロセッサに供給されるシステムクロック信号)(図1では図示されない)と、プロセッサ#0の汎用レジスタ#0の値と、プロセッサ#0の汎用レジスタ#1の値と、プロセッサ#0バス信号と、プロセッサ#1の汎用レジスタ#0の値と、プロセッサ#1の汎用レジスタ#1の値と、プロセッサ#1バス信号と、比較回路13によるプロセッサ#0バス信号とプロセッサ#1バス信号の比較結果の時間推移の一例(本発明者により作成された参考図)が示されている。   FIG. 2 is a diagram for explaining the operation when the program for outputting the value of the general-purpose register # 0 from the processor # 0 and the processor # 1 to the processor # 1 bus signal and the processor # 1 bus signal in FIG. Figure). 2 shows a processor operation clock signal (system clock signal supplied to the processor) (not shown in FIG. 1), the value of general-purpose register # 0 of processor # 0, and general-purpose register # 1 of processor # 0. , The processor # 0 bus signal, the value of the general register # 0 of the processor # 1, the value of the general register # 1 of the processor # 1, the processor # 1 bus signal, and the processor # 0 bus by the comparison circuit 13 An example (reference diagram created by the present inventor) of the time transition of the comparison result of the signal and the processor # 1 bus signal is shown.

図2において、(1)(丸で囲んだ番号1)のタイミングで、図1に示したプロセッサ#0の汎用レジスタ#1に故障が発生している。このためタイミング(1)以降、プロセッサ#0の汎用レジスタ#1には、その期待値:0x0000_0002(0xHexadecimalを表す、32ビットデータ)ではなく、0x0000_0003がセットされている状態となっている。しかしながら、プロセッサ#0バス信号には、プロセッサ#0の汎用レジスタ#0の値0x0000_0008が出力されている。   In FIG. 2, a failure has occurred in the general-purpose register # 1 of the processor # 0 shown in FIG. 1 at the timing of (1) (circled number 1). Therefore, after timing (1), 0x0000_0003 is set in general-purpose register # 1 of processor # 0 instead of its expected value: 0x0000_0002 (32-bit data representing 0xHexadecimal). However, the value 0x0000_0008 of the general-purpose register # 0 of the processor # 0 is output to the processor # 0 bus signal.

このプロセッサ#0バス信号の値は、正常動作をしているプロセッサ#1から出力されるプロセッサ#1バス信号の値(プロセッサ#1の汎用レジスタ#0の値)と一致している。   The value of the processor # 0 bus signal matches the value of the processor # 1 bus signal output from the processor # 1 operating normally (the value of the general-purpose register # 0 of the processor # 1).

このため、実際にはプロセッサ#0の汎用レジスタ#1に故障が発生しているにもかかわらず、比較回路13では、プロセッサ#0の故障(汎用レジスタ#1の故障)を検出することができない。   For this reason, the comparison circuit 13 cannot detect a failure of the processor # 0 (failure of the general-purpose register # 1) even though a failure has actually occurred in the general-purpose register # 1 of the processor # 0. .

<JTAG方式>
半導体集積回路や基板の検査(バウンダリスキャンテスト)を規格化したJTAG(Joint Test Action Group)は、その機能から、プロセッサ等の内部へのアクセスを可能としており、例えばシステムに組み込まれるプロセッサ上で動作するソフトウェア(プログラム)のデバッグ等にも利用されている。なお、JTAGによるソフトウェア・デバッグ機能は、「JTAG-ICE」(ICE:In-Circuit Emulator)、あるいは「JTAGデバッガ」とも呼ばれる。JTAGを用いたソフトウェア・デバッグでは、プロセッサのコアの内部にアクセスして、例えばブレークポイント設定/解除、ステップ実行、メモリ/レジスタのダンプ、トレース等が行われる。
<JTAG method>
JTAG (Joint Test Action Group), which standardizes inspection of semiconductor integrated circuits and substrates (boundary scan test), allows access to the inside of the processor, etc., based on its functions. For example, it operates on the processor incorporated in the system. It is also used for debugging software (programs). The software debugging function by JTAG is also called “JTAG-ICE” (ICE: In-Circuit Emulator) or “JTAG debugger”. In software debugging using JTAG, the inside of the processor core is accessed, and for example, breakpoint setting / cancellation, step execution, memory / register dumping, tracing, and the like are performed.

JTAGを用いてプロセッサ内のレジスタ等の内部信号を読み出す場合の構成例について説明する。図3に、デュアルプロセッサ構成の半導体装置(SOC)を備えたシステムのソフトウェア・デバッグ用のJTAGの接続構成の一例を示す(例えば非特許文献1のFigure 2参照)。   A configuration example in the case where an internal signal such as a register in the processor is read using JTAG will be described. FIG. 3 shows an example of a JTAG connection configuration for software debugging of a system including a semiconductor device (SOC) having a dual processor configuration (see, for example, FIG. 2 of Non-Patent Document 1).

図3において、半導体装置(チップ)(SOC)10’上のプロセッサ11’A、11’Bは、IEEE (the Institute of Electrical and Electronics Engineers, Inc) Std 1149.1準拠のJTAGアーキテクチャとして構成され、内部に、プロセッサの本来の機能を実現するロジック(コアロジック)(不図示)に加え、JTAG回路(不図示)を備えている。   In FIG. 3, processors 11′A and 11′B on a semiconductor device (chip) (SOC) 10 ′ are configured as a JTAG architecture compliant with IEEE (the Institute of Electrical and Electronics Engineers, Inc) Std 1149.1, In addition to logic (core logic) (not shown) for realizing the original function of the processor, a JTAG circuit (not shown) is provided.

図3において、プロセッサ11’A、11’B内に実装されるJTAG回路は、
・命令レジスタ(IR(インストラクション・レジスタ))と、
・データレジスタ(DR)(BSR(Boundary Scan Register:バウンダリスキャン・レジスタ)、BYPASS(1ビット構成のバイパス・レジスタ)、IDCODES(デバイスIDとリビジョン番号を保持するレジスタ)、その他のオプション・レジスタ)と、
・デコーダ(命令レジスタの命令をデコードする)と、
・第1のマルチプレクサ(MUX)(デコーダの出力に基づきデータレジスタの1つを選択して出力する)と、
・TAPコントローラ(16種のステートを有するステートマシン、TMSとTCKにより状態遷移し、命令レジスタ、データレジスタ等を制御する)と、
・第2のマルチプレクサ(MUX)(TAPコントローラの出力に基づき、命令レジスタ又は第1のMUX(マルチプレクサ)の出力を選択する)
を備える。
In FIG. 3, the JTAG circuit implemented in the processors 11′A and 11′B is
・ Instruction register (IR (instruction register)),
Data register (DR) (BSR (Boundary Scan Register), BYPASS (1-bit bypass register), IDCODES (register holding device ID and revision number), other optional registers) ,
A decoder (decodes instructions in the instruction register);
A first multiplexer (MUX) (selects and outputs one of the data registers based on the output of the decoder);
A TAP controller (state machine having 16 types of states, state transitions by TMS and TCK, and controlling instruction registers, data registers, etc.);
Second multiplexer (MUX) (selects the instruction register or the output of the first MUX (multiplexer) based on the output of the TAP controller)
Is provided.

TAP(Test Access Port:テストアクセスポート)(JTAGインタフェース)は、以下の信号(JTAG信号」という)を含む。   A TAP (Test Access Port) (JTAG interface) includes the following signals (referred to as JTAG signals).

・TCK(Test Clock:テストクロック):テストオペレーション及びバウンダリスキャン動作を同期して行うためのテストクロック信号である(入力端子)。
・TMS(Test Mode Select:テストモードセレクト):TAPコントローラでデコードされ、テストオペレーションの制御を行う信号である(入力端子)。
・TDI(Test Data Input:テストデータインプット):テストロジックに命令やデータをシリアルに入力する信号である(入力端子)。TDIはデコーダで選択されたレジスタにTCKの立ち上がりエッジに同期してキャプチャされる。
・TDO(Test Data Output:テストデータアウトプット):テストロジックからのデータをシリアルに出力する信号である(出力端子)。TDOはデコーダで選択されたレジスタからTCKの立ち上がりエッジに同期してシフトアウトされ(読み出され)、TCKの立ち下がりエッジまで変化しない。TDO端子は、シフトオペレーション以外は、ハイインピーダンス状態とされる。
・TRST(Test Reset:テストリセット):オプション信号。TAPコントローラの非同期リセットに用いられる信号である(入力端子)。TRSTのLowを受け、TAPコントローラはステートマシンをリセットする(Test-Logic-Reset)。
TCK (Test Clock): A test clock signal for performing the test operation and the boundary scan operation in synchronization (input terminal).
TMS (Test Mode Select): A signal that is decoded by the TAP controller and controls the test operation (input terminal).
TDI (Test Data Input): A signal for inputting instructions and data serially to the test logic (input terminal). TDI is captured in the register selected by the decoder in synchronization with the rising edge of TCK.
TDO (Test Data Output): A signal for serially outputting data from the test logic (output terminal). TDO is shifted out (read) from the register selected by the decoder in synchronization with the rising edge of TCK, and does not change until the falling edge of TCK. The TDO terminal is in a high impedance state except for the shift operation.
TRST (Test Reset): Optional signal. A signal used for asynchronous reset of the TAP controller (input terminal). In response to TRST Low, the TAP controller resets the state machine (Test-Logic-Reset).

JTAGデバイスのTDI端子にシリアルに入力された信号は、TAPコントローラの状態によってデータレジスタ又は命令レジスタのシフトレジスタを通過し、TDO端子から出力される。   A signal serially input to the TDI terminal of the JTAG device passes through the data register or the shift register of the instruction register depending on the state of the TAP controller, and is output from the TDO terminal.

図3に示すように、PC(Personal Computer)20からのデバッグ用TDI、TMS、TCK、TRSTのうち、デバッグ用TMS、TCK、TRSTの各信号は、プロセッサ#0、#1のTMS端子、TCK端子、TRST端子にそれぞれ並列に入力される。   As shown in FIG. 3, among TDI, TMS, TCK, and TRST for debugging from a PC (Personal Computer) 20, the TMS, TCK, and TRST signals for debugging are the TMS terminals and TCK of processors # 0 and # 1, respectively. Terminal and TRST terminal are respectively input in parallel.

一方、デバッグ用TDIはシリアル・チェーン接続(デイジー・チェーン接続)される。すなわち、PC20からのデバッグ用TDI信号は、プロセッサ#0のTDI端子にシリアルに入力され、プロセッサ#0のTDO端子からシリアルに出力される信号が、プロセッサ#1のTDI端子にシリアルに入力され、プロセッサ#1のTDO端子からシリアルに出力される信号が、デバック用TDO信号として、PC20に入力される。このように、プロセッサ#0とプロセッサ#1を個別にデバッグできるように、TDI信号は、シリアル・チェーン接続されている。なお、図3では、簡単のため、デバッグ用TMS、TDI、TDO、TRSTにそれぞれ接続されるプルアップ抵抗は省略されている。   On the other hand, the debug TDI is serial chained (daisy chained). That is, the debug TDI signal from the PC 20 is serially input to the TDI terminal of the processor # 0, and the signal output serially from the TDO terminal of the processor # 0 is serially input to the TDI terminal of the processor # 1. A signal serially output from the TDO terminal of the processor # 1 is input to the PC 20 as a debug TDO signal. In this way, the TDI signal is connected in a serial chain so that the processor # 0 and the processor # 1 can be debugged individually. In FIG. 3, pull-up resistors connected to the debug TMS, TDI, TDO, and TRST are omitted for simplicity.

図4(A)と図4(B)は、図3において、JTAG命令コマンド設定時と、プロセッサ内部信号読み出し時のアクセスとをそれぞれ説明する図(本発明者により作成された参考図)である。   4A and 4B are diagrams (reference diagrams created by the present inventor) for explaining the access when the JTAG instruction command is set and when the processor internal signal is read in FIG. 3, respectively. .

図4(A)に示すように、プロセッサ#1向けのデバック用TDI信号(命令コマンド)を、プロセッサ#0のTDI端子にシリアルに入力したのち、プロセッサ#0のTDI端子に、デバック用TDI信号(命令コマンド)をシリアルに入力している。この場合、先に、プロセッサ#0のTDI端子にTCKに同期してシリアルに入力されたデバック用TDI信号(命令コマンド)はプロセッサ#0内のJTAG回路において例えば1ビットのバイパス・レジスタを経由して(バウンダリスキャン・レジスタをバイパスする)、TDO端子からシリアルに出力され、プロセッサ#1のTDI端子にTCKに同期してシリアルに入力され、例えばプロセッサ#1内のJTAG回路の命令レジスタに設定される。後からプロセッサ#0のTDI端子にTCKに同期してシリアルに入力されるデバック用TDI信号は、プロセッサ#0内のJTAG回路の命令レジスに設定される。   As shown in FIG. 4A, a debugging TDI signal (command command) for the processor # 1 is serially input to the TDI terminal of the processor # 0, and then the debugging TDI signal is input to the TDI terminal of the processor # 0. (Instruction command) is input serially. In this case, the debugging TDI signal (instruction command) input to the TDI terminal of the processor # 0 serially in synchronization with TCK first passes through, for example, a 1-bit bypass register in the JTAG circuit in the processor # 0. (Bypassing the boundary scan register), serially output from the TDO terminal, serially input to the TDI terminal of the processor # 1 in synchronization with TCK, and set in the instruction register of the JTAG circuit in the processor # 1, for example The The debug TDI signal that is serially input to the TDI terminal of the processor # 0 in synchronization with TCK later is set in the instruction register of the JTAG circuit in the processor # 0.

プロセッサの内部信号の読み出し時には、図4(B)に示すように、デバック用TDO信号として、プロセッサ#1のJTAG回路の選択されたレジスタ(例えばバウンダリスキャン・レジスタ)からテストクロックTCKに同期してシリアルにシフトアウトされた信号(プロセッサ#1内部信号)が、TDO端子から出力され後に、プロセッサ#0のJTAG回路の選択されたレジスタ(例えばバウンダリスキャン・レジスタ)からテストクロックTCKに同期してシリアルにシフトアウトされた信号(プロセッサ#0内部信号)が、デバッグ用TDO信号として、プロセッサ#1のTDO端子から出力される。この場合、プロセッサ#0のJTAG回路の選択されたレジスタ(例えばバウンダリスキャン・レジスタ)からTCKに同期してシリアルにTDO端子にシフトアウトされる信号(プロセッサ#0内部信号)は、プロセッサ#1のTDI端子に入力され、プロセッサ#1内のJTAG回路の例えば1ビットのバイパス・レジスタを介してプロセッサ#1のTDO端子からTCKに同期してシリアルに出力される。   At the time of reading the internal signal of the processor, as shown in FIG. 4B, as a debug TDO signal, it synchronizes with the test clock TCK from the selected register (for example, the boundary scan register) of the JTAG circuit of the processor # 1. The serially shifted-out signal (processor # 1 internal signal) is output from the TDO terminal, and then serially synchronized with the test clock TCK from the selected register (for example, boundary scan register) of the JTAG circuit of processor # 0. Is output from the TDO terminal of the processor # 1 as a debug TDO signal. In this case, a signal (processor # 0 internal signal) that is serially shifted out to the TDO terminal in synchronization with TCK from the selected register (for example, the boundary scan register) of the JTAG circuit of processor # 0 is the processor # 1. The signal is input to the TDI terminal, and is serially output in synchronization with TCK from the TDO terminal of the processor # 1 via, for example, a 1-bit bypass register of the JTAG circuit in the processor # 1.

なお、図4(B)のプロセッサ#1内部信号は、プロセッサ#1へ入力されるデバッグ用TDI信号による命令コマンドをプロセッサ#1(11’B)内のJTAG回路の命令レジスタに設定し(後述される図10の命令コマンド参照)、プロセッサ#1(11’B)内の汎用レジスタ#0(図3では不図示)等の値をバウンダリスキャン・セルに設定し、TDO端子からシリアルにシフトアウトされたものである。   Note that the processor # 1 internal signal in FIG. 4B sets an instruction command based on the debug TDI signal input to the processor # 1 in the instruction register of the JTAG circuit in the processor # 1 (11′B) (described later). Set the value of general-purpose register # 0 (not shown in FIG. 3) in the processor # 1 (11′B) in the boundary scan cell, and serially shift out from the TDO terminal. It has been done.

また、図4(B)のプロセッサ#0内部信号は、プロセッサ#0へ入力されるデバッグ用TDI信号による命令コマンドをプロセッサ#0(11’A)内のJTAG回路の命令レジスタに設定し、プロセッサ#0(11’A)内の汎用レジスタ#0(図3では不図示)等の値をバウンダリスキャン・セルに設定し、TDO端子からシリアルにシフトアウトし、プロセッサ#1(11’B)のTDI端子、JTAG回路のバイパス・レジスタ、TDO端子を介して出力されたものである。   Also, the processor # 0 internal signal in FIG. 4B sets the instruction command by the debug TDI signal input to the processor # 0 in the instruction register of the JTAG circuit in the processor # 0 (11′A), and The value of general-purpose register # 0 (not shown in FIG. 3) in # 0 (11′A) is set in the boundary scan cell, serially shifted out from the TDO terminal, and the processor # 1 (11′B) It is output via the TDI terminal, the JTAG circuit bypass register, and the TDO terminal.

図3の構成の場合、プロセッサ#0とプロセッサ#1に対して、同時(並列)に、JTAGの命令コマンドを書き込むことはできない。また、プロセッサ#0とプロセッサ#1から、同時(並列)に、内部データを読み出すことはできない。その結果、アクセス時間が長くなる。   In the case of the configuration of FIG. 3, JTAG instruction commands cannot be written simultaneously (in parallel) to the processor # 0 and the processor # 1. Also, internal data cannot be read from the processor # 0 and the processor # 1 simultaneously (in parallel). As a result, the access time becomes longer.

なお、複数のデバイスへTDI信号を、並列に書き込みを行う構成が特許文献1等に開示されている。特許文献1には、TDI信号が複数のデバイスのすべてに直列に通過するようにスキャンパスを形成する構成に対して、複数のデバイスのTDI端子にTDI信号を並列に接続している。また特許文献1では、TDI信号を並列入力する複数のデバイスのそれぞれのTDO端子に、複数の入力が接続されたセレクタを備え、セレクタで選択されたTDO信号を出力する構成とされている。   A configuration in which TDI signals are written in parallel to a plurality of devices is disclosed in Patent Document 1 and the like. In Patent Document 1, a TDI signal is connected in parallel to a TDI terminal of a plurality of devices in a configuration in which a scan path is formed so that a TDI signal passes through all of the plurality of devices in series. In Patent Document 1, a TDO terminal of each of a plurality of devices that input TDI signals in parallel is provided with a selector to which a plurality of inputs are connected, and a TDO signal selected by the selector is output.

特開2001−343432号公報JP 2001-343432 A

Harn Hua Ng "PPC405 Lockstep System on ML310", XAPP564 (v1.0.2)January 29, 2007、[2012年3月22日検索]、インターネット<URL:http://www.eetasia.com/ARTICLES/2004DEC/A/2004DEC09_PL_MPR_AN.PDF?SOURCES=DOWNLOAD>Harn Hua Ng "PPC405 Lockstep System on ML310", XAPP564 (v1.0.2) January 29, 2007, [Search March 22, 2012], Internet <URL: http://www.eetasia.com/ARTICLES/2004DEC/ A / 2004DEC09_PL_MPR_AN.PDF? SOURCES = DOWNLOAD>

関連技術の分析を以下に示す。   The analysis of related technologies is shown below.

図1の構成の場合、プロセッサ#0の汎用レジスタ#1が故障したとき、該故障による影響がプロセッサ#0バス信号に出力されない場合には、プロセッサ#0バス信号をプロセッサ#1バス信号と比較しても、両者が一致するため、プロセッサ#0の故障(汎用レジスタ#1の故障)を検出することはできない。   In the case of the configuration of FIG. 1, when the general-purpose register # 1 of the processor # 0 fails, if the influence of the failure is not output to the processor # 0 bus signal, the processor # 0 bus signal is compared with the processor # 1 bus signal. Even so, since they match, a failure in processor # 0 (failure in general register # 1) cannot be detected.

図3の構成の場合、TDI信号は、複数のプロセッサ間でシリアル・チェーン接続されている。このため、複数のプロセッサへの命令コマンドの同時書き込みや、データの同時読み出しができない。例えばn個(nは2以上の正整数)のプロセッサ構成のシステムにおいて、n個のプロセッサの書き込み時間と読み出し時間は、それぞれ、1つのプロセッサの書き込み時間と、読み出し時間のn倍となる。プロセッサの内部信号の読み出し時間の長大化により、プロセッサの内部回路の故障発生から故障検出までに要する時間が、予め定められた仕様を満たさない場合も起こり得る。したがって、JTAGを用いたソフトウェア・デバッグ用の図3の構成は、プロセッサの監視には不向きであり、機能安全の向上や要求される機能安全規格等に対応するための監視・診断には適用できない。   In the case of the configuration shown in FIG. 3, the TDI signal is connected in a serial chain among a plurality of processors. For this reason, simultaneous writing of command commands to multiple processors and simultaneous reading of data cannot be performed. For example, in a system having n processors (n is a positive integer of 2 or more), the write time and read time of n processors are n times the write time and read time of one processor, respectively. Due to the increase in the reading time of the internal signal of the processor, the time required from the occurrence of a failure of the internal circuit of the processor to the detection of the failure may not satisfy a predetermined specification. Therefore, the configuration shown in FIG. 3 for software debugging using JTAG is not suitable for monitoring the processor, and cannot be applied to monitoring / diagnosis for improving functional safety or complying with required functional safety standards. .

したがって、本発明は、上記問題点の少なくとも1つを解消するために創案されたものであって、その目的は、プロセッサの内部状態の故障検出範囲の拡大を可能とし故障発生から故障検出まで時間を短縮可能とするシステムと方法と装置を提供することにある。   Therefore, the present invention has been developed to solve at least one of the above problems, and its purpose is to enable the expansion of the fault detection range of the internal state of the processor, and the time from the occurrence of the fault to the fault detection. It is an object of the present invention to provide a system, a method and an apparatus that can shorten the time.

本発明によれば、互いに同一構成とされ、互いに同一構成とされた、JTAG(Joint Test Action Group)準拠の複数のプロセッサと、
通常動作時に、監視用のJTAG信号を生成するプロセッサ監視用JTAGプロセッサ監視用JTAGコントローラと、
を備え、
前記プロセッサ監視用JTAGコントローラより出力される監視用のJTAG信号のうち監視用のテストデータインプット(TDI)信号は、前記複数のプロセッサの複数のテストデータインプット(TDI)端子に、共通に且つ並列に供給され、
前記監視用のテストデータインプット(TDI)信号の入力に対応して前記複数のプロセッサの複数のテストデータアウトプット(TDO)端子から並列に出力されるテストデータアウトプット(TDO)信号を入力してこれらを比較し、不一致を検出した場合、プロセッサ故障通知信号を活性状態として出力するTDO信号比較回路をさらに備えた故障検出システムが提供される。
According to the present invention, a plurality of JTAG (Joint Test Action Group) compliant processors having the same configuration and the same configuration,
A processor monitoring JTAG processor monitoring JTAG controller that generates a monitoring JTAG signal during normal operation;
With
Among the monitoring JTAG signals output from the processor monitoring JTAG controller, a monitoring test data input (TDI) signal is commonly and in parallel to a plurality of test data input (TDI) terminals of the plurality of processors. Supplied,
A test data output (TDO) signal output in parallel from a plurality of test data output (TDO) terminals of the plurality of processors is input in response to the input of the test data input (TDI) signal for monitoring. A failure detection system is provided that further includes a TDO signal comparison circuit that outputs a processor failure notification signal as an active state when these are compared and a mismatch is detected.

本発明によれば、互いに同一構成とされた、JTAG(Joint Test Action Group)準拠の複数のプロセッサを備えたシステムの通常動作時に、プロセッサ監視用JTAGコントローラより出力される監視用のJTAG信号のうち、監視用のテストデータインプット(TDI)信号を、前記複数のプロセッサの複数のテストデータインプット(TDI)端子に、共通に且つ並列に供給し、
前記監視用のテストデータインプット(TDI)信号の入力に対応して、前記複数のプロセッサの複数のテストデータアウトプット(TDO)端子から、並列に出力されるテストデータアウトプット(TDO)信号を比較し、不一致を検出した時、プロセッサ故障通知信号を出力する、故障検出方法が提供される。
According to the present invention, among the monitoring JTAG signals output from the processor monitoring JTAG controller during normal operation of a system including a plurality of JTAG (Joint Test Action Group) processors having the same configuration. Supplying test data input (TDI) signals for monitoring to a plurality of test data input (TDI) terminals of the plurality of processors in common and in parallel;
The test data output (TDO) signals output in parallel from the plurality of test data output (TDO) terminals of the plurality of processors are compared in response to the input of the test data input (TDI) signal for monitoring. Then, a failure detection method for outputting a processor failure notification signal when a mismatch is detected is provided.

本発明によれば、プロセッサの内部状態の故障検出範囲を広げ、故障発生から故障検出まで時間を短縮することができる。   According to the present invention, the failure detection range of the internal state of the processor can be expanded, and the time from failure occurrence to failure detection can be shortened.

デュアルプロセッサのロックステップの構成を説明する図である。It is a figure explaining the structure of the lock step of a dual processor. 図1の構成の問題点を説明するための図である。It is a figure for demonstrating the problem of the structure of FIG. JTAGを用いた構成例を説明するための図である。It is a figure for demonstrating the structural example using JTAG. (A)、(B)は、図3においてJTAG命令コマンド設定時、プロセッサ内部信号読み出し時のアクセスを説明する図である。(A) and (B) are diagrams for explaining access at the time of setting a JTAG instruction command and reading a processor internal signal in FIG. 本発明の一実施形態の構成の一例を示す図である。It is a figure which shows an example of a structure of one Embodiment of this invention. 図5のJTAGセレクタを説明する図である。It is a figure explaining the JTAG selector of FIG. (A)、(B)は本実施形態のJTAG命令コマンド設定時、プロセッサ内部信号読み出し時のアクセスを説明する図である。(A), (B) is a figure explaining the access at the time of reading a processor internal signal at the time of the JTAG instruction command setting of this embodiment. 図5のプロセッサ監視用JTAGコントローラの構成例を示す図である。It is a figure which shows the structural example of the JTAG controller for processor monitoring of FIG. 図5のTDO信号比較回路の構成例を示す図である。FIG. 6 is a diagram illustrating a configuration example of a TDO signal comparison circuit in FIG. 5. プロセッサに設定する命令コマンドの例を示す図である。It is a figure which shows the example of the command command set to a processor. 本発明の一実施形態におけるプロセッサ監視処理を説明するためのフローチャートである。It is a flowchart for demonstrating the processor monitoring process in one Embodiment of this invention. 本発明の一実施形態におけるプロセッサ監視用JTAGコントローラの初期処理の一例を説明するためのタイムチャートである。It is a time chart for demonstrating an example of the initial process of the JTAG controller for processor monitoring in one Embodiment of this invention. 本発明の一実施形態におけるプロセッサ監視用JTAGコントローラのJTAG命令コマンドの書込動作の一例を説明するためのタイムチャートである。It is a time chart for demonstrating an example of the write operation of the JTAG instruction command of the processor monitoring JTAG controller in one Embodiment of this invention. 本発明の一実施形態におけるプロセッサ監視用JTAGコントローラのプロセッサ内部信号の読出動作の一例を説明するためのタイムチャートである。It is a time chart for demonstrating an example of the reading operation | movement of the processor internal signal of the JTAG controller for a processor monitoring in one Embodiment of this invention. 本発明の一実施形態におけるTDO信号比較回路の動作の一例を説明するためのタイムチャートである。It is a time chart for demonstrating an example of operation | movement of the TDO signal comparison circuit in one Embodiment of this invention. 本発明の一実施形態においてプロセッサ#0の汎用レジスタ#1に故障発生時の動作の一例を説明するためのタイムチャートである。6 is a time chart for explaining an example of an operation when a failure occurs in the general-purpose register # 1 of the processor # 0 in the embodiment of the present invention. 本発明の一実施形態に変形例1を説明するための図である。It is a figure for demonstrating the modification 1 to one Embodiment of this invention. 本発明の一実施形態に変形例2を説明するための図である。It is a figure for demonstrating the modification 2 to one Embodiment of this invention. 本発明の一実施形態に変形例3を説明するための図である。It is a figure for demonstrating the modification 3 to one Embodiment of this invention. 本発明の一形態を説明するための図である。It is a figure for demonstrating one form of this invention.

本発明の実施形態を説明する。いくつかの形態(modes)の1つによれば、図20に示すように、半導体装置(システム)100は、例えばIEEE Std. 1149.1準拠のJTAG回路を備えた第1、第2のプロセッサ101A、101Bと、通常動作時に、プロセッサ監視用のJTAG信号を生成するJTAGコントローラ105を備えている。JTAGコントローラ105からの監視用のJTAG信号のうちTDI信号は、第1、第2のプロセッサ101A、101BのTDI端子に、共通且つ並列に供給される(図3のように、デイジー・チェーン接続ではない)。JTAGコントローラ105からの監視用のJTAG信号のうちTCKは、第1、第2のプロセッサ101A、101BのTCK端子に、共通に且つ並列に供給される。同様に、TMS、TRSTも、第1、第2のプロセッサ101A、101BのTMS端子、TRST端子に、共通に且つ並列に供給される。   An embodiment of the present invention will be described. According to one of several modes, as shown in FIG. 20, a semiconductor device (system) 100 includes, for example, first and second processors 101A including JTAG circuits compliant with IEEE Std. 1149.1, 101B and a JTAG controller 105 that generates a processor monitoring JTAG signal during normal operation. Among the monitoring JTAG signals from the JTAG controller 105, the TDI signal is supplied in common and in parallel to the TDI terminals of the first and second processors 101A and 101B (as shown in FIG. 3, in the daisy chain connection). Absent). Of the monitoring JTAG signal from the JTAG controller 105, TCK is supplied in common and in parallel to the TCK terminals of the first and second processors 101A and 101B. Similarly, TMS and TRST are supplied in common and in parallel to the TMS and TRST terminals of the first and second processors 101A and 101B.

さらに、半導体装置(システム)100は、監視用のTDI信号の入力に対応して第1、第2の101A、101BのTDO端子から並列に出力されるTDO信号を入力してこれらを比較し、不一致を検出した場合、プロセッサ故障通知信号を活性状態として出力するTDO信号比較回路103を備えている。   Furthermore, the semiconductor device (system) 100 inputs the TDO signals output in parallel from the TDO terminals of the first and second 101A and 101B in response to the input of the monitoring TDI signal, and compares them. When a mismatch is detected, a TDO signal comparison circuit 103 that outputs a processor failure notification signal as an active state is provided.

プロセッサ監視用JTAGコントローラ105は、第1、第2のプロセッサ101A、101Bの各々に含まれる複数の内部回路(汎用レジスタ)に対して、各内部回路の状態を読み出して前記プロセッサのテストデータアウトプット(TDO)端子から出力させるJTAG命令コマンド(レジスタ・リード(プロセッサ診断用))を順次生成して、前記テストデータインプット(TDI)信号として出力し、最後の前記内部回路の状態の読み出しが終了すると、最初に読み出しを行った前記内部回路に戻り、再びその状態の読み出しを行う反復処理を、通常動作中、繰り返す構成としてもよい。   The processor monitoring JTAG controller 105 reads out the state of each internal circuit from a plurality of internal circuits (general-purpose registers) included in each of the first and second processors 101A and 101B, and outputs the test data output of the processor. JTAG instruction commands (register read (for processor diagnosis)) to be output from the (TDO) terminal are sequentially generated and output as the test data input (TDI) signal, and when the reading of the state of the last internal circuit is completed The iterative process of returning to the internal circuit from which data was first read and reading the state again may be repeated during normal operation.

このような構成とすることで、例えば図1に例示したデュアルプロセッサのロックステップ方式と比べて、故障発生から故障検出までの時間を短縮可能としている。また、本実施形態においては、図3に例示した構成と比べても、命令コマンドの書き込み、内部信号読み出しの時間をしている。   By adopting such a configuration, for example, compared with the dual processor lockstep method illustrated in FIG. Further, in the present embodiment, the time for writing an instruction command and reading an internal signal is set as compared with the configuration illustrated in FIG.

なお、本実施形態においては、システム開発時等において、デバッグモードでシステムが起動した場合、プロセッサ監視用JTAGコントローラ105は活性化されず、PC等のデバッグ装置からのデバッグ用のJTAG信号が第1、第2のプロセッサ101A、101Bに供給される。以下、例示的な実施形態について図面を参照して説明する。   In this embodiment, when the system is started in the debug mode at the time of system development or the like, the processor monitoring JTAG controller 105 is not activated, and the debugging JTAG signal from the debugging device such as the PC is the first. , Supplied to the second processors 101A and 101B. Hereinafter, exemplary embodiments will be described with reference to the drawings.

<実施形態1>
図5は、JTAGを用いたシステム(デバイス)に、本発明を適用した一例を示す図である。
<Embodiment 1>
FIG. 5 is a diagram showing an example in which the present invention is applied to a system (device) using JTAG.

図5を参照すると、半導体装置(SOC)100は、プロセッサ内のJTAG回路を制御するプロセッサ監視用JTAGコントローラ105(図20の105と同一)と、デバッグ用のJTAG信号(デバッグ用TDI、TMS、TRST、TCK)と、プロセッサ監視用JTAGコントローラ105から出力される監視用JTAG信号(監視用JTDI、TMS、TRST、TCK)の2セットのJTAG信号のうちの一方のセットを選択し、選択したセットのJTAG信号を、プロセッサ#0とプロセッサ#1に供給するJTAGセレクタ106を備えている。   Referring to FIG. 5, a semiconductor device (SOC) 100 includes a processor monitoring JTAG controller 105 (same as 105 in FIG. 20) for controlling a JTAG circuit in the processor, and a debugging JTAG signal (debugging TDI, TMS, TRST, TCK) and a monitoring JTAG signal (monitoring JTDI, TMS, TRST, TCK) output from the processor monitoring JTAG controller 105, one set of two sets of JTAG signals is selected and the selected set is selected The JTAG selector 106 supplies the JTAG signal to the processor # 0 and the processor # 1.

デバッグ用のJTAG信号(デバッグ用TDI、TMS、TRST、TCK、TDO)は、不図示のPC等(図6のPC200参照)に接続される。デバッグ用のJTAG信号は、システム開発時に、プロセッサ101A、101Bのソフトウェアのデバッグに用いられる。   JTAG signals for debugging (TDI, TMS, TRST, TCK, TDO for debugging) are connected to a PC (not shown) or the like (see PC 200 in FIG. 6). The debugging JTAG signal is used for debugging the software of the processors 101A and 101B during system development.

半導体装置(SOC)100の外部端子(ピン)から入力され、プロセッサ監視用JTAGコントローラ105に供給される制御信号であるデバッグ指示信号は、システムの通常運用時、非活性状態(非デバッグモード、システム通常運用)に設定される。このとき、プロセッサ監視用JTAGコントローラ105は、プロセッサ#0、プロセッサ#1から内部信号を読み出すために、監視用のTCK、TRST、TMS、TDIを生成する。   A debug instruction signal, which is a control signal input from an external terminal (pin) of the semiconductor device (SOC) 100 and supplied to the processor monitoring JTAG controller 105, is in an inactive state (non-debug mode, system Normal operation). At this time, the processor monitoring JTAG controller 105 generates TCK, TRST, TMS, and TDI for monitoring in order to read internal signals from the processor # 0 and the processor # 1.

JTAGセレクタ106は、デバッグ指示信号が活性状態(デバッグモード)であるか、非活性状態(非デバッグモード)であるかに応じて、デバッグ用のJTAG信号のセット、又は、監視用のJTAG信号のセットを選択する。   Depending on whether the debug instruction signal is in an active state (debug mode) or in an inactive state (non-debug mode), the JTAG selector 106 sets the debug JTAG signal or the JTAG signal for monitoring. Select a set.

なお、埋め込みシステム等のシステム開発時のソフトウェア・デバッグ工程では、半導体装置100は、デバッグ指示信号は活性状態(デバッグモード)に設定されて起動される。デバッグモード時、JTAGセレクタ106は、デバッグ用のJTAG信号セットを選択する。この場合、デバッグ用TDIは、図3と同様、JTAG回路を備えたプロセッサ#0、#1間でデイジー・チェーン接続される。デバッグ用TCK、デバッグ用TMS、デバッグ用TRSTはそれぞれ、プロセッサ#0、#1に並列に供給される。すなわち、JTAGセレクタ106は、デバッグ用TDIを入力して、プロセッサ#0用TDIとして、プロセッサ#0のTDI端子にシリアルに供給し、プロセッサ#0のTDO端子からのシリアル出力TDO#0を受け、このTDO#0をプロセッサ#1用TDIとしてプロセッサ#1のTDI端子にシリアルに入力し、プロセッサ#1のTDO端子からのシリアル出力TDO#1を受け、デバッグ用TDO信号としてシリアルに出力する。なお、デバッグ用TMS、TCK、TRSTはそれぞれプロセッサ#0、#1のTMS、TCK、TRST端子に並列に供給される。   In the software debugging process during system development of an embedded system or the like, the semiconductor device 100 is activated with the debug instruction signal set to the active state (debug mode). In the debug mode, the JTAG selector 106 selects a JTAG signal set for debugging. In this case, the debugging TDI is connected in a daisy chain between the processors # 0 and # 1 having the JTAG circuit as in FIG. The debug TCK, the debug TMS, and the debug TRST are supplied in parallel to the processors # 0 and # 1, respectively. That is, the JTAG selector 106 inputs the debug TDI, supplies it serially to the TDI terminal of the processor # 0 as the TDI for the processor # 0, receives the serial output TDO # 0 from the TDO terminal of the processor # 0, The TDO # 0 is serially input to the TDI terminal of the processor # 1 as the TDI for the processor # 1, receives the serial output TDO # 1 from the TDO terminal of the processor # 1, and is serially output as a debugging TDO signal. The debug TMS, TCK, and TRST are supplied in parallel to the TMS, TCK, and TRST terminals of the processors # 0 and # 1, respectively.

JTAGを用いたソフトウェア・デバッグ等によるシステム開発が完了し、例えば実機製品として通常動作させる時には、監視用のJTAG信号を用いてプロセッサの監視が行われる。すなわち、通常モードで起動する場合、デバッグ指示信号は、非デバッグモードに設定される。JTAGセレクタ106は、プロセッサ監視用JTAGコントローラ105からの監視用JTAG信号を選択する。JTAGセレクタ106は、監視用JTAG信号のうち、監視用TDIを、プロセッサ#0用TDI、プロセッサ#1用TDIとして、プロセッサ#0と、プロセッサ#1のTDI端子に並列(同時)に供給する。JTAGセレクタ106で選択された監視用TCK、監視用TMS、監視用TRSTは、プロセッサ#0、#1のTCK端子、TMS端子、TRST端子に並列(同時)に供給される。   When system development by software debugging using JTAG or the like is completed, for example, when the system is normally operated as an actual product, the processor is monitored using a monitoring JTAG signal. That is, when starting in the normal mode, the debug instruction signal is set to the non-debug mode. The JTAG selector 106 selects the monitoring JTAG signal from the processor monitoring JTAG controller 105. Of the monitoring JTAG signals, the JTAG selector 106 supplies the monitoring TDI in parallel (simultaneously) to the processor # 0 and the TDI terminal of the processor # 1 as the TDI for the processor # 0 and the TDI for the processor # 1. The monitoring TCK, the monitoring TMS, and the monitoring TRST selected by the JTAG selector 106 are supplied in parallel (simultaneously) to the TCK terminal, the TMS terminal, and the TRST terminal of the processors # 0 and # 1.

プロセッサ#0、#1から同時に出力されるTDO信号TDO#、TDO#1は、TDO信号比較回路103に入力されて比較される。なお、通常動作時(非デバッグモード時)に、プロセッサ#0からのTDO端子からシリアルに出力されるTDO#0は、JTAGセレクタ106にシリアルに入力されるが、JTAGセレクタ106では選択されない(セレクタ106はプロセッサ監視用JTAGコントローラ105からの監視用TDIを選択して、プロセッサ101Bに出力する)。   The TDO signals TDO # and TDO # 1 output simultaneously from the processors # 0 and # 1 are input to the TDO signal comparison circuit 103 and compared. Note that during normal operation (non-debug mode), TDO # 0 that is serially output from the TDO terminal from the processor # 0 is serially input to the JTAG selector 106, but is not selected by the JTAG selector 106 (selector). 106 selects the monitoring TDI from the processor monitoring JTAG controller 105 and outputs it to the processor 101B).

TDO信号比較回路103は、TDO#、TDO#1の比較の結果、不一致の場合、プロセッサ故障通知信号を出力する。TDO信号比較回路103は、プロセッサ監視用JTAGコントローラ105からの監視用TCK、監視用TRSTを入力する。   The TDO signal comparison circuit 103 outputs a processor failure notification signal when there is a mismatch as a result of the comparison between TDO # and TDO # 1. The TDO signal comparison circuit 103 receives the monitoring TCK and the monitoring TRST from the processor monitoring JTAG controller 105.

このように、本実施形態によれば、システムの開発時等に用いられるソフトウェア・デバッグ機能を具備するとともに、ソフトウェア・デバッグ機能を用いて開発されたシステム製品の通常運用時には、監視用のJTAG信号及びプロセッサ内のJTAG回路を用いてプロセッサの故障検出のための監視(診断)を行うことができる。すなわち、本実施形態においては、プロセッサ内のJTAG回路を、システム開発時のソフトウェア・デバッグ用と、システム開発後の実機製品等で行われる監視用の二つの用途に利用している。   As described above, according to the present embodiment, the JTAG signal for monitoring is provided in the normal operation of the system product developed using the software debug function while having the software debug function used at the time of system development or the like. In addition, monitoring (diagnosis) for detecting a failure of the processor can be performed using a JTAG circuit in the processor. In other words, in the present embodiment, the JTAG circuit in the processor is used for two purposes: software debugging at the time of system development, and monitoring performed by an actual product after system development.

なお、図5において、プロセッサ#0バス信号102A、プロセッサ#1バス信号102Bに接続されたプロセッサ同期化回路104は、プロセッサ#0とプロセッサ#1からそれぞれプロセッサ#0バス信号102A、プロセッサ#1バス信号102Bに出力されるプログラム処理結果を同期化させ、一方を、周辺回路制御バス114に出力する。周辺回路制御バス114は図1の周辺回路制御バスと基本的に同一である。   In FIG. 5, the processor synchronization circuit 104 connected to the processor # 0 bus signal 102A and the processor # 1 bus signal 102B is sent from the processor # 0 and the processor # 1 to the processor # 0 bus signal 102A and the processor # 1 bus, respectively. The program processing result output to the signal 102B is synchronized, and one is output to the peripheral circuit control bus 114. The peripheral circuit control bus 114 is basically the same as the peripheral circuit control bus of FIG.

<JTAGセレクタ>
図6は、図5に示した構成においてJTAGセレクタ106の構成を説明する図である。図6を参照すると、JTAGセレクタ106は、デバッグ指示信号が非活性状態のとき、第1入力、デバッグ指示信号が活性状態のとき、第2入力を選択するセレクタ107、108、109、110、111を備えている。
<JTAG selector>
FIG. 6 is a diagram for explaining the configuration of the JTAG selector 106 in the configuration shown in FIG. Referring to FIG. 6, the JTAG selector 106 is a selector 107, 108, 109, 110, 111 that selects the first input when the debug instruction signal is inactive, and the second input when the debug instruction signal is active. It has.

セレクタ107の第1、第2入力は、プロセッサ監視用JTAGコントローラ105からの監視用TDIと、PC200からのデバッグ用TDIにそれぞれ接続され、出力がプロセッサ#0のTDI端子に接続されている。   The first and second inputs of the selector 107 are connected to the monitoring TDI from the processor monitoring JTAG controller 105 and the debugging TDI from the PC 200, respectively, and the output is connected to the TDI terminal of the processor # 0.

セレクタ108の第1、第2入力は、プロセッサ監視用JTAGコントローラ105からの監視用TDIとプロセッサ#0のTDO端子にそれぞれ接続され、出力がプロセッサ#1のTDI端子に接続されている。   The first and second inputs of the selector 108 are connected to the monitoring TDI from the processor monitoring JTAG controller 105 and the TDO terminal of the processor # 0, respectively, and the output is connected to the TDI terminal of the processor # 1.

セレクタ109の第1、第2入力は、プロセッサ監視用JTAGコントローラ105からの監視用TMSと、PC200からのデバッグ用TMSにそれぞれ接続され、出力がプロセッサ#0、#1のTMS端子に接続されている。   The first and second inputs of the selector 109 are connected to the monitoring TMS from the processor monitoring JTAG controller 105 and the debugging TMS from the PC 200, respectively, and the outputs are connected to the TMS terminals of the processors # 0 and # 1. Yes.

セレクタ110の第1、第2入力は、プロセッサ監視用JTAGコントローラ105からの監視用TCKと、PC200からのデバッグ用TCKにそれぞれ接続され、出力がプロセッサ#0、#1のTCK端子に接続されている。   The first and second inputs of the selector 110 are connected to the monitoring TCK from the processor monitoring JTAG controller 105 and the debugging TCK from the PC 200, respectively, and the outputs are connected to the TCK terminals of the processors # 0 and # 1. Yes.

セレクタ111の第1、第2入力は、プロセッサ監視用JTAGコントローラ105からの監視用TRSTと、PC200からのデバッグ用TRSTにそれぞれ接続され、出力がプロセッサ#0、#1のTRST端子に接続されている。   The first and second inputs of the selector 111 are connected to the monitoring TRST from the processor monitoring JTAG controller 105 and the debugging TRST from the PC 200, respectively, and the outputs are connected to the TRST terminals of the processors # 0 and # 1. Yes.

プロセッサ#0、#1のTDO端子は、TDO信号比較回路103に入力されている。プロセッサ#1のTDO端子は、デバッグ用TDO信号としてPC200に出力される。   The TDO terminals of the processors # 0 and # 1 are input to the TDO signal comparison circuit 103. The TDO terminal of the processor # 1 is output to the PC 200 as a debug TDO signal.

監視用JTAG信号を選択する時、デバッグ指示信号は、非活性状態に設定され、セレクタ107、108は、ともに第1入力を選択し、プロセッサ監視用JTAGコントローラ105からの監視用TDIを、プロセッサ#0のTDI端子とプロセッサ#1のTDI端子に並列に供給する。   When the monitoring JTAG signal is selected, the debug instruction signal is set to an inactive state, the selectors 107 and 108 both select the first input, and the monitoring TDI from the processor monitoring JTAG controller 105 is set to the processor #. 0 is supplied in parallel to the TDI terminal of processor # 1 and the TDI terminal of processor # 1.

デバッグ用JTAG信号を選択する時は、デバッグ指示信号は活性状態に設定され、セレクタ107、108はともに第2入力を選択する。セレクタ107は、プロセッサ監視用JTAGコントローラ105からのデバッグ用TDIをプロセッサ#0のTDI端子に供給し、セレクタ108はプロセッサ#0のTDO端子からの出力信号を、プロセッサ#1のTDI端子に供給する。プロセッサ#1からのTDO信号(デバッグ用TDO)は、デバッグ用TDOとして外部のPC等に出力される。   When the debug JTAG signal is selected, the debug instruction signal is set to the active state, and both the selectors 107 and 108 select the second input. The selector 107 supplies the debugging TDI from the processor monitoring JTAG controller 105 to the TDI terminal of the processor # 0, and the selector 108 supplies the output signal from the TDO terminal of the processor # 0 to the TDI terminal of the processor # 1. . A TDO signal (debug TDO) from the processor # 1 is output to an external PC or the like as a debug TDO.

本実施形態によれば、通常動作時には、監視用TDIを、プロセッサ#0とプロセッサ#1のTDI端子に並列(同時)に供給し、プロセッサ#0とプロセッサ#1から並列に出力されるTDO#0、TDO#1をTDO信号比較回路103で比較する。   According to the present embodiment, during normal operation, the monitoring TDI is supplied in parallel (simultaneously) to the TDI terminals of the processor # 0 and the processor # 1, and TDO # output in parallel from the processor # 0 and the processor # 1. 0 and TDO # 1 are compared by the TDO signal comparison circuit 103.

<命令コマンド設定/プロセッサ内部信号読み出し・アクセス>
図7は、本実施形態のJTAG信号のアクセスの一例を示す図であり、図7(A)は命令コマンド設定時の命令コマンド、図7(B)はプロセッサ内部信号読み出し時である。本実施形態において、命令コマンド、プロセッサ内部信号は、プロセッサ#0、#1に関してTDO端子からそれぞれ並列にシリアル入力、シリアル出力される。
<Instruction command setting / processor internal signal read / access>
7A and 7B are diagrams illustrating an example of access to the JTAG signal according to the present embodiment. FIG. 7A illustrates an instruction command when an instruction command is set, and FIG. 7B illustrates a processor internal signal read time. In this embodiment, the instruction command and the processor internal signal are serially input and output in parallel from the TDO terminal for the processors # 0 and # 1, respectively.

図4(A)、図4(B)に示した、アクセス時間(プロセッサ#0と#1への命令コマンド設定に要する時間と、プロセッサ#0と#1の内部信号の読み出し時間)と、図7(A)、図7(B)のアクセス時間との比較からも明らかなように、図7(A)、図7(B)のアクセス時間は、それぞれ、図4(A)、図4(B)のアクセス時間の約半分である。   FIG. 4 (A) and FIG. 4 (B), the access time (the time required to set instruction commands to the processors # 0 and # 1, and the read time of the internal signals of the processors # 0 and # 1), As is clear from the comparison with the access times of FIGS. 7A and 7B, the access times of FIGS. 7A and 7B are as shown in FIGS. 4A and 4B, respectively. It is about half the access time of B).

上記の通り、本実施形態によれば、プロセッサ監視用JTAGコントローラ105と、JTAGセレクタ106を備え、デバッグモード時以外のシステムの通常運用中(プロセッサの監視モード時)には、プロセッサ#0のからの内部信号とプロセッサ#1からの内部信号をそれぞれTDO#0とTDO#1に同時にTDO信号比較回路103に出力することができる。   As described above, according to the present embodiment, the processor monitoring JTAG controller 105 and the JTAG selector 106 are provided, and the processor # 0 starts during normal operation of the system other than the debug mode (in the processor monitoring mode). And the internal signal from the processor # 1 can be simultaneously output to the TDO signal comparison circuit 103 on TDO # 0 and TDO # 1, respectively.

本実施形態において、通常動作時にプロセッサ#0とプロセッサ#1は、不図示の主メモリからフェッチした同一の命令(プログラム)を同時に実行している。このため、2つのプロセッサが正常に動作している場合には、プロセッサ#0のTDO#0とプロセッサ#1のTDO#1から同一の値(ビット信号)がシリアルに出力される。   In the present embodiment, during normal operation, the processor # 0 and the processor # 1 simultaneously execute the same instruction (program) fetched from a main memory (not shown). Therefore, when two processors are operating normally, the same value (bit signal) is serially output from TDO # 0 of processor # 0 and TDO # 1 of processor # 1.

プロセッサ#0のTDO#0とプロセッサ#1のTDO#1の値を比較するTDO信号比較回路103において、TDO#0とTDO#1の対応するシリアルビット信号に不一致が検出された場合、プロセッサ故障信号を半導体装置外部に出力する。   If the TDO signal comparison circuit 103 that compares the values of TDO # 0 of processor # 0 and TDO # 1 of processor # 1 detects a mismatch between the corresponding serial bit signals of TDO # 0 and TDO # 1, the processor fails The signal is output outside the semiconductor device.

かかる構成の本実施形態によれば、プロセッサ#0のTDO#0とプロセッサ#1の汎用レンジスタの値を順次TDO端子から出力するJTAG命令(コマンド)を設定することで、図2を参照して説明した故障(プロセッサ#0の汎用レジスタ0の故障等、プロセッサバスの出力に影響を与えない故障)の検出を可能としている。前述したように、図1に例示したデュアルプロセッサ・ロックステップ方式では、この種の故障は検出できない。   According to this embodiment having such a configuration, a JTAG instruction (command) for sequentially outputting the values of the TDO # 0 of the processor # 0 and the general-purpose ranger of the processor # 1 from the TDO terminal is set with reference to FIG. It is possible to detect the described failure (failure that does not affect the output of the processor bus such as failure of the general-purpose register 0 of the processor # 0). As described above, the dual processor lockstep method illustrated in FIG. 1 cannot detect this type of failure.

<プロセッサ監視用JTAGコントローラ>
図8は、図5及び図6に示したプロセッサ監視用JTAGコントローラ105の構成の一例を示す図である。図8に示すように、プロセッサ監視用JTAGコントローラ105は、デバッグモード判定回路121と、イニシャライズ制御カウンタ122と、JTAG信号制御カウンタ123と、命令コマンドカウンタ124と、クロックゲート(ClockGate)125と、TMS制御回路126と、TDI制御回路127を備えている。
<Processor monitoring JTAG controller>
FIG. 8 is a diagram illustrating an example of the configuration of the processor monitoring JTAG controller 105 illustrated in FIGS. 5 and 6. As shown in FIG. 8, the processor monitoring JTAG controller 105 includes a debug mode determination circuit 121, an initialization control counter 122, a JTAG signal control counter 123, an instruction command counter 124, a clock gate (ClockGate) 125, and a TMS. A control circuit 126 and a TDI control circuit 127 are provided.

デバッグモード判定回路121は、例えばシステムのリセット解除時に、デバッグ指示信号の状態を確認し、デバッグ指示信号が非活性状態(非デバッグモード、通常動作時)の場合、プロセッサ監視用JTAGコントローラ105を起動するため、監視開始指示信号を活性状態(例えばHigh)にして、イニシャライズ制御カウンタ122に出力する。特に制限されないが、監視開始指示信号は、クロック信号(Clock)の1サイクルのパルス幅のワンショットパルス(Highパルス)からなる。   The debug mode determination circuit 121 checks the state of the debug instruction signal when the system is reset, for example, and activates the processor monitoring JTAG controller 105 when the debug instruction signal is in an inactive state (non-debug mode, normal operation). Therefore, the monitoring start instruction signal is activated (for example, High) and output to the initialization control counter 122. Although not particularly limited, the monitoring start instruction signal is composed of a one-shot pulse (High pulse) having a pulse width of one cycle of the clock signal (Clock).

イニシャライズ制御カウンタ122は、
・監視用TRSTのリセット解除のタイミング、
・監視用TCKのクロック供給タイミング(クロックイネーブル信号)、及び、
・JTAG信号制御カウンタ123の制御開始指示信号を制御する。
The initialization control counter 122
・ Reset release timing of monitoring TRST,
-The clock supply timing (clock enable signal) of the monitoring TCK, and
Control the control start instruction signal of the JTAG signal control counter 123.

JTAG信号制御カウンタ123は、
・TMS制御回路126、
・TDI制御回路127、及び、
・命令コマンドカウンタ124のカウントアップ指示信号を制御する。
The JTAG signal control counter 123
-TMS control circuit 126,
-TDI control circuit 127, and
Control the count-up instruction signal of the command command counter 124.

JTAG信号制御カウンタ123は、イニシャライズ制御カウンタ122から出力される制御開始指示信号の活性化を受け、クロック信号のカウント動作を開始し、そのカウント値をTMS制御回路126、TDI制御回路127に入力する。また、JTAG信号制御カウンタ123は、カウントアップ指示信号を生成し、命令コマンドカウンタ124に供給する。   The JTAG signal control counter 123 receives the activation of the control start instruction signal output from the initialization control counter 122, starts the clock signal count operation, and inputs the count value to the TMS control circuit 126 and the TDI control circuit 127. . The JTAG signal control counter 123 generates a count up instruction signal and supplies it to the command command counter 124.

命令コマンドカウンタ124は、プロセッサ#0とプロセッサ#1に出力するJTAGの命令コマンドを生成する。命令コマンドカウンタ124は、JTAG信号制御カウンタ123からのカウントアップ指示信号を受けてカウント値を1つカウントアップさせる。命令コマンドカウンタ124のカウント値はTDI制御回路127に入力される。   The instruction command counter 124 generates JTAG instruction commands to be output to the processor # 0 and the processor # 1. The command command counter 124 receives the count up instruction signal from the JTAG signal control counter 123 and increments the count value by one. The count value of the command command counter 124 is input to the TDI control circuit 127.

TMS制御回路126は、JTAG信号制御カウンタ123のカウント値を基に、監視用TMS信号を生成する。   The TMS control circuit 126 generates a monitoring TMS signal based on the count value of the JTAG signal control counter 123.

TDI制御回路127は、JTAG信号制御カウンタ123のカウント値と、命令コマンドカウンタ124のカウント値を基に、監視用TDI信号を生成してシリアルに出力する。TDI制御回路127からの監視用TDI信号(命令コマンド)は、プロセッサ#0、#1のJTAG回路の命令レジスタにセットされる。   The TDI control circuit 127 generates a monitoring TDI signal based on the count value of the JTAG signal control counter 123 and the count value of the command command counter 124 and outputs it serially. The monitoring TDI signal (command command) from the TDI control circuit 127 is set in the command register of the JTAG circuit of the processors # 0 and # 1.

<TDO信号比較回路>
図9は、図5、図6に示したTDO信号比較回路103の構成の一例を示す図である。図9を参照すると、TDO信号比較回路103は、排他的論理和回路131と、セレクタ132と、リセット機能付きのフリップフロップ133と、High固定回路(Clump H)134を備えている。
<TDO signal comparison circuit>
FIG. 9 is a diagram illustrating an example of the configuration of the TDO signal comparison circuit 103 illustrated in FIGS. 5 and 6. Referring to FIG. 9, the TDO signal comparison circuit 103 includes an exclusive OR circuit 131, a selector 132, a flip-flop 133 with a reset function, and a high fixing circuit (Clamp H) 134.

排他的論理和回路131は、プロセッサ#0の出力信号であるTDO#0と、プロセッサ#1の出力信号であるTDO#1の排他的論理和(Exclusive OR)をとり、一致・不一致を検出する。排他的論理和回路131は、一致のとき(TDO#0=TDO#1のとき)、Low、不一致のとき(TDO#0≠TDO#1のとき)、Highを出力する。   The exclusive OR circuit 131 calculates the exclusive OR of the TDO # 0 that is the output signal of the processor # 0 and the TDO # 1 that is the output signal of the processor # 1 and detects a match / mismatch. . The exclusive OR circuit 131 outputs High when coincident (when TDO # 0 = TDO # 1), Low when coincident (when TDO # 0 ≠ TDO # 1).

セレクタ132は、フリップフロップ133の出力とHigh固定回路134のHigh電位とを第1、第2の入力に入力し、排他的論理和回路131の出力を選択制御信号として、選択制御信号がLowのとき(TDO#0=TDO#1のとき)、第1入力(フリップフロップ133の出力)を選択し、選択した信号を、フリップフロップ133のデータ端子に供給する。セレクタ132は、選択制御信号がHighのとき(TDO#0≠TDO#1のとき)、第2入力(High固定電位)を選択し、フリップフロップ133のデータ端子に供給する。   The selector 132 inputs the output of the flip-flop 133 and the High potential of the High fixing circuit 134 to the first and second inputs, uses the output of the exclusive OR circuit 131 as the selection control signal, and the selection control signal is Low. When (when TDO # 0 = TDO # 1), the first input (output of the flip-flop 133) is selected and the selected signal is supplied to the data terminal of the flip-flop 133. The selector 132 selects the second input (High fixed potential) and supplies it to the data terminal of the flip-flop 133 when the selection control signal is High (when TDO # 0 ≠ TDO # 1).

フリップフロップ(D-FF)133は、セレクタ132の出力をデータ端子Dに受け、監視用TCKの立ち上がりエッジに応答してデータ端子Dの信号をサンプルして出力端子Qに出力するD型フリップフロップで構成される。フリップフロップ(D-FF)133の出力端子Qの出力信号は、プロセッサ故障通信信号として出力される(Highのとき、故障有り)。   The flip-flop (D-FF) 133 receives the output of the selector 132 at the data terminal D, samples the signal at the data terminal D in response to the rising edge of the monitoring TCK, and outputs it to the output terminal Q. Consists of. The output signal of the output terminal Q of the flip-flop (D-FF) 133 is output as a processor failure communication signal (when it is High, there is a failure).

排他的論理和回路131で不一致(出力がHigh)が検出されると、セレクタ132は第2入力のHigh固定電位を選択し、フリップフロップ133は、監視用TCKの立ち上がりエッジに同期して、出力端子Q(プロセッサ故障通知信号)を活性状態(High)とする。   When the exclusive OR circuit 131 detects a mismatch (output is High), the selector 132 selects the High fixed potential of the second input, and the flip-flop 133 outputs in synchronization with the rising edge of the monitoring TCK. Terminal Q (processor failure notification signal) is activated (High).

プロセッサ故障通知信号は、ひとたび、活性状態(High)に設定されると、フリップフロップ133が、リセット信号Resetによってリセットされるまで、活性状態(High)に保持される。すなわち、排他的論理和回路131で、ひとたび、不一致(TDO#0≠TDO#1)が検出されると、それ以降、たとえ排他的論理和回路131で一致(TDO#0=TDO#1)が検出され続けても、プロセッサ故障通知信号はHighに維持される。より詳細には、排他的論理和回路131で一致が検出されると、セレクタ132は、第1入力であるフリップフロップ133の出力端子Qの出力信号(High)を選択してフリップフロップ133のデータ端子Dに帰還入力し、フリップフロップ133で監視用TCKに応答してサンプルされるが、フリップフロップ133の出力端子Qの前のサンプル値がHighであるため、フリップフロップ133は、Highをサンプルし続けることになり、その結果、プロセッサ故障通知信号はHighに維持される。そして、リセット信号Resetが活性化された時点でプロセッサ故障通知信号はLowに設定される。   Once the processor failure notification signal is set to the active state (High), the flip-flop 133 is held in the active state (High) until the flip-flop 133 is reset by the reset signal Reset. That is, once a mismatch (TDO # 0 ≠ TDO # 1) is detected by the exclusive OR circuit 131, a match (TDO # 0 = TDO # 1) is detected by the exclusive OR circuit 131 thereafter. Even if it continues to be detected, the processor failure notification signal is kept High. More specifically, when the coincidence is detected by the exclusive OR circuit 131, the selector 132 selects the output signal (High) of the output terminal Q of the flip-flop 133 which is the first input, and the data of the flip-flop 133 is selected. Feedback input to the terminal D and sampled in response to the monitoring TCK by the flip-flop 133, but since the previous sample value of the output terminal Q of the flip-flop 133 is High, the flip-flop 133 samples High. As a result, the processor failure notification signal is maintained high. Then, when the reset signal Reset is activated, the processor failure notification signal is set to Low.

なお、排他的論理和回路131で不一致がこれまで一度も検出されない状態では、排他的論理和回路131の出力信号はLowであることから、セレクタ132を介して、フリップフロップ133の出力信号がフリップフロップ133のデータ端子Dに帰還入力され、監視用TCKの立ち上がりエッジに応答してサンプルされる。フリップフロップ133は、初期化時等のリセット時に、出力端子QがLowにリセットされているため、プロセッサ故障通知信号はLowに維持される。   In the state where the exclusive OR circuit 131 has never detected a mismatch, the output signal of the exclusive OR circuit 131 is Low, so that the output signal of the flip-flop 133 is flip-flops via the selector 132. Is fed back to the data terminal D of the group 133 and sampled in response to the rising edge of the monitoring TCK. Since the output terminal Q of the flip-flop 133 is reset to Low at the time of initialization or the like, the processor failure notification signal is maintained Low.

TDO信号比較回路103は、プロセッサ監視用JTAGコントローラ105が出力する監視用TCKに同期して動作する。このため、プロセッサ監視用JTAGコントローラ105が起動する通常モード時にのみ動作する(図8のプロセッサ監視用JTAGコントローラ105のクロックゲート回路125から監視用TCKの供給が開始されて動作する)。   The TDO signal comparison circuit 103 operates in synchronization with the monitoring TCK output from the processor monitoring JTAG controller 105. For this reason, it operates only in the normal mode in which the processor monitoring JTAG controller 105 is activated (the operation starts with the supply of the monitoring TCK from the clock gate circuit 125 of the processor monitoring JTAG controller 105 in FIG. 8).

デバッグモード時には、TDO信号比較回路103は動作しない。この場合、フリップフロップ133は、初期化時等のリセット時に、リセット信号Resetによりリセットされ、その出力端子Q(プロセッサ故障通知信号)はLowとされ、監視用TCKの供給がないため、プロセッサ故障通知信号はLowに維持される。以上、デバッグモード時におけるプロセッサ故障通知信号の扱いを、図9の回路構成の範囲で説明したが、上記以外の任意の方法で、デバッグモードにおけるプロセッサ故障通知信号Lowに固定する構成としてもよいことは勿論である。   In the debug mode, the TDO signal comparison circuit 103 does not operate. In this case, the flip-flop 133 is reset by a reset signal Reset when resetting at initialization or the like, and its output terminal Q (processor failure notification signal) is set to Low, and no monitoring TCK is supplied. The signal is kept low. The handling of the processor failure notification signal in the debug mode has been described above in the range of the circuit configuration in FIG. 9, but it may be configured to be fixed to the processor failure notification signal Low in the debug mode by any method other than the above. Of course.

本実施形態におけるプロセッサ101A、101Bの内部回路の故障検出(図5等では不図示の汎用レジスタの読み出し)の手順を説明する。前提として、通常モード時に、プロセッサ#0とプロセッサ#1は互いに同一の処理を実行する。   A procedure for detecting a failure in an internal circuit of the processors 101A and 101B in this embodiment (reading a general-purpose register not shown in FIG. 5) will be described. As a premise, the processor # 0 and the processor # 1 execute the same processing in the normal mode.

<命令コマンドの一例>
図10に示すように、プロセッサ101A、101B(図5、図6)内の不図示のJTAG回路の命令レジスタ(6ビット)の値として、0b000000〜0b011111(ただし、0bは2進表示を表す)には、プロセッサ監視用の命令コマンド(プロセッサ内の汎用レジスタ#0〜#31のリード(診断用)が割り当てられている。リード(診断用)は、汎用レジスタの値を、バウンダリスキャン・レジスタを介してTDO端子から読み出すためのJTAG命令コマンドである。0b100000〜0b111100は、デバッグ用の命令コマンドに割当てられる。0b111101、0b111110、0b111111は、それぞれSAMPLE/PRELOAD、EXTEST、BYPASSとされる。図10において、データシフトレジスタは、プロセッサ内部のJTAG回路のデータレジスタを表している。
<Example of command>
As shown in FIG. 10, 0b000000 to 0b011111 (where 0b represents a binary display) as a value of an instruction register (6 bits) of a JTAG circuit (not shown) in the processors 101A and 101B (FIGS. 5 and 6) Is assigned a command for monitoring the processor (reading (diagnosis) of general-purpose registers # 0 to # 31 in the processor. Read (diagnosis) is a value of the general-purpose register and a boundary scan register. Jb instruction commands for reading out from the TDO terminal via 0.0b100000 to 0b111100 are assigned to debugging instruction commands, 0b111101, 0b111110, and 0b111111 are SAMPLE / PRELOAD, EXTEST, and BYPASS, respectively. The day Shift register represents the data registers of the JTAG circuit in the processor.

EXTEST、SAMPLE/PRELOAD、BYPASSは必須命令である。EXTESTはユーザが与えたビット列を各端子から出力し、デバイス外部の物理的接続をテストする(通常動作を停止しテストモードに入る)。   EXTEST, SAMPLE / PRELOAD, and BYPASS are essential instructions. EXTEST outputs a bit string provided by the user from each terminal, and tests a physical connection outside the device (stops normal operation and enters a test mode).

SAMPLE/PRELOADは、通常動作中のデバイスのピンからデータの取り込みテストし、指定パターンをデバイスピンに出力させることができる。BYPASSは、TDIとTDO間に1ビットのバイパス・レジスタを配置することによって、当該デバイスをバイパスし、選択されたデバイスにTCKに同期して転送することができる。SAMPLE/PRELOAD、BYPASSはデバイスは通用動作を続ける。   SAMPLE / PRELOAD can test data fetch from a pin of a device in normal operation and output a specified pattern to the device pin. BYPASS can bypass the device by placing a 1-bit bypass register between TDI and TDO and transfer it to the selected device in synchronization with TCK. In SAMPLE / PRELOAD and BYPASS, the device continues to operate normally.

図10の命令コマンドの汎用レジスタ#0〜#31のリード(診断用)コマンドは、監視用JTAG信号の監視用TDI信号(シリアルビット信号)として、プロセッサ#0(101A)とプロセッサ#1(101B)に供給され、プロセッサ#0(101A)とプロセッサ#1(101B)内のJTAG回路の命令レジスタに設定される。通常モードで起動時、プロセッサ監視用JTAGコントローラ105のTDI制御回路127(図8参照)は、JTAG信号制御カウンタ123(図8参照)のカウント値と、命令コマンドカウンタ124(図8参照)のカウント値に基づき、監視用TDI信号を生成し、6ビット信号:0b000000、0b000001、・・・0b011111を、例えばこの順で繰り返し生成し、プロセッサ#0(101A)とプロセッサ#1(101B)の汎用レジスタ#0〜#31の値をTDO#0、TDO#1として読み出すことを、例えばシステムが停止するまで繰り返す。なお、図11では、プロセッサ#0(101A)とプロセッサ#1(101B)の汎用レジスタの個数を32個としたが、かかる構成に制限されるものでない。   The read (diagnostic) commands of the general purpose registers # 0 to # 31 of the instruction command in FIG. 10 are the processor T0 (101A) and the processor # 1 (101B) as the monitoring TDI signal (serial bit signal) of the monitoring JTAG signal. ) And set in the instruction register of the JTAG circuit in the processor # 0 (101A) and the processor # 1 (101B). When starting in the normal mode, the TDI control circuit 127 (see FIG. 8) of the processor monitoring JTAG controller 105 counts the count value of the JTAG signal control counter 123 (see FIG. 8) and the command command counter 124 (see FIG. 8). Based on the value, a TDI signal for monitoring is generated, and 6-bit signals: 0b000000, 0b000001,... Reading the values of # 0 to # 31 as TDO # 0 and TDO # 1 is repeated until the system stops, for example. In FIG. 11, the number of general-purpose registers of processor # 0 (101A) and processor # 1 (101B) is 32, but the configuration is not limited to this.

<故障検出手順>
図11は、本実施形態におけるプロセッサの内部故障検出の手順を説明する流れ図(フローチャート)である。システムが起動すると(ステップS1)、プロセッサ監視用JTAGコントローラ105は、デバッグ指示信号の値に基づき、通常モード起動か、デバッグモード起動であるかを判定する(ステップS2)。
<Fault detection procedure>
FIG. 11 is a flowchart (flowchart) for explaining the procedure for detecting an internal failure of the processor in the present embodiment. When the system is activated (step S1), the processor monitoring JTAG controller 105 determines whether the normal mode activation or the debug mode activation is performed based on the value of the debug instruction signal (step S2).

デバッグ指示信号が非活性状態(非デバッグモード、すなわち通常モード)の場合、プロセッサ監視用JTAGコントローラ105は、監視開始指示信号を活性状態として、プロセッサ監視のための初期処理を行う(ステップS3)。   When the debug instruction signal is in an inactive state (non-debug mode, that is, a normal mode), the processor monitoring JTAG controller 105 activates the monitoring start instruction signal and performs initial processing for processor monitoring (step S3).

ステップS2において、デバッグ指示信号が活性状態(デバッグモード)の場合、プロセッサ監視用JTAGコントローラ105は、監視処理は行わない(ステップS6)。   If the debug instruction signal is in the active state (debug mode) in step S2, the processor monitoring JTAG controller 105 does not perform the monitoring process (step S6).

通常モードの場合、プロセッサ監視用JTAGコントローラ105は、監視用TDIから、プロセッサ#0とプロセッサ#1に対して、JTAG命令コマンド(例えば汎用レジスタ#0読出命令)の書き込みを並列に行う(ステップS4)。   In the normal mode, the processor monitoring JTAG controller 105 writes a JTAG instruction command (for example, general-purpose register # 0 read instruction) in parallel to the processor # 0 and the processor # 1 from the monitoring TDI (step S4). ).

次に、プロセッサ#0とプロセッサ#1の汎用レジスタ#0の値のTDO端子からの読み出し処理を並列に行う(ステップS5)。プロセッサ#0とプロセッサ#1のTDO端子から出力されたTDO#0、TDO#1はTDO信号比較回路103に入力されて比較される。   Next, the process of reading the values of the general register # 0 of the processor # 0 and the processor # 1 from the TDO terminal is performed in parallel (step S5). TDO # 0 and TDO # 1 output from the TDO terminals of the processor # 0 and the processor # 1 are input to the TDO signal comparison circuit 103 and compared.

次に、プロセッサ監視用JTAGコントローラ105は、プロセッサ#0とプロセッサ#1の汎用レジスタ#1の値を読み出すため、プロセッサ#0とプロセッサ#1に対してJTAG命令コマンド書き込みを並列に行い(ステップS4)、プロセッサ#0とプロセッサ#1の汎用レジスタ#1の値のTDO端子からの読み出し処理(TDO#0、TDO#1)を並列に行う(ステップS5)。   Next, the processor monitoring JTAG controller 105 writes JTAG instruction commands to the processor # 0 and the processor # 1 in parallel in order to read the value of the general-purpose register # 1 of the processor # 0 and the processor # 1 (step S4). ), Reading processing (TDO # 0, TDO # 1) from the TDO terminal of the values of the general-purpose register # 1 of the processor # 0 and the processor # 1 is performed in parallel (step S5).

以降、ステップS4とS5の処理を、汎用レジスタ#2から汎用レジスタ#31まで順次行う(プロセッサ#0とプロセッサ#1の汎用レジスタの個数を32個とする)。ステップS5で、プロセッサ#0とプロセッサ#1のTDO端子から並列に読み出されたTDO#0、TDO#1は、TDO信号比較回路で比較され、一致・不一致が判定される。   Thereafter, the processes of steps S4 and S5 are sequentially performed from general register # 2 to general register # 31 (the number of general registers of processor # 0 and processor # 1 is 32). In step S5, TDO # 0 and TDO # 1 read in parallel from the TDO terminals of the processor # 0 and the processor # 1 are compared by the TDO signal comparison circuit, and a match / mismatch is determined.

プロセッサ#0とプロセッサ#1の汎用レジスタ#31のTDO端子からの並列読み出し処理が完了すると、再び、プロセッサ#0とプロセッサ#1の汎用レジスタ#0のTDO端子からの並列読み出し処理に戻り、システムが停止するまで、汎用レジスタ#0〜#31の値を読み出しが繰り返される。   When the parallel read processing from the TDO terminal of the general-purpose register # 31 of the processor # 0 and the processor # 1 is completed, the processing returns to the parallel read processing from the TDO terminal of the general-purpose register # 0 of the processor # 0 and the processor # 1 again. Reading of the values of the general-purpose registers # 0 to # 31 is repeated until the operation stops.

プロセッサの汎用レジスタの故障の検出処理は、プロセッサ監視の初期処理の完了後、システムが停止するまで、図11のステップS4とS5のループにおいて、TDO信号比較回路103が、プロセッサ#0とプロセッサ#1から出力されるTDO#0とTDO#1を比較することで行われる。   The general-purpose register failure detection process of the processor is performed by the TDO signal comparison circuit 103 in the loop of steps S4 and S5 in FIG. 11 until the system is stopped after the completion of the initial process of the processor monitoring. 1 is performed by comparing TDO # 0 output from 1 and TDO # 1.

<プロセッサ監視用JTAGコントローラ:初期動作>
図12は、プロセッサ監視用JTAGコントローラ105の初期動作の一例を示すタイミングチャートである。図12には、通常モードでの起動の判定処理(図11のステップS2)から、プロセッサ監視初期処理(図11のS3)までの動作の一例が例示されている。図12には、図8に示したプロセッサ監視用JTAGコントローラ105における、クロック信号(Clock)、リセット信号Reset、デバッグ指示信号、監視開始制御信号、イニシャライズ制御カウンタ123のカウント値、監視用TRST、クロックイネーブル、監視用TCK、制御開始信号、JTAG制御カウンタ123のカウント値の時間推移が例示されている。なお、図12において、各動作タイミングを制御しているカウント値はあくまで一例であり、かかる構成に制限されるものでないことは勿論である。以下、図8、図12を参照して、プロセッサ監視用JTAGコントローラ105の初期動作を説明する。
<Processor monitoring JTAG controller: Initial operation>
FIG. 12 is a timing chart showing an example of the initial operation of the processor monitoring JTAG controller 105. FIG. 12 illustrates an example of operations from the activation determination process in the normal mode (step S2 in FIG. 11) to the processor monitoring initial process (S3 in FIG. 11). FIG. 12 shows a clock signal (Clock), a reset signal Reset, a debug instruction signal, a monitoring start control signal, a count value of the initialization control counter 123, a monitoring TRST, a clock in the processor monitoring JTAG controller 105 shown in FIG. The time transition of the enable, the monitoring TCK, the control start signal, and the count value of the JTAG control counter 123 is illustrated. In FIG. 12, the count value controlling each operation timing is merely an example, and it is needless to say that the count value is not limited to this configuration. The initial operation of the processor monitoring JTAG controller 105 will be described below with reference to FIGS.

システムが起動すると、パワーオンリセットが行われたのち、プロセッサ監視用JTAGコントローラ105へ供給するシステムリセット信号Reset(Lowでリセット状態)を、リセット解除状態(High:非活性状態)とする。   When the system is started, after a power-on reset is performed, a system reset signal Reset (low and reset state) supplied to the processor monitoring JTAG controller 105 is set to a reset release state (High: inactive state).

プロセッサ監視用JTAGコントローラ105のデバッグモード判定回路121は、システムリセット信号ResetのLowからHighへの立ち上がりエッジを検出し、リセット状態から解除状態への変化を検出する。デバッグモード判定回路121は、システムリセット信号Resetの立ち上がり時のデバッグ指示信号の状態(値)を確認し、デバッグ指示信号が、非デバッグモード(Low、通常モード)の場合、監視開始指示信号を、例えば1クロックサイクル分(クロック信号Clockの1サイクル期間)、活性状態(High)として、出力する(図12のタイミング(1))。   The debug mode determination circuit 121 of the processor monitoring JTAG controller 105 detects a rising edge of the system reset signal Reset from Low to High, and detects a change from the reset state to the release state. The debug mode determination circuit 121 confirms the state (value) of the debug instruction signal at the rising edge of the system reset signal Reset. When the debug instruction signal is in the non-debug mode (Low, normal mode), the monitor start instruction signal is For example, an active state (High) is output for one clock cycle (one cycle period of the clock signal Clock) (timing (1) in FIG. 12).

デバッグモード判定回路121からの監視開始指示信号のHighパルスの立ち下がりに応答して、イニシャライズ制御カウンタ122のカウント値は「0」にクリアされる。監視用TRSTは、イニシャライズ制御カウンタ122のカウント値が「0」のときに、リセット解除(High)に設定する。監視用TRSTは、システムリセットでのみ、リセット状態(Low:活性状態)に切り換えることができる。   In response to the falling edge of the High pulse of the monitoring start instruction signal from the debug mode determination circuit 121, the count value of the initialization control counter 122 is cleared to “0”. The monitoring TRST is set to reset release (High) when the count value of the initialization control counter 122 is “0”. The monitoring TRST can be switched to a reset state (Low: active state) only by a system reset.

イニシャライズ制御カウンタ122は、クロック信号ClockのHighパルス(立ち上がりエッジ)に応答してカウントアップし、カウント値が「7」となると(図12のタイミング(4))、以降、クロック信号ClockのHighパルスが入力されても、イニシャライズ制御カウンタ122は値「7」を保持する。   The initialization control counter 122 counts up in response to the high pulse (rising edge) of the clock signal Clock, and when the count value becomes “7” (timing (4) in FIG. 12), thereafter, the high pulse of the clock signal Clock. Is input, the initialization control counter 122 holds the value “7”.

イニシャライズ制御カウンタ122の値が、クロック信号Clockの立ち上がりに応答して、「0」から「1」となると(図12のタイミング(2))、監視用TRSTを、リセット状態(Low)からリセット解除状態(High)とする。監視用TRSTはプロセッサ#0(101A)とプロセッサ#1(101B)とTDO信号比較回路103に供給される。   When the value of the initialization control counter 122 changes from “0” to “1” in response to the rise of the clock signal Clock (timing (2) in FIG. 12), the monitoring TRST is reset from the reset state (Low). State (High). The monitoring TRST is supplied to the processor # 0 (101A), the processor # 1 (101B), and the TDO signal comparison circuit 103.

次に、イニシャライズ制御カウンタ122のカウント値が、クロック信号Clockの立ち上がりに応答して「4」から「5」となると(図12のタイミング(3))、イニシャライズ制御カウンタ122は、クロックイネーブル信号を、非活性状態(Low)から活性状態(High)に切り替える。   Next, when the count value of the initialization control counter 122 changes from “4” to “5” in response to the rise of the clock signal Clock (timing (3) in FIG. 12), the initialization control counter 122 receives the clock enable signal. The inactive state (Low) is switched to the active state (High).

クロックイネーブル信号が非活性状態(Low)から活性状態(High)に切り替えられると、クロックゲート125は、オフ(遮断)状態からオン状態となり、クロック信号Clockを通過させ、監視用TCKとして出力する。プロセッサ監視用JTAGコントローラ105からの監視用TCKは、プロセッサ#0とプロセッサ#1に共通に供給される。   When the clock enable signal is switched from the inactive state (Low) to the active state (High), the clock gate 125 changes from the off (blocked) state to the on state, passes the clock signal Clock, and outputs it as the monitoring TCK. The monitoring TCK from the processor monitoring JTAG controller 105 is commonly supplied to the processors # 0 and # 1.

イニシャライズ制御カウンタ122のカウント値が、クロック信号Clockの立ち上がりに応答して、「6」から「7」になると(図12のタイミング(4))、イニシャライズ制御カウンタ122は、制御開始指示信号を、例えばクロック信号Clockの1クロックサイクル期間、活性状態(High)として、JTAG信号制御カウンタ123に供給する。   When the count value of the initialization control counter 122 changes from “6” to “7” in response to the rising edge of the clock signal Clock (timing (4) in FIG. 12), the initialization control counter 122 generates a control start instruction signal, For example, the clock signal Clock is supplied to the JTAG signal control counter 123 as an active state (High) for one clock cycle period.

制御開始指示信号のHighパルスに応答して、JTAG信号制御カウンタ123のカウント値は「0」にクリアされる。JTAG信号制御カウンタ123は、制御開始指示信号のHighパルスがLowに立ち下がった後のクロック信号Clockからカウントアップする。特に制限されないが、図12の例では、JTAG信号制御カウンタ123は6ビットカウンタで構成される。   In response to the High pulse of the control start instruction signal, the count value of the JTAG signal control counter 123 is cleared to “0”. The JTAG signal control counter 123 counts up from the clock signal Clock after the High pulse of the control start instruction signal falls to Low. Although not particularly limited, in the example of FIG. 12, the JTAG signal control counter 123 is configured by a 6-bit counter.

<プロセッサ監視用JTAGコントローラ:命令レジスタ書き込み動作>
図13は、プロセッサ#0とプロセッサ#1へのJTAG命令コマンドの書き込み処理(図11のS4)の詳細動作を説明するタイムチャートである。図13には、図8に示したプロセッサ監視用JTAGコントローラ105における監視用TCK、JTAG制御カウンタ123のカウント値、監視用TMS、命令コマンドカウンタ124のカウント値、監視用TDI、プロセッサ#0、プロセッサ#1の内部のTAPコントローラ(図5、図6等では不図示)の状態の時間推移の一例を例示している。図8、図13を参照して、命令レジスタへの書き込み動作を説明する。
<Processor monitoring JTAG controller: Instruction register write operation>
FIG. 13 is a time chart for explaining the detailed operation of the writing process of the JTAG instruction command to the processors # 0 and # 1 (S4 in FIG. 11). FIG. 13 shows the monitoring TCK in the processor monitoring JTAG controller 105 shown in FIG. 8, the count value of the JTAG control counter 123, the monitoring TMS, the count value of the instruction command counter 124, the monitoring TDI, the processor # 0, the processor An example of the time transition of the state of the internal TAP controller (not shown in FIGS. 5, 6, etc.) of # 1 is illustrated. A write operation to the instruction register will be described with reference to FIGS.

プロセッサ#0とプロセッサ#1にJTAG命令コマンド書込処理は、プロセッサ監視用JTAGコントローラ105におけるJTAG信号制御カウンタ123のカウント値(8ビット)が「0x00〜0x0C」の間で行われ、プロセッサ#0とプロセッサ#1の内部のJTAG回路のTAPコントローラの状態(state)が、Run-Test/Idle、Select-DR、Select-IR、Capture-IR、Shift-IR、Exit-IR、Update-IRとなるように、図8のTMS制御回路126が監視用TMS信号を制御する。以下、TAPコントローラの16の状態を概説する。   The JTAG instruction command write processing to the processor # 0 and the processor # 1 is performed when the count value (8 bits) of the JTAG signal control counter 123 in the processor monitoring JTAG controller 105 is “0x00 to 0x0C”. And the TAP controller state of the JTAG circuit inside processor # 1 is Run-Test / Idle, Select-DR, Select-IR, Capture-IR, Shift-IR, Exit-IR, Update-IR As described above, the TMS control circuit 126 in FIG. 8 controls the monitoring TMS signal. Hereinafter, the 16 states of the TAP controller will be outlined.

TAPコントローラの状態として、安定なTest-Logic-Reset(テスト・ロジック・リセット)状態のとき、テストロジックはリセットされ、デバイスの通常ロジック機能が行われる。   When the TAP controller is in a stable Test-Logic-Reset state, the test logic is reset and the normal logic function of the device is performed.

Run-Test/Idle(ラン・テスト/アイドル)は、テストロジックが動作又はアイドルとなり得る状態である。   Run-Test / Idle is a state in which the test logic can be run or idle.

Select-DR、Select-IR(セレクトDRスキャン、セレクトIRスキャン)状態では、特別な機能は実行されない。TAPコントローラは次のTCKでこの状態を抜ける。この状態はデータレジスタをスキャン又は命令レジスタをスキャンするかの選択を可能としている。   In the Select-DR and Select-IR (Select DR scan, Select IR scan) states, no special function is executed. The TAP controller exits this state at the next TCK. This state makes it possible to select whether to scan the data register or the instruction register.

Capture-DR(キャプチャDR)状態では、選択されたデータレジスタが、現在の命令で指定されたデータをキャプチャする。キャプチャ操作はTCKの立ち上がりエッジで行われる。   In the Capture-DR (capture DR) state, the selected data register captures data specified by the current instruction. The capture operation is performed at the rising edge of TCK.

Shift-DR(シフトDR)状態に入ると、選択されたデータレジスタが、TDIとTDO間のスキャンパスに配置される。TCKの最初の立ち下がりエッジで、TDOはハイインピーダンス状態から活性状態となり、TDOは選択されたデータレジスタの最下位ビットの論理レベルを出力する。Shift-DR状態において、データは選択されたデータレジスタを、TCK毎に、シリアルにシフトされる。   When entering the Shift-DR state, the selected data register is placed in the scan path between TDI and TDO. At the first falling edge of TCK, TDO goes from the high impedance state to the active state, and TDO outputs the logic level of the least significant bit of the selected data register. In the Shift-DR state, data is serially shifted through the selected data register every TCK.

Exit1-DR、Exit2-DR(エグジット1DR、エグジット2DR)状態は、データレジスタのスキャンを終了するテンポラリ状態である。Exit1-DR、Exit2-DRからShift-DRへ戻ることも可能である。Exit1-DR、Exit2-DRに入ったあとのTCKの最初の立ち下がりエッジでTDOはハイインピーダンス状態となる。   The Exit1-DR and Exit2-DR (exit 1DR, exit 2DR) states are temporary states for ending the scan of the data register. It is also possible to return from Exit1-DR and Exit2-DR to Shift-DR. At the first falling edge of TCK after entering Exit1-DR and Exit2-DR, TDO becomes a high impedance state.

Pause-DR(ポーズDR)状態では、特別な機能は行われず、データレジスタのスキャン操作をサスペンド、レジュームする。   In the Pause-DR (pause DR) state, no special function is performed, and the data register scan operation is suspended and resumed.

Update-DR(アップデートDR)状態は、現在の命令が、選択されたデータレジスタを現在のデータで更新することを要求するものである場合、アップデートDR状態へエントリ後のTCKの立ち下がりエッジで当該更新が行われる。   The Update-DR (Update DR) state is the TCK falling edge after entry into the Update DR state if the current instruction requires the selected data register to be updated with the current data. Updates are made.

Capture-IR(キャプチャIR)状態では、命令レジスタが現在の状態値をTCKの立ち上がりエッジでキャプチャする。   In the Capture-IR state, the instruction register captures the current state value at the rising edge of TCK.

Shift-IR(シフトIR)状態に入ると、命令レジスタが、TDIとTDO間のスキャンパスに配置される。TCKの最初の立ち下がりエッジで、TDOはハイインピーダンス状態から活性状態となり、TDOは、命令レジスタの最下位ビットの論理レベルを出力する。Shift−IR状態において、データ(6ビットの命令コマンド)は、TCK毎、命令レジスタ(6ビット)をシリアルにシフトされる。   When entering the Shift-IR state, the instruction register is placed in the scan path between TDI and TDO. At the first falling edge of TCK, TDO goes from the high impedance state to the active state, and TDO outputs the logic level of the least significant bit of the instruction register. In the Shift-IR state, data (6-bit instruction command) is serially shifted in the instruction register (6 bits) every TCK.

Exit1-IR、Exit2-IR(エグジット1IR、エグジット2IR)状態は、命令レジスタのスキャンを終了するテンポラリ状態である。Exit1-IR、Exit2-IRからShift-IRへ戻ることも可能である。Exit1-IR、Exit2-IRに入ったあとのTCKの最初の立ち下がりエッジでTDOはハイインピーダンス状態となる。   The Exit1-IR and Exit2-IR (exit 1IR, exit 2IR) states are temporary states that terminate the scan of the instruction register. It is also possible to return from Exit1-IR and Exit2-IR to Shift-IR. At the first falling edge of TCK after entering Exit1-IR and Exit2-IR, TDO becomes a high impedance state.

Pause-IR(ポーズIR)状態では、特別な機能は行われない。TAPコントローラはこの状態にいつまでもいられる。命令レジスタのスキャン操作をサスペンド、レジュームする。   No special function is performed in the Pause-IR state. The TAP controller can stay in this state indefinitely. Suspend and resume the scan operation of the instruction register.

Update-IR(アップデートIR)状態は、命令レジスタを更新する。アップデートIR状態へエントリ後のTCKの立ち下がりエッジで当該更新が行われる。   The Update-IR state updates the instruction register. The update is performed at the falling edge of TCK after entry into the update IR state.

図13において、プロセッサ#0とプロセッサ#1の内部のJTAG状態が、「Shift-DR」になるタイミング((1)〜(6))で、TDI制御回路127は、命令コマンドカウンタ124のカウント値(JTAG命令コマンド)を、パラレル・シリアル変換し、シリアルビット信号を、監視用TDI信号として出力する。   In FIG. 13, the TDI control circuit 127 counts the count value of the instruction command counter 124 at the timing ((1) to (6)) when the JTAG state inside the processor # 0 and the processor # 1 becomes “Shift-DR”. (JTAG instruction command) is converted from parallel to serial, and a serial bit signal is output as a monitoring TDI signal.

JTAG命令コマンドの監視用TDIへの出力が完了したタイミング(図13の(7))で、命令コマンドカウンタ124(図8)はカウント値を1つカウントアップし(カウント値は0b000001)、次に出力するJTAG命令コマンドの準備をする。   At the timing when the output of the JTAG instruction command to the monitoring TDI is completed ((7) in FIG. 13), the instruction command counter 124 (FIG. 8) increments the count value by 1 (the count value is 0b000001), and then Prepare the JTAG command to be output.

命令コマンドカウンタ124のカウント値が、0b011111(汎用レジスタ#31のリード命令:図10参照)の場合には、次の命令コマンドカウンタ124は、0b000000(汎用レジスタ#0の立ち上がり命令:図10参照)に設定される。   When the count value of the instruction command counter 124 is 0b011111 (general register # 31 read instruction: see FIG. 10), the next instruction command counter 124 is 0b000000 (general register # 0 rising instruction: see FIG. 10). Set to

<プロセッサ監視用JTAGコントローラ:汎用レジスタの読み出し動作>
次に、プロセッサ#0とプロセッサ#1から汎用レジスタの値の読み出し処理(図11のステップS5)の詳細動作を説明する。図14は、プロセッサ#0とプロセッサ#1から汎用レジスタの値の読み出し処理の一例を示すタイムチャートである。図14には、図8のプロセッサ監視用JTAGコントローラ105における監視用TCK、JTAG信号制御カウンタ123のカウント値、監視用TMSと、図5、図6のプロセッサ#0のTDO信号TDO#0、プロセッサ#1のTDO信号TDO#1、図5、図6のプロセッサ#0内部のJTAG状態、プロセッサ#1内部のJTAG状態の時間推移が模式的に示されている。図5、図8、図14を参照して、汎用レジスタの読み出し動作を説明する。
<Processor monitoring JTAG controller: General register read operation>
Next, the detailed operation of the process of reading the value of the general-purpose register from processor # 0 and processor # 1 (step S5 in FIG. 11) will be described. FIG. 14 is a time chart illustrating an example of a process for reading the value of the general-purpose register from the processors # 0 and # 1. 14 shows the monitoring TCK in the processor monitoring JTAG controller 105 in FIG. 8, the count value of the JTAG signal control counter 123, the monitoring TMS, the TDO signal TDO # 0 of the processor # 0 in FIGS. 5 and 6, the processor A time transition of the TDO signal TDO # 1 of # 1, the JTAG state inside the processor # 0 and the JTAG state inside the processor # 1 of FIGS. 5 and 6 is schematically shown. The general-purpose register read operation will be described with reference to FIGS.

プロセッサ#0とプロセッサ#1から汎用レジスタ(32ビット幅)の値の読み出し処理は、JTAG信号制御カウンタ123のカウント値が0x0D〜0x30の間で行われ、プロセッサ#0とプロセッサ#1のTAPコントローラの状態が、「Run-Test/Idle」から「Update-DR」になるように、TMS制御回路126が、監視用TMS信号を生成する。   The process of reading the value of the general-purpose register (32-bit width) from the processor # 0 and the processor # 1 is performed when the count value of the JTAG signal control counter 123 is between 0x0D to 0x30, and the TAP controllers of the processor # 0 and the processor # 1 The TMS control circuit 126 generates a monitoring TMS signal so that the state of “Run-Test / Idle” becomes “Update-DR”.

プロセッサ#0とプロセッサ#1の内部のJTAG状態が、「Shift-DR」になるタイミング(図14の(1)〜(6))にて、プロセッサ#0のTDO#0とプロセッサ#1のTDO#1から、汎用レジスタの値が同時にシリアル出力される。   At the timing when the internal JTAG state of the processor # 0 and the processor # 1 becomes “Shift-DR” ((1) to (6) in FIG. 14), the TDO # 0 of the processor # 0 and the TDO of the processor # 1 From # 1, the value of the general-purpose register is serially output simultaneously.

JTAG信号制御カウンタ123はそのカウント値が「0x30」になると、カウント値を「0x00」にクリア(オートクリア)する。このため、「プロセッサ#0とプロセッサ#1にJTAG命令コマンド書込処理」と「プロセッサ#0とプロセッサ#1から汎用レジスタの値の読み出し処理」は、システムの動作中に、繰り返される。   When the count value becomes “0x30”, the JTAG signal control counter 123 clears the count value to “0x00” (auto clear). Therefore, “JTAG instruction command write processing to processor # 0 and processor # 1” and “reading of general register values from processor # 0 and processor # 1” are repeated during system operation.

TDO信号比較回路103は、プロセッサ監視用JTAGコントローラ105から出力される監視用TCKに同期して、システムの通常モードで起動中常に、プロセッサ#0から出力されるTDO#0とプロセッサ#1から出力されるTDO#1の比較を行う。   The TDO signal comparison circuit 103 is synchronized with the monitoring TCK output from the processor monitoring JTAG controller 105 and always outputs from the processor # 0 and the TDO # 0 output from the processor # 1 during startup in the normal mode of the system. The TDO # 1 to be compared is compared.

<TDO信号比較回路の動作例>
図15は、TDO信号比較回路103の動作の一例を示すタイミングチャートである。図15には、図9のTDO信号比較回路103における監視用CLKと、TDO#0、TDO#1、プロセッサ故障検出信号の時間推移が例示されている。図9、図15を参照して、比較動作(故障検出動作)を説明する。なお、プロセッサ#0とプロセッサ#1から汎用レジスタ#0(32ビット)の値をTDO#0とTDO#1から同時にシリアル(LSB(Least Significant Bit)からMSB(Most Significant Bit)の順)に出力している。
<Operation example of TDO signal comparison circuit>
FIG. 15 is a timing chart showing an example of the operation of the TDO signal comparison circuit 103. FIG. 15 illustrates time transitions of the monitoring CLK, TDO # 0, TDO # 1, and processor failure detection signal in the TDO signal comparison circuit 103 of FIG. The comparison operation (failure detection operation) will be described with reference to FIGS. The value of general-purpose register # 0 (32 bits) is output from processor # 0 and processor # 1 simultaneously from TDO # 0 and TDO # 1 (in order of LSB (Least Significant Bit) to MSB (Most Significant Bit)). doing.

汎用レジスタ#0の2ビット目を出力するタイミングで、TDO#0とTDO#1の値に差分が発生していることを検出したTDO信号比較回路103のフリップフロップ133は、監視用TCKの立ち上がりエッジに応答して、プロセッサ故障通知信号を非活性状態(Low)から活性状態(High)として出力し、以降、プロセッサ故障通知信号はHighに維持される。   The flip-flop 133 of the TDO signal comparison circuit 103 that detects the difference between the values of TDO # 0 and TDO # 1 at the timing of outputting the second bit of the general-purpose register # 0 causes the rising edge of the monitoring TCK. In response to the edge, the processor failure notification signal is output from the inactive state (Low) to the active state (High), and thereafter, the processor failure notification signal is maintained at High.

<故障検出の動作例> <Example of failure detection operation>

図16は、図5乃至図15を参照して説明した本実施形態の故障検出の動作例を説明するタイミングチャートである。図16には、クロック信号(Clock)、監視用TCK、プロセッサ#0の汎用レジスタ#0、プロセッサ#0の汎用レジスタ#1、プロセッサ#0バス信号、プロセッサ#0の出力信号TDO#0、プロセッサ#1の汎用レジスタ#0、プロセッサ#1の汎用レジスタ#1、プロセッサ#1バス信号、プロセッサ#1の出力信号TDO#1、プロセッサ#0バス信号とプロセッサ#1バス信号の比較結果、TDOの比較結果が例示されている。図16に示す例では、プロセッサ#0の汎用レジスタ#1上のタイミング(1)で、プロセッサ#0の汎用レジスタ#1の0ビット目に故障が発生している。   FIG. 16 is a timing chart for explaining an operation example of failure detection according to the present embodiment described with reference to FIGS. FIG. 16 shows a clock signal (Clock), a monitoring TCK, a general-purpose register # 0 for processor # 0, a general-purpose register # 1 for processor # 0, a processor # 0 bus signal, an output signal TDO # 0 for processor # 0, a processor # 1 general-purpose register # 0, processor # 1 general-purpose register # 1, processor # 1 bus signal, processor # 1 output signal TDO # 1, comparison result of processor # 0 bus signal and processor # 1 bus signal, TDO The comparison results are illustrated. In the example shown in FIG. 16, at timing (1) on general register # 1 of processor # 0, a failure has occurred in the 0th bit of general register # 1 of processor # 0.

図16において、タイミング(1)で、プロセッサ#0とプロセッサ#1の処理が汎用レジスタ#0の値をプロセッサバスに出力している場合、プロセッサ#0バス信号の出力値は、故障した汎用レジスタ#1の影響を受けない。このため、正常動作をしているプロセッサ#1バス信号の出力値と一致する(「プロセッサ#0バス信号とプロセッサ#1バス信号の比較結果」は「一致」)。   In FIG. 16, when the processing of processor # 0 and processor # 1 outputs the value of general-purpose register # 0 to the processor bus at timing (1), the output value of the processor # 0 bus signal is the faulty general-purpose register. Not affected by # 1. For this reason, it matches the output value of the processor # 1 bus signal operating normally (“comparison result of processor # 0 bus signal and processor # 1 bus signal” is “match”).

プロセッサ#0とプロセッサ#1の各TDOから、それぞれの汎用レジスタ#1の値を出力させ、TDO信号比較回路103でTDO#0とTDO#1を比較する。   The values of the general purpose registers # 1 are output from the TDOs of the processor # 0 and the processor # 1, and the TDO signal comparison circuit 103 compares TDO # 0 and TDO # 1.

図16のタイミング(2)において、プロセッサ#0の汎用レジスタ#1の0ビット目に故障が発生している場合には、TDO#0とTDO#1の比較結果が不一致となり、TDO信号比較回路103は、プロセッサ故障通知信号を活性状態(High)に設定する。すなわち、プロセッサの汎用レジスタの故障を、デュアルプロセッサのロックステップ方式と比べて、早期に検出することが可能になる。   In the timing (2) of FIG. 16, when a failure has occurred in the 0th bit of the general register # 1 of the processor # 0, the comparison result of TDO # 0 and TDO # 1 becomes inconsistent, and the TDO signal comparison circuit 103 sets the processor failure notification signal to the active state (High). That is, it is possible to detect a failure of the general-purpose register of the processor at an early stage as compared with the lock step method of the dual processor.

<作用効果>
本実施形態の作用効果を以下に説明する。
<Effect>
The effect of this embodiment is demonstrated below.

図16に示すように、システム通常運用中に、プロセッサ#0、#1から同時に内部信号を読み出し、比較回路で比較することにより、プロセッサの故障n検出できるようになるため、プロセッサのバス出力にプロセッサの内部故障の影響が出る前にプロセッサの故障が検出することを可能としている。   As shown in FIG. 16, during normal operation of the system, internal signals are simultaneously read from the processors # 0 and # 1 and compared by the comparison circuit so that the processor failure n can be detected. It is possible to detect a processor failure before it is affected by an internal processor failure.

デュアルプロセッサのロックステップ方式と比べて、故障発生から故障検出までの時間を短縮可能としている。その結果、システム全体を安全性の高い状態に移行するまでの時間を短縮することができるため、システムの安全性が高くなる。   Compared with the lock step method of the dual processor, the time from failure occurrence to failure detection can be shortened. As a result, the time required to shift the entire system to a highly safe state can be shortened, so that the safety of the system is increased.

プロセッサ監視用JTAGコントローラ105は、JTAG命令コマンドとして、汎用レジスタのリード命令(診断用)を内部のカウンタ回路等を用いて生成しており、プロセッサのどの汎用レジスタの読み出し信号を監視しているかを把握することできる。このため、故障した汎用レジスタを特定可能とし、故障検出の精度を向上することができる。   The processor monitoring JTAG controller 105 generates a general-purpose register read command (for diagnosis) as a JTAG command using an internal counter circuit or the like, and determines which general-purpose register read signal of the processor is monitored. I can figure it out. For this reason, it is possible to identify a general-purpose register that has failed, and to improve the accuracy of failure detection.

図1のデュアルプロセッサのロックステップ方式では、プロセッサが故障したことしか検出できない。本実施形態によれば、プロセッサのどの汎用レジスタの何ビット目で故障が発生したかを特定することも可能である。このため、実機評価でのトラブルシューティングの時間が短縮することができる。   The dual processor lockstep method of FIG. 1 can only detect that the processor has failed. According to this embodiment, it is also possible to specify at which bit of which general-purpose register of the processor the failure has occurred. For this reason, it is possible to shorten the time for troubleshooting in actual machine evaluation.

ところで、一般に、監視機能を向上させると、システムの性能低下や、通常機能を停止させる必要等が生じる場合がある。しかしながら、本実施形態によれば、以下の理由により、システムの性能低下や通常機能を停止させる必要はない。   By the way, generally, when the monitoring function is improved, the performance of the system may be degraded, or the normal function may need to be stopped. However, according to the present embodiment, there is no need to stop system performance degradation or normal functions for the following reasons.

プロセッサ監視用JTAGコントローラ105は、ハードウェア回路で構成され、制御信号(システムリセット信号Reset、デバッグ指示信号)とクロック信号Clockに基づき、自律的に、監視用JTAG信号(TDI(JTAG命令コマンド)、TCK、TMS、TRST)を生成する構成されており、ソフトウェア制御が不要とされている。このため、システムの通常運用中に、ソフトウェアの処理性能を低下させることなく、プロセッサの故障検出を行うことができる。   The processor monitoring JTAG controller 105 includes a hardware circuit, and autonomously monitors JTAG signals (TDI (JTAG instruction command)) based on a control signal (system reset signal Reset, debug instruction signal) and a clock signal Clock. TCK, TMS, TRST) are generated, and software control is unnecessary. For this reason, it is possible to detect a processor failure without degrading the software processing performance during normal operation of the system.

JTAG回路のTDO信号を用いてプロセッサの内部信号を読み出しているため、システムの通常機能への影響を回避してプロセッサの故障検出を行うことができる。   Since the internal signal of the processor is read using the TDO signal of the JTAG circuit, it is possible to detect the failure of the processor while avoiding the influence on the normal function of the system.

<変形例1>
図17に示すように、TDO信号比較回路103から外部に出力していたプロセッサ故障通知信号を、プロセッサ#0とプロセッサ#1の割込信号として入力する構成としてもよい。活性状態の割込信号(活性状態のプロセッサ故障通知信号)を受け取ったプロセッサ#0とプロセッサ#1では、当該割込に対応した割込処理(ISR: Interrupt Service Routine)を実行する。割込処理としては、予め定められたフェールセーフ機能が実行される。あるいは、例えば汎用レジスタの故障が検出された一方のプロセッサを停止させ、他のプロセッサのみでプログラムを実行するようにしてもよい。
<Modification 1>
As shown in FIG. 17, the processor failure notification signal output from the TDO signal comparison circuit 103 to the outside may be input as an interrupt signal for the processors # 0 and # 1. The processor # 0 and the processor # 1 that have received the active interrupt signal (active processor failure notification signal) execute interrupt processing (ISR: Interrupt Service Routine) corresponding to the interrupt. As the interrupt process, a predetermined fail-safe function is executed. Alternatively, for example, one processor in which a failure of the general-purpose register is detected may be stopped, and the program may be executed only by the other processor.

<変形例2>
前記実施形態及び変形例1では、TDO信号比較回路103からのプロセッサ故障通知信号を半導体装置外部に出力していたが、変形例2では、図18に示すように、TDO信号比較回路103からのプロセッサ故障通知信号を周辺回路140に送信する。
<Modification 2>
In the embodiment and the first modification, the processor failure notification signal from the TDO signal comparison circuit 103 is output to the outside of the semiconductor device. However, in the second modification, as illustrated in FIG. A processor failure notification signal is transmitted to the peripheral circuit 140.

活性状態のプロセッサ故障通知信号を受信した周辺回路140は、例えば、強制的に処理を停止させ、安全性の高い状態に移行するフェールセーフ機能を実現するようにしてもよい。   The peripheral circuit 140 that has received the active processor failure notification signal may, for example, implement a fail-safe function that forcibly stops processing and shifts to a highly safe state.

図17、図18の変形例は、デュアルプロセッサのロックステップ方式に比べて、故障発生からシステムの安全状態に移行するまでの時間を短縮することができる。   The modified examples of FIGS. 17 and 18 can shorten the time from the occurrence of a failure to the transition to a safe state of the system, as compared to the dual processor lockstep method.

<変形例3>
図19に示すように、TDO信号比較回路103からのプロセッサ故障通知信号をプロセッサ監視用JTAGコントローラ105に入力する構成としてもよい。活性状態のプロセッサ故障通知信号を受信したプロセッサ監視用JTAGコントローラ105は、
・命令コマンドカウンタ124(図8)の値から故障が発生した汎用レジスタ番号、
・JTAG信号制御カウンタ123(図8)のカウント値から、故障が発生したビット番号を検出し、プロセッサ故障発生箇所通知信号として、半導体装置の外部に出力する。このような構成とすることで、プロセッサの故障発生箇所の特定精度が、デュアルプロセッサのロックステップ方式よりも高くなる。
<Modification 3>
As shown in FIG. 19, a processor failure notification signal from the TDO signal comparison circuit 103 may be input to the processor monitoring JTAG controller 105. The processor monitoring JTAG controller 105 that has received the processor failure notification signal in the active state
The general-purpose register number where the failure occurred, from the value of the command command counter 124 (FIG. 8),
A bit number where a failure has occurred is detected from the count value of the JTAG signal control counter 123 (FIG. 8), and is output to the outside of the semiconductor device as a processor failure occurrence point notification signal. By adopting such a configuration, the accuracy of identifying the location where the processor has failed becomes higher than that of the dual processor lockstep method.

あるいは、プロセッサの汎用レジスタ以外の箇所の故障検出を行うようにしてもよい。JTAG回路を用いてプロセッサの内部信号を読み出しているため、ユーザが、命令コマンドを割り当てることにより、汎用レジスタ以外の所望の箇所(バウンダリスキャンで信号の設定と読み出しが可能な回路)の信号を読み出すことが可能になる。   Alternatively, failure detection may be performed at locations other than the general purpose registers of the processor. Since the internal signal of the processor is read using the JTAG circuit, the user reads the signal at a desired location other than the general-purpose register (a circuit that can set and read the signal by boundary scan) by assigning an instruction command. It becomes possible.

なお、前記実施形態では、説明の簡単のため、プロセッサの数を2つとしているが、プロセッサ数は3以上であってもよい。3つ以上のプロセッサにした場合も、プロセッサが2つの時と同様に、プロセッサ監視時には、JTAG信号を全てのプロセッサにパラレル接続することにより、各プロセッサのTDO信号から、同時に同一のプロセッサ内部信号として出力させることができる。TDO信号比較回路で、プロセッサのTDO信号を比較することにより、プロセッサの故障を検出することが可能になる。   In the above embodiment, for simplicity of explanation, the number of processors is two, but the number of processors may be three or more. Even when three or more processors are used, as in the case of two processors, when the processor is monitored, the JTAG signal is connected in parallel to all the processors so that the TDO signal of each processor can be simultaneously converted into the same processor internal signal. Can be output. By comparing the TDO signal of the processor with the TDO signal comparison circuit, it becomes possible to detect a failure of the processor.

また、図5等の実施形態では、デュアルプロセッサを備えた半導体装置(SOC)の同一チップ上に本発明を実施した例が示されているが、デュアルプロセッサを実装した基板等に対して本発明が適用できることは勿論である。   In the embodiment of FIG. 5 and the like, an example in which the present invention is implemented on the same chip of a semiconductor device (SOC) having a dual processor is shown. However, the present invention is applied to a substrate on which a dual processor is mounted. Of course, is applicable.

なお、上記の特許文献、非特許文献の各開示を、本書に引用をもって繰り込むものとする。本発明の全開示(請求の範囲を含む)の枠内において、さらにその基本的技術思想に基づいて、実施形態ないし実施例の変更・調整が可能である。また、本発明の請求の範囲の枠内において種々の開示要素(各請求項の各要素、各実施例の各要素、各図面の各要素等を含む)の多様な組み合わせないし選択が可能である。すなわち、本発明は、請求の範囲を含む全開示、技術的思想にしたがって当業者であればなし得るであろう各種変形、修正を含むことは勿論である。   It should be noted that the disclosures of the above-mentioned patent documents and non-patent documents are incorporated herein by reference. Within the scope of the entire disclosure (including claims) of the present invention, the embodiments and examples can be changed and adjusted based on the basic technical concept. Various disclosed elements (including each element of each claim, each element of each embodiment, each element of each drawing, etc.) can be combined or selected within the scope of the claims of the present invention. . That is, the present invention of course includes various variations and modifications that could be made by those skilled in the art according to the entire disclosure including the claims and the technical idea.

10、10’、100 半導体装置(SOC)
11A、11B、11’A、11’B、101A、101B プロセッサ
12A、102A プロセッサ#0バス信号
12B、102B プロセッサ#1バス信号
13 比較回路
14、114 周辺回路制御バス
20、200 PC
103 TDO信号比較回路
104 プロセッサ同期化回路
105 プロセッサ監視用JTAGコントローラ
106 JTAGセレクタ
107〜111 セレクタ
121 デバッグモード判定回路
122 イニシャライズ制御カウンタ
123 JTAG信号制御カウンタ
124 命令コマンドカウンタ
125 クロックゲート
126 TMS制御回路
127 TDI制御回路
131 排他的論理和回路(Exclusive OR)
132 セレクタ
133 フリップフロップ(D型フリップフロップ)
134 High固定回路(Clump H)
140 周辺回路
10, 10 ', 100 Semiconductor device (SOC)
11A, 11B, 11′A, 11′B, 101A, 101B Processor 12A, 102A Processor # 0 bus signal 12B, 102B Processor # 1 bus signal 13 Comparison circuit 14, 114 Peripheral circuit control bus 20, 200 PC
103 TDO signal comparison circuit 104 processor synchronization circuit 105 JTAG controller for processor monitoring 106 JTAG selectors 107 to 111 selector 121 debug mode determination circuit 122 initialization control counter 123 JTAG signal control counter 124 instruction command counter 125 clock gate 126 TMS control circuit 127 TDI Control circuit 131 Exclusive OR circuit (Exclusive OR)
132 selector 133 flip-flop (D-type flip-flop)
134 High Fixed Circuit (Clump H)
140 Peripheral circuit

Claims (10)

互いに同一構成とされた、JTAG(Joint Test Action Group)準拠の複数のプロセッサと、
通常動作時に、監視用のJTAG信号を生成するプロセッサ監視用JTAGプロセッサ監視用JTAGコントローラと、
を備え、
前記プロセッサ監視用JTAGコントローラより出力される監視用のJTAG信号のうち監視用のテストデータインプット(TDI)信号は、前記複数のプロセッサの複数のテストデータインプット(TDI)端子に、共通に且つ並列に供給され、
前記監視用のテストデータインプット(TDI)信号の入力に対応して前記複数のプロセッサの複数のテストデータアウトプット(TDO)端子から並列に出力されるテストデータアウトプット(TDO)信号を入力してこれらを比較し、不一致を検出した場合、プロセッサ故障通知信号を活性状態として出力するTDO信号比較回路をさらに備えた、ことを特徴とする故障検出システム。
A plurality of processors conforming to JTAG (Joint Test Action Group) and having the same configuration,
A processor monitoring JTAG processor monitoring JTAG controller that generates a monitoring JTAG signal during normal operation;
With
Among the monitoring JTAG signals output from the processor monitoring JTAG controller, a monitoring test data input (TDI) signal is commonly and in parallel to a plurality of test data input (TDI) terminals of the plurality of processors. Supplied,
A test data output (TDO) signal output in parallel from a plurality of test data output (TDO) terminals of the plurality of processors is input in response to the input of the test data input (TDI) signal for monitoring. A failure detection system, further comprising a TDO signal comparison circuit that outputs a processor failure notification signal as an active state when these are compared and a mismatch is detected.
前記プロセッサ監視用JTAGコントローラは、前記プロセッサに含まれる複数の内部回路に対して、各内部回路の状態を読み出して前記プロセッサのテストデータアウトプット(TDO)端子から出力させるJTAG命令コマンドを順次生成して、前記監視用のテストデータインプット(TDI)信号として出力し、最後の前記内部回路の読み出しが終了すると、最初に読み出しを行った前記内部回路に戻り再び読み出しを行う反復処理を繰り返す、ことを特徴とする請求項1記載の故障検出システム。   The processor monitoring JTAG controller sequentially generates a JTAG instruction command for reading a state of each internal circuit and outputting it from a test data output (TDO) terminal of the processor to a plurality of internal circuits included in the processor. The test data input (TDI) signal for monitoring is output, and when the reading of the last internal circuit is completed, the iterative process of returning to the first reading internal circuit and reading again is repeated. The failure detection system according to claim 1. 前記プロセッサ監視用JTAGコントローラは、
システムの起動時に、入力されるデバッグ指示信号の状態を確認し、前記デバッグ指示信号が非活性状態の場合、通常モードでの起動と判断し、監視開始指示信号を活性化させるデバッグモード判定回路と、
前記監視開始指示信号の活性化に応答して活性化され、入力されるクロック信号をカウントし、カウント値がそれぞれ予め定められた所定値になると、監視用のテストリセット(TRST)信号のリセット解除のタイミング、監視用のテストクロック(TCK)信号の供給を許可するクロックイネーブル信号の活性化、及び、制御開始指示信号を活性化するイニシャライズ制御カウンタと、
前記イニシャライズ制御カウンタから活性化された前記制御開始指示信号が出力されると、以降の前記クロック信号をカウントし、予め定められた所定のカウント値に応じてカウントアップ指示信号を生成するJTAG信号制御カウンタと、
前記JTAG信号制御カウンタから出力される前記カウントアップ指示信号に応答してカウントアップ動作し、カウント値をJTAG命令コマンドとして出力する命令コマンドカウンタと、
前記JTAG信号制御カウンタのカウント値を基に、監視用のテストモードセットセレクト(TMS)信号を生成するTMS制御回路と、
前記JTAG信号制御カウンタのカウント値と、前記命令コマンドカウンタのカウント値とに基づき、前記監視用のテストデータインプット(TDI)信号を生成するTDI制御回路と、
前記イニシャライズ制御カウンタからの前記クロックイネーブル信号が活性化されると、前記クロック信号を、前記監視用テストクロック(TCK)信号として出力するクロックゲート回路と、
を備えた、ことを特徴とする請求項2記載の故障検出システム。
The processor monitoring JTAG controller
A debug mode determination circuit for checking a state of an input debug instruction signal at the time of system startup, determining that the debug instruction signal is in an inactive state, starting in a normal mode, and activating a monitoring start instruction signal; ,
Activated in response to the activation of the monitoring start instruction signal, counts the input clock signal, and releases the reset of the monitoring test reset (TRST) signal when the count value reaches a predetermined value. Timing control, activation of a clock enable signal that permits supply of a test clock (TCK) signal for monitoring, and an initialization control counter that activates a control start instruction signal;
When the activated control start instruction signal is output from the initialization control counter, the subsequent clock signal is counted, and a count-up instruction signal is generated according to a predetermined count value determined in advance. A counter,
An instruction command counter that performs a count-up operation in response to the count-up instruction signal output from the JTAG signal control counter and outputs a count value as a JTAG instruction command;
A TMS control circuit that generates a test mode set select (TMS) signal for monitoring based on the count value of the JTAG signal control counter;
A TDI control circuit that generates the test data input (TDI) signal for monitoring based on the count value of the JTAG signal control counter and the count value of the command command counter;
A clock gate circuit that outputs the clock signal as the monitoring test clock (TCK) signal when the clock enable signal from the initialization control counter is activated;
The failure detection system according to claim 2, further comprising:
前記TDO信号比較回路は、
前記複数のプロセッサの複数のテストデータアウトプット(TDO)端子から並列に出力される複数のテストデータアウトプット(TDO)信号の一致・不一致を検出する検出回路と、
出力信号を前記プロセッサ故障通知信号とする保持回路と、
前記検出回路での検出結果を選択制御信号として入力し、前記検出結果の一致、又は不一致に応じて、前記保持回路の出力信号、又は、前記プロセッサ故障通知信号の活性状態に対応する固定論理値を選択して出力するセレクタと、
を備え、
前記保持回路は、前記セレクタの出力信号を、前記プロセッサ監視用JTAGコントローラから出力される監視用のテストクロック(TCK)信号に応答してサンプルしサンプルした値を出力する保持回路と、
前記検出回路で不一致を検出すると、前記セレクタは、前記固定論理値を選択し、以降、前記保持回路で保持出力される前記プロセッサ故障通知信号は活性状態を維持する、ことを特徴とする請求項1乃至3のいずれか1項に記載の故障検出システム。
The TDO signal comparison circuit
A detection circuit for detecting a match / mismatch of a plurality of test data output (TDO) signals output in parallel from a plurality of test data output (TDO) terminals of the plurality of processors;
A holding circuit having an output signal as the processor failure notification signal;
A detection result in the detection circuit is input as a selection control signal, and a fixed logical value corresponding to an active state of the output signal of the holding circuit or the processor failure notification signal according to a match or mismatch of the detection results A selector for selecting and outputting,
With
The holding circuit samples the output signal of the selector in response to a monitoring test clock (TCK) signal output from the processor monitoring JTAG controller, and outputs a sampled value;
The selector selects the fixed logical value when the detection circuit detects a mismatch, and thereafter, the processor failure notification signal held and output by the holding circuit maintains an active state. The failure detection system according to any one of 1 to 3.
デバッグモードでシステムが起動した場合、前記プロセッサ監視用JTAGコントローラは活性化されず、前記監視用のJTAG信号は出力されず、デバッグ装置からのデバッグ用のJTAG信号が前記プロセッサに供給される、ことを特徴とする請求項1乃至4のいずれか1項に記載の故障検出システム。   When the system is started in the debug mode, the processor monitoring JTAG controller is not activated, the monitoring JTAG signal is not output, and the debugging JTAG signal from the debugging device is supplied to the processor. The failure detection system according to any one of claims 1 to 4. 前記監視用JTAG信号、又は前記デバッグ用JTAG信号を、前記デバッグ指示信号の値に基づき、切り替えるJTAGセレクタを備え、
前記デバッグ指示信号が非活性状態のとき、
前記JTAGセレクタは、
前記プロセッサ監視用JTAGコントローラからの前記監視用JTAG信号のテストデータインプット(TDI)信号、テストクロック(TCK)信号、テストモードセレクト(TMS)信号、テストリセット(TRST)信号をそれぞれ、前記複数のプロセッサに、共通に且つ並列に供給し、
前記デバッグ指示信号が活性状態のとき、
前記JTAGセレクタは、
前記デバッグ装置からの前記デバッグ用のJTAG信号のうちテストクロック(TCK)信号、テストモードセレクト(TMS)信号、テストリセット(TRST)信号をそれぞれ、前記複数のプロセッサに、共通に且つ並列に供給し、テストデータインプット(TDI)信号は前記複数のプロセッサ間でチェーン接続し、最後段のプロセッサのテストデータアウトプット(TDO)端子から順次出力される前記複数のプロセッサのテストデータアウトプット(TDO)信号を、デバッグ用のテストデータアウトプット(TDO)信号として前記デバッグ装置に送信する、ことを特徴とする請求項5記載の故障検出システム。
A JTAG selector for switching the monitoring JTAG signal or the debugging JTAG signal based on the value of the debugging instruction signal;
When the debug instruction signal is inactive
The JTAG selector
The test data input (TDI) signal, test clock (TCK) signal, test mode select (TMS) signal, and test reset (TRST) signal of the monitoring JTAG signal from the processor monitoring JTAG controller, respectively. Supply in common and in parallel,
When the debug instruction signal is active,
The JTAG selector
A test clock (TCK) signal, a test mode select (TMS) signal, and a test reset (TRST) signal among the debugging JTAG signals from the debugging device are supplied in common and in parallel to the plurality of processors. The test data input (TDI) signal is chain-connected between the plurality of processors, and the test data output (TDO) signals of the plurality of processors are sequentially output from the test data output (TDO) terminal of the last stage processor. The failure detection system according to claim 5, wherein the failure detection system is transmitted to the debugging device as a test data output (TDO) signal for debugging.
前記TDO信号比較回路からの前記プロセッサ故障通知信号に関して、
システム外部に出力する、
前記複数のプロセッサに割り込み信号として供給する、
周辺回路に入力する、
前記プロセッサ監視用JTAGコントローラに入力する、
の少なくとも1つを行う、ことを特徴とする請求項1乃至6のいずれか1項に記載の故障検出システム。
Regarding the processor failure notification signal from the TDO signal comparison circuit,
Output to outside the system,
Supplying an interrupt signal to the plurality of processors;
Input to peripheral circuit
Input to the processor monitoring JTAG controller;
The fault detection system according to claim 1, wherein at least one of the following is performed.
請求項1乃至7のいずれか1項に記載の故障検出システムを備えた半導体装置。   A semiconductor device comprising the failure detection system according to claim 1. 互いに同一構成とされた、JTAG(Joint Test Action Group)準拠の複数のプロセッサを備えたシステムの通常動作時に、プロセッサ監視用JTAGコントローラより出力される監視用のJTAG信号のうち、監視用のテストデータインプット(TDI)信号を、前記複数のプロセッサの複数のテストデータインプット(TDI)端子に、共通に且つ並列に供給し、
前記監視用のテストデータインプット(TDI)信号の入力に対応して、前記複数のプロセッサの複数のテストデータアウトプット(TDO)端子から、並列に出力されるテストデータアウトプット(TDO)信号を比較し、不一致を検出した時、プロセッサ故障通知信号を出力する、ことを特徴とする故障検出方法。
The monitoring test data among the monitoring JTAG signals output from the processor monitoring JTAG controller during normal operation of a system having a plurality of processors compliant with JTAG (Joint Test Action Group) and having the same configuration. Supplying an input (TDI) signal to a plurality of test data input (TDI) terminals of the plurality of processors in common and in parallel;
The test data output (TDO) signals output in parallel from the plurality of test data output (TDO) terminals of the plurality of processors are compared in response to the input of the test data input (TDI) signal for monitoring. And a processor failure notification signal is output when a mismatch is detected.
通常動作時、前記プロセッサ監視用JTAGコントローラは、前記プロセッサに含まれる複数の内部回路に対して、各内部回路の状態を読み出して前記プロセッサのテストデータアウトプット(TDO)端子から出力させるJTAG命令コマンドを順次生成して前記監視用のテストデータインプット(TDI)信号として出力し、
最後の前記内部回路の読み出しが終了すると、最初に読み出しを行った前記内部回路に戻り再び読み出しを行う反復処理を繰り返す、ことを特徴とする請求項9記載の故障検出方法。
During normal operation, the processor monitoring JTAG controller reads out the state of each internal circuit from a plurality of internal circuits included in the processor and outputs it from the test data output (TDO) terminal of the processor. Are sequentially generated and output as the test data input (TDI) signal for monitoring,
10. The fault detection method according to claim 9, wherein when the reading of the last internal circuit is completed, the iterative process of returning to the first internal circuit from which reading was performed and repeating the reading is repeated.
JP2012116221A 2012-05-22 2012-05-22 Failure detection system and method, and semiconductor device Pending JP2013242746A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012116221A JP2013242746A (en) 2012-05-22 2012-05-22 Failure detection system and method, and semiconductor device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012116221A JP2013242746A (en) 2012-05-22 2012-05-22 Failure detection system and method, and semiconductor device

Publications (1)

Publication Number Publication Date
JP2013242746A true JP2013242746A (en) 2013-12-05

Family

ID=49843567

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012116221A Pending JP2013242746A (en) 2012-05-22 2012-05-22 Failure detection system and method, and semiconductor device

Country Status (1)

Country Link
JP (1) JP2013242746A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9846666B2 (en) 2014-02-18 2017-12-19 Renesas Electronics Corporation Multiprocessor system
CN113341907A (en) * 2021-04-20 2021-09-03 深圳市创智成科技股份有限公司 System and debugging method for universal Debug card
CN115167933A (en) * 2022-09-08 2022-10-11 深圳市恒运昌真空技术有限公司 Dual-processor equipment, control method thereof and processor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003098225A (en) * 2001-09-25 2003-04-03 Toshiba Corp Semiconductor integrated circuit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003098225A (en) * 2001-09-25 2003-04-03 Toshiba Corp Semiconductor integrated circuit

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9846666B2 (en) 2014-02-18 2017-12-19 Renesas Electronics Corporation Multiprocessor system
US10102166B2 (en) 2014-02-18 2018-10-16 Renesas Electronics Corporation Multiprocessor system
CN113341907A (en) * 2021-04-20 2021-09-03 深圳市创智成科技股份有限公司 System and debugging method for universal Debug card
CN113341907B (en) * 2021-04-20 2024-04-12 深圳市创智成科技股份有限公司 System and debugging method of general Debug card
CN115167933A (en) * 2022-09-08 2022-10-11 深圳市恒运昌真空技术有限公司 Dual-processor equipment, control method thereof and processor
CN115167933B (en) * 2022-09-08 2022-12-02 深圳市恒运昌真空技术有限公司 Dual-processor equipment, control method thereof and processor

Similar Documents

Publication Publication Date Title
US8943377B2 (en) On-chip detection of types of operations tested by an LBIST
JP5373403B2 (en) Method and apparatus for testing a data processing system
Vermeulen Functional debug techniques for embedded systems
Vermeulen et al. Design for debug: Catching design errors in digital chips
US5708773A (en) JTAG interface system for communicating with compliant and non-compliant JTAG devices
US6618775B1 (en) DSP bus monitoring apparatus and method
Mitra et al. Post-silicon validation opportunities, challenges and recent advances
US9037911B2 (en) Debug state machines and methods of their operation
US8799713B2 (en) Interruptible non-destructive run-time built-in self-test for field testing
US20080209288A1 (en) Apparatus for locating a defect in a scan chain while testing digital logic
US9213063B2 (en) Reset generation circuit for scan mode exit
CN112997089A (en) Extended JTAG controller and method for debugging function by using extended JTAG controller
JP2013242746A (en) Failure detection system and method, and semiconductor device
US11301607B2 (en) Testing of asynchronous reset logic
US10247776B2 (en) Structurally assisted functional test and diagnostics for integrated circuits
CN112585486A (en) Extended JTAG controller and method for resetting function by using extended JTAG controller
JP5059532B2 (en) Semiconductor integrated circuit
US20050154947A1 (en) Microcomputer And Method For Debugging Microcomputer
Larsson et al. Accessing on-chip instruments through the life-time of systems
De Carvalho et al. Increasing the fault coverage of processor devices during the operational phase functional test
Yang et al. The JTAG circuit design of accomplishing dynamic reconfiguration
Ray Soc instrumentations: Pre-silicon preparation for post-silicon readiness
JP3698478B2 (en) Debug device
Park et al. IFRA: Post-silicon bug localization in processors
JP5772326B2 (en) Semiconductor integrated circuit and design method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150403

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160329

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20161004