JP3980661B2 - Communication method and apparatus - Google Patents

Communication method and apparatus Download PDF

Info

Publication number
JP3980661B2
JP3980661B2 JP29635594A JP29635594A JP3980661B2 JP 3980661 B2 JP3980661 B2 JP 3980661B2 JP 29635594 A JP29635594 A JP 29635594A JP 29635594 A JP29635594 A JP 29635594A JP 3980661 B2 JP3980661 B2 JP 3980661B2
Authority
JP
Japan
Prior art keywords
command
scsi
data
conversion interface
personal computer
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.)
Expired - Lifetime
Application number
JP29635594A
Other languages
Japanese (ja)
Other versions
JPH08153063A (en
Inventor
寛文 田守
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP29635594A priority Critical patent/JP3980661B2/en
Publication of JPH08153063A publication Critical patent/JPH08153063A/en
Application granted granted Critical
Publication of JP3980661B2 publication Critical patent/JP3980661B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)

Description

【0001】
【産業上の利用分野】
本発明は、例えば、シリアルバスを介してSCSI機器とコマンドやデータの送受信を行う場合に用いて好適な通信方法または装置に関する。
【0002】
【従来の技術】
従来、パーソナルコンピュータ(以下、パソコンと略記する)は、RS232C等のシリアルバスとのインタフェースを備えている。このシリアルバスは、通常、1200乃至19200ビット/秒程度の中低速の伝送速度を有しており、モデムやプリンタなどとの通信を行う場合に使用されている。
【0003】
また、このシリアルバスは、デバイス技術の発達により、あるいは平衡伝送を使用する(2本の信号線を用いて、それぞれ互いに極性が逆の信号を伝送する)ことにより、十数メガビット/秒の伝送速度を有するようになってきている。
【0004】
シリアルバスに比較して高速な伝送速度を有するパラレルバス(例えばSCSI(Small Computer System Interface)バス)と、シリアルバスを比較すると、シリアルバスには次のような利点がある。即ち、データの伝送に必要な信号線の数が少ないため、それらの信号線を束ねたケーブルを細くすることができ、それを機器間で取り回すのが容易である。また、信号線の数が少ないため、コネクタを小さくすることができる。さらに、規格上、ノイズに強く、比較的長いケーブルを介してのデータ伝送が可能である。
【0005】
このような利点を有するシリアルバスを、例えば、電子手帳やノート型パソコン等の小型の携帯情報機器に用いるようにすることにより、この携帯情報機器の携帯性をさらに促進することができる。
【0006】
一方、パソコンの周辺機器、特に、ハードディスク、CD−ROM等の二次記憶装置において、現在主流となっているのは、SCSI規格に対応したものである。
【0007】
また、上述した携帯情報機器においては、処理能力の向上により、扱う情報量が多くなったため、データの保存が不可欠になってきている。
【0008】
このような状況において、シリアルバスを介して送信された信号を、SCSIバス用の信号に変換したり、あるいは、SCSIバスを介して送信された信号をシリアルバス用の信号に変換する変換装置を用いて、シリアルバスを介して、SCSI規格等のパラレルバス(SCSIバス)を有する周辺機器との間でコマンドやデータの送受信を行うことができるようにすることが考えられている。
【0009】
図5は、上述した変換装置を応用したパソコンシステムの一例の構成を示すブロック図である。ホストコンピュータとしてのパソコン1は、シリアルバス31を介して変換インタフェース11と接続されている。変換インタフェース11は、SCSIバス32を介してSCSI周辺機器(SCSI機器)21と接続されている。
【0010】
次に、図6と図8のフローチャート、および図7のタイムチャートを参照して、パソコン1により、SCSI機器21から所定のデータが読み出される場合の動作について説明する。ここで、図6は、パソコン1の処理内容を説明するためのフローチャートであり、図8は、変換インタフェース11の処理内容を説明するためのフローチャートである。
【0011】
最初に、ステップS1において、パソコン1より、変換インタフェース11に対して、シリアルバス31を介して所定のSCSI機器をセレクトするためのセレクト命令が送信される(図7の時刻T1)。
【0012】
変換インタフェース11は、パソコン1からのセレクト命令を受信すると、図8(a)のステップS21において、SCSIバス32を介して所定の制御信号をSCSI機器21に送信し、SCSI機器21をセレクトする(図7の時刻T2)。セレクトが成功すると、セレクトされたSCSI機器21は、変換インタフェース11に対して選択成功を示す所定の信号をSCSIバス32を介して送信する(図7の時刻T3)。変換インタフェース11は、SCSI機器21より送信されたこの選択成功を示す所定の信号を、シリアルバス用に変換した後、パソコン1にシリアルバス31を介して送信する(図7の時刻T4)。
【0013】
この後、SCSI機器21は、メッセージインフェーズに遷移する。そして、ステップS22において、変換インタフェース11により、SCSI機器21がメッセージインフェーズに遷移したか否かが判定される。SCSI機器21がメッセージインフェーズに遷移していないと判定された場合、ステップS22の処理が繰り返され、SCSI機器21がメッセージインフェーズに遷移したと判定された場合、ステップS23に進み、SCSI機器21がメッセージインフェーズに遷移したことが、シリアルバス31を介してパソコン1に通知される。
【0014】
一方、パソコン1側では、ステップS2において、パソコン1により、SCSI機器21のセレクトが正常に終了し、SCSI機器21がメッセージインフェーズに状態遷移したことを知らせる通知が、変換インタフェース11よりシリアルバス31を介して伝送されてきたか否かが判定される。この通知が、変換インタフェース11よりシリアルバス31を介して伝送されてきていないと判定された場合、ステップS2におけるこの判定処理が繰り返される。
【0015】
一方、この通知が、変換インタフェース11よりシリアルバス31を介して伝送されてきたと判定された場合、ステップS3に進み、パソコン1により、メッセージバイト送出命令とメッセージバイトが、シリアルバス31を介して変換インタフェース11に送信される(図7の時刻T5)。
【0016】
図8(b)のステップS31において、変換インタフェース11は、パソコン1からのメッセージバイトを受信する。そして、ステップS32に進み、SCSI機器21にSCSIバス32を介してメッセージバイトを送信する(図7の時刻T6)。このメッセージバイトを受信したSCSI機器21は、コマンドフェーズに遷移する。そして、コマンドフェーズに遷移したことを、変換インタフェース11に通知する(図7の時刻T7)。
【0017】
次に、ステップS33において、変換インタフェース11により、SCSI機器21がコマンドフェーズに遷移したか否かが判定される。SCSI機器21がコマンドフェーズに遷移していないと判定された場合、ステップS33の処理が繰り返される。この場合、SCSI機器21がコマンドフェーズに遷移したと判定され、ステップS34に進み、パソコン1にSCSI機器21がコマンドフェーズに遷移したことをシリアルバス31を介して通知する(図7の時刻T8)。
【0018】
パソコン1においては、図6のステップS4に進み、変換インタフェース11から、SCSI機器21がコマンドフェーズに状態遷移したことを知らせる通知が送信されてきたか否かが判定される。この通知が送信されてきていないと判定された場合、ステップS4の判定処理が繰り返される。一方、この通知が送信されてきたと判定された場合、ステップS5に進む。
【0019】
ステップS5においては、パソコン1は、変換インタフェース11に、SCSI命令送出命令とSCSI命令(この場合、例えばRead(6)命令(6バイトの長さを持ったRead命令))をシリアルバス31を介して送信する(図7の時刻T9)。
【0020】
変換インタフェース11は、図8(c)のステップS41において、パソコン1よりシリアルバス31を介して送信されたSCSI命令を受信する。そして、ステップS42に進み、それをSCSI用の信号に変換した後、SCSIバス32を介してSCSI機器21に送信する(図7の時刻T10)。SCSI機器21は、変換インタフェース11より送信されたこの命令を実行すると、データインフェーズに遷移することになる。そして、SCSI機器21より、変換インタフェース11に、SCSIバス32を介して、SCSI機器21がデータインフェーズに遷移したことが通知される(図7の時刻T11)。
【0021】
次に、ステップS43に進み、変換インタフェース11により、SCSI機器21がデータインフェーズに遷移したか否かが判定される。SCSI機器21がデータインフェーズに遷移していないと判定された場合、ステップS43の判定処理が繰り返される。一方、SCSI機器21がデータインフェーズに遷移したと判定された場合、ステップS44に進み、変換インタフェース11により、SCSI機器21がデータインフェーズに遷移したことが、シリアルバス31を介してパソコン1に通知されることになる(図7の時刻T12)。
【0022】
そして、図6のステップS6において、パソコン1により、変換インタフェース11より、SCSI機器21がデータインフェーズに遷移したことを知らせる通知が送信されてきたか否かが判定される。変換インタフェース11より、この通知が送信されてきていないと判定された場合、ステップS6の判定処理が繰り返される。一方、変換インタフェース11より、この通知が送信されてきたと判定された場合、ステップS7に進む。
【0023】
ステップS7においては、パソコン1により、変換インタフェース11に対して、SCSI機器21から所定のデータを読み出すためのデータ読み出し命令が、シリアルバス31を介して送信される。変換インタフェース11は、この命令を受信すると、図8(d)のステップS51において、SCSI機器21より所定のデータを読み出す。読み出したデータは、シリアルバス31を介してパソコン1に送信される。
【0024】
パソコン1においては、図6のステップS8に進み、変換インタフェース11よりデータが送信されてきたか否かが判定される。変換インタフェース11より、データが送信されてきていないと判定された場合、ステップS8の処理が繰り返される。一方、データが送信されてきたと判定された場合、ステップS9に進み、変換インタフェース11よりデータが読み出される。
【0025】
次に、ステップS10に進み、既に、ステップS5において、パソコン1より変換インタフェース11に送信されたSCSI命令(この場合、Read(6))によって指定されたデータ数だけ、変換インタフェース11を介して、SCSI機器21よりデータの読み出しが行われたか否かが判定される。指定されたデータ数だけ、変換インタフェース11を介して、SCSI機器21よりデータの読み出しが行われていないと判定された場合、ステップS7に戻り、ステップS7乃至S10の処理が繰り返される。
【0026】
一方、図8(d)のステップS51において、変換インタフェース11により、SCSI機器21より、指定された個数分のデータが読み出されると、SCSI機器21は、ステータスフェーズに遷移し、そのことが通知される(図7の時刻T15)。そして、ステップS52に進み、変換インタフェース11は、SCSI機器21がステータスフェーズに遷移したことを、シリアルバス31を介してパソコン1に通知する(図7の時刻T16)。
【0027】
パソコン1は、変換インタフェース11より、SCSI機器21がステータスフェーズに遷移したことを知らせる通知を受信すると、SCSI機器21からステータスバイトを読み出すよう指示する命令を、シリアルバス31を介して変換インタフェース11に送信する。変換インタフェース11は、パソコン1からの命令に従って、SCSI機器21からSCSIバス32を介してステータスバイトを読み出し、それをシリアルバス31を介してパソコン1に送信する。
【0028】
次に、ステップS11に進み、SCSI機器21の接続解除を指示するディスコネクト命令が、シリアルバス31を介して、変換インタフェース11に送信される(図7の時刻T19)。変換インタフェース11は、パソコン1からのディスコネクト命令に従って、図8(e)のステップS61において、SCSI機器21をディスコネクトするための命令(ディスコネクト命令)を、SCSI機器21にSCSIバス32を介して送信し、SCSI機器21をディスコネクトする(図7の時刻T20)。
【0029】
このようにして、パソコン1は、シリアルバス31、変換インタフェース11を介して、SCSI機器21より所定のデータを読み出すことができる。
【0030】
次に、図9のフローチャートを参照して、パソコン1が、SCSI機器21に、所定のデータを書き込む場合のパソコン1側の処理について説明する。この場合、変換インタフェース11側の処理の説明は省略するが、図8を参照して上述した、SCSI機器21から所定のデータを読み出す場合と基本的に同様である。即ち、図8(c)において、ステップS43の「データインフェーズになったか」とあるのを、「データアウトフェーズになったか」とし、図8(d)において、ステップS51の「SCSI機器からデータを読み出す」とあるのを、「SCSI機器にデータを書き込む」とすればよい。
【0031】
最初に、ステップS71において、パソコン1は、SCSI機器セレクト命令を、変換インタフェース11にシリアルバス31を介して送信する。この命令を受信した変換インタフェース11は、SCSI機器セレクト命令を、SCSIバス用の信号に変換し、SCSIバス32を介して、この場合、SCSI機器21に送信する。
【0032】
これにより、SCSI機器21はセレクトされ、メッセージインフェーズに遷移する。SCSI機器21は、そのことを変換インタフェース11にSCSIバス32を介して通知する。SCSI機器21からのこの通知を受信した変換インタフェース11は、SCSI機器21がメッセージインフェーズに遷移したことを、シリアルバス31を介してパソコン1に通知することになる。
【0033】
次に、ステップS72に進み、パソコン1により、変換インタフェース11より、SCSI機器21の状態がメッセージインフェーズに遷移したことを知らせる通知が送信されてきたか否かが判定される。変換インタフェース11より、SCSI機器21のメッセージインフェーズへの状態遷移を知らせる通知が送信されてきていないと判定された場合、ステップS72の処理が繰り返される。一方、変換インタフェース11より、SCSI機器21のメッセージインフェーズへの遷移を知らせる通知が送信されてきたと判定された場合、ステップS73に進む。
【0034】
ステップS73においては、パソコン1は、変換インタフェース11にメッセージバイト送出命令と、メッセージバイトをシリアルバス31を介して送出する。変換インタフェース11は、受信したメッセージバイト送出命令に基づいて、SCSIバス用に変換したメッセージバイトをSCSIバス32を介してSCSI機器21に送出する。
【0035】
SCSI機器21は、変換インタフェース11からのメッセージバイトを受信すると、コマンドフェーズに遷移し、そのことを変換インタフェース11に通知する。変換インタフェース11は、この通知により、SCSI機器21がコマンドフェーズに遷移したことを認識すると、SCSI機器21がコマンドフェーズに遷移したことを、シリアルバス31を介してパソコン1に通知する。
【0036】
次に、ステップS74に進み、パソコン1により、変換インタフェース11からのSCSI機器21の状態遷移の通知が送信されてきたか否かが判定される。変換インタフェース11より、SCSI機器21の状態遷移の通知が送信されてきていないと判定された場合、ステップS74の処理を繰り返す。一方、変換インタフェース11より、SCSI機器21の状態遷移の通知が送信されてきたと判定された場合、ステップS75に進む。
【0037】
ステップS75において、パソコン1は、変換インタフェース11に対して、SCSI命令送出命令とSCSI命令(この場合、SCSI機器21にデータを書き込むように指示する命令であるWrite(6)命令)を送信する。変換インタフェース11は、パソコン1からのSCSI命令送出命令とSCSI命令を受信すると、SCSI命令送出命令に従って、受信したSCSI命令をSCSI用の信号に変換し、SCSIバス32を介してSCSI機器21に送信する。
【0038】
SCSI機器21は、変換インタフェース11よりSCSIバス32を介して送信されてきたSCSI命令に従って、所定の処理を実行し、データアウトフェーズに遷移する。そして、そのことを変換インタフェース11に通知する。変換インタフェース11は、この通知により、SCSI機器21がデータアウトフェーズに遷移したことを認識すると、SCSI機器21がデータアウトフェーズに遷移したことを、シリアルバス31を介してパソコン1に通知する。
【0039】
次に、ステップS76において、パソコン1により、変換インタフェース11より、SCSI機器21がデータアウトフェーズに遷移したことを知らせる通知が送信されてきたか否かが判定される。変換インタフェース11より、SCSI機器21の状態がデータアウトフェーズに遷移したことを知らせる通知が送信されてきていないと判定された場合、ステップS76の処理を繰り返す。
【0040】
一方、変換インタフェース11より、SCSI機器21の状態がデータアウトフェーズに遷移したことを知らせる通知が送信されてきたと判定された場合、ステップS77に進み、パソコン1は、変換インタフェース11に対して、SCSI機器21に所定のデータを書き込むことを指示する書き込み命令と、データバイトを送信する。
【0041】
次に、ステップS78に進み、パソコン1により、変換インタフェース11より、データが送信されてきたか否かが判定される。変換インタフェース11より、データが送信されてきていないと判定された場合、ステップS78の処理が繰り返される。一方、変換インタフェース11より、データが送信されてきたと判定された場合、ステップS79に進む。
【0042】
ステップS79において、パソコン1は、SCSI機器21に書き込むデータを、変換インタフェース11にシリアルバス31を介して送信する。変換インタフェース11は、パソコン1よりシリアルバス31を介して受信したデータを、SCSI用の信号に変換した後、SCSI機器21にSCSIバス32を介して送信する。SCSI機器21は、変換インタフェース11よりSCSIバス32を介して受信したデータを内蔵するディスクに書き込む(例えば、SCSI機器21がハードディスクの場合)。
【0043】
そして、ステップS80において、パソコン1により、SCSI命令により指定したバイト数分のデータの書き込みが終了したか否かが判定される。指定したバイト数分のデータの書き込みが終了していないと判定された場合、ステップS77乃至S80の処理が繰り返され、指定したバイト数分のデータの書き込みが終了したと判定された場合、ステップS81に進むことになる。
【0044】
また、SCSI機器21は、指定された個数分のデータの書き込みが終了した場合、ステータスフェーズに遷移し、そのことをSCSIバス32を介して、変換インタフェース11に通知する。
【0045】
変換インタフェース11は、この通知により、SCSI機器21がステータスフェーズに遷移したことを検出すると、そのことをシリアルバス31を介してパソコン1に通知する。パソコン1は、変換インタフェース11からの通知を受信し、SCSI機器21がステータスフェーズに遷移したことを認識すると、SCSI機器21からステータスバイトを読み出すように指示するための命令を、変換インタフェース11にシリアルバス31を介して送信する。
【0046】
変換インタフェース11は、パソコン1からの命令に従って、SCSI機器21から、SCSIバス32を介してステータスバイトを読み出し、それをシリアルバス31を介して、パソコン1に送信する。
【0047】
次に、ステップS81において、パソコン1は、変換インタフェース11に、SCSI機器21をディスコネクトするよう指示する命令を送信する。変換インタフェース11は、パソコン1からの命令に従って、SCSI機器21をディスコネクトする。
【0048】
このようにして、パソコン1は、シリアルバス31、変換インタフェース11を介して、SCSI機器21に所定のデータを書き込むことができる。
【0049】
【発明が解決しようとする課題】
従来の装置においては、このように、SCSI機器21を制御する命令のすべてを、パソコン1から変換インタフェース11に、シリアルバス31を介して、逐一送信するようにしているため、汎用性が高く、種々のSCSI機器の制御が可能である。
【0050】
しかしながら、その反面、ホストコンピュータとしてのパソコン1、変換インタフェース11、およびSCSI機器21間のデータ転送の頻度が多くなった場合、システム全体の動作速度が遅くなる課題があった。
【0051】
本発明はこのような状況に鑑みてなされたものであり、パソコン1は、複数の命令を1つにまとめたマクロコマンドを、変換インタフェース11に送信し、変換インタフェース11は、マクロコマンドに従って、順次SCSI機器21を制御するようにすることにより、パソコン1と変換インタフェース11の間で行うデータの送受信の回数を減少させ、システム全体の処理を高速化することができるようにするものである。
【0052】
【課題を解決するための手段】
請求項1に記載の通信方法は、高速なシリアルバス(例えば図1のシリアルバス31)を有する情報処理装置(例えば図1のパソコン1)と、パラレルバス(例えば図1のSCSI(Small Computer System Interface)バス32)を有する周辺機器(例えば図1のSCSI機器21)との間に接続され、その間の通信を制御する通信装置(例えば図1の変換インタフェース11)の通信方法であって、複数の命令を1つにまとめたマクロコマンドを情報処理装置から受信した場合、周辺機器をセレクトするようパラレルバスを介して指令し、指令によりセレクトされた周辺機器がメッセージインフェーズに遷移したと判断された場合、周辺機器に所定のメッセージバイトを送信し、メッセージバイトを受信した周辺機器がコマンドフェーズに遷移したと判断された場合、周辺機器に所定の命令を送信し、命令を受信した周辺機器がデータフェーズに遷移したと判定された場合、マクロコマンドに従って、指定された回数分のデータの読み出しまたはデータの書き込みを繰り返すように、周辺機器とのインターフェースおよび情報処理装置とのインターフェースを制御することを特徴とする。
命令は、Read命令またはWrite命令とすることができる。
【0053】
請求項3に記載の通信装置は、高速なシリアルバス(例えば図1のシリアルバス31)を有する情報処理装置(例えば図1のパソコン1)と、パラレルバス(例えば図1のSCSIバス32)を有する周辺機器(例えば図1のSCSI機器21)との間に接続され、その間の通信を制御する通信装置であって、複数の命令を1つにまとめたマクロコマンドを情報処理装置から受信した場合、周辺機器をセレクトするようパラレルバスを介して指令する指令手段(例えば、図2のステップS111の処理を実行する図1のCPU12a)と、指令によりセレクトされた周辺機器がメッセージインフェーズに遷移したと判断された場合、周辺機器への所定のメッセージバイトの送信を制御する第1の送信制御手段(例えば、図2のステップS113の処理を実行する図1のCPU12a)と、メッセージバイトを受信した周辺機器がコマンドフェーズに遷移したと判断された場合、周辺機器への所定の命令の送信を制御する第2の送信制御手段(例えば、図2のステップS115の処理を実行する図1のCPU12a)と、命令を受信した周辺機器がデータフェーズに遷移したと判定された場合、マクロコマンドに従って、指定された回数分のデータの読み出しまたはデータの書き込みを繰り返すように、周辺機器とのインターフェースおよび情報処理装置とのインターフェースを制御する制御手段(例えば、図2のステップS117の処理を実行する図1のCPU12a)とを備えることを特徴とする。
【0054】
また、パラレルバスは、SCSIバスとすることができる。
さらに、命令は、Read命令またはWrite命令とすることができる。
【0055】
【作用】
請求項1または3に記載の通信方法または装置においては、複数の命令を1つにまとめたマクロコマンドを情報処理装置から受信した場合、周辺機器をセレクトするようパラレルバスを介して指令され、指令によりセレクトされた周辺機器がメッセージインフェーズに遷移したと判断された場合、周辺機器に所定のメッセージバイトが送信され、メッセージバイトを受信した周辺機器がコマンドフェーズに遷移したと判断された場合、周辺機器に所定の命令が送信される。そして、命令を受信した周辺機器がデータフェーズに遷移したと判定された場合、マクロコマンドに従って、指定された回数分のデータの読み出しまたはデータの書き込みを繰り返すように、周辺機器とのインターフェースおよび情報処理装置とのインターフェースが制御される。
請求項2に記載の通信方法においては、命令は、Read命令またはWrite命令とされる。従って、周辺機器からのデータの読み出し、または周辺機器へのデータの書き込みが可能となる。
【0056】
請求項4に記載の通信装置においては、パラレルバスは、SCSIバスとされる。従って、SCSI機器の制御が可能となる。
請求項5に記載の通信装置においては、命令は、Read命令またはWrite命令とされる。従って、周辺機器からのデータの読み出し、または周辺機器へのデータの書き込みが可能となる。
【0057】
【実施例】
図1は、本発明の通信装置を適用したパソコンシステムの一実施例の構成を示すブロック図である。このパソコンシステムは、ホストコンピュータとしてのパーソナルコンピュータ(以下パソコンと略記する)1と、変換インタフェース11、およびSCSI(Small Computer System Interface)周辺機器(SCSI機器)21より構成され、パソコン1と変換インタフェース11との間のデータのやり取りは、RS232CまたはRS422等のシリアルバス31を介して行われ、変換インタフェース11とSCSI機器21の間のデータのやり取りは、SCSIバス32を介して行われるようになされている。
【0058】
パソコン1において、記憶部3を構成するROM3aは、所定のシステムプログラムを記憶する。また、RAM3bは、所定のアプリケーションプログラムを記憶するようになされている。
【0059】
演算部2は、CPU2aにより構成され、ROM3a、またはRAM3bに記憶されているシステムプログラムまたはアプリケーションプログラムに基づいて、所定の演算、または処理を行うようになされている。
【0060】
シリアル通信部4は、演算部2よりシステムバス5を介して供給された所定のデータを、シリアルバス31を介して送信し、変換インタフェース11を構成する後述するシリアル通信部14との間で所定のデータのやり取りを行うようになされている。
【0061】
変換インタフェース11においては、記憶部13を構成するROM13aは、所定のシステムプログラムを記憶する。また、RAM13bは、所定のアプリケーションプログラムを記憶するようになされている。
【0062】
演算部12は、CPU12aにより構成され、ROM13a、またはRAM13bに記憶されているシステムプログラムまたはアプリケーションプログラムに基づいて、所定の演算、または処理を行うようになされている。
【0063】
シリアル通信部14は、演算部12よりシステムバス15を介して供給された所定のデータを、シリアルバス31を介して送信し、パソコン1のシリアル通信部4との間で所定のデータのやり取りを行うようになされている。
【0064】
SCSI制御部16は、SCSIバス32を介して、SCSI機器21に所定の命令またはデータを送信する。また、SCSI機器21からのデータをSCSIバス32を介して受信するようになされている。
【0065】
SCSI機器21は、例えばハードディスクやCD−ROM等により構成され、変換インタフェース11より、SCSIバス32を介して送信された所定のデータをハードディスクに書き込んだり、あるいはハードディスクまたはCD−ROMより読みだした所定のデータを、SCSIバス32を介して、変換インタフェース11に送信する。
【0066】
次に、図2のフローチャート、および図3のタイムチャートを参照して、この実施例において、パソコン1が、シリアルバス31を介して、SCSI機器21より所定のデータを読み出す場合の動作を説明する。ここで、図2(a)は、ホスト側、即ちパソコン1の動作を説明するためのフローチャートであり、図2(b)は、変換インタフェース11側の動作を説明するためのフローチャートである。
【0067】
最初に、図2(a)のステップS101において、パソコン1を構成するCPU2aは、所定のアプリケーションプログラムに従って、シリアル通信部4に対して、変換インタフェース11に、インタフェース用命令、例えば、SCSI機器21のブロックn番からmブロック分だけデータを読み出す命令を送信するよう指令する。
【0068】
シリアル通信部4は、CPU2aからの指令に従って、変換インタフェース11に、SCSI機器21のブロックn番からmブロック分だけデータを読み出す命令を、シリアルバス31を介して送信する(図3の時刻T31)。
【0069】
一方、図2(b)のステップS111において、変換インタフェース11のシリアル通信部14は、シリアルバス31を介して、シリアル通信部4より送信された命令を受信し、それをCPU12aに供給する。CPU12aは、シリアル通信部14を介して受信した、パソコン1からの命令に従って、SCSI制御部16に対して、最初、SCSI機器21をセレクトするようシステムバス15を介して指令する。
【0070】
SCSI制御部16は、CPU12aからの命令に従って、SCSI機器21をセレクトするよう指示する制御信号を発生し、SCSIバス32を介して、SCSI機器21に送信する(図3の時刻T32)。これにより、SCSI機器21がセレクトされ、SCSI機器21は、メッセージインフェーズに遷移する。そして、SCSI機器21は、メッセージインフェーズに遷移したことを変換インタフェース11に通知する(図3の時刻T33)。
【0071】
次に、ステップS112において、変換インタフェース11のCPU12aにより、SCSI機器21がメッセージインフェーズに遷移したか否かが判定され、SCSI機器21がメッセージインフェーズに遷移していないと判定された場合、ステップS112の処理を繰り返す。一方、SCSI機器21が、メッセージインフェーズに遷移したと判定された場合、ステップS113に進む。
【0072】
ステップS113においては、変換インタフェース11のSCSI制御部16は、CPU12aの制御により、所定のメッセージバイトを、SCSIバス32を介してSCSI機器21に送信する(図3の時刻T34)。
【0073】
SCSI機器21は、SCSI制御部16より送信されたメッセージバイトを受信すると、コマンドフェーズに遷移し、そのことを変換インタフェース11に通知する(図3の時刻T35)。そして、ステップS114において、CPU12aにより、SCSI機器21がコマンドフェーズに遷移したか否かが判定される。
【0074】
SCSI機器21が、コマンドフェーズに遷移していないと判定された場合、ステップS114の処理が繰り返される。一方、SCSI機器21が、コマンドフェーズに遷移したと判定された場合、ステップS115に進む。
【0075】
ステップS115においては、変換インタフェース11より、所定のSCSI命令、例えば、所定のデータを読み出すように指示するRead(6)命令が、SCSIバス32を介して、SCSI機器21に送信される(図3の時刻T36)。この命令を受信したSCSI機器21は、データインフェーズに遷移し、そのことを変換インタフェース11に通知する(図3の時刻T37)。
【0076】
次に、ステップS116において、変換インタフェース11のCPU12aにより、SCSI機器21がデータインフェーズに遷移したか否かが判定される。SCSI機器21がデータインフェーズに遷移していないと判定された場合、ステップS116の処理が繰り返される。一方、SCSI機器21がデータインフェーズに遷移したと判定された場合、ステップS117に進む。
【0077】
ステップS117においては、変換インタフェース11のCPU12aは、パソコン1より供給されたマクロコマンド(マクロ命令)に従って、SCSI制御部16を制御し、SCSI機器21より、SCSIバス32を介して、所定のデータを読み出す(図3の時刻T38)。
【0078】
次に、ステップS118に進み、CPU12aは、ステップS117において、SCSI機器21より読み出したデータを、シリアル通信部14、シリアルバス31を介して、パソコン1に送信する(図3の時刻T39)。
【0079】
一方、パソコン1においては、ステップS102において、CPU2aにより、変換インタフェース11より、シリアルバス31を介してデータが送信されてきたか否かが判定される。データが送信されてきていないと判定された場合、ステップS102の処理が繰り返される。一方、データが送信されてきたと判定された場合、ステップS103に進み、送信されてきたデータが読み込まれる。
【0080】
次に、ステップS104において、マクロコマンドにより指定した回数分だけデータが読み出されたか否かが判定される。指定した回数分のデータの読み出しが終了していないと判定された場合、ステップS102乃至S104の処理が繰り返される。
【0081】
また、変換インタフェース11においては、ステップS119に進み、CPU12aにより、SCSI制御部16、SCSIバス32を介して、SCSI機器21より、パソコン1より供給されたマクロコマンドにより指定された回数分だけ、データが読み出されたか否かが判定される。
【0082】
指定された回数分だけ、データを読み出していないと判定された場合、CPU12aは、ステップS117に戻り、ステップS117乃至S119の処理を繰り返す。これにより、パソコン1においても、上述したように、ステップS102乃至S104の処理が繰り返されることになる。一方、指定された回数分だけ、データを読み出したと判定された場合、ステップS120に進むことになる。
【0083】
変換インタフェース11により、SCSI機器21より、指定された回数分のデータが読み出されると、SCSI機器21はステータスフェーズに遷移し、そのことを変換インタフェース11に通知する(図3の時刻T40)。
【0084】
一方、パソコン1においても、ステップS104において、指定した回数分のデータの読み出しが終了したと判定され、処理を終了する。
【0085】
そして、変換インタフェース11は、SCSI機器21より、SCSIバス32を介してステータスバイトを読み出し(図3の時刻T41)、必要であれば、それをパソコン1に送信する。
【0086】
次に、ステップS120に進み、変換インタフェース11は、SCSI機器21に対して、SCSIバス32を介してディスコネクト命令を送信し、SCSI機器21をディスコネクトする。
【0087】
このようにして、パソコン1は、シリアルバス31を介して変換インタフェース11に所定のマクロコマンドを1回だけ送信することにより、以降、変換インタフェース11との間でコマンドのやり取りを行うことなく、SCSI機器21から、所定のデータを読み出すことができる。このように、マクロコマンドを使用することにより、パソコン1と変換インタフェース11との間でやり取りされるコマンド、またはデータの送信回数、およびデータ量を減少させることができる。
【0088】
次に、図4に示したフローチャートを参照して、この実施例において、パソコン1が、シリアルバス31を介して、SCSI機器21に所定のデータを書き込む場合の動作を説明する。ここで、図4(a)は、ホスト側、即ちパソコン1の動作を説明するためのフローチャートであり、図4(b)は、変換インタフェース11側の動作を説明するためのフローチャートである。
【0089】
最初に、図4(a)のステップS131において、パソコン1を構成するCPU2aは、所定のアプリケーションプログラムに従って、シリアル通信部4に対して、変換インタフェース11に、インタフェース用命令、例えば、SCSI機器21のブロックn番からmブロック分だけ所定のデータを書き込む命令を送信するよう指令する。
【0090】
シリアル通信部4は、CPU2aからの指令に従って、変換インタフェース11に、SCSI機器21のブロックn番からmブロック分だけデータを書き込む命令を、シリアルバス31を介して送信する。
【0091】
一方、図4(b)のステップS141において、変換インタフェース11のシリアル通信部14は、シリアルバス31を介して、シリアル通信部4より送信された命令を受信し、それをCPU12aに供給する。CPU12aは、シリアル通信部14を介して受信した、パソコン1からの命令に従って、SCSI制御部16に対して、SCSI機器21をセレクトするようシステムバス15を介して指令する。
【0092】
SCSI制御部16は、CPU12aからの命令に従って、SCSI機器21をセレクトするよう指示する制御信号を発生し、SCSIバス32を介して、SCSI機器21に送信する。これにより、SCSI機器21がセレクトされ、SCSI機器21は、メッセージインフェーズに遷移し、そのことをSCSIバス32を介して、変換インタフェース11に通知する。
【0093】
次に、ステップS142において、変換インタフェース11のCPU12aにより、SCSI機器21がメッセージインフェーズになったか否かが判定され、SCSI機器21がメッセージインフェーズになっていないと判定された場合、ステップS142の処理が繰り返される。一方、SCSI機器21が、メッセージインフェーズになったと判定された場合、ステップS143に進む。
【0094】
ステップS143においては、変換インタフェース11のSCSI制御部16は、CPU12aの制御により、所定のメッセージバイトを、SCSIバス32を介してSCSI機器21に送信する。
【0095】
SCSI機器21は、SCSI制御部16より送信されたメッセージバイトを受信すると、コマンドフェーズに遷移し、それを変換インタフェース11に通知する。そして、ステップS144において、CPU12aにより、SCSI機器21がコマンドフェーズに遷移したか否かが判定される。
【0096】
SCSI機器21が、コマンドフェーズに遷移していないと判定された場合、ステップS144の処理が繰り返される。一方、SCSI機器21が、コマンドフェーズに遷移したと判定された場合、ステップS145に進む。
【0097】
ステップS145においては、変換インタフェース11より、所定のSCSI命令、例えば、所定のデータを書き込むように指示するWrite(6)命令が、SCSIバス32を介して、SCSI機器21に送信される。この命令を受信したSCSI機器21は、データアウトフェーズに遷移し、そのことを変換インタフェース11に通知する。
【0098】
次に、ステップS146において、変換インタフェース11のCPU12aにより、SCSI機器21がデータアウトフェーズに遷移したか否かが判定される。SCSI機器21がデータアウトフェーズに遷移していないと判定された場合、ステップS146の処理が繰り返される。一方、SCSI機器21がデータアウトフェーズに遷移したと判定された場合、ステップS147に進む。
【0099】
一方、パソコン1においては、ステップS132において、CPU2aにより、例えばRAM3bに記憶されているSCSI機器21に書き込むべき所定のデータが読み出され、シリアル通信部4、シリアルバス31を介して変換インタフェース11に送信される。
【0100】
次に、ステップS133に進み、CPU2aにより、マクロコマンドによって指定した回数分だけデータを書き込んだか否かが判定される。指定した回数分のデータの書き込みが終了していないと判定された場合、ステップS132,S133の処理が繰り返される。
【0101】
また、変換インタフェース11においては、ステップS147において、CPU12aは、パソコン1より供給されたマクロコマンドに従って、シリアル通信部14を制御し、パソコン1より、シリアルバス31を介して、SCSI機器21に書き込むべき所定のデータを受信する。
【0102】
次に、ステップS149に進み、CPU12aにより、SCSI制御部16、SCSIバス32を介して、SCSI機器21に、パソコン1より供給されたマクロコマンドにより指定された回数分だけ、データを書き込んだか否かが判定される。
【0103】
指定された回数分だけ、データを書き込んでいないと判定された場合、ステップS147に戻り、ステップS147乃至S149の処理が繰り返される。これにより、パソコン1においても、上述したように、ステップS132,S133の処理が繰り返されることになる。一方、指定された回数分だけ、データを書き込んだと判定された場合、ステップS150に進むことになる。
【0104】
一方、パソコン1においても、ステップS133において、指定した回数分のデータの書き込みが終了したと判定され、処理を終了する。
【0105】
SCSI機器21は、指定された個数分だけ、データの書き込みを行うと、ステータスフェーズに遷移し、そのことを変換インタフェース11に通知する。そして、変換インタフェース11は、SCSI機器21より、SCSIバス32を介してステータスバイトを読み出す。必要であれば、それをパソコン1に送信する。
【0106】
次に、ステップS150に進み、変換インタフェース11は、SCSI機器21に対して、SCSIバス32を介してディスコネクト命令を送信し、SCSI機器21をディスコネクトする。
【0107】
このようにして、パソコン1は、シリアルバス31を介して変換インタフェース11に所定のマクロコマンドを1回だけ送信することにより、それ以降、変換インタフェース11との間で、コマンドまたはデータのやり取りを行うことなく、SCSI機器21に、所定のデータを書き込むことができる。このように、マクロコマンドを使用することにより、パソコン1と変換インタフェース11との間でやり取りされるコマンド、またはデータの送信回数、およびデータ量を減少させることができる。
【0108】
なお、上記実施例においては、本発明の通信方法および装置を、パソコンにより構成されたパソコンシステムに適用した場合について説明したが、パソコンに限らず、小型の携帯情報端末や電子手帳等のように、マイコンを登載した電子機器に適用することも可能である。
【0109】
また、上記実施例においては、シリアルバスを介して、SCSIバス規格に対応したSCSI機器との間でデータやコマンドの送受信を行う場合について説明したが、これに限らず、他の規格のパラレルバスに対応した電子機器との間で、シリアルバスを介してデータやコマンドの送受信を行うようにすることも可能である。
【0110】
【発明の効果】
請求項1または3に記載の通信方法または装置によれば、複数の命令を1つにまとめたマクロコマンドを情報処理装置から受信した場合、周辺機器をセレクトするようパラレルバスを介して指令し、指令によりセレクトされた周辺機器がメッセージインフェーズに遷移したと判断された場合、周辺機器に所定のメッセージバイトを送信し、メッセージバイトを受信した周辺機器がコマンドフェーズに遷移したと判断された場合、周辺機器に所定の命令を送信し、命令を受信した周辺機器がデータフェーズに遷移したと判定された場合、マクロコマンドに従って、指定された回数分のデータの読み出しまたはデータの書き込みを繰り返すように、周辺機器とのインターフェースおよび情報処理装置とのインターフェースを制御するようにしたので、情報処理装置は、シリアルバスを介して周辺機器を制御することができる。また、シリアルバスを介して、1つのマクロコマンドを送信するだけで、マクロコマンドに対応する複数のコマンドを、パラレルバスを介して順次周辺機器に送信し、周辺機器を制御することができる。従って、SCSI機器を制御する場合、装置間で通信される回数やデータ量を削減することができ、処理を簡単にし、かつ高速化することが可能となる。これにより、処理効率を向上させることが可能となる。
請求項2に記載の通信方法においては、命令を、Read命令またはWrite命令としたので、周辺機器から所定のデータを読み出したり、あるいはそこに所定のデータを書き込むことが可能となる。
【0111】
請求項4に記載の通信装置によれば、パラレルバスを、SCSIバスとしたので、SCSI機器の制御が可能となる。
請求項5に記載の通信装置によれば、命令を、Read命令またはWrite命令としたので、周辺機器から所定のデータを読み出したり、あるいはそこに所定のデータを書き込むことが可能となる。
【図面の簡単な説明】
【図1】本発明の通信方法および装置を適用したパソコンシステムの一実施例の構成を示すブロック図である。
【図2】図1の実施例において、パソコン1により、変換インタフェース11を介して、SCSI機器21より所定のデータが読み出される場合の処理手順を説明するためのフローチャートである。
【図3】パソコン1により、変換インタフェース11を介して、SCSI機器21より所定のデータが読み出される場合のタイムチャートである。
【図4】パソコン1により、変換インタフェース11を介して、SCSI機器21に、所定のデータが書き込まれる場合の処理手順を説明するためのフローチャートである。
【図5】従来のパソコンシステムの一例の構成を示すブロック図である。
【図6】図5のパソコンシステムにおいて、パソコン1により、変換インタフェース11を介して、SCSI機器21より所定のデータが読み出される場合の、パソコン1側の処理手順を説明するためのフローチャートである。
【図7】図5において、パソコン1により、変換インタフェース11を介して、SCSI機器21より所定のデータが読み出される場合のタイムチャートである。
【図8】図5のパソコンシステムにおいて、パソコン1により、変換インタフェース11を介して所定のデータが読み出される場合の、変換インタフェース11側の処理手順を説明するためのフローチャートである。
【図9】図5のパソコンシステムにおいて、パソコン1により、変換インタフェース11を介して、SCSI機器21に所定のデータが書き込まれる場合の、パソコン1側の処理手順を説明するためのフローチャートである。
【符号の説明】
1 パソコン
2 演算部
2a CPU
3 記憶部
3a ROM
3b RAM
4 シリアル通信部
5 システムバス
11 変換インタフェース
12 演算部
12a CPU
13 記憶部
13a ROM
13b RAM
14 シリアル通信部
15 システムバス
16 SCSI制御部
21 SCSI機器
31 シリアルバス
32 SCSIバス
[0001]
[Industrial application fields]
The present invention relates to a communication method or apparatus suitable for use in, for example, transmission / reception of commands and data with a SCSI device via a serial bus.
[0002]
[Prior art]
Conventionally, personal computers (hereinafter abbreviated as personal computers) have an interface with a serial bus such as RS232C. This serial bus usually has a medium to low transmission speed of about 1200 to 19,200 bits / second, and is used when communicating with a modem, a printer, or the like.
[0003]
In addition, this serial bus is capable of transmitting several tens of megabits per second by developing device technology or using balanced transmission (using two signal lines to transmit signals of opposite polarities to each other). Has come to have speed.
[0004]
When comparing a serial bus with a parallel bus (for example, a SCSI (Small Computer System Interface) bus) having a higher transmission speed than the serial bus, the serial bus has the following advantages. That is, since the number of signal lines required for data transmission is small, a cable in which these signal lines are bundled can be made thin, and it is easy to route them between devices. Further, since the number of signal lines is small, the connector can be made small. Furthermore, according to the standard, it is resistant to noise and can transmit data via a relatively long cable.
[0005]
By using a serial bus having such advantages in a small portable information device such as an electronic notebook or a notebook personal computer, the portability of the portable information device can be further promoted.
[0006]
On the other hand, what is currently mainstream in peripheral devices for personal computers, particularly secondary storage devices such as hard disks and CD-ROMs, is compatible with the SCSI standard.
[0007]
Further, in the above-described portable information device, the amount of information to be handled has increased due to the improvement of processing capability, and thus data storage has become indispensable.
[0008]
In such a situation, a conversion device that converts a signal transmitted through the serial bus into a signal for the SCSI bus or converts a signal transmitted through the SCSI bus into a signal for the serial bus. It is considered that commands and data can be transmitted / received to / from peripheral devices having a parallel bus (SCSI bus) such as a SCSI standard via a serial bus.
[0009]
FIG. 5 is a block diagram showing a configuration of an example of a personal computer system to which the above-described conversion device is applied. A personal computer 1 as a host computer is connected to the conversion interface 11 via a serial bus 31. The conversion interface 11 is connected to a SCSI peripheral device (SCSI device) 21 via a SCSI bus 32.
[0010]
Next, an operation when predetermined data is read from the SCSI device 21 by the personal computer 1 will be described with reference to the flowcharts of FIGS. 6 and 8 and the time chart of FIG. Here, FIG. 6 is a flowchart for explaining the processing contents of the personal computer 1, and FIG. 8 is a flowchart for explaining the processing contents of the conversion interface 11.
[0011]
First, in step S1, a selection command for selecting a predetermined SCSI device is transmitted from the personal computer 1 to the conversion interface 11 via the serial bus 31 (time T1 in FIG. 7).
[0012]
When receiving the select command from the personal computer 1, the conversion interface 11 transmits a predetermined control signal to the SCSI device 21 via the SCSI bus 32 and selects the SCSI device 21 in step S21 of FIG. Time T2 in FIG. When the selection is successful, the selected SCSI device 21 transmits a predetermined signal indicating the selection success to the conversion interface 11 via the SCSI bus 32 (time T3 in FIG. 7). The conversion interface 11 converts the predetermined signal indicating the selection success transmitted from the SCSI device 21 to the serial bus, and then transmits the signal to the personal computer 1 via the serial bus 31 (time T4 in FIG. 7).
[0013]
Thereafter, the SCSI device 21 transitions to the message in phase. In step S22, the conversion interface 11 determines whether the SCSI device 21 has transitioned to the message in phase. When it is determined that the SCSI device 21 has not transitioned to the message in phase, the process of step S22 is repeated. When it is determined that the SCSI device 21 has transitioned to the message in phase, the process proceeds to step S23, and the SCSI device 21 is reached. Is transferred to the personal computer 1 via the serial bus 31.
[0014]
On the other hand, on the personal computer 1 side, in step S2, the personal computer 1 notifies the serial bus 31 from the conversion interface 11 that the personal computer 1 has successfully selected the SCSI device 21 and the SCSI device 21 has transitioned to the message in phase. It is determined whether or not the data has been transmitted via. When it is determined that this notification has not been transmitted from the conversion interface 11 via the serial bus 31, this determination process in step S2 is repeated.
[0015]
On the other hand, if it is determined that this notification has been transmitted from the conversion interface 11 via the serial bus 31, the process proceeds to step S 3, where the personal computer 1 converts the message byte transmission command and the message byte via the serial bus 31. It is transmitted to the interface 11 (time T5 in FIG. 7).
[0016]
In step S31 of FIG. 8B, the conversion interface 11 receives a message byte from the personal computer 1. In step S32, a message byte is transmitted to the SCSI device 21 via the SCSI bus 32 (time T6 in FIG. 7). The SCSI device 21 that has received this message byte makes a transition to the command phase. Then, the conversion interface 11 is notified of the transition to the command phase (time T7 in FIG. 7).
[0017]
Next, in step S33, the conversion interface 11 determines whether the SCSI device 21 has transitioned to the command phase. When it is determined that the SCSI device 21 has not transitioned to the command phase, the process of step S33 is repeated. In this case, it is determined that the SCSI device 21 has transitioned to the command phase, the process proceeds to step S34, and the personal computer 1 is notified via the serial bus 31 that the SCSI device 21 has transitioned to the command phase (time T8 in FIG. 7). .
[0018]
In the personal computer 1, the process proceeds to step S <b> 4 in FIG. 6, and it is determined whether or not a notification notifying that the SCSI device 21 has transitioned to the command phase has been transmitted from the conversion interface 11. If it is determined that this notification has not been transmitted, the determination process of step S4 is repeated. On the other hand, if it is determined that this notification has been transmitted, the process proceeds to step S5.
[0019]
In step S5, the personal computer 1 sends a SCSI command transmission command and a SCSI command (in this case, for example, a Read (6) command (Read command having a length of 6 bytes)) to the conversion interface 11 via the serial bus 31. Are transmitted (time T9 in FIG. 7).
[0020]
The conversion interface 11 receives the SCSI command transmitted from the personal computer 1 via the serial bus 31 in step S41 of FIG. Then, the process proceeds to step S42, which is converted into a SCSI signal and then transmitted to the SCSI device 21 via the SCSI bus 32 (time T10 in FIG. 7). When the SCSI device 21 executes this command transmitted from the conversion interface 11, it shifts to the data in phase. Then, the SCSI device 21 notifies the conversion interface 11 that the SCSI device 21 has shifted to the data in phase via the SCSI bus 32 (time T11 in FIG. 7).
[0021]
In step S43, the conversion interface 11 determines whether the SCSI device 21 has transitioned to the data in phase. When it is determined that the SCSI device 21 has not transitioned to the data in phase, the determination process in step S43 is repeated. On the other hand, if it is determined that the SCSI device 21 has transitioned to the data in phase, the process proceeds to step S44, and the conversion interface 11 indicates that the SCSI device 21 has transitioned to the data in phase via the serial bus 31 to the personal computer 1. Notification is made (time T12 in FIG. 7).
[0022]
In step S6 of FIG. 6, it is determined whether or not the personal computer 1 has transmitted from the conversion interface 11 a notification notifying that the SCSI device 21 has shifted to the data in phase. If it is determined by the conversion interface 11 that this notification has not been transmitted, the determination process of step S6 is repeated. On the other hand, if it is determined from the conversion interface 11 that this notification has been transmitted, the process proceeds to step S7.
[0023]
In step S <b> 7, the personal computer 1 transmits a data read command for reading predetermined data from the SCSI device 21 to the conversion interface 11 via the serial bus 31. When receiving this command, the conversion interface 11 reads predetermined data from the SCSI device 21 in step S51 of FIG. The read data is transmitted to the personal computer 1 via the serial bus 31.
[0024]
In the personal computer 1, the process proceeds to step S <b> 8 in FIG. 6, and it is determined whether or not data is transmitted from the conversion interface 11. When it is determined by the conversion interface 11 that data has not been transmitted, the process of step S8 is repeated. On the other hand, if it is determined that the data has been transmitted, the process proceeds to step S9, where the data is read from the conversion interface 11.
[0025]
Next, the process proceeds to step S10, and the number of data specified by the SCSI command (in this case Read (6)) transmitted from the personal computer 1 to the conversion interface 11 in step S5 is already passed through the conversion interface 11. It is determined whether data has been read from the SCSI device 21. When it is determined that data is not read from the SCSI device 21 through the conversion interface 11 for the designated number of data, the process returns to step S7 and the processes of steps S7 to S10 are repeated.
[0026]
On the other hand, in step S51 of FIG. 8D, when the specified number of data is read from the SCSI device 21 by the conversion interface 11, the SCSI device 21 transits to the status phase and is notified of this. (Time T15 in FIG. 7). In step S52, the conversion interface 11 notifies the personal computer 1 that the SCSI device 21 has shifted to the status phase via the serial bus 31 (time T16 in FIG. 7).
[0027]
When the personal computer 1 receives from the conversion interface 11 a notification notifying that the SCSI device 21 has transitioned to the status phase, the personal computer 1 sends a command to the conversion interface 11 via the serial bus 31 to instruct to read the status byte from the SCSI device 21. Send. The conversion interface 11 reads a status byte from the SCSI device 21 via the SCSI bus 32 in accordance with a command from the personal computer 1 and transmits it to the personal computer 1 via the serial bus 31.
[0028]
Next, the process proceeds to step S11, and a disconnect command instructing disconnection of the SCSI device 21 is transmitted to the conversion interface 11 via the serial bus 31 (time T19 in FIG. 7). The conversion interface 11 sends a command (disconnect command) for disconnecting the SCSI device 21 to the SCSI device 21 via the SCSI bus 32 in step S61 of FIG. And the SCSI device 21 is disconnected (time T20 in FIG. 7).
[0029]
In this way, the personal computer 1 can read predetermined data from the SCSI device 21 via the serial bus 31 and the conversion interface 11.
[0030]
Next, processing on the personal computer 1 side when the personal computer 1 writes predetermined data to the SCSI device 21 will be described with reference to the flowchart of FIG. 9. In this case, the description of the processing on the conversion interface 11 side is omitted, but is basically the same as the case of reading predetermined data from the SCSI device 21 described above with reference to FIG. That is, in FIG. 8C, “whether it has entered the data in phase” in step S43 is referred to as “whether it has entered the data out phase”, and in FIG. 8D, “data from the SCSI device in step S51”. “Read data” may be “Write data to SCSI device”.
[0031]
First, in step S <b> 71, the personal computer 1 transmits a SCSI device selection command to the conversion interface 11 via the serial bus 31. The conversion interface 11 that has received this command converts the SCSI device select command into a signal for the SCSI bus, and transmits it to the SCSI device 21 via the SCSI bus 32 in this case.
[0032]
Thereby, the SCSI device 21 is selected and transits to the message in phase. The SCSI device 21 notifies the conversion interface 11 via the SCSI bus 32. The conversion interface 11 that has received this notification from the SCSI device 21 notifies the personal computer 1 via the serial bus 31 that the SCSI device 21 has transitioned to the message in phase.
[0033]
Next, the process proceeds to step S72, where it is determined whether or not the personal computer 1 has transmitted from the conversion interface 11 a notification notifying that the state of the SCSI device 21 has shifted to the message in phase. When it is determined that the notification notifying the state transition of the SCSI device 21 to the message in phase has not been transmitted from the conversion interface 11, the process of step S72 is repeated. On the other hand, if it is determined from the conversion interface 11 that a notification indicating the transition of the SCSI device 21 to the message in phase has been transmitted, the process proceeds to step S73.
[0034]
In step S <b> 73, the personal computer 1 sends a message byte sending command and a message byte to the conversion interface 11 via the serial bus 31. The conversion interface 11 sends the message byte converted for the SCSI bus to the SCSI device 21 via the SCSI bus 32 based on the received message byte sending command.
[0035]
When the SCSI device 21 receives the message byte from the conversion interface 11, the SCSI device 21 transits to the command phase and notifies the conversion interface 11 of that. When the conversion interface 11 recognizes that the SCSI device 21 has transitioned to the command phase by this notification, the conversion interface 11 notifies the personal computer 1 via the serial bus 31 that the SCSI device 21 has transitioned to the command phase.
[0036]
Next, the process proceeds to step S74, where it is determined whether or not the personal computer 1 has transmitted a notification of the state transition of the SCSI device 21 from the conversion interface 11. When it is determined that the notification of the state transition of the SCSI device 21 has not been transmitted from the conversion interface 11, the process of step S74 is repeated. On the other hand, if it is determined from the conversion interface 11 that a notification of the state transition of the SCSI device 21 has been transmitted, the process proceeds to step S75.
[0037]
In step S75, the personal computer 1 transmits a SCSI command transmission command and a SCSI command (in this case, a Write (6) command which is a command to write data to the SCSI device 21) to the conversion interface 11. When receiving the SCSI command transmission command and the SCSI command from the personal computer 1, the conversion interface 11 converts the received SCSI command into a SCSI signal in accordance with the SCSI command transmission command, and transmits it to the SCSI device 21 via the SCSI bus 32. To do.
[0038]
The SCSI device 21 executes a predetermined process in accordance with the SCSI command transmitted from the conversion interface 11 via the SCSI bus 32, and transitions to the data out phase. Then, this is notified to the conversion interface 11. When the conversion interface 11 recognizes that the SCSI device 21 has transitioned to the data-out phase by this notification, the conversion interface 11 notifies the personal computer 1 via the serial bus 31 that the SCSI device 21 has transitioned to the data-out phase.
[0039]
Next, in step S76, it is determined whether or not the personal computer 1 has transmitted from the conversion interface 11 a notification notifying that the SCSI device 21 has transitioned to the data-out phase. When it is determined that the notification notifying that the state of the SCSI device 21 has transitioned to the data out phase has not been transmitted from the conversion interface 11, the process of step S76 is repeated.
[0040]
On the other hand, if it is determined that the notification indicating that the state of the SCSI device 21 has transitioned to the data-out phase has been transmitted from the conversion interface 11, the process proceeds to step S <b> 77, and the personal computer 1 sends the SCSI to the conversion interface 11. A write command for instructing to write predetermined data to the device 21 and a data byte are transmitted.
[0041]
In step S78, the personal computer 1 determines whether data has been transmitted from the conversion interface 11. If it is determined by the conversion interface 11 that data has not been transmitted, the process of step S78 is repeated. On the other hand, if it is determined from the conversion interface 11 that data has been transmitted, the process proceeds to step S79.
[0042]
In step S <b> 79, the personal computer 1 transmits data to be written to the SCSI device 21 to the conversion interface 11 via the serial bus 31. The conversion interface 11 converts the data received from the personal computer 1 via the serial bus 31 into a SCSI signal, and then transmits it to the SCSI device 21 via the SCSI bus 32. The SCSI device 21 writes data received from the conversion interface 11 via the SCSI bus 32 to a built-in disk (for example, when the SCSI device 21 is a hard disk).
[0043]
In step S80, the personal computer 1 determines whether or not data writing for the number of bytes designated by the SCSI command has been completed. If it is determined that the writing of the specified number of bytes of data has not been completed, the processes of steps S77 to S80 are repeated, and if it is determined that the writing of the specified number of bytes of data has been completed, step S81. Will proceed to.
[0044]
Further, when the writing of the designated number of data is completed, the SCSI device 21 transits to the status phase and notifies the conversion interface 11 via the SCSI bus 32.
[0045]
When the conversion interface 11 detects that the SCSI device 21 has transitioned to the status phase based on this notification, the conversion interface 11 notifies the personal computer 1 of this via the serial bus 31. When the personal computer 1 receives the notification from the conversion interface 11 and recognizes that the SCSI device 21 has transitioned to the status phase, the personal computer 1 serially sends a command for instructing the conversion interface 11 to read the status byte from the SCSI device 21. Transmit via bus 31.
[0046]
The conversion interface 11 reads the status byte from the SCSI device 21 via the SCSI bus 32 in accordance with a command from the personal computer 1 and transmits it to the personal computer 1 via the serial bus 31.
[0047]
Next, in step S <b> 81, the personal computer 1 transmits a command for instructing the conversion interface 11 to disconnect the SCSI device 21. The conversion interface 11 disconnects the SCSI device 21 in accordance with a command from the personal computer 1.
[0048]
In this way, the personal computer 1 can write predetermined data to the SCSI device 21 via the serial bus 31 and the conversion interface 11.
[0049]
[Problems to be solved by the invention]
In the conventional apparatus, since all the commands for controlling the SCSI device 21 are transmitted from the personal computer 1 to the conversion interface 11 via the serial bus 31 one by one, the versatility is high. Various SCSI devices can be controlled.
[0050]
However, when the frequency of data transfer between the personal computer 1 as the host computer, the conversion interface 11, and the SCSI device 21 increases, there is a problem that the operation speed of the entire system is slowed down.
[0051]
The present invention has been made in view of such a situation, and the personal computer 1 transmits a macro command in which a plurality of instructions are combined into one to the conversion interface 11, and the conversion interface 11 sequentially converts the macro command according to the macro command. By controlling the SCSI device 21, the number of data transmission / reception performed between the personal computer 1 and the conversion interface 11 is reduced, and the processing of the entire system can be speeded up.
[0052]
[Means for Solving the Problems]
The communication method according to claim 1 includes an information processing apparatus (for example, personal computer 1 in FIG. 1) having a high-speed serial bus (for example, serial bus 31 in FIG. 1) and a parallel bus (for example, SCSI (Small Computer System in FIG. 1)). Interface) is a communication method of a communication device (for example, the conversion interface 11 in FIG. 1) that is connected to a peripheral device (for example, the SCSI device 21 in FIG. 1) and controls communication therebetween. When a macro command is received from the information processing device, the command is sent via the parallel bus to select the peripheral device, and it is determined that the peripheral device selected by the command has transitioned to the message in phase. If the peripheral device that has sent the specified message byte to the peripheral device and has received the message byte has transitioned to the command phase If it is determined, a predetermined command is transmitted to the peripheral device, and if it is determined that the peripheral device that has received the command has transitioned to the data phase, according to the macro command,To repeat reading or writing data for the specified number of times,It is characterized by controlling an interface with a peripheral device and an interface with an information processing apparatus.
  The instruction can be a Read instruction or a Write instruction.
[0053]
  The communication apparatus according to claim 3 includes an information processing apparatus (for example, the personal computer 1 in FIG. 1) having a high-speed serial bus (for example, the serial bus 31 in FIG. 1) and a parallel bus (for example, the SCSI bus 32 in FIG. 1). A communication device that is connected to a peripheral device (for example, the SCSI device 21 in FIG. 1) and controls communication therebetween, and receives a macro command that combines a plurality of commands from the information processing device. The command means for commanding via the parallel bus to select the peripheral device (for example, the CPU 12a in FIG. 1 that executes the process of step S111 in FIG. 2), and the peripheral device selected by the command has transitioned to the message in phase If it is determined, first transmission control means for controlling transmission of a predetermined message byte to the peripheral device (for example, step S11 in FIG. 2). CPU 12a in FIG. 1 that executes the process of FIG. 1 and second transmission control means for controlling transmission of a predetermined command to the peripheral device when it is determined that the peripheral device that has received the message byte has transitioned to the command phase ( For example, if it is determined that the CPU 12a in FIG. 1 that executes the process of step S115 in FIG. 2 and the peripheral device that has received the instruction has transitioned to the data phase, according to the macro command,To repeat reading or writing data for the specified number of times,Control means for controlling the interface with the peripheral device and the interface with the information processing apparatus (for example, the CPU 12a in FIG. 1 that executes the process of step S117 in FIG. 2).
[0054]
  Also,Parallel bus and SCSI buscan do.
  Further, the instruction can be a Read instruction or a Write instruction.
[0055]
[Action]
  4. The communication method or apparatus according to claim 1, wherein when a macro command in which a plurality of instructions are combined into one is received from the information processing apparatus, the instruction is issued via the parallel bus to select a peripheral device. When it is determined that the peripheral device selected by has transitioned to the message in phase, a predetermined message byte is transmitted to the peripheral device, and when it is determined that the peripheral device that has received the message byte has transitioned to the command phase, A predetermined command is transmitted to the device. And when it is determined that the peripheral device that received the command has transitioned to the data phase, according to the macro command,To repeat reading or writing data for the specified number of times,The interface with the peripheral device and the interface with the information processing apparatus are controlled.
  In the communication method according to the second aspect, the command is a Read command or a Write command. Accordingly, it is possible to read data from the peripheral device or write data to the peripheral device.
[0056]
  Claim 4In the communication device described inThe parallel bus is a SCSI bus. Therefore, the SCSI device can be controlled.
  In the communication device according to the fifth aspect, the command is a Read command or a Write command. Accordingly, it is possible to read data from the peripheral device or write data to the peripheral device.
[0057]
【Example】
FIG. 1 is a block diagram showing a configuration of an embodiment of a personal computer system to which a communication apparatus of the present invention is applied. This personal computer system includes a personal computer (hereinafter abbreviated as a personal computer) 1 as a host computer, a conversion interface 11, and a SCSI (Small Computer System Interface) peripheral device (SCSI device) 21, and the personal computer 1 and the conversion interface 11. Is exchanged via the serial bus 31 such as RS232C or RS422, and data exchange between the conversion interface 11 and the SCSI device 21 is done via the SCSI bus 32. Yes.
[0058]
In the personal computer 1, a ROM 3a that constitutes the storage unit 3 stores a predetermined system program. The RAM 3b stores a predetermined application program.
[0059]
The calculation unit 2 includes a CPU 2a, and performs a predetermined calculation or process based on a system program or an application program stored in the ROM 3a or the RAM 3b.
[0060]
The serial communication unit 4 transmits predetermined data supplied from the arithmetic unit 2 via the system bus 5 via the serial bus 31, and communicates with the serial communication unit 14, which will be described later, constituting the conversion interface 11. The exchange of data is made.
[0061]
In the conversion interface 11, the ROM 13a constituting the storage unit 13 stores a predetermined system program. The RAM 13b is configured to store a predetermined application program.
[0062]
The calculation unit 12 is configured by a CPU 12a, and performs predetermined calculation or processing based on a system program or application program stored in the ROM 13a or the RAM 13b.
[0063]
The serial communication unit 14 transmits predetermined data supplied from the arithmetic unit 12 via the system bus 15 via the serial bus 31 and exchanges predetermined data with the serial communication unit 4 of the personal computer 1. Has been made to do.
[0064]
The SCSI control unit 16 transmits a predetermined command or data to the SCSI device 21 via the SCSI bus 32. In addition, data from the SCSI device 21 is received via the SCSI bus 32.
[0065]
The SCSI device 21 is composed of, for example, a hard disk or a CD-ROM, and the predetermined data transmitted from the conversion interface 11 via the SCSI bus 32 is written to the hard disk or read from the hard disk or CD-ROM. Are transmitted to the conversion interface 11 via the SCSI bus 32.
[0066]
Next, with reference to the flowchart of FIG. 2 and the time chart of FIG. 3, in this embodiment, the operation when the personal computer 1 reads predetermined data from the SCSI device 21 via the serial bus 31 will be described. . Here, FIG. 2A is a flowchart for explaining the operation of the host side, that is, the personal computer 1, and FIG. 2B is a flowchart for explaining the operation of the conversion interface 11 side.
[0067]
First, in step S101 of FIG. 2A, the CPU 2a constituting the personal computer 1 sends an interface command, for example, a SCSI device 21 to the conversion interface 11 to the serial communication unit 4 according to a predetermined application program. Command to send a command to read data for m blocks from block n.
[0068]
The serial communication unit 4 transmits a command to read data for m blocks from the block n of the SCSI device 21 to the conversion interface 11 according to a command from the CPU 2a via the serial bus 31 (time T31 in FIG. 3). .
[0069]
On the other hand, in step S111 of FIG. 2B, the serial communication unit 14 of the conversion interface 11 receives the command transmitted from the serial communication unit 4 via the serial bus 31, and supplies it to the CPU 12a. The CPU 12a instructs the SCSI control unit 16 via the system bus 15 to first select the SCSI device 21 in accordance with the command received from the personal computer 1 via the serial communication unit 14.
[0070]
The SCSI control unit 16 generates a control signal instructing to select the SCSI device 21 in accordance with an instruction from the CPU 12a, and transmits the control signal to the SCSI device 21 via the SCSI bus 32 (time T32 in FIG. 3). Thereby, the SCSI device 21 is selected, and the SCSI device 21 transits to the message in phase. Then, the SCSI device 21 notifies the conversion interface 11 of the transition to the message in phase (time T33 in FIG. 3).
[0071]
Next, in step S112, the CPU 12a of the conversion interface 11 determines whether or not the SCSI device 21 has transitioned to the message in phase, and if it is determined that the SCSI device 21 has not transitioned to the message in phase, The process of S112 is repeated. On the other hand, if it is determined that the SCSI device 21 has transitioned to the message in phase, the process proceeds to step S113.
[0072]
In step S113, the SCSI control unit 16 of the conversion interface 11 transmits a predetermined message byte to the SCSI device 21 via the SCSI bus 32 under the control of the CPU 12a (time T34 in FIG. 3).
[0073]
When the SCSI device 21 receives the message byte transmitted from the SCSI control unit 16, the SCSI device 21 transits to the command phase and notifies the conversion interface 11 of this (time T35 in FIG. 3). In step S114, the CPU 12a determines whether the SCSI device 21 has transitioned to the command phase.
[0074]
When it is determined that the SCSI device 21 has not transitioned to the command phase, the process of step S114 is repeated. On the other hand, if it is determined that the SCSI device 21 has transitioned to the command phase, the process proceeds to step S115.
[0075]
In step S115, the conversion interface 11 transmits a predetermined SCSI command, for example, a Read (6) command instructing to read predetermined data, to the SCSI device 21 via the SCSI bus 32 (FIG. 3). Time T36). The SCSI device 21 that has received this command makes a transition to the data in phase, and notifies this to the conversion interface 11 (time T37 in FIG. 3).
[0076]
Next, in step S116, the CPU 12a of the conversion interface 11 determines whether or not the SCSI device 21 has transitioned to the data in phase. When it is determined that the SCSI device 21 has not transitioned to the data in phase, the process of step S116 is repeated. On the other hand, if it is determined that the SCSI device 21 has transitioned to the data in phase, the process proceeds to step S117.
[0077]
In step S117, the CPU 12a of the conversion interface 11 controls the SCSI control unit 16 in accordance with the macro command (macro instruction) supplied from the personal computer 1, and receives predetermined data from the SCSI device 21 via the SCSI bus 32. Read (time T38 in FIG. 3).
[0078]
In step S118, the CPU 12a transmits the data read from the SCSI device 21 in step S117 to the personal computer 1 via the serial communication unit 14 and the serial bus 31 (time T39 in FIG. 3).
[0079]
On the other hand, in the personal computer 1, in step S <b> 102, the CPU 2 a determines whether data has been transmitted from the conversion interface 11 via the serial bus 31. If it is determined that no data has been transmitted, the process of step S102 is repeated. On the other hand, if it is determined that data has been transmitted, the process proceeds to step S103, and the transmitted data is read.
[0080]
Next, in step S104, it is determined whether or not data has been read as many times as specified by the macro command. When it is determined that the reading of data for the designated number of times has not been completed, the processes of steps S102 to S104 are repeated.
[0081]
In the conversion interface 11, the process proceeds to step S119, and the CPU 12a transmits the data by the number of times specified by the macro command supplied from the personal computer 1 from the SCSI device 21 via the SCSI control unit 16 and the SCSI bus 32. Whether or not is read out is determined.
[0082]
When it is determined that the data has not been read by the designated number of times, the CPU 12a returns to step S117 and repeats the processes of steps S117 to S119. Thereby, also in the personal computer 1, the process of step S102 thru | or S104 is repeated as mentioned above. On the other hand, if it is determined that the data has been read by the designated number of times, the process proceeds to step S120.
[0083]
When the conversion interface 11 reads the specified number of times from the SCSI device 21, the SCSI device 21 shifts to the status phase and notifies the conversion interface 11 of this (time T40 in FIG. 3).
[0084]
On the other hand, in the personal computer 1 as well, in step S104, it is determined that the data reading for the designated number of times has been completed, and the processing is terminated.
[0085]
The conversion interface 11 reads the status byte from the SCSI device 21 via the SCSI bus 32 (time T41 in FIG. 3), and transmits it to the personal computer 1 if necessary.
[0086]
In step S120, the conversion interface 11 transmits a disconnect command to the SCSI device 21 via the SCSI bus 32 to disconnect the SCSI device 21.
[0087]
In this way, the personal computer 1 transmits a predetermined macro command only once to the conversion interface 11 via the serial bus 31, so that no command is exchanged with the conversion interface 11 thereafter. Predetermined data can be read from the device 21. As described above, by using the macro command, it is possible to reduce the number of commands or data transmitted between the personal computer 1 and the conversion interface 11 and the amount of data.
[0088]
Next, the operation when the personal computer 1 writes predetermined data to the SCSI device 21 via the serial bus 31 in this embodiment will be described with reference to the flowchart shown in FIG. Here, FIG. 4A is a flowchart for explaining the operation of the host side, that is, the personal computer 1, and FIG. 4B is a flowchart for explaining the operation of the conversion interface 11 side.
[0089]
First, in step S131 of FIG. 4A, the CPU 2a constituting the personal computer 1 sends an interface command such as the SCSI device 21 to the conversion interface 11 to the serial communication unit 4 according to a predetermined application program. A command to write predetermined data for m blocks from block n is sent.
[0090]
The serial communication unit 4 transmits, via the serial bus 31, a command to write data for m blocks from the block n of the SCSI device 21 to the conversion interface 11 in accordance with a command from the CPU 2 a.
[0091]
On the other hand, in step S141 of FIG. 4B, the serial communication unit 14 of the conversion interface 11 receives the command transmitted from the serial communication unit 4 via the serial bus 31, and supplies it to the CPU 12a. The CPU 12 a instructs the SCSI control unit 16 to select the SCSI device 21 via the system bus 15 in accordance with an instruction from the personal computer 1 received via the serial communication unit 14.
[0092]
The SCSI control unit 16 generates a control signal instructing to select the SCSI device 21 in accordance with an instruction from the CPU 12 a and transmits the control signal to the SCSI device 21 via the SCSI bus 32. As a result, the SCSI device 21 is selected, and the SCSI device 21 transits to the message in phase, and notifies the conversion interface 11 via the SCSI bus 32.
[0093]
Next, in step S142, the CPU 12a of the conversion interface 11 determines whether or not the SCSI device 21 has entered the message in phase, and if it is determined that the SCSI device 21 has not entered the message in phase, the process proceeds to step S142. The process is repeated. On the other hand, when it is determined that the SCSI device 21 has entered the message in phase, the process proceeds to step S143.
[0094]
In step S143, the SCSI control unit 16 of the conversion interface 11 transmits a predetermined message byte to the SCSI device 21 via the SCSI bus 32 under the control of the CPU 12a.
[0095]
When the SCSI device 21 receives the message byte transmitted from the SCSI control unit 16, the SCSI device 21 transits to the command phase and notifies the conversion interface 11 of it. In step S144, the CPU 12a determines whether the SCSI device 21 has transitioned to the command phase.
[0096]
When it is determined that the SCSI device 21 has not transitioned to the command phase, the process of step S144 is repeated. On the other hand, if it is determined that the SCSI device 21 has transitioned to the command phase, the process proceeds to step S145.
[0097]
In step S 145, the conversion interface 11 transmits a predetermined SCSI command, for example, a Write (6) command for instructing to write predetermined data, to the SCSI device 21 via the SCSI bus 32. The SCSI device 21 that has received this command makes a transition to the data-out phase and notifies the conversion interface 11 of that.
[0098]
Next, in step S146, the CPU 12a of the conversion interface 11 determines whether or not the SCSI device 21 has transitioned to the data out phase. When it is determined that the SCSI device 21 has not transitioned to the data out phase, the process of step S146 is repeated. On the other hand, when it is determined that the SCSI device 21 has transitioned to the data-out phase, the process proceeds to step S147.
[0099]
On the other hand, in the personal computer 1, in step S <b> 132, for example, predetermined data to be written to the SCSI device 21 stored in the RAM 3 b is read by the CPU 2 a and is sent to the conversion interface 11 via the serial communication unit 4 and the serial bus 31. Sent.
[0100]
Next, proceeding to step S133, the CPU 2a determines whether or not data has been written as many times as specified by the macro command. When it is determined that the data writing for the designated number of times has not been completed, the processes in steps S132 and S133 are repeated.
[0101]
In the conversion interface 11, in step S 147, the CPU 12 a controls the serial communication unit 14 according to the macro command supplied from the personal computer 1 and writes data to the SCSI device 21 from the personal computer 1 via the serial bus 31. Receive predetermined data.
[0102]
Next, proceeding to step S149, whether or not the CPU 12a has written data to the SCSI device 21 through the SCSI control unit 16 and the SCSI bus 32 by the number of times specified by the macro command supplied from the personal computer 1. Is determined.
[0103]
When it is determined that data has not been written for the designated number of times, the process returns to step S147, and the processes of steps S147 to S149 are repeated. Thereby, also in the personal computer 1, the process of step S132, S133 is repeated as mentioned above. On the other hand, if it is determined that data has been written for the designated number of times, the process proceeds to step S150.
[0104]
On the other hand, in the personal computer 1 as well, in step S133, it is determined that the data writing for the designated number of times has been completed, and the processing is ended.
[0105]
When the SCSI device 21 writes data for the designated number, it shifts to the status phase and notifies the conversion interface 11 of that. Then, the conversion interface 11 reads the status byte from the SCSI device 21 via the SCSI bus 32. If necessary, it is sent to the personal computer 1.
[0106]
In step S150, the conversion interface 11 transmits a disconnect command to the SCSI device 21 via the SCSI bus 32 to disconnect the SCSI device 21.
[0107]
In this way, the personal computer 1 transmits a predetermined macro command to the conversion interface 11 only once via the serial bus 31, and thereafter exchanges commands or data with the conversion interface 11. The predetermined data can be written to the SCSI device 21 without any problem. As described above, by using the macro command, it is possible to reduce the number of commands or data transmitted between the personal computer 1 and the conversion interface 11 and the amount of data.
[0108]
In the above embodiment, the communication method and apparatus according to the present invention is applied to a personal computer system configured by a personal computer. However, the present invention is not limited to a personal computer, but a small portable information terminal, an electronic notebook, or the like. It is also possible to apply to an electronic device in which a microcomputer is mounted.
[0109]
In the above-described embodiments, the case where data and commands are transmitted / received to / from a SCSI device compatible with the SCSI bus standard via a serial bus has been described. However, the present invention is not limited to this, and parallel buses of other standards are used. It is also possible to send and receive data and commands to and from an electronic device that supports the above via a serial bus.
[0110]
【The invention's effect】
  According to the communication method or apparatus according to claim 1 or 3, when a macro command in which a plurality of instructions are combined into one is received from the information processing apparatus, an instruction is given via the parallel bus to select a peripheral device, When it is determined that the peripheral device selected by the command has transitioned to the message in phase, when it is determined that the peripheral device that has transmitted the predetermined message byte and has received the message byte has transitioned to the command phase, When it is determined that the peripheral device that has transmitted the predetermined command to the peripheral device and has received the command has transitioned to the data phase, according to the macro command,To repeat reading or writing data for the specified number of times,Since the interface with the peripheral device and the interface with the information processing apparatus are controlled, the information processing apparatus can control the peripheral device via the serial bus. Further, by transmitting only one macro command via the serial bus, a plurality of commands corresponding to the macro command can be sequentially transmitted to the peripheral device via the parallel bus, and the peripheral device can be controlled. Therefore, when controlling a SCSI device, the number of communication between devices and the amount of data can be reduced, and the processing can be simplified and speeded up. As a result, the processing efficiency can be improved.
  In the communication method according to the second aspect, since the instruction is a Read instruction or a Write instruction, predetermined data can be read from or written to the peripheral device.
[0111]
  Claim 4According to the communication device described inParallel bus and SCSI busSoThe SCSI device can be controlled.
  According to the communication device of the fifth aspect, since the command is the Read command or the Write command, the peripheral deviceIt is possible to read predetermined data or write predetermined data to the predetermined data.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an embodiment of a personal computer system to which a communication method and apparatus of the present invention is applied.
FIG. 2 is a flowchart for explaining a processing procedure when predetermined data is read from a SCSI device 21 by the personal computer 1 via the conversion interface 11 in the embodiment of FIG.
FIG. 3 is a time chart when predetermined data is read from the SCSI device 21 by the personal computer 1 via the conversion interface 11;
FIG. 4 is a flowchart for explaining a processing procedure when predetermined data is written to a SCSI device 21 by a personal computer 1 via a conversion interface 11;
FIG. 5 is a block diagram showing a configuration of an example of a conventional personal computer system.
6 is a flowchart for explaining a processing procedure on the personal computer 1 side when predetermined data is read from the SCSI device 21 by the personal computer 1 via the conversion interface 11 in the personal computer system of FIG. 5;
FIG. 7 is a time chart when predetermined data is read from the SCSI device 21 by the personal computer 1 via the conversion interface 11 in FIG.
8 is a flowchart for explaining a processing procedure on the conversion interface 11 side when predetermined data is read out by the personal computer 1 via the conversion interface 11 in the personal computer system of FIG. 5;
9 is a flowchart for explaining a processing procedure on the personal computer 1 side when predetermined data is written to the SCSI device 21 by the personal computer 1 via the conversion interface 11 in the personal computer system of FIG.
[Explanation of symbols]
1 PC
2 Calculation unit
2a CPU
3 storage unit
3a ROM
3b RAM
4 Serial communication part
5 System bus
11 Conversion interface
12 Calculation unit
12a CPU
13 Memory unit
13a ROM
13b RAM
14 Serial communication part
15 System bus
16 SCSI controller
21 SCSI equipment
31 Serial bus
32 SCSI bus

Claims (5)

高速なシリアルバスを有する情報処理装置と、パラレルバスを有する周辺機器との間に接続され、その間の通信を制御する通信装置の通信方法であって、
複数の命令を1つにまとめたマクロコマンドを前記情報処理装置から受信した場合、前記周辺機器をセレクトするよう前記パラレルバスを介して指令し、
前記指令によりセレクトされた前記周辺機器がメッセージインフェーズに遷移したと判断された場合、前記周辺機器に所定のメッセージバイトを送信し、
前記メッセージバイトを受信した前記周辺機器がコマンドフェーズに遷移したと判断された場合、前記周辺機器に所定の命令を送信し、
前記命令を受信した前記周辺機器がデータフェーズに遷移したと判定された場合、前記マクロコマンドに従って、指定された回数分のデータの読み出しまたはデータの書き込みを繰り返すように、前記周辺機器とのインターフェースおよび前記情報処理装置とのインターフェースを制御する
ことを特徴とする通信方法。
A communication method of a communication device that is connected between an information processing device having a high-speed serial bus and a peripheral device having a parallel bus and controls communication therebetween,
When a macro command that combines a plurality of instructions into one is received from the information processing apparatus, the peripheral device is instructed to be selected via the parallel bus,
When it is determined that the peripheral device selected by the command has transitioned to the message in phase, a predetermined message byte is transmitted to the peripheral device,
When it is determined that the peripheral device that has received the message byte has transitioned to the command phase, a predetermined command is transmitted to the peripheral device,
When it is determined that the peripheral device that has received the command has transitioned to the data phase, the interface with the peripheral device and the data are repeatedly read or written a specified number of times in accordance with the macro command, and A communication method comprising controlling an interface with the information processing apparatus.
前記命令は、Read命令またはWrite命令である
ことを特徴とする請求項1に記載の通信方法。
The communication method according to claim 1, wherein the command is a Read command or a Write command.
高速なシリアルバスを有する情報処理装置と、パラレルバスを有する周辺機器との間に接続され、その間の通信を制御する通信装置であって、
複数の命令を1つにまとめたマクロコマンドを前記情報処理装置から受信した場合、前記周辺機器をセレクトするよう前記パラレルバスを介して指令する指令手段と、
前記指令によりセレクトされた前記周辺機器がメッセージインフェーズに遷移したと判断された場合、前記周辺機器への所定のメッセージバイトの送信を制御する第1の送信制御手段と、
前記メッセージバイトを受信した前記周辺機器がコマンドフェーズに遷移したと判断された場合、前記周辺機器への所定の命令の送信を制御する第2の送信制御手段と、
前記命令を受信した前記周辺機器がデータフェーズに遷移したと判定された場合、前記マクロコマンドに従って、指定された回数分のデータの読み出しまたはデータの書き込みを繰り返すように、前記周辺機器とのインターフェースおよび前記情報処理装置とのインターフェースを制御する制御手段と
を備えることを特徴とする通信装置。
A communication device that is connected between an information processing device having a high-speed serial bus and a peripheral device having a parallel bus and controls communication therebetween,
Command means for instructing via the parallel bus to select the peripheral device when a macro command in which a plurality of instructions are combined into one is received from the information processing apparatus;
First transmission control means for controlling transmission of a predetermined message byte to the peripheral device when it is determined that the peripheral device selected by the command has transitioned to the message in phase;
A second transmission control means for controlling transmission of a predetermined command to the peripheral device when it is determined that the peripheral device that has received the message byte has transitioned to a command phase;
When it is determined that the peripheral device that has received the command has transitioned to the data phase, the interface with the peripheral device and the data are repeatedly read or written a specified number of times in accordance with the macro command, and And a control means for controlling an interface with the information processing apparatus.
前記パラレルバスは、SCSIバスである
ことを特徴とする請求項3に記載の通信装置。
The communication device according to claim 3, wherein the parallel bus is a SCSI bus.
前記命令は、Read命令またはWrite命令である
ことを特徴とする請求項3に記載の通信装置。
The communication device according to claim 3, wherein the command is a Read command or a Write command.
JP29635594A 1994-11-30 1994-11-30 Communication method and apparatus Expired - Lifetime JP3980661B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29635594A JP3980661B2 (en) 1994-11-30 1994-11-30 Communication method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29635594A JP3980661B2 (en) 1994-11-30 1994-11-30 Communication method and apparatus

Publications (2)

Publication Number Publication Date
JPH08153063A JPH08153063A (en) 1996-06-11
JP3980661B2 true JP3980661B2 (en) 2007-09-26

Family

ID=17832483

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29635594A Expired - Lifetime JP3980661B2 (en) 1994-11-30 1994-11-30 Communication method and apparatus

Country Status (1)

Country Link
JP (1) JP3980661B2 (en)

Also Published As

Publication number Publication date
JPH08153063A (en) 1996-06-11

Similar Documents

Publication Publication Date Title
KR101357162B1 (en) Apparatus, method and system to control communication between host apparatus and USB apparatus
JPH10207804A (en) Dummy terminal system and dummy terminal equipment
JP3980661B2 (en) Communication method and apparatus
JPH07143202A (en) Method for constituting system, method for constituting device, controller and system
KR200234895Y1 (en) Apparatus for using usb function of data exchange
JP3178521B2 (en) adapter
JPH11316628A (en) Data exchange device
KR100917193B1 (en) Device for sharing input means of mobile phone and computer and thereof method
JP4047854B2 (en) Device-to-device serial communication method and apparatus
JP2003114808A (en) Transmitting and receiving unit for data transfer and method for updating program in the same
KR200221933Y1 (en) Wire and wireless interfacing apparatus for computer
JP3677533B2 (en) Bidirectional transfer method
JP2003110578A (en) Radio equipment, wireless communication system, transmission system selecting method, and storage medium
JPH0670054A (en) Facsimile adapter equipment
JPH09282271A (en) Communication equipment and control method therefor
JPH01174042A (en) Line control system
JP2948380B2 (en) Data communication device
JP2784186B2 (en) Information processing device
JP2000047965A (en) Information processor
KR100288116B1 (en) File and directory transfer system between host computer and guest computer
JP3268839B2 (en) Game data communication device using satellite communication
JPH01101060A (en) Facsimile communication adapter sharing system
JPH11212908A (en) Interface box
JP2004128644A (en) Vehicle-mounted information processing apparatus, control method, control program, and recording medium
US20030112769A1 (en) Communication sequence, data circuit-terminating equipment, data terminal equipment, and storage medium storing communication control program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040107

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040305

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040412

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040610

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20040615

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20040827

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070628

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

Free format text: PAYMENT UNTIL: 20100706

Year of fee payment: 3