Through the attachment I am sending output of pci –vvv command.
Now I need to enable interrupt.
You please provide me sample code for interrupts(functions for
interrupts are like InterruptAttach(),InterruptAttachEvent(),Interruptdetach,).
I am using QNX 6.5.0
From: Armin Steinhoff
[mailto:community-noreply@qnx.com]
Sent: Thursday, June 21, 2012 6:35 PM
To: general-community@community.qnx.com
Cc: srilakshmi; srilakshmi
Subject: Re: PCI Express
srilakshmi wrote:
We used pci_read_config32(2,0,0x04,10,&buf); for enabling DMA
master to transfer data to FPGA
pci_read_config32(2,0,0x04,10,&buf); reads the following members of
the config space:
uint16_t
Command;
/* 0x04 */
uint16_t
Status;
/* 0x06 */
uint8_t
Revision_ID;
/* 0x08 */
uint8_t
Class_Code[3];
/* 0x09 */
uint8_t Cache_Line_Size;
/* 0x0C */
uint8_t
Latency_Timer;
/* 0x0D */
uint8_t
Header_Type;
/* 0x0E */
uint8_t
BIST;
/*
0x0F */
uint32_t
Base_Address_Regs[6];
/* 0x10 */
uint32_t
CardBus_CIS;
/* 0x28 */
uint16_t
Sub_Vendor_ID;
/* 0x2C */
I don't know why reading the config space beginning at offset 0x04 should
enable DMA processing ??
That's plain nonsens. Does your PCI interface really support DMA to an asigned
piece of memory ??
if you want to do DMA you have to run the PCI adapter at least as bus master
hdl = pci_attach_device( NULL, PCI_INIT_ALL, pidx, &inf
); --> hdl = pci_attach_device (NULL, PCI_INIT_ALL |
PCI_INIT_ROM | PCI_PERSIST | PCI_MASTER_ENABLE ,pidx, &inf);
--Armin
From: Armin Steinhoff [mailto:community-noreply@qnx.com]
Sent: Thursday, June 21, 2012 5:08 PM
To: general-community@community.qnx.com
Cc: srilakshmi; srilakshmi
Subject: Re: PCI Express
srilakshmi wrote:
When
I am executing above attached code I am getting configuration data..
Yes ... but you are reading configuration data from an uninitialzed device
which provides invalid data.
Just some comments about your code:
pci_read_config32(2,0,0x04,10,&buf); --> why
not are inf.BusNumber and inf. DevFunc not used ?
You have to check the memory type by PCI_IS_MEM() before you use
PCI_MEM_ADDR( )
It's not a good idea to map an IO address into normal memory.
If you have a support contract ... go back to QNX 6.4.1.
--Armin
From: Armin Steinhoff [mailto:community-noreply@qnx.com]
Sent: Thursday, June 21, 2012 4:20 PM
To: general-community@community.qnx.com
Cc: srilakshmi; srilakshmi
Subject: Re: PCI Express
srilakshmi wrote:
How
to enable the interrupt line?
Your basically problem is that the board (FPGA core?) doesn't initialize at
hardware level the PCI interface.
The configuration data of the PCI interfaces are normaly provided by a serial
ROM.
Please checkout why the PCI interface isn't initialized!
Nothing can be done with an uninitialized PCI interface ...
--Armin
Please provide me sample code or document or explanaion
From: Armin Steinhoff [mailto:community-noreply@qnx.com]
Sent: Thursday, June 21, 2012 2:08 PM
To: general-community@community.qnx.com
Cc: srilakshmi; srilakshmi
Subject: Re: PCI Express
srilakshmi wrote:
Through the attached file I am sending the output of pci -vvv.
My project board contains both Intel chip and FPGA chip on same board.
through PCI express slot we are connecting Xilinx board. Through PCIe we are
communicating with each other. And the result is checking at FPGA side by
Chipscope software.
Ok ... and this is a board from Xilinx with the vendor ID 10EEh ??
This board seems to be completely disabled ...
No I/O memory, no memory, no connection to an interrupt line.
Also the memory of 128 bytes referenced by BAR[0] is disabled !
Please see the marks at the printouts of the "pci" command:
Vendor ID = 10eeh, Xilinx Corporation
Device ID = 7h, Unknown Unknown
PCI index = 0h
Class Codes = 050000h
Revision ID = 0h
Bus number = 2
Device number = 0
Function num = 0
Status Reg = 10h
Command Reg = 0h
I/O space access disabled
<<<============ !!!
Memory space access disabled
<<<============ !!!
Bus Master disabled
Special Cycle operations ignored
Memory Write and Invalidate disabled
<<<============ !!!
Palette Snooping disabled
Parity Error Response disabled
Data/Address stepping disabled
SERR# driver disabled
Fast back-to-back transactions to different agents disabled
PCI INTx enabled
Header type = 0h Single-function
BIST = 0h
Build-in-self-test not supported
Latency Timer = 0h
Cache Line Size= 0h
BAR - 0 [Mem] = 0h 32bit length 128 disabled <<<=========
!!!
Subsystem Vendor ID = 10eeh
Subsystem ID = 7h
Max Lat = 0ns
Min Gnt = 0ns
PCI Int Pin = INT A
Interrupt line = no connection <<<========== !!!
And the previous which you have sent to me is not working because
pci_dev_info predefined structure doesn't contain members like HeaderType,
CpuBmstrTranslation, CpuIsaTranslation, CpuMemTranslation, NumIrq,
info.MsiDefs[i].count
The example code previously posted by Hugh Brown is for QNX 6.5.
Are you working with QNX 6.4.x ??
Best Regards
--Armin
http://www.steinhoff-automation.com
Srilakshmi
-----Original Message-----
From: Armin Steinhoff [mailto:community-noreply@qnx.com]
Sent: Wednesday, June 20, 2012 11:59 PM
To: general-community@community.qnx.com
Cc: srilakshmi; srilakshmi
Subject: Re: PCI Express
srilakshmi wrote:
How to recognize interrupts coming from FPGA through PCI?
is this a board with a PCI interface together with separate FPGA chip??
Or is the PCI interface realized as a core of the FPGA?
Could you post the output of "pci -vvv" ?
Please provide medocument or code regarding this.
_______________________________________________
General
http://community.qnx.com/sf/go/post93788
To cancel your subscription to this discussion, please e-mail
general-community-unsubscribe@community.qnx.com
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2177 / Virus Database: 2437/5081 - Release Date: 06/20/12
_______________________________________________
General
http://community.qnx.com/sf/go/post93792
To cancel your subscription to this discussion, please e-mail general-community-unsubscribe@community.qnx.com
No
virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2177 / Virus Database: 2437/5082 - Release Date: 06/20/12
No
virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2177 / Virus Database: 2437/5082 - Release Date: 06/20/12
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2177 / Virus Database: 2437/5082 - Release Date: 06/20/12
No
virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2177 / Virus Database: 2437/5082 - Release Date: 06/20/12
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2177 / Virus Database: 2437/5082 - Release Date: 06/20/12
No
virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2177 / Virus Database: 2437/5083 - Release Date: 06/21/12
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.2177 / Virus Database: 2437/5083 - Release Date: 06/21/12