Skip navigation.
Home
The QNX Community Portal

View topic - PCI express

PCI express

Discussion about the QNX6 OS.

PCI express

Postby bhimesh » Tue May 29, 2012 9:27 am

Hi,
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.

Thanks
Bhimesh
bhimesh
New Member
 
Posts: 5
Joined: Fri May 25, 2012 7:09 am

Re: PCI express

Postby maschoen » Tue May 29, 2012 4:11 pm

bhimesh wrote:Hi,
We are using QNX 6.5.0 evolution version on intel board.We need to implement the PCI express protol.


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

Do this OS is supports PCI express driver or not .


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

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.


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.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: PCI express

Postby bhimesh » Thu May 31, 2012 11:36 am

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

Thanks
Bhimesh
bhimesh
New Member
 
Posts: 5
Joined: Fri May 25, 2012 7:09 am

Re: PCI express

Postby maschoen » Thu May 31, 2012 3:26 pm

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

Thanks
Bhimesh


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.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: PCI express

Postby bhimesh » Tue Jun 05, 2012 11:34 am

Hi maschoen,

With the below attached pci source code we can able to detect the our Xilinx based FPGA board (sp605) 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.
bhimesh
New Member
 
Posts: 5
Joined: Fri May 25, 2012 7:09 am

Re: PCI express

Postby maschoen » Tue Jun 05, 2012 12:57 pm

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.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: PCI express

Postby mario » Tue Jun 05, 2012 4:16 pm

bhimesh wrote:Hi maschoen,

With the below attached pci source code we can able to detect the our Xilinx based FPGA board (sp605) 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.


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)
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

Re: PCI express

Postby bhimesh » Wed Jun 06, 2012 6:05 am

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

Thanks
Bhimesh
Attachments
new_pci.rar
pci source code
(1.4 KiB) Downloaded 336 times
bhimesh
New Member
 
Posts: 5
Joined: Fri May 25, 2012 7:09 am

Re: PCI express

Postby maschoen » Wed Jun 06, 2012 6:31 am

I wasn't talking about detecting PCI. I was talking about sending data to it. Isn't that what you were asking about?
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: PCI express

Postby bhimesh » Wed Jun 06, 2012 10:08 am

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

bhimesh
bhimesh
New Member
 
Posts: 5
Joined: Fri May 25, 2012 7:09 am

Re: PCI express

Postby maschoen » Wed Jun 06, 2012 12:44 pm

That would be a function of your specific hardware. There's no way I would know how to do that.
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: PCI express

Postby mario » Wed Jun 06, 2012 4:06 pm

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

bhimesh


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.
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am


Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 2 guests