JP2003037596A - Communication device and communication method - Google Patents
Communication device and communication methodInfo
- Publication number
- JP2003037596A JP2003037596A JP2001224935A JP2001224935A JP2003037596A JP 2003037596 A JP2003037596 A JP 2003037596A JP 2001224935 A JP2001224935 A JP 2001224935A JP 2001224935 A JP2001224935 A JP 2001224935A JP 2003037596 A JP2003037596 A JP 2003037596A
- Authority
- JP
- Japan
- Prior art keywords
- communication
- transfer
- bus
- external device
- communication device
- 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.)
- Withdrawn
Links
Landscapes
- Small-Scale Networks (AREA)
Abstract
(57)【要約】
【課題】 バス上に流すパケットのデータペイロードサ
イズを、適切なサイズに設定することの可能な通信装置
及び通信方法を提供すること。
【解決手段】 アイソクロナス転送と、アシンクロナス
転送でデータの送受信を行うことが可能なIEEE13
94デバイス(101)であって、通信インタフェース
を介して接続された外部装置とデータの送受信を行うI
EEE1394インタフェース制御部(103)と、ア
シンクロナス転送でデータの送受信を行う場合に、通信
先の外部装置の応答性を判断するデータペイロードサイ
ズ設定処理部(108)を有し、データペイロードサイ
ズ設定処理部は前記通信先の外部装置の応答性に応じ
て、アシンクロナス転送における送受信の際のデータペ
イロードサイズを変更することができる。
(57) [Problem] To provide a communication device and a communication method capable of setting a data payload size of a packet flowing on a bus to an appropriate size. An IEEE13 capable of transmitting and receiving data by isochronous transfer and asynchronous transfer.
94 device (101) that transmits and receives data to and from an external device connected via a communication interface
An EEE1394 interface control unit (103), a data payload size setting processing unit (108) for determining the responsiveness of a communication destination external device when transmitting / receiving data by asynchronous transfer; Can change the data payload size at the time of transmission / reception in asynchronous transfer according to the responsiveness of the external device of the communication destination.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、シリアルバスイン
タフェースを有する通信装置及び通信方法に関し、特に
IEEE1394の規格に準拠したインタフェースを持
つ通信装置および通信方法のうち、パケットのデータペ
イロードサイズの設定に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a communication device and a communication method having a serial bus interface, and more particularly to a communication device and a communication method having an interface compliant with the IEEE 1394 standard, and to setting of a data payload size of a packet. Is.
【0002】[0002]
【従来の技術】近年、シリアルバスインタフェースは、
信号線が少ないこと、ケーブルが細いこと、コネクタが
小さいこと、IDやターミネータ等の設定が不要なこ
と、活線挿抜が可能なこと、等時性のあるデータ転送
(アイソクロナス転送)が可能なことなどの優れた特徴
をもつことから脚光を浴びてきている。2. Description of the Related Art In recent years, serial bus interfaces are
Fewer signal lines, thinner cables, smaller connectors, no need to set ID, terminator, etc., hot-swap capability, and isochronous data transfer (isochronous transfer) It has been in the limelight because of its excellent features such as.
【0003】特にIEEE1394で規定されるシリア
ルバスインタフェースは、動画像等の大容量データの高
速伝送が可能であること、バスアーキテクチャによって
メモリアクセスが可能であること、ホットプラグインや
プラグアンドプレイが可能であること、およびピア・ツ
ー・ピア接続が可能であることなどの特徴を持つため、
パーソナルコンピュータのみならず家庭内のAV機器
(ディジタルビデオカメラ等)やそれ以外の機器への適
用が盛んに進められている。また、更なる高速化や長距
離化に対応した新たな規格(例えば、P1394.b)
の策定も現在精力的に進められている。In particular, the serial bus interface defined by IEEE 1394 is capable of high-speed transmission of a large amount of data such as moving images, is capable of memory access depending on the bus architecture, and is capable of hot plug-in and plug-and-play. And that it has peer-to-peer connectivity,
Not only personal computers but also home AV devices (digital video cameras, etc.) and other devices are being actively applied. Also, a new standard (for example, P1394.b) that supports further speedup and longer distances
Is currently under active development.
【0004】IEEE1394では周期的に連続した時
間帯の中で、ある一定の帯域を保証し、エラー発生の際
にも再送手続きを行わないデータ転送モードであるアイ
ソクロナス転送と、帯域は保証しないがエラーが発生し
た場合には再送手続きにより確実なデータの転送を保証
する転送モードであるアシンクロナス転送という2種類
の転送モードを備えている。ディジタルビデオカメラな
どに見られる大容量かつリアルタイム性が求められる動
画像データの転送にはアイソクロナス転送が、ストレー
ジデバイスやプリンタやスキャナなどデータ落ちが許さ
れないデバイスへの転送にはアシンクロナス転送が主に
使用される。転送モードの優先順位としてはアイソクロ
ナス転送の方が高いため、アシンクロナス転送はアイソ
クロナス転送で使わない余った帯域を使用することにな
る。またアシンクロナス転送では受信側ノードがパケッ
トを受信できない状態(ビジー状態)のとき、パケット
の再送を可能とするリトライプロトコルを備えている。In IEEE 1394, isochronous transfer, which is a data transfer mode in which a certain band is guaranteed in a cyclically continuous time zone, and a retransmission procedure is not performed even when an error occurs, and an error is generated without guaranteeing the band. In case of occurrence, two kinds of transfer modes called asynchronous transfer, which is a transfer mode that guarantees reliable data transfer by a retransmission procedure, are provided. Isochronous transfer is mainly used for moving image data that is required for large-capacity and real-time characteristics found in digital video cameras, and asynchronous transfer is mainly used for transferring to devices such as storage devices, printers and scanners where data loss is not allowed. To be done. Since isochronous transfer has a higher priority as a transfer mode, asynchronous transfer uses a surplus band that is not used in isochronous transfer. Also, in the asynchronous transfer, a retry protocol is provided that enables the packet to be retransmitted when the receiving node cannot receive the packet (busy state).
【0005】[0005]
【発明が解決しようとする課題】しかしながら上述した
従来の技術においては、IEEE1394規格のバスに
多数のデバイスが接続され、各々がデータ転送を行う
と、トラフィックが増えることにより意図した転送レー
トを維持することが難しくなる。特に、HDDやMO等
大容量のストレージデバイスへの頻繁な読み書きや、プ
リンタやスキャナとのデータ転送では比較的大きなデー
タのやりとりをすることになる。また、バス上にCCD
カメラやDVC等の機器が接続されているとアイソクロ
ナス転送に使用される帯域が確保されるため、1サイク
ルあたりのアシンクロナス転送用の帯域が制限される。
そのため、より一層所望する時間内に大容量データの転
送を終えることは困難になる。例えば1サイクル内に2
048bytesのデータペイロードを持つアシンクロ
ナス転送が1回しか行えないように制限されてしまえば
(逆にIEEE1394の規格では、最低でも上述のデ
ータペイロードサイズを持つアシンクロナス転送が行え
るだけの帯域を保証している)、その同じ帯域を複数の
デバイスで交互に使用することになる。仮にアシンクロ
ナス転送によって大容量のデータを送信したいデバイス
がバスに4台に接続されていれば、4サイクルに一度し
か送信の機会が巡ってこないことになるし、レスポンス
パケットを送信する帯域も考えれば更に回ってくるサイ
クルは長くなる。However, in the above-mentioned conventional technique, when a large number of devices are connected to the IEEE 1394 standard bus and each of them performs data transfer, the traffic increases to maintain the intended transfer rate. Becomes difficult. In particular, a relatively large amount of data is exchanged for frequent reading and writing to a large-capacity storage device such as an HDD or MO and for data transfer with a printer or a scanner. In addition, CCD on the bus
If a device such as a camera or a DVC is connected, a band used for isochronous transfer is secured, so that the band for asynchronous transfer per cycle is limited.
Therefore, it becomes more difficult to complete the transfer of the large amount of data within a desired time. For example, 2 in 1 cycle
If the asynchronous transfer with 048 bytes of data payload is restricted so that it can be performed only once (on the contrary, the IEEE 1394 standard guarantees a band with which at least asynchronous transfer with the above data payload size can be performed. ), The same band will be used alternately by multiple devices. If four devices that want to send a large amount of data by asynchronous transfer are connected to the bus, there will be an opportunity to send only once in four cycles, and considering the bandwidth for sending response packets. The cycle that goes around becomes longer.
【0006】更には、リクエストパケットを受信する側
のノードでのデータ処理単位、処理能力、システムの構
成によっては、受信可能な(もしくはリードトランザク
ションの場合は送信可能な)最大のデータペイロードサ
イズによるデータ転送を行うと送信側ノードが送るタイ
ミングではパケットを受け取れない状況、つまり受信側
ノードがビジー状態になることもある。その場合には頻
繁なリトライが発生し、転送効率が上がらなくなる。Further, depending on the data processing unit, the processing capacity, and the system configuration of the node that receives the request packet, the maximum data payload size that can be received (or can be transmitted in the case of a read transaction) is the data. When transfer is performed, there is a situation in which the packet cannot be received at the timing when the transmitting node sends it, that is, the receiving node becomes busy. In that case, frequent retries occur and transfer efficiency cannot be improved.
【0007】本発明は上記問題点に鑑みて為されたもの
であり、バス上に流すパケットのデータペイロードサイ
ズを、適切なサイズに設定することの可能な通信装置及
び通信方法を提供することを目的とする。The present invention has been made in view of the above problems, and it is an object of the present invention to provide a communication device and a communication method capable of setting the data payload size of a packet sent on a bus to an appropriate size. To aim.
【0008】[0008]
【課題を解決するための手段】上記目的を達成するため
に、本発明の通信装置は、アイソクロナス転送と、アシ
ンクロナス転送でデータの送受信を行うことが可能であ
って、通信インタフェースを介して接続された外部装置
とデータの送受信を行う通信手段と、アシンクロナス転
送でデータの送受信を行う場合に、通信先の外部装置の
応答性を判断する判断手段と、前記判断手段による判断
に応じて、アシンクロナス転送における送受信の際のデ
ータペイロードサイズを変更可能な変更手段とを有す
る。In order to achieve the above object, the communication device of the present invention is capable of transmitting and receiving data by isochronous transfer and asynchronous transfer, and is connected via a communication interface. Communication means for transmitting / receiving data to / from an external device, and determining means for determining the responsiveness of the external device of the communication destination when transmitting / receiving data by asynchronous transfer, and the asynchronous transfer according to the determination by the determining means. And a changing means capable of changing the data payload size at the time of transmission / reception.
【0009】また、本発明の通信方法は、アイソクロナ
ス転送と、アシンクロナス転送でデータの送受信を行う
ことが可能であって、通信インタフェースを介して接続
された外部装置とデータの送受信を行う通信手段におけ
る通信方法であって、アシンクロナス転送でデータの送
受信を行う場合に、通信先の外部装置の応答性を判断す
る判断工程と、前記判断工程による判断に応じて、アシ
ンクロナス転送における送受信の際のデータペイロード
サイズを変更可能な変更工程とを有する。Further, the communication method of the present invention is a communication means capable of transmitting / receiving data by isochronous transfer and asynchronous transfer, and transmitting / receiving data to / from an external device connected via a communication interface. In the communication method, when data is transmitted / received by asynchronous transfer, a judgment step of judging the responsiveness of the external device of the communication destination, and a data payload at the time of transmission / reception in the asynchronous transfer according to the judgment by the judgment step. And a changing step capable of changing the size.
【0010】上記構成によれば、バス上に流すパケット
のデータペイロードサイズを、通信を行う相手デバイス
に最適なデータペイロードサイズに設定することができ
る。これにより、大容量データ転送時の転送時間を短縮
することができ、送信回数やリトライ回数が低減される
ため、バスを有効活用することが可能となり、システム
全体のパフォーマンスを向上させることが可能となる。According to the above configuration, the data payload size of the packet sent on the bus can be set to the optimum data payload size for the communication partner device. As a result, it is possible to shorten the transfer time when transferring a large amount of data, and reduce the number of transmissions and retries, which enables effective use of the bus and improves overall system performance. Become.
【0011】また、本発明の好適な一様態によれば、前
記通信装置は、前記通信インタフェースを介して前記通
信装置が接続されたバス上における、アシンクロナス転
送で用いる転送用帯域に関する情報を取得する取得手段
と、前記取得手段により取得した転送用帯域に関する情
報に基づいて、前記データペイロードサイズを設定する
設定手段とを更に有し、前記取得手段及び前記設定手段
による動作は、前記判断手段及び変更手段による動作に
先だって行われる。According to a preferred aspect of the present invention, the communication device obtains information on a transfer band used in asynchronous transfer on a bus to which the communication device is connected via the communication interface. The method further includes an acquisition unit and a setting unit that sets the data payload size based on the information about the transfer band acquired by the acquisition unit, and the operations of the acquisition unit and the setting unit are the determination unit and the change. It is performed before the action by means.
【0012】また、前記通信方法は、前記通信インタフ
ェースを介して前記通信装置が接続されたバス上におけ
る、アシンクロナス転送で使用可能な転送用帯域に関す
る情報を取得する取得工程と、前記取得工程において取
得した転送用帯域に関する情報に基づいて、前記データ
ペイロードサイズを設定する設定工程とを更に有し、前
記取得工程及び前記設定工程は、前記判断工程及び変更
工程に先だって行われる。In the communication method, an acquisition step of acquiring information on a transfer band available for asynchronous transfer on a bus connected to the communication device via the communication interface, and an acquisition step in the acquisition step And a setting step of setting the data payload size based on the information about the transfer band, wherein the obtaining step and the setting step are performed prior to the determining step and the changing step.
【0013】本発明の好適な一様態によれば、前記取得
手段及び前記取得工程では、前記バスに接続された各外
部装置が持つコンフィギュレーションROM及びコント
ロールアンドステータスレジスタを読み出すことによっ
て、前記転送用帯域に関する情報を取得する。According to a preferred aspect of the present invention, in the acquisition means and the acquisition step, the transfer ROM is read by reading a configuration ROM and a control and status register of each external device connected to the bus. Get information about bandwidth.
【0014】また、本発明の好適な一様態によれば、前
記転送用帯域に関する情報は、アイソクロナス転送を行
う外部装置数及び当該外部装置が取得したアイソクロナ
ス転送用の帯域幅及びチャンネル数を含む。Further, according to a preferred aspect of the present invention, the information regarding the transfer band includes the number of external devices that perform isochronous transfer, and the isochronous transfer bandwidth and the number of channels acquired by the external device.
【0015】更に、前記転送用帯域に関する情報は、前
記バスに接続された外部装置数を含む。Further, the information regarding the transfer band includes the number of external devices connected to the bus.
【0016】また、本発明の好適な一様態によれば、前
記取得手段及び前記取得工程では、前記バスのリセット
後に前記バスに接続された各外部装置から送信されるセ
ルフIDパケットを取得することにより前記転送用帯域
に関する情報を取得する。Further, according to a preferred aspect of the present invention, the self-ID packet transmitted from each external device connected to the bus after the reset of the bus is obtained in the obtaining means and the obtaining step. The information regarding the transfer band is acquired by.
【0017】また、本発明の好適な一様態によれば、前
記設定手段及び前記設定工程では、前記転送用帯域に関
する情報が所定条件を満たしている場合に、転送可能な
最大データペイロードサイズに設定する。Further, according to a preferred aspect of the present invention, in the setting means and the setting step, when the information regarding the transfer band satisfies a predetermined condition, the maximum transferable data payload size is set. To do.
【0018】好ましくは、前記所定条件は、アシンクロ
ナス転送用に残された帯域が所定帯域よりも大きい場合
である。Preferably, the predetermined condition is that the band left for asynchronous transfer is larger than the predetermined band.
【0019】更に好ましくは、前記所定条件は、前記通
信装置以外に、アシンクロナス転送を行う前記バスに接
続された外部装置数が所定数よりも少ない場合である。More preferably, the predetermined condition is that the number of external devices, other than the communication device, connected to the bus that performs asynchronous transfer is smaller than a predetermined number.
【0020】また、本発明の好適な一様態によれば、前
記判断手段及び前記判断工程では、前記通信装置が行う
トランザクションを完結するのに要する最低限の時間
と、前記通信先の外部装置が応答に要する時間とを比較
する。Further, according to a preferred aspect of the present invention, in the judging means and the judging step, the minimum time required to complete the transaction performed by the communication device and the external device of the communication destination are set. Compare with the response time.
【0021】なお、本発明の好適な一様態によれば、前
記通信先の外部装置が応答に要する時間は、前記通信装
置が前記通信先の外部装置にリクエストパケットを送信
してからレスポンスパケットを受信するまでにかかる時
間である。According to a preferred aspect of the present invention, the time required for the external device of the communication destination to respond is the response packet after the communication device transmits a request packet to the external device of the communication destination. This is the time it takes to receive.
【0022】また、本発明の好適な一様態によれば、前
記通信装置は前記通信先の外部装置が応答に要する時間
計測を行うタイマを更に有し、前記通信方法は、前記通
信先の外部装置が応答に要する時間計測を行う計時工程
を更に有する。According to a preferred aspect of the present invention, the communication device further includes a timer for measuring a time required for a response by the external device of the communication destination, and the communication method is an external device of the communication destination. The apparatus further includes a timing step of measuring the time required for the device to respond.
【0023】また、本発明の好適な一様態によれば、前
記変更手段及び前記変更工程では、前記通信先の外部装
置の応答性が低い場合に、データペイロードサイズ値を
小さくする。Further, according to a preferred aspect of the present invention, in the changing means and the changing step, the data payload size value is reduced when the response of the external device of the communication destination is low.
【0024】好ましくは、前記通信手段は、IEEE1
394規格に準拠している。Preferably, the communication means is IEEE1
It conforms to the 394 standard.
【0025】[0025]
【発明の実施の形態】以下、添付図面を参照して本発明
の好適な実施の形態を詳細に説明する。Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
【0026】図1は、本実施の形態におけるシステムの
概要を示すブロック図である。FIG. 1 is a block diagram showing an outline of the system in this embodiment.
【0027】101は、IEEE1394インタフェー
スに対応するリクエストパケットを送信する側のノード
であるIEEE1394デバイスである。ここでは仮に
プリンタ機能を持ったデバイスを想定する。図1に示さ
れるように、以下に説明される103から108の各I
EEE1394レイヤ、タイマ109、プリンタ機能1
10および不図示のCPU、受信バッファなどによって
構成される。Reference numeral 101 denotes an IEEE 1394 device which is a node on the side of transmitting a request packet corresponding to the IEEE 1394 interface. Here, it is assumed that the device has a printer function. As shown in FIG. 1, each I from 103 to 108 described below
EEE1394 layer, timer 109, printer function 1
10 and a CPU (not shown), a reception buffer, and the like.
【0028】102は、IEEE1394インタフェー
スのバスである。このバス上に存在するノードはケーブ
ルによって接続される。ケーブル内には2組のツイスト
ペアケーブル(一方がA、他方がBと称される信号線)
と1組みの電源ペアケーブルのあわせて6本のケーブル
がクロスしている。また電源ラインの無い4本のケーブ
ルで構成されているものも存在する。Reference numeral 102 denotes an IEEE 1394 interface bus. The nodes on this bus are connected by cables. Two twisted pair cables (one is called A and the other is called B) in the cable
And a pair of power pair cables, a total of 6 cables are crossed. In addition, there are some that are composed of four cables without a power line.
【0029】103は、PHYレイヤもしくはフィジカ
ルレイヤ(物理層)と呼ばれるIEEE1394インタ
フェース上の信号を直接ドライブする機能を実現するL
SIと、LINKレイヤ(リンク層)の機能を実現する
LSIによって構成されるIEEE1394インタフェ
ース制御部である。リクエストパケットの送信やリクエ
ストパケットを受信する側のノードから送られてくるプ
リントデータを含むレスポンスパケットの受信処理やバ
スの構成などを行う。Reference numeral 103 is an L for realizing a function of directly driving a signal on an IEEE 1394 interface called a PHY layer or a physical layer (physical layer).
An IEEE 1394 interface control unit configured by SI and an LSI that realizes the functions of the LINK layer (link layer). It performs processing such as transmission of request packets, reception processing of response packets including print data sent from the node that receives the request packets, and bus configuration.
【0030】104は、トランザクションレイヤと呼ば
れるIEEE1394インタフェースに対して実際のオ
ペレーションを管理・実行するドライバであり、一部リ
ンクレイヤの機能も含む。このレイヤで、IEEE13
94インタフェース上で行われるアシンクロナス転送の
リード/ライト/ロックの各トランザクションを管理・
制御する。受信側ノードがビジーの場合の再送(リトラ
イ)要求もこのレイヤで管理する。また後述するリクエ
ストパケットの送信からレスポンスパケット受信迄の時
間を計測するためのタイマ109の起動、停止の操作も
行う。A driver 104 manages and executes an actual operation for an IEEE 1394 interface called a transaction layer, and also includes a function of a part of the link layer. In this layer, IEEE13
Manages read / write / lock transactions for asynchronous transfer performed on the 94 interface.
Control. A retransmission (retry) request when the receiving node is busy is also managed in this layer. Also, the timer 109 is started and stopped for measuring the time from the transmission of a request packet to the reception of a response packet, which will be described later.
【0031】105は、シリアルバスマネージメント
(SBM)を行うレイヤで、IEEE1394インタフ
ェースの管理用ドライバによって構成されるノードコン
トローラである。機能としてはCSR(コントロールア
ンドステータスレジスタ)およびコンフィグレーション
ROMの実装および他ノード情報の管理を行う。特に、
アイソクロナス転送を行うノードの有無の確認、および
存在する場合は確保されているアイソクロナス転送用の
帯域幅やチャネル数をバス上のアイソクロナス・リソー
ス・マネージャノードのレジスタから取得する動作を行
う。また、セルフIDパケットの受信に伴う他ノード情
報の管理も取り扱う。SBMは、ノードコントローラ1
05以外の機能としてアイソクロナスリソースマネージ
ャおよびバスマネージャの機能を持つことが可能である
が、オプションであるためIEEE1394デバイス1
01ではその機能は有さなくてもよい。Reference numeral 105 denotes a layer for performing serial bus management (SBM), which is a node controller constituted by an IEEE 1394 interface management driver. As a function, it mounts a CSR (control and status register) and a configuration ROM and manages other node information. In particular,
The presence / absence of a node that performs isochronous transfer is confirmed, and if there is, the operation for acquiring the secured bandwidth and number of channels for isochronous transfer from the register of the isochronous resource manager node on the bus is performed. It also handles management of other node information that accompanies reception of self-ID packets. SBM is a node controller 1
It is possible to have functions of an isochronous resource manager and a bus manager as functions other than 05, but since it is an option, the IEEE 1394 device 1
01 does not have to have the function.
【0032】コンフィグレーションROMは、ISO/
IEC13213で定義されているノードの持つ各種情
報を格納したもので、ミニマルフォーマット(Minimal F
ormat)とゼネラルフォーマット(General Format)の2つ
の種類のフォーマットが存在する。ミニマルフォーマッ
トはメーカーを識別するnode_vendor_id情報のみを持
つ。ゼネラルフォーマットはそれ以外にBus_info_Block
とRoot_Directoryと呼ばれる追加情報を持つ。IEEE
1394デバイス101はゼネラルフォーマットを持
つ。The configuration ROM is ISO /
Stores various types of information held by nodes defined by IEC13213, and is in a minimal format (Minimal F
There are two types of formats: ormat) and general format. The minimal format has only node_vendor_id information that identifies the manufacturer. General format is Bus_info_Block
And with additional information called Root_Directory. IEEE
The 1394 device 101 has a general format.
【0033】106は、IEEE1394のアプリケー
ションレイヤである。以下に説明するプリンタ機能を実
現するためのアプリケーション107および本実施の形
態の特徴となるデータペイロードサイズ値を設定するデ
ータペイロードサイズ設定処理部108(後述)によっ
て構成される。Reference numeral 106 is an application layer of IEEE1394. It is configured by an application 107 for realizing the printer function described below and a data payload size setting processing unit 108 (described later) that sets a data payload size value that is a feature of the present embodiment.
【0034】107は、IEEE1394インタフェー
スを利用した各種デバイスの機能、例えばプリンタやス
キャナやディジタルビデオカメラ等の機能を実現するソ
フトウェアと、トランザクションレイヤおよびノードコ
ントローラとのインタフェースを備えたアプリケーショ
ンソフトウェアである。本実施の形態ではプリンタデバ
イスを想定しているため、プリントデータのコマンド解
析や画像処理(補正処理や圧縮されたデータの解凍処
理)、プリンタの記録部の制御も行う。また、SBP−
2やDDPなどIEEE1394に適した上位プロトコ
ルの機能も有する。SBP−2プロトコルによるプリン
トデータ転送ではプリンタ側が主導となり、リードリク
エストパケットを送信する。本実施の形態では受信側ノ
ードとしてPCを想定し、プリンタデバイスのリクエス
トに対してプリントデータをデータペイロードとするレ
スポンスパケットを送信することになる。Reference numeral 107 is application software having software for realizing functions of various devices using the IEEE 1394 interface, for example, functions of a printer, a scanner, a digital video camera, etc., and an interface with a transaction layer and a node controller. Since a printer device is assumed in the present embodiment, command analysis of print data, image processing (correction processing and decompression processing of compressed data), and control of the recording unit of the printer are also performed. In addition, SBP-
It also has the functions of higher-level protocols suitable for IEEE 1394 such as 2 and DDP. In the print data transfer by the SBP-2 protocol, the printer side takes the initiative and transmits the read request packet. In the present embodiment, a PC is assumed as the receiving node, and a response packet having print data as a data payload is transmitted in response to a request from the printer device.
【0035】108は、リクエストパケット送信時のデ
ータペイロードサイズを各種情報から判断して設定する
データペイロードサイズ設定処理部である。データペイ
ロードサイズ設定処理部108は、以下の機能を有す
る。すなわち、Reference numeral 108 denotes a data payload size setting processing unit which sets the data payload size at the time of transmitting the request packet by judging from various information. The data payload size setting processing unit 108 has the following functions. That is,
【0036】1.ノードコントローラ105から、バス
を構成するノード数やアイソクロナス転送用に確保され
た帯域幅やチャネル数などの情報を取得する。1. From the node controller 105, information such as the number of nodes forming the bus, the bandwidth secured for isochronous transfer, and the number of channels is acquired.
【0037】2.リクエストパケットの送信からレスポ
ンスパケットの受信までにかかる時間の測定を行うよう
にIEEE1394ドライバ104に指示を与え、得ら
れた時間を把握する。また、リクエストパケット送信の
際に受信側ノードのビジー状態によって行われるリトラ
イの発生頻度についても把握する。2. The IEEE 1394 driver 104 is instructed to measure the time taken from the transmission of the request packet to the reception of the response packet, and the obtained time is grasped. Also, the frequency of retries that occur due to the busy state of the receiving node when transmitting the request packet is understood.
【0038】3.リクエストパケットを送信してからレ
スポンスパケットを受信するまでにかかる時間として許
容できる値を基準値として持つ。また、上記1および2
で得られた情報と、この基準値とから最適なデータペイ
ロードサイズを求め、設定する。なお、判断や設定の方
法については図3及び図4に示すフローチャートを用い
て後述する。3. It has, as a reference value, a value that is acceptable as the time required from the transmission of a request packet to the reception of a response packet. In addition, the above 1 and 2
The optimum data payload size is obtained and set from the information obtained in step 1 and this reference value. The method of determination and setting will be described later with reference to the flowcharts shown in FIGS. 3 and 4.
【0039】109は、IEEE1394ドライバ10
4によって管理されるタイマである。リクエストパケッ
ト送信の際に起動され、対応するレスポンスパケット受
信時に停止することでその間の時間を測定する。本実施
の形態では時間測定用に専用のハードウェアタイマを想
定するが、IEEE1394I/F制御部103のリン
クレイヤで備えるスプリットタイマ(スプリットトラン
ザクションのタイムアウトを検知するためのタイマ)
や、不図示のCPUが備えるタイマを使用することでも
実現可能である。Reference numeral 109 denotes an IEEE 1394 driver 10
4 is a timer managed by 4. It is started when a request packet is sent and stopped when a corresponding response packet is received, and the time between them is measured. In this embodiment, a dedicated hardware timer for time measurement is assumed, but a split timer provided in the link layer of the IEEE 1394 I / F control unit 103 (a timer for detecting timeout of split transaction)
Alternatively, it can be realized by using a timer provided in a CPU (not shown).
【0040】110は、アプリケーション107のソフ
トウェアもしくは不図示のハードウェアによって制御さ
れるプリンタの機能である。受信したプリントデータの
印字を行う。またプリンタ側のステータスをアプリケー
ション107に返す機能も有する。Reference numeral 110 denotes a printer function controlled by software of the application 107 or hardware (not shown). Print the received print data. It also has a function of returning the status on the printer side to the application 107.
【0041】次にデータペイロードサイズの設定処理の
概略について説明する。Next, an outline of the data payload size setting process will be described.
【0042】まず、バスへの新規デバイスの接続や取り
外し、および電源投入によって生じるバスリセット時
に、バスを構成するノードの情報を取得する。具体的に
はノードコントローラ105で各ノードのセルフIDパ
ケットを格納することでノード数を把握し、更に、アイ
ソクロナス転送を行うノードが存在する場合にはアイソ
クロナス転送用に確保された帯域幅とチャネル数の確認
動作を行う。取得された情報はデータペイロードサイズ
設定処理部108で使用する。First, at the time of bus reset caused by connection or disconnection of a new device to the bus and power-on, information on the nodes constituting the bus is acquired. Specifically, the node controller 105 stores the self-ID packet of each node to grasp the number of nodes, and further, when there is a node performing isochronous transfer, the bandwidth and the number of channels secured for isochronous transfer. Confirm operation of. The acquired information is used by the data payload size setting processing unit 108.
【0043】その後、プリントデータ等の大容量データ
の受信を行う際に、上記バスリセット時に把握した情報
をもとにして、データ転送時のペイロードサイズの初期
値を設定する。After that, when receiving a large amount of data such as print data, the initial value of the payload size at the time of data transfer is set based on the information grasped at the time of the bus reset.
【0044】データ転送を開始後、リクエストパケット
の送信からレスポンスパケットの受信までの時間を1ト
ランザクションごとに確認し、許容できる時間内でトラ
ンザクションが完結しない場合や、頻繁なリトライが発
生した場合はデータペイロードサイズの値を初期に設定
した値よりも小さく設定し直す。After the data transfer is started, the time from the transmission of the request packet to the reception of the response packet is confirmed for each transaction, and if the transaction is not completed within the allowable time or if frequent retries occur, the data is transferred. Set the payload size value smaller than the initially set value.
【0045】なお、本実施の形態では、リクエストパケ
ット送信側ノード(IEEE1394デバイス101)
をプリンタデバイスとしているが、プリンタへライトト
ランザクションでデータを送信するホストとなるPCや
ディジタルスチルカメラ、およびスキャナデバイス等を
想定してもよい。In this embodiment, the request packet transmitting node (IEEE1394 device 101)
Although the above is used as a printer device, a PC, a digital still camera, a scanner device, or the like that serves as a host that transmits data to the printer by a write transaction may be assumed.
【0046】図2は、本実施の形態におけるバスリセッ
ト時に行われる情報取得処理のフローチャートである。
通常IEEE1394では、バスリセット時にバスに接
続された各デバイスの情報を取得するためのリードトラ
ンザクションを複数回行うため、それに合わせて必要な
情報を取得する。FIG. 2 is a flow chart of information acquisition processing performed at the time of bus reset in this embodiment.
Normally, in IEEE 1394, a read transaction for acquiring information of each device connected to the bus is performed a plurality of times at the time of bus reset, and therefore necessary information is acquired in accordance with the read transaction.
【0047】ステップS201では、セルフIDパケッ
ト数のカウントを行う。バスリセット時には、バスに接
続されるすべてのデバイスからセルフIDパケットがブ
ロードキャストで送信される。本実施の形態のIEEE
1394デバイス101ではこれらのセルフIDパケッ
トの受信、格納を行い、バス上にいくつのIEEE13
94デバイスが接続されているかを把握する。また、セ
ルフIDパケット内のCビット(CONTENDER bit)がセ
ットされているノードを把握する。これはアイソクロナ
ス・リソース・マネージャとなったノードを把握するた
めで、Cビットがセットされているノードのうち、ID
がもっとも大きいものがアイソクロナス・リソース・マ
ネージャ対応ノードとなる。In step S201, the number of self-ID packets is counted. When the bus is reset, all devices connected to the bus broadcast the self-ID packet. IEEE of the present embodiment
The 1394 device 101 receives and stores these self-ID packets, and determines the number of IEEE 13 packets on the bus.
Figure out if 94 devices are connected. Also, the node in which the C bit (CONTENDER bit) in the self ID packet is set is grasped. This is to identify the node that has become the isochronous resource manager. ID among the nodes with the C bit set
The node with the largest is the node that supports the isochronous resource manager.
【0048】ステップS202では、バスに接続されて
いる各デバイスのコンフィグレーションROMの情報を
取得するためのリードトランザクションを発行する。具
体的には、コンフィグレーションROM内のBus_Info_B
lock内のiscビットを確認することでアイソクロナス
転送を行えるデバイスであるかどうかを判断する。ま
た、Node_Unique_IDリーフ内の情報を取得することで、
デバイスの種類やその機能を把握する。In step S202, a read transaction for obtaining the information in the configuration ROM of each device connected to the bus is issued. Specifically, Bus_Info_B in the configuration ROM
By checking the isc bit in lock, it is determined whether or not the device is capable of isochronous transfer. Also, by acquiring the information in the Node_Unique_ID leaf,
Understand the type of device and its function.
【0049】ステップS203では、ステップS202
で取得したコンフィグレーションROM情報を確認し、
その中でアイソクロナス転送をサポートしているノード
があるかどうかを判断する。情報取得の結果ノードが存
在する場合はステップS204へ、存在しない場合は処
理を終了する。In step S203, step S202
Check the configuration ROM information obtained in
It is determined whether or not any node supports isochronous transfer. When the information acquisition result node exists, the process proceeds to step S204, and when it does not exist, the process ends.
【0050】ステップS204では、アイソクロナス転
送をサポートしているノードが、アイソクロナス転送用
の帯域を確保しているかどうかを確認するため、アイソ
クロナス・リソース・マネージャが実装するBANDWIDHT_
AVAILABLEレジスタの値をリードもしくはロックトラン
ザクションによって確認する。また併せてCHANNELS_AVA
ILABLEレジスタの値も確認し、帯域幅とチャネル数を把
握する。この操作はアシンクロナス転送用に残されてい
る帯域を確認するために行う。IEEE1394のプロ
トコルでは、1サイクル(125μsec)内で最大の
データペイロードサイズ分のアシンクロナス転送が行え
る帯域を一つは保証しているが、それ以外にアイソクロ
ナス転送で使用される帯域の残りがどれくらいであるか
を確認することで、1サイクル内に転送可能なパケット
の数やサイズを把握することができる。In step S204, in order to confirm whether or not the node supporting isochronous transfer secures the band for isochronous transfer, BANDWIDHT__ which is implemented by the isochronous resource manager is checked.
Check the value of the AVAILABLE register by a read or lock transaction. In addition, CHANNELS_AVA
Check the value of the ILABLE register to understand the bandwidth and the number of channels. This operation is performed to confirm the bandwidth remaining for asynchronous transfer. The IEEE 1394 protocol guarantees one band that can perform asynchronous transfer for the maximum data payload size within one cycle (125 μsec), but how much remaining band is used for isochronous transfer other than that. By confirming that, it is possible to grasp the number and size of packets that can be transferred within one cycle.
【0051】取得した情報はまとめてデータペイロード
サイズ設定処理部108に伝えられ、その後のデータ転
送時のパケットサイズの初期値を決定する際に用いられ
る。The acquired information is collectively transmitted to the data payload size setting processing unit 108 and used when determining the initial value of the packet size at the time of subsequent data transfer.
【0052】図3は、本実施の形態におけるデータペイ
ロードサイズ設定処理のフローチャートである。FIG. 3 is a flow chart of the data payload size setting process in this embodiment.
【0053】ステップS301では、大容量データの転
送を行うにあたって、転送時のペイロードサイズの初期
値を設定する。初期値の設定方法については図4のフロ
ーチャートを用いて後で詳細に説明する。In step S301, when transferring a large amount of data, an initial value of the payload size at the time of transfer is set. A method of setting the initial value will be described later in detail with reference to the flowchart of FIG.
【0054】ステップS302では、タイマ109をI
EEE1394ドライバ104が起動する。本実施の形
態ではリクエストパケットの送信直前にタイマ109を
起動するが、リクエストパケット送信直後に起動しても
よい。In step S302, the timer 109 is set to I
The EEE1394 driver 104 is activated. In this embodiment, the timer 109 is activated immediately before the request packet is transmitted, but it may be activated immediately after the request packet is transmitted.
【0055】ステップS303では、リクエストパケッ
トを送信する。ステップS302で説明したようにタイ
マ起動との順番を逆にしてもよい。本実施の形態ではS
BP−2プロトコルによる受信側ノードとしてPCを想
定したパケット転送のため、リードのトランザクション
となる。期待するレスポンスパケットのデータペイロー
ド部にプリントデータが含まれる。In step S303, the request packet is transmitted. As described in step S302, the order of timer activation may be reversed. In this embodiment, S
This is a read transaction because the packet transfer is based on the assumption that a PC is the receiving node according to the BP-2 protocol. Print data is included in the data payload of the expected response packet.
【0056】ステップS304では、送信したリクエス
トパケットに対するレスポンスパケットを受信したかど
うかを判断する。実際には分割トランザクションのた
め、レスポンスパケットの受信前にペンディングのAC
Kを受け取っているが、ペンディングを受けたときの処
理については割愛する。対応するレスポンスパケットを
受信した場合はステップS305へ、レスポンスパケッ
トを受信できない場合(例えばACK_busyを受けたり、ス
プリットタイムアウトが発生した場合)はステップS3
10へ進む。In step S304, it is determined whether a response packet to the transmitted request packet has been received. Since it is actually a split transaction, the pending AC before the response packet is received.
I have received K, but I will omit the processing when I receive pending. When the corresponding response packet is received, the process proceeds to step S305, and when the response packet cannot be received (for example, when ACK_busy is received or split timeout occurs), the process proceeds to step S3.
Go to 10.
【0057】ステップS305では、レスポンスパケッ
トの受信を受けてステップS302で起動していたタイ
マ109を停止する。タイマ109としてリンクのLS
Iに内蔵されるスプリットタイムアウト監視用タイマを
使用する場合は、レスポンスパケットの受信と同時にタ
イマ109の停止が自動で行われるものも存在する。In step S305, the timer 109 started in step S302 is stopped upon receipt of the response packet. Link LS as timer 109
When using the split timeout monitoring timer built in I, there is a timer in which the timer 109 is automatically stopped at the same time as the reception of the response packet.
【0058】ステップS306では、停止したタイマ1
09のカウント値を把握する。起動から停止までの時間
を測定するためであるが、停止時に自動的にカウント値
がリセットされてしまうタイマ109を使用する場合は
ファームウェアによってタイマ109を停止して値を確
認する。In step S306, the stopped timer 1
Figure out the count value of 09. This is to measure the time from startup to stop, but when using the timer 109 whose count value is automatically reset at the time of stop, the timer 109 is stopped by firmware and the value is confirmed.
【0059】ステップS307では、ステップS306
で取得したタイマ値がリクエストパケットを送信してか
らレスポンスを受信するまでの時間として許容される基
準値を上回るかどうかを判断する。タイマ値が基準値を
越える場合はステップS308へ、そうでない場合はス
テップS309へ進む。In step S307, step S306
It is determined whether or not the timer value acquired in (1) exceeds the reference value allowed as the time from the transmission of the request packet to the reception of the response. If the timer value exceeds the reference value, the process proceeds to step S308, and if not, the process proceeds to step S309.
【0060】ステップS308では、予想される時間よ
りレスポンスパケット受信に時間がかかっていることを
受けて、リクエストパケット送信の際のデータペイロー
ドサイズの値を変更する。具体的には、現在設定されて
いる値よりも小さな値を設定する。In step S308, the value of the data payload size at the time of transmitting the request packet is changed in response to the fact that it takes longer than expected to receive the response packet. Specifically, a value smaller than the currently set value is set.
【0061】なお、許容される基準値よりもレスポンス
パケットの受信までにかかる時間を示す値の方が大きい
ということから、次の二つのことが想定できる。一つは
アシンクロナス転送用の帯域が狭いために、受信側ノー
ドでレスポンスパケットを送信する準備ができているに
も関わらずバス権を確保できないため時間がかかってし
まっている可能性、もう一つはバス権は確保しているに
も関わらず受信側ノードの処理が遅いため時間がかかっ
てしまっているという可能性である。何れの場合にして
も、データペイロードサイズを小さくすることで問題を
解決することが可能となる。Since the value indicating the time required until the response packet is received is larger than the allowable reference value, the following two can be assumed. One is that the bandwidth for asynchronous transfer is narrow, so it may take time because the bus right cannot be secured even though the receiving node is ready to send the response packet. It is possible that although the bus right is secured, it takes a long time because the processing of the receiving node is slow. In any case, the problem can be solved by reducing the data payload size.
【0062】ステップS309では、続けてさらに送信
すべきリクエストパケットが存在するかどうかを判断す
る。リクエストパケットがまだ存在する場合にはステッ
プS302へ戻り処理を繰り返す。既にデータ転送を終
了してリクエストするべきパケットが存在しない場合は
処理を終了する。In step S309, it is determined whether or not there is a request packet to be further transmitted. If the request packet still exists, the process returns to step S302 to repeat the process. If the data transfer has already been completed and there is no packet to be requested, the process ends.
【0063】ステップS310では、受信側ノードがビ
ジー状態にあるかどうかを判断する。ビジーの場合はス
テップS312へ、そうでない場合、例えばエラーの発
生やスプリットタイムアウト等が発生している場合はス
テップS311へ進む。In step S310, it is determined whether the receiving node is busy. If it is busy, the process proceeds to step S312. If not, for example, if an error occurs or split timeout occurs, the process proceeds to step S311.
【0064】ステップS311では、データエラー、ス
プリットタイムアウトおよびリトライオーバー等により
トランザクションが完結しなかった場合、アプリケーシ
ョンレイヤレベルでもう一度トランザクションを発行す
る。アプリケーションレベルのリトライ回数に関しては
特にプロトコル上規定はないが有限の回数とする。フロ
ーチャートには示していないが、規定回数を超えてもト
ランザクションが完結しなかった場合はエラーとして処
理を中断する。In step S311, if the transaction is not completed due to a data error, split timeout, retry over, etc., the transaction is issued again at the application layer level. The number of application-level retries is not specified in the protocol, but it is a finite number. Although not shown in the flowchart, if the transaction is not completed even after the specified number of times, the process is interrupted as an error.
【0065】ステップS312では、受信側ノードがビ
ジーであることを受けて、再度リクエストパケットを送
信するリトライ処理を行う。In step S312, in response to the fact that the receiving side node is busy, a retry process for transmitting the request packet again is performed.
【0066】ステップS313では、リトライパケット
を送信した回数をカウントする。In step S313, the number of times the retry packet is transmitted is counted.
【0067】ステップS314では、ステップS313
でカウントした値がある任意の値Nを越えたかどうか判
断する。任意の値Nはリトライ回数の頻度を示す指標と
なる値として予め適宜設定される。In step S314, step S313
It is determined whether or not the value counted in step 3 has exceeded an arbitrary value N. The arbitrary value N is appropriately set in advance as a value serving as an index indicating the frequency of the number of retries.
【0068】ステップS315では、度重なるリトライ
の発生を受けてリクエストパケット送信の際のデータペ
イロードサイズの値を変更する。具体的には現在設定さ
れている値よりも小さな値を設定する。In step S315, the value of the data payload size at the time of request packet transmission is changed in response to repeated retries. Specifically, a value smaller than the currently set value is set.
【0069】度重なるリトライの発生は、受信側ノード
の処理能力を超えるペイロードサイズでデータを要求し
ていることにある。その場合、データペイロードサイズ
を小さくすることで問題を解決することが可能となる。The occurrence of repeated retries is that data is requested with a payload size exceeding the processing capacity of the receiving side node. In that case, the problem can be solved by reducing the data payload size.
【0070】ステップS316では、送信したリトライ
パケットに対するレスポンスパケットを受信したかどう
かを判断する。実際には分割トランザクションのため、
レスポンスパケットの受信前にペンディングのACKを
受け取っているが、その処理については割愛する。対応
するレスポンスパケットを受信した場合はステップS3
09へ、レスポンスパケットを受信できない場合(例え
ばACK_busyを受けたスプリットタイムアウトが発生した
場合)はステップS317へ進む。In step S316, it is determined whether a response packet for the transmitted retry packet has been received. It's actually a split transaction,
Although the pending ACK is received before the response packet is received, its processing is omitted. When the corresponding response packet is received, step S3
If the response packet cannot be received (for example, a split timeout occurs when ACK_busy is received), the process proceeds to step S317.
【0071】ステップS317では、度重なるリトライ
処理によってリトライの回数が規定回数を超えリトライ
オーバーが発生したかどうかを判断する。リトライオー
バーが発生した場合はステップS311へ進み、そのト
ランザクション処理を終了し、アプリケーションレベル
のリトライ処理を行う。リトライ回数が規定回数以内の
場合はステップS312へ戻り、再度リトライパケット
の送信を行う。In step S317, it is determined whether or not the number of retries exceeds the specified number and retry over occurs due to repeated retry processing. If a retry over has occurred, the process advances to step S311 to end the transaction processing and perform application level retry processing. If the number of retries is within the specified number, the process returns to step S312 and the retry packet is transmitted again.
【0072】図4は、図3のステップS301で行われ
る、本実施の形態におけるデータペイロードサイズ初期
設定処理のフローチャートである。図2で説明したバス
リセット時に取得した情報をもとに大容量のデータ転送
を行う際のデータペイロードサイズの初期値を設定す
る。FIG. 4 is a flowchart of the data payload size initializing process in this embodiment, which is performed in step S301 of FIG. Based on the information acquired at the time of bus reset explained in FIG. 2, the initial value of the data payload size at the time of transferring a large amount of data is set.
【0073】ステップS401では、アイソクロナス転
送用に確保された帯域幅を確認する。この情報は既にス
テップS204で得られているため、内容の確認を行
う。In step S401, the bandwidth reserved for isochronous transfer is confirmed. Since this information has already been obtained in step S204, the content is confirmed.
【0074】ステップS402では、アシンクロナス転
送を行うノード用に残された帯域が、ある任意の値より
小さいかどうかを判断する。ここでは仮に、元々アシン
クロナス用に確保された帯域以外に、最大ペイロードサ
イズによるアシンクロナス転送をもう一回行えるだけの
帯域を示す値である1229よりも小さいかどうかで判
断を行うが、比較の際に用いる値は任意である。残りの
帯域が任意の値(ここでは1229)より少ない場合は
ステップS403へ、そうでない場合はステップS40
5へ進む。In step S402, it is determined whether or not the bandwidth left for the node performing the asynchronous transfer is smaller than an arbitrary value. Here, for example, in addition to the bandwidth originally reserved for asynchronous transmission, a determination is made based on whether or not it is smaller than 1229, which is a bandwidth indicating a bandwidth that can perform another asynchronous transmission with the maximum payload size. The value used is arbitrary. If the remaining band is less than an arbitrary value (1229 in this case), go to step S403, and if not, go to step S40.
Go to 5.
【0075】ステップS403では、バスに接続された
ノードの総数から、大容量データの転送を意図している
IEEE1394デバイス101(送信側ノード)とそ
の受信側ノードおよびアイソクロナス転送を行っている
ノード数を引いた値が任意の値より大きいかどうかを判
断する。ここでは仮に比較する値を2としたが、ステッ
プS402で判断した残された帯域との兼ね合いで値は
変わる。ここでは、例えばバス102に接続されたノー
ド総数が5で、アイソクロナス転送を行うノードが1つ
存在した場合、IEEE1394デバイス101と受信
側ノードを併せた3ノードを引くと値は2となる。この
ようにして求められた値が2より多い場合はステップS
404へ、そうでない場合はステップS405へ進む。In step S403, from the total number of nodes connected to the bus, the IEEE 1394 device 101 (transmission side node) intended to transfer a large amount of data, its reception side node, and the number of nodes performing isochronous transfer are calculated. Determine if the subtracted value is greater than any value. Here, the value to be compared is temporarily set to 2, but the value changes depending on the balance with the remaining band determined in step S402. Here, for example, when the total number of nodes connected to the bus 102 is 5 and there is one node that performs isochronous transfer, the value becomes 2 when 3 nodes including the IEEE 1394 device 101 and the receiving side node are subtracted. If the value thus obtained is greater than 2, then step S
If not, the process proceeds to step S405.
【0076】ステップS404では、ステップS402
でアシンクロナス転送用の十分な帯域がないと判断さ
れ、かつIEEE1394デバイス101と受信側ノー
ド以外に大容量のデータ転送をアシンクロナス転送を用
いて行う可能性が高いノードが存在する場合に、IEE
E1394デバイス101の受信および送信可能な最大
のデータペイロードサイズよりも小さな値をIEEE1
394デバイス101とのデータ転送を行う際のペイロ
ードサイズとして設定し、初期値設定処理を終了する。
例えば、最大ペイロードサイズが2048bytesの場合
は転送時のペイロードサイズとして1024bytesを設
定する。In step S404, step S402
When it is determined that there is not a sufficient bandwidth for asynchronous transfer, and there is a node other than the IEEE 1394 device 101 and the receiving side node that has a high possibility of performing large-capacity data transfer using asynchronous transfer, the IEEE
A value smaller than the maximum data payload size that can be received and transmitted by the E1394 device 101 is set to IEEE1.
The payload size is set when data is transferred to the 394 device 101, and the initial value setting process ends.
For example, when the maximum payload size is 2048 bytes, 1024 bytes is set as the payload size during transfer.
【0077】ステップS405では、ステップS402
でアシンクロナス転送用の十分な帯域があると判断され
た場合や、ステップS404でアイソクロナス転送に多
くの帯域を確保されてもアシンクロナス転送による大容
量データ転送を行うデバイスが少なく転送の際バスの確
保に不自由しないと判断された場合に、受信側ノードの
受信および送信可能な最大のデータペイロードサイズを
受信側ノードとのデータ転送を行う際のペイロードサイ
ズとして設定し、初期値設定処理を終了する。At step S405, step S402.
When it is determined that there is a sufficient band for asynchronous transfer in step S404, or when a large band is secured for isochronous transfer in step S404, there are few devices that perform large-capacity data transfer by asynchronous transfer, and a bus is secured for the transfer. When it is determined that there is no inconvenience, the maximum data payload size that can be received and transmitted by the receiving side node is set as the payload size when performing data transfer with the receiving side node, and the initial value setting process ends.
【0078】本実施の形態では、機能を実現する手段と
してバスに接続されたノードの情報と受信側ノードのレ
スポンスを考慮したが、受信側ノードのレスポンス対応
を考慮するだけでも、ノードの情報に基づく初期値の設
定を行う場合の効果にはかなわないが、同様の効果を実
現することができる。In the present embodiment, the information of the node connected to the bus and the response of the receiving side node are taken into consideration as means for realizing the function. Although the effect of setting the initial value based on this is inferior, the same effect can be realized.
【0079】以上説明してきたように本発明の構成によ
れば、大容量データ転送時に転送時間の短縮を実現する
ことが可能となる。また、送信回数の増加やリトライ回
数の低減などによるバスの有効利用でシステム全体のパ
フォーマンスを向上させることができる。As described above, according to the configuration of the present invention, it is possible to reduce the transfer time when transferring a large amount of data. Moreover, the performance of the entire system can be improved by effectively using the bus by increasing the number of transmissions and reducing the number of retries.
【0080】[0080]
【他の実施形態】本発明の目的は、前述した実施形態の
機能を実現するソフトウェアのプログラムコードを記録
した記憶媒体(または記録媒体)を、システムあるいは
装置に供給し、そのシステムあるいは装置のコンピュー
タ(またはCPUやMPU)が記憶媒体に格納されたプ
ログラムコードを読み出し実行することによっても、達
成されることは言うまでもない。この場合、記憶媒体か
ら読み出されたプログラムコード自体が前述した実施形
態の機能を実現することになり、そのプログラムコード
を記憶した記憶媒体は本発明を構成することになる。ま
た、コンピュータが読み出したプログラムコードを実行
することにより、前述した実施形態の機能が実現される
だけでなく、そのプログラムコードの指示に基づき、コ
ンピュータ上で稼働しているオペレーティングシステム
(OS)などが実際の処理の一部または全部を行い、そ
の処理によって前述した実施形態の機能が実現される場
合も含まれることは言うまでもない。Other Embodiments The object of the present invention is to supply a storage medium (or recording medium) recording a program code of software for realizing the functions of the above-described embodiments to a system or apparatus, and to supply a computer of the system or apparatus. It is needless to say that it can be achieved by (or CPU or MPU) reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiment are realized, but also an operating system (OS) running on the computer is executed based on the instruction of the program code. It goes without saying that a case where some or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing is also included.
【0081】さらに、記憶媒体から読み出されたプログ
ラムコードが、コンピュータに挿入された機能拡張カー
ドやコンピュータに接続された機能拡張ユニットに備わ
るメモリに書込まれた後、そのプログラムコードの指示
に基づき、その機能拡張カードや機能拡張ユニットに備
わるCPUなどが実際の処理の一部または全部を行い、
その処理によって前述した実施形態の機能が実現される
場合も含まれることは言うまでもない。Further, after the program code read from the storage medium is written in the memory provided in the function expansion card inserted into the computer or the function expansion unit connected to the computer, based on the instruction of the program code. , The CPU provided in the function expansion card or the function expansion unit performs some or all of the actual processing,
It goes without saying that the processing includes the case where the functions of the above-described embodiments are realized.
【0082】本発明を上記記憶媒体に適用する場合、そ
の記憶媒体には、先に説明した図2乃至図4に示すフロ
ーチャートに対応するプログラムコードが格納されるこ
とになる。When the present invention is applied to the above-mentioned storage medium, the storage medium stores the program code corresponding to the flowcharts shown in FIGS. 2 to 4 described above.
【0083】[0083]
【発明の効果】以上説明したように本発明によれば、バ
ス上に流すパケットのデータペイロードサイズを、適切
なデータペイロードサイズに設定することができる。こ
れにより、大容量データ転送時の転送時間を短縮するこ
とができ、送信回数やリトライ回数が低減されるため、
バスを有効活用することが可能となり、システム全体の
パフォーマンスを向上させることが可能となる。As described above, according to the present invention, the data payload size of the packet sent on the bus can be set to an appropriate data payload size. As a result, it is possible to shorten the transfer time when transferring a large amount of data, and to reduce the number of transmissions and retries.
The bus can be effectively used, and the performance of the entire system can be improved.
【図1】本発明の実施の形態におけるシステム構成の概
要を示すブロック図である。FIG. 1 is a block diagram showing an outline of a system configuration according to an embodiment of the present invention.
【図2】本発明の実施の形態におけるバスリセット時に
行われる情報取得処理のフローチャートである。FIG. 2 is a flowchart of information acquisition processing performed at the time of bus reset in the embodiment of the present invention.
【図3】本発明の実施の形態におけるデータペイロード
サイズ設定処理のフローチャートである。FIG. 3 is a flowchart of a data payload size setting process according to the embodiment of the present invention.
【図4】本発明の実施の形態におけるデータペイロード
サイズ初期設定処理のフローチャートである。FIG. 4 is a flowchart of a data payload size initialization process according to the embodiment of the present invention.
101 IEEE1394デバイス(リクエストパケッ
ト送信側ノード)
102 IEEE1394バス
103 IEEE1394I/F制御部
104 IEEE1394ドライバ
105 ノードコントローラ
106 アプリケーションレイヤ
107 アプリケーション
108 データペイロードサイズ設定処理部
109 タイマ
110 プリンタ機能101 IEEE 1394 device (request packet transmission side node) 102 IEEE 1394 bus 103 IEEE 1394 I / F control unit 104 IEEE 1394 driver 105 node controller 106 application layer 107 application 108 data payload size setting processing unit 109 timer 110 printer function
Claims (31)
転送でデータの送受信を行うことが可能な通信装置であ
って、 通信インタフェースを介して接続された外部装置とデー
タの送受信を行う通信手段と、 アシンクロナス転送でデータの送受信を行う場合に、通
信先の外部装置の応答性を判断する判断手段と、 前記判断手段による判断に応じて、アシンクロナス転送
における送受信の際のデータペイロードサイズを変更可
能な変更手段とを有することを特徴とする通信装置。1. A communication device capable of transmitting and receiving data in isochronous transfer and asynchronous transfer, comprising communication means for transmitting and receiving data to and from an external device connected via a communication interface, and in asynchronous transfer. When transmitting and receiving data, a determining means for determining the responsiveness of the external device of the communication destination, and a changing means capable of changing the data payload size at the time of transmitting and receiving in asynchronous transfer according to the determination by the determining means. A communication device having.
信装置が接続されたバス上における、アシンクロナス転
送で用いる転送用帯域に関する情報を取得する取得手段
と、 前記取得手段により取得した転送用帯域に関する情報に
基づいて、前記データペイロードサイズを設定する設定
手段とを更に有し、 前記取得手段及び前記設定手段による動作は、前記判断
手段及び変更手段による動作に先だって行われることを
特徴とする請求項1に記載の通信装置。2. An acquisition unit that acquires information about a transfer band used in asynchronous transfer on a bus to which the communication device is connected via the communication interface, and information about a transfer band acquired by the acquisition unit. And a setting unit configured to set the data payload size based on the above, wherein the operations of the acquisition unit and the setting unit are performed prior to the operations of the determination unit and the changing unit. The communication device described.
各外部装置が持つコンフィギュレーションROM及びコ
ントロールアンドステータスレジスタを読み出すことに
よって、前記転送用帯域に関する情報を取得することを
特徴とする請求項2に記載の通信装置。3. The acquisition means acquires the information on the transfer band by reading a configuration ROM and a control and status register of each external device connected to the bus. 2. The communication device according to item 2.
クロナス転送を行う外部装置数及び当該外部装置が取得
したアイソクロナス転送用の帯域幅及びチャンネル数を
含むことを特徴とすることを特徴とする請求項3に記載
の通信装置。4. The information relating to the transfer band includes the number of external devices performing isochronous transfer, and the isochronous transfer bandwidth and the number of channels acquired by the external device. The communication device according to item 3.
スに接続された外部装置数を含むことを特徴とする請求
項3又は4に記載の通信装置。5. The communication device according to claim 3, wherein the information regarding the transfer band includes the number of external devices connected to the bus.
に前記バスに接続された各外部装置から送信されるセル
フIDパケットを取得することにより前記転送用帯域に
関する情報を取得することを特徴とする請求項2乃至5
のいずれかに記載の通信装置。6. The acquisition means acquires the information on the transfer band by acquiring a self-ID packet transmitted from each external device connected to the bus after the bus is reset. Claims 2 to 5
The communication device according to any one of 1.
る情報が所定条件を満たしている場合に、転送可能な最
大データペイロードサイズに設定することを特徴とする
請求項2乃至6のいずれかに記載の通信装置。7. The setting means sets the maximum transferable data payload size when the information regarding the transfer band satisfies a predetermined condition, according to any one of claims 2 to 6. The communication device described.
に残された帯域が所定帯域よりも大きい場合であること
を特徴とする請求項7に記載の通信装置。8. The communication device according to claim 7, wherein the predetermined condition is that a band left for asynchronous transfer is larger than a predetermined band.
アシンクロナス転送を行う前記バスに接続された外部装
置数が所定数よりも少ない場合であることを特徴とする
請求項7又は8に記載の通信装置。9. The predetermined condition is, in addition to the communication device,
9. The communication device according to claim 7, wherein the number of external devices connected to the bus that performs asynchronous transfer is less than a predetermined number.
トランザクションを完結するのに要する最低限の時間
と、前記通信先の外部装置が応答に要する時間とを比較
することを特徴とする請求項1乃至9のいずれかに記載
の通信装置。10. The determining means compares the minimum time required to complete a transaction performed by the communication device with the time required for a response by the external device at the communication destination. The communication device according to any one of 1 to 9.
時間は、前記通信装置が前記通信先の外部装置にリクエ
ストパケットを送信してからレスポンスパケットを受信
するまでにかかる時間であることを特徴とする請求項1
0に記載の通信装置。11. The time required for the external device of the communication destination to respond is a time required for the communication device to receive a response packet after transmitting a request packet to the external device of the communication destination. Claim 1
0. The communication device according to item 0.
時間計測を行うタイマを更に有することを特徴とする請
求項10及び11に記載の通信装置。12. The communication device according to claim 10, further comprising a timer for measuring a time required for the external device of the communication destination to respond.
置の応答性が低い場合に、データペイロードサイズ値を
小さくすることを特徴とする請求項1乃至12のいずれ
かに記載の通信装置。13. The communication device according to claim 1, wherein the changing unit reduces the data payload size value when the external device of the communication destination has low responsiveness.
格に準拠していることを特徴とする請求項1乃至13の
いずれかに記載の通信装置。14. The communication device according to claim 1, wherein the communication unit complies with the IEEE 1394 standard.
ス転送でデータの送受信を行うことが可能であって、通
信インタフェースを介して接続された外部装置とデータ
の送受信を行う通信手段を有する通信装置における通信
方法であって、 アシンクロナス転送でデータの送受信を行う場合に、通
信先の外部装置の応答性を判断する判断工程と、 前記判断工程による判断に応じて、アシンクロナス転送
における送受信の際のデータペイロードサイズを変更可
能な変更工程とを有することを特徴とする通信方法。15. A communication method in a communication device, which is capable of transmitting and receiving data by isochronous transfer and asynchronous transfer and has a communication means for transmitting and receiving data to and from an external device connected via a communication interface. Therefore, when data is transmitted / received by asynchronous transfer, the data payload size at the time of transmission / reception in asynchronous transfer is changed according to the determination step of determining the response of the external device of the communication destination and the determination in the determination step. A communication method comprising a possible changing step.
通信装置が接続されたバス上における、アシンクロナス
転送で使用可能な転送用帯域に関する情報を取得する取
得工程と、 前記取得工程において取得した転送用帯域に関する情報
に基づいて、前記データペイロードサイズを設定する設
定工程とを更に有し、 前記取得工程及び前記設定工程は、前記判断工程及び変
更工程に先だって行われることを特徴とする請求項15
に記載の通信方法。16. An acquisition step of acquiring information on a transfer band usable in asynchronous transfer on a bus to which the communication device is connected via the communication interface; and a transfer band acquired in the acquisition step. 16. A setting step of setting the data payload size based on information, wherein the acquisition step and the setting step are performed prior to the determining step and the changing step.
The communication method described in.
れた各外部装置が持つコンフィギュレーションROM及
びコントロールアンドステータスレジスタを読み出すこ
とによって、前記転送用帯域に関する情報を取得するこ
とを特徴とする請求項16に記載の通信方法。17. The information about the transfer band is obtained by reading a configuration ROM and a control and status register of each external device connected to the bus in the obtaining step. 16. The communication method according to 16.
ソクロナス転送を行う外部装置数及び当該外部装置が取
得したアイソクロナス転送用の帯域幅及びチャンネル数
を含むことを特徴とすることを特徴とする請求項17に
記載の通信方法。18. The information on the transfer band includes the number of external devices that perform isochronous transfer, and the bandwidth and the number of channels for isochronous transfer acquired by the external device. 17. The communication method according to item 17.
バスに接続された外部装置数を含むことを特徴とする請
求項17又は18に記載の通信方法。19. The communication method according to claim 17, wherein the information on the transfer band includes the number of external devices connected to the bus.
ト後に前記バスに接続された各外部装置から送信される
セルフIMパケットを取得することにより前記転送用帯
域に関する情報を取得することを特徴とする請求項16
乃至19のいずれかに記載の通信方法。20. In the acquisition step, the information regarding the transfer band is acquired by acquiring a self-IM packet transmitted from each external device connected to the bus after the bus is reset. Claim 16
20. The communication method according to any one of 19 to 19.
関する情報が所定条件を満たしている場合に、転送可能
な最大データペイロードサイズに設定することを特徴と
する請求項16乃至20のいずれかに記載の通信方法。21. In the setting step, when the information regarding the transfer band satisfies a predetermined condition, the maximum transferable data payload size is set. The communication method described.
用に残された帯域が所定帯域よりも大きい場合であるこ
とを特徴とする請求項21に記載の通信方法。22. The communication method according to claim 21, wherein the predetermined condition is that a band left for asynchronous transfer is larger than a predetermined band.
に、アシンクロナス転送を行う前記バスに接続された外
部装置数が所定数よりも少ない場合であることを特徴と
する請求項21又は22に記載の通信方法。23. The predetermined condition is that, in addition to the communication device, the number of external devices connected to the bus that performs asynchronous transfer is smaller than a predetermined number. Communication method.
うトランザクションを完結するのに要する最低限の時間
と、前記通信先の外部装置が応答に要する時間とを比較
することを特徴とする請求項15乃至23のいずれかに
記載の通信方法。24. The determining step compares a minimum time required for completing a transaction performed by the communication device with a time required for a response by the external device of the communication destination. The communication method according to any one of 15 to 23.
時間は、前記通信装置が前記通信先の外部装置にリクエ
ストパケットを送信してからレスポンスパケットを受信
するまでにかかる時間であることを特徴とする請求項2
4に記載の通信方法。25. The time required for the external device of the communication destination to respond is a time required for the communication device to receive a response packet after transmitting a request packet to the external device of the communication destination. Claim 2
4. The communication method according to 4.
時間計測を行う計時工程を更に有することを特徴とする
請求項24及び25に記載の通信方法。26. The communication method according to claim 24, further comprising a time counting step of measuring a time required for the external device of the communication destination to respond.
場合に、前記変更工程では、データペイロードサイズ値
を小さくすることを特徴とする請求項15乃至26のい
ずれかに記載の通信方法。27. The communication method according to claim 15, wherein the data payload size value is reduced in the changing step when the response of the external device of the communication destination is low.
格に準拠していることを特徴とする請求項15乃至27
のいずれかに記載の通信方法。28. The communication means complies with the IEEE 1394 standard.
The communication method according to any one of 1.
であって、前記プログラムを実行した情報処理装置を、
請求項1乃至14のいずれかに記載の通信装置として機
能させることを特徴とするプログラム。29. A program executable by an information processing device, the information processing device executing the program comprising:
A program that functions as the communication device according to any one of claims 1 to 14.
の通信方法を実現するためのプログラムコードを有する
情報処理装置が実行可能なプログラム。30. A program executable by an information processing device, having a program code for implementing the communication method according to any one of claims 15 to 28.
ムを記憶した記憶媒体。31. A storage medium storing the program according to claim 29 or 30.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001224935A JP2003037596A (en) | 2001-07-25 | 2001-07-25 | Communication device and communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001224935A JP2003037596A (en) | 2001-07-25 | 2001-07-25 | Communication device and communication method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2003037596A true JP2003037596A (en) | 2003-02-07 |
Family
ID=19058016
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2001224935A Withdrawn JP2003037596A (en) | 2001-07-25 | 2001-07-25 | Communication device and communication method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2003037596A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011028445A (en) * | 2009-07-23 | 2011-02-10 | Fujitsu Ltd | Transmission and reception control device, electronic apparatus, data transmission method, and control program |
-
2001
- 2001-07-25 JP JP2001224935A patent/JP2003037596A/en not_active Withdrawn
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011028445A (en) * | 2009-07-23 | 2011-02-10 | Fujitsu Ltd | Transmission and reception control device, electronic apparatus, data transmission method, and control program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0938218B1 (en) | Data communication system, method of communicating data and data communication apparatus | |
US7590133B2 (en) | Data communication system, data communication method, and data communication apparatus | |
US6397277B1 (en) | Method and apparatus for transmitting data over data bus at maximum speed | |
US6717694B1 (en) | Data transmission apparatus, system and method, and recording medium | |
US20020062407A1 (en) | Data communication apparatus and method | |
JP3927647B2 (en) | Information processing apparatus, information processing method, and information processing system | |
JP3560423B2 (en) | Packet transmitting / receiving device and packet receiving device | |
JP2004363687A (en) | Information communication apparatus, system thereof, method thereof, program thereof, and recording medium with the program recorded thereon | |
JP3293779B2 (en) | Signal processing device and control method thereof | |
US20040057448A1 (en) | Information processing system, information processing apparatus, and information processing method | |
JP3400772B2 (en) | Packet transmission / reception processing device | |
US6963938B2 (en) | Information processing apparatus and method therefor | |
JP3630971B2 (en) | Data communication method, apparatus, system, and storage medium | |
US6445718B1 (en) | Serial interface circuit | |
KR100311707B1 (en) | Data communication system, data communication method, data communication apparatus, and digital interface | |
JPH10341247A (en) | Data transmitter, data receiver, data transmission system and data transmission method | |
JP2001333136A (en) | Communication device, data communication system, communication control method, storage medium | |
US6693905B1 (en) | Data exchange unit | |
JP2007088775A (en) | Radio communication system, device, and method | |
JP2003037596A (en) | Communication device and communication method | |
JP4428750B2 (en) | Data communication system | |
KR100491675B1 (en) | Method of data transmission, system for data transmission, control device for data transmission, and program recording medium | |
JP3943722B2 (en) | Data transfer apparatus, data transfer system and method, image processing apparatus, and recording medium | |
JP4026979B2 (en) | Data communication system | |
JP2000224195A (en) | Data transmission equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20081007 |