I have a custom board with a XU316 and external memory, identical setup as on the xcore.ai Explorer board.
My XN file has an entry for the external memory just like the XN file of the XCORE examples provided by XMOS.
I was able to use the external memory on tile #0 simply by doing this:
Code: Select all
#if ON_TILE(0)
__attribute__ ((section(".ExtMem.bss")))
#endif
int32_t mic_data[4096];
Based on the documentation I can use the external memory either on tile #0 or on tile #1, this is decided at compile time.
So I changed my code to this:
Code: Select all
#if ON_TILE(1)
__attribute__ ((section(".ExtMem.bss")))
#endif
int32_t mic_data[4096];
Only if I reduce the array size to 64 or less it works.
I believe this lines up with the L1 cache size, so does this mean the caching works but the cache is not able to write the ext memory?
If I use the following attribute
Code: Select all
__attribute__ ((section(".ExtMem.data")))
and XRUN returns.xrun: Binary not correctly downloaded to target device
I also tried manually enabling the external memory on tile one in main.c:
Code: Select all
// Enable external memory access
unsigned int ctrl0 = getps(XS1_PS_XCORE_CTRL0);
ctrl0 |= XS1_XCORE_CTRL0_EXTMEM_ENABLE_MASK;
setps(XS1_PS_XCORE_CTRL0, ctrl0);
Does anybody have successfully accessed the external memory from tile #1? Any help would be greatly appreciated.
Cheers
Alex