Page 1 of 1

xvf3000 memory usage problems

Posted: Tue Jan 23, 2018 3:51 am
by mark-jack
I use xvf3000 development board running 1i6o2 program the following problems。
xrun: Program received signal ET_LOAD_STORE, Memory access exception.
[Switching to tile[0] core[3] (dual issue)]
_SBeclearBuff_0.select.case.0 () at D:/xmos/xomos_program/module_vocalfusion/src/beclear_int.xc:81

81 mics1[sampleCount] = in_mic_buf;
Can anyone tell me what memory problems are.

Re: xvf3000 memory usage problems

Posted: Tue Jan 23, 2018 6:37 am
by mon2
81 mics1[sampleCount] = in_mic_buf;


Check if the value of i or the value of sampleCount is out of range for the arrays.

Re: xvf3000 memory usage problems

Posted: Tue Jan 23, 2018 6:59 am
by mark-jack
Hi,mon2.
I have checked i and samplecount no problem。 if it is not a problem when these two should be compiled incorrect report? But I run the hardware before making mistakes.

Re: xvf3000 memory usage problems

Posted: Tue Jan 23, 2018 12:44 pm
by infiniteimprobability
Can you post the disassembly and register file dump?

Re: xvf3000 memory usage problems

Posted: Tue Jan 23, 2018 12:56 pm
by mark-jack
HI,infiniteimprobability.
I am sorry, I do not particularly understand what you let me post. This part of the code is as follows, is the li6o2 program provided by the official website, I did not modify it.
void BeclearBuff(server audManage_if i_audMan, client beclear_if i_beclear)
{
unsigned sampleCount = 0;

while(1)
{
select
{
/* TODO consider re-naming these to near/far.. */
case i_audMan.transfer_samples(int in_mic_buf[], int in_spk_buf[], int out_mic_buf[], int out_spk_buf[]):

/* Add samples to mic and far buffers */
for(int i = 0; i < BECLEAR_NMICS; i++)
unsafe{
mics1[sampleCount] = in_mic_buf;
}

for(int i = 0; i < BECLEAR_NFAR; i++)
unsafe{
far1[sampleCount] = in_spk_buf;
}

sampleCount++;

if(sampleCount >= BECLEAR_BLOCKSIZE_SAMPLES)
unsafe{
i_beclear.swap_buffers();
sampleCount = 0;
}
break;
}
}
}

Re: xvf3000 memory usage problems

Posted: Tue Jan 23, 2018 1:08 pm
by infiniteimprobability
I m not sure how to clarify my request. The disassembly and CPU registers of the thread that hit the exception is required to debug any further because there are no clues in the source code if you are 100% condfident that i and sampleCount are within bounds.

xrun --dump-state can do that or screenshot from the GUI debugger..

Re: xvf3000 memory usage problems

Posted: Tue Jan 23, 2018 1:15 pm
by mark-jack
Okay, thank you very much, I'll try your suggestion.