完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好
最近我一直在研究如何在ZedBoard中使用AXI_DMA核心。 我正在使用s2mm通道以分散聚集模式将数据传输到DRAM。 框图如下图所示(基于Mohammadsadegh Sadri Zynq培训课程的例子。感谢他)。 我把Xilinx的例子作为软件参考,最后我可以得到这些东西工作,这意味着我得到的数据包的数量是正确的,当我查看我的DRAM区域(RX BUFFER)时,数据就像预期的那样。 数据包大小小于RX缓冲区大小,因此我可以确保每个数据包只需要一个描述符。 然而,我仍然无法使其工作的一件事是我希望每次收到一个中断,而不是每个BD RING一次中断。 我浏览了axi dma文档并明确地使用XAxiDma_BdRingSetCoalesce(RxRingPtr,1,0)来请求dma核心中断每个数据包,但是它不起作用......实际上,它似乎根本没有效果,因为 无论我放在那里的数字,每个BD Ring总是有一个中断.... 如果有人可以解释我为什么会这样,那将是非常了解的。 如果有人想详细查看代码,请给我发电子邮件。 非常感谢。 玉萍 以上来自于谷歌翻译 以下为原文 Hi there Recently I’ve been studying how to use AXI_DMA core with ZedBoard. I’m using s2mm channel to transfer data to DRAM in scatter gather mode. The block diagram is showed in the picture below (it based on the example of Mohammadsadegh Sadri Zynq training course. Thank him). I took the Xilinx example as software reference and finally I can get this stuff somehow work, which means the number of packets I got is correct and also when I look into my DRAM area (RX BUFFER), the data there is as expected. The Packet size is smaller than the RX buffer size, so that I can make sure, that only one descriptor per packet is needed. However one thing I still can’t make it work is that I would like to have ONE INTERRUPTION PER EACH PACKET received instead of ONE INTERRUPTION PER BD RING. I went through the axi dma document and explicitly using the XAxiDma_BdRingSetCoalesce(RxRingPtr, 1,0) to ask the dma core to interrupt every packet, but it doesn’t work….In fact, it seems it has no effect at all, because no matter what number I put there, it always one interrupts per BD Ring…. It would be very apprechiated if some one could explain me why is that. p.s if some one would like to look into the code in detail, please just email me. Thanks a lot. Vicky |
|
相关推荐
5个回答
|
|
嗨Vicky,
嗯,这看起来很奇怪。 在您启动DMA之前,S2MM_DMACR的IRQThreshold位的值是多少? 您可能会发现这些有用: http://www.xilinx.com/support/answers/57550.html 特别是这一个: http://www.xilinx.com/support/answers/58080.html www.xilinx.com 以上来自于谷歌翻译 以下为原文 Hi Vicky, Hmm, that seems strange. What's the value of the IRQThreshold bits of the S2MM_DMACR right before you kick off the DMA? You might find these helpful: http://www.xilinx.com/support/answers/57550.html Specifically this one: http://www.xilinx.com/support/answers/58080.html www.xilinx.com |
|
|
|
亲爱的Xilinx,
非常感谢你的快速回复。 你推荐的例子我在做这篇文章之前已经检查过了。 我检查了Vivado中的硬件设计和软件设计作为参考。 与我的设计相比,我没有发现任何异常。 也许我错过了什么...... 我在使用两种方式启动DMA(XAxiDma_BdRingStart(RxRingPtr))之前检查了S2MM_DMACR: 1. XAxiDma_BdRingGetCoalesce(RxRingPtr,* Counter,* Delay) 这给了我* counter = 1,* Delay = 0; 2. Rx_DMACR = XAxiDma_ReadReg(RxRingPtr-> ChanBase,XAXIDMA_CR_OFFSET) 这给了我0x17002。 正如您所知,这与第一种读取方法一致。 也许我的回读或seeting approch有问题? 信息RxRingPtr是否足以设置/获取Coalesce? 因为我注意到,对于mm2s通道,s2mm通道的寄存器偏移是30h而不是00h。 我倾向于认为,根据渠道的类型(Rx或Tx),可以自动调整资产抵消。 不是吗? 提前致谢。 以上来自于谷歌翻译 以下为原文 Dear Xilinx, thank you very much for your quick reply. the example you recommended I've checked before I did this post. I checked both Hardware design in Vivado and the software design as reference. I didn't found anything unusual compared to my design. Maybe I missed something…. I checked the S2MM_DMACR right before I kick off the DMA(XAxiDma_BdRingStart(RxRingPtr)) by using two ways: 1. XAxiDma_BdRingGetCoalesce(RxRingPtr,*Counter,*Delay) This gives me *counter=1,*Delay=0; 2. Rx_DMACR=XAxiDma_ReadReg(RxRingPtr->ChanBase,XAXIDMA_CR_OFFSET) This gives me 0x17002. As you can tell this is consistent with the first read approach. Maybe there is something wrong with my read back or seeting approch? Is the information RxRingPtr sufficient to set/get the Coalesce? Because I noticed, that the register offset is 30h for s2mm channel instead of 00h for mm2s channel. I tend to think, the offset of the resiger is automacticly ajusted accrording to the type of the channel(Rx or Tx). Isn't it? Thanks in advance. |
|
|
|
亲爱的Xilinx,
非常感谢你的快速回复。 你推荐的例子我在做这篇文章之前已经检查过了。 我检查了Vivado中的硬件设计和软件设计作为参考。 与我的设计相比,我没有发现任何异常。 也许我错过了什么...... 我在使用两种方式启动DMA(XAxiDma_BdRingStart(RxRingPtr))之前检查了S2MM_DMACR: 1. XAxiDma_BdRingGetCoalesce(RxRingPtr,* Counter,* Delay) 这给了我* counter = 1,* Delay = 0; 2. Rx_DMACR = XAxiDma_ReadReg(RxRingPtr-> ChanBase,XAXIDMA_CR_OFFSET) 这给了我0x17002。 正如您所知,这与第一种读取方法一致。 也许我的回读或seeting approch有问题? 信息RxRingPtr是否足以设置/获取Coalesce? 因为我注意到,对于mm2s通道,s2mm通道的寄存器偏移是30h而不是00h。 我倾向于认为,根据渠道的类型(Rx或Tx),可以自动调整资产抵消。 不是吗? 提前致谢。 以上来自于谷歌翻译 以下为原文 Dear Xilinx, thank you very much for your quick reply. the example you recommended I've checked before I did this post. I checked both Hardware design in Vivado and the software design as reference. I didn't found anything unusual compared to my design. Maybe I missed something…. I checked the S2MM_DMACR right before I kick off the DMA(XAxiDma_BdRingStart(RxRingPtr)) by using two ways: 1. XAxiDma_BdRingGetCoalesce(RxRingPtr,*Counter,*Delay) This gives me *counter=1,*Delay=0; 2. Rx_DMACR=XAxiDma_ReadReg(RxRingPtr->ChanBase,XAXIDMA_CR_OFFSET) This gives me 0x17002. As you can tell this is consistent with the first read approach. Maybe there is something wrong with my read back or seeting approch? Is the information RxRingPtr sufficient to set/get the Coalesce? Because I noticed, that the register offset is 30h for s2mm channel instead of 00h for mm2s channel. I tend to think, the offset of the resiger is automacticly ajusted accrording to the type of the channel(Rx or Tx). Isn't it? Thanks in advance. |
|
|
|
嗯,这是一个好点。
通过驱动程序读取,它就像你一样使用RxRingPtr-> ChanBase,并期望它适合于S2MM与MM2S的偏移量。 但是,验证这一点并没有什么坏处。 运行调试器并检查“变量”窗口中的值,或者只使用xmd(mrd命令)直接读取S2MM_DMACR的值。 www.xilinx.com 以上来自于谷歌翻译 以下为原文 Hmmm, that's a good point. Reading through the driver, it is using RxRingPtr->ChanBase just like you are and expects it to be appropriately offset for S2MM vs MM2S. It wouldn't hurt to verify this, though. Either run the debugger and check the value in the 'Variables' window or just use xmd (mrd command) to directly read the value of S2MM_DMACR. www.xilinx.com |
|
|
|
你好bwiec,
我在运行系统期间使用mrd检查了寄存器值。 它给了我与0x17002相同的答案.... 如果可以查看我更新的代码并告诉我我在哪里做错了,那将会很棒。 谢谢。 玉萍 以上来自于谷歌翻译 以下为原文 Hello bwiec, I have checked the register value using mrd during runing the system. it gives me the same answer as 0x17002.... It will be great, if one could look at the code I updated and tell me where I'm doing wrongly. Thanks. Vicky |
|
|
|
只有小组成员才能发言,加入小组>>
2355 浏览 7 评论
2776 浏览 4 评论
Spartan 3-AN时钟和VHDL让ISE合成时出现错误该怎么办?
2245 浏览 9 评论
3321 浏览 0 评论
如何在RTL或xilinx spartan fpga的约束文件中插入1.56ns延迟缓冲区?
2408 浏览 15 评论
有输入,但是LVDS_25的FPGA内部接收不到数据,为什么?
719浏览 1评论
请问vc707的电源线是如何连接的,我这边可能出现了缺失元件的情况导致无法供电
515浏览 1评论
求一块XILINX开发板KC705,VC707,KC105和KCU1500
324浏览 1评论
728浏览 0评论
1927浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-2 21:21 , Processed in 1.075090 second(s), Total 57, Slave 50 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号