pci

PCIE项目中AXI4 IP核例化详解

邮差的信 提交于 2019-12-15 13:31:36
PCIE项目中AXI4 IP核例化 本文为明德扬原创文章,转载请注明出处! 本工程实现PCIE的8通道速率2.2GBps通信,并验证数据的正确性。 本工程里已经把PCIE部分做成一个封装的模块,对外提供的是fifo_wr(数据发送fifo)接口和fufi_rd(数据接收的fifo接口),用户只要操作fifo接口,无需关心PCIE的内部驱动。为了便于读者更加明白,可以深入了解PCIE,我们将会制作一个PCIE的连载系列。 今天,首先说一下自定义AXI4的IP核,至于AXI4和PCIE之间有什么联系,敬请关注我们的连载系列文章。 在本篇文章中暂时先不讲解AXI4协议,先来分享例化AXI4的自定义IP核详细步骤。 一、 新建工程 为了节省篇幅,新建工程部分就不详细讲解,以下为我们新建好的工程: 二、 创建自定义IP 点击"Tools"菜单下的"Create and Package New IP",如下图所示: 按照指引,点击"next": 选择AXI4的IP核: 输入IP核的名称: 点击"next": 创建和使用AXI4的IP核 三、 生成BD文件 创建AXI4完毕之后系统会自动生成一个bd文件,如下图所示: 四、 修改IP 五、 修改需求 在修改IP核之后系统会自定的给我们打开另一个工程,我修改为我们自己的需求,打开的工程如下所示: 修改自己的逻辑,添加自己的逻辑端口: 六、 封装IP

How to get bus/device/number from struct pci_dev?

为君一笑 提交于 2019-12-14 03:08:11
问题 https://elixir.bootlin.com/linux/latest/source/include/linux/pci.h#L286 In struct pci_dev, I can only see bus and function: struct pci_bus *bus; and unsigned int devfn; seems no device (of B/D/F) information? and struct pci_slot *slot; In my test, the *slot point to NULL, why ? 回答1: I found: device = PCI_SLOT(pdev->devfn); fn = PCI_FUNC(pdev->devfn); https://elixir.bootlin.com/linux/v3.5/source/include/linux/pci.h#L31 回答2: Devfn contains the device number in bits 7:3 and the function number

pcie inbound、outbound及EP、RC间的互相訪问

这一生的挚爱 提交于 2019-12-13 15:38:54
Inbound:PCI域訪问存储器域 Outbound:存储器域訪问PCI域 RC訪问EP: RC存储器域->outbound->RC PCI域->EP PCI域->inbound->EP存储器域 EP訪问RC:EP存储器域->outbound->EP PCI域->RC PCI域->inbound->RC存储器域 Out即出去,发起訪问的一側,须要进行outbound,去訪问对端 In即进来,被訪问的一側,须要进行inbound,使得对端能够訪问 EP訪问RC演示样例(蓝色箭头): (1)首先,EP须要配置outbound,RC须要inbound(一般RC端不用配),这样就建立了EP端0x20000000到RC端0x50000000的映射 (2)在RC端改动0x50000000的内容,EP端能够看到对应的变化。从EP端读/写0x20000000和从RC端读/写0x50000000,结果是一样的 RC訪问EP演示样例(黑色箭头): (1)首先,RC端须要配置outbound(一般内核中配好),EP端须要inbound(0x5b000000 inbound到BAR2),这样就建立了RC端0x20100000(BAR2)到EP端0x5b000000的映射 (2)在EP端改动0x5b000000内存的内容,在RC端0x20100000能够看到对应的变化,从RC端读

How to get memory range used by a specific device with WMI (Windows Management Instrumentation)

别等时光非礼了梦想. 提交于 2019-12-13 07:23:01
问题 How can I get the resources used by a specific device (in particular, the memory range) of a specific device knowing it's name and/or DeviceID and/or the Pci bus number, Device number and function number? For example, I want to know what memory range an Intel AHCI Controller uses. With the query "SELECT * FROM Win32_IDEController WHERE Name LIKE\"%ahci%\"" I can get some info like the complete name, device id, and other informations. Then I thought that using the complete name or device id I

Access PCI memory BAR with low latency (Linux)

醉酒当歌 提交于 2019-12-11 17:47:37
问题 Background: I have a PCI card, which is basically a clock. It gets the time by GPS and saves the current time in a certain register. Goal: I want to read a limited number of registers/bytes (for example the current time) over and over again, with the lowest possible latency . (The clock provides very high precision and I think I will loose precision the higher the latency is.). The operating system is RedHat. The programming language is C/C++. I also want to write to the device memory,

Reset FPGA based PCIe card and restore its Config Space

陌路散爱 提交于 2019-12-11 08:24:08
问题 I am adapting a Windows / Linux driver of a FPGA based PCIe card. (using a LatticeECP3 with PCIe Endpoint) I need to add a driver function to allow a host driven bitstream update of the FPGA without the need of rebooting the host afterwards. I.e. after flashing I would need to reset the FPGA to let the bitstream be reloaded. This of course would lead to a loss of the Config Space settings of PCIe endpoint. My first approach was to implement following steps: Save the PCI config space of the

Why driver need to map DMA buffers when dma-engine is in device?

大憨熊 提交于 2019-12-11 05:33:06
问题 DMA buffers are memory mapped by the driver. For example, in pci-skeleton.c, which uses rtl8319 we have: tp->tx_bufs = pci_alloc_consistent(tp->pci_dev, TX_BUF_TOT_LEN, &tp->tx_bufs_dma); But DMA engine can reside in soc or in device. **Is it that dma buffers should be allocated even if DMA engine is in device ? Why ? ** rtl8139cp datasheet (I think the dma is part of the device, but not sure about it): http://realtek.info/pdf/rtl8139cp.pdf I believe that "dma engine" and "dma controller"

PCI设备编号

空扰寡人 提交于 2019-12-11 02:44:02
1.PCI设备编号 每一个PCI device都有其unique PFA(PCI Fcntion Address) PFA由 bus number、device number、function number组成 一条PCI总线支持256个PFA,即支持256个PCI device 每个PCI芯片都有自己的device number(取决于IDSEL管脚),每个PCI芯片占用8个PFA。 每个PCI芯片的第一个PCI device的PFA必为8的倍数。 若PCI device的配置空间中PCI_HEADER_TYPE寄存器的最高bit为1,说明此芯片还有其他PFA,即还有其他device,即当前芯片是 multi-function device . Each function on a multi-function device has its own configuration space 在系统中,每个PCI芯片上的所独有的信号线是:INTA、INTB、INTC、INTD、IDSEL 每个芯片上的IDSEL需要连到PCI总线中AD[31:11]中的一根,这对应于PCI device PFA的device number IDSEL is equivalent to chip select on the CPU side during address phase of CFG RD

AIX 系统收集信息

人盡茶涼 提交于 2019-12-10 13:03:39
1.uname -uM //查看机器序列号 [P55A#/]uname -uM IBM,9133-55A IBM,03064E69H 2.oslevel -s //查看操作系统版本 [P55A#/]oslevel -s 6100-07-04-1216 3.查看CPU信息: lsdev -C|grep proc //查看cpu信息,可以查看CPU个数 [P55A#/]lsdev -C|grep proc proc0 Available 00-00 Processor 4.bootinfo -r //查看内存信息 [P55A#/]bootinfo -r 12124160 //以KB为单位 prtconf -m //查看内存信息,系统总配置内存 [P55A#/]prtconf -m Memory Size: 11840 MB lsdev -Cc memory //查看物理内存配置情况 [P55A#/]lsdev -Cc memory L2cache0 Available L2 Cache mem0 Available Memory lsattr -El mem0 //查看内存信息,可以查看到总安装内存以及可使用内存 [P55A#/]lsattr -El mem0 ent_mem_cap I/O memory entitlement in Kbytes False goodsize

Determine what (if any) PCI devices are plugged into motherboard PCI(e) slots

你离开我真会死。 提交于 2019-12-10 10:28:41
问题 I am writing a program in C# to perform a hardware audit across many Windows XP workstations. I need to determine which PCI devices are actual cards connected via a motherboard slot - NOT onboard devices that also use the PCI buses (built into the motherboard). I can successfully list all devices that use all the PCI buses using a variety of WMI classes, but none provide any indication of what is onboard vs. what is connected via a slot. I am not fussy about how the information is retrieved