WO2013027529A1 - 割り込み処理に起因する異常動作の検知 - Google Patents

割り込み処理に起因する異常動作の検知 Download PDF

Info

Publication number
WO2013027529A1
WO2013027529A1 PCT/JP2012/068896 JP2012068896W WO2013027529A1 WO 2013027529 A1 WO2013027529 A1 WO 2013027529A1 JP 2012068896 W JP2012068896 W JP 2012068896W WO 2013027529 A1 WO2013027529 A1 WO 2013027529A1
Authority
WO
WIPO (PCT)
Prior art keywords
interrupt
priority
wdt
level
interrupt request
Prior art date
Application number
PCT/JP2012/068896
Other languages
English (en)
French (fr)
Inventor
敏幸 白鳥
Original Assignee
インターナショナル・ビジネス・マシーンズ・コーポレーション
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 インターナショナル・ビジネス・マシーンズ・コーポレーション filed Critical インターナショナル・ビジネス・マシーンズ・コーポレーション
Priority to CN201280041520.6A priority Critical patent/CN103748563B/zh
Priority to JP2013529938A priority patent/JP5579935B2/ja
Priority to DE112012002647.0T priority patent/DE112012002647B4/de
Priority to GB1402735.3A priority patent/GB2508109B/en
Priority to US14/239,832 priority patent/US9436627B2/en
Publication of WO2013027529A1 publication Critical patent/WO2013027529A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • G06F13/26Handling requests for interconnection or transfer for access to input/output bus using interrupt with priority control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs

Definitions

  • the present invention relates to a multiple interrupt system, and more specifically to detection of an abnormal operation caused by interrupt processing in the multiple interrupt system.
  • WDT watchdog timer
  • the system may not operate normally even if WDT does not time out (expire).
  • WDT does not time out
  • there are various causes of abnormal operations there are many abnormal operations related to interrupt processing, and in the case of a multiple interrupt system, automatic recovery and cause analysis are often difficult.
  • the WDT is reset by a timer interrupt (or by all interrupts).
  • the WDT can only confirm that the CPU (and its surrounding H / W) is operating. That is, it is confirmation that the peripheral circuit has issued an interrupt request and the CPU has accepted it. At this time, it is not confirmed whether the system can perform the expected operation.
  • Published Patent Publication No. 62-175840 discloses a data processing system that executes a plurality of processing programs according to the level between executions of the processing program of the highest level (execution priority).
  • a plurality of WDTs having different overflow values depending on the level of the processing program and reset after the completion of execution of the corresponding processing program are provided, and the data processing system is configured based on the overflow of any one of the WDTs. Detect failure.
  • Published Patent Publication No. 10-275097 discloses a data processing system that executes a plurality of processing programs based on priorities according to levels.
  • a plurality of WDTs respectively corresponding to a plurality of processing programs are arranged, and the occurrence of runaway of the data processing system is detected based on the overflow of the plurality of WDTs.
  • Patent Document 1 The data processing system of Patent Document 1 is premised on the execution of the highest level processing program activated by a timer, and interrupt processing between lower levels than the highest level, or a plurality of processing programs assigned to one level. There is no support for interrupt handling, etc. Also, there is no disclosure about the start timing of WDT.
  • the object of the present invention is due to interrupt processing even when a plurality of interrupts having different priorities occur in parallel or when a plurality of interrupts occur at one level (priority) in parallel. It is possible to perform multiple interrupt processing that can detect abnormal operations.
  • the present invention provides a method for detecting an abnormal operation caused by interrupt processing in a multiple interrupt system.
  • the method includes the steps of preparing a WDT having a predetermined timeout value for each interrupt priority, starting each WDT when an interrupt request with a corresponding priority is received, and at least one WDT times out.
  • a controller for controlling interrupt processing in a multiple interrupt system is provided.
  • the controller is provided for each interrupt priority, receives a plurality of WDTs each having a predetermined timeout value and an interrupt request signal from the device, and activates the corresponding WDT according to the priority of each interrupt request signal.
  • an interrupt processing circuit for outputting to the processor an interrupt request signal having a priority level at least one level higher than the priority corresponding to the WDT when at least one WDT times out. ing.
  • the interrupt processing circuit gives priority to an interrupt request signal caused by a time-out of WDT at a lower level than the priority. It is configured to detect that an abnormal operation has occurred in the interrupt processing of the lower level priority.
  • the present invention when there are a plurality of interrupts having the same or different interrupt priorities, it is possible to detect at which priority the interrupt processing is abnormal. Further, according to the present invention, it has been found that priority is given to an interrupt request due to a timeout of a lower-level priority WDT, in other words, when interrupt processing is started (interrupt processing at lower priority is not started). (Time) Since the abnormality of the interrupt process is detected, it is possible to improve the accuracy (accuracy) of the abnormality detection as compared with the detection at the time of the conventional WDT timeout.
  • FIG. 1 is a diagram for explaining a flow of a method for detecting an abnormal operation caused by interrupt processing in a multiple interrupt system. Note that this method can be basically implemented by hardware using a controller for controlling the interrupt processing of the present invention, which will be described later, but does not exclude implementation by a program (software). Needless to say, it may be implemented.
  • step S11 a plurality of WDTs are prepared.
  • Each WDT is configured to have a predetermined timeout value for each interrupt priority (level).
  • the predetermined timeout value is set according to the priority and the interrupt factor.
  • the interrupt factor means the contents to be processed by the CPU such as the program to be processed and various input / outputs via the I / O.
  • the timeout value is set shorter as the interrupt priority increases.
  • step S12 the WDT having the priority for which an interrupt request has been made is activated when the interrupt request is received.
  • the corresponding WDT is activated when the first interrupt request is made.
  • the activated WDT is reset when an interrupt of that priority is accepted, that is, when the corresponding interrupt request is accepted and the interrupt processing is started by the processor (at the start of execution of the interrupt handler).
  • step S13 it is determined whether or not at least one WDT has timed out (expire). Specifically, it is determined whether or not the WDT count value has reached or exceeded a predetermined timeout value (overflow). If this determination is No, the interrupt request has been processed smoothly, so that the process returns to step S12 and waits for the next interrupt request.
  • step S14 an interrupt request having a priority (higher) that is at least one level higher than the priority of the time-out WDT is accepted.
  • the upper WDT is activated.
  • the priority to be selected may be not only one level above the time-out WDT but also two or more levels.
  • the priority selected is not limited to one, and a plurality of priorities of two or more may be selected. That is, in step S14 for accepting an interrupt request, it is possible to accept interrupt requests having a plurality of priorities that are at least one level higher than the priority corresponding to the WDT.
  • step S14 when a plurality of interrupt factors are assigned to one of the interrupt priorities, priority is given to an interrupt request resulting from a timeout of WDT at a lower level than the priority. For example, even if there are a plurality of interrupt factors of level N priority, if there is a time-out of WDT with a priority of (N-1) level below, the priority of the (N-1) level The interrupt request is prioritized (assuming it is a new N level) and interrupted. The reason why this mechanism is employed is to detect that an abnormal operation has occurred in the interrupt processing at the priority level of the lower level (in the above example, (N-1) level) in step S16 described later.
  • step S15 it is determined whether or not at least one higher priority WDT selected in step S14 has timed out (expires). Specifically, as in step S13, it is determined whether or not the WDT count value is equal to or greater than a predetermined timeout value (overflow).
  • step S15 determines whether at least one higher priority interrupt request selected in step S14 is accepted and the interrupt processing proceeds smoothly.
  • step S16 the lower priority An interrupt error is detected.
  • priority is given to the interrupt request caused by the timeout of the lower-level priority WDT, in other words, when the interrupt processing is started (interrupt processing at the lower priority level may not be started).
  • the accuracy (accuracy) of the abnormality detection is improved as compared with the detection at the time of timeout of the conventional WDT, as is clear from the description of each embodiment described later. Is possible.
  • step S17 it is determined in step S17 whether or not the WDT corresponding to the highest priority interrupt has timed out (expire). Specifically, as in step S13, it is determined whether or not the WDT count value is equal to or greater than a predetermined timeout value (overflow). If this determination is No, the process returns to step S14, and an interrupt request with a priority (higher) that is at least one level higher than the priority of the WDT timed out in step S15 is accepted. At the same time, the upper WDT is activated.
  • step S17 If the determination in step S17 is Yes, the system is reset in step S18. This system reset detects an abnormality in interrupt processing.
  • FIG. 2 is a diagram illustrating a configuration that is an embodiment of the controller 100.
  • the controller 100 is configured as part of a multiple interrupt system or as an external controller.
  • the configuration of the priority levels of three interrupts (levels L1, L2, and L3) is shown as an example. However, this is merely an example, and any priority level of 4 or more is used. Can be expanded by increasing each component described below.
  • the controller 100 includes priority selectors 11, 12, 13, priority lines L 1, L 2, L 3, WDTs 21, 22, 23, and an interrupt processing circuit 31.
  • the outputs of the priority selectors 11, 12, and 13 are connected to priority lines L1, L2, and L3, respectively.
  • the priority selectors 11, 12, and 13 receive the interrupt request signals R1, R2, and R3 from each device (not shown), and send them to the corresponding priority lines L1, L2, and L3 according to the priority of each interrupt request signal.
  • Each request signal is output. More specifically, the priority selectors 11, 12, and 13 distribute the request signals to priorities set in advance according to the interrupt factors included in the interrupt request signals R 1, R 2, and R 3. This request signal also serves as an activation signal for the WDTs 21, 22, and 23.
  • the number of priority selectors is not limited to three and may be any number of at least two.
  • WDT 21 is a WDT corresponding to the priority L1, its input is connected to the priority line L1, and its output is connected to the priority line L2.
  • the WDT 21 has a predetermined timeout value T1.
  • the predetermined timeout value is set according to the priority and the interrupt factor as already described in step S11 of FIG.
  • WDTs 22 and 23 are WDTs corresponding to the priorities L2 and L3, respectively, and each input is connected to the priority lines L2 and L3.
  • the output of WDT 22 is connected to priority line L3.
  • the output of the WDT 23 is output as a signal for resetting the system, as will be described later.
  • the WDTs 22 and 23 have predetermined timeout values T2 and T3, respectively. In the example of FIG.
  • Each WDT is reset by a reset signal RS1 from the CPU or another reset circuit (not shown) when the corresponding interrupt request is sent to the CPU and the interrupt processing is started.
  • the WDT having the highest interrupt priority among the WDTs is configured to output a signal for resetting the system to a built-in CPU or an external reset circuit (not shown) when it times out.
  • a system reset signal RS2 is output. This system reset detects an abnormality in interrupt processing.
  • the interrupt processing circuit 31 receives the interrupt request signals RL1, RL2, and RL3 assigned with priority from the priority lines L1, L2, and L3, and selectively transmits the interrupt request signal to the CPU.
  • selective transmission means that, when outputting an interrupt request signal, the output of another interrupt request signal having a priority level equal to or lower than the corresponding priority level is suppressed. For example, when outputting an interrupt request signal having a priority level (N-1), except for an interrupt request signal having a higher priority level N or higher, other interrupt request signals having a priority level (N-1) or lower. Suppress output.
  • the interrupt processing circuit 31 is configured to output, to the processor, an interrupt request signal having a priority level at least one level higher than the priority level corresponding to the WDT when at least one WDT times out. For example, in FIG. 2, when the WDT 21 times out, the request signal RL2 from the higher priority line L2 is selectively transmitted to the CPU. At this time, not only the request signal RL2 with the priority L2 but also the request signal RL3 with the priority L3 on the second level may be selected and transmitted. Alternatively, the two request signals RL2 and RL3 may be selected and transmitted sequentially.
  • the interrupt processing circuit 31 is configured to prioritize an interrupt request signal caused by a time-out of a WDT at a lower level than the priority.
  • the priority level L2 for example, R1 and R3
  • the priority level L1 the priority level L1
  • the interrupt request RL1 is given priority (assumed to be a request RL2 at the L2 level) and interrupted. The reason why this mechanism is employed is to detect that an abnormal operation has occurred in the interrupt processing with the priority of the lower level (level L1 in the above example).
  • priority level N interrupt requests continue to be issued (abnormal operation)> (1)
  • Interrupt requests with priority level (N-1) cannot be accepted indefinitely. Therefore, the priority level (N-1) WDT times out and an interrupt request with a higher priority level N is made. This priority level N interrupt request is accepted.
  • the interrupt process corresponding to the time-out lower priority level WDT has the highest priority for a plurality of interrupt factors (including an interrupt request for abnormal operation). An abnormality is detected. Even if the priority order is wrongly determined, an abnormality is detected in the same manner as in the case of (2) of the second embodiment described below.
  • Each interrupt process is processed normally, but there are more interrupt requests than the processing capacity of the CPU, so an interrupt process with a low priority level N is not performed (abnormal operation)> A priority level N interrupt request is not accepted, the WDT times out, and a priority level (N + 1) interrupt request is made. Thereafter, the operation is performed in the same manner as in the above embodiments, and an abnormality is detected.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)
  • Bus Control (AREA)

Abstract

 本発明は、多重割り込みシステムにおいて、割り込み処理を制御するコントローラを提供する。コントローラ100は、割り込みの優先度毎に設けられた複数のウォッチドッグタイマ(WDT)21~23と、割り込み要求信号を受け取り、各割り込み要求信号の優先度に応じて対応するWDTに起動信号を出力する割り込み優先度セレクタ11~13と、WDTがタイムアウトした場合、当該WDTに対応する優先度よりも1レベル以上高い優先度の割り込み要求信号をプロセッサへ出力する割り込み処理回路31と、を備えている。割り込み処理回路は、割り込みの優先度の1つに複数の割り込み要因が割り当てられている場合、当該優先度よりも下位レベルのWDTのタイムアウトに起因する割り込み要求信号を優先させることにより、当該下位レベルの優先度の割り込み処理において異常動作があったことを検知する。

Description

割り込み処理に起因する異常動作の検知
 本発明は、多重割り込みシステムに関し、より具体的には、多重割り込みシステムにおける割り込み処理に起因する異常動作の検知に関する。
 組み込みシステムなどにおいて、リアルタイム性の保障などのため、割り込みの処理中であっても、処理中の割り込みの優先度(レベル)よりも高い優先度の割り込み要求があった場合、処理中の割り込み処理を中断し、高い優先度の割り込み処理を行い、その完了後に、中断された割り込み処理を再開するように構築されたシステムがある。いわゆる多重割り込みシステム、あるいは割り込みを優先度によってネストさせるシステムである。
 また、多重割り込みシステムか否かに関わらず、システムが動作していることをハードウェアによって監視するためのウォッチドッグタイマ(Watchdog Timer、以下「WDT」と表記する)を備えているシステムがある。
 組み込みシステムなどにおいて、WDTがタイムアウト(エクスパイア)しないにも関わらず、システムが正常に動作しなくなることがある。異常動作の原因は多様であるが、割り込み処理に関連する異常動作も多く、多重割り込みシステムの場合には、自動復旧や原因解析が困難な場合が多い。
 異常動作の検知が不十分な場合の一例として、(通常のシステムではWDTが1つしかないこともあり)WDTのリセットが、タイマ割り込みによって(あるいはすべての割り込みによって)行われる場合が挙げられる。この場合、WDTはCPU(とその周辺のH/W)が動作していることの確認しか行えない。つまり、周辺回路が割り込み要求を出していて、CPUがそれを受け付けていることの確認である。その際、システムが期待している動作を実行できているかの確認は行われていない。
 公開特許公報の62-175840号は、最高レベル(実行優先順位)の処理プログラムの実行の合間に、複数の処理プログラムをレベルに応じて実行するデータ処理システムを開示する。このシステムでは、処理プログラムのレベルに応じた異なるオーバーフロー値を有しかつ対応する処理理プログラムの実行終了後にリセットされるWDTを複数設けて、そのいずれか1つのWDTのオーバーフローに基づきデータ処理システムの障害発生を検出する。
 公開特許公報の10-275097は、複数の処理プログラムをレベルに応じた優先順位のもとに実行するデータ処理システムを開示する。このシステムでは、複数の処理プログラムのそれぞれに個別に対応する複数のWDTを配置し、これら複数のWDTのオーバーフローに基づきデータ処理システムの暴走発生を検出する。
特開昭62-175840号公報 特開平10-275097号公報
 特許文献1のデータ処理システムは、タイマによって起動される最高レベルの処理プログラムの実行を前提としており、最高レベルより下位レベル間での割り込み処理、あるいは1つのレベルに複数の処理プログラムが割り当てられている場合の割り込み処理などについて対応していない。また、WDTの起動タイミング等についての開示もない。
 特許文献2のデータ処理システムでは、複数のWDTが並行して起動することがないので、優先度の異なる複数の割り込みを並行して処理(管理)することができない。
 したがって、本発明の目的は、優先度の異なる複数の割り込みが並行して発生する場合や、1つのレベル(優先度)に複数の割り込みが並行して発生する場合などにおいても、割り込み処理に起因する異常動作の検知をすることができる、多重割り込み処理を可能にすることである。
 本発明は、多重割り込みシステムにおいて、割り込み処理に起因する異常動作を検知する方法を提供する。その方法は、割り込みの優先度毎に、所定のタイムアウト値を有するWDTを準備するステップと、各WDTを対応する優先度の割り込み要求があった時点で起動させるステップと、少なくとも1つのWDTがタイムアウトした場合、当該WDTに対応する優先度よりも少なくとも1レベル以上高い優先度の割り込み要求を受け入れるステップとを含み、割り込み要求を受け入れるステップにおいて、割り込みの優先度の1つに複数の割り込み要因が割り当てられている場合、当該優先度よりも下位レベルのWDTのタイムアウトに起因する割り込み要求を優先させることにより、当該下位レベルの優先度の割り込み処理において異常動作があったことを検知する。
 本発明の一態様では、多重割り込みシステムにおいて、割り込み処理を制御するコントローラを提供する。そのコントローラは、割り込みの優先度毎に設けられ、それぞれ所定のタイムアウト値を有する複数のWDTと、デバイスから割り込み要求信号を受け取り、各割り込み要求信号が有する優先度に応じて対応するWDTに起動信号を出力する割り込み優先度セレクタと、少なくとも1つのWDTがタイムアウトした場合、当該WDTに対応する優先度よりも少なくとも1レベル以上高い優先度の割り込み要求信号をプロセッサへ出力する割り込み処理回路と、を備えている。さらに、その割り込み処理回路は、割り込みの優先度の1つに複数の割り込み要因が割り当てられている場合、当該優先度よりも下位レベルのWDTのタイムアウトに起因する割り込み要求信号を優先させることにより、当該下位レベルの優先度の割り込み処理において異常動作があったことを検知するように構成されている。
 本発明およびその一態様によれば、割り込みの優先度が同一あるいは異なる複数の割り込みがあった場合において、いずれの優先度での割り込み処理に異常があったかを検知することができる。また、本発明では、優先度の下位レベルのWDTのタイムアウトに起因する割り込み要求を優先させて、言い換えれば、割り込みの処理を開始した時点(下位の優先度の割り込み処理が開始されないことが判明した時点)割り込み処理の異常を検知するので、従来のWDTのタイムアウト時での検知よりもその異常検知の確度(精度)を向上させることが可能となる。
本発明の割り込み処理に起因する異常動作を検知する方法の流れを説明する図である。 本発明の割り込み処理を制御するコントローラの構成を示す図である。
 図面を参照しながら本発明の実施の形態を説明する。図1は、多重割り込みシステムにおいて、割り込み処理に起因する異常動作を検知する方法の流れを説明する図である。なお、本方法は後述する本発明の割り込み処理を制御するコントローラを一例として基本的にハードウェアで実装可能であるが、プログラム(ソフトウェア)による実施を排除するものではなく、両者の協業の形態で実装される場合があることは言うまでもない。
 ステップS11において、複数のWDTを準備する。各WDTは、割り込みの優先度(レベル)毎に、所定のタイムアウト値を有するに構成される。所定のタイムアウト値は、優先度、割り込み要因に応じて設定される。ここで、割り込み要因とは、処理されるプログラム、I/Oを介した各種の入出力などのCPUが処理する内容を意味する。一般に、割り込みの優先度が上がるほどタイムアウト値は短く設定される。
 ステップS12において、割り込み要求があった優先度のWDTをその割り込み要求を受けた時点で起動させる。その際、割り込みの優先度の1つに複数の割り込み要因が割り当てられている場合、その割り込み要因中での最初の割り込み要求があった時点で対応するWDTを起動させる。起動したWDTは、その優先度の割り込みの受付時、すなわち対応する割り込み要求が受け入れられプロセッサによって当該割り込み処理が開始された時点で(割り込みハンドラの実行開始時に)リセットされる。
 ステップS13において、少なくとも1つのWDTがタイムアウト(エクスパイア)したか否かを判定する。具体的にはWDTのカウント値が所定のタイムアウト値以上になったか(オーバーフローしたか)否かを判定する。この判定がNoの場合、割り込み要求が順調に処理されているので、ステップS12の前に戻り、次の割り込み要求を待つ状態となる。
 ステップS13の判定がYesの場合、次のステップS14において、そのタイムアウトしたWDTの優先度よりも少なくとも1レベル以上高い(上位の)優先度の割り込み要求を受け入れる。同時にその上位のWDTを起動させる。その際、選択される優先度はタイムアウトしたWDTの1レベル上のみならず、2レベル以上上の優先度であってもよい。また、選択される優先度は1つとは限らず、2以上の複数の優先度を選択してもよい。すなわち、割り込み要求を受け入れるステップS14においては、WDTに対応する優先度よりも少なくとも1レベル以上高い複数の優先度の割り込み要求を受け入れることができる。
ステップS14において、割り込みの優先度の1つに複数の割り込み要因が割り当てられている場合、当該優先度よりも下位レベルのWDTのタイムアウトに起因する割り込み要求を優先させる。例えば、レベルNの優先度の割り込み要因が複数あったとしても、1つ下の(N-1)レベルの優先度のWDTのタイムアウトがあった場合、その(N-1)レベルの優先度の割り込み要求を優先させて(あたかも新たなNレベルとみなして)割り込ませる。この仕組みを採用するのは、後述するステップS16において、当該下位レベル(上の例では(N-1)レベル)の優先度の割り込み処理において異常動作があったことを検知させるためである。
 ステップS15において、ステップS14で選択された少なくとも1つ上位の優先度のWDTが、タイムアウト(エクスパイア)したか否かを判定する。具体的な判定は、ステップS13の場合と同様に、WDTのカウント値が所定のタイムアウト値以上になったか(オーバーフローしたか)否かを判定する。
 ステップS15の判定がNoの場合、すなわちステップS14で選択された少なくとも1つの上位の優先度の割り込み要求が受け入れられてその割り込み処理が順調に進んだ場合、ステップS16において、下位の優先度での割り込みの異常が検知される。具体的には、上述したステップS14において説明したように、下位レベルのWDTのタイムアウトに起因した割り込み要求が採用された場合、そのWDTがタイムアウトした優先度の割り込み処理に異常があったことが検知される。このように、本発明では、優先度の下位レベルのWDTのタイムアウトに起因する割り込み要求を優先させて、言い換えれば、割り込みの処理を開始した時点(下位の優先度の割り込み処理が開始されないことが判明した時点)割り込み処理の異常を検知するので、後述する各実施例の記載からも明らかなように、従来のWDTのタイムアウト時での検知よりもその異常検知の確度(精度)を向上させることが可能となる。
 ステップS15の判定がYesの場合、ステップS17において、優先度が最上位の割り込みに対応するWDTがタイムアウト(エクスパイア)したか否かを判定する。具体的な判定は、ステップS13の場合と同様に、WDTのカウント値が所定のタイムアウト値以上になったか(オーバーフローしたか)否かを判定する。この判定がNoの場合、ステップS14に戻り、ステップS15でタイムアウトしたWDTの優先度よりも少なくとも1レベル以上さらに高い(上位の)優先度の割り込み要求を受け入れる。同時にその上位のWDTを起動させる。
 ステップS17の判定がYesの場合、ステップS18においてシステムをリセットする。このシステムのリセットにより割り込み処理の異常が検知される。
 次に、図2を参照しながら、本発明の割り込み処理を制御するコントローラについて説明する。図2はそのコントローラ100の一実施形態である構成を示す図である。コントローラ100は、多重割り込みシステムの一部として、あるいは外部のコントローラとして構成される。なお、図2では、例として3つの割り込みの優先度(レベルL1、L2、L3)についての構成を示しているが、これはあくまで一例であって、4以上の数の任意の優先度の場合は、以下に述べる各構成要素を増やして拡張していけばよい。
 図2において、コントローラ100は、優先度セレクタ11、12、13、優先度ラインL1、L2、L3、WDT21、22、23、および割り込み処理回路31を含む。優先度セレクタ11、12、13の出力は、それぞれ優先度ラインL1、L2、L3に接続される。優先度セレクタ11、12、13は、各デバイス(図示なし)から割り込み要求信号R1、R2、R3を受け取り、各割り込み要求信号が有する優先度に応じて対応する優先度ラインL1、L2、L3に各要求信号を出力する。より具合的には、優先度セレクタ11、12、13は、割り込み要求信号R1、R2、R3が有する割り込み要因に応じて予め設定した優先度に各要求信号を振り分ける。この要求信号は、WDT21、22、23の起動信号ともなる。なお、優先度セレクタの数は3つに限られず少なくとも2以上の任意の数でよい。
 WDT21は、優先度L1に対応したWDTであり、その入力が優先度ラインL1に接続し、その出力は優先度ラインL2に接続する。WDT21は、所定のタイムアウト値T1を有する。所定のタイムアウト値は、既に図1のステップS11で説明したように、優先度や割り込み要因に応じて設定される。同様に、WDT22、23は、それぞれ優先度L2、L3に対応したWDTであり、各入力が優先度ラインL2、L3に接続する。WDT22の出力は優先度ラインL3に接続する。WDT23の出力は、後述するように、システムをリセットする信号として出力される。WDT22、23は、それぞれ所定のタイムアウト値T2、T3を有する。図2の例では、優先度はL1<L2<L3のように高くなるので、タイムアウト値は、逆にT1>T2>T3のように小さくなる。各WDTは、対応する割り込み要求がCPUへ送られてその割り込み処理が開始された時点で、CPUあるいは別のリセット回路(図示なし)からのリセット信号RS1によってリセットされる。
 WDTのうち割り込みの優先度が最上位のWDTは、自らがタイムアウトした場合、システムをリセットする信号をCPU内蔵のあるいは外付けのリセット回路(図示なし)へ向けて出力するように構成される。図2の例では、最上位のWDT23がタイムアウトした場合、システムのリセット信号RS2を出力する。このシステムのリセットにより割り込み処理の異常が検知される。
 割り込み処理回路31は、優先度ラインL1、L2、L3から優先度で割り振られた割り込み要求信号RL1、RL2、RL3を受け取り、CPUへ向けて選択的に割り込み要求信号を送信する。ここで選択的な送信とは、割り込み要求信号の出力に際して、対応する優先度以下のレベルの優先度を有する他の割り込み要求信号の出力を抑制することを意味する。例えば、優先度レベル(N-1)の割り込み要求信号を出力する場合、上位の優先度レベルN以上の割り込み要求信号を除いて、優先度レベル(N-1)以下の他の割り込み要求信号の出力を抑制する。
 割り込み処理回路31は、少なくとも1つのWDTがタイムアウトした場合、当該WDTに対応する優先度よりも少なくとも1レベル以上高い優先度の割り込み要求信号をプロセッサへ出力するように構成される。例えば、図2において、WDT21がタイムアウトした場合、1つ上位の優先度ラインL2からの要求信号RL2をCPUへ向けて選択的に送信する。その際、優先度L2の要求信号RL2のみならず、2レベル上の優先度L3の要求信号RL3を選択して送信してもよい。また、2つの要求信号RL2、RL3を選択して順次送信するようにしてもよい。
割り込み処理回路31は、割り込みの優先度の1つに複数の割り込み要因が割り当てられている場合、当該優先度よりも下位レベルのWDTのタイムアウトに起因する割り込み要求信号を優先させるように構成される。例えば、図2において、レベルL2の優先度の割り込み要因が複数(例えばR1とR3)あったとしても、1つ下のレベルL1の優先度のWDT21のタイムアウトがあった場合、そのレベルL1の優先度の割り込み要求RL1を優先させて(あたかもL2レベルの要求RL2とみなして)割り込ませる。この仕組みを採用するのは、当該下位レベル(上の例ではレベルL1)の優先度の割り込み処理において異常動作があったことを検知させるためである。
 次に、本発明の方法、コントローラによる割り込み処理の異常検知例を実施例として以下に説明する。
 <優先度レベルNの割り込み処理が間違っていて割り込み要因をクリアしないため、優先度レベルNの割り込み要求が出続ける(異常動作)場合>
(1)優先度レベル(N-1)の割り込み要求は、無限に受け付けられない。このため、優先度レベル(N-1)のWDTはタイムアウトし、上位の優先度レベルNの割り込み要求が行われる。この優先度レベルNの割り込み要求は受け付けられる。その際、(異常動作の割り込み要求を含めて)複数の割り込み要因に対して、既に上述したように、タイムアウトした下位の優先度レベルのWDTに対応する割り込み処理が最優先されるので、割り込み処理の異常が検知される。仮に優先順位の判定を間違った場合でも、下記の実施例2の(1)の場合と同様に処理されて異常が検知される。
(2)(N-2)以下の優先度レベルの割り込み要求が発端の場合、それぞれの優先度レベルのWDTがタイムアウトし、順次上位の優先度レベルのWDTが起動されてタイムアウトするので、上記(1)の場合と同様に異常が検知される(以下の実施例でも同様)。
 <優先度レベルNの割り込み処理が無限ループ(異常動作)をしている場合>
(1)優先度レベル(N-1)の割り込み要求は、無限に受け付けられない。このため、優先度レベル(N-1)のWDTはタイムアウトし、上位の優先度レベルNの割り込み要求を行う。優先度レベルNの割り込み要求も無限に受け付けられない。このため、優先度レベルNのWDTはタイムアウトし、上位の優先度レベル(N+1)の割り込み要求を行う。この優先度レベル(N+1)の割り込み要求は受け付けられるので、割り込み処理の異常が検知される。
(2)優先度レベルNの(新たな)割り込み要求が発端であっても、優先度レベルNのWDTがタイムアウトするので、上記(1)の場合と同様に異常が検知される。
<1つ1つの割り込み処理は正常に処理されているが、CPUの処理能力と比べ割り込み要求が多いため、優先度低レベルNの割り込み処理が行われない(異常動作)場合>
 優先度レベルNの割り込み要求が受け付けられず、WDTがタイムアウトし、優先度レベル(N+1)の割り込み要求が行われる。その後、上記各実施例の場合と同様に動作し、異常が検知される。
<割り込み処理中に、全ての割り込みを長時間禁止してしまう(異常動作)場合>
 いずれかの優先度レベルのWDTがタイムアウトし、順次上位の優先度レベルの割り込み要求が行われる。最終的には、最上位のWDTがタイムアウトし、システムのリセットが行われて異常が検知される。システムのリセット以前に割り込みが許可された場合でも、その時点で最上位となっているWDTに対応する割り込みによって、異常が検知される。
 本発明の実施形態について、図を参照しながら説明をした。しかし、本発明はこれらの実施形態に限られるものではない。本発明はその趣旨を逸脱しない範囲で当業者の知識に基づき種々なる改良、修正、変形を加えた態様で実施できるものである。
11、12、13 優先度セレクタ
21、22、23 WDT
31 割り込み処理回路
100 コントローラ

Claims (9)

  1.  多重割り込みシステムにおいて、割り込み処理に起因する異常動作を検知する方法であって、
     割り込みの優先度毎に、所定のタイムアウト値を有するウォッチドッグタイマ(WDT)を準備するステップと、
     各WDTを対応する優先度の割り込み要求があった時点で起動させるステップと、
     少なくとも1つの前記WDTがタイムアウトした場合、当該WDTに対応する優先度よりも少なくとも1レベル以上高い優先度の割り込み要求を受け入れるステップと、を含み、
     前記割り込み要求を受け入れるステップにおいて、前記割り込みの優先度の1つに複数の割り込み要因が割り当てられている場合、当該優先度よりも下位レベルのWDTのタイムアウトに起因する割り込み要求を優先させることにより、当該下位レベルの優先度の割り込み処理において異常動作があったことを検知する、方法。
  2.  前記各WDTを対応する優先度の割り込み要求があった時点で起動させるステップは、前記割り込みの優先度の1つに複数の割り込み要因が割り当てられている場合、当該割り込み要因中の最初の割り込み要求があった時点で対応するWDTを起動させるステップを含む、請求項1の方法。
  3.  各々の前記WDTを、対応する割り込み要求が受け入れられプロセッサによって当該割り込み処理が開始された時点でリセットするステップを含む、請求項1または2の方法。
  4.  前記割り込み要求を受け入れるステップは、前記WDTに対応する優先度よりも少なくとも1レベル以上高い複数の優先度の割り込み要求を受け入れる、請求項1~3のいずれか1項の方法。
  5.  前記優先度が最上位の割り込みに対応するWDTがタイムアウトした場合、前記システムをリセットするステップをさらに含む、請求項1~4のいずれか1項の方法。
  6.  多重割り込みシステムにおいて、割り込み処理を制御するコントローラであって、
     割り込みの優先度毎に設けられ、それぞれ所定のタイムアウト値を有する複数のウォッチドッグタイマ(WDT)と、
     デバイスから割り込み要求信号を受け取り、各割り込み要求信号が有する優先度に応じて対応する前記WDTに起動信号を出力する割り込み優先度セレクタと、
     少なくとも1つの前記WDTがタイムアウトした場合、当該WDTに対応する優先度よりも少なくとも1レベル以上高い優先度の割り込み要求信号をプロセッサへ出力する割り込み処理回路と、を備え、
     前記割り込み処理回路は、前記割り込みの優先度の1つに複数の割り込み要因が割り当てられている場合、当該優先度よりも下位レベルのWDTのタイムアウトに起因する割り込み要求信号を優先させることにより、当該下位レベルの優先度の割り込み処理において異常動作があったことを検知するように構成されている、コントローラ。
  7.  前記割り込み処理回路は、前記割り込み要求信号の出力に際して、対応する優先度以下のレベルの優先度を有する他の割り込み要求信号の出力を抑制するように構成されている、請求項6のコントローラ。
  8.  各々の前記WDTは、対応する割り込み要求が受け入れられ前記プロセッサによって当該割り込み処理が開始された時点でリセットされる、請求項6または7のコントローラ。
  9.  前記割り込みの優先度が最上位のWDTがタイムアウトした場合、当該優先度が最上位のWDTは前記システムをリセットする信号を出力する、請求項6~8のいずれか1項のコントローラ。
PCT/JP2012/068896 2011-08-25 2012-07-25 割り込み処理に起因する異常動作の検知 WO2013027529A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN201280041520.6A CN103748563B (zh) 2011-08-25 2012-07-25 检测由中断处理引起的异常操作
JP2013529938A JP5579935B2 (ja) 2011-08-25 2012-07-25 割り込み処理に起因する異常動作の検知
DE112012002647.0T DE112012002647B4 (de) 2011-08-25 2012-07-25 Erkennen eines durch Interrupt-Verarbeitung verursachten anormalen Betriebs
GB1402735.3A GB2508109B (en) 2011-08-25 2012-07-25 Detection of abnormal operation caused by interrupt process
US14/239,832 US9436627B2 (en) 2011-08-25 2012-07-25 Detection of abnormal operation caused by interrupt processing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011-183312 2011-08-25
JP2011183312 2011-08-25

Publications (1)

Publication Number Publication Date
WO2013027529A1 true WO2013027529A1 (ja) 2013-02-28

Family

ID=47746280

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/068896 WO2013027529A1 (ja) 2011-08-25 2012-07-25 割り込み処理に起因する異常動作の検知

Country Status (6)

Country Link
US (1) US9436627B2 (ja)
JP (1) JP5579935B2 (ja)
CN (1) CN103748563B (ja)
DE (1) DE112012002647B4 (ja)
GB (1) GB2508109B (ja)
WO (1) WO2013027529A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9436627B2 (en) 2011-08-25 2016-09-06 International Business Machines Corporation Detection of abnormal operation caused by interrupt processing
JP2017045303A (ja) * 2015-08-27 2017-03-02 ファナック株式会社 パソコン機能異常時の要因検出が可能な制御装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6266239B2 (ja) * 2013-07-11 2018-01-24 ルネサスエレクトロニクス株式会社 マイクロコンピュータ
CN107423151A (zh) * 2017-03-28 2017-12-01 上海斐讯数据通信技术有限公司 一种无线接入点系统恢复的方法和装置
CN110083473B (zh) * 2019-04-16 2023-01-10 芯来智融半导体科技(上海)有限公司 基于risc-v架构总线访问错误的改进系统及方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63308646A (ja) * 1987-06-10 1988-12-16 Fujitsu Ltd デ−タ処理装置における負荷状態検出方式
JPH04155543A (ja) * 1990-10-19 1992-05-28 Nec Corp マイコン誤動作自己検知方式
JPH11161523A (ja) * 1997-12-01 1999-06-18 Hitachi Ltd 障害情報収集装置
JPH11237995A (ja) * 1998-02-23 1999-08-31 Matsushita Electric Ind Co Ltd イベント制御装置
JP2010009258A (ja) * 2008-06-26 2010-01-14 Mitsubishi Electric Corp ソフトウエアの異常検出装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59184895A (ja) 1983-04-06 1984-10-20 株式会社日立製作所 原子炉の負荷追従制御方法
JPS62175840A (ja) 1986-01-29 1987-08-01 Nec Corp マルチレベル・ウオツチドツグ・タイマ−方式
JP2867717B2 (ja) 1991-02-01 1999-03-10 日本電気株式会社 マイクロコンピュータ
JP3137025B2 (ja) 1997-03-31 2001-02-19 日本電気株式会社 データ処理システムの暴走検出方法
JP2002351700A (ja) 2001-05-24 2002-12-06 Denso Corp コンピュータシステム、プログラム
US7003775B2 (en) 2001-08-17 2006-02-21 Hewlett-Packard Development Company, L.P. Hardware implementation of an application-level watchdog timer
US7689875B2 (en) 2002-04-25 2010-03-30 Microsoft Corporation Watchdog timer using a high precision event timer
CN100405307C (zh) * 2005-02-01 2008-07-23 艾默生网络能源有限公司 看门狗控制方法
JP5328720B2 (ja) * 2010-06-10 2013-10-30 株式会社コンテック 情報処理装置
DE112012002647B4 (de) 2011-08-25 2019-05-09 International Business Machines Corporation Erkennen eines durch Interrupt-Verarbeitung verursachten anormalen Betriebs

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63308646A (ja) * 1987-06-10 1988-12-16 Fujitsu Ltd デ−タ処理装置における負荷状態検出方式
JPH04155543A (ja) * 1990-10-19 1992-05-28 Nec Corp マイコン誤動作自己検知方式
JPH11161523A (ja) * 1997-12-01 1999-06-18 Hitachi Ltd 障害情報収集装置
JPH11237995A (ja) * 1998-02-23 1999-08-31 Matsushita Electric Ind Co Ltd イベント制御装置
JP2010009258A (ja) * 2008-06-26 2010-01-14 Mitsubishi Electric Corp ソフトウエアの異常検出装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9436627B2 (en) 2011-08-25 2016-09-06 International Business Machines Corporation Detection of abnormal operation caused by interrupt processing
JP2017045303A (ja) * 2015-08-27 2017-03-02 ファナック株式会社 パソコン機能異常時の要因検出が可能な制御装置

Also Published As

Publication number Publication date
US9436627B2 (en) 2016-09-06
US20140181344A1 (en) 2014-06-26
JPWO2013027529A1 (ja) 2015-03-19
GB2508109A (en) 2014-05-21
CN103748563B (zh) 2017-03-08
GB2508109B (en) 2014-10-08
JP5579935B2 (ja) 2014-08-27
DE112012002647T5 (de) 2014-03-27
GB201402735D0 (en) 2014-04-02
DE112012002647B4 (de) 2019-05-09
CN103748563A (zh) 2014-04-23

Similar Documents

Publication Publication Date Title
JP5579935B2 (ja) 割り込み処理に起因する異常動作の検知
WO2009122670A1 (ja) マルチプロセッサシステムおよびマルチプロセッサシステムの割込み制御方法
US20110022759A1 (en) Multiprocessor system
JP2006285810A (ja) クラスタ構成コンピュータシステム及びその系リセット方法
US9575911B2 (en) Interrupt controller and a method of controlling processing of interrupt requests by a plurality of processing units
JP5932242B2 (ja) 情報処理装置、通信方法、及びプログラム
US8156386B2 (en) Information processing apparatus, and method and computer program for controlling same, for detecting certain failures
US6910133B1 (en) Reflected interrupt for hardware-based encryption
JP7012915B2 (ja) コントローラ
CN112119386B (zh) 中断控制器
JP2008225807A (ja) 制御装置およびそのプログラム暴走監視方法
JP3859564B2 (ja) イベント通知タスク制御処理方式及び方法並びにプログラム
EP1653354A1 (en) Real time control system
JP2020091693A (ja) 通信制御装置および割り込み実行方法
JP2008217419A (ja) 割り込みレベルを自動変更する割り込みコントローラ
JP5906807B2 (ja) 演算処理装置及びストール監視方法
WO2017037863A1 (ja) 計算機装置及び制御方法及び制御プログラム
JP2007156940A (ja) 処理装置
JP2009193525A (ja) 割込制御装置
JP6475056B2 (ja) インタフェース障害検出装置、インタフェース障害検出システム、インタフェース障害検出方法、及びインタフェース障害検出プログラム
JPH09134294A (ja) 割り込み制御回路
JP2006146641A (ja) マルチスレッドプロセッサ及びマルチスレッドプロセッサの割込み方法
JPH0658654B2 (ja) 割込み受付け制御方式
JP2006318237A (ja) イベント駆動型制御装置
JP2009087149A (ja) 電子デバイス、データ処理装置、及びバス制御方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12825722

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2013529938

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 112012002647

Country of ref document: DE

Ref document number: 1120120026470

Country of ref document: DE

ENP Entry into the national phase

Ref document number: 1402735

Country of ref document: GB

Kind code of ref document: A

Free format text: PCT FILING DATE = 20120725

WWE Wipo information: entry into national phase

Ref document number: 1402735.3

Country of ref document: GB

WWE Wipo information: entry into national phase

Ref document number: 14239832

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 12825722

Country of ref document: EP

Kind code of ref document: A1