Hello
I try to build a x1 PCIE with C6657EVM(RC) and FPGA(EP).
I modified the example project ,config the dsp outbound through:
if ((retVal = pcieObTransCfg (handle, 0x90000000, 0, 0)) != pcie_RET_OK)
{
System_printf ("Failed to configure Outbound Address Translation (%d)\n", (int)retVal);
exit(1);
}
config FPGA's BAR0 through:
barCfg.location = pcie_LOCATION_REMOTE;
barCfg.mode = pcie_EP_MODE;
barCfg.base = 0x90000000;
barCfg.prefetch = pcie_BAR_NON_PREF;
barCfg.type = pcie_BAR_TYPE32;
barCfg.memSpace = pcie_BAR_MEM_MEM;
barCfg.idx = 0;
and I dump the data from 0x21802000 ,it shows exactly the same with code above.
so I guess if i want to write data to FPGA's BAR0,I should do something like:
for (i=0; i<PCIE_BUFSIZE_APP; i++)
{
*((volatile uint32_t *)pcieBase + i) = 0x11223344;}
But FPGA can't recive anything.The link is always up.I don't know whether I miss something.
I doubt I can't write data into 0x60000000 ,because when I run:
for (i=0; i<PCIE_BUFSIZE_APP; i++)
{
*((volatile uint32_t *)pcieBase + i) = 0x11223344;
uint32_t j= *((volatile uint32_t *)pcieBase + i);
System_printf ("output=%x\n",j);
}
I get the output like:
[C66xx_0] output=60000000
[C66xx_0] output=1
[C66xx_0] output=60000000
[C66xx_0] output=3
[C66xx_0] output=60000000
[C66xx_0] output=5
[C66xx_0] output=60000000
[C66xx_0] output=7
[C66xx_0] output=60000000
[C66xx_0] output=9
[C66xx_0] output=60000000
[C66xx_0] output=b
[C66xx_0] output=60000000
[C66xx_0] output=d
[C66xx_0] output=60000000
[C66xx_0] output=f
[C66xx_0] output=60000000
[C66xx_0] output=11
[C66xx_0] output=60000000
[C66xx_0] output=13
[C66xx_0] output=60000000
[C66xx_0] output=15
And the memory browser shows all zeros.
Thank you in advice