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.
xvf3000 memory usage problems
-
- Member++
- Posts: 28
- Joined: Fri Oct 13, 2017 4:11 am
-
- XCore Legend
- Posts: 1913
- Joined: Thu Jun 10, 2010 11:43 am
81 mics1[sampleCount] = in_mic_buf;
Check if the value of i or the value of sampleCount is out of range for the arrays.
-
- Member++
- Posts: 28
- Joined: Fri Oct 13, 2017 4:11 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.
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.
-
Verified
- XCore Legend
- Posts: 1140
- Joined: Thu May 27, 2010 10:08 am
Can you post the disassembly and register file dump?
Engineer at XMOS
-
- Member++
- Posts: 28
- Joined: Fri Oct 13, 2017 4:11 am
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;
}
}
}
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;
}
}
}
-
Verified
- XCore Legend
- Posts: 1140
- Joined: Thu May 27, 2010 10:08 am
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..
xrun --dump-state can do that or screenshot from the GUI debugger..
Engineer at XMOS
-
- Member++
- Posts: 28
- Joined: Fri Oct 13, 2017 4:11 am
Okay, thank you very much, I'll try your suggestion.