Hi,
i have trouble to write in and read out the bar0 of my xilinx ep. The RC is c6678. To configure the RC I used the example program.
On the DSP side I have configured the Outbound address( PCIE_OB_LO_ADDR_M 0x70000000,PCIE_OB_HI_ADDR_M 0), Inbound address(PCIE_IB_LO_ADDR_M 0x90000000,PCIE_IB_HI_ADDR_M 0) and the EP FPGA
I disable the ACCR on the DSP side, because I am not sure if the xilinx ep handle it right.
To configure the ep I used the followed code in dsp.
/* Configure Address Translation */
barCfg.location = pcie_LOCATION_REMOTE;
barCfg.mode = pcie_EP_MODE;
barCfg.base = 0x70000000;
barCfg.prefetch = pcie_BAR_NON_PREF;
barCfg.type = pcie_BAR_TYPE32;
barCfg.memSpace = pcie_BAR_MEM_MEM;
barCfg.idx = 0;
if ((retVal = Pcie_cfgBar(handle, &barCfg)) != pcie_RET_OK)
{
System_printf ("Failed to configure BAR!\n");
exit(1);
}
memset (&PCIeCmdReg, 0, sizeof(PCIeCmdReg));
memset (&setRegs, 0, sizeof(setRegs));
PCIeCmdReg.memSp = 1;
PCIeCmdReg.busMs = 0;
PCIeCmdReg.serrEn = 1;
/* set everything to 1 */
PCIeCmdReg.parError = 0;
PCIeCmdReg.capList = 1;
PCIeCmdReg.resp = 1;
PCIeCmdReg.ioSp = 1;
setRegs.statusCmd= &PCIeCmdReg;
if ((retVal = Pcie_writeRegs (handle, pcie_LOCATION_REMOTE, &setRegs)) != pcie_RET_OK)
{
System_printf ("Read CMD STATUS register failed!\n");
}
To control the configuration I read at address (UInt32*)0x21802000 in C6678. The output is.
[C66xx_0] offset: 0x0 : 000710ee 00100143 05000000 00000000
[C66xx_0] offset: 0x10 : 70000000 00000000 00000000 00000000
[C66xx_0] offset: 0x20 : 00000000 00000000 00000000 000710ee
[C66xx_0] offset: 0x30 : 00000000 00000040 00000000 000001ff
[C66xx_0] offset: 0x40 : 00034801 00000000 00806005 00000000
[C66xx_0] offset: 0x50 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0x60 : 00010010 00008fea 00002810 0003f421
[C66xx_0] offset: 0x70 : 10210000 00000000 00000000 00000000
[C66xx_0] offset: 0x80 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0x90 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0xa0 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0xb0 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0xc0 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0xd0 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0xe0 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0xf0 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0x100 : 00010003 00000000 00000000 14410001
[C66xx_0] offset: 0x110 : 00000000 00000000 00062010 00000000
[C66xx_0] offset: 0x120 : 00002000 00000000 00000000 00000000
[C66xx_0] offset: 0x130 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0x140 : 00000000 10010004 00000000 00000000
[C66xx_0] offset: 0x150 : 00000000 00010002 00000000 00000000
[C66xx_0] offset: 0x160 : 00000000 00004000 800000ff 00000000
[C66xx_0] offset: 0x170 : 00004000 01000000 00020000 00000000
[C66xx_0] offset: 0x180 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0x190 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0x1a0 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0x1b0 : 00000000 00000000 00000000 00000000
[C66xx_0] offset: 0x1c0 : 00000000 00000000 00000000 00000000
If I write something on (Uint32*))0x7000xxxx and read afterward I get only zeros.
I have no further idea what could be wrong. It is possible that I mix up the addresses?
Regards serg05