PCI express

We are using QNX 6.5.0 evolution version on intel board.We need to implement the PCI express protol. Do this OS is supports PCI express driver or not .I think already PCI driver is there in the OS.Can this used as PCI express or not.If yes,Can anyone provide me document or Web links related to PCI express (like API) for QNX.


PCI express is not (to my knowledge) a protocol. It is a hardware standard.

If by this question, you mean will QNX 6.5 work with PCI express boards, the answer is yes.

If your board has a BIOS, it should setup PCI express cards, assigning I/O ports, memory areas, interrupts etc. In my experience the PCI-BIOS program is able to handle cards set up this way.

If you are writing your own BIOS, then you have to provide the hardware code to initialize your hardware.

Thanks for the support.Please provide me sample application code transfer data from PCI express using QNX os.


I would like to help you. Your question suggests that you do not understand what PCI express is.
PCI express, like PCI is a BUS standard. You plug a PCI express card into a a PCI express slot. The bus transfers data between the card and the cpu at a hardware level. To the cpu, the card looks like any other piece of hardware with one or more of the following hardware features:

  1. I/O ports
  2. shared memory
  3. interrupts
  4. dma channels (Actually DMA channels are not part of the card itself, though the card may use them)

To answer your question, I’d have to know what board you are using, and what its specifications are. Providing the information you requested would be almost equivalent to writing a driver for you.

The only other way to interpret your question is that you want to know how to read the PCI BIOS to find out what cards are in your system, and how to retrieve their hardware configuration. There is a well documented interface for this. Just use the help viewer and search on PCI.

Hi maschoen,

             With the below attached pci source code  we can able to detect the our [b]Xilinx based FPGA board (sp605)[/b] which is having pci express interface.We connected this board to QNX 6.5.0 OS running Intel mother board. We can able to detect the board. And also we can able to send the data(one byte ) to FPGA board. How to send the multiple bytes in a single packet. Is there any api's are available. How to change TLP packet's  data length in user space.

I do not see any attached source code so I don’t know how you sent 1 byte, and therefore I don’t know what you mean by sending multiple bytes.

If you are sending a byte via an I/O port, you have two choices. You can just send bytes in a loop, or you could use the rep out assembler instruction to send multiple bytes in one instruction. In fact, there will probably be little difference in timing as I/O instructions, even on a PCI bus are typically slower than CPU instructions.

There is no API , the board looks like io (input/output on x86) or memory. That is all there is to it. The rest all depends on the specific of the board and has nothing to do with QNX (or any other operating system for that matter)

Hi maschoen,
Here i am providing the Source code for to detect pci express FPGA board.


I wasn’t talking about detecting PCI. I was talking about sending data to it. Isn’t that what you were asking about?

Yes i need to send data using memory TLP with variable length. Could you please explain pci express configuration to send burst data.


That would be a function of your specific hardware. There’s no way I would know how to do that.

TLP is NOT a feature of PCI express and to my knowledge isn’t part of the PCIe terminology, it’s more DMA I think. If your board only uses IO and doesn’t provide any memory type of access, then I don’t think there is any other choice but to use in/out instruction which will be very slow. If the device is mean to handlet lots of data and high transfer rate but isn’t making use of DMA or memory access then it’s missing the point.