xvf3000 memory usage problems

Voice related projects and technical discussions
mark-jack
Member++
Posts: 28
Joined: Fri Oct 13, 2017 4:11 am

xvf3000 memory usage problems

Postby mark-jack » Tue Jan 23, 2018 3:51 am

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[i][sampleCount] = in_mic_buf[i];
Can anyone tell me what memory problems are.
User avatar
mon2
XCore Legend
Posts: 1060
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Tue Jan 23, 2018 6:37 am

81 mics1[i][sampleCount] = in_mic_buf[i];


Check if the value of i or the value of sampleCount is out of range for the arrays.
mark-jack
Member++
Posts: 28
Joined: Fri Oct 13, 2017 4:11 am

Postby mark-jack » Tue Jan 23, 2018 6:59 am

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.
User avatar
infiniteimprobability
XCore Legend
Posts: 1027
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Tue Jan 23, 2018 12:44 pm

Can you post the disassembly and register file dump?
mark-jack
Member++
Posts: 28
Joined: Fri Oct 13, 2017 4:11 am

Postby mark-jack » Tue Jan 23, 2018 12:56 pm

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[i][sampleCount] = in_mic_buf[i];
}

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

sampleCount++;

if(sampleCount >= BECLEAR_BLOCKSIZE_SAMPLES)
unsafe{
i_beclear.swap_buffers();
sampleCount = 0;
}
break;
}
}
}
User avatar
infiniteimprobability
XCore Legend
Posts: 1027
Joined: Thu May 27, 2010 10:08 am

Postby infiniteimprobability » Tue Jan 23, 2018 1:08 pm

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..
mark-jack
Member++
Posts: 28
Joined: Fri Oct 13, 2017 4:11 am

Postby mark-jack » Tue Jan 23, 2018 1:15 pm

Okay, thank you very much, I'll try your suggestion.

Who is online

Users browsing this forum: No registered users and 4 guests