JP2013037550A - Control device having bus diagnosing function - Google Patents
Control device having bus diagnosing function Download PDFInfo
- Publication number
- JP2013037550A JP2013037550A JP2011173357A JP2011173357A JP2013037550A JP 2013037550 A JP2013037550 A JP 2013037550A JP 2011173357 A JP2011173357 A JP 2011173357A JP 2011173357 A JP2011173357 A JP 2011173357A JP 2013037550 A JP2013037550 A JP 2013037550A
- Authority
- JP
- Japan
- Prior art keywords
- bus
- storage unit
- address
- safety
- data
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2205—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
- G06F11/221—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
Description
本発明は、バス診断機能を備えた制御装置に関し、特に安全関連部と非安全関連部が混在する制御装置においての、バス上の転送エラー検出をする技術に関する。 The present invention relates to a control device having a bus diagnosis function, and more particularly to a technique for detecting a transfer error on a bus in a control device in which safety-related parts and non-safety-related parts are mixed.
安全関連部を有する制御装置において、中央処理部と集積回路が安全関連部に含まれる場合には、両者の間で授受される安全関連データに誤転送が発生したことで危険な動作が発生することを防止するため、中央処理部のデータバスに、パリティビットやECCビットを付加し、データ転送誤りを診断するのが一般的である。このような診断を行うためには、中央処理部内にパリティチェック等の診断機能を有する必要があるのに対し、近年開発された高性能な組み込み用途の中央処理部は、ほとんどの品種が外部データバスにパリティチェック等の診断機能を持たないので、この手法をとることができない。なお、安全関連部とは、故障や誤動作によりシステムが誤動作をすることで使用者に危険な機械動作が発生しないようにする機能安全を実行する回路ならびにソフトウェア部分のことである。 In a control device having a safety-related part, when the central processing unit and the integrated circuit are included in the safety-related part, a dangerous operation occurs due to an erroneous transfer of safety-related data exchanged between the two. In order to prevent this, it is common to diagnose a data transfer error by adding a parity bit or ECC bit to the data bus of the central processing unit. In order to make such a diagnosis, it is necessary to have a diagnosis function such as a parity check in the central processing unit. On the other hand, most recently developed central processing units for high-performance embedded applications have external data Since the bus does not have a diagnostic function such as parity check, this method cannot be taken. The safety-related part is a circuit and software part that performs functional safety to prevent a dangerous machine operation from occurring due to a malfunction or malfunction of the system.
図6は、中央処理部であるCPU1bのICパッケージ内にCPUバスのパリティ処理回路を備えた従来の制御装置の構成例を示すブロック図である。この例ではCPU1bのパッケージ内に、外部デバイスである集積回路6cにデータを書き込む際にデータバス2上のデータの全ビットに対するパリティ31を演算するためのパリティ生成回路30と、集積回路6cからデータを読み出した際に、データバス2上のデータとパリティ31との整合性がとれているかをチェックし、異常時にエラーをCPUコアに知らせるためのパリティエラー検出回路32を備えている。このようなパリティチェック機能を内蔵したCPUでは、図6に示すように、集積回路6c内に、入出力バッファ7を通過したデータバス2とパリティ31からパリティエラーを検出する、パリティエラー検出回路33を設け、書込制御信号WRN4が有効時にレジスタ群34に対して、誤ったデータが書き込まれるのを防止する。また、レジスタ群34の値をCPU1bが読み出す際には、レジスタ群34から出力されたデータからパリティを演算するパリティ生成回路35を設け、CPU1bは、レジスタ群34からのデータを読み出す際に、パリティエラー検出回路32でエラーが検出されなかったことを確認することで、データ転送時にエラーが無く、正しくレジスタ内容が読み出せたことを確認する。なお、エラーが発生した場合は、リトライを行うか、制御が正常に行えないと判断し、危険回避のための処理に移行する。
FIG. 6 is a block diagram showing a configuration example of a conventional control device provided with a parity processing circuit of a CPU bus in an IC package of the
図7は、本発明の目的とするデータバス及びアドレスバスの転送エラー検出ではなく、集積回路内の回路故障または一過性のデータのエラーを検出するための従来技術の一実施例を示すブロック図である。この例は、レジスタ群34に含まれるレジスタは、RAMのようにCPU1cから書き込まれたデータを保持し、読み出し時にその値を出力する。レジスタ群34は、CPU1cからの書き込みデータと合わせて、パリティ生成回路36が演算したパリティを記憶し、読み出し時には記憶したデータとパリティの整合性をパリティエラー検出回路37がチェックし、異常がある場合は、CPU1cに対して、割込要求38を行うことで、エラー発生を伝達する。CPU1cは、割込処理において、レジスタでの誤り発生を検知し、安全を確保するための適切な処理を実行する。
FIG. 7 is a block diagram showing an embodiment of the prior art for detecting a circuit failure or transient data error in an integrated circuit, rather than a data bus and address bus transfer error detection which is an object of the present invention. FIG. In this example, the register included in the
図7と同様に、集積回路内の故障を検出する従来技術としては、特許文献1、2に示す技術が公開されている。また、特許文献3においては、ディジタル入力信号の遠隔伝送部のビット誤りを検出するために、ディジタル入力信号を反転して転送し、未反転データと比較して誤り検出する技術が開示されている。特許文献4の請求項5においては、2つのバスを介して送られるデータと、ビット反転データを出力デバイス側で比較して出力許可する技術が開示されている。
Similar to FIG. 7, techniques disclosed in
図6に示すような従来の制御装置においては、CPUの内部にパリティ生成回路及びパリティエラー検出回路が必要であるが、近年の高性能な組込用のCPUは、データバス及びアドレスバスに、パリティビットやECCビットを付加しないCPUが大部分であり、一般的な組込用のCPUを用いてデータバス及びアドレスバス上の転送エラー検出を行うことは困難になっている。一方、特許文献1から特許文献4には、CPUとデータバス及びアドレスバスにより接続される集積回路内にデータバス及びアドレスバス上の転送エラー検出のための回路を付加することによりデータバス及びアドレスバス上の転送エラーを検出する実施例が記載されているが、これらの例では、当該転送エラー検出のための回路が、安全関連部か、非安全関連部かを区別することなく動作するため、CPUの処理ルーチンに非安全関連部に係る処理が混在するシステムでは、CPUが、安全関連部に係る処理を行う際にデータバス及びアドレスバスの転送エラーの検出を行い、非安全関連部に係る処理を行う際はデータバス及びアドレスバスの転送エラーの検出を行わないということができなかった。
In the conventional control device as shown in FIG. 6, a parity generation circuit and a parity error detection circuit are required inside the CPU. However, in recent years, high-performance built-in CPUs are used in the data bus and the address bus. Most CPUs do not add parity bits or ECC bits, and it is difficult to detect transfer errors on the data bus and address bus using a general embedded CPU. On the other hand, in
本発明の目的は、安全関連部に属するレジスタである安全関連レジスタ及び非安全関連部に属する通常レジスタを有する集積回路と、中央処理部を有する制御装置において、中央処理部が安全関連レジスタにアクセスしたときについてのみ、データバス及びアドレスバス上の転送エラーを、検知することができる制御装置を提供することにある。 An object of the present invention is to provide an integrated circuit having a safety-related register, which is a register belonging to a safety-related part, and a normal register belonging to a non-safety-related part, and a control device having a central processing part, and the central processing unit accesses the safety-related register. It is an object of the present invention to provide a control device that can detect a transfer error on a data bus and an address bus only when the error occurs.
(1)本発明は、集積回路と、前記集積回路とデータバスで接続されている中央処理部と、を有するデータバス診断機能を備えた制御装置であって、前記集積回路は、前記中央処理部からアクセスされ、所定の安全関連部の動作状態を規定するデータを記憶する安全関連記憶部と、前記中央処理部からアクセスされ、所定の非安全関連部の動作状態を規定するデータを記憶する非安全関連記憶部と、データバス診断記憶部と、バス診断アドレス判定部と、を備え、前記バス診断アドレス判定部は、前記中央処理部のアクセス先のアドレスに基づき、前記中央処理部のアクセス先が前記安全関連記憶部であるときは、前記データバス診断記憶部にバス診断信号を供給し、前記中央処理部のアクセス先が前記非安全関連記憶部であるときは、前記データバス診断記憶部にバス診断信号を供給せず、前記バス診断アドレス判定部から前記バス診断信号を受けた前記データバス診断記憶部は、前記安全関連記憶部に格納されたデータを格納し、前記データバス診断記憶部に前記安全関連記憶部に格納されたデータが格納された後、前記中央処理部は、前記データバス診断記憶部に格納されたデータ及び前記安全関連部に格納されたデータを読み出し、前記データバス診断記憶部に格納されたデータと前記安全関連記憶部に格納されたデータを比較することでデータバス上の転送エラーを検出することを特徴とする。 (1) The present invention is a control device having a data bus diagnosis function having an integrated circuit and a central processing unit connected to the integrated circuit through a data bus, the integrated circuit including the central processing unit A safety-related storage unit that stores data that defines the operational state of a predetermined safety-related unit and is accessed from the central processing unit and stores data that defines the operational state of a predetermined non-safety-related unit. A non-safety related storage unit, a data bus diagnosis storage unit, and a bus diagnosis address determination unit, wherein the bus diagnosis address determination unit is configured to access the central processing unit based on an access destination address of the central processing unit. When the destination is the safety-related storage unit, supply a bus diagnostic signal to the data bus diagnostic storage unit, and when the access destination of the central processing unit is the non-safety-related storage unit, The data bus diagnosis storage unit that has received the bus diagnosis signal from the bus diagnosis address determination unit does not supply a bus diagnosis signal to the data bus diagnosis storage unit, stores the data stored in the safety-related storage unit, and After the data stored in the safety-related storage unit is stored in the data bus diagnosis storage unit, the central processing unit stores the data stored in the data bus diagnosis storage unit and the data stored in the safety-related unit. A transfer error on the data bus is detected by reading and comparing the data stored in the data bus diagnostic storage unit with the data stored in the safety related storage unit.
(2)上記(1)のデータバス診断機能を備えた制御装置であって、前記集積回路の前記データバス診断記憶部は、前記中央処理部の割込レベルの数に対応して複数設けられ、前記集積回路はさらに、前記中央処理部が前記安全関連記憶部にアクセスする際の割込レベルを示すデータを格納する割込レベル記憶部と、前記割込レベル記憶部に格納されたデータに基づいて、複数の前記データバス診断記憶部からいずれか1つを選択し、選択された1つのデータバス診断記憶部に、前記バス診断アドレス判定部から供給された前記バス診断信号を供給する選択回路と、を備えることが好ましい。 (2) In the control device having the data bus diagnosis function of (1), a plurality of the data bus diagnosis storage units of the integrated circuit are provided corresponding to the number of interrupt levels of the central processing unit. The integrated circuit further includes an interrupt level storage unit that stores data indicating an interrupt level when the central processing unit accesses the safety-related storage unit, and data stored in the interrupt level storage unit. Based on the selection, one of the plurality of data bus diagnosis storage units is selected, and the bus diagnosis signal supplied from the bus diagnosis address determination unit is supplied to the selected data bus diagnosis storage unit. And a circuit.
(3)また、本発明は、集積回路と、前記集積回路とアドレスバスで接続されている中央処理部と、を有するアドレスバス診断機能を備えた制御装置であって、前記集積回路は、前記中央処理部からアクセスされ、所定の安全関連部の動作状態を規定するデータを記憶する安全関連記憶部と、前記中央処理部からアクセスされ、所定の非安全関連部の動作状態を規定するデータを記憶する非安全関連記憶部と、アドレスバス診断記憶部と、バス診断アドレス判定部と、を備え、前記バス診断アドレス判定部は、前記中央処理部のアクセス先のアドレスに基づき、前記中央処理部のアクセス先が前記安全関連記憶部であるときは、前記アドレスバス診断記憶部にバス診断信号を供給し、前記中央処理部のアクセス先が前記非安全関連記憶部であるときは、前記アドレスバス診断記憶部にバス診断信号を供給せず、前記バス診断アドレス判定部から前記バス診断信号を受けた前記アドレスバス診断記憶部は、前記中央処理部から供給される前記安全関連記憶部のアドレスを格納し、前記アドレスバス診断記憶部に前記安全関連記憶部のアドレスが格納された後、前記中央処理部は、前記アドレスバス診断記憶部に格納されたアドレスを読み出し、前記アドレスバス診断記憶部に格納されたアドレスと前記安全関連記憶部のアドレスを比較することでアドレスバス上の転送エラーを検出することを特徴とする。 (3) Further, the present invention is a control device having an address bus diagnosis function including an integrated circuit and a central processing unit connected to the integrated circuit by an address bus, the integrated circuit including the integrated circuit, A safety-related storage unit that stores data defining the operating state of a predetermined safety-related unit accessed from the central processing unit, and data that specifies the operating state of a predetermined non-safety-related unit accessed from the central processing unit A non-safety related storage unit for storing, an address bus diagnosis storage unit, and a bus diagnosis address determination unit, wherein the bus diagnosis address determination unit is based on an access destination address of the central processing unit. When the access destination is the safety-related storage unit, a bus diagnosis signal is supplied to the address bus diagnosis storage unit, and the access destination of the central processing unit is the non-safety-related storage unit When the bus diagnostic signal is not supplied to the address bus diagnostic storage unit and the bus diagnostic signal is received from the bus diagnostic address determination unit, the address bus diagnostic storage unit is supplied from the central processing unit. The address of the related storage unit is stored, and after the address of the safety related storage unit is stored in the address bus diagnostic storage unit, the central processing unit reads the address stored in the address bus diagnostic storage unit, A transfer error on the address bus is detected by comparing the address stored in the address bus diagnosis storage unit with the address of the safety-related storage unit.
(4)上記(3)のアドレスバス診断機能を備えた制御装置であって、前記集積回路の前記アドレスバス診断記憶部は、前記中央処理部の割込レベルの数に対応して複数設けられ、前記集積回路はさらに、前記中央処理部が前記安全関連記憶部にアクセスする際の割込レベルを示すデータを格納する割込レベル記憶部と、前記割込レベル記憶部に格納されたデータに基づいて、複数の前記アドレスバス診断記憶部からいずれか1つを選択し、選択された1つのアドレスバス診断記憶部に、前記バス診断アドレス判定部から供給された前記バス診断信号を供給する選択回路と、を備えることが好ましい。 (4) In the control device having the address bus diagnosis function of (3), a plurality of the address bus diagnosis storage units of the integrated circuit are provided corresponding to the number of interrupt levels of the central processing unit. The integrated circuit further includes an interrupt level storage unit that stores data indicating an interrupt level when the central processing unit accesses the safety-related storage unit, and data stored in the interrupt level storage unit. Based on the selection, one of a plurality of the address bus diagnosis storage units is selected, and the bus diagnosis signal supplied from the bus diagnosis address determination unit is supplied to the selected one address bus diagnosis storage unit. And a circuit.
(5)また、本発明は、集積回路と、前記集積回路とデータバス及びアドレスバスで接続されている中央処理部と、を有するデータバス及びアドレスバス診断機能を備えた制御装置であって、前記集積回路は、前記中央処理部からアクセスされ、所定の安全関連部の動作状態を規定するデータを記憶する安全関連記憶部と、前記中央処理部からアクセスされ、所定の非安全関連部の動作状態を規定するデータを記憶する非安全関連記憶部と、データバス診断記憶部と、アドレスバス診断記憶部と、バス診断アドレス判定部と、を備え、前記バス診断アドレス判定部は、前記中央処理部のアクセス先のアドレスに基づき、前記中央処理部のアクセス先が前記安全関連記憶部であるときは、前記データバス診断記憶部及びアドレスバス診断記憶部にバス診断信号を供給し、前記中央処理部のアクセス先が前記非安全関連記憶部であるときは、前記データバス診断記憶部及びアドレスバス診断記憶部にバス診断信号を供給せず、前記バス診断アドレス判定部から前記バス診断信号を受けた前記データバス診断記憶部は、前記安全関連記憶部に格納されたデータを格納し、前記バス診断アドレス判定部から前記バス診断信号を受けた前記アドレスバス診断記憶部は、前記中央処理部から供給される前記安全関連記憶部のアドレスを格納し、前記データバス診断記憶部に前記安全関連記憶部に格納されたデータが格納され、前記アドレスバス診断記憶部に前記安全関連記憶部のアドレスが格納された後、前記中央処理部は、前記データバス診断記憶部に格納されたデータ、前記アドレスバス診断記憶部に格納されたアドレス及び前記安全関連部に格納されたデータを読み出し、前記データバス診断記憶部に格納されたデータと前記安全関連記憶部に格納されたデータを比較することでデータバス上の転送エラーを検出し、前記アドレスバス診断記憶部に格納されたアドレスと前記安全関連記憶部のアドレスを比較することでアドレスバス上の転送エラーを検出することを特徴とする。 (5) Further, the present invention is a control device having an integrated circuit and a data bus and address bus diagnosis function having a central processing unit connected to the integrated circuit by a data bus and an address bus, The integrated circuit is accessed from the central processing unit and stores a safety-related storage unit that stores data defining an operation state of a predetermined safety-related unit, and is accessed from the central processing unit and operates of a predetermined non-safety-related unit. A non-safety-related storage unit that stores data defining a state, a data bus diagnostic storage unit, an address bus diagnostic storage unit, and a bus diagnostic address determination unit, wherein the bus diagnostic address determination unit is the central processing unit When the access destination of the central processing unit is the safety-related storage unit based on the access destination address of the unit, the data bus diagnostic storage unit and the address bus diagnostic storage unit When the bus diagnosis signal is supplied and the access destination of the central processing unit is the non-safety related storage unit, the bus diagnosis signal is not supplied to the data bus diagnosis storage unit and the address bus diagnosis storage unit, and the bus diagnosis is performed. The data bus diagnosis storage unit that has received the bus diagnosis signal from the address determination unit stores the data stored in the safety-related storage unit, and the address bus that has received the bus diagnosis signal from the bus diagnosis address determination unit The diagnostic storage unit stores the address of the safety-related storage unit supplied from the central processing unit, the data stored in the safety-related storage unit is stored in the data bus diagnostic storage unit, and the address bus diagnostic storage After the address of the safety-related storage unit is stored in the unit, the central processing unit stores the data stored in the data bus diagnosis storage unit, the address bus diagnosis Read the address stored in the storage unit and the data stored in the safety-related unit, and compare the data stored in the data bus diagnostic storage unit with the data stored in the safety-related storage unit on the data bus The transfer error on the address bus is detected by comparing the address stored in the address bus diagnostic storage unit with the address in the safety-related storage unit.
(6)上記(5)のデータバス及びアドレスバス診断機能を備えた制御装置であって、前記集積回路の前記データバス診断記憶部及び前記アドレスバス診断記憶部は、前記中央処理部の割込レベルの数に対応して複数設けられ、前記集積回路はさらに、前記中央処理部が前記安全関連記憶部にアクセスする際の割込レベルを示すデータを格納する割込レベル記憶部と、前記割込レベル記憶部に格納されたデータに基づいて、複数の前記データバス診断記憶部からいずれか1つを選択し、複数の前記アドレスバス診断記憶部からいずれか1つを選択し、選択された1つのデータバス診断記憶部とアドレスバス診断記憶部との組に、前記バス診断アドレス判定部から供給された前記バス診断信号を供給する選択回路と、を備えることが好ましい。 (6) The control device having the data bus and address bus diagnosis function of (5), wherein the data bus diagnosis storage unit and the address bus diagnosis storage unit of the integrated circuit are interrupts of the central processing unit. A plurality of levels corresponding to the number of levels are provided, and the integrated circuit further includes an interrupt level storage unit for storing data indicating an interrupt level when the central processing unit accesses the safety-related storage unit, and the interrupt Based on the data stored in the data level storage unit, one of the plurality of data bus diagnosis storage units is selected, and one of the plurality of address bus diagnosis storage units is selected and selected. Preferably, a selection circuit that supplies the bus diagnosis signal supplied from the bus diagnosis address determination unit to a set of one data bus diagnosis storage unit and an address bus diagnosis storage unit is provided.
上記構成によれば、バス診断アドレス判定部にアドレスが予め登録された安全関連記憶部に対して、中央処理部がアクセスした際の安全関連記憶部に格納された値及びアドレスバスの値が、データバス診断レジスタ及びアドレスバス診断レジスタそれぞれに格納される。その後、データバス診断レジスタに格納された値及び当該安全関連レジスタに格納された値を読み出し比較することで、データバス上の転送エラーを検知することができる。また、同様に、アドレスバス診断レジスタに格納された値及び当該安全関連部のアドレス値を比較することで、アドレスバス上の転送エラーを検知することができる。 According to the above configuration, the value stored in the safety-related storage unit and the value of the address bus when the central processing unit accesses the safety-related storage unit whose address is registered in advance in the bus diagnosis address determination unit, They are stored in the data bus diagnostic register and the address bus diagnostic register, respectively. Thereafter, a transfer error on the data bus can be detected by reading and comparing the value stored in the data bus diagnostic register and the value stored in the safety-related register. Similarly, a transfer error on the address bus can be detected by comparing the value stored in the address bus diagnostic register and the address value of the safety-related part.
また、上記構成によれば、割込レベル毎に異なるデータバス診断レジスタ及びアドレスバス診断レジスタが使用され、複数の割込レベルにおいて、独立して安全関連部の診断処理を行うことができるため、複数の割込レベルでデータバス及びアドレスバス上の転送エラーを検出しようとする際に、他の割込レベルの処理内容を考慮することなく、診断処理のプログラムを容易に作成することができる。 Further, according to the above configuration, different data bus diagnostic registers and address bus diagnostic registers are used for each interrupt level, and at a plurality of interrupt levels, the diagnostic processing of the safety-related part can be performed independently. When a transfer error on the data bus and address bus is to be detected at a plurality of interrupt levels, a diagnostic processing program can be easily created without considering the processing contents of other interrupt levels.
本発明によれば、安全関連部に属する安全関連記憶部及び非安全関連部に属する非安全記憶部を有する集積回路と、中央処理部を有する制御装置において、中央処理部が安全関連記憶部にアクセスしたときについてのみ、データバス及びアドレスバス上の転送エラーを検知することができる。 According to the present invention, in a control device having a central processing unit and an integrated circuit having a safety-related storage unit belonging to a safety-related unit and a non-safety storage unit belonging to a non-safety-related unit, the central processing unit is a safety-related storage unit. Only when accessed, transfer errors on the data bus and address bus can be detected.
図1は、本実施形態に係るデータバス及びアドレスバス診断機能を備えた制御装置の一例を示す図である。 FIG. 1 is a diagram illustrating an example of a control device having a data bus and address bus diagnosis function according to the present embodiment.
本実施形態に係るデータバス及びアドレスバス診断機能を備えた制御装置は、中央処理部であるCPU1a、データバス2、アドレスバス3、集積回路6aを備え、集積回路6aは、データバス診断記憶部としてのデータバス診断レジスタ12、アドレスバス診断記憶部としてのアドレスバス診断レジスタ13、バス診断アドレス判定部14、安全関連記憶部としての安全関連レジスタ1から安全関連レジスタN(符号81から8N)までのN個のレジスタ、非安全関連記憶部としての通常レジスタ1から通常レジスタM(符号91から9M)までのM個のレジスタ、入出力される値を一時的に記憶する入出力バッファ7、アドレスバスの値からアクセス先のレジスタを選択するアドレスデコーダ10、複数の入力信号のうち一つを選択して出力するデータセレクタ11を備える。
A control device having a data bus and address bus diagnosis function according to this embodiment includes a
CPU1aと、安全関連レジスタ1から安全関連レジスタN(符号81から8N)、通常レジスタ1から通常レジスタM(符号91から9M)、データバス診断レジスタ12及びデータセレクタ11は、入出力バッファ7を介し、データバス2により夫々接続される。また、データバス診断レジスタ12とデータセレクタ11も同様に、データバス2により接続される。
The
CPU1aと、アドレスデコーダ10、バス診断アドレス判定部14及びアドレスバス診断レジスタ13は、アドレスバス3により夫々接続される。また、CPU1aとバス診断アドレス判定部14及びアドレスデコーダ10は、アドレスバス3で接続される他、書込制御信号(WRN)4及び読込制御信号(RDN)5を送るための制御線で夫々接続される。
The
バス診断アドレス判定部14とデータバス診断レジスタ12及びアドレスバス診断レジスタ13は、バス診断信号(CHKBUS)15を送るための制御線で夫々接続される。
The bus diagnosis
アドレスデコーダ10と、安全関連レジスタ1から安全関連レジスタN(符号81から8N)及び通常レジスタ1から通常レジスタM(符号91から9M)は、アドレスデコーダ10の出力(WRS1〜WRSN、WRN1〜WRNM)を各レジスタに送るための制御線で夫々接続される。また、アドレスデコーダ10とデータセレクタ11は、データセレクタ11の入力の複数の入力のうちいずれか1つを選択するためのレジスタ選択信号(REGSEL)16を送るための制御線で接続される。
データセレクタ11と、安全関連レジスタ1から安全関連レジスタN(符号81から8N)及び通常レジスタ1から通常レジスタM(符号91から9M)は、各レジスタの出力がデータセレクタ11に入力されるように、データバス2により夫々接続される。
The
バス診断アドレス判定部14は、安全関連レジスタ1から安全関連レジスタN(符号81から8N)のアドレスを内部に記憶し、安全関連レジスタ1から安全関連レジスタN(符号81から8N)のいずれかに対しての書込制御信号(WRN)4又は読込制御信号(RDN)5をCPU1aから受けたときに、データバス診断レジスタ12及びアドレスバス診断レジスタ13に対しバス診断信号(CHKBUS)15を出力する。バス診断アドレス判定部14は、通常レジスタ1から通常レジスタM(符号91から9M)に対しての書込制御信号(WRN)4又は読込制御信号(RDN)5をCPU1aから受けたときは、データバス診断レジスタ12とアドレスバス診断レジスタ13に対しバス診断信号(CHKBUS)15を出力しない。なお、バス診断アドレス判定部14が、CPU1aから読込制御信号(RDN)5を受けたときのみバス診断信号(CHKBUS)15を出力することでデータバス及びアドレスバス上の転送エラーを検出することが可能になるが、CPU1aから書込制御信号(WRN)4を受けた時にもバス診断信号(CHKBUS)15を出力することによって、CPU1aが安全関連レジスタにデータを書き込む際のデータバス及びアドレスバス上の転送エラーを検出するにあたって、CPU1aが保持している安全関連レジスタに書き込んだ値を利用できるため、CPU1aが安全関連レジスタに格納されている値を読み出す処理1回分を短縮することができる。
The bus diagnosis
データバス診断レジスタ12は、バス診断アドレス判定部14からバス診断信号(CHKBUS)15を受け取ったときに、データセレクタ11の出力データDBOUTを格納するレジスタとして機能するものである。本実施形態では、データバス診断レジスタ12は、格納したDBOUTの値を全ビット反転して出力するように構成されている。また、アドレスバス診断レジスタ13は、バス診断アドレス判定部14からバス診断信号(CHKBUS)15を受け取ったときに、CPU1aから入力されるアドレス値を格納するレジスタとして機能するものである。
The data bus
データセレクタ11は、アドレスデコーダ10から送られるレジスタ選択信号(REGSEL)16を参照し、データセレクタ11の複数の入力のうちいずれか1つを選択し、出力する機能を有するものである。
The
なお、バス診断アドレス判定部14が、書込制御信号(WRN)4を受けたときだけでなく、読込制御信号(RDN)5を受けたときにもバス診断信号(CHKBUS)15をデータバス診断レジスタ12に出力するのは、安全関連レジスタには入力専用レジスタが含まれ、集積回路6a内の他の回路や、集積回路6a外の回路からアクセスされる虞があり、CPU1aが特定の安全関連レジスタに書き込み処理を行わなくても、異なる時間に当該特定の安全関連レジスタから読み込んだ値は同一とならない虞があるためである。
Not only when the bus diagnosis
図2は、本実施形態における、CPU1aの処理のフローチャートの一例を示す図である。図2のステップS219からS223に示すように、本実施形態では、CPU1a上で割込レベルの異なる2つの割込処理が動作するようになっている。安全関連レジスタ1から安全関連レジスタN(符号81から8N)に対するデータ入出力処理である、安全入出力処理1から安全入出力処理Nは、割込レベル1側でのみ実施されている。割込の優先順位は、レベル1よりレベル2の方が高く、割込レベル1の処理中に割込レベル2の処理が発生した場合は、割込レベル2の処理を優先的に行うが、割込レベル2の処理中に割込レベル1の処理が発生しても、割込レベル2の処理が終えるまで割込レベル1の処理は開始されない。安全入出力処理1の詳細な実施手順については、ステップS201からS218に示す。以下、安全入出力処理1の詳細な実施手順について、図1及び図2に基づいて説明する。
FIG. 2 is a diagram illustrating an example of a flowchart of processing of the
まず、図2に示す安全入出力処理1のステップS201からS218の概略を説明する。ステップS201からS203では、安全関連レジスタの異常を検出する。ステップS204からS206では、CPU1aが安全関連レジスタ1(符号81)にデータを書き込む際のデータバス2上の転送エラーを検出する。ステップS207からS209では、CPU1aが安全関連レジスタ1(符号81)にデータを書き込む際のアドレスバス3上の転送エラーを検出する。ステップS210からS213では、CPU1aが安全関連レジスタ1(符号81)からデータを読み出す際のデータバス2上の転送エラーを検出する。ステップS214からS216では、CPU1aが安全関連レジスタ1(符号81)からデータを読み出す際のアドレスバス3上の転送エラーを検出する。以下、各ステップを詳細に説明する。
First, an outline of steps S201 to S218 of the safety input /
ステップS201では、CPU1aが、安全関連レジスタ1(符号81)にCPU1aの出力ポートSOUT1の値(aaaとする)を書き込む。このとき、バス診断アドレス判定部14は、CPU1aから書込制御信号(WRN)4を受け、内部に記憶された安全関連レジスタ1からN(符号81から8N)のアドレスと、CPU1aから送られた書き込み先のレジスタのアドレスである安全関連レジスタ1(符号81)のアドレスとを比較し、安全関連部のレジスタへのデータの書き込みであると判断して、データバス診断レジスタ12とアドレスバス診断レジスタ13に対し、バス診断信号(CHKBUS)15を出力する。
In step S201, the
また、アドレスデコーダ10は、CPU1aから送られた書き込み先のレジスタのアドレスである安全関連レジスタ1(符号81)のアドレスを参照し、データセレクタ11に対し、安全関連レジスタ1(符号81)からの入力を選択し、出力することを指示するレジスタ選択信号(REGSEL)16を出力する。レジスタ選択信号(REGSEL)16を受けたデータセレクタ11は、その指示の通り、安全関連レジスタ1(符号81)からの入力を選択し、出力する。
Further, the
データバス診断レジスタ12は、バス診断アドレス判定部14からバス診断信号(CHKBUS)15を受けると、データセレクタ11から出力される値である、安全関連レジスタ1(符号81)に格納されているSOUT1の値(aaa)が格納される。また、アドレスバス診断レジスタ13は、バス診断アドレス判定部14からバス診断信号(CHKBUS)15を受けると、CPU1aから送られる安全関連レジスタ1(符号81)のアドレス(AAAとする)が格納される。
When the data bus
ステップS202では、CPU1aが、安全関連レジスタ1(符号81)に格納されている値(aaa)をデータセレクタ11及び入出力バッファ7を介して読み出し、CPU1a内のレジスタR1に格納する。このとき、ステップS201における処理と同様に、バス診断アドレス判定部14は、CPU1aから読込制御信号(RDN)5を受け、データバス診断レジスタ12とアドレスバス診断レジスタ13に対し、バス診断信号(CHKBUS)15を出力し、データバス診断レジスタ12に安全関連レジスタ1(符号81)に格納されている値(aaa)が、アドレスバス診断レジスタ13に安全関連レジスタ1(符号81)のアドレス(AAA)が格納される。ステップS203では、CPU1aが、SOUT1の値とR1に格納された値が同一であるか否かを確認する。SOUT1の値とR1に格納された値が同一である場合は、安全関連レジスタ1(符号81)が正常であるとして、ステップS204に進む。SOUT1の値とR1に格納された値が異なる場合には、安全関連レジスタ1(符号81)に異常があると判断して、リトライや危険回避処理等を行う異常時処理1(ステップS217)に移行する。
In step S202, the
ステップS204では、CPU1aが、ステップS201においてデータバス診断レジスタ12に格納された値(aaa)をデータセレクタ11及び入出力バッファ7を介して読み出し、CPU1a内のレジスタR2に格納する。本実施形態では、データバス診断レジスタ12は格納された値を全ビット反転させて出力するため、R2に格納される値は、データバス診断レジスタ12に格納された値を全ビット反転させたものになる。R2に格納された値をデータバス診断レジスタ12に格納されていた値と同じ値にするために、ステップS205において、CPU1aは、R2に格納された値を全ビット反転させる。
In step S204, the
ステップS206では、CPU1aが、CPU1a内のレジスタR1に格納された値とCPU1a内のレジスタR2に格納された値が同一であるか否かを確認する。ここで、レジスタR1に格納された値とレジスタR2に格納された値が同じであれば、CPU1aが安全関連レジスタ1(符号81)にデータを書き込む際に、データバス2上で転送エラーが無かったとしてステップS207に進む。レジスタR1に格納された値とレジスタR2に格納された値が異なる場合には、データバス2上で転送エラーがあったと判断し、異常時処理1(ステップS217)に移行する。
In step S206, the
ステップS207では、CPU1aは、安全関連レジスタ1(符号81)のアドレス(AAA)をCPU1aのレジスタR1に格納する。ステップS208において、CPU1aは、ステップS201においてアドレスバス診断レジスタ13に格納された安全関連レジスタ1(符号81)のアドレス(AAA)をCPU1aのレジスタR2に格納する。
In step S207, the
ステップS209では、CPU1aは、CPU1a内のレジスタR1に格納された値とレジスタR2に格納された値が同一であるか否かを確認する。ここで、レジスタR1に格納された値とレジスタR2に格納された値が同じであれば、CPU1aが安全関連レジスタ1(符号81)にデータを書き込む際に、アドレスバス3上で転送エラーが無かったとしてステップS210に進む。レジスタR1に格納された値とレジスタR2に格納された値が異なる場合には、アドレスバス3上で転送エラーがあったと判断し、異常時処理1(ステップS217)に移行する。
In step S209, the
ステップS210では、CPU1aが、安全関連レジスタ2(符号82)に格納されている値(bbbとする)を読み出し、CPU1aの入力ポートSIN1にその値を格納する。このとき、ステップS201と同様の処理により、データバス診断レジスタ12に安全関連レジスタ2(符号82)に格納された値(bbb)が格納され、アドレスバス診断レジスタ13に安全関連レジスタ2(符号82)のアドレス(BBBとする)が格納される。
In step S210, the
ステップS211では、CPU1aが、ステップS210においてデータバス診断レジスタ12に格納された値(bbb)を読み出し、CPU1a内のレジスタR2に格納する。本実施形態では、データバス診断レジスタ12は格納された値を全ビット反転させて出力するため、R2に格納される値は、データバス診断レジスタ12に格納された値を全ビット反転させたものになる。R2に格納された値をデータバス診断レジスタ12に格納されていた値と同じ値にするために、ステップS212において、CPU1aは、R2に格納された値を全ビット反転させる。
In step S211, the
ステップS213では、CPU1aが、CPU1a内のレジスタR1に格納された値とレジスタR2に格納された値が同一であるか否かを確認する。ここで、レジスタR1に格納された値とレジスタR2に格納された値が同じであれば、CPU1aが安全関連レジスタ2(符号82)からデータを読み出す際に、データバス2上で転送エラーが無かったとして、ステップS214に進む。レジスタR1に格納された値とレジスタR2に格納された値が異なる場合には、データバス2上で転送エラーがあったと判断し、異常時処理2(ステップS218)に移行する。
In step S213, the
ステップS214では、CPU1aが、安全関連レジスタ2(符号82)のアドレス(BBB)をCPU1aのレジスタR1に格納する。ステップS215において、CPU1aは、ステップS210においてアドレスバス診断レジスタ13に格納された安全関連レジスタ2(符号82)のアドレス(BBB)をCPU1aのレジスタR2に格納する。
In step S214, the
ステップS216では、CPU1aが、CPU1a内のレジスタR1に格納された値とレジスタR2に格納された値が同一であるか否かを確認する。ここで、レジスタR1に格納された値とレジスタR2に格納された値が同じであれば、CPU1aが安全関連レジスタ2(符号82)からデータを読み出す際に、アドレスバス3上で転送エラーが無かったとして、ステップS220に進む。レジスタR1に格納された値とレジスタR2に格納された値が異なる場合には、アドレスバス3上で転送エラーがあったと判断し、異常時処理2(ステップS218)に移行する。
In step S216, the
ステップS216の処理が終了すると、安全入出力処理1が終了し、ステップS220に進む。
When the process of step S216 ends, the safety input /
ステップS220において、CPU1aが非安全関連部のレジスタである通常レジスタ1(符号91)に値を書き込んだときは、バス診断アドレス判定部14には通常レジスタ1のアドレスは記憶されていないため、バス診断アドレス判定部14はデータバス診断レジスタ12及びアドレスバス診断レジスタ13に対してバス診断信号(CHKBUS)15を出力しない。このため、データバス診断レジスタ12及びアドレスバス診断レジスタ13には通常レジスタ1(符号91)に書き込まれた値及びそのアドレスは格納されず、データバス2及びアドレスバス3の診断は行わないことになる。
In step S220, when the
このように、本実施形態によれば、CPU1aが非安全関連部のレジスタにアクセスしたときは、データバス2及びアドレスバス3上の転送エラーを診断することはなく、安全関連部のレジスタにアクセスしたときのみデータバス2及びアドレスバス3上の転送エラーを診断するため、安全関連部と非安全関連部が混在している集積回路及びCPUの処理ルーチンに安全関連部と非安全関連部の処理が混在しているCPUを用いたときであっても、CPUが安全関連部のレジスタにアクセスしたときのみ、データバス及びアドレスバス上の転送エラーを検出することができる。
As described above, according to the present embodiment, when the
本実施形態では、データバス及びアドレスバス上の転送エラーを検出するものであるが、本実施形態の構成からアドレスバス診断レジスタ13を省略し、データバス上の転送エラーのみを検出する構成にしてもよい。また、本実施形態の構成からデータバス診断レジスタ12を省略し、アドレスバス上の転送エラーのみを検出する構成にしてもよい。
In this embodiment, a transfer error on the data bus and the address bus is detected. However, the address
さらに、本実施形態では、安全入出力処理を割込優先順位の低い、割込レベル1にて実施しているが、割込レベル2で実施してもよい。但し、両方の割込レベルで安全入出力処理を行う場合、割込レベル1の安全入出力処理において各診断レジスタに格納した値が、割込レベル2の安全入出力処理の際に重ね書きされてしまうため、本実施形態では、両方の割込レベルに安全入出力処理を配置することはできない。
Furthermore, in the present embodiment, the safety input / output process is performed at interrupt
図3は、他の実施形態に係るデータバス及びアドレスバス診断機能を備えた制御装置の一例を示す図である。後述するCPUバス診断レジスタ群21と割込レベルレジスタ20を備えること以外の構成要素については、上述の実施形態と同様であるので、重複する説明は省略する。
FIG. 3 is a diagram illustrating an example of a control device having a data bus and address bus diagnosis function according to another embodiment. Since the components other than the CPU bus
図3に示す集積回路6bは、図1に示す集積回路6aが備えるものに加え、CPUバス診断レジスタ群21、CPU1aの現在の割込レベルを示す値を記憶する割込レベル記憶部としての割込レベルレジスタ20を備える。図1に示す集積回路6aが備えるデータバス診断レジスタ12及びアドレスバス診断レジスタ13は、後述するように、CPUバス診断レジスタ群21の中に含まれる。
The
図4は、CPUバス診断レジスタ群21の構成の一例を示す図である。図4に示すCPUバス診断レジスタ21の構成は、CPU1aの割込レベルの数が4つの場合についての例である。
FIG. 4 is a diagram showing an example of the configuration of the CPU bus
CPUバス診断レジスタ群21は、割込レベルレジスタ20の値を読み込み、復号して出力するデコーダ210とCPU1aの割込レベルの数と同数のANDゲート211から214とからなる選択回路22、CPU1aの割込レベルの数と同数のデータバス診断レジスタ1からデータバス診断レジスタ4(符号220から223)、CPU1aの割込レベルの数と同数のアドレスバス診断レジスタ1からアドレスバス診断レジスタ4(符号215から218)、データセレクタ1(符号224)、データセレクタ2(符号219)を備える。
The CPU bus
選択回路22とデータバス診断レジスタ1からデータバス診断レジスタ4(符号220から223)及びアドレスバス診断レジスタ1からアドレスバス診断レジスタ4(符号215から218)は、バス診断信号(CHKBUS)15を送るための制御線で夫々接続される。
The selection circuit 22 and the data bus
データセレクタ1(符号224)とデータバス診断レジスタ1からデータバス診断レジスタ4(符号220から223)は、各レジスタの出力がデータセレクタ1(符号224)に入力されるように、データバス2により接続される。また、データセレクタ2(符号219)とアドレスバス診断レジスタ1からアドレスバス診断レジスタ4(符号215から218)は、各レジスタの出力がデータセレクタ2(符号219)に入力されるように、データバス2により接続される。
The data selector 1 (reference numeral 224) and the data bus
割込レベルレジスタ20と選択回路22及びデータセレクタ1(符号224)及びデータセレクタ2(符号219)は、CPUの現在の割込レベル数を送るための制御線で夫々接続される。
The interrupt
選択回路22は、割込レベルレジスタ20から送られるCPU1aの現在の割込レベルの値を参照し、データバス診断レジスタ220から223のうちいずれか1つ、及びアドレスバス診断レジスタ215から218のうちいずれか1つを選択して、バス診断アドレス判定部14から受け取ったバス診断信号(CHKBUS)15を、選択されたデータバス診断レジスタ及びアドレスバス診断レジスタに送る機能を有する。例えば、CPU1aの割込レベルが1であるとき、選択回路22は、データバス診断レジスタ1とアドレスバス診断レジスタ1とを選択し、CPU1aの割込レベルが2であるとき、選択回路22は、データバス診断レジスタ2とアドレスバス診断レジスタ2とを選択する。このように、データバス診断レジスタとアドレスバス診断レジスタは、CPU1aの現在の割込レベルに対応する組となって選択される。
The selection circuit 22 refers to the current interrupt level value of the
データセレクタ1(符号224)及びデータセレクタ2(符号219)は、割込レベルレジスタ20から送られるCPU1aの現在の割込レベルの値を参照し、データセレクタ1(符号224)及びデータセレクタ2(符号219)の複数の入力からいずれか1つの選択し、出力する機能を有する。例えば、CPU1aの割込レベルが1であるとき、データセレクタ1(符号224)及びデータセレクタ2(符号219)は、データバス診断レジスタ1及びアドレスバス診断レジスタ1から入力される値を選択して出力し、CPU1aの割込レベルが2であるとき、データセレクタ1(符号224)及びデータセレクタ2(符号219)は、データバス診断レジスタ2及びアドレスバス診断レジスタ2から入力される値を選択して出力する。
The data selector 1 (symbol 224) and the data selector 2 (symbol 219) refer to the current interrupt level value of the
図5は、本実施形態における、CPU1aの処理のフローチャートの一例を示す図である。図5に示す、ステップ501からS517及びステップS520からS531につき、図2に基づいて説明した内容と異なる部分について説明する。なお、本実施形態においては、割込レベル1においてのステップS501が終了した時点で、CPU1aにレベル2の割込処理が発生した場合について説明する。
FIG. 5 is a diagram illustrating an example of a flowchart of processing of the
割込レベル1においてのステップS501では、CPU1aが、安全関連レジスタ1(符号81)にCPU1aの出力ポートSOUT1の値(cccとする)を書き込む。このとき、バス診断アドレス判定部14はCPU1aから安全関連レジスタ1(符号81)に対しての書込制御信号(WRN)4を受け、CPUバス診断レジスタ群21内の選択回路22に対して、バス診断信号(CHKBUS)15を出力する。選択回路22は、割込レベルレジスタ20からCPU1aの現在の割込レベル(レベル1)を示す値を読み込み、復号して出力することにより、データバス診断レジスタ1(符号220)及びアドレスバス診断レジスタ1(符号215)を選択する。選択されたデータバス診断レジスタ1(符号220)及びアドレスバス診断レジスタ1(符号215)にバス診断信号(CHKBUS)15が供給され、データバス診断レジスタ1(符号220)にSOUT1の値(ccc)が格納され、アドレスバス診断レジスタ1(符号215)に安全関連レジスタ1(符号81)のアドレス(CCCとする)が格納される。
In step S501 at interrupt
割込レベル1においてのステップS501が終了した後、CPU1aにレベル2の割込処理が発生すると、レベル2の割込処理が開始される(ステップS526からS531)。
After step S501 at interrupt
ステップS526では、レベル2の割込処理を終えた後に、元の割込レベルの処理に戻れるようにするために、レベル2の割込処理が発生した時点での割込レベルの値をスタックに格納する。本実施形態では、レベル2の割込処理が発生した時点での割込レベルは1であるから、スタックに割込レベル1を示す値を格納する。ステップS527では、割込レベルレジスタ20に、CPU1aの現在の割込レベルが2であることを示す値が格納される。
In step S526, after the
ステップS528において、安全入出力処理5が開始される。安全入出力処理5の処理内容は、安全入出力処理1と同様である。割込レベル2においてのステップS501では、CPU1aが、安全関連レジスタ5(符号85)にCPU1aの出力ポートSOUT1の値(dddとする)を書き込む。このとき、バス診断アドレス判定部14はCPU1aから安全関連レジスタ5(符号85)に対しての書込制御信号(WRN)4を受け、CPUバス診断レジスタ群21内の選択回路22に対して、バス診断信号(CHKBUS)15を出力する。選択回路22は、割込レベルレジスタ20からCPU1aの現在の割込レベル(レベル2)の値を読み込み、復号して出力することにより、データバス診断レジスタ2(符号221)及びアドレスバス診断レジスタ2(符号216)を選択する。選択されたデータバス診断レジスタ2(符号221)及びアドレスバス診断レジスタ2(符号216)にバス診断信号(CHKBUS)15が供給され、データバス診断レジスタ2(符号221)にSOUT1の値(ddd)が格納され、アドレスバス診断レジスタ2(符号216)に安全関連レジスタ5(符号85)のアドレス(DDD)が格納される。
In step S528, the safety input /
このように、CPU1aの割込レベルが2であるときは、データバス診断レジスタ2(符号221)にCPU1aの出力ポートSOUT1の値が格納され、アドレスバス診断レジスタ2(符号216)に安全関連レジスタ5(符号85)のアドレスの値が格納され、データバス診断レジスタ1(符号220)及びアドレスバス診断レジスタ2(符号215)の値は書き換わらない。
Thus, when the interrupt level of the
以後、ステップS516までの処理は、図2に基づいて説明した内容と同様であるため、説明は省略するが、割込レベル2においての安全入出力処理においては、CPU1aはデータバス診断レジスタ2(符号221)及びアドレスバス診断レジスタ2(符号216)以外のデータバス診断レジスタ及びアドレスバス診断レジスタにはアクセスしない。そのため、データバス診断レジスタ1(符号220)及びアドレスバス診断レジスタ1(符号215)に格納された値は書き換わらない。安全入出力処理5が終了し、割込レベル2の処理がステップS531まで進むと、割込レベル2の処理は終了し、割込レベル1の処理が再開する。
Thereafter, the processing up to step S516 is the same as that described with reference to FIG. 2 and will not be described. However, in the safety input / output processing at the interrupt
上述のとおり、割込レベル1においてのステップS501においてデータバス診断レジスタ1(符号220)及びアドレスバス診断レジスタ1(符号215)に格納された値は書き換えられず残っているため、割込レベル1において、割込レベル2の処理が始まる前に途中まで処理した安全入出力処理1を引き続き処理することができる。このように、本実施形態では、複数の割込レベルにおいて、独立して安全入出力処理を行うことができる。
As described above, since the values stored in the data bus diagnostic register 1 (reference numeral 220) and the address bus diagnostic register 1 (reference numeral 215) in step S501 at the interrupt
本実施形態においても、本実施形態の構成からアドレスバス診断レジスタ1から4(符号215から218)を省略し、データバス上の転送エラーのみを検出する構成にしてもよい。また、本実施形態の構成からデータバス診断レジスタ1から4(符号220から223)を省略し、アドレスバス上の転送エラーのみを検出する構成にしてもよい。
In this embodiment, the address bus diagnosis registers 1 to 4 (reference numerals 215 to 218) may be omitted from the configuration of the present embodiment, and only a transfer error on the data bus may be detected. Further, the data bus diagnosis registers 1 to 4 (
1a,1b,1c CPU、2 データバス、3 アドレスバス、4 書込制御信号(WRN)、5 読込制御信号(RDN)、6a,6b,6c,6d 集積回路、7 入出力バッファ、81 安全関連レジスタ1、8N 安全関連レジスタN、91 通常レジスタ1、9M 通常レジスタM、10 アドレスデコーダ、11 データセレクタ、12 データバス診断レジスタ、13 アドレスバス診断レジスタ、14 バス診断アドレス判定部、15 バス診断信号(CHKBUS)、16 レジスタ選択信号(REGSEL)、20 割込レベルレジスタ、21 CPUバス診断レジスタ群、22 選択回路、30,35,36 パリティ生成回路、32,33,37 パリティエラー検出回路、34 レジスタ群、210 デコーダ、211〜214 ANDゲート、215〜218 アドレスバス診断レジスタ、220〜223 データバス診断レジスタ、219,224 データセレクタ。
1a, 1b, 1c CPU, 2 data bus, 3 address bus, 4 write control signal (WRN), 5 read control signal (RDN), 6a, 6b, 6c, 6d integrated circuit, 7 input / output buffer, 81 safety related
安全関連部を有する制御装置において、中央処理部と集積回路が安全関連部に含まれる場合には、両者の間で授受される安全関連データに誤転送が発生したことで危険な動作が発生することを防止するため、中央処理部のデータバスに、パリティビットやECCビットを付加し、データ転送誤りを診断するのが一般的である。このような診断を行うためには、中央処理部内にパリティチェック等の診断機能を有する必要があるのに対し、近年開発された高性能な組み込み用途の中央処理部は、ほとんどの品種が外部データバスにパリティチェック等の診断機能を持たないので、この手法をとることができない。なお、安全関連部とは、故障や誤操作によりシステムが誤動作をすることで使用者に危険な機械動作が発生しないようにする機能安全を実行する回路ならびにソフトウェア部分のことである。 In a control device having a safety-related part, when the central processing unit and the integrated circuit are included in the safety-related part, a dangerous operation occurs due to an erroneous transfer of safety-related data exchanged between the two. In order to prevent this, it is common to diagnose a data transfer error by adding a parity bit or ECC bit to the data bus of the central processing unit. In order to make such a diagnosis, it is necessary to have a diagnosis function such as a parity check in the central processing unit. On the other hand, most recently developed central processing units for high-performance embedded applications have external data Since the bus does not have a diagnostic function such as parity check, this method cannot be taken. Incidentally, safety-related parts and is that of failure or erroneous circuits and software portions hazardous machine operation to the user to perform a safety function to prevent the occurrence in the system to malfunction due to operation.
Claims (6)
前記集積回路とデータバスで接続されている中央処理部と、
を有するデータバス診断機能を備えた制御装置であって、
前記集積回路は、
前記中央処理部からアクセスされ、所定の安全関連部の動作状態を規定するデータを記憶する安全関連記憶部と、
前記中央処理部からアクセスされ、所定の非安全関連部の動作状態を規定するデータを記憶する非安全関連記憶部と、
データバス診断記憶部と、
バス診断アドレス判定部と、を備え、
前記バス診断アドレス判定部は、前記中央処理部のアクセス先のアドレスに基づき、前記中央処理部のアクセス先が前記安全関連記憶部であるときは、前記データバス診断記憶部にバス診断信号を供給し、前記中央処理部のアクセス先が前記非安全関連記憶部であるときは、前記データバス診断記憶部にバス診断信号を供給せず、
前記バス診断アドレス判定部から前記バス診断信号を受けた前記データバス診断記憶部は、前記安全関連記憶部に格納されたデータを格納し、
前記データバス診断記憶部に前記安全関連記憶部に格納されたデータが格納された後、前記中央処理部は、前記データバス診断記憶部に格納されたデータ及び前記安全関連部に格納されたデータを読み出し、前記データバス診断記憶部に格納されたデータと前記安全関連記憶部に格納されたデータを比較することでデータバス上の転送エラーを検出する
ことを特徴とするデータバス診断機能を備えた制御装置。 An integrated circuit;
A central processing unit connected to the integrated circuit by a data bus;
A control device having a data bus diagnostic function having
The integrated circuit comprises:
A safety-related storage unit that is accessed from the central processing unit and stores data defining an operation state of a predetermined safety-related unit;
A non-safety-related storage unit that is accessed from the central processing unit and stores data defining an operation state of a predetermined non-safety-related unit;
A data bus diagnostic storage unit;
A bus diagnostic address determination unit,
The bus diagnosis address determination unit supplies a bus diagnosis signal to the data bus diagnosis storage unit when the access destination of the central processing unit is the safety-related storage unit based on the access destination address of the central processing unit When the access destination of the central processing unit is the non-safety related storage unit, the bus diagnostic signal is not supplied to the data bus diagnostic storage unit,
The data bus diagnosis storage unit that has received the bus diagnosis signal from the bus diagnosis address determination unit stores the data stored in the safety-related storage unit,
After the data stored in the safety-related storage unit is stored in the data bus diagnosis storage unit, the central processing unit stores the data stored in the data bus diagnosis storage unit and the data stored in the safety-related unit. A data bus diagnosis function, wherein a transfer error on the data bus is detected by comparing the data stored in the data bus diagnosis storage unit with the data stored in the safety-related storage unit. Control device.
前記集積回路の前記データバス診断記憶部は、前記中央処理部の割込レベルの数に対応して複数設けられ、
前記集積回路はさらに、
前記中央処理部が前記安全関連記憶部にアクセスする際の割込レベルを示すデータを格納する割込レベル記憶部と、
前記割込レベル記憶部に格納されたデータに基づいて、複数の前記データバス診断記憶部からいずれか1つを選択し、選択された1つのデータバス診断記憶部に、前記バス診断アドレス判定部から供給された前記バス診断信号を供給する選択回路と、
を備えることを特徴とするデータバス診断機能を備えた制御装置。 A control device having a data bus diagnostic function according to claim 1,
A plurality of the data bus diagnostic storage units of the integrated circuit are provided corresponding to the number of interrupt levels of the central processing unit,
The integrated circuit further comprises:
An interrupt level storage unit for storing data indicating an interrupt level when the central processing unit accesses the safety-related storage unit;
Based on the data stored in the interrupt level storage unit, one of the plurality of data bus diagnostic storage units is selected, and the selected bus diagnostic address determination unit includes the bus diagnostic address determination unit. A selection circuit for supplying the bus diagnostic signal supplied from
A control device having a data bus diagnostic function.
前記集積回路とアドレスバスで接続されている中央処理部と、
を有するアドレスバス診断機能を備えた制御装置であって、
前記集積回路は、
前記中央処理部からアクセスされ、所定の安全関連部の動作状態を規定するデータを記憶する安全関連記憶部と、
前記中央処理部からアクセスされ、所定の非安全関連部の動作状態を規定するデータを記憶する非安全関連記憶部と、
アドレスバス診断記憶部と、
バス診断アドレス判定部と、を備え、
前記バス診断アドレス判定部は、前記中央処理部のアクセス先のアドレスに基づき、前記中央処理部のアクセス先が前記安全関連記憶部であるときは、前記アドレスバス診断記憶部にバス診断信号を供給し、前記中央処理部のアクセス先が前記非安全関連記憶部であるときは、前記アドレスバス診断記憶部にバス診断信号を供給せず、
前記バス診断アドレス判定部から前記バス診断信号を受けた前記アドレスバス診断記憶部は、前記中央処理部から供給される前記安全関連記憶部のアドレスを格納し、
前記アドレスバス診断記憶部に前記安全関連記憶部のアドレスが格納された後、前記中央処理部は、前記アドレスバス診断記憶部に格納されたアドレスを読み出し、前記アドレスバス診断記憶部に格納されたアドレスと前記安全関連記憶部のアドレスを比較することでアドレスバス上の転送エラーを検出する
ことを特徴とするアドレスバス診断機能を備えた制御装置。 An integrated circuit;
A central processing unit connected to the integrated circuit by an address bus;
A control device having an address bus diagnosis function having
The integrated circuit comprises:
A safety-related storage unit that is accessed from the central processing unit and stores data defining an operation state of a predetermined safety-related unit;
A non-safety related storage unit that is accessed from the central processing unit and stores data that defines the operating state of a predetermined non-safety related unit;
An address bus diagnostic storage unit;
A bus diagnostic address determination unit,
The bus diagnosis address determination unit supplies a bus diagnosis signal to the address bus diagnosis storage unit when the access destination of the central processing unit is the safety-related storage unit based on the access destination address of the central processing unit When the access destination of the central processing unit is the non-safety related storage unit, the bus diagnostic signal is not supplied to the address bus diagnostic storage unit,
The address bus diagnosis storage unit that has received the bus diagnosis signal from the bus diagnosis address determination unit stores the address of the safety-related storage unit supplied from the central processing unit,
After the address of the safety-related storage unit is stored in the address bus diagnosis storage unit, the central processing unit reads the address stored in the address bus diagnosis storage unit and stores it in the address bus diagnosis storage unit A control device having an address bus diagnosis function, wherein a transfer error on an address bus is detected by comparing an address with an address of the safety-related storage unit.
前記集積回路の前記アドレスバス診断記憶部は、前記中央処理部の割込レベルの数に対応して複数設けられ、
前記集積回路はさらに、
前記中央処理部が前記安全関連記憶部にアクセスする際の割込レベルを示すデータを格納する割込レベル記憶部と、
前記割込レベル記憶部に格納されたデータに基づいて、複数の前記アドレスバス診断記憶部からいずれか1つを選択し、選択された1つのアドレスバス診断記憶部に、前記バス診断アドレス判定部から供給された前記バス診断信号を供給する選択回路と、
を備えることを特徴とするアドレスバス診断機能を備えた制御装置。 A control device having an address bus diagnosis function according to claim 3,
A plurality of the address bus diagnosis storage units of the integrated circuit are provided corresponding to the number of interrupt levels of the central processing unit,
The integrated circuit further comprises:
An interrupt level storage unit for storing data indicating an interrupt level when the central processing unit accesses the safety-related storage unit;
Based on the data stored in the interrupt level storage unit, any one of the plurality of address bus diagnosis storage units is selected, and the bus diagnosis address determination unit is added to the selected one address bus diagnosis storage unit. A selection circuit for supplying the bus diagnostic signal supplied from
A control device having an address bus diagnosis function.
前記集積回路とデータバス及びアドレスバスで接続されている中央処理部と、
を有するデータバス及びアドレスバス診断機能を備えた制御装置であって、
前記集積回路は、
前記中央処理部からアクセスされ、所定の安全関連部の動作状態を規定するデータを記憶する安全関連記憶部と、
前記中央処理部からアクセスされ、所定の非安全関連部の動作状態を規定するデータを記憶する非安全関連記憶部と、
データバス診断記憶部と、
アドレスバス診断記憶部と、
バス診断アドレス判定部と、を備え、
前記バス診断アドレス判定部は、前記中央処理部のアクセス先のアドレスに基づき、前記中央処理部のアクセス先が前記安全関連記憶部であるときは、前記データバス診断記憶部及びアドレスバス診断記憶部にバス診断信号を供給し、前記中央処理部のアクセス先が前記非安全関連記憶部であるときは、前記データバス診断記憶部及びアドレスバス診断記憶部にバス診断信号を供給せず、
前記バス診断アドレス判定部から前記バス診断信号を受けた前記データバス診断記憶部は、前記安全関連記憶部に格納されたデータを格納し、
前記バス診断アドレス判定部から前記バス診断信号を受けた前記アドレスバス診断記憶部は、前記中央処理部から供給される前記安全関連記憶部のアドレスを格納し、
前記データバス診断記憶部に前記安全関連記憶部に格納されたデータが格納され、前記アドレスバス診断記憶部に前記安全関連記憶部のアドレスが格納された後、前記中央処理部は、前記データバス診断記憶部に格納されたデータ、前記アドレスバス診断記憶部に格納されたアドレス及び前記安全関連部に格納されたデータを読み出し、前記データバス診断記憶部に格納されたデータと前記安全関連記憶部に格納されたデータを比較することでデータバス上の転送エラーを検出し、前記アドレスバス診断記憶部に格納されたアドレスと前記安全関連記憶部のアドレスを比較することでアドレスバス上の転送エラーを検出する
ことを特徴とするデータバス及びアドレス診断機能を備えた制御装置。 An integrated circuit;
A central processing unit connected to the integrated circuit by a data bus and an address bus;
A control device having a data bus and address bus diagnosis function,
The integrated circuit comprises:
A safety-related storage unit that is accessed from the central processing unit and stores data defining an operation state of a predetermined safety-related unit;
A non-safety-related storage unit that is accessed from the central processing unit and stores data defining an operation state of a predetermined non-safety-related unit;
A data bus diagnostic storage unit;
An address bus diagnostic storage unit;
A bus diagnostic address determination unit,
The bus diagnosis address determination unit is based on the access destination address of the central processing unit, and when the access destination of the central processing unit is the safety-related storage unit, the data bus diagnosis storage unit and the address bus diagnosis storage unit When the bus diagnostic signal is supplied to the central processing unit and the access destination is the non-safety related storage unit, the bus diagnostic signal is not supplied to the data bus diagnostic storage unit and the address bus diagnostic storage unit,
The data bus diagnosis storage unit that has received the bus diagnosis signal from the bus diagnosis address determination unit stores the data stored in the safety-related storage unit,
The address bus diagnosis storage unit that has received the bus diagnosis signal from the bus diagnosis address determination unit stores the address of the safety-related storage unit supplied from the central processing unit,
After the data stored in the safety-related storage unit is stored in the data bus diagnostic storage unit, and the address of the safety-related storage unit is stored in the address bus diagnostic storage unit, the central processing unit Data stored in the diagnostic storage unit, addresses stored in the address bus diagnostic storage unit, and data stored in the safety related unit are read, and data stored in the data bus diagnostic storage unit and the safety related storage unit A transfer error on the data bus is detected by comparing the data stored in the address bus, and a transfer error on the address bus is detected by comparing the address stored in the address bus diagnostic storage unit with the address of the safety-related storage unit. A control device having a data bus and an address diagnosis function.
前記集積回路の前記データバス診断記憶部及び前記アドレスバス診断記憶部は、前記中央処理部の割込レベルの数に対応して複数設けられ、
前記集積回路はさらに、
前記中央処理部が前記安全関連記憶部にアクセスする際の割込レベルを示すデータを格納する割込レベル記憶部と、
前記割込レベル記憶部に格納されたデータに基づいて、複数の前記データバス診断記憶部からいずれか1つを選択し、複数の前記アドレスバス診断記憶部からいずれか1つを選択し、選択された1つのデータバス診断記憶部とアドレスバス診断記憶部との組に、前記バス診断アドレス判定部から供給された前記バス診断信号を供給する選択回路と、
を備えることを特徴とするデータバス及びアドレスバス診断機能を備えた制御装置。 A control device having a data bus and address bus diagnosis function according to claim 5,
A plurality of the data bus diagnosis storage unit and the address bus diagnosis storage unit of the integrated circuit are provided corresponding to the number of interrupt levels of the central processing unit,
The integrated circuit further comprises:
An interrupt level storage unit for storing data indicating an interrupt level when the central processing unit accesses the safety-related storage unit;
Based on the data stored in the interrupt level storage unit, select any one of the plurality of data bus diagnosis storage units, select any one from the plurality of address bus diagnosis storage units, and select A selection circuit for supplying the bus diagnosis signal supplied from the bus diagnosis address determination unit to a set of the one data bus diagnosis storage unit and the address bus diagnosis storage unit,
A control device having a data bus and address bus diagnosis function.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011173357A JP5632804B2 (en) | 2011-08-08 | 2011-08-08 | Control device with bus diagnostic function |
DE102012011872.4A DE102012011872B4 (en) | 2011-08-08 | 2012-06-13 | Control device with a bus diagnostic function |
ITRM20120349 ITRM20120349A1 (en) | 2011-08-08 | 2012-07-19 | COMMAND DEVICE WITH FUNCTION OF BUS DIAGNOSIS. |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011173357A JP5632804B2 (en) | 2011-08-08 | 2011-08-08 | Control device with bus diagnostic function |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013037550A true JP2013037550A (en) | 2013-02-21 |
JP5632804B2 JP5632804B2 (en) | 2014-11-26 |
Family
ID=47595691
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011173357A Active JP5632804B2 (en) | 2011-08-08 | 2011-08-08 | Control device with bus diagnostic function |
Country Status (3)
Country | Link |
---|---|
JP (1) | JP5632804B2 (en) |
DE (1) | DE102012011872B4 (en) |
IT (1) | ITRM20120349A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103941625A (en) * | 2014-05-08 | 2014-07-23 | 哈尔滨工业大学 | Can bus data transmission monitoring system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02173852A (en) * | 1988-12-27 | 1990-07-05 | Oki Electric Ind Co Ltd | Bus diagnostic device |
JPH0816426A (en) * | 1994-06-28 | 1996-01-19 | Mitsubishi Electric Corp | Device and method for fault diagnosis |
JPH11338786A (en) * | 1998-05-29 | 1999-12-10 | Pfu Ltd | Method and device for diagnosing main storage address bus and recording medium |
JP2003502981A (en) * | 1999-06-17 | 2003-01-21 | フェニックス コンタクト ゲーエムベーハー ウント コムパニー | Safety-related automation bus systems |
JP2007058716A (en) * | 2005-08-26 | 2007-03-08 | Oki Electric Ind Co Ltd | Data transfer bus system |
JP2008009795A (en) * | 2006-06-30 | 2008-01-17 | Hitachi Ltd | Diagnostic device, line diagnostic method and line diagnostic program |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02281343A (en) * | 1989-04-21 | 1990-11-19 | Nec Corp | Cpu operation monitor system |
JPH03288949A (en) | 1990-04-06 | 1991-12-19 | Toshiba Corp | Remote supervisory and controlling equipment |
JPH07121398A (en) | 1993-10-27 | 1995-05-12 | Hitachi Ltd | Cpu bus check control system |
JP3150571B2 (en) | 1995-05-29 | 2001-03-26 | 三菱電機株式会社 | Dual system switching method |
US6609221B1 (en) * | 1999-08-31 | 2003-08-19 | Sun Microsystems, Inc. | Method and apparatus for inducing bus saturation during operational testing of busses using a pattern generator |
DE10347196B4 (en) * | 2003-10-10 | 2016-05-19 | Dr. Johannes Heidenhain Gmbh | Device for checking an interface |
JP5463565B2 (en) | 2009-05-25 | 2014-04-09 | 株式会社日立製作所 | Register diagnosis apparatus and register diagnosis method |
JP2011173357A (en) | 2010-02-25 | 2011-09-08 | Kyocera Corp | Recording apparatus |
-
2011
- 2011-08-08 JP JP2011173357A patent/JP5632804B2/en active Active
-
2012
- 2012-06-13 DE DE102012011872.4A patent/DE102012011872B4/en active Active
- 2012-07-19 IT ITRM20120349 patent/ITRM20120349A1/en unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02173852A (en) * | 1988-12-27 | 1990-07-05 | Oki Electric Ind Co Ltd | Bus diagnostic device |
JPH0816426A (en) * | 1994-06-28 | 1996-01-19 | Mitsubishi Electric Corp | Device and method for fault diagnosis |
JPH11338786A (en) * | 1998-05-29 | 1999-12-10 | Pfu Ltd | Method and device for diagnosing main storage address bus and recording medium |
JP2003502981A (en) * | 1999-06-17 | 2003-01-21 | フェニックス コンタクト ゲーエムベーハー ウント コムパニー | Safety-related automation bus systems |
JP2007058716A (en) * | 2005-08-26 | 2007-03-08 | Oki Electric Ind Co Ltd | Data transfer bus system |
JP2008009795A (en) * | 2006-06-30 | 2008-01-17 | Hitachi Ltd | Diagnostic device, line diagnostic method and line diagnostic program |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103941625A (en) * | 2014-05-08 | 2014-07-23 | 哈尔滨工业大学 | Can bus data transmission monitoring system |
Also Published As
Publication number | Publication date |
---|---|
JP5632804B2 (en) | 2014-11-26 |
ITRM20120349A1 (en) | 2013-02-09 |
DE102012011872B4 (en) | 2017-02-02 |
DE102012011872A1 (en) | 2013-02-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101606289B1 (en) | Programmable controller | |
JP3229070B2 (en) | Majority circuit and control unit and majority integrated semiconductor circuit | |
US8650440B2 (en) | Processor based system having ECC based check and access validation information means | |
TWI502376B (en) | Method and system of error detection in a multi-processor data processing system | |
KR20080067663A (en) | Program-controlled unit and method for the operation thereof | |
JP2013175118A (en) | Control device, memory failure detection method thereof and self-diagnostic method thereof | |
US7774690B2 (en) | Apparatus and method for detecting data error | |
JP5632804B2 (en) | Control device with bus diagnostic function | |
JP4644720B2 (en) | Control method, information processing apparatus, and storage system | |
JP2008176828A (en) | Test circuit and test method of error detection correcting circuit | |
JP5910356B2 (en) | Electronic device, electronic device control method, and electronic device control program | |
JP5964265B2 (en) | Semiconductor integrated circuit device | |
JP4357373B2 (en) | High reliability control device | |
JP2005143015A (en) | Remote input/output device | |
JP5325032B2 (en) | High reliability controller for multi-system | |
JP2009116978A (en) | Semiconductor storage device | |
JP2003337758A (en) | Duplexed memory system | |
JP6358122B2 (en) | Microcomputer | |
JP2011145757A (en) | Input/output device | |
US20100223527A1 (en) | Data protection circuit, data protection method, and data processing apparatus | |
JP2014225110A (en) | Safety controller | |
JP2003345676A (en) | Dual-memory system | |
JP2014159982A (en) | Semiconductor device and diagnostic method thereof | |
JP2024532975A (en) | Electronic circuit and method for self-testing a data memory - Patents.com | |
JP2015121478A (en) | Failure detection circuit and failure detection method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140128 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140919 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20141007 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20141010 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5632804 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |