Program received signal ET_LOAD_STORE, Memory access excepti

If you have a simple question and just want an answer.
jzw
Member
Posts: 9
Joined: Sat Nov 14, 2015 3:53 pm

Program received signal ET_LOAD_STORE, Memory access excepti

Postby jzw » Thu Jun 16, 2016 3:37 pm

I have reduced a programme to the minimum and get the error

xrun: Program received signal ET_LOAD_STORE, Memory access exception.
0x0004035c in lib_dsp_filters_fir ()

The programme is

#include <lib_dsp.h>

void TestFIR()
{
int32_t sample = Q28(0);
int32_t filter_coeff[5] = { Q28(0.5),Q28(-0.5),Q28(0.0),Q28(-0.5),Q28(0.5) };
int32_t filter_state[4] = { 0, 0, 0, 0 };
int32_t result = lib_dsp_filters_fir( sample, filter_coeff, filter_state, 5, 28 );
}

int main()
{
TestFIR();
return 0;
}

This is running on a XUF216-512-FB236 part.

Please help me to resolve this,


It appears to be cured by forcing the two arrays to be on 64bit boundaries. If this is the case is there a Pragma or similar to enforce this?
User avatar
andrew
Experienced Member
Posts: 113
Joined: Fri Dec 11, 2009 10:22 am

Postby andrew » Fri Jun 17, 2016 8:36 am

If you place the array into global space then it will be 64 bit aligned. There is currently no pragma for doing this although there may be one day.
peter
XCore Addict
Posts: 230
Joined: Wed Mar 10, 2010 12:46 pm

Postby peter » Fri Jun 17, 2016 8:59 am

You could always make it an array of 64-bit items which can then be pointed to. This will then be 64-bit aligned.

int64_t filter_coeff_64[3];
int32_t *filter_coeff = (int32_t*)&filter_coeff_64[0];
CousinItt
Experienced Member
Posts: 92
Joined: Wed May 31, 2017 6:55 pm

Postby CousinItt » Sun Jun 04, 2017 5:55 pm

I just had the same problem. I have two tasks running biquad filters on four I2S data streams. I'd like to keep the filter state private to each task, but then it fails with this exception. It looks like I might have to make the filter state arrays global and pass a reference to each task, but I'll give Peter's workaround a go first.

+1 for that pragma.
feima0011
New User
Posts: 3
Joined: Fri Dec 07, 2018 7:09 am

Postby feima0011 » Tue Jan 08, 2019 11:19 am

peter wrote:You could always make it an array of 64-bit items which can then be pointed to. This will then be 64-bit aligned.

The xmos cpu is 32bit. What is the point of making an array of 64-bit?

int64_t filter_coeff_64[3];
int32_t *filter_coeff = (int32_t*)&filter_coeff_64[0];

Who is online

Users browsing this forum: No registered users and 182 guests