xvf3000 memory usage problems

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

xvf3000 memory usage problems

Post 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.


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

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

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

Post by infiniteimprobability »

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

Post 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;
}
}
}
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

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

Post by mark-jack »

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