本篇博文將為您演示如何創(chuàng)建 AXI CDMA Linux 用戶空間示例應(yīng)用。
示例設(shè)計(jì)將在 Zynq UltraScale+ RFSoC ZCU111 評(píng)估板上實(shí)現(xiàn)通過(guò) AXI CDMA 把數(shù)據(jù)從 PS DDR 傳輸至 AXI BRAM。
適用平臺(tái)
Vivado 和 PetaLinux 2019.2。
Zynq UltraScale+ RFSoC ZCU111 評(píng)估板
啟動(dòng)模式:JTAG,SD
模塊框圖
Vivado步驟
步驟 1:基于ZCU111 評(píng)估版創(chuàng)建一個(gè)工程,并根據(jù)上圖中的模塊設(shè)計(jì)完成相應(yīng)的模塊設(shè)計(jì)。
步驟 2:按下列設(shè)置來(lái)配置 AXI CDMA:
步驟 3:成功完成后,選擇“驗(yàn)證設(shè)計(jì) (Validate design)”以驗(yàn)證設(shè)計(jì),并檢查地址編輯器。
步驟4:創(chuàng)建整個(gè)模塊設(shè)計(jì)的頂層文件并生成比特流。
步驟 5:導(dǎo)出硬件設(shè)計(jì)以獲取 XSA 文件。
PetaLinux步驟
以下步驟用于生成啟動(dòng)鏡像和 Linux 用戶空間應(yīng)用。
步驟 1:
使用以下命令和隨附內(nèi)容 (axicdma.c) 創(chuàng)建 AXI CDMA 用戶空間應(yīng)用。
vim axicmda.c
步驟 2:
petalinux-create -t project -n bram --template zynqMP
步驟3:
petalinux-config --v --get-hw-description=
步驟4:
在 system-user.dtsi 文件中添加以下更改以禁用 CDMA 驅(qū)動(dòng)并保留內(nèi)存。
/include/ "system-conf.dtsi" / { #address-cells = >2< ; #size-cells = >2< ; memory { device_type = "memory"; reg = < 0x0 0x0 0x0 0x80000000> , < 0x0 0xA0000000 0x0 0x40000>, < 0x00000008 0x00000000 0x0 0x80000000>; }; reserved-memory { ranges; reserved { reg = <0x0 0xa0000000 0x0 0x40000>; }; }; }; &axi_bram_ctrl_1 { status = "disabled"; }; &axi_cdma_0 { status = "disabled"; };
步驟 5:
petalinux-config -c kernel
然后,按如下方式操作:
Kernel hacking --->[ ] Filter access to /dev/mem --> Save & exit
步驟 6:
petalinux-build
步驟 7:
petalinux-package --boot --fsbl images/linux/zynqmp_fsbl.elf --pmufw images/linux/pmufw.elf --fpga images/linux/system.bit --u-boot images/linux/u-boot.elf --force
步驟 8:
將 BOOT.bin 和 image.ub 文件與測(cè)試應(yīng)用二進(jìn)制文件一起復(fù)制到 SD 卡。
步驟 9:
啟動(dòng)評(píng)估板,并運(yùn)行隨附的應(yīng)用 (axicmda.c)。
運(yùn)行設(shè)計(jì)
要運(yùn)行設(shè)計(jì),請(qǐng)首先連接到 ZCU111 評(píng)估板并從 SD 卡啟動(dòng)鏡像,然后運(yùn)行二進(jìn)制應(yīng)用文件。
控制臺(tái)輸出
/dev/mem opened. BRAM Memory mapped at address 0x7fb5339000. PSDDR Memory mapped at address 0x7fb5192000. CDMA Memory mapped at address 0x7fb5336000. Input : value in PSDDR 0 : value in BRAM 1179403647 Input : value in PSDDR 1 : value in BRAM 65794 Input : value in PSDDR 2 : value in BRAM 0 Input : value in PSDDR 3 : value in BRAM 0 Input : value in PSDDR 4 : value in BRAM 11993091 Input : value in PSDDR 5 : value in BRAM 1 Input : value in PSDDR 6 : value in BRAM 13128 Input : value in PSDDR 7 : value in BRAM 0 Input : value in PSDDR 8 : value in BRAM 64 Input : value in PSDDR 9 : value in BRAM 0 Input : value in PSDDR 10 : value in BRAM 44872 Input : value in PSDDR 11 : value in BRAM 0 Input : value in PSDDR 12 : value in BRAM 0 Input : value in PSDDR 13 : value in BRAM 3670080 Input : value in PSDDR 14 : value in BRAM 4194313 Input : value in PSDDR 15 : value in BRAM 1638426 Input : value in PSDDR 16 : value in BRAM 6 Input : value in PSDDR 17 : value in BRAM 4 Input : value in PSDDR 18 : value in BRAM 64 Input : value in PSDDR 19 : value in BRAM 0 Input : value in PSDDR 20 : value in BRAM 64 Input : value in PSDDR 21 : value in BRAM 0 Input : value in PSDDR 22 : value in BRAM 64 Input : value in PSDDR 23 : value in BRAM 0 Input : value in PSDDR 24 : value in BRAM 504 Input : value in PSDDR 25 : value in BRAM 0 Input : value in PSDDR 26 : value in BRAM 504 Input : value in PSDDR 27 : value in BRAM 0 Input : value in PSDDR 28 : value in BRAM 8 Input : value in PSDDR 29 : value in BRAM 0 Input : value in PSDDR 30 : value in BRAM 3 Input : value in PSDDR 31 : value in BRAM 4 Input : value in PSDDR 32 : value in BRAM 568 Input : value in PSDDR 33 : value in BRAM 0 Input : value in PSDDR 34 : value in BRAM 568 Input : value in PSDDR 35 : value in BRAM 0 Input : value in PSDDR 36 : value in BRAM 568 Input : value in PSDDR 37 : value in BRAM 0 Input : value in PSDDR 38 : value in BRAM 27 Input : value in PSDDR 39 : value in BRAM 0 Input : value in PSDDR 40 : value in BRAM 27 Input : value in PSDDR 41 : value in BRAM 0 Input : value in PSDDR 42 : value in BRAM 1 Input : value in PSDDR 43 : value in BRAM 0 Input : value in PSDDR 44 : value in BRAM 1 Input : value in PSDDR 45 : value in BRAM 5 Input : value in PSDDR 46 : value in BRAM 0 Input : value in PSDDR 47 : value in BRAM 0 Input : value in PSDDR 48 : value in BRAM 0 Input : value in PSDDR 49 : value in BRAM 0 Input : value in PSDDR 50 : value in BRAM 0 Input : value in PSDDR 51 : value in BRAM 0 Input : value in PSDDR 52 : value in BRAM 37116 Input : value in PSDDR 53 : value in BRAM 0 Input : value in PSDDR 54 : value in BRAM 37116 Input : value in PSDDR 55 : value in BRAM 0 Input : value in PSDDR 56 : value in BRAM 65536 Input : value in PSDDR 57 : value in BRAM 0 Input : value in PSDDR 58 : value in BRAM 1 Input : value in PSDDR 59 : value in BRAM 6 Input : value in PSDDR 60 : value in BRAM 39544 Input : value in PSDDR 61 : value in BRAM 0 Input : value in PSDDR 62 : value in BRAM 105080 Input : value in PSDDR 63 : value in BRAM 0 Input : value in PSDDR 64 : value in BRAM 105080 Input : value in PSDDR 65 : value in BRAM 0 Input : value in PSDDR 66 : value in BRAM 5072 Input : value in PSDDR 67 : value in BRAM 0 Input : value in PSDDR 68 : value in BRAM 6168 Input : value in PSDDR 69 : value in BRAM 0 Input : value in PSDDR 70 : value in BRAM 65536 Input : value in PSDDR 71 : value in BRAM 0 Input : value in PSDDR 72 : value in BRAM 2 Input : value in PSDDR 73 : value in BRAM 6 Input : value in PSDDR 74 : value in BRAM 39560 Input : value in PSDDR 75 : value in BRAM 0 Input : value in PSDDR 76 : value in BRAM 105096 Input : value in PSDDR 77 : value in BRAM 0 Input : value in PSDDR 78 : value in BRAM 105096 Input : value in PSDDR 79 : value in BRAM 0 Input : value in PSDDR 80 : value in BRAM 512 Input : value in PSDDR 81 : value in BRAM 0 Input : value in PSDDR 82 : value in BRAM 512 Input : value in PSDDR 83 : value in BRAM 0 Input : value in PSDDR 84 : value in BRAM 8 Input : value in PSDDR 85 : value in BRAM 0 Input : value in PSDDR 86 : value in BRAM 4 Input : value in PSDDR 87 : value in BRAM 4 Input : value in PSDDR 88 : value in BRAM 596 Input : value in PSDDR 89 : value in BRAM 0 Input : value in PSDDR 90 : value in BRAM 596 Input : value in PSDDR 91 : value in BRAM 0 Input : value in PSDDR 92 : value in BRAM 596 Input : value in PSDDR 93 : value in BRAM 0 Input : value in PSDDR 94 : value in BRAM 68 Input : value in PSDDR 95 : value in BRAM 0 Input : value in PSDDR 96 : value in BRAM 68 Input : value in PSDDR 97 : value in BRAM 0 Input : value in PSDDR 98 : value in BRAM 4 Input : value in PSDDR 99 : value in BRAM 0 control reg:0x00000000 status reg:0x00000002 all interrupts masked... control reg:0x00005000 status reg:0x00000002 Writing source address Source addr reg:0x04000000 status reg:0x00000002 Writing destination address Dest addr reg:0xa0000000 status reg:0x00000002 Writing transfer length... DMA transfer is completed length reg:0x00000190 status reg:0x00001002 Output : value in PSDDR 0 : value in BRAM 0 Output : value in PSDDR 1 : value in BRAM 1 Output : value in PSDDR 2 : value in BRAM 2 Output : value in PSDDR 3 : value in BRAM 3 Output : value in PSDDR 4 : value in BRAM 4 Output : value in PSDDR 5 : value in BRAM 5 Output : value in PSDDR 6 : value in BRAM 6 Output : value in PSDDR 7 : value in BRAM 7 Output : value in PSDDR 8 : value in BRAM 8 Output : value in PSDDR 9 : value in BRAM 9 Output : value in PSDDR 10 : value in BRAM 10 Output : value in PSDDR 11 : value in BRAM 11 Output : value in PSDDR 12 : value in BRAM 12 Output : value in PSDDR 13 : value in BRAM 13 Output : value in PSDDR 14 : value in BRAM 14 Output : value in PSDDR 15 : value in BRAM 15 Output : value in PSDDR 16 : value in BRAM 16 Output : value in PSDDR 17 : value in BRAM 17 Output : value in PSDDR 18 : value in BRAM 18 Output : value in PSDDR 19 : value in BRAM 19 Output : value in PSDDR 20 : value in BRAM 20 Output : value in PSDDR 21 : value in BRAM 21 Output : value in PSDDR 22 : value in BRAM 22 Output : value in PSDDR 23 : value in BRAM 23 Output : value in PSDDR 24 : value in BRAM 24 Output : value in PSDDR 25 : value in BRAM 25 Output : value in PSDDR 26 : value in BRAM 26 Output : value in PSDDR 27 : value in BRAM 27 Output : value in PSDDR 28 : value in BRAM 28 Output : value in PSDDR 29 : value in BRAM 29 Output : value in PSDDR 30 : value in BRAM 30 Output : value in PSDDR 31 : value in BRAM 31 Output : value in PSDDR 32 : value in BRAM 32 Output : value in PSDDR 33 : value in BRAM 33 Output : value in PSDDR 34 : value in BRAM 34 Output : value in PSDDR 35 : value in BRAM 35 Output : value in PSDDR 36 : value in BRAM 36 Output : value in PSDDR 37 : value in BRAM 37 Output : value in PSDDR 38 : value in BRAM 38 Output : value in PSDDR 39 : value in BRAM 39 Output : value in PSDDR 40 : value in BRAM 40 Output : value in PSDDR 41 : value in BRAM 41 Output : value in PSDDR 42 : value in BRAM 42 Output : value in PSDDR 43 : value in BRAM 43 Output : value in PSDDR 44 : value in BRAM 44 Output : value in PSDDR 45 : value in BRAM 45 Output : value in PSDDR 46 : value in BRAM 46 Output : value in PSDDR 47 : value in BRAM 47 Output : value in PSDDR 48 : value in BRAM 48 Output : value in PSDDR 49 : value in BRAM 49 Output : value in PSDDR 50 : value in BRAM 50 Output : value in PSDDR 51 : value in BRAM 51 Output : value in PSDDR 52 : value in BRAM 52 Output : value in PSDDR 53 : value in BRAM 53 Output : value in PSDDR 54 : value in BRAM 54 Output : value in PSDDR 55 : value in BRAM 55 Output : value in PSDDR 56 : value in BRAM 56 Output : value in PSDDR 57 : value in BRAM 57 Output : value in PSDDR 58 : value in BRAM 58 Output : value in PSDDR 59 : value in BRAM 59 Output : value in PSDDR 60 : value in BRAM 60 Output : value in PSDDR 61 : value in BRAM 61 Output : value in PSDDR 62 : value in BRAM 62 Output : value in PSDDR 63 : value in BRAM 63 Output : value in PSDDR 64 : value in BRAM 64 Output : value in PSDDR 65 : value in BRAM 65 Output : value in PSDDR 66 : value in BRAM 66 Output : value in PSDDR 67 : value in BRAM 67 Output : value in PSDDR 68 : value in BRAM 68 Output : value in PSDDR 69 : value in BRAM 69 Output : value in PSDDR 70 : value in BRAM 70 Output : value in PSDDR 71 : value in BRAM 71 Output : value in PSDDR 72 : value in BRAM 72 Output : value in PSDDR 73 : value in BRAM 73 Output : value in PSDDR 74 : value in BRAM 74 Output : value in PSDDR 75 : value in BRAM 75 Output : value in PSDDR 76 : value in BRAM 76 Output : value in PSDDR 77 : value in BRAM 77 Output : value in PSDDR 78 : value in BRAM 78 Output : value in PSDDR 79 : value in BRAM 79 Output : value in PSDDR 80 : value in BRAM 80 Output : value in PSDDR 81 : value in BRAM 81 Output : value in PSDDR 82 : value in BRAM 82 Output : value in PSDDR 83 : value in BRAM 83 Output : value in PSDDR 84 : value in BRAM 84 Output : value in PSDDR 85 : value in BRAM 85 Output : value in PSDDR 86 : value in BRAM 86 Output : value in PSDDR 87 : value in BRAM 87 Output : value in PSDDR 88 : value in BRAM 88 Output : value in PSDDR 89 : value in BRAM 89 Output : value in PSDDR 90 : value in BRAM 90 Output : value in PSDDR 91 : value in BRAM 91 Output : value in PSDDR 92 : value in BRAM 92 Output : value in PSDDR 93 : value in BRAM 93 Output : value in PSDDR 94 : value in BRAM 94 Output : value in PSDDR 95 : value in BRAM 95 Output : value in PSDDR 96 : value in BRAM 96 Output : value in PSDDR 97 : value in BRAM 97 Output : value in PSDDR 98 : value in BRAM 98 Output : value in PSDDR 99 : value in BRAM 99 Transmitted Data successfully root@cdma_proj:~#
輸出截屏
編輯:hfy
-
Linux
+關(guān)注
關(guān)注
87文章
11292瀏覽量
209322 -
Xilinx
+關(guān)注
關(guān)注
71文章
2167瀏覽量
121298 -
AXI
+關(guān)注
關(guān)注
1文章
127瀏覽量
16622
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
評(píng)論