xilinx VDMA IP核使用
VDMA實用配置說明
VDMA是通過AXI Stream協議對影片數據在PS與PL端進行搬運,開發者無需關注AXI Stream協議,在BlockDesign設計中只需要把相應訊號進行連接即可。
VDMA配置有兩個選項
1、 Basic:
選擇地址位寬32bit 或者64bit;
FrameBuffer 1~32可選,通常選擇3幀快取;可避免影像割裂;
2、 Adanced:
寫通道配置:
maxi_S2MM 是將stream流數據通過axi匯流排寫進memory。
Fsync Options幀同步有三個選項none、s2mm fsync、s2mm tuser;
none被選擇後AXI VDMA處於free run模式,VDMA會儘可能快速的搬運數據,不受外部觸發訊號所控制;
s2mm fsync被選擇VDMA檢測到s2mm fsync下降沿訊號後開始搬運數據;
s2mm tuser被選擇VDMA檢測影片幀起始訊號(SOF)即AXI4-Stream下的s2mm tuser訊號,檢測到訊號拉高後開始搬運影片數據;
GenLockMode有四個選項Master、Slave、DynamicMaster、DynamicSlave;
Master:VDMA在s2mm_frame_ptr_out埠輸出當前幀號;
Slave:When selected, Slave follows the Master by the frames set in the Frame Delay registereither by skipping or repeating frames. The GenlockEn (S2MM_VDMACR[3]=1) registershould be set to enable genlock synchronization between the Master and Slave. Itoutputs the current frame number on the mm2s_frame_ptr_out port.;
DynamicMaster:When selected, AXI VDMA skips the frame buffers that the Dynamic Slave is working on.
It outputs the completed frame number on the s2mm_frame_ptr_out port. GenlockEn
(S2MM_VDMACR[3]=1) register should be set to enable genlock
synchronization between Dynamic Master and Dynamic Slave.
DynamicSlave:When
selected, AXI VDMA follows the Dynamic Master either by skipping or repeating
frames. It outputs the current frame number on the s2mm_frame_ptr_out port.
GenlockEn (S2MM_VDMACR[3]=1) register should be set to enable gunlock
synchronization between Dynamic Master and Dynamic Slave.
讀通道配置:
maxi_mm2s通道是將影片數據通過axi匯流排從memory讀出;
maxis_mm2s 是將影片數據轉成axis stream數據流形式;
Fsync
Options幀同步有兩個選項none、mm2s fsync;
none被選擇後AXI VDMA處於free run模式,VDMA會儘可能快速的搬運數據,不受外部觸發訊號所控制;
注意在選擇none後通道會提供一個幀起始脈衝m_axis_mm2s_tuser(0)可用於下一級模組downstream;
mm2s
fsync被選擇VDMA檢測到mm2s fsync下降沿訊號後開始搬運數據;
GenLockMode有四個選項Master、Slave、DynamicMaster、DynamicSlave;
Master:VDMA在mm2s_frame_ptr_out埠輸出當前幀號;
Slave:When
selected, Slave follows the Master by the frames set in the Frame Delay
registereither by skipping or repeating frames. The GenlockEn (MM2S_VDMACR[3]=1
registershould be set to enable genlock synchronization between the Master and
Slave. Itoutputs the current frame number on the s2mm_frame_ptr_out.;
DynamicMaster:When
selected, AXI VDMA skips the frame buffers that the Dynamic Slave is working
on.
It outputs the completed frame number on the mm2s_frame_ptr_out. GenlockEn
(MM2S_VDMACR[3]=1) register should be set to enable gunlock synchronization
between Dynamic Master and Dynamic Slave.
DynamicSlave:When
selected, AXI VDMA follows the Dynamic Master either by skipping or repeating
frames. It outputs the current frame number on the mm2s_frame_ptr_out .
GenlockEn (MM2S_VDMACR[3]=1) register should be set to enable gunlock
synchronization between Dynamic Master and Dynamic Slave.
VDMA工作簡單時序理解
VDMA內部linebuffer通過HP介面從DDR中搬運數據,通常VDMA之後直接連接axis_stream to video out IP模組,該IP模組內部通過非同步FIFO來快取數據實現跨時鐘域的問題,整體時序描述為VDMA 出tready訊號給到PS,VDMA會預讀一部分數據到linebuffer中,檢測到video_out模組給出的tready訊號將數據給到video_out 模組的fifo中,如果fifo存滿則video_out不再給VDMA tready訊號,此時VDMA仍舊一直從DDR中讀數據,直到video_out模組中的FIFO變空再次給出tready訊號,數據才會從VDMA中linebuffer流向video_out模組;
VDMA 同步機制理解
Master和Slave同步機制相當於古代的夫妻,講究的是夫唱婦隨,master是老公,slave是老婆,master不去理會slave當前在操作哪幀數據,自己只顧干自己的事情;slave則需要跟隨master,因此slave需要實時監測master的ptr幀指針。
Dynamic master/Dynamic
slave同步機制則像現代社會的夫妻制度,講究的是謙讓和諧,master還是老公,slave還是老婆,但是兩者在工作時會通過ptr指針互相監督彼此。假如master看到slave在操作某一幀即1時,而此時自己也想對1進行操作,他會考慮這樣不行會起衝突,進而轉向對2進行操作。同理slave也是一樣;設計者在BlockDesign中需要將ptr_in和ptr_out用線連接起來;
VDMA 在設計中通常配置如下
VDMA讀、寫通道通常配置3幀快取,這樣能避免影像顯示有割裂現象。
VDMA寫通道通常配置s2mm tuser,dynamic master,至於位寬什麼根據自己設計而定;
VDMA讀通道通常配置none ,dynamic slave;
VDMA SDK驅動
未附上有需要可郵件聯繫
VDMA是通過AXI Stream協議對影片數據在PS與PL端進行搬運,開發者無需關注AXI Stream協議,在BlockDesign設計中只需要把相應訊號進行連接即可。
VDMA配置有兩個選項
1、 Basic:
選擇地址位寬32bit 或者64bit;
FrameBuffer
1~32可選,通常選擇3幀快取;可避免影像割裂;
2、 Adanced:
寫通道配置:
maxi_S2MM 是將stream流數據通過axi匯流排寫進memory。
Fsync
Options幀同步有三個選項none、s2mm fsync、s2mm tuser;
none被選擇後AXI VDMA處於free run模式,VDMA會儘可能快速的搬運數據,不受外部觸發訊號所控制;
s2mm
fsync被選擇VDMA檢測到s2mm fsync下降沿訊號後開始搬運數據;
s2mm
tuser被選擇VDMA檢測影片幀起始訊號(SOF)即AXI4-Stream下的s2mm tuser訊號,檢測到訊號拉高後開始搬運影片數據;
GenLockMode有四個選項Master、Slave、DynamicMaster、DynamicSlave;
Master:VDMA在s2mm_frame_ptr_out埠輸出當前幀號;
Slave:When
selected, Slave follows the Master by the frames set in the Frame Delay
registereither by skipping or repeating frames. The GenlockEn
(S2MM_VDMACR[3]=1) registershould be set to enable genlock synchronization
between the Master and Slave. Itoutputs the current frame number on the
mm2s_frame_ptr_out port.;
DynamicMaster:When
selected, AXI VDMA skips the frame buffers that the Dynamic Slave is working
on.
It outputs the completed frame number on the s2mm_frame_ptr_out port. GenlockEn
(S2MM_VDMACR[3]=1) register should be set to enable genlock
synchronization between Dynamic Master and Dynamic Slave.
DynamicSlave:When
selected, AXI VDMA follows the Dynamic Master either by skipping or repeating
frames. It outputs the current frame number on the s2mm_frame_ptr_out port.
GenlockEn (S2MM_VDMACR[3]=1) register should be set to enable gunlock
synchronization between Dynamic Master and Dynamic Slave.
讀通道配置:
maxi_mm2s通道是將影片數據通過axi匯流排從memory讀出;
maxis_mm2s 是將影片數據轉成axis stream數據流形式;
Fsync
Options幀同步有兩個選項none、mm2s fsync;
none被選擇後AXI VDMA處於free run模式,VDMA會儘可能快速的搬運數據,不受外部觸發訊號所控制;
注意在選擇none後通道會提供一個幀起始脈衝m_axis_mm2s_tuser(0)可用於下一級模組downstream;
mm2s
fsync被選擇VDMA檢測到mm2s fsync下降沿訊號後開始搬運數據;
GenLockMode有四個選項Master、Slave、DynamicMaster、DynamicSlave;
Master:VDMA在mm2s_frame_ptr_out埠輸出當前幀號;
Slave:When
selected, Slave follows the Master by the frames set in the Frame Delay
registereither by skipping or repeating frames. The GenlockEn (MM2S_VDMACR[3]=1
registershould be set to enable genlock synchronization between the Master and
Slave. Itoutputs the current frame number on the s2mm_frame_ptr_out.;
DynamicMaster:When
selected, AXI VDMA skips the frame buffers that the Dynamic Slave is working
on.
It outputs the completed frame number on the mm2s_frame_ptr_out. GenlockEn
(MM2S_VDMACR[3]=1) register should be set to enable gunlock synchronization
between Dynamic Master and Dynamic Slave.
DynamicSlave:When
selected, AXI VDMA follows the Dynamic Master either by skipping or repeating
frames. It outputs the current frame number on the mm2s_frame_ptr_out .
GenlockEn (MM2S_VDMACR[3]=1) register should be set to enable gunlock
synchronization between Dynamic Master and Dynamic Slave.
VDMA工作簡單時序理解
VDMA內部linebuffer通過HP介面從DDR中搬運數據,通常VDMA之後直接連接axis_stream to video out IP模組,該IP模組內部通過非同步FIFO來快取數據實現跨時鐘域的問題,整體時序描述為VDMA 出tready訊號給到PS,VDMA會預讀一部分數據到linebuffer中,檢測到video_out模組給出的tready訊號將數據給到video_out 模組的fifo中,如果fifo存滿則video_out不再給VDMA tready訊號,此時VDMA仍舊一直從DDR中讀數據,直到video_out模組中的FIFO變空再次給出tready訊號,數據才會從VDMA中linebuffer流向video_out模組;
VDMA 同步機制理解
Master和Slave同步機制相當於古代的夫妻,講究的是夫唱婦隨,master是老公,slave是老婆,master不去理會slave當前在操作哪幀數據,自己只顧干自己的事情;slave則需要跟隨master,因此slave需要實時監測master的ptr幀指針。
Dynamic master/Dynamic
slave同步機制則像現代社會的夫妻制度,講究的是謙讓和諧,master還是老公,slave還是老婆,但是兩者在工作時會通過ptr指針互相監督彼此。假如master看到slave在操作某一幀即1時,而此時自己也想對1進行操作,他會考慮這樣不行會起衝突,進而轉向對2進行操作。同理slave也是一樣;設計者在BlockDesign中需要將ptr_in和ptr_out用線連接起來;
VDMA 在設計中通常配置如下
VDMA讀、寫通道通常配置3幀快取,這樣能避免影像顯示有割裂現象。
VDMA寫通道通常配置s2mm tuser,dynamic master,至於位寬什麼根據自己設計而定;
VDMA讀通道通常配置none ,dynamic slave;
VDMA SDK驅動
未附上