Skip to content

USERDMA #217

Answered by boledulab
nthuyouwei asked this question in Q&A
May 8, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

下面介紹 DMA 設計的考量:

  1. HLS design 不應該用 hardwire constant, e.g. BUF_LEN。這樣的設計就只能傳 固定大小的data。若是 FIR data size 改變,豈不要修改硬體設計。所以 while (final_s2m_len < BUF_LEN) 這個 loop 要拿掉。
  2. userDMA 是需要指定需要傳輸的資料量 (在 argument list 中, 用 axilite 的configuration cycle 指定)。而 FIR IP 需要用 axi-stream中 的 tlast 信號告知這個 frame 的運算結束了。 這有幾個可能的做法
    1. 在 axi-stream-in 要用 tlast, testbench 或 userDMA 的 m2s (memory-to-stream)的最後一筆data,assert tlast。FIR 收到 tlast 知道這是最後一筆data, 在 Y output 的最後一筆 data, assert tlast。
    2. 或 FIR 有設定 (axilite program)data-length, 在 Y 送出最後 data 時, assert tlast。
  3. userDMA 需要設計的更 robust, 絕對不能把系統 當掉,即使 FIR 多送,或少送 data (也就是 tlast 提早)。
    • 多送的 data, 即 tlast 超過 DMA 設定的 Len。多送的data, 就 drop 掉。但要記錄在 status 中。這樣 software 才知道系統發生了什麼事。
    • 少…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@boledulab
Comment options

Answer selected by nthuyouwei
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants