JPH1153272A - Data transfer system - Google Patents

Data transfer system

Info

Publication number
JPH1153272A
JPH1153272A JP9222984A JP22298497A JPH1153272A JP H1153272 A JPH1153272 A JP H1153272A JP 9222984 A JP9222984 A JP 9222984A JP 22298497 A JP22298497 A JP 22298497A JP H1153272 A JPH1153272 A JP H1153272A
Authority
JP
Japan
Prior art keywords
data
phase
host
peripheral device
parity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP9222984A
Other languages
Japanese (ja)
Inventor
Takuto Ueno
拓人 上野
Masanobu Seki
正伸 関
Masahiko Kikuchi
雅彦 菊地
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP9222984A priority Critical patent/JPH1153272A/en
Publication of JPH1153272A publication Critical patent/JPH1153272A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To add a data error detection function about data to be transferred without deviating from a standard in a data transfer system that is configured, conforming a data transfer standard which does not define a data error detection function. SOLUTION: When a peripheral device 12 sends data to a host 11, the device 12 sends data in a 1st phase in which transfer is performed from the device 12 to the host 11. When the data is sent, a parity generating means 123 that is provided on the device 12 generates a horizontal parity code and holds it. The host 11 generates a horizontal parity code from received data and sends an error code that is generated to the device 12 after data receiving in the 1st phase is finished and shifted to a 2nd phase in which transfer is performed from the host 11 to the device 12. The device 12 which receives it compares the horizontal parity signal that is generated before sending the data with a horizontal parity code of data after sending which is received from the host 11 with a comparing means and performs code error detection.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は特定の規格(例えば
IEEE1284規格)に準拠して上位装置(ホスト)
と周辺機器との間でデータの転送を行うデータ転送方式
に関し、特にその特定の規格に符号誤り検出機能が定義
されていない場合に、その規格に変更を施すことなく符
号誤り検出の機能を付加するデータ転送方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a host device (host) based on a specific standard (for example, IEEE 1284 standard).
Adds a code error detection function without making any changes to the data transfer method for transferring data between the device and peripheral devices, especially if the code error detection function is not defined in that particular standard Data transfer method.

【0002】[0002]

【従来の技術】ホストコンピュータと周辺機器とのデー
タ転送システムでは、双方向通信を実現する場合、現
在、IEEE1284規格に準拠する方式を搭載したシ
ステムが広く使われている。しかし、IEEE1284
規格にはパリティチェックやCRC(巡回符号方式)に
代表される、誤り検出方法は定義されておらず、符号誤
りを検出する機能がなかった。一般に、パリティチェッ
ク等の誤り検出方法は、送信側において送信すべきデー
タに対する誤り符号を生成し、この符号を付加した特定
のデータフォーマットのデータを送信し、受信側でその
データを受信し、パリティチェック回路等の誤り検出回
路で誤りを検出するものである。また、そのような誤り
検出方法を採用するデータ転送方式の従来技術の一例と
して、特開平6−282501号公報に記載されてい
る、ホストから周辺装置に対するデータ転送の速度を増
加させるシステムがある。これはクロック・パリティな
どをデータとともに同時にバースト転送し、周辺装置内
のクロック検出回路とパリティエラーチェック回路によ
り、誤り検出機能を実現している。
2. Description of the Related Art In a data transfer system between a host computer and a peripheral device, a system equipped with a system conforming to the IEEE1284 standard is widely used at the time of realizing bidirectional communication. However, IEEE 1284
The standard does not define an error detection method typified by parity check and CRC (cyclic coding), and has no function of detecting a code error. In general, an error detection method such as a parity check generates an error code for data to be transmitted on a transmission side, transmits data of a specific data format to which the code is added, receives the data on a reception side, and generates a parity check. The error is detected by an error detection circuit such as a check circuit. Further, as an example of a conventional data transfer method employing such an error detection method, there is a system described in JP-A-6-282501 for increasing the speed of data transfer from a host to a peripheral device. In this method, clock parity and the like are simultaneously burst-transferred together with data, and an error detection function is realized by a clock detection circuit and a parity error check circuit in a peripheral device.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、従来の
技術では、誤り検出方法に対応したデータフォーマット
や、データの転送路を必要とするが、誤り検出機能を持
たない規格に準拠したデータ転送方式はそのようなデー
タフォーマットに対応しておらず、そのためのデータの
転送路も持たないため、誤り検出機能を追加することが
できなかった。誤り検出機能を持たせるため、データフ
ォーマットの変更や、データ転送路の拡張を図ろうとす
ると、例えば前記公報記載の従来技術のように、採用し
ようとする標準規格からは外れてしまうことなってしま
う。
However, in the prior art, a data format corresponding to the error detection method and a data transfer path are required, but a data transfer method conforming to a standard having no error detection function is required. Since it does not correspond to such a data format and does not have a data transfer path therefor, an error detection function cannot be added. If an attempt is made to change the data format or expand the data transfer path in order to provide an error detection function, for example, the standard will be deviated from the standard to be adopted as in the prior art described in the above-mentioned publication. .

【0004】そこで本発明は、データ誤り検出機能を定
義していないデータ転送の規格に準拠して構成したデー
タ転送方式において、転送されるデータに関するデータ
誤り検出機能を、前記規格から逸脱することなく付加す
ることを課題とする。
Accordingly, the present invention provides a data transfer system configured in accordance with a data transfer standard in which a data error detection function is not defined, without changing the data error detection function for transferred data without deviating from the standard. The task is to add it.

【0005】[0005]

【課題を解決するための手段および作用】本発明(請求
項1)は、第1の装置(図1の12、図5の52、図8
の81、図11の82)から第2の装置(図1の11、
図5の51、図8の82、図11の81)へデータ送信
可能な第1のフェーズ(例えば、ニブルモードでのデー
タ転送フェーズ、バイトモードのデータ転送フェーズ、
ECPフォワードフェーズ、ECPリバースフェーズ)
と第2の装置から第1の装置へデータ送信可能な第2の
フェーズ(例えば、ターミネーションフェーズ、コンパ
チブルモード、ECPリバースフェーズ、ECPフォワ
ードフェーズ)とを含むデータ転送方式である。そし
て、第1の装置には、第1のフェーズで送信するデータ
に関する誤り符号(例えば、水平パリティ符号)を生成
する第1の生成手段(図1の123、図5の523、図
8の812、図11の824)と、その第1の生成手段
により生成した誤り符号と第2のフェーズに第2の装置
から受信した誤り符号とを比較する比較手段(図1の1
24、図5の524、図8の813、図11の825)
とを設ける。更に、第2の装置には、第1のフェーズで
受信したデータに関する誤り符号を生成する第2の生成
手段(図1の113、図5の513、図8の822、図
11の815)と、その第2の生成手段により生成した
誤り符号を第2のフェーズに第1の装置に送信する誤り
符号送出手段(図1の112、図5の512、図8の8
23、図11の811)とを設ける。
According to the present invention (claim 1), the first device (12 in FIG. 1, 52 in FIG. 5, FIG. 8)
81, 82 in FIG. 11) to the second device (11, FIG. 1).
5, 51 of FIG. 5, 82 of FIG. 8, 81 of FIG. 11) (for example, a data transfer phase in the nibble mode, a data transfer phase in the byte mode,
ECP forward phase, ECP reverse phase)
And a second phase (for example, a termination phase, a compatible mode, an ECP reverse phase, and an ECP forward phase) in which data can be transmitted from the second device to the first device. Then, the first device includes first generation means (123 in FIG. 1, 523 in FIG. 5, and 812 in FIG. 8) for generating an error code (for example, a horizontal parity code) relating to data transmitted in the first phase. 824 in FIG. 11) and a comparing means (1 in FIG. 1) for comparing the error code generated by the first generating means with the error code received from the second device in the second phase.
24, 524 in FIG. 5, 813 in FIG. 8, and 825 in FIG. 11)
Are provided. Further, the second device includes second generating means (113 in FIG. 1, 513 in FIG. 5, 822 in FIG. 8, and 815 in FIG. 11) for generating an error code related to the data received in the first phase. The error code transmitting means (112 in FIG. 1, 512 in FIG. 5, 8 in FIG. 8) for transmitting the error code generated by the second generating means to the first device in the second phase.
23, 811) in FIG.

【0006】以上の構成を含むデータ転送方式におい
て、第1の装置から第2の装置へデータを送信するとき
には、第1の装置は第1のフェーズでデータの送信を行
う。そのデータの送信を行う際に、第1の生成手段によ
り誤り符号の生成、保持しておく。第2の装置は受信デ
ータから第2の生成手段により誤り符号、例えば水平パ
リティ符号を生成し、第1のフェーズによるデータの受
信が終了し、第2のフェーズに遷移した後、第2の装置
は第2の生成手段により生成した誤り符号を第1の装置
へ誤り符号送出手段により送信する。それを受信した第
1の装置では、比較手段により第1の生成手段に保持し
た誤り符号と受信した誤り符号とを比較する。その比較
の結果、不一致があったときには、第2の装置で受信し
たデータに符号誤りが生じているので、適宜の処理を行
う。本発明の一態様(請求項2)では、前記比較手段に
よる比較の結果一致しなかったとき、第1の装置から第
2の装置へ、誤りが検出されたことを通知するとともに
誤りに対応するデータを再送する。これにより誤りの訂
正が可能となる。
In the data transfer method including the above configuration, when data is transmitted from the first device to the second device, the first device transmits data in the first phase. When transmitting the data, an error code is generated and held by the first generation unit. The second device generates an error code, for example, a horizontal parity code, from the received data by the second generation means. After the reception of the data in the first phase is completed, and the state transitions to the second phase, the second device generates the error code. Transmits the error code generated by the second generation means to the first device by the error code transmission means. In the first device that has received the error code, the comparing unit compares the error code held in the first generating unit with the received error code. As a result of the comparison, if there is a mismatch, a code error has occurred in the data received by the second device, so that appropriate processing is performed. In one aspect of the present invention (claim 2), when the comparison result by the comparing means does not match, the first device notifies the second device that an error has been detected and responds to the error. Resend the data. This enables error correction.

【0007】従来は、第1装置から第2の装置へデータ
を送信するときに、誤りのチェックを行うには、送信デ
ータに誤り符号を付随させて一緒に送信し、受信側の第
2の装置に設けたチェック回路により誤り符号に基づい
て誤りの検出を行っていたが、誤りの検出機能を持たな
いデータ転送規格に準拠した装置の場合、誤り符号をデ
ータとともに第2の装置へ送信するためのデータフォー
マットやデータ路やタイムスロットを持たないため、誤
りチェックをする機能を付加することができなかった。
これに対して、本発明によれば、第1の装置から第2の
装置へは第1のフェーズにおいてデータのみを送信し、
誤り符号の生成は第2の装置側で行い、第2の装置から
第1の装置への転送が可能な第2のフェーズを利用して
これを第1の装置へ送信し、第1の装置側で誤りチェッ
クを行うように構成したので、誤り検出機能について定
義をしていない特定の通信規格に準拠しながら、誤り検
出機能を付加することができる。従って、第1の装置か
ら第2の装置への送信の誤りを少なくすることができ、
信頼性のあるデータ転送を行うことができる。
Conventionally, when data is transmitted from a first device to a second device, an error check is performed by adding an error code to the transmission data and transmitting the data together with the data. The error detection is performed based on the error code by the check circuit provided in the device, but in the case of the device conforming to the data transfer standard without the error detection function, the error code is transmitted to the second device together with the data. It does not have a data format, a data path, and a time slot, and thus cannot add a function of performing error checking.
In contrast, according to the present invention, only data is transmitted from the first device to the second device in the first phase,
The error code is generated on the second device side, and is transmitted to the first device using a second phase that can be transferred from the second device to the first device. Since the configuration is such that the error check is performed on the side, the error detection function can be added while conforming to a specific communication standard for which the error detection function is not defined. Therefore, errors in transmission from the first device to the second device can be reduced,
Reliable data transfer can be performed.

【0008】本発明の具体的な態様(請求項3)は、上
記発明(請求項1、2)において、第1の装置が周辺機
器であり、第2の装置がホストコンピュータ(以下、ホ
ストという)であり、第1のフェーズが制御線を用いて
周辺機器のデータをホストへ送信する動作状態であり、
第2のフェーズは第1のフェーズが終了後に遷移するデ
ータ線を用いてホストのデータを周辺機器へ送信可能な
動作状態であることを特徴とする。例えば、IEEE1
284規格のニブルモードでのデータ転送が一例として
この態様に該当し、ニブルモードのデータ転送フェーズ
が第1のフェーズに相当し、ターミネーションフェーズ
又はコンパチブルモードのフォワード転送フェーズが第
2のフェーズに相当する。この例では、ニブルモードの
データ転送フェーズで周辺機器のデータがホストに転送
され、そのデータ転送フェーズの終了後にターミネーシ
ョンフェーズを経てコンパチブルモードに戻るが、ター
ミネーションフェーズおよびコンパチブルモードはデー
タ線によりホストから周辺機器へデータを送ることがで
きる動作状態であるので、これを利用してホストで生成
した誤り符号を周辺機器に送ることができる。従って、
ニブルモードのデータ転送フェーズでは誤り符号をホス
トへ送ることができなくとも、ターミネーションフェー
ズまたはコンパチブルモードのフォワード転送フェーズ
で符号誤りのチェックに必要な誤り符号を周辺装置側の
比較手段へ入力することが可能となるので、IEEE1
284規格に準拠した転送機能を変更することなく誤り
検出の機能が付加できることとなる。
[0008] In a specific aspect (claim 3) of the present invention, in the above invention (claims 1 and 2), the first device is a peripheral device and the second device is a host computer (hereinafter referred to as a host). ), Wherein the first phase is an operation state of transmitting data of the peripheral device to the host using the control line,
The second phase is characterized by an operation state in which host data can be transmitted to a peripheral device using a data line to which a transition is made after the first phase is completed. For example, IEEE1
For example, data transfer in the nibble mode of the H.284 standard corresponds to this mode, and the data transfer phase in the nibble mode corresponds to the first phase, and the forward transfer phase in the termination phase or the compatible mode corresponds to the second phase. . In this example, the data of the peripheral device is transferred to the host in the data transfer phase of the nibble mode, and after the completion of the data transfer phase, the mode returns to the compatible mode via the termination phase. Since the operation state is such that data can be transmitted to the device, the error code generated by the host can be transmitted to the peripheral device by using this. Therefore,
Even if the error code cannot be sent to the host in the data transfer phase in the nibble mode, the error code necessary for checking the code error in the termination phase or the forward transfer phase in the compatible mode can be input to the comparing means on the peripheral device side. As it becomes possible, IEEE1
An error detection function can be added without changing the transfer function conforming to the 284 standard.

【0009】この発明(請求項3)では、制御線を用い
て周辺機器からホストへデータを転送する第1のフェー
ズでは誤り符号をデータと共に転送することができない
が、第2のフェーズにおいてホストで生成した誤り符号
を周辺機器へ送ることができるので、周辺機器に用意し
た比較回路で送信前のデータの誤り符号と送信後の誤り
符号を比較することができ、誤りの検出が可能となる。
従って、周辺機器からホストへの送信の誤りを少なくす
ることができ、信頼性のあるデータ転送を行うことがで
きる。
According to the present invention (claim 3), the error code cannot be transferred together with the data in the first phase in which the data is transferred from the peripheral device to the host using the control line. Since the generated error code can be sent to the peripheral device, the error code of the data before transmission and the error code after transmission can be compared by the comparison circuit prepared in the peripheral device, and the error can be detected.
Therefore, errors in transmission from the peripheral device to the host can be reduced, and reliable data transfer can be performed.

【0010】本発明(請求項4)は、前記発明(請求項
1、2)において、第1の装置が周辺機器であり、第2
の装置がホストコンピュータであり、第1のフェーズが
双方向データ線を用いて周辺機器のデータをホストコン
ピュータへ送信する動作状態であり、第2のフェーズは
第1のフェーズが終了後に遷移する双方向データ線を用
いてホストコンピュータのデータを周辺機器へ送信可能
な動作状態であることを特徴とする。例えば、IEEE
1284規格のバイトモードやECPモードでのデータ
転送がこの態様の具体例に該当し、バイトモードのデー
タ転送フェーズあるいはECPリバース転送フェーズが
第1のフェーズに相当し、ターミネーションフェーズ、
コンパチブルモードのフォワード転送フェーズあるいは
ECPフォワード転送フェーズが第2のフェーズに相当
する。この例では、バイトモードのデータ転送フェーズ
またはECPリバースフェーズで周辺機器のデータがホ
ストに転送され、バイトモードのデータ転送フェーズの
終了後にターミネーションフェーズを経てコンパチブル
モードに戻り、ECPリバース転送フェーズの場合には
ECPフォワード転送フェーズへ遷移する。ターミネー
ションフェーズ、コンパチブルモードおよびECPフォ
ワード転送フェーズは双方向データ線によりホストから
周辺機器へデータを送ることができる動作状態であるの
で、これを利用してホストで生成した誤り符号を周辺機
器に送ることができる。また、バイトモードのデータ転
送フェーズあるいはECPリバース転送フェーズでは誤
り符号をホストへ送ることができなくとも、ターミネー
ションフェーズ、コンパチブルモードあるいはECPフ
ォワード転送フェーズで符号誤りのチェックに必要な誤
り符号のやりとりが、ホストと周辺機器の間で、可能と
なる。
According to the present invention (claim 4), in the invention (claims 1 and 2), the first device is a peripheral device and the second device is
Is a host computer, a first phase is an operation state of transmitting data of a peripheral device to the host computer using a bidirectional data line, and a second phase is a state in which the first phase transits after the completion of the first phase. The operation state is such that data of the host computer can be transmitted to the peripheral device using the data line. For example, IEEE
Data transfer in the byte mode or ECP mode of the 1284 standard corresponds to a specific example of this mode, and the data transfer phase or the ECP reverse transfer phase in the byte mode corresponds to the first phase, and the termination phase,
The compatible mode forward transfer phase or ECP forward transfer phase corresponds to the second phase. In this example, in the byte mode data transfer phase or the ECP reverse phase, the data of the peripheral device is transferred to the host, and after the byte mode data transfer phase is completed, the mode returns to the compatible mode via the termination phase. Transitions to the ECP forward transfer phase. Since the termination phase, compatible mode, and ECP forward transfer phase are operating states in which data can be transmitted from the host to the peripheral device via the bidirectional data line, use this to send an error code generated by the host to the peripheral device. Can be. Further, even if the error code cannot be sent to the host in the byte mode data transfer phase or the ECP reverse transfer phase, the exchange of the error code necessary for checking the code error in the termination phase, the compatible mode or the ECP forward transfer phase is performed. It is possible between the host and the peripheral device.

【0011】この発明(請求項4)では、データ線を用
いて周辺機器からホストへデータを転送する第1のフェ
ーズでは誤り符号をデータと共に転送することができな
いが、第2のフェーズにおいてホストで生成した誤り符
号を周辺機器へ送ることができるので、周辺機器に用意
した比較回路で送信前のデータの誤り符号と送信後の誤
り符号を比較することができ、誤りの検出が可能とな
る。従って、周辺機器からホストへの送信の誤りを検出
でき、信頼性のあるデータ転送を行うことができる。
According to the present invention (claim 4), the error code cannot be transferred together with the data in the first phase in which the data is transferred from the peripheral device to the host using the data line. Since the generated error code can be sent to the peripheral device, the error code of the data before transmission and the error code after transmission can be compared by the comparison circuit prepared in the peripheral device, and the error can be detected. Accordingly, an error in transmission from the peripheral device to the host can be detected, and reliable data transfer can be performed.

【0012】本発明(請求項5)は、前記発明(請求項
1、2)において、第1の装置がホストコンピュータで
あり、第2の装置が周辺機器であり、第1のフェーズが
双方向データ線を用いてホストコンピュータのデータを
周辺機器へ送信する動作状態であり、第2のフェーズは
第1のフェーズが終了後に遷移する双方向データ線を用
いて周辺機器のデータをホストコンピュータへ送信可能
な動作状態であることを特徴とする。例えば、IEEE
1284規格のECPモードでのデータ転送がこの態様
の具体例に該当し、ECPフォワード転送フェーズが第
1のフェーズに相当し、ECPリバース転送フェーズが
第2のフェーズに相当する。この例では、ECPフォワ
ード転送フェーズでホストのデータが周辺機器に転送さ
れ、それらのデータ転送フェーズの終了後にターミネー
ションフェーズを経てコンパチブルモードに戻り、ある
いはECPリバース転送フェーズに遷移する。ターミネ
ーションフェーズおよびECPリバース転送フェーズは
双方向データ線により周辺機器からホストへデータを送
ることができる動作状態であるので、これを利用して周
辺機器で生成した誤り符号をホストに送ることができ
る。ECPフォワード転送フェーズでは誤り符号をホス
トへ送ることができなくとも、ターミネーションフェー
ズあるいはECPリバース転送フェーズで符号誤りのチ
ェックに必要な誤り符号のやりとりが、ホストと周辺機
器の間で、可能となる。この発明(請求項5)では、デ
ータ線を用いてホストから周辺機器へデータを転送する
第1のフェーズでは誤り符号をデータと共に転送するこ
とができないが、第2のフェーズにおいて周辺機器で生
成した誤り符号をホストへ送ることができるので、送信
側のホストに用意した比較回路で送信前のデータの誤り
符号と送信後の誤り符号を比較することができ、誤りの
検出が可能となる。従って、ホストから周辺機器への送
信の誤りを少なくすることができ、信頼性のあるデータ
転送を行うことができる。
According to the present invention (claim 5), in the above invention (claims 1 and 2), the first device is a host computer, the second device is a peripheral device, and the first phase is bidirectional. An operation state in which data of the host computer is transmitted to the peripheral device using the data line. In the second phase, data of the peripheral device is transmitted to the host computer using a bidirectional data line to which a transition is made after completion of the first phase. It is characterized by a possible operating state. For example, IEEE
The data transfer in the ECP mode of the 1284 standard corresponds to a specific example of this mode, the ECP forward transfer phase corresponds to a first phase, and the ECP reverse transfer phase corresponds to a second phase. In this example, the data of the host is transferred to the peripheral device in the ECP forward transfer phase, and after the completion of the data transfer phase, the host returns to the compatible mode via the termination phase or transits to the ECP reverse transfer phase. Since the termination phase and the ECP reverse transfer phase are operating states in which data can be transmitted from the peripheral device to the host via the bidirectional data line, the error code generated by the peripheral device can be transmitted to the host using this. Even if the error code cannot be sent to the host in the ECP forward transfer phase, the exchange of the error code necessary for checking the code error in the termination phase or the ECP reverse transfer phase becomes possible between the host and the peripheral device. According to the present invention (claim 5), the error code cannot be transferred together with the data in the first phase in which the data is transferred from the host to the peripheral device using the data line, but the error code is generated by the peripheral device in the second phase. Since the error code can be sent to the host, the error code of the data before transmission and the error code after transmission can be compared by the comparison circuit prepared in the host on the transmission side, and the error can be detected. Therefore, errors in transmission from the host to the peripheral device can be reduced, and reliable data transfer can be performed.

【0013】本発明(請求項6)は、前記発明(請求項
1〜2、請求項4〜5)において、第1の装置には、第
1のフェーズで送信するデータに関する第2の誤り符号
(例えば垂直パリティ符号)を生成する第3の生成手段
(図5の525)と、生成した第2の誤り符号を第1の
フェーズで使用していない制御線(例えば、IEEE1
284のバイトモード、ECPモードにおけるXfla
g信号の線541)により第2の装置にデータと同時に
送信する手段(図5の522、)を付加し、第2の装置
には、第1の装置から受信したデータから第2の誤り符
号を生成する第4の生成手段(第5図の514)と、そ
の第4の生成手段により生成した第2の誤り符号と前記
制御線を介して受信した第2の誤り符号とを比較し誤り
を検出する第2の比較手段(図5の515)とを付加し
たことを特徴とする。本発明(請求項6)によれば、第
1の誤り符号によるチェック(例えば水平パリティチェ
ック)と第2の誤り符号によるチェック(例えば垂直パ
リティチェック)を併用することことができ、より一層
のデータ転送の信頼性を向上することができる。
The present invention (Claim 6) is the invention according to the invention (Claims 1 and 2 and Claims 4 and 5), wherein the first device includes a second error code for data transmitted in the first phase. (For example, a vertical parity code) (525 in FIG. 5) and a control line (for example, IEEE 1) in which the generated second error code is not used in the first phase.
Xfla in 284 byte mode and ECP mode
g signal line 541), a means (522 in FIG. 5) for simultaneously transmitting data to the second device is added, and the second device is provided with a second error code from the data received from the first device. And a second error code generated by the fourth generation means and a second error code received via the control line to compare the error with the second error code generated by the fourth generation means. And a second comparing means (515 in FIG. 5) for detecting. According to the present invention (claim 6), the check using the first error code (for example, the horizontal parity check) and the check using the second error code (for example, the vertical parity check) can be used in combination, so that more data can be obtained. Transfer reliability can be improved.

【0014】[0014]

【発明の実施の形態】以下、本発明の実施の形態を説明
する。図2は、IEEE1284規格におけるホストと
周辺機器とが通信するための通信モードの遷移の概略を
説明するためのものである。通信モードには図に示すよ
うに、コンパチブルモード(Compatibilit
y Mode)、ニブルモード(Nibble Mod
e)、バイトモード(Byte Mode)、ECPモ
ード(Extended Capabilities
Port Mode)などがある。ホストと周辺機器と
のインターフェースは初期はコンパチブルモードであ
る。データ転送を行う際にはコンパチブルモードでホス
トがリクエストを周辺機器へ出すと、ネゴシエーション
フェーズで周辺機器に可能な転送モードを選択し、選択
された転送モードへ遷移する。遷移した転送モードでデ
ータの転送が終了するとターミネーションフェーズ経
て、コンパチブルモードに戻る。ホストから周辺機器へ
のデータ転送をフォワードデータ転送といい、周辺機器
からホストへのデータ転送をリバースデータ転送とい
う。実施例1はニブルモードのリバースデータ転送に本
発明による誤り検出機能を付加した例であり、実施例2
はバイトモードのリバース転送において本発明による誤
り検出機能を付加した例であり、実施例3はECPモー
ドのリバースデータ転送およびフォワードデータ転送に
おいて本発明による誤り検出機能を付加した例を示すも
のである。以下、本発明の各実施例を図面に基づいて詳
細に説明する。
Embodiments of the present invention will be described below. FIG. 2 is for explaining an outline of transition of a communication mode for communication between a host and a peripheral device in the IEEE1284 standard. As shown in the figure, the communication mode includes a compatible mode (Compatibility mode).
y Mode), Nibble Mode (Nibble Mode)
e), byte mode (Byte Mode), ECP mode (Extended Capabilities)
Port Mode). The interface between the host and peripheral devices is initially in compatible mode. When performing a data transfer, when the host issues a request to a peripheral device in the compatible mode, a transfer mode that is possible for the peripheral device is selected in a negotiation phase, and a transition is made to the selected transfer mode. When the data transfer is completed in the transitioned transfer mode, the mode returns to the compatible mode via the termination phase. Data transfer from the host to the peripheral device is called forward data transfer, and data transfer from the peripheral device to the host is called reverse data transfer. The first embodiment is an example in which the error detection function according to the present invention is added to the reverse data transfer in the nibble mode.
Is an example in which the error detection function according to the present invention is added to the reverse transfer in the byte mode, and Embodiment 3 shows an example in which the error detection function according to the present invention is added to the reverse data transfer and the forward data transfer in the ECP mode. . Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

【0015】[0015]

【実施例1】実施例1はIEEE1284の転送モード
1つであるニブルモードに準拠したデータ転送システム
に本発明を適用してなるものである。ニブルモードはホ
ストの制御の基に行われる非同期のリバースチャネルす
なわち周辺機器からホストへ自己のIDやステータス信
号を転送する動作状態である。このモードでは、データ
バイトは、周辺機器からホストへの4個のデータ線(ス
テータスライン)を用いて並列4ビットずつの2つのシ
ーケンスとして伝送される。このニブルモードの規格に
はその伝送における符号誤りを検出する機能は用意され
ていない。
First Embodiment In a first embodiment, the present invention is applied to a data transfer system conforming to a nibble mode, which is one of the transfer modes of IEEE1284. The nibble mode is an asynchronous reverse channel performed under the control of the host, that is, an operation state in which its own ID and status signal are transferred from the peripheral device to the host. In this mode, data bytes are transmitted as two sequences of four parallel bits each using four data lines (status lines) from the peripheral device to the host. The nibble mode standard does not provide a function for detecting a code error in the transmission.

【0016】図1は、ホスト11と周辺機器12のデー
タ転送系の概略を示す図である。ホスト11と周辺機器
12は、半二重の双方向データバスもしくはホスト11
から周辺機器12方向の単方向バス13と、ニブルモー
ドでデータの転送に用いる制御線141〜144等で接
続されている。ホスト11は受信部111、送信部11
2、およびパリティ生成回路113を有する。パリティ
生成回路113は、ニブルモードにネゴシエーションし
てからコンパチブルモードにターミネーションするまで
にホスト11の受信部111によって受信した8ビット
データの各ビットについての時系列パリティ符号(水平
パリティ符号)を生成するものである。送信部112
は、そのパリティ生成回路113によって生成された時
系列パリティ符号をターミネーションフェイズにその際
使用していないデータバス13にドライブし周辺機器1
2に送信する機能を有している。
FIG. 1 is a diagram schematically showing a data transfer system between the host 11 and the peripheral device 12. The host 11 and the peripheral device 12 are connected via a half-duplex bidirectional data bus or the host 11.
To the peripheral device 12 and to the unidirectional bus 13 via control lines 141 to 144 used for data transfer in the nibble mode. The host 11 includes a receiving unit 111 and a transmitting unit 11
2 and a parity generation circuit 113. The parity generation circuit 113 generates a time-series parity code (horizontal parity code) for each bit of the 8-bit data received by the reception unit 111 of the host 11 from the time of negotiation to the nibble mode to the time of termination to the compatible mode. It is. Transmission unit 112
Drives the time-series parity code generated by the parity generation circuit 113 to the data bus 13 not used at the termination phase, and
2 has a function of transmitting data.

【0017】周辺機器12は送信部122、受信部12
1、パリティ生成回路123、およびパリティ比較回路
124を有する。パリティ生成回路123は、ニブルモ
ードでホストに送信した全てのデータの時系列パリティ
符号を生成・保持する機能を持つ。パリティ比較回路1
24は、ホスト11からターミネーションフェイズに受
信する時系列パリティ符号とパリティ生成回路123に
保持している時系列パリティ符号の比較を行い、一致し
ないときに符号誤りが生じていることを判定する機能を
持つものである。
The peripheral device 12 includes a transmitting unit 122 and a receiving unit 12
1, a parity generation circuit 123 and a parity comparison circuit 124. The parity generation circuit 123 has a function of generating and holding a time-series parity code of all data transmitted to the host in the nibble mode. Parity comparison circuit 1
A function 24 compares the time-sequence parity code received from the host 11 in the termination phase with the time-sequence parity code held in the parity generation circuit 123, and determines that a code error has occurred when they do not match. Have.

【0018】送信部122は8ビットデータをIEEE
1284規格のニブルモードの定義に従ってnData
Availという名称の信号の信号線でデータビット0
および4、Xflagという名称の信号の信号線でデー
タビット1および5、AckDataReqという名称
の信号の信号線でデータビット2および6、PtrBu
syという名称の信号の信号線でデータビット3および
7をホストマシン11へ転送する。
The transmission unit 122 converts the 8-bit data to IEEE
NData according to the definition of the nibble mode of the 1284 standard
Data bit 0 on the signal line of the signal named Avail
And 4, data bits 1 and 5 on a signal line of a signal named Xflag, data bits 2 and 6 on a signal line of a signal named AckDataReq, PtrBu.
The data bits 3 and 7 are transferred to the host machine 11 through a signal line of a signal named sy.

【0019】図3は、ニブルモードにより周辺機器12
からホスト11にデータを転送する際の動作のフローを
示す図である。ホスト11でのパリティ符号生成、周辺
機器12でのパリティチェック、再送要求するまでの概
略フロー図である。ここではパリティの例を偶数パリテ
ィとしているが、予め決めたフォーマットであればパリ
ティにこだわる必要はない。
FIG. 3 shows the peripheral device 12 in the nibble mode.
FIG. 4 is a diagram showing a flow of an operation when data is transferred from a host to a host 11. FIG. 4 is a schematic flow chart showing a process of generating a parity code in a host 11, a parity check in a peripheral device 12, and a request for retransmission. Here, an example of the parity is an even parity, but it is not necessary to stick to the parity if the format is a predetermined format.

【0020】図4は、ニブルモードからターミネーショ
ンするときにホストが各ビットの時系列のパリティ符号
を、周辺機器2に送信する詳細なタイミングチャートで
ある。なお、図4のイベント番号および信号名はIEE
E1284の規格書と同一のものである。図中、TLは
周辺機器の応答時間(Peripheral resp
onse time)、THはホストの応答時間(Ho
st response time)、T∞は不定応答
時間(infinit response time)
である。
FIG. 4 is a detailed timing chart in which the host transmits a time series parity code of each bit to the peripheral device 2 when terminating from the nibble mode. Note that the event numbers and signal names in FIG.
It is the same as the standard of E1284. In the figure, TL is the response time (peripheral resp) of the peripheral device.
once time), TH is the response time of the host (Ho
st response time), T∞ is indefinite response time (infinite response time)
It is.

【0021】以下、IEEE1284規格に沿って本発
明の実施例1の動作を説明する。ホスト11は周辺機器
12からデータ(IDや機能に関するデータやステータ
スのデータ)を受信するためにコンパチブルモードから
ニブルモードにネゴシエーションフェイズを通して遷移
する。周辺機器12はこれに対応しニブルモードでデー
タを送信する。各8ビットのデータは、ニブルモードの
データ転送フェーズにおいて図4に示すように制御線線
(IEEE1284規格でAckDataReq、Pt
rBusy、nDataAvail、XFlagと名付
けられた信号のライン)141〜144を用いて並列4
ビットずつの2つのシーケンスとして転送される。デー
タ受信が終了すると、ホストはターミネーションフェイ
ズを経てコンバチブルモードに戻る。
The operation of the first embodiment of the present invention will be described below in accordance with the IEEE1284 standard. The host 11 makes a transition from the compatible mode to the nibble mode through the negotiation phase in order to receive data (data relating to IDs and functions and status data) from the peripheral device 12. In response, the peripheral device 12 transmits data in the nibble mode. In the data transfer phase of the nibble mode, as shown in FIG. 4, each 8-bit data is transmitted through a control line (AckDataReq, Pt in the IEEE1284 standard).
rBusy, nDataAvail, lines of signals named XFlag) 141 to 144
It is transferred as two sequences of bits. When the data reception ends, the host returns to the convertible mode after the termination phase.

【0022】ここでホスト11は図3に示すように、ニ
ブルモードで受信したデータを各ビットごとにリアルタ
イムで時系列のパリティ符号をパリティ生成回路113
で生成する(図3のS31)。なお、このパリティ生成
回路113はイクスクルシーブオア回路EXORとフリ
ップフロップ回路で簡単に実現できる。ホスト11はこ
の生成したパリティ符号をニブルモードのターミネーシ
ョンフェイズで使用していないデータライン13すなわ
ち図4の上から3番目の波形に示すData(8..
1)のデータ線にドライブする。周辺機器12は図4の
イベント番号22、25、28のいずれか予め決めタイ
ミングでデータライン13の時系列のパリティ符号を取
り込み、パリティ生成回路123により自ら送信したデ
ータの時系列のパリティ符号とパリティ比較回路124
で比較する(図3のS32)。周辺機器12はその際、
比較結果に差異があるときには、すなわち時系列のパリ
ティエラーが生じた場合には、直ちにビジー信号を生起
するなど制御線等でホスト11にエラーを通知する(図
3のS33)。そしてホスト11は、例えばビジー信号
がアサートされている場合にはデータを送信できないた
め、周辺機器12がビジーをアサートしている理由を調
べるためにいずれかの送信モードに遷移する(図3のS
34)。ここでニブルモードで転送されたデータの再送
をすることが可能となる。
As shown in FIG. 3, the host 11 converts the data received in the nibble mode into a parity code of a time series parity code in real time for each bit.
(S31 in FIG. 3). The parity generation circuit 113 can be easily realized by an exclusive-OR circuit EXOR and a flip-flop circuit. The host 11 uses the generated parity code in the data line 13 not used in the termination phase of the nibble mode, that is, Data (8...) Shown in the third waveform from the top in FIG.
Drive to the data line of 1). The peripheral device 12 takes in the time-series parity code of the data line 13 at a predetermined timing of one of the event numbers 22, 25, and 28 in FIG. Comparison circuit 124
(S32 in FIG. 3). At that time, the peripheral device 12
When there is a difference in the comparison result, that is, when a time-series parity error occurs, the error is notified to the host 11 via a control line or the like such as immediately generating a busy signal (S33 in FIG. 3). Then, since the host 11 cannot transmit data when, for example, the busy signal is asserted, the host 11 transitions to one of the transmission modes to check the reason why the peripheral device 12 is asserting busy (S in FIG. 3).
34). Here, it is possible to retransmit the data transferred in the nibble mode.

【0023】IEEE1248規格のニブルモードに
は、周辺機器からホストへのデータの送信において、そ
の送信データに対するバリティ符号をデータに付随させ
たフォーマットで一緒に周辺機器からホストへ伝送し、
ホストでのパリティチェックを可能とする機能が用意さ
れていない。また、パリティチェックのためにパリティ
符号をデータに付随させて転送するよう機能を拡張しよ
うとしてもニブルモードの規格には、利用可能な空いた
チャネルや制御線がない。一方、ニブルモードでのデー
タ送信が終わり、ターミネーションフェイズを経てコン
パチブルモードに遷移するとき、ターミネーションフェ
ィズおよびコンパチブルモードのいずれにもホストから
周辺機器の方向へのデータ転送可能な空きのデータチャ
ネルが存在する。本実施例1では符号誤りのチェック機
能をIEEE1248規格を変えることなく追加するた
めに、送信データのパリティ符号を、ホスト側で生成
し、ターミネーションフェィズおよびコンパチブルモー
ドの利用可能なデータチャネルの予め定めたタイミング
で周辺機器に送り、周辺機器においてパリティチェック
を行うようにした。
In the nibble mode of the IEEE 1248 standard, when data is transmitted from the peripheral device to the host, a parity code for the transmitted data is transmitted together with the data in a format attached to the data from the peripheral device to the host,
There is no function that enables parity check on the host. Further, even if an attempt is made to extend the function of transferring a parity code to data for parity checking, the nibble mode standard has no available channels or control lines. On the other hand, when data transmission in nibble mode is completed and transition to compatible mode is performed after the termination phase, there is a free data channel in both the termination phase and the compatible mode that can transfer data from the host to the peripheral device. I do. In the first embodiment, in order to add a code error check function without changing the IEEE 1248 standard, a parity code of transmission data is generated on the host side, and a termination phase and a usable data channel in a compatible mode are determined in advance. At the same time, it is sent to the peripheral device, and the parity check is performed in the peripheral device.

【0024】以上のように、本実施例1では、IEEE
1284規格を変えることなく、パリティチェックに必
要な送信後のデータのパリティ符号を送信元である周辺
機器に送り、周面機器側でニブルモードでの転送データ
の符号誤りをチェックすることかできるようにしたの
で、ニブルモードにおける周辺機器からホストへの転送
データの信頼性を向上することができる。
As described above, in the first embodiment, the IEEE
Without changing the 1284 standard, a parity code of data after transmission necessary for parity check is sent to a peripheral device which is a transmission source, so that a peripheral device side can check a code error of transfer data in a nibble mode. Therefore, the reliability of data transferred from the peripheral device to the host in the nibble mode can be improved.

【0025】[0025]

【実施例2】実施例2はIEEE1284の転送モード
1つであるバイトモードに準拠したデータ転送システム
に本発明を適用してなるものである。バイトモードは、
データおよび制御/ステータスライン用の8データライ
ンを用いて、バイト幅で周辺機器からホストへ非同期で
通信する動作モードである。
Embodiment 2 In Embodiment 2, the present invention is applied to a data transfer system conforming to a byte mode, which is one of the transfer modes of IEEE1284. Byte mode is
This is an operation mode in which communication is performed asynchronously from a peripheral device to a host in a byte width using eight data lines for data and control / status lines.

【0026】図5は、ホスト51と周辺機器52のデー
タ転送系の概略を示す図である。ホスト51と周辺機器
52とは双方向データパス53もしくは単方向制御信号
線541〜543で接続されている。ホスト51は、受
信部511、送信部512の外に、受信したデータの水
平パリティ符号すなわち受信したデータの各ビットにつ
いての時系列パリティ符号を生成する水平パリティ生成
回路513と、受信部511で受信したデータの垂直パ
リティ符号すなわち各バイトごとのパリティ符号を生成
する垂直パリティ生成回路514と、その垂直パリティ
生成回路514で生成された垂直パリティ符号と周辺機
器の垂直パリティ生成回路525で生成され送信されホ
スト51の受信部511で受信した垂直パリティ符号を
比較する垂直パリティ比較回路515とを備えている。
FIG. 5 is a diagram schematically showing a data transfer system between the host 51 and the peripheral device 52. The host 51 and the peripheral device 52 are connected by a bidirectional data path 53 or unidirectional control signal lines 541 to 543. The host 51 includes a horizontal parity generation circuit 513 that generates a horizontal parity code of received data, that is, a time-sequence parity code for each bit of the received data, in addition to the reception unit 511 and the transmission unit 512. A vertical parity generation circuit 514 that generates a vertical parity code of the data obtained, that is, a parity code for each byte, and a vertical parity generation circuit 525 of the peripheral device and a vertical parity code generated by the vertical parity generation circuit 514 and transmitted. A vertical parity comparison circuit 515 that compares the vertical parity codes received by the reception unit 511 of the host 51 is provided.

【0027】周辺機器52は、ホスト51から送信され
た水平パリティ符号を保持する受信バッファを有する受
信部521と、送信データや垂直パリティ符号を送信す
る送信部522と、送信するデータの水平パリティ符号
を生成し、保持する水平パリティ生成回路523と、水
平パリティ符号を比較する水平パリティ比較回路524
と、8ビットデータに対する垂直パリティ符号を生成す
る垂直パリティ生成回路525とを備えている。
The peripheral device 52 includes a reception unit 521 having a reception buffer for holding a horizontal parity code transmitted from the host 51, a transmission unit 522 for transmitting transmission data and a vertical parity code, and a horizontal parity code for transmission data. And a horizontal parity comparison circuit 524 that compares and generates a horizontal parity code.
And a vertical parity generation circuit 525 for generating a vertical parity code for 8-bit data.

【0028】図6は、バイトモードで周辺機器52から
ホスト51へ、データと周辺機器52で生成した垂直パ
リティ符号を転送し、ホスト51の垂直パリティ比較回
路515で垂直パリティ符号をチェックし、比較の結果
一致しないときに再送要求するまでの概略フロー図であ
る。ここで垂直パリティチェックの例を偶数パリティチ
ェックとしているが、奇数パリティチェックでもかまわ
ない。
FIG. 6 shows the transfer of the data and the vertical parity code generated by the peripheral device 52 from the peripheral device 52 to the host 51 in the byte mode, and the vertical parity comparison circuit 515 of the host 51 checks and compares the vertical parity code. FIG. 7 is a schematic flow chart until a retransmission request is made when the result does not match. Here, an example of the vertical parity check is an even parity check, but an odd parity check may be used.

【0029】図7は、バイトモードで周辺機器52から
ホスト51にデータを転送し、ホスト51の水平パリテ
ィ生成回路513で水平パリティ符号を生成し、周辺機
器52のパリティ比較回路524で水平パリティ符号を
チェックし、再送要求するまでの概略フロー図である。
ここで水平パリティチェックの例を偶数パリティチェッ
クとしているが、奇数パリティチェックでもかまわな
い。
FIG. 7 shows a case where data is transferred from the peripheral device 52 to the host 51 in the byte mode, a horizontal parity code is generated by the horizontal parity generation circuit 513 of the host 51, and the horizontal parity code is generated by the parity comparison circuit 524 of the peripheral device 52. FIG. 7 is a schematic flow chart showing a process up to checking for a retransmission request.
Here, an example of the horizontal parity check is an even parity check, but an odd parity check may be used.

【0030】以下、IEEE1284規格に沿って実施
例2の動作を説明する。ホスト51は周辺機器52から
データ(データ、ステータス等)を受信するためにコン
パチブルモードからバイトモードにネゴシエーションフ
ェイズを通して遷移する。周辺機器52はこれに対応し
バイトモードでデータを送信する。ここで周辺機器52
はバイトモードで送信するデータの垂直パリティを垂直
パリティ生成回路525で生成する(図6のS61)。
なお、この垂直パリティ生成回路525はイクスクルシ
ーブオア回路(EXOR)とフリップフロップで簡単に
実現できる。周辺機器52で生成された垂直パリティ符
号は、Xflagと名付けられた信号線541を介して
ホスト51ヘ送信される。また、受信データの垂直パリ
ティを垂直パリティ生成回路514で生成する。周辺機
器52から受信した垂直パリティとパリティ生成回路5
14で生成した垂直パリティをホスト51にある垂直パ
リティ比較回路515で比較する(図6のS62)。ホ
スト51は比較結果に差異があるときには、すなわち垂
直方向のパリティエラーが生じたときには、直ちに信号
を生起し、niniと名付けられた信号線542を介し
て周辺機器52にデータ再送を要求する。周辺機器52
はデータ転送要求を受けデータをデータバス53を介し
て再送する(図6のS63)。そしてホスト51はデー
タ受信が終了するとターミネーションフェイズを経てコ
ンパチブルモードに戻る。
The operation of the second embodiment will be described below in accordance with the IEEE 1284 standard. The host 51 transitions from the compatible mode to the byte mode through the negotiation phase in order to receive data (data, status, etc.) from the peripheral device 52. The peripheral device 52 transmits data in the byte mode in response. Here, the peripheral device 52
Generates a vertical parity of data transmitted in the byte mode by the vertical parity generation circuit 525 (S61 in FIG. 6).
The vertical parity generation circuit 525 can be easily realized by an exclusive-OR circuit (EXOR) and a flip-flop. The vertical parity code generated by the peripheral device 52 is transmitted to the host 51 via a signal line 541 named Xflag. The vertical parity generation circuit 514 generates a vertical parity of the received data. Vertical parity and parity generation circuit 5 received from peripheral device 52
The vertical parity generated in 14 is compared by the vertical parity comparison circuit 515 in the host 51 (S62 in FIG. 6). When there is a difference in the comparison result, that is, when a parity error in the vertical direction occurs, the host 51 immediately generates a signal and requests the peripheral device 52 to retransmit data via the signal line 542 named nini. Peripheral device 52
Receives the data transfer request and retransmits the data via the data bus 53 (S63 in FIG. 6). Then, when the data reception is completed, the host 51 returns to the compatible mode via the termination phase.

【0031】本実施例2では、垂直パリティチックに併
せて水平パリティチェックをも行う。図7は水平パリテ
ィチェックを行う場合の処理フローを示すものである。
ホスト51はバイトモードで受信したデータの各ビット
ごとの水平パリティ符号を水平パリティ生成回路513
で生成する(図7のS71)。なお、この水平パリティ
生成回路513はEXORとフリップフロップで簡単に
実現できる。
In the second embodiment, a horizontal parity check is also performed in addition to a vertical parity tick. FIG. 7 shows a processing flow when a horizontal parity check is performed.
The host 51 converts the horizontal parity code for each bit of the data received in the byte mode into a horizontal parity generation circuit 513.
(S71 in FIG. 7). Note that the horizontal parity generation circuit 513 can be easily realized by an EXOR and a flip-flop.

【0032】ホスト51は、この水平パリティ符号を
(保持し)ターミネーションフェイズで使用していない
データバス53にドライブする。周辺機器52は水平パ
リティ比較回路524で自ら送信したデータの水平パリ
ティ符号と比較する(図7のS72)。周辺機器52は
その際、比較結果に差異があるときには、すなわち水平
方向のパリティエラーが生じたときには、直ちにビジー
信号を生起するなど制御線543等でホスト51にエラ
ーを通知する(図7のS73)。そしてホスト51は、
例えばビシー信号がアサートされている場合にはデータ
を送信できないため、周辺機器がビシーをアサートして
いる理由を調べるためにいずれかの送信モードに遷移す
る(図7のS74)。ここでバイトモードで転送された
データの再送が可能となる。
The host 51 drives (holds) this horizontal parity code to the data bus 53 which is not used in the termination phase. The peripheral device 52 compares the data transmitted by itself with the horizontal parity code in the horizontal parity comparison circuit 524 (S72 in FIG. 7). At this time, when there is a difference in the comparison result, that is, when a horizontal parity error occurs, the peripheral device 52 notifies the host 51 of the error through the control line 543 or the like such as immediately generating a busy signal (S73 in FIG. 7). ). And the host 51
For example, if the Vichy signal is asserted, data cannot be transmitted, so that the device transitions to one of the transmission modes to check the reason why the peripheral device is asserting Vichy (S74 in FIG. 7). Here, the data transferred in the byte mode can be retransmitted.

【0033】IEEE1248規格のバイトモードに
は、周辺機器からホストへのデータの送信において、そ
の送信データに対するパリティ符号をデータに付随させ
て一緒に周辺機器からホストへ転送し、転送先のホスト
でのパリティチェックを可能とする機能が用意されてい
ない。また、パリティチェックのために水平パリティ符
号をデータに付随させて転送するよう機能を拡張しよう
としてもバイトモードの規格には、パリティ符号をデー
タに付加するデータに対応しておらず、また、利用可能
な空いたチャネルや制御線がない。一方、バイトモード
でのデータ送信が終わり、ターミネーションフェイズを
経てコンパチブルモードに遷移するとき、ターミネーシ
ョンフェィズおよびコンパチブルモードのいずれにもホ
ストから周辺機器の方向へのデータ転送可能な空きのデ
ータチャネルが存在する。本実施例2では符号誤りのチ
ェック機能をIEEE1248規格を変えることなく追
加するために、送信データの水平パリティ符号を、ホス
ト側で生成し、ターミネーションフェィズおよびコンパ
チブルモードにおける利用可能な空きのデータチャネル
の予め定めたタイミング位置で周辺機器に送ることによ
り、周辺機器において水平パリティチェックを行うこと
を可能にした。また、垂直パリティに関しては、バイト
モードの制御線Xflagが利用可能である。従って、
本実施例2では、バイトモードにおいて垂直パリティ符
号を周辺機器で生成してホスト側に送り、ホスト側で垂
直パリティチェックを行うよう機能拡張ができる。以上
述べたように、この実施例2によれば、1EEE128
4規格から逸脱することなくバイトモードにおける周辺
機器からホストヘのデータ転送の信頼性を向上させるこ
とができる。また、垂直パリティチェックと水平パリテ
ィチェックを併用することにより、より一層のデータ転
送の信頼性を向上することができる。
In the byte mode of the IEEE 1248 standard, when data is transmitted from the peripheral device to the host, a parity code for the transmitted data is attached to the data and transferred together from the peripheral device to the host. Function to enable parity check is not provided. Also, even if an attempt is made to extend the function of transferring a horizontal parity code to data for parity checking, the byte mode standard does not support data that adds a parity code to data. There are no available free channels or control lines. On the other hand, when data transmission in the byte mode is completed and transition to the compatible mode is performed after the termination phase, there is an empty data channel in both the termination phase and the compatible mode that can transfer data from the host to the peripheral device. I do. In the second embodiment, in order to add a code error checking function without changing the IEEE 1248 standard, a horizontal parity code of transmission data is generated on the host side, and an available data channel in the termination phase and the compatible mode is used. By transmitting to a peripheral device at a predetermined timing position, the peripheral device can perform a horizontal parity check. As for the vertical parity, the control line Xflag in the byte mode can be used. Therefore,
In the second embodiment, in the byte mode, the function can be extended so that a vertical parity code is generated by a peripheral device and sent to the host, and the host performs a vertical parity check. As described above, according to the second embodiment, 1EE128
The reliability of data transfer from the peripheral device to the host in the byte mode can be improved without departing from the 4 standards. Further, by using the vertical parity check and the horizontal parity check together, the reliability of data transfer can be further improved.

【0034】[0034]

【実施例3】実施例1はIEEE1284の転送モード
1つであるECPモードによるデータ転送に本発明を適
用してなるものである。ECPモードは、図2の一部に
概略を示すように、ネゴシエーションフェーズからフォ
ワードフェーズに遷移し、ホストから周辺機器へのデー
タ転送を行う。リバース転送へはフォワードフェイズか
ら遷移し、周辺機器からホストへのデータ転送を行う。
これらの各データの転送終了後はフォワードフェイズに
遷移した後、ターミネーションフェーズを経てコンパチ
ブルモードへ戻る。
Third Embodiment In the first embodiment, the present invention is applied to data transfer in the ECP mode, which is one of the transfer modes of IEEE1284. In the ECP mode, as schematically shown in a part of FIG. 2, a transition is made from the negotiation phase to the forward phase, and data transfer from the host to the peripheral device is performed. Transition from the forward phase to the reverse transfer is performed, and data transfer from the peripheral device to the host is performed.
After the transfer of each of these data is completed, the mode transits to the forward phase, and then returns to the compatible mode via the termination phase.

【0035】図8は、そのECPモ−ド・フォワ−ドフ
ェイズ時のホスト81から周辺機器82へのデ−タ転送
系の概略図で、ホスト81と周辺機器82は半二重の双
方向デ−タバス83および制御線84で接続されてい
る。ホスト81は、送信バッファを持つ送信部811
と、ECPモ−ド・フォワ−ドフェイズで周辺機器82
に送信した全てのデ−タの時系列パリティ符号を生成、
保持するパリティ生成回路812と、周辺機器82から
リバ−スフェイズ、又はタ−ミネ−ションフェイズに送
信する時系列パリティ符号と前記パリティ生成回路81
2に保持している時系列パリティ符号の比較を行うパリ
ティ比較回路813と、受信バッファを持ち周辺機器8
2から送られてくる信号を受信する機能を持つ受信部8
14とを備えている。また、パリティ比較回路813に
よる時系列パリティ符号の比較結果が1ビットでも異な
っていた場合に、ホスト81は再度ECPモ−ド・フォ
ワ−ドフェイズに遷移するとともに周辺機器に再送通知
し、誤り該当デ−タを再送する機能を有しており、これ
により符号誤りのあるデ−タの訂正をすることができる
FIG. 8 is a schematic diagram of a data transfer system from the host 81 to the peripheral device 82 during the ECP mode forward phase. The host 81 and the peripheral device 82 are half-duplex bidirectional data. Connected by a tabus 83 and a control line 84. The host 81 includes a transmission unit 811 having a transmission buffer.
And peripheral devices 82 in the ECP mode forward phase.
Generates a time-series parity code for all data transmitted to
A parity generation circuit 812 to be held, a time-series parity code transmitted from the peripheral device 82 in a reverse phase or a termination phase, and the parity generation circuit 81
2, a parity comparison circuit 813 for comparing the time-series parity codes held in the peripheral device 8 and a peripheral device 8 having a reception buffer.
Receiving section 8 having a function of receiving a signal sent from
14 is provided. If the comparison result of the time-sequence parity code by the parity comparison circuit 813 differs even by one bit, the host 81 transits to the ECP mode forward phase again, notifies the peripheral device of retransmission, and notifies the corresponding device of the error. Has a function of retransmitting data, whereby data having a code error can be corrected.

【0036】周辺機器82は、データバス83を介して
ホスト81から送られてくる信号の受信を行う受信部8
21と、ECPモ−ドにネゴシエ−ションしフォワ−ド
・フェイズに遷移してからリバ−ス・フェイズ、又はコ
ンパチブルモ−ドにタ−ミネ−ションするまでに受信部
821で受信した8ビットデ−タの各ビットについての
時系列パリティ符号を生成するパリティ生成回路822
と、ホスト81へ信号の送信を行う送信部823とを備
えている。
The peripheral device 82 receives a signal transmitted from the host 81 via the data bus 83.
21 and the 8-bit data received by the receiving unit 821 from the negotiation to the ECP mode and the transition to the forward phase to the termination to the reverse phase or the compatible mode. Parity generating circuit 822 for generating a time-series parity code for each bit of the data
And a transmission unit 823 that transmits a signal to the host 81.

【0037】図9および図10は、ECPモ−ド・フォ
ワ−ドフェイズにてホスト81から周辺機器82にデ−
タを転送し、周辺機器82でのパリティ符号生成、ホス
ト81でのパリティチェック、再送通知、再送するまで
の概略フロ−図である。ここではパリティチェックの例
を偶数パリティとしているが、予め決めたフォ−マット
であればパリティにこだわる必要はない。
FIGS. 9 and 10 show data from the host 81 to the peripheral device 82 in the ECP mode forward phase.
FIG. 7 is a schematic flow chart showing a process of transferring data, generating a parity code in a peripheral device 82, a parity check in a host 81, a retransmission notification, and retransmission. Here, an example of the parity check is an even parity, but it is not necessary to stick to the parity if the format is a predetermined format.

【0038】図11は、IEEE1284のECPモ−
ド・リバ−スフェイズ時の周辺機器82からホスト81
へのデ−タ転送系の概略図である。なお、図8と同じ要
素には同じ参照数字を付している。ホスト81と周辺機
器82は半二重の双方向デ−タバス83および制御線8
4で接続されている。ホスト81は、受信バッファを持
つ受信部814と、ECPモ−ドにネゴシエ−ションし
リバ−スフェイズに遷移してからフォワ−ドフェイズに
遷移するまでにホスト81の受信部814が受信した8
ビットデ−タの各ビットについての時系列パリティ符号
を生成するパリティ生成回路815と、そのパリティ生
成回路815によって生成された時系列パリティ符号を
フォワ−ド・フェイズに遷移した際に使用していないデ
−タラインにドライブし周辺機器82に送信する機能を
持つ送信部811とを備えている。
FIG. 11 shows an ECP mode of IEEE1284.
Peripheral device 82 to host 81 during de-river phase
FIG. 2 is a schematic diagram of a data transfer system to the system. The same elements as those in FIG. 8 are denoted by the same reference numerals. The host 81 and the peripheral device 82 are connected to a half-duplex bidirectional data bus 83 and a control line 8.
4 are connected. The host 81 has a receiving unit 814 having a receiving buffer, and the receiving unit 814 of the host 81 which has negotiated the ECP mode and transits to the reverse phase until transits to the forward phase.
A parity generation circuit 815 that generates a time-series parity code for each bit of the bit data, and data that is not used when the time-series parity code generated by the parity generation circuit 815 transits to the forward phase. And a transmitting unit 811 having a function of driving to the peripheral line and transmitting to the peripheral device 82.

【0039】周辺機器82は、送信バッファを持つ送信
部823と、ECPモ−ド・リバ−スフェイズでホスト
81に送信した全てのデ−タの時系列パリティ符号を生
成、保持するバリティ生成回路824と、ホスト81か
らフォワ−ドフェイズに受信する時系列パリティ符号と
前記パリティ生成回路824に保持している時系列パリ
ティ符号の比較を行うパリティ比較回路825と、ホス
ト81からのパリティ符号を受信する受信部821とを
備えている。当該時系列パリティ符号の比較結果が1ビ
ットでも異なっていた場合に、周辺機器82は、ホスト
81に対して未使用信号をアサ−トし、誤り検出結果に
誤りがあることをホスト81に通知し、その誤りを再送
する機能を有する。これによりデ−タの誤りの訂正をす
ることができる。
The peripheral device 82 has a transmission unit 823 having a transmission buffer, and a parity generation circuit 824 for generating and holding a time-series parity code of all data transmitted to the host 81 in the ECP mode reverse phase. A parity comparison circuit 825 for comparing a time-sequence parity code received from the host 81 in the forward phase with the time-sequence parity code held in the parity generation circuit 824; and a reception for receiving a parity code from the host 81. 821. If the comparison result of the time-sequence parity code is different even by one bit, the peripheral device 82 asserts an unused signal to the host 81 and notifies the host 81 that the error detection result has an error. And has a function of retransmitting the error. As a result, data errors can be corrected.

【0040】図12は、ECPモ−ド・リバ−スフェイ
ズにて周辺機器82からホスト81にデ−タを転送し、
ホスト81でのパリティ生成、周辺機器82でのパリテ
ィチェック、再送通知、再送するまでの概略フロ−図で
ある。ここではパリティチェックの例を偶数パリティと
しているが、予め決めたフォ−マットであればパリティ
にこだわる必要はない。
FIG. 12 shows that data is transferred from the peripheral device 82 to the host 81 in the ECP mode reverse phase.
FIG. 7 is a schematic flow chart showing parity generation in a host 81, parity check in a peripheral device 82, retransmission notification, and retransmission. Here, an example of the parity check is an even parity, but it is not necessary to stick to the parity if the format is a predetermined format.

【0041】図13および図14は、ECPモ−ドから
タ−ミネ−ションするときにホスト又は周辺機器が各ビ
ットの時系列のパリティを、周辺機器又はホストに送信
する詳細なタイミングチャ−トである。なお、図13、
図14のイベント番号および信号名はIEEE1284
の規格書と同一のものである。また、同図においてTL
は周辺機器の応答期間、THはホストの応答期間であ
る。
FIGS. 13 and 14 are detailed timing charts in which the host or the peripheral device transmits the time series parity of each bit to the peripheral device or the host when terminating from the ECP mode. It is. Note that FIG.
The event number and signal name in FIG.
It is the same as the standard. Also, in FIG.
Is a response period of the peripheral device, and TH is a response period of the host.

【0042】以下、上述の各図面を用いてIEEE12
84規格に沿って実施例3の動作フロ−を説明する。
Hereinafter, the IEEE 12 standard will be described with reference to the drawings described above.
The operation flow of the third embodiment will be described according to the 84 standard.

【0043】(ECPモード・フォワード・フェーズで
の符号誤りの検出、訂正)ホスト81は、周辺機器82
へ情報(デ−タ、ステ−タス)を送信するためにコンパ
チブルモ−ドからECPモ−ド・フォワ−ドフェイズに
ネゴシエ−ションフェイズを通して遷移する。ホスト8
1はこれに対応しECPモ−ド・フォワ−ドフェイズで
デ−タを送信する。デ−タ送信が終了するとホスト81
は周辺機器82から情報(デ−タ、ステ−タス)を受信
したい場合はECPモ−ド・フォワ−ド・フェイズから
フォワ−ド・ツ−・リバ−ス・フェイズを経てECPモ
−ド・リバ−スフェイズに遷移し、これ以外はタ−ミネ
−ションフェイズをへてコンパチブルモ−ドに戻る。E
CPモ−ド・フォワ−ド・フェイズでの誤りはECPモ
−ド・リバ−スフェイズ又はタ−ミネ−ションフェイズ
に状態遷移する時に行なう。ここで周辺機器82はEC
Pモ−ド・フォワ−ドフェイズで受信したデ−タを各ビ
ットごとにリアルタイムで時系列のパリティ符号をパリ
ティ生成回路822で生成し、保持する(図9のS9
1)。なお、このパリティ生成回路822はEXORと
フリップフロップで簡単に実現できる。
(Detection and Correction of Code Error in ECP Mode Forward Phase)
In order to transmit information (data and status) to the EPC mode, a transition is made from the compatible mode to the ECP mode forward phase through the negotiation phase. Host 8
No. 1 responds to this and transmits data in the ECP mode forward phase. When the data transmission is completed, the host 81
When information (data, status) is to be received from the peripheral device 82, the ECP mode is switched from the ECP mode forward phase to the ECP mode via the forward-to-reverse phase. The state transits to the reverse phase, and otherwise returns to the compatible mode through the termination phase. E
An error in the CP mode forward phase is made when the state transits to the ECP mode reverse phase or the termination phase. Here, the peripheral device 82 is EC
The data received in the P mode forward phase is generated by a parity generation circuit 822 in real time for each bit and a time series parity code is generated and held (S9 in FIG. 9).
1). Note that this parity generation circuit 822 can be easily realized by an EXOR and a flip-flop.

【0044】まず、図9に示すように、ECPモ−ド・
フォワ−ドフェイズからECPモ−ド・リバ−スフェイ
ズに遷移する時には、周辺機器82はこのパリティ生成
回路822で生成し保持しているパリティ符号をフォワ
−ド・ツ−・リバ−ス・フェイズで使用していないデ−
タライン83にドライブする。ホスト81は例えばイベ
ント40(図14)のタイミングでデ−タライン83の
時系列のパリティ符号を取り込み、自ら送信したデ−タ
に対する時系列のパリティ符号とパリティ比較回路81
3で比較する(図9のS92)。ホスト81はその際、
比較結果に差異があるときには、すなわち時系列のパリ
ティエラ−が生じたときには、周辺機器82に未使用線
(HostClk:L)で再送通知する(図9のS9
3)とともに再度ECPモ−ド・フォワ−ド・フェイズ
に遷移(nReverseRequest:H)し(図
9のS94〜95)デ−タを再送する(図9のS9
6)。
First, as shown in FIG. 9, the ECP mode
At the time of transition from the forward phase to the ECP mode reverse phase, the peripheral device 82 uses the parity code generated and held by the parity generation circuit 822 in the forward-to-reverse phase. Data not done
Drive to taline 83. The host 81 fetches the time-series parity code of the data line 83 at the timing of the event 40 (FIG. 14), and the time-series parity code and the parity comparison circuit 81 for the data transmitted by itself.
3 (S92 in FIG. 9). At that time, the host 81
When there is a difference in the comparison result, that is, when a time-series parity error occurs, the peripheral device 82 is notified of retransmission by an unused line (HostClk: L) (S9 in FIG. 9).
At the same time as 3), the state transits again to the ECP mode forward phase (nReverseRequest: H) (S94 to 95 in FIG. 9) and the data is retransmitted (S9 in FIG. 9).
6).

【0045】次に、ECPモ−ド・フォワ−ドフェイズ
からタ−ミネ−ションフェイズに遷移する時には、周辺
機器82はこのパリティ符号を(保持し)タ−ミネ−シ
ョンフェイズで使用していないデ−タライン83にドラ
イブする。ホスト81は、これを受信部814で受信
し、例えばイベント23、24、27のいずれかを予め
決めたタイミングでデ−タライン83の時系列のパリテ
ィ符号を取り込み、自ら送信したデ−タの時系列のパリ
ティ符号とをパリティ比較回路813で比較する(図1
0のS102)。ホスト81はその際、比較結果に差異
があるときには、すなわち時系列のパリティエラ−が生
じたときには、コンパチブル・モ−ドから再度ECPモ
−ド・フォワ−ドフェイズに遷移し(図10のS104
〜105)、周辺機器82に未使用線(nCmd)で再
送通知し(図10のS106)、誤りビット該当データ
をバイト単位で再送する(図10のS106)。
Next, at the time of transition from the ECP mode forward phase to the termination phase, the peripheral device 82 (holds) the parity code which is not used in the termination phase. -Drive to taline 83. The host 81 receives this at the receiving unit 814, and fetches a time-sequence parity code of the data line 83 at a predetermined timing, for example, any of the events 23, 24, and 27. The parity code of the stream is compared with the parity code of the stream (FIG. 1).
0 of S102). At this time, when there is a difference in the comparison result, that is, when a time-series parity error occurs, the host 81 transitions from the compatible mode to the ECP mode forward phase again (S104 in FIG. 10).
105), the peripheral device 82 is notified of retransmission by an unused line (nCmd) (S106 in FIG. 10), and retransmits the data corresponding to the error bit in byte units (S106 in FIG. 10).

【0046】(ECPモード・リバース・フェーズでの
符号誤りの検出、訂正)図10のECPモード・リバー
スフェーズのデータ転送系において、ホスト81は周辺
機器82から情報(デ−タ、ステ−タス)を受信するた
めにコンパチブルモ−ドからECPモ−ド・リバ−スフ
ェイズにネゴシエ−ションフェイズを通して遷移する。
周辺機器82はこれに対応しECPモ−ド・リバ−スフ
ェイズでデ−タを送信する。デ−タ送信が終了するとホ
スト81は周辺機器82に情報(デ−タ・ステ−タス)
を送信したい場合はECPモ−ド・リバ−スフェイズか
らリバ−ス・ツ−・フォワ−ドフェイズを経てECPモ
−ド・フォワ−ドフェイズに遷移し、これ以外はタ−ミ
ネ−ションフェイズを経てコンパチブルモ−ドに戻る。
ECPモ−ド・リバ−スフェイズでの誤り検出はECP
モ−ド・フォワ−ドフェイズに状態遷移する時に行な
う。
(Detection and Correction of Code Error in ECP Mode Reverse Phase) In the data transfer system in the ECP mode reverse phase in FIG. 10, the host 81 sends information (data, status) from the peripheral device 82. From the compatible mode to the ECP mode reverse phase through the negotiation phase in order to receive.
In response to this, the peripheral device 82 transmits data in the ECP mode reverse phase. When the data transmission is completed, the host 81 sends information (data status) to the peripheral device 82.
If it is desired to transmit an ECP mode, a transition is made from the ECP mode reverse phase to the ECP mode forward phase via the reverse to forward phase, and otherwise, it is compatible via the termination phase. Return to mode.
Error detection in ECP mode reverse phase is ECP
This is performed when the state transitions to the mode forward phase.

【0047】ここでホスト81はリアルタイムで時系列
のパリティ符号をパリティ生成回路815で生成する
(図12のS121)。なお、このパリティ生成回路8
15はEXORとフィリップフロップで簡単に実現でき
る。
Here, the host 81 generates a time-series parity code in real time by the parity generation circuit 815 (S121 in FIG. 12). The parity generation circuit 8
15 can be easily realized by EXOR and Philip flop.

【0048】まず、ECPモ−ド・リバ−スフェイズか
らECPモ−ド・フォワ−ド・フェイズに遷移する時に
は、ホスト81はこのパリティ符号を(保持し)リバ−
ス・ツ−・フォア−ド・フェイズで使用していないデ−
タライン83にドライブする。周辺機器82は例えばイ
ベント49(図14参照)のタイミングでデ−タライン
83の時系列のパリティ符号を取り込み、自ら送信した
デ−タの時系列のパリティ符号とをパリティ比較回路8
25で比較する(図12のS122)。周辺機器82は
その際、比較結果に差異があるときには、すなわち時系
列のパリティエラ−が生じたときには、ホスト81に未
使用線(periphClk:L)で再送通知する(図
12のS123)。ホスト81は、nReverseR
equest信号(図14)をLにすることにより(図
12のS124)再度ECPモ−ド・リバ−スフェイズ
に遷移し(図12のS125)、誤りビット該当データ
をバイト単位で再送する(図12のS126)。
First, when a transition is made from the ECP mode reverse phase to the ECP mode forward phase, the host 81 reverses (holds) this parity code.
Data not used in the tour-to-forward phase
Drive to taline 83. The peripheral device 82 fetches the time-series parity code of the data line 83 at the timing of the event 49 (see FIG. 14) and compares the time-series parity code of the data transmitted by itself with the parity comparison circuit 8.
A comparison is made at 25 (S122 in FIG. 12). At this time, when there is a difference in the comparison result, that is, when a time-sequence parity error occurs, the peripheral device 82 notifies the host 81 of retransmission via an unused line (periphClk: L) (S123 in FIG. 12). Host 81 uses nReverseR
By changing the request signal (FIG. 14) to L (S124 in FIG. 12), transition to the ECP mode reverse phase is again made (S125 in FIG. 12), and the data corresponding to the error bit is retransmitted in byte units (FIG. 12). S126).

【0049】以上述べたように、この実施例3によれ
ば、IEEE1284規格を変えることなく、ECPモ
−ド・フォワ−ドフェイズにおけるホストから周辺機器
へ、又はECPモ−ド・リバ−スフェイズにおける周辺
機器からホストへの転送デ−タの信頼性を向上させるこ
とができる。なお、垂直パリティチェックについては説
明しなかったが、図5のバイトモードにおける垂直パリ
ティチェックと同様に実施例3においても垂直パリティ
チェックを付加することができる。
As described above, according to the third embodiment, from the host to the peripheral device in the ECP mode forward phase or the peripheral device in the ECP mode reverse phase without changing the IEEE1284 standard. The reliability of data transferred from the device to the host can be improved. Although the vertical parity check has not been described, the vertical parity check can be added in the third embodiment as well as the vertical parity check in the byte mode in FIG.

【0050】なお、以上の各実施例により本発明をIE
EE1284規格に準拠したデータ転送方式に適用した
例を示したが、本発明は、一般的には誤り検出機能を定
義していないデータ転送方式を機能拡張して誤り検出機
能を付加する際に広く適用できるものである。
It should be noted that the present invention is based on the above-described embodiments.
Although an example in which the present invention is applied to a data transfer method conforming to the EE1284 standard has been described, the present invention is generally applicable to a case where the data transfer method which does not define an error detection function is extended to add an error detection function. Applicable.

【0051】[0051]

【発明の効果】本発明(請求項1)によれば、第1の装
置から第2の装置へは第1のフェーズにおいてデータの
みを送信し、誤り符号の生成は第2の装置側で行い、第
2の装置から第1の装置への第2のフェーズを利用して
これを第1の装置へ送信し、第1の装置側で誤りチェッ
クを行うように構成したので、誤り検出機能について定
義をしていない特定の通信規格に準拠して転送方式を構
築しなければならないような場合にも、その通信規格に
則りながらも誤り検出機能を付加するということが可能
となる。従って、第1の装置から第2の装置への送信の
誤りを少なくすることができ、信頼性のあるデータ転送
を行うことができる。
According to the present invention (claim 1), only data is transmitted from the first device to the second device in the first phase, and the error code is generated on the second device side. The second phase from the second apparatus to the first apparatus is transmitted to the first apparatus, and the first apparatus performs an error check. Even when a transfer method must be constructed in accordance with a specific communication standard for which no definition has been made, it is possible to add an error detection function while complying with the communication standard. Therefore, errors in transmission from the first device to the second device can be reduced, and reliable data transfer can be performed.

【0052】また、本発明(請求項2)によれば、上記
発明(請求項1)において比較手段による比較の結果が
一致しなかったとき、第1の装置から第2の装置へ、誤
りが検出されたことを通知するとともに誤りに対応する
データを再送するので、送信の誤りを少なくすることが
でき、信頼性のあるデータ転送を行うことができる。
According to the present invention (claim 2), when the result of the comparison by the comparing means does not match in the above invention (claim 1), an error is sent from the first device to the second device. Since the detection is notified and the data corresponding to the error is retransmitted, transmission errors can be reduced, and reliable data transfer can be performed.

【0053】また、本発明(請求項3)によれば、制御
線を用いて周辺機器からホストへデータを転送する第1
のフェーズでは誤り符号をデータと共に転送することが
できないが、転送データからの誤り符号の生成をホスト
側で行い第2のフェーズにおいてその生成した誤り符号
を周辺機器へ送ることができるので、周辺機器に用意し
た比較回路で送信前のデータの誤り符号と送信後の誤り
符号を比較することができ、誤りの検出が可能となる。
従って、周辺機器からホストへの送信の誤りを少なくす
ることができ、信頼性のあるデータ転送を行うことがで
きる。
According to the present invention (claim 3), the first method for transferring data from a peripheral device to a host using a control line is provided.
In this phase, the error code cannot be transferred together with the data, but the error code can be generated from the transfer data on the host side and the generated error code can be sent to the peripheral device in the second phase. The error code of the data before transmission and the error code after transmission can be compared by the comparison circuit prepared in (1), and the error can be detected.
Therefore, errors in transmission from the peripheral device to the host can be reduced, and reliable data transfer can be performed.

【0054】また、本発明(請求項4)によれば、デー
タ線を用いて周辺機器からホストへデータを転送する第
1のフェーズでは誤り符号をデータと共に転送すること
ができないが、転送データからの誤り符号の生成をホス
ト側で行い第2のフェーズにおいてその生成した誤り符
号を周辺機器へ送ることができるので、周辺機器に用意
した比較回路で送信前のデータの誤り符号と送信後の誤
り符号を比較することができ、誤りの検出が可能とな
る。従って、周辺機器からホストへの送信の誤りを少な
くすることができ、信頼性のあるデータ転送を行うこと
ができる。
According to the present invention (claim 4), the error code cannot be transferred together with the data in the first phase in which the data is transferred from the peripheral device to the host using the data line. In the second phase, the generated error code can be sent to the peripheral device in the second phase, so that the error code of the data before transmission and the error code after transmission are The codes can be compared, and errors can be detected. Therefore, errors in transmission from the peripheral device to the host can be reduced, and reliable data transfer can be performed.

【0055】また、本発明(請求項5)によれば、デー
タ線を用いてホストから周辺機器へデータを転送する第
1のフェーズでは誤り符号をデータと共に転送すること
ができないが、第2のフェーズにおいて周辺機器で生成
した誤り符号をホストへ送ることができるので、送信側
のホストに用意した比較回路で送信前のデータの誤り符
号と送信後の誤り符号を比較することができ、誤りの検
出が可能となる。従って、ホストから周辺機器への送信
の誤りを少なくすることができ、信頼性のあるデータ転
送を行うことができる。
According to the present invention (claim 5), the error code cannot be transferred together with the data in the first phase in which the data is transferred from the host to the peripheral device using the data line. In the phase, the error code generated by the peripheral device can be sent to the host, so that the error code of the data before transmission and the error code after transmission can be compared by the comparison circuit prepared in the host on the transmission side, and the error Detection becomes possible. Therefore, errors in transmission from the host to the peripheral device can be reduced, and reliable data transfer can be performed.

【0056】また、本発明(請求項6)によれば、第1
の誤り符号によるチェック(例えば水平パリティチェッ
ク)と第2の誤り符号によるチェック(例えば垂直パリ
ティチェック)を併用することことができ、より一層の
データ転送の信頼性を向上することができる。
According to the present invention (claim 6), the first
(For example, a horizontal parity check) and a check for a second error code (for example, a vertical parity check) can be used together, and the reliability of data transfer can be further improved.

【図面の簡単な説明】[Brief description of the drawings]

【図1】実施例1のホストと周辺機器のデータ転送系の
概略の構成を示す図。
FIG. 1 is a diagram illustrating a schematic configuration of a data transfer system of a host and peripheral devices according to a first embodiment.

【図2】IEEE1284規格における通信モードの遷
移を説明するための図、
FIG. 2 is a diagram for explaining transition of a communication mode in the IEEE1284 standard;

【図3】本実施例1の動作フロー図。FIG. 3 is an operation flowchart of the first embodiment.

【図4】ニブルモードからターミネーションを経てコン
パチブルモードに戻る詳細なタイミングチャート。
FIG. 4 is a detailed timing chart for returning from a nibble mode to a compatible mode via a termination.

【図5】周辺機器1とホスト2のデータ転送系の概略図FIG. 5 is a schematic diagram of a data transfer system between a peripheral device 1 and a host 2;

【図6】垂直パリティチェックの概略フロー図FIG. 6 is a schematic flowchart of a vertical parity check.

【図7】水平パリティチェックの概略フロー図FIG. 7 is a schematic flowchart of a horizontal parity check.

【図8】ホストから周辺機器へのデ−タ転送系の概略
図。
FIG. 8 is a schematic diagram of a data transfer system from a host to a peripheral device.

【図9】ECPモ−ド・フォワ−ド・フェイズからEC
Pモ−ド・リバ−スフェイズに遷移する際の実施例3の
概略フロ−図。
Fig. 9: EC from ECP mode forward phase
FIG. 13 is a schematic flowchart of a third embodiment when a transition is made to a P-mode reverse phase.

【図10】ECPモ−ド・フォワ−ドフェイズからタ−
ミネ−ションを経てコンパチブルモ−ドに戻る際の実施
例3の概略フロ−図。
FIG. 10: Start from ECP mode forward phase
FIG. 13 is a schematic flowchart of a third embodiment when returning to the compatible mode via mining.

【図11】周辺機器からホストへのデ−タ転送系の概略
図。
FIG. 11 is a schematic diagram of a data transfer system from a peripheral device to a host.

【図12】ECPモ−ド・リバ−スフェイズからECP
モ−ド・フォワ−ドフェイズに遷移する際の実施例の概
略フロ−図。
FIG. 12: ECP from the ECP mode reverse phase
FIG. 4 is a schematic flowchart of an embodiment when a transition is made to a mode forward phase.

【図13】ECPモ−ドからタ−ミネ−ションを経てコ
ンパチブルモ−ドに戻る詳細なタイミングチャ−ト。
FIG. 13 is a detailed timing chart for returning from ECP mode to compatible mode via termination.

【図14】ECPモ−ド・フォワ−ド・フェイズからE
CPモ−ド・リバ−スフェイズに遷移する詳細なタイミ
ングチャ−ト。
FIG. 14: From ECP mode forward phase to E
Detailed timing chart for transition to the CP mode reverse phase.

【符号の説明】[Explanation of symbols]

11,51,81…ホストコンピュータ(ホスト)、1
11,511,814…受信部、112,512,81
1…送信部、113,812…パリティ生成回路、51
3…水平パリティ生成回路、514垂直パリティ生成回
路、515…垂直パリティ比較回路、813…パリティ
比較回路。12,52,82…周辺機器(例、プリン
タ)、121,521,821…受信部、122,52
2,823…送信部、123,824…パリティ生成回
路、523…水平パリティ生成回路、124…パリティ
比較回路、524…水平パリティ比較回路、525…垂
直パリティ生成回路、825…パリティ比較回路。1
3,53,83…デ−タバス(双方向もしくは単方
向)、124…パリティ比較回路。
11, 51, 81: host computer (host), 1
11, 511, 814... Receiving unit, 112, 512, 81
1 ... transmitting unit, 113,812 ... parity generation circuit, 51
Reference numeral 3 denotes a horizontal parity generation circuit, reference numeral 514 denotes a vertical parity generation circuit, reference numeral 515 denotes a vertical parity comparison circuit, and reference numeral 813 denotes a parity comparison circuit. 12, 52, 82 ... peripheral devices (eg, printer), 121, 521, 821 ... receiving units, 122, 52
2,823: a transmission unit; 123, 824: a parity generation circuit; 523, a horizontal parity generation circuit; 124, a parity comparison circuit; 524, a horizontal parity comparison circuit; 525, a vertical parity generation circuit; 1
3, 53, 83: data bus (bidirectional or unidirectional); 124: parity comparison circuit.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 第1の装置から第2の装置へデータ送信
可能な第1のフェーズと第2の装置から第1の装置へデ
ータ送信可能な第2のフェーズとを含むデータ転送方式
において、 第1の装置に、第1のフェーズで送信するデータに関す
る誤り符号を生成する第1の生成手段と、その第1の生
成手段により生成した誤り符号と第2のフェーズに第2
の装置から受信した誤り符号とを比較する比較手段とを
付加し、 第2の装置に、第1のフェーズで受信したデータに関す
る誤り符号を生成する第2の生成手段と、その第2の生
成手段により生成した誤り符号を第2のフェーズに第1
の装置に送信する誤り符号送出手段とを付加したことを
特徴とするデータ転送方式。
1. A data transfer method including a first phase in which data can be transmitted from a first device to a second device and a second phase in which data can be transmitted from the second device to the first device, A first generating means for generating an error code relating to data transmitted in the first phase, and an error code generated by the first generating means and a second
A second generating means for generating an error code relating to data received in the first phase, a second generating means for generating an error code for data received in the first phase; The error code generated by the means is transferred to the second phase in the first phase.
A data transfer method characterized by adding error code transmitting means for transmitting to an apparatus.
【請求項2】前記比較手段による比較の結果一致しなか
ったとき、第1の装置から第2の装置へ、誤りが検出さ
れたことを通知するとともに誤りに対応するデータを再
送することを特徴とする請求項1記載のデータ転送方
式。
2. The method according to claim 1, wherein when the comparison results in no match, the first device notifies the second device that an error has been detected and retransmits data corresponding to the error. The data transfer method according to claim 1, wherein
【請求項3】第1の装置が周辺機器であり、第2の装置
がホストコンピュータであり、第1のフェーズが制御線
を用いて周辺機器のデータをホストコンピュータへ送信
する動作状態であり、第2のフェーズは第1のフェーズ
が終了後に遷移するデータ線を用いてホストコンピュー
タのデータを周辺機器へ送信可能な動作状態であること
を特徴とする請求項1記載のデータ転送方式。
3. The first device is a peripheral device, the second device is a host computer, and the first phase is an operation state of transmitting data of the peripheral device to the host computer using a control line, 2. The data transfer method according to claim 1, wherein the second phase is an operation state in which data of the host computer can be transmitted to the peripheral device using a data line to which a transition is made after the end of the first phase.
【請求項4】第1の装置が周辺機器であり、第2の装置
がホストコンピュータであり、第1のフェーズが双方向
データ線を用いて周辺機器のデータをホストコンピュー
タへ送信する動作状態であり、第2のフェーズは第1の
フェーズが終了後に遷移する双方向データ線を用いてホ
ストコンピュータのデータを周辺機器へ送信可能な動作
状態であることを特徴とする請求項1記載のデータ転送
方式。
4. The first device is a peripheral device, the second device is a host computer, and the first phase is an operation state in which data of the peripheral device is transmitted to the host computer using a bidirectional data line. 2. The data transfer according to claim 1, wherein the second phase is an operation state in which data of the host computer can be transmitted to the peripheral device using a bidirectional data line to which a transition is made after completion of the first phase. method.
【請求項5】第1の装置がホストコンピュータであり、
第2の装置が周辺機器であり、第1のフェーズが双方向
データ線を用いてホストコンピュータのデータを周辺機
器へ送信する動作状態であり、第2のフェーズは第1の
フェーズが終了後に遷移する双方向データ線を用いて周
辺機器のデータをホストコンピュータへ送信可能な動作
状態であることを特徴とする請求項1記載のデータ転送
方式。
5. The first device is a host computer,
The second device is a peripheral device, the first phase is an operation state of transmitting data of the host computer to the peripheral device using the bidirectional data line, and the second phase transits after the first phase ends. 2. The data transfer system according to claim 1, wherein the data transfer system is in an operation state in which data of a peripheral device can be transmitted to a host computer using a bidirectional data line.
【請求項6】第1の装置には、第1のフェーズで送信す
るデータに関する第2の誤り符号を生成する第3の生成
手段と、生成した第2の誤り符号を第1のフェーズで使
用していない制御線により第2の装置にデータと同時に
送信する手段を付加し、 第2の装置には、第1の装置から受信したデータから第
2の誤り符号を生成する第4の生成手段と、その第4の
生成手段により生成した第2の誤り符号と前記制御線を
介して受信した第2の誤り符号とを比較し誤りを検出す
る第2の比較手段とを付加したことを特徴とする請求項
1ないし2、請求項4〜5のいずれか1項記載のデータ
転送方式。
6. A first apparatus comprising: third generating means for generating a second error code relating to data transmitted in a first phase; and using the generated second error code in a first phase. Means for simultaneously transmitting data to the second device through a control line not provided, and a fourth generating means for generating a second error code from data received from the first device in the second device. And a second comparing means for comparing the second error code generated by the fourth generating means with the second error code received via the control line and detecting an error. The data transfer method according to any one of claims 1 to 2, and claims 4 to 5.
JP9222984A 1997-08-06 1997-08-06 Data transfer system Pending JPH1153272A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9222984A JPH1153272A (en) 1997-08-06 1997-08-06 Data transfer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9222984A JPH1153272A (en) 1997-08-06 1997-08-06 Data transfer system

Publications (1)

Publication Number Publication Date
JPH1153272A true JPH1153272A (en) 1999-02-26

Family

ID=16790985

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9222984A Pending JPH1153272A (en) 1997-08-06 1997-08-06 Data transfer system

Country Status (1)

Country Link
JP (1) JPH1153272A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009088313A (en) * 2007-10-01 2009-04-23 Nuflare Technology Inc Charged particle beam lithography apparatus, and verifying method of lithography data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009088313A (en) * 2007-10-01 2009-04-23 Nuflare Technology Inc Charged particle beam lithography apparatus, and verifying method of lithography data

Similar Documents

Publication Publication Date Title
JP2707529B2 (en) Data communication system
EP0393314B1 (en) High data rate asynchronous communication method and apparatus
JPH05504668A (en) Optimized methods of data communication and systems that use them
US4601035A (en) Data communication method and circuitry
EP1471434B1 (en) Information transfer protocol
JPH09247132A (en) Radio packet communication equipment and transmitting device
JPH0654025A (en) Modem system, data communication system and computer system
EP0330223A2 (en) Information distribution system
JP3198333B2 (en) Apparatus and method for transferring data by serial data bus
JPH1153272A (en) Data transfer system
JP2013179476A (en) Transmission/reception system and program
JP6172355B2 (en) Transmission / reception system and program
JP3190869B2 (en) Data transmission method
GB2242104A (en) Generating a frame check sequence.
US5394438A (en) Data transmitting method
JPH0548017B2 (en)
JPH0973373A (en) Parallel interface
JP2000312201A (en) Communication equipment and error control method
JP2862403B2 (en) Data transmission method
JP3532301B2 (en) Time clock device for high-speed data communication
JP2022182021A (en) Serial communication device and serial communication method
JP2004153803A (en) Data communication device, data telecommunication system, data communication method, data communication program and information recording medium
JPH06164647A (en) Data transmission controller
JPS63290034A (en) Data transmission system
JPH10228355A (en) Data transfer device and its control method, and print system