JP2009187405A - Control system - Google Patents

Control system Download PDF

Info

Publication number
JP2009187405A
JP2009187405A JP2008028199A JP2008028199A JP2009187405A JP 2009187405 A JP2009187405 A JP 2009187405A JP 2008028199 A JP2008028199 A JP 2008028199A JP 2008028199 A JP2008028199 A JP 2008028199A JP 2009187405 A JP2009187405 A JP 2009187405A
Authority
JP
Japan
Prior art keywords
error
master device
target device
data
control system
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
Application number
JP2008028199A
Other languages
Japanese (ja)
Other versions
JP5227601B2 (en
Inventor
Naoki Irisa
直喜 入佐
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2008028199A priority Critical patent/JP5227601B2/en
Publication of JP2009187405A publication Critical patent/JP2009187405A/en
Application granted granted Critical
Publication of JP5227601B2 publication Critical patent/JP5227601B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a control system which improves throughput and performs flexible error recovery processing. <P>SOLUTION: A target device 4 outputs an error identification code showing a cause of an error to a master device 3 when the error occurs during data transfer. Contents of error recovery processing to be executed upon the occurrence of an error are previously set on the basis of the error identification code, and the master device 3 executes the previously set error recovery processing when an error occurs. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、システムバスを介して、データ転送を制御するマスタデバイスと、マスタデバイスからアクセス要求を受けて処理を行うターゲットデバイスとが接続される制御システムに関する。   The present invention relates to a control system in which a master device that controls data transfer and a target device that receives an access request from the master device and performs processing are connected via a system bus.

一般的に、システムバスを介してマスタデバイスとターゲットデバイスとが接続された制御システムにおいては、あるターゲットデバイスから別のターゲットデバイスへデータを転送する場合、マスタデバイスがそのデータ転送の制御を行う。   Generally, in a control system in which a master device and a target device are connected via a system bus, when data is transferred from one target device to another target device, the master device controls the data transfer.

マスタデバイスは、まずデータ転送元のターゲットデバイスに対してリードコマンドを発行する。リードコマンドを受け取った転送元ターゲットデバイスは、指定されたアドレスのリードデータを用意してマスタデバイスへと返す。マスタデバイスは、そのデータを転送先のターゲットデバイスへライトコマンドを発行してライトする。これによりターゲットデバイス間でのデータ転送を行うことができる。   First, the master device issues a read command to the target device that is the data transfer source. The transfer source target device that has received the read command prepares read data at the designated address and returns it to the master device. The master device writes the data by issuing a write command to the transfer destination target device. Thereby, data transfer between target devices can be performed.

ここで、転送元のターゲットデバイスに接続されている外部デバイスがリードコマンドを受け取ってから、規定の応答時間内にリードデータが用意できない場合、マスタデバイスは、リードデータが用意できるまで待つか、または転送元のターゲットデバイスがタイムアウトエラーを出力してくるのを待つ必要がある。   Here, if the read data cannot be prepared within the specified response time after the external device connected to the transfer source target device receives the read command, the master device waits until the read data is prepared, or It is necessary to wait for the transfer source target device to output a timeout error.

マスタデバイスがタイムアウトエラーを検出した場合、マスタデバイスはホストに対して割り込みを出力し、ホストは割り込み要因となるエラーの原因を確認して、そのエラーに対する回復処理を行わなければならない。   When the master device detects a time-out error, the master device outputs an interrupt to the host, and the host must check the cause of the error that causes the interrupt and perform recovery processing for the error.

このようにデータ転送中にエラーが発生すると、ホストはそのエラー処理に時間を割かれることになり、システム全体としてはスループットが下がる要因となる。   When an error occurs during data transfer in this way, the host takes time to handle the error, which causes a reduction in throughput of the entire system.

特許文献1記載のバスインターフェイスは、転送データの送受信処理にエラーが生じた場合には、伝送エラー対策として、それらの処理の再試行(リトライ)を行う。   When an error occurs in the transmission / reception processing of transfer data, the bus interface described in Patent Document 1 retries the processing as a countermeasure against transmission errors.

タイムアウトエラーが発生した場合は、バスマスタは設定された回数までリトライをする方法、転送データにCRCエラーが発生した場合は、バスエラー割り込みBERRをアサートし、設定された回数までリトライを行う方法など、バスマスタ自身がエラー回復処理を行うような方法が開示されている。   When a timeout error occurs, the bus master retries up to the set number of times. When a CRC error occurs in the transfer data, the bus error interrupt BERR is asserted, and the retry is performed up to the set number of times. A method is disclosed in which the bus master itself performs error recovery processing.

特開2003−196228号公報JP 2003-196228 A

しかしながら、特許文献1記載のバスインターフェイスではバスマスタは、エラーに対してリトライを行う回数を設定できるが、エラーの内容に応じたエラー回復処理はできていない。   However, in the bus interface described in Patent Document 1, the bus master can set the number of times to retry the error, but cannot perform error recovery processing according to the content of the error.

本発明の目的は、スループットを向上させるとともに、柔軟なエラー回復処理を行うことができる制御システムを提供することである。   An object of the present invention is to provide a control system capable of improving throughput and performing flexible error recovery processing.

本発明は、システムバスを介して、データ転送を制御するマスタデバイスと、
前記マスタデバイスからアクセス要求を受けて処理を行うターゲットデバイスとが接続される制御システムにおいて、
前記ターゲットデバイスは、
データ転送中にエラーが発生した場合にその原因を示すエラー識別コードを前記マスタデバイスへ出力するコード出力手段を有し、
前記マスタデバイスは、
エラー発生時に、エラー識別コードに基づいてマスタデバイスが実行すべきエラー回復処理の内容を予め設定する設定手段と、
前記設定手段で設定された前記エラー回復処理を実行する回復手段とを有することを特徴とする制御システムである。
The present invention provides a master device for controlling data transfer via a system bus;
In a control system connected to a target device that receives an access request from the master device and performs processing,
The target device is
A code output means for outputting an error identification code indicating the cause when an error occurs during data transfer to the master device;
The master device is
Setting means for presetting the contents of error recovery processing to be executed by the master device based on the error identification code when an error occurs;
And a recovery means for executing the error recovery process set by the setting means.

また本発明は、前記マスタデバイスは、エラー発生時に、前記回復手段にエラー回復処理を行わせるか否かを選択する選択手段を有することを特徴とする。   In the invention, it is preferable that the master device has selection means for selecting whether or not the recovery means performs error recovery processing when an error occurs.

また本発明は、前記設定手段は、データ転送方式がアイソクロナス転送のときは、エラーの発生原因がタイムアウトかまたは、データ自身に誤りがある場合は、前記エラー回復処理としてリトライを行わないように設定することを特徴とする。   In the present invention, when the data transfer method is isochronous transfer, the setting means is set so that no retry is performed as the error recovery processing when the cause of the error is a timeout or the data itself has an error. It is characterized by doing.

また本発明は、前記ターゲットデバイスが出力するエラー識別コードは、エラーの発生原因毎にコードを出力する信号線が割り当てられていることを特徴とする。   According to the present invention, the error identification code output from the target device is assigned a signal line for outputting a code for each cause of the error.

また本発明は、エラーが発生したターゲットデバイスへのアクセスの優先度を下げることを特徴とする。   Further, the present invention is characterized in that the priority of access to the target device in which an error has occurred is lowered.

本発明によれば、ターゲットデバイスにおけるエラー発生時に、エラー発生原因ごとに予め設定されたエラー回復処理をマスタデバイスが実行することで、ホストに対してエラー割り込み通知することなく回復処理が行われるため、制御システム全体のスループットを向上させることができる。   According to the present invention, when an error occurs in the target device, the master device executes an error recovery process set in advance for each cause of the error, so that the recovery process is performed without notifying the host of an error interrupt. The throughput of the entire control system can be improved.

また本発明によれば、エラー回復処理を行うか否かを選択できるのでアプリケーションに応じて柔軟なシステムを構築できる。   Further, according to the present invention, since it is possible to select whether or not to perform error recovery processing, a flexible system can be constructed according to the application.

また本発明によれば、データの信頼性よりリアルタイム性が要求されるアイソクロナス転送方式を採用する場合は、タイムアウトエラーやデータ自身に誤りがある場合に、リトライを行わないようにすることでデータ転送を継続させることができる。   Further, according to the present invention, when adopting an isochronous transfer method that requires real-time performance rather than data reliability, data transfer is performed by not performing a retry when a time-out error or data itself has an error. Can be continued.

また本発明によれば、エラーの発生原因毎にコードを出力する信号線が割り当てられているので、複数のエラーが同時に発生してもマスタデバイスに対し通知することができ、エラーの発生原因に応じて取りこぼすことなく、エラー回復処理を行うことができる。   In addition, according to the present invention, since a signal line for outputting a code is assigned for each cause of error occurrence, the master device can be notified even when a plurality of errors occur simultaneously. Accordingly, error recovery processing can be performed without missing.

また本発明によれば、信頼性が高くないターゲットデバイスの優先順位を下げることで、信頼性の高いターゲットデバイスの帯域が向上し、システム全体のスループットを向上させることができる。   Further, according to the present invention, by reducing the priority order of target devices that are not highly reliable, the bandwidth of highly reliable target devices can be improved and the throughput of the entire system can be improved.

また、エラー発生時にホストへエラー通知するかどうかを任意に設定することで、アプリケーションに応じて、ホストへ通知させる場合と、マスタデバイスが自動回復処理させる場合とを自由に選択することができる。   Also, by arbitrarily setting whether or not to notify the host when an error occurs, it is possible to freely select whether to notify the host or to allow the master device to perform automatic recovery processing according to the application.

また、エラーの発生によってマスタデバイスの転送順位の優先度をさげることもでき、システムの最適化を行なうことも可能となる。   Further, the priority of the transfer order of the master device can be lowered by the occurrence of an error, and the system can be optimized.

図1は、本発明の実施の一形態である制御システム1の構成を示す概略図である。
制御システム1は、CPU2、マスタデバイス3、ターゲットデバイス4およびシステムバス5を含み、ターゲットデバイス4は、外部デバイス6と接続されている。
FIG. 1 is a schematic diagram showing a configuration of a control system 1 according to an embodiment of the present invention.
The control system 1 includes a CPU 2, a master device 3, a target device 4 and a system bus 5, and the target device 4 is connected to an external device 6.

一般に制御システム1は、複数のターゲットデバイス4を含み、それぞれのターゲットデバイスは、個別に外部デバイス6と接続して外部デバイス6とのデータ送受信を制御する。   In general, the control system 1 includes a plurality of target devices 4, and each target device individually connects to an external device 6 to control data transmission / reception with the external device 6.

本実施形態では、3個のターゲットデバイス4(第1ターゲットデバイス4a、第2ターゲットデバイス4b、第3ターゲットデバイス4c)を含み、各ターゲットデバイス4a,4b,4cは、それぞれ第1外部デバイス6a、第2外部デバイス6b、第3外部デバイス6cと接続してデータ送受信を制御する。   In the present embodiment, the target device 4 includes three target devices 4 (first target device 4a, second target device 4b, and third target device 4c), and each of the target devices 4a, 4b, and 4c includes a first external device 6a, Data transmission / reception is controlled by connecting to the second external device 6b and the third external device 6c.

ここで外部デバイス6は、たとえば半導体メモリ、ハードディスクドライブなどの外部記憶装置、USBインターフェイスやLANインターフェイスなどの通信デバイス、または液晶ディスプレイなどの表示装置などで、接続されるモジュールによってそれぞれのバス仕様で接続される。   Here, the external device 6 is an external storage device such as a semiconductor memory or a hard disk drive, a communication device such as a USB interface or a LAN interface, or a display device such as a liquid crystal display. Is done.

マスタデバイス3は、システムバス5を介してのデータ転送の制御を司り、ホストであるCPU2または外部ホストからの命令を受けてターゲットデバイス4間でデータ転送を行わせる。一般的には、DMA(Direct Memory Access)転送という。ターゲットデバイス4は、マスタデバイス3からのアクセス要求をうけて外部デバイス6との各種データの送受信処理を行う。   The master device 3 controls data transfer via the system bus 5 and receives data from the host CPU 2 or an external host to transfer data between the target devices 4. In general, this is called DMA (Direct Memory Access) transfer. The target device 4 performs various data transmission / reception processes with the external device 6 in response to an access request from the master device 3.

データ転送の一例を挙げて説明する。たとえば第1ターゲットデバイス4aから第2ターゲットデバイス4bへデータ転送を行う場合、まずマスタデバイス3は、第1ターゲットデバイス4aに対してリードコマンドを発行する。第1ターゲットデバイス4aは、第1外部デバイス6aに対して、指定されたアドレスのリードコマンドを発行する。第1外部デバイス6aは、指定されたアドレスのデータをデータバス上にのせる。第1ターゲットデバイス4aは、第1外部デバイス6aからリードデータを取り込んだらマスタデバイス3に対して出力する。   An example of data transfer will be described. For example, when transferring data from the first target device 4a to the second target device 4b, the master device 3 first issues a read command to the first target device 4a. The first target device 4a issues a read command at the designated address to the first external device 6a. The first external device 6a places the data at the designated address on the data bus. The first target device 4a outputs the read data to the master device 3 after fetching the read data from the first external device 6a.

次にマスタデバイス3は、第2ターゲットデバイス4bに対してライトコマンドを発行し、第1ターゲットデバイス4aから出力されたリードデータをライトデータとして出力する。第2ターゲットデバイス4bは、ライトデータを第2外部デバイス4bに出力するとともにライトコマンドを発行する。この一連の処理を予め設定されたデータサイズ分、転送するまで繰り返す。   Next, the master device 3 issues a write command to the second target device 4b, and outputs the read data output from the first target device 4a as write data. The second target device 4b outputs write data to the second external device 4b and issues a write command. This series of processing is repeated until a predetermined data size is transferred.

設定されたデータサイズ分のデータ転送が終了したら、マスタデバイス3は、CPU2に対し割り込み信号を出力し、データ転送処理が終了したことを通知する。データ転送において、正常に転送が行われていれば問題はないが、何らかの理由によってターゲットデバイス4の応答が遅れたり、データ自身に誤りが含まれてしまう場合がある。   When the data transfer for the set data size is completed, the master device 3 outputs an interrupt signal to the CPU 2 to notify the end of the data transfer process. In the data transfer, there is no problem if the transfer is normally performed, but there is a case where the response of the target device 4 is delayed for some reason or the data itself contains an error.

たとえばターゲットデバイス4から一定時間内に応答がないタイムアウトエラーが発生すると、マスタデバイス3は、CPU2に対して割り込みを出力してエラーが発生したことを通知するか、もしくは再度リードコマンドを発行するか、いずれかの処理を行う必要がある。   For example, when a time-out error that does not respond within a certain time from the target device 4 occurs, the master device 3 outputs an interrupt to the CPU 2 to notify that an error has occurred, or to issue a read command again. , You need to do any processing.

また、データ転送方式がアイソクロナス転送方式のように一定の帯域のデータ転送帯域を保証しなければならない方式である場合、ターゲットデバイス4のタイムアウトエラーや、データ自身に誤りが含まれていることを示すパリティエラーが発生しても、データ転送を続行する必要があり、そのためにマスタデバイス3は、発生したエラーを無視するような制御を行う必要がある。   Further, when the data transfer method is a method that must guarantee a certain data transfer band like the isochronous transfer method, it indicates that a timeout error of the target device 4 or an error is included in the data itself. Even if a parity error occurs, it is necessary to continue data transfer. For this reason, the master device 3 needs to perform control to ignore the generated error.

また、マスタデバイス3が複数存在し、競合動作している場合は、各マスタデバイス3の優先度は、図示しないアービタ回路によって調整される。通常は、各マスタデバイス3を均等にするか、またはアプリケーションによって優先度を変更するが、データ転送中にエラーが発生したターゲットデバイス4の優先度を下げることにより、エラーによるシステム障害の影響をなくすようにすることができる。   In addition, when there are a plurality of master devices 3 and a competitive operation is performed, the priority of each master device 3 is adjusted by an arbiter circuit (not shown). Normally, each master device 3 is made equal or the priority is changed according to the application. However, by lowering the priority of the target device 4 in which an error has occurred during data transfer, the influence of the system failure due to the error is eliminated. Can be.

図2は、ターゲットデバイス4の構成を示すブロック図である。
コマンド受信部40は、マスタデバイス3からのコマンドを受信、解析して制御部41に伝達する。制御部41は、外部デバイス6とのバスインターフェイスのプロトコルに合わせてコマンドを発行する。タイムアウトエラー検出部42、パリティエラー検出部43、アドレスエラー検出部44は、それぞれ、データ転送中にエラーが発生したかどうかを検出する。
FIG. 2 is a block diagram showing the configuration of the target device 4.
The command receiving unit 40 receives and analyzes a command from the master device 3 and transmits the command to the control unit 41. The control unit 41 issues a command according to the protocol of the bus interface with the external device 6. The timeout error detection unit 42, the parity error detection unit 43, and the address error detection unit 44 each detect whether an error has occurred during data transfer.

本実施形態では、タイムアウトエラー、パリティエラー、アドレスエラーの3つのエラーの発生を検出することができる。各エラー検出部によりエラーが検出されると、エラー識別コード生成部45に通知され、ここで予め設定されたコードに変換されマスタデバイス3に対して、エラーの発生原因を示すエラー識別コードが送出される。   In this embodiment, it is possible to detect the occurrence of three errors: a timeout error, a parity error, and an address error. When an error is detected by each error detection unit, it is notified to the error identification code generation unit 45, where it is converted into a preset code and an error identification code indicating the cause of the error is sent to the master device 3. Is done.

図3は、マスタデバイス3の構成を示すブロック図である。
コマンド発行部30は、アクセスしたいターゲットデバイス4のアドレスを出力し、リードまたはライトコマンドを発行する。データバッファ31は、ライトデータまたはリードデータを一時的に格納する。ターゲットデバイス4からのエラー識別コードは、エラー識別コード解析部32で解析され、エラーの発生原因をエラー処理制御部33へ通知する。
FIG. 3 is a block diagram showing the configuration of the master device 3.
The command issuing unit 30 outputs the address of the target device 4 to be accessed and issues a read or write command. The data buffer 31 temporarily stores write data or read data. The error identification code from the target device 4 is analyzed by the error identification code analysis unit 32 and notifies the error processing control unit 33 of the cause of the error.

エラー処理設定部34は、エラーが発生した時にマスタデバイス3がどのようなエラー回復処理を行うのかを予めCPU2が設定する。エラー処理制御部33では、マスタデバイス3でエラーが発生し、エラー識別コードを受信すると、エラー処理設定部34に設定された、エラー識別コードに対応付けられたエラー回復処理に基づいて、制御部35へ指示する。   In the error processing setting unit 34, the CPU 2 sets in advance what error recovery processing the master device 3 performs when an error occurs. When an error occurs in the master device 3 and an error identification code is received, the error processing control unit 33 controls the control unit based on the error recovery process associated with the error identification code set in the error processing setting unit 34. 35.

図4は、制御システム1のタイミングチャートである。
前提条件として、エラー回復処理の内容は、エラー処理設定部34によって、パリティエラーに対してはデータ転送を続行し、タイムアウトエラーに対してはリトライを行うように設定されていることとする。
FIG. 4 is a timing chart of the control system 1.
As a precondition, the content of the error recovery processing is set by the error processing setting unit 34 to continue data transfer for a parity error and retry for a timeout error.

タイムチャートにおいて、mから始まる信号はマスタデバイス3がドライブする信号で、sから始まる信号はターゲットデバイス4がドライブする信号である。   In the time chart, a signal starting from m is a signal driven by the master device 3, and a signal starting from s is a signal driven by the target device 4.

まずマスタデバイス3は、サイクルT1において、madrにアドレス、mcmdにリードコマンドを出力してリードを実行する。   First, in cycle T1, the master device 3 executes an read by outputting an address to madr and a read command to mcmd.

ターゲットデバイス4は、リードデータが用意できたら、サイクルT4〜T7において、sdataにリードデータ、srespにデータ識別子を出力する。データ識別子には、VおよびEがあり、VはValidで確定データであることを示し、EはErrorでデータに何らかのエラーが発生したことを示す。   When the read data is prepared, the target device 4 outputs the read data to sdata and the data identifier to sresp in cycles T4 to T7. Data identifiers include V and E, where V is Valid and indicates definite data, and E is Error and indicates that some error has occurred in the data.

図4に示したチャートではサイクルT7で識別子Eが出力されており、エラーが発生したことを示している。さらに、エラー発生原因はserrid(Error ID)で出力される。エラー識別コードは、たとえば図5に示すようなコード対応テーブルで設定されている。エラーの発生原因毎にserridのビット数を割り当てる構成としている。したがって、エラー発生原因の種類が4種類であればserridは4ビットを用意すればよい。   In the chart shown in FIG. 4, the identifier E is output at cycle T7, indicating that an error has occurred. Furthermore, the cause of the error is output with serrid (Error ID). The error identification code is set in a code correspondence table as shown in FIG. 5, for example. The configuration is such that the number of serrid bits is assigned to each cause of error. Therefore, if there are four types of error occurrence causes, serrid has only to prepare 4 bits.

0bit目が1であればパリティエラーが発生していることを示す。同様に1bit目が1であればタイムアウトエラー、2bit目が1であればCRCエラー、3bit目が1であれば例外アドレスエラーが発生していることを示す。   If the 0th bit is 1, it indicates that a parity error has occurred. Similarly, if the first bit is 1, a timeout error, if the second bit is 1, a CRC error, and if the third bit is 1, an exception address error has occurred.

このようにエラー発生原因ごとに1つのビットを割り当てることで、複数のエラーが同時に発生しても、マスタデバイス3はエラー発生原因を取りこぼすことが無いので、エラーの回復処理を確実に行うことが可能となる。   By assigning one bit for each cause of error occurrence in this way, even if multiple errors occur simultaneously, the master device 3 will not miss the cause of error occurrence, so error recovery processing must be performed reliably. Is possible.

ここでエラー発生原因について説明する。
パリティエラーは、データの誤りをチェックするパリティチェックのエラーのことで、パリティチェックはデータを適当な長さ(8bit程度)に区切り、その中に含まれる0の数または1の数を演算してその結果をパリティビットとしてデータとともに付加する。受信側でデータからパリティ演算をした結果と、パリティビットとを比較して一致していなければどこかのビットが化けて、エラーが発生したことが分かる。
Here, the cause of the error will be described.
Parity error is a parity check error that checks for data errors. Parity check divides data into an appropriate length (about 8 bits) and calculates the number of 0s or 1s contained in it. The result is added together with the data as a parity bit. If the result of parity calculation from the data on the receiving side is compared with the parity bit, it can be seen that some bit is garbled and an error has occurred.

タイムアウトエラーは、リードコマンドに対する応答が規定時間内になかったことで発生するエラーで、ターゲットデバイス4に接続される外部デバイス6の応答速度の遅延等により発生する。   The timeout error is an error that occurs when the response to the read command is not within the specified time, and occurs due to a response speed delay of the external device 6 connected to the target device 4.

CRCエラーはCRC(Cyclic Redundancy Check(巡回冗長検査))のエラーで、パリティエラー同様、データの誤りによって発生する。CRC生成多項式と呼ばれる、シフトや加算などを組み合わせた方式で計算を行なう。   A CRC error is a CRC (Cyclic Redundancy Check) error, and is caused by a data error as well as a parity error. Calculation is performed by a method called a CRC generator polynomial that combines shift and addition.

パリティチェックでは、0の数または1の数に基づいているので、2つ以上のデータが同時に化けた場合、それらが相殺されて正常とみなされてしまうことがあるが、CRCではその確率を低く抑えることができる。   Since the parity check is based on the number of 0s or 1s, if two or more pieces of data are garbled at the same time, they may be offset and considered as normal. Can be suppressed.

例外アドレスエラーは、ターゲットデバイスに割り当てられているアドレス領域外にアクセスした場合に発生するエラーで、リードデータが無効であることを示す。   An exception address error is an error that occurs when an address outside the address area assigned to the target device is accessed, and indicates that the read data is invalid.

たとえばパリティエラーが発生したとすると、パリティエラーに対する回復処理は、予めデータ転送を続行するように設定されているので、サイクルT8〜T12において、マスタデバイス3は受信したデータをそのまま別のターゲットデバイス4にライトコマンドを発行して転送する。   For example, if a parity error has occurred, the recovery process for the parity error is set to continue data transfer in advance, so that in cycles T8 to T12, the master device 3 directly receives the received data as another target device 4. Issue a write command to and transfer.

さらに、サイクルT14から2回目のデータ転送が行われるが、サイクルT30になっても応答できなかったためターゲットデバイス4はエラー識別コードとしてE2(タイムアウトエラー)をserridに出力する。タイムアウトエラーが発生した場合は、その回復処理としてリトライを行うように設定されているので、マスタデバイス3は、サイクルT34でリードコマンドのリトライを行っている。   Further, the second data transfer is performed from the cycle T14. However, since the response cannot be made even at the cycle T30, the target device 4 outputs E2 (timeout error) to the serrid as an error identification code. When a time-out error occurs, the master device 3 is retrying the read command in cycle T34 because it is set to retry as the recovery process.

図6は、制御システム1のデータ転送処理を示すフローチャートである。
まずステップS1では、デバイスの初期設定を行う。CPU2が動作させたいマスタデバイス3およびターゲットデバイス4の初期パラメータを設定する。
FIG. 6 is a flowchart showing the data transfer process of the control system 1.
First, in step S1, device initialization is performed. The initial parameters of the master device 3 and the target device 4 that the CPU 2 wants to operate are set.

次に、ステップS2ではマスタデバイス3を起動させる。CPU2は、マスタデバイス3を動作状態することで、データ転送を開始する。   Next, in step S2, the master device 3 is activated. The CPU 2 starts data transfer by setting the master device 3 in an operating state.

ステップS3では、データ転送中にエラーが発生したかどうかを、マスタデバイス3が判断し、エラーが発生していればステップS4で、エラー発生原因を特定して、予め設定されたエラー回復処理を実行する。エラーが発生していなければステップS5で、設定されたサイズ分のデータ転送が終了したかどうかをマスタデバイス3が判断する。データ転送が終了していれば処理を終了し、終了していなければステップS3に戻る。   In step S3, the master device 3 determines whether an error has occurred during data transfer. If an error has occurred, the cause of the error is identified in step S4, and a preset error recovery process is performed. Execute. If no error has occurred, in step S5, the master device 3 determines whether the data transfer for the set size has been completed. If the data transfer has been completed, the process ends. If not, the process returns to step S3.

本発明の他の実施形態では、エラーが発生したターゲットデバイスへのアクセスの優先度を下げることで、システムの最適化を行なうことが可能となる。   In another embodiment of the present invention, it is possible to optimize the system by lowering the priority of access to the target device in which an error has occurred.

本実施形態の制御システムの構成は、図1に示した制御システム1と異なりマスタデバイス3個(以下ではマスタデバイス3a、3b、3cとする)と、ターゲットデバイス3個とを含んで構成され、ターゲットデバイスのうち1つがタイムアウトエラーとなった場合を例に説明する。   Unlike the control system 1 shown in FIG. 1, the configuration of the control system of the present embodiment includes three master devices (hereinafter referred to as master devices 3a, 3b, and 3c) and three target devices. An example in which one of the target devices has a timeout error will be described.

データ転送は、マスタデバイス3aがターゲットデバイス4aにアクセスし、同様にマスタデバイス3bがターゲットデバイス4bに、マスタデバイス3cがターゲットデバイス4cにアクセスするものする。また、アクセスの優先順位はターゲットデバイス4a>ターゲットデバイス4b>ターゲットデバイス4cのように、ターゲット4aが最も優先順位が高く設定されている。   In the data transfer, the master device 3a accesses the target device 4a, and similarly, the master device 3b accesses the target device 4b and the master device 3c accesses the target device 4c. In addition, the priority of access is set such that the target 4a has the highest priority, such as target device 4a> target device 4b> target device 4c.

図7は、アクセスの優先度を調整しない場合のタイミングチャートである。
タイミングチャートでは、マスタデバイス3a、3b、3cおよびシステムバス上の動作状態を示している。例えば“TgtA RD”は、ターゲットデバイス4aへのリードコマンドを示す。
FIG. 7 is a timing chart when the access priority is not adjusted.
In the timing chart, operation states on the master devices 3a, 3b, 3c and the system bus are shown. For example, “TgtA RD” indicates a read command to the target device 4a.

時刻t1で3つのマスタデバイス3a、3b、3cが同時にターゲットデバイス4a,4b,4cに対して、それぞれリードコマンドを発行し、予め定める優先順位に基づいてマスタデバイス3aによるターゲットデバイス4aへのリードコマンドが時刻t2でシステムバス上に発行される。   At time t1, the three master devices 3a, 3b, and 3c simultaneously issue read commands to the target devices 4a, 4b, and 4c, respectively, and read commands to the target device 4a by the master device 3a based on a predetermined priority order. Is issued on the system bus at time t2.

ターゲットデバイス4aでは、何らかの不具合が発生し、時刻t5でターゲットデバイス4aがタイムアウトエラーを返したとすると、時刻t6でマスタデバイス3bのリードコマンドがシステムバス上に発行され、時刻t9でターゲットデバイス4bからのリードデータが返ってくると同時に、マスタデバイス3aが再度リードコマンドを発行する。   If a problem occurs in the target device 4a and the target device 4a returns a timeout error at time t5, the read command of the master device 3b is issued on the system bus at time t6, and the target device 4b from the target device 4b at time t9. At the same time as the read data is returned, the master device 3a issues a read command again.

この時点でマスタデバイス3aとマスタデバイス3cとがリードコマンドを発行しているが、優先順位に基づいてマスタデバイス3aのリードコマンドがシステムバス上に発行される。ターゲットデバイス4aの不具合が解消していない場合は、時刻t13でターゲットデバイス4aが再びタイムアウトエラーを返す。その後時刻t14では、マスタデバイス3cのリードコマンドがシステムバス上に発行され、時刻t17でターゲットデバイス4cからのリードコマンドが返される。   At this time, the master device 3a and the master device 3c issue a read command, but the read command for the master device 3a is issued on the system bus based on the priority order. If the failure of the target device 4a has not been resolved, the target device 4a returns a timeout error again at time t13. Thereafter, at time t14, the read command of the master device 3c is issued on the system bus, and at time t17, the read command from the target device 4c is returned.

このように優先度の調整を行わない場合、タイムアウトエラーが発生したターゲットデバイス4aへのアクセスがシステムバスを占有することとなり、無駄な帯域を消費してシステム全体の処理を遅延させることになる。   When priority adjustment is not performed in this way, access to the target device 4a in which a time-out error has occurred occupies the system bus, consuming useless bandwidth and delaying processing of the entire system.

これに対して本実施形態では、優先度の調整を行うことで、システム全体としての処理の最適化を行う。   On the other hand, in the present embodiment, optimization of processing as the entire system is performed by adjusting priority.

図8は、アクセスの優先度を調整する場合のタイミングチャートである。
優先度調整を行う場合、時刻t9までの動作は、優先度調整の有無にかかわらず前述の通りであるが、時刻t5でタイムアウトエラーが発生した時点で、優先順位がターゲットデバイス4b>ターゲットデバイス4c>ターゲットデバイス4aのように変更され、ターゲットデバイス4aの優先順位が最下位になる。
FIG. 8 is a timing chart in the case of adjusting the access priority.
When priority adjustment is performed, the operation up to time t9 is as described above regardless of whether or not priority adjustment is performed. However, when a time-out error occurs at time t5, the priority order is the target device 4b> target device 4c. > The target device 4a is changed, and the priority order of the target device 4a is the lowest.

したがって、時刻t10では変更された優先順位に基づいて、マスタデバイス3aではなく、マスタデバイス3bのリードコマンドがシステムバス上に発行される。   Therefore, at time t10, based on the changed priority, the read command for the master device 3b, not the master device 3a, is issued on the system bus.

同様に時刻t14でもマスタデバイス3cのリードコマンドがシステムバス上に発行される。   Similarly, at time t14, a read command for the master device 3c is issued on the system bus.

そして、優先順位の最も低いターゲットデバイス4aへのマスタデバイス3aのリードコマンドは、他のマスタデバイス3b、3cのリードコマンドが発行されていない時刻t18で発行されることになる。   Then, the read command of the master device 3a to the target device 4a having the lowest priority is issued at time t18 when the read commands of the other master devices 3b and 3c are not issued.

このようにタイムアウトエラーなどのエラーが発生したターゲットデバイスへのアクセスの優先度を下げることにより、他のターゲットデバイスのコマンドが優先的に処理され、システムバスの帯域を有効利用してシステム全体としての処理の最適化を行うことができる。   In this way, by lowering the priority of access to the target device in which an error such as a timeout error has occurred, the commands of other target devices are processed preferentially, and the system bus bandwidth is effectively used as a whole system. Processing optimization can be performed.

なお、ターゲットデバイスの優先順位は、CPU2の記憶領域や、他の記憶装置などに予め記憶しておき、ターゲットデバイスのエラーが発生した時点で優先順位を更新するようにすればよい。   The priority order of the target devices may be stored in advance in a storage area of the CPU 2 or other storage device, and the priority order may be updated when a target device error occurs.

本発明の実施の一形態である制御システム1の構成を示す概略図である。It is the schematic which shows the structure of the control system 1 which is one Embodiment of this invention. ターゲットデバイス4の構成を示すブロック図である。3 is a block diagram showing a configuration of a target device 4. FIG. マスタデバイス3の構成を示すブロック図である。2 is a block diagram showing a configuration of a master device 3. FIG. 制御システム1のタイミングチャートである。3 is a timing chart of the control system 1. エラー識別コードと発生原因との対応を示すコード対応テーブルの例を示す図である。It is a figure which shows the example of the code corresponding | compatible table which shows a response | compatibility with an error identification code and an occurrence cause. 制御システム1のデータ転送処理を示すフローチャートである。3 is a flowchart showing a data transfer process of the control system 1. アクセスの優先度を調整しない場合のタイミングチャートである。It is a timing chart when not adjusting the priority of access. アクセスの優先度を調整する場合のタイミングチャートである。It is a timing chart in the case of adjusting the priority of access.

符号の説明Explanation of symbols

1 制御システム
2 CPU
3 マスタデバイス
4 ターゲットデバイス
5 システムバス
6 外部デバイス
1 Control system 2 CPU
3 Master device 4 Target device 5 System bus 6 External device

Claims (5)

システムバスを介して、データ転送を制御するマスタデバイスと、
前記マスタデバイスからアクセス要求を受けて処理を行うターゲットデバイスとが接続される制御システムにおいて、
前記ターゲットデバイスは、
データ転送中にエラーが発生した場合にその原因を示すエラー識別コードを前記マスタデバイスへ出力するコード出力手段を有し、
前記マスタデバイスは、
エラー発生時に、エラー識別コードに基づいてマスタデバイスが実行すべきエラー回復処理の内容を予め設定する設定手段と、
前記設定手段で設定された前記エラー回復処理を実行する回復手段とを有することを特徴とする制御システム。
A master device for controlling data transfer via the system bus;
In a control system connected to a target device that receives an access request from the master device and performs processing,
The target device is
A code output means for outputting an error identification code indicating the cause when an error occurs during data transfer to the master device;
The master device is
Setting means for presetting the contents of error recovery processing to be executed by the master device based on the error identification code when an error occurs;
And a recovery means for executing the error recovery process set by the setting means.
前記マスタデバイスは、エラー発生時に、前記回復手段にエラー回復処理を行わせるか否かを選択する選択手段を有することを特徴とする請求項1記載の制御システム。   The control system according to claim 1, wherein the master device has a selection unit that selects whether or not the recovery unit performs an error recovery process when an error occurs. 前記設定手段は、データ転送方式がアイソクロナス転送のときは、エラーの発生原因がタイムアウトかまたは、データ自身に誤りがある場合は、前記エラー回復処理としてリトライを行わないように設定することを特徴とする請求項1記載の制御システム。   When the data transfer method is isochronous transfer, the setting means sets so that no retry is performed as the error recovery process when the cause of the error is a timeout or the data itself has an error. The control system according to claim 1. 前記ターゲットデバイスが出力するエラー識別コードは、エラーの発生原因毎にコードを出力する信号線が割り当てられていることを特徴とする請求項1記載の制御システム。   2. The control system according to claim 1, wherein the error identification code output from the target device is assigned a signal line for outputting a code for each cause of the error. エラーが発生したターゲットデバイスへのアクセスの優先度を下げることを特徴とする請求項1記載の制御システム。   The control system according to claim 1, wherein the priority of access to a target device in which an error has occurred is lowered.
JP2008028199A 2008-02-07 2008-02-07 Control system Active JP5227601B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008028199A JP5227601B2 (en) 2008-02-07 2008-02-07 Control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008028199A JP5227601B2 (en) 2008-02-07 2008-02-07 Control system

Publications (2)

Publication Number Publication Date
JP2009187405A true JP2009187405A (en) 2009-08-20
JP5227601B2 JP5227601B2 (en) 2013-07-03

Family

ID=41070556

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008028199A Active JP5227601B2 (en) 2008-02-07 2008-02-07 Control system

Country Status (1)

Country Link
JP (1) JP5227601B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021047668A (en) * 2019-09-19 2021-03-25 京セラドキュメントソリューションズ株式会社 Image forming apparatus and data communication method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60204050A (en) * 1984-03-27 1985-10-15 Fujitsu Ltd Error recovering system of input/output device
JPH02143630A (en) * 1988-11-25 1990-06-01 Nec Corp Error notice system
JPH0351937A (en) * 1989-07-19 1991-03-06 Nec Corp Fault recovery system for peripheral device of electronic computer system
JPH05314674A (en) * 1991-04-01 1993-11-26 Hitachi Ltd System for recovering fault in storage device and method therefor
JPH1117855A (en) * 1997-06-23 1999-01-22 Canon Inc Picture processor and control method for the same
JPH11331399A (en) * 1998-05-20 1999-11-30 Ricoh Co Ltd Remote centralized control system
JP2003131865A (en) * 2001-10-22 2003-05-09 Sony Corp Display device and display method, display control device and display control method, display system, and program
JP2003150356A (en) * 2001-11-14 2003-05-23 Seiko Epson Corp Controller of electronic equipment
JP2003218878A (en) * 2002-01-23 2003-07-31 Fujitsu Ltd Information processing apparatus, recording medium and program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60204050A (en) * 1984-03-27 1985-10-15 Fujitsu Ltd Error recovering system of input/output device
JPH02143630A (en) * 1988-11-25 1990-06-01 Nec Corp Error notice system
JPH0351937A (en) * 1989-07-19 1991-03-06 Nec Corp Fault recovery system for peripheral device of electronic computer system
JPH05314674A (en) * 1991-04-01 1993-11-26 Hitachi Ltd System for recovering fault in storage device and method therefor
JPH1117855A (en) * 1997-06-23 1999-01-22 Canon Inc Picture processor and control method for the same
JPH11331399A (en) * 1998-05-20 1999-11-30 Ricoh Co Ltd Remote centralized control system
JP2003131865A (en) * 2001-10-22 2003-05-09 Sony Corp Display device and display method, display control device and display control method, display system, and program
JP2003150356A (en) * 2001-11-14 2003-05-23 Seiko Epson Corp Controller of electronic equipment
JP2003218878A (en) * 2002-01-23 2003-07-31 Fujitsu Ltd Information processing apparatus, recording medium and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021047668A (en) * 2019-09-19 2021-03-25 京セラドキュメントソリューションズ株式会社 Image forming apparatus and data communication method
JP7327029B2 (en) 2019-09-19 2023-08-16 京セラドキュメントソリューションズ株式会社 Image forming apparatus, data communication method

Also Published As

Publication number Publication date
JP5227601B2 (en) 2013-07-03

Similar Documents

Publication Publication Date Title
TWI684868B (en) Memory controller and operating method thereof, and controlling method of a memory system
US10482047B2 (en) Slave device connected to master device via I2C bus and communication method thereof
US8234463B2 (en) Data processing apparatus, memory controller, and access control method of memory controller
US8635386B2 (en) Communication control device, data communication method and program
JP2008090375A (en) Interrupt control system and storage control system using the same
US8370541B2 (en) Method and system for processing frames in storage controllers
JP5932947B2 (en) Host and system
JP2021508871A (en) System-on-chip system bit-by-bit writer
US7702820B2 (en) Hardware accelerator and data transmission system and method using the same
US8327212B2 (en) Error identifying method, data processing device, and semiconductor device
WO2009098737A1 (en) External device access apparatus, its controlling method and system lsi
JP5227601B2 (en) Control system
JP2009205347A (en) Information processing system, control method of information processing system, and control program of information processing system
JP2014232414A (en) I2C communication slave device
TW201911327A (en) Memory devices and read methods thereof
JP2004126911A (en) Control unit
WO2003079194A1 (en) Information processing apparatus
JP6389499B2 (en) System and method for transmitting data from non-volatile solid state devices prior to error correction
JP2008299747A (en) Usb host system and method for transferring transfer data
JP4439295B2 (en) Data transfer control device
JP6138482B2 (en) Embedded system
WO2016151774A1 (en) Information processing device, information processing system, and control program of information processing device
TW202407547A (en) Storage device and method for processing command from host computing device to storage device
JP6217192B2 (en) Storage control device, control program, and control method
JP5350049B2 (en) Interface circuit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120117

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120118

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120309

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120904

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121012

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: 20130226

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130318

R150 Certificate of patent or registration of utility model

Ref document number: 5227601

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160322

Year of fee payment: 3