dsp與fpga通信之dsp在nwrite時如果帶門鈴信號,完成傳輸的時間會很長

    現象:dsp在nwrite完成會發送一個nwrite finished的門鈴信號,計時dsp的單次發送傳輸時間會很長,達到秒級別
    分析:多種嘗試後,發現nwrite不加門鈴,傳輸時間是正常的,因此懷疑門鈴發送問題;網上查了有類似問題,提到一個關鍵問題,門鈴信號是要有response信號的,查詢dsp的狀態寄存器也確實是指示傳輸超時;fpga端的代碼沒有對門鈴做response處理,因此基本確認問題的根源。
    srio手冊中“SP_RT_CTL”說明如下:
    Timeout value for all ports on the device. This timeout is for sending a packet to receiving the corresponding
response packet. Max value represents 3 to 6 seconds. The timeout duration can be expressed as:
Timeout = 15 x((Prescale Value + 1) x DMA Clock Period x Timeout Value)
where Prescale Value is set in PER_SET_CNTL (offset 0020h) and the Timeout Value is the decimal representation
of this register value. For example, given a 400 MHz DMA, a Prescale Value of 4, and a Timeoout Value of FFFFFFh,
the Timeoout duration would be:
Timeout = 15 x((4 + 1) x 2.5 ns x 16777216) = 3.15 s
    查dsp的寄存器確實是0xFFFFFF,爲最大時長的超時時間,這個值我在初始化時是沒有配置的
    解決:將SP_RT_CTL設置爲0,測試的結果和無門鈴的方式基本相同。
    

    補充:fpga這邊增加response信號,應該也可以正常,目前還未驗證。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章