FX3 Data transaction error for ASMedia

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
NoAr_1540581
Level 5
Level 5
Distributor - Macnica (Japan)
5 solutions authored 250 sign-ins 100 replies posted

Hello

There is a PC (NEC PC-GN254U2GA) that carries both intel USB3.0 host device and ASMedia USB3.1 host device. Only when connecting a product using FX3 this time and transferring data, when connecting to ASMedia. The USB transaction error occurs.

Switching between two devices is performed on the customer's HOST GUI. For the internal system, please refer to the PDF file after the ”EP変更後.pdf”.

Attach the analyzer log in LeCroy.

As a phenomenon, an error occurs during the operation of using a dedicated application on Windows and intermittently downloading image data of about 2MByte, and the application stops data transfer. The error frequency occurs when tens to hundreds of image frames are transferred from the start of data transfer.

The transaction is considered to be a transaction error because the USBStatus value acquired by the application on Windows has stopped at 0xC0000011.

When an error occurs, the data transfer to FX3 is stopped because the flag on the GPIF side of FX3 becomes buffer full. When the USB cable is inserted and removed from this state and the data transfer is started again, the data transfer starts normally. For this reason, the circuit itself on the GPIF side is operating normally, and we have determined that this issue has occurred between FX3 and the host PC.

It seems that the  issue seems to occur only ASMedia.

Based on the attached log, the data packet is Failed.(ex. Transaction 20/Transaction 25/ Transaction 26,,etc)

attached file Pass word:   icDOI40u

Q)  Could you please tell  me the root cause based on the above situation?

Best Regards

Arai

0 Likes
1 Solution
HirotakaT_91
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Hello,

First of all, NRDY is not an error. An IN endpoint sends NRDY TP to the host if the device cannot return a DP in response to an ACK TP sent by the host.

Since FX3 sends ERDY after NRDY, this behavior complies with the spec. No issue has found here.

I am not sure how their designed host application works.

Have they tested using Cypress Streamer application?

Have they tested continuous data transfer instead of intermittent data transfer?

USBD_STATUS_XACT_ERROR (0xC0000011) occurs due to "CRC error", "Bad USB PID", "Time out", or some illegal packet for example, DP sends same data toggle that sent from previous DP. I have not seen these errors on the trace data, though.

Best regards,

Hirotaka Takayama

View solution in original post

0 Likes
9 Replies
HirotakaT_91
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

Hello,

First of all, NRDY is not an error. An IN endpoint sends NRDY TP to the host if the device cannot return a DP in response to an ACK TP sent by the host.

Since FX3 sends ERDY after NRDY, this behavior complies with the spec. No issue has found here.

I am not sure how their designed host application works.

Have they tested using Cypress Streamer application?

Have they tested continuous data transfer instead of intermittent data transfer?

USBD_STATUS_XACT_ERROR (0xC0000011) occurs due to "CRC error", "Bad USB PID", "Time out", or some illegal packet for example, DP sends same data toggle that sent from previous DP. I have not seen these errors on the trace data, though.

Best regards,

Hirotaka Takayama

0 Likes
NoAr_1540581
Level 5
Level 5
Distributor - Macnica (Japan)
5 solutions authored 250 sign-ins 100 replies posted

Hello

>Have they tested using Cypress Streamer application?

>

The customer cannot switch the Host device (Intel / ASMedia) without using customer's HOST application. Does it mean they need to test Cypress Streamer app only ASMedia using SF_streamIN.img?

Best Regards

Norimitsu arai

0 Likes

Understood they can only use their host application for the test.

>Does it mean they need to test Cypress Streamer app only ASMedia using SF_streamIN.img?

No. I have never said FX3 FW.

Please tell previous my response to the customer that is current answer.

Best regards,

Hirotaka Takayama

0 Likes
NoAr_1540581
Level 5
Level 5
Distributor - Macnica (Japan)
5 solutions authored 250 sign-ins 100 replies posted

Hello

I have done to share all Cypress response with the customer, and we analyzed the log when the error occurred, but could not find the error as FX3. Also, There are some errors after stopping the analyzer, but it is not related to this problem.

As a result, to identify if it  is  their HOST app issue, The customer created a project for their board using the VHDL source in 001-65974_AN65974.zip and run the application.
However, for StreamIN, it fails with timeout without any change.
First of all, the customer thinks that it is necessary to confirm that normal operation in the environment of Streamer application + customer's board + AN65974, But ,Even if they start data transfer with Streamer or CyControle, there is no change in FLAG, so the FPGA cannot perform the next operation.

Are there any possible causes?

Best Regards

Arai

0 Likes

It is totally a general question about AN65974. You know very well about FX3 and may be able to handle it without Cypress support.

Have they programmed "SF_streamIN.img" to the FX3? Is the FW match the customer hardware environment?

Are the pin configurations changed for the FPGA that the customer would like to use?

General information about SlaveFIFO FX3 Firmware and FPGA project is mentioned in An65974 clearly.

Best regards,

Hirotaka Takayama

0 Likes
NoAr_1540581
Level 5
Level 5
Distributor - Macnica (Japan)
5 solutions authored 250 sign-ins 100 replies posted

AN65974に沿って、FX3のstreamIN.imgサンプルを使用して動作した結果、ASMediaもIntelも両方Failureが発生しませんでした。

且つ、当初、StreamINが動作しない件、原因が下記の様にわかりました。

但し、Streamer.exeで評価をする上で、AN65974のサンプルFW含め、幾つかの疑問が生じましたのでご確認をお願いします。

(詳細)

GPIF-IIの動作を観測すると、リセット解除後に、FPGAはデータ送信を開始しますが、32bit x 4095個のデータを送信したところで、FX3のFLAGB(almost full)が"L"に落ち転送を停止しており、FLAGA(full)は"H"のままの状態で、アプリケーションから

転送を開始してもそのまま動きがない状態です。FX3では転送されたデータは16kbyteのバッファがfullになっていないため、USB側にデータ出力をせず、ホストPC側でアプリケーションがタイムアウトになっているようです。

FX3のバッファではデータの出力がされないため、FLAGB(almost full)が"L"の状態が保持され、FPGAのロジックはFLAGBが"H"になるのを待った状態のままになっています。

almost fullの状態でも、FX3のバッファがfullになるまでデータを書き込むようにslaveFIFO2b_streamIN.vhdを変更したところ、回路リセット後にFPGAから32bit x 4096個のデータ出力をバッファ数の8回繰り返したあとで停止し、Streamer.exeでFailureなく

データ転送できるようになりました。

Q1)

上記監察結果より、「FLAGB(almost full)」と「FLAGA(full)」を使う制御は下記の制御処理フローかと想定しています。下記認識が正しい場合、上記結果より、(イ)の処理を追加しないと正常に動作しないという認識ですが正しいでしょうか?

(ア) FLAGB(almost full)=Active(active Low)になるまで32bitデータを繰り返し書き込む

(イ) FLAGB(almost full)=Activeになったら、最後に一回だけ32bitデータを書き込む

(ウ) FLAGA(full)=Active(active Low)になっていることを確認し、FLAGA(full)=Inactive(inactive High)になるまでWait

(エ) FLAGA(full)=Inactiveを確認したら(ア)に戻る

Q2)

上記 Q1)と関連しますが、AN65974付属のバイナリファイルと評価基板環境で動作するということですが、

VHDLのRTLソースとバイナリファイルでロジックが違っているということはないでしょうか?

Q3)

Streamer.exeの画面のTransfer Rate(KBps)の部分がありますが、この単位は KByte/s でしょうか、それともKbit/sでしょうか?

動作させてみたところ 328000 くらいの値になっています。

これは、32800Kバイト/sという認識ですが正しいでしょうか?

Q4) Streamer.exeでの転送サイズを知る方法と変更する方法はありますか?

Packets per Xfer と Xfer to Queue を変えて試してみたのですが、転送サイズは最大4MByteという警告メーッセージの中で、パケットサイズは自動で変更されるような内容の記述がありました。

宜しくお願い致します

マクニカ 荒井

0 Likes

A1.

ご認識が正しくないと思います。

AN65974のサンプルFWをそのままFX3に利用されていますか、変更されていますか。

Stream INのFPGA側(Verilog or VHDL)の動作は「12.4.1. ストリーム IN の例: FPGA がスレーブ FIFO に書き込む」の通りです。

A3.

KBytes/sです。

興味がございましたら詳細は以下のApplication noteを御覧ください。

https://www.cypress.com/documentation/application-notes/an86947-optimizing-usb-30-throughput-ez-usb-...

A4.

Packets per Xferの日本語は、Xferあたりのパケットです。

警告メッセージは、4MBytesを超えた設定の時に出ており、その時にパケットサイズは自動で変更されるという話だと思うのですが。

Cypress

0 Likes
NoAr_1540581
Level 5
Level 5
Distributor - Macnica (Japan)
5 solutions authored 250 sign-ins 100 replies posted

設定変化_警告.png

上記のストリーマー画面は、Packets per Xferを512に設定したにも関わらず自動的に256に変換されて動作している状態の画面キャプチャ―となります。自動変換は、Total Xfer length が4Mバイトに制限されている事からと思われますが、

SuperSpeedバルクエンドポイントは、最大1024バイトまでのデータパケットペイロードサイズに対応している事から、

理論上の転送サイズは、 1kバイト x 256= 256kバイトが、転送可能な最大データサイズとなりますでしょうか?

実際にストリーマーを使用して実施したい評価は、転送サイズを1Mバイトや4Mバイト等の、大きな転送サイズのデータを転送して評価したいと考えておりますが、上記ストリーマーの設定値を変更する事で実現可能なのでしょうか?

その場合、各設定値をどのような値にすればよいか教えて頂けますでしょうか?

マクニカ 荒井

0 Likes

pastedImage_0.png

Packets per Xfer: 転送は 1 つのデータ セットに対するパケットの集まりです。転送ごとのパケット数が多いほど、USBオーバーヘッドが低減され、より高いデータ レートが得られます。

Xfers to Queue: この設定により、複数の転送を開始して、それらをタスク キューに追加することができます。これはホスト アプリケーション側の連続転送間の待ち時間を減らします。そのため、より多くの転送をキュー行列に入れることは、より高いデータ転送速度を与えます。

AN86947について、興味がございましたら読んでくださいと書きましたが、興味がなくても理解されたいのであれば読んでください。日本語にも翻訳されているドキュメントですので、お読みいただけると思います。

バルク転送については「7. バルク転送」に記載がございます。環境セットアップは「3. テスト セットアップ」に書かれています。

https://www.cypress.com/documentation/application-notes/an86947-optimizing-usb-30-throughput-ez-usb-...

ご質問に関して、非常に曖昧な事項が多く見受けられます。

一度ドキュメントをお読みいただき、ご自身で整理されてからご質問いただけますでしょうか。

また、本スレッドはASMedia関係でFX3には問題ないことが確認されており、既に完全にトピックから外れております。他のスレッドを立ててご質問ください。6つ目の投稿の時点で指摘させていただくべきでしたが、ご指摘が遅くなり申し訳ございません。

Cypress

0 Likes