8 Link Protocol (リンクプロトコル)
8.7 Link Test (リンクテスト)
The Host and Device shall provide link test facilities to test the quality of the link. Link test in both directions is initiated and controlled by the Host.
ホストとデバイスはリンク品質を検証するためにリンクテスト機能を提供すること<SHALL>。リンクテストは双方向に て行われるが,コントロールはホスト側からのみ行う。
8.7.1 Link Test Methodology (リンクテスト方法)
Link test makes use of test data packets between a Test Generator and a Test Receiver as depicted schematically in Figure 20.
Figure 20 ― Link test methodology
リンクテストは図 20に示すようにテストジェネレータとテストレシーバの間でテストデータパケットを使用することで 実現する。
図 20 ― リンクテスト方法
The Test Generator transmits a Test Data Packet containing a known test pattern produced by a Sequence Generator. The Test Receiver shall compare the received test data packet content against its local Sequence Generator. The Test Receiver shall increment the Error Counter for each word that is different in the data packet.
Cmp
Test packet data
Error Counter
Locally generated test data
error
Link Link
Sequence Link
Sequence
Test Generator Test Receiver
比較 エラーカウンタ
テストパケットデータ
ローカルで 生成した テストデータ
エラー
リンク リンク
シーケンス リンク
シーケンス
テストジェネレータ テストレシーバ
テストジェネレータはシーケンスジェネレータで生成される既知のテストパターンを含むテストデータパケットを送 信する。テストレシーバは各内部シーケンスジェネレータと受信したテストデータパケットの内容を比較すること
<SHALL>。テストレシーバは各ワードで異なるデータパケットを発見した場合にエラーカウンタをインクリメントする
<SHALL>。
8.7.2 Link Test Data Packet Payload Format (リンクテストのデータパケットぺイロードフォーマット)
The Test Data Packet content shall consist of a continuous 4096 byte sequence generated by counting 16 times from 0 to 255 (4096 bytes, 1024 words) as illustrated in Table 23.
Table 23 ― Link test packet format Content
Word P0 P1 P2 P3 Description
K27.7 K27.7 K27.7 Start of packet indication
(see section 8.4 ).
K27.7
0x04 0x04 0x04 0x04 Link test indication.
0 0x00 0x01 0x02 0x03 1 0x04 0x05 0x06 0x07
…
63 0xFC 0xFD 0xFE 0xFF Test data
64 0x00 0x01 0x02 0x03
… 1023 0xFC 0xFD 0xFE 0xFF
K29.7 K29.7 K29.7 K29.7 End of packet indication.
Packet size: 1027 words.
Comment: Using a PRBS (pseudo-random binary sequence) is of no use since 8B/10B line coding is applied to the generated data stream. For the purpose at hand a simple counter works equally well and greatly eases implementation.
テストデータパケットは 0~255 を 16 回繰り返すことによる 4096 バイトシーケンス(4096 バイト, 1024 ワード)で構 成すること<SHALL>。これを表 23に示す。
表 23 ― リンクテストのパケットフォーマット 内容
ワード P0 P1 P2 P3 説明
K27.7 K27.7 K27.7 K27.7 パケット開始フラグ
(セクション8.4 参照)
0x04 0x04 0x04 0x04 リンクテストのフラグ
0 0x00 0x01 0x02 0x03 1 0x04 0x05 0x06 0x07
…
63 0xFC 0xFD 0xFE 0xFF テストデータ
64 0x00 0x01 0x02 0x03
… 1023 0xFC 0xFD 0xFE 0xFF
K29.7 K29.7 K29.7 K29.7 パケット終了フラグ
パケットサイズ:1027 ワード
コメント: 生成されたデータストリームは 8b/10b ラインコーディングが適用されているので PRBS(擬似乱数バイナリシーケン ス)の使用は無意味となる。このため,シンプルなカウンタを用意するのが実装的に簡単である。
Test Data shall be classed as Data – control data for packet transmission priority (see Table 12).
Comment: This ensures that the control messages to start and stop link test have priority over the test data.
テストデータのパケット伝送優先レベルは データ ― コントロールデータ とすること<SHALL>(表 12参照)。
コメント: これはリンクテストを開始/停止するためのコントロールメッセージがテストデータより優先されることを確実にするも のである。
8.7.3 Host to Device Link Test (ホストからデバイスへのリンクテスト)
The Host shall implement a Test Generator and the Device a Test Receiver as shown in section 8.7.1.
The Error Counter in the Device shall be implemented as bootstrap registers TestErrorCount[n] (where n is the link number). The Host shall have read and write access to these registers allowing it to reset them.
The Host shall use a spacing of at least one IDLE word between each test data packet, and shall insert IDLE packets into the test sequence to meet the IDLE requirements (see section 8.2.5.1).
The Device shall process a received test data packet from the Host at all times regardless of the setting of the TestMode bootstrap registers.
セクション8.7.1の内容に従ってホストはテストジェネレータを,デバイスはテストレシーバを実装すること<SHALL>。
デバイス側のエラーカウンタはブートストラップレジスタTestErrorCount[n](nはリンク数)として実装する
<SHALL>。ホストはこれらのレジスタに対してリセットを実行できるように読み出し/書き込みの機能を備えること
<SHALL>。
ホストは最低1つのIDLEワードを各テストデータパケットの間に挿入し,さらにアイドルの要件にあわせてテストシ ーケンスにアイドルパケットを挿入する<SHALL>(セクション8.2.5.1参照)。
デバイスはTestModeブートストラップレジスタの設定に関係なく,ホストから受信したテストデータパケットを定常 的に処理すること<SHALL>。
To test the Host to Device links the Host shall execute the following operations:
Reset the Device Error Counters by writing the value 0 to TestErrorCount[n] registers.
Run the test for a pre-determined amount of time providing the desired coverage for each link involved in the test.
Read and process the TestErrorCount[n] register values for each link involved in the test.
ホストからデバイスへのリンクテストを行う場合,ホストは以下の各オペレーションを実行すること<SHALL>:
TestErrorCount[n]レジスタに 0 を書き込んでデバイスエラーカウンタをリセットする。
テストを適用する各リンクに対し,前もって見積もったそれぞれに必要な時間でテストを実行する。
テストを適用する各リンクに対し,TestErrorCount[n]レジスタの値を読み出し,処理する。
8.7.4 Device to Host Link Test (デバイスからホストへのリンクテスト)
The Device shall implement a Test Generator and the Host a Test Receiver as shown in section 8.7.1.
The Test Generator shall be controlled via the downlink test control bootstrap registers TestMode. The Host shall have read and write access to this register. When the register is set to 1 for Test Mode the Device shall transmit test data packets at a regular interval.
The spacing between test data packets shall be at least 16 word intervals allowing room for control data packets. The Device shall insert IDLE packets into the test sequence to meet the IDLE requirements (see section 8.2.5.1), but shall not transmit data other than link test packets or control packets.
セクション8.7.1の内容に従ってデバイスはテストジェネレータを,ホストはテストレシーバを実装すること<SHALL>。
テストジェネレータはダウンリンクのテストコントロール用ブートストラップレジスタTestMode 経由でコントロールす る<SHALL>。ホストはこのレジスタに対する読み出し/書き込み機能を備えること<SHALL>。レジスタがテストモ ードを示す 1 に設定されているとき,デバイスは一定の間隔でテストデータパケットを送信する<SHALL>。
各テストデータパケットの間の間隔は,各コントロールデータパケットの挿入を可能にするために最低 16 ワード分 を確保すること<SHALL>。デバイスはIDLEの要件(セクション8.2.5.1参照)にあわせてテストシーケンスにアイド ルパケットを挿入する必要がある<SHALL>が,リンクテストパケットやコントロールパケット以外のデータを送信し てはならない<SHALL NOT>。
To test the Device to Host links the Host shall execute the following operations:
Stop the Device from transmitting streaming data if applicable (stop image acquisition).
Reset the Error Counters at the Host receivers that are involved in the test.
Put the Device in Test Mode by writing 1 to the TestMode bootstrap registers.
Run the test for a pre-determined amount of time providing the desired coverage for each link involved in the test.
Read and process the Error Counter values from the receivers involved in the test.
Restore normal Device operation by writing 0 to the TestMode bootstrap registers.
Comment: Both Device to Host and Host to Device link tests can be run at the same time.
デバイスからホストへのリンクテストを行う場合はホストが以下のオペレーションを実行すること<SHALL>:
必要であればデバイスのストリーミングデータ送信を停止させる(画像取り込みを停止する)。
テストを適用するホスト側レシーバにてエラーカウンタをリセットする。
TestModeブートストラップレジスタに1を書き込んで,デバイスをテストモードにする。
各リンクにて前もって見積もった必要な時間だけテストを実行する。
テストを適用するレシーバからエラーカウンタ値を読み出し,処理する。
TestModeブートストラップレジスタに 0 を書き込んで,通常のデバイス動作に戻す。
コメント: デバイスからホスト方向,ホストからデバイス方向へのリンクテストは同時に実行することができる<CAN>。