• 検索結果がありません。

Stream Data Packet (ストリームデータパケット)

ドキュメント内 CoaXPress Standard (ページ 78-84)

8 Link Protocol (リンクプロトコル)

8.5 Stream Data Packet (ストリームデータパケット)

Stream data packets are used to send stream data (see section 9.1 ) across the links.

ストリームデータパケットは複数のリンクを跨ぐストリームデータ(セクション9.1 参照)の送信に使用される。

The packet transfer layer is responsible for forming packets from a stream by chopping the stream into blocks and adding a stream packet header and trailer to form a packet. This is shown diagrammatically in Figure 14.

Figure 16 ― Packet formation in Device – image data example Comment: This figure is best viewed in color.

Line 1 Line 2 Line 3 Line 4 Line 5

LM LM LM LM LM

Line 1 Line 2 Line 3 Line 4 Line 5

IH

IH 1 1 2 2 3 3 4 4 5 5

Explanation of terms used:

Pkt 0 Pkt 1 Pkt 2 Pkt 3 Pkt 4 5

Pkt 0 Pkt 1 Pkt 2 Pkt 3 Pkt 4

Form into a stream

Packetize

Raw line data

SOH Start Of Header

Stream data

Stream data packets Stream

markers

LM Line marker

SPH

SPT SPH

SPT SPH

SPT SPH

SPT SPT

SPH SPH

SPT

SPH Stream Packet Header SPT Stream Packet Trailer

IH Image Header

Pkt 5

パケット伝送レイヤは 1 つのストリームから複数のパケットを生成する役目を担う。これはストリームを切断して複数 のブロックに分け,1 パケットを構成するためのストリームパケットヘッダおよびストリームパケットトレイラを付加する ことによって行う。これを図 16のダイアグラムで示す。

図 16 ― デバイス内でのパケット生成:画像データの例

コメント: この図はカラー表示に最適化されている。

The packet transfer layer is also responsible for sharing all the packets from the Device across the available links, as shown diagrammatically in Figure 17 and described in the following sections.

Figure 17 ― Packet processing in Device Line 1 Line 2 Line 3 Line 4 Line 5

LM LM LM LM LM

ライン1 ライン2 ライン3 ライン4 ライン5

IH

IH 1 1 2 2 3 3 4 4 5 5

略称説明:

Pkt 0 Pkt 1 Pkt 2 Pkt 3 Pkt 4 5

Pkt 0 Pkt 1 Pkt 2 Pkt 3 Pkt 4

1つのストリームを生成

パケット化

Rawラインデータ

ヘッダの開始 SOH

ス ト リ ー ム データ

各ストリーム データ パケット 各ストリーム

マーカ

LM ラインマーカ

SPH

SPT SPH

SPT SPH

SPT SPH

SPT SPT

SPH SPH

SPT

SPH ストリームパケットヘッダ SPT ストリームパケットトレイラ

IH イメージヘッダ

Pkt 5

Formatted Stream Data

Packetize

Other stream(s) from Device

Multiplexing Stream

data packets

Link(0) Link(n-1) Link distribution

Needed when more than one stream

Needed when more than one link

パケット伝送レイヤは図 17のダイアグラムと次のセクションで示すように,有効な複数のリンクを跨ぐデバイスから の全てのパケットを分配する役目も担う。

生成された ストリームデータ

パケット化

図 17 ― デバイス内のパケット処理

8.5.1 Stream Data Packet Format (ストリームデータパケットのフォーマット)

The packet format is shown in Table 19.

Table 19 Stream data packet format

Word Content Description

4x K27.7 Start of packet indication (see section 8.4 ).

4x 0x01 Stream data packet indication.

0 4x Stream ID Unique stream ID that this packet contains data for. SPH 1 4x Packet Tag 8 bit tag. Incremented for each packet with this stream ID,

wraparound to 0 at 0xFF.

2 4x DsizeP(15:8) 3 4x DsizeP(7:0)

16 bit value representing the number of stream data words N per packet.

4 to N+3

Stream data N words of stream data.

N+4 CRC 32-bit CRC calculated over the stream data 4 to (N+3). SPT 4x K29.7 End of packet indication.

Packet size: N + 8 words.

Note: The Stream Packet Header (SPH) and Stream Packet Trailer (SPT) are shown in the right hand column.

デ バ イ ス か ら の 他 の ス ト リ ー ム

マルチプレクス 各ストリーム

データ パケット

リンク(0) リンク(n-1) リンクの振り分け

複数のストリームを 必要とするとき 複数のリンクを 必要とするとき

Comment: The Stream ID is the same as in the image header (e.g. section 9.4.6.2). This allows the packet decoder in the Host to read the Stream ID and therefore send the packet’s contents to the appropriate buffer for that stream. The Stream ID will still be in that buffer (in the image header), and will be needed to process the stream.

パケットのフォーマットを表 19に示す。

表 19 ― ストリームデータパケットのフォーマット

ワード 内容 説明

4× K27.7 パケットの開始フラグ(セクション8.4 参照).

4×0x01 ストリームデータパケットのフラグ

0 4×Stream ID このパケットが含むデータのユニークなストリームID SPH 1 4×Packet Tag 8bitのタグ。各パケット毎にこのストリームIDが付加され,0~0xFF

あいだでインクリメントされる 2 4×DsizeP(15:8)

3 4×DsizeP(7:0)

パケット毎にストリームデータワードNで表される16bit

4

N+3

Stream data ストリームデータのNワード

N+4 CRC データワード4(N+3)にて演算される32bit CRC SPT

4× K29.7 パケット終了フラグ

パケットサイズ:N + 8 ワード

注:ストリームパケットヘッダ(SPH)とストリームパケットトレイラ(SPT)を右端の列に示している。

コメント: ストリームIDはイメージヘッダの中のものと同じになる(セクション9.4.6.2参照)。これはホストにおけるパケットデコー ダがストリームIDを読み出し,そのストリームに対応するバッファへパケットの内容を送ることを可能にする。ストリー ムIDは(イメージヘッダの)バッファ内に残したままでストリームを処理する必要がある。

8.5.2 Packet Size (パケットサイズ)

The total stream data packet size (i.e. from the first K27.7 to the last K29.7) shall not be more than the size set in StreamPacketDataSize during Device discovery (see section 10.1.4).

The Device can use any packet size it wants to up to this size.

Comment: The largest supported packet size is recommended for maximum efficiency. A packet size of around 1 Kbytes gives a low packet overhead combined with practical buffer sizes in FPGAs. Depending on the image size compared to the packet size, note that the last data packet in an image could be very small – potentially only transferring 1 word. Also note that bootstrap registers StreamPacketDataSize is set to zero during Device discovery; therefore the Host cannot send any packets until Device discovery completes and the register is set to the correct value.

ストリームデータの総パケットサイズ(= 最初のK27.7 から最後のK29.7 まで)はデバイスのディスカバリ中におい てStreamPacketDataSize にて設定されているサイズを超えてはならない<SHALL NOT>(セクション10.1.4参照)。

デバイスはこのサイズの限界までパケットを使用することができる<CAN>

コメント: 効率の最大化のためにはサポートされる最大のパケットサイズが推奨される。約 1K バイトのパケットサイズはパケッ トのオーバーヘッドを小さくする。このサイズは FPGA 内のバッファサイズとして現実的なものである。このパケットサ イズに対する画像サイズしだいで,各画像の最後のデータパケットは非常に小さくなる(場合によっては 1 ワードの 伝送だけになる)可能性があることに注意する。また,デバイスのディスカバリ処理中はブートストラップレジスタの StreamPacketDataSize がゼロに設定される。したがってホストはデバイスのディスカバリ処理が完了し,レジスタが 正しい値に設定されるまでパケットを送信できない<CAN NOT>

8.5.3 Packet Order (パケットの順序)

Packets within one stream shall be transmitted in order, i.e. the first packet in a stream shall have packet tag 0, then the data immediately following shall be the next packet with tag 1, then tag 2 etc.

Comment: The tag allows the Host to check for missing packets, and to confirm the correct packet order when multiple links are in use. Given that the physical layer is deterministic, the protocol does not need to allow for packets arriving out of order.

1 ストリーム内での各パケットは以下に示す順番で伝送すること<SHALL>(= 1ストリーム内の最初のパケットは パケットタグ 0 をもち<SHALL>,それに続くデータはタグ1をもつ次のパケットとし<SHALL>,次はタグ2をも つ...)。

コメント: このタグはホストが欠落したパケットがないか検証すること,複数リンクで使用する場合に正しいパケット順になって いるか確認することを可能にする。物理レイヤを決定的なものにすることで,自由な順番でパケットが到着すること をプロトコルが許容する必要がなくなる。

8.5.4 Combining Multiple Streams (マルチプルストリームの結合)

After completing one packet transmission, the Device can send the next packet from any stream with available data.

It is the responsibility of the Device to prioritize packet transmission order based on its available buffer sizes.

Comment: A simple Device may only have one stream, so does not need this process.

1 パケット伝送完了後,デバイスはデータを準備できているあらゆるストリームから次のパケットを伝送することがで きる<CAN>

この利用可能なバッファサイズをもとにしたパケット伝送順序の優先順位付けはデバイス側が担う。

コメント: 簡単な構造のデバイスでは1つのストリームしかもたない可能性があるが,その場合はこの処理は不要となる。

8.5.5 Packet Transfer over Multiple Links (マルチプルリンク間でのパケット伝送)

All links shall run at the same bitrate.

全てのリンクは同じビットレートで動作させること<SHALL>。

Successive packets in a stream, or a combined stream (see section 8.5.4), shall be written to the next link in ascending order of Link ID, starting at Link 0, as shown in Table 20.

Table 20 ― Packet order on links – example

Link 0 Link 1 Link 2 Link 3 Time

Packet 0 Packet 1 Packet 2 Packet 3 Packet 4 Packet 5 Packet 6 Packet 7 Packet 8 Packet 9 Packet 10 Packet 11 Packet 12 Packet 13 Packet 14 Packet 15

Note that the Host knows the link order from the bootstrap registers DeviceLinkID it reads during Device discovery (see section 10.1.3).

Comment: A simple Device may only have one link, so does not need this process. The defined order means that the Host knows which link the next packet will be on, without needing to read the packet header to find out.

1ストリーム,または結合されたストリーム(セクション8.5.4)における連続パケットはリンクID の昇順(リンク 0 から開 始)にて次のリンクに書き込むようにする<SHALL>。これを表 20に示す。

表 20 ― リンク間のパケット順序例

リンク0 リンク1 リンク2 リンク3 時間 パケット0 パケット1 パケット2 パケット3

パケット4 パケット5 パケット6 パケット7 パケット8 パケット9 パケット10 パケット11 パケット12 パケット13 パケット14 パケット15

ホスト側からみるとデバイスのディスカバリ処理(セクション10.1.3 参照)中に読み込むブートストラップレジスタ DeviceLinkIDから,リンク順序が既知となることに注意する。

コメント: 簡単な構造のデバイスの場合,1 つのリンクしか持たない可能性があるが,その場合この処理は不要となる。順序 が決められているということは,パケットヘッダを読み出さなくとも次のパケットが存在するリンクをホストが把握してい るということを意味する。

ドキュメント内 CoaXPress Standard (ページ 78-84)