JP2948380B2 - Data communication device - Google Patents

Data communication device

Info

Publication number
JP2948380B2
JP2948380B2 JP3294168A JP29416891A JP2948380B2 JP 2948380 B2 JP2948380 B2 JP 2948380B2 JP 3294168 A JP3294168 A JP 3294168A JP 29416891 A JP29416891 A JP 29416891A JP 2948380 B2 JP2948380 B2 JP 2948380B2
Authority
JP
Japan
Prior art keywords
data
scsi
host computer
communication adapter
communication
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 - Fee Related
Application number
JP3294168A
Other languages
Japanese (ja)
Other versions
JPH05136928A (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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP3294168A priority Critical patent/JP2948380B2/en
Publication of JPH05136928A publication Critical patent/JPH05136928A/en
Application granted granted Critical
Publication of JP2948380B2 publication Critical patent/JP2948380B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Facsimiles In General (AREA)
  • Bus Control (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明はSCSIバスを有するコンピ
ュ−タシステムに用いるデータ通信装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data communication device used in a computer system having a SCSI bus.

【0002】[0002]

【従来の技術】従来、ホストコンピュータのSCSIバスに
通信アダプタを接続して通信機能を持たせた装置があ
る。ここで、SCSI(Small Computer System Interface)
とは、ANSI(American National Standard Institute)に
よって制定された規格である。その仕様上、命令を出す
イニシエータと、命令を受け取り実行するターゲットと
の間でコマンド, データの転送が行われる。
2. Description of the Related Art Conventionally, there is a device having a communication function by connecting a communication adapter to a SCSI bus of a host computer. Here, SCSI (Small Computer System Interface)
Is a standard established by the American National Standard Institute (ANSI). Due to its specifications, commands and data are transferred between an initiator that issues an instruction and a target that receives and executes the instruction.

【0003】このようなSCSIバスを用いた、ファクシミ
リアダプタ等を持つ従来装置では、ホストコンピュータ
と通信アダプタは、それぞれSCSIのイニシエータ(命令
を出す側)としての機能とターゲット(命令を受ける
側)としての機能を合わせ持っていた(特開平3-38163
号公報)。したがって、ホストコンピュタ−と通信アダ
プタ間のデ−タ通信において、その都度データを送信す
る側がイニシエータ、受信する側がタ−ゲットとなりデ
ータを送信することにより双方向のデータ通信を実現し
ていた。
In a conventional apparatus having a facsimile adapter or the like using such a SCSI bus, a host computer and a communication adapter have a function as a SCSI initiator (a side that issues instructions) and a function as a target (a side that receives instructions). (Japanese Patent Laid-Open No. 3-38163)
No.). Therefore, in the data communication between the host computer and the communication adapter, bidirectional data communication has been realized by transmitting data in each case as the initiator transmitting data and the receiving side as the target.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、ホスト
コンピュータとして使用されるパソコン, ワークステー
ションはSCSIのイニシエータの機能のみを持つものが多
く、このようなパソコン、ワークステーションを上記従
来装置のホストコンピュータとしては使用できないもの
であった。なぜなら、ホストコンピュータがイニシエー
タの機能のみを備え、通信アダプタがターゲットの機能
のみを備えている場合、ターゲットである通信アダプタ
は外部から通信回線を介してデータが届いたことをイニ
シエータであるホストコンピュータに知らせることが困
難であるという問題を有し、このため通信アダプタがホ
ストコンピュータにデータを送信したくても、自らデー
タを送信することができないからである。
However, many personal computers and workstations used as host computers have only the function of a SCSI initiator. Such personal computers and workstations are used as host computers of the above-mentioned conventional devices. It could not be used. Because, when the host computer has only the function of the initiator and the communication adapter has only the function of the target, the communication adapter as the target notifies the host computer as the initiator that data has arrived from the outside via the communication line. This is because it has a problem that it is difficult to notify the user, and therefore, even if the communication adapter wants to transmit data to the host computer, it cannot transmit the data by itself.

【0005】また、通信アダプタを有しない既存のコン
ピュータシステムに対して、通信アダプタを付加する場
合、そのホストコンピュータがSCSIバスを有していて
も、イニシエータ・ターゲット両方の機能がなければ、
簡単に付加することができないという問題がある。とい
うのは、ホストコンピュータがイニシエータの機能のみ
を備えている既存のシステムに対して、あえて従来の手
法を使用するとすれば、ホストコンピュータがターゲッ
ト機能をも有するようにハード・ファーム等の改造や変
更が必要になり、そのための改造工数や費用が多大にか
かることになるからである。
In addition, when a communication adapter is added to an existing computer system having no communication adapter, even if the host computer has a SCSI bus, if the host computer does not have the functions of both the initiator and the target,
There is a problem that it cannot be easily added. This is because, if an existing system in which the host computer has only the function of the initiator is to be used in the conventional method, if the host computer also has the target function, it is necessary to modify or change the hardware or the like so that the host computer also has the target function. Is required, and the remodeling man-hour and cost for that are greatly increased.

【0006】本発明は上記問題点を解決するために、ホ
ストコンピュータがSCSIのイニシエータの機能のみを持
つホストコンピュータとターゲットの機能のみを持つ通
信アダプタとの間でSCSIを利用した双方向のデータ通信
機能を提供することを目的としている。
In order to solve the above-mentioned problems, the present invention provides a bidirectional data communication using SCSI between a host computer having only a SCSI initiator function and a communication adapter having only a target function. It is intended to provide functions.

【0007】[0007]

【課題を解決するための手段】上記課題を解決するため
に本発明は、SCSIバスを有するコンピュ−タシステムで
用いるデータ通信装置であって、タ−ゲットとしてのSC
SI機能を有し前記SCSIバスに接続される通信アダプタ
と、イニシエ−タとしてのSCSI機能を有し前記SCSIバス
に接続されるホストコンピュ−タと、を備え、前記ホス
トコンピュ−タは、前記通信アダプタに外部から受信し
たデータがあるか否かを、SCSIコマンドを用いて定期的
に確認する手段を有することを特徴とする。
SUMMARY OF THE INVENTION In order to solve the above-mentioned problems, the present invention relates to a data communication device used in a computer system having a SCSI bus, wherein the data communication device is an SC as a target.
A communication adapter having an SI function and connected to the SCSI bus; and a host computer having a SCSI function as an initiator and connected to the SCSI bus, wherein the host computer is It is characterized in that the communication adapter has means for periodically checking whether or not there is data received from the outside by using a SCSI command.

【0008】さらに、前記ホストコンピュータは、更に
前記確認手段にて外部から受信したデ−タがあると判明
した場合に、そのデ−タ長を調べる手段を有してもよ
い。また、ホストコンピュータが通信アダプタに受信す
るデータがあるか否かを確認する手段は、UNIX(登録商
標)のシステムコールselectで実行してもよい。そし
て、前記通信アダプタは、前記通信アダプタの動作を前
記SCSIバスに対してターゲットとして制御すると共に通
信アダプタ内部を制御する CPUと、前記CPU の制御プロ
グラムを記憶する ROMと、通信回線を有し外部とデータ
の送受信をする通信制御部と、ターゲットとしての機能
を持ち、前記ホストコンビュータと前記SCSIバスを介し
てデータの送受信を行うSCSI制御部と、前記SCSI制御部
および前記通信制御部が送受信するデータを記憶するバ
ッファメモリとからなることもできる。
Further, the host computer may further comprise means for examining the data length when the confirmation means finds that there is data received from outside. The means by which the host computer checks whether there is data to be received by the communication adapter is UNIX (registered trademark).
May be performed in the system call select the target). The communication adapter controls the operation of the communication adapter as a target for the SCSI bus and controls the inside of the communication adapter, a ROM for storing a control program for the CPU, and an external A communication control unit for transmitting and receiving data to and from the host computer, a SCSI control unit for transmitting and receiving data via the SCSI bus with the host computer, and the SCSI control unit and the communication control unit for transmitting and receiving data. It can also comprise a buffer memory for storing data.

【0009】[0009]

【作用】上記の構成により、本発明のデータ通信装置に
おいては、ホストコンピュ−タが、前記通信アダプタに
外部から受信したデータがあるか否かを、SCSIコマンド
を用いて定期的に確認する。このことにより、SCSIのイ
ニシエータの機能のみを持つホストコンピュータとSCSI
のターゲット機能のみを持つ通信アダプタの間で、SCSI
を利用した双方向のデータ通信を行うことが可能にな
る。
With the above arrangement, in the data communication apparatus of the present invention, the host computer periodically checks whether or not there is data received from the outside at the communication adapter by using a SCSI command. This allows a host computer with only the function of a SCSI initiator and a SCSI
SCSI between communication adapters with only
, It is possible to perform bidirectional data communication.

【0010】[0010]

【実施例】以下、本発明の一実施例について図面を参照
しながら説明する。図1は、本発明の一構成例を示すブ
ロック図である。1は、ホストコンピュータであり、各
種演算処理を行うと共にハードディスク、メモリ等の記
憶手段を備え、テキストデータや画像データ等の通信デ
ータを作成、記憶、保存できる。ホストコンピュータ1
はSCSIのイニシエータとしての機能を備えており、SCSI
バスを介して通信アダプタ2にSCSIコマンドを送る。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing one configuration example of the present invention. Reference numeral 1 denotes a host computer, which performs various arithmetic processes and includes storage means such as a hard disk and a memory, and can create, store, and save communication data such as text data and image data. Host computer 1
Has a function as a SCSI initiator.
A SCSI command is sent to the communication adapter 2 via the bus.

【0011】2は、通信アダプタであり、SCSIのターゲ
ットとしての機能を備え、ホストコンピュータ1 からの
SCSIコマンドに従って、ホストコンピュータ1のデータ
を外部に送信、あるいは外部から受信したデータをホス
トコンピュータ1に送る。これらのデータ転送を制御す
るために、通信アダプタ2は、ソフトウェアレジスタあ
るいはハードウェアレジスタで2種類のステータス情報
を持つ。1つは、通信回線ステータスであり、外部から
通信アダプタ2にデータを送ろうとしている状態を示
す。もう1つは、SCSIステータスであり、受信データビ
ットと送信データビットを合わせ持つ。受信データビッ
トは、SCSIバスを介してホストコンピュータ1に送るべ
きデータを外部から受信したことを示す。送信データビ
ットは、外部へ送るべきデータをホストコンピュータ1
からSCSIバスを介して受け取ったことを示す。
Reference numeral 2 denotes a communication adapter, which has a function as a SCSI target, and is provided from the host computer 1.
According to the SCSI command, data of the host computer 1 is transmitted to the outside, or data received from the outside is transmitted to the host computer 1. In order to control these data transfers, the communication adapter 2 has two types of status information using software registers or hardware registers. One is a communication line status, which indicates a state in which data is to be sent to the communication adapter 2 from outside. The other is a SCSI status, which has both reception data bits and transmission data bits. The received data bit indicates that data to be sent to the host computer 1 via the SCSI bus has been received from the outside. The transmission data bit indicates the data to be transmitted to the outside by the host computer 1.
Indicates that it has been received from the SCSI bus.

【0012】3は、ホストコンピュータ1と通信アダプ
タ2が接続されるSCSIバスである。4は、通信アダプタ
2に接続された通信回線である。図2は、前記通信アダ
プタ2の一構成例を示すブロック図である。5は、 CPU
であり、通信アダプタの動作をSCSIバスに対してターゲ
ットとして制御するとともに通信アダプタ内部を制御す
る。
Reference numeral 3 denotes a SCSI bus to which the host computer 1 and the communication adapter 2 are connected. Reference numeral 4 denotes a communication line connected to the communication adapter 2. FIG. 2 is a block diagram showing a configuration example of the communication adapter 2. 5 is CPU
And controls the operation of the communication adapter as a target for the SCSI bus and controls the inside of the communication adapter.

【0013】6は、 ROMであり、 CPU5の制御プログラ
ムを記憶する。7は、通信制御部であり、通信回線4を
介して外部とデータの送受信をする。8は、SCSI制御部
であり、ターゲットとしての機能を持ち、ホストコンビ
ュータ1とSCSIバス3を介してデータの送受信を行う。
9は、バッファメモリ(半導体メモリを使用。)であ
り、SCSI制御部8が送受信するデータや通信制御部7が
送受信するデータを記憶する。バッファメモリ9は、半
導体メモリを使用するほか、ハードディスクや他の記憶
手段でもよい。
Reference numeral 6 denotes a ROM for storing a control program for the CPU 5. Reference numeral 7 denotes a communication control unit which transmits and receives data to and from the outside via the communication line 4. Reference numeral 8 denotes a SCSI controller, which has a function as a target, and transmits and receives data to and from the host computer 1 via the SCSI bus 3.
Reference numeral 9 denotes a buffer memory (using a semiconductor memory), which stores data transmitted and received by the SCSI control unit 8 and data transmitted and received by the communication control unit 7. The buffer memory 9 may use a semiconductor memory, or may be a hard disk or other storage means.

【0014】図3は、前記通信アダプタ2から前記ホス
トコンピュータ1へデータを送信するときの、ホストコ
ンピュータ1側のフローであり、前記ホストコンピュー
タ1が、通信アダプタ2に外部から受信したデータがあ
るか否かを確認する手段、および前記確認手段にて外部
から受信したデ−タがあると判明した場合に、そのデ−
タ長を調べる手段からなる手順を示している。
FIG. 3 shows a flow on the host computer 1 side when data is transmitted from the communication adapter 2 to the host computer 1. The host computer 1 has data received from the outside on the communication adapter 2. Means for confirming whether or not there is data received from the outside by the confirming means;
4 shows a procedure including means for checking the data length.

【0015】以上のように構成された本発明の実施例に
おいて、ターゲットである通信アダプタ2から、イニシ
エータであるホストコンピュータ1へデータを送信する
動作を、図面に基づいて説明する。まず、ホストコンピ
ュータ1 は受け取るべきデータが通信アダプタ2にある
か否かを調べる(図3のS31)。その実現方法の一つ
として、ホストコンピュータ1はSCSIコマンドのTEST U
NIT READY (表2のコマンド一覧参照)を通信アダプタ
2に送る。SCSIのターゲットは通常SCSIコマンドに対し
ステータスを返す。このステータスの一覧を表1に示
す。
The operation of transmitting data from the communication adapter 2 as the target to the host computer 1 as the initiator in the embodiment of the present invention configured as described above will be described with reference to the drawings. First, the host computer 1 checks whether data to be received is present in the communication adapter 2 (S31 in FIG. 3). As one of the realization methods, the host computer 1 transmits the SCSI command TEST U
Send NIT READY (see the command list in Table 2) to the communication adapter 2. SCSI targets usually return status for SCSI commands. Table 1 shows a list of the statuses.

【0016】[0016]

【表1】 [Table 1]

【0017】[0017]

【表2】 [Table 2]

【0018】このTEST UNIT READY コマンドに対し、本
実施例の通信アダプタ2は、ホストコンピュータ1が
受け取るべきデータがない場合はGOODを返し、また、
ホストコンピュータ1が受け取るべきデータがある場合
はステータスとしてCONDITION MET を返すようにしてい
る(ステータスを返す通信アダプタ2内部の処理につい
ては図8参照)ので、ホストコンピュータ1は通信アダ
プタ2のデータ着信状態を確認することができる。
In response to the TEST UNIT READY command, the communication adapter 2 of this embodiment returns GOOD when there is no data to be received by the host computer 1, and
When there is data to be received by the host computer 1, the CONDITION MET is returned as the status (see FIG. 8 for the internal processing of the communication adapter 2 for returning the status). Can be confirmed.

【0019】ホストコンピュータ1からのSCSIコマンド
に対して、通信アダプタ2からステータスを返す動作
は、通信アダプタ2の内部での割り込み処理により行わ
れる。この割り込み処理を、図8のフローに基づき説明
する。通信アダプタ2がSCSIのターゲットとしてセレク
トされた場合、通信アダプタ2内のSCSI制御部8から C
PU5に対し割り込みが発生する(S81)。この割り込
み処理では、ホストコンピュータ1からのSCSIコマンド
に応じてそのコマンドを実行する(S82)。たとえ
ば、TEST UNIT READY コマンドに対し、通信アダプタ
2内部のSCSIステータスの受信データビットが”0”な
らば、ホストコンピュータ1が受け取るべきデータがな
いので、ステータスGOODを返し、また、受信データビ
ットが”1”ならば、ホストコンピュータ1が受け取る
べきデータがある場合はステータスとしてCONDITION ME
T を返す。
The operation of returning a status from the communication adapter 2 in response to a SCSI command from the host computer 1 is performed by interrupt processing inside the communication adapter 2. This interrupt processing will be described with reference to the flow of FIG. If the communication adapter 2 is selected as a SCSI target, the SCSI controller 8 in the communication adapter 2
An interrupt occurs for PU5 (S81). In this interrupt processing, the command is executed in response to a SCSI command from the host computer 1 (S82). For example, in response to the TEST UNIT READY command, if the received data bit of the SCSI status inside the communication adapter 2 is “0”, there is no data to be received by the host computer 1, and the status GOOD is returned. If "1", if there is data to be received by the host computer 1, the status is CONDITION ME
Returns T.

【0020】そして CPU5は、SCSIコマンドに応じてそ
のコマンドを実行するとともに、前記SCSIコマンドがデ
ータ転送を伴うコマンドであったか否かを判断し(S8
3)、TEST UNIT READY コマンドのようにステータスの
みでデータ転送を伴わないコマンドの場合は、割り込み
処理を終了し(S87)、データ転送を伴うコマンドで
あった場合は、ホストコンピュータ1からのSCSIコマン
ドのデータ転送の方向を判定し(S84)、ホストコン
ピュータ1から通信アダプタ2へのデータ転送であった
場合はSCSIステータスの送信データビットを”1”にし
(S85)、通信アダプタ2からホストコンピュータ1
へのデータ転送であった場合はSCSIステータスの受信デ
ータビットを”0”にする(S86)。
Then, the CPU 5 executes the command in response to the SCSI command, and determines whether the SCSI command is a command accompanied by data transfer (S8).
3) If the command is only status and does not involve data transfer like the TEST UNIT READY command, the interrupt processing is terminated (S87). If the command involves data transfer, the SCSI command from the host computer 1 is sent. Is determined (S84). If the data transfer is from the host computer 1 to the communication adapter 2, the transmission data bit of the SCSI status is set to "1" (S85).
If the data has been transferred, the received data bit of the SCSI status is set to "0" (S86).

【0021】前記通信アダプタ2の、外部から受信した
データをホストコンピュータ1に送信するための動作に
関して、図9に示すフローに基づき説明する。通信アダ
プタ2は、電源投入時にリセットされ(S91)、通信
回線ステータスとSCSIステータスをクリアする(S9
2)。次に前記通信ステータスを読み、通信回線4から
データを送ってくる状態を示す”データ受信ステータ
ス”であるかどうかを調べ(S93)、”データ受信ス
テータス”であれば通信回線4からのデータをバッファ
メモリ9に転送し、通信回線ステータスをクリアする
(S94)。さらに、SCSIステータスの受信データビッ
トを”1”にし(S95)、図8に示した割り込み処理
でSCSIステータスの受信データビットが”0”になるま
で待つ(S96)。SCSIステータスの受信データビット
が”0”になれば、SCSIステータスの送信データビット
が”1”であるか否かを調べる(S97)。SCSIステー
タスの送信データビットが”1”であるならば、SCSIコ
マンドでホストコンピュータ1から送られたデータがバ
ッファメモリ9に存在するので、バッファメモリ9から
通信制御部7にデータを転送し、SCSIステータスの送信
データビットを”0”にする(S98)。そして、再び
通信回線ステータスを調べ(S93)上記の処理を繰り
返す。
The operation of the communication adapter 2 for transmitting data received from the outside to the host computer 1 will be described with reference to the flow chart shown in FIG. The communication adapter 2 is reset when the power is turned on (S91), and clears the communication line status and the SCSI status (S9).
2). Next, the communication status is read, and it is checked whether the status is "data reception status" indicating the state of sending data from the communication line 4 (S93). The data is transferred to the buffer memory 9, and the communication line status is cleared (S94). Further, the received data bit of the SCSI status is set to "1" (S95), and the process waits until the received data bit of the SCSI status becomes "0" in the interrupt processing shown in FIG. 8 (S96). If the received data bit of the SCSI status becomes "0", it is checked whether or not the transmission data bit of the SCSI status is "1" (S97). If the transmission data bit of the SCSI status is "1", since the data sent from the host computer 1 by the SCSI command exists in the buffer memory 9, the data is transferred from the buffer memory 9 to the communication control unit 7, and The transmission data bit of the status is set to "0" (S98). Then, the communication line status is checked again (S93), and the above processing is repeated.

【0022】ホストコンピュータ1は、自ら発行したSC
SIコマンドに対する通信アダプタ2からのステータスを
受けると、通信アダプタ2からのステータスがGOODの
場合、ホストコンピュータ1が受け取るべきデータがな
いので、ホストコンピュータ1は、一定の間隔をおい
て、再度SCSIコマンド TEST UNIT READYを実行する(S
31)。つまり、ホストコンピュータ1が受け取るべき
データがない間は、周期的にこれ(S31)を繰り返
す。この周期は、本実施例では、900mSであり、こ
れは通信回線4のデータ転送速度とバッファメモリ9の
容量等により決められる。
The host computer 1 issues the SC issued by itself.
When the status from the communication adapter 2 with respect to the SI command is received, if the status from the communication adapter 2 is GOOD, there is no data to be received by the host computer 1, so the host computer 1 sends the SCSI command again at regular intervals. Execute TEST UNIT READY (S
31). That is, while there is no data to be received by the host computer 1, this (S31) is repeated periodically. This cycle is 900 ms in this embodiment, which is determined by the data transfer speed of the communication line 4 and the capacity of the buffer memory 9.

【0023】また、通信アダプタ2からのステータス
がCONDITION MET ならば、ホストコンピュータ1が受け
取るべきデータがあるので、そのデータを受信するため
に、ホストコンピュータ1は通信アダプタ2から受信す
るデータの長さを調べる(S32)。長さを調べる理由
は、ホストコンピュータ1が通信アダプタ2からデータ
を受信するためのSCSIコマンドGET MESSAGE (表2参照)
は図4に示すコマンド形式になっており、 GET MESSAG
Eを使用する場合は、受信するデータの長さ情報が必要
だからである。本実施例ではデータの長さを調べる手段
としてベンダユニークコマンド GET DATA SIZEを用い
た。このGET DATA SIZE のコマンド形式を図5に、デー
タ形式を図6に示す。図5に示したコマンド形式のSCSI
コマンドGET DATA SIZE を、ホストコンピュータ1が、
通信アダプタ2 に送ると、図6に示したデータ形式でデ
ータを通信アダプタ2はホストコンピュータ1 に送って
くる。このことによりホストコンピュータ1は受信する
データの長さを知ることができる。
If the status from the communication adapter 2 is CONDITION MET, there is data to be received by the host computer 1. Is checked (S32). The reason for checking the length is the SCSI command GET MESSAGE for the host computer 1 to receive data from the communication adapter 2 (see Table 2).
Has the command format shown in Fig. 4. GET MESSAG
This is because the use of E requires information on the length of the data to be received. In this embodiment, a vendor unique command GET DATA SIZE is used as a means for checking the data length. FIG. 5 shows the command format of the GET DATA SIZE, and FIG. 6 shows the data format. Command format SCSI shown in Fig. 5
The host computer 1 issues the command GET DATA SIZE
When sent to the communication adapter 2, the communication adapter 2 sends data to the host computer 1 in the data format shown in FIG. This allows the host computer 1 to know the length of the data to be received.

【0024】次に、ホストコンピュータ1は、図4に示
したコマンド形式のSCSIコマンドGET MESSAGE(6) を通
信アダプタ2に送る(S33)。これを受信すると、通
信アダプタ2は、GET MESSAGE(6)で指定された長さのデ
ータをホストコンピュータ1に送り、ホストコンピュー
タ1は通信アダプタ2からのデータ受信を終える。とこ
ろで、本実施例では、通信アダプタ2のデータ着信を確
認する手段として、TEST UNIT READYコマンドを使用し
たが、表2にないコマンドを通信アダプタ2用に新たに
作成 (ベンダユニークコマンドと呼ばれる) し、それを
データ着信状態の確認に使用することもできる。また、
ホストコンピュータ1が通信アダプタ2からデータを受
信するためのSCSIコマンド GET MESSAGE(6) ( 表2参
照)を使用したが、これもベンダーユニークコマンドを
作成して用いることも可能であり、その場合には GET M
ESSAGE(6) のようにデータ長を指定する必要のないコマ
ンドを作成すれば、ホストコンピュータ1が通信アダプ
タ2から受信するデータの長さを調べる(S32)必要
はなくなり、S32は省略できる。
Next, the host computer 1 sends a SCSI command GET MESSAGE (6) in the command format shown in FIG. 4 to the communication adapter 2 (S33). Upon receiving this, the communication adapter 2 sends data of the length specified by GET MESSAGE (6) to the host computer 1, and the host computer 1 finishes receiving data from the communication adapter 2. By the way, in this embodiment, the TEST UNIT READY command is used as a means for confirming the data arrival of the communication adapter 2, but a command not shown in Table 2 is newly created for the communication adapter 2 (called a vendor unique command). , It can also be used to check the state of incoming data. Also,
Although the host computer 1 used the SCSI command GET MESSAGE (6) (see Table 2) for receiving data from the communication adapter 2, it is also possible to create and use a vendor unique command. Is GET M
If a command such as ESSAGE (6) that does not need to specify a data length is created, the host computer 1 does not need to check the length of data received from the communication adapter 2 (S32), and S32 can be omitted.

【0025】ホストコンピュータ1のOSがUNIXの場合、
図3に示した処理をどのように実現するかを図7に示
す。図7ではユーザプログラムでの処理と対応するUNIX
カーネル (デバイスドライバ) の処理を示す。ユーザプ
ログラムレベルでは、まず通信アダプタ2にホストコン
ピュータ1が受信するデータが存在するか否かを調べる
ためにシステムコールselect()をコールする。このシス
テムコールを受けて、UNIXカーネルはデバイスドライバ
のselectエントリ( ここではxxselectとする)をコール
する(U71)。xxselectエントリではSCSIコマンドの
TEST UNIT READY を通信アダプタ2に対して実行し、通
信アダプタ2のステータスがGOODならば繰り返しTEST U
NIT READY を実行する(K72)。そして、通信アダプ
タ2のステータスがCONDITION MET になったならば、xx
selectは戻り値として1を返すようにする(K73)。
When the OS of the host computer 1 is UNIX,
FIG. 7 shows how the processing shown in FIG. 3 is realized. Figure 7 shows the UNIX corresponding to the processing in the user program
Indicates kernel (device driver) processing. At the user program level, first, a system call select () is called to check whether data received by the host computer 1 exists in the communication adapter 2. Upon receiving this system call, the UNIX kernel calls the select entry (here, xxselect) of the device driver (U71). In the xxselect entry, the SCSI command
Execute TEST UNIT READY for communication adapter 2, and if the status of communication adapter 2 is GOOD, repeat TEST U
Execute NIT READY (K72). If the status of communication adapter 2 is CONDITION MET, xx
select returns 1 as a return value (K73).

【0026】システムコールselect()が終了したなら
ば、ユ−ザプログラムは、受信するデータの長さを調べ
るためのコマンドでシステムコールioctl() をコールす
る(U74)。このシステムコールを受けて、UNIXカー
ネルはデバイスドライバのioctl エントリ( ここではxx
ioctl とする)をコールする(K75)。 xxioctl エ
ントリではSCSIコマンドのGET DATA SIZE を通信アダプ
タ2 に対して実行し、通信アダプタ2 から受け取ったデ
ータ長をユーザプログラムに渡す(K76)。
When the system call select () is completed, the user program calls the system call ioctl () with a command for checking the length of the data to be received (U74). In response to this system call, the UNIX kernel sets the device driver ioctl entry (here, xx
ioctl) (K75). In the xxioctl entry, the SCSI command GET DATA SIZE is executed for the communication adapter 2, and the data length received from the communication adapter 2 is passed to the user program (K76).

【0027】次に調べた長さのデータを受信するため、
ユーザプログラムは、システムコールreadをコールする
(U77)。このシステムコールを受けて、UNIXカーネ
ルはデバイスドライバのreadエントリ( ここではxxread
とする)をコールし、xxreadエントリではSCSIコマンド
のGET MESSAGE を通信アダプタ2に対して実行し、通信
アダプタ2 から通信データを受け取り(K78)、これ
をユーザプログラムに渡す(U79)。
Next, in order to receive data of the checked length,
The user program calls the system call "read" (U77). In response to this system call, the UNIX kernel reads the device driver's read entry (here, xxread
), And in the xxread entry, GET MESSAGE of the SCSI command is executed for the communication adapter 2, communication data is received from the communication adapter 2 (K78), and this is passed to the user program (U79).

【0028】なお、ホストコンピュータ1から通信アダ
プタ2へデータ送信については、イニシエータからター
ゲットへのデータ転送なので、ホストコンピュータ1
は、SCSIバスが使用されていないことを確認し、データ
送信のSCSIコマンド SEND MESSAGE ( 表2参照) を実行
する。このデータ送信を、ホストコンピュータ1のOSが
UNIXである場合について、説明する。ユーザプログラム
はデータを送信するためにシステムコールwrite() をコ
ールする。このシステムコールを受けて、UNIXカーネル
はデバイスドライバのwrite エントリ( ここではxxwrit
e とする)をコールする。xxwrite エントリではデバイ
スドライバ内で管理しているSCSIバスの状態フラグをみ
てSCSIバスが使用可能ならばSCSIコマンドのSEND MESSA
GEを通信アダプタ2に対して実行し、通信アダプタ2に
通信データを送る。
The data transmission from the host computer 1 to the communication adapter 2 is performed by transferring data from the initiator to the target.
Confirms that the SCSI bus is not used, and executes the data transmission SCSI command SEND MESSAGE (see Table 2). This data transmission is performed by the OS of the host computer 1.
The case of UNIX will be described. The user program calls the system call write () to send the data. In response to this system call, the UNIX kernel writes the write entry of the device driver (here, xxwrit
e)). In the xxwrite entry, check the status flag of the SCSI bus managed in the device driver, and if the SCSI bus is available, use the SCSI command SEND MESSA.
Execute GE for the communication adapter 2 and send communication data to the communication adapter 2.

【0029】上記実施例では、SCSIコマンドのTEST UNI
T READY に対して、通信アダプタ2がホストコンピュー
タ1に送るデータを保有している場合、ステータスとし
てCONDITION MET を返したが、GOODのReserved bitを1
にしたステータス、あるいは表1に記載した以外のコー
ドをステータスとすることも可能である。
In the above embodiment, the TEST UNI
If the communication adapter 2 has data to send to the host computer 1 in response to T READY, the CONDITION MET is returned as the status, but the Reserved bit of GOOD is set to 1
It is also possible to set the status described above or a code other than those described in Table 1 as the status.

【0030】[0030]

【発明の効果】以上説明したように本発明によれば、ホ
ストコンピュータがイニシエータの機能のみ、通信アダ
プタがターゲットの機能のみしか備えていない場合であ
っても、ターゲットである通信アダプタに外部から通信
回線を介してデータが届いたことをイニシエータである
ホストコンピュータは容易に知ることができる。このた
めターゲットである通信アダプタがホストコンピュータ
にデータを送信する必要あるときには、必ずホストコン
ピュータに送信できることになる。
As described above, according to the present invention, even when the host computer has only the function of the initiator and the communication adapter has only the function of the target, the host computer can communicate with the target communication adapter from the outside. The host computer, which is the initiator, can easily know that the data has arrived via the line. Therefore, whenever the target communication adapter needs to transmit data to the host computer, it can transmit the data to the host computer.

【0031】また、通信アダプタを有しない既存のコン
ピュータシステムに対して、通信アダプタを付加する場
合、そのホストコンピュータがSCSIバスを有していて、
イニシエータ・ターゲット両方の機能はないが、ターゲ
ットの機能を有しているならば、ホストコンピュータ側
のユーザプログラムの追加、変更のみで簡単に本発明を
実施することができるという効果がある。特にホストコ
ンピュータのOSがUNIXである場合は、UNIXカーネルに必
要な処理の大部分が取り込まれるので、一度UNIXカーネ
ルを変更しておけば、それ以降のユーザプログラム自体
の変更、追加は極めて容易になる。
When a communication adapter is added to an existing computer system having no communication adapter, the host computer has a SCSI bus,
Although there is no function of both the initiator and the target, as long as it has the function of the target, there is an effect that the present invention can be easily implemented only by adding or changing a user program on the host computer side. Especially when the host computer OS is UNIX, most of the processing required by the UNIX kernel is taken in. Therefore, once the UNIX kernel is changed, it is extremely easy to change or add the user program itself thereafter. Become.

【0032】このようにして、SCSIバス上でイニシエー
タのみの機能を持つものとターゲットのみの機能を持つ
ものとの間で双方向のデータ通信を実行することができ
る。
In this manner, bidirectional data communication can be performed between a device having only an initiator and a device having only a target on the SCSI bus.

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

【図1】本発明の一実施例のデータ通信装置の構成を示
すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a data communication device according to an embodiment of the present invention.

【図2】同実施例の通信アダプタの構成を示すブロック
図である。
FIG. 2 is a block diagram illustrating a configuration of a communication adapter according to the embodiment.

【図3】同実施例のホストコンピュータの制御手順を示
すフローチャートである。
FIG. 3 is a flowchart showing a control procedure of the host computer of the embodiment.

【図4】SCSIコマンド GET MESSAGE(6) のコマンド形式
(SCSI規格) 。
Fig. 4 Command format of SCSI command GET MESSAGE (6)
(SCSI standard).

【図5】同実施例のSCSIコマンド GET DATA SIZEのコマ
ンド形式 (本発明独自) 。
FIG. 5 is a command format of the SCSI command GET DATA SIZE of the embodiment (unique to the present invention).

【図6】同実施例のSCSIコマンド GET DATA SIZEのデー
タ形式 (本発明独自) 。
FIG. 6 shows a data format of the SCSI command GET DATA SIZE of the embodiment (unique to the present invention).

【図7】同実施例のOSがUNIXである制御手順。FIG. 7 is a control procedure in which the OS of the embodiment is UNIX.

【図8】同実施例の通信アダプタ内の割り込み処理を示
すフローチャートである。
FIG. 8 is a flowchart showing an interrupt process in the communication adapter of the embodiment.

【図9】同実施例の通信アダプタ内の制御手順を示すフ
ローチャートである。
FIG. 9 is a flowchart showing a control procedure in the communication adapter of the embodiment.

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

1 ホストコンピュータ 2 通信アダプタ 3 SCSIバス 4 通信回線 5 CPU 6 ROM 7 通信制御部 8 SCSI制御部 9 バッファメモリ DESCRIPTION OF SYMBOLS 1 Host computer 2 Communication adapter 3 SCSI bus 4 Communication line 5 CPU 6 ROM 7 Communication control unit 8 SCSI control unit 9 Buffer memory

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 SCSI(Small Computer System Interfac
e) バスを有するコンピュ−タシステムで用いるデータ
通信装置であって、 タ−ゲットとしてのSCSI機能を有し前記SCSIバスに接続
される通信アダプタと、 イニシエ−タとしてのSCSI機能を有し前記SCSIバスに接
続されるホストコンピュ−タとを備え、前記ホストコン
ピュ−タは、前記通信アダプタに外部から受信したデー
タがあるか否かを、SCSIコマンドを用いて定期的に確認
する手段を有することを特徴とするデ−タ通信装置。
[Claim 1] SCSI (Small Computer System Interface)
e) a data communication device used in a computer system having a bus, the communication adapter having a SCSI function as a target and connected to the SCSI bus, and the SCSI having a SCSI function as an initiator. A host computer connected to a bus, wherein the host computer has means for periodically confirming whether or not there is data received from outside in the communication adapter using a SCSI command. A data communication device characterized by the above-mentioned.
【請求項2】 前記ホストコンピュータは、更に前記確
認手段にて外部から受信したデ−タがあると判明した場
合に、そのデ−タ長を調べる手段を有することを特徴と
する請求項1記載のデ−タ通信装置。
2. The apparatus according to claim 1, wherein said host computer further comprises means for examining the data length when said confirming means determines that there is data received from outside. Data communication device.
【請求項3】 ホストコンピュータが通信アダプタに受
信するデータがあるか否かを確認する手段は、UNIXのシ
ステムコールselectで実行することを特徴とする請求項
1記載のデータ通信装置。
3. The data communication apparatus according to claim 1, wherein the means for checking whether or not there is data to be received by the communication adapter by the host computer is executed by a UNIX system call select.
【請求項4】 前記通信アダプタは、 前記通信アダプタの動作を前記SCSIバスに対してターゲ
ットとして制御すると共に通信アダプタ内部を制御する
CPUと、 前記CPU の制御プログラムを記憶する ROMと、 通信回線を有し外部とデータの送受信をする通信制御部
と、 ターゲットとしての機能を持ち、前記ホストコンビュー
タと前記SCSIバスを介してデータの送受信を行うSCSI制
御部と、 前記SCSI制御部および前記通信制御部が送受信するデー
タを記憶するバッファメモリとからなっていることを特
徴とする請求項1又は2記載のデータ通信装置。
4. The communication adapter controls the operation of the communication adapter as a target for the SCSI bus and controls the inside of the communication adapter.
A CPU, a ROM for storing a control program of the CPU, a communication control unit having a communication line for transmitting and receiving data to and from the outside, and having a function as a target, and transmitting data via the host computer and the SCSI bus. 3. The data communication device according to claim 1, further comprising: a SCSI control unit that performs transmission and reception; and a buffer memory that stores data transmitted and received by the SCSI control unit and the communication control unit.
JP3294168A 1991-11-11 1991-11-11 Data communication device Expired - Fee Related JP2948380B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3294168A JP2948380B2 (en) 1991-11-11 1991-11-11 Data communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3294168A JP2948380B2 (en) 1991-11-11 1991-11-11 Data communication device

Publications (2)

Publication Number Publication Date
JPH05136928A JPH05136928A (en) 1993-06-01
JP2948380B2 true JP2948380B2 (en) 1999-09-13

Family

ID=17804197

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3294168A Expired - Fee Related JP2948380B2 (en) 1991-11-11 1991-11-11 Data communication device

Country Status (1)

Country Link
JP (1) JP2948380B2 (en)

Also Published As

Publication number Publication date
JPH05136928A (en) 1993-06-01

Similar Documents

Publication Publication Date Title
EP0651335A1 (en) High speed receiver/transmitter interface
US6098120A (en) Peripheral sharing system using a bus bridge to emulate peripherals on a first bus to a host on a second bus
KR19990083207A (en) A peripheral device and control method thereof
US5958024A (en) System having a receive data register for storing at least nine data bits of frame and status bits indicating the status of asynchronous serial receiver
KR101357162B1 (en) Apparatus, method and system to control communication between host apparatus and USB apparatus
KR20070116102A (en) Dma controller, node, data transfer control method, and program
JP2008501178A (en) Bus connection device
JP4444101B2 (en) Bus system, station for use in the bus system, and bus interface
US5611056A (en) Method for controlling the expansion of connections to a SCSI bus
KR20040041623A (en) Bus system and bus interface for connection to a bus
US4977499A (en) Method and apparatus for commanding operations on a computer network
US6058440A (en) Programmable and adaptive resource allocation device and resource use recorder
US5734918A (en) Computer system with an input/output processor which enables direct file transfers between a storage medium and a network
KR20040043198A (en) Bus system and bus interface
JP2948380B2 (en) Data communication device
JPS6126706B2 (en)
KR20030044373A (en) Universal serial bus device for using direct memory access interface
EP0055763B1 (en) Input/output processor and method of communication for data processing system
JPH11296315A (en) Information processor and data communication method
JPH089792Y2 (en) SCSI adapter circuit for host-to-host communication
JP3056169B2 (en) Data transmission / reception method and method
JPS6245575B2 (en)
JPH10320345A (en) Bus controller
JP2824890B2 (en) SCSI protocol controller
JPH0511339B2 (en)

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees