- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在 FPGA 和 x86_64 Linux 机器之间进行 DMA 传输。
在 PC 端,我正在做这个初始化:
//driver probe
...
pci_set_master(dev); //set endpoint as master
result = pci_set_dma_mask(dev, 0xffffffffffffffff); //set as 64bit capable
...
//read
pagePointer = __get_free_page(__GFP_HIGHMEM); //get 1 page
temp_addr = dma_map_page(&myPCIDev->dev,pagePointer,0,PAGE_SIZE,DMA_TO_DEVICE);
printk(KERN_WARNING "[%s]Page address: 0x%lx Bus address: 0x%lx\n",DEVICE_NAME,pagePointer,temp_addr);
writeq(cpu_to_be64(temp_addr),bar0Addr); //send address to FPGA
wmb();
writeq(cpu_to_be64(1),bar1Addr); //start trasnfer
wmb();
Fmt: "001"
Type: "00000"
R|TC|R|Attr|R|TH : "00000000"
TD|EP|Attr|AT : "000000"
Length : "0000000001"
Requester ID
Tag : "00000000"
Byte Enable : "00001111";
Address : (address from dma map page)
Fmt: "000"
Type: "01010"
R|TC|R|Attr|R|TH : "00000000"
TD|EP|Attr|AT : "000000"
Length : "0000000000"
Completer ID
Compl Status|BCM : "0010"
Length : "0000000000";
Requester ID
Tag : "00000000"
R|Lower address : "00000000"
最佳答案
这是我的一个设计的摘录(有效!)。它是 VHDL,略有不同,但希望它能帮助你:
-- First dword of TLP Header
tlp_header_0(31 downto 30) <= "01"; -- Format = MemWr
tlp_header_0(29) <= '0' when pcie_addr(63 downto 32) = 0 else '1'; -- 3DW header or 4DW header
tlp_header_0(28 downto 24) <= "00000"; -- Type
tlp_header_0(23) <= '0'; -- Reserved
tlp_header_0(22 downto 20) <= "000"; -- Default traffic class
tlp_header_0(19) <= '0'; -- Reserved
tlp_header_0(18) <= '0'; -- No ID-based ordering
tlp_header_0(17) <= '0'; -- Reserved
tlp_header_0(16) <= '0'; -- No TLP processing hint
tlp_header_0(15) <= '0'; -- No TLP Digest
tlp_header_0(14) <= '0'; -- Not poisoned
tlp_header_0(13 downto 12) <= "00"; -- No PCI-X relaxed ordering, no snooping
tlp_header_0(11 downto 10) <= "00"; -- No address translation
tlp_header_0( 9 downto 0) <= "00" & X"20"; -- Length = 32 dwords
-- Second dword of TLP Header
-- Bits 31 downto 16 are Requester ID, set by hardware PCIe core
tlp_header_1(15 downto 8) <= X"00"; -- Tag, it may have to increment
tlp_header_1( 7 downto 4) <= "1111"; -- Last dword byte enable
tlp_header_1( 3 downto 0) <= "1111"; -- First dword byte enable
-- Third and fourth dwords of TLP Header, fourth is *not* sent when pcie_addr is 32 bits
tlp_header_2 <= std_logic_vector(pcie_addr(31 downto 0)) when pcie_addr(63 downto 32) = 0 else std_logic_vector(pcie_addr(31 downto 0));
tlp_header_3 <= std_logic_vector(pcie_addr(31 downto 0));
MemWr
32 个双字,而不是读取双字。第一次这样做时给我带来麻烦的另一个区别是您
如果地址低于 4GB,则必须使用 3DW header .
关于fpga - 从 PC 到 FPGA 的 DMA PCIe 读取传输,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30607667/
我的 PC 上有一个服务器应用程序,它读取 jpg 文件并通过套接字将其发送到 Android 设备。问题是,当Android设备接收到字节数组时,无法将其转换为位图。我创建了一个 PC 应用程序来接
我创建了一个 JavaFX 应用程序。现在我想确保它不被复制到其他计算机上。更详细地说,我将该应用程序出售给一位客户,安装该应用程序后,我需要确保其不被从一台计算机复制到另一台计算机。 如何防止他人复
我构建了一个使用 Dynamic 关键字的程序。 在我的代码中,我这样做了: public void OnNext(ExpandoObject value) { dynamic expando
如何通过USB在两台PC之间进行通信?我想要一个程序通过 USB 端口将数字发送到另一台 PC,另一个程序将在该 PC 上显示这些数字。我觉得这是不可能的,因为 PC 是主机而不是设备,但 USB 真
我的代码在 virtualbox 中完美运行,但在真实 PC 上启动时却无法运行(从 BIOS 检测为 USB 硬盘驱动器的 USB 笔驱动器)。 在虚拟框中;该代码将磁盘的第 2 和第 3 扇区读取
在开发 PC HD 损坏后,我正在考虑让我的开发环境完全基于虚拟 PC。 核心项目是:- XP Pro 32- IIS- VS2003- VS2008- SQL Server 2005- Office
我目前使用的是 Windows Server 2008 Standard 并且有几台 Hyper V 机器。这些是开发 VM,我现在想切换回 Vista x64,因为我缺少 Aero。 我知道 Win
我使用 Virtual PC 来创建新的环境来测试我的安装程序。但我一定是做错了什么,因为内部装有 Vista 或 XP 的 VPC 镜像占用了大约 15GB 的磁盘空间(包括安装在其中的 VS200
大家好,我正在调试一些 CS 程序,为了查看应用程序在慢速互联网中的性能,我尝试了很多不同的方法。然而最好的是服务器端和客户端在同一台电脑上——我的服务器端和客户端的调试环境是在一台电脑上设置的。 所
我有兴趣制作一个将字符串从一台计算机传输到另一台计算机的应用程序。我对 TCP 或 UDP 通信感兴趣。我已经实现了 UDP,但它似乎能够发送最多 512 字节的数据/数据包。在两端实现数据包拆分和连
在为 Pocket PC 平台开发软件时,我一直很高兴地使用 Microsoft 随 Visual Studio 提供的 Pocket PC 模拟器(并且可以免费下载)。它提供了更快的开发/部署/测试
我想执行一个批处理文件 D:\apache-tomcat-6.0.20\apache-tomcat-7.0.30\bin\shutdown.bat 这是在我的服务器上 inidsoasrv01 . 我
我目前正在我的开发 PC 上使用 Jenkins。我把它安装在我的开发电脑上,因为我对这个工具的了解有限;所以我在我的开发电脑上对其进行了测试。现在,我对 Jenkins 作为我在构建过程中的长期“合
互联网上有很多示例展示了如何编写一个应用程序,使我们能够通过蓝牙与手机与电脑进行通信。但我想做的是通过蓝牙从另一台电脑控制一台电脑。我正在尝试使用蓝牙库。我在一台电脑上运行服务器,并尝试使用此处的示例
我正在寻找一个基准测试(以及在其他 PC 上的结果),它可以让我了解通过升级我的 PC 可以获得的开发性能提升,而且该基准测试可以用来向我的老板证明升级的合理性。 我使用 Visual Studio
我只在一台 PC 上有异常,在其他 PC 上一切正常,有人知道它是从哪里来的吗? dditional information: Requested Windows Runtime type 'Wind
我想创建一个软件,它可以使用 session 选项进行 pc 到 pc 调用(没有电话)。所有参与者将仅使用该软件。我擅长使用不同的语言、平台和数据库进行编程。但是我以前没有做过这种类型的软件。 我将
我做了这个布局。 template 唯一的问题是宽度问题。它因显示器而异,取决于显示器的宽度。主菜单和标题区域的左右两侧都有空白区域。在页脚的情况下你可以看到同样的情况.. 根据我的显示器宽度,我有
我在我的电脑上编译了一个内核,然后我把它安装在同一台电脑上,它工作正常。我的问题是如何在另一台计算机上安装相同的内核? 最佳答案 您需要复制 vmlinuz-[version number] 和 in
我正在使用 Mysql,我在两个不同的系统中有两个数据库。我希望我的本地数据库与远程数据库同步。这两个架构将具有相同的表和列。 每当远程数据库发生变化时,我的本地数据库中应该发生变化/更新。 怎么做?
我是一名优秀的程序员,十分优秀!